:root {
    --app-bg: #f3f5fa;
    --app-surface: #ffffff;
    --app-accent: #4f46e5;
    --app-accent-soft: rgba(79, 70, 229, 0.1);
    --app-text: #1f2937;
    --app-muted: #6b7280;
    --app-border: #e5e7eb;
    --radius-lg: 24px;
    --radius-md: 18px;
    --radius-sm: 12px;
    font-family: 'Inter', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

body.app-body {
    background: var(--app-bg);
    color: var(--app-text);
    min-height: 100vh;
}

.app-shell {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.app-header {
    backdrop-filter: blur(14px);
    background: rgba(255, 255, 255, 0.82);
    border-bottom: 1px solid rgba(255, 255, 255, 0.6);
    box-shadow: 0 12px 40px rgba(15, 23, 42, 0.08);
    position: sticky;
    top: 0;
    z-index: 10;
}

.app-header .container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1.5rem;
    padding-block: 1.2rem;
}

.app-header .header-bar {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.app-header .header-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1.5rem;
    flex: 1;
}

.app-header .header-content nav {
    flex: 1;
}

.header-auth {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.auth-links {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

/* Скрываем кнопку на десктопе */
@media (min-width: 768px) {
    .mobile-menu-toggle {
        display: none;
    }
}

.mobile-menu-toggle {
    border: none;
    background: transparent;
    z-index: 9999 !important;
    pointer-events: auto !important;
    min-width: 44px;
    min-height: 44px;
    display: flex; /* ← Центрирует иконку */
    align-items: center;
    justify-content: center;
}

.mobile-menu-toggle:hover,
.mobile-menu-toggle:focus-visible {
    background: rgba(79, 70, 229, 0.12);
    color: var(--app-accent);
}

.mobile-menu-icon,
.mobile-menu-icon::before,
.mobile-menu-icon::after {
    display: block;
    width: 20px;
    height: 2px;
    border-radius: 999px;
    background: currentColor;
    transition: transform 0.2s ease, opacity 0.2s ease;
}

.mobile-menu-icon {
    position: relative;
}

.mobile-menu-icon::before,
.mobile-menu-icon::after {
    content: "";
    position: absolute;
    left: 0;
}

.mobile-menu-icon::before {
    transform: translateY(-6px);
}

.mobile-menu-icon::after {
    transform: translateY(6px);
}

.app-header.mobile-menu-open .mobile-menu-icon {
    background: transparent;
}

.app-header.mobile-menu-open .mobile-menu-icon::before {
    transform: translateY(6px) rotate(45deg);
}

.app-header.mobile-menu-open .mobile-menu-icon::after {
    transform: translateY(-6px) rotate(-45deg);
}

.brand-title {
    font-weight: 700;
    font-size: 1.25rem;
    color: var(--app-accent);
    margin: 0;
}

.brand-title a {
    color: inherit;
    text-decoration: none;
}

.brand-title a:hover {
    color: inherit;
    text-decoration: none;
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.nav-links a,
.nav-links button {
    border: none;
    background: transparent;
    color: var(--app-muted);
    font-weight: 500;
    transition: color 0.2s ease, background 0.2s ease;
    padding: 0.4rem 0.75rem;
    border-radius: var(--radius-sm);
    text-decoration: none;
}

.nav-links a:hover,
.nav-links button:hover,
.nav-links a.active {
    color: var(--app-accent);
    background: var(--app-accent-soft);
}

.profile-chip {
    display: inline-flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.5rem 0.85rem;
    background: rgba(79, 70, 229, 0.08);
    border-radius: 999px;
}

.profile-chip .avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: linear-gradient(135deg, #4f46e5, #7c3aed);
    color: #fff;
    display: grid;
    place-items: center;
    font-weight: 600;
}

.app-main {
    flex: 1;
    padding: 2.5rem 0 3rem;
}

.app-main .container {
    max-width: 1080px;
}

.app-footer {
    padding: 1rem 0 2rem;
    text-align: center;
    color: var(--app-muted);
    font-size: 0.875rem;
}

.dashboard-hero {
    background: linear-gradient(135deg, rgba(79, 70, 229, 0.12), rgba(16, 185, 129, 0.12));
    border-radius: var(--radius-lg);
    padding: clamp(1.8rem, 4vw, 2.6rem);
    margin-bottom: 2rem;
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 1.5rem;
    border: 1px solid rgba(255, 255, 255, 0.6);
    box-shadow: 0 28px 60px rgba(79, 70, 229, 0.12);
}

.dashboard-hero h1 {
    font-size: clamp(1.75rem, 4vw, 2.5rem);
    font-weight: 700;
    margin-bottom: 0.75rem;
}

.dashboard-hero p {
    color: var(--app-muted);
    margin-bottom: 0.5rem;
}

.dashboard-hero .cta-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.7rem 1.4rem;
    border-radius: 999px;
    background: #111827;
    color: #fff;
    font-weight: 600;
    text-decoration: none;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.dashboard-hero .cta-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 12px 30px rgba(17, 24, 39, 0.2);
}

.card-grid {
    display: grid;
    gap: 1.5rem;
}

@media (min-width: 768px) {
    .card-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

.card-surface {
    background: var(--app-surface);
    border-radius: var(--radius-lg);
    padding: 1.5rem;
    box-shadow: 0 24px 50px rgba(15, 23, 42, 0.06);
    border: 1px solid rgba(148, 163, 184, 0.18);
}

.section-title {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 1rem;
}

.student-card h2 {
    font-weight: 600;
    margin-bottom: 0.35rem;
}

.student-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 0.6rem 1rem;
    color: var(--app-muted);
    font-weight: 500;
}

.team-item {
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 1rem;
    align-items: center;
    padding: 1rem;
    border-radius: var(--radius-md);
    border: 1px solid rgba(79, 70, 229, 0.08);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.team-item:hover {
    transform: translateY(-3px);
    box-shadow: 0 18px 35px rgba(15, 23, 42, 0.08);
}

.team-item .avatar {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    background-size: cover;
    background-position: center;
    background-color: rgba(79, 70, 229, 0.1);
    display: grid;
    place-items: center;
    font-weight: 600;
    color: var(--app-accent);
}

.team-item .team-name {
    font-weight: 600;
    margin-bottom: 0.25rem;
}

.team-item .team-role {
    color: var(--app-accent);
    font-weight: 500;
    margin-bottom: 0.5rem;
}

.team-item .team-bio {
    color: var(--app-muted);
    font-size: 0.95rem;
    margin-bottom: 0.75rem;
}

.team-item .team-contact {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem 1rem;
    font-size: 0.92rem;
    color: var(--app-muted);
}

.student-subnav {
    display: flex;
    gap: 1rem;
    padding-bottom: 0.75rem;
    margin-bottom: 1.5rem;
    border-bottom: 1px solid rgba(148, 163, 184, 0.2);
}

.student-subnav__link {
    font-weight: 600;
    color: var(--app-muted);
    text-decoration: none;
    padding-bottom: 0.35rem;
    border-bottom: 2px solid transparent;
}

.student-subnav__link:hover {
    color: var(--app-accent);
}

.student-subnav__link.active {
    color: var(--app-accent);
    border-bottom-color: var(--app-accent);
}

.student-label {
    display: block;
    text-transform: uppercase;
    font-size: 0.75rem;
    letter-spacing: 0.08em;
    color: var(--app-muted);
    font-weight: 600;
    margin-bottom: 0.35rem;
}

.student-subtitle {
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 0.75rem;
}

.student-rich-text p {
    margin-bottom: 0.75rem;
}

.preference-chip-list {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.preference-chip {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.35rem 0.6rem;
    border-radius: 999px;
    background-color: rgba(79, 70, 229, 0.08);
    color: var(--app-accent);
    font-weight: 600;
    font-size: 0.9rem;
}

.preference-chip__score {
    font-size: 0.75rem;
    color: rgba(15, 23, 42, 0.65);
}

.preference-chip__score.negative {
    color: #dc3545;
}

.preference-summary {
    border: 1px solid rgba(148, 163, 184, 0.18);
    border-radius: var(--radius-md);
    padding: 1rem;
    background: rgba(15, 23, 42, 0.02);
}

.preference-summary__value {
    font-size: 1.75rem;
    font-weight: 600;
    line-height: 1;
}

.preference-table thead th {
    text-transform: uppercase;
    font-size: 0.7rem;
    letter-spacing: 0.08em;
    color: var(--app-muted);
    border-bottom-width: 1px;
}

.preference-table tbody td {
    vertical-align: middle;
}

.restriction-list__item {
    padding: 0.85rem 1rem;
    border-radius: var(--radius-md);
    border: 1px solid rgba(79, 70, 229, 0.08);
    background: rgba(79, 70, 229, 0.03);
    margin-bottom: 0.75rem;
}

.restriction-list__title {
    font-weight: 600;
    margin-bottom: 0.2rem;
}

.restriction-list__meta {
    font-size: 0.85rem;
    color: var(--app-muted);
}

.restriction-list__notes {
    margin-top: 0.5rem;
    font-size: 0.9rem;
}

.plan-card {
    overflow: hidden;
}

.plan-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1.25rem;
}

.plan-items {
    display: grid;
    gap: 0.9rem;
}

.plan-item {
    border-radius: var(--radius-md);
    padding: 1rem;
    border: 1px solid rgba(148, 163, 184, 0.2);
    display: grid;
    gap: 0.35rem;
    background: rgba(255, 255, 255, 0.7);
}

.plan-item .badge {
    background: rgba(79, 70, 229, 0.12);
    color: var(--app-accent);
    font-weight: 600;
    border-radius: 999px;
    padding: 0.25rem 0.75rem;
}

.status-muted {
    color: var(--app-muted);
    font-size: 0.9rem;
}

.empty-state {
    text-align: center;
    padding: 3rem 1.5rem;
    border-radius: var(--radius-lg);
    background: linear-gradient(135deg, rgba(15, 118, 110, 0.12), rgba(56, 189, 248, 0.12));
    border: 1px dashed rgba(45, 212, 191, 0.3);
}

.login-wrapper {
    min-height: 100vh;
    display: grid;
    place-items: center;
    background: radial-gradient(circle at top right, rgba(79, 70, 229, 0.18), transparent 55%),
        radial-gradient(circle at bottom left, rgba(16, 185, 129, 0.18), transparent 55%),
        var(--app-bg);
    padding: 2rem;
}

.login-card {
    width: min(480px, 100%);
    background: var(--app-surface);
    border-radius: var(--radius-lg);
    padding: clamp(2rem, 4vw, 2.8rem);
    box-shadow: 0 30px 70px rgba(15, 23, 42, 0.18);
    border: 1px solid rgba(148, 163, 184, 0.18);
}

.login-card h1 {
    font-size: 1.75rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
}

.login-card p {
    color: var(--app-muted);
    margin-bottom: 1.75rem;
}

.form-floating > label {
    color: var(--app-muted);
}

.btn-primary {
    background: linear-gradient(135deg, #4f46e5, #7c3aed);
    border: none;
    font-weight: 600;
    padding: 0.75rem 1.5rem;
    border-radius: var(--radius-sm);
}

.btn-outline-secondary {
    border-radius: var(--radius-sm);
}

.alert-modern {
    border-radius: var(--radius-sm);
    border: 1px solid rgba(248, 113, 113, 0.2);
    background: rgba(248, 113, 113, 0.08);
    color: #b91c1c;
}

.table-modern {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0 0.75rem;
}

.table-modern thead th {
    text-transform: uppercase;
    font-size: 0.75rem;
    letter-spacing: 0.08em;
    color: var(--app-muted);
    font-weight: 600;
    border: none;
}

.table-modern tbody tr {
    background: rgba(255, 255, 255, 0.85);
    border-radius: var(--radius-md);
    box-shadow: 0 8px 16px rgba(15, 23, 42, 0.05);
}

.table-modern tbody td {
    border: none;
    padding: 0.95rem 1.1rem;
    vertical-align: middle;
}

.tag-muted {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.3rem 0.7rem;
    border-radius: 999px;
    background: rgba(148, 163, 184, 0.12);
    color: var(--app-muted);
    font-size: 0.85rem;
}

.badge-soft-success {
    background: rgba(16, 185, 129, 0.12);
    color: #059669;
    border-radius: 999px;
    padding: 0.35rem 0.75rem;
}

.difficulty-dot {
    width: 16px; /* Âíóòðåííèé êðóã */
    height: 16px;
    border-radius: 999px;
    display: inline-block;
}

.assignment-difficulty {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.assignment-difficulty--editable {
    gap: 0.75rem;
}

.assignment-difficulty__circle {
    width: 24px;
    height: 24px;
    border: 2px solid transparent;
    border-radius: 999px;
    padding: 3px; /* Îòñòóï äëÿ âíóòðåííåãî êðóãà */
    background-clip: content-box;
    transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.assignment-difficulty--editable .assignment-difficulty__circle {
    cursor: pointer;
}

    .assignment-difficulty--editable .assignment-difficulty__circle:focus-visible {
        outline: none;
        box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.45);
    }

.assignment-difficulty__circle--active {
    transform: scale(1.1);
    border-color: rgba(15, 23, 42, 0.35);
}

.assignment-difficulty__label {
    font-size: 0.9rem;
    color: var(--app-muted);
}

.difficulty-dot {
    width: 100%;
    height: 100%;
    border-radius: 999px;
    display: block;
}

.difficulty-dot--easy {
    background: #bbf7d0;
}

.difficulty-dot--medium {
    background: #fde68a;
}

.difficulty-dot--hard {
    background: #fecaca;
}

.assignment-difficulty__circle--active.difficulty-dot--easy {
    background: #34d399;
}

.assignment-difficulty__circle--active.difficulty-dot--medium {
    background: #fbbf24;
}

.assignment-difficulty__circle--active.difficulty-dot--hard {
    background: #f87171;
}

.badge-soft-warning {
    background: rgba(245, 158, 11, 0.12);
    color: #b45309;
    border-radius: 999px;
    padding: 0.35rem 0.75rem;
}

@media (max-width: 767px) {
    .app-header .container {
        flex-direction: column;
        align-items: stretch;
        gap: 0.75rem;
    }

    .app-header .header-bar {
        width: 100%;
        justify-content: space-between;
    }

    .app-header .header-content {
        display: none;
        flex-direction: column;
        align-items: flex-start;
        gap: 1.25rem;
        width: 100%;
        padding: 0.75rem 0 0;
        border-top: 1px solid rgba(79, 70, 229, 0.08);
    }

    .app-header.mobile-menu-open .header-content {
        display: flex;
    }

    .app-header .nav-links {
        flex-direction: column;
        align-items: stretch;
        width: 100%;
        gap: 0.5rem;
    }

    .app-header .nav-links a,
    .app-header .nav-links button {
        width: 100%;
        text-align: left;
    }

    .header-auth {
        width: 100%;
    }

    .auth-links {
        width: 100%;
        flex-direction: column;
        align-items: stretch;
        gap: 0.75rem;
    }

    .auth-links .btn,
    .auth-links button {
        width: 100%;
    }

    .profile-chip {
        width: 100%;
        justify-content: flex-start;
    }

    .dashboard-hero {
        grid-template-columns: 1fr;
    }

    .plan-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.75rem;
    }
}

.access-denied-page {
    min-height: 70vh;
    display: flex;
    align-items: center;
    justify-content: center;
}

.access-denied-card {
    background: var(--app-surface);
    border-radius: var(--radius-lg);
    padding: 2.5rem;
    max-width: 480px;
    text-align: center;
    box-shadow: 0 18px 40px rgba(15, 23, 42, 0.12);
}

.access-denied-card h1 {
    font-size: 2rem;
    margin-bottom: 1rem;
}

.access-denied-card p {
    color: var(--app-muted);
    margin-bottom: 1.5rem;
}

.assignment-grid {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
}

.assignment-tag-filter .btn {
    font-size: 0.8rem;
    padding: 0.25rem 0.65rem;
    border-radius: 999px;
}

.assignment-card {
    position: relative;
    display: block;
    padding: 1.5rem;
    border-radius: var(--radius-lg);
    border: 1px solid rgba(79, 70, 229, 0.12);
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.9), rgba(248, 250, 252, 0.9));
    box-shadow: 0 22px 48px rgba(15, 23, 42, 0.08);
    transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
    color: inherit;
}


.assignment-card__delete {
    position: absolute;
    top: 0.75rem;
    right: 0.75rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2rem;
    height: 2rem;
    border: none;
    border-radius: 999px;
    background: rgba(248, 113, 113, 0.06);
    color: #f87171;
    cursor: pointer;
    transition: background 0.2s ease, color 0.2s ease, transform 0.2s ease;
}

.assignment-card__delete:hover,
.assignment-card__delete:focus-visible {
    background: rgba(248, 113, 113, 0.14);
    color: #ef4444;
    transform: translateY(-1px);
}

.assignment-card__delete-icon {
    width: 1rem;
    height: 1rem;
    fill: currentColor;
}

.assignment-card:hover,
.assignment-card:focus-visible {
    text-decoration: none;
    border-color: rgba(79, 70, 229, 0.3);
    transform: translateY(-4px);
    box-shadow: 0 28px 60px rgba(79, 70, 229, 0.18);
}

.assignment-card__title {
    font-weight: 600;
    font-size: 1.05rem;
    line-height: 1.35;
}

.assignment-card__side {
    align-items: flex-start;
}

@media (min-width: 768px) {
    .assignment-card__side {
        align-items: flex-end;
    }
}

.assignment-card__difficulty {
    margin-top: 0.5rem;
}

.assignment-card__footer {
    border-top: 1px solid rgba(148, 163, 184, 0.18);
    padding-top: 1.1rem;
}

.assignment-card__cta {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    padding: 0.45rem 0.9rem;
    border-radius: 999px;
    background: rgba(79, 70, 229, 0.12);
    color: var(--app-accent);
    font-weight: 600;
    transition: transform 0.2s ease, background 0.2s ease, color 0.2s ease;
}

.assignment-card:hover .assignment-card__cta,
.assignment-card:focus-visible .assignment-card__cta {
    background: var(--app-accent);
    color: #fff;
    transform: translateX(4px);
}

.assignment-card__cta-icon {
    font-size: 1rem;
    line-height: 1;
}

.assignment-card__tag {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.25rem 0.6rem;
    border-radius: 999px;
    background: rgba(16, 185, 129, 0.08);
    color: #0f766e;
    font-weight: 600;
    font-size: 0.78rem;
    line-height: 1.2;
}

.assignment-card__variant-count {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 22px;
    height: 22px;
    border-radius: 999px;
    background: rgba(59, 130, 246, 0.12);
    color: #2563eb;
    font-weight: 600;
    font-size: 0.7rem;
    line-height: 1;
}

.preference-tag-list {
    background: rgba(255, 255, 255, 0.65);
    border: 1px solid rgba(148, 163, 184, 0.18);
    border-radius: var(--radius-md);
    padding: 1rem;
    height: 100%;
}

.preference-tag-item {
    padding: 0.75rem 1rem;
    border: none;
    background: transparent;
    transition: background 0.2s ease, color 0.2s ease;
    border-radius: var(--radius-sm);
}

.preference-tag-item:hover,
.preference-tag-item:focus-visible {
    background: rgba(79, 70, 229, 0.08);
}

.preference-tag-item.active {
    background: var(--app-accent);
    color: #fff;
}

.preference-tag-item.active .text-muted {
    color: rgba(255, 255, 255, 0.75) !important;
}

.day-plan-date-picker {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

    .day-plan-date-picker input[type="date"] {
        max-width: 170px;
    }

.day-plan-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.day-plan-card {
    border-radius: var(--radius-md);
    border: 1px solid rgba(148, 163, 184, 0.16);
    background: var(--app-surface);
    padding: 1.25rem 1.4rem;
    box-shadow: 0 18px 36px rgba(15, 23, 42, 0.08);
}

.day-plan-card--faded {
    background: rgba(148, 163, 184, 0.08);
    border-color: rgba(148, 163, 184, 0.32);
    box-shadow: none;
    transition: border-color 0.2s ease, background-color 0.2s ease;
}

.day-plan-card--faded:hover,
.day-plan-card--faded:focus-within {
    background: rgba(148, 163, 184, 0.12);
    border-color: rgba(148, 163, 184, 0.45);
}

.day-plan-card--faded .day-plan-card__title,
.day-plan-card--faded .day-plan-card__meta,
.day-plan-card--faded .day-plan-card__timeline,
.day-plan-card--faded .day-plan-card__score-value {
    color: var(--bs-secondary-color, #6c757d);
}

.day-plan-card__header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 1rem;
    margin-bottom: 0.75rem;
}

.day-plan-card__title {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 0.25rem;
}

.day-plan-card__meta {
    font-size: 0.85rem;
    color: var(--app-muted);
}

.day-plan-card__badges {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
    justify-content: flex-end;
}

.day-plan-card__timeline {
    display: flex;
    flex-wrap: wrap;
    gap: 1.25rem;
    font-size: 0.85rem;
    color: var(--app-muted);
    margin-bottom: 0.85rem;
}

.day-plan-card__actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    align-items: center;
}

.day-plan-calendar {
    border: 1px solid rgba(148, 163, 184, 0.18);
    border-radius: var(--radius-md);
    padding: 1.1rem;
    background: rgba(255, 255, 255, 0.9);
}

.day-plan-calendar__month {
    font-weight: 600;
    text-transform: capitalize;
    margin-bottom: 0.75rem;
}

.day-plan-calendar__grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 0.4rem;
}

.day-plan-calendar__weekday {
    text-transform: uppercase;
    font-size: 0.7rem;
    font-weight: 600;
    color: var(--app-muted);
    text-align: center;
}

.day-plan-calendar__day {
    position: relative;
    border: none;
    background: transparent;
    padding: 0.65rem 0;
    border-radius: var(--radius-sm);
    font-weight: 600;
    color: var(--app-text);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    transition: background 0.2s ease, color 0.2s ease;
}

    .day-plan-calendar__day:hover:not([disabled]) {
        background: rgba(79, 70, 229, 0.12);
    }

.day-plan-calendar__day--muted {
    color: rgba(148, 163, 184, 0.8);
}

.day-plan-calendar__day--today {
    border: 1px solid rgba(79, 70, 229, 0.4);
}

.day-plan-calendar__day--selected {
    background: var(--app-accent);
    color: #fff;
}

    .day-plan-calendar__day--selected .day-plan-calendar__dot {
        background: #fff;
    }

.day-plan-calendar__dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--app-accent);
    margin-top: 0.35rem;
}
/* Plan team member tag styling is handled in Pages/Students/Plan.razor.css */

