:root {
    --bg: #f5f7fb;
    --panel: #ffffff;
    --text: #1d2433;
    --muted: #6e7685;
    --line: #e4e8ef;
    --accent: #536fd1;
    --accent-dark: #4058b0;
    --success: #2f8b57;
    --danger: #b84b4b;
    --warning: #b7791f;
    --shadow: 0 10px 30px rgba(35, 46, 75, .07);
    --radius: 18px;
}
* { box-sizing: border-box; }
html { min-height: 100%; }
body {
    margin: 0;
    min-height: 100vh;
    font-family: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    color: var(--text);
    background:
        radial-gradient(circle at 10% 0%, rgba(83,111,209,.08), transparent 30%),
        var(--bg);
}
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
button, input, select, textarea { font: inherit; }
button { cursor: pointer; }

.site-header {
    position: sticky;
    top: 0;
    z-index: 50;
    background: rgba(255,255,255,.94);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--line);
}
.header-inner {
    width: min(1320px, calc(100% - 32px));
    min-height: 66px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    gap: 24px;
}
.brand {
    display: flex;
    align-items: center;
    gap: 10px;
    color: var(--text);
    font-weight: 850;
    white-space: nowrap;
}
.brand:hover { text-decoration: none; }
.brand-mark {
    width: 34px;
    height: 34px;
    display: grid;
    place-items: center;
    border-radius: 11px;
    color: white;
    background: linear-gradient(135deg, var(--accent), #7b8fe0);
    box-shadow: 0 7px 16px rgba(83,111,209,.22);
}
.brand-mark.large {
    width: 56px;
    height: 56px;
    border-radius: 17px;
    font-size: 24px;
}
.desktop-nav {
    display: flex;
    gap: 4px;
    flex: 1;
}
.desktop-nav a {
    padding: 9px 10px;
    border-radius: 9px;
    color: #515967;
    font-size: 14px;
}
.desktop-nav a:hover {
    text-decoration: none;
    background: #f1f4fa;
    color: var(--accent);
}
.header-account {
    margin-left: auto;
    display: flex;
    align-items: center;
    gap: 10px;
}
.user-name {
    max-width: 180px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    color: var(--muted);
    font-size: 13px;
}
.link-button {
    border: 0;
    padding: 0;
    color: var(--accent);
    background: transparent;
}
.mobile-menu { display: none; position: relative; }
.mobile-menu summary {
    width: 40px;
    height: 40px;
    display: grid;
    place-items: center;
    list-style: none;
    border-radius: 10px;
    background: #f2f4f8;
    font-size: 21px;
}
.mobile-menu summary::-webkit-details-marker { display: none; }
.mobile-menu-panel {
    position: absolute;
    top: 48px;
    right: 0;
    min-width: 250px;
    display: grid;
    padding: 8px;
    border: 1px solid var(--line);
    border-radius: 14px;
    background: var(--panel);
    box-shadow: var(--shadow);
}
.mobile-menu-panel a {
    padding: 11px 12px;
    color: var(--text);
    border-radius: 9px;
}
.mobile-menu-panel a:hover {
    background: #f3f5f9;
    text-decoration: none;
}

.page-shell {
    width: min(1320px, calc(100% - 32px));
    margin: 0 auto;
    padding: 32px 0 60px;
}
.messages { display: grid; gap: 8px; margin-bottom: 18px; }
.message {
    padding: 12px 14px;
    border-radius: 11px;
    border: 1px solid #d9e0f4;
    background: #eef3ff;
}
.message.error { border-color: #f0caca; background: #fff0f0; color: #8f3030; }
.message.success { border-color: #cbe7d4; background: #eefaf2; color: #2c7147; }

h1, h2, h3 { letter-spacing: -.025em; }
h1 { margin: 5px 0 10px; font-size: clamp(31px, 5vw, 48px); line-height: 1.06; }
h2 { font-size: 24px; }
h3 { margin: 4px 0; }
.eyebrow {
    color: var(--accent);
    font-size: 11px;
    line-height: 1.3;
    text-transform: uppercase;
    letter-spacing: .08em;
    font-weight: 850;
}
.muted { color: var(--muted); }
.headline { color: var(--muted); font-size: 18px; }
.readable { line-height: 1.65; }
.back { display: inline-block; margin-bottom: 14px; }

.hero, .calendar-head, .lesson-detail-hero, .viewer-head {
    display: flex;
    justify-content: space-between;
    gap: 24px;
    align-items: flex-end;
    margin-bottom: 26px;
}
.hero p { max-width: 720px; margin-bottom: 0; }
.section { margin-top: 34px; }
.section-head {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    align-items: center;
    margin-bottom: 14px;
}
.section-head h2 { margin: 0; }

.card {
    background: var(--panel);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 20px;
    box-shadow: 0 4px 18px rgba(35,46,75,.035);
}
.btn {
    min-height: 40px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    padding: 8px 13px;
    border: 1px solid #d9dee8;
    border-radius: 10px;
    background: white;
    color: #3e4654;
    font-weight: 700;
    font-size: 13px;
    line-height: 1.2;
    text-decoration: none;
}
.btn:hover { text-decoration: none; border-color: #bac4e5; }
.btn.primary { color: white; border-color: var(--accent); background: var(--accent); }
.btn.primary:hover { background: var(--accent-dark); }
.btn.success { color: white; border-color: var(--success); background: var(--success); }
.btn.danger { color: white; border-color: var(--danger); background: var(--danger); }
.full { width: 100%; }

.form { display: grid; gap: 2px; }
.form p { display: grid; gap: 6px; margin: 0 0 15px; }
.form label { font-weight: 750; font-size: 13px; }
.form input[type="text"],
.form input[type="password"],
.form input[type="email"],
.form input[type="number"],
.form input[type="datetime-local"],
.form input[type="url"],
.form select,
.form textarea {
    width: 100%;
    min-height: 43px;
    border: 1px solid #cfd5df;
    border-radius: 10px;
    padding: 9px 11px;
    background: white;
    color: var(--text);
}
.form textarea { resize: vertical; }
.form input:focus, .form select:focus, .form textarea:focus {
    outline: 3px solid rgba(83,111,209,.13);
    border-color: #8698dc;
}
.form ul {
    list-style: none;
    padding: 8px;
    margin: 4px 0 0;
    max-height: 260px;
    overflow-y: auto;
    border: 1px solid var(--line);
    border-radius: 10px;
    background: #fafbfc;
}
.form li { padding: 7px; border-bottom: 1px solid #eceff4; }
.form li:last-child { border-bottom: 0; }
.form li label { display: flex; gap: 8px; align-items: center; font-weight: 500; }
.form .helptext { color: var(--muted); font-size: 12px; line-height: 1.4; }
.errorlist { color: #9d3434; margin: 0; padding-left: 18px; font-size: 13px; }

.narrow { width: min(760px, 100%); margin: 0 auto; }
.login-shell {
    min-height: calc(100vh - 160px);
    display: grid;
    place-items: center;
}
.login-card {
    width: min(440px, 100%);
    padding: 34px;
    border: 1px solid var(--line);
    border-radius: 24px;
    background: var(--panel);
    box-shadow: var(--shadow);
}
.login-card .brand-mark { margin-bottom: 20px; }
.login-card h1 { font-size: 34px; }

.stat-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 230px));
    gap: 12px;
}
.stat-card {
    display: grid;
    padding: 18px;
    border-radius: 16px;
    border: 1px solid var(--line);
    background: var(--panel);
    color: var(--text);
}
.stat-card:hover { text-decoration: none; border-color: #c2cbed; }
.stat-card strong { font-size: 30px; }
.stat-card span { color: var(--muted); font-size: 12px; }

.compact-list, .people-list { display: grid; gap: 10px; }
.compact-row {
    display: grid;
    grid-template-columns: 64px minmax(0,1fr) auto;
    align-items: center;
    gap: 14px;
    padding: 12px 14px;
    border: 1px solid var(--line);
    border-radius: 14px;
    background: var(--panel);
    color: var(--text);
}
.compact-row:hover { text-decoration: none; border-color: #c2cbed; }
.compact-row > div:nth-child(2) { display: grid; gap: 3px; }
.compact-row > div:nth-child(2) span { color: var(--muted); font-size: 12px; }
.date-chip {
    display: grid;
    justify-items: center;
    padding: 7px;
    border-radius: 10px;
    background: #f1f4f9;
}
.date-chip strong { font-size: 17px; }
.date-chip span { font-size: 12px; color: var(--muted); }

.quick-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 14px;
    margin-top: 30px;
}
.quick-card {
    min-height: 160px;
    display: grid;
    align-content: end;
    gap: 6px;
    padding: 20px;
    border: 1px solid var(--line);
    border-radius: 18px;
    background: linear-gradient(145deg, white, #f7f9fd);
    color: var(--text);
}
.quick-card:hover { text-decoration: none; border-color: #c1cbec; transform: translateY(-1px); }
.quick-card > span:last-child { color: var(--muted); font-size: 13px; }
.quick-icon {
    width: 42px;
    height: 42px;
    display: grid;
    place-items: center;
    border-radius: 12px;
    margin-bottom: 10px;
    background: #eef2ff;
    color: var(--accent);
    font-size: 20px;
    font-weight: 900;
}

.person-row {
    display: grid;
    grid-template-columns: 52px minmax(0,1fr) auto auto;
    gap: 14px;
    align-items: center;
    padding: 14px;
    border: 1px solid var(--line);
    border-radius: 15px;
    background: var(--panel);
}
.person-row > div:nth-child(2) { display: grid; gap: 3px; }
.avatar {
    width: 48px; height: 48px;
    display: grid; place-items: center;
    border-radius: 50%;
    background: #eef2ff; color: var(--accent);
    font-weight: 900;
}
.row-actions { display: flex; flex-wrap: wrap; gap: 7px; }

.status-badge, .payment-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: fit-content;
    padding: 5px 8px;
    border-radius: 999px;
    font-size: 11px;
    font-weight: 850;
}
.status-badge.active, .status-completed { background: #e8f7ed; color: #257244; }
.status-badge.inactive, .status-cancelled { background: #f1f2f4; color: #6e7580; }
.status-planned { background: #eef2ff; color: #405fbd; }
.payment-badge.paid { background: #e8f7ed; color: #257244; }
.payment-badge.unpaid { background: #fff2e3; color: #9a5d13; }
.payment-badge.large { padding: 8px 12px; font-size: 13px; }
.paid-text { color: #388557; }
.unpaid-text { color: #a1651b; }

.about-layout {
    display: grid;
    grid-template-columns: 300px minmax(0, 1fr);
    gap: 34px;
    align-items: start;
}
.about-photo-card {
    position: sticky;
    top: 96px;
    display: grid;
    gap: 12px;
}
.about-photo-card img, .photo-placeholder {
    width: 100%;
    aspect-ratio: 4/5;
    object-fit: cover;
    border-radius: 22px;
    border: 1px solid var(--line);
    background: #eef2ff;
}
.photo-placeholder {
    display: grid;
    place-items: center;
    color: var(--accent);
    font-size: 72px;
    font-weight: 900;
}
.about-content { max-width: 820px; }
.about-block {
    padding: 20px 0;
    border-top: 1px solid var(--line);
    line-height: 1.7;
}
.about-block h2 { margin-top: 0; }

.calendar-actions { display: flex; flex-wrap: wrap; gap: 7px; }
.calendar-grid {
    display: grid;
    grid-template-columns: repeat(7, minmax(0,1fr));
    border: 1px solid var(--line);
    border-radius: 18px;
    overflow: hidden;
    background: var(--panel);
}
.weekday {
    padding: 10px;
    text-align: center;
    color: var(--muted);
    font-size: 11px;
    font-weight: 800;
    background: #f5f7fa;
    border-right: 1px solid var(--line);
}
.calendar-day {
    min-height: 150px;
    padding: 8px;
    border-top: 1px solid var(--line);
    border-right: 1px solid var(--line);
}
.calendar-day.today { background: #fbfcff; box-shadow: inset 0 0 0 2px #cbd5fb; }
.empty-day { background: #fafbfc; }
.day-number {
    display: flex;
    justify-content: space-between;
    align-items: center;
    min-height: 26px;
    font-weight: 800;
    font-size: 12px;
}
.day-number a {
    width: 25px; height: 25px;
    display: grid; place-items: center;
    border-radius: 8px;
    background: #eef2ff;
    text-decoration: none;
}
.day-lessons { display: grid; gap: 5px; }
.calendar-lesson {
    display: grid;
    gap: 2px;
    padding: 7px;
    border-radius: 9px;
    background: #eef2ff;
    color: #34436d;
    font-size: 11px;
    overflow: hidden;
}
.calendar-lesson:hover { text-decoration: none; }
.calendar-lesson.status-completed { background: #edf8f0; color: #356346; }
.calendar-lesson.status-cancelled { background: #f1f2f4; color: #777e87; opacity: .75; }
.calendar-lesson span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mobile-calendar { display: none; }

.lesson-status-stack { display: grid; justify-items: end; gap: 7px; }
.detail-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0,1fr));
    gap: 14px;
}
.detail-card { display: grid; gap: 6px; }
.detail-card strong { font-size: 20px; }
.detail-card span { color: var(--muted); }
.detail-label {
    color: var(--muted);
    text-transform: uppercase;
    letter-spacing: .06em;
    font-size: 10px;
    font-weight: 850;
}
.action-panel {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}
.action-panel form { margin: 0; }

.filter-bar {
    display: grid;
    grid-template-columns: minmax(220px,1fr) 220px auto;
    gap: 9px;
    margin-bottom: 20px;
}
.filter-bar input, .filter-bar select {
    min-height: 42px;
    border: 1px solid #cfd5df;
    border-radius: 10px;
    padding: 8px 10px;
    background: white;
}
.material-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0,1fr));
    gap: 16px;
}
.material-card {
    min-width: 0;
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: 18px;
    background: var(--panel);
    box-shadow: 0 4px 20px rgba(35,46,75,.04);
}
.material-cover {
    min-height: 210px;
    display: grid;
    align-content: end;
    gap: 7px;
    padding: 18px;
    color: white;
    background: linear-gradient(145deg, #475d9e, #6c82ca);
}
.material-cover:hover { text-decoration: none; }
.material-cover.kind-video { background: linear-gradient(145deg, #1d2941, #3e5684); }
.material-cover.kind-audio { background: linear-gradient(145deg, #432559, #785091); }
.material-cover.kind-image { background: linear-gradient(145deg, #285348, #508976); }
.material-cover.kind-document { background: linear-gradient(145deg, #6b512c, #a17e4a); }
.material-cover.kind-link { background: linear-gradient(145deg, #285a78, #5796b7); }
.material-icon {
    width: 58px; height: 58px;
    display: grid; place-items: center;
    margin-bottom: 24px;
    border-radius: 16px;
    background: rgba(255,255,255,.15);
    border: 1px solid rgba(255,255,255,.2);
    font-weight: 900;
}
.material-icon.large { width: 78px; height: 78px; margin: 0; font-size: 21px; }
.material-kind { font-size: 10px; text-transform: uppercase; letter-spacing: .07em; opacity: .75; }
.material-cover strong {
    font-size: 19px;
    line-height: 1.2;
    overflow-wrap: anywhere;
}
.material-card-body { padding: 14px; }
.material-card-body p { color: var(--muted); min-height: 42px; font-size: 13px; }
.access-note { margin: 8px 0; color: var(--muted); font-size: 12px; }

.format-hint {
    display: flex;
    flex-wrap: wrap;
    gap: 7px;
    margin: 15px 0;
}
.format-hint strong { width: 100%; }
.format-hint span {
    padding: 5px 8px;
    border-radius: 999px;
    background: #f2f4f8;
    color: var(--muted);
    font-size: 11px;
}

.material-detail {
    display: grid;
    grid-template-columns: 230px minmax(0,1fr);
    gap: 28px;
    align-items: start;
}
.material-detail-cover {
    min-height: 280px;
    display: grid;
    align-content: end;
    gap: 12px;
    padding: 20px;
    border-radius: 20px;
    color: white;
    background: linear-gradient(145deg, #475d9e, #6c82ca);
}
.material-detail-cover.kind-video { background: linear-gradient(145deg, #1d2941, #3e5684); }
.material-detail-cover.kind-audio { background: linear-gradient(145deg, #432559, #785091); }
.material-detail-cover.kind-image { background: linear-gradient(145deg, #285348, #508976); }
.material-detail-cover.kind-document { background: linear-gradient(145deg, #6b512c, #a17e4a); }
.material-detail-cover.kind-link { background: linear-gradient(145deg, #285a78, #5796b7); }
.material-meta {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    margin: 15px 0;
    color: var(--muted);
    font-size: 12px;
}
.material-meta span { padding: 5px 8px; background: #f1f3f6; border-radius: 8px; }
.access-list { display: flex; flex-wrap: wrap; gap: 7px; }
.access-list span { padding: 7px 9px; border-radius: 9px; background: #f3f5f8; }

.pdf-stage, .media-stage, .audio-stage, .image-stage {
    border-radius: 18px;
    overflow: hidden;
    background: #1d222b;
    box-shadow: var(--shadow);
}
.pdf-stage iframe {
    display: block;
    width: 100%;
    height: calc(100vh - 180px);
    min-height: 620px;
    border: 0;
    background: white;
}
.media-stage video {
    display: block;
    width: 100%;
    max-height: calc(100vh - 220px);
    background: black;
}
.media-note { padding: 12px 16px 16px; margin: 0; color: #c9ced7; font-size: 12px; }
.audio-stage { padding-bottom: 18px; }
.audio-art {
    min-height: 330px;
    display: grid;
    place-items: center;
    align-content: center;
    gap: 12px;
    color: white;
    background:
        radial-gradient(circle at 20% 20%, rgba(126,88,180,.42), transparent 35%),
        linear-gradient(145deg, #1f1a2a, #3d2c51);
}
.audio-art span { font-size: 68px; }
.audio-art strong { font-size: 23px; text-align: center; padding: 0 20px; }
.audio-stage audio { display: block; width: calc(100% - 36px); margin: 0 18px; }
.image-stage {
    padding: 18px;
    overflow: auto;
    background:
        linear-gradient(45deg,#e9ecf1 25%,transparent 25%),
        linear-gradient(-45deg,#e9ecf1 25%,transparent 25%),
        white;
    background-size: 22px 22px;
}
.image-stage img { display: block; max-width: 100%; height: auto; margin: 0 auto; }
.document-stage {
    display: grid;
    grid-template-columns: 150px minmax(0,1fr);
    gap: 24px;
    align-items: center;
}
.document-icon {
    width: 130px; height: 165px;
    display: grid; place-items: center;
    border-radius: 10px 20px 20px 10px;
    background: linear-gradient(145deg,#70532b,#ad854f);
    color: white;
    font-weight: 900;
    font-size: 27px;
}

.empty {
    grid-column: 1 / -1;
    padding: 28px;
    text-align: center;
    border: 1px dashed #cfd6e1;
    border-radius: 16px;
    color: var(--muted);
    background: rgba(255,255,255,.55);
}

@media (max-width: 1100px) {
    .material-grid { grid-template-columns: repeat(3, minmax(0,1fr)); }
    .desktop-nav { gap: 0; }
    .desktop-nav a { padding: 8px; font-size: 13px; }
}
@media (max-width: 900px) {
    .desktop-nav, .header-account > .user-name, .header-account > form { display: none; }
    .mobile-menu { display: block; }
    .material-grid { grid-template-columns: repeat(2, minmax(0,1fr)); }
    .about-layout { grid-template-columns: 230px minmax(0,1fr); gap: 24px; }
    .desktop-calendar { display: none; }
    .mobile-calendar { display: grid; gap: 10px; }
    .mobile-lesson-card {
        display: grid;
        grid-template-columns: 62px minmax(0,1fr);
        gap: 13px;
        padding: 13px;
        border: 1px solid var(--line);
        border-radius: 14px;
        background: var(--panel);
        color: var(--text);
    }
    .mobile-lesson-card:hover { text-decoration: none; }
    .mobile-lesson-date {
        display: grid;
        justify-items: center;
        align-content: center;
        border-radius: 11px;
        background: #f2f4f8;
    }
    .mobile-lesson-date strong { font-size: 24px; }
    .mobile-lesson-date span { color: var(--muted); font-size: 10px; }
    .mobile-badges { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 7px; }
}
@media (max-width: 680px) {
    .header-inner, .page-shell { width: min(100% - 22px, 1320px); }
    .page-shell { padding-top: 22px; }
    .brand > span:last-child { max-width: 190px; overflow: hidden; text-overflow: ellipsis; }
    .hero, .calendar-head, .lesson-detail-hero, .viewer-head {
        align-items: flex-start;
        flex-direction: column;
        gap: 14px;
    }
    .calendar-actions { width: 100%; }
    .calendar-actions .btn.primary { margin-left: auto; }
    .quick-grid, .stat-grid, .detail-grid { grid-template-columns: 1fr; }
    .compact-row { grid-template-columns: 58px minmax(0,1fr); }
    .compact-row > .payment-badge { grid-column: 2; }
    .person-row {
        grid-template-columns: 46px minmax(0,1fr);
    }
    .person-row > .status-badge, .person-row > .row-actions {
        grid-column: 2;
    }
    .about-layout { grid-template-columns: 1fr; }
    .about-photo-card { position: static; width: min(300px, 100%); }
    .material-grid { grid-template-columns: 1fr; }
    .filter-bar { grid-template-columns: 1fr; }
    .material-detail { grid-template-columns: 1fr; }
    .material-detail-cover { min-height: 210px; }
    .pdf-stage iframe { min-height: 70vh; height: 70vh; }
    .document-stage { grid-template-columns: 1fr; }
    .document-icon { width: 100px; height: 125px; }
    .login-card { padding: 25px; }
}


/* =========================================================
   v1.1 — visual refresh
   ========================================================= */

:root {
    --bg: #f4f6fb;
    --panel: rgba(255,255,255,.96);
    --text: #172033;
    --muted: #697386;
    --line: #e2e7f0;
    --accent: #5068d8;
    --accent-dark: #3e54bf;
    --accent-soft: #edf1ff;
    --success: #2e8a59;
    --danger: #b94d55;
    --warning: #a96b19;
    --shadow: 0 14px 42px rgba(38, 49, 82, .08);
    --shadow-hover: 0 18px 52px rgba(38, 49, 82, .13);
    --radius: 20px;
}

body {
    background:
        radial-gradient(circle at 7% -5%, rgba(93,116,218,.16), transparent 30%),
        radial-gradient(circle at 96% 8%, rgba(103,195,175,.09), transparent 24%),
        linear-gradient(180deg, #f7f8fc 0%, #f3f5fa 55%, #f6f7fb 100%);
}

.site-header {
    background: rgba(255,255,255,.88);
    box-shadow: 0 1px 0 rgba(27, 38, 66, .04);
}

.header-inner {
    min-height: 72px;
}

.brand {
    letter-spacing: -.02em;
    font-size: 15px;
}

.brand-mark {
    width: 38px;
    height: 38px;
    border-radius: 13px;
    background:
        linear-gradient(145deg, #647ae1 0%, #4d64d1 55%, #445abe 100%);
    box-shadow:
        0 8px 18px rgba(68,90,190,.24),
        inset 0 1px 0 rgba(255,255,255,.35);
}

.desktop-nav {
    justify-content: center;
}

.desktop-nav a {
    position: relative;
    color: #596375;
    font-weight: 650;
}

.desktop-nav a:hover {
    background: var(--accent-soft);
    color: var(--accent-dark);
}

.page-shell {
    padding-top: 38px;
}

.card,
.material-card,
.person-row,
.compact-row,
.quick-card,
.mobile-lesson-card {
    box-shadow: 0 7px 24px rgba(35,46,75,.045);
}

.card {
    border-color: rgba(219,225,236,.92);
}

.hero.dashboard-hero {
    position: relative;
    min-height: 210px;
    overflow: hidden;
    align-items: center;
    padding: 34px 36px;
    border: 1px solid rgba(209,217,237,.9);
    border-radius: 28px;
    background:
        linear-gradient(120deg, rgba(255,255,255,.98), rgba(248,250,255,.96));
    box-shadow: var(--shadow);
}

.hero.dashboard-hero::before {
    content: "";
    position: absolute;
    right: -70px;
    top: -95px;
    width: 310px;
    height: 310px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(83,111,209,.17), rgba(83,111,209,0) 70%);
    pointer-events: none;
}

.hero.dashboard-hero::after {
    content: "";
    position: absolute;
    right: 160px;
    bottom: -100px;
    width: 230px;
    height: 230px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(71,177,151,.08), transparent 70%);
    pointer-events: none;
}

.hero.dashboard-hero > * {
    position: relative;
    z-index: 1;
}

.hero.dashboard-hero h1 {
    max-width: 760px;
    margin-top: 8px;
    font-size: clamp(34px, 5.2vw, 54px);
}

.hero-primary-action {
    min-height: 48px;
    padding-inline: 19px;
    border-radius: 13px;
    box-shadow: 0 10px 22px rgba(80,104,216,.22);
}

.dashboard-person {
    display: flex;
    align-items: center;
    gap: 22px;
}

.dashboard-avatar,
.lesson-student-avatar {
    flex: 0 0 auto;
    overflow: hidden;
    display: grid;
    place-items: center;
    color: var(--accent);
    font-weight: 900;
    background:
        linear-gradient(145deg, #edf1ff, #e2e8ff);
    border: 3px solid white;
    box-shadow: 0 10px 26px rgba(58,74,121,.13);
}

.dashboard-avatar {
    width: 94px;
    height: 94px;
    border-radius: 26px;
    font-size: 31px;
}

.dashboard-avatar img,
.lesson-student-avatar img,
.student-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.stat-grid {
    margin-top: 18px;
}

.stat-card {
    min-height: 118px;
    position: relative;
    overflow: hidden;
    justify-content: end;
    padding: 20px;
    background:
        linear-gradient(145deg, rgba(255,255,255,.98), rgba(248,250,255,.98));
    box-shadow: 0 7px 24px rgba(35,46,75,.045);
}

.stat-card::after {
    content: "";
    position: absolute;
    width: 90px;
    height: 90px;
    right: -30px;
    top: -30px;
    border-radius: 50%;
    background: rgba(80,104,216,.07);
}

.stat-card strong {
    color: #263556;
    font-size: 36px;
}

.section {
    margin-top: 42px;
}

.section-head h2 {
    font-size: 26px;
}

.compact-row {
    min-height: 76px;
    padding: 14px 16px;
    transition: transform .16s ease, box-shadow .16s ease, border-color .16s ease;
}

.compact-row:hover,
.person-row:hover,
.material-card:hover,
.quick-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-hover);
    border-color: #cbd4ee;
}

.date-chip {
    padding: 9px;
    background:
        linear-gradient(145deg, #f1f4ff, #edf1fa);
    color: #334875;
}

.quick-grid {
    gap: 18px;
}

.quick-card {
    position: relative;
    min-height: 185px;
    overflow: hidden;
    padding: 23px;
    transition: transform .18s ease, box-shadow .18s ease;
}

.quick-card::before {
    content: "";
    position: absolute;
    width: 150px;
    height: 150px;
    top: -75px;
    right: -60px;
    border-radius: 50%;
    background: rgba(80,104,216,.06);
}

.quick-card > * {
    position: relative;
}

.quick-card strong {
    font-size: 18px;
}

.quick-icon {
    width: 48px;
    height: 48px;
    border-radius: 15px;
    box-shadow: inset 0 0 0 1px rgba(80,104,216,.07);
}

.people-list {
    gap: 12px;
}

.person-row {
    min-height: 78px;
    padding: 13px 15px;
    transition: transform .16s ease, box-shadow .16s ease, border-color .16s ease;
}

.avatar.student-avatar {
    overflow: hidden;
    padding: 0;
    background: linear-gradient(145deg, #eef2ff, #e3e9ff);
    box-shadow: 0 6px 18px rgba(49,64,108,.1);
}

.student-avatar span {
    display: grid;
    width: 100%;
    height: 100%;
    place-items: center;
}

.about-layout {
    gap: 42px;
}

.about-photo-card img,
.photo-placeholder {
    box-shadow: var(--shadow);
    border: 4px solid rgba(255,255,255,.95);
}

.about-content {
    padding-top: 10px;
}

.about-content .headline {
    max-width: 720px;
    font-size: 20px;
    line-height: 1.55;
}

.about-block h2 {
    color: #2b3857;
}

.calendar-head {
    padding-bottom: 10px;
}

.calendar-grid {
    border-color: #dfe5ef;
    box-shadow: var(--shadow);
}

.weekday {
    padding: 13px 10px;
    color: #778092;
    background: #f7f8fb;
}

.calendar-day {
    min-height: 162px;
    background: rgba(255,255,255,.96);
}

.calendar-day.today {
    background: #f7f9ff;
    box-shadow: inset 0 0 0 2px rgba(80,104,216,.52);
}

.calendar-lesson {
    border: 1px solid rgba(80,104,216,.09);
    transition: transform .12s ease;
}

.calendar-lesson:hover {
    transform: translateY(-1px);
}

.lesson-detail-hero {
    align-items: center;
    padding: 26px 28px;
    border-radius: 24px;
    border: 1px solid var(--line);
    background: rgba(255,255,255,.78);
    box-shadow: var(--shadow);
}

.lesson-person-block {
    display: flex;
    align-items: center;
    gap: 18px;
}

.lesson-student-avatar {
    width: 72px;
    height: 72px;
    border-radius: 20px;
    font-size: 24px;
}

.detail-card {
    min-height: 120px;
    justify-content: center;
}

.action-panel {
    padding: 16px;
}

.material-grid {
    gap: 20px;
}

.material-card {
    border-radius: 22px;
    transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease;
}

.material-cover {
    position: relative;
    min-height: 235px;
    padding: 20px;
}

.material-cover::after,
.material-detail-cover::after {
    content: "";
    position: absolute;
    width: 180px;
    height: 180px;
    top: -75px;
    right: -70px;
    border-radius: 50%;
    background: rgba(255,255,255,.08);
}

.material-cover > *,
.material-detail-cover > * {
    position: relative;
    z-index: 1;
}

.material-cover.kind-pdf,
.material-detail-cover.kind-pdf {
    background: linear-gradient(145deg, #4c63c6, #7184db);
}

.material-cover.kind-video,
.material-detail-cover.kind-video {
    background:
        radial-gradient(circle at 80% 15%, rgba(114,143,214,.3), transparent 28%),
        linear-gradient(145deg, #172238, #354a73);
}

.material-cover.kind-audio,
.material-detail-cover.kind-audio {
    background:
        radial-gradient(circle at 75% 15%, rgba(181,118,210,.25), transparent 30%),
        linear-gradient(145deg, #3a214c, #6e4686);
}

.material-cover.kind-image,
.material-detail-cover.kind-image {
    background:
        radial-gradient(circle at 75% 15%, rgba(122,205,176,.22), transparent 28%),
        linear-gradient(145deg, #214b40, #4b8470);
}

.material-card-body {
    min-height: 92px;
    display: grid;
    align-content: space-between;
    gap: 12px;
    padding: 16px;
}

.material-card-body p {
    min-height: 0;
}

.material-icon {
    backdrop-filter: blur(3px);
}

.material-detail {
    align-items: stretch;
}

.material-detail-cover {
    position: relative;
    overflow: hidden;
    box-shadow: var(--shadow);
}

.filter-bar {
    padding: 10px;
    border-radius: 14px;
    border: 1px solid var(--line);
    background: rgba(255,255,255,.72);
}

.format-hint {
    background: rgba(255,255,255,.78);
}

.form.card {
    padding: 24px;
    box-shadow: var(--shadow);
}

.form input[type="file"] {
    width: 100%;
    padding: 11px;
    border: 1px dashed #c7cede;
    border-radius: 11px;
    background: #fafbfe;
}

.form input[type="checkbox"] {
    accent-color: var(--accent);
}

.pdf-stage {
    position: relative;
    overflow: visible;
    background: #eef0f5;
}

.pdf-stage iframe {
    overflow: hidden;
    border-radius: 18px;
    box-shadow: var(--shadow);
}

.pdf-fallback {
    padding: 12px 15px;
    color: var(--muted);
    text-align: center;
    font-size: 12px;
}

.viewer-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.image-stage img {
    border-radius: 8px;
    box-shadow: 0 12px 30px rgba(23,31,48,.12);
}

.mobile-lesson-card {
    transition: transform .15s ease, box-shadow .15s ease;
}

.mobile-lesson-card:active {
    transform: scale(.99);
}

.empty {
    background:
        linear-gradient(145deg, rgba(255,255,255,.68), rgba(248,250,254,.82));
}

@media (max-width: 900px) {
    .hero.dashboard-hero {
        min-height: 180px;
        padding: 28px;
    }

    .material-grid {
        gap: 14px;
    }

    .mobile-lesson-card {
        min-height: 92px;
        box-shadow: 0 7px 20px rgba(35,46,75,.05);
    }
}

@media (max-width: 680px) {
    .page-shell {
        padding-bottom: 34px;
    }

    .hero.dashboard-hero {
        padding: 22px;
        border-radius: 22px;
    }

    .dashboard-person {
        align-items: flex-start;
        gap: 14px;
    }

    .dashboard-avatar {
        width: 66px;
        height: 66px;
        border-radius: 19px;
        font-size: 23px;
    }

    .hero.dashboard-hero h1 {
        font-size: 30px;
    }

    .hero.dashboard-hero .hero-primary-action {
        width: 100%;
    }

    .stat-card {
        min-height: 100px;
    }

    .section {
        margin-top: 32px;
    }

    .person-row {
        padding: 12px;
    }

    .material-cover {
        min-height: 205px;
    }

    .material-detail-cover {
        min-height: 190px;
    }

    .lesson-detail-hero {
        padding: 18px;
    }

    .lesson-person-block {
        align-items: flex-start;
    }

    .lesson-student-avatar {
        width: 58px;
        height: 58px;
        border-radius: 16px;
        font-size: 19px;
    }

    .pdf-stage iframe {
        height: 72vh;
        min-height: 520px;
        border-radius: 13px;
    }

    .viewer-actions {
        width: 100%;
    }

    .viewer-actions .btn {
        flex: 1 1 auto;
    }
}


/* =========================================================
   v1.2 — portal layout
   ========================================================= */

body {
    background-image:
        url("../img/linguasdisco-bg.svg"),
        radial-gradient(circle at 7% -5%, rgba(93,116,218,.16), transparent 30%),
        radial-gradient(circle at 96% 8%, rgba(103,195,175,.09), transparent 24%),
        linear-gradient(180deg, #f7f8fc 0%, #f3f5fa 55%, #f6f7fb 100%);
    background-repeat: no-repeat, no-repeat, no-repeat, no-repeat;
    background-size: min(1600px, 100vw) auto, auto, auto, auto;
    background-position: top center, left top, right top, center;
    background-attachment: fixed, fixed, fixed, fixed;
}

.brand {
    font-size: 17px;
    font-weight: 900;
    letter-spacing: -.045em;
}

.brand > span:last-child {
    background: linear-gradient(90deg, #27365d, #5168d5);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.brand-mark {
    font-family: Georgia, "Times New Roman", serif;
    font-style: italic;
    font-size: 20px;
}

.hero.dashboard-hero {
    min-height: 224px;
    padding-right: 320px;
}

.hero-art {
    position: absolute !important;
    z-index: 0 !important;
    right: 28px;
    top: 50%;
    width: 270px;
    max-height: 190px;
    transform: translateY(-50%);
    object-fit: contain;
    pointer-events: none;
    user-select: none;
    filter: drop-shadow(0 18px 25px rgba(66, 82, 137, .08));
}

.student-dashboard-hero .hero-art {
    width: 255px;
}

.hero.dashboard-hero .hero-primary-action {
    position: absolute;
    right: 34px;
    bottom: 28px;
    z-index: 2 !important;
}

.quick-card {
    min-height: 145px;
}

.quick-card strong {
    font-size: 19px;
}

.material-grid.with-access {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.material-grid.with-access .material-card-body {
    min-height: 260px;
    display: flex;
    flex-direction: column;
}

.material-access-box {
    flex: 1 1 auto;
    min-height: 120px;
    padding: 11px;
    border: 1px solid #e5e9f2;
    border-radius: 13px;
    background:
        linear-gradient(180deg, rgba(248,250,255,.96), rgba(250,251,253,.96));
}

.material-access-title {
    margin-bottom: 8px;
    color: #7a8395;
    font-size: 10px;
    font-weight: 850;
    letter-spacing: .08em;
    text-transform: uppercase;
}

.material-access-students {
    display: grid;
    gap: 4px;
    max-height: 165px;
    overflow-y: auto;
    padding-right: 3px;
    scrollbar-width: thin;
}

.inline-access-form {
    position: relative;
    border-radius: 9px;
    transition: background .15s ease, opacity .15s ease;
}

.inline-access-form:hover {
    background: rgba(80,104,216,.045);
}

.inline-access-form.is-saving {
    opacity: .5;
    pointer-events: none;
}

.inline-access-form.is-saved {
    background: rgba(52,147,92,.07);
}

.inline-access-form.is-error {
    background: rgba(185,77,85,.09);
}

.student-access-toggle {
    min-height: 34px;
    display: grid;
    grid-template-columns: 22px minmax(0,1fr);
    gap: 7px;
    align-items: center;
    padding: 5px 6px;
    cursor: pointer;
    user-select: none;
}

.student-access-toggle input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.student-access-check {
    width: 19px;
    height: 19px;
    display: grid;
    place-items: center;
    border: 1.5px solid #c5ccda;
    border-radius: 6px;
    background: white;
    box-shadow: inset 0 0 0 1px rgba(255,255,255,.8);
    transition: all .15s ease;
}

.student-access-toggle input:checked + .student-access-check {
    border-color: #5269d7;
    background: linear-gradient(145deg, #6076dd, #4e64cf);
    box-shadow: 0 4px 9px rgba(82,105,215,.19);
}

.student-access-toggle input:checked + .student-access-check::after {
    content: "✓";
    color: white;
    font-size: 13px;
    font-weight: 900;
    line-height: 1;
}

.student-access-toggle input:focus-visible + .student-access-check {
    outline: 3px solid rgba(82,105,215,.17);
    outline-offset: 2px;
}

.student-access-name {
    min-width: 0;
    overflow: hidden;
    color: #4f596c;
    font-size: 12px;
    font-weight: 650;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.access-empty {
    padding: 7px 5px;
    font-size: 12px;
}

.material-actions {
    margin-top: 11px;
}

.material-actions .btn.primary {
    flex: 1 1 auto;
}

.icon-btn {
    width: 40px;
    padding-inline: 0;
    font-size: 20px;
    letter-spacing: 2px;
}

.material-grid.with-access .material-cover {
    min-height: 205px;
}

.material-grid.with-access .material-icon {
    margin-bottom: 17px;
}

/* Cleaner pages: titles and real data instead of explanatory copy. */
.hero > div > .eyebrow + h1 {
    margin-bottom: 0;
}

@media (max-width: 1180px) {
    .material-grid.with-access {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .hero.dashboard-hero {
        padding-right: 270px;
    }

    .hero-art {
        right: 20px;
        width: 225px;
    }
}

@media (max-width: 900px) {
    body {
        background-attachment: scroll, scroll, scroll, scroll;
        background-size: 1200px auto, auto, auto, auto;
    }

    .hero.dashboard-hero {
        padding-right: 28px;
        padding-bottom: 95px;
    }

    .hero-art {
        right: 15px;
        top: auto;
        bottom: 5px;
        width: 180px;
        max-height: 105px;
        transform: none;
        opacity: .72;
    }

    .hero.dashboard-hero .hero-primary-action {
        left: 28px;
        right: auto;
        bottom: 24px;
    }

    .material-grid.with-access {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 680px) {
    body {
        background-size: 950px auto, auto, auto, auto;
        background-position: 58% top, left top, right top, center;
    }

    .brand {
        font-size: 16px;
    }

    .hero.dashboard-hero {
        padding: 22px 22px 88px;
    }

    .hero-art {
        right: -10px;
        bottom: 1px;
        width: 155px;
        opacity: .55;
    }

    .hero.dashboard-hero .hero-primary-action {
        left: 22px;
        bottom: 20px;
        width: auto;
    }

    .material-grid.with-access {
        grid-template-columns: 1fr;
    }

    .material-grid.with-access .material-card-body {
        min-height: 0;
    }

    .material-access-students {
        max-height: 210px;
    }
}


/* v1.3 — student notifications */
.notification-menu {
    position: relative;
}
.notification-menu > summary {
    list-style: none;
}
.notification-menu > summary::-webkit-details-marker {
    display: none;
}
.notification-bell {
    position: relative;
    width: 40px;
    height: 40px;
    display: grid;
    place-items: center;
    border-radius: 12px;
    background: #f1f4fb;
    cursor: pointer;
    user-select: none;
}
.notification-bell:hover {
    background: #e9eefb;
}
.notification-bell-icon {
    width: 16px;
    height: 16px;
    display: grid;
    place-items: center;
    color: var(--accent);
    font-size: 18px;
    line-height: 1;
}
.notification-count {
    position: absolute;
    top: -5px;
    right: -6px;
    min-width: 19px;
    height: 19px;
    display: grid;
    place-items: center;
    padding: 0 5px;
    border-radius: 999px;
    background: #d94e59;
    color: white;
    font-size: 10px;
    font-weight: 900;
    border: 2px solid white;
}
.notification-dropdown {
    position: absolute;
    top: 49px;
    right: 0;
    width: min(390px, 92vw);
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: 16px;
    background: white;
    box-shadow: 0 20px 50px rgba(31,42,72,.16);
    z-index: 100;
}
.notification-dropdown-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 13px 15px;
    border-bottom: 1px solid var(--line);
}
.notification-dropdown-list {
    display: grid;
    max-height: 380px;
    overflow-y: auto;
}
.notification-mini {
    display: grid;
    grid-template-columns: 34px minmax(0,1fr);
    gap: 10px;
    align-items: start;
    padding: 12px 14px;
    border-bottom: 1px solid #eef1f6;
    color: var(--text);
}
.notification-mini:hover {
    text-decoration: none;
    background: #f8f9fc;
}
.notification-mini.unread {
    background: #f3f6ff;
}
.notification-mini > span:last-child {
    display: grid;
    gap: 4px;
}
.notification-mini small {
    color: var(--muted);
    line-height: 1.35;
}
.notification-mini-icon,
.notification-icon {
    display: grid;
    place-items: center;
    border-radius: 10px;
    font-weight: 900;
}
.notification-mini-icon {
    width: 32px;
    height: 32px;
}
.kind-lesson {
    background: #eaf0ff;
    color: #4561c2;
}
.kind-payment {
    background: #fff1df;
    color: #a16615;
}
.kind-material {
    background: #e9f7f1;
    color: #2e7b57;
}
.kind-resource {
    background: #f1eafa;
    color: #7650a2;
}
.notification-empty {
    padding: 22px;
    text-align: center;
    color: var(--muted);
    font-size: 13px;
}
.notification-page-hero {
    margin-bottom: 18px;
}
.notification-tabs {
    display: flex;
    gap: 8px;
    margin-bottom: 16px;
}
.notification-tab {
    padding: 8px 12px;
    border-radius: 999px;
    color: var(--muted);
    background: rgba(255,255,255,.7);
    border: 1px solid var(--line);
    font-size: 12px;
    font-weight: 750;
}
.notification-tab:hover {
    text-decoration: none;
}
.notification-tab.active {
    color: white;
    background: var(--accent);
    border-color: var(--accent);
}
.notification-list {
    display: grid;
    gap: 9px;
}
.notification-row {
    display: grid;
    grid-template-columns: 48px minmax(0,1fr) 22px;
    gap: 13px;
    align-items: center;
    padding: 14px 16px;
    border: 1px solid var(--line);
    border-radius: 15px;
    background: rgba(255,255,255,.9);
    color: var(--text);
    box-shadow: 0 7px 24px rgba(35,46,75,.045);
}
.notification-row:hover {
    text-decoration: none;
    border-color: #cbd4ee;
}
.notification-row.unread {
    background: #f6f8ff;
    border-color: #d4dcf5;
}
.notification-icon {
    width: 44px;
    height: 44px;
    font-size: 18px;
}
.notification-row-main {
    min-width: 0;
}
.notification-row-title {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}
.notification-new {
    padding: 3px 7px;
    border-radius: 999px;
    background: #e5ebff;
    color: #4059b6;
    font-size: 9px;
    font-weight: 900;
    text-transform: uppercase;
}
.notification-text {
    margin-top: 4px;
    color: var(--muted);
    font-size: 13px;
}
.notification-row time {
    display: block;
    margin-top: 5px;
    color: #9299a8;
    font-size: 11px;
}
.notification-arrow {
    color: #9ca5b5;
    font-size: 25px;
}
@media (max-width: 680px) {
    .notification-dropdown {
        position: fixed;
        left: 11px;
        right: 11px;
        top: 66px;
        width: auto;
    }
    .notification-row {
        grid-template-columns: 42px minmax(0,1fr);
        padding: 12px;
    }
    .notification-arrow {
        display: none;
    }
    .notification-icon {
        width: 40px;
        height: 40px;
    }
}


/* v1.3.1 — loud / persistent unread notifications */

.notification-bell.has-unread {
    background: linear-gradient(145deg, #fff1f1, #ffe5e7);
    box-shadow:
        0 0 0 0 rgba(217,78,89,.35),
        0 7px 18px rgba(187,58,69,.16);
    animation:
        notification-bell-jump 1.15s cubic-bezier(.2,.8,.3,1) infinite,
        notification-bell-pulse 2.2s ease-out infinite;
}

.notification-bell.has-unread .notification-bell-icon {
    color: #d94e59;
    animation: notification-icon-wiggle .85s ease-in-out infinite;
}

.notification-bell.has-unread .notification-count {
    animation: notification-count-shake .7s ease-in-out infinite;
}

@keyframes notification-bell-jump {
    0%, 58%, 100% { transform: translateY(0) rotate(0deg); }
    66% { transform: translateY(-7px) rotate(-7deg); }
    74% { transform: translateY(0) rotate(7deg); }
    82% { transform: translateY(-4px) rotate(-4deg); }
    90% { transform: translateY(0) rotate(3deg); }
}

@keyframes notification-bell-pulse {
    0% { box-shadow: 0 0 0 0 rgba(217,78,89,.38), 0 7px 18px rgba(187,58,69,.16); }
    70% { box-shadow: 0 0 0 12px rgba(217,78,89,0), 0 7px 18px rgba(187,58,69,.16); }
    100% { box-shadow: 0 0 0 0 rgba(217,78,89,0), 0 7px 18px rgba(187,58,69,.16); }
}

@keyframes notification-icon-wiggle {
    0%, 100% { transform: rotate(0); }
    25% { transform: rotate(-13deg); }
    75% { transform: rotate(13deg); }
}

@keyframes notification-count-shake {
    0%, 100% { transform: translate(0,0) scale(1); }
    25% { transform: translate(-1px,0) scale(1.07); }
    50% { transform: translate(1px,-1px) scale(1.12); }
    75% { transform: translate(-1px,1px) scale(1.07); }
}

.notification-nag {
    position: fixed;
    right: 20px;
    bottom: 22px;
    z-index: 120;
    width: min(390px, calc(100vw - 28px));
    min-height: 76px;
    display: grid;
    grid-template-columns: 42px minmax(0,1fr) 24px;
    gap: 11px;
    align-items: center;
    padding: 13px 14px;
    border: 1px solid #f0b8bd;
    border-radius: 17px;
    color: #4c2730;
    background:
        linear-gradient(145deg, rgba(255,248,249,.98), rgba(255,237,239,.98));
    box-shadow:
        0 18px 50px rgba(96,31,40,.20),
        0 0 0 1px rgba(255,255,255,.7) inset;
    text-decoration: none;
    animation:
        notification-nag-enter .38s ease-out both,
        notification-nag-nudge 3.8s ease-in-out .8s infinite;
}

.notification-nag:hover {
    text-decoration: none;
    border-color: #de7a84;
    box-shadow:
        0 22px 56px rgba(96,31,40,.24),
        0 0 0 1px rgba(255,255,255,.7) inset;
}

.notification-nag-icon {
    width: 40px;
    height: 40px;
    display: grid;
    place-items: center;
    border-radius: 50%;
    color: white;
    background: linear-gradient(145deg, #e6616c, #cc3f4b);
    font-size: 23px;
    font-weight: 950;
    box-shadow: 0 7px 16px rgba(191,51,63,.26);
    animation: notification-nag-icon 1.2s ease-in-out infinite;
}

.notification-nag-text {
    min-width: 0;
    display: grid;
    gap: 3px;
}

.notification-nag-text strong {
    font-size: 14px;
    color: #9f3140;
}

.notification-nag-text small {
    overflow: hidden;
    color: #73525a;
    font-size: 12px;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.notification-nag-arrow {
    color: #bd5a65;
    font-size: 27px;
    font-weight: 500;
}

@keyframes notification-nag-enter {
    from { opacity: 0; transform: translateY(28px) scale(.96); }
    to { opacity: 1; transform: translateY(0) scale(1); }
}

@keyframes notification-nag-nudge {
    0%, 72%, 100% { transform: translateX(0) translateY(0); }
    78% { transform: translateX(-9px) translateY(-2px); }
    82% { transform: translateX(7px) translateY(0); }
    86% { transform: translateX(-5px) translateY(-1px); }
    90% { transform: translateX(3px) translateY(0); }
}

@keyframes notification-nag-icon {
    0%, 62%, 100% { transform: scale(1) rotate(0); }
    72% { transform: scale(1.12) rotate(-8deg); }
    82% { transform: scale(1.05) rotate(8deg); }
    90% { transform: scale(1.1) rotate(-4deg); }
}

/* Respect accessibility preference while keeping unread state visible. */
@media (prefers-reduced-motion: reduce) {
    .notification-bell.has-unread,
    .notification-bell.has-unread .notification-bell-icon,
    .notification-bell.has-unread .notification-count,
    .notification-nag,
    .notification-nag-icon {
        animation: none !important;
    }

    .notification-bell.has-unread {
        outline: 3px solid rgba(217,78,89,.25);
    }
}

@media (max-width: 680px) {
    .notification-nag {
        left: 11px;
        right: 11px;
        bottom: 12px;
        width: auto;
        min-height: 72px;
    }
}


/* v1.3.2 — mobile notification UX */
.mobile-notification-link {
    display: flex !important;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}
.mobile-notification-link span {
    min-width: 22px;
    height: 22px;
    display: grid;
    place-items: center;
    padding: 0 6px;
    border-radius: 999px;
    color: white;
    background: #d94e59;
    font-size: 10px;
    font-weight: 900;
}

@media (max-width: 680px) {
    body.has-unread-notifications .page-shell {
        padding-bottom: calc(132px + env(safe-area-inset-bottom, 0px));
    }

    .notification-menu {
        display: block;
    }

    .notification-bell {
        width: 42px;
        height: 42px;
        border-radius: 13px;
    }

    .notification-bell.has-unread {
        animation:
            notification-bell-jump-mobile 1.35s cubic-bezier(.2,.8,.3,1) infinite,
            notification-bell-pulse 2.4s ease-out infinite;
    }

    @keyframes notification-bell-jump-mobile {
        0%, 64%, 100% { transform: translateY(0) rotate(0deg); }
        72% { transform: translateY(-5px) rotate(-6deg); }
        80% { transform: translateY(0) rotate(6deg); }
        88% { transform: translateY(-3px) rotate(-3deg); }
        94% { transform: translateY(0) rotate(2deg); }
    }

    .notification-nag {
        left: 10px;
        right: 10px;
        bottom: calc(10px + env(safe-area-inset-bottom, 0px));
        width: auto;
        min-height: 82px;
        grid-template-columns: 46px minmax(0,1fr) 22px;
        gap: 11px;
        padding: 14px 14px;
        border-radius: 19px;
        box-shadow:
            0 18px 46px rgba(96,31,40,.26),
            0 0 0 1px rgba(255,255,255,.78) inset;
        animation:
            notification-mobile-enter .36s ease-out both,
            notification-mobile-nudge 3.5s ease-in-out .9s infinite;
    }

    .notification-nag-icon {
        width: 44px;
        height: 44px;
        font-size: 24px;
    }

    .notification-nag-text strong {
        font-size: 14px;
        line-height: 1.25;
    }

    .notification-nag-text small {
        max-width: 100%;
        font-size: 12px;
    }

    .notification-nag-arrow {
        font-size: 28px;
    }

    @keyframes notification-mobile-enter {
        from {
            opacity: 0;
            transform: translateY(34px) scale(.96);
        }
        to {
            opacity: 1;
            transform: translateY(0) scale(1);
        }
    }

    @keyframes notification-mobile-nudge {
        0%, 70%, 100% {
            transform: translateY(0) scale(1);
        }
        76% {
            transform: translateY(-7px) scale(1.015);
        }
        82% {
            transform: translateY(0) scale(1);
        }
        88% {
            transform: translateY(-4px) scale(1.008);
        }
        94% {
            transform: translateY(0) scale(1);
        }
    }

    .notification-dropdown {
        position: fixed;
        left: 10px;
        right: 10px;
        top: 72px;
        width: auto;
        max-height: min(68vh, 520px);
        border-radius: 18px;
    }

    .notification-dropdown-list {
        max-height: calc(min(68vh, 520px) - 48px);
    }

    .notification-mini {
        min-height: 64px;
        grid-template-columns: 38px minmax(0,1fr);
        padding: 13px 14px;
    }

    .notification-mini-icon {
        width: 36px;
        height: 36px;
    }

    .notification-page-hero {
        gap: 12px;
    }

    .notification-page-hero form,
    .notification-page-hero .btn {
        width: 100%;
    }

    .notification-tabs {
        position: sticky;
        top: 72px;
        z-index: 8;
        padding: 7px 0;
        background: rgba(244,246,251,.9);
        backdrop-filter: blur(8px);
    }

    .notification-tab {
        flex: 1 1 0;
        text-align: center;
    }

    .notification-row {
        min-height: 78px;
        border-radius: 16px;
    }
}


/* v1.4.4 — interactive entry, isolated from core portal design */

.interactive-student-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 16px;
}

.interactive-student-card {
    min-width: 0;
    display: grid;
    gap: 13px;
    padding: 17px;
    border: 1px solid var(--line);
    border-radius: 20px;
    background: rgba(255,255,255,.94);
    box-shadow: 0 8px 26px rgba(35,46,75,.06);
    transition: transform .16s ease, box-shadow .16s ease;
}

.interactive-student-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 17px 42px rgba(35,46,75,.11);
}

.interactive-student-photo {
    width: 78px;
    height: 78px;
    overflow: hidden;
    display: grid;
    place-items: center;
    border-radius: 23px;
    color: var(--accent);
    background: linear-gradient(145deg,#edf1ff,#e3e9ff);
    font-size: 25px;
    font-weight: 900;
}

.interactive-student-photo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.interactive-student-info {
    min-width: 0;
}

.interactive-student-info strong {
    display: block;
    overflow: hidden;
    font-size: 16px;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.interactive-call-button {
    width: 100%;
    min-height: 44px;
}

.interactive-active-list {
    display: grid;
    gap: 9px;
}

.interactive-active-room {
    display: grid;
    grid-template-columns: 14px minmax(0,1fr) auto;
    gap: 10px;
    align-items: center;
    padding: 13px 15px;
    border: 1px solid #dbe2f1;
    border-radius: 14px;
    color: var(--text);
    background: #fff;
}

.interactive-active-room:hover {
    text-decoration: none;
}

.interactive-active-room > span:nth-child(2) {
    min-width: 0;
    display: grid;
    gap: 3px;
}

.interactive-active-room small {
    color: var(--muted);
}

.interactive-live-dot,
.interactive-waiting-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
}

.interactive-live-dot {
    background: #42a576;
    box-shadow: 0 0 0 5px rgba(66,165,118,.11);
}

.interactive-student-landing {
    min-height: min(650px, calc(100vh - 150px));
    display: grid;
    place-items: center;
    align-content: center;
    gap: 12px;
    text-align: center;
}

.interactive-student-landing h1 {
    margin-bottom: 20px;
}

.interactive-landing-orbit {
    position: relative;
    width: 170px;
    height: 170px;
    margin-bottom: 14px;
}

.interactive-landing-orbit > span {
    position: absolute;
    inset: 25px 7px;
    border: 1.5px solid #c8d1f4;
    border-radius: 50%;
}

.interactive-landing-orbit > span:nth-child(2) {
    transform: rotate(60deg);
}

.interactive-landing-orbit > span:nth-child(3) {
    transform: rotate(-60deg);
}

.interactive-landing-orbit > i {
    position: absolute;
    left: 50%;
    top: 50%;
    width: 60px;
    height: 60px;
    display: grid;
    place-items: center;
    transform: translate(-50%,-50%);
    border-radius: 19px;
    color: white;
    background: linear-gradient(145deg,#6a7fe3,#4f66d2);
    font-family: Georgia,serif;
    font-size: 29px;
    font-weight: 900;
    box-shadow: 0 12px 30px rgba(78,99,201,.25);
}

.interactive-current-call {
    width: min(540px,100%);
    display: grid;
    grid-template-columns: 14px minmax(0,1fr) auto;
    gap: 12px;
    align-items: center;
    padding: 15px 16px;
    border: 1px solid #d8e0f0;
    border-radius: 16px;
    background: white;
    box-shadow: var(--shadow);
    text-align: left;
}

.interactive-current-call > div {
    display: grid;
    gap: 3px;
}

.interactive-current-call small {
    color: var(--muted);
}

.interactive-waiting-state {
    display: inline-flex;
    align-items: center;
    gap: 9px;
    padding: 10px 14px;
    border: 1px solid var(--line);
    border-radius: 999px;
    color: var(--muted);
    background: rgba(255,255,255,.7);
}

/* Incoming call only. Keep it consistent with the portal, not a second design system. */
.incoming-call-modal {
    position: fixed;
    left: 50%;
    top: 86px;
    z-index: 250;
    width: min(460px, calc(100vw - 24px));
    display: grid;
    grid-template-columns: 62px minmax(0,1fr) auto;
    gap: 14px;
    align-items: center;
    padding: 14px 15px;
    transform: translateX(-50%);
    border: 1px solid #d7deee;
    border-radius: 19px;
    color: var(--text);
    background: rgba(255,255,255,.98);
    box-shadow: 0 22px 55px rgba(34,47,83,.20);
    backdrop-filter: blur(14px);
}

.incoming-call-modal[hidden] {
    display: none;
}

.incoming-call-rings {
    position: relative;
    width: 58px;
    height: 58px;
    display: grid;
    place-items: center;
}

.incoming-call-rings span {
    display: none;
}

.incoming-call-rings i {
    width: 48px;
    height: 48px;
    display: grid;
    place-items: center;
    border-radius: 15px;
    color: #fff;
    background: linear-gradient(145deg,#657ae0,#5067d2);
    font-style: normal;
    box-shadow: 0 9px 22px rgba(79,101,205,.20);
}

.incoming-call-content {
    min-width: 0;
    display: grid;
    gap: 3px;
}

.incoming-call-label {
    color: var(--accent);
    font-size: 10px;
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: .08em;
}

.incoming-call-content strong {
    overflow: hidden;
    font-size: 17px;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.incoming-call-content small {
    color: var(--muted);
}

.incoming-call-actions {
    display: flex;
    gap: 8px;
}

.incoming-call-btn {
    width: 46px;
    height: 46px;
    display: grid;
    place-items: center;
    border: 0;
    border-radius: 50%;
    color: white;
    text-decoration: none;
    font-size: 22px;
    font-weight: 700;
}

.incoming-call-btn:hover {
    text-decoration: none;
}

.incoming-call-btn.reject {
    background: #d84f5b;
}

.incoming-call-btn.accept {
    background: #38a36e;
}

@media (max-width: 1050px) {
    .interactive-student-grid {
        grid-template-columns: repeat(3,minmax(0,1fr));
    }
}

@media (max-width: 760px) {
    .interactive-student-grid {
        grid-template-columns: repeat(2,minmax(0,1fr));
    }

    .incoming-call-modal {
        top: 75px;
        grid-template-columns: 52px minmax(0,1fr);
    }

    .incoming-call-actions {
        grid-column: 1 / -1;
    }

    .incoming-call-btn {
        width: auto;
        flex: 1 1 0;
        border-radius: 12px;
    }
}

@media (max-width: 520px) {
    .interactive-student-grid {
        grid-template-columns: 1fr;
    }

    .interactive-student-card {
        grid-template-columns: 62px minmax(0,1fr);
        align-items: center;
    }

    .interactive-student-photo {
        grid-row: 1 / span 2;
        width: 62px;
        height: 62px;
        border-radius: 18px;
    }

    .interactive-student-card form {
        grid-column: 2;
    }

    .interactive-current-call {
        grid-template-columns: 12px minmax(0,1fr);
    }

    .interactive-current-call .btn {
        grid-column: 1 / -1;
    }

    .incoming-call-modal {
        left: 10px;
        right: 10px;
        top: calc(70px + env(safe-area-inset-top,0px));
        width: auto;
        transform: none;
    }
}


/* v1.4.6 — reschedule + notification payment tone */

.reschedule-btn {
    border-color: #cbd5f5;
    color: #4058b4;
    background: #f1f4ff;
}

.reschedule-current {
    display: grid;
    grid-template-columns: repeat(2, minmax(0,1fr));
    gap: 16px;
    margin: 18px 0;
    padding: 17px 19px;
}

.reschedule-current > div {
    min-width: 0;
    display: grid;
    gap: 5px;
}

.reschedule-current span {
    color: var(--muted);
    font-size: 11px;
    font-weight: 750;
}

.reschedule-current strong {
    overflow-wrap: anywhere;
    font-size: 15px;
}

.reschedule-form {
    margin-top: 0;
}

.notification-icon.tone-success,
.notification-mini-icon.tone-success {
    color: #247249;
    background: #dff4e8;
}

.notification-row.tone-success {
    border-color: #caead7;
    background: #f3fbf6;
}

.notification-row.tone-success.unread {
    border-color: #addabe;
    background: #edf9f1;
}

.notification-mini.tone-success {
    background: #f2faf5;
}

.notification-mini.tone-success.unread {
    background: #eaf8ef;
}

.notification-nag.tone-success {
    border-color: #b8dec7;
    color: #255d3d;
    background: linear-gradient(145deg, rgba(247,255,250,.98), rgba(232,248,238,.98));
    box-shadow:
        0 18px 50px rgba(38,104,67,.18),
        0 0 0 1px rgba(255,255,255,.7) inset;
}

.notification-nag.tone-success .notification-nag-icon {
    background: linear-gradient(145deg, #4eb27d, #32945f);
    box-shadow: 0 7px 16px rgba(50,148,95,.23);
}

.notification-nag.tone-success .notification-nag-text strong {
    color: #277149;
}

.notification-nag.tone-success .notification-nag-arrow {
    color: #4b9870;
}

@media (max-width: 680px) {
    .reschedule-current {
        grid-template-columns: 1fr;
        gap: 11px;
    }
}


.incoming-call-modal.sound-blocked .incoming-call-label::after {
    content: " · нажмите на карточку для звука";
    color: #b35a64;
    text-transform: none;
    letter-spacing: normal;
}


/* v1.4.7 — reschedule marker + completed unpaid danger */
.payment-badge.unpaid-danger {
    background: #fde8ea;
    color: #b83240;
    border-color: #f1c7cc;
}

.unpaid-danger-text,
.completed-unpaid-text {
    color: #c33a47 !important;
    font-weight: 800;
}

.calendar-lesson.completed-unpaid {
    background: #fff0f1;
    color: #8e3039;
    box-shadow: inset 3px 0 0 #d94e59;
}

.completed-unpaid-card {
    border-color: #efc7cb;
    background: #fff7f7;
}

.lesson-rescheduled-banner {
    display: grid;
    grid-template-columns: 44px minmax(0, 1fr);
    gap: 12px;
    align-items: center;
    margin-top: 16px;
    padding: 14px 16px;
    border: 1px solid #cfd9f5;
    border-radius: 15px;
    background: #f3f6ff;
}

.lesson-rescheduled-icon {
    width: 42px;
    height: 42px;
    display: grid;
    place-items: center;
    border-radius: 12px;
    color: #4159b6;
    background: #e3e9ff;
    font-size: 23px;
    font-weight: 900;
}

.lesson-rescheduled-banner > div:last-child {
    min-width: 0;
    display: grid;
    gap: 3px;
}

.lesson-rescheduled-banner strong {
    color: #344b9d;
    font-size: 13px;
}

.lesson-rescheduled-banner span {
    color: #627092;
    font-size: 12px;
    line-height: 1.4;
}

.notification-icon.tone-danger,
.notification-mini-icon.tone-danger {
    color: #a92f3a;
    background: #fde5e7;
}

.notification-row.tone-danger {
    border-color: #efc2c7;
    background: #fff5f6;
}

.notification-row.tone-danger.unread {
    border-color: #e9aab1;
    background: #ffedef;
}

.notification-mini.tone-danger,
.notification-mini.tone-danger.unread {
    background: #fff0f1;
}

.notification-nag.tone-danger {
    border-color: #eeafb6;
    color: #7f2b34;
    background: linear-gradient(145deg, rgba(255,247,248,.99), rgba(255,229,232,.99));
}

.notification-nag.tone-danger .notification-nag-icon {
    background: linear-gradient(145deg, #e6606b, #c93f4b);
}

.notification-nag.tone-danger .notification-nag-text strong {
    color: #ad3440;
}

.notification-nag.tone-danger .notification-nag-arrow {
    color: #c24e59;
}

@media (max-width: 680px) {
    .lesson-rescheduled-banner {
        grid-template-columns: 38px minmax(0,1fr);
        padding: 12px;
    }
    .lesson-rescheduled-icon {
        width: 36px;
        height: 36px;
        border-radius: 10px;
        font-size: 20px;
    }
}


/* v1.4.8 — cancelled lessons + notification read state */

.cancelled-text,
.cancelled-detail-text {
    color: #7a808a;
    font-weight: 800;
}

.notification-row.read {
    opacity: .72;
    box-shadow: none;
}

.notification-row.read:hover {
    opacity: .92;
}

.notification-read {
    padding: 3px 7px;
    border-radius: 999px;
    background: #f0f1f4;
    color: #7b828d;
    font-size: 9px;
    font-weight: 850;
    text-transform: uppercase;
}

.notification-row.unread .notification-row-title strong {
    font-weight: 850;
}

.notification-mini:not(.unread) {
    opacity: .72;
}

.notification-mini:not(.unread):hover {
    opacity: 1;
}


/* v1.5.0 — lesson types in schedule */

.lesson-subject-field {
    display: grid;
    gap: 6px;
    margin: 0 0 15px;
}

.lesson-subject-field > label {
    font-weight: 750;
    font-size: 13px;
}

.lesson-subject-row {
    display: grid;
    grid-template-columns: minmax(0,1fr) 43px;
    gap: 7px;
}

.lesson-subject-row select {
    width: 100%;
    min-width: 0;
    min-height: 43px;
    border: 1px solid #cfd5df;
    border-radius: 10px;
    padding: 9px 11px;
    color: var(--text);
    background: #fff;
}

.lesson-subject-add-btn {
    min-height: 43px;
    border: 1px solid #cbd4ef;
    border-radius: 10px;
    color: #4059b6;
    background: #eef2ff;
    font-size: 24px;
    font-weight: 650;
    line-height: 1;
}

.lesson-subject-add-btn:hover {
    background: #e5eaff;
}

.lesson-subject-create {
    display: grid;
    grid-template-columns: minmax(0,1fr) auto auto;
    gap: 7px;
    align-items: center;
    padding: 10px;
    border: 1px solid #d9e0f1;
    border-radius: 12px;
    background: #f8f9fc;
}

.lesson-subject-create[hidden] {
    display: none;
}

.lesson-subject-create input {
    width: 100%;
    min-width: 0;
    min-height: 40px;
    border: 1px solid #cfd5df;
    border-radius: 9px;
    padding: 8px 10px;
    background: #fff;
}

.lesson-subject-error {
    grid-column: 1 / -1;
    min-height: 0;
    color: #a03939;
    font-size: 11px;
}

.lesson-paid-field {
    display: flex !important;
    grid-template-columns: none !important;
    align-items: center;
    gap: 8px !important;
}

.lesson-paid-field input {
    width: 18px;
    height: 18px;
}

.lesson-subject-chip {
    width: fit-content;
    max-width: 100%;
    overflow: hidden;
    padding: 3px 6px;
    border-radius: 6px;
    color: #4359aa;
    background: rgba(83,111,209,.10);
    font-size: 9px;
    font-weight: 850;
    line-height: 1.25;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.calendar-lesson-note {
    display: -webkit-box;
    overflow: hidden;
    color: #70798a;
    font-size: 9px;
    line-height: 1.25;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
}

.calendar-lesson.status-cancelled .lesson-subject-chip {
    color: #6f7680;
    background: rgba(93,101,113,.10);
}

.calendar-lesson.status-cancelled .calendar-lesson-note {
    color: #888e97;
}

.mobile-lesson-subject {
    width: fit-content;
    max-width: 100%;
    margin-top: 3px;
    padding: 4px 7px;
    border-radius: 7px;
    color: #4359aa;
    background: #eef2ff;
    font-size: 10px;
    font-weight: 850;
}

.mobile-lesson-note {
    margin-top: 6px;
    padding-left: 9px;
    border-left: 2px solid #d8deef;
    color: var(--muted);
    font-size: 11px;
    line-height: 1.35;
    overflow-wrap: anywhere;
}

.lesson-detail-subject {
    width: fit-content;
    margin-top: 8px;
    padding: 6px 9px;
    border-radius: 9px;
    color: #4059b6;
    background: #edf1ff;
    font-size: 12px;
    font-weight: 850;
}

@media (max-width: 560px) {
    .lesson-subject-create {
        grid-template-columns: 1fr 1fr;
    }

    .lesson-subject-create input {
        grid-column: 1 / -1;
    }
}


/* v1.5.8 — rescheduled lesson labels */

.calendar-rescheduled {
    display: block;
    width: fit-content;
    max-width: 100%;
    padding: 3px 6px;
    border-radius: 6px;
    color: #7a5b17;
    background: #fff4d6;
    font-size: 9px;
    font-weight: 800;
    line-height: 1.25;
}

.mobile-lesson-rescheduled {
    width: fit-content;
    max-width: 100%;
    margin-top: 5px;
    padding: 5px 8px;
    border-radius: 8px;
    color: #7a5b17;
    background: #fff4d6;
    font-size: 10px;
    font-weight: 800;
    line-height: 1.3;
}

.detail-rescheduled-from {
    margin-top: 2px;
    color: #8a6418 !important;
    font-weight: 750;
}

.dashboard-rescheduled {
    color: #8a6418 !important;
    font-size: 11px !important;
    font-weight: 750;
}


/* =========================================================
   v1.5.15 — linguasdisco visual system
   ========================================================= */

:root {
    --bg: #f7f5fb;
    --panel: #ffffff;
    --text: #241d35;
    --muted: #756f82;
    --line: #e8e2ef;
    --accent: #7057f2;
    --accent-dark: #5841d8;
    --accent-soft: #eeeaff;
    --mint: #1db7a1;
    --coral: #ff786a;
    --success: #2f936b;
    --danger: #c84f5b;
    --warning: #b9751f;
    --shadow: 0 18px 48px rgba(50, 37, 78, .09);
    --radius: 20px;
}

body {
    color: var(--text);
    background-image:
        url("../img/linguasdisco-bg.svg"),
        radial-gradient(circle at 3% -8%, rgba(123,92,250,.17), transparent 30%),
        radial-gradient(circle at 96% 5%, rgba(29,183,161,.11), transparent 23%),
        radial-gradient(circle at 76% 93%, rgba(255,120,106,.07), transparent 22%),
        linear-gradient(180deg, #fbfaff 0%, #f5f2fa 50%, #faf8fc 100%);
    background-repeat: no-repeat, no-repeat, no-repeat, no-repeat, no-repeat;
    background-size: min(1600px,100vw) auto, auto, auto, auto, auto;
    background-position: top center, left top, right top, right bottom, center;
    background-attachment: fixed, fixed, fixed, fixed, fixed;
}

.site-header {
    border-bottom-color: rgba(92,73,130,.10);
    background: rgba(255,253,255,.90);
    box-shadow: 0 8px 30px rgba(58,43,85,.04);
}

.header-inner {
    min-height: 70px;
}

.brand {
    gap: 11px;
    color: var(--text);
    font-size: 18px;
    font-weight: 900;
    letter-spacing: -.055em;
}

.brand > span:last-child {
    background: linear-gradient(92deg, #2c2241 8%, #7057f2 58%, #1db7a1 118%);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.brand-mark {
    width: 38px;
    height: 38px;
    border-radius: 13px 13px 13px 6px;
    font-family: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    font-size: 13px;
    font-style: normal;
    font-weight: 950;
    letter-spacing: -.08em;
    text-transform: lowercase;
    background:
        linear-gradient(140deg, #7b5cfa 0%, #5d70f4 54%, #1db7a1 115%);
    box-shadow: 0 9px 22px rgba(100,77,225,.25);
}

.brand-mark::after {
    content: "";
    position: absolute;
    width: 8px;
    height: 8px;
    margin: 28px 0 0 -24px;
    border-radius: 0 0 0 2px;
    background: #1db7a1;
    transform: rotate(18deg);
}

.brand-mark {
    position: relative;
}

.brand-mark.large {
    width: 58px;
    height: 58px;
    border-radius: 19px 19px 19px 8px;
    font-size: 18px;
}

.brand-mark.large::after {
    width: 11px;
    height: 11px;
    margin: 44px 0 0 -37px;
}

.desktop-nav {
    gap: 3px;
}

.desktop-nav a {
    padding: 9px 11px;
    border-radius: 11px;
    color: #5f596c;
    font-weight: 650;
}

.desktop-nav a:hover {
    color: #5c46d8;
    background: #f0ecff;
}

.link-button {
    color: #6550da;
    font-weight: 700;
}

.mobile-menu summary {
    border: 1px solid #e8e2f0;
    background: #f7f4fb;
}

.mobile-menu-panel {
    border-color: #e6e0ee;
    box-shadow: 0 18px 42px rgba(54,40,79,.14);
}

.page-shell {
    padding-top: 34px;
}

h1, h2, h3 {
    color: #261f37;
    letter-spacing: -.035em;
}

.eyebrow {
    color: #7259ee;
    letter-spacing: .11em;
}

.hero.dashboard-hero {
    min-height: 230px;
    overflow: hidden;
    border: 1px solid rgba(109,85,205,.12);
    border-radius: 28px;
    background:
        radial-gradient(circle at 82% 25%, rgba(29,183,161,.11), transparent 25%),
        radial-gradient(circle at 66% 115%, rgba(255,120,106,.08), transparent 30%),
        linear-gradient(145deg, rgba(255,255,255,.98), rgba(246,243,255,.95));
    box-shadow: 0 24px 58px rgba(59,43,90,.08);
}

.hero.dashboard-hero::before {
    background:
        radial-gradient(circle, rgba(112,87,242,.12) 1.5px, transparent 1.5px);
    background-size: 18px 18px;
    opacity: .42;
}

.hero.dashboard-hero::after {
    width: 210px;
    height: 210px;
    right: 190px;
    top: -112px;
    border: 34px solid rgba(112,87,242,.055);
    border-radius: 50%;
}

.hero.dashboard-hero h1 {
    color: #251d38;
}

.hero-art {
    filter: drop-shadow(0 22px 28px rgba(68,52,112,.10));
}

.btn {
    border-radius: 12px;
    border-color: #ded8e8;
    color: #342c44;
    background: rgba(255,255,255,.92);
    box-shadow: 0 3px 8px rgba(50,38,74,.025);
}

.btn:hover {
    border-color: #cfc5e5;
    background: #fff;
}

.btn.primary {
    border-color: transparent;
    color: #fff;
    background: linear-gradient(135deg, #765cf4, #5c67ec 66%, #36a99a);
    box-shadow: 0 10px 24px rgba(103,80,228,.22);
}

.btn.primary:hover {
    border-color: transparent;
    background: linear-gradient(135deg, #684ee7, #505bdc 66%, #2a988b);
}

.card,
.stat-card,
.compact-row,
.quick-card,
.person-row,
.material-card,
.action-panel {
    border-color: #e8e1ef;
    box-shadow: 0 10px 30px rgba(60,44,88,.045);
}

.stat-card {
    position: relative;
    overflow: hidden;
    background:
        linear-gradient(150deg, #fff, #fbf9ff);
}

.stat-card::after {
    content: "";
    position: absolute;
    width: 54px;
    height: 54px;
    right: -18px;
    bottom: -18px;
    border-radius: 50%;
    background: rgba(112,87,242,.07);
}

.stat-card strong {
    color: #5f49dc;
}

.compact-row:hover,
.stat-card:hover,
.quick-card:hover {
    border-color: #cfc4e8;
    box-shadow: 0 14px 34px rgba(61,45,91,.07);
}

.date-chip {
    border: 1px solid #e6e0ef;
    color: #5842cf;
    background: linear-gradient(145deg, #f4f0ff, #fbf9ff);
}

.quick-card {
    min-height: 150px;
    background:
        radial-gradient(circle at 100% 0%, rgba(29,183,161,.08), transparent 34%),
        linear-gradient(145deg, #fff, #faf8ff);
}

.quick-card:nth-child(2) {
    background:
        radial-gradient(circle at 100% 0%, rgba(255,120,106,.08), transparent 34%),
        linear-gradient(145deg, #fff, #fff9f8);
}

.quick-icon {
    border: 1px solid #dfd8f4;
    color: #684fdf;
    background: #f0ecff;
}

.quick-card:nth-child(2) .quick-icon {
    border-color: #f3d9d4;
    color: #d65d52;
    background: #fff0ed;
}

.quick-card:nth-child(3) .quick-icon {
    border-color: #d7eee9;
    color: #198d7d;
    background: #ebfaf6;
}

.avatar,
.photo-placeholder,
.dashboard-avatar {
    color: #684fdf;
    background: linear-gradient(145deg, #f0ebff, #e9f9f5);
}

.form input,
.form select,
.form textarea {
    border-color: #ddd7e7;
    border-radius: 12px;
    background: rgba(255,255,255,.96);
}

.form input:focus,
.form select:focus,
.form textarea:focus {
    outline: 4px solid rgba(112,87,242,.11);
    border-color: #9c8ae8;
}

.login-shell {
    min-height: calc(100vh - 142px);
}

.login-card {
    position: relative;
    width: min(500px, 100%);
    overflow: hidden;
    padding: 38px;
    border-color: rgba(112,87,242,.14);
    border-radius: 28px;
    background:
        radial-gradient(circle at 100% 0%, rgba(29,183,161,.10), transparent 32%),
        radial-gradient(circle at 0% 100%, rgba(255,120,106,.07), transparent 28%),
        rgba(255,255,255,.96);
    box-shadow: 0 28px 74px rgba(56,40,83,.12);
}

.login-card::before {
    content: "hello · bonjour · مرحباً · hello";
    position: absolute;
    right: -48px;
    top: 46px;
    width: 240px;
    color: rgba(112,87,242,.055);
    font-size: 24px;
    font-weight: 900;
    line-height: 1.5;
    transform: rotate(18deg);
    pointer-events: none;
}

.login-brand-lockup {
    position: relative;
    z-index: 2;
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 28px;
}

.login-brand-lockup h1 {
    margin: 2px 0 0;
    font-size: clamp(31px, 8vw, 43px);
    background: linear-gradient(92deg, #2b2140, #7057f2 63%, #1db7a1 118%);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.notification-bell {
    border-color: #e5deef;
    background: #f9f7fc;
}

.notification-bell.has-unread {
    color: #fff;
    background: linear-gradient(135deg, #765cf4, #5b68ec);
}

.notification-dropdown,
.notification-nag {
    border-color: #e4ddec;
    box-shadow: 0 18px 50px rgba(56,42,80,.14);
}

.lesson-subject-chip,
.mobile-lesson-subject {
    color: #5f49d7;
    background: #efebff;
}

.status-planned {
    color: #5d48cf;
    background: #efebff;
}

.payment-badge.unpaid {
    color: #9b6215;
    background: #fff3e4;
}

.material-kind-icon,
.material-icon,
.lesson-student-avatar {
    background: linear-gradient(145deg, #f0ebff, #ebfaf6);
}

@media (max-width: 760px) {
    .brand {
        font-size: 16px;
    }

    .brand-mark {
        width: 35px;
        height: 35px;
    }

    .login-card {
        padding: 28px 22px;
        border-radius: 22px;
    }

    .hero.dashboard-hero {
        border-radius: 22px;
    }
}


/* =========================================================
   v1.5.16 — material first-page thumbnails
   ========================================================= */

.material-cover {
    position: relative;
    isolation: isolate;
    overflow: hidden;
}

.material-cover-content {
    position: relative;
    z-index: 3;
    min-width: 0;
    display: grid;
    align-content: end;
    gap: 7px;
}

.material-cover.has-thumbnail {
    min-height: 250px;
    padding: 0;
    background: #e9e6ef;
}

.material-cover.has-thumbnail .material-cover-content {
    min-height: 250px;
    padding: 16px;
    align-content: end;
    color: #fff;
}

.material-thumbnail {
    position: absolute;
    inset: 0;
    z-index: 1;
    width: 100%;
    height: 100%;
    display: block;
    object-fit: cover;
    object-position: top center;
    background: #f4f1f7;
    transition: transform .22s ease, filter .22s ease;
}

.material-cover.kind-pdf .material-thumbnail {
    object-fit: contain;
    padding: 8px;
    background:
        linear-gradient(145deg, #ece8f3, #f7f5fa);
}

.material-thumbnail-shade {
    position: absolute;
    inset: 0;
    z-index: 2;
    background:
        linear-gradient(
            180deg,
            rgba(18,13,28,.02) 0%,
            rgba(18,13,28,.08) 46%,
            rgba(18,13,28,.78) 100%
        );
    pointer-events: none;
}

.material-cover.has-thumbnail:hover .material-thumbnail {
    transform: scale(1.025);
}

.material-cover.has-thumbnail .material-icon {
    width: 43px;
    height: 43px;
    margin-bottom: 2px;
    border-radius: 12px;
    background: rgba(27,19,42,.46);
    border-color: rgba(255,255,255,.25);
    backdrop-filter: blur(8px);
}

.material-cover.has-thumbnail .material-kind {
    width: fit-content;
    padding: 3px 7px;
    border-radius: 7px;
    opacity: 1;
    background: rgba(27,19,42,.46);
    backdrop-filter: blur(8px);
}

.material-cover.has-thumbnail strong {
    max-width: 100%;
    color: #fff;
    text-shadow: 0 2px 12px rgba(0,0,0,.36);
}

@media (max-width: 680px) {
    .material-cover.has-thumbnail,
    .material-cover.has-thumbnail .material-cover-content {
        min-height: 220px;
    }
}


/* v1.5.18 — video thumbnails */
.material-cover.kind-video.has-thumbnail .material-thumbnail {
    object-fit: cover;
    padding: 0;
    background: #11131a;
}

.material-cover.kind-video.has-thumbnail .material-icon::after {
    content: "▶";
    font-size: 14px;
}