.assignment-media-grid {
    display: grid;
    gap: 1.25rem;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
}

.assignment-media-card {
    background: var(--app-surface);
    border-radius: var(--radius-md);
    padding: 1.25rem;
    display: flex;
    flex-direction: column;
    gap: 1rem;
    box-shadow: 0 18px 36px rgba(15, 23, 42, 0.08);
    border: 1px solid rgba(148, 163, 184, 0.18);
}

.assignment-media-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    flex-wrap: nowrap;
}

.assignment-media-title {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    font-weight: 600;
    font-size: 0.95rem;
    color: var(--app-text);
    min-width: 0;
}

.assignment-media-title.empty {
    color: var(--app-muted);
    font-weight: 500;
}

.assignment-media-title .text-truncate {
    max-width: 100%;
}

.assignment-media-subtitle {
    font-size: 0.8rem;
    color: var(--app-muted);
    font-weight: 500;
    line-height: 1.2;
}

.assignment-media-remove {
    border: 1px solid rgba(239, 68, 68, 0.2);
    background: rgba(239, 68, 68, 0.08);
    color: #dc2626;
    border-radius: 999px;
    padding: 0.4rem 0.85rem;
    font-weight: 600;
    font-size: 0.85rem;
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    transition: background 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
    white-space: nowrap;
}

.assignment-media-remove:hover,
.assignment-media-remove:focus-visible {
    background: rgba(239, 68, 68, 0.16);
    box-shadow: 0 16px 32px rgba(239, 68, 68, 0.15);
    transform: translateY(-1px);
    color: #b91c1c;
}

.assignment-media-remove:disabled {
    opacity: 0.6;
    pointer-events: none;
}

.assignment-media-remove-icon {
    font-size: 0.9rem;
    line-height: 1;
}

.assignment-media-actions {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.assignment-media-actions .btn {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    padding-inline: 0.5rem;
}

.assignment-media-body {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.assignment-media-progress .progress {
    height: 0.5rem;
    border-radius: 999px;
    background: rgba(79, 70, 229, 0.12);
}

.assignment-media-progress .progress-bar {
    background: linear-gradient(135deg, #4f46e5, #7c3aed);
}

.assignment-media-progress-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem 0.75rem;
    font-size: 0.8rem;
    color: var(--app-muted);
}

.assignment-media-progress-meta span {
    max-width: 100%;
}

.assignment-media-error {
    font-weight: 600;
}

.assignment-media-preview {
    background: rgba(15, 23, 42, 0.03);
    border: 1px dashed rgba(148, 163, 184, 0.4);
    border-radius: var(--radius-md);
    padding: 0.75rem;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 140px;
}

.assignment-media-preview img {
    width: 100%;
    max-height: 220px;
    object-fit: contain;
    border-radius: var(--radius-sm);
}

.assignment-media-preview video {
    width: 100%;
    max-height: 260px;
    border-radius: var(--radius-sm);
}

.assignment-media-preview audio {
    width: 100%;
}

.assignment-media-filename {
    font-size: 0.8rem;
}

.assignment-media-placeholder {
    font-size: 0.85rem;
    color: var(--app-muted);
    line-height: 1.4;
}
