:root{--bg:#f6f7f9;--card:#fff;--text:#1d222b;--muted:#737b87;--line:#e5e7eb;--accent:#a45b46;--accent-soft:#f3e7e2;--green:#2f7d59;--green-soft:#e9f5ee;--red:#b54b4b;--red-soft:#f9e9e9;--yellow:#a46b1d;--yellow-soft:#fbf1df;--gray:#8b929c;--gray-soft:#f0f1f3;--shadow:0 8px 28px rgba(30,35,45,.06);--radius:16px}*{box-sizing:border-box}body{margin:0;font-family:Inter,ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif;background:var(--bg);color:var(--text)}button,input,select,textarea{font:inherit}button{cursor:pointer}.app{display:flex;min-height:100vh}.sidebar{width:238px;background:#fff;border-right:1px solid var(--line);padding:22px 14px;position:sticky;top:0;height:100vh}.brand{font-weight:800;font-size:22px;padding:0 12px 24px}.brand span{color:var(--accent)}.nav button{width:100%;border:0;background:transparent;text-align:left;padding:11px 12px;border-radius:11px;color:#555e69;margin:2px 0}.nav button.active,.nav button:hover{background:var(--accent-soft);color:var(--accent);font-weight:650}.main{flex:1;padding:28px 34px;max-width:1500px;margin:auto;width:100%}.topbar{display:flex;justify-content:space-between;align-items:center;margin-bottom:26px}.title{font-size:28px;font-weight:760}.subtitle{color:var(--muted);margin-top:4px}.actions{display:flex;gap:8px;flex-wrap:wrap}.btn{border:1px solid var(--line);background:#fff;border-radius:10px;padding:9px 13px}.btn.primary{background:var(--accent);color:#fff;border-color:var(--accent)}.btn.danger{color:var(--red)}.btn.small{padding:6px 9px;font-size:13px}.grid{display:grid;gap:16px}.stats{grid-template-columns:repeat(4,minmax(0,1fr));margin-bottom:18px}.card{background:var(--card);border:1px solid var(--line);border-radius:var(--radius);box-shadow:var(--shadow)}.stat{padding:18px}.stat .label{color:var(--muted);font-size:13px}.stat .value{font-size:27px;font-weight:750;margin-top:7px}.content2{grid-template-columns:1.5fr 1fr}.section{padding:18px}.section-head{display:flex;justify-content:space-between;align-items:center;margin-bottom:14px}.section-title{font-weight:700;font-size:16px}.list{display:flex;flex-direction:column;gap:8px}.lesson{display:grid;grid-template-columns:70px 1fr auto;gap:12px;align-items:center;padding:12px;border:1px solid var(--line);border-radius:12px}.time{font-weight:700}.muted{color:var(--muted)}.badge{display:inline-flex;align-items:center;gap:5px;border-radius:999px;padding:5px 8px;font-size:12px;font-weight:650}.badge.green{background:var(--green-soft);color:var(--green)}.badge.red{background:var(--red-soft);color:var(--red)}.badge.yellow{background:var(--yellow-soft);color:var(--yellow)}.badge.gray{background:var(--gray-soft);color:var(--gray)}.badge.debt{background:#fff4e5;color:#9a5a00}.needs{display:flex;flex-direction:column;gap:9px}.need{padding:11px 12px;border-radius:11px;background:#fafafa;border:1px solid var(--line);font-size:13px}.need strong{display:block;margin-bottom:3px}.tablewrap{overflow:auto}.table{width:100%;border-collapse:collapse}.table th,.table td{text-align:left;padding:13px 10px;border-bottom:1px solid var(--line);white-space:nowrap}.table th{font-size:12px;color:var(--muted);font-weight:650}.clickable{cursor:pointer}
.lesson-title-clickable{display:flex;align-items:center;flex-wrap:wrap;gap:0}
.lesson-student-link{border:0;background:transparent;padding:0;color:inherit;font:inherit;font-weight:760;cursor:pointer;border-radius:6px;transition:color .15s ease,background .15s ease}
.lesson-student-link:hover{color:var(--accent);background:var(--accent-soft);padding-left:4px;padding-right:4px;margin-left:-4px;margin-right:-4px}
.lesson-student-link:focus-visible{outline:2px solid var(--accent);outline-offset:2px}
.lesson-student-separator{white-space:pre}
.clickable:hover{background:#fafafa}.toolbar{display:flex;gap:9px;align-items:center;margin-bottom:15px;flex-wrap:wrap}.search{flex:1;min-width:240px;padding:10px 12px;border:1px solid var(--line);border-radius:10px;background:#fff}.select{padding:10px 12px;border:1px solid var(--line);border-radius:10px;background:#fff}.calendar{display:grid;grid-template-columns:repeat(7,1fr);gap:8px}.day{min-height:360px;background:#fff;border:1px solid var(--line);border-radius:14px;padding:10px}.day.today{border-color:var(--accent);box-shadow:0 0 0 2px var(--accent-soft)}.dayhead{font-weight:700;font-size:13px;margin-bottom:10px}.dayhead small{color:var(--muted);font-weight:500}.cal-lesson{padding:8px;border-radius:9px;background:#f8f4f2;border-left:3px solid var(--accent);margin-bottom:7px;font-size:12px}.cal-lesson.done{border-left-color:var(--green);background:var(--green-soft)}.cal-lesson.moved{opacity:.48;background:var(--gray-soft);border-left-color:var(--gray)}.cal-lesson.cancelled{opacity:.58;background:var(--gray-soft);border-left-color:#aaa}.cal-lesson.no-show{border-left-color:var(--red);background:var(--red-soft)}.empty{padding:25px;text-align:center;color:var(--muted)}.modalback{position:fixed;inset:0;background:rgba(15,23,42,.55);backdrop-filter:blur(14px);-webkit-backdrop-filter:blur(14px);display:flex;align-items:center;justify-content:center;padding:20px;z-index:999999!important}.modal{width:min(850px,100%);max-height:90vh;overflow:auto;background:#fff;border-radius:18px;padding:22px;box-shadow:0 30px 80px rgba(0,0,0,.2)}.modalhead{display:flex;justify-content:space-between;align-items:flex-start;margin-bottom:18px}.close{border:1px solid rgba(0,0,0,0.06);background:rgba(0,0,0,0.04);border-radius:50%;width:30px;height:30px;min-width:30px;min-height:30px;display:inline-flex;align-items:center;justify-content:center;font-size:14px;font-weight:700;color:var(--muted);cursor:pointer;padding:0;line-height:1;transition:all .15s ease}.formgrid{display:grid;grid-template-columns:repeat(2,1fr);gap:12px}.field{display:flex;flex-direction:column;gap:6px}.field label{font-size:12px;color:var(--muted)}.field input,.field select,.field textarea{padding:10px 11px;border:1px solid var(--line);border-radius:10px;background:#fff}.field.full{grid-column:1/-1}.modal-actions{display:flex;justify-content:flex-end;gap:8px;margin-top:18px;flex-wrap:wrap}.profile{display:grid;grid-template-columns:1fr 1fr;gap:16px}.profile .wide{grid-column:1/-1}.kv{display:grid;grid-template-columns:1fr 1fr;gap:10px}.kv div{padding:12px;border:1px solid var(--line);border-radius:11px}.kv span{display:block;color:var(--muted);font-size:12px;margin-bottom:4px}.tabs{display:flex;gap:4px;border-bottom:1px solid var(--line);margin-bottom:16px}.tab{border:0;background:transparent;padding:10px 12px;color:var(--muted);border-bottom:2px solid transparent}.tab.active{color:var(--accent);border-color:var(--accent);font-weight:700}.notice{padding:12px 14px;background:var(--accent-soft);border-radius:11px;color:#744536;font-size:13px}.schedule-row{display:grid;grid-template-columns:120px 1fr 100px;gap:10px;align-items:center;padding:10px 0;border-bottom:1px solid var(--line)}.weeknav{display:flex;gap:6px;align-items:center}.group-card{padding:14px;border:1px solid var(--line);border-radius:12px;margin-bottom:14px;background:#fff;position:relative;overflow:hidden}.group-card:before{content:"";position:absolute;left:0;top:0;bottom:0;width:4px;background:var(--accent)}.group-card.pair-card:before{background:#6f8799}.group-card.group-kind-card:before{background:var(--accent)}.group-card .section-head{padding-left:4px}.member{display:flex;justify-content:space-between;align-items:center;padding:8px 0;border-bottom:1px solid var(--line)}.member:last-child{border-bottom:0}@media(max-width:1000px){.sidebar{width:190px}.stats{grid-template-columns:repeat(2,1fr)}.content2{grid-template-columns:1fr}.calendar{grid-template-columns:repeat(2,1fr)}}@media(max-width:700px){.app{display:block}.sidebar{width:auto;height:auto;position:static;border-right:0;border-bottom:1px solid var(--line)}.nav{display:flex;overflow:auto}.nav button{white-space:nowrap;width:auto}.main{padding:18px}.stats{grid-template-columns:1fr 1fr}.formgrid,.profile{grid-template-columns:1fr}.calendar{grid-template-columns:1fr}.day{min-height:auto}}

.listrow{width:100%;display:flex;justify-content:space-between;align-items:center;gap:12px;padding:11px 12px;border:1px solid var(--line);background:#fff;border-radius:10px;text-align:left;cursor:pointer;margin-bottom:7px}.listrow:hover{background:#fafafa}

.schedule-filters{display:flex;gap:8px;flex-wrap:wrap;margin:12px 0}.filter-pill{border:1px solid var(--border);background:var(--card);padding:7px 12px;border-radius:999px;cursor:pointer}.filter-pill.active{font-weight:700}.filter-pill.type-individual.active{border-color:#5b8def}.filter-pill.type-pair.active{border-color:#48a868}.filter-pill.type-group.active{border-color:#e58a3a}
.cal-lesson{border-left:4px solid var(--border);padding:8px 9px;margin:5px 0;cursor:pointer}.cal-lesson.type-individual{border-left-color:#5b8def}.cal-lesson.type-pair{border-left-color:#48a868}.cal-lesson.type-group{border-left-color:#e58a3a}.cal-lesson.cancelled,.cal-lesson.no-show{opacity:.55}.lesson-type-dot{display:inline-block;width:7px;height:7px;border-radius:50%;background:currentColor;margin-right:4px}.cal-lesson.type-individual{color:#5b8def}.cal-lesson.type-pair{color:#48a868}.cal-lesson.type-group{color:#e58a3a}.cal-lesson strong,.cal-lesson br+span{color:inherit}.group-card.clickable{cursor:pointer}

.cal-lesson.done{opacity:1;background:var(--surface-2,#f3f5f7);border-left-color:#2f9e5b!important;color:var(--text,#222)!important;position:relative}
.cal-lesson.done::after{content:'✓';position:absolute;right:8px;top:7px;font-weight:800;color:#2f9e5b}
.cal-lesson.done .lesson-type-dot{background:#2f9e5b}
.group-card{padding:16px 18px!important;border:1px solid var(--border)!important;border-radius:14px!important;background:var(--card)!important;transition:transform .15s ease,box-shadow .15s ease,border-color .15s ease}
.group-card:hover{transform:translateY(-1px);box-shadow:0 6px 18px rgba(0,0,0,.06);border-color:var(--muted)!important}
.group-card .section-head{align-items:flex-start}
.group-card .group-meta{display:flex;gap:7px;flex-wrap:wrap;margin-top:9px}
.group-card .group-chip{display:inline-flex;align-items:center;padding:4px 9px;border-radius:999px;font-size:12px;background:var(--surface-2,#f3f5f7);color:var(--muted)}
.group-card .group-chip.level{font-weight:700}
.group-card .group-count{font-size:13px;margin-top:13px;display:flex;justify-content:space-between;align-items:center}
.group-card .group-count strong{font-size:15px}
.group-detail{display:grid;grid-template-columns:1fr 1fr;gap:12px;margin:14px 0}
.group-stat{padding:13px;border:1px solid var(--border);border-radius:12px;background:var(--surface-2,#f7f8f9)}
.group-stat span{display:block;font-size:12px;color:var(--muted);margin-bottom:4px}
.member{display:flex;align-items:center;justify-content:space-between;gap:10px;padding:10px 0;border-bottom:1px solid var(--border)}
.member:last-child{border-bottom:0}

.cal-lesson.status-completed{background:rgba(47,158,91,.12)!important;border-left-color:#2f9e5b!important;color:var(--text,#222)!important;box-shadow:inset 0 0 0 1px rgba(47,158,91,.18)}
.cal-lesson.status-completed .lesson-type-dot{background:#2f9e5b!important}
.cal-lesson.status-completed::after{content:'✓';position:absolute;right:8px;top:7px;font-weight:800;color:#2f9e5b}

.money-status{display:inline-flex;align-items:center;margin-left:6px;padding:2px 7px;border-radius:999px;font-size:11px;font-weight:700;white-space:nowrap}.money-status.deducted{background:rgba(47,158,91,.12);color:#2f9e5b}.money-status.not-deducted{background:rgba(120,120,120,.10);color:var(--muted)}.money-status.mixed{background:rgba(229,138,58,.14);color:#b56a16}

#lsub .search{width:100%;margin-bottom:7px}
#lsub select{width:100%}

/* 14.40 visual polish */
.dashboard-stats{grid-template-columns:repeat(4,minmax(0,1fr));gap:14px}
.dashboard-stats .stat-primary{min-height:118px}
.dashboard-stats .stat-debt{min-height:118px}
.dashboard-stats .stat-secondary{min-height:118px;opacity:.92}
.dashboard-stats .stat-primary .value{font-size:30px}
.dashboard-stats .stat-debt .value{font-size:30px}
.students-toolbar{align-items:center;gap:12px;flex-wrap:wrap}
.students-toolbar>.search{flex:1 1 260px;min-width:220px}
.filter-group{display:flex;gap:8px;align-items:center}
.format-badge{display:inline-flex;align-items:center;gap:5px;padding:4px 9px;border-radius:999px;font-size:12px;font-weight:700;white-space:nowrap}
.format-badge:before{content:'';width:7px;height:7px;border-radius:50%;background:currentColor;display:inline-block}
.format-badge.individual{color:#4f7cff;background:rgba(79,124,255,.10)}
.format-badge.pair{color:#23a26d;background:rgba(35,162,109,.10)}
.format-badge.group{color:#e38b2c;background:rgba(227,139,44,.12)}
.archive-month{border:1px solid var(--border);border-radius:14px;overflow:hidden;margin-bottom:10px;background:var(--card)}
.archive-month.open{box-shadow:0 4px 18px rgba(0,0,0,.05)}
.archive-head{width:100%;display:flex;justify-content:space-between;align-items:center;text-align:left;border:0;background:transparent;padding:15px 17px;cursor:pointer;color:inherit}
.archive-head:hover{background:rgba(0,0,0,.025)}
.archive-arrow{font-size:18px;opacity:.65}
.archive-payments{padding:0 15px 15px;border-top:1px solid var(--border)}
.archive-payment-summary{padding:13px 2px;color:var(--muted);font-size:13px}
.table.compact th,.table.compact td{padding:9px 10px}
.package-main{display:flex;align-items:baseline;gap:9px;margin-top:10px}
.package-main strong{font-size:34px;line-height:1}
.package-main strong.negative{color:var(--danger)}
.package-main span{color:var(--muted);font-size:13px}
.package-details{display:grid;grid-template-columns:repeat(3,1fr);gap:8px;margin-top:18px}
.package-details>div{padding:10px 11px;border-radius:10px;background:var(--surface)}
.package-details span{display:block;color:var(--muted);font-size:11px;margin-bottom:3px}
.package-details strong{font-size:17px}
.package-details strong.negative{color:var(--danger)}
.package-debt{margin-top:12px;padding:10px 12px;border-radius:10px;background:rgba(220,70,70,.08);color:var(--danger);font-size:13px;font-weight:700}
.package-ok{margin-top:12px;padding:10px 12px;border-radius:10px;background:rgba(35,162,109,.08);color:#21875d;font-size:13px}
@media(max-width:900px){.dashboard-stats{grid-template-columns:repeat(2,minmax(0,1fr))}.filter-group{flex:1}.filter-group .select{width:100%}}
@media(max-width:620px){.dashboard-stats{grid-template-columns:1fr}.package-details{grid-template-columns:1fr}}

/* 14.41 UI refinement */
.group-overview{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:12px;margin-bottom:14px}
.group-overview-card{background:var(--card);border:1px solid var(--border);border-radius:15px;padding:15px 17px}
.group-overview-card span{display:block;color:var(--muted);font-size:12px;margin-bottom:6px}
.group-overview-card strong{font-size:25px}
.groups-panel{padding-top:14px}
.group-card-v2{border:1px solid var(--border);border-radius:16px;padding:16px 17px;margin-top:11px;background:var(--card);transition:transform .15s ease,box-shadow .15s ease,border-color .15s ease}
.group-card-v2:hover{transform:translateY(-1px);box-shadow:0 7px 20px rgba(0,0,0,.06);border-color:rgba(100,100,100,.22)}
.group-card-top{display:flex;align-items:center;gap:12px}
.group-kind-icon{width:42px;height:42px;border-radius:12px;display:grid;place-items:center;font-size:19px;flex:0 0 auto}
.group-kind-icon.pair{background:rgba(35,162,109,.10);color:#23a26d}
.group-kind-icon.group{background:rgba(227,139,44,.12);color:#d77f1e}
.group-card-title{flex:1;min-width:0}
.group-card-title>strong{font-size:16px}
.group-card-title .group-meta{margin-top:7px}
.group-card-bottom{display:flex;align-items:center;gap:16px;border-top:1px solid var(--border);margin-top:15px;padding-top:12px}
.group-card-bottom>div:first-child{display:flex;align-items:baseline;gap:5px}
.group-card-bottom>div:first-child strong{font-size:20px}
.group-card-bottom>div:first-child span{font-size:12px;color:var(--muted)}
.group-status{font-size:12px;font-weight:700;padding:4px 8px;border-radius:999px}
.group-status.active{color:#21875d;background:rgba(35,162,109,.08)}
.group-status.inactive{color:var(--muted);background:var(--surface)}
.group-card-bottom .muted{margin-left:auto}
.group-detail{display:grid;grid-template-columns:repeat(4,1fr);gap:9px;margin:14px 0}
.group-detail .group-stat{background:var(--surface);border-radius:11px;padding:11px 12px}
.group-detail .group-stat span{display:block;color:var(--muted);font-size:11px;margin-bottom:4px}
.group-detail .group-stat strong{font-size:14px}
.student-email{color:inherit;text-decoration:none}
.student-email:hover{text-decoration:underline}
.profile{gap:14px}
.profile>.card.section{border-radius:16px}
.profile>.card.section:first-child{background:linear-gradient(180deg,var(--card),var(--surface))}
.profile .section-title{font-weight:800}
@media(max-width:900px){.group-overview{grid-template-columns:repeat(2,minmax(0,1fr))}.group-detail{grid-template-columns:repeat(2,1fr)}}
@media(max-width:600px){.group-overview{grid-template-columns:1fr 1fr}.group-card-top .actions{display:flex}.group-card-bottom{gap:9px}.group-detail{grid-template-columns:1fr 1fr}}


/* 14.42 visual hierarchy */
:root{--border:var(--line);--surface:#f7f8fa;--surface-2:#f3f5f7}
.dashboard-stats-compact .stat{min-height:96px;padding:15px 18px}
.dashboard-stats-compact .stat .value{font-size:27px;margin-top:5px}
.dashboard-main-grid{display:grid;grid-template-columns:1.35fr 1fr;gap:16px;align-items:start;margin-bottom:16px}
.dashboard-main-grid>.card{min-height:0}
.dashboard-today .list{gap:8px}
.dashboard-today .lesson{padding:11px 12px}
.dashboard-empty{padding:18px 8px;text-align:center;color:var(--muted);font-size:13px}
.dashboard-attention .needs{gap:7px}
.dashboard-need{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:10px 12px;background:#fff;border:1px solid var(--line);border-radius:11px}
.dashboard-need:hover{background:#fafafa;border-color:#d9dce1}
.dashboard-need strong{display:block;margin-bottom:2px}
.dashboard-need span{color:var(--muted);font-size:12px}
.dashboard-need span strong{display:inline;color:var(--text);font-size:12px}
.dashboard-more{border:0;background:transparent;color:var(--accent);font-weight:700;padding:10px 0 0;cursor:pointer}
.dashboard-lower-grid{display:grid;grid-template-columns:1.35fr 1fr;gap:16px}
.week-summary{display:grid;grid-template-columns:repeat(4,1fr);gap:8px}
.week-summary>div{padding:11px 10px;background:var(--surface);border-radius:11px}
.week-summary strong{display:block;font-size:20px}
.week-summary span{display:block;color:var(--muted);font-size:11px;margin-top:2px}
.birthday-list{display:flex;flex-direction:column;gap:7px}
.birthday-row{display:flex;justify-content:space-between;align-items:center;gap:12px;padding:9px 11px;background:var(--surface);border-radius:10px}
.birthday-row span{color:var(--muted);font-size:12px}

/* Groups: separate cards, more breathing room, visible members */
.groups-toolbar{display:flex;gap:9px;align-items:center;margin-bottom:13px}
.groups-list{display:flex;flex-direction:column;gap:13px}
.group-card-v3{background:var(--card);border:1px solid var(--line);border-radius:16px;padding:17px 18px;box-shadow:0 3px 14px rgba(30,35,45,.035);transition:transform .15s ease,box-shadow .15s ease,border-color .15s ease}
.group-card-v3:hover{transform:translateY(-1px);box-shadow:0 8px 24px rgba(30,35,45,.07);border-color:#d7d9dd}
.group-card-v3.pair-card{border-left:4px solid #48a868}
.group-card-v3.group-card-kind{border-left:4px solid #e58a3a}
.group-card-v3-head{display:flex;align-items:center;gap:12px}
.group-card-v3-title{flex:1;min-width:0}
.group-card-v3-title>strong{font-size:17px}
.group-card-v3-title .group-meta{display:flex;gap:7px;align-items:center;margin-top:7px}
.group-card-v3 .actions{margin-left:auto}
.group-card-v3-info{display:flex;align-items:center;gap:13px;margin-top:14px;padding-top:12px;border-top:1px solid var(--line)}
.group-card-v3-info>div:first-child{font-size:13px}
.group-card-v3-info>div:first-child strong{font-size:20px}
.group-card-v3-info>div:first-child span{color:var(--muted)}
.group-schedule{margin-left:auto;color:var(--muted);font-size:12px}
.group-members-preview{display:flex;gap:7px;flex-wrap:wrap;margin-top:12px}
.member-chip{border:1px solid var(--line);background:var(--surface);border-radius:999px;padding:6px 10px;font-size:12px;color:var(--text);cursor:pointer}
.member-chip:hover{border-color:#c9cdd3;background:#fff}
.group-open-btn{width:100%;display:flex;justify-content:space-between;align-items:center;margin-top:13px;padding:9px 0 0;border:0;border-top:1px solid var(--line);background:transparent;color:var(--accent);font-weight:700;cursor:pointer}

/* Finance: explicit visual sections instead of one continuous stack */
.finance-stats{margin-bottom:24px}
.finance-section{margin-top:22px}
.finance-section-head{display:flex;justify-content:space-between;align-items:flex-end;margin-bottom:10px;padding:0 2px}
.finance-section-kicker{font-size:10px;letter-spacing:.09em;font-weight:800;color:var(--muted);margin-bottom:4px}
.finance-history-card{background:var(--card);border:1px solid var(--line);border-radius:16px;padding:17px;box-shadow:var(--shadow)}
.finance-table-summary{display:flex;gap:22px;align-items:center;color:var(--muted);font-size:13px;margin-bottom:9px}
.finance-table-summary strong{color:var(--text)}
.finance-empty{min-height:100px;display:flex;flex-direction:column;justify-content:center;align-items:center;text-align:center;color:var(--muted);gap:5px}
.finance-empty strong{color:var(--text);font-size:14px}
.finance-empty span{font-size:12px}
.finance-archive-list{display:flex;flex-direction:column;gap:9px}
.finance-archive-section{margin-bottom:30px}
.finance-archive-section .archive-month{margin-bottom:0;border-radius:14px}
.finance-archive-section .archive-head{padding:15px 17px}
.finance-archive-section .archive-head strong{font-size:15px}
.finance-archive-section .archive-payments{background:#fbfbfc}

/* Student card: compact, clear information hierarchy */
.student-profile-grid{display:grid;grid-template-columns:1fr 1fr;gap:12px}
.student-card-section{padding:16px}
.student-contact-grid{display:grid;grid-template-columns:repeat(3,1fr);gap:8px;margin-top:11px}
.student-contact-grid>div,.student-finance-grid>div{padding:10px 11px;background:var(--surface);border-radius:10px}
.student-contact-grid span,.student-finance-grid span{display:block;color:var(--muted);font-size:11px;margin-bottom:4px}
.student-contact-grid strong,.student-contact-grid a{font-size:13px}
.student-learning{margin-top:10px;display:flex;flex-direction:column;gap:7px}
.student-group-link{display:flex;justify-content:space-between;align-items:center;gap:12px;width:100%;padding:10px 11px;border:1px solid var(--line);background:var(--surface);border-radius:10px;text-align:left;cursor:pointer}
.student-group-link:hover{background:#fff;border-color:#d4d7dc}
.student-group-link>span:last-child{font-size:11px;text-align:right}
.student-package-section{grid-column:1/-1}
.student-package-section .section-head{margin-bottom:8px}
.package-progress{height:7px;background:var(--surface-2);border-radius:999px;overflow:hidden;margin-top:13px}
.package-progress>div{height:100%;background:var(--green);border-radius:999px;transition:width .2s}
.student-finance-grid{display:grid;grid-template-columns:repeat(4,1fr);gap:8px;margin-top:11px}
.student-finance-grid strong{font-size:13px}
.student-finance-grid strong.negative{color:var(--red)}
.student-schedule-section{margin-top:12px;padding:15px 16px}
.student-schedule-display{margin-top:9px;padding:11px 12px;background:var(--surface);border-radius:10px;font-size:13px}
.student-modal-head{margin-bottom:12px}
.modal .student-profile-grid+.student-schedule-section{margin-bottom:2px}

@media(max-width:1000px){
 .dashboard-main-grid,.dashboard-lower-grid{grid-template-columns:1fr}
 .student-contact-grid{grid-template-columns:1fr 1fr}
 .student-finance-grid{grid-template-columns:1fr 1fr}
}
@media(max-width:700px){
 .groups-toolbar{flex-wrap:wrap}
 .group-card-v3-head{align-items:flex-start}
 .group-card-v3 .actions{flex-direction:column}
 .group-schedule{width:100%;margin-left:0}
 .group-card-v3-info{flex-wrap:wrap}
 .student-profile-grid{grid-template-columns:1fr}
 .student-package-section{grid-column:auto}
 .student-contact-grid,.student-finance-grid{grid-template-columns:1fr}
 .week-summary{grid-template-columns:1fr 1fr}
}

/* Dashboard: admin-first layout — no daily lesson feed */
.dashboard-main-grid{grid-template-columns:1fr}
.dashboard-attention .needs{display:grid;grid-template-columns:repeat(5,minmax(0,1fr));gap:8px}
.dashboard-attention .dashboard-need{min-height:66px}
@media(max-width:1100px){.dashboard-attention .needs{grid-template-columns:repeat(3,minmax(0,1fr))}}
@media(max-width:700px){.dashboard-attention .needs{grid-template-columns:1fr}}

/* Premium compact student profile */
.modal:has(.student-modal-head){
  width:min(820px,100%);
  max-height:84vh;
  padding:18px;
  border-radius:20px;
}
.modal:has(.student-modal-head) .student-modal-head{margin-bottom:8px}
.modal:has(.student-modal-head) .tabs{margin-bottom:10px}
.modal:has(.student-modal-head) .student-profile-grid{gap:10px}
.modal:has(.student-modal-head) .student-card-section{padding:13px 14px}
.modal:has(.student-modal-head) .student-contact-grid{margin-top:8px}
.modal:has(.student-modal-head) .student-contact-grid>div,
.modal:has(.student-modal-head) .student-finance-grid>div{padding:8px 9px}
.modal:has(.student-modal-head) .student-learning{margin-top:7px}
.modal:has(.student-modal-head) .student-group-link{padding:8px 10px}
.modal:has(.student-modal-head) .student-group-link>span:last-child{font-size:10px}
.modal:has(.student-modal-head) .student-package-section{padding:12px 14px}
.package-compact-head{display:flex;justify-content:space-between;align-items:center;gap:18px}
.package-compact-head .package-main{display:flex;align-items:baseline;gap:7px;min-width:auto;margin:0}
.package-compact-head .package-main strong{font-size:22px;line-height:1}
.package-compact-head .package-main span{font-size:11px;color:var(--muted)}
.modal:has(.student-modal-head) .package-progress{height:5px;margin-top:8px}
.modal:has(.student-modal-head) .package-details{display:grid;grid-template-columns:repeat(3,1fr);gap:7px;margin-top:8px}
.modal:has(.student-modal-head) .package-details>div{padding:6px 8px;background:var(--surface);border-radius:8px}
.modal:has(.student-modal-head) .package-details span{font-size:10px;margin-bottom:2px}
.modal:has(.student-modal-head) .package-details strong{font-size:12px}
.modal:has(.student-modal-head) .package-debt{margin-top:7px;padding:7px 9px;border-radius:8px;font-size:11px}
.modal:has(.student-modal-head) .student-finance-grid{margin-top:8px}
.modal:has(.student-modal-head) .student-schedule-section{margin-top:10px;padding:12px 14px}
.schedule-section-head{display:flex;justify-content:space-between;align-items:center;gap:12px}
.modal:has(.student-modal-head) .student-schedule-display{margin-top:7px;padding:8px 10px;font-size:12px}
@media(max-width:700px){
  .package-compact-head{align-items:flex-start}
  .modal:has(.student-modal-head) .package-details{grid-template-columns:1fr 1fr 1fr}
  .schedule-section-head{align-items:flex-start;flex-direction:column}
}


/* Premium Dashboard design */
.premium-dashboard{padding:4px 2px 34px}
.dash-header{display:flex;justify-content:space-between;align-items:flex-start;margin-bottom:25px}
.dash-title h1{margin:0;font-size:32px;line-height:1.08;letter-spacing:-.8px;color:#20242d}
.dash-title p{margin:6px 0 0;color:#7b8493;font-size:15px;text-transform:lowercase}
.dash-actions{display:flex;gap:10px}
.premium-btn{border:1px solid #e7e9ee;background:#fff;color:#20242d;border-radius:12px;padding:11px 16px;font-size:14px;font-weight:700;box-shadow:0 2px 8px rgba(28,35,48,.025);cursor:pointer;transition:.18s cubic-bezier(0.16, 1, 0.3, 1)}
.premium-btn:hover{border-color:#d6d9df;transform:translateY(-1px);box-shadow:0 4px 12px rgba(28,35,48,.06)}
.premium-btn.primary{background:#b35f48;border-color:#b35f48;color:#fff;box-shadow:0 5px 14px rgba(179,95,72,.18)}
.premium-btn.small{padding:6px 11px;font-size:12.5px;border-radius:9px}

/* Financial & Students Summary (Stretched Full-Width Rows) */
.dash-metrics-card {
  padding: 4px 14px;
  border-radius: 16px;
  margin-bottom: 12px;
  display: flex;
  flex-direction: column;
}
.dash-metric-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 9px 2px;
  border-bottom: 1px solid var(--line, #e2e8f0);
  cursor: pointer;
  transition: all 0.15s ease;
}
.dash-metric-row:last-child {
  border-bottom: none;
}
.dash-metric-row:hover {
  padding-left: 6px;
  padding-right: 6px;
  background: var(--surface, #f8fafc);
  border-radius: 9px;
}
body.dark-mode .dash-metric-row:hover {
  background: rgba(255, 255, 255, 0.04);
}

.dash-metric-left {
  display: flex;
  align-items: center;
  gap: 10px;
}
.dash-metric-icon {
  width: 32px;
  height: 32px;
  border-radius: 9px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 15px;
  background: var(--surface-2, #f1f3f5);
  flex-shrink: 0;
}
body.dark-mode .dash-metric-icon {
  background: rgba(255, 255, 255, 0.08);
}
.dash-metric-text {
  display: flex;
  flex-direction: column;
  gap: 1px;
}
.dash-metric-text strong {
  font-size: 13.5px;
  font-weight: 750;
  color: var(--text, #1e293b);
}
.dash-metric-text span {
  font-size: 11px;
  color: var(--muted, #64748b);
}

.dash-metric-right {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 2px;
  flex-shrink: 0;
}
.dash-metric-val {
  font-size: 16px;
  font-weight: 800;
  letter-spacing: -0.3px;
  color: var(--text, #1e293b);
  line-height: 1.1;
}
.dash-metric-val small {
  font-size: 11.5px;
  font-weight: 600;
  color: var(--muted);
}
.dash-metric-pill {
  font-size: 10px;
  font-weight: 700;
  padding: 1.5px 6px;
  border-radius: 999px;
}
.dash-metric-pill.green { background: rgba(34, 197, 94, 0.12); color: #16a34a; }
.dash-metric-pill.blue { background: rgba(59, 130, 246, 0.12); color: #2563eb; }
.dash-metric-pill.red { background: rgba(239, 68, 68, 0.12); color: #dc2626; }
.dash-metric-pill.terracotta { background: rgba(164, 91, 70, 0.12); color: #a45b46; }

body.dark-mode .dash-metric-pill.green { background: rgba(34, 197, 94, 0.2); color: #4ade80; }
body.dark-mode .dash-metric-pill.blue { background: rgba(59, 130, 246, 0.2); color: #60a5fa; }
body.dark-mode .dash-metric-pill.red { background: rgba(239, 68, 68, 0.2); color: #f87171; }
body.dark-mode .dash-metric-pill.terracotta { background: rgba(243, 139, 109, 0.2); color: #f38b6d; }

/* Finance Clickable KPI Rows */
.clickable-fin-row {
  cursor: pointer;
  border-radius: 9px;
  transition: all 0.15s ease;
}
.clickable-fin-row:hover {
  background: var(--surface-2, #f1f3f5);
}
.clickable-fin-row.active-fin {
  background: var(--surface-2, #eef2f6);
  border: 1px solid var(--accent, #a45b46);
  box-shadow: 0 0 0 1px var(--accent, #a45b46);
}
body.dark-mode .clickable-fin-row:hover {
  background: #1e2330;
}
body.dark-mode .clickable-fin-row.active-fin {
  background: #1d2230;
  border-color: var(--accent);
}

/* Students Compact Single-Row System */
.students-compact-container {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 8px;
  box-shadow: var(--shadow);
}
.students-compact-list {
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin-top: 6px;
}
.student-row-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 5px 8px;
  border-radius: 9px;
  background: var(--surface, #f8fafc);
  border: 1px solid var(--line, #e2e8f0);
  cursor: pointer;
  transition: all 0.15s ease;
  gap: 8px;
}
body.dark-mode .student-row-card {
  background: #141720;
  border-color: var(--line);
}
.student-row-card:hover {
  border-color: var(--accent);
  background: var(--card);
  transform: translateY(-1px);
}
.student-row-card.is-inactive {
  opacity: 0.6;
}
.src-left {
  display: flex;
  align-items: center;
  gap: 7px;
  flex: 1;
  min-width: 0;
}
.src-info {
  display: flex;
  flex-direction: column;
  gap: 1px;
  min-width: 0;
}
.src-name-row {
  display: flex;
  align-items: center;
  gap: 5px;
}
.src-name {
  font-size: 12.5px;
  font-weight: 750;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.src-sub {
  font-size: 10.5px;
  color: var(--muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.src-right {
  display: flex;
  align-items: center;
  gap: 5px;
  flex-shrink: 0;
}
.btn-icon-tg {
  width: 24px;
  height: 24px;
  border-radius: 6px;
  border: 1px solid var(--line);
  background: var(--card);
  font-size: 11px;
  display: grid;
  place-items: center;
  cursor: pointer;
  transition: all 0.15s;
  padding: 0;
}
.btn-icon-tg:hover {
  border-color: #0088cc;
  background: rgba(0, 136, 204, 0.1);
}

/* Groups Compact Single-Row System */
.groups-compact-container {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 8px;
  box-shadow: var(--shadow);
}
.groups-compact-list {
  display: flex;
  flex-direction: column;
  gap: 5px;
  margin-top: 6px;
}
.group-row-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 7px 10px;
  border-radius: 11px;
  background: var(--surface, #f8fafc);
  border: 1px solid var(--line, #e2e8f0);
  border-left: 4px solid var(--line);
  cursor: pointer;
  transition: all 0.15s ease;
  gap: 8px;
}
.group-row-item.theme-pair {
  border-left-color: #10b981;
  background: rgba(16, 185, 129, 0.04);
}
.group-row-item.theme-group {
  border-left-color: #f59e0b;
  background: rgba(245, 158, 11, 0.04);
}
body.dark-mode .group-row-item {
  background: #141720;
  border-color: var(--line);
}
body.dark-mode .group-row-item.theme-pair {
  background: rgba(16, 185, 129, 0.08);
  border-left-color: #34d399;
}
body.dark-mode .group-row-item.theme-group {
  background: rgba(245, 158, 11, 0.08);
  border-left-color: #fbbf24;
}
.group-row-item:hover {
  border-color: var(--accent);
  transform: translateY(-1px);
}
.gri-main-col {
  display: flex;
  flex-direction: column;
  gap: 3px;
  flex: 1;
  min-width: 0;
}
.gri-top-line {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}
.gh-icon-box.mini {
  width: 22px;
  height: 22px;
  border-radius: 6px;
  font-size: 11.5px;
  display: grid;
  place-items: center;
  flex-shrink: 0;
}
.gh-icon-box.mini.pair {
  background: rgba(16, 185, 129, 0.15);
  color: #059669;
}
.gh-icon-box.mini.group {
  background: rgba(245, 158, 11, 0.15);
  color: #d97706;
}
.gri-name {
  font-size: 13px;
  font-weight: 800;
  color: var(--text);
}
.gri-count-tag {
  font-size: 10px;
  color: var(--muted);
  font-weight: 600;
}
.gri-bottom-line {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}
.gri-sch {
  display: flex;
  align-items: center;
  gap: 3px;
  flex-wrap: wrap;
}
.gri-members-text {
  font-size: 10.5px;
  color: var(--muted);
  font-weight: 550;
}
.gri-actions {
  display: flex;
  align-items: center;
  gap: 4px;
  flex-shrink: 0;
}

/* Finances Format Breakdown */
.fin-fmt-progress-card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 10px 12px;
  margin-bottom: 10px;
}
.fin-fmt-bar {
  display: flex;
  height: 8px;
  border-radius: 999px;
  overflow: hidden;
  gap: 2px;
  background: var(--surface-2, #eef2f6);
}
.fin-fmt-seg.ind { background: #2563eb; }
.fin-fmt-seg.pair { background: #059669; }
.fin-fmt-seg.group { background: #d97706; }
.fin-fmt-legend {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 6px;
}
.fin-fmt-leg-item {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 10.5px;
  color: var(--muted);
  font-weight: 600;
}
.fin-leg-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
}
.fin-leg-dot.ind { background: #2563eb; }
.fin-leg-dot.pair { background: #059669; }
.fin-leg-dot.group { background: #d97706; }

.fin-fmt-rows-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.fin-fmt-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 7px 10px;
  border-radius: 10px;
  background: var(--surface, #f8fafc);
  border: 1px solid var(--line);
  gap: 8px;
}
body.dark-mode .fin-fmt-row {
  background: #141720;
}
.ffr-left {
  display: flex;
  align-items: center;
  gap: 8px;
  flex: 1;
  min-width: 0;
}
.ffr-titles {
  display: flex;
  flex-direction: column;
  gap: 1px;
  min-width: 0;
}
.ffr-name-row {
  display: flex;
  align-items: center;
  gap: 5px;
}
.ffr-name {
  font-size: 12.5px;
  font-weight: 750;
  color: var(--text);
}
.ffr-sub {
  font-size: 10.5px;
  color: var(--muted);
}
.ffr-right {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 1px;
  flex-shrink: 0;
}
.ffr-amount {
  font-size: 13px;
  font-weight: 800;
}
.ffr-pct-badge {
  font-size: 10px;
  color: var(--muted);
  font-weight: 600;
}

.premium-card{background:#fff;border:1px solid #e7e9ee;border-radius:18px;box-shadow:0 4px 18px rgba(28,35,48,.035);padding:21px}
.premium-card-head{display:flex;justify-content:space-between;align-items:flex-start;gap:15px}
.premium-card h2{font-size:18px;margin:0;line-height:1.25;color:#20242d}
.premium-sub{color:#7b8493;font-size:13.5px;margin-top:3px}

/* Symmetrical Lower 3-column Grid */
.premium-lower-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:18px;align-items:stretch}
.premium-attention-card,
.premium-week-summary-card,
.premium-birthdays-card{display:flex;flex-direction:column;height:100%;justify-content:flex-start}

.dash-attention-list{margin-top:14px;display:flex;flex-direction:column;gap:8px;flex:1}
.dash-attention-row{display:flex;justify-content:space-between;align-items:center;gap:10px;padding:8px 10px;border-radius:11px;background:#f8f9fa;border:1px solid #e7e9ee;transition:.15s}
.dash-attention-row:hover{background:#fff;border-color:#d6d9df;box-shadow:0 2px 8px rgba(0,0,0,0.03)}
.dash-attention-row.debt{border-color:#f7d2d2;background:#fffafa}
.dash-attention-row.expired{border-color:#fbe3c7;background:#fffdfa}
.dash-attention-row.low{border-color:#e5e8ed;background:#fbfcfd}
.dash-att-user{display:flex;align-items:center;gap:8px;cursor:pointer;min-width:0;flex:1}
.dash-att-user strong{display:block;font-size:13.5px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.dash-att-status{font-size:11.5px;display:block;font-weight:600}
.dash-att-status.debt{color:#dc3545}
.dash-att-status.expired{color:#d97706}
.dash-att-status.low{color:#6b7280}
.dash-att-btns{display:flex;gap:5px}

.dash-wl-day.is-today{border-color:#b35f48;background:rgba(179,95,72,.08);font-weight:700}
.dash-wl-day.is-today .dwl-name{color:#b35f48;font-weight:800}

.premium-week-stats{display:grid;grid-template-columns:repeat(2,1fr);gap:8px;margin-top:10px}
.premium-stat{border-radius:12px;padding:9px 8px;text-align:center}
.premium-stat strong{display:block;font-size:20px;margin-bottom:2px}
.premium-stat small{color:#697384;font-size:11.5px;white-space:nowrap}
.green-bg{background:#f3faf6}.orange-bg{background:#fff8ed}.blue-bg{background:#f3f7ff}.red-bg{background:#fff4f2}

.premium-birthday-list{min-height:130px;margin-top:14px;display:flex;flex-direction:column;gap:8px;flex:1}
.premium-birthday-row{display:flex;justify-content:space-between;align-items:center;gap:10px;padding:8px 10px;border-radius:11px;background:#f7f8fa;border:1px solid #e7e9ee;transition:.15s}
.premium-birthday-row:hover{background:#fff;border-color:#d6d9df;box-shadow:0 2px 8px rgba(0,0,0,0.03)}
.premium-birthday-row strong{font-size:13px}
.premium-birthday-row span{font-size:12px;color:#7b8493}
.premium-birthday-empty{min-height:125px;display:grid;place-items:center;text-align:center;color:#7b8493;font-size:13.5px;padding:15px}

.premium-empty-notice{margin-top:14px;border:1px solid #dceee4;background:#f5fbf7;border-radius:12px;padding:14px 16px;display:flex;gap:12px;align-items:center}
.premium-check{width:32px;height:32px;border-radius:50%;background:#e4f5eb;color:#2e9b68;display:grid;place-items:center;font-weight:800;flex:0 0 32px}
.premium-empty-notice strong{display:block;color:#21724c;font-size:14px}
.premium-empty-notice small{font-size:12.5px;color:#7b8493}

@media(max-width:1150px){.premium-kpis{grid-template-columns:repeat(2,1fr)}.premium-lower-grid{grid-template-columns:1fr 1fr}.premium-birthdays-card{grid-column:span 2}}
@media(max-width:768px){.dash-header{flex-direction:column;gap:16px}.dash-actions{width:100%}.dash-actions .premium-btn{flex:1}.premium-lower-grid{grid-template-columns:1fr}.premium-birthdays-card{grid-column:auto}}
@media(max-width:500px){.premium-kpis{grid-template-columns:1fr}}

/* Student profile 2x2 information grid */
.modal:has(.student-modal-head) .student-profile-grid{
  grid-template-columns:repeat(2,minmax(0,1fr));
  grid-auto-rows:1fr;
  align-items:stretch;
}
.modal:has(.student-modal-head) .student-card-section{
  height:100%;
  min-height:156px;
  display:flex;
  flex-direction:column;
}
.modal:has(.student-modal-head) .student-package-section{grid-column:auto}
.student-schedule-mini{
  margin-top:9px;
  padding:9px 10px;
  background:var(--surface);
  border-radius:10px;
  font-size:12px;
  line-height:1.45;
  flex:1;
}
.schedule-edit-inline{margin-top:8px;align-self:flex-start}
.modal:has(.student-modal-head) .student-contact-grid{
  grid-template-columns:1fr;
}
.modal:has(.student-modal-head) .student-finance-grid{
  grid-template-columns:1fr 1fr;
}
.modal:has(.student-modal-head) .package-compact-head{margin-bottom:1px}
@media(max-width:700px){
  .modal:has(.student-modal-head) .student-profile-grid{grid-template-columns:1fr}
  .modal:has(.student-modal-head) .student-card-section{min-height:0}
}

/* 14.54 — refined compact 2×2 student overview */
.modal:has(.student-modal-head){
  width:min(850px,100%);
  max-height:88vh;
  padding:18px 20px;
}
.modal:has(.student-modal-head) .student-profile-grid{
  grid-template-columns:repeat(2,minmax(0,1fr));
  grid-template-rows:repeat(2,minmax(0,150px));
  grid-auto-rows:auto;
  gap:10px;
  align-items:stretch;
}
.modal:has(.student-modal-head) .student-card-section{
  min-height:0;
  height:150px;
  padding:12px 14px;
  overflow:hidden;
}
.modal:has(.student-modal-head) .student-contact-grid{
  grid-template-columns:1fr 1fr;
  gap:7px;
  margin-top:8px;
}
.modal:has(.student-modal-head) .student-contact-grid>div.contact-box-phone,
.modal:has(.student-modal-head) .student-contact-grid>div:first-child{
  grid-column:1 / -1;
  padding:6px 10px;
}
.modal:has(.student-modal-head) .student-contact-grid>div,
.modal:has(.student-modal-head) .student-finance-grid>div{
  padding:6px 9px;
  min-width:0;
  overflow:hidden;
}
.modal:has(.student-modal-head) .student-contact-grid strong,
.modal:has(.student-modal-head) .student-contact-grid a,
.modal:has(.student-modal-head) .student-finance-grid strong{
  display:block;
  overflow:hidden;
  text-overflow:ellipsis;
  white-space:nowrap;
  font-size:12.5px;
}
.modal:has(.student-modal-head) .student-schedule-mini{
  flex:0 0 auto;
  height:48px;
  margin-top:8px;
  padding:8px 10px;
  display:flex;
  align-items:center;
  background:var(--surface);
  border-radius:9px;
  font-size:12px;
  line-height:1.35;
  overflow:auto;
}
.modal:has(.student-modal-head) .schedule-edit-inline{margin-top:7px}
.modal:has(.student-modal-head) .student-package-section{
  grid-column:auto;
}
.modal:has(.student-modal-head) .package-compact-head{margin-bottom:0}
.modal:has(.student-modal-head) .package-compact-head .muted{font-size:12px}
.modal:has(.student-modal-head) .package-progress{height:5px;margin-top:7px}
.modal:has(.student-modal-head) .package-details{margin-top:7px;gap:6px}
.modal:has(.student-modal-head) .package-details>div{padding:6px 8px}
.modal:has(.student-modal-head) .package-debt{margin-top:6px;padding:6px 9px}
.modal:has(.student-modal-head) .student-finance-grid{margin-top:8px;gap:7px}
@media(max-width:700px){
  .modal:has(.student-modal-head) .student-profile-grid{grid-template-columns:1fr;grid-template-rows:none}
  .modal:has(.student-modal-head) .student-card-section{height:auto;min-height:0}
  .modal:has(.student-modal-head) .student-contact-grid{grid-template-columns:1fr 1fr}
}

/* 14.57 — unified lesson type colors */
.schedule-filters .filter-pill.type-individual{background:rgba(91,141,239,.12);color:#4f7cff;border-color:rgba(91,141,239,.28)}
.schedule-filters .filter-pill.type-pair{background:rgba(72,168,104,.12);color:#2f8d59;border-color:rgba(72,168,104,.28)}
.schedule-filters .filter-pill.type-group{background:rgba(229,138,58,.13);color:#c87422;border-color:rgba(229,138,58,.28)}
.schedule-filters .filter-pill.type-individual.active{background:rgba(91,141,239,.22);border-color:#5b8def}
.schedule-filters .filter-pill.type-pair.active{background:rgba(72,168,104,.22);border-color:#48a868}
.schedule-filters .filter-pill.type-group.active{background:rgba(229,138,58,.23);border-color:#e58a3a}

.cal-lesson.type-individual{background:rgba(91,141,239,.10);border-left-color:#5b8def;color:var(--text)}
.cal-lesson.type-pair{background:rgba(72,168,104,.10);border-left-color:#48a868;color:var(--text)}
.cal-lesson.type-group{background:rgba(229,138,58,.11);border-left-color:#e58a3a;color:var(--text)}
.cal-lesson.type-individual strong,.cal-lesson.type-pair strong,.cal-lesson.type-group strong{color:var(--text)}
.cal-lesson.status-completed.type-individual{background:rgba(91,141,239,.15)!important;border-left-color:#5b8def!important;box-shadow:inset 0 0 0 1px rgba(91,141,239,.16)!important;color:var(--text)!important}
.cal-lesson.status-completed.type-pair{background:rgba(72,168,104,.15)!important;border-left-color:#48a868!important;box-shadow:inset 0 0 0 1px rgba(72,168,104,.16)!important;color:var(--text)!important}
.cal-lesson.status-completed.type-group{background:rgba(229,138,58,.16)!important;border-left-color:#e58a3a!important;box-shadow:inset 0 0 0 1px rgba(229,138,58,.17)!important;color:var(--text)!important}
.cal-lesson.status-completed::after{color:#2f9e5b!important}
.cal-lesson.status-completed .lesson-type-dot{display:none}
.cal-lesson.moved,.cal-lesson.cancelled,.cal-lesson.no-show{color:var(--text)!important}
.cal-lesson.moved.type-individual,.cal-lesson.cancelled.type-individual,.cal-lesson.no-show.type-individual{background:rgba(91,141,239,.07)!important;border-left-color:#5b8def!important}
.cal-lesson.moved.type-pair,.cal-lesson.cancelled.type-pair,.cal-lesson.no-show.type-pair{background:rgba(72,168,104,.07)!important;border-left-color:#48a868!important}
.cal-lesson.moved.type-group,.cal-lesson.cancelled.type-group,.cal-lesson.no-show.type-group{background:rgba(229,138,58,.08)!important;border-left-color:#e58a3a!important}

/* Same semantic colors in compact format markers elsewhere in the CRM */
.format-badge.individual{color:#4f7cff;background:rgba(91,141,239,.12)}
.format-badge.pair{color:#2f8d59;background:rgba(72,168,104,.12)}
.format-badge.group{color:#c87422;background:rgba(229,138,58,.13)}

/* Groups page: no redundant KPI strip */
.groups-toolbar{margin-top:0}

/* VocaCRM 14.58 status visual system */
.schedule-item.status-completed,
.lesson-card.status-completed {
  
  opacity: 1;
  position: relative;
}
.schedule-item.status-completed::after,
.lesson-card.status-completed::after {
  content: "✓";
  position: absolute;
  top: 8px;
  right: 10px;
  font-weight: 800;
}

.schedule-item.status-cancelled-charged,
.lesson-card.status-cancelled-charged {
  background: #fff1f1 !important;
  border-color: #efb5b5 !important;
  color: #a83232;
  position: relative;
}
.schedule-item.status-cancelled-charged::after,
.lesson-card.status-cancelled-charged::after {
  content: "✕";
  position: absolute;
  top: 8px;
  right: 10px;
  color: #c53d3d;
  font-weight: 800;
}

.schedule-item.status-cancelled-free,
.lesson-card.status-cancelled-free {
  
  opacity: .48;
  position: relative;
}
.schedule-item.status-cancelled-free::after,
.lesson-card.status-cancelled-free::after {
  content: "✕";
  position: absolute;
  top: 8px;
  right: 10px;
  color: #8b919b;
  font-weight: 800;
}

.schedule-item.status-rescheduled,
.lesson-card.status-rescheduled {
  opacity: .58;
  position: relative;
}
.schedule-item.status-rescheduled::after,
.lesson-card.status-rescheduled::after {
  content: "↻";
  position: absolute;
  top: 8px;
  right: 10px;
  color: #737b88;
  font-weight: 800;
}

/* Preserve the lesson-type color as a slim identity stripe. */
.schedule-item.type-individual::before,
.schedule-item.type-pair::before,
.schedule-item.type-group::before,
.lesson-card.type-individual::before,
.lesson-card.type-pair::before,
.lesson-card.type-group::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 4px;
  border-radius: inherit;
}
.schedule-item.type-individual::before,
.lesson-card.type-individual::before { background: #3979d7; }
.schedule-item.type-pair::before,
.lesson-card.type-pair::before { background: #2e9b68; }
.schedule-item.type-group::before,
.lesson-card.type-group::before { background: #e58a22; }

/* VocaCRM 14.59 status hierarchy */
.schedule-item.status-completed,
.lesson-card.status-completed {
  opacity: 1;
  
}
.schedule-item.status-completed::after,
.lesson-card.status-completed::after {
  content: "✓";
}

.schedule-item.status-rescheduled,
.lesson-card.status-rescheduled,
.schedule-item.status-cancelled-free,
.lesson-card.status-cancelled-free {
  opacity: .48;
  
}
.schedule-item.status-rescheduled::after,
.lesson-card.status-rescheduled::after {
  content: "↻";
  color: #737b88;
}
.schedule-item.status-cancelled-free::after,
.lesson-card.status-cancelled-free::after {
  content: "✕";
  color: #8b919b;
}

/* Financially sensitive cancellation: intentionally red and unmistakable. */
.schedule-item.status-cancelled-charged,
.lesson-card.status-cancelled-charged {
  opacity: 1;
  filter: none;
  background: #fff0f0 !important;
  border-color: #e6a5a5 !important;
  color: #a52f2f !important;
}
.schedule-item.status-cancelled-charged::after,
.lesson-card.status-cancelled-charged::after {
  content: "✕";
  color: #c53232;
}

/* Type remains visible through the left identity stripe. */
.schedule-item.type-individual::before,
.lesson-card.type-individual::before { background:#3979d7; }
.schedule-item.type-pair::before,
.lesson-card.type-pair::before { background:#2e9b68; }
.schedule-item.type-group::before,
.lesson-card.type-group::before { background:#e58a22; }

/* VocaCRM 14.60 — final schedule status visuals */
.cal-lesson.status-completed{
  opacity:1!important;
  filter:none!important;
  position:relative;
}
.cal-lesson.status-completed::after{
  content:'✓';
  position:absolute;
  right:8px;
  top:7px;
  font-weight:800;
  color:#2f9e5b;
}

/* Rescheduled: muted + ↻ */
.cal-lesson.status-rescheduled{
  opacity:.45!important;
  
  background:#f1f2f4!important;
  border-left-color:#9aa1aa!important;
  color:#777d86!important;
  position:relative;
}
.cal-lesson.status-rescheduled::after{
  content:'↻';
  position:absolute;
  right:8px;
  top:7px;
  font-weight:800;
  color:#858c96;
}

/* Cancelled without deduction: muted + ✕ */
.cal-lesson.status-cancelled-free{
  opacity:.42!important;
  
  background:#f1f2f4!important;
  border-left-color:#9aa1aa!important;
  color:#777d86!important;
  position:relative;
}
.cal-lesson.status-cancelled-free::after{
  content:'✕';
  position:absolute;
  right:8px;
  top:7px;
  font-weight:800;
  color:#858c96;
}

/* Cancelled with deduction: red = financially important */
.cal-lesson.status-cancelled-charged{
  opacity:1!important;
  filter:none!important;
  background:rgba(210,70,70,.12)!important;
  border-left-color:#d24747!important;
  color:#3b2a2a!important;
  box-shadow:inset 0 0 0 1px rgba(210,70,70,.18)!important;
  position:relative;
}
.cal-lesson.status-cancelled-charged::after{
  content:'✕';
  position:absolute;
  right:8px;
  top:7px;
  font-weight:900;
  color:#d24747;
}

.cal-lesson.status-no-show{
  background:rgba(210,70,70,.10)!important;
  border-left-color:#d24747!important;
  position:relative;
}
.cal-lesson.status-no-show::after{
  content:'!';
  position:absolute;
  right:9px;
  top:7px;
  font-weight:900;
  color:#d24747;
}

/* Student lesson history — compact, calm, status aligned to the right. */
.student-history-list .history-lesson{
  grid-template-columns:95px 1fr;
  align-items:center;
  min-height:64px;
  transition:.15s ease;
  background:#fff;
  border-color:var(--line);
  position:relative;
  overflow:hidden;
}
.student-history-list .history-lesson::after{
  content:"";
  position:absolute;
  right:0;
  top:0;
  bottom:0;
  width:3px;
  background:#dfe2e5;
}
.student-history-list .history-main{
  min-width:0;
  text-align:right;
  padding-right:14px;
}
.student-history-list .history-status-line{
  display:flex;
  align-items:center;
  justify-content:flex-end;
  gap:7px;
  font-weight:700;
  font-size:13px;
}
.student-history-list .history-status{font-weight:700;font-size:13px;color:var(--text)}
.student-history-list .history-reason{
  margin-top:4px;
  color:var(--muted);
  font-size:12px;
  line-height:1.35;
}
.student-history-list .history-completed{background:#fff;border-color:var(--line)}
.student-history-list .history-completed::after{background:#54a879}
.student-history-list .history-completed .history-status{color:var(--green)}
.student-history-list .history-muted{background:#f7f8f9;border-color:#e1e3e6;opacity:.78}
.student-history-list .history-muted::after{background:#cfd3d7}
.student-history-list .history-muted .history-status{color:#7c8288}
.student-history-list .history-charged{background:var(--red-soft);border-color:#efcaca}
.student-history-list .history-charged::after{background:#d24747}
.student-history-list .history-charged .history-status{color:var(--red)}
.student-history-list .history-charged .history-reason{color:#9f5555}
.student-history-list .history-flag{
  width:18px;height:18px;
  display:inline-flex;
  align-items:center;justify-content:center;
  border-radius:50%;
  background:#e1e4e7;
  color:#777d83;
  font-size:13px;
  line-height:1;
  font-weight:900;
}
.student-history-list .history-completed .history-flag{
  background:rgba(47,158,91,.12);
  color:#2f9e5b;
  font-size:10px;
}
.student-history-list .history-charged .history-flag{
  background:#d24747;
  color:#fff;
  font-size:10px;
  box-shadow:0 0 0 3px rgba(210,71,71,.10);
}
.student-history-list .time{font-weight:700;line-height:1.25}

/* 14.73 — polished weekly schedule editor */
.schedule-modal-head{margin-bottom:14px}
.schedule-hint{display:flex;align-items:center;gap:11px;padding:11px 13px;margin-bottom:12px;background:var(--surface,#f7f7f8);border:1px solid var(--line);border-radius:12px;color:var(--text)}
.schedule-hint-icon{width:28px;height:28px;display:grid;place-items:center;border-radius:8px;background:var(--accent-soft);color:var(--accent);font-weight:800;font-size:16px;flex:none}
.schedule-hint div{display:flex;flex-direction:column;gap:1px}
.schedule-hint strong{font-size:12px}
.schedule-hint span:not(.schedule-hint-icon){font-size:11px;color:var(--muted)}
.schedule-editor{border:1px solid var(--line);border-radius:14px;overflow:hidden;background:#fff}
.schedule-row{display:grid;grid-template-columns:155px minmax(180px,1fr) 40px;gap:14px;align-items:center;padding:12px 13px;border-bottom:1px solid var(--line);min-height:62px;transition:background .15s ease}
.schedule-row:last-child{border-bottom:0}
.schedule-row:hover{background:#faf9f8}
.schedule-day{display:flex;align-items:center;gap:9px}
.schedule-day strong{font-size:14px;line-height:1.15}
.schedule-day span{display:inline-flex;align-items:center;padding:4px 7px;border-radius:999px;background:var(--surface,#f7f7f8);color:var(--muted);font-size:10px;font-weight:600;white-space:nowrap}
.schedule-time{position:relative;max-width:360px}
.schedule-time input{width:100%;height:40px;box-sizing:border-box;padding:0 40px 0 12px;border:1px solid var(--line);border-radius:10px;background:#fff;color:var(--text);font:600 14px system-ui;outline:none;transition:border-color .15s,box-shadow .15s,background .15s}
.schedule-time input:focus{border-color:var(--accent);box-shadow:0 0 0 3px var(--accent-soft);background:#fff}
.schedule-time-icon{position:absolute;right:11px;top:50%;transform:translateY(-50%);color:var(--muted);font-size:18px;pointer-events:none}
.schedule-clear{width:34px;height:34px;border:1px solid #ead7d3;border-radius:9px;background:#fff;color:#c55b4c;font-size:18px;line-height:1;cursor:pointer;transition:background .15s,border-color .15s,color .15s}
.schedule-clear:hover{background:#fff3f1;border-color:#e3b7af;color:#a94235}
.schedule-modal-head + .schedule-hint + .schedule-editor + .modal-actions{margin-top:14px}
@media(max-width:700px){.schedule-row{grid-template-columns:1fr 42px;gap:8px}.schedule-day{grid-column:1/-1}.schedule-time{grid-column:1}.schedule-clear{grid-column:2;grid-row:2}.schedule-row{padding:11px}.schedule-time{max-width:none}}

/* 14.73+ — compact weekly time-grid calendar */
.schedule-toolbar{display:flex;justify-content:space-between;align-items:center;gap:12px;margin:12px 0 10px;flex-wrap:wrap}
.schedule-view-toggle{display:flex;padding:3px;background:#f0f1f3;border:1px solid var(--line);border-radius:10px}
.schedule-view{border:0;background:transparent;color:var(--muted);padding:7px 13px;border-radius:8px;font-size:13px;font-weight:650}
.schedule-view.active{background:#fff;color:var(--text);box-shadow:0 1px 4px rgba(20,25,30,.08)}
.schedule-hint-bar{display:flex;align-items:center;gap:8px;padding:9px 12px;margin-bottom:12px;background:#fff;border:1px solid var(--line);border-radius:11px;color:var(--muted);font-size:12px}
.free-dot{width:8px;height:8px;border-radius:50%;background:#68ad83;box-shadow:0 0 0 3px #eaf5ee;flex:none}
.schedule-hours{margin-left:auto;font-weight:650;color:#5f6670}
.schedule-grid{display:grid;grid-template-columns:58px 1fr;background:#fff;border:1px solid var(--line);border-radius:15px;overflow:auto;box-shadow:var(--shadow)}
.time-axis{position:relative;background:#fafafa;border-right:1px solid var(--line);height:997px;box-sizing:border-box}
.time-axis-label{position:absolute;right:9px;color:#8a919a;font-size:10px;line-height:1;transform:translateY(0)}
.schedule-grid .time-axis-label:first-child{top:55px!important}
.schedule-days{display:grid;grid-template-columns:repeat(7,minmax(120px,1fr));min-width:840px}
.schedule-grid .schedule-day{display:block;border-right:1px solid var(--line);align-items:initial;gap:0}
.schedule-grid .schedule-day:last-child{border-right:0}
.schedule-day-head{height:47px;box-sizing:border-box;padding:8px 9px;border-bottom:1px solid var(--line);display:flex;justify-content:space-between;align-items:center;background:#fff;position:sticky;top:0;z-index:5}
.schedule-day-head div{display:flex;align-items:baseline;gap:7px}
.schedule-day-head strong{font-size:12px}
.schedule-day-head span{display:inline-flex;align-items:center;padding:0;background:transparent;color:var(--muted);font-size:11px;font-weight:600;white-space:nowrap}
.schedule-day-head em{font-style:normal;font-size:9px;color:var(--accent);font-weight:700}
.schedule-day.is-today .schedule-day-head{background:var(--accent-soft)}
.schedule-day-body{position:relative;background:repeating-linear-gradient(to bottom,#fff 0,#fff 37px,#eef0f2 37px,#eef0f2 38px)}
.time-slot{height:38px;border-bottom:0;cursor:pointer;position:relative}
.time-slot:hover{background:rgba(164,91,70,.035)}
.schedule-item{position:absolute;left:4px;right:4px;z-index:2;border-radius:8px;padding:6px 7px;overflow:hidden;cursor:pointer;border-left:3px solid;box-shadow:0 2px 7px rgba(20,25,30,.06);transition:transform .12s,box-shadow .12s}
.schedule-item:hover{transform:translateY(-1px);box-shadow:0 5px 12px rgba(20,25,30,.10)}
.schedule-item.type-individual{background:rgba(91,141,239,.10);border-left-color:#5b8def}
.schedule-item.type-pair{background:rgba(72,168,104,.10);border-left-color:#48a868}
.schedule-item.type-group{background:rgba(229,138,58,.11);border-left-color:#e58a3a}
.schedule-item-time{font-size:10px;font-weight:800;color:#4e5661}
.schedule-item-name{font-size:12px;font-weight:700;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;margin-top:2px}
.schedule-item-meta{font-size:9px;color:#7d858f;margin-top:2px}
.schedule-item.is-overlap-item{box-shadow:0 3px 10px rgba(0,0,0,.12);border:1px solid rgba(234,88,12,.35)}
.sch-card-conflict{font-size:11px;line-height:1;display:inline-flex;align-items:center;margin-right:2px}

@media(max-width:900px){.schedule-grid{grid-template-columns:52px 1fr}.schedule-days{min-width:760px}.schedule-hint-bar{flex-wrap:wrap}.schedule-hours{margin-left:0}}

/* Dashboard: compact today schedule */
.premium-today-lessons{margin-bottom:18px}
.today-lessons-list{display:flex;flex-direction:column;gap:8px}
.today-lesson-row{width:100%;display:grid;grid-template-columns:76px minmax(0,1fr) auto 24px;gap:14px;align-items:center;text-align:left;border:1px solid var(--line);background:#fff;border-radius:12px;padding:11px 13px;transition:background .15s,border-color .15s,transform .15s}
.today-lesson-row:hover{background:#faf8f7;border-color:#dcc8c1;transform:translateY(-1px)}
.today-lesson-time{font-weight:750;font-size:15px;color:var(--text)}
.today-lesson-main{display:flex;flex-direction:column;gap:3px;min-width:0}
.today-lesson-main strong{font-size:14px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.today-lesson-main span{font-size:12px;color:var(--muted)}
.today-lesson-status{justify-self:end}
.today-lesson-arrow{color:var(--muted);font-size:16px}
@media(max-width:700px){.today-lesson-row{grid-template-columns:64px minmax(0,1fr) 20px}.today-lesson-status{display:none}}

/* 14.73 — standard weekly schedule: 7 day columns + separate expanded calendar */
.standard-schedule-grid{display:grid;grid-template-columns:repeat(7,minmax(150px,1fr));gap:10px;align-items:stretch;overflow-x:auto;padding-bottom:2px}
.standard-schedule-day{background:#fff;border:1px solid var(--line);border-radius:14px;overflow:hidden;box-shadow:var(--shadow);min-width:150px}
.standard-schedule-day.today{border-color:#dfc7bf;box-shadow:0 4px 18px rgba(164,91,70,.08)}
.standard-schedule-day-head{display:flex;justify-content:space-between;align-items:flex-start;min-height:58px;padding:11px 12px;background:#faf9f8;border-bottom:1px solid var(--line)}
.standard-schedule-day.today .standard-schedule-day-head{background:var(--accent-soft)}
.standard-schedule-day-head>div{display:flex;flex-direction:column;gap:3px}
.standard-schedule-day-head strong{font-size:14px}
.standard-schedule-day-head span{font-size:11px;color:var(--muted);font-weight:600}
.standard-schedule-day-head em{font-style:normal;font-size:10px;color:var(--accent);font-weight:750;white-space:nowrap}
.standard-schedule-list{display:flex;flex-direction:column;min-height:120px}
.standard-schedule-row{width:100%;display:flex;flex-direction:column;align-items:stretch;text-align:left;border:0;border-bottom:1px solid var(--line);background:#fff;padding:10px 11px;cursor:pointer;transition:background .15s;gap:5px}
.standard-schedule-row:last-child{border-bottom:0}
.standard-schedule-row:hover{background:#faf8f7}
.standard-schedule-time{font-size:14px;font-weight:800;line-height:1.1}
.standard-schedule-main{display:flex;flex-direction:column;gap:3px;min-width:0}
.standard-schedule-main strong{font-size:12px;line-height:1.25;white-space:normal;overflow-wrap:anywhere}
.standard-schedule-main span{font-size:10px;color:var(--muted);line-height:1.25}
.standard-schedule-status{align-self:flex-start;margin-top:2px}
.standard-schedule-status .badge{font-size:9px;padding:3px 6px}
.standard-schedule-arrow{display:none}
.standard-schedule-empty{padding:18px 10px;color:var(--muted);font-size:11px;text-align:center}
.schedule-slot{position:absolute;left:0;right:0;border:0;background:transparent;cursor:pointer;z-index:1;padding:0}
.schedule-slot:hover{background:rgba(164,91,70,.045)}
.time-label{height:38px;box-sizing:border-box;padding:5px 7px 0 0;text-align:right;color:#8a919a;font-size:10px;line-height:1}
@media(max-width:1100px){
 .standard-schedule-grid{grid-template-columns:repeat(7,150px)}
}

/* Standard schedule — same lesson-type colors and filters as expanded schedule */
.standard-schedule-toolbar{margin:0 0 12px;padding:0;background:transparent;border:0;box-shadow:none}
.standard-schedule-row.type-individual{background:rgba(91,141,239,.075);border-left:4px solid #5b8def}
.standard-schedule-row.type-pair{background:rgba(72,168,104,.075);border-left:4px solid #48a868}
.standard-schedule-row.type-group{background:rgba(229,138,58,.08);border-left:4px solid #e58a3a}
.standard-schedule-row.type-individual:hover{background:rgba(91,141,239,.13)}
.standard-schedule-row.type-pair:hover{background:rgba(72,168,104,.13)}
.standard-schedule-row.type-group:hover{background:rgba(229,138,58,.14)}
.standard-schedule-row.type-individual .standard-schedule-time{color:#4f7cff}
.standard-schedule-row.type-pair .standard-schedule-time{color:#2f8d59}
.standard-schedule-row.type-group .standard-schedule-time{color:#c87422}

/* 14.73 compact schedule polish — type is communicated by color, not repeated text */
.standard-schedule-toolbar{display:flex;align-items:center;justify-content:space-between;gap:14px;flex-wrap:wrap}
.schedule-legend{display:flex;align-items:center;gap:12px;color:var(--muted);font-size:11px;font-weight:650;white-space:nowrap}
.schedule-legend span{display:inline-flex;align-items:center;gap:5px}
.legend-dot{width:7px;height:7px;border-radius:50%;display:inline-block}
.legend-dot.individual{background:#5b8def}.legend-dot.pair{background:#48a868}.legend-dot.group{background:#e58a3a}
.standard-schedule-row{position:relative;display:grid;grid-template-columns:48px minmax(0,1fr) auto;align-items:center;gap:8px;padding:9px 10px;min-height:49px}
.standard-schedule-time{font-size:13px;font-weight:800}
.standard-schedule-main{min-width:0}
.standard-schedule-main strong{display:block;font-size:12px;line-height:1.25;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.standard-schedule-status{margin:0;align-self:center}
.standard-schedule-status .badge{font-size:8px;padding:2px 5px;line-height:1.15}
.standard-schedule-arrow{display:none}
.standard-schedule-row.type-individual,.standard-schedule-row.type-pair,.standard-schedule-row.type-group{border-left-width:3px}
.schedule-item-meta{display:none}
.schedule-item-name{font-size:12px;font-weight:700;line-height:1.2}
.schedule-item-time{font-size:10px;font-weight:800;margin-bottom:2px}
@media(max-width:900px){.schedule-legend{width:100%;overflow:auto}.standard-schedule-toolbar{align-items:flex-start}.standard-schedule-grid{grid-template-columns:repeat(7,145px)}}

/* Compact standard schedule — keep lesson type color and restore the familiar status indicator. */
.standard-schedule-row{position:relative}
.standard-schedule-row::after{content:none!important;display:none!important}
.standard-schedule-row .debt-mini-icon{display:inline-flex;align-items:center;justify-content:center;width:14px;height:14px;margin-left:3px;border-radius:50%;font-size:9px;line-height:1;font-weight:900;color:#c53232;background:rgba(197,50,50,.10);vertical-align:1px}
.standard-schedule-row.status-completed .debt-mini-icon{color:#c53232;background:rgba(197,50,50,.10)}
.standard-schedule-row.status-rescheduled::after{content:none!important;display:none!important}
.standard-schedule-row.status-cancelled-free{opacity:.48;filter:grayscale(.25)}
.standard-schedule-row.status-cancelled-free::after{content:none!important;display:none!important}
.standard-schedule-row.status-cancelled-charged{background:#fff0f0!important;border-left-color:#d24747!important;color:#a52f2f}
.standard-schedule-row.status-cancelled-charged::after{content:none!important;display:none!important}
.standard-schedule-row.status-no-show{background:#fff0f0!important;border-left-color:#d24747!important;color:#a52f2f}
.standard-schedule-row.status-no-show::after{content:'×';font-size:14px;color:#c53232}
.standard-schedule-row.status-completed .standard-schedule-time{filter:saturate(.72)}
.standard-schedule-row.status-rescheduled .standard-schedule-time{color:#737b88!important}
.standard-schedule-row.status-cancelled-free .standard-schedule-time{color:#737b88!important}
.standard-schedule-row.status-cancelled-charged .standard-schedule-time,
.standard-schedule-row.status-no-show .standard-schedule-time{color:#c53232!important}


/* ==========================================================================
   MOBILE EXPANDED SCHEDULE (Scoped strictly to mobile <= 768px)
   ========================================================================== */
@media (max-width: 768px) {
  :root {
    --calendar-head-h: 40px;
    --calendar-hour-h: 38px;
    --calendar-hours: 14;
    --calendar-body-h: 532px;
    --calendar-total-h: 572px;
  }
  .schedule-grid {
    display: grid !important;
    grid-template-columns: 52px 1fr !important;
    width: 100% !important;
    box-sizing: border-box !important;
    overflow: hidden !important;
    background: #fff !important;
    border: 1px solid #d9dee4 !important;
    border-radius: 14px !important;
  }
  .time-axis {
    position: relative !important;
    display: grid !important;
    grid-template-rows: var(--calendar-head-h) repeat(var(--calendar-hours), var(--calendar-hour-h)) !important;
    height: var(--calendar-total-h) !important;
    min-height: var(--calendar-total-h) !important;
    box-sizing: border-box !important;
    background: #fafbfc !important;
    border-right: 1px solid #d9dee4 !important;
  }
  .time-axis-head {
    height: var(--calendar-head-h) !important;
    display: flex !important;
    align-items: center !important;
    justify-content: flex-end !important;
    padding: 0 6px 0 0 !important;
    border-bottom: 1px solid #d5dbe1 !important;
    color: #69727d !important;
    font-size: 10px !important;
    font-weight: 750 !important;
  }
  .time-axis .time-label {
    position: relative !important;
    height: var(--calendar-hour-h) !important;
    min-height: var(--calendar-hour-h) !important;
    display: flex !important;
    align-items: flex-start !important;
    justify-content: flex-end !important;
    padding: 2px 6px 0 0 !important;
    font-size: 10px !important;
    font-weight: 700 !important;
    color: #69727d !important;
    line-height: 12px !important;
  }
  .schedule-days {
    display: flex !important;
    flex-direction: column !important;
    width: 100% !important;
    height: auto !important;
  }
  .schedule-grid .schedule-day {
    display: none !important;
    width: 100% !important;
    height: auto !important;
    margin: 0 !important;
    border: 0 !important;
  }
  .schedule-grid .schedule-day.is-selected-day {
    display: flex !important;
    flex-direction: column !important;
  }
  .schedule-day-head {
    height: var(--calendar-head-h) !important;
    min-height: var(--calendar-head-h) !important;
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    padding: 0 10px !important;
    border-bottom: 1px solid #d5dbe1 !important;
    background: #fff !important;
  }
  .schedule-day-body {
    position: relative !important;
    width: 100% !important;
    height: var(--calendar-body-h) !important;
    min-height: var(--calendar-body-h) !important;
    display: grid !important;
    grid-template-rows: repeat(var(--calendar-hours), var(--calendar-hour-h)) !important;
  }
  .time-slot {
    width: 100% !important;
    height: var(--calendar-hour-h) !important;
    min-height: var(--calendar-hour-h) !important;
    border-bottom: 1px solid #dfe4e9 !important;
    cursor: pointer !important;
  }
  .schedule-day-body .schedule-item {
    position: absolute !important;
    left: 2px !important;
    right: 2px !important;
    width: auto !important;
    top: var(--lesson-top, 0px) !important;
    height: 34px !important;
    min-height: 34px !important;
    max-height: 34px !important;
    border-radius: 8px !important;
    padding: 0 6px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    border: 1px solid var(--line, #e2e8f0) !important;
    border-left-width: 3.5px !important;
    cursor: pointer !important;
  }
  .sch-item-content {
    display: flex !important;
    align-items: center !important;
    gap: 4px !important;
    min-width: 0 !important;
    flex: 1 !important;
  }
  .sch-item-title {
    font-size: 11.5px !important;
    font-weight: 700 !important;
    white-space: nowrap !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
  }
}

/* Drag & drop rescheduling in the expanded calendar */
.schedule-day-body.drag-over{background:rgba(164,91,70,.045)!important;box-shadow:inset 0 0 0 2px rgba(164,91,70,.18)!important}
.schedule-item.is-draggable{cursor:grab!important}
.schedule-item.is-draggable:active{cursor:grabbing!important}
.schedule-item.is-dragging{opacity:.45!important;transform:scale(.985)!important;box-shadow:none!important}
.schedule-item:not(.is-draggable){cursor:pointer!important}

/* Completed lessons in schedule grid */
.schedule-grid .schedule-item.status-completed,
.schedule-grid .schedule-item.status-done {
  opacity: 0.55 !important;
  filter: grayscale(0.3) !important;
  background: var(--surface-2, #f1f5f9) !important;
  border-left-color: #16a34a !important;
}
.schedule-grid .schedule-item.status-completed .sch-item-title,
.schedule-grid .schedule-item.status-done .sch-item-title {
  font-style: normal !important;
  text-decoration: none !important;
}
.schedule-grid .schedule-item.status-completed::after,
.cal-lesson.status-completed::after {
  content: '✓' !important;
  color: #16a34a !important;
  font-weight: 900 !important;
  font-size: 11px !important;
}

/* Schedule Item Status Styling & Muting */
.schedule-grid .schedule-item.status-cancelled-free,
.schedule-grid .schedule-item.status-cancelled:not(.status-cancelled-charged):not(.is-deducted),
.schedule-grid .schedule-item.status-no-show:not(.status-cancelled-charged):not(.is-deducted),
.schedule-grid .schedule-item.status-rescheduled,
.schedule-item.status-cancelled-free,
.schedule-item.status-cancelled:not(.status-cancelled-charged):not(.is-deducted),
.schedule-item.status-no-show:not(.status-cancelled-charged):not(.is-deducted),
.schedule-item.status-rescheduled {
  opacity: 0.38 !important;
  filter: grayscale(0.85) !important;
  background: var(--surface-2, #f1f5f9) !important;
  border-left-color: #94a3b8 !important;
}

body.dark-mode .schedule-grid .schedule-item.status-cancelled-free,
body.dark-mode .schedule-grid .schedule-item.status-cancelled:not(.status-cancelled-charged):not(.is-deducted),
body.dark-mode .schedule-grid .schedule-item.status-no-show:not(.status-cancelled-charged):not(.is-deducted),
body.dark-mode .schedule-grid .schedule-item.status-rescheduled,
body.dark-mode .schedule-item.status-cancelled-free,
body.dark-mode .schedule-item.status-cancelled:not(.status-cancelled-charged):not(.is-deducted),
body.dark-mode .schedule-item.status-no-show:not(.status-cancelled-charged):not(.is-deducted),
body.dark-mode .schedule-item.status-rescheduled {
  opacity: 0.35 !important;
  background: rgba(255, 255, 255, 0.05) !important;
  border-left-color: #64748b !important;
}

.schedule-grid .schedule-item.status-cancelled .sch-item-title,
.schedule-grid .schedule-item.status-cancelled-free .sch-item-title,
.schedule-grid .schedule-item.status-cancelled-charged .sch-item-title,
.schedule-grid .schedule-item.status-no-show .sch-item-title,
.schedule-grid .schedule-item.status-rescheduled .sch-item-title,
.schedule-grid .schedule-item.status-cancelled .schedule-item-name,
.schedule-grid .schedule-item.status-cancelled-free .schedule-item-name,
.schedule-grid .schedule-item.status-cancelled-charged .schedule-item-name,
.schedule-grid .schedule-item.status-no-show .schedule-item-name,
.schedule-grid .schedule-item.status-cancelled-charged,
.schedule-grid .schedule-item.status-no-show {
  background: rgba(210,71,71,.11) !important;
  border-left-color: #d24747 !important;
}
.schedule-grid .schedule-item.status-cancelled-charged::after,
.schedule-grid .schedule-item.status-no-show::after { color:#d24747 !important; opacity:1 !important; filter:none !important; }


/* 14.83 — make scheduled lessons slightly more vivid for stronger contrast. */
.schedule-grid .schedule-item:not(.status-completed):not(.status-rescheduled):not(.status-cancelled-free):not(.status-cancelled-charged):not(.status-no-show).type-individual {
  background: rgba(91,141,239,.24) !important;
  border-left-color: #4d82e6 !important;
}
.schedule-grid .schedule-item:not(.status-completed):not(.status-rescheduled):not(.status-cancelled-free):not(.status-cancelled-charged):not(.status-no-show).type-pair {
  background: rgba(72,168,104,.24) !important;
  border-left-color: #3f9b5c !important;
}
.schedule-grid .schedule-item:not(.status-completed):not(.status-rescheduled):not(.status-cancelled-free):not(.status-cancelled-charged):not(.status-no-show).type-group {
  background: rgba(229,138,58,.25) !important;
  border-left-color: #dc7e28 !important;
}





/* 14.87 — Standard schedule uses the same status hierarchy as the expanded schedule.
   Scheduled = vivid type color. Historical/inactive = neutral grey. Charged cancellation = muted red.
   Status icons remain vivid and are never dimmed with the card. */
.standard-schedule-row.status-completed,
.standard-schedule-row.status-rescheduled,
.standard-schedule-row.status-cancelled-free,
.standard-schedule-row.status-cancelled-charged,
.standard-schedule-row.status-no-show {
  opacity:1 !important;
  filter:none !important;
}

/* Scheduled: vivid type colors + bright dot */
.standard-schedule-row:not(.status-completed):not(.status-rescheduled):not(.status-cancelled-free):not(.status-cancelled-charged):not(.status-no-show).type-individual {
  background:rgba(91,141,239,.24) !important;
  border-left-color:#4d82e6 !important;
}
.standard-schedule-row:not(.status-completed):not(.status-rescheduled):not(.status-cancelled-free):not(.status-cancelled-charged):not(.status-no-show).type-pair {
  background:rgba(72,168,104,.24) !important;
  border-left-color:#3f9b5c !important;
}
.standard-schedule-row:not(.status-completed):not(.status-rescheduled):not(.status-cancelled-free):not(.status-cancelled-charged):not(.status-no-show).type-group {
  background:rgba(229,138,58,.25) !important;
  border-left-color:#dc7e28 !important;
}
.standard-schedule-row:not(.status-completed):not(.status-rescheduled):not(.status-cancelled-free):not(.status-cancelled-charged):not(.status-no-show)::after {
  content:'•' !important;
  color:#5f6670 !important;
  opacity:1 !important;
  filter:none !important;
  font-weight:900 !important;
}

/* Inactive/history: muted version of the lesson type, vivid status icon. */
.standard-schedule-row.status-completed.type-individual,
.standard-schedule-row.status-rescheduled.type-individual,
.standard-schedule-row.status-cancelled-free.type-individual {
  background:rgba(91,141,239,.10) !important;
  border-left-color:rgba(77,130,230,.42) !important;
}
.standard-schedule-row.status-completed.type-pair,
.standard-schedule-row.status-rescheduled.type-pair,
.standard-schedule-row.status-cancelled-free.type-pair {
  background:rgba(72,168,104,.10) !important;
  border-left-color:rgba(63,155,92,.42) !important;
}
.standard-schedule-row.status-completed.type-group,
.standard-schedule-row.status-rescheduled.type-group,
.standard-schedule-row.status-cancelled-free.type-group {
  background:rgba(229,138,58,.105) !important;
  border-left-color:rgba(220,126,40,.44) !important;
}
.standard-schedule-row.status-completed.type-individual .standard-schedule-main strong,
.standard-schedule-row.status-rescheduled.type-individual .standard-schedule-main strong,
.standard-schedule-row.status-cancelled-free.type-individual .standard-schedule-main strong,
.standard-schedule-row.status-completed.type-individual .standard-schedule-time,
.standard-schedule-row.status-rescheduled.type-individual .standard-schedule-time,
.standard-schedule-row.status-cancelled-free.type-individual .standard-schedule-time {
  color:#5f79ad !important;
}
.standard-schedule-row.status-completed.type-pair .standard-schedule-main strong,
.standard-schedule-row.status-rescheduled.type-pair .standard-schedule-main strong,
.standard-schedule-row.status-cancelled-free.type-pair .standard-schedule-main strong,
.standard-schedule-row.status-completed.type-pair .standard-schedule-time,
.standard-schedule-row.status-rescheduled.type-pair .standard-schedule-time,
.standard-schedule-row.status-cancelled-free.type-pair .standard-schedule-time {
  color:#5e8f70 !important;
}
.standard-schedule-row.status-completed.type-group .standard-schedule-main strong,
.standard-schedule-row.status-rescheduled.type-group .standard-schedule-main strong,
.standard-schedule-row.status-cancelled-free.type-group .standard-schedule-main strong,
.standard-schedule-row.status-completed.type-group .standard-schedule-time,
.standard-schedule-row.status-rescheduled.type-group .standard-schedule-time,
.standard-schedule-row.status-cancelled-free.type-group .standard-schedule-time {
  color:#a2764c !important;
}
.standard-schedule-row.status-completed::after {
  content:'✓' !important;
  color:#2f9e5b !important;
  opacity:1 !important;
  filter:none !important;
  font-weight:900 !important;
}
.standard-schedule-row.status-rescheduled::after {
  content:'↻' !important;
  color:#59616d !important;
  opacity:1 !important;
  filter:none !important;
  font-weight:900 !important;
}
.standard-schedule-row.status-cancelled-free::after {
  content:'×' !important;
  color:#59616d !important;
  opacity:1 !important;
  filter:none !important;
  font-weight:900 !important;
}

/* Charged cancellation: muted red card + vivid red icon */
.standard-schedule-row.status-cancelled-charged,
.standard-schedule-row.status-no-show {
  background:rgba(210,71,71,.11) !important;
  border-left-color:#d24747 !important;
  color:#9b4545 !important;
}
.standard-schedule-row.status-cancelled-charged .standard-schedule-time,
.standard-schedule-row.status-no-show .standard-schedule-time {
  color:#c53232 !important;
}
.standard-schedule-row.status-cancelled-charged::after,
.standard-schedule-row.status-no-show::after {
  content:'×' !important;
  color:#d24747 !important;
  opacity:1 !important;
  filter:none !important;
  font-weight:900 !important;
}

/* Monthly schedule */
.month-toolbar{display:flex;align-items:center;justify-content:space-between;gap:14px;margin:0 0 12px}
.month-calendar{background:#fff;border:1px solid var(--line);border-radius:16px;overflow:hidden;box-shadow:var(--shadow)}
.month-weekdays{display:grid;grid-template-columns:repeat(7,minmax(0,1fr));background:#faf9f8;border-bottom:1px solid var(--line)}
.month-weekdays>div{padding:10px 12px;font-size:12px;font-weight:800;color:var(--muted);border-right:1px solid var(--line)}
.month-weekdays>div:last-child{border-right:0}
.month-grid{display:grid;grid-template-columns:repeat(7,minmax(0,1fr))}
.month-cell{min-height:126px;padding:8px;border-right:1px solid var(--line);border-bottom:1px solid var(--line);background:#fff;cursor:pointer;transition:background .14s}
.month-cell:nth-child(7n){border-right:0}
.month-cell:nth-last-child(-n+7){border-bottom:0}
.month-cell:hover{background:#fcfaf9}
.month-cell.outside{background:#f8f8f7;color:#b2b6bb;cursor:default}
.month-cell.today{background:#fffaf8}
.month-cell-date{display:flex;align-items:center;justify-content:space-between;gap:5px;margin-bottom:7px;font-size:12px;font-weight:800;color:#4e5661}
.month-cell.today .month-cell-date>span{display:inline-flex;align-items:center;justify-content:center;width:25px;height:25px;border-radius:50%;background:var(--accent);color:#fff}
.month-cell-date em{font-style:normal;font-size:8px;color:var(--accent);font-weight:800}
.month-lessons{display:flex;flex-direction:column;gap:4px}
.month-lesson{position:relative;width:100%;min-width:0;border:1px solid transparent;border-left:3px solid;display:grid;grid-template-columns:34px minmax(0,1fr) 12px;align-items:center;gap:4px;padding:5px 6px;text-align:left;border-radius:7px;cursor:pointer;overflow:hidden}
.month-lesson.type-individual{background:rgba(91,141,239,.105);border-left-color:#5b8def}
.month-lesson.type-pair{background:rgba(72,168,104,.105);border-left-color:#48a868}
.month-lesson.type-group{background:rgba(229,138,58,.12);border-left-color:#e58a3a}
.month-lesson-time{font-size:9px;font-weight:850;color:#4e5661}
.month-lesson-name{font-size:10px;font-weight:750;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.month-lesson-state{width:10px;height:10px;display:block}
.month-lesson-state:after{content:'•';font-size:14px;line-height:8px;font-weight:900}
.month-lesson.status-completed,.month-lesson.status-rescheduled,.month-lesson.status-cancelled-free{opacity:.48;filter:grayscale(.45)}
.month-lesson.status-completed .month-lesson-state:after{content:'✓';color:#2f9e5b}
.month-lesson.status-rescheduled .month-lesson-state:after{content:'↻';color:#6f7781}
.month-lesson.status-cancelled-free .month-lesson-state:after{content:'×';color:#6f7781}
.month-lesson.status-cancelled-charged,.month-lesson.status-no-show{background:#f9e9e9!important;border-left-color:#d24747!important;opacity:.7}
.month-lesson.status-cancelled-charged .month-lesson-state:after,.month-lesson.status-no-show .month-lesson-state:after{content:'×';color:#d24747}
.month-more{border:0;background:transparent;color:var(--accent);font-size:9px;font-weight:800;text-align:left;padding:2px 4px;cursor:pointer}
.month-day-modal-row{width:100%;display:grid;grid-template-columns:50px 1fr 16px;align-items:center;gap:10px;padding:10px 12px;margin-bottom:7px;border:1px solid var(--line);border-left:4px solid;border-radius:10px;text-align:left;background:#fff;cursor:pointer}
.month-day-modal-row.type-individual{border-left-color:#5b8def;background:rgba(91,141,239,.06)}
.month-day-modal-row.type-pair{border-left-color:#48a868;background:rgba(72,168,104,.06)}
.month-day-modal-row.type-group{border-left-color:#e58a3a;background:rgba(229,138,58,.07)}
.month-day-modal-row.status-completed,.month-day-modal-row.status-rescheduled,.month-day-modal-row.status-cancelled-free{opacity:.52;filter:grayscale(.4)}
.month-day-modal-row .month-lesson-state:after{content:'•';font-size:15px;font-weight:900}
.month-day-modal-row.status-completed .month-lesson-state:after{content:'✓';color:#2f9e5b}
.month-day-modal-row.status-rescheduled .month-lesson-state:after{content:'↻';color:#6f7781}
.month-day-modal-row.status-cancelled-free .month-lesson-state:after{content:'×';color:#6f7781}
.month-day-modal-row.status-cancelled-charged,.month-day-modal-row.status-no-show{background:#f9e9e9;border-left-color:#d24747;opacity:.7}
.month-day-modal-row.status-cancelled-charged .month-lesson-state:after,.month-day-modal-row.status-no-show .month-lesson-state:after{content:'×';color:#d24747}
@media(max-width:900px){.month-grid{min-width:760px}.month-calendar{overflow-x:auto}.month-weekdays{min-width:760px}.month-toolbar{flex-wrap:wrap}}

/* Schedule status filters + quick actions */
.filter-divider{width:1px;height:22px;background:var(--line);display:inline-block;margin:0 2px;align-self:center}
.filter-pill.status-filter{background:#fafafa;color:#626a74;border-color:#e3e5e8}
.filter-pill.status-filter.active{background:#f1f3f5;border-color:#aeb4bb;font-weight:800}
@media(max-width:900px){.filter-divider{display:none}}
.month-cell.month-drag-over{background:#f6f0ed!important;box-shadow:inset 0 0 0 2px rgba(160,70,50,.22)}
.month-lesson.month-draggable{cursor:grab}
.month-lesson.month-draggable:active{cursor:grabbing}
.month-lesson.is-dragging{opacity:.55;transform:scale(.99)}
.status-filter-wrap{display:inline-flex;align-items:center}
.schedule-status-select{appearance:auto;border:1px solid var(--border);background:var(--card);color:var(--text);padding:7px 30px 7px 12px;border-radius:999px;font:inherit;font-size:13px;line-height:1.2;cursor:pointer;min-height:34px;outline:none}
.schedule-status-select:hover{border-color:#b8bec6}
.schedule-status-select:focus{border-color:#9aa2ab;box-shadow:0 0 0 2px rgba(120,130,140,.12)}
@media(max-width:900px){.schedule-status-select{max-width:190px}}
.month-day-modal-actions{display:flex;justify-content:flex-end;margin:0 0 12px}

/* 15.02 — unified schedule controls across List / Week / Month */
.schedule-unified-toolbar{margin:10px 0 14px;display:block}
.schedule-controls-row{display:flex;align-items:center;justify-content:space-between;gap:14px;flex-wrap:wrap;width:100%}
.schedule-controls-row .schedule-filters{margin:0;display:flex;align-items:center;gap:8px;flex-wrap:wrap}
.schedule-controls-row .schedule-view-toggle{flex:none}
.schedule-unified-nav{display:flex;align-items:center;gap:7px;flex-wrap:wrap}
.schedule-unified-topbar{margin-bottom:2px}
@media(max-width:900px){
  .schedule-controls-row{align-items:flex-start}
  .schedule-controls-row .schedule-filters{width:100%;overflow:auto;flex-wrap:nowrap;padding-bottom:2px}
  .schedule-controls-row .schedule-view-toggle{flex:none}
}

/* 15.09 — completed lesson paid on debt: keep the card muted, but show a vivid red check */
.schedule-item.status-completed-debt{opacity:.62!important;filter:saturate(.62)!important}
.schedule-item.status-completed-debt::after{content:'✓'!important;position:absolute;right:6px;top:5px;color:#d24747!important;font-weight:900;font-size:11px;opacity:1!important;filter:none!important}
.standard-schedule-row.status-completed-debt::after{content:none!important;display:none!important}

/* 15.11 — explicit status icon in compact list, independent of pseudo-elements */
.standard-schedule-state{display:inline-flex;align-items:center;justify-content:center;width:18px;height:18px;font-size:14px;line-height:1;font-weight:900;flex:0 0 18px;}
.standard-schedule-state.scheduled{color:#d8a62b}
.standard-schedule-state.completed{color:#2f9e5b}
.standard-schedule-state.debt{color:#d24747}
.standard-schedule-state.rescheduled{color:#8b929c}
.standard-schedule-state.cancelled{color:#c53232}
.standard-schedule-row.status-completed-debt .standard-schedule-state{color:#d24747!important;opacity:1!important;filter:none!important}
.student-history-list .history-flag.debt-completed{background:rgba(210,71,71,.14);color:#d24747;font-size:11px;border:1px solid rgba(210,71,71,.22)}
.student-history-list .history-completed-debt .history-status{color:#b94b4b}


/* 15.15 — final standard-list status treatment */
.standard-schedule-row::after,
.standard-schedule-row.status-completed::after,
.standard-schedule-row.status-rescheduled::after,
.standard-schedule-row.status-cancelled-free::after,
.standard-schedule-row.status-cancelled-charged::after,
.standard-schedule-row.status-no-show::after {
  content:none !important;
  display:none !important;
}
.standard-schedule-row .debt-mini-icon { display:none !important; }

/* Historical lessons stay muted in their own type colour; status icon stays vivid. */
.standard-schedule-row.status-completed.type-individual { background:rgba(91,141,239,.10) !important; border-left-color:rgba(77,130,230,.42) !important; }
.standard-schedule-row.status-completed.type-pair { background:rgba(72,168,104,.10) !important; border-left-color:rgba(63,155,92,.42) !important; }
.standard-schedule-row.status-completed.type-group { background:rgba(229,138,58,.105) !important; border-left-color:rgba(220,126,40,.44) !important; }
.standard-schedule-row.status-completed.type-individual .standard-schedule-main strong,
.standard-schedule-row.status-completed.type-individual .standard-schedule-time { color:#5f79ad !important; }
.standard-schedule-row.status-completed.type-pair .standard-schedule-main strong,
.standard-schedule-row.status-completed.type-pair .standard-schedule-time { color:#5e8f70 !important; }
.standard-schedule-row.status-completed.type-group .standard-schedule-main strong,
.standard-schedule-row.status-completed.type-group .standard-schedule-time { color:#a2764c !important; }
.standard-schedule-row.status-completed .standard-schedule-state { color:#2f9e5b !important; opacity:1 !important; filter:none !important; }
.standard-schedule-row.status-completed-debt .standard-schedule-state { color:#d24747 !important; opacity:1 !important; filter:none !important; }

/* 15.16 — Standard list: completed lessons are muted in their own type color,
   while the status check stays vivid. */
.standard-schedule-row.status-completed.type-individual,
.standard-schedule-row.status-completed-debt.type-individual{
  background:rgba(91,141,239,.025)!important;
  border-left-color:rgba(91,141,239,.48)!important;
}
.standard-schedule-row.status-completed.type-pair,
.standard-schedule-row.status-completed-debt.type-pair{
  background:rgba(72,168,104,.025)!important;
  border-left-color:rgba(72,168,104,.48)!important;
}
.standard-schedule-row.status-completed.type-group,
.standard-schedule-row.status-completed-debt.type-group{
  background:rgba(229,138,58,.028)!important;
  border-left-color:rgba(229,138,58,.48)!important;
}
.standard-schedule-row.status-completed .standard-schedule-time,
.standard-schedule-row.status-completed .standard-schedule-main,
.standard-schedule-row.status-completed-debt .standard-schedule-time,
.standard-schedule-row.status-completed-debt .standard-schedule-main{
  opacity:.52;
}
.standard-schedule-row.status-completed .standard-schedule-state,
.standard-schedule-row.status-completed-debt .standard-schedule-state{
  opacity:1!important;
  filter:none!important;
}
.standard-schedule-row.status-completed .standard-schedule-state{color:#2f9e5b!important}
.standard-schedule-row.status-completed-debt .standard-schedule-state{color:#d24747!important}

/* 15.18 — unified lesson status colors: List and Week */
/* ACTIVE / SCHEDULED — vivid type color */
.schedule-item:not(.status-completed):not(.status-completed-debt):not(.status-rescheduled):not(.status-cancelled-free):not(.status-cancelled-charged):not(.status-no-show).type-individual,
.standard-schedule-row:not(.status-completed):not(.status-completed-debt):not(.status-rescheduled):not(.status-cancelled-free):not(.status-cancelled-charged):not(.status-no-show).type-individual{
  background:rgba(91,141,239,.18)!important;border-left-color:#5b8def!important;color:var(--text)!important;opacity:1!important;filter:none!important;
}
.schedule-item:not(.status-completed):not(.status-completed-debt):not(.status-rescheduled):not(.status-cancelled-free):not(.status-cancelled-charged):not(.status-no-show).type-pair,
.standard-schedule-row:not(.status-completed):not(.status-completed-debt):not(.status-rescheduled):not(.status-cancelled-free):not(.status-cancelled-charged):not(.status-no-show).type-pair{
  background:rgba(72,168,104,.18)!important;border-left-color:#48a868!important;color:var(--text)!important;opacity:1!important;filter:none!important;
}
.schedule-item:not(.status-completed):not(.status-completed-debt):not(.status-rescheduled):not(.status-cancelled-free):not(.status-cancelled-charged):not(.status-no-show).type-group,
.standard-schedule-row:not(.status-completed):not(.status-completed-debt):not(.status-rescheduled):not(.status-cancelled-free):not(.status-cancelled-charged):not(.status-no-show).type-group{
  background:rgba(229,138,58,.20)!important;border-left-color:#e58a3a!important;color:var(--text)!important;opacity:1!important;filter:none!important;
}

/* HISTORY — pale, but keeps the lesson's own type */
.schedule-item.status-completed.type-individual,.schedule-item.status-completed-debt.type-individual,
.schedule-item.status-rescheduled.type-individual,.schedule-item.status-cancelled-free.type-individual,
.standard-schedule-row.status-completed.type-individual,.standard-schedule-row.status-completed-debt.type-individual,
.standard-schedule-row.status-rescheduled.type-individual,.standard-schedule-row.status-cancelled-free.type-individual{
  background:rgba(91,141,239,.055)!important;border-left-color:rgba(91,141,239,.38)!important;color:var(--text)!important;
}
.schedule-item.status-completed.type-pair,.schedule-item.status-completed-debt.type-pair,
.schedule-item.status-rescheduled.type-pair,.schedule-item.status-cancelled-free.type-pair,
.standard-schedule-row.status-completed.type-pair,.standard-schedule-row.status-completed-debt.type-pair,
.standard-schedule-row.status-rescheduled.type-pair,.standard-schedule-row.status-cancelled-free.type-pair{
  background:rgba(72,168,104,.055)!important;border-left-color:rgba(72,168,104,.38)!important;color:var(--text)!important;
}
.schedule-item.status-completed.type-group,.schedule-item.status-completed-debt.type-group,
.schedule-item.status-rescheduled.type-group,.schedule-item.status-cancelled-free.type-group,
.standard-schedule-row.status-completed.type-group,.standard-schedule-row.status-completed-debt.type-group,
.standard-schedule-row.status-rescheduled.type-group,.standard-schedule-row.status-cancelled-free.type-group{
  background:rgba(229,138,58,.06)!important;border-left-color:rgba(229,138,58,.40)!important;color:var(--text)!important;
}
.schedule-item.status-completed,.schedule-item.status-completed-debt,
.standard-schedule-row.status-completed,.standard-schedule-row.status-completed-debt{opacity:1!important;filter:none!important}

/* CANCELLED WITH CHARGE — pale red card, vivid red status */
.schedule-item.status-cancelled-charged,.schedule-item.status-no-show,
.standard-schedule-row.status-cancelled-charged,.standard-schedule-row.status-no-show{
  background:rgba(210,71,71,.10)!important;border-left-color:#d24747!important;color:#a94444!important;opacity:1!important;filter:none!important;
}

/* Vivid status icons — independent from card muting */
.schedule-item.status-completed::after{content:'✓'!important;color:#2f9e5b!important;opacity:1!important;filter:none!important}
.schedule-item.status-completed-debt::after{content:'✓'!important;color:#d24747!important;opacity:1!important;filter:none!important}
.schedule-item.status-rescheduled::after{content:'↻'!important;color:#59616d!important;opacity:1!important;filter:none!important}
.schedule-item.status-cancelled-free::after{content:'×'!important;color:#59616d!important;opacity:1!important;filter:none!important}
.schedule-item.status-cancelled-charged::after,.schedule-item.status-no-show::after{content:'×'!important;color:#d24747!important;opacity:1!important;filter:none!important}
.standard-schedule-row.status-completed .standard-schedule-state{color:#2f9e5b!important;opacity:1!important;filter:none!important}
.standard-schedule-row.status-completed-debt .standard-schedule-state{color:#d24747!important;opacity:1!important;filter:none!important}
.standard-schedule-row.status-rescheduled .standard-schedule-state,
.standard-schedule-row.status-cancelled-free .standard-schedule-state{color:#59616d!important;opacity:1!important;filter:none!important}
.standard-schedule-row.status-cancelled-charged .standard-schedule-state,
.standard-schedule-row.status-no-show .standard-schedule-state{color:#d24747!important;opacity:1!important;filter:none!important}

/* Keep text quieter on historical cards, never the status icon */
.schedule-item.status-completed .schedule-item-name,.schedule-item.status-completed .schedule-item-time,
.schedule-item.status-completed-debt .schedule-item-name,.schedule-item.status-completed-debt .schedule-item-time,
.schedule-item.status-rescheduled .schedule-item-name,.schedule-item.status-rescheduled .schedule-item-time,
.schedule-item.status-cancelled-free .schedule-item-name,.schedule-item.status-cancelled-free .schedule-item-time,
.standard-schedule-row.status-completed .standard-schedule-main,.standard-schedule-row.status-completed .standard-schedule-time,
.standard-schedule-row.status-completed-debt .standard-schedule-main,.standard-schedule-row.status-completed-debt .standard-schedule-time,
.standard-schedule-row.status-rescheduled .standard-schedule-main,.standard-schedule-row.status-rescheduled .standard-schedule-time,
.standard-schedule-row.status-cancelled-free .standard-schedule-main,.standard-schedule-row.status-cancelled-free .standard-schedule-time{opacity:.58}

/* Charged cancellation remains clearly red */
.standard-schedule-row.status-cancelled-charged .standard-schedule-main,
.standard-schedule-row.status-cancelled-charged .standard-schedule-time,
.schedule-item.status-cancelled-charged .schedule-item-name,
.schedule-item.status-cancelled-charged .schedule-item-time{color:#a94444!important;opacity:1!important}

/* Compact lesson details modal */
.lesson-modal-head{margin-bottom:12px}
.lesson-modal-status{display:flex;align-items:center;gap:8px;padding:9px 11px;border:1px solid var(--line);border-radius:11px;background:#fff;margin-bottom:10px}
.lesson-count{font-size:12px}
.lesson-participants{display:flex;flex-direction:column;gap:8px}
.lesson-participant-row{display:flex;align-items:center;gap:10px;padding:11px 12px;border:1px solid var(--line);border-radius:11px;background:#fff}
.lesson-participant-main{display:flex;align-items:center;gap:7px;flex:1;min-width:0}
.lesson-reason{font-size:11px}
.lesson-participant-row .status-actions{margin-left:auto}
@media(max-width:700px){.lesson-participant-row{align-items:flex-start;flex-wrap:wrap}.lesson-participant-row .status-actions{width:100%;margin-left:0}}

/* Date Jump Picker in Schedule */
.date-jump-btn{position:relative;cursor:pointer;overflow:hidden;display:inline-flex;align-items:center;gap:4px}
.date-jump-input{position:absolute;opacity:0;left:0;top:0;width:100%;height:100%;cursor:pointer}

/* Cancel / No-show Choice Modal */
.cancel-choice-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-top: 4px;
}
.cancel-choice-btn {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  text-align: left;
  padding: 13px 15px;
  border-radius: 13px;
  border: 1.5px solid var(--line, #e2e8f0);
  background: var(--surface, #ffffff);
  cursor: pointer;
  transition: all .16s ease;
  user-select: none;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.02);
}
.cancel-choice-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.06);
}
.cancel-choice-title {
  font-size: 13.5px;
  font-weight: 800;
  margin-bottom: 4px;
  letter-spacing: -0.2px;
}
.cancel-choice-desc {
  font-size: 11.5px;
  color: var(--muted, #64748b);
  line-height: 1.4;
  font-weight: 500;
}
.cancel-choice-btn.cancel-free {
  border-color: var(--line, #e2e8f0);
}
.cancel-choice-btn.cancel-free:hover {
  border-color: #94a3b8;
  background: #f8fafc;
}
.cancel-choice-btn.cancel-free .cancel-choice-title {
  color: var(--text, #1e293b);
}
.cancel-choice-btn.cancel-charged {
  border-color: rgba(239, 68, 68, 0.28);
  background: rgba(239, 68, 68, 0.03);
}
.cancel-choice-btn.cancel-charged:hover {
  border-color: #ef4444;
  background: rgba(239, 68, 68, 0.08);
  box-shadow: 0 4px 14px rgba(239, 68, 68, 0.12);
}
.cancel-choice-btn.cancel-charged .cancel-choice-title {
  color: #dc2626;
}
@media (max-width: 600px) {
  .cancel-choice-grid {
    grid-template-columns: 1fr;
    gap: 10px;
  }
}

/* Finance Search & CSV */
.finance-section-head{display:flex;align-items:flex-end;justify-content:space-between;gap:16px;margin-bottom:12px;flex-wrap:wrap}
.finance-search-wrap{display:flex;align-items:center;gap:8px}

/* Sidebar footer and theme toggle */
.sidebar{display:flex;flex-direction:column;justify-content:space-between}
.sidebar-footer{padding-top:16px;border-top:1px solid var(--line)}
.theme-toggle-btn{width:100%;display:flex;align-items:center;justify-content:center;gap:8px;padding:9px 12px;border-radius:10px;border:1px solid var(--line);background:transparent;color:var(--text);font-size:13px;font-weight:600;cursor:pointer;transition:all .15s ease}
.theme-toggle-btn:hover{background:var(--accent-soft);color:var(--accent);border-color:var(--accent)}

/* Complete & High-Contrast Dark Theme System */
body.dark-mode{
  --bg:#0f1217;
  --card:#181b23;
  --surface:#1f2430;
  --surface-2:#272d3c;
  --border:#2a3040;
  --line:#2a3040;
  --text:#f2f5f9;
  --muted:#909aa8;
  --accent:#e27c63;
  --accent-soft:rgba(226,124,99,.18);
  --green:#36b36e;
  --green-soft:rgba(54,179,110,.18);
  --red:#e25858;
  --red-soft:rgba(226,88,88,.18);
  --yellow:#dc9632;
  --yellow-soft:rgba(220,150,50,.18);
  --gray:#848e9d;
  --gray-soft:rgba(132,142,157,.18);
  --shadow:0 12px 36px rgba(0,0,0,.5);
  background:var(--bg)!important;
  color:var(--text)!important;
}

/* Sidebar & Navigation */
body.dark-mode .sidebar{background:#13161e!important;border-right-color:var(--line)!important}
body.dark-mode .sidebar-footer{border-top-color:var(--line)!important}
body.dark-mode .nav button{color:#8f99a8!important}
body.dark-mode .nav button.active,body.dark-mode .nav button:hover{background:var(--accent-soft)!important;color:var(--accent)!important}
body.dark-mode .theme-toggle-btn{background:#1a1e28!important;border-color:var(--line)!important;color:var(--text)!important}
body.dark-mode .theme-toggle-btn:hover{background:var(--accent-soft)!important;color:var(--accent)!important;border-color:var(--accent)!important}

/* Cards, Sections & Panels */
body.dark-mode .card,
body.dark-mode .stat,
body.dark-mode .section,
body.dark-mode .finance-history-card,
body.dark-mode .finance-chart-card,
body.dark-mode .group-card,
body.dark-mode .group-card-v2,
body.dark-mode .group-card-v3,
body.dark-mode .group-overview-card,
body.dark-mode .archive-month,
body.dark-mode .dashboard-stats .stat-primary,
body.dark-mode .dashboard-stats .stat-debt,
body.dark-mode .dashboard-stats .stat-secondary{
  background:var(--card)!important;
  border-color:var(--line)!important;
  color:var(--text)!important;
}

/* Day & Calendar Grids */
body.dark-mode .day,
body.dark-mode .month-cell,
body.dark-mode .expanded-day-cell,
body.dark-mode .expanded-schedule-grid,
body.dark-mode .calendar .day{
  background:var(--card)!important;
  border-color:var(--line)!important;
  color:var(--text)!important;
}
body.dark-mode .day.today,
body.dark-mode .calendar .day.today,
body.dark-mode .expanded-day-cell.today{
  background:#1a2336!important;
  border-color:var(--accent)!important;
}
body.dark-mode .month-cell.outside{
  background:#13161e!important;
  opacity:.4!important;
}

/* Schedule Items & Rows */
body.dark-mode .schedule-item,
body.dark-mode .standard-schedule-row,
body.dark-mode .standard-schedule-card,
body.dark-mode .listrow,
body.dark-mode .lesson{
  background:#1c212d!important;
  border-color:var(--line)!important;
  color:var(--text)!important;
}
body.dark-mode .listrow:hover,
body.dark-mode .standard-schedule-row:hover,
body.dark-mode .schedule-item:hover{
  background:#232938!important;
  border-color:var(--muted)!important;
}

/* Modals & Dialogs */
body.dark-mode .modalback{background:rgba(5,7,10,.75)!important}
body.dark-mode .modal{
  background:#181b23!important;
  border:1px solid var(--line)!important;
  color:var(--text)!important;
  box-shadow:0 30px 90px rgba(0,0,0,.7)!important;
}
body.dark-mode .modalhead .close{
  background:#232937!important;
  color:var(--text)!important;
}
body.dark-mode .modalhead .close:hover{
  background:#2c3446!important;
}
body.dark-mode .lesson-modal-status,
body.dark-mode .lesson-participant-row{
  background:#1f2430!important;
  border-color:var(--line)!important;
  color:var(--text)!important;
}

/* Inputs, Selects & Forms */
body.dark-mode input,
body.dark-mode select,
body.dark-mode textarea,
body.dark-mode .search,
body.dark-mode .select,
body.dark-mode .schedule-status-select,
body.dark-mode .field input,
body.dark-mode .field select,
body.dark-mode .field textarea{
  background:#12151d!important;
  color:var(--text)!important;
  border-color:var(--line)!important;
}
body.dark-mode input::placeholder,
body.dark-mode textarea::placeholder,
body.dark-mode .search::placeholder{
  color:#6c7686!important;
}
body.dark-mode input:focus,
body.dark-mode select:focus,
body.dark-mode textarea:focus{
  border-color:var(--accent)!important;
  outline:none!important;
}

/* Buttons & Controls */
body.dark-mode .btn{
  background:#202532!important;
  color:var(--text)!important;
  border-color:var(--line)!important;
}
body.dark-mode .btn:hover{
  background:#293040!important;
  border-color:var(--muted)!important;
}
body.dark-mode .btn.primary{
  background:var(--accent)!important;
  color:#fff!important;
  border-color:var(--accent)!important;
}
body.dark-mode .btn.primary:hover{
  filter:brightness(1.1)!important;
}
body.dark-mode .filter-pill{
  background:#181b23!important;
  border-color:var(--line)!important;
  color:#909aa8!important;
}
body.dark-mode .filter-pill:hover{
  background:#202532!important;
  color:#f2f5f9!important;
}
body.dark-mode .filter-pill.active{
  background:#262c3c!important;
  color:#f2f5f9!important;
  border-color:var(--muted)!important;
  font-weight:750!important;
}

/* Individual Filter Pill (Blue) in Dark Mode */
body.dark-mode .filter-pill.type-individual{
  background:rgba(91,141,239,.12)!important;
  color:#8cb2ff!important;
  border-color:rgba(91,141,239,.30)!important;
}
body.dark-mode .filter-pill.type-individual:hover{
  background:rgba(91,141,239,.20)!important;
  border-color:#5b8def!important;
}
body.dark-mode .filter-pill.type-individual.active{
  background:rgba(91,141,239,.26)!important;
  color:#aecdff!important;
  border-color:#5b8def!important;
  box-shadow:0 0 10px rgba(91,141,239,.30)!important;
  font-weight:750!important;
}

/* Pair Filter Pill (Green) in Dark Mode */
body.dark-mode .filter-pill.type-pair{
  background:rgba(72,168,104,.12)!important;
  color:#72d192!important;
  border-color:rgba(72,168,104,.30)!important;
}
body.dark-mode .filter-pill.type-pair:hover{
  background:rgba(72,168,104,.20)!important;
  border-color:#48a868!important;
}
body.dark-mode .filter-pill.type-pair.active{
  background:rgba(72,168,104,.26)!important;
  color:#95ebb3!important;
  border-color:#48a868!important;
  box-shadow:0 0 10px rgba(72,168,104,.30)!important;
  font-weight:750!important;
}

/* Group Filter Pill (Orange) in Dark Mode */
body.dark-mode .filter-pill.type-group{
  background:rgba(229,138,58,.12)!important;
  color:#f5ab67!important;
  border-color:rgba(229,138,58,.30)!important;
}
body.dark-mode .filter-pill.type-group:hover{
  background:rgba(229,138,58,.20)!important;
  border-color:#e58a3a!important;
}
body.dark-mode .filter-pill.type-group.active{
  background:rgba(229,138,58,.26)!important;
  color:#fcd0a2!important;
  border-color:#e58a3a!important;
  box-shadow:0 0 10px rgba(229,138,58,.30)!important;
  font-weight:750!important;
}

body.dark-mode .schedule-status-select{
  background:#181b23!important;
  border-color:var(--line)!important;
  color:#f2f5f9!important;
}

/* Student Profile Details & Sub-boxes */
body.dark-mode .student-contact-grid>div,
body.dark-mode .student-finance-grid>div,
body.dark-mode .student-schedule-display,
body.dark-mode .package-details>div,
body.dark-mode .group-stat,
body.dark-mode .group-detail .group-stat,
body.dark-mode .kv div,
body.dark-mode .week-summary>div,
body.dark-mode .birthday-row,
body.dark-mode .need,
body.dark-mode .dashboard-need{
  background:#151821!important;
  border-color:var(--line)!important;
  color:var(--text)!important;
}
body.dark-mode .student-history-list .history-lesson{
  background:#1c212d!important;
  border-color:var(--line)!important;
  color:var(--text)!important;
}
body.dark-mode .member-chip,
body.dark-mode .student-group-link{
  background:#1f2430!important;
  border-color:var(--line)!important;
  color:var(--text)!important;
}
body.dark-mode .member-chip:hover,
body.dark-mode .student-group-link:hover{
  background:#282f3f!important;
  border-color:var(--muted)!important;
}

/* Tables & Archives */
body.dark-mode .table th{
  background:#141720!important;
  color:var(--muted)!important;
  border-bottom-color:var(--line)!important;
}
body.dark-mode .table td{
  border-bottom-color:var(--line)!important;
  color:var(--text)!important;
}
body.dark-mode .table tr:hover td,
body.dark-mode .clickable:hover{
  background:#202533!important;
}
body.dark-mode .archive-payments,
body.dark-mode .finance-archive-section .archive-payments{
  background:#13161e!important;
  border-top-color:var(--line)!important;
}
body.dark-mode .archive-head:hover{
  background:rgba(255,255,255,.04)!important;
}
body.dark-mode .finance-empty{
  background:#181b23!important;
  border-color:var(--line)!important;
  color:var(--muted)!important;
}

/* Badges & Cancel Choice Modal */
body.dark-mode .cancel-choice-btn{
  background:#1f2430!important;
  border-color:var(--line)!important;
  color:var(--text)!important;
}
body.dark-mode .cancel-choice-btn.cancel-free:hover{
  background:#272e3d!important;
  border-color:var(--muted)!important;
}
body.dark-mode .cancel-choice-btn.cancel-free .cancel-choice-title{
  color:var(--text)!important;
}
body.dark-mode .cancel-choice-btn.cancel-charged{
  background:rgba(226,88,88,.12)!important;
  border-color:rgba(226,88,88,.3)!important;
}
body.dark-mode .cancel-choice-btn.cancel-charged:hover{
  background:rgba(226,88,88,.22)!important;
  border-color:var(--red)!important;
}
body.dark-mode .badge.debt{
  background:rgba(220,150,50,.18)!important;
  color:#f5b352!important;
}
body.dark-mode .group-chip{
  background:#232836!important;
  color:var(--muted)!important;
}
body.dark-mode .notice{
  background:var(--accent-soft)!important;
  color:var(--accent)!important;
}
body.dark-mode .tabs{
  border-bottom-color:var(--line)!important;
}
body.dark-mode .tab{
  color:var(--muted)!important;
}
body.dark-mode .tab.active{
  color:var(--accent)!important;
  border-color:var(--accent)!important;
}

/* Dashboard & Premium Elements in Dark Mode */
body.dark-mode .dash-title h1{color:#f2f5f9!important}
body.dark-mode .dash-title p{color:#909aa8!important}
body.dark-mode .premium-btn{
  background:#202532!important;
  color:#f2f5f9!important;
  border-color:var(--line)!important;
  box-shadow:none!important;
}
body.dark-mode .premium-btn:hover{
  background:#293040!important;
  border-color:var(--muted)!important;
}
body.dark-mode .premium-btn.primary{
  background:var(--accent)!important;
  border-color:var(--accent)!important;
  color:#fff!important;
  box-shadow:0 5px 14px rgba(226,124,99,.25)!important;
}
body.dark-mode .premium-kpi{
  background:#181b23!important;
  border-color:var(--line)!important;
  box-shadow:none!important;
}
body.dark-mode .premium-kpi label{color:#909aa8!important}
body.dark-mode .premium-value{color:#f2f5f9!important}
body.dark-mode .premium-muted{color:#909aa8!important}

body.dark-mode .premium-icon.green{background:rgba(54,179,110,.16)!important;color:#36b36e!important}
body.dark-mode .premium-icon.blue{background:rgba(91,141,239,.16)!important;color:#5b8def!important}
body.dark-mode .premium-icon.orange{background:rgba(220,150,50,.16)!important;color:#dc9632!important}
body.dark-mode .premium-icon.purple{background:rgba(168,130,240,.16)!important;color:#b18cf0!important}

body.dark-mode .premium-card{
  background:#181b23!important;
  border-color:var(--line)!important;
  box-shadow:none!important;
}
body.dark-mode .premium-card h2{color:#f2f5f9!important}
body.dark-mode .premium-sub{color:#909aa8!important}

body.dark-mode .premium-notice{
  background:#1f2430!important;
  border-color:var(--line)!important;
}
body.dark-mode .premium-notice:hover{
  background:#272d3c!important;
  border-color:var(--muted)!important;
}
body.dark-mode .premium-notice strong{color:#f2f5f9!important}
body.dark-mode .premium-notice small{color:#909aa8!important}
body.dark-mode .premium-notice small strong{color:#f2f5f9!important}
body.dark-mode .premium-notice>b{color:#909aa8!important}

body.dark-mode .premium-notice.debt{
  background:rgba(226,88,88,.10)!important;
  border-color:rgba(226,88,88,.28)!important;
}
body.dark-mode .premium-notice.debt small b{color:#ff8585!important}

body.dark-mode .premium-notice.expired{
  background:rgba(220,150,50,.10)!important;
  border-color:rgba(220,150,50,.28)!important;
}
body.dark-mode .premium-notice.expired small b{color:#f5b352!important}

body.dark-mode .premium-notice.low{
  background:#1f2430!important;
  border-color:var(--line)!important;
}
body.dark-mode .premium-notice.low small b{color:#a5b0c0!important}

body.dark-mode .premium-empty-notice{
  background:rgba(54,179,110,.10)!important;
  border-color:rgba(54,179,110,.25)!important;
}
body.dark-mode .premium-check{
  background:rgba(54,179,110,.20)!important;
  color:#36b36e!important;
}
body.dark-mode .premium-empty-notice strong{color:#4bd889!important}
body.dark-mode .premium-empty-notice small{color:#909aa8!important}

body.dark-mode .green-bg{background:rgba(54,179,110,.12)!important}
body.dark-mode .orange-bg{background:rgba(220,150,50,.12)!important}
body.dark-mode .blue-bg{background:rgba(91,141,239,.12)!important}
body.dark-mode .red-bg{background:rgba(226,88,88,.12)!important}

body.dark-mode .green-bg strong{color:#4bd889!important}
body.dark-mode .orange-bg strong{color:#f5b352!important}
body.dark-mode .blue-bg strong{color:#8cb2ff!important}
body.dark-mode .red-bg strong{color:#ff8585!important}

body.dark-mode .premium-stat small{color:#909aa8!important}

body.dark-mode .premium-birthday-row{
  background:#1f2430!important;
  border:1px solid var(--line)!important;
}
body.dark-mode .premium-birthday-row strong{color:#f2f5f9!important}
body.dark-mode .premium-birthday-row span{color:#909aa8!important}
body.dark-mode .premium-birthday-empty{color:#909aa8!important}

/* Complete Schedule System in Dark Mode */
body.dark-mode .standard-schedule-day{
  background:#181b23!important;
  border-color:var(--line)!important;
  box-shadow:none!important;
}
body.dark-mode .standard-schedule-day.today{
  border-color:var(--accent)!important;
  box-shadow:0 0 0 1px var(--accent-soft)!important;
}
body.dark-mode .standard-schedule-day-head{
  background:#151821!important;
  border-bottom-color:var(--line)!important;
}
body.dark-mode .standard-schedule-day-head strong{
  color:#f2f5f9!important;
}
body.dark-mode .standard-schedule-day-head span{
  color:#909aa8!important;
}
body.dark-mode .standard-schedule-day.today .standard-schedule-day-head{
  background:rgba(226,124,99,.15)!important;
}
body.dark-mode .standard-schedule-day.today .standard-schedule-day-head em{
  color:var(--accent)!important;
}
body.dark-mode .standard-schedule-list{
  background:#181b23!important;
}
body.dark-mode .standard-schedule-row{
  background:#1c212d!important;
  border-bottom-color:var(--line)!important;
  color:#f2f5f9!important;
}
body.dark-mode .standard-schedule-row:hover{
  background:#232938!important;
}
body.dark-mode .standard-schedule-row.type-individual{
  background:rgba(91,141,239,.12)!important;
  border-left:4px solid #5b8def!important;
}
body.dark-mode .standard-schedule-row.type-pair{
  background:rgba(72,168,104,.12)!important;
  border-left:4px solid #48a868!important;
}
body.dark-mode .standard-schedule-row.type-group{
  background:rgba(229,138,58,.12)!important;
  border-left:4px solid #e58a3a!important;
}
body.dark-mode .standard-schedule-row.type-individual:hover{
  background:rgba(91,141,239,.20)!important;
}
body.dark-mode .standard-schedule-row.type-pair:hover{
  background:rgba(72,168,104,.20)!important;
}
body.dark-mode .standard-schedule-row.type-group:hover{
  background:rgba(229,138,58,.20)!important;
}
body.dark-mode .standard-schedule-row.type-individual .standard-schedule-time{color:#8cb2ff!important}
body.dark-mode .standard-schedule-row.type-pair .standard-schedule-time{color:#72d192!important}
body.dark-mode .standard-schedule-row.type-group .standard-schedule-time{color:#f5ab67!important}
body.dark-mode .standard-schedule-main strong{
  color:#f2f5f9!important;
}
body.dark-mode .standard-schedule-main span{
  color:#909aa8!important;
}
body.dark-mode .standard-schedule-row.status-completed{
  background:rgba(54,179,110,.14)!important;
  border-left-color:#36b36e!important;
}
body.dark-mode .standard-schedule-row.status-cancelled-charged,
body.dark-mode .standard-schedule-row.status-no-show{
  background:rgba(226,88,88,.14)!important;
  border-left-color:#e25858!important;
  color:#ff8585!important;
}
body.dark-mode .standard-schedule-row.status-cancelled-free,
body.dark-mode .standard-schedule-row.status-rescheduled{
  background:rgba(132,142,157,.10)!important;
  border-left-color:#848e9d!important;
  opacity:.6!important;
}
body.dark-mode .standard-schedule-empty{
  color:#909aa8!important;
}

/* Expanded Weekly Grid in Dark Mode */
body.dark-mode .schedule-grid{
  background:#181b23!important;
  border-color:var(--line)!important;
  box-shadow:none!important;
}
body.dark-mode .time-axis{
  background:#13161e!important;
  border-right-color:var(--line)!important;
}
body.dark-mode .time-axis-head{
  border-bottom-color:var(--line)!important;
  color:#909aa8!important;
}
body.dark-mode .time-label{
  color:#909aa8!important;
}
body.dark-mode .schedule-days{
  background:var(--line)!important;
}
body.dark-mode .schedule-grid .schedule-day,
body.dark-mode .schedule-grid .schedule-day:nth-child(even),
body.dark-mode .schedule-grid .schedule-day:nth-child(odd){
  background:#181b23!important;
  border-right-color:var(--line)!important;
}
body.dark-mode .schedule-day-head{
  background:#151821!important;
  border-bottom-color:var(--line)!important;
  color:#f2f5f9!important;
}
body.dark-mode .schedule-day-head strong{color:#f2f5f9!important}
body.dark-mode .schedule-day-head span{color:#909aa8!important}
body.dark-mode .schedule-day.is-today .schedule-day-head{
  background:rgba(226,124,99,.15)!important;
}
body.dark-mode .schedule-day.is-today .schedule-day-head em{
  background:rgba(226,124,99,.25)!important;
  color:var(--accent)!important;
}
body.dark-mode .schedule-day-body,
body.dark-mode .schedule-day:nth-child(even) .schedule-day-body,
body.dark-mode .schedule-day:nth-child(odd) .schedule-day-body,
body.dark-mode .schedule-grid .schedule-day-body,
body.dark-mode .schedule-grid .schedule-day:nth-child(even) .schedule-day-body,
body.dark-mode .schedule-grid .schedule-day:nth-child(odd) .schedule-day-body{
  background:#181b23!important;
}
body.dark-mode .schedule-view-toggle{
  background:#151821!important;
  border:1px solid var(--line)!important;
}
body.dark-mode .schedule-view{
  background:transparent!important;
  color:#909aa8!important;
  box-shadow:none!important;
}
body.dark-mode .schedule-view.active{
  background:#262c3b!important;
  color:#f2f5f9!important;
  box-shadow:0 1px 4px rgba(0,0,0,.35)!important;
}
body.dark-mode .time-slot{
  border-bottom:1px solid #202532!important;
}
body.dark-mode .time-slot:hover{
  background:rgba(255,255,255,.03)!important;
}
body.dark-mode .schedule-hint-bar{
  background:#151821!important;
  border-color:var(--line)!important;
  color:#909aa8!important;
}
body.dark-mode .schedule-hint-bar .schedule-hours{
  color:#f2f5f9!important;
}
body.dark-mode .schedule-item{
  background:#1f2430!important;
  border-color:var(--line)!important;
  color:#f2f5f9!important;
}
body.dark-mode .schedule-item .schedule-item-name{
  color:#f2f5f9!important;
}
body.dark-mode .schedule-item.type-individual{
  background:rgba(91,141,239,.18)!important;
  border-left-color:#5b8def!important;
}
body.dark-mode .schedule-item.type-pair{
  background:rgba(72,168,104,.18)!important;
  border-left-color:#48a868!important;
}
body.dark-mode .schedule-item.type-group{
  background:rgba(229,138,58,.18)!important;
  border-left-color:#e58a3a!important;
}
body.dark-mode .schedule-item.status-completed{
  background:rgba(54,179,110,.18)!important;
  border-left-color:#36b36e!important;
}

/* Month View in Dark Mode */
body.dark-mode .month-calendar{
  background:#181b23!important;
  border-color:var(--line)!important;
}
body.dark-mode .month-weekdays{
  background:#151821!important;
  border-bottom-color:var(--line)!important;
  color:#909aa8!important;
}
body.dark-mode .month-weekdays>div{
  color:#909aa8!important;
}
body.dark-mode .month-grid{
  background:var(--line)!important;
}
body.dark-mode .month-cell{
  background:#181b23!important;
  color:#f2f5f9!important;
}
body.dark-mode .month-cell.today{
  background:#1a2336!important;
}
body.dark-mode .month-cell.outside{
  background:#12151d!important;
  color:#6c7686!important;
}
body.dark-mode .month-cell-date span{
  color:#f2f5f9!important;
}
body.dark-mode .month-add-day{
  background:#202532!important;
  border-color:var(--line)!important;
  color:#f2f5f9!important;
}
body.dark-mode .month-add-day:hover{
  background:#293040!important;
}
body.dark-mode .month-lesson{
  background:#1f2430!important;
  border-color:var(--line)!important;
  color:#f2f5f9!important;
}
body.dark-mode .month-lesson.type-individual{
  background:rgba(91,141,239,.18)!important;
  border-left-color:#5b8def!important;
}
body.dark-mode .month-lesson.type-pair{
  background:rgba(72,168,104,.18)!important;
  border-left-color:#48a868!important;
}
body.dark-mode .month-lesson.type-group{
  background:rgba(229,138,58,.18)!important;
  border-left-color:#e58a3a!important;
}
body.dark-mode .month-more{
  background:#202532!important;
  border-color:var(--line)!important;
  color:var(--accent)!important;
}

/* Finance Dynamics Chart */
.finance-chart-card{background:var(--card);border:1px solid var(--line);border-radius:var(--radius);padding:22px;margin-bottom:20px;box-shadow:var(--shadow)}
.chart-legend{display:flex;gap:18px;align-items:center;margin-bottom:18px;font-size:13px}
.chart-legend-item{display:flex;align-items:center;gap:6px}
.chart-dot{width:10px;height:10px;border-radius:3px}
.chart-dot.received{background:#4f7cff}
.chart-dot.earned{background:#2f9e5b}
.chart-bars-wrap{display:flex;align-items:flex-end;justify-content:space-between;gap:12px;min-height:170px;padding-top:20px;border-bottom:1px solid var(--line);overflow-x:auto}
.chart-month-col{display:flex;flex-direction:column;align-items:center;flex:1;min-width:55px;gap:8px}
.chart-bars-pair{display:flex;align-items:flex-end;gap:4px;height:120px;width:100%;justify-content:center}
.chart-bar{width:16px;border-radius:4px 4px 0 0;transition:height .3s ease;position:relative;cursor:pointer}
.chart-bar.received{background:#4f7cff}
.chart-bar.earned{background:#2f9e5b}
.chart-bar:hover::after{content:attr(data-tip);position:absolute;bottom:105%;left:50%;transform:translateX(-50%);background:#1f242d;color:#fff;padding:4px 7px;border-radius:6px;font-size:11px;white-space:nowrap;z-index:10;pointer-events:none}
.chart-month-label{font-size:12px;color:var(--muted);text-transform:capitalize}

/* Visual Polish & Design System Enhancements */
.brand-bar{display:flex;align-items:center;justify-content:space-between;padding:0 6px 18px}
.brand-bar .brand{display:flex;align-items:center;gap:9px;font-weight:800;font-size:21px;padding:0}
.brand-top-actions{display:flex;align-items:center;gap:6px}
.top-icon-btn{width:32px;height:32px;border-radius:9px;border:1px solid var(--line,#e2e8f0);background:var(--surface-2,#f1f3f5);color:var(--muted,#64748b);display:inline-flex;align-items:center;justify-content:center;cursor:pointer;transition:all .15s ease;padding:0}
.top-icon-btn:hover{background:var(--card,#fff);color:var(--text,#1e293b);border-color:var(--accent,#a45b46);transform:translateY(-1px);box-shadow:0 2px 6px rgba(0,0,0,.05)}
body.dark-mode .top-icon-btn{background:rgba(255,255,255,.06);border-color:rgba(255,255,255,.1);color:#94a3b8}
body.dark-mode .top-icon-btn:hover{background:rgba(255,255,255,.14);color:#fff;border-color:#f38b6d}
.sidebar-top .brand{display:flex;align-items:center;gap:9px;font-weight:800;font-size:21px;padding:0 10px 22px}
.brand-badge{width:28px;height:28px;background:var(--accent);color:#fff;border-radius:8px;display:flex;align-items:center;justify-content:center;font-size:15px;font-weight:900;box-shadow:0 3px 10px rgba(164,91,70,.25)}
.nav button{display:flex;align-items:center;gap:10px;font-size:13.5px;font-weight:600;padding:10px 12px;border-radius:10px;transition:all .18s cubic-bezier(0.16, 1, 0.3, 1)}
.nav button svg{opacity:.75;transition:opacity .15s}
.nav button:hover svg,.nav button.active svg{opacity:1}
.theme-toggle-btn{display:flex;align-items:center;justify-content:center;gap:8px}

/* User Avatars */
.user-avatar{border-radius:50%;display:inline-flex;align-items:center;justify-content:center;color:#fff;font-weight:800;letter-spacing:-0.5px;user-select:none;box-shadow:0 2px 6px rgba(0,0,0,.15);flex-shrink:0}
.student-table-user{display:flex;align-items:center;gap:11px}
.student-table-user strong{font-size:13.5px;font-weight:700}

/* Telegram Reminder Button & Modal */
.btn-telegram{background:rgba(0,136,204,.09)!important;color:#0088cc!important;border-color:rgba(0,136,204,.25)!important;font-weight:650}
.btn-telegram:hover{background:rgba(0,136,204,.16)!important;border-color:#0088cc!important}
body.dark-mode .btn-telegram{background:rgba(41,167,238,.14)!important;color:#4dc2ff!important;border-color:rgba(41,167,238,.3)!important}
body.dark-mode .btn-telegram:hover{background:rgba(41,167,238,.24)!important;border-color:#4dc2ff!important}

.template-selector-tabs{display:flex;gap:6px;background:var(--surface,#f0f1f3);padding:4px;border-radius:10px;border:1px solid var(--line)}
body.dark-mode .template-selector-tabs{background:#14171f;border-color:var(--line)}
.tpl-tab{flex:1;border:0;background:transparent;color:var(--muted);padding:8px 10px;border-radius:8px;font-size:12px;font-weight:650;cursor:pointer;transition:all .15s ease;white-space:nowrap}
.tpl-tab:hover{color:var(--text)}
.tpl-tab.active{background:#fff;color:var(--text);box-shadow:0 2px 6px rgba(0,0,0,.08)}
body.dark-mode .tpl-tab.active{background:#232836;color:#f2f5f9;box-shadow:0 2px 6px rgba(0,0,0,.35)}

/* Glassmorphism Modals */
.modalback{backdrop-filter:blur(8px);-webkit-backdrop-filter:blur(8px)}
.btn{transition:all .15s cubic-bezier(0.16, 1, 0.3, 1)}
.btn:active{transform:scale(0.97)}

/* KPI Card Ambient Highlights in Dark Mode */
body.dark-mode .premium-kpi:nth-child(1){border-color:rgba(54,179,110,.25)!important;box-shadow:0 0 20px rgba(54,179,110,.04)!important}
body.dark-mode .premium-kpi:nth-child(2){border-color:rgba(91,141,239,.25)!important;box-shadow:0 0 20px rgba(91,141,239,.04)!important}
body.dark-mode .premium-kpi:nth-child(3){border-color:rgba(220,150,50,.25)!important;box-shadow:0 0 20px rgba(220,150,50,.04)!important}
body.dark-mode .premium-kpi:nth-child(4){border-color:rgba(168,130,240,.25)!important;box-shadow:0 0 20px rgba(168,130,240,.04)!important}

/* Interactive Clickable Finance KPI Cards */
.clickable-stat{cursor:pointer;position:relative;transition:all .18s cubic-bezier(0.16, 1, 0.3, 1);user-select:none}
.clickable-stat:hover{transform:translateY(-2px);box-shadow:0 8px 24px rgba(0,0,0,.08)}
body.dark-mode .clickable-stat:hover{box-shadow:0 8px 24px rgba(0,0,0,.35)}
.clickable-stat.active-stat{border-color:var(--accent)!important;box-shadow:0 0 0 2px var(--accent-soft)!important}
body.dark-mode .clickable-stat.active-stat{border-color:var(--accent)!important;box-shadow:0 0 0 2px rgba(226,124,99,.3)!important}
.stat-top{display:flex;justify-content:space-between;align-items:center;gap:6px;margin-bottom:2px}
.stat-top .label{min-width:0;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;font-size:12.5px}
.stat-pill{display:inline-flex;align-items:center;gap:3px;font-size:11px;font-weight:750;padding:2.5px 8px;border-radius:999px;background:rgba(54,179,110,.12);color:#2f8d59;white-space:nowrap;flex-shrink:0}
.stat-pill.green{background:rgba(47,158,91,.12);color:#279155}
.stat-pill.blue{background:rgba(91,141,239,.12);color:#3c72d6}
.stat-pill.orange{background:rgba(226,88,88,.12);color:#d24747}
.stat-pill.purple{background:rgba(168,130,240,.12);color:#8b5cf6}
.stat-hint{font-size:11px;color:var(--muted);margin-top:6px}

/* Finance Tabs Navigation */
.finance-tabs-nav{display:flex;gap:8px;margin-bottom:14px;overflow-x:auto;padding-bottom:2px}
.fin-tab-btn{padding:8px 14px;border-radius:10px;border:1px solid var(--line);background:var(--card);color:var(--muted);font-size:13px;font-weight:650;cursor:pointer;transition:all .15s ease;white-space:nowrap}
.fin-tab-btn:hover{color:var(--text);border-color:var(--muted)}
.fin-tab-btn.active{background:var(--accent-soft);color:var(--accent);border-color:var(--accent);font-weight:750}
body.dark-mode .fin-tab-btn{background:#181b23;border-color:var(--line);color:#909aa8}
body.dark-mode .fin-tab-btn:hover{color:#f2f5f9;border-color:var(--muted)}
body.dark-mode .fin-tab-btn.active{background:var(--accent-soft);color:var(--accent);border-color:var(--accent)}

/* Format Analytics Breakdown Cards */
.format-analytics-grid{display:grid;grid-template-columns:repeat(3,1fr);gap:14px;margin-bottom:16px}
@media(max-width:700px){.format-analytics-grid{grid-template-columns:1fr}}
.format-stat-card{background:var(--surface,#f7f8fa);border:1px solid var(--line);border-radius:14px;padding:16px}
body.dark-mode .format-stat-card{background:#141720;border-color:var(--line)}
.format-card-top{display:flex;justify-content:space-between;align-items:center;margin-bottom:8px}
.format-card-top strong{font-size:12px;color:var(--muted)}
.format-card-val{font-size:24px;font-weight:800;letter-spacing:-.5px;margin-bottom:4px}
.format-card-sub{font-size:12px;color:var(--muted)}
.format-progress-bar-wrap{background:var(--surface,#f0f1f3);padding:6px;border-radius:12px;border:1px solid var(--line)}
body.dark-mode .format-progress-bar-wrap{background:#141720;border-color:var(--line)}
.format-progress-bar{display:flex;height:12px;border-radius:6px;overflow:hidden;gap:2px}

/* Monthly Analytics Modal */
.analytics-month-selector{display:flex;align-items:center;gap:10px;margin-bottom:16px;padding:12px 14px;background:var(--surface,#f7f8fa);border-radius:12px;border:1px solid var(--line)}
body.dark-mode .analytics-month-selector{background:#141720;border-color:var(--line)}
.analytics-month-selector label{font-size:13px;color:var(--muted);font-weight:600}
.analytics-kpi-grid{display:grid;grid-template-columns:1fr 1fr;gap:12px;margin-bottom:16px}
@media(max-width:600px){.analytics-kpi-grid{grid-template-columns:1fr}}
.analytics-card{background:var(--card);border:1px solid var(--line);border-radius:14px;padding:15px}
body.dark-mode .analytics-card{background:#141720;border-color:var(--line)}
.analytics-label{font-size:12px;color:var(--muted);font-weight:600;margin-bottom:4px}
.analytics-val{font-size:24px;font-weight:800;letter-spacing:-.5px}
.analytics-sub{font-size:11.5px;color:var(--muted);margin-top:6px;display:flex;align-items:center;gap:6px;flex-wrap:wrap}
.analytics-delta{display:inline-flex;align-items:center;padding:2px 6px;border-radius:6px;font-size:11px;font-weight:750}
.analytics-delta.green{background:rgba(54,179,110,.12);color:#2f8d59}
.analytics-delta.red{background:rgba(226,88,88,.12);color:#d24747}
.analytics-delta.gray{background:rgba(144,154,168,.12);color:var(--muted)}
body.dark-mode .analytics-delta.green{background:rgba(54,179,110,.18);color:#4bd889}
body.dark-mode .analytics-delta.red{background:rgba(226,88,88,.18);color:#ff8585}

.analytics-insights-card{background:var(--surface,#f7f8fa);border:1px solid var(--line);border-radius:14px;padding:16px}
body.dark-mode .analytics-insights-card{background:#141720;border-color:var(--line)}
.analytics-bullets{margin:0;padding-left:18px;display:flex;flex-direction:column;gap:7px;font-size:13px;line-height:1.45}
.analytics-bullets li{color:var(--text)}

/* Student Weekly Schedule Editor in Dark Mode */
body.dark-mode .schedule-editor{
  background:#181b23!important;
  border-color:var(--line)!important;
}
body.dark-mode .schedule-hint{
  background:#141720!important;
  border-color:var(--line)!important;
  color:#f2f5f9!important;
}
body.dark-mode .schedule-hint-icon{
  background:rgba(226,124,99,.18)!important;
  color:var(--accent)!important;
}
body.dark-mode .schedule-hint span:not(.schedule-hint-icon){
  color:#909aa8!important;
}
body.dark-mode .schedule-row{
  background:#181b23!important;
  border-bottom-color:var(--line)!important;
}
body.dark-mode .schedule-row:hover{
  background:#202532!important;
}
body.dark-mode .schedule-day strong{
  color:#f2f5f9!important;
}
body.dark-mode .schedule-day span{
  background:#202532!important;
  color:#909aa8!important;
}
body.dark-mode .schedule-time input{
  background:#12151d!important;
  border-color:var(--line)!important;
  color:#f2f5f9!important;
}
body.dark-mode .schedule-time input:focus{
  border-color:var(--accent)!important;
  box-shadow:0 0 0 3px rgba(226,124,99,.25)!important;
  background:#161922!important;
}
body.dark-mode .schedule-time-icon{
  color:#909aa8!important;
}
body.dark-mode .schedule-clear{
  background:#202532!important;
  border-color:rgba(226,88,88,.3)!important;
  color:#ff8585!important;
}
body.dark-mode .schedule-clear:hover{
  background:rgba(226,88,88,.2)!important;
  border-color:#ff8585!important;
}

/* Redesigned Modern Schedule Editor */
.schedule-preset-bar{display:flex;align-items:center;gap:8px;margin-bottom:14px;padding:8px 12px;background:var(--surface,#f7f8fa);border-radius:12px;border:1px solid var(--line);flex-wrap:wrap}
body.dark-mode .schedule-preset-bar{background:#141720;border-color:var(--line)}
.preset-label{font-size:12px;color:var(--muted);font-weight:650}
.preset-btn{border:1px solid var(--line);background:var(--card);color:var(--text);padding:5px 10px;border-radius:8px;font-size:12px;font-weight:650;cursor:pointer;transition:all .15s ease}
.preset-btn:hover{border-color:var(--accent);color:var(--accent)}
.preset-btn.clear{color:#e25858;border-color:rgba(226,88,88,.3);margin-left:auto}
.preset-btn.clear:hover{background:rgba(226,88,88,.1);border-color:#e25858}
body.dark-mode .preset-btn{background:#1c212d;border-color:var(--line);color:#f2f5f9}
body.dark-mode .preset-btn:hover{background:#252c3c;border-color:var(--accent);color:var(--accent)}
body.dark-mode .preset-btn.clear{color:#ff8585;border-color:rgba(226,88,88,.3)}
body.dark-mode .preset-btn.clear:hover{background:rgba(226,88,88,.18);border-color:#ff8585}

.schedule-editor-modern{border:1px solid var(--line);border-radius:14px;overflow:hidden;background:var(--card)}
body.dark-mode .schedule-editor-modern{background:#181b23;border-color:var(--line)}

.schedule-row{display:flex;align-items:center;justify-content:space-between;gap:14px;padding:10px 16px;border-bottom:1px solid var(--line);transition:all .18s ease;min-height:56px}
.schedule-row:last-child{border-bottom:0}
.schedule-row:hover{background:var(--surface,#faf9f8)}
body.dark-mode .schedule-row:hover{background:#1d222e!important}
.schedule-row.is-active{background:rgba(164,91,70,.04)}
body.dark-mode .schedule-row.is-active{background:rgba(226,124,99,.06)!important}

.schedule-day-info{display:flex;align-items:center;gap:12px}
.day-short-badge{width:32px;height:32px;border-radius:9px;background:var(--surface,#f0f1f3);color:var(--muted);font-size:11.5px;font-weight:800;display:grid;place-items:center;letter-spacing:-0.2px;transition:all .15s}
body.dark-mode .day-short-badge{background:#202532;color:#909aa8}
.schedule-row.is-active .day-short-badge{background:var(--accent);color:#fff}
body.dark-mode .schedule-row.is-active .day-short-badge{background:var(--accent);color:#fff}

.day-name-wrap{display:flex;flex-direction:column;gap:1px}
.day-name-wrap strong{font-size:13.5px;font-weight:700}
body.dark-mode .day-name-wrap strong{color:#f2f5f9}
.day-status-label{font-size:11px;color:var(--muted)}
.schedule-row.is-active .day-status-label{color:var(--accent);font-weight:600}

.schedule-time-control{display:flex;align-items:center;gap:8px}
.schedule-time-input{height:36px;padding:0 12px;border:1px solid var(--line);border-radius:10px;background:var(--surface,#f9f9fa);color:var(--text);font-size:13.5px;font-weight:700;outline:none;transition:all .15s ease}
.schedule-time-input:focus{border-color:var(--accent);box-shadow:0 0 0 3px var(--accent-soft);background:#fff}
body.dark-mode .schedule-time-input{background:#12151d;border-color:var(--line);color:#f2f5f9}
body.dark-mode .schedule-time-input:focus{border-color:var(--accent);box-shadow:0 0 0 3px rgba(226,124,99,.25);background:#161922}

.schedule-clear-btn{width:30px;height:30px;border-radius:8px;border:1px solid transparent;background:transparent;color:var(--muted);cursor:pointer;font-size:13px;display:grid;place-items:center;opacity:0;pointer-events:none;transition:all .15s ease}
.schedule-clear-btn.visible{opacity:1;pointer-events:auto}
.schedule-clear-btn:hover{background:rgba(226,88,88,.12);color:#e25858;border-color:rgba(226,88,88,.25)}
body.dark-mode .schedule-clear-btn:hover{background:rgba(226,88,88,.2);color:#ff8585;border-color:rgba(226,88,88,.4)}

/* Optimized Grouped Lesson Modal */
.lesson-modal-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
}
.lesson-modal-head .actions {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
  justify-content: flex-end;
}
.btn.icon-btn {
  padding: 6px 9px;
  font-size: 13.5px;
}

.lesson-participants-wrap {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.lesson-participant-card {
  background: var(--surface, #f8f9fa);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 12px 14px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
body.dark-mode .lesson-participant-card {
  background: #141720;
  border-color: rgba(255, 255, 255, 0.08);
}

.lesson-part-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}
.lesson-part-user {
  display: flex;
  align-items: center;
  gap: 10px;
}
.lesson-part-details {
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.lesson-part-name-row {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}
.lesson-part-name {
  font-size: 15px;
  font-weight: 750;
  cursor: pointer;
  transition: color 0.15s;
}
.lesson-part-name:hover {
  color: var(--accent);
}

.lesson-part-status-actions {
  display: flex;
  align-items: center;
  gap: 6px;
}

.lesson-part-footer-toolbar {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  padding-top: 8px;
  border-top: 1px solid rgba(0, 0, 0, 0.06);
}
body.dark-mode .lesson-part-footer-toolbar {
  border-top-color: rgba(255, 255, 255, 0.06);
}
.lesson-student-shortcuts {
  display: flex;
  align-items: center;
  gap: 6px;
}

.btn.primary-green {
  background: #2f8d59 !important;
  color: #fff !important;
  border-color: #2f8d59 !important;
  font-weight: 700;
}
.btn.primary-green:hover {
  background: #27774b !important;
  border-color: #27774b !important;
}
body.dark-mode .btn.primary-green {
  background: #257a4a !important;
  color: #fff !important;
  border-color: #257a4a !important;
}
body.dark-mode .btn.primary-green:hover {
  background: #2ea060 !important;
}

.btn-payment {
  background: rgba(226, 124, 99, 0.09) !important;
  color: var(--accent) !important;
  border-color: rgba(226, 124, 99, 0.28) !important;
  font-weight: 650;
}
.btn-payment:hover {
  background: rgba(226, 124, 99, 0.18) !important;
  border-color: var(--accent) !important;
}
body.dark-mode .btn-payment {
  background: rgba(226, 124, 99, 0.15) !important;
  color: #ff9e87 !important;
  border-color: rgba(226, 124, 99, 0.35) !important;
}
body.dark-mode .btn-payment:hover {
  background: rgba(226, 124, 99, 0.25) !important;
  border-color: #ff9e87 !important;
}

/* Settings Page Styling - Modern Refined UI */
.settings-container {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

/* Modern Segmented Navigation Tabs */
.settings-nav-tabs {
  display: inline-flex;
  background: var(--surface-2, #eef1f5);
  border-radius: 14px;
  padding: 5px;
  gap: 4px;
  border: 1px solid var(--line, #e2e8f0);
  align-self: flex-start;
  flex-wrap: wrap;
}
body.dark-mode .settings-nav-tabs {
  background: #151922;
  border-color: rgba(255, 255, 255, 0.08);
}

.settings-tab-btn {
  padding: 9px 18px;
  border-radius: 10px;
  border: 0;
  background: transparent;
  color: var(--muted, #64748b);
  font-size: 13.5px;
  font-weight: 650;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  transition: all 0.18s ease;
  user-select: none;
}
.settings-tab-btn:hover {
  color: var(--text, #1e293b);
  background: rgba(0, 0, 0, 0.03);
}
body.dark-mode .settings-tab-btn:hover {
  color: #f1f5f9;
  background: rgba(255, 255, 255, 0.05);
}
.settings-tab-btn.active {
  background: var(--card, #fff);
  color: var(--accent, #a45b46);
  font-weight: 750;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.06);
}
body.dark-mode .settings-tab-btn.active {
  background: #242b38;
  color: #ff9e87;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
}

/* Settings Cards and Grids */
.settings-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 18px;
}
@media (max-width: 960px) {
  .settings-grid {
    grid-template-columns: 1fr;
  }
}

.settings-card {
  padding: 22px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  border-radius: 16px;
  background: var(--card, #fff);
  border: 1px solid var(--line, #e2e8f0);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.03);
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
.settings-card:hover {
  border-color: rgba(164, 91, 70, 0.3);
}

.settings-card-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
}
.settings-card-title {
  font-size: 15.5px;
  font-weight: 750;
  color: var(--text, #1e293b);
  display: flex;
  align-items: center;
  gap: 8px;
}
.settings-card-desc {
  font-size: 12.5px;
  color: var(--muted, #64748b);
  margin-top: 3px;
}

/* Tag Pills Bar */
.tag-pills-bar {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
  padding: 6px 10px;
  background: var(--surface, #f8fafc);
  border-radius: 10px;
  border: 1px solid var(--line, #e2e8f0);
}
body.dark-mode .tag-pills-bar {
  background: #141720;
  border-color: rgba(255, 255, 255, 0.07);
}
.tag-hint {
  font-size: 11.5px;
  color: var(--muted, #64748b);
  font-weight: 600;
  margin-right: 2px;
}
.tag-pill {
  border: 1px solid var(--line, #cbd5e1);
  background: var(--card, #fff);
  color: var(--text, #334155);
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: 11.5px;
  padding: 3px 8px;
  border-radius: 6px;
  cursor: pointer;
  font-weight: 600;
  transition: all 0.15s ease;
}
.tag-pill:hover {
  border-color: var(--accent, #a45b46);
  color: var(--accent, #a45b46);
  background: var(--accent-soft, #f3e7e2);
  transform: translateY(-1px);
}
body.dark-mode .tag-pill {
  background: #1c212d;
  border-color: rgba(255, 255, 255, 0.12);
  color: #e2e8f0;
}
body.dark-mode .tag-pill:hover {
  background: rgba(226, 124, 99, 0.2);
  border-color: var(--accent);
  color: #ff9e87;
}

.settings-textarea {
  width: 100%;
  font-family: inherit;
  font-size: 13.5px;
  line-height: 1.55;
  padding: 12px 14px;
  border: 1.5px solid var(--line, #e2e8f0);
  border-radius: 12px;
  background: var(--card, #fff);
  color: var(--text, #1e293b);
  resize: vertical;
  outline: none;
  transition: border-color 0.15s, box-shadow 0.15s;
}
.settings-textarea:focus {
  border-color: var(--accent, #a45b46);
  box-shadow: 0 0 0 3.5px var(--accent-soft, #f3e7e2);
}
body.dark-mode .settings-textarea {
  background: #12151d;
  border-color: rgba(255, 255, 255, 0.1);
  color: #f1f5f9;
}
body.dark-mode .settings-textarea:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3.5px rgba(226, 124, 99, 0.25);
}

/* Modern Bank Cards Manager */
.bank-cards-container {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.bank-cards-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.bank-card-row {
  display: grid;
  grid-template-columns: 180px 1fr 36px;
  gap: 12px;
  align-items: center;
  padding: 12px 14px;
  background: var(--surface, #f8fafc);
  border: 1.5px solid var(--line, #e2e8f0);
  border-radius: 14px;
  transition: all 0.15s ease;
}
.bank-card-row:hover {
  border-color: rgba(164, 91, 70, 0.35);
  background: var(--card, #fff);
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.04);
}
body.dark-mode .bank-card-row {
  background: #141720;
  border-color: rgba(255, 255, 255, 0.08);
}
body.dark-mode .bank-card-row:hover {
  background: #181d28;
  border-color: rgba(255, 255, 255, 0.15);
}
@media (max-width: 680px) {
  .bank-card-row {
    grid-template-columns: 1fr 36px;
  }
  .bank-field-name {
    grid-column: 1 / 2;
  }
  .bank-field-num {
    grid-column: 1 / 2;
  }
}

.bank-field-name, .bank-field-num {
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.bank-field-name label, .bank-field-num label {
  font-size: 11.5px;
  color: var(--muted, #64748b);
  font-weight: 650;
}
.bank-name-input, .bank-num-input {
  height: 38px;
  padding: 0 12px;
  border: 1px solid var(--line, #cbd5e1);
  border-radius: 9px;
  background: var(--card, #fff);
  color: var(--text, #1e293b);
  font-size: 13.5px;
  font-weight: 600;
  outline: none;
  transition: border-color 0.15s, box-shadow 0.15s;
}
.bank-name-input:focus, .bank-num-input:focus {
  border-color: var(--accent, #a45b46);
  box-shadow: 0 0 0 3px var(--accent-soft, #f3e7e2);
}
body.dark-mode .bank-name-input, body.dark-mode .bank-num-input {
  background: #1c212d;
  border-color: rgba(255, 255, 255, 0.12);
  color: #f1f5f9;
}

.bank-del-btn {
  width: 36px;
  height: 38px;
  border-radius: 9px;
  border: 1px solid rgba(226, 88, 88, 0.25);
  background: transparent;
  color: #e25858;
  font-size: 14px;
  cursor: pointer;
  display: grid;
  place-items: center;
  transition: all 0.15s;
}
.bank-del-btn:hover {
  background: rgba(226, 88, 88, 0.12);
  border-color: #e25858;
}
body.dark-mode .bank-del-btn {
  border-color: rgba(226, 88, 88, 0.3);
  color: #ff8585;
}
body.dark-mode .bank-del-btn:hover {
  background: rgba(226, 88, 88, 0.2);
  border-color: #ff8585;
}

/* Security Status & Hero Header */
.sec-hero-card {
  padding: 24px;
  border-radius: 18px;
  background: linear-gradient(135deg, rgba(164, 91, 70, 0.06), rgba(164, 91, 70, 0.02));
  border: 1.5px solid rgba(164, 91, 70, 0.18);
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 16px;
}
body.dark-mode .sec-hero-card {
  background: linear-gradient(135deg, rgba(226, 124, 99, 0.12), rgba(226, 124, 99, 0.04));
  border-color: rgba(226, 124, 99, 0.25);
}
.sec-status-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 750;
  letter-spacing: 0.2px;
}
.sec-status-badge.active {
  background: rgba(47, 158, 91, 0.12);
  color: #279155;
  border: 1px solid rgba(47, 158, 91, 0.25);
}
.sec-status-badge.inactive {
  background: rgba(100, 116, 139, 0.12);
  color: var(--muted, #64748b);
  border: 1px solid rgba(100, 116, 139, 0.2);
}

/* Live Preview Box */
.settings-preview-box {
  padding: 14px 16px;
  background: var(--surface, #f8fafc);
  border: 1px dashed var(--line, #cbd5e1);
  border-radius: 12px;
  font-size: 13px;
  line-height: 1.6;
  white-space: pre-wrap;
  color: var(--text, #334155);
}
body.dark-mode .settings-preview-box {
  background: #141720;
  border-color: rgba(255, 255, 255, 0.12);
  color: #e2e8f0;
}

/* Backup Boxes */
.backup-action-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
}
@media (max-width: 760px) {
  .backup-action-grid {
    grid-template-columns: 1fr;
  }
}
.backup-box {
  padding: 20px;
  border-radius: 14px;
  background: var(--surface, #f8fafc);
  border: 1px solid var(--line, #e2e8f0);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 14px;
}
body.dark-mode .backup-box {
  background: #141720;
  border-color: rgba(255, 255, 255, 0.08);
}
.backup-box-title {
  font-size: 15px;
  font-weight: 750;
  color: var(--text, #1e293b);
  display: flex;
  align-items: center;
  gap: 8px;
}
.backup-box-desc {
  font-size: 12.5px;
  color: var(--muted, #64748b);
  line-height: 1.5;
  margin: 0;
}

/* Birthday Celebration Banner on Dashboard */
.dash-birthday-banner{display:flex;justify-content:space-between;align-items:center;padding:14px 18px;background:linear-gradient(135deg, rgba(236,72,153,.12), rgba(244,63,94,.12));border:1px solid rgba(236,72,153,.3);border-radius:14px;margin-bottom:16px;flex-wrap:wrap;gap:12px}
body.dark-mode .dash-birthday-banner{background:linear-gradient(135deg, rgba(236,72,153,.2), rgba(244,63,94,.2));border-color:rgba(236,72,153,.4)}
.dash-bday-left{display:flex;align-items:center;gap:12px}
.dash-bday-icon{font-size:26px}
.dash-bday-title{font-size:12px;color:var(--muted);font-weight:700;text-transform:uppercase;letter-spacing:0.5px}
.dash-bday-names{font-size:16px;font-weight:800;color:var(--text);margin-top:2px}
.dash-bday-actions{display:flex;gap:8px}

/* Compact High-Density Dashboard Toolbar */
.dash-quick-toolbar {
  display: flex !important;
  justify-content: space-between !important;
  align-items: center !important;
  margin-bottom: 10px !important;
  gap: 8px !important;
  flex-wrap: nowrap !important;
  width: 100% !important;
  box-sizing: border-box !important;
}
.dash-date-badge {
  display: inline-flex !important;
  align-items: center !important;
  gap: 4px !important;
  font-size: 13px !important;
  font-weight: 750 !important;
  color: var(--text) !important;
  white-space: nowrap !important;
  flex: none !important;
}
.ddb-icon {
  font-size: 14px !important;
}
.ddb-text {
  color: var(--text) !important;
}
.ddb-weekday {
  color: var(--muted) !important;
  font-size: 12px !important;
  font-weight: 600 !important;
  text-transform: uppercase !important;
}
.dash-date-pill {
  display: inline-flex !important;
  align-items: center !important;
  gap: 5px !important;
  padding: 4px 9px !important;
  background: var(--surface, #f8fafc) !important;
  border: 1px solid var(--line, #e2e8f0) !important;
  border-radius: 999px !important;
  font-size: 11.5px !important;
  font-weight: 600 !important;
  color: var(--text, #1e293b) !important;
  white-space: nowrap !important;
  flex: none !important;
  text-transform: capitalize !important;
}
.dash-date-pill span {
  font-size: 11.5px !important;
}
body.dark-mode .dash-date-pill {
  background: #141720 !important;
  border-color: var(--line) !important;
  color: #e2e8f0 !important;
}
.dash-quick-toolbar .dash-actions,
.dash-quick-toolbar .dash-quick-actions {
  display: flex !important;
  align-items: center !important;
  justify-content: flex-end !important;
  gap: 6px !important;
  flex: none !important;
  margin-left: auto !important;
  width: auto !important;
}
.dash-quick-toolbar .dash-actions .btn,
.dash-quick-toolbar .dash-quick-actions .btn {
  height: 28px !important;
  padding: 0 10px !important;
  font-size: 11.5px !important;
  font-weight: 700 !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  white-space: nowrap !important;
  border-radius: 8px !important;
  flex: none !important;
  width: auto !important;
}

/* Today's Schedule Live Feed on Dashboard (Ultra-Compact) */
.dash-today-card.compact-today-card {
  padding: 12px 14px;
  border-radius: 16px;
  margin-bottom: 12px;
}
.compact-card-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px;
}
.dash-today-head-text h2 {
  font-size: 15px;
  font-weight: 800;
  margin: 0;
  display: flex;
  align-items: center;
  gap: 5px;
}
.dash-today-head-text h2 span {
  font-size: 13px;
  color: var(--muted);
  font-weight: 600;
}
.dash-today-head-text .premium-sub {
  font-size: 11px;
  color: var(--muted);
  margin-top: 1px;
}
.compact-link-btn {
  padding: 4px 8px !important;
  font-size: 11.5px !important;
  border-radius: 7px !important;
}

.compact-today-list {
  display: flex;
  flex-direction: column;
  gap: 5px;
  margin-top: 0;
}
.dash-today-row.compact-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 7px 10px;
  border-radius: 11px;
  background: var(--surface, #f8fafc);
  border: 1px solid var(--line, #e2e8f0);
  min-height: 48px;
  transition: all 0.15s ease;
  cursor: pointer;
}
.dash-today-row.compact-row:hover {
  border-color: var(--accent);
  background: var(--card, #fff);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
}
body.dark-mode .dash-today-row.compact-row {
  background: #141720;
  border-color: var(--line);
}
body.dark-mode .dash-today-row.compact-row:hover {
  background: #1c212d;
  border-color: var(--accent);
}

.dash-today-time {
  min-width: 44px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  line-height: 1;
}
.dash-today-time strong {
  font-size: 13.5px;
  font-weight: 800;
  letter-spacing: -0.3px;
  color: var(--text);
}

/* Mobile Today's Schedule Card (Apple Calendar Style) */
.apple-sch-row-mob {
  display: flex !important;
  align-items: center !important;
  gap: 8px !important;
  padding: 5px 6px !important;
  border-radius: 8px !important;
  cursor: pointer !important;
  transition: background 0.14s ease !important;
  border: 1px solid transparent !important;
}
.apple-sch-row-mob:hover,
.apple-sch-row-mob:active {
  background: var(--surface, #f8fafc) !important;
}
body.dark-mode .apple-sch-row-mob:hover,
body.dark-mode .apple-sch-row-mob:active {
  background: #181c27 !important;
}
.asrm-time {
  min-width: 38px !important;
  flex-shrink: 0 !important;
}
.asrm-time strong {
  font-size: 13px !important;
  font-weight: 800 !important;
  letter-spacing: -0.2px !important;
  color: var(--text) !important;
  line-height: 1 !important;
}
body.dark-mode .asrm-time strong {
  color: #f8fafc !important;
}
.asrm-stripe {
  width: 3px !important;
  height: 22px !important;
  border-radius: 3px !important;
  flex-shrink: 0 !important;
}
.asrm-stripe.individual { background: #2563eb !important; }
.asrm-stripe.pair { background: #16a34a !important; }
.asrm-stripe.group { background: #9333ea !important; }
.asrm-stripe.deducted-red { background: #ef4444 !important; }
.asrm-stripe.cancelled-gray,
.asrm-stripe.resched-gray { background: #94a3b8 !important; }

/* Dimming for completed, cancelled and rescheduled lessons */
.apple-sch-row-mob.is-completed,
.apple-sch-row-mob.is-cancelled,
.apple-sch-row-mob.is-rescheduled {
  opacity: 0.5 !important;
  transition: opacity 0.15s ease !important;
}
.apple-sch-row-mob.is-completed:hover,
.apple-sch-row-mob.is-completed:active,
.apple-sch-row-mob.is-cancelled:hover,
.apple-sch-row-mob.is-cancelled:active,
.apple-sch-row-mob.is-rescheduled:hover,
.apple-sch-row-mob.is-rescheduled:active {
  opacity: 0.88 !important;
}

.asrm-main {
  display: flex !important;
  flex-direction: column !important;
  gap: 1px !important;
  flex: 1 1 auto !important;
  min-width: 0 !important;
}
.asrm-name {
  font-size: 13px !important;
  font-weight: 750 !important;
  color: var(--text) !important;
  white-space: nowrap !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
  line-height: 1.15 !important;
}
body.dark-mode .asrm-name {
  color: #f8fafc !important;
}
.asrm-meta {
  font-size: 10.5px !important;
  font-weight: 550 !important;
  color: var(--muted) !important;
  white-space: nowrap !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
  line-height: 1.1 !important;
}

.asrm-status {
  display: flex !important;
  align-items: center !important;
  flex-shrink: 0 !important;
}
.asrm-pill {
  font-size: 10px !important;
  font-weight: 750 !important;
  padding: 2px 6px !important;
  border-radius: 6px !important;
  line-height: 1.15 !important;
  white-space: nowrap !important;
}
.asrm-pill.done {
  background: rgba(22, 163, 74, 0.1) !important;
  color: #16a34a !important;
}
body.dark-mode .asrm-pill.done {
  background: rgba(34, 197, 94, 0.16) !important;
  color: #4ade80 !important;
}
/* Neutral Gray for standard cancellation */
.asrm-pill.cancelled {
  background: var(--surface-2, #f1f4f9) !important;
  color: var(--muted, #64748b) !important;
  border: 1px solid rgba(0, 0, 0, 0.04) !important;
}
body.dark-mode .asrm-pill.cancelled {
  background: #1e2433 !important;
  color: #94a3b8 !important;
  border-color: rgba(255, 255, 255, 0.08) !important;
}
/* Neutral Gray for rescheduled */
.asrm-pill.resched {
  background: var(--surface-2, #f1f4f9) !important;
  color: var(--muted, #64748b) !important;
  border: 1px solid rgba(0, 0, 0, 0.04) !important;
}
body.dark-mode .asrm-pill.resched {
  background: #1e2433 !important;
  color: #94a3b8 !important;
  border-color: rgba(255, 255, 255, 0.08) !important;
}
/* Red Pill only for Cancellation with Deduction */
.asrm-pill.cancelled-charged {
  background: rgba(239, 68, 68, 0.12) !important;
  color: #ef4444 !important;
  border: 1px solid rgba(239, 68, 68, 0.25) !important;
}
body.dark-mode .asrm-pill.cancelled-charged {
  background: rgba(239, 68, 68, 0.2) !important;
  color: #f87171 !important;
  border-color: rgba(239, 68, 68, 0.4) !important;
}

.asrm-quick-done {
  font-family: inherit !important;
  font-size: 10.5px !important;
  font-weight: 700 !important;
  padding: 2.5px 7px !important;
  border-radius: 6px !important;
  background: #f1f4f9 !important;
  color: var(--text) !important;
  border: 1px solid rgba(0, 0, 0, 0.04) !important;
  cursor: pointer !important;
  transition: all 0.14s ease !important;
  display: inline-flex !important;
  align-items: center !important;
  gap: 3px !important;
}
.asrm-quick-done:hover,
.asrm-quick-done:active {
  background: #16a34a !important;
  color: #ffffff !important;
  border-color: #16a34a !important;
}
body.dark-mode .asrm-quick-done {
  background: #1e2433 !important;
  color: #f8fafc !important;
  border-color: rgba(255, 255, 255, 0.08) !important;
}

.asrm-actions {
  display: flex !important;
  align-items: center !important;
  gap: 3px !important;
  flex-shrink: 0 !important;
}
.asrm-icon-btn {
  width: 22px !important;
  height: 22px !important;
  border-radius: 6px !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  background: #f1f4f9 !important;
  border: 1px solid rgba(0, 0, 0, 0.04) !important;
  font-size: 10.5px !important;
  cursor: pointer !important;
  padding: 0 !important;
}
body.dark-mode .asrm-icon-btn {
  background: #1e2433 !important;
  border-color: rgba(255, 255, 255, 0.08) !important;
}
.asrm-chevron {
  font-size: 14px !important;
  color: var(--muted) !important;
  padding: 0 2px !important;
  line-height: 1 !important;
}
.dash-today-info {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 1px;
}
.dash-today-title {
  display: flex;
  align-items: center;
  gap: 5px;
}
.dash-today-title strong {
  font-size: 13.5px;
  font-weight: 750;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.dash-today-title .format-badge {
  font-size: 10px;
  padding: 1px 5px;
  border-radius: 4px;
}
.dash-today-subinfo {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 11px;
}
.dash-today-subinfo .badge {
  font-size: 10px;
  padding: 1px 5px;
  font-weight: 700;
  border-radius: 4px;
}

/* Telegram Reminder Modal Actions (Copy & Open in Telegram) */
.tg-modal-actions {
  display: flex !important;
  flex-direction: row !important;
  align-items: center !important;
  gap: 10px !important;
  margin-top: 14px !important;
  padding-top: 12px !important;
  border-top: 1px solid var(--line, #e2e8f0) !important;
}
.tg-modal-actions .tg-btn-util {
  flex: 1 1 auto !important;
  min-height: 40px !important;
  height: 40px !important;
  padding: 0 12px !important;
  font-size: 13px !important;
  font-weight: 700 !important;
  border-radius: 10px !important;
  white-space: nowrap !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  box-sizing: border-box !important;
  cursor: pointer !important;
}
.tg-modal-actions .tg-btn-main {
  flex: 1.3 1 auto !important;
  min-height: 40px !important;
  height: 40px !important;
  padding: 0 14px !important;
  font-size: 13.5px !important;
  font-weight: 750 !important;
  border-radius: 10px !important;
  white-space: nowrap !important;
  background: var(--accent, #a45b46) !important;
  color: #ffffff !important;
  border: 1px solid transparent !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  box-sizing: border-box !important;
  cursor: pointer !important;
  box-shadow: 0 1px 3px rgba(164, 91, 70, 0.25) !important;
}
.tg-modal-actions .tg-btn-main:hover {
  background: #8e4c39 !important;
}
body.dark-mode .tg-modal-actions {
  border-top-color: var(--line);
}

.dash-today-actions {
  display: flex;
  align-items: center;
  gap: 4px;
  flex-shrink: 0;
}

/* Dashboard Compact 2x2 KPI Grid */
.dash-kpi-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin-top: 10px;
}
.dash-kpi-tile {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 8px 10px;
  cursor: pointer;
  transition: all 0.15s ease;
  display: flex;
  flex-direction: column;
  gap: 2px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.02);
}
.dash-kpi-tile:hover {
  transform: translateY(-1px);
  border-color: var(--accent);
}
.dash-kpi-tile.green-tone { border-left: 3.5px solid #10b981; }
.dash-kpi-tile.blue-tone { border-left: 3.5px solid #3b82f6; }
.dash-kpi-tile.amber-tone { border-left: 3.5px solid #f59e0b; }
.dash-kpi-tile.terracotta-tone { border-left: 3.5px solid var(--accent); }

.dkt-top {
  display: flex;
  align-items: center;
  gap: 4px;
}
.dkt-icon {
  font-size: 12px;
}
.dkt-label {
  font-size: 11px;
  color: var(--muted);
  font-weight: 650;
  white-space: nowrap;
}
.dkt-val {
  font-size: 14px;
  font-weight: 800;
  color: var(--text);
  line-height: 1.2;
}
.dkt-sub {
  font-size: 10px;
  color: var(--muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.btn-compact-action {
  padding: 5px 9px !important;
  font-size: 11.5px !important;
  font-weight: 750 !important;
  border-radius: 7px !important;
}
.btn-icon-only {
  width: 28px !important;
  height: 28px !important;
  padding: 0 !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  border-radius: 7px !important;
  font-size: 12.5px !important;
}

.dash-today-empty.compact-empty {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px;
  background: var(--surface, #f7f8fa);
  border-radius: 11px;
  border: 1px dashed var(--line);
  color: var(--muted);
}
.dash-today-empty.compact-empty span {
  font-size: 20px;
}
.dash-today-empty.compact-empty strong {
  display: block;
  font-size: 13px;
  color: var(--text);
}
.dash-today-empty.compact-empty small {
  font-size: 11px;
}
body.dark-mode .dash-today-empty {
  background: #141720;
  border-color: var(--line);
}

/* Attention Items on Dashboard */
.dash-attention-list{display:flex;flex-direction:column;gap:8px;margin-top:12px}
.dash-attention-row{display:flex;justify-content:space-between;align-items:center;padding:10px 12px;border-radius:10px;border:1px solid var(--line);background:var(--surface,#f7f8fa);gap:10px}
body.dark-mode .dash-attention-row{background:#141720;border-color:var(--line)}
.dash-att-user{display:flex;align-items:center;gap:10px;cursor:pointer}
.dash-att-user strong{font-size:13.5px;font-weight:700}
.dash-att-status{font-size:11.5px;display:block;margin-top:1px;font-weight:600}
.dash-att-status.debt{color:#d24747}
.dash-att-status.expired{color:#e58a3a}
.dash-att-status.low{color:var(--muted)}
body.dark-mode .dash-att-status.debt{color:#ff8585}
body.dark-mode .dash-att-status.expired{color:#f5ab67}
.dash-att-btns{display:flex;gap:6px}

.dash-side-col{display:flex;flex-direction:column}

/* Backup Boxes in Settings */
.backup-action-grid{display:grid;grid-template-columns:1fr 1fr;gap:14px}
@media(max-width:650px){.backup-action-grid{grid-template-columns:1fr}}
.backup-box{padding:16px;border-radius:12px;border:1px solid var(--line);background:var(--surface,#f7f8fa);display:flex;flex-direction:column;gap:10px}
body.dark-mode .backup-box{background:#141720;border-color:var(--line)}
.backup-box-title{font-size:14.5px;font-weight:750}
.backup-box-desc{font-size:12.5px;color:var(--muted);margin:0;line-height:1.45}

/* Birthday styling in Dashboard */
.premium-birthday-row{display:flex;justify-content:space-between;align-items:center;padding:8px 10px;background:var(--surface,#f7f8fa);border-radius:10px;border:1px solid var(--line);transition:all .15s ease}
.premium-birthday-row:hover{border-color:var(--accent)}
body.dark-mode .premium-birthday-row{background:#181b23;border-color:var(--line)}
body.dark-mode .premium-birthday-row:hover{background:#1e2433;border-color:var(--accent)}

.premium-birthday-row.today-highlight{background:rgba(236,72,153,.1);border-color:rgba(236,72,153,.35)}
body.dark-mode .premium-birthday-row.today-highlight{background:rgba(236,72,153,.18);border-color:rgba(236,72,153,.45)}

.bday-today-tag{color:#ec4899;font-weight:750;font-size:11.5px;display:block}
.bday-date-tag{color:var(--muted);font-size:11.5px;display:block}

body.dark-mode .premium-stat{background:#181b23!important;border:1px solid var(--line)!important}
body.dark-mode .premium-stat strong{color:#f2f5f9!important}
body.dark-mode .premium-stat small{color:#909aa8!important}
body.dark-mode .green-bg{background:rgba(47,141,89,.15)!important;border-color:rgba(47,141,89,.3)!important}
body.dark-mode .orange-bg{background:rgba(229,138,58,.15)!important;border-color:rgba(229,138,58,.3)!important}
body.dark-mode .blue-bg{background:rgba(91,141,239,.15)!important;border-color:rgba(91,141,239,.3)!important}
body.dark-mode .red-bg{background:rgba(226,88,88,.15)!important;border-color:rgba(226,88,88,.3)!important}

/* ==========================================================================
   Groups & Pairs Premium Redesign
   ========================================================================== */

.groups-premium-toolbar{display:flex;align-items:center;gap:12px;margin-bottom:20px;flex-wrap:wrap}
.gpt-search-wrap{position:relative;display:flex;align-items:center;min-width:240px;flex:1;max-width:320px}
.gpt-search-icon{position:absolute;left:12px;font-size:13px;color:var(--muted);pointer-events:none}
.gpt-search-input{width:100%!important;padding-left:34px!important;height:38px!important;border-radius:10px!important}

.gpt-kind-pills{display:flex;gap:6px;align-items:center}
.gpt-filters-right{display:flex;gap:8px;align-items:center;margin-left:auto}
@media(max-width:900px){.gpt-filters-right{margin-left:0;width:100%;justify-content:space-between}}

.gpt-select{height:38px;border-radius:10px;font-size:13px;font-weight:600}

.gpt-view-switcher{display:flex;background:var(--card);border:1px solid var(--line);border-radius:10px;padding:2px}
body.dark-mode .gpt-view-switcher{background:#181b23;border-color:var(--line)}
.gpt-view-btn{height:32px;width:34px;border:none;background:transparent;border-radius:8px;cursor:pointer;font-size:14px;color:var(--muted);transition:all .15s}
.gpt-view-btn.active{background:var(--accent-soft);color:var(--accent);font-weight:700}
body.dark-mode .gpt-view-btn.active{background:rgba(226,124,99,.2);color:var(--accent)}

/* Premium Grid */
.groups-premium-grid{display:grid;grid-template-columns:repeat(auto-fill, minmax(420px, 1fr));gap:20px}
@media(max-width:600px){.groups-premium-grid{grid-template-columns:1fr}}

.group-hero-card{background:var(--card);border:1px solid var(--line);border-radius:18px;padding:20px;display:flex;flex-direction:column;gap:16px;box-shadow:0 4px 18px rgba(0,0,0,.035);transition:all .2s ease;position:relative}
.group-hero-card:hover{border-color:var(--accent);transform:translateY(-2px);box-shadow:0 8px 26px rgba(0,0,0,.07)}
body.dark-mode .group-hero-card{background:#141720;border-color:var(--line);box-shadow:none}
body.dark-mode .group-hero-card:hover{background:#181c27;border-color:var(--accent)}

.group-hero-card.is-inactive{opacity:0.6}
.group-hero-card.theme-pair{border-top:3px solid #48a868}
.group-hero-card.theme-group{border-top:3px solid #e58a3a}

/* Header */
.gh-header{display:flex;justify-content:space-between;align-items:flex-start}
.gh-title-wrap{display:flex;align-items:center;gap:14px}

.gh-icon-box{width:44px;height:44px;border-radius:12px;display:grid;place-items:center;font-size:19px;font-weight:750;flex:none}
.gh-icon-box.pair{background:rgba(72,168,104,.14);color:#48a868}
.gh-icon-box.group{background:rgba(229,138,58,.14);color:#e58a3a}
body.dark-mode .gh-icon-box.pair{background:rgba(72,168,104,.2);color:#72d192}
body.dark-mode .gh-icon-box.group{background:rgba(229,138,58,.2);color:#f5ab67}

.gh-name-row{display:flex;align-items:center;gap:8px}
.gh-name{font-size:17.5px;font-weight:800;letter-spacing:-.3px;cursor:pointer;transition:color .15s}
.gh-name:hover{color:var(--accent)}
.gh-status-dot{width:8px;height:8px;border-radius:50%;display:inline-block}
.gh-status-dot.active{background:#36b36e;box-shadow:0 0 6px rgba(54,179,110,.5)}
.gh-status-dot.inactive{background:var(--muted)}

.gh-tags-row{display:flex;align-items:center;gap:6px;margin-top:4px}
.gh-level-badge{padding:2px 7px;border-radius:6px;background:var(--surface,#f0f1f3);color:var(--text);font-size:11px;font-weight:750}
body.dark-mode .gh-level-badge{background:#202532;color:#f2f5f9}

.gh-actions-menu{display:flex;gap:4px}
.gh-icon-btn{width:30px;height:30px;border-radius:8px;border:1px solid transparent;background:transparent;cursor:pointer;display:grid;place-items:center;font-size:13px;color:var(--muted);transition:all .15s}
.gh-icon-btn:hover{background:var(--surface,#f0f1f3);color:var(--text);border-color:var(--line)}
.gh-icon-btn.danger:hover{background:rgba(226,88,88,.15);color:#e25858;border-color:rgba(226,88,88,.3)}
body.dark-mode .gh-icon-btn:hover{background:#202532;color:#f2f5f9;border-color:var(--line)}

/* Schedule Strip */
.gh-schedule-strip{display:flex;justify-content:space-between;align-items:center;padding:10px 14px;background:var(--surface,#f7f8fa);border-radius:12px;border:1px solid var(--line);cursor:pointer;transition:all .15s ease}
.gh-schedule-strip:hover{border-color:var(--accent)}
body.dark-mode .gh-schedule-strip{background:#181b23;border-color:var(--line)}
body.dark-mode .gh-schedule-strip:hover{background:#1d222e;border-color:var(--accent)}

.gh-sch-pills{display:flex;gap:6px;flex-wrap:wrap;align-items:center}
.group-sch-badge{display:inline-flex;align-items:center;gap:4px;padding:3px 8px;border-radius:7px;background:var(--card);border:1px solid var(--line);font-size:12px;font-weight:700}
body.dark-mode .group-sch-badge{background:#202532;border-color:var(--line);color:#f2f5f9}
.gsch-day{color:var(--accent);font-weight:800;font-size:11.5px}
.gsch-time{color:var(--text);font-size:12px}
.group-no-sch{font-size:12.5px;color:var(--muted);font-weight:600}
.gh-sch-action{font-size:11.5px;color:var(--accent);font-weight:750;white-space:nowrap;margin-left:8px}

/* Members Box */
.gh-members-box{display:flex;flex-direction:column;gap:8px}
.gh-members-header{display:flex;justify-content:space-between;align-items:center;font-size:11.5px;font-weight:800;color:var(--muted);letter-spacing:0.5px}
.gh-add-member-link{background:none;border:none;color:var(--accent);font-size:11.5px;font-weight:750;cursor:pointer;padding:0}
.gh-add-member-link:hover{text-decoration:underline}

.gh-members-list{display:flex;flex-direction:column;gap:6px}
.gh-member-row{display:flex;justify-content:space-between;align-items:center;padding:7px 10px;background:var(--surface,#f7f8fa);border:1px solid var(--line);border-radius:10px;cursor:pointer;transition:all .15s}
.gh-member-row:hover{border-color:var(--accent);background:var(--accent-soft)}
body.dark-mode .gh-member-row{background:#181b23;border-color:var(--line)}
body.dark-mode .gh-member-row:hover{background:#1e2433;border-color:var(--accent)}

.ghm-left{display:flex;align-items:center;gap:9px}
.ghm-name{font-size:13.5px;font-weight:700}
.ghm-phone{font-size:11px;color:var(--muted)}

.ghm-right{display:flex;align-items:center;gap:8px}
.ghm-tg-btn{width:26px;height:26px;border-radius:6px;border:1px solid var(--line);background:var(--card);cursor:pointer;display:grid;place-items:center;font-size:11.5px;color:var(--text);transition:all .15s}
.ghm-tg-btn:hover{border-color:var(--accent);color:var(--accent);background:var(--accent-soft)}
body.dark-mode .ghm-tg-btn{background:#202532;border-color:var(--line)}

.gh-empty-members{padding:12px;text-align:center;font-size:12.5px;color:var(--muted);background:var(--surface,#f7f8fa);border:1px dashed var(--line);border-radius:10px}
body.dark-mode .gh-empty-members{background:#181b23;border-color:var(--line)}

/* Footer */
.gh-footer{display:flex;justify-content:space-between;align-items:center;gap:8px;padding-top:14px;border-top:1px solid var(--line);margin-top:auto}
.gh-open-btn{flex:1;justify-content:center;font-weight:700}

/* Modal Enhancements */
.gh-modal-schedule-card{display:flex;justify-content:space-between;align-items:center;padding:12px 14px;background:var(--surface,#f7f8fa);border:1px solid var(--line);border-radius:12px}
body.dark-mode .gh-modal-schedule-card{background:#141720;border-color:var(--line)}
.ghm-sch-label{font-size:11px;color:var(--muted);font-weight:750;text-transform:uppercase}
.gh-modal-members-list{display:flex;flex-direction:column;gap:8px}
.ghm-member-item{display:flex;justify-content:space-between;align-items:center;padding:10px 12px;background:var(--surface,#f7f8fa);border:1px solid var(--line);border-radius:10px;gap:10px}
body.dark-mode .ghm-member-item{background:#181b23;border-color:var(--line)}
.ghm-item-user{display:flex;align-items:center;gap:10px;cursor:pointer}
.ghm-item-btns{display:flex;gap:6px;align-items:center}

/* Add Member Modal Styling */
.add-member-list{display:flex;flex-direction:column;gap:8px;max-height:360px;overflow-y:auto;padding-right:4px}
.add-member-row{display:flex;justify-content:space-between;align-items:center;padding:10px 12px;background:var(--surface,#f7f8fa);border:1px solid var(--line);border-radius:12px;transition:all .15s}
.add-member-row:hover{border-color:var(--accent);background:var(--card)}
body.dark-mode .add-member-row{background:#181b23;border-color:var(--line)}
body.dark-mode .add-member-row:hover{background:#202532;border-color:var(--accent)}
.amr-user{display:flex;align-items:center;gap:12px}
.amr-info{display:flex;flex-direction:column;gap:2px}

/* Materials Links */
.student-materials-link, .group-materials-link{display:inline-flex;align-items:center;gap:6px;padding:6px 12px;background:rgba(91,141,239,.1);color:#3c72d6;border:1px solid rgba(91,141,239,.25);border-radius:8px;font-size:12.5px;font-weight:700;text-decoration:none;transition:all .15s}
.student-materials-link:hover, .group-materials-link:hover{background:rgba(91,141,239,.2);border-color:#3c72d6}
body.dark-mode .student-materials-link, body.dark-mode .group-materials-link{background:rgba(91,141,239,.18);color:#8cb2ff;border-color:rgba(91,141,239,.35)}

.group-materials-banner{margin-bottom:12px}

.btn-materials{background:rgba(91,141,239,.12);color:#3c72d6;border:1px solid rgba(91,141,239,.3);text-decoration:none;font-weight:700;display:inline-flex;align-items:center;gap:4px}
.btn-materials:hover{background:rgba(91,141,239,.22);border-color:#3c72d6}
body.dark-mode .btn-materials{background:rgba(91,141,239,.2);color:#8cb2ff;border-color:rgba(91,141,239,.4)}

/* Payment Presets */
.payment-preset-bar{display:flex;align-items:center;gap:6px;flex-wrap:wrap;padding:8px 10px;background:var(--surface,#f7f8fa);border-radius:10px;border:1px solid var(--line)}
body.dark-mode .payment-preset-bar{background:#141720;border-color:var(--line)}
.payment-preset-chip{padding:4px 10px;border-radius:8px;border:1px solid var(--line);background:var(--card);color:var(--text);font-size:12px;font-weight:700;cursor:pointer;transition:all .15s}
.payment-preset-chip:hover{border-color:var(--accent);color:var(--accent)}
.payment-preset-chip.active{background:var(--accent);color:#fff;border-color:var(--accent)}
body.dark-mode .payment-preset-chip{background:#1c212d;border-color:var(--line);color:#f2f5f9}
body.dark-mode .payment-preset-chip.active{background:var(--accent);color:#fff;border-color:var(--accent)}

/* Workload & Hours Tracker on Dashboard */
.dash-workload-strip{display:flex;flex-direction:column;gap:8px;margin-bottom:0;padding:10px;background:var(--surface,#f7f8fa);border-radius:12px;border:1px solid var(--line)}
body.dark-mode .dash-workload-strip{background:#141720;border-color:var(--line)}
.dash-hours-pill{font-size:12.5px;color:var(--text);font-weight:600}
.dash-hours-pill strong{color:var(--accent);font-size:13.5px}

.dash-workload-grid{display:grid;grid-template-columns:repeat(7,minmax(0,1fr));gap:4px}
.dash-wl-day{display:flex;flex-direction:column;align-items:center;justify-content:center;padding:4px 1px;border-radius:7px;background:var(--card);border:1px solid var(--line);gap:1px;min-width:0;position:relative}
body.dark-mode .dash-wl-day{background:#181b23;border-color:var(--line)}
.dash-wl-day.is-peak{border-color:var(--accent);background:var(--accent-soft)}
body.dark-mode .dash-wl-day.is-peak{background:rgba(226,124,99,.18);border-color:var(--accent)}
.dash-wl-day.is-zero{opacity:0.45}
.dwl-name{font-size:9.5px;color:var(--muted);font-weight:750;text-transform:uppercase}
.dwl-count{font-size:12.5px;font-weight:800;color:var(--text)}
.dash-wl-day.is-peak .dwl-count{color:var(--accent)}

/* =========================================================
   PREMIUM LUXURY STYLES FOR ALL TABS (Voca CRM)
   ========================================================= */

/* Global Navigation & Brand */
.sidebar{background:var(--card);border-right:1px solid var(--line);box-shadow:2px 0 16px rgba(0,0,0,.02)}
body.dark-mode .sidebar{background:#12151d;border-color:var(--line)}
.brand{display:flex;align-items:center;gap:10px;font-size:20px;font-weight:800;letter-spacing:-.3px}
.brand-badge{width:28px;height:28px;border-radius:8px;background:linear-gradient(135deg,var(--accent),#c95238);color:#fff;display:grid;place-items:center;font-size:14px;font-weight:900;box-shadow:0 3px 10px rgba(226,124,99,.35)}
.nav button{display:flex;align-items:center;gap:10px;font-size:13.5px;font-weight:600;transition:all .18s ease;border-radius:10px}
.nav button.active{background:var(--accent-soft);color:var(--accent);font-weight:750;box-shadow:0 2px 8px rgba(226,124,99,.15)}
body.dark-mode .nav button.active{background:rgba(226,124,99,.16);color:#ff9e87}

/* Premium Buttons & Cards */
.btn{transition:all .15s ease;font-weight:600}
.btn:hover{border-color:var(--muted);transform:translateY(-1px)}
.btn:active{transform:scale(0.98)}
.btn.primary{box-shadow:0 3px 12px rgba(226,124,99,.28)}
.btn.primary:hover{box-shadow:0 5px 16px rgba(226,124,99,.38);border-color:var(--accent)}

.card{border-radius:16px;border:1px solid var(--line);transition:box-shadow .2s ease,border-color .2s ease}

/* Students Page Luxury Styling */
.students-container{padding:20px 22px}
.students-luxury-toolbar{display:flex;flex-direction:column;gap:14px;margin-bottom:18px}
.students-filter-strip{display:flex;align-items:center;gap:12px;flex-wrap:wrap}

.filter-segment{display:inline-flex;align-items:center;background:var(--surface,#f3f4f6);padding:3px;border-radius:10px;gap:2px;border:1px solid var(--line)}
body.dark-mode .filter-segment{background:#141720;border-color:var(--line)}
.f-seg-btn{border:0;background:transparent;padding:6px 12px;border-radius:8px;font-size:12px;font-weight:650;color:var(--muted);cursor:pointer;transition:all .15s ease}
.f-seg-btn:hover{color:var(--text)}
.f-seg-btn.active{background:var(--card);color:var(--text);font-weight:750;box-shadow:0 2px 6px rgba(0,0,0,.06)}
body.dark-mode .f-seg-btn.active{background:#222836;color:#f3f6fb;box-shadow:0 2px 8px rgba(0,0,0,.3)}

.students-tablewrap{
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 14px;
  box-shadow: var(--shadow);
  overflow: hidden;
  margin-top: 14px;
}
body.dark-mode .students-tablewrap{
  background: #141720;
  border-color: var(--line);
}

.luxury-table{
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  background: var(--card);
}
body.dark-mode .luxury-table{
  background: #141720;
}
.luxury-table thead{
  background: var(--surface, #f8f9fa);
}
body.dark-mode .luxury-table thead{
  background: #161922;
}
.luxury-table th{
  background: var(--surface, #f8f9fa);
  padding: 12px 16px;
  font-size: 11px;
  font-weight: 750;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--muted);
  border-bottom: 1px solid var(--line);
  white-space: nowrap;
  user-select: none;
}
body.dark-mode .luxury-table th{
  background: #161922;
  border-color: var(--line);
  color: #8b949e;
}
.luxury-table th:first-child{
  padding-left: 20px;
}
.luxury-table th:last-child{
  padding-right: 20px;
  text-align: right;
}
.luxury-table td{
  padding: 13px 16px;
  border-bottom: 1px solid var(--line);
  vertical-align: middle;
  background: transparent;
  color: var(--text);
  font-size: 13.5px;
}
body.dark-mode .luxury-table td{
  border-color: var(--line);
  color: #f2f5f9;
}
.luxury-table td:first-child{
  padding-left: 20px;
}
.luxury-table td:last-child{
  padding-right: 20px;
}
.luxury-table tbody tr:last-child td{
  border-bottom: none;
}
/* Students Luxury Table - Compact Override */
.students-luxury td {
  padding: 8px 16px;
  font-size: 13px;
}
.students-luxury th {
  padding: 9px 16px;
}

.std-results-counter {
  font-size: 11.5px;
  font-weight: 650;
  color: var(--muted);
  padding: 6px 4px 2px;
}

.std-table-row{
  transition: background 0.15s ease;
}
.std-table-row:hover{
  background: var(--surface, rgba(0,0,0,0.025))!important;
}
body.dark-mode .std-table-row:hover{
  background: #1a1f2c!important;
}
.std-table-row.is-inactive-row {
  opacity: 0.55;
}
.std-table-row.is-inactive-row:hover {
  opacity: 0.85;
}

.std-name-status-row {
  display: flex;
  align-items: center;
  gap: 6px;
}
.std-row-name{
  font-size: 13.5px;
  font-weight: 700;
  color: var(--text);
  line-height: 1.2;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  max-width: 220px;
}
.std-row-phone{
  font-size: 11.5px;
  color: var(--muted);
  margin-top: 2px;
}
.std-inactive-badge {
  font-size: 9.5px;
  font-weight: 750;
  text-transform: uppercase;
  letter-spacing: 0.3px;
  color: #9ca3af;
  background: rgba(156, 163, 175, 0.12);
  border: 1px solid rgba(156, 163, 175, 0.2);
  padding: 1px 5px;
  border-radius: 4px;
  white-space: nowrap;
}

.std-bal-chip {
  display: inline-flex;
  align-items: center;
  min-width: 72px;
  justify-content: center;
  padding: 3px 8px;
  border-radius: 7px;
  font-size: 11.5px;
  font-weight: 800;
  white-space: nowrap;
}
.std-bal-chip.ok {
  background: rgba(34, 197, 94, 0.08);
  color: #16a34a;
  border: 1px solid rgba(34, 197, 94, 0.2);
}
.std-bal-chip.warn {
  background: rgba(245, 158, 11, 0.08);
  color: #d97706;
  border: 1px solid rgba(245, 158, 11, 0.2);
}
.std-bal-chip.debt {
  background: rgba(220, 38, 38, 0.08);
  color: #dc2626;
  border: 1px solid rgba(220, 38, 38, 0.2);
}
body.dark-mode .std-bal-chip.ok {
  background: rgba(34, 197, 94, 0.12);
  color: #4ade80;
}
body.dark-mode .std-bal-chip.warn {
  background: rgba(245, 158, 11, 0.12);
  color: #fbbf24;
}
body.dark-mode .std-bal-chip.debt {
  background: rgba(248, 113, 113, 0.14);
  color: #f87171;
}

.std-tg-icon-btn {
  width: 28px;
  height: 28px;
  border-radius: 7px;
  border: 1px solid var(--line, #e2e8f0);
  background: var(--card, #fff);
  font-size: 13px;
  display: grid;
  place-items: center;
  cursor: pointer;
  transition: all 0.15s ease;
  padding: 0;
}
.std-tg-icon-btn:hover {
  border-color: #0088cc;
  background: rgba(0, 136, 204, 0.08);
  transform: translateY(-1px);
}
body.dark-mode .std-tg-icon-btn {
  background: #202635;
  border-color: rgba(255, 255, 255, 0.1);
}

.std-cell-level{
  text-align: center;
}
.std-cell-format{
  text-align: center;
}
.std-cell-schedule{
  text-align: left;
}
.std-cell-balance{
  text-align: center;
}
.std-cell-actions{
  text-align: right;
  white-space: nowrap;
}

.std-price-tag {
  font-size: 11px;
  color: var(--muted);
  font-weight: 650;
  letter-spacing: -0.1px;
}

.std-action-pay-btn {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: rgba(16, 185, 129, 0.08) !important;
  color: #059669 !important;
  border: 1px solid rgba(16, 185, 129, 0.25) !important;
  border-radius: 8px !important;
  padding: 4px 9px !important;
  font-size: 11.5px !important;
  font-weight: 750 !important;
  cursor: pointer !important;
  transition: all 0.15s ease !important;
}
.std-action-pay-btn:hover {
  background: #10b981 !important;
  color: #ffffff !important;
  border-color: #10b981 !important;
  transform: translateY(-1px);
}
body.dark-mode .std-action-pay-btn {
  background: rgba(16, 185, 129, 0.14) !important;
  color: #34d399 !important;
  border-color: rgba(16, 185, 129, 0.3) !important;
}
body.dark-mode .std-action-pay-btn:hover {
  background: #10b981 !important;
  color: #ffffff !important;
}

.std-chevron {
  font-size: 18px;
  color: var(--muted);
  opacity: 0.5;
  cursor: pointer;
  padding: 0 4px;
  line-height: 1;
  transition: all 0.15s ease;
}
.std-table-row:hover .std-chevron {
  opacity: 1;
  color: var(--accent);
  transform: translateX(2px);
}

.src-pay-btn {
  background: rgba(164, 91, 70, 0.08);
  border: 1px solid rgba(164, 91, 70, 0.22);
  border-radius: 6px;
  padding: 4px 7px;
  font-size: 12px;
  color: var(--accent);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
body.dark-mode .src-pay-btn {
  background: rgba(164, 91, 70, 0.15);
  border-color: rgba(164, 91, 70, 0.3);
  color: #e5a494;
}

.std-sch-wrap{
  display: flex;
  gap: 4px;
  flex-wrap: wrap;
  align-items: center;
  max-width: 260px;
}
.std-sch-pill{
  display: inline-flex;
  align-items: center;
  padding: 3px 8px;
  background: var(--surface, #f4f5f7);
  border-radius: 6px;
  font-size: 11px;
  font-weight: 650;
  color: var(--text);
  border: 1px solid var(--line);
  white-space: nowrap;
}
body.dark-mode .std-sch-pill{
  background: #181c26;
  border-color: var(--line);
  color: #d0d7de;
}

.std-status-dot{
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  font-weight: 650;
  white-space: nowrap;
}
.status-dot-circle{
  width: 8px;
  height: 8px;
  border-radius: 50%;
  display: inline-block;
  flex-shrink: 0;
}
.std-status-dot.active{
  color: #2ea063;
}
.std-status-dot.active .status-dot-circle{
  background: #2ea063;
  box-shadow: 0 0 0 2px rgba(46,160,99,.25);
}
.std-status-dot.inactive{
  color: var(--muted);
}
.std-status-dot.inactive .status-dot-circle{
  background: #9aa2ae;
}
body.dark-mode .std-status-dot.active{
  color: #3fb978;
}
body.dark-mode .std-status-dot.active .status-dot-circle{
  background: #3fb978;
  box-shadow: 0 0 0 2px rgba(63,185,120,.25);
}

.primary-soft{
  background: rgba(164,91,70,.10)!important;
  color: var(--accent)!important;
  border: 1px solid rgba(164,91,70,.25)!important;
  font-weight: 650;
}
.primary-soft:hover{
  background: rgba(164,91,70,.2)!important;
  border-color: var(--accent)!important;
}
body.dark-mode .primary-soft{
  background: rgba(226,124,99,.15)!important;
  color: #ff9e87!important;
  border-color: rgba(226,124,99,.35)!important;
}
body.dark-mode .primary-soft:hover{
  background: rgba(226,124,99,.25)!important;
  border-color: #ff9e87!important;
}

/* Schedule Tab Luxury Styling */
.schedule-unified-topbar{margin-bottom:18px}
.schedule-unified-nav .btn{padding:7px 12px;border-radius:9px}
.schedule-unified-nav .btn.active{background:var(--accent-soft);color:var(--accent);border-color:var(--accent);font-weight:750}
body.dark-mode .schedule-unified-nav .btn.active{background:rgba(226,124,99,.18);color:#ff9e87}

.schedule-toolbar{background:var(--card);border:1px solid var(--line);border-radius:14px;padding:10px 14px;margin-bottom:18px;box-shadow:var(--shadow)}
body.dark-mode .schedule-toolbar{background:#161922;border-color:var(--line)}
.schedule-view-toggle{display:inline-flex;background:var(--surface,#f3f4f6);padding:3px;border-radius:10px;border:1px solid var(--line);gap:2px}
body.dark-mode .schedule-view-toggle{background:#141720;border-color:var(--line)}
.schedule-view{border:0;background:transparent;padding:6px 14px;border-radius:8px;font-size:12.5px;font-weight:650;color:var(--muted);cursor:pointer;transition:all .15s}
.schedule-view.active{background:var(--card);color:var(--text);font-weight:750;box-shadow:0 2px 6px rgba(0,0,0,.06)}
body.dark-mode .schedule-view.active{background:#222836;color:#f3f6fb}

.standard-schedule-grid{display:grid;grid-template-columns:repeat(7,1fr);gap:10px}
.standard-schedule-day{background:var(--card);border:1px solid var(--line);border-radius:14px;overflow:hidden;min-height:340px;display:flex;flex-direction:column}
.standard-schedule-day.today{border-color:var(--accent);box-shadow:0 0 0 2px var(--accent-soft)}
body.dark-mode .standard-schedule-day{background:#161922;border-color:var(--line)}
body.dark-mode .standard-schedule-day.today{border-color:var(--accent);box-shadow:0 0 0 2px rgba(226,124,99,.25)}

.standard-schedule-day-head{display:flex;justify-content:space-between;align-items:center;padding:10px 12px;background:var(--surface,#f9fafb);border-bottom:1px solid var(--line)}
body.dark-mode .standard-schedule-day-head{background:#14161f;border-color:var(--line)}
.standard-schedule-day-head strong{font-size:13px;font-weight:800;color:var(--text)}
.standard-schedule-day-head span{font-size:11px;color:var(--muted);margin-left:4px}
.standard-schedule-day-head em{font-style:normal;font-size:10px;font-weight:800;text-transform:uppercase;padding:2px 6px;border-radius:6px;background:var(--accent);color:#fff}

.standard-schedule-list{padding:8px;display:flex;flex-direction:column;gap:6px;flex:1}
.standard-schedule-row{width:100%;border:1px solid var(--line);background:var(--surface,#fcfdfe);border-radius:10px;padding:8px 10px;display:flex;align-items:center;gap:8px;text-align:left;cursor:pointer;transition:all .15s ease}
.standard-schedule-row:hover{border-color:var(--accent);transform:translateY(-1px);box-shadow:0 3px 10px rgba(0,0,0,.04)}
body.dark-mode .standard-schedule-row{background:#181c26;border-color:var(--line)}
body.dark-mode .standard-schedule-row:hover{background:#1e2432;border-color:var(--accent)}

.standard-schedule-time{font-size:11.5px;font-weight:800;color:var(--accent);background:var(--accent-soft);padding:2px 5px;border-radius:5px}
body.dark-mode .standard-schedule-time{background:rgba(226,124,99,.18);color:#ff9e87}
.standard-schedule-main{flex:1;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.standard-schedule-main strong{font-size:12.5px;font-weight:700}
.standard-schedule-empty{padding:24px 10px;text-align:center;color:var(--muted);font-size:12px}

/* Finance Page Luxury Polish */
.clickable-stat{cursor:pointer;transition:all .18s ease;border:1px solid var(--line);position:relative}
.clickable-stat:hover{transform:translateY(-2px);border-color:var(--accent);box-shadow:0 6px 20px rgba(0,0,0,.05)}
.clickable-stat.active-stat{border-color:var(--accent);box-shadow:0 0 0 2px var(--accent-soft)}
.stat-pill{display:inline-flex;align-items:center;gap:3px;padding:2.5px 8px;border-radius:999px;font-size:11px;font-weight:750;white-space:nowrap;flex-shrink:0}
.stat-pill.green{background:rgba(47,158,91,.12);color:#279155}
.stat-pill.blue{background:rgba(91,141,239,.12);color:#3c72d6}
.stat-pill.orange{background:rgba(226,88,88,.12);color:#d24747}
.stat-pill.purple{background:rgba(168,130,240,.12);color:#8b5cf6}
.stat-hint{font-size:11px;color:var(--muted);margin-top:8px}

/* Settings Tab Polish */
.settings-tabs{display:flex;gap:6px;border-bottom:1px solid var(--line);margin-bottom:20px;padding-bottom:2px}
.settings-tab-btn{border:0;background:transparent;padding:10px 16px;border-radius:10px;font-size:13.5px;font-weight:650;color:var(--muted);cursor:pointer;transition:all .15s}
.settings-tab-btn:hover{color:var(--text);background:var(--surface,#f3f4f6)}
.settings-tab-btn.active{background:var(--accent-soft);color:var(--accent);font-weight:750}
body.dark-mode .settings-tab-btn.active{background:rgba(226,124,99,.18);color:#ff9e87}

/* Clean Students Toolbar: Single Row (Search Left, Filters Right) */
.std-clean-toolbar {
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  gap: 14px !important;
  margin-bottom: 14px !important;
}
.std-clean-search {
  max-width: 320px !important;
  min-width: 240px !important;
  flex: 1 !important;
  position: relative !important;
}
.std-search-clear {
  position: absolute;
  right: 10px;
  top: 50%;
  transform: translateY(-50%);
  border: 0;
  background: transparent;
  color: var(--muted);
  font-size: 13px;
  cursor: pointer;
  padding: 4px;
}
.std-search-clear:hover {
  color: var(--text);
}
.std-popovers-row {
  display: flex !important;
  align-items: center !important;
  gap: 8px !important;
  justify-content: flex-end !important;
}

.std-clean-filters{display:flex;justify-content:space-between;align-items:center;gap:12px;flex-wrap:wrap}
.std-pills-bar{display:flex;align-items:center;gap:6px;flex-wrap:wrap}
.std-pill{border:1px solid var(--line);background:var(--surface,#f7f8fa);color:var(--muted);padding:6px 12px;border-radius:8px;font-size:12px;font-weight:700;cursor:pointer;transition:all .15s ease}
.std-pill:hover{color:var(--text);border-color:var(--muted)}
.std-pill.active{background:var(--accent);color:#fff;border-color:var(--accent);box-shadow:0 2px 8px rgba(226,124,99,.25)}
body.dark-mode .std-pill{background:#161922;border-color:var(--line);color:#94a1b2}
body.dark-mode .std-pill:hover{color:#fff;border-color:var(--muted)}
body.dark-mode .std-pill.active{background:var(--accent);color:#fff;border-color:var(--accent)}

.std-format-select{padding:7px 12px;font-size:12.5px;font-weight:700;border-radius:8px;background:var(--surface,#f7f8fa);border-color:var(--line);color:var(--text)}
body.dark-mode .std-format-select{background:#161922;border-color:var(--line);color:#f3f6fb}

/* Compact Schedule Feed (List View) */
.compact-schedule-feed{display:flex;flex-direction:column;gap:10px;max-width:100%}
.compact-sch-day-card{background:var(--card);border:1px solid var(--line);border-radius:14px;overflow:hidden;box-shadow:var(--shadow);transition:border-color .15s ease}
.compact-sch-day-card.is-today{border-color:var(--accent);box-shadow:0 0 0 2px var(--accent-soft)}
body.dark-mode .compact-sch-day-card{background:#161922;border-color:var(--line)}
body.dark-mode .compact-sch-day-card.is-today{border-color:var(--accent);box-shadow:0 0 0 2px rgba(226,124,99,.25)}
.compact-sch-day-card.is-empty-day{opacity:0.85}

.csd-head{display:flex;justify-content:space-between;align-items:center;padding:9px 15px;background:var(--surface,#f9fafb);border-bottom:1px solid var(--line)}
body.dark-mode .csd-head{background:#14161f;border-color:var(--line)}
.csd-head-left{display:flex;align-items:center;gap:10px}
.csd-weekday{display:inline-flex;padding:2px 8px;border-radius:6px;background:var(--card);border:1px solid var(--line);font-size:11.5px;font-weight:800;color:var(--text)}
body.dark-mode .csd-weekday{background:#1c212d;border-color:var(--line);color:#fff}
.csd-fullname{font-size:13.5px;font-weight:800;color:var(--text)}
.csd-date{font-size:12px;color:var(--muted);font-weight:600}
.csd-today-badge{font-size:10px;font-weight:850;text-transform:uppercase;padding:2px 7px;border-radius:6px;background:var(--accent);color:#fff}

.csd-head-right{display:flex;align-items:center;gap:8px}
.csd-count-badge{font-size:11px;font-weight:750;color:var(--accent);background:var(--accent-soft);padding:2px 7px;border-radius:6px}
body.dark-mode .csd-count-badge{background:rgba(226,124,99,.18);color:#ff9e87}
.csd-add-btn{border:1px solid var(--line);background:var(--card);color:var(--text);padding:3px 8px;border-radius:6px;font-size:11px;font-weight:700;cursor:pointer;transition:all .15s}
.csd-add-btn:hover{border-color:var(--accent);color:var(--accent)}
body.dark-mode .csd-add-btn{background:#1c212d;border-color:var(--line)}

.csd-body{padding:8px 12px;display:flex;flex-direction:column;gap:6px}
.csd-lesson-row{display:flex;justify-content:space-between;align-items:center;padding:8px 12px;background:var(--surface,#fcfdfe);border:1px solid var(--line);border-radius:10px;gap:12px;cursor:pointer;transition:all .15s ease}
.csd-lesson-row:hover{border-color:var(--accent);background:var(--card);transform:translateX(2px)}
body.dark-mode .csd-lesson-row{background:#181c26;border-color:var(--line)}
body.dark-mode .csd-lesson-row:hover{background:#1f2635;border-color:var(--accent)}

.csd-time-pill{font-size:12px;font-weight:850;color:var(--accent);background:var(--accent-soft);padding:3px 7px;border-radius:6px;flex:none}
body.dark-mode .csd-time-pill{background:rgba(226,124,99,.18);color:#ff9e87}

.csd-lesson-info{display:flex;align-items:center;gap:10px;flex:1}
.csd-lesson-name{font-size:13.5px;font-weight:750;color:var(--text)}
.csd-lesson-meta{display:flex;align-items:center;gap:6px}

.csd-lesson-actions{display:flex;align-items:center;gap:6px;flex:none}
.csd-btn-act{padding:4px 8px;font-size:12px;border-radius:6px}

.csd-empty-placeholder{padding:8px 12px;text-align:left;color:var(--muted);font-size:11.5px;cursor:pointer;border-radius:8px;border:1px dashed var(--line);transition:all .15s}
.csd-empty-placeholder:hover{border-color:var(--accent);color:var(--accent);background:var(--surface,#f9fafb)}
body.dark-mode .csd-empty-placeholder{border-color:var(--line)}
body.dark-mode .csd-empty-placeholder:hover{background:#181c26;border-color:var(--accent)}

/* Overhaul for standard-schedule-grid & sch-card */
.standard-schedule-grid {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr))!important;
  gap: 10px!important;
  align-items: stretch!important;
}

.standard-schedule-day {
  background: var(--card)!important;
  border: 1px solid var(--line)!important;
  border-radius: 14px!important;
  display: flex!important;
  flex-direction: column!important;
  min-height: 480px!important;
  overflow: hidden!important;
  box-shadow: var(--shadow)!important;
}

.standard-schedule-day.today {
  border-color: var(--accent)!important;
  box-shadow: 0 0 0 2px var(--accent-soft)!important;
}

body.dark-mode .standard-schedule-day.today {
  box-shadow: 0 0 0 2px rgba(226, 124, 99, 0.25)!important;
}

.standard-schedule-day-head {
  display: flex!important;
  justify-content: space-between!important;
  align-items: center!important;
  padding: 10px 11px!important;
  background: var(--surface, #f9fafb)!important;
  border-bottom: 1px solid var(--line)!important;
}

.standard-schedule-day-head strong {
  font-size: 13.5px!important;
  font-weight: 800!important;
  color: var(--text)!important;
}

.standard-schedule-day-head span {
  font-size: 11.5px!important;
  color: var(--muted)!important;
  font-weight: 600!important;
  margin-left: 4px!important;
}

.standard-schedule-day-head em {
  font-style: normal!important;
  font-size: 9.5px!important;
  font-weight: 850!important;
  text-transform: uppercase!important;
  padding: 2px 6px!important;
  border-radius: 5px!important;
  background: var(--accent)!important;
  color: #fff!important;
}

.std-day-add-btn {
  border: 1px solid var(--line)!important;
  background: var(--card)!important;
  color: var(--muted)!important;
  border-radius: 5px!important;
  width: 20px!important;
  height: 20px!important;
  display: grid!important;
  place-items: center!important;
  font-size: 12px!important;
  font-weight: 800!important;
  cursor: pointer!important;
  transition: all .15s!important;
  padding: 0!important;
}

.std-day-add-btn:hover {
  border-color: var(--accent)!important;
  color: var(--accent)!important;
  background: var(--accent-soft)!important;
}

.standard-schedule-list {
  padding: 8px!important;
  display: flex!important;
  flex-direction: column!important;
  gap: 8px!important;
  flex: 1!important;
}

.sch-card {
  background: var(--card)!important;
  border: 1px solid var(--line)!important;
  border-left: 3.5px solid #4f7cff!important;
  border-radius: 10px!important;
  padding: 8px 9px!important;
  display: flex!important;
  flex-direction: column!important;
  gap: 5px!important;
  cursor: pointer!important;
  transition: transform .15s ease, box-shadow .15s ease, border-color .15s ease!important;
  box-shadow: 0 2px 6px rgba(0,0,0,.03)!important;
  text-align: left!important;
  user-select: none!important;
  width: 100%!important;
  box-sizing: border-box!important;
}

body.dark-mode .sch-card {
  background: #181c26!important;
  border-color: var(--line)!important;
}

.sch-card:hover {
  transform: translateY(-2px)!important;
  box-shadow: 0 5px 14px rgba(0,0,0,.07)!important;
  border-color: var(--accent)!important;
}

.sch-card.type-individual {
  border-left-color: #4f7cff!important;
  background: rgba(79, 124, 255, 0.05)!important;
}

.sch-card.type-pair {
  border-left-color: #23a26d!important;
  background: rgba(35, 162, 109, 0.05)!important;
}

.sch-card.type-group {
  border-left-color: #e38b2c!important;
  background: rgba(227, 139, 44, 0.06)!important;
}

body.dark-mode .sch-card.type-individual { background: rgba(79, 124, 255, 0.1)!important; }
body.dark-mode .sch-card.type-pair { background: rgba(35, 162, 109, 0.1)!important; }
body.dark-mode .sch-card.type-group { background: rgba(227, 139, 44, 0.12)!important; }

.sch-card-head {
  display: flex!important;
  justify-content: space-between!important;
  align-items: center!important;
  gap: 4px!important;
}

.sch-card-time {
  font-size: 11.5px!important;
  font-weight: 850!important;
  color: var(--accent)!important;
  background: transparent!important;
  padding: 0!important;
  border-radius: 0!important;
  line-height: 1!important;
}

body.dark-mode .sch-card-time {
  background: transparent!important;
  color: #ff9e87!important;
}

.sch-card-type {
  font-size: 9.5px!important;
  font-weight: 750!important;
  color: var(--muted)!important;
  text-transform: uppercase!important;
  letter-spacing: 0.3px!important;
}

.sch-card-title {
  font-size: 12.5px!important;
  font-weight: 750!important;
  color: var(--text)!important;
  line-height: 1.3!important;
  word-break: break-word!important;
  white-space: normal!important;
  overflow: hidden!important;
}

.sch-card-status {
  font-size: 10.5px!important;
  font-weight: 650!important;
  color: var(--muted)!important;
  display: flex!important;
  align-items: center!important;
  gap: 4px!important;
  margin-top: 1px!important;
}

.sch-card.status-completed {
  border-left-color: #279155!important;
  background: rgba(47, 158, 91, 0.08)!important;
}

.sch-card.status-completed .sch-card-status {
  color: #279155!important;
  font-weight: 750!important;
}

.sch-card.status-cancelled, .sch-card.status-no-show {
  opacity: 0.6!important;
  border-left-color: #d24747!important;
}

.standard-schedule-empty {
  padding: 12px 6px!important;
  text-align: center!important;
  color: var(--muted)!important;
  font-size: 11px!important;
  font-weight: 650!important;
  cursor: pointer!important;
  border-radius: 8px!important;
  border: 1px dashed var(--line)!important;
  transition: all .15s!important;
  display: flex!important;
  align-items: center!important;
  justify-content: center!important;
  min-height: 40px!important;
  margin-top: auto!important;
}

.standard-schedule-empty:hover {
  border-color: var(--accent)!important;
  color: var(--accent)!important;
  background: var(--surface, #f9fafb)!important;
}

/* =========================================================
   AGENDA FEED STYLES (Маленькі акуратні вкладки розкладу)
   ========================================================= */

.agenda-container-feed {
  display: flex;
  flex-direction: column;
  gap: 10px;
  max-width: 100%;
}

.agenda-day-card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 14px;
  overflow: hidden;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.03);
  transition: border-color .15s ease, box-shadow .15s ease;
}

.agenda-day-card.is-today {
  border-color: var(--accent);
  box-shadow: 0 0 0 2px var(--accent-soft);
}

body.dark-mode .agenda-day-card {
  background: #161922;
  border-color: var(--line);
}

body.dark-mode .agenda-day-card.is-today {
  box-shadow: 0 0 0 2px rgba(226, 124, 99, 0.25);
}

.agenda-day-card.is-empty {
  opacity: 0.88;
}

.agenda-day-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 16px;
  background: var(--surface, #f9fafb);
  border-bottom: 1px solid var(--line);
}

body.dark-mode .agenda-day-meta {
  background: #13161f;
  border-color: var(--line);
}

.agenda-day-left {
  display: flex;
  align-items: center;
  gap: 10px;
}

.agenda-short-tag {
  display: inline-flex;
  padding: 3px 8px;
  border-radius: 6px;
  background: var(--card);
  border: 1px solid var(--line);
  font-size: 11.5px;
  font-weight: 800;
  color: var(--text);
}

body.dark-mode .agenda-short-tag {
  background: #1c212d;
  border-color: var(--line);
  color: #fff;
}

.agenda-long-name {
  font-size: 14.5px;
  font-weight: 800;
  color: var(--text);
}

.agenda-date-str {
  font-size: 12.5px;
  color: var(--muted);
  font-weight: 600;
}

.agenda-today-chip {
  font-size: 10.5px;
  font-weight: 850;
  text-transform: uppercase;
  padding: 3px 8px;
  border-radius: 6px;
  background: var(--accent);
  color: #fff;
  letter-spacing: 0.3px;
}

.agenda-day-right {
  display: flex;
  align-items: center;
  gap: 8px;
}

.agenda-count-chip {
  font-size: 11.5px;
  font-weight: 750;
  color: var(--accent);
  background: var(--accent-soft);
  padding: 3px 8px;
  border-radius: 6px;
}

body.dark-mode .agenda-count-chip {
  background: rgba(226, 124, 99, 0.18);
  color: #ff9e87;
}

.agenda-quick-add {
  border: 1px solid var(--line);
  background: var(--card);
  color: var(--text);
  padding: 4px 10px;
  border-radius: 7px;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  transition: all .15s ease;
}

.agenda-quick-add:hover {
  border-color: var(--accent);
  color: var(--accent);
  background: var(--accent-soft);
}

body.dark-mode .agenda-quick-add {
  background: #1c212d;
  border-color: var(--line);
}

.agenda-day-body {
  padding: 8px 12px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.agenda-lesson-pill {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 9px 14px;
  background: var(--surface, #fcfdfe);
  border: 1px solid var(--line);
  border-left: 4px solid #4f7cff;
  border-radius: 10px;
  gap: 14px;
  cursor: pointer;
  transition: all .15s ease;
}

.agenda-lesson-pill:hover {
  border-color: var(--accent);
  background: var(--card);
  transform: translateX(2px);
  box-shadow: 0 3px 10px rgba(0, 0, 0, 0.04);
}

body.dark-mode .agenda-lesson-pill {
  background: #181c26;
  border-color: var(--line);
}

body.dark-mode .agenda-lesson-pill:hover {
  background: #1f2635;
  border-color: var(--accent);
}

.agenda-lesson-pill.type-individual { border-left-color: #4f7cff; }
.agenda-lesson-pill.type-pair { border-left-color: #23a26d; }
.agenda-lesson-pill.type-group { border-left-color: #e38b2c; }

.agenda-time-pill {
  font-size: 13px;
  font-weight: 850;
  color: var(--accent);
  background: var(--accent-soft);
  padding: 4px 9px;
  border-radius: 6px;
  flex: none;
}

body.dark-mode .agenda-time-pill {
  background: rgba(226, 124, 99, 0.18);
  color: #ff9e87;
}

.agenda-lesson-info {
  display: flex;
  align-items: center;
  gap: 10px;
  flex: 1;
  flex-wrap: wrap;
}

.agenda-student-name {
  font-size: 14.5px;
  font-weight: 750;
  color: var(--text);
}

.agenda-lesson-actions {
  display: flex;
  align-items: center;
  gap: 6px;
  flex: none;
}

.agenda-empty-strip {
  padding: 9px 14px;
  text-align: left;
  color: var(--muted);
  font-size: 12px;
  cursor: pointer;
  border-radius: 8px;
  border: 1px dashed var(--line);
  transition: all .15s ease;
}

.agenda-empty-strip:hover {
  border-color: var(--accent);
  color: var(--accent);
  background: var(--surface, #f9fafb);
}

body.dark-mode .agenda-empty-strip {
  border-color: var(--line);
}

body.dark-mode .agenda-empty-strip:hover {
  background: #181c26;
  border-color: var(--accent);
}

/* Premium Clean Schedule Toolbar */
.schedule-top-toolbar {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 8px;
}

.stt-nav-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
}

.stt-week-nav {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  background: var(--surface, #f8fafc);
  border: 1px solid var(--line, #e2e8f0);
  border-radius: 999px;
  padding: 2px 6px;
  height: 28px;
  box-sizing: border-box;
}
body.dark-mode .stt-week-nav {
  background: #141720;
  border-color: var(--line);
}

.btn-nav-arrow {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  border: none;
  background: transparent;
  color: var(--text);
  font-size: 15px;
  font-weight: 800;
  cursor: pointer;
  display: grid;
  place-items: center;
  transition: all 0.15s;
  padding: 0;
}
.btn-nav-arrow:hover {
  background: var(--surface-2, #e2e8f0);
  color: var(--accent);
}

.stt-week-label {
  font-size: 12px;
  font-weight: 750;
  color: var(--text);
  padding: 0 4px;
  white-space: nowrap;
  cursor: pointer;
}
.stt-week-label:hover {
  color: var(--accent);
}

.stt-actions {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
}
.stt-actions .btn {
  height: 28px !important;
  padding: 0 10px !important;
  font-size: 11.5px !important;
  font-weight: 700 !important;
  border-radius: 8px !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  white-space: nowrap !important;
}

.stt-filter-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  overflow: visible !important;
  position: relative;
  padding: 1px 0;
  z-index: 50;
}

.stt-view-switch {
  display: inline-flex;
  background: var(--surface-2, #f1f3f5);
  padding: 2px;
  border-radius: 8px;
  gap: 2px;
  flex-shrink: 0;
}
body.dark-mode .stt-view-switch {
  background: #1c212d;
}
.stt-view-btn {
  border: none;
  background: transparent;
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.15s ease;
  height: 22px;
  display: inline-flex;
  align-items: center;
  white-space: nowrap;
}
.stt-view-btn.active {
  background: var(--card, #ffffff);
  color: var(--text);
  box-shadow: 0 1px 3px rgba(0,0,0,0.08);
}
body.dark-mode .stt-view-btn.active {
  background: #252b3b;
  color: #fff;
}

/* Responsive Visibility Helpers */
.mobile-only {
  display: none !important;
}
.desktop-only {
  display: flex !important;
}

/* Schedule Desktop Format Pills */
.stt-format-pills {
  display: flex;
  align-items: center;
  gap: 4px;
  flex-shrink: 0;
  margin-left: auto;
}
.stt-pill {
  height: 26px;
  padding: 0 9px;
  font-size: 11px;
  font-weight: 650;
  border-radius: 999px;
  border: 1px solid var(--line, #e2e8f0);
  background: var(--surface, #f8fafc);
  color: var(--text);
  cursor: pointer;
  transition: all 0.15s ease;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  white-space: nowrap;
}
body.dark-mode .stt-pill {
  background: #141720;
  border-color: var(--line);
}
.stt-pill.active {
  background: var(--text, #1e293b);
  color: var(--card, #ffffff);
  border-color: var(--text, #1e293b);
  font-weight: 750;
}
body.dark-mode .stt-pill.active {
  background: #ffffff;
  color: #12151d;
  border-color: #ffffff;
}
.stt-pill.ind {
  color: #2563eb;
  background: rgba(59, 130, 246, 0.08);
  border-color: rgba(59, 130, 246, 0.25);
}
.stt-pill.ind.active {
  background: #2563eb;
  color: #ffffff;
  border-color: #2563eb;
}
.stt-pill.pair {
  color: #059669;
  background: rgba(16, 185, 129, 0.08);
  border-color: rgba(16, 185, 129, 0.25);
}
.stt-pill.pair.active {
  background: #059669;
  color: #ffffff;
  border-color: #059669;
}
.stt-pill.group {
  color: #d97706;
  background: rgba(245, 158, 11, 0.08);
  border-color: rgba(245, 158, 11, 0.25);
}
.stt-pill.group.active {
  background: #d97706;
  color: #ffffff;
  border-color: #d97706;
}

/* Students Desktop Toolbar */
.std-desktop-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  width: 100%;
}
.std-desktop-toolbar .std-pills-bar {
  display: flex;
  align-items: center;
  gap: 4px;
  flex-wrap: wrap;
}

/* Popover Filter System */
.schedule-popover-container {
  position: relative !important;
  display: inline-flex !important;
  z-index: 60 !important;
}
.schedule-top-toolbar .schedule-popover-container {
  margin-left: auto !important;
}

.sch-filter-pop-btn {
  height: 26px;
  padding: 0 10px;
  font-size: 11px;
  font-weight: 700;
  border-radius: 999px;
  border: 1px solid var(--line, #e2e8f0);
  background: var(--card, #ffffff);
  color: var(--text);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  transition: all 0.15s ease;
  box-shadow: 0 1px 3px rgba(0,0,0,0.04);
}
body.dark-mode .sch-filter-pop-btn {
  background: #141720;
  border-color: var(--line);
}
.sch-filter-pop-btn:hover {
  border-color: var(--accent);
  color: var(--accent);
}
.sch-filter-pop-btn.is-filtered {
  background: var(--accent-soft, rgba(164, 91, 70, 0.1));
  border-color: var(--accent);
  color: var(--accent);
}
.sfp-icon {
  font-size: 11px;
}
.sfp-label {
  white-space: nowrap;
}
.sfp-arrow {
  font-size: 9px;
  opacity: 0.7;
}

.sch-filter-menu {
  position: absolute !important;
  top: calc(100% + 4px) !important;
  left: 0 !important;
  right: auto !important;
  min-width: 175px !important;
  background: var(--card, #ffffff) !important;
  border: 1px solid var(--line, #e2e8f0) !important;
  border-radius: 12px !important;
  padding: 6px !important;
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.16) !important;
  z-index: 99999 !important;
  display: none !important;
  flex-direction: column !important;
  gap: 3px !important;
  animation: popoverFadeIn 0.15s ease-out;
}
.sch-filter-menu.align-left {
  left: 0 !important;
  right: auto !important;
}
.schedule-top-toolbar .sch-filter-menu,
.sch-filter-menu.align-right {
  left: auto !important;
  right: 0 !important;
  max-width: calc(100vw - 24px) !important;
}
body.dark-mode .sch-filter-menu {
  background: #1c212d !important;
  border-color: var(--line) !important;
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.4) !important;
}
.sch-filter-menu.open {
  display: flex !important;
}

@keyframes popoverFadeIn {
  from { opacity: 0; transform: translateY(-4px); }
  to { opacity: 1; transform: translateY(0); }
}

.sfm-item {
  display: flex !important;
  align-items: center !important;
  gap: 8px !important;
  width: 100% !important;
  padding: 7px 10px !important;
  border-radius: 8px !important;
  border: none !important;
  background: transparent !important;
  color: var(--text) !important;
  font-size: 12px !important;
  font-weight: 650 !important;
  cursor: pointer !important;
  transition: background 0.12s ease !important;
  text-align: left !important;
  white-space: nowrap !important;
  box-sizing: border-box !important;
}
.sfm-item:hover {
  background: var(--surface-2, #f1f3f5);
}
body.dark-mode .sfm-item:hover {
  background: #252b3b;
}
.sfm-item.active {
  background: var(--surface-2, #f1f3f5);
  color: var(--accent);
  font-weight: 750;
}
body.dark-mode .sfm-item.active {
  background: #252b3b;
  color: #ff9e87;
}

.sfm-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  flex-shrink: 0;
}
.sfm-dot.all { background: #64748b; }
.sfm-dot.ind { background: #2563eb; }
.sfm-dot.pair { background: #059669; }
.sfm-dot.group { background: #d97706; }

.sfm-check {
  margin-left: auto;
  font-size: 12px;
  font-weight: 800;
  color: var(--accent);
}

/* =========================================================
   CLEAN 7-COLUMN SCHEDULE GRID & COMPACT LESSON CARDS
   ========================================================= */

.seven-col-schedule-grid {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 10px;
  align-items: stretch;
  margin-top: 6px;
}

.col-day-box {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 14px;
  display: flex;
  flex-direction: column;
  min-height: 400px;
  overflow: hidden;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.03);
  transition: border-color .15s ease, box-shadow .15s ease;
}

.col-day-box.is-today {
  border-color: var(--accent);
  box-shadow: 0 0 0 2px var(--accent-soft);
}

body.dark-mode .col-day-box {
  background: #161922;
  border-color: var(--line);
}

body.dark-mode .col-day-box.is-today {
  box-shadow: 0 0 0 2px rgba(226, 124, 99, 0.25);
}

.col-day-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 9px 11px;
  background: var(--surface, #f9fafb);
  border-bottom: 1px solid var(--line);
}

body.dark-mode .col-day-head {
  background: #13161f;
  border-color: var(--line);
}

.cd-day-name {
  font-size: 13.5px;
  font-weight: 800;
  color: var(--text);
}

.cd-date-num {
  font-size: 11.5px;
  color: var(--muted);
  font-weight: 600;
  margin-left: 4px;
}

.cd-today-tag {
  font-size: 9.5px;
  font-weight: 850;
  text-transform: uppercase;
  padding: 2px 6px;
  border-radius: 5px;
  background: var(--accent);
  color: #fff;
  letter-spacing: 0.2px;
}

.cd-add-btn {
  border: 1px solid var(--line);
  background: var(--card);
  color: var(--muted);
  border-radius: 5px;
  width: 20px;
  height: 20px;
  display: grid;
  place-items: center;
  font-size: 12px;
  font-weight: 800;
  cursor: pointer;
  transition: all .15s;
  padding: 0;
}

.cd-add-btn:hover {
  border-color: var(--accent);
  color: var(--accent);
  background: var(--accent-soft);
}

body.dark-mode .cd-add-btn {
  background: #1c212d;
  border-color: var(--line);
}

.col-day-lessons {
  padding: 8px 7px;
  display: flex;
  flex-direction: column;
  gap: 7px;
  flex: 1;
}

/* Compact Lesson Card inside Column - Standardized Size */
.col-lesson-card {
  background: #ffffff;
  border: 1px solid var(--line);
  border-left: 3.5px solid #4f7cff;
  border-radius: 8px;
  padding: 4px 6px !important;
  height: 48px !important;
  min-height: 48px !important;
  max-height: 48px !important;
  display: flex !important;
  flex-direction: column !important;
  justify-content: space-between !important;
  cursor: pointer;
  transition: transform .15s ease, box-shadow .15s ease, border-color .15s ease;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.03);
  text-align: left;
  user-select: none;
  box-sizing: border-box !important;
  width: 100%;
  overflow: hidden !important;
}

body.dark-mode .col-lesson-card {
  background: #181c26;
  border-color: var(--line);
}

.col-lesson-card:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.07);
  border-color: var(--accent);
}

.col-lesson-card.type-individual {
  border-left-color: #2563eb !important;
  background: #f0f7ff !important;
  border-color: #c7dcfb !important;
}

.col-lesson-card.type-pair {
  border-left-color: #16a34a !important;
  background: #f0fdf4 !important;
  border-color: #bbf7d0 !important;
}

.col-lesson-card.type-group {
  border-left-color: #9333ea !important;
  background: #faf5ff !important;
  border-color: #e9d5ff !important;
}

body.dark-mode .col-lesson-card.type-individual {
  background: rgba(37, 99, 235, 0.14) !important;
  border-color: rgba(59, 130, 246, 0.28) !important;
  border-left-color: #60a5fa !important;
}
body.dark-mode .col-lesson-card.type-pair {
  background: rgba(22, 163, 74, 0.14) !important;
  border-color: rgba(34, 197, 94, 0.28) !important;
  border-left-color: #4ade80 !important;
}
body.dark-mode .col-lesson-card.type-group {
  background: rgba(147, 51, 234, 0.14) !important;
  border-color: rgba(168, 85, 247, 0.28) !important;
  border-left-color: #c084fc !important;
}

.clc-card-inner {
  display: flex !important;
  flex-direction: column !important;
  justify-content: space-between !important;
  width: 100% !important;
  height: 100% !important;
  box-sizing: border-box !important;
  font-family: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", system-ui, sans-serif !important;
  gap: 1px !important;
}

.clc-card-header {
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  width: 100% !important;
  height: 12px !important;
  line-height: 12px !important;
  margin-bottom: 0px !important;
  flex-shrink: 0 !important;
}

.clc-card-time {
  font-family: inherit !important;
  font-size: 10px !important;
  font-weight: 800 !important;
  color: #64748b !important;
  line-height: 1 !important;
  letter-spacing: -0.2px !important;
  white-space: nowrap !important;
  background: transparent !important;
  padding: 0 !important;
  border: 0 !important;
}
body.dark-mode .clc-card-time {
  color: #94a3b8 !important;
}

.clc-card-badges {
  display: flex !important;
  align-items: center !important;
  gap: 3px !important;
  flex-shrink: 0 !important;
}

.clc-card-offline {
  font-size: 9px !important;
  line-height: 1 !important;
}

.clc-card-status {
  font-family: inherit !important;
  font-size: 11px !important;
  font-weight: 900 !important;
  line-height: 1 !important;
}
.clc-card-status.status-done,
.clc-card-status.status-done-debt { color: #16a34a !important; }
.clc-card-status.status-cancelled,
.clc-card-status.status-no-show { color: #dc2626 !important; }
.clc-card-status.status-rescheduled { color: #d97706 !important; }

.clc-quick-complete-btn,
.sch-quick-complete-btn {
  display: none !important;
  align-items: center !important;
  justify-content: center !important;
  width: 15px !important;
  height: 15px !important;
  min-width: 15px !important;
  min-height: 15px !important;
  padding: 0 !important;
  border-radius: 50% !important;
  background: #16a34a !important;
  color: #ffffff !important;
  font-size: 10px !important;
  font-weight: 900 !important;
  line-height: 1 !important;
  border: none !important;
  cursor: pointer !important;
  box-shadow: 0 1px 3px rgba(22, 163, 74, 0.3) !important;
  transition: transform 0.12s ease, background 0.12s ease !important;
}

.clc-quick-complete-btn:hover,
.sch-quick-complete-btn:hover {
  transform: scale(1.15) !important;
  background: #15803d !important;
}

.col-lesson-card:hover .clc-quick-complete-btn,
.schedule-item:hover .sch-quick-complete-btn {
  display: inline-flex !important;
}

.col-lesson-card:hover .clc-card-status.status-scheduled,
.schedule-item:hover .sch-card-status.status-scheduled {
  display: none !important;
}

.clc-card-body {
  display: flex !important;
  flex-direction: column !important;
  justify-content: center !important;
  gap: 0.5px !important;
  width: 100% !important;
  height: 26px !important;
  min-height: 26px !important;
  text-align: left !important;
  flex-shrink: 0 !important;
}

.clc-card-name {
  font-family: inherit !important;
  font-size: 11.5px !important;
  font-weight: 700 !important;
  color: #0f172a !important;
  line-height: 1.08 !important;
  white-space: nowrap !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
  display: block !important;
  padding: 0 !important;
  margin: 0 !important;
  width: 100% !important;
}
body.dark-mode .clc-card-name {
  color: #f8fafc !important;
}

.col-lesson-card.status-done .clc-card-status {
  color: #16a34a !important;
}

.col-lesson-card.status-cancelled,
.col-lesson-card.status-no-show,
.col-lesson-card.status-rescheduled {
  opacity: 0.45 !important;
  filter: grayscale(0.5) !important;
  background: var(--surface-2, #f1f5f9) !important;
  border-left-color: #94a3b8 !important;
}

.strike-name .clc-card-name {
  text-decoration: line-through !important;
  color: #94a3b8 !important;
  opacity: 0.75 !important;
}

.col-lesson-card.status-cancelled .clc-card-status {
  color: #dc2626 !important;
}

.col-lesson-card.status-rescheduled .clc-card-status {
  color: #d97706 !important;
}

.schedule-item.status-cancelled-free,
.schedule-item.status-cancelled:not(.status-cancelled-charged):not(.is-deducted),
.schedule-item.status-no-show:not(.status-cancelled-charged):not(.is-deducted),
.schedule-item.status-rescheduled {
  opacity: 0.45 !important;
  filter: grayscale(0.5) !important;
  background: var(--surface-2, #f1f5f9) !important;
  border-left-color: #94a3b8 !important;
}
.schedule-item.status-cancelled-free .sch-first-name,
.schedule-item.status-cancelled:not(.status-cancelled-charged):not(.is-deducted) .sch-first-name,
.schedule-item.status-cancelled-free .sch-last-name,
.schedule-item.status-cancelled:not(.status-cancelled-charged):not(.is-deducted) .sch-last-name,
.schedule-item.status-no-show:not(.status-cancelled-charged):not(.is-deducted) .sch-first-name,
.schedule-item.status-no-show:not(.status-cancelled-charged):not(.is-deducted) .sch-last-name,
.schedule-item.status-rescheduled .sch-first-name,
.schedule-item.status-rescheduled .sch-last-name,
.schedule-item.status-cancelled-free .sch-item-title,
.schedule-item.status-cancelled:not(.status-cancelled-charged):not(.is-deducted) .sch-item-title,
.schedule-item.status-no-show:not(.status-cancelled-charged):not(.is-deducted) .sch-item-title,
.schedule-item.status-rescheduled .sch-item-title {
  text-decoration: line-through !important;
  color: var(--muted) !important;
}

.sch-card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 5px;
  width: 100%;
}
.sch-card-top-left {
  display: flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
  flex: 1;
}
.sch-first-name {
  font-size: 12px;
  font-weight: 750;
  color: var(--text);
  line-height: 1.2;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
body.dark-mode .sch-first-name {
  color: #f2f5f9;
}
.sch-last-name {
  font-size: 11px;
  font-weight: 600;
  color: var(--muted);
  line-height: 1.2;
  padding-left: 40px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
body.dark-mode .sch-last-name {
  color: #9aa5b5;
}

.clc-format-tag {
  font-size: 9.5px;
  font-weight: 700;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.2px;
}

.col-day-empty {
  padding: 12px 6px;
  text-align: center;
  color: var(--muted);
  font-size: 11px;
  font-weight: 600;
  cursor: pointer;
  border-radius: 8px;
  border: 1px dashed var(--line);
  transition: all .15s;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 36px;
  margin-top: auto;
}

.col-day-empty:hover {
  border-color: var(--accent);
  color: var(--accent);
  background: var(--surface, #f9fafb);
}

body.dark-mode .col-day-empty {
  border-color: var(--line);
}

/* =========================================================
   COMPLETED & CANCELLED LESSONS IN 7-COLUMN SCHEDULE
   ========================================================= */

.col-lesson-card.status-done,
.col-lesson-card.status-completed {
  opacity: 0.58;
  
  border-color: rgba(0, 0, 0, 0.08);
  box-shadow: none;
}

body.dark-mode .col-lesson-card.status-done,
body.dark-mode .col-lesson-card.status-completed {
  opacity: 0.52;
  
  border-color: rgba(255, 255, 255, 0.08);
}

.col-lesson-card.status-done:hover,
.col-lesson-card.status-completed:hover {
  opacity: 0.95;
  
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.06);
}

.col-lesson-card.status-done.type-individual,
.col-lesson-card.status-completed.type-individual {
  border-left-color: rgba(79, 124, 255, 0.45);
  background: rgba(79, 124, 255, 0.025);
}

.col-lesson-card.status-done.type-pair,
.col-lesson-card.status-completed.type-pair {
  border-left-color: rgba(35, 162, 109, 0.45);
  background: rgba(35, 162, 109, 0.025);
}

.col-lesson-card.status-done.type-group,
.col-lesson-card.status-completed.type-group {
  border-left-color: rgba(227, 139, 44, 0.45);
  background: rgba(227, 139, 44, 0.025);
}

body.dark-mode .col-lesson-card.status-done.type-individual,
body.dark-mode .col-lesson-card.status-completed.type-individual {
  border-left-color: rgba(79, 124, 255, 0.4);
  background: rgba(79, 124, 255, 0.04);
}

.col-lesson-card.status-done .clc-time,
.col-lesson-card.status-completed .clc-time {
  background: rgba(0, 0, 0, 0.05);
  color: var(--muted);
}

body.dark-mode .col-lesson-card.status-done .clc-time,
body.dark-mode .col-lesson-card.status-completed .clc-time {
  background: rgba(255, 255, 255, 0.07);
  color: #9aa0a6;
}

.col-lesson-card.status-done .clc-name,
.col-lesson-card.status-completed .clc-name {
  color: var(--muted);
  font-weight: 650;
}

.col-lesson-card.status-done .clc-status-icon,
.col-lesson-card.status-completed .clc-status-icon {
  color: #279155;
  font-weight: 900;
  font-size: 11.5px;
}

/* =========================================================
   Cancelled / Rescheduled / Deducted Status Styles
   ========================================================= */

/* 1. Cancelled WITHOUT deduction (Muted & faded) */
.col-lesson-card.status-cancelled-free,
.col-lesson-card.status-cancelled:not(.is-deducted):not(.status-cancelled-charged),
.col-lesson-card.status-no-show:not(.is-deducted):not(.status-cancelled-charged) {
  opacity: 0.42;
  border-left-color: #94a3b8;
}
.col-lesson-card.status-rescheduled {
  opacity: 0.48;
  border-left-color: #8b929c;
}
.col-lesson-card.status-cancelled-free .clc-card-name,
.col-lesson-card.status-cancelled:not(.is-deducted) .clc-card-name,
.col-lesson-card.status-no-show:not(.is-deducted) .clc-card-name,
.col-lesson-card.status-rescheduled .clc-card-name {
  text-decoration: line-through;
  color: var(--muted);
}
.col-lesson-card.status-cancelled-free:hover,
.col-lesson-card.status-rescheduled:hover {
  opacity: 0.85;
}

/* 2. Cancelled WITH DEDUCTION (POTENTIAL PROBLEM: Prominent RED highlight & glow) */
.col-lesson-card.status-cancelled-charged,
.col-lesson-card.is-deducted,
.schedule-item.status-cancelled-charged,
.schedule-item.is-deducted {
  opacity: 1 !important;
  background: rgba(239, 68, 68, 0.08) !important;
  border-left: 3.5px solid #ef4444 !important;
  box-shadow: 0 0 0 1px rgba(239, 68, 68, 0.25), 0 2px 8px rgba(239, 68, 68, 0.12) !important;
}
body.dark-mode .col-lesson-card.status-cancelled-charged,
body.dark-mode .col-lesson-card.is-deducted,
body.dark-mode .schedule-item.status-cancelled-charged,
body.dark-mode .schedule-item.is-deducted {
  background: rgba(239, 68, 68, 0.16) !important;
  border-left-color: #f87171 !important;
  box-shadow: 0 0 0 1px rgba(239, 68, 68, 0.35), 0 2px 10px rgba(239, 68, 68, 0.25) !important;
}

.col-lesson-card.status-cancelled-charged:hover,
.col-lesson-card.is-deducted:hover,
.schedule-item.status-cancelled-charged:hover,
.schedule-item.is-deducted:hover {
  box-shadow: 0 0 0 1px rgba(239, 68, 68, 0.4), 0 4px 14px rgba(239, 68, 68, 0.22) !important;
  transform: translateY(-1px) !important;
}

.col-lesson-card.status-cancelled-charged .clc-card-name,
.col-lesson-card.is-deducted .clc-card-name,
.schedule-item.status-cancelled-charged .sch-card-name,
.schedule-item.is-deducted .sch-card-name {
  color: #b91c1c !important;
  font-weight: 750 !important;
  text-decoration: none !important;
}
body.dark-mode .col-lesson-card.status-cancelled-charged .clc-card-name,
body.dark-mode .col-lesson-card.is-deducted .clc-card-name,
body.dark-mode .schedule-item.status-cancelled-charged .sch-card-name,
body.dark-mode .schedule-item.is-deducted .sch-card-name {
  color: #fca5a5 !important;
}

.col-lesson-card .clc-card-status.status-cancelled-charged,
.schedule-item .sch-card-status.status-cancelled-charged,
.schedule-item .sch-item-status-icon.status-cancelled-charged {
  background: rgba(239, 68, 68, 0.15) !important;
  color: #dc2626 !important;
  border: 1px solid rgba(239, 68, 68, 0.3) !important;
  border-radius: 6px !important;
  padding: 1px 5px !important;
  font-size: 10px !important;
  font-weight: 800 !important;
  letter-spacing: -0.2px !important;
}
body.dark-mode .col-lesson-card .clc-card-status.status-cancelled-charged,
body.dark-mode .schedule-item .sch-card-status.status-cancelled-charged,
body.dark-mode .schedule-item .sch-item-status-icon.status-cancelled-charged {
  background: rgba(239, 68, 68, 0.25) !important;
  color: #fca5a5 !important;
  border-color: rgba(239, 68, 68, 0.4) !important;
}

/* 3. Dashboard Today row: Cancelled with deduction */
.apple-sch-row.is-cancelled-deducted {
  background: rgba(239, 68, 68, 0.05) !important;
  border-left: 3px solid #ef4444 !important;
}
body.dark-mode .apple-sch-row.is-cancelled-deducted {
  background: rgba(239, 68, 68, 0.12) !important;
  border-left-color: #f87171 !important;
}
.asr-stripe.deducted-red {
  background: #ef4444 !important;
}
.asr-status-pill.cancelled-charged {
  background: rgba(239, 68, 68, 0.12) !important;
  color: #dc2626 !important;
  border: 1px solid rgba(239, 68, 68, 0.25) !important;
  border-radius: 7px !important;
  padding: 2.5px 8px !important;
  font-size: 11px !important;
  font-weight: 800 !important;
}
body.dark-mode .asr-status-pill.cancelled-charged {
  background: rgba(239, 68, 68, 0.22) !important;
  color: #fca5a5 !important;
  border-color: rgba(239, 68, 68, 0.4) !important;
}

/* =========================================================
   EMOJI AVATAR & PICKER STYLES
   ========================================================= */

.user-avatar-emoji {
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.04);
}

body.dark-mode .user-avatar-emoji {
  border-color: rgba(255, 255, 255, 0.1) !important;
  background: rgba(255, 255, 255, 0.06) !important;
}

.modal-student-avatar-wrap {
  position: relative;
  cursor: pointer;
  display: inline-flex;
}

.modal-student-avatar-wrap:hover .user-avatar {
  transform: scale(1.08);
}

.avatar-edit-badge {
  position: absolute;
  bottom: -2px;
  right: -4px;
  font-size: 11px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 50%;
  width: 18px;
  height: 18px;
  display: grid;
  place-items: center;
  box-shadow: 0 2px 4px rgba(0,0,0,.1);
}

.emoji-picker-grid {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 10px;
  padding: 12px 4px;
  max-height: 320px;
  overflow-y: auto;
}

.emoji-pick-btn {
  background: var(--surface, #f9fafb);
  border: 1px solid var(--line);
  border-radius: 12px;
  font-size: 26px;
  padding: 10px 0;
  cursor: pointer;
  transition: all .15s ease;
  display: grid;
  place-items: center;
}

.emoji-pick-btn:hover {
  transform: scale(1.15);
  border-color: var(--accent);
  background: var(--accent-soft);
}

.emoji-pick-btn.active {
  border-color: var(--accent);
  background: var(--accent-soft);
  box-shadow: 0 0 0 2px var(--accent);
}

body.dark-mode .emoji-pick-btn {
  background: #181c26;
  border-color: var(--line);
}

/* Drag and Drop for 7-column schedule */
.col-lesson-card.is-draggable {
  cursor: grab;
}

.col-lesson-card.is-draggable:active {
  cursor: grabbing;
}

.col-lesson-card.is-dragging {
  opacity: 0.35 !important;
  transform: scale(0.97);
  box-shadow: 0 0 0 2px var(--accent) !important;
}

.col-day-box.drag-over {
  border-color: var(--accent) !important;
  box-shadow: 0 0 0 2px var(--accent), 0 8px 24px rgba(226, 124, 99, 0.15) !important;
  background: var(--accent-soft) !important;
}

body.dark-mode .col-day-box.drag-over {
  background: rgba(226, 124, 99, 0.12) !important;
}

/* Reschedule Time Chips */
.reschedule-time-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.reschedule-chip {
  padding: 5px 9px;
  border-radius: 7px;
  border: 1px solid var(--line);
  background: var(--surface, #f9fafb);
  color: var(--text);
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  transition: all .15s ease;
}

.reschedule-chip:hover {
  border-color: var(--accent);
  color: var(--accent);
  background: var(--accent-soft);
}

.reschedule-chip.active {
  background: var(--accent);
  color: #fff;
  border-color: var(--accent);
}

body.dark-mode .reschedule-chip {
  background: #181c26;
  border-color: var(--line);
}

/* Red Checkmark for Lessons Conducted in Debt */
.col-lesson-card.status-done-debt .clc-status-icon,
.col-lesson-card.status-completed-debt .clc-status-icon {
  color: #e25858 !important;
  font-weight: 900 !important;
  font-size: 13px !important;
}

.col-lesson-card.status-done-debt,
.col-lesson-card.status-completed-debt {
  opacity: 0.72 !important;
  filter: saturate(0.85) !important;
}

.col-lesson-card.status-done-debt:hover,
.col-lesson-card.status-completed-debt:hover {
  opacity: 1 !important;
}

.schedule-item.status-completed-debt::after {
  content: '✓' !important;
  color: #e25858 !important;
  font-weight: 900 !important;
  font-size: 12px !important;
}

/* =========================================================
   CLEAN ULTRA HIGH PERFORMANCE & SOFT CARD OPACITY
   ========================================================= */

.col-lesson-card.status-done,
.col-lesson-card.status-completed {
  opacity: 0.44 !important;
  filter: saturate(0.7) !important;
}

.col-lesson-card.status-done-debt,
.col-lesson-card.status-completed-debt {
  opacity: 0.48 !important;
  filter: saturate(0.8) !important;
}

.col-lesson-card.status-cancelled,
.col-lesson-card.status-rescheduled,
.col-lesson-card.status-no-show {
  opacity: 0.40 !important;
}

.col-lesson-card.status-done:hover,
.col-lesson-card.status-completed:hover,
.col-lesson-card.status-done-debt:hover,
.col-lesson-card.status-completed-debt:hover,
.col-lesson-card.status-cancelled:hover,
.col-lesson-card.status-rescheduled:hover,
.col-lesson-card.status-no-show:hover {
  opacity: 0.90 !important;
  filter: none !important;
}

/* Dashboard Today Schedule styles */
.dash-today-row.is-completed {
  opacity: 0.52;
}
.dash-today-row.is-rescheduled,
.dash-today-row.is-cancelled {
  opacity: 0.48;
}
.dash-today-row.is-completed:hover,
.dash-today-row.is-rescheduled:hover,
.dash-today-row.is-cancelled:hover {
  opacity: 0.92;
}
.dash-today-row .strike-name {
  text-decoration: line-through;
  color: var(--muted);
}

/* Strike-through for rescheduled and cancelled lessons in all views */
.schedule-item.status-rescheduled .schedule-item-name,
.schedule-item.status-cancelled .schedule-item-name,
.schedule-item.status-cancelled-free .schedule-item-name,
.schedule-item.status-cancelled-charged .schedule-item-name,
.schedule-item.status-no-show .schedule-item-name,
.schedule-grid .schedule-item.status-rescheduled .schedule-item-name,
.schedule-grid .schedule-item.status-cancelled .schedule-item-name,
.schedule-grid .schedule-item.status-cancelled-free .schedule-item-name,
.schedule-grid .schedule-item.status-cancelled-charged .schedule-item-name,
.schedule-grid .schedule-item.status-no-show .schedule-item-name {
  text-decoration: line-through !important;
  opacity: 0.85;
}

.col-lesson-card.status-rescheduled .clc-name,
.col-lesson-card.status-cancelled .clc-name,
.col-lesson-card.status-cancelled-free .clc-name,
.col-lesson-card.status-cancelled-charged .clc-name,
.col-lesson-card.status-no-show .clc-name {
  text-decoration: line-through !important;
  opacity: 0.85;
}

.month-lesson.status-rescheduled .month-lesson-name,
.month-lesson.status-rescheduled .month-lesson-text,
.month-lesson.status-cancelled .month-lesson-name,
.month-lesson.status-cancelled-free .month-lesson-name,
.month-lesson.status-cancelled-charged .month-lesson-name,
.month-lesson.status-no-show .month-lesson-name {
  text-decoration: line-through !important;
}

.month-day-modal-row.status-rescheduled strong,
.month-day-modal-row.status-cancelled strong,
.month-day-modal-row.status-cancelled-free strong,
.month-day-modal-row.status-cancelled-charged strong,
.month-day-modal-row.status-no-show strong {
  text-decoration: line-through !important;
}

.standard-schedule-row.status-rescheduled .standard-schedule-main strong,
.standard-schedule-row.status-cancelled .standard-schedule-main strong,
.standard-schedule-row.status-cancelled-free .standard-schedule-main strong,
.standard-schedule-row.status-cancelled-charged .standard-schedule-main strong,
.standard-schedule-row.status-no-show .standard-schedule-main strong {
  text-decoration: line-through !important;
}

.strike-name {
  text-decoration: line-through !important;
  color: var(--muted) !important;
}

/* Location badge (Online / Offline) */
.location-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 11px;
  font-weight: 650;
  padding: 2px 7px;
  border-radius: 6px;
  vertical-align: middle;
}
.location-badge.online {
  background: rgba(91, 141, 239, 0.12);
  color: #3b76e1;
  border: 1px solid rgba(91, 141, 239, 0.25);
}
.location-badge.offline {
  background: rgba(229, 138, 58, 0.12);
  color: #c96d1e;
  border: 1px solid rgba(229, 138, 58, 0.28);
}
body.dark-mode .location-badge.online {
  background: rgba(91, 141, 239, 0.2);
  color: #8bb3f8;
  border-color: rgba(91, 141, 239, 0.35);
}
body.dark-mode .location-badge.offline {
  background: rgba(229, 138, 58, 0.2);
  color: #f6ad55;
  border-color: rgba(229, 138, 58, 0.35);
}

.clc-offline-tag {
  font-size: 10px;
  font-weight: 700;
  padding: 1px 5px;
  border-radius: 4px;
  background: rgba(229, 138, 58, 0.14);
  color: #c96d1e;
  border: 1px solid rgba(229, 138, 58, 0.3);
  display: inline-flex;
  align-items: center;
}
body.dark-mode .clc-offline-tag {
  background: rgba(229, 138, 58, 0.22);
  color: #f6ad55;
}

/* Student Links Tab */
.student-links-wrap {
  padding: 6px 0 16px;
}
.student-links-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.student-link-card {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  background: var(--surface, #f8fafc);
  border: 1px solid var(--line);
  border-radius: 12px;
  transition: all 0.15s ease;
}
.student-link-card:hover {
  border-color: var(--accent);
  background: var(--card);
  box-shadow: 0 3px 10px rgba(0, 0, 0, 0.04);
}
body.dark-mode .student-link-card {
  background: #181c26;
  border-color: rgba(255, 255, 255, 0.08);
}
body.dark-mode .student-link-card:hover {
  background: #1d222e;
  border-color: var(--accent);
}
.student-link-icon {
  font-size: 20px;
  flex-shrink: 0;
}
.student-link-info {
  flex: 1;
  min-width: 0;
}
.student-link-title {
  font-size: 14px;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 2px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.student-link-url {
  font-size: 12px;
  color: var(--muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.student-link-actions {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
}
.btn-open-link {
  text-decoration: none;
  font-weight: 600;
}

/* Empty Links State */
.empty-links-state {
  text-align: center;
  padding: 36px 16px;
  background: var(--surface, #f8fafc);
  border: 1px dashed var(--line);
  border-radius: 14px;
  margin: 10px 0;
}
body.dark-mode .empty-links-state {
  background: #161922;
  border-color: rgba(255, 255, 255, 0.1);
}
.empty-links-icon {
  font-size: 36px;
  margin-bottom: 8px;
  opacity: 0.8;
}
.empty-links-title {
  font-size: 16px;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 4px;
}
.empty-links-desc {
  font-size: 13px;
  color: var(--muted);
  max-width: 380px;
  margin: 0 auto;
  line-height: 1.4;
}

/* Student Links Chips in Overview */
.student-links-overview-card {
  padding: 14px 16px;
}
.student-links-chips-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 8px;
}
.student-link-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  background: var(--surface, #f3f4f6);
  border: 1px solid var(--line);
  border-radius: 8px;
  text-decoration: none;
  color: var(--text);
  font-size: 13px;
  font-weight: 600;
  transition: all 0.15s ease;
}
.student-link-chip:hover {
  background: var(--accent-soft);
  border-color: var(--accent);
  color: var(--accent);
  transform: translateY(-1px);
}
body.dark-mode .student-link-chip {
  background: #191d28;
  border-color: rgba(255, 255, 255, 0.08);
}
body.dark-mode .student-link-chip:hover {
  background: rgba(226, 124, 99, 0.15);
  border-color: var(--accent);
}
.slc-arrow {
  font-size: 11px;
  opacity: 0.7;
}

/* Streamlined Topic Bar */
.lesson-topic-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--surface, #f4f6f8);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 6px 12px;
  margin: 10px 0 14px 0;
  transition: border-color 0.15s, background-color 0.15s;
}
.lesson-topic-bar:focus-within {
  border-color: var(--accent);
  background: var(--card, #fff);
  box-shadow: 0 0 0 2px var(--accent-soft);
}
body.dark-mode .lesson-topic-bar {
  background: #141720;
  border-color: rgba(255, 255, 255, 0.08);
}
body.dark-mode .lesson-topic-bar:focus-within {
  background: #181c26;
  border-color: var(--accent);
}
.topic-bar-icon {
  font-size: 14px;
  opacity: 0.7;
  user-select: none;
}
.topic-bar-input {
  flex: 1;
  border: none;
  background: transparent;
  font-size: 13.5px;
  color: var(--text);
  outline: none;
  padding: 4px 0;
}
.topic-bar-input::placeholder {
  color: var(--muted);
  font-size: 13px;
}
.btn-topic-save {
  background: transparent;
  border: none;
  font-size: 14px;
  cursor: pointer;
  padding: 4px 6px;
  border-radius: 6px;
  transition: background 0.15s;
  color: var(--muted);
  line-height: 1;
}
.btn-topic-save:hover {
  background: var(--surface);
  color: var(--accent);
}

/* History lesson topic display */
.history-lesson-topic {
  font-size: 12.5px;
  color: var(--muted);
  margin-top: 3px;
  line-height: 1.35;
}
.history-loc-tag {
  font-size: 10px;
  font-weight: 700;
  padding: 1px 5px;
  border-radius: 4px;
  background: rgba(229, 138, 58, 0.14);
  color: #c96d1e;
  margin-left: 6px;
  display: inline-block;
}
body.dark-mode .history-loc-tag {
  background: rgba(229, 138, 58, 0.22);
  color: #f6ad55;
}

/* Report Modal & Textarea */
.report-box-wrap {
  margin-top: 10px;
}
.report-box-label {
  display: block;
  font-size: 12.5px;
  color: var(--muted);
  margin-bottom: 6px;
  font-weight: 600;
}
.report-textarea {
  width: 100%;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--surface, #f8fafc);
  font-family: inherit;
  font-size: 13.5px;
  line-height: 1.5;
  color: var(--text);
  resize: vertical;
  outline: none;
  box-sizing: border-box;
}
.report-textarea:focus {
  border-color: var(--accent);
}
body.dark-mode .report-textarea {
  background: #161922;
  color: #e2e8f0;
  border-color: rgba(255, 255, 255, 0.12);
}

/* Global Toast Notification - Apple Dynamic Capsule Style */
.voca-toast {
  position: fixed;
  bottom: 28px;
  left: 50%;
  transform: translateX(-50%) translateY(16px) scale(0.96);
  background: rgba(30, 41, 59, 0.95);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  color: #ffffff;
  padding: 10px 22px;
  border-radius: 9999px;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: -0.1px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.22), 0 2px 6px rgba(0, 0, 0, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.14);
  z-index: 99999;
  opacity: 0;
  pointer-events: none;
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}
.voca-toast.visible {
  opacity: 1;
  transform: translateX(-50%) translateY(0) scale(1);
}
body.dark-mode .voca-toast {
  background: rgba(24, 28, 39, 0.96);
  border: 1px solid rgba(255, 255, 255, 0.18);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.55);
}

/* ==========================================================================
   Lock Screen & Dual Auth (PIN / Password) - Ultra-Modern Glass Aesthetic
   ========================================================================== */
.voca-lock-overlay {
  position: fixed;
  inset: 0;
  background: 
    radial-gradient(at 15% 20%, rgba(243, 139, 109, 0.16) 0px, transparent 55%),
    radial-gradient(at 85% 15%, rgba(220, 160, 120, 0.18) 0px, transparent 50%),
    radial-gradient(at 50% 85%, rgba(164, 91, 70, 0.12) 0px, transparent 60%),
    linear-gradient(135deg, #f8f9fb 0%, #edf0f5 100%);
  backdrop-filter: blur(24px) saturate(180%);
  -webkit-backdrop-filter: blur(24px) saturate(180%);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10000;
  padding: 20px;
}
body.dark-mode .voca-lock-overlay {
  background: 
    radial-gradient(at 15% 20%, rgba(243, 139, 109, 0.15) 0px, transparent 55%),
    radial-gradient(at 85% 80%, rgba(130, 80, 200, 0.12) 0px, transparent 50%),
    linear-gradient(135deg, #0f131a 0%, #161b24 100%);
}

.voca-lock-card {
  width: min(390px, 94vw);
  background: rgba(255, 255, 255, 0.78);
  backdrop-filter: blur(30px) saturate(190%);
  -webkit-backdrop-filter: blur(30px) saturate(190%);
  border: 1px solid rgba(255, 255, 255, 0.85);
  border-radius: 36px;
  padding: 34px 28px 28px;
  box-shadow: 
    0 30px 80px -15px rgba(28, 25, 23, 0.12),
    0 0 0 1px rgba(0, 0, 0, 0.04),
    inset 0 1px 1px rgba(255, 255, 255, 0.9);
  text-align: center;
  position: relative;
  transition: transform 0.2s cubic-bezier(0.34, 1.56, 0.64, 1);
}
body.dark-mode .voca-lock-card {
  background: rgba(24, 28, 36, 0.82);
  border-color: rgba(255, 255, 255, 0.12);
  box-shadow: 
    0 30px 80px -15px rgba(0, 0, 0, 0.7),
    0 0 0 1px rgba(255, 255, 255, 0.06),
    inset 0 1px 1px rgba(255, 255, 255, 0.08);
}

.voca-lock-badge {
  width: 52px;
  height: 52px;
  border-radius: 18px;
  background: linear-gradient(135deg, #b86248 0%, #8f4633 100%);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 12px;
  box-shadow: 0 8px 20px -4px rgba(164, 91, 70, 0.4), inset 0 1px 1px rgba(255,255,255,0.3);
}
.voca-lock-badge-icon {
  font-size: 24px;
}

.voca-lock-logo {
  font-size: 22px;
  font-weight: 800;
  letter-spacing: -0.4px;
  margin-bottom: 3px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
}
.voca-lock-brand-crm {
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.8px;
  background: linear-gradient(135deg, #a45b46 0%, #8f4633 100%);
  color: #fff;
  padding: 2px 7px;
  border-radius: 6px;
  text-transform: uppercase;
}

.voca-lock-subtitle {
  font-size: 13px;
  color: var(--muted, #737b87);
  margin-bottom: 20px;
  font-weight: 500;
}

.voca-lock-tabs {
  display: flex;
  background: rgba(0, 0, 0, 0.05);
  border-radius: 14px;
  padding: 4px;
  margin-bottom: 22px;
  gap: 4px;
  border: 1px solid rgba(0, 0, 0, 0.03);
}
body.dark-mode .voca-lock-tabs {
  background: rgba(255, 255, 255, 0.06);
  border-color: rgba(255, 255, 255, 0.05);
}

.voca-lock-tab-btn {
  flex: 1;
  border: 0;
  background: transparent;
  padding: 8px 12px;
  border-radius: 10px;
  font-size: 13px;
  font-weight: 600;
  color: var(--muted, #737b87);
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.34, 1.56, 0.64, 1);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
}
.voca-lock-tab-btn.active {
  background: #ffffff;
  color: #1c1917;
  font-weight: 700;
  box-shadow: 0 3px 12px rgba(0, 0, 0, 0.08), 0 1px 2px rgba(0, 0, 0, 0.04);
}
body.dark-mode .voca-lock-tab-btn.active {
  background: rgba(255, 255, 255, 0.16);
  color: #fff;
}

/* PIN Dots */
.voca-pin-dots-wrap {
  display: flex;
  justify-content: center;
  gap: 20px;
  margin: 8px 0 24px;
}
.voca-pin-dot {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  border: 1.5px solid rgba(0, 0, 0, 0.18);
  background: rgba(0, 0, 0, 0.05);
  transition: all 0.25s cubic-bezier(0.34, 1.56, 0.64, 1);
}
.voca-pin-dot.filled {
  background: linear-gradient(135deg, #a45b46, #c26e56);
  border-color: #a45b46;
  transform: scale(1.35);
  box-shadow: 0 3px 12px rgba(164, 91, 70, 0.45);
}
body.dark-mode .voca-pin-dot {
  border-color: rgba(255, 255, 255, 0.25);
  background: rgba(255, 255, 255, 0.06);
}
body.dark-mode .voca-pin-dot.filled {
  background: linear-gradient(135deg, #f38b6d, #e26e4e);
  border-color: #f38b6d;
  box-shadow: 0 3px 12px rgba(243, 139, 109, 0.5);
}

/* PIN Keypad (Apple iOS Design) */
.voca-keypad {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px 16px;
  max-width: 270px;
  margin: 0 auto 16px;
}
.voca-keypad-btn {
  height: 68px;
  width: 68px;
  margin: 0 auto;
  border-radius: 50%;
  border: 1px solid rgba(0, 0, 0, 0.06);
  background: rgba(255, 255, 255, 0.72);
  color: var(--text, #1c1917);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.15s ease;
  user-select: none;
  -webkit-tap-highlight-color: transparent;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.03);
}
.voca-kp-num {
  font-size: 26px;
  font-weight: 500;
  line-height: 1.05;
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Display", system-ui, sans-serif;
}
.voca-kp-sub {
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 1.4px;
  opacity: 0.5;
  text-transform: uppercase;
  margin-top: 1px;
}
.voca-kp-action {
  font-size: 17px;
  font-weight: 600;
}

.voca-keypad-btn:hover {
  background: rgba(255, 255, 255, 0.96);
  transform: scale(1.05);
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.08);
}
.voca-keypad-btn:active {
  transform: scale(0.92);
  background: linear-gradient(135deg, #a45b46, #8f4633);
  color: #fff;
  border-color: transparent;
  box-shadow: 0 2px 8px rgba(164, 91, 70, 0.4);
}
.voca-keypad-btn:active .voca-kp-sub {
  opacity: 0.85;
}

.voca-keypad-btn.action {
  border: 0;
  background: transparent;
  box-shadow: none;
  color: var(--muted, #78716c);
}
.voca-keypad-btn.action:hover {
  background: rgba(0, 0, 0, 0.05);
  color: var(--text, #1c1917);
}
.voca-keypad-btn.action:active {
  background: rgba(0, 0, 0, 0.1);
  color: var(--text, #1c1917);
}

body.dark-mode .voca-keypad-btn {
  background: rgba(255, 255, 255, 0.07);
  border-color: rgba(255, 255, 255, 0.09);
  color: #fff;
  box-shadow: none;
}
body.dark-mode .voca-keypad-btn:hover {
  background: rgba(255, 255, 255, 0.14);
}
body.dark-mode .voca-keypad-btn:active {
  background: linear-gradient(135deg, #f38b6d, #e26e4e);
  color: #fff;
}
body.dark-mode .voca-keypad-btn.action {
  background: transparent;
  color: rgba(255, 255, 255, 0.6);
}
body.dark-mode .voca-keypad-btn.action:hover {
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
}

/* Password View */
.voca-pass-wrap {
  display: flex;
  flex-direction: column;
  gap: 14px;
  margin: 8px 0 18px;
}
.voca-pass-input-box {
  position: relative;
  display: flex;
  align-items: center;
}
.voca-pass-input {
  width: 100%;
  padding: 13px 44px 13px 16px;
  border: 1.5px solid rgba(0, 0, 0, 0.12);
  border-radius: 14px;
  font-size: 15px;
  background: rgba(255, 255, 255, 0.85);
  color: var(--text, #1d222b);
  outline: none;
  transition: all 0.2s ease;
}
.voca-pass-input:focus {
  border-color: var(--accent, #a45b46);
  background: #ffffff;
  box-shadow: 0 0 0 3.5px rgba(164, 91, 70, 0.15);
}
body.dark-mode .voca-pass-input {
  background: rgba(255, 255, 255, 0.06);
  border-color: rgba(255, 255, 255, 0.12);
  color: #fff;
}
body.dark-mode .voca-pass-input:focus {
  border-color: #f38b6d;
  background: rgba(255, 255, 255, 0.09);
  box-shadow: 0 0 0 3.5px rgba(243, 139, 109, 0.2);
}

.voca-pass-toggle-eye {
  position: absolute;
  right: 12px;
  background: transparent;
  border: 0;
  cursor: pointer;
  color: var(--muted, #737b87);
  font-size: 17px;
  padding: 4px;
  opacity: 0.7;
  transition: opacity 0.15s;
}
.voca-pass-toggle-eye:hover {
  opacity: 1;
}

.voca-login-submit-btn {
  width: 100%;
  padding: 13px;
  border-radius: 14px;
  border: 0;
  background: linear-gradient(135deg, #a45b46 0%, #8f4633 100%);
  color: #fff;
  font-size: 15px;
  font-weight: 700;
  letter-spacing: -0.2px;
  cursor: pointer;
  box-shadow: 0 6px 20px -4px rgba(164, 91, 70, 0.4);
  transition: opacity 0.15s, transform 0.15s;
}
.voca-login-submit-btn:hover {
  opacity: 0.95;
  transform: translateY(-1px);
  box-shadow: 0 8px 24px -4px rgba(164, 91, 70, 0.5);
}
.voca-login-submit-btn:active {
  transform: translateY(0);
}

.voca-lock-remember {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-size: 12.5px;
  color: var(--muted, #737b87);
  margin-top: 14px;
  cursor: pointer;
  user-select: none;
  font-weight: 500;
}
.voca-lock-remember input[type="checkbox"] {
  accent-color: var(--accent, #a45b46);
  width: 15px;
  height: 15px;
  cursor: pointer;
}

.voca-lock-error {
  min-height: 20px;
  font-size: 12.5px;
  color: var(--red, #b54b4b);
  font-weight: 600;
  margin-bottom: 6px;
  transition: all 0.2s;
}
.voca-lock-error:not(:empty) {
  background: rgba(226, 88, 88, 0.1);
  padding: 4px 10px;
  border-radius: 8px;
  display: inline-block;
}

/* Shake animation */
@keyframes vocaShake {
  0%, 100% { transform: translateX(0); }
  20%, 60% { transform: translateX(-9px); }
  40%, 80% { transform: translateX(9px); }
}
.voca-shake {
  animation: vocaShake 0.4s ease-in-out;
}

/* Quick Lock Button in Navigation */
.quick-lock-btn {
  border: 0;
  background: transparent;
  color: var(--muted);
  padding: 8px;
  border-radius: 8px;
  cursor: pointer;
  font-size: 15px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: all 0.15s ease;
}
.quick-lock-btn:hover {
  background: var(--surface-2, #f1f3f5);
  color: var(--text);
}

/* ==========================================================================
   Comprehensive Mobile & Tablet Responsiveness Overhaul (iOS & Android)
   ========================================================================== */
@media (max-width: 768px) {
  /* Responsive Visibility Helpers on Mobile */
  .mobile-only {
    display: flex !important;
  }
  .desktop-only {
    display: none !important;
  }

  /* Prevent iOS Safari auto-zoom on input focus */
  input, select, textarea {
    font-size: 16px !important;
  }

  html, body {
    overflow-x: hidden;
    overscroll-behavior-y: none;
    height: auto;
    min-height: 100%;
    margin: 0;
    padding: 0;
  }

  /* App Layout on Mobile */
  .app {
    display: flex;
    flex-direction: column;
    min-height: 100dvh;
    min-height: 100vh;
    overflow-x: hidden;
    width: 100%;
  }

  .sidebar {
    width: 100% !important;
    height: auto !important;
    position: sticky;
    top: 0;
    z-index: 100;
    padding: 10px 14px 6px;
    border-right: 0 !important;
    border-bottom: 1px solid var(--line);
    background: var(--card) !important;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.04);
  }

  .sidebar-top {
    display: flex;
    flex-direction: column;
    gap: 8px;
  }

  .sidebar-top .brand {
    padding: 0 4px 4px;
    font-size: 20px;
  }

  .sidebar .nav {
    display: flex;
    flex-direction: row;
    overflow-x: auto;
    white-space: nowrap;
    gap: 6px;
    padding: 4px 2px 8px;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
  }
  .sidebar .nav::-webkit-scrollbar {
    display: none;
  }

  .sidebar .nav button {
    width: auto !important;
    padding: 8px 14px;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 650;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    flex-shrink: 0;
    background: var(--surface-2, #f1f3f5);
  }
  .sidebar .nav button.active {
    background: var(--accent);
    color: #fff;
  }

  .sidebar-footer {
    display: none !important; /* Managed in topbar or settings */
  }

  /* Main Viewport */
  .main {
    flex: 1 0 auto;
    margin: 0 !important;
    max-width: 100% !important;
    width: 100% !important;
    box-sizing: border-box !important;
    padding: 14px 12px calc(24px + env(safe-area-inset-bottom, 0px)) !important;
  }

  /* Topbars */
  .topbar {
    flex-direction: column !important;
    align-items: stretch !important;
    gap: 12px !important;
    margin-bottom: 18px !important;
  }
  .topbar .title {
    font-size: 24px !important;
  }
  .topbar .subtitle {
    font-size: 13px !important;
  }
  .topbar > div:last-child {
    display: flex !important;
    flex-wrap: wrap !important;
    width: 100% !important;
    gap: 8px !important;
  }
  .topbar .btn {
    flex: 1 1 auto;
    text-align: center;
    justify-content: center;
  }

  body.modal-open {
    overflow: hidden !important;
    position: fixed !important;
    width: 100% !important;
    height: 100% !important;
  }

  /* Modals on Mobile - Sleek Modern Bottom Sheet */
  .modalback {
    position: fixed !important;
    inset: 0 !important;
    padding: 0 !important;
    align-items: flex-end !important;
    background: rgba(15, 23, 42, 0.65) !important;
    backdrop-filter: blur(8px) !important;
    -webkit-backdrop-filter: blur(8px) !important;
    z-index: 999999 !important;
  }
  .modal {
    width: 100% !important;
    max-height: 88vh !important;
    max-height: 88dvh !important;
    border-radius: 20px 20px 0 0 !important;
    padding: 16px 16px calc(16px + env(safe-area-inset-bottom, 0px)) !important;
    box-shadow: 0 -10px 40px rgba(0, 0, 0, 0.25) !important;
    box-sizing: border-box !important;
    overflow-y: auto !important;
    overflow-x: hidden !important;
    -webkit-overflow-scrolling: touch !important;
    overscroll-behavior: contain !important;
    touch-action: pan-y !important;
    animation: modalSlideUp 0.22s cubic-bezier(0.16, 1, 0.3, 1) !important;
    display: flex !important;
    flex-direction: column !important;
  }
  .bottom-sheet-handle-bar {
    width: 100% !important;
    display: flex !important;
    justify-content: center !important;
    padding: 2px 0 10px !important;
    cursor: grab !important;
    touch-action: pan-y !important;
    user-select: none !important;
  }
  .bottom-sheet-handle {
    width: 38px !important;
    height: 4.5px !important;
    border-radius: 999px !important;
    background: rgba(0, 0, 0, 0.16) !important;
    transition: background 0.15s ease !important;
  }
  body.dark-mode .bottom-sheet-handle {
    background: rgba(255, 255, 255, 0.22) !important;
  }
  @keyframes modalSlideUp {
    from { transform: translateY(100%); }
    to { transform: translateY(0); }
  }
  .modalhead {
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    margin-bottom: 12px !important;
    padding-bottom: 10px !important;
    border-bottom: 1px solid var(--line) !important;
  }
  .modalhead .title {
    font-size: 18px !important;
    font-weight: 800 !important;
    letter-spacing: -0.2px !important;
  }
  .modalhead .close {
    width: 30px !important;
    height: 30px !important;
    border-radius: 50% !important;
    background: var(--surface-2, #f1f5f9) !important;
    border: 1px solid var(--line, #e2e8f0) !important;
    display: grid !important;
    place-items: center !important;
    font-size: 18px !important;
    line-height: 1 !important;
    color: var(--muted) !important;
    cursor: pointer !important;
    padding: 0 !important;
  }
  .formgrid {
    grid-template-columns: 1fr 1fr !important;
    gap: 8px 10px !important;
  }
  .formgrid .field.full {
    grid-column: 1 / -1 !important;
  }
  .formgrid .field label {
    font-size: 11.5px !important;
    font-weight: 700 !important;
    color: var(--muted) !important;
    margin-bottom: 3px !important;
  }
  .formgrid .field input,
  .formgrid .field select,
  .formgrid .field textarea {
    height: 38px !important;
    padding: 0 10px !important;
    font-size: 13px !important;
    border-radius: 9px !important;
    border: 1px solid var(--line, #e2e8f0) !important;
    background: var(--surface, #fff) !important;
    color: var(--text) !important;
    box-sizing: border-box !important;
  }
  .modal-actions {
    display: flex !important;
    align-items: center !important;
    gap: 8px !important;
    margin-top: 14px !important;
    padding-top: 10px !important;
    border-top: 1px solid var(--line) !important;
  }
  .modal-actions .btn {
    flex: 1 !important;
    height: 38px !important;
    font-size: 13.5px !important;
    font-weight: 750 !important;
    border-radius: 10px !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    box-sizing: border-box !important;
  }

  /* Ultra-Compact Header & Navigation on Mobile */
  .sidebar {
    padding: 5px 8px 3px !important;
  }
  .brand-bar {
    padding: 0 2px 2px !important;
    margin-bottom: 1px !important;
  }
  .brand-bar .brand {
    font-size: 16px !important;
    gap: 6px !important;
  }
  .brand-badge {
    width: 24px !important;
    height: 24px !important;
    font-size: 13px !important;
    border-radius: 6px !important;
  }
  .top-icon-btn {
    width: 28px !important;
    height: 28px !important;
    border-radius: 7px !important;
  }
  .top-icon-btn svg {
    width: 13px !important;
    height: 13px !important;
  }
  .sidebar .nav {
    padding: 2px 0 3px !important;
    gap: 3px !important;
  }
  .sidebar .nav button {
    padding: 4px 9px !important;
    font-size: 11.5px !important;
    font-weight: 600 !important;
    border-radius: 12px !important;
    gap: 4px !important;
  }
  .sidebar .nav button svg {
    width: 13px !important;
    height: 13px !important;
  }
  .main {
    flex: 1 0 auto;
    margin: 0 !important;
    max-width: 100% !important;
    width: 100% !important;
    box-sizing: border-box !important;
    padding: 6px 8px calc(16px + env(safe-area-inset-bottom, 0px)) !important;
  }
  .compact-dash-header {
    margin-bottom: 6px !important;
  }
  .compact-dash-header .dash-title h1 {
    font-size: 17px !important;
  }
  .compact-dash-header .dash-title p {
    font-size: 11px !important;
  }
  .compact-dash-header .dash-actions .premium-btn {
    padding: 4px 8px !important;
    font-size: 11.5px !important;
  }

  /* Today's Lessons Ultra-Compact High-Density List on Mobile */
  .dash-today-card.compact-today-card {
    padding: 8px 8px !important;
    border-radius: 12px !important;
    margin-bottom: 8px !important;
  }
  .compact-card-head {
    margin-bottom: 4px !important;
  }
  .dash-today-head-text h2 {
    font-size: 14px !important;
  }
  .dash-today-head-text .premium-sub {
    font-size: 10px !important;
  }
  .compact-today-list {
    gap: 3px !important;
  }
  .dash-today-row.compact-row {
    display: flex !important;
    flex-direction: row !important;
    align-items: center !important;
    justify-content: space-between !important;
    padding: 5px 7px !important;
    gap: 5px !important;
    min-height: 40px !important;
    border-radius: 9px !important;
  }
  .dash-today-time {
    min-width: 38px !important;
    display: flex !important;
    align-items: center !important;
  }
  .dash-today-time strong {
    font-size: 13px !important;
  }
  .dash-today-title strong {
    font-size: 12.5px !important;
  }
  .dash-today-actions {
    display: flex !important;
    width: auto !important;
    gap: 3px !important;
    padding: 0 !important;
    border: 0 !important;
  }
  .btn-compact-action {
    padding: 3px 6px !important;
    font-size: 10.5px !important;
    border-radius: 6px !important;
  }
  .btn-icon-only {
    width: 24px !important;
    height: 24px !important;
    font-size: 11px !important;
    border-radius: 6px !important;
  }

  /* Format & Status Badges Compact */
  .format-badge {
    font-size: 9.5px !important;
    padding: 1px 5px !important;
    border-radius: 4px !important;
  }
  .format-badge:before {
    width: 4px !important;
    height: 4px !important;
  }
  .badge {
    font-size: 10px !important;
    padding: 1.5px 5px !important;
    border-radius: 4px !important;
  }
  .stt-week-nav {
    height: 28px !important;
    padding: 0 6px !important;
    display: inline-flex !important;
    align-items: center !important;
  }
  .stt-week-label {
    font-size: 11.5px !important;
    font-weight: 750 !important;
  }
  .stt-actions {
    display: flex !important;
    align-items: center !important;
    gap: 6px !important;
  }
  .stt-actions .btn {
    height: 28px !important;
    min-height: 28px !important;
    padding: 0 10px !important;
    font-size: 11.5px !important;
    font-weight: 700 !important;
    border-radius: 8px !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    box-sizing: border-box !important;
    line-height: 1 !important;
    white-space: nowrap !important;
  }
  .stt-view-switch {
    padding: 2px !important;
  }
  .stt-view-btn {
    height: 24px !important;
    padding: 2px 8px !important;
    font-size: 11px !important;
  }
  .stt-format-pills {
    gap: 3px !important;
  }
  .stt-pill {
    height: 24px !important;
    padding: 0 7px !important;
    font-size: 10.5px !important;
  }

  /* Mobile Dashboard Equalized Card Weight */
  .premium-dashboard .premium-card,
  .premium-dashboard .dash-today-card,
  .premium-dashboard .dash-metrics-card,
  .premium-dashboard .dash-birthday-card,
  .premium-dashboard .premium-attention-card {
    background: var(--card, #ffffff) !important;
    border: 1px solid var(--line, #e2e8f0) !important;
    border-radius: 14px !important;
    padding: 11px 13px !important;
    margin-bottom: 10px !important;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.02) !important;
  }
  body.dark-mode .premium-dashboard .premium-card,
  body.dark-mode .premium-dashboard .dash-today-card,
  body.dark-mode .premium-dashboard .dash-metrics-card,
  body.dark-mode .premium-dashboard .dash-birthday-card,
  body.dark-mode .premium-dashboard .premium-attention-card {
    background: #141721 !important;
    border-color: rgba(255, 255, 255, 0.08) !important;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.3) !important;
  }

  /* Fade out completed lessons on mobile */
  .apple-sch-row-mob.is-completed,
  .dash-today-row.is-completed {
    opacity: 0.48 !important;
    filter: grayscale(20%) !important;
    transition: opacity 0.15s ease, filter 0.15s ease !important;
  }
  .apple-sch-row-mob.is-completed:hover,
  .apple-sch-row-mob.is-completed:active,
  .dash-today-row.is-completed:hover,
  .dash-today-row.is-completed:active {
    opacity: 0.88 !important;
    filter: grayscale(0%) !important;
  }

  /* Mobile 7-Day View Overhaul (Full-Width Rich Horizontal Lesson Rows) */
  .seven-col-schedule-grid {
    display: flex !important;
    flex-direction: column !important;
    gap: 10px !important;
  }
  .col-day-box {
    min-height: auto !important;
    background: var(--card, #ffffff) !important;
    border: 1px solid var(--line, #e2e8f0) !important;
    border-radius: 14px !important;
    padding: 0 !important;
    overflow: hidden !important;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.02) !important;
  }
  body.dark-mode .col-day-box {
    background: #141721 !important;
    border-color: rgba(255, 255, 255, 0.08) !important;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.3) !important;
  }
  .col-day-head {
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    padding: 8px 12px !important;
    background: var(--surface, #f8fafc) !important;
    border-bottom: 1px solid var(--line, #e2e8f0) !important;
  }
  body.dark-mode .col-day-head {
    background: #181c27 !important;
    border-bottom-color: rgba(255, 255, 255, 0.06) !important;
  }
  .cd-day-name {
    font-size: 13.5px !important;
    font-weight: 800 !important;
    color: var(--text) !important;
  }
  .cd-date-num {
    font-size: 11.5px !important;
    font-weight: 600 !important;
    color: var(--muted) !important;
    margin-left: 4px !important;
  }
  .col-day-lessons {
    padding: 6px !important;
    display: flex !important;
    flex-direction: column !important;
    gap: 3px !important;
  }

  .col-day-empty {
    padding: 8px 10px !important;
    min-height: 32px !important;
    font-size: 11.5px !important;
  }

  /* Schedule Mobile Day Wrapper & Day Navigation Bar */
  .schedule-mobile-day-wrapper {
    display: flex !important;
    flex-direction: column !important;
    gap: 4px !important;
    margin-bottom: 6px !important;
  }
  /* Mobile Schedule Day Tabs (Grid View) */
  .schedule-mobile-day-tabs {
    display: flex !important;
    align-items: center !important;
    gap: 4px !important;
    background: var(--card, #ffffff) !important;
    border: 1px solid var(--line, #e2e8f0) !important;
    border-radius: 14px !important;
    padding: 5px !important;
    margin-bottom: 10px !important;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.02) !important;
  }
  body.dark-mode .schedule-mobile-day-tabs {
    background: #141721 !important;
    border-color: rgba(255, 255, 255, 0.08) !important;
  }
  .mobile-day-tab {
    flex: 1 !important;
    min-width: 0 !important;
    padding: 6px 2px !important;
    border-radius: 10px !important;
    border: 1px solid transparent !important;
    background: transparent !important;
    color: var(--text) !important;
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    gap: 1px !important;
    cursor: pointer !important;
    transition: all 0.15s ease !important;
  }
  .mobile-day-tab:hover {
    background: var(--surface, #f8fafc) !important;
  }
  body.dark-mode .mobile-day-tab:hover {
    background: #1e2433 !important;
  }
  .mobile-day-tab .mdt-name {
    font-size: 10px !important;
    font-weight: 750 !important;
    color: var(--muted) !important;
    text-transform: uppercase !important;
    line-height: 1 !important;
  }
  .mobile-day-tab .mdt-date {
    font-size: 13.5px !important;
    font-weight: 850 !important;
    color: var(--text) !important;
    line-height: 1.15 !important;
  }
  body.dark-mode .mobile-day-tab .mdt-date {
    color: #f8fafc !important;
  }
  .mobile-day-tab .mdt-dot {
    width: 4px !important;
    height: 4px !important;
    border-radius: 50% !important;
    background: var(--accent, #a45b46) !important;
    margin-top: 2px !important;
  }
  .mobile-day-tab.active {
    background: var(--accent, #a45b46) !important;
    color: #ffffff !important;
    border-color: var(--accent, #a45b46) !important;
    box-shadow: 0 3px 10px rgba(164, 91, 70, 0.3) !important;
  }
  .mobile-day-tab.active .mdt-name,
  .mobile-day-tab.active .mdt-date {
    color: #ffffff !important;
  }
  .mobile-day-tab.active .mdt-dot {
    background: #ffffff !important;
  }
  .mobile-day-tab.is-today:not(.active) {
    background: var(--accent-soft, #f3e7e2) !important;
    border-color: rgba(164, 91, 70, 0.25) !important;
  }
  .mobile-day-tab.is-today:not(.active) .mdt-name,
  .mobile-day-tab.is-today:not(.active) .mdt-date {
    color: var(--accent, #a45b46) !important;
  }

  /* Mobile Hourly Timeline (Grid View with Slots & Lessons) */
  .mobile-grid-timeline {
    display: flex !important;
    flex-direction: column !important;
    gap: 7px !important;
    padding: 10px 10px !important;
  }

  .mgs-row {
    display: flex !important;
    align-items: center !important;
    gap: 10px !important;
    min-height: 38px !important;
  }

  .mgs-time-col {
    width: 40px !important;
    flex-shrink: 0 !important;
    text-align: right !important;
  }

  .mgs-hour-label {
    font-size: 12px !important;
    font-weight: 800 !important;
    color: var(--text, #1e293b) !important;
    letter-spacing: -0.2px !important;
    line-height: 1 !important;
  }

  body.dark-mode .mgs-hour-label {
    color: #f8fafc !important;
  }

  .mgs-empty .mgs-hour-label {
    font-size: 11px !important;
    font-weight: 650 !important;
    color: var(--muted, #94a3b8) !important;
    opacity: 0.8 !important;
  }

  .mgs-body-col {
    flex: 1 1 auto !important;
    min-width: 0 !important;
    display: flex !important;
    flex-direction: column !important;
    gap: 4px !important;
  }

  .mgs-empty-slot {
    height: 32px !important;
    border: 1px dashed rgba(0, 0, 0, 0.12) !important;
    border-radius: 8px !important;
    background: transparent !important;
    display: flex !important;
    align-items: center !important;
    justify-content: flex-end !important;
    padding: 0 10px !important;
    cursor: pointer !important;
    transition: all 0.14s ease !important;
    user-select: none !important;
  }

  .mgs-empty-slot:hover,
  .mgs-empty-slot:active {
    border-color: var(--accent, #a45b46) !important;
    background: var(--accent-soft, #f3e7e2) !important;
  }

  body.dark-mode .mgs-empty-slot {
    border-color: rgba(255, 255, 255, 0.08) !important;
  }

  body.dark-mode .mgs-empty-slot:hover,
  body.dark-mode .mgs-empty-slot:active {
    border-color: var(--accent, #a45b46) !important;
    background: rgba(164, 91, 70, 0.14) !important;
  }

  .mgs-plus-badge {
    font-size: 13px !important;
    font-weight: 700 !important;
    color: var(--muted, #94a3b8) !important;
    opacity: 0.45 !important;
    transition: all 0.14s ease !important;
  }

  .mgs-empty-slot:hover .mgs-plus-badge,
  .mgs-empty-slot:active .mgs-plus-badge {
    color: var(--accent, #a45b46) !important;
    opacity: 1 !important;
    transform: scale(1.15) !important;
  }

  /* Apple Unified Top Toolbar on Mobile */
  .apple-sch-toolbar {
    flex-direction: column !important;
    align-items: stretch !important;
    padding: 8px 10px !important;
    gap: 8px !important;
    border-radius: 14px !important;
    margin-bottom: 10px !important;
  }
  .ast-left {
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    width: 100% !important;
    flex-wrap: wrap !important;
    gap: 6px !important;
  }
  .ast-title {
    font-size: 18px !important;
    margin-right: 0 !important;
  }
  .ast-nav-group {
    display: inline-flex !important;
    align-items: center !important;
    gap: 4px !important;
  }
  .ast-nav-btn {
    width: 28px !important;
    height: 28px !important;
    min-width: 28px !important;
    min-height: 28px !important;
    border-radius: 50% !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    background: var(--surface-2, #f1f3f5) !important;
    border: 1px solid var(--line, #e2e8f0) !important;
    color: var(--text) !important;
    font-size: 15px !important;
    font-weight: 700 !important;
    cursor: pointer !important;
    padding: 0 !important;
    line-height: 1 !important;
    transition: all 0.12s ease !important;
  }
  .ast-nav-btn:active {
    transform: scale(0.92) !important;
    background: var(--line, #e2e8f0) !important;
  }
  body.dark-mode .ast-nav-btn {
    background: #1e2433 !important;
    border-color: rgba(255, 255, 255, 0.08) !important;
    color: #f8fafc !important;
  }
  body.dark-mode .ast-nav-btn:active {
    background: #283144 !important;
  }
  .ast-date-label {
    font-size: 12px !important;
    font-weight: 750 !important;
    padding: 4px 8px !important;
    border-radius: 8px !important;
    display: inline-flex !important;
    align-items: center !important;
    gap: 4px !important;
    background: transparent !important;
    cursor: pointer !important;
    color: var(--text) !important;
  }
  .ast-right {
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    width: 100% !important;
    flex-wrap: wrap !important;
    gap: 6px !important;
  }
  .ast-right > .apple-btn,
  .ast-right > .apple-btn-primary,
  .ast-right > .btn.primary {
    flex: 1 1 auto !important;
    justify-content: center !important;
    text-align: center !important;
    height: 36px !important;
    font-size: 13px !important;
  }
  .apple-segmented-control {
    width: 100% !important;
    display: flex !important;
  }
  .asc-item {
    flex: 1 !important;
    text-align: center !important;
    padding: 5px 8px !important;
    font-size: 11.5px !important;
  }

  /* Apple KPI Bento Grid on Mobile (2x2 Grid) */
  .apple-kpi-grid {
    display: grid !important;
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 8px !important;
    margin-bottom: 12px !important;
    width: 100% !important;
    box-sizing: border-box !important;
  }
  .apple-kpi-card {
    display: flex !important;
    flex-direction: column !important;
    justify-content: space-between !important;
    background: #ffffff !important;
    border: 1px solid rgba(0, 0, 0, 0.06) !important;
    padding: 8px 10px !important;
    min-height: 68px !important;
    border-radius: 12px !important;
    box-sizing: border-box !important;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.02) !important;
    cursor: pointer !important;
    transition: transform 0.12s ease, border-color 0.12s ease !important;
  }
  body.dark-mode .apple-kpi-card {
    background: #141720 !important;
    border-color: var(--line) !important;
  }
  .apple-kpi-card.active-kpi-tab {
    border-color: var(--accent, #a45b46) !important;
    background: var(--card, #ffffff) !important;
    box-shadow: 0 0 0 1.5px var(--accent, #a45b46) !important;
  }
  body.dark-mode .apple-kpi-card.active-kpi-tab {
    background: #1c2230 !important;
    border-color: var(--accent, #a45b46) !important;
    box-shadow: 0 0 0 1.5px var(--accent, #a45b46) !important;
  }
  .akc-top {
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    width: 100% !important;
  }
  .akc-icon-badge {
    width: 22px !important;
    height: 22px !important;
    font-size: 11px !important;
    border-radius: 6px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
  }
  .akc-icon-badge.green { background: rgba(34, 197, 94, 0.1) !important; color: #16a34a !important; }
  .akc-icon-badge.blue { background: rgba(59, 130, 246, 0.1) !important; color: #2563eb !important; }
  .akc-icon-badge.red { background: rgba(239, 68, 68, 0.1) !important; color: #dc2626 !important; }
  .akc-icon-badge.purple { background: rgba(139, 92, 246, 0.1) !important; color: #7c3aed !important; }
  .akc-label {
    font-size: 11px !important;
    font-weight: 750 !important;
    color: var(--text) !important;
    margin-left: 5px !important;
    margin-right: auto !important;
  }
  .akc-pill {
    font-size: 9px !important;
    font-weight: 700 !important;
    padding: 1px 4px !important;
    border-radius: 4px !important;
  }
  .akc-pill.green { background: rgba(34, 197, 94, 0.1) !important; color: #16a34a !important; }
  .akc-pill.blue { background: rgba(59, 130, 246, 0.1) !important; color: #2563eb !important; }
  .akc-pill.red { background: rgba(239, 68, 68, 0.1) !important; color: #dc2626 !important; }
  .akc-pill.purple { background: rgba(139, 92, 246, 0.1) !important; color: #7c3aed !important; }
  .akc-number {
    font-size: 15.5px !important;
    font-weight: 850 !important;
    color: var(--text) !important;
    margin: 3px 0 1px !important;
    line-height: 1.15 !important;
  }
  .akc-number.negative {
    color: #ef4444 !important;
  }
  .akc-desc {
    font-size: 9.5px !important;
    color: var(--muted) !important;
    font-weight: 550 !important;
    white-space: nowrap !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
  }

  /* Apple Card and Dashboard Today List on Mobile */
  .apple-main-grid {
    grid-template-columns: 1fr !important;
    gap: 10px !important;
  }
  .apple-grid-col {
    gap: 10px !important;
  }
  .apple-card {
    padding: 10px 12px !important;
    border-radius: 14px !important;
    margin-bottom: 10px !important;
  }
  .apple-card-header {
    margin-bottom: 8px !important;
  }
  .ach-left h2 {
    font-size: 14.5px !important;
    font-weight: 800 !important;
  }
  .ach-left p {
    font-size: 10.5px !important;
  }
  .apple-sch-row {
    padding: 6px 7px !important;
    gap: 7px !important;
    border-radius: 8px !important;
  }
  .asr-time {
    font-size: 13px !important;
  }
  .asr-name {
    font-size: 13px !important;
    font-weight: 750 !important;
  }
  .asr-meta {
    font-size: 10.5px !important;
  }
  .asr-status-pill {
    font-size: 10px !important;
    padding: 2px 6px !important;
  }
  .asr-quick-done-btn {
    font-size: 10.5px !important;
    padding: 2.5px 7px !important;
  }

  /* Students Page Mobile Cards & Clean Toolbar */
  .students-topbar {
    margin-bottom: 8px !important;
  }
  .std-clean-toolbar {
    margin-bottom: 8px !important;
    display: flex !important;
    flex-direction: column !important;
    gap: 6px !important;
  }
  .std-clean-search {
    width: 100% !important;
  }
  .std-clean-filters {
    display: flex !important;
    align-items: center !important;
    gap: 4px !important;
    overflow-x: auto !important;
    -webkit-overflow-scrolling: touch !important;
    scrollbar-width: none !important;
  }
  .std-clean-filters::-webkit-scrollbar {
    display: none !important;
  }
  .std-popovers-row {
    display: flex !important;
    align-items: center !important;
    gap: 6px !important;
    margin-top: 5px !important;
    overflow: visible !important;
    position: relative !important;
    z-index: 50 !important;
    width: 100% !important;
  }
  .std-add-student-btn {
    margin-right: auto !important;
    margin-left: 0 !important;
    height: 28px !important;
    min-height: 28px !important;
    padding: 0 10px !important;
    font-size: 11.5px !important;
    font-weight: 700 !important;
    border-radius: 8px !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    box-sizing: border-box !important;
    white-space: nowrap !important;
  }

  /* Ultra-Compact Student Cards Layout on Mobile */
  .students-compact-list {
    display: flex !important;
    flex-direction: column !important;
    gap: 6px !important;
    width: 100% !important;
    margin-top: 4px !important;
  }
  /* Mobile Students Modern Apple View */
  .std-mob-controls-card {
    background: #ffffff !important;
    border: 1px solid rgba(0, 0, 0, 0.06) !important;
    border-radius: 13px !important;
    padding: 8px !important;
    display: flex !important;
    flex-direction: column !important;
    gap: 6px !important;
    margin-bottom: 8px !important;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.02) !important;
  }
  body.dark-mode .std-mob-controls-card {
    background: #141720 !important;
    border-color: var(--line) !important;
  }

  .std-mob-search-row {
    display: flex !important;
    align-items: center !important;
    gap: 6px !important;
    width: 100% !important;
  }
  .std-mob-search-row .gpt-search-wrap {
    flex: 1 1 auto !important;
    min-width: 0 !important;
    max-width: 100% !important;
    height: 34px !important;
  }
  .std-mob-search-row .gpt-search-input {
    height: 34px !important;
    font-size: 12px !important;
  }
  .std-mob-add-student-btn {
    height: 34px !important;
    padding: 0 13px !important;
    font-size: 11.5px !important;
    font-weight: 750 !important;
    border-radius: 9px !important;
    background: var(--accent, #a45b46) !important;
    color: #ffffff !important;
    border: 1px solid var(--accent, #a45b46) !important;
    cursor: pointer !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 3px !important;
    white-space: nowrap !important;
    flex-shrink: 0 !important;
    box-shadow: 0 1.5px 4px rgba(164, 91, 70, 0.25) !important;
    transition: all 0.12s ease !important;
  }
  .std-mob-add-student-btn:active {
    opacity: 0.9 !important;
    transform: scale(0.98) !important;
  }
  body.dark-mode .std-mob-add-student-btn {
    background: #b56752 !important;
    border-color: #b56752 !important;
    color: #ffffff !important;
  }

  .std-mob-filters-grid {
    display: flex !important;
    gap: 5px !important;
    align-items: center !important;
    width: 100% !important;
  }
  .std-mob-filters-grid .schedule-popover-container {
    flex: 1 1 0 !important;
    min-width: 0 !important;
  }
  .std-mob-filters-grid .sch-filter-pop-btn {
    width: 100% !important;
    justify-content: center !important;
    padding: 0 4px !important;
    height: 29px !important;
    font-size: 11px !important;
    font-weight: 700 !important;
    border-radius: 8px !important;
    box-sizing: border-box !important;
    overflow: hidden !important;
  }
  .std-mob-filters-grid .sfp-label {
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    white-space: nowrap !important;
    font-size: 11px !important;
  }
  .std-mob-filters-grid .sch-filter-menu.align-left {
    left: 0 !important;
    right: auto !important;
  }
  .std-mob-filters-grid .sch-filter-menu.align-right {
    right: 0 !important;
    left: auto !important;
  }
  .std-mob-filters-grid .sch-filter-menu {
    min-width: 170px !important;
    max-width: calc(100vw - 28px) !important;
  }

  .std-mob-count-header {
    font-size: 11.5px !important;
    font-weight: 650 !important;
    color: var(--muted) !important;
    padding: 2px 4px 8px !important;
  }

  /* Mobile Student Card Rows */
  .std-mob-cards-list {
    display: flex !important;
    flex-direction: column !important;
    gap: 7px !important;
  }
  .std-mob-card {
    display: flex !important;
    align-items: center !important;
    background: #ffffff !important;
    border: 1px solid rgba(0, 0, 0, 0.06) !important;
    border-radius: 13px !important;
    padding: 9px 12px 9px 0 !important;
    position: relative !important;
    overflow: hidden !important;
    cursor: pointer !important;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.02) !important;
    gap: 10px !important;
    transition: transform 0.12s, box-shadow 0.12s !important;
  }
  body.dark-mode .std-mob-card {
    background: #141720 !important;
    border-color: var(--line) !important;
  }
  .std-mob-card:active {
    transform: scale(0.99) !important;
  }
  .std-mob-card.is-archived {
    opacity: 0.55 !important;
  }

  .smc-stripe {
    width: 4px !important;
    height: 100% !important;
    position: absolute !important;
    left: 0 !important;
    top: 0 !important;
    bottom: 0 !important;
    border-radius: 4px 0 0 4px !important;
  }
  .smc-stripe.individual { background: #3b82f6 !important; }
  .smc-stripe.pair { background: #10b981 !important; }
  .smc-stripe.group { background: #a45b46 !important; }

  .smc-avatar {
    margin-left: 10px !important;
    flex-shrink: 0 !important;
  }

  .smc-info {
    display: flex !important;
    flex-direction: column !important;
    gap: 3px !important;
    min-width: 0 !important;
    flex: 1 1 auto !important;
  }
  .smc-name-row {
    display: flex !important;
    align-items: center !important;
    gap: 6px !important;
  }
  .smc-name {
    font-size: 13.5px !important;
    font-weight: 750 !important;
    color: var(--text) !important;
    line-height: 1.2 !important;
    white-space: nowrap !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
  }
  .smc-archive-badge {
    font-size: 9.5px !important;
    font-weight: 750 !important;
    color: #64748b !important;
    background: rgba(100, 116, 139, 0.12) !important;
    padding: 1px 5px !important;
    border-radius: 4px !important;
  }

  .smc-meta-row {
    display: flex !important;
    align-items: center !important;
    gap: 5px !important;
    flex-wrap: nowrap !important;
    overflow: hidden !important;
  }
  .smc-schedule-text {
    font-size: 11px !important;
    font-weight: 600 !important;
    color: var(--muted) !important;
    white-space: nowrap !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
  }

  .smc-right {
    display: flex !important;
    align-items: center !important;
    gap: 6px !important;
    flex-shrink: 0 !important;
    margin-left: auto !important;
  }
  .std-mob-bal {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    padding: 3px 8px !important;
    border-radius: 7px !important;
    font-size: 11px !important;
    font-weight: 800 !important;
    white-space: nowrap !important;
  }
  .std-mob-bal.ok {
    background: rgba(34, 197, 94, 0.08) !important;
    color: #16a34a !important;
    border: 1px solid rgba(34, 197, 94, 0.2) !important;
  }
  .std-mob-bal.warn {
    background: rgba(245, 158, 11, 0.08) !important;
    color: #d97706 !important;
    border: 1px solid rgba(245, 158, 11, 0.2) !important;
  }
  .std-mob-bal.debt {
    background: rgba(220, 38, 38, 0.08) !important;
    color: #dc2626 !important;
    border: 1px solid rgba(220, 38, 38, 0.2) !important;
  }

  .std-mob-tg-btn {
    width: 28px !important;
    height: 28px !important;
    border-radius: 50% !important;
    border: 1px solid rgba(0, 136, 204, 0.2) !important;
    background: rgba(0, 136, 204, 0.08) !important;
    color: #0088cc !important;
    display: grid !important;
    place-items: center !important;
    font-size: 12px !important;
    cursor: pointer !important;
    padding: 0 !important;
    transition: all 0.15s ease !important;
  }
  .std-mob-tg-btn:active {
    background: #0088cc !important;
    color: #ffffff !important;
    transform: scale(0.92) !important;
  }
  .std-mob-chevron {
    font-size: 16px !important;
    font-weight: 600 !important;
    color: var(--muted) !important;
    opacity: 0.5 !important;
    margin-left: 2px !important;
  }

  /* Apple Student Profile Modal (Mobile Unified Web Style) */
  .apple-student-modal-head {
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    gap: 8px !important;
    margin-bottom: 8px !important;
  }
  .asmh-user {
    display: flex !important;
    align-items: center !important;
    gap: 8px !important;
    min-width: 0 !important;
    flex: 1 1 auto !important;
  }
  .asmh-avatar-wrap {
    position: relative !important;
    cursor: pointer !important;
    flex-shrink: 0 !important;
  }
  .asmh-avatar-edit {
    position: absolute !important;
    bottom: -2px !important;
    right: -2px !important;
    width: 14px !important;
    height: 14px !important;
    border-radius: 50% !important;
    background: #ffffff !important;
    box-shadow: 0 1px 3px rgba(0,0,0,0.15) !important;
    font-size: 8px !important;
    display: grid !important;
    place-items: center !important;
    border: 1px solid rgba(0,0,0,0.06) !important;
  }
  .asmh-titles {
    display: flex !important;
    flex-direction: column !important;
    gap: 1px !important;
    min-width: 0 !important;
  }
  .asmh-name-row {
    display: flex !important;
    align-items: center !important;
    gap: 5px !important;
  }
  .asmh-name {
    font-size: 15.5px !important;
    font-weight: 850 !important;
    letter-spacing: -0.3px !important;
    color: var(--text) !important;
    white-space: nowrap !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
  }
  .asmh-tags-row {
    display: flex !important;
    align-items: center !important;
    gap: 4px !important;
    flex-wrap: nowrap !important;
    overflow: hidden !important;
  }
  .asmh-tags-row .location-badge-pill {
    padding: 1px 5px !important;
    font-size: 10px !important;
    line-height: 1.2 !important;
    border-radius: 4px !important;
  }

  .asmh-actions-group {
    display: flex !important;
    align-items: center !important;
    gap: 5px !important;
    flex-shrink: 0 !important;
  }
  .apple-icon-btn {
    width: 30px !important;
    height: 30px !important;
    min-width: 30px !important;
    border-radius: 50% !important;
    background: var(--surface, #f8fafc) !important;
    border: 1px solid var(--line, #e2e8f0) !important;
    color: var(--text) !important;
    font-size: 12px !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    cursor: pointer !important;
    transition: all 0.12s ease !important;
    padding: 0 !important;
  }
  .apple-icon-btn:active {
    transform: scale(0.92) !important;
  }
  .apple-icon-btn.tg {
    background: rgba(0, 136, 204, 0.09) !important;
    color: #0088cc !important;
    border-color: rgba(0, 136, 204, 0.25) !important;
  }
  .apple-icon-btn.close {
    color: var(--muted) !important;
  }

  .apple-card-action-bar-btn {
    width: 100% !important;
    height: 30px !important;
    margin-top: 7px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 4px !important;
    font-size: 11.5px !important;
    font-weight: 750 !important;
    border-radius: 8px !important;
    background: var(--accent-soft, #f3e7e2) !important;
    color: var(--accent, #a45b46) !important;
    border: 1px solid rgba(164, 91, 70, 0.25) !important;
    cursor: pointer !important;
    transition: all 0.12s ease !important;
  }
  .apple-card-action-bar-btn:active {
    background: rgba(164, 91, 70, 0.18) !important;
  }

  /* Segmented tabs on mobile */
  .apple-modal-segmented-tabs {
    display: flex !important;
    background: #f1f5f9 !important;
    border-radius: 9px !important;
    padding: 2.5px !important;
    gap: 2px !important;
    margin-bottom: 8px !important;
    width: 100% !important;
  }
  body.dark-mode .apple-modal-segmented-tabs {
    background: #141720 !important;
  }
  .apple-modal-segmented-tabs .amst-tab {
    flex: 1 1 0 !important;
    text-align: center !important;
    padding: 5px 2px !important;
    font-size: 11.5px !important;
    font-weight: 700 !important;
    border-radius: 7px !important;
    border: none !important;
    background: transparent !important;
    color: var(--muted) !important;
    cursor: pointer !important;
    transition: all 0.12s ease !important;
  }
  .apple-modal-segmented-tabs .amst-tab.active {
    background: #ffffff !important;
    color: var(--text) !important;
    font-weight: 850 !important;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08) !important;
  }
  body.dark-mode .apple-modal-segmented-tabs .amst-tab.active {
    background: #222836 !important;
    color: #f3f6fb !important;
  }

  /* Overview Stack & Cards on Mobile */
  .apple-student-overview-stack {
    display: flex !important;
    flex-direction: column !important;
    gap: 7px !important;
  }
  .apple-card-widget {
    padding: 9px 10px !important;
    border-radius: 12px !important;
  }
  .acw-header {
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    gap: 6px !important;
    margin-bottom: 8px !important;
  }
  .acw-titles {
    display: flex !important;
    flex-direction: column !important;
    gap: 1px !important;
    min-width: 0 !important;
  }
  .acw-title {
    font-size: 13px !important;
    font-weight: 800 !important;
  }
  .acw-sub {
    font-size: 11px !important;
    color: var(--muted) !important;
  }
  .apple-progress-track {
    height: 4.5px !important;
    margin-bottom: 7px !important;
  }
  .apple-metrics-row-4 {
    padding: 5px 6px !important;
  }
  .amr-label {
    font-size: 8.5px !important;
  }
  .amr-value {
    font-size: 14px !important;
  }
  .amr-divider {
    height: 16px !important;
  }

  .apple-overview-split-grid {
    grid-template-columns: 1fr !important;
    gap: 7px !important;
  }
  .apple-symmetric-list {
    padding: 1px 8px !important;
  }
  .asl-row {
    height: 28px !important;
    font-size: 11px !important;
  }

  /* Group Members List on Mobile */
  .apple-group-members-list {
    display: flex !important;
    flex-direction: column !important;
    gap: 4px !important;
  }
  .apple-member-card-row {
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    padding: 6px 8px !important;
    border-radius: 9px !important;
    background: var(--surface, #f8fafc) !important;
    border: 1px solid var(--line, #e2e8f0) !important;
    gap: 8px !important;
  }
  .amcr-left {
    display: flex !important;
    align-items: center !important;
    gap: 7px !important;
    min-width: 0 !important;
    flex: 1 1 auto !important;
    cursor: pointer !important;
  }
  .amcr-info {
    display: flex !important;
    flex-direction: column !important;
    gap: 1px !important;
    min-width: 0 !important;
    flex: 1 1 auto !important;
  }
  .amcr-name-row {
    display: flex !important;
    align-items: center !important;
    gap: 5px !important;
    flex-wrap: nowrap !important;
  }
  .amcr-name {
    font-size: 12.5px !important;
    font-weight: 750 !important;
    color: var(--text) !important;
    white-space: nowrap !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    line-height: 1.2 !important;
  }
  .amcr-sub {
    font-size: 10.5px !important;
    color: var(--muted) !important;
    font-weight: 550 !important;
    white-space: nowrap !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
  }
  .amcr-actions {
    display: flex !important;
    align-items: center !important;
    gap: 3px !important;
    flex-shrink: 0 !important;
  }
  .amcr-actions .apple-icon-btn {
    width: 26px !important;
    height: 26px !important;
    min-width: 26px !important;
    min-height: 26px !important;
    font-size: 11.5px !important;
    border-radius: 50% !important;
  }

  /* Timeline Rows (Lessons Tab) on Mobile */
  .apple-lessons-kpi-row {
    display: flex !important;
    align-items: center !important;
    gap: 4px !important;
    flex-shrink: 0 !important;
  }
  .alk-pill {
    font-size: 10px !important;
    font-weight: 800 !important;
    padding: 2px 6px !important;
    border-radius: 999px !important;
    white-space: nowrap !important;
  }
  .alk-pill.done { background: rgba(34, 197, 94, 0.1) !important; color: #16a34a !important; }
  .alk-pill.cancelled { background: rgba(148, 163, 184, 0.12) !important; color: #64748b !important; }
  .alk-pill.debt { background: rgba(239, 68, 68, 0.1) !important; color: #dc2626 !important; }

  .apple-timeline-list {
    display: flex !important;
    flex-direction: column !important;
    gap: 5px !important;
    max-height: 480px !important;
    overflow-y: auto !important;
  }
  .apple-timeline-row {
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    padding: 7px 9px !important;
    border-radius: 9px !important;
    background: var(--surface, #f8fafc) !important;
    border: 1px solid var(--line, #e2e8f0) !important;
    gap: 8px !important;
    cursor: pointer !important;
    transition: transform 0.12s ease !important;
  }
  body.dark-mode .apple-timeline-row {
    background: #181d28 !important;
    border-color: rgba(255, 255, 255, 0.08) !important;
  }
  .apple-timeline-row:active {
    transform: scale(0.98) !important;
  }
  .atr-left {
    display: flex !important;
    align-items: center !important;
    gap: 7px !important;
    min-width: 0 !important;
    flex: 1 1 auto !important;
  }
  .atr-date-badge {
    display: flex !important;
    flex-direction: column !important;
    align-items: flex-start !important;
    min-width: 66px !important;
    flex-shrink: 0 !important;
  }
  .atr-day {
    font-size: 11.5px !important;
    font-weight: 750 !important;
    color: var(--text) !important;
    line-height: 1.2 !important;
  }
  .atr-time {
    font-size: 9.5px !important;
    font-weight: 600 !important;
    color: var(--muted) !important;
  }
  .atr-info {
    display: flex !important;
    flex-direction: column !important;
    gap: 1px !important;
    min-width: 0 !important;
    flex: 1 1 auto !important;
  }
  .atr-main-line {
    display: flex !important;
    align-items: center !important;
    gap: 4px !important;
    flex-wrap: nowrap !important;
    min-width: 0 !important;
  }
  .atr-loc-icon {
    font-size: 11px !important;
    flex-shrink: 0 !important;
  }
  .atr-topic {
    font-size: 11.5px !important;
    font-weight: 650 !important;
    color: var(--text) !important;
    white-space: nowrap !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    min-width: 0 !important;
  }
  .atr-topic-empty {
    font-size: 11.5px !important;
    color: var(--muted) !important;
    white-space: nowrap !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
  }
  .atr-reason {
    font-size: 9.5px !important;
    color: #d97706 !important;
    font-weight: 600 !important;
    white-space: nowrap !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
  }
  .atr-right {
    display: flex !important;
    align-items: center !important;
    gap: 4px !important;
    flex-shrink: 0 !important;
  }
  .apple-status-chip {
    display: inline-flex !important;
    align-items: center !important;
    gap: 3px !important;
    padding: 2.5px 6px !important;
    border-radius: 6px !important;
    font-size: 9.5px !important;
    font-weight: 750 !important;
    white-space: nowrap !important;
  }
  .apple-status-chip.chip-done {
    background: rgba(34, 197, 94, 0.1) !important;
    color: #16a34a !important;
    border: 1px solid rgba(34, 197, 94, 0.25) !important;
  }
  .apple-status-chip.chip-debt {
    background: rgba(239, 68, 68, 0.1) !important;
    color: #dc2626 !important;
    border: 1px solid rgba(239, 68, 68, 0.25) !important;
  }
  .apple-status-chip.chip-cancelled {
    background: rgba(148, 163, 184, 0.12) !important;
    color: #64748b !important;
    border: 1px solid rgba(148, 163, 184, 0.25) !important;
  }
  .apple-status-chip.chip-charged {
    background: rgba(239, 68, 68, 0.1) !important;
    color: #dc2626 !important;
    border: 1px solid rgba(239, 68, 68, 0.25) !important;
  }
  .apple-status-chip.chip-rescheduled {
    background: rgba(59, 130, 246, 0.1) !important;
    color: #2563eb !important;
    border: 1px solid rgba(59, 130, 246, 0.25) !important;
  }
  .atr-chevron {
    font-size: 14px !important;
    color: var(--muted) !important;
    opacity: 0.4 !important;
  }

  /* Payment Rows (Payments Tab) on Mobile */
  .apple-payments-feed {
    display: flex !important;
    flex-direction: column !important;
    gap: 5px !important;
  }
  .apple-payment-row {
    padding: 7px 8px !important;
    border-radius: 9px !important;
    gap: 8px !important;
  }
  .apr-date {
    font-size: 11.5px !important;
  }
  .apr-badge {
    font-size: 9.5px !important;
    padding: 1px 5px !important;
  }
  .apr-rate {
    font-size: 10px !important;
  }
  .apr-amount {
    font-size: 13px !important;
  }
  .apr-del-btn {
    width: 24px !important;
    height: 24px !important;
    font-size: 11px !important;
  }

  /* Links Feed (Links Tab) on Mobile */
  .apple-links-feed {
    display: flex !important;
    flex-direction: column !important;
    gap: 5px !important;
  }
  .apple-link-rich-card {
    padding: 7px 8px !important;
    border-radius: 9px !important;
    gap: 8px !important;
  }
  .alrc-title {
    font-size: 12px !important;
  }
  .alrc-url {
    font-size: 10px !important;
  }
  .apple-empty-state-box {
    padding: 16px 10px !important;
  }
  .aesb-icon {
    font-size: 22px !important;
  }
  .aesb-title {
    font-size: 12.5px !important;
  }
  .aesb-subtitle {
    font-size: 10.5px !important;
  }
  .status-dot-circle {
    display: inline-block !important;
    width: 7px !important;
    height: 7px !important;
    border-radius: 50% !important;
    background: #10b981 !important;
    flex-shrink: 0 !important;
  }
  .status-dot-circle.inactive {
    background: #94a3b8 !important;
  }
  .status-dot-circle.active {
    background: #10b981 !important;
    box-shadow: 0 0 0 2px rgba(16, 185, 129, 0.2) !important;
  }

  /* Dashboard KPI Cards Compact */
  .premium-kpis, .stats {
    grid-template-columns: 1fr 1fr !important;
    gap: 6px !important;
    margin-bottom: 8px !important;
  }
  .premium-kpi {
    padding: 8px 10px !important;
    min-height: 72px !important;
    border-radius: 12px !important;
  }
  .premium-kpi-top {
    gap: 6px !important;
  }
  .premium-icon {
    width: 22px !important;
    height: 22px !important;
    font-size: 10px !important;
    border-radius: 5px !important;
  }
  .premium-kpi label {
    font-size: 10px !important;
  }
  .premium-value {
    font-size: 16px !important;
    margin-top: 1px !important;
  }
  .premium-delta {
    font-size: 10px !important;
    margin-top: 1px !important;
  }
  .premium-muted {
    font-size: 9px !important;
  }
  .premium-lower-grid {
    grid-template-columns: 1fr !important;
    gap: 8px !important;
  }
  .dash-attention-row {
    padding: 5px 7px !important;
    border-radius: 8px !important;
    font-size: 11.5px !important;
  }
  .dash-birthday-banner {
    padding: 8px 10px !important;
    border-radius: 10px !important;
    margin-bottom: 8px !important;
  }
  .dash-bday-icon {
    font-size: 18px !important;
  }
  .dash-bday-names {
    font-size: 12.5px !important;
  }

  /* Finance Mobile Layout */
  .fin-mob-controls-card {
    margin-bottom: 9px !important;
  }
  .fin-mob-quick-actions-row {
    display: flex !important;
    align-items: center !important;
    gap: 4px !important;
    width: 100% !important;
    overflow-x: auto !important;
    padding-top: 1px !important;
    -webkit-overflow-scrolling: touch !important;
  }
  .fin-mob-action-btn,
  .std-mob-filter-btn,
  .std-mob-action-btn {
    height: 29px !important;
    padding: 0 10px !important;
    font-size: 11.5px !important;
    font-weight: 700 !important;
    border-radius: 8px !important;
    background: var(--surface, #f8fafc) !important;
    border: 1px solid var(--line, #e2e8f0) !important;
    color: var(--text) !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 4px !important;
    white-space: nowrap !important;
    cursor: pointer !important;
    transition: all 0.12s ease !important;
  }
  .fin-mob-action-btn:active,
  .std-mob-filter-btn:active,
  .std-mob-action-btn:active {
    transform: scale(0.95) !important;
  }
  .fin-mob-action-btn.active,
  .std-mob-filter-btn.active,
  .std-mob-action-btn.active {
    background: var(--accent-soft, #f3e7e2) !important;
    color: var(--accent, #a45b46) !important;
    border-color: rgba(164, 91, 70, 0.3) !important;
  }
  .fin-mob-action-btn.danger {
    color: #ef4444 !important;
    background: rgba(239, 68, 68, 0.06) !important;
    border-color: rgba(239, 68, 68, 0.2) !important;
  }
  .fin-tab-header {
    flex-direction: column !important;
    align-items: stretch !important;
    gap: 8px !important;
  }
  .fth-search-wrap,
  .fin-tab-header .gpt-search-wrap {
    min-width: 100% !important;
    width: 100% !important;
  }

  /* Mobile Finance Cards and History */
  .finance-history-card {
    padding: 10px 12px !important;
    border-radius: 14px !important;
  }
  .fin-payment-card,
  .fin-lesson-card,
  .fin-debtor-card {
    padding: 8px 10px !important;
    border-radius: 11px !important;
    gap: 8px !important;
  }
  .fpc-name,
  .flc-name {
    font-size: 13px !important;
    font-weight: 750 !important;
  }
  .fpc-meta,
  .flc-meta {
    font-size: 10.5px !important;
  }
  .fpc-right,
  .flc-right {
    gap: 6px !important;
  }
  .fpc-right .badge,
  .flc-right .badge {
    font-size: 11.5px !important;
    padding: 2.5px 8px !important;
    font-weight: 800 !important;
  }

  /* Settings Page Mobile */
  .settings-container {
    max-width: 100% !important;
  }
  .settings-nav-tabs {
    padding: 3px !important;
    gap: 3px !important;
    display: flex !important;
    overflow-x: auto !important;
    -webkit-overflow-scrolling: touch !important;
    scrollbar-width: none !important;
  }
  .settings-nav-tabs::-webkit-scrollbar {
    display: none !important;
  }
  .settings-tab-btn {
    padding: 5px 9px !important;
    font-size: 11px !important;
    white-space: nowrap !important;
    border-radius: 8px !important;
  }
  .settings-grid {
    grid-template-columns: 1fr !important;
    gap: 10px !important;
  }
  .settings-card {
    padding: 12px 14px !important;
    border-radius: 12px !important;
  }
  .bank-card-row {
    flex-direction: column !important;
    align-items: stretch !important;
    position: relative;
    padding: 10px 10px 8px;
  }
  .bank-del-btn {
    position: absolute;
    top: 8px;
    right: 8px;
  }

  /* Lock Screen on Mobile */
  .voca-lock-card {
    padding: 24px 18px 20px !important;
    border-radius: 26px !important;
  }
  .voca-keypad {
    gap: 8px 10px !important;
    max-width: 240px !important;
  }
  .voca-keypad-btn {
    height: 58px !important;
    width: 58px !important;
  }
  .voca-kp-num {
    font-size: 22px !important;
  }

  /* ==========================================================================
     MOBILE AUDIT FIXES (01.09.2026)
     ========================================================================== */

  /* Fix #1: Prevent iOS Safari auto-zoom on modal inputs (font-size must be >= 16px) */
  .apple-modal-input,
  .apple-student-search-input,
  .apple-textarea,
  .apple-input,
  .apple-modal-input-mini,
  .field input,
  .field select,
  .field textarea,
  .formgrid input,
  .formgrid select,
  .formgrid textarea,
  .modal input,
  .modal select,
  .modal textarea {
    font-size: 16px !important;
  }

  /* Fix #3: Enlarge undersized touch targets with invisible hit areas */
  .asrm-icon-btn {
    width: 28px !important;
    height: 28px !important;
    border-radius: 8px !important;
    font-size: 12px !important;
    position: relative !important;
  }
  .asrm-icon-btn::after {
    content: '' !important;
    position: absolute !important;
    inset: -8px !important;
    min-width: 44px !important;
    min-height: 44px !important;
  }
  .asrm-quick-done {
    padding: 4px 9px !important;
    font-size: 11px !important;
    border-radius: 7px !important;
    position: relative !important;
  }
  .asrm-quick-done::after {
    content: '' !important;
    position: absolute !important;
    inset: -6px !important;
    min-width: 44px !important;
    min-height: 44px !important;
  }
  .std-mob-tg-btn {
    position: relative !important;
  }
  .std-mob-tg-btn::after {
    content: '' !important;
    position: absolute !important;
    inset: -8px !important;
    min-width: 44px !important;
    min-height: 44px !important;
  }
  .btn-nav-arrow {
    width: 28px !important;
    height: 28px !important;
    border-radius: 50% !important;
    position: relative !important;
  }
  .btn-nav-arrow::after {
    content: '' !important;
    position: absolute !important;
    inset: -8px !important;
    min-width: 44px !important;
    min-height: 44px !important;
  }
  .cd-add-btn {
    width: 28px !important;
    height: 28px !important;
    border-radius: 8px !important;
    font-size: 15px !important;
    position: relative !important;
  }
  .cd-add-btn::after {
    content: '' !important;
    position: absolute !important;
    inset: -8px !important;
    min-width: 44px !important;
    min-height: 44px !important;
  }
  .stt-view-btn {
    height: 28px !important;
    padding: 2px 10px !important;
    font-size: 11.5px !important;
  }
  .stt-pill {
    height: 28px !important;
    padding: 0 9px !important;
    font-size: 11px !important;
  }

  /* Fix #4: Add :active states for touch feedback on interactive elements */
  .dash-metric-row:active,
  .dash-bday-item:active,
  .dash-attention-row:active,
  .apple-menu-row:active:not(.no-hover),
  .fin-payment-card:active,
  .fin-lesson-card:active,
  .fin-debtor-card:active {
    transform: scale(0.985) !important;
    transition: transform 0.08s ease !important;
  }

  /* Fix #5: Prevent overflow of long student names in "Needs Attention" rows */
  .dash-att-user {
    min-width: 0 !important;
    flex: 1 !important;
  }
  .dash-att-user strong {
    display: block !important;
    min-width: 0 !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    white-space: nowrap !important;
  }

  /* Fix #6: Horizontal scroll for debtor action buttons on narrow screens */
  .fdc-actions-row {
    overflow-x: auto !important;
    -webkit-overflow-scrolling: touch !important;
    scrollbar-width: none !important;
    flex-wrap: nowrap !important;
  }
  .fdc-actions-row::-webkit-scrollbar {
    display: none !important;
  }
  .fdc-actions-row .fdc-btn {
    flex-shrink: 0 !important;
    white-space: nowrap !important;
  }

  /* Fix #7: Unify dashboard card paddings (10px 12px) */
  .dash-today-card.compact-today-card {
    padding: 10px 12px !important;
  }

  /* Fix #8: Increase empty schedule grid slot height for easier tapping */
  .mgs-empty-slot {
    height: 38px !important;
  }

  /* Fix #9: Increase finance & filter action button height for better touch ergonomics */
  .fin-mob-action-btn,
  .std-mob-filter-btn,
  .std-mob-action-btn,
  .std-mob-filters-grid .sch-filter-pop-btn {
    height: 32px !important;
  }
}

/* =========================================================
   APPLE STUDENT MODAL (DESKTOP POLISH)
   ========================================================= */

.apple-student-modal-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
  gap: 12px;
  padding-bottom: 2px;
}
.asmh-user {
  display: flex;
  align-items: center;
  gap: 12px;
  flex: 1;
  min-width: 0;
}
.asmh-avatar-wrap {
  position: relative;
  cursor: pointer;
  border-radius: 14px;
  transition: transform 0.15s ease;
}
.asmh-avatar-wrap:hover {
  transform: scale(1.04);
}
.asmh-avatar-edit {
  position: absolute;
  right: -3px;
  bottom: -3px;
  width: 17px;
  height: 17px;
  background: var(--card, #fff);
  border: 1px solid var(--line, #e2e8f0);
  border-radius: 50%;
  font-size: 9px;
  display: grid;
  place-items: center;
  box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}
body.dark-mode .asmh-avatar-edit {
  background: #222836;
  border-color: rgba(255,255,255,0.15);
}
.asmh-titles {
  display: flex;
  flex-direction: column;
  gap: 3px;
  min-width: 0;
}
.asmh-name-row {
  display: flex;
  align-items: center;
  gap: 8px;
}
.asmh-name {
  font-size: 18px;
  font-weight: 850;
  color: var(--text);
  letter-spacing: -0.3px;
  margin: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.asmh-tags-row {
  display: flex;
  align-items: center;
  gap: 6px;
}
.asmh-actions-group {
  display: flex;
  align-items: center;
  gap: 7px;
}
.apple-tg-btn {
  height: 30px !important;
  padding: 0 10px !important;
  border-radius: 8px !important;
  font-size: 11.5px !important;
  font-weight: 750 !important;
  background: rgba(0, 136, 204, 0.08) !important;
  color: #0088cc !important;
  border: 1px solid rgba(0, 136, 204, 0.25) !important;
  cursor: pointer !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 4px !important;
  transition: all 0.15s ease !important;
  white-space: nowrap !important;
}
.apple-tg-btn:hover {
  background: rgba(0, 136, 204, 0.15) !important;
  border-color: rgba(0, 136, 204, 0.4) !important;
  transform: translateY(-1px);
}
body.dark-mode .apple-tg-btn {
  background: rgba(0, 136, 204, 0.15) !important;
  border-color: rgba(0, 136, 204, 0.3) !important;
  color: #38bdf8 !important;
}

.apple-header-btn {
  height: 30px !important;
  padding: 0 10px !important;
  font-size: 12px !important;
  font-weight: 700 !important;
  border-radius: 8px !important;
  background: rgba(0, 0, 0, 0.05) !important;
  border: 1px solid var(--line, #e2e8f0) !important;
  color: var(--text) !important;
  cursor: pointer !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 4px !important;
  transition: all 0.15s ease !important;
  white-space: nowrap !important;
}
.apple-header-btn:hover {
  background: rgba(0, 0, 0, 0.09) !important;
  transform: translateY(-1px);
}
body.dark-mode .apple-header-btn {
  background: rgba(255, 255, 255, 0.08) !important;
  border-color: rgba(255, 255, 255, 0.1) !important;
  color: #e2e8f0 !important;
}

.apple-icon-btn {
  width: 30px !important;
  height: 30px !important;
  min-width: 30px !important;
  border-radius: 8px !important;
  background: rgba(0, 0, 0, 0.05) !important;
  border: 1px solid var(--line, #e2e8f0) !important;
  color: var(--text) !important;
  font-size: 13px !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  cursor: pointer !important;
  transition: all 0.15s ease !important;
  padding: 0 !important;
  line-height: 1 !important;
}
.apple-icon-btn:hover {
  background: rgba(0, 0, 0, 0.09) !important;
  transform: translateY(-1px);
}
body.dark-mode .apple-icon-btn {
  background: rgba(255, 255, 255, 0.08) !important;
  border-color: rgba(255, 255, 255, 0.1) !important;
  color: #cbd5e1 !important;
}

/* Unified Apple Modal Close Buttons (Everywhere) */
.close,
.modalhead .close,
.modal-clean-close-btn,
.apple-close-btn {
  width: 30px !important;
  height: 30px !important;
  min-width: 30px !important;
  min-height: 30px !important;
  border-radius: 50% !important;
  background: rgba(0, 0, 0, 0.04) !important;
  border: 1px solid rgba(0, 0, 0, 0.07) !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  font-size: 13.5px !important;
  font-weight: 750 !important;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif !important;
  color: var(--muted, #64748b) !important;
  cursor: pointer !important;
  padding: 0 !important;
  margin: 0 !important;
  line-height: 1 !important;
  transition: all 0.15s ease !important;
  flex-shrink: 0 !important;
  box-shadow: none !important;
}

.close:hover,
.modalhead .close:hover,
.modal-clean-close-btn:hover,
.apple-close-btn:hover {
  background: rgba(0, 0, 0, 0.09) !important;
  color: var(--text, #1e293b) !important;
  transform: translateY(-1px) !important;
}

body.dark-mode .close,
body.dark-mode .modalhead .close,
body.dark-mode .modal-clean-close-btn,
body.dark-mode .apple-close-btn {
  background: rgba(255, 255, 255, 0.08) !important;
  border-color: rgba(255, 255, 255, 0.1) !important;
  color: #94a3b8 !important;
}

body.dark-mode .close:hover,
body.dark-mode .modalhead .close:hover,
body.dark-mode .modal-clean-close-btn:hover,
body.dark-mode .apple-close-btn:hover {
  background: rgba(255, 255, 255, 0.16) !important;
  color: #ffffff !important;
}

/* Apple Segmented Tabs */
.apple-modal-segmented-tabs {
  display: flex;
  align-items: center;
  gap: 3px;
  background: rgba(0, 0, 0, 0.05);
  padding: 3px;
  border-radius: 10px;
  margin-bottom: 14px;
  width: 100%;
}
body.dark-mode .apple-modal-segmented-tabs {
  background: rgba(255, 255, 255, 0.06);
}
.amst-tab {
  flex: 1;
  border: 0;
  background: transparent;
  padding: 6px 12px;
  border-radius: 8px;
  font-size: 12.5px;
  font-weight: 600;
  color: var(--muted);
  cursor: pointer;
  transition: all 0.15s ease;
  text-align: center;
}
.amst-tab:hover {
  color: var(--text);
}
.amst-tab.active {
  background: var(--card, #ffffff);
  color: var(--text);
  font-weight: 800;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.08), 0 0.5px 1px rgba(0, 0, 0, 0.04);
}
body.dark-mode .amst-tab.active {
  background: #252b3b;
  color: #ffffff;
  box-shadow: 0 1px 6px rgba(0, 0, 0, 0.3);
}

/* ==========================================================================
   Apple Native Modals (Payment Modal, Searchable Picker, Bento Summary)
   ========================================================================== */
.apple-modal-header {
  display: flex !important;
  align-items: center !important;
  gap: 10px !important;
  padding-bottom: 12px !important;
  border-bottom: 1px solid rgba(0, 0, 0, 0.05) !important;
  margin-bottom: 12px !important;
  position: relative !important;
  width: 100% !important;
}
body.dark-mode .apple-modal-header {
  border-bottom-color: rgba(255, 255, 255, 0.08) !important;
}
.amh-icon-circle {
  width: 34px !important;
  height: 34px !important;
  min-width: 34px !important;
  min-height: 34px !important;
  border-radius: 10px !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  font-size: 17px !important;
  background: rgba(16, 185, 129, 0.12) !important;
  color: #059669 !important;
  flex-shrink: 0 !important;
}
.amh-icon-circle.green { background: rgba(16, 185, 129, 0.12) !important; color: #059669 !important; }
.amh-icon-circle.terracotta, .amh-icon-circle.accent { background: var(--accent-soft, #f3e7e2) !important; color: var(--accent, #a45b46) !important; }
.amh-icon-circle.blue { background: rgba(16, 185, 129, 0.12) !important; color: #059669 !important; }

.amh-text {
  display: flex !important;
  flex-direction: column !important;
  gap: 1px !important;
  flex: 1 !important;
  min-width: 0 !important;
}
.amh-title {
  margin: 0 !important;
  font-size: 16.5px !important;
  font-weight: 850 !important;
  color: var(--text) !important;
  letter-spacing: -0.3px !important;
}
body.dark-mode .amh-title { color: #f8fafc !important; }
.amh-sub {
  margin: 0 !important;
  font-size: 11.5px !important;
  color: var(--muted) !important;
  white-space: nowrap !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
}
body.dark-mode .amh-sub { color: #94a3b8 !important; }

.apple-modal-form {
  display: flex !important;
  flex-direction: column !important;
  gap: 11px !important;
  width: 100% !important;
}

.apple-form-section {
  display: flex !important;
  flex-direction: column !important;
  gap: 5px !important;
  width: 100% !important;
}
.afs-label {
  font-size: 11.5px !important;
  font-weight: 750 !important;
  color: var(--text) !important;
}
body.dark-mode .afs-label { color: #f8fafc !important; }
.afs-header-row {
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  width: 100% !important;
}

.apple-form-grid-2 {
  display: grid !important;
  grid-template-columns: 1fr 1fr !important;
  gap: 9px !important;
  width: 100% !important;
}
.apple-form-group {
  display: flex !important;
  flex-direction: column !important;
  gap: 5px !important;
  width: 100% !important;
}
.afg-label {
  font-size: 11.5px !important;
  font-weight: 750 !important;
  color: var(--text) !important;
}
body.dark-mode .afg-label { color: #f8fafc !important; }

.apple-modal-input {
  width: 100% !important;
  height: 38px !important;
  background: var(--surface-2, #f8fafc) !important;
  border: 1px solid var(--line, #e2e8f0) !important;
  border-radius: 9px !important;
  padding: 0 10px !important;
  font-size: 13px !important;
  font-weight: 650 !important;
  color: var(--text) !important;
  font-family: inherit !important;
  outline: none !important;
  box-sizing: border-box !important;
  transition: all 0.14s ease !important;
}
.apple-modal-input:focus {
  border-color: var(--accent, #a45b46) !important;
  background: var(--card, #ffffff) !important;
  box-shadow: 0 0 0 3px rgba(164, 91, 70, 0.15) !important;
}
body.dark-mode .apple-modal-input {
  background: #181c27 !important;
  border-color: rgba(255, 255, 255, 0.1) !important;
  color: #f8fafc !important;
}
body.dark-mode .apple-modal-input:focus {
  background: #212634 !important;
  border-color: var(--accent, #a45b46) !important;
  box-shadow: 0 0 0 3px rgba(164, 91, 70, 0.25) !important;
}

.apple-modal-input-mini {
  width: 65px !important;
  height: 30px !important;
  background: var(--surface-2, #f8fafc) !important;
  border: 1px solid var(--line, #e2e8f0) !important;
  border-radius: 7px !important;
  padding: 0 6px !important;
  font-size: 13px !important;
  font-weight: 750 !important;
  text-align: center !important;
  color: var(--text) !important;
  font-family: inherit !important;
  box-sizing: border-box !important;
  outline: none !important;
}
.apple-modal-input-mini:focus {
  border-color: var(--accent, #a45b46) !important;
  background: var(--card, #ffffff) !important;
}
body.dark-mode .apple-modal-input-mini {
  background: #181c27 !important;
  border-color: rgba(255, 255, 255, 0.1) !important;
  color: #f8fafc !important;
}

/* Searchable Student Picker */
.apple-student-search-container {
  position: relative !important;
  width: 100% !important;
}
.ass-input-wrap {
  position: relative !important;
  display: flex !important;
  align-items: center !important;
  width: 100% !important;
}
.ass-search-icon {
  position: absolute !important;
  left: 10px !important;
  font-size: 13px !important;
  color: var(--muted) !important;
  pointer-events: none !important;
}
.apple-student-search-input {
  width: 100% !important;
  height: 38px !important;
  background: var(--surface-2, #f8fafc) !important;
  border: 1px solid var(--line, #e2e8f0) !important;
  border-radius: 9px !important;
  padding: 0 12px 0 32px !important;
  font-size: 13px !important;
  font-weight: 600 !important;
  color: var(--text) !important;
  font-family: inherit !important;
  outline: none !important;
  box-sizing: border-box !important;
  transition: all 0.14s ease !important;
}
.apple-student-search-input:focus {
  background: var(--card, #ffffff) !important;
  border-color: var(--accent, #a45b46) !important;
  box-shadow: 0 0 0 3px rgba(164, 91, 70, 0.15) !important;
}
body.dark-mode .apple-student-search-input {
  background: #181c27 !important;
  border-color: rgba(255, 255, 255, 0.1) !important;
  color: #f8fafc !important;
}
body.dark-mode .apple-student-search-input:focus {
  background: #212634 !important;
  border-color: var(--accent, #a45b46) !important;
}

.apple-student-dropdown {
  position: absolute !important;
  top: calc(100% + 4px) !important;
  left: 0 !important;
  right: 0 !important;
  background: var(--card, #ffffff) !important;
  border: 1px solid var(--line, #e2e8f0) !important;
  border-radius: 10px !important;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15) !important;
  max-height: 220px !important;
  overflow-y: auto !important;
  z-index: 100 !important;
  padding: 4px !important;
}
body.dark-mode .apple-student-dropdown {
  background: #1c2230 !important;
  border-color: rgba(255, 255, 255, 0.1) !important;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.4) !important;
}
.ass-dropdown-item {
  display: flex !important;
  align-items: center !important;
  gap: 8px !important;
  padding: 6px 8px !important;
  border-radius: 7px !important;
  cursor: pointer !important;
  transition: background 0.12s ease !important;
}
.ass-dropdown-item:hover {
  background: var(--surface-2, #f1f4f9) !important;
}
body.dark-mode .ass-dropdown-item:hover {
  background: #242a3a !important;
}
.ass-item-avatar {
  width: 28px !important;
  height: 28px !important;
  flex-shrink: 0 !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
}
.ass-item-main {
  display: flex !important;
  flex-direction: column !important;
  flex: 1 !important;
  min-width: 0 !important;
  gap: 1px !important;
}
.ass-item-name {
  font-size: 13px !important;
  font-weight: 750 !important;
  color: var(--text) !important;
  white-space: nowrap !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
}
body.dark-mode .ass-item-name { color: #f8fafc !important; }
.ass-item-meta {
  font-size: 11px !important;
  color: var(--muted) !important;
}
body.dark-mode .ass-item-meta { color: #94a3b8 !important; }
.ass-item-price {
  font-size: 12px !important;
  font-weight: 750 !important;
  color: #10b981 !important;
  flex-shrink: 0 !important;
}
.ass-empty-msg {
  padding: 12px !important;
  text-align: center !important;
  font-size: 12px !important;
  color: var(--muted) !important;
}

/* Selected Student Chip */
.apple-selected-student-chip {
  display: flex !important;
  align-items: center !important;
  gap: 9px !important;
  background: var(--surface-2, #f8fafc) !important;
  border: 1px solid var(--line, #e2e8f0) !important;
  border-radius: 10px !important;
  padding: 7px 10px !important;
  width: 100% !important;
  box-sizing: border-box !important;
}
body.dark-mode .apple-selected-student-chip {
  background: #181c27 !important;
  border-color: rgba(255, 255, 255, 0.08) !important;
}
.ass-avatar {
  width: 32px !important;
  height: 32px !important;
  flex-shrink: 0 !important;
}
.ass-info {
  display: flex !important;
  flex-direction: column !important;
  gap: 1px !important;
  flex: 1 !important;
  min-width: 0 !important;
}
.ass-name {
  font-size: 13.5px !important;
  font-weight: 800 !important;
  color: var(--text) !important;
}
body.dark-mode .ass-name { color: #f8fafc !important; }
.ass-sub {
  font-size: 11px !important;
  color: var(--muted) !important;
}
body.dark-mode .ass-sub { color: #94a3b8 !important; }
.ass-change-btn {
  background: var(--card, #ffffff) !important;
  border: 1px solid var(--line, #cbd5e1) !important;
  border-radius: 6px !important;
  padding: 3px 8px !important;
  font-size: 11px !important;
  font-weight: 700 !important;
  color: var(--text) !important;
  cursor: pointer !important;
  transition: all 0.14s ease !important;
  white-space: nowrap !important;
}
.ass-change-btn:hover {
  background: var(--surface-2, #f1f4f9) !important;
}
body.dark-mode .ass-change-btn {
  background: #242a3a !important;
  border-color: rgba(255, 255, 255, 0.12) !important;
  color: #f8fafc !important;
}

/* Quick Pills */
.apple-quick-pills {
  display: flex !important;
  gap: 5px !important;
  flex-wrap: wrap !important;
  margin-top: 3px !important;
  width: 100% !important;
}
.aq-pill {
  flex: 1 1 auto !important;
  background: var(--surface-2, #f4f6fa) !important;
  border: 1px solid var(--line, #e2e8f0) !important;
  border-radius: 8px !important;
  padding: 6px 9px !important;
  font-size: 11.5px !important;
  font-weight: 700 !important;
  color: var(--text) !important;
  cursor: pointer !important;
  text-align: center !important;
  transition: all 0.14s ease !important;
}
.aq-pill:hover {
  background: #e9ecf2 !important;
}
.aq-pill.is-active {
  background: var(--accent, #a45b46) !important;
  color: #ffffff !important;
  border-color: var(--accent, #a45b46) !important;
  box-shadow: 0 2px 6px rgba(164, 91, 70, 0.3) !important;
}
body.dark-mode .aq-pill {
  background: #181c27 !important;
  border-color: rgba(255, 255, 255, 0.08) !important;
  color: #f8fafc !important;
}
body.dark-mode .aq-pill:hover {
  background: #242a3a !important;
}
body.dark-mode .aq-pill.is-active {
  background: var(--accent, #a45b46) !important;
  color: #ffffff !important;
  border-color: var(--accent, #a45b46) !important;
}

/* Total Banner */
.apple-total-banner {
  background: linear-gradient(135deg, rgba(164, 91, 70, 0.07) 0%, rgba(164, 91, 70, 0.02) 100%) !important;
  border: 1px solid rgba(164, 91, 70, 0.22) !important;
  border-radius: 11px !important;
  padding: 9px 12px !important;
  display: flex !important;
  justify-content: space-between !important;
  align-items: center !important;
  margin-top: 4px !important;
  width: 100% !important;
  box-sizing: border-box !important;
}
body.dark-mode .apple-total-banner {
  background: rgba(164, 91, 70, 0.14) !important;
  border-color: rgba(164, 91, 70, 0.3) !important;
}
.atb-left { display: flex !important; flex-direction: column !important; gap: 1px !important; }
.atb-label { font-size: 11px !important; font-weight: 700 !important; color: var(--accent, #a45b46) !important; }
body.dark-mode .atb-label { color: #ff9e87 !important; }
.atb-calc { font-size: 11.5px !important; color: var(--muted) !important; }
body.dark-mode .atb-calc { color: #94a3b8 !important; }
.atb-total { font-size: 20px !important; font-weight: 850 !important; color: var(--text) !important; letter-spacing: -0.3px !important; }
body.dark-mode .atb-total { color: #f8fafc !important; }

/* Modal Actions */
.apple-modal-actions {
  display: flex !important;
  justify-content: flex-end !important;
  gap: 8px !important;
  margin-top: 8px !important;
  width: 100% !important;
}
.apple-modal-btn {
  font-family: inherit !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 5px !important;
  padding: 8px 16px !important;
  border-radius: 9px !important;
  font-size: 13px !important;
  font-weight: 750 !important;
  cursor: pointer !important;
  transition: all 0.14s ease !important;
}
.apple-modal-btn.cancel {
  background: var(--surface-2, #f4f6fa) !important;
  color: var(--text) !important;
  border: 1px solid var(--line, #e2e8f0) !important;
}
.apple-modal-btn.cancel:hover { background: #e9ecf2 !important; }
body.dark-mode .apple-modal-btn.cancel {
  background: #181c27 !important;
  border-color: rgba(255, 255, 255, 0.08) !important;
  color: #f8fafc !important;
}
.apple-modal-btn.submit {
  background: var(--accent, #a45b46) !important;
  color: #ffffff !important;
  border: 1px solid var(--accent, #a45b46) !important;
  box-shadow: 0 2px 8px rgba(164, 91, 70, 0.25) !important;
  flex: 1 !important;
}
.apple-modal-btn.submit:hover {
  background: #8b4937 !important;
  border-color: #8b4937 !important;
  transform: translateY(-1px) !important;
}

/* Modal size tuning for Student Card */
.student-clean-modal-wrap {
  width: 100%;
}
#modal:has(.student-clean-modal-wrap) .modal,
.modal:has(.student-clean-modal-wrap) {
  max-width: 660px !important;
  padding: 16px 18px !important;
  border-radius: 18px !important;
}

/* Compact Dialog / Schedule Editor Modal */
.compact-dialog-modal {
  width: 100%;
}
#modal:has(.compact-dialog-modal) .modal,
.modal:has(.compact-dialog-modal) {
  max-width: 440px !important;
  width: 100% !important;
  padding: 20px 22px !important;
  border-radius: 20px !important;
  min-height: auto !important;
  height: auto !important;
  box-shadow: 0 25px 60px rgba(0, 0, 0, 0.22) !important;
}
.cdm-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 14px;
  gap: 12px;
}
.cdm-titles {
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.cdm-title {
  font-weight: 850;
  font-size: 15.5px;
  color: var(--text);
  letter-spacing: -0.2px;
}
.cdm-subtitle {
  font-size: 11.5px;
  color: var(--muted);
}
.cdm-days-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 16px;
}
.cdm-day-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 7px 11px;
  background: var(--surface-2, #f8fafc);
  border-radius: 10px;
  border: 1px solid var(--line, #e2e8f0);
  transition: all 0.15s ease;
}
.cdm-day-row:hover {
  background: var(--surface, #f1f5f9);
}
.cdm-day-row.is-active {
  background: var(--accent-soft, #f3e7e2);
  border-color: rgba(164, 91, 70, 0.35);
}
body.dark-mode .cdm-day-row {
  background: #181d28;
  border-color: rgba(255, 255, 255, 0.07);
}
body.dark-mode .cdm-day-row.is-active {
  background: rgba(181, 103, 82, 0.15);
  border-color: rgba(229, 152, 133, 0.4);
}
.cdm-day-left {
  display: flex;
  align-items: center;
  gap: 9px;
  cursor: pointer;
}
.cdm-checkbox {
  width: 17px;
  height: 17px;
  accent-color: var(--accent, #a45b46);
  cursor: pointer;
  border-radius: 4px;
}
.cdm-day-label {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 13.5px;
  font-weight: 750;
  color: var(--text);
  cursor: pointer;
  user-select: none;
}
.cdm-day-badge {
  font-size: 11px;
  font-weight: 850;
  color: var(--accent, #a45b46);
  background: var(--accent-soft, #f3e7e2);
  padding: 1.5px 6px;
  border-radius: 5px;
  text-transform: uppercase;
}
body.dark-mode .cdm-day-badge {
  color: #e59885;
  background: rgba(181, 103, 82, 0.2);
}
.cdm-day-full {
  font-size: 12px;
  font-weight: 500;
  color: var(--muted);
}
.cdm-time-input {
  padding: 4px 8px;
  border: 1px solid var(--line, #e2e8f0);
  border-radius: 7px;
  background: var(--card, #fff);
  font-size: 13px;
  font-weight: 800;
  color: var(--text);
  font-family: inherit;
  transition: all 0.15s ease;
}
.cdm-time-input:focus {
  border-color: var(--accent, #a45b46);
  outline: none;
  box-shadow: 0 0 0 2px rgba(164, 91, 70, 0.18);
}
body.dark-mode .cdm-time-input {
  background: #141720;
  border-color: rgba(255, 255, 255, 0.1);
  color: #fff;
}
.cdm-actions-row {
  display: flex;
  gap: 8px;
  justify-content: flex-end;
  align-items: center;
}

/* Stack Layout */
.apple-student-overview-stack {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.apple-card-widget {
  background: var(--card, #ffffff);
  border: 1px solid var(--line, #e2e8f0);
  border-radius: 12px;
  padding: 12px 15px;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.02);
}
body.dark-mode .apple-card-widget {
  background: #151922;
  border-color: rgba(255, 255, 255, 0.08);
}

.acw-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 9px;
  gap: 8px;
}
.acw-titles {
  display: flex;
  flex-direction: column;
  gap: 1px;
}
.acw-title {
  font-size: 13.5px;
  font-weight: 800;
  color: var(--text);
  letter-spacing: -0.2px;
}
.acw-sub {
  font-size: 11.5px;
  color: var(--muted);
  font-weight: 550;
}
.acw-actions {
  display: flex;
  align-items: center;
  gap: 7px;
}

.abt-status-pill {
  display: inline-flex;
  align-items: center;
  padding: 2.5px 8px;
  border-radius: 6px;
  font-size: 11px;
  font-weight: 800;
}
.abt-status-pill.status-good {
  background: rgba(34, 197, 94, 0.1);
  color: #16a34a;
  border: 1px solid rgba(34, 197, 94, 0.25);
}
.abt-status-pill.status-warning {
  background: rgba(245, 158, 11, 0.12);
  color: #d97706;
  border: 1px solid rgba(245, 158, 11, 0.25);
}
.abt-status-pill.status-debt {
  background: rgba(239, 68, 68, 0.12);
  color: #dc2626;
  border: 1px solid rgba(239, 68, 68, 0.25);
}
body.dark-mode .abt-status-pill.status-good {
  background: rgba(34, 197, 94, 0.2);
  color: #4ade80;
}
body.dark-mode .abt-status-pill.status-warning {
  background: rgba(245, 158, 11, 0.2);
  color: #fbbf24;
}
body.dark-mode .abt-status-pill.status-debt {
  background: rgba(239, 68, 68, 0.22);
  color: #f87171;
}

.apple-progress-track {
  width: 100%;
  height: 6px;
  background: rgba(0, 0, 0, 0.05);
  border-radius: 999px;
  overflow: hidden;
  margin-bottom: 10px;
}
body.dark-mode .apple-progress-track {
  background: rgba(255, 255, 255, 0.08);
}
.apple-progress-fill {
  height: 100%;
  border-radius: 999px;
  transition: width 0.35s cubic-bezier(0.16, 1, 0.3, 1);
}
.apple-progress-fill.fill-green {
  background: linear-gradient(90deg, #10b981 0%, #059669 100%);
  box-shadow: 0 1px 4px rgba(16, 185, 129, 0.3);
}
.apple-progress-fill.fill-yellow {
  background: linear-gradient(90deg, #f59e0b 0%, #d97706 100%);
}
.apple-progress-fill.fill-red {
  background: linear-gradient(90deg, #ef4444 0%, #dc2626 100%);
}

.apple-inline-pay-btn {
  height: 25px !important;
  padding: 0 10px !important;
  font-size: 11.5px !important;
  font-weight: 750 !important;
  border-radius: 6px !important;
  background: linear-gradient(180deg, #a45b46 0%, #8b4a37 100%) !important;
  color: #ffffff !important;
  border: none !important;
  cursor: pointer !important;
}

/* Unified Card Action Buttons */
.apple-action-btn {
  height: 25px !important;
  padding: 0 9px !important;
  font-size: 11px !important;
  font-weight: 750 !important;
  border-radius: 6px !important;
  background: rgba(0, 0, 0, 0.05) !important;
  color: var(--text) !important;
  border: 1px solid var(--line, #cbd5e1) !important;
  cursor: pointer !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 4px !important;
  transition: all 0.15s ease !important;
  white-space: nowrap !important;
}
.apple-action-btn:hover {
  background: rgba(0, 0, 0, 0.09) !important;
  transform: translateY(-1px);
}
.apple-action-btn.primary {
  background: var(--accent-soft, #f3e7e2) !important;
  color: var(--accent, #a45b46) !important;
  border: 1px solid rgba(164, 91, 70, 0.25) !important;
  box-shadow: none !important;
}
.apple-action-btn.primary:hover {
  background: rgba(164, 91, 70, 0.18) !important;
  border-color: rgba(164, 91, 70, 0.4) !important;
  transform: translateY(-1px);
}
body.dark-mode .apple-action-btn.primary {
  background: rgba(181, 103, 82, 0.18) !important;
  color: #e59885 !important;
  border-color: rgba(229, 152, 133, 0.32) !important;
}
body.dark-mode .apple-action-btn {
  background: rgba(255, 255, 255, 0.08) !important;
  border-color: rgba(255, 255, 255, 0.12) !important;
  color: #f1f5f9 !important;
}

.apple-card-action-bar-btn {
  width: 100%;
  height: 32px;
  margin-top: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  font-size: 12px;
  font-weight: 750;
  border-radius: 8px;
  background: var(--accent-soft, #f3e7e2);
  color: var(--accent, #a45b46);
  border: 1px solid rgba(164, 91, 70, 0.22);
  cursor: pointer;
  transition: all 0.12s ease;
}
.apple-card-action-bar-btn:hover {
  background: rgba(164, 91, 70, 0.16);
  border-color: rgba(164, 91, 70, 0.35);
  transform: translateY(-1px);
}
.apple-card-action-bar-btn:active {
  transform: scale(0.98);
}
body.dark-mode .apple-card-action-bar-btn {
  background: rgba(181, 103, 82, 0.15);
  color: #e59885;
  border-color: rgba(229, 152, 133, 0.3);
}

/* 4-Metric Grid in Hero Card */
.apple-metrics-row-4 {
  display: flex;
  align-items: center;
  justify-content: space-around;
  background: rgba(0, 0, 0, 0.02);
  border: 1px solid var(--line, #e2e8f0);
  border-radius: 9px;
  padding: 6px 10px;
}
body.dark-mode .apple-metrics-row-4 {
  background: rgba(255, 255, 255, 0.03);
  border-color: rgba(255, 255, 255, 0.06);
}
.amr-col {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1px;
  flex: 1;
}
.amr-label {
  font-size: 9.5px;
  font-weight: 700;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.3px;
}
.amr-value {
  font-size: 17px;
  font-weight: 850;
  color: var(--text);
  line-height: 1.1;
}
.amr-value.positive { color: #10b981; }
.amr-value.warning { color: #f59e0b; }
.amr-value.negative { color: #ef4444; }
.amr-divider {
  width: 1px;
  height: 20px;
  background: var(--line, #e2e8f0);
}
body.dark-mode .amr-divider {
  background: rgba(255, 255, 255, 0.08);
}

/* 2-Column Split Grid */
.apple-overview-split-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  align-items: stretch;
}
.split-widget {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  min-height: 100%;
}

/* Perfectly Symmetric 4-Row Key-Value List */
.apple-symmetric-list {
  display: flex;
  flex-direction: column;
  background: rgba(0, 0, 0, 0.02);
  border: 1px solid var(--line, #e2e8f0);
  border-radius: 9px;
  padding: 2px 10px;
}
body.dark-mode .apple-symmetric-list {
  background: rgba(255, 255, 255, 0.03);
  border-color: rgba(255, 255, 255, 0.06);
}
.asl-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  height: 30px;
  border-bottom: 1px solid var(--line, #f1f3f5);
  font-size: 11.5px;
}
.asl-row:last-child {
  border-bottom: none;
}
body.dark-mode .asl-row {
  border-bottom-color: rgba(255, 255, 255, 0.04);
}
.asl-label {
  color: var(--muted);
  font-weight: 600;
  white-space: nowrap;
}
.asl-val {
  font-weight: 750;
  color: var(--text);
  text-align: right;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 170px;
}
.asl-val a {
  color: #0284c7;
  text-decoration: none;
}
.asl-val a:hover {
  text-decoration: underline;
}
.asl-val.positive { color: #10b981; }
.asl-val.negative { color: #ef4444; }

.apple-sch-slots-row {
  display: flex;
  align-items: center;
  gap: 5px;
  flex-wrap: wrap;
  width: 100%;
}
.apple-sch-ticket {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  background: var(--surface-2, #f1f5f9);
  border: 1px solid var(--line, #e2e8f0);
  border-radius: 7px;
  padding: 3px 8px;
  transition: all 0.15s ease;
}
.apple-sch-ticket:hover {
  background: var(--surface, #e2e8f0);
  border-color: rgba(164, 91, 70, 0.35);
  transform: translateY(-1px);
}
body.dark-mode .apple-sch-ticket {
  background: #1c212d;
  border-color: rgba(255, 255, 255, 0.08);
}
.ast-day {
  font-size: 10px;
  font-weight: 850;
  color: var(--accent, #a45b46);
  background: rgba(164, 91, 70, 0.12);
  padding: 1.5px 5px;
  border-radius: 4px;
  text-transform: uppercase;
  letter-spacing: 0.2px;
}
body.dark-mode .ast-day {
  background: rgba(164, 91, 70, 0.2);
  color: #e5a494;
}
.ast-time {
  font-size: 12px;
  font-weight: 800;
  color: var(--text);
  letter-spacing: -0.2px;
}
.apple-sch-ticket.mini {
  padding: 2px 6px;
  gap: 4px;
  border-radius: 6px;
}
.apple-sch-ticket.mini .ast-day {
  font-size: 9.5px;
  padding: 1px 4px;
}
.apple-sch-ticket.mini .ast-time {
  font-size: 11px;
}

.apple-sch-empty-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  background: var(--surface, #f8f9fa);
  border: 1px dashed var(--line, #cbd5e1);
  border-radius: 8px;
  padding: 5px 8px;
  color: var(--muted);
  font-size: 11.5px;
}
body.dark-mode .apple-sch-empty-row {
  background: #1b202c;
  border-color: rgba(255, 255, 255, 0.1);
}
.apple-sch-add-quick-btn {
  padding: 2px 6px;
  font-size: 10.5px;
  font-weight: 700;
  border-radius: 5px;
  background: var(--card, #fff);
  border: 1px solid var(--line, #cbd5e1);
  color: var(--accent, #a45b46);
  cursor: pointer;
}

.apple-sch-group-block {
  margin-bottom: 6px;
}
.asg-header {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 4px;
}
.asg-title {
  font-size: 12.5px;
  font-weight: 750;
  color: var(--text);
}
.asg-badge {
  font-size: 10px;
  font-weight: 650;
  color: var(--muted);
  background: var(--surface-2, #f1f3f5);
  border-radius: 4px;
  padding: 1px 5px;
}
body.dark-mode .asg-badge {
  background: #202635;
}

.apple-sch-fin-strip {
  display: flex;
  align-items: center;
  justify-content: space-around;
  background: var(--surface, #f8f9fa);
  border: 1px solid var(--line, #e2e8f0);
  border-radius: 9px;
  padding: 5px 10px;
}
body.dark-mode .apple-sch-fin-strip {
  background: #1b202c;
  border-color: rgba(255, 255, 255, 0.06);
}
.asf-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1px;
  text-align: center;
  flex: 1;
}
.asf-label {
  font-size: 9.5px;
  font-weight: 650;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.3px;
}
.asf-val {
  font-size: 12px;
  font-weight: 800;
  color: var(--text);
}
.asf-val.debt {
  color: #ef4444 !important;
}
.asf-divider {
  width: 1px;
  height: 18px;
  background: var(--line, #e2e8f0);
}
body.dark-mode .asf-divider {
  background: rgba(255, 255, 255, 0.08);
}

/* Apple Inset Contacts List */
.apple-contacts-inset-list {
  display: flex;
  flex-direction: column;
  background: var(--surface, #f8f9fa);
  border: 1px solid var(--line, #e2e8f0);
  border-radius: 10px;
  overflow: hidden;
}
body.dark-mode .apple-contacts-inset-list {
  background: #1b202c;
  border-color: rgba(255, 255, 255, 0.06);
}
.acil-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 8px 12px;
  border-bottom: 1px solid var(--line, #f1f3f5);
}
.acil-row:last-child {
  border-bottom: none;
}
body.dark-mode .acil-row {
  border-bottom-color: rgba(255, 255, 255, 0.05);
}
.acil-left {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}
.acil-icon-badge {
  width: 28px;
  height: 28px;
  min-width: 28px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
}
.acil-icon-badge.blue { background: rgba(59, 130, 246, 0.12); }
.acil-icon-badge.purple { background: rgba(147, 51, 234, 0.12); }
.acil-icon-badge.pink { background: rgba(236, 72, 153, 0.12); }
.acil-icon-badge.amber { background: rgba(245, 158, 11, 0.12); }

.acil-icon {
  font-size: 13px;
  line-height: 1;
}
.acil-label {
  font-size: 12px;
  font-weight: 650;
  color: var(--muted);
  white-space: nowrap;
}
.acil-val {
  font-size: 12.5px;
  font-weight: 750;
  color: var(--text);
  text-align: right;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.acil-val a {
  color: #0284c7;
  text-decoration: none;
  font-weight: 800;
}
.acil-val a:hover {
  text-decoration: underline;
}
body.dark-mode .acil-val a {
  color: #38bdf8;
}
.aci-icon-circle {
  width: 28px;
  height: 28px;
  min-width: 28px;
  border-radius: 7px;
  background: var(--card, #ffffff);
  border: 1px solid var(--line, #e2e8f0);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
}
body.dark-mode .aci-icon-circle {
  background: #202635;
  border-color: rgba(255, 255, 255, 0.08);
}
.aci-content {
  display: flex;
  flex-direction: column;
  gap: 1px;
  overflow: hidden;
}
.aci-label {
  font-size: 10px;
  font-weight: 650;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.3px;
  white-space: nowrap;
}

/* Direct 7-Day Schedule Editor (Desktop Web) */
.apple-sch-clear-pill {
  height: 26px;
  padding: 0 10px;
  border-radius: 7px;
  font-size: 11.5px;
  font-weight: 700;
  background: rgba(220, 38, 38, 0.08);
  color: #dc2626;
  border: 1px solid rgba(220, 38, 38, 0.2);
  cursor: pointer;
  transition: all 0.15s ease;
}
.apple-sch-clear-pill:hover {
  background: #dc2626;
  color: #ffffff;
  border-color: #dc2626;
}

.apple-direct-schedule-list {
  display: flex;
  flex-direction: column;
  background: var(--surface, #f8f9fa);
  border: 1px solid var(--line, #e2e8f0);
  border-radius: 12px;
  overflow: hidden;
}
body.dark-mode .apple-direct-schedule-list {
  background: #1b202c;
  border-color: rgba(255, 255, 255, 0.06);
}
.ads-day-row {
  display: grid;
  grid-template-columns: 135px 1fr 185px;
  align-items: center;
  gap: 12px;
  padding: 6px 12px;
  border-bottom: 1px solid var(--line, #f1f3f5);
  transition: all 0.15s ease;
}
.ads-day-row:last-child {
  border-bottom: none;
}
body.dark-mode .ads-day-row {
  border-bottom-color: rgba(255, 255, 255, 0.05);
}
.ads-day-row.is-active-day {
  background: rgba(164, 91, 70, 0.05);
}
body.dark-mode .ads-day-row.is-active-day {
  background: rgba(164, 91, 70, 0.12);
}
.ads-day-left {
  display: flex;
  align-items: center;
  gap: 9px;
}
.ads-day-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 26px;
  height: 26px;
  border-radius: 6px;
  background: var(--card, #fff);
  border: 1px solid var(--line, #e2e8f0);
  font-size: 11px;
  font-weight: 850;
  color: var(--muted);
  box-shadow: 0 1px 2px rgba(0,0,0,0.03);
}
.ads-day-badge.active {
  background: var(--accent, #a45b46) !important;
  border-color: var(--accent, #a45b46) !important;
  color: #ffffff !important;
}
body.dark-mode .ads-day-badge {
  background: #202635;
  border-color: rgba(255, 255, 255, 0.08);
  color: var(--muted);
}
.ads-day-name {
  font-size: 13px;
  font-weight: 650;
  color: var(--muted);
}
.ads-day-name.active-name {
  font-weight: 800;
  color: var(--text);
}
.ads-day-slots {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
  min-width: 0;
}
.ads-empty-hint {
  font-size: 12px;
  color: var(--muted);
  opacity: 0.5;
}
.ads-time-action {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 6px;
}
.ads-time-input {
  height: 28px;
  width: 95px;
  min-width: 95px;
  font-size: 12px;
  font-weight: 750;
  border: 1px solid var(--line, #cbd5e1);
  border-radius: 7px;
  padding: 0 4px 0 6px;
  background: var(--card, #fff);
  color: var(--text);
  outline: none;
  font-family: inherit;
}
body.dark-mode .ads-time-input {
  background: #202635;
  border-color: rgba(255, 255, 255, 0.1);
  color: #fff;
}
.ads-add-btn {
  height: 28px !important;
  padding: 0 11px !important;
  font-size: 11.5px !important;
  font-weight: 750 !important;
  border-radius: 7px !important;
  white-space: nowrap !important;
  background: var(--accent, #a45b46) !important;
  color: #ffffff !important;
  border: none !important;
  cursor: pointer !important;
  transition: all 0.15s ease !important;
}
.ads-add-btn:hover {
  filter: brightness(1.08);
  transform: translateY(-1px);
}
.std-sch-del-btn {
  width: 16px;
  height: 16px;
  min-width: 16px;
  border-radius: 50%;
  border: none;
  background: rgba(220, 38, 38, 0.12);
  color: #dc2626;
  cursor: pointer;
  font-size: 10px;
  font-weight: 850;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  margin-left: 4px;
  transition: all 0.15s ease;
  line-height: 1;
}
.std-sch-del-btn:hover {
  background: #dc2626;
  color: #ffffff;
  transform: scale(1.15);
}
body.dark-mode .std-sch-del-btn {
  background: rgba(248, 113, 113, 0.2);
  color: #f87171;
}
body.dark-mode .std-sch-del-btn:hover {
  background: #ef4444;
  color: #ffffff;
}

.apple-sch-presets-strip {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 10px;
  flex-wrap: wrap;
  padding-top: 4px;
}
.asps-label {
  font-size: 11.5px;
  font-weight: 650;
  color: var(--muted);
}
.asps-chip {
  height: 25px;
  padding: 0 9px;
  border-radius: 6px;
  font-size: 11px;
  font-weight: 700;
  background: var(--surface, #f8f9fa);
  border: 1px solid var(--line, #cbd5e1);
  color: var(--text);
  cursor: pointer;
  transition: all 0.15s ease;
}
.asps-chip:hover {
  background: var(--accent, #a45b46);
  color: #ffffff;
  border-color: var(--accent, #a45b46);
  transform: translateY(-1px);
}
body.dark-mode .asps-chip {
  background: #1b202c;
  border-color: rgba(255, 255, 255, 0.1);
  color: #e2e8f0;
}

/* =========================================================
   APPLE TIMELINE (TAB 2: ЗАНЯТТЯ - DESKTOP)
   ========================================================= */
.apple-lessons-kpi-row {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}
.alk-pill {
  font-size: 11.5px;
  font-weight: 750;
  padding: 3px 9px;
  border-radius: 7px;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}
.alk-pill.done {
  background: rgba(34, 197, 94, 0.1);
  color: #16a34a;
  border: 1px solid rgba(34, 197, 94, 0.22);
}
.alk-pill.cancelled {
  background: rgba(148, 163, 184, 0.15);
  color: #64748b;
  border: 1px solid rgba(148, 163, 184, 0.25);
}
.alk-pill.debt {
  background: rgba(239, 68, 68, 0.1);
  color: #dc2626;
  border: 1px solid rgba(239, 68, 68, 0.22);
}
body.dark-mode .alk-pill.done {
  background: rgba(34, 197, 94, 0.2);
  color: #4ade80;
}
body.dark-mode .alk-pill.cancelled {
  background: rgba(148, 163, 184, 0.25);
  color: #cbd5e1;
}
body.dark-mode .alk-pill.debt {
  background: rgba(239, 68, 68, 0.2);
  color: #f87171;
}

/* Unified Apple Empty State Box */
.apple-empty-state-box {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 32px 16px;
  background: rgba(0, 0, 0, 0.015);
  border: 1px dashed var(--line, #cbd5e1);
  border-radius: 12px;
  margin: 4px 0;
}
body.dark-mode .apple-empty-state-box {
  background: rgba(255, 255, 255, 0.02);
  border-color: rgba(255, 255, 255, 0.08);
}
.aesb-icon {
  font-size: 32px;
  margin-bottom: 8px;
  line-height: 1;
}
.aesb-title {
  font-size: 14px;
  font-weight: 800;
  color: var(--text);
  margin-bottom: 3px;
}
.aesb-subtitle {
  font-size: 12px;
  color: var(--muted);
  max-width: 320px;
  line-height: 1.4;
}

.apple-timeline-list {
  display: flex;
  flex-direction: column;
  gap: 7px;
  max-height: 420px;
  overflow-y: auto;
  padding-right: 2px;
}
.apple-timeline-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  background: var(--surface, #f8f9fa);
  border: 1px solid var(--line, #e2e8f0);
  border-radius: 11px;
  padding: 9px 14px;
  transition: all 0.15s ease;
  cursor: pointer;
}
.apple-timeline-row:hover {
  background: var(--surface-2, #f1f3f6);
  border-color: #cbd5e1;
  transform: translateY(-1px);
}
body.dark-mode .apple-timeline-row {
  background: #181d28;
  border-color: rgba(255, 255, 255, 0.06);
}
body.dark-mode .apple-timeline-row:hover {
  background: #22293a;
}
.atr-left {
  display: flex;
  align-items: center;
  gap: 14px;
  min-width: 0;
  flex: 1;
}
.atr-date-badge {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 100px;
}
.atr-day {
  font-size: 13.5px;
  font-weight: 800;
  color: var(--text);
  letter-spacing: -0.2px;
}
.atr-time {
  font-size: 11.5px;
  font-weight: 600;
  color: var(--muted);
}
.atr-info {
  display: flex;
  flex-direction: column;
  gap: 3px;
  min-width: 0;
  flex: 1;
}
.atr-main-line {
  display: flex;
  align-items: center;
  gap: 7px;
  flex-wrap: wrap;
}
.atr-topic {
  font-size: 13px;
  font-weight: 750;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.atr-reason {
  font-size: 11.5px;
  color: #dc2626;
  font-weight: 650;
}
.atr-right {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}
.apple-status-chip {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 9px;
  border-radius: 7px;
  font-size: 12px;
  font-weight: 750;
  white-space: nowrap;
}
.apple-status-chip.chip-done {
  background: rgba(34, 197, 94, 0.1);
  color: #16a34a;
  border: 1px solid rgba(34, 197, 94, 0.25);
}
.apple-status-chip.chip-rescheduled {
  background: rgba(59, 130, 246, 0.1);
  color: #2563eb;
  border: 1px solid rgba(59, 130, 246, 0.25);
}
.apple-status-chip.chip-cancelled {
  background: rgba(148, 163, 184, 0.15);
  color: #64748b;
  border: 1px solid rgba(148, 163, 184, 0.3);
}
.apple-status-chip.chip-charged {
  background: rgba(245, 158, 11, 0.12);
  color: #d97706;
  border: 1px solid rgba(245, 158, 11, 0.25);
}
.apple-status-chip.chip-debt {
  background: rgba(239, 68, 68, 0.12);
  color: #dc2626;
  border: 1px solid rgba(239, 68, 68, 0.25);
}
.atr-chevron {
  font-size: 16px;
  font-weight: 800;
  color: var(--muted);
  opacity: 0.6;
}

/* =========================================================
   APPLE WALLET PAYMENTS (TAB 3: ОПЛАТИ - DESKTOP)
   ========================================================= */
.apple-payments-feed {
  display: flex;
  flex-direction: column;
  gap: 7px;
  max-height: 420px;
  overflow-y: auto;
  padding-right: 2px;
}
.apple-payment-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  background: var(--surface, #f8f9fa);
  border: 1px solid var(--line, #e2e8f0);
  border-radius: 11px;
  padding: 8px 14px;
  transition: all 0.15s ease;
}
.apple-payment-row:hover {
  background: var(--surface-2, #f1f3f6);
  border-color: #cbd5e1;
}
body.dark-mode .apple-payment-row {
  background: #181d28;
  border-color: rgba(255, 255, 255, 0.06);
}
body.dark-mode .apple-payment-row:hover {
  background: #22293a;
}
.apr-left {
  display: flex;
  align-items: center;
  gap: 12px;
}
.apr-icon-wrap {
  width: 34px;
  height: 34px;
  border-radius: 10px;
  background: rgba(34, 197, 94, 0.1);
  border: 1px solid rgba(34, 197, 94, 0.25);
  font-size: 16px;
  display: grid;
  place-items: center;
}
.apr-info {
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.apr-title-row {
  display: flex;
  align-items: center;
  gap: 8px;
}
.apr-date {
  font-size: 13.5px;
  font-weight: 800;
  color: var(--text);
}
.apr-badge {
  font-size: 11px;
  font-weight: 750;
  padding: 2px 7px;
  border-radius: 6px;
  background: rgba(0, 0, 0, 0.05);
  color: var(--muted);
}
body.dark-mode .apr-badge {
  background: rgba(255, 255, 255, 0.08);
}
.apr-rate {
  font-size: 11.5px;
  color: var(--muted);
  font-weight: 550;
}
.apr-right {
  display: flex;
  align-items: center;
  gap: 12px;
}
.apr-amount {
  font-size: 15px;
  font-weight: 850;
  color: #16a34a;
  letter-spacing: -0.2px;
}
body.dark-mode .apr-amount {
  color: #4ade80;
}
.apr-del-btn {
  border: none;
  background: transparent;
  cursor: pointer;
  opacity: 0.4;
  transition: opacity 0.15s ease, transform 0.15s ease;
  padding: 4px;
  font-size: 14px;
}
.apr-del-btn:hover {
  opacity: 1;
  transform: scale(1.15);
}

/* =========================================================
   APPLE RICH LINKS (TAB 4: ПОСИЛАННЯ - DESKTOP)
   ========================================================= */
.apple-sch-edit-pill {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  height: 27px;
  padding: 0 11px;
  border-radius: 7px;
  font-size: 11.5px;
  font-weight: 750;
  background: var(--surface, #f8f9fa);
  border: 1px solid var(--line, #cbd5e1);
  color: var(--text);
  cursor: pointer;
  transition: all 0.15s ease;
}
.apple-sch-edit-pill:hover {
  background: var(--accent, #a45b46);
  color: #ffffff;
  border-color: var(--accent, #a45b46);
  transform: translateY(-1px);
}
body.dark-mode .apple-sch-edit-pill {
  background: #202635;
  border-color: rgba(255, 255, 255, 0.1);
  color: #fff;
}

.apple-links-feed {
  display: flex;
  flex-direction: column;
  gap: 7px;
  max-height: 420px;
  overflow-y: auto;
  padding-right: 2px;
}
.apple-link-rich-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  background: var(--surface, #f8f9fa);
  border: 1px solid var(--line, #e2e8f0);
  border-radius: 11px;
  padding: 8px 12px;
  transition: all 0.15s ease;
}
.apple-link-rich-card:hover {
  background: var(--surface-2, #f1f3f6);
  border-color: #cbd5e1;
  transform: translateY(-1px);
}
body.dark-mode .apple-link-rich-card {
  background: #181d28;
  border-color: rgba(255, 255, 255, 0.06);
}
body.dark-mode .apple-link-rich-card:hover {
  background: #22293a;
}
.apple-link-rich-card.group-inherited {
  border-left: 3px solid var(--accent, #a45b46);
}
body.dark-mode .apple-link-rich-card.group-inherited {
  border-left-color: var(--accent, #a45b46);
}

.alrc-icon-wrap {
  width: 32px;
  height: 32px;
  min-width: 32px;
  border-radius: 8px;
  background: var(--card, #fff);
  border: 1px solid var(--line, #e2e8f0);
  font-size: 15px;
  display: grid;
  place-items: center;
  flex-shrink: 0;
}
body.dark-mode .alrc-icon-wrap {
  background: #202635;
  border-color: rgba(255, 255, 255, 0.08);
}
.alrc-info {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
  flex: 1;
}
.alrc-title-row {
  display: flex;
  align-items: center;
  gap: 7px;
  flex-wrap: wrap;
}
.alrc-title {
  font-size: 13px;
  font-weight: 750;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.alrc-group-badge {
  font-size: 10.5px;
  font-weight: 650;
  color: var(--muted);
  background: var(--surface-2, #f1f3f5);
  border: 1px solid var(--line, #e2e8f0);
  padding: 1px 6px;
  border-radius: 5px;
  white-space: nowrap;
}
body.dark-mode .alrc-group-badge {
  background: #202635;
  border-color: rgba(255, 255, 255, 0.08);
}
.alrc-url {
  font-size: 11.5px;
  color: var(--muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 320px;
}
.alrc-actions {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
}
.alrc-open-pill {
  height: 27px;
  padding: 0 10px;
  font-size: 11.5px;
  font-weight: 750;
  border-radius: 7px;
  background: var(--accent-soft, #f3e7e2);
  color: var(--accent, #a45b46);
  border: 1px solid rgba(164, 91, 70, 0.25);
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  cursor: pointer;
  transition: all 0.15s ease;
  white-space: nowrap;
}
.alrc-open-pill:hover {
  background: var(--accent, #a45b46);
  color: #ffffff;
  border-color: var(--accent, #a45b46);
  transform: translateY(-1px);
}
body.dark-mode .alrc-open-pill {
  background: rgba(164, 91, 70, 0.15);
  border-color: rgba(164, 91, 70, 0.3);
  color: #ff9e87;
}
body.dark-mode .alrc-open-pill:hover {
  background: var(--accent, #a45b46);
  color: #ffffff;
}

.alrc-group-pill {
  height: 27px;
  padding: 0 9px;
  font-size: 11.5px;
  font-weight: 700;
  border-radius: 7px;
  background: var(--card, #fff);
  border: 1px solid var(--line, #cbd5e1);
  color: var(--text);
  cursor: pointer;
  transition: all 0.15s ease;
  white-space: nowrap;
}
.alrc-group-pill:hover {
  background: var(--surface-2, #f1f3f6);
  border-color: #94a3b8;
  transform: translateY(-1px);
}
body.dark-mode .alrc-group-pill {
  background: #202635;
  border-color: rgba(255, 255, 255, 0.1);
  color: #e2e8f0;
}

.alrc-del-btn {
  width: 26px;
  height: 26px;
  border-radius: 6px;
  border: none;
  background: transparent;
  cursor: pointer;
  opacity: 0.5;
  transition: all 0.15s ease;
  font-size: 13px;
  display: grid;
  place-items: center;
  padding: 0;
}
.alrc-del-btn:hover {
  opacity: 1;
  background: rgba(220, 38, 38, 0.1);
  color: #dc2626;
  transform: scale(1.1);
}

.apple-empty-links-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 4px;
  padding: 24px 16px;
  background: var(--surface, #f8f9fa);
  border: 1px dashed var(--line, #cbd5e1);
  border-radius: 11px;
}
body.dark-mode .apple-empty-links-card {
  background: #181d28;
  border-color: rgba(255, 255, 255, 0.1);
}
.aelc-icon {
  font-size: 24px;
  margin-bottom: 2px;
}
.aelc-title {
  font-size: 13.5px;
  font-weight: 800;
  color: var(--text);
}
.aelc-subtitle {
  font-size: 12px;
  color: var(--muted);
  max-width: 360px;
  margin-bottom: 8px;
}

/* =========================================================
   APPLE GROUP BENTO MODAL (MEMBERS & STATUS)
   ========================================================= */
.acw-bottom-status-strip {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 12px;
  background: var(--surface-2, #f1f3f6);
  border-radius: 9px;
  border: 1px solid var(--line, #e2e8f0);
  margin-top: 10px;
}
body.dark-mode .acw-bottom-status-strip {
  background: #181d28;
  border-color: rgba(255, 255, 255, 0.06);
}

.apple-group-members-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
  max-height: 380px;
  overflow-y: auto;
  padding-right: 2px;
}
.apple-member-card-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 8px 12px;
  background: var(--surface, #f8f9fa);
  border: 1px solid var(--line, #e2e8f0);
  border-radius: 10px;
  transition: all 0.15s ease;
}
.apple-member-card-row:hover {
  background: var(--surface-2, #f1f3f6);
  border-color: #cbd5e1;
}
body.dark-mode .apple-member-card-row {
  background: #181d28;
  border-color: rgba(255, 255, 255, 0.06);
}
body.dark-mode .apple-member-card-row:hover {
  background: #22293a;
}
.amcr-left {
  display: flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  min-width: 0;
  flex: 1;
}
.amcr-info {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}
.amcr-name-row {
  display: flex;
  align-items: center;
  gap: 7px;
}
.amcr-name {
  font-size: 13px;
  font-weight: 750;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.amcr-sub {
  font-size: 11px;
  color: var(--muted);
  font-weight: 550;
}
.amcr-actions {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
}
.apple-add-first-link-btn {
  height: 28px;
  padding: 0 12px;
  font-size: 11.5px;
  font-weight: 750;
  border-radius: 7px;
  background: var(--accent, #a45b46);
  color: #ffffff;
  border: none;
  cursor: pointer;
  transition: all 0.15s ease;
}
.apple-add-first-link-btn:hover {
  filter: brightness(1.08);
  transform: translateY(-1px);
}

.apple-group-links-section {
  margin-top: 14px;
}
.agls-header {
  font-size: 11.5px;
  font-weight: 750;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.3px;
  margin-bottom: 8px;
}

/* Password & PIN Visibility Toggle Field */
.password-toggle-field {
  position: relative;
  display: flex;
  align-items: center;
  width: 100%;
}
.password-toggle-field input {
  width: 100%;
  padding-right: 36px !important;
  font-family: inherit;
  font-size: 13.5px;
  font-weight: 650;
}
.btn-toggle-eye {
  position: absolute;
  right: 6px;
  top: 50%;
  transform: translateY(-50%);
  background: transparent;
  border: none;
  cursor: pointer;
  font-size: 15px;
  padding: 4px;
  display: grid;
  place-items: center;
  border-radius: 6px;
  transition: all 0.15s;
  color: var(--muted);
}
.btn-toggle-eye:hover {
  background: var(--surface-2, #e2e8f0);
}

/* Persistent Modal Shell (Eliminates Height Jumping across Subtabs) */
.modal:has(.student-clean-modal-head),
.modal:has(.apple-student-modal-head) {
  min-height: 500px !important;
  max-height: 86vh !important;
  display: flex !important;
  flex-direction: column !important;
  width: min(720px, 94vw) !important;
}
.student-tab-content-wrap {
  flex: 1 !important;
  min-height: 320px !important;
  overflow-y: auto !important;
  display: flex !important;
  flex-direction: column !important;
}
.student-profile-grid {
  flex: 1;
}

/* Finances Toolbar Alignment */
.fin-toolbar-actions {
  display: flex !important;
  align-items: center !important;
  gap: 5px !important;
  flex-wrap: nowrap !important;
  flex-shrink: 0 !important;
}
.fin-toolbar-actions .btn {
  height: 28px !important;
  min-height: 28px !important;
  padding: 0 8px !important;
  font-size: 11.5px !important;
  font-weight: 750 !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  white-space: nowrap !important;
  border-radius: 7px !important;
  flex-shrink: 0 !important;
}
.fin-toolbar-actions .btn.icon-btn {
  width: 28px !important;
  min-width: 28px !important;
  padding: 0 !important;
}
.btn-danger-soft {
  color: #dc2626 !important;
  background: rgba(220, 38, 38, 0.08) !important;
  border-color: rgba(220, 38, 38, 0.2) !important;
}
.btn-danger-soft:hover {
  background: rgba(220, 38, 38, 0.15) !important;
}

@media (max-width: 420px) {
  .premium-kpis, .stats {
    grid-template-columns: 1fr !important;
  }
  .voca-keypad-btn {
    height: 54px !important;
    width: 54px !important;
  }
  .voca-kp-num {
    font-size: 20px !important;
  }
}

/* Student Modal & Profile Mobile Overhaul */
@media (max-width: 768px) {
  .modal:has(.student-clean-modal-head) {
    width: 100% !important;
    min-height: auto !important;
    max-height: 90vh !important;
    max-height: 90dvh !important;
    border-radius: 20px 20px 0 0 !important;
    padding: 14px 14px calc(14px + env(safe-area-inset-bottom, 0px)) !important;
    display: flex !important;
    flex-direction: column !important;
    overflow: hidden !important;
  }
  .student-clean-modal-head {
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    flex-wrap: nowrap !important;
    width: 100% !important;
    gap: 8px !important;
    margin-bottom: 6px !important;
    padding-bottom: 6px !important;
    border-bottom: 1px solid var(--line) !important;
  }
  .scmh-user {
    display: flex !important;
    align-items: center !important;
    gap: 8px !important;
    flex: 1 1 auto !important;
    min-width: 0 !important;
    overflow: hidden !important;
  }
  .scmh-titles {
    display: flex !important;
    flex-direction: column !important;
    gap: 2px !important;
    min-width: 0 !important;
    overflow: hidden !important;
  }
  .scmh-name-row {
    display: flex !important;
    align-items: center !important;
    gap: 6px !important;
    min-width: 0 !important;
  }
  .scmh-name {
    font-size: 15.5px !important;
    font-weight: 800 !important;
    white-space: nowrap !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
  }
  .scmh-tags-row {
    display: flex !important;
    align-items: center !important;
    gap: 4px !important;
    flex-wrap: nowrap !important;
    overflow: hidden !important;
  }
  .modal-clean-close-btn {
    width: 30px !important;
    height: 30px !important;
    border-radius: 50% !important;
    flex-shrink: 0 !important;
    background: var(--surface-2, #f1f5f9) !important;
    border: 1px solid var(--line, #e2e8f0) !important;
    display: grid !important;
    place-items: center !important;
    font-size: 14px !important;
    line-height: 1 !important;
    padding: 0 !important;
    margin: 0 !important;
    cursor: pointer !important;
  }
  .scmh-actions-bar {
    display: flex !important;
    align-items: center !important;
    gap: 5px !important;
    margin: 4px 0 8px !important;
    width: 100% !important;
    flex-wrap: nowrap !important;
    overflow-x: auto !important;
    -webkit-overflow-scrolling: touch !important;
    scrollbar-width: none !important;
  }
  .scmh-actions-bar::-webkit-scrollbar {
    display: none !important;
  }
  .scmh-actions-bar .btn {
    height: 28px !important;
    min-height: 28px !important;
    padding: 0 9px !important;
    font-size: 11.5px !important;
    font-weight: 700 !important;
    border-radius: 8px !important;
    white-space: nowrap !important;
    flex-shrink: 0 !important;
  }
  .modal:has(.student-clean-modal-head) .tabs {
    display: flex !important;
    align-items: center !important;
    gap: 3px !important;
    margin-bottom: 8px !important;
    padding-bottom: 0 !important;
    border-bottom: 1px solid var(--line) !important;
    overflow-x: auto !important;
    white-space: nowrap !important;
    -webkit-overflow-scrolling: touch !important;
    scrollbar-width: none !important;
    flex-shrink: 0 !important;
  }
  .modal:has(.student-clean-modal-head) .tabs::-webkit-scrollbar {
    display: none !important;
  }
  .modal:has(.student-clean-modal-head) .tab {
    padding: 5px 9px !important;
    font-size: 12px !important;
    font-weight: 650 !important;
    border-bottom: 2px solid transparent !important;
  }
  .modal:has(.student-clean-modal-head) .tab.active {
    color: var(--accent) !important;
    border-bottom: 2px solid var(--accent) !important;
    font-weight: 750 !important;
  }
  .student-tab-content-wrap {
    flex: 1 1 auto !important;
    min-height: 0 !important;
    overflow-y: auto !important;
    -webkit-overflow-scrolling: touch !important;
    display: flex !important;
    flex-direction: column !important;
    gap: 8px !important;
    padding-bottom: 8px !important;
  }
  .student-card-section {
    padding: 10px 12px !important;
    border-radius: 12px !important;
    border: 1px solid var(--line) !important;
    background: var(--card, #fff) !important;
    margin: 0 !important;
  }
  .student-card-section .section-title {
    font-size: 12px !important;
    font-weight: 800 !important;
    margin-bottom: 5px !important;
    color: var(--text) !important;
  }
  .student-contact-grid-modern {
    display: grid !important;
    grid-template-columns: 1fr 1fr !important;
    gap: 6px !important;
  }
  .contact-item {
    padding: 6px 8px !important;
    background: var(--surface-2, #f8fafc) !important;
    border-radius: 8px !important;
    display: flex !important;
    flex-direction: column !important;
    gap: 1px !important;
  }
  .ci-label {
    font-size: 9.5px !important;
    font-weight: 700 !important;
    color: var(--muted) !important;
    text-transform: uppercase !important;
    letter-spacing: 0.2px !important;
  }
  .ci-val {
    font-size: 12px !important;
    font-weight: 650 !important;
    color: var(--text) !important;
    white-space: nowrap !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
  }
  .ci-val a {
    color: var(--accent) !important;
    text-decoration: none !important;
    font-weight: 700 !important;
  }
  .package-compact-head {
    display: flex !important;
    justify-content: space-between !important;
    align-items: center !important;
  }
  .package-main strong {
    font-size: 20px !important;
    font-weight: 850 !important;
  }
  .package-progress {
    height: 6px !important;
    background: var(--surface-2, #f1f5f9) !important;
    border-radius: 999px !important;
    overflow: hidden !important;
    margin: 6px 0 !important;
  }
  .package-details {
    display: grid !important;
    grid-template-columns: repeat(3, 1fr) !important;
    gap: 5px !important;
  }
  .package-details > div {
    padding: 5px 6px !important;
    background: var(--surface-2, #f8fafc) !important;
    border-radius: 8px !important;
    text-align: center !important;
  }
  .package-details span {
    font-size: 9.5px !important;
    color: var(--muted) !important;
    display: block !important;
  }
  .package-details strong {
    font-size: 12px !important;
    font-weight: 800 !important;
  }
  .section-head-with-action {
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    margin-bottom: 4px !important;
  }
  .section-head-with-action .btn.tiny {
    height: 22px !important;
    padding: 0 6px !important;
    font-size: 10.5px !important;
    font-weight: 700 !important;
    border-radius: 6px !important;
  }
  .student-quick-fin-row {
    display: flex !important;
    justify-content: space-between !important;
    align-items: center !important;
    margin-top: 6px !important;
    padding-top: 6px !important;
    border-top: 1px dashed var(--line) !important;
    font-size: 11.5px !important;
    color: var(--muted) !important;
  }
  .student-location-pill {
    display: inline-flex !important;
    align-items: center !important;
    font-size: 10px !important;
    font-weight: 700 !important;
    padding: 1px 6px !important;
    border-radius: 6px !important;
    background: var(--surface-2, #f1f5f9) !important;
    color: var(--text) !important;
  }
}

/* Student History Lessons List & Cards */
.std-history-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
  width: 100%;
}
.std-history-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 9px 12px;
  background: var(--card, #fff);
  border: 1px solid var(--line, #e2e8f0);
  border-radius: 10px;
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s;
  box-sizing: border-box;
}
.std-history-card:hover {
  background: var(--surface-2, #f8fafc);
  border-color: var(--border-hover, #cbd5e1);
}
.shc-left {
  display: flex;
  flex-direction: column;
  gap: 3px;
  flex: 1;
  min-width: 0;
}
.shc-date-time-row {
  display: flex;
  align-items: center;
  gap: 6px;
}
.shc-date {
  font-size: 13px;
  font-weight: 800;
  color: var(--text);
  white-space: nowrap;
}
.shc-dot-sep {
  color: var(--muted);
  font-size: 11px;
}
.shc-time {
  font-size: 12px;
  color: var(--muted);
  font-weight: 650;
  white-space: nowrap;
}
.shc-meta-row {
  display: flex;
  align-items: center;
  gap: 6px;
  overflow: hidden;
}
.shc-loc-pill {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  font-size: 10px;
  font-weight: 700;
  padding: 1px 5px;
  border-radius: 4px;
  background: var(--surface-2, #f1f5f9);
  color: var(--muted);
  flex-shrink: 0;
}
.shc-topic {
  font-size: 11px;
  color: var(--muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.shc-reason {
  font-size: 10.5px;
  color: #dc2626;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  font-weight: 600;
}
.shc-right {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}
.shc-status-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 11px;
  font-weight: 750;
  padding: 3px 8px;
  border-radius: 6px;
  white-space: nowrap;
}
.shc-status-badge.status-done {
  background: rgba(22, 163, 74, 0.10);
  color: #16a34a;
}
.shc-status-badge.status-debt {
  background: rgba(220, 38, 38, 0.10);
  color: #dc2626;
}
.shc-status-badge.status-cancelled {
  background: rgba(148, 163, 184, 0.14);
  color: #64748b;
}
.shc-status-badge.status-charged {
  background: rgba(220, 38, 38, 0.08);
  color: #dc2626;
}
.shc-arrow {
  font-size: 15px;
  color: var(--muted);
  flex-shrink: 0;
  font-weight: 700;
}

/* Student Payments List & Cards */
.std-payments-top-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 8px;
}
.sp-total-pill {
  font-size: 12px;
  color: var(--text);
}
.sp-total-pill strong {
  font-size: 13px;
  color: #16a34a;
}
.sp-add-btn {
  height: 28px !important;
  min-height: 28px !important;
  padding: 0 10px !important;
  font-size: 11.5px !important;
  font-weight: 700 !important;
  border-radius: 8px !important;
}
.std-payments-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
  width: 100%;
}
.std-payment-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 8px 12px;
  background: var(--card, #fff);
  border: 1px solid var(--line, #e2e8f0);
  border-radius: 10px;
  box-sizing: border-box;
}
.spc-left {
  display: flex;
  flex-direction: column;
  gap: 1px;
  min-width: 0;
}
.spc-date {
  font-size: 12px;
  font-weight: 750;
  color: var(--text);
}
.spc-meta {
  font-size: 11px;
  color: var(--muted);
}
.spc-right {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}
.spc-amount {
  font-size: 13px;
  font-weight: 800;
  color: #16a34a;
}
.spc-del-btn {
  background: transparent;
  border: none;
  cursor: pointer;
  font-size: 13px;
  padding: 2px 4px;
  border-radius: 6px;
  opacity: 0.7;
  transition: opacity 0.15s;
}
.spc-del-btn:hover {
  opacity: 1;
}

body.dark-mode .std-history-card,
body.dark-mode .std-payment-card {
  background: var(--surface);
  border-color: var(--line);
}
body.dark-mode .std-history-card:hover {
  background: var(--surface-2);
}

/* Clean Lesson Details Modal Overhaul */
.lesson-clean-modal-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 10px;
  margin-bottom: 8px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--line);
}
.lcmh-left {
  display: flex;
  flex-direction: column;
  gap: 3px;
  flex: 1;
  min-width: 0;
}
.lcmh-title {
  font-size: 17px;
  font-weight: 800;
  color: var(--text);
  line-height: 1.25;
}
.lcmh-meta {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
  font-size: 11.5px;
  color: var(--muted);
  font-weight: 600;
}
.lcmh-actions-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  margin-bottom: 8px;
  width: 100%;
}
.lcmh-main-actions {
  display: flex;
  align-items: center;
  gap: 5px;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  flex: 1;
}
.lcmh-main-actions::-webkit-scrollbar {
  display: none;
}
.lcmh-main-actions .btn {
  height: 28px !important;
  min-height: 28px !important;
  padding: 0 10px !important;
  font-size: 11.5px !important;
  font-weight: 700 !important;
  border-radius: 8px !important;
  white-space: nowrap !important;
  flex-shrink: 0;
}
.lcmh-del-btn {
  margin-left: auto !important;
  flex-shrink: 0 !important;
  background: rgba(220, 38, 38, 0.08) !important;
  color: #dc2626 !important;
  border: 1px solid rgba(220, 38, 38, 0.22) !important;
  border-radius: 8px !important;
  width: 32px !important;
  height: 28px !important;
  display: grid !important;
  place-items: center !important;
  font-size: 13px !important;
  padding: 0 !important;
  cursor: pointer !important;
  transition: all 0.15s ease !important;
}
.lcmh-del-btn:hover {
  background: rgba(220, 38, 38, 0.18) !important;
  border-color: rgba(220, 38, 38, 0.4) !important;
}
.lesson-materials-bar {
  display: flex;
  align-items: center;
  gap: 5px;
  margin-bottom: 8px;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  padding-bottom: 2px;
}
.lesson-materials-bar::-webkit-scrollbar {
  display: none;
}
.lesson-materials-bar .btn-materials {
  height: 26px !important;
  min-height: 26px !important;
  padding: 0 9px !important;
  font-size: 11px !important;
  font-weight: 700 !important;
  border-radius: 7px !important;
  background: var(--surface-2, #f1f5f9) !important;
  border: 1px solid var(--line, #e2e8f0) !important;
  color: var(--accent) !important;
  white-space: nowrap !important;
  text-decoration: none !important;
  flex-shrink: 0;
}
.lesson-topic-bar {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 6px 10px;
  background: var(--surface-2, #f8fafc);
  border: 1px solid var(--line, #e2e8f0);
  border-radius: 10px;
  margin-bottom: 10px;
}
.topic-bar-icon {
  font-size: 13px;
  opacity: 0.8;
  flex-shrink: 0;
}
.topic-bar-input {
  flex: 1;
  border: none;
  background: transparent;
  font-family: inherit;
  font-size: 12px;
  font-weight: 600;
  color: var(--text);
  outline: none;
}
.btn-topic-save {
  background: transparent;
  border: none;
  cursor: pointer;
  font-size: 13px;
  padding: 2px;
  opacity: 0.8;
}

/* Participant Cards Modern */
.lesson-participants-wrap {
  display: flex;
  flex-direction: column;
  gap: 8px;
  width: 100%;
}
.lesson-participant-card {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 10px 12px;
  background: var(--card, #fff);
  border: 1px solid var(--line, #e2e8f0);
  border-radius: 12px;
  box-sizing: border-box;
}
.lesson-participant-card.is-completed {
  border-left: 3px solid #16a34a;
  opacity: 0.85;
}
.lesson-participant-card.is-cancelled {
  border-left: 3px solid #94a3b8;
  opacity: 0.75;
}
.lesson-participant-card.is-cancelled.is-deducted,
.lesson-participant-card.is-cancelled-charged {
  border-left: 3px solid #dc2626;
  opacity: 0.9;
}
.lesson-participant-card.is-rescheduled {
  border-left: 3px solid #94a3b8;
  opacity: 0.75;
}
.lpc-top-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}
.lpc-user-info {
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  flex: 1;
  min-width: 0;
}
.lpc-names {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}
.lpc-student-name {
  font-size: 14px;
  font-weight: 800;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.lpc-badges-row {
  display: flex;
  align-items: center;
  gap: 5px;
  flex-wrap: wrap;
}
.lpc-status-tag {
  font-size: 10px;
  font-weight: 750;
  padding: 1px 6px;
  border-radius: 5px;
  white-space: nowrap;
}
.status-badge-done,
.status-badge-debt,
.status-badge-scheduled,
.status-badge-rescheduled,
.status-badge-cancelled,
.status-badge-charged {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 2px 7px;
  border-radius: 6px;
  font-size: 11px;
  font-weight: 750;
  line-height: 1.2;
  white-space: nowrap;
}
.status-badge-done.mini,
.status-badge-debt.mini,
.status-badge-scheduled.mini,
.status-badge-rescheduled.mini,
.status-badge-cancelled.mini,
.status-badge-charged.mini {
  padding: 1.5px 6px;
  font-size: 10.5px;
  border-radius: 5px;
}
.status-badge-done {
  background: rgba(22, 163, 74, 0.10);
  color: #16a34a;
}
.status-badge-debt {
  background: rgba(220, 38, 38, 0.10);
  color: #dc2626;
}
.status-badge-scheduled {
  background: rgba(59, 130, 246, 0.08);
  color: #2563eb;
}
.status-badge-rescheduled {
  background: rgba(148, 163, 184, 0.14);
  color: #64748b;
}
.status-badge-cancelled {
  background: rgba(148, 163, 184, 0.14);
  color: #64748b;
}
.status-badge-charged {
  background: rgba(220, 38, 38, 0.08);
  color: #dc2626;
}
.std-bal-pill {
  font-size: 10px;
  font-weight: 750;
  padding: 1px 6px;
  border-radius: 5px;
  white-space: nowrap;
}
.std-bal-pill.ok {
  background: rgba(22, 163, 74, 0.08);
  color: #16a34a;
}
.std-bal-pill.warn {
  background: rgba(234, 179, 8, 0.12);
  color: #ca8a04;
}
.std-bal-pill.neg {
  background: rgba(220, 38, 38, 0.08);
  color: #dc2626;
}
.lesson-reason-text {
  font-size: 11px;
  color: var(--muted, #64748b);
  font-weight: 600;
}
.lpc-actions-toolbar {
  display: flex;
  align-items: center;
  gap: 5px;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  padding-top: 6px;
  border-top: 1px dashed var(--line);
}
.lpc-actions-toolbar::-webkit-scrollbar {
  display: none;
}
.lpc-action-btn {
  height: 26px !important;
  min-height: 26px !important;
  padding: 0 8px !important;
  font-size: 11px !important;
  font-weight: 700 !important;
  border-radius: 7px !important;
  white-space: nowrap !important;
  flex-shrink: 0;
}

body.dark-mode .lesson-participant-card {
  background: #151923;
  border-color: var(--line);
}
body.dark-mode .lesson-topic-bar {
  background: #1c212d;
  border-color: var(--line);
}

/* Groups Page Modern Bento Card Overhaul */
.groups-premium-grid {
  display: grid !important;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)) !important;
  gap: 12px !important;
  width: 100% !important;
}
@media (max-width: 640px) {
  .groups-premium-grid {
    grid-template-columns: 1fr !important;
  }
}
.group-hero-card {
  background: var(--card, #fff) !important;
  border: 1px solid var(--line, #e2e8f0) !important;
  border-radius: 14px !important;
  padding: 14px 16px !important;
  display: flex !important;
  flex-direction: column !important;
  gap: 10px !important;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.03) !important;
  cursor: pointer !important;
  transition: all 0.18s ease !important;
  position: relative !important;
}
.group-hero-card:hover {
  border-color: #cbd5e1 !important;
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.06) !important;
  transform: translateY(-1px) !important;
}
body.dark-mode .group-hero-card {
  background: #181d28 !important;
  border-color: rgba(255, 255, 255, 0.07) !important;
}
body.dark-mode .group-hero-card:hover {
  background: #1e2433 !important;
  border-color: rgba(255, 255, 255, 0.15) !important;
}

.gh-compact-main {
  display: flex !important;
  justify-content: space-between !important;
  align-items: center !important;
  gap: 8px !important;
}
.gh-title-wrap {
  display: flex !important;
  align-items: center !important;
  gap: 10px !important;
  flex: 1 !important;
  min-width: 0 !important;
}
.gh-icon-box {
  width: 36px !important;
  height: 36px !important;
  border-radius: 10px !important;
  display: grid !important;
  place-items: center !important;
  font-size: 16px !important;
  font-weight: bold !important;
  flex-shrink: 0 !important;
}
.gh-icon-box.pair {
  background: linear-gradient(135deg, #10b981, #059669) !important;
  color: #ffffff !important;
}
.gh-icon-box.group {
  background: linear-gradient(135deg, #a45b46, #744536) !important;
  color: #ffffff !important;
}
.gh-titles {
  display: flex !important;
  flex-direction: column !important;
  gap: 2px !important;
  min-width: 0 !important;
}
.gh-name-row {
  display: flex !important;
  align-items: center !important;
  gap: 6px !important;
}
.gh-name {
  font-size: 15px !important;
  font-weight: 800 !important;
  color: var(--text) !important;
  white-space: nowrap !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
}
.gh-tags-row {
  display: flex !important;
  align-items: center !important;
  gap: 5px !important;
  flex-wrap: wrap !important;
}

.gh-actions-menu {
  display: flex !important;
  align-items: center !important;
  gap: 5px !important;
  flex-shrink: 0 !important;
}
.gh-actions-menu .apple-action-btn {
  height: 27px !important;
  padding: 0 8px !important;
  font-size: 12px !important;
}

/* Members chips in group card */
.agb-members-row {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}
.agb-member-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 3px 8px 3px 4px;
  background: var(--surface-2, #f1f3f6);
  border: 1px solid var(--line, #e2e8f0);
  border-radius: 999px;
  font-size: 11.5px;
  font-weight: 650;
  color: var(--text);
  transition: all 0.15s ease;
}
.agb-member-chip:hover {
  background: #e2e8f0;
  border-color: #cbd5e1;
}
body.dark-mode .agb-member-chip {
  background: rgba(255, 255, 255, 0.05);
  border-color: rgba(255, 255, 255, 0.08);
}
body.dark-mode .agb-member-chip:hover {
  background: rgba(255, 255, 255, 0.1);
}
.agb-bal {
  font-size: 10px;
  font-weight: 800;
  padding: 1px 5px;
  border-radius: 999px;
}
.agb-bal.good {
  background: rgba(16, 185, 129, 0.15);
  color: #059669;
}
body.dark-mode .agb-bal.good {
  color: #34d399;
}
.agb-bal.warning {
  background: rgba(245, 158, 11, 0.15);
  color: #d97706;
}
body.dark-mode .agb-bal.warning {
  color: #fbbf24;
}
.agb-bal.debt {
  background: rgba(239, 68, 68, 0.15);
  color: #dc2626;
}
body.dark-mode .agb-bal.debt {
  color: #f87171;
}

/* Bottom strip of group card */
.agb-bottom-strip {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding-top: 8px;
  border-top: 1px solid var(--line, #f1f5f9);
}
body.dark-mode .agb-bottom-strip {
  border-top-color: rgba(255, 255, 255, 0.05);
}
.agb-sch-tickets {
  display: flex;
  align-items: center;
  gap: 5px;
  flex-wrap: wrap;
}
.agb-pulse-pill {
  font-size: 11px;
  font-weight: 750;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

/* View Switcher Segmented Control */
.apple-view-segmented-switch {
  display: inline-flex;
  align-items: center;
  background: var(--surface-2, #f1f3f6);
  border: 1px solid var(--line, #e2e8f0);
  border-radius: 8px;
  padding: 2px;
  gap: 2px;
}
body.dark-mode .apple-view-segmented-switch {
  background: #181d28;
  border-color: rgba(255, 255, 255, 0.08);
}
.avss-btn {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  height: 26px;
  padding: 0 9px;
  border: none;
  background: transparent;
  border-radius: 6px;
  font-size: 11.5px;
  font-weight: 700;
  color: var(--muted);
  cursor: pointer;
  transition: all 0.15s ease;
}
.avss-btn:hover {
  color: var(--text);
}
.avss-btn.active {
  background: var(--card, #fff);
  color: var(--text);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
}
body.dark-mode .avss-btn.active {
  background: #252d3d;
  color: #fff;
}
.avss-icon {
  font-size: 13px;
  line-height: 1;
}

/* Groups Table List Layout */
.groups-tablewrap {
  width: 100%;
  overflow-x: auto;
  border-radius: 12px;
  border: 1px solid var(--line, #e2e8f0);
  background: var(--card, #fff);
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.02);
}
body.dark-mode .groups-tablewrap {
  background: #181d28;
  border-color: rgba(255, 255, 255, 0.06);
}
.groups-luxury th {
  padding: 10px 14px;
  font-size: 11px;
  font-weight: 750;
  text-transform: uppercase;
  letter-spacing: 0.3px;
  color: var(--muted);
  background: var(--surface-2, #f8fafc);
  border-bottom: 1px solid var(--line, #e2e8f0);
}
body.dark-mode .groups-luxury th {
  background: #141720;
  border-bottom-color: rgba(255, 255, 255, 0.06);
}
.groups-luxury td {
  padding: 10px 14px;
  font-size: 12.5px;
  vertical-align: middle;
  border-bottom: 1px solid var(--line, #f1f5f9);
}
body.dark-mode .groups-luxury td {
  border-bottom-color: rgba(255, 255, 255, 0.04);
}
.group-table-row {
  transition: background 0.15s ease;
}
.group-table-row:hover {
  background: var(--surface-2, #f8fafc) !important;
}
body.dark-mode .group-table-row:hover {
  background: #1e2433 !important;
}

.gtr-name-cell {
  display: flex;
  align-items: center;
  gap: 9px;
}
.gtr-name-info {
  display: flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
}
.gtr-title {
  font-size: 13.5px;
  font-weight: 800;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 220px;
}

/* Groups Table Members Capsules & Schedule */
.gtr-members-wrap {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: nowrap;
}
.gtr-member-capsule {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 2px 7px 2px 3px;
  background: var(--surface, #f8fafc);
  border: 1px solid var(--line, #e2e8f0);
  border-radius: 999px;
  font-size: 11.5px;
  font-weight: 650;
  color: var(--text);
  transition: all 0.15s ease;
  white-space: nowrap;
}
.gtr-member-capsule:hover {
  background: var(--surface-2, #f1f5f9);
  border-color: #cbd5e1;
  transform: translateY(-1px);
}
body.dark-mode .gtr-member-capsule {
  background: rgba(255, 255, 255, 0.04);
  border-color: rgba(255, 255, 255, 0.08);
}
body.dark-mode .gtr-member-capsule:hover {
  background: rgba(255, 255, 255, 0.08);
}
.gtr-mc-name {
  font-weight: 650;
}
.gtr-mc-bal {
  font-size: 10px;
  font-weight: 800;
  padding: 1px 5px;
  border-radius: 999px;
}
.gtr-mc-bal.good {
  background: rgba(16, 185, 129, 0.15);
  color: #059669;
}
body.dark-mode .gtr-mc-bal.good {
  color: #34d399;
}
.gtr-mc-bal.warning {
  background: rgba(245, 158, 11, 0.15);
  color: #d97706;
}
body.dark-mode .gtr-mc-bal.warning {
  color: #fbbf24;
}
.gtr-mc-bal.debt {
  background: rgba(239, 68, 68, 0.15);
  color: #dc2626;
}
body.dark-mode .gtr-mc-bal.debt {
  color: #f87171;
}

.gtr-sch-tickets {
  display: flex;
  align-items: center;
  gap: 4px;
  flex-wrap: nowrap;
}

/* Ultra-Compact Group Details Modal */
.group-clean-modal-head.compact {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  margin-bottom: 8px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--line);
}
.gcmh-title-row {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}
.gcmh-title {
  font-size: 16px;
  font-weight: 800;
  color: var(--text);
}
.gcmh-actions {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
}
.gcmh-edit-btn {
  height: 26px !important;
  min-height: 26px !important;
  padding: 0 8px !important;
  font-size: 11px !important;
  font-weight: 700 !important;
  border-radius: 7px !important;
}
.group-modal-body.compact {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.group-quick-info-strip {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.gqi-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 10px;
  background: var(--surface-2, #f8fafc);
  border: 1px solid var(--line, #e2e8f0);
  border-radius: 10px;
  box-sizing: border-box;
  cursor: pointer;
  transition: all 0.15s ease;
}
.gqi-item:hover {
  border-color: var(--accent);
}
.gqi-item.links {
  cursor: default;
}
.gqi-icon {
  font-size: 13px;
  flex-shrink: 0;
}
.gqi-content {
  display: flex;
  align-items: center;
  gap: 5px;
  flex: 1;
  min-width: 0;
  flex-wrap: wrap;
}
.gqi-links-scroll {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  flex-wrap: nowrap;
}
.gqi-links-scroll::-webkit-scrollbar {
  display: none;
}
.gqi-action-hint {
  font-size: 11px;
  color: var(--muted);
  flex-shrink: 0;
}
.gqi-manage-btn {
  height: 22px !important;
  min-height: 22px !important;
  width: 22px !important;
  padding: 0 !important;
  display: grid !important;
  place-items: center !important;
  font-size: 12px !important;
  font-weight: 800 !important;
  border-radius: 6px !important;
  flex-shrink: 0;
}
.group-members-container {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-top: 4px;
}
.gmc-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  padding: 2px 0;
}
.gmc-title {
  font-size: 12px;
  font-weight: 800;
  color: var(--muted);
  letter-spacing: 0.3px;
}
.gmc-add-btn {
  height: 24px !important;
  min-height: 24px !important;
  padding: 0 8px !important;
  font-size: 11px !important;
  font-weight: 700 !important;
  border-radius: 6px !important;
}
.gcm-members-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.gcm-member-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  padding: 8px 10px;
  background: var(--surface-2, #f8fafc);
  border: 1px solid var(--line, #e2e8f0);
  border-radius: 10px;
  box-sizing: border-box;
}
.gcm-member-left {
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  flex: 1;
  min-width: 0;
}
.gcm-member-info {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}
.gcm-member-name {
  font-size: 13.5px;
  font-weight: 800;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.gcm-member-meta {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 11px;
  color: var(--muted);
}
.gcm-phone {
  font-weight: 600;
}
.gcm-member-actions {
  display: flex;
  align-items: center;
  gap: 4px;
  flex-shrink: 0;
}
.gcm-btn {
  height: 26px !important;
  min-height: 26px !important;
  padding: 0 8px !important;
  font-size: 11px !important;
  font-weight: 700 !important;
  border-radius: 6px !important;
}

body.dark-mode .gqi-item {
  background: #141720;
  border-color: var(--line);
}
body.dark-mode .gcm-member-row {
  background: #1c212d;
  border-color: var(--line);
}

/* Group Submodals (Schedule & Links) */
.group-submodal-head {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 8px;
  padding-bottom: 6px;
  border-bottom: 1px solid var(--line);
}
.gsm-back-btn {
  height: 26px !important;
  min-height: 26px !important;
  padding: 0 8px !important;
  font-size: 11px !important;
  font-weight: 750 !important;
  border-radius: 7px !important;
  flex-shrink: 0 !important;
}
.gsm-title {
  font-size: 14px;
  font-weight: 800;
  color: var(--text);
  flex: 1;
  min-width: 0;
  text-align: center;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.gsm-add-slot-row {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 8px 10px;
  background: var(--surface-2, #f8fafc);
  border: 1px solid var(--line, #e2e8f0);
  border-radius: 10px;
}
.gsm-select {
  flex: 1.2;
  min-width: 0;
  height: 32px;
  border-radius: 7px;
  border: 1px solid var(--line);
  background: var(--card);
  font-size: 12.5px;
  font-weight: 700;
  color: var(--text);
  padding: 0 6px;
}
.gsm-time-input {
  width: 122px !important;
  min-width: 122px !important;
  height: 32px !important;
  border-radius: 7px;
  border: 1px solid var(--line);
  background: var(--card);
  font-size: 13.5px;
  font-weight: 750;
  color: var(--text);
  padding: 0 6px 0 8px;
  box-sizing: border-box;
  flex-shrink: 0;
}
.gsm-time-input::-webkit-calendar-picker-indicator {
  margin-left: 6px;
  cursor: pointer;
}
.gsm-add-btn {
  height: 32px !important;
  min-height: 32px !important;
  padding: 0 10px !important;
  font-size: 11.5px !important;
  font-weight: 750 !important;
  border-radius: 7px !important;
  white-space: nowrap !important;
  flex-shrink: 0;
}
.gsm-slots-container {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-top: 8px;
}
.gsm-slots-label {
  font-size: 12px;
  font-weight: 750;
  color: var(--muted);
}
.gsm-slots-list {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}
.gsm-slot-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 8px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 8px;
  font-size: 12px;
  font-weight: 700;
}
.gsm-slot-day {
  color: var(--accent);
  font-weight: 800;
}
.gsm-slot-time {
  color: var(--text);
}
.gsm-slot-del {
  border: none;
  background: transparent;
  cursor: pointer;
  color: #dc2626;
  font-weight: 800;
  font-size: 11px;
  padding: 0 2px;
  line-height: 1;
}

/* Unified Finances Styles (Consistent with Dashboard, Students & Schedule) */
.finances-apple-toolbar {
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  background: var(--card, #ffffff) !important;
  border: 1px solid var(--line, rgba(0, 0, 0, 0.06)) !important;
  border-radius: 16px !important;
  padding: 10px 16px !important;
  margin-bottom: 16px !important;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.015) !important;
  gap: 12px !important;
  flex-wrap: wrap !important;
}
body.dark-mode .finances-apple-toolbar {
  background: #141721 !important;
  border-color: rgba(255, 255, 255, 0.07) !important;
}

.apple-kpi-card.active-kpi-tab {
  border-color: var(--accent) !important;
  box-shadow: 0 0 0 1.5px var(--accent), 0 6px 18px rgba(164, 91, 70, 0.12) !important;
  background: var(--card) !important;
}
body.dark-mode .apple-kpi-card.active-kpi-tab {
  border-color: var(--accent) !important;
  box-shadow: 0 0 0 1.5px var(--accent), 0 6px 18px rgba(164, 91, 70, 0.25) !important;
}

.fin-months-picker-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 8px;
  max-height: 340px;
  overflow-y: auto;
  padding: 2px;
}
.fin-month-picker-btn {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 14px;
  background: var(--surface-2, #f8fafc);
  border: 1px solid var(--line, #e2e8f0);
  border-radius: 10px;
  cursor: pointer;
  transition: all 0.15s ease;
  font-size: 13.5px;
  font-weight: 700;
  color: var(--text);
  text-align: left;
}
.fin-month-picker-btn:hover {
  background: var(--surface, #f1f5f9);
  border-color: var(--accent);
}
.fin-month-picker-btn.selected {
  background: var(--accent-soft, #f3e7e2);
  border-color: var(--accent);
  color: var(--accent);
}
.fmp-badge {
  font-size: 10.5px;
  font-weight: 800;
  background: var(--accent);
  color: #fff;
  padding: 2px 6px;
  border-radius: 5px;
}

/* History Card & Ledger List */
.finance-history-card {
  background: var(--card, #fff);
  border: 1px solid var(--line, #e2e8f0);
  border-radius: 16px;
  padding: 18px 20px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.02);
  margin-bottom: 18px;
}
body.dark-mode .finance-history-card {
  background: #141720;
  border-color: rgba(255, 255, 255, 0.08);
}

.fin-tab-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  margin-bottom: 14px;
  flex-wrap: wrap;
}
.fth-info {
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.fth-title {
  font-size: 16px;
  font-weight: 800;
  color: var(--text);
  letter-spacing: -0.2px;
}
.fth-sub {
  font-size: 12px;
  color: var(--muted);
  font-weight: 600;
}
.fth-search-wrap {
  min-width: 260px;
  position: relative;
}
.fth-search {
  width: 100%;
  height: 36px !important;
  font-size: 13px !important;
  border-radius: 10px !important;
  padding-left: 34px !important;
  background: var(--surface-2, #f8fafc) !important;
  border: 1px solid var(--line, #e2e8f0) !important;
}
.fth-search-icon {
  position: absolute;
  left: 11px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 13px;
  color: var(--muted);
  pointer-events: none;
}

.fin-cards-list {
  display: flex;
  flex-direction: column;
  gap: 7px;
}
.fin-payment-card,
.fin-lesson-card {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  padding: 10px 14px;
  background: var(--surface-2, #f8fafc);
  border: 1px solid var(--line, #e2e8f0);
  border-radius: 12px;
  cursor: pointer;
  transition: all 0.15s ease;
  box-sizing: border-box;
}
body.dark-mode .fin-payment-card,
body.dark-mode .fin-lesson-card {
  background: #181d28;
  border-color: rgba(255, 255, 255, 0.07);
}
.fin-payment-card:hover,
.fin-lesson-card:hover {
  border-color: var(--accent);
  background: var(--card, #fff);
  box-shadow: 0 3px 12px rgba(0, 0, 0, 0.03);
}
body.dark-mode .fin-payment-card:hover,
body.dark-mode .fin-lesson-card:hover {
  background: #1d2332;
  border-color: var(--accent);
}

.fpc-left,
.flc-left {
  display: flex;
  align-items: center;
  gap: 11px;
  flex: 1;
  min-width: 0;
}
.fpc-info,
.flc-info {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}
.fpc-name,
.flc-name {
  font-size: 13.5px;
  font-weight: 750;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.fpc-meta,
.flc-meta {
  font-size: 11.5px;
  color: var(--muted);
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}
.fpc-right,
.flc-right {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}
.flc-arrow {
  color: var(--muted);
  font-size: 14px;
  opacity: 0.5;
  transition: opacity 0.15s ease, transform 0.15s ease;
}
.fin-payment-card:hover .flc-arrow,
.fin-lesson-card:hover .flc-arrow {
  opacity: 1;
  transform: translateX(2px);
}
.flc-date-pill {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 4px 7px;
  background: var(--card, #fff);
  border: 1px solid var(--line, #e2e8f0);
  border-radius: 8px;
  min-width: 44px;
  flex-shrink: 0;
}
body.dark-mode .flc-date-pill {
  background: #141720;
  border-color: rgba(255, 255, 255, 0.08);
}
.flc-day {
  font-size: 11.5px;
  font-weight: 800;
  color: var(--text);
}
.flc-time {
  font-size: 10px;
  color: var(--muted);
  font-weight: 700;
}

.fin-debtor-card {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 12px 15px;
  background: var(--surface-2, #f8fafc);
  border: 1px solid var(--line, #e2e8f0);
  border-left: 3.5px solid #dc2626;
  border-radius: 12px;
  box-sizing: border-box;
  transition: all 0.15s ease;
}
body.dark-mode .fin-debtor-card {
  background: #181d28;
  border-color: rgba(255, 255, 255, 0.07);
  border-left-color: #ef4444;
}
.fin-debtor-card:hover {
  background: var(--card, #fff);
  box-shadow: 0 3px 12px rgba(0, 0, 0, 0.03);
}
body.dark-mode .fin-debtor-card:hover {
  background: #1d2332;
}
.fdc-top-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
}
.fdc-user {
  display: flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  flex: 1;
  min-width: 0;
}
.fdc-info {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}
.fdc-name {
  font-size: 13.5px;
  font-weight: 800;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.fdc-meta {
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 11px;
  color: var(--muted);
  flex-wrap: wrap;
}
.fdc-debt-badge {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 2px;
  flex-shrink: 0;
}
.fdc-debt-amount {
  font-size: 13.5px;
  font-weight: 850;
  color: #dc2626;
  background: rgba(239, 68, 68, 0.1);
  padding: 3px 8px;
  border-radius: 7px;
  font-feature-settings: "tnum";
}
.fdc-actions-row {
  display: flex;
  align-items: center;
  gap: 6px;
  padding-top: 6px;
  border-top: 1px dashed var(--line);
}
.fdc-btn {
  height: 26px !important;
  min-height: 26px !important;
  padding: 0 8px !important;
  font-size: 11px !important;
  font-weight: 700 !important;
  border-radius: 6px !important;
}

body.dark-mode .fin-kpi-card {
  background: #141720;
  border-color: var(--line);
}
body.dark-mode .fin-kpi-card.green-kpi.active-kpi {
  background: rgba(34, 197, 94, 0.1);
}
body.dark-mode .fin-kpi-card.blue-kpi.active-kpi {
  background: rgba(59, 130, 246, 0.1);
}
body.dark-mode .fin-kpi-card.amber-kpi.active-kpi {
  background: rgba(239, 68, 68, 0.1);
}
body.dark-mode .fin-kpi-card.purple-kpi.active-kpi {
  background: rgba(168, 85, 247, 0.1);
}
body.dark-mode .fin-payment-card,
body.dark-mode .fin-lesson-card,
body.dark-mode .fin-debtor-card {
  background: #141720;
  border-color: var(--line);
}
body.dark-mode .flc-date-pill {
  background: #1c212d;
}

/* Apple-Style Settings Overhaul */
.settings-container {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

/* Apple Segmented Control */
.apple-segmented-control {
  display: flex;
  background: var(--surface-2, #f1f5f9);
  padding: 3px;
  border-radius: 11px;
  gap: 3px;
  border: 1px solid var(--line, #e2e8f0);
}
.apple-segment-btn {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 6px 10px;
  border: none;
  background: transparent;
  color: var(--muted);
  font-size: 12.5px;
  font-weight: 650;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.15s ease;
}
.apple-segment-btn.active {
  background: var(--card, #fff);
  color: var(--text);
  font-weight: 800;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.08), 0 1px 2px rgba(0, 0, 0, 0.04);
}
.asb-icon {
  font-size: 13.5px;
}

/* Section & Cards */
.apple-settings-sections {
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.apple-section-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.apple-section-header {
  padding: 0 4px;
}
.ash-kicker {
  font-size: 11px;
  font-weight: 800;
  color: var(--muted);
  letter-spacing: 0.5px;
}
.apple-cards-stack {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.apple-settings-card {
  background: var(--card, #fff);
  border: 1px solid var(--line, #e2e8f0);
  border-radius: 16px;
  padding: 14px 16px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.02);
}
.apple-settings-card.sec-hero {
  background: linear-gradient(135deg, rgba(164, 91, 70, 0.06), rgba(164, 91, 70, 0.01));
  border-color: rgba(164, 91, 70, 0.22);
}
body.dark-mode .apple-settings-card.sec-hero {
  background: linear-gradient(135deg, rgba(164, 91, 70, 0.12), rgba(164, 91, 70, 0.02));
  border-color: rgba(164, 91, 70, 0.28);
}
.apple-settings-card.danger-zone {
  background: linear-gradient(135deg, rgba(239, 68, 68, 0.05), rgba(239, 68, 68, 0.01));
  border-color: rgba(239, 68, 68, 0.25);
}
body.dark-mode .apple-settings-card.danger-zone {
  background: linear-gradient(135deg, rgba(239, 68, 68, 0.1), rgba(239, 68, 68, 0.02));
  border-color: rgba(239, 68, 68, 0.3);
}
.apple-card-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
}
.apple-head-left {
  display: flex;
  align-items: center;
  gap: 10px;
  flex: 1;
  min-width: 0;
}
.apple-icon-circle {
  width: 32px;
  height: 32px;
  min-width: 32px;
  border-radius: 9px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
}
.apple-icon-circle.green { background: rgba(34, 197, 94, 0.12); color: #16a34a; }
.apple-icon-circle.blue { background: rgba(59, 130, 246, 0.12); color: #2563eb; }
.apple-icon-circle.amber { background: rgba(245, 158, 11, 0.12); color: #d97706; }
.apple-icon-circle.pink { background: rgba(236, 72, 153, 0.12); color: #db2777; }
.apple-icon-circle.purple { background: rgba(139, 92, 246, 0.12); color: #7c3aed; }
.apple-icon-circle.red { background: rgba(239, 68, 68, 0.12); color: #dc2626; }

.apple-card-title {
  font-size: 14.5px;
  font-weight: 800;
  color: var(--text);
  line-height: 1.2;
}
.apple-card-sub {
  font-size: 11.5px;
  color: var(--muted);
  font-weight: 600;
  margin-top: 1px;
}

/* Tag Pills */
.apple-tags-row {
  display: flex;
  align-items: center;
  gap: 5px;
  flex-wrap: wrap;
  padding: 6px 8px;
  background: var(--surface-2, #f8fafc);
  border-radius: 9px;
  border: 1px solid var(--line, #e2e8f0);
}
.apple-tag-pill {
  border: 1px solid var(--line);
  background: var(--card, #fff);
  color: var(--text);
  font-size: 11px;
  font-weight: 700;
  padding: 3px 7px;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.15s ease;
  user-select: none;
}
.apple-tag-pill:hover,
.apple-tag-pill:active {
  background: var(--accent-soft, rgba(226, 124, 99, 0.15));
  border-color: var(--accent);
  color: var(--accent);
  transform: scale(0.97);
}

/* Textarea */
.apple-textarea {
  width: 100%;
  box-sizing: border-box;
  font-family: inherit;
  font-size: 13px;
  line-height: 1.5;
  padding: 10px 12px;
  border: 1.5px solid var(--line, #e2e8f0);
  border-radius: 11px;
  background: var(--surface-2, #f8fafc);
  color: var(--text);
  resize: vertical;
  outline: none;
  transition: all 0.15s ease;
}
.apple-textarea:focus {
  border-color: var(--accent);
  background: var(--card, #fff);
  box-shadow: 0 0 0 3px var(--accent-soft);
}

/* Banks List */
.apple-banks-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.apple-bank-row {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 10px;
  background: var(--surface-2, #f8fafc);
  border: 1px solid var(--line, #e2e8f0);
  border-radius: 10px;
}
.abr-col {
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.abr-col.name {
  width: 100px;
  flex-shrink: 0;
}
.abr-col.num {
  flex: 1;
  min-width: 0;
}
.abr-label {
  font-size: 10.5px;
  font-weight: 700;
  color: var(--muted);
}
.apple-input {
  height: 30px;
  border-radius: 7px;
  border: 1px solid var(--line);
  background: var(--card, #fff);
  font-size: 12px;
  font-weight: 700;
  color: var(--text);
  padding: 0 8px;
  box-sizing: border-box;
  width: 100%;
  outline: none;
}
.apple-input:focus {
  border-color: var(--accent);
}
.apple-del-btn {
  border: none;
  background: transparent;
  color: #dc2626;
  font-weight: 800;
  font-size: 12px;
  cursor: pointer;
  padding: 4px;
  border-radius: 6px;
  flex-shrink: 0;
}
.apple-del-btn:hover {
  background: rgba(220, 38, 38, 0.1);
}

.apple-divider {
  height: 1px;
  background: var(--line, #e2e8f0);
  margin: 2px 0;
}
.apple-inline-setting {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  padding: 4px 0;
}
.ais-left strong {
  font-size: 13px;
  font-weight: 800;
  color: var(--text);
}
.ais-desc {
  font-size: 11px;
  color: var(--muted);
}
.apple-stepper-control {
  display: inline-flex !important;
  align-items: center !important;
  gap: 3px !important;
  background: var(--surface-2, #f1f3f5) !important;
  border: 1px solid var(--line, #e2e8f0) !important;
  border-radius: 999px !important;
  padding: 2px 4px !important;
}
body.dark-mode .apple-stepper-control {
  background: #1c212d !important;
  border-color: rgba(255, 255, 255, 0.08) !important;
}
.asc-btn {
  width: 24px !important;
  height: 24px !important;
  min-width: 24px !important;
  min-height: 24px !important;
  border-radius: 50% !important;
  border: none !important;
  background: var(--card, #ffffff) !important;
  color: var(--text) !important;
  font-size: 14px !important;
  font-weight: 800 !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  cursor: pointer !important;
  box-shadow: 0 1px 2px rgba(0,0,0,0.06) !important;
  transition: all 0.12s ease !important;
  padding: 0 !important;
  line-height: 1 !important;
}
.asc-btn:active {
  transform: scale(0.9) !important;
}
body.dark-mode .asc-btn {
  background: #283040 !important;
  color: #f8fafc !important;
}
.apple-num-input {
  width: 30px !important;
  height: 24px !important;
  border: none !important;
  background: transparent !important;
  text-align: center !important;
  font-size: 13.5px !important;
  font-weight: 850 !important;
  color: var(--text) !important;
  outline: none !important;
  padding: 0 !important;
  -moz-appearance: textfield !important;
}
.apple-num-input::-webkit-outer-spin-button,
.apple-num-input::-webkit-inner-spin-button {
  -webkit-appearance: none !important;
  margin: 0 !important;
}
.apple-help-tip {
  font-size: 11px;
  color: var(--muted);
  line-height: 1.4;
}

/* Security & Forms */
.apple-form-stack {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 4px;
}
.apple-field {
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.apple-field label {
  font-size: 11.5px;
  font-weight: 750;
  color: var(--muted);
}

body.dark-mode .apple-segmented-control {
  background: #141720;
  border-color: var(--line);
}
body.dark-mode .apple-segment-btn.active {
  background: #1c212d;
}
body.dark-mode .apple-settings-card {
  background: #141720;
  border-color: var(--line);
}
body.dark-mode .apple-tags-row,
body.dark-mode .apple-bank-row,
body.dark-mode .apple-textarea,
body.dark-mode .apple-input,
body.dark-mode .apple-num-input {
  background: #1c212d;
  border-color: var(--line);
}
body.dark-mode .apple-tag-pill {
  background: #141720;
  border-color: var(--line);
}

/* Apple Menu List Card */
.apple-menu-card {
  background: var(--card, #fff);
  border: 1px solid var(--line, #e2e8f0);
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.02);
  display: flex;
  flex-direction: column;
}
.apple-menu-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  padding: 12px 16px;
  cursor: pointer;
  transition: all 0.15s ease;
  border-bottom: 1px solid var(--line, #e2e8f0);
  user-select: none;
  -webkit-tap-highlight-color: transparent;
}
.apple-menu-row:last-child {
  border-bottom: none;
}
.apple-menu-row:hover:not(.no-hover) {
  background: var(--surface-2, #f8fafc);
}
.apple-menu-row:active:not(.no-hover) {
  background: var(--surface, #f1f5f9);
}
.apple-menu-row.no-hover {
  cursor: default;
}
.amr-left {
  display: flex;
  align-items: center;
  gap: 12px;
  flex: 1;
  min-width: 0;
}
.amr-info {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}
.amr-title {
  font-size: 14px;
  font-weight: 800;
  color: var(--text);
  line-height: 1.2;
}
.amr-sub {
  font-size: 11.5px;
  color: var(--muted);
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.amr-arrow {
  color: var(--muted);
  font-size: 16px;
  font-weight: 700;
  flex-shrink: 0;
  margin-right: 2px;
}
.amr-right {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
}

body.dark-mode .apple-menu-card {
  background: #141720;
  border-color: var(--line);
}
body.dark-mode .apple-menu-row {
  border-bottom-color: var(--line);
}
body.dark-mode .apple-menu-row:hover:not(.no-hover) {
  background: #1c212d;
}
body.dark-mode .apple-menu-row:active:not(.no-hover) {
  background: #232938;
}


/* Birthday Widget Global & Mobile Base */
.dash-bday-card-list {
  display: flex !important;
  flex-direction: column !important;
  gap: 6px !important;
  margin-top: 6px !important;
}
.dash-bday-item {
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  padding: 6px 8px !important;
  background: var(--surface, #f8fafc) !important;
  border: 1px solid var(--line, #e2e8f0) !important;
  border-radius: 10px !important;
  gap: 8px !important;
  cursor: pointer !important;
  transition: all 0.15s ease !important;
}
.dash-bday-item:hover {
  background: var(--card, #fff) !important;
  border-color: var(--accent) !important;
}
.dash-bday-item.today-bday {
  background: rgba(236, 72, 153, 0.08) !important;
  border-color: rgba(236, 72, 153, 0.3) !important;
}
.dbi-left {
  display: flex !important;
  align-items: center !important;
  gap: 8px !important;
  flex: 1 !important;
  min-width: 0 !important;
}
.dbi-icon-wrap {
  width: 28px !important;
  height: 28px !important;
  min-width: 28px !important;
  border-radius: 8px !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  font-size: 14px !important;
  background: rgba(236, 72, 153, 0.12) !important;
  color: #db2777 !important;
}
.dbi-info {
  display: flex !important;
  flex-direction: column !important;
  gap: 1px !important;
  min-width: 0 !important;
}
.dbi-name-row {
  display: flex !important;
  align-items: center !important;
  gap: 5px !important;
}
.dbi-name-row strong {
  font-size: 13px !important;
  font-weight: 750 !important;
  color: var(--text) !important;
  white-space: nowrap !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
}
.dbi-pill {
  font-size: 10px !important;
  font-weight: 700 !important;
  padding: 1.5px 5px !important;
  border-radius: 5px !important;
  background: var(--surface-2, #e2e8f0) !important;
  color: var(--muted) !important;
  white-space: nowrap !important;
}
.dbi-pill.today {
  background: #db2777 !important;
  color: #fff !important;
}
.dbi-sub {
  font-size: 10.5px !important;
  color: var(--muted) !important;
}
.dbi-actions {
  display: flex !important;
  align-items: center !important;
  gap: 4px !important;
  flex-shrink: 0 !important;
}
body.dark-mode .dash-bday-item {
  background: #141720 !important;
  border-color: var(--line) !important;
}
body.dark-mode .dash-bday-item.today-bday {
  background: rgba(236, 72, 153, 0.15) !important;
  border-color: rgba(236, 72, 153, 0.4) !important;
}

/* ==========================================================================
   Universal Apple Pill Link Buttons (.apple-pill-link)
   ========================================================================== */
.apple-pill-link {
  font-family: inherit !important;
  display: inline-flex !important;
  align-items: center !important;
  gap: 3px !important;
  background: var(--surface-2, #f1f4f9) !important;
  border: 1px solid rgba(0, 0, 0, 0.05) !important;
  border-radius: 20px !important;
  padding: 3.5px 9px !important;
  font-size: 11px !important;
  font-weight: 700 !important;
  color: var(--muted, #64748b) !important;
  cursor: pointer !important;
  transition: all 0.14s cubic-bezier(0.16, 1, 0.3, 1) !important;
  line-height: 1.15 !important;
  white-space: nowrap !important;
  outline: none !important;
  text-decoration: none !important;
}
.apple-pill-link:hover,
.apple-pill-link:active {
  background: #e4e8f0 !important;
  color: var(--text, #1e293b) !important;
  border-color: rgba(0, 0, 0, 0.12) !important;
}
body.dark-mode .apple-pill-link {
  background: #1e2433 !important;
  border-color: rgba(255, 255, 255, 0.08) !important;
  color: #94a3b8 !important;
}
body.dark-mode .apple-pill-link:hover,
body.dark-mode .apple-pill-link:active {
  background: #2a3346 !important;
  color: #f8fafc !important;
  border-color: rgba(255, 255, 255, 0.15) !important;
}

/* ==========================================================================
   Comprehensive Desktop & Web Interface Overhaul (macOS / Web App Style)
   ========================================================================== */
@media (min-width: 769px) {
  /* App Shell & Sidebar */
  .app {
    display: flex !important;
    min-height: 100vh !important;
    background: #f5f6f9 !important;
  }

  body.dark-mode .app {
    background: #0c0e14 !important;
  }

  .sidebar {
    width: 250px !important;
    min-width: 250px !important;
    max-width: 250px !important;
    background: #ffffff !important;
    border-right: 1px solid rgba(0, 0, 0, 0.06) !important;
    padding: 20px 14px 16px !important;
    position: sticky !important;
    top: 0 !important;
    height: 100vh !important;
    display: flex !important;
    flex-direction: column !important;
    justify-content: space-between !important;
    box-sizing: border-box !important;
    z-index: 50 !important;
    box-shadow: 1px 0 4px rgba(0, 0, 0, 0.015) !important;
  }

  .sidebar-top {
    display: flex !important;
    flex-direction: column !important;
    gap: 16px !important;
  }

  .brand-bar {
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    padding: 2px 6px 12px !important;
    border-bottom: 1px solid rgba(0, 0, 0, 0.06) !important;
  }

  .brand {
    font-size: 20px !important;
    font-weight: 850 !important;
    letter-spacing: -0.5px !important;
    display: flex !important;
    align-items: center !important;
    gap: 8px !important;
    padding: 0 !important;
    margin: 0 !important;
    color: var(--text) !important;
  }

  .brand-badge {
    width: 28px !important;
    height: 28px !important;
    background: var(--accent) !important;
    color: #fff !important;
    border-radius: 8px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    font-weight: 900 !important;
    font-size: 15px !important;
  }

  .brand-top-actions {
    display: none !important;
  }

  .sidebar .nav {
    display: flex !important;
    flex-direction: column !important;
    gap: 3px !important;
    overflow: visible !important;
  }

  .sidebar .nav button {
    width: 100% !important;
    display: flex !important;
    align-items: center !important;
    gap: 10px !important;
    padding: 9px 12px !important;
    border-radius: 10px !important;
    font-size: 13.5px !important;
    font-weight: 650 !important;
    color: var(--muted) !important;
    border: none !important;
    background: transparent !important;
    text-align: left !important;
    cursor: pointer !important;
    transition: all 0.14s ease !important;
  }

  .sidebar .nav button:hover {
    background: #f0f2f5 !important;
    color: var(--text) !important;
  }

  .sidebar .nav button.active {
    background: #f6ede9 !important;
    color: var(--accent, #a45b46) !important;
    font-weight: 800 !important;
  }

  .sidebar-footer {
    display: flex !important;
    flex-direction: column !important;
    gap: 6px !important;
    padding-top: 12px !important;
    border-top: 1px solid rgba(0, 0, 0, 0.06) !important;
  }

  .theme-toggle-btn {
    display: flex !important;
    align-items: center !important;
    gap: 8px !important;
    width: 100% !important;
    padding: 8px 12px !important;
    border-radius: 9px !important;
    font-size: 12.5px !important;
    font-weight: 700 !important;
    color: var(--muted) !important;
    background: #f8fafc !important;
    border: 1px solid rgba(0, 0, 0, 0.08) !important;
    cursor: pointer !important;
    transition: all 0.14s ease !important;
  }

  .theme-toggle-btn:hover {
    background: #ffffff !important;
    color: var(--text) !important;
    border-color: var(--accent) !important;
  }

  /* Main Desktop Content Viewport */
  .main {
    flex: 1 !important;
    padding: 26px 36px !important;
    max-width: 1440px !important;
    margin: 0 auto !important;
    width: calc(100% - 250px) !important;
    box-sizing: border-box !important;
  }

  /* ==========================================================================
     Desktop Unified Apple macOS / iOS Dashboard Overhaul (Compact & Crisp)
     ========================================================================== */
  .apple-desktop-dashboard {
    display: flex !important;
    flex-direction: column !important;
    gap: 14px !important;
    width: 100% !important;
  }

  .apple-dash-header {
    display: flex !important;
    justify-content: space-between !important;
    align-items: center !important;
  }

  .adh-title-group {
    display: flex !important;
    flex-direction: column !important;
    gap: 2px !important;
  }

  .adh-title-group h1 {
    margin: 0 !important;
    font-size: 22px !important;
    font-weight: 850 !important;
    letter-spacing: -0.5px !important;
    color: var(--text) !important;
    line-height: 1.15 !important;
  }
  body.dark-mode .adh-title-group h1 {
    color: #f8fafc !important;
  }

  .adh-date-pill {
    display: inline-flex !important;
    align-items: center !important;
    gap: 6px !important;
    font-size: 11.5px !important;
    font-weight: 600 !important;
    color: var(--muted) !important;
  }
  body.dark-mode .adh-date-pill {
    color: #94a3b8 !important;
  }

  .adh-live-dot {
    width: 6px !important;
    height: 6px !important;
    border-radius: 50% !important;
    background: #22c55e !important;
    box-shadow: 0 0 5px rgba(34, 197, 94, 0.6) !important;
  }

  .adh-actions {
    display: flex !important;
    align-items: center !important;
    gap: 8px !important;
  }

  .apple-btn {
    display: inline-flex !important;
    align-items: center !important;
    gap: 6px !important;
    padding: 6.5px 13px !important;
    border-radius: 9px !important;
    font-size: 12.5px !important;
    font-weight: 700 !important;
    cursor: pointer !important;
    background: #ffffff !important;
    color: var(--text) !important;
    border: 1px solid rgba(0, 0, 0, 0.08) !important;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.02) !important;
    transition: all 0.15s cubic-bezier(0.16, 1, 0.3, 1) !important;
  }
  .apple-btn:hover {
    background: #f8fafc !important;
    border-color: rgba(0, 0, 0, 0.15) !important;
    transform: translateY(-1px) !important;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.04) !important;
  }
  body.dark-mode .apple-btn {
    background: #181c27 !important;
    color: #f8fafc !important;
    border-color: rgba(255, 255, 255, 0.1) !important;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.3) !important;
  }
  body.dark-mode .apple-btn:hover {
    background: #222837 !important;
    border-color: rgba(255, 255, 255, 0.2) !important;
  }
  .apple-btn.small {
    padding: 5px 10px !important;
    font-size: 11.5px !important;
    border-radius: 8px !important;
  }
  .apple-btn.apple-btn-primary,
  .apple-btn-primary {
    background: var(--accent, #a45b46) !important;
    color: #ffffff !important;
    border: 1px solid transparent !important;
    box-shadow: 0 1px 3px rgba(164, 91, 70, 0.25) !important;
  }
  .apple-btn.apple-btn-primary:hover,
  .apple-btn-primary:hover {
    background: #8e4c39 !important;
    color: #ffffff !important;
    box-shadow: 0 3px 10px rgba(164, 91, 70, 0.35) !important;
    transform: translateY(-1px) !important;
  }
  body.dark-mode .apple-btn.apple-btn-primary,
  body.dark-mode .apple-btn-primary {
    background: var(--accent, #a45b46) !important;
    color: #ffffff !important;
    border-color: rgba(255, 255, 255, 0.1) !important;
  }

  .apple-btn.btn-danger-soft {
    color: #dc2626 !important;
    background: rgba(239, 68, 68, 0.08) !important;
    border-color: rgba(239, 68, 68, 0.2) !important;
  }
  .apple-btn.btn-danger-soft:hover {
    background: rgba(239, 68, 68, 0.15) !important;
    border-color: rgba(239, 68, 68, 0.35) !important;
  }
  body.dark-mode .apple-btn.btn-danger-soft {
    color: #f87171 !important;
    background: rgba(239, 68, 68, 0.15) !important;
    border-color: rgba(239, 68, 68, 0.3) !important;
  }
  body.dark-mode .apple-btn.btn-danger-soft:hover {
    background: rgba(239, 68, 68, 0.25) !important;
    border-color: rgba(239, 68, 68, 0.45) !important;
  }

  .apple-kpi-grid {
    display: grid !important;
    grid-template-columns: repeat(4, 1fr);
    gap: 10px !important;
    width: 100% !important;
  }

  .apple-kpi-card {
    background: #ffffff !important;
    border: 1px solid rgba(0, 0, 0, 0.05) !important;
    border-radius: 14px !important;
    padding: 11px 14px 10px !important;
    display: flex !important;
    flex-direction: column !important;
    justify-content: space-between !important;
    min-height: 86px !important;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.015) !important;
    cursor: pointer !important;
    transition: transform 0.16s ease, box-shadow 0.16s ease, border-color 0.16s ease !important;
  }
  .apple-kpi-card:hover {
    transform: translateY(-1px) !important;
    box-shadow: 0 5px 14px rgba(0, 0, 0, 0.04) !important;
    border-color: rgba(0, 0, 0, 0.1) !important;
  }
  body.dark-mode .apple-kpi-card {
    background: #141721 !important;
    border-color: rgba(255, 255, 255, 0.07) !important;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.3) !important;
  }
  body.dark-mode .apple-kpi-card:hover {
    background: #181c27 !important;
    border-color: rgba(255, 255, 255, 0.14) !important;
  }

  .akc-top {
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    width: 100% !important;
  }

  .akc-icon-badge {
    width: 26px !important;
    height: 26px !important;
    border-radius: 7px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    font-size: 13px !important;
  }
  .akc-icon-badge.green { background: rgba(34, 197, 94, 0.1) !important; color: #16a34a !important; }
  .akc-icon-badge.blue { background: rgba(59, 130, 246, 0.1) !important; color: #2563eb !important; }
  .akc-icon-badge.red { background: rgba(239, 68, 68, 0.1) !important; color: #dc2626 !important; }
  .akc-icon-badge.purple { background: rgba(139, 92, 246, 0.1) !important; color: #7c3aed !important; }

  .akc-label {
    font-size: 12.5px !important;
    font-weight: 750 !important;
    color: var(--text) !important;
    margin-left: 7px !important;
    margin-right: auto !important;
  }
  body.dark-mode .akc-label {
    color: #f8fafc !important;
  }

  .akc-pill {
    font-size: 10px !important;
    font-weight: 700 !important;
    padding: 1.5px 6px !important;
    border-radius: 5px !important;
  }
  .akc-pill.green { background: rgba(34, 197, 94, 0.1) !important; color: #16a34a !important; }
  .akc-pill.blue { background: rgba(59, 130, 246, 0.1) !important; color: #2563eb !important; }
  .akc-pill.red { background: rgba(239, 68, 68, 0.1) !important; color: #dc2626 !important; }
  .akc-pill.purple { background: rgba(139, 92, 246, 0.1) !important; color: #7c3aed !important; }

  .akc-number {
    font-size: 21px !important;
    font-weight: 850 !important;
    letter-spacing: -0.03em !important;
    color: var(--text) !important;
    line-height: 1.15 !important;
    margin: 4px 0 2px !important;
  }
  body.dark-mode .akc-number {
    color: #f8fafc !important;
  }
  .akc-number small {
    font-size: 12px !important;
    font-weight: 600 !important;
    color: var(--muted) !important;
  }
  body.dark-mode .akc-number small {
    color: #94a3b8 !important;
  }

  .akc-desc {
    font-size: 11px !important;
    color: var(--muted) !important;
    font-weight: 550 !important;
  }
  body.dark-mode .akc-desc {
    color: #94a3b8 !important;
  }

  .apple-main-grid {
    display: grid !important;
    grid-template-columns: 1fr 1fr !important;
    gap: 14px !important;
    align-items: start !important;
    width: 100% !important;
  }

  .apple-grid-col {
    display: flex !important;
    flex-direction: column !important;
    gap: 14px !important;
    width: 100% !important;
  }

  .apple-card {
    background: #ffffff !important;
    border: 1px solid rgba(0, 0, 0, 0.05) !important;
    border-radius: 14px !important;
    padding: 12px 14px !important;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.015) !important;
  }
  body.dark-mode .apple-card {
    background: #141721 !important;
    border-color: rgba(255, 255, 255, 0.07) !important;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.3) !important;
  }

  .apple-card-header {
    display: flex !important;
    justify-content: space-between !important;
    align-items: center !important;
    padding-bottom: 7px !important;
    border-bottom: 1px solid rgba(0, 0, 0, 0.04) !important;
    margin-bottom: 6px !important;
  }
  body.dark-mode .apple-card-header {
    border-bottom-color: rgba(255, 255, 255, 0.06) !important;
  }

  .ach-left {
    display: flex !important;
    align-items: center !important;
    gap: 8px !important;
  }

  .ach-icon-circle {
    width: 26px !important;
    height: 26px !important;
    border-radius: 7px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    font-size: 13px !important;
  }
  .ach-icon-circle.blue { background: rgba(59, 130, 246, 0.1) !important; color: #2563eb !important; }
  .ach-icon-circle.terracotta { background: rgba(164, 91, 70, 0.12) !important; color: #a45b46 !important; }
  .ach-icon-circle.pink { background: rgba(236, 72, 153, 0.1) !important; color: #db2777 !important; }
  .ach-icon-circle.amber { background: rgba(245, 158, 11, 0.1) !important; color: #d97706 !important; }
  .ach-icon-circle.purple { background: rgba(139, 92, 246, 0.1) !important; color: #7c3aed !important; }

  .ach-left h2 {
    margin: 0 !important;
    font-size: 13.5px !important;
    font-weight: 800 !important;
    letter-spacing: -0.2px !important;
    color: var(--text) !important;
    line-height: 1.2 !important;
  }
  body.dark-mode .ach-left h2 {
    color: #f8fafc !important;
  }

  .ach-left p {
    margin: 1px 0 0 !important;
    font-size: 10.5px !important;
    color: var(--muted) !important;
  }
  body.dark-mode .ach-left p {
    color: #94a3b8 !important;
  }

  .apple-pill-link {
    background: #f4f6f9 !important;
    border: 1px solid rgba(0, 0, 0, 0.04) !important;
    border-radius: 999px !important;
    padding: 3px 10px !important;
    font-size: 11px !important;
    font-weight: 700 !important;
    color: var(--muted) !important;
    cursor: pointer !important;
    transition: all 0.14s ease !important;
  }
  .apple-pill-link:hover {
    background: #e9ecf2 !important;
    color: var(--text) !important;
  }
  body.dark-mode .apple-pill-link {
    background: #181c27 !important;
    border-color: rgba(255, 255, 255, 0.08) !important;
    color: #cbd5e1 !important;
  }
  body.dark-mode .apple-pill-link:hover {
    background: #242a3a !important;
    color: #ffffff !important;
  }

  /* ==========================================================================
     Apple Native Dashboard Lists (Apple Calendar / Reminders / Contacts Style)
     ========================================================================== */
  .apple-sch-list,
  .apple-attn-list,
  .apple-bday-list {
    display: flex !important;
    flex-direction: column !important;
    gap: 2px !important;
  }

  /* 1. Apple Today's Schedule Row */
  .apple-sch-row {
    display: flex !important;
    align-items: center !important;
    gap: 9px !important;
    padding: 5px 8px !important;
    border-radius: 8px !important;
    cursor: pointer !important;
    transition: background 0.15s ease, transform 0.1s ease !important;
    border: 1px solid transparent !important;
  }
  .apple-sch-row:hover {
    background: #f8fafc !important;
  }
  body.dark-mode .apple-sch-row:hover {
    background: #181c27 !important;
  }

  .asr-time-col {
    display: flex !important;
    flex-direction: column !important;
    align-items: flex-start !important;
    width: 38px !important;
    flex-shrink: 0 !important;
  }
  .asr-time {
    font-size: 12.5px !important;
    font-weight: 800 !important;
    color: var(--text) !important;
    line-height: 1.1 !important;
  }
  body.dark-mode .asr-time {
    color: #f8fafc !important;
  }
  .asr-duration {
    font-size: 9.5px !important;
    font-weight: 600 !important;
    color: var(--muted) !important;
  }

  .asr-stripe {
    width: 3px !important;
    height: 22px !important;
    border-radius: 3px !important;
    flex-shrink: 0 !important;
  }
  .asr-stripe.individual { background: #2563eb !important; }
  .asr-stripe.pair { background: #16a34a !important; }
  .asr-stripe.group { background: #9333ea !important; }

  .asr-main {
    display: flex !important;
    flex-direction: column !important;
    gap: 1px !important;
    flex: 1 !important;
    min-width: 0 !important;
  }
  .asr-name {
    font-size: 13px !important;
    font-weight: 750 !important;
    color: var(--text) !important;
    white-space: nowrap !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    line-height: 1.15 !important;
  }
  body.dark-mode .asr-name {
    color: #f8fafc !important;
  }
  .asr-meta {
    font-size: 10.5px !important;
    font-weight: 550 !important;
    color: var(--muted) !important;
    white-space: nowrap !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
  }

  .asr-status-col {
    display: flex !important;
    align-items: center !important;
    flex-shrink: 0 !important;
  }
  .asr-status-pill {
    font-size: 10.5px !important;
    font-weight: 750 !important;
    padding: 2.5px 7px !important;
    border-radius: 6px !important;
    line-height: 1.15 !important;
    white-space: nowrap !important;
  }
  .asr-status-pill.done {
    background: rgba(22, 163, 74, 0.1) !important;
    color: #16a34a !important;
  }
  body.dark-mode .asr-status-pill.done {
    background: rgba(34, 197, 94, 0.16) !important;
    color: #4ade80 !important;
  }
  /* Neutral Gray for standard cancellation */
  .asr-status-pill.cancelled {
    background: var(--surface-2, #f1f4f9) !important;
    color: var(--muted, #64748b) !important;
  }
  body.dark-mode .asr-status-pill.cancelled {
    background: #1e2433 !important;
    color: #94a3b8 !important;
  }
  /* Neutral Gray for rescheduled */
  .asr-status-pill.resched {
    background: var(--surface-2, #f1f4f9) !important;
    color: var(--muted, #64748b) !important;
  }
  body.dark-mode .asr-status-pill.resched {
    background: #1e2433 !important;
    color: #94a3b8 !important;
  }
  /* Red only for cancellation with deduction */
  .asr-status-pill.cancelled-charged {
    background: rgba(239, 68, 68, 0.12) !important;
    color: #ef4444 !important;
    border: 1px solid rgba(239, 68, 68, 0.25) !important;
  }
  body.dark-mode .asr-status-pill.cancelled-charged {
    background: rgba(239, 68, 68, 0.2) !important;
    color: #f87171 !important;
    border-color: rgba(239, 68, 68, 0.4) !important;
  }

  /* Dimming for completed, cancelled and rescheduled lessons on desktop */
  .apple-sch-row.is-completed,
  .apple-sch-row.is-cancelled,
  .apple-sch-row.is-rescheduled {
    opacity: 0.5 !important;
    transition: opacity 0.15s ease !important;
  }
  .apple-sch-row.is-completed:hover,
  .apple-sch-row.is-cancelled:hover,
  .apple-sch-row.is-rescheduled:hover {
    opacity: 0.88 !important;
  }

  .asr-quick-done-btn {
    font-family: inherit !important;
    font-size: 11px !important;
    font-weight: 700 !important;
    padding: 3px 8px !important;
    border-radius: 6px !important;
    background: #f1f4f9 !important;
    color: var(--text) !important;
    border: 1px solid rgba(0, 0, 0, 0.04) !important;
    cursor: pointer !important;
    transition: all 0.14s ease !important;
    display: inline-flex !important;
    align-items: center !important;
    gap: 3px !important;
  }
  .asr-quick-done-btn:hover {
    background: #16a34a !important;
    color: #ffffff !important;
    border-color: #16a34a !important;
    box-shadow: 0 2px 6px rgba(22, 163, 74, 0.3) !important;
  }
  body.dark-mode .asr-quick-done-btn {
    background: #1e2433 !important;
    color: #f8fafc !important;
    border-color: rgba(255, 255, 255, 0.08) !important;
  }
  body.dark-mode .asr-quick-done-btn:hover {
    background: #16a34a !important;
    color: #ffffff !important;
  }

  .asr-actions,
  .aar-actions,
  .abr-actions {
    display: flex !important;
    align-items: center !important;
    gap: 4px !important;
    flex-shrink: 0 !important;
  }

  .asr-icon-btn,
  .abr-icon-btn {
    width: 24px !important;
    height: 24px !important;
    border-radius: 6px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    border: none !important;
    background: #f4f6f9 !important;
    font-size: 12px !important;
    cursor: pointer !important;
    transition: all 0.14s ease !important;
  }
  .asr-icon-btn:hover,
  .abr-icon-btn:hover {
    background: #e2e8f0 !important;
    transform: scale(1.08) !important;
  }
  body.dark-mode .asr-icon-btn,
  body.dark-mode .abr-icon-btn {
    background: #1e2433 !important;
  }
  body.dark-mode .asr-icon-btn:hover,
  body.dark-mode .abr-icon-btn:hover {
    background: #283044 !important;
  }

  .asr-chevron,
  .aar-chevron,
  .abr-chevron {
    color: var(--muted) !important;
    font-size: 15px !important;
    font-weight: 400 !important;
    margin-left: 1px !important;
    opacity: 0.6 !important;
  }

  /* 2. Apple Needs Attention Row */
  .apple-attn-row,
  .apple-bday-row {
    display: flex !important;
    align-items: center !important;
    gap: 9px !important;
    padding: 5px 8px !important;
    border-radius: 8px !important;
    cursor: pointer !important;
    transition: background 0.15s ease !important;
  }
  .apple-attn-row:hover,
  .apple-bday-row:hover {
    background: #f8fafc !important;
  }
  body.dark-mode .apple-attn-row:hover,
  body.dark-mode .apple-bday-row:hover {
    background: #181c27 !important;
  }

  .aar-avatar-col,
  .abr-avatar-col {
    position: relative !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    width: 28px !important;
    height: 28px !important;
    flex-shrink: 0 !important;
  }

  .aar-badge-dot,
  .abr-badge-dot {
    position: absolute !important;
    bottom: -1px !important;
    right: -1px !important;
    width: 8px !important;
    height: 8px !important;
    border-radius: 50% !important;
    border: 1.5px solid #ffffff !important;
  }
  body.dark-mode .aar-badge-dot,
  body.dark-mode .abr-badge-dot {
    border-color: #141721 !important;
  }
  .aar-badge-dot.debt { background: #ef4444 !important; }
  .aar-badge-dot.expired { background: #f97316 !important; }
  .aar-badge-dot.low { background: #eab308 !important; }

  .aar-main,
  .abr-main {
    display: flex !important;
    flex-direction: column !important;
    gap: 1px !important;
    flex: 1 !important;
    min-width: 0 !important;
  }
  .aar-name,
  .abr-name {
    font-size: 13px !important;
    font-weight: 750 !important;
    color: var(--text) !important;
    white-space: nowrap !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    line-height: 1.15 !important;
  }
  body.dark-mode .aar-name,
  body.dark-mode .abr-name {
    color: #f8fafc !important;
  }

  .aar-status-text {
    font-size: 10.5px !important;
    font-weight: 600 !important;
    white-space: nowrap !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
  }
  .aar-status-text.debt { color: #dc2626 !important; }
  .aar-status-text.expired { color: #ea580c !important; }
  .aar-status-text.low { color: #854d0e !important; }
  body.dark-mode .aar-status-text.debt { color: #f87171 !important; }
  body.dark-mode .aar-status-text.expired { color: #fb923c !important; }
  body.dark-mode .aar-status-text.low { color: #facc15 !important; }

  .aar-action-pill,
  .abr-action-pill {
    font-family: inherit !important;
    display: inline-flex !important;
    align-items: center !important;
    gap: 3px !important;
    padding: 3.5px 8px !important;
    border-radius: 6px !important;
    font-size: 11px !important;
    font-weight: 700 !important;
    background: var(--accent-soft, #f3e7e2) !important;
    color: var(--accent, #a45b46) !important;
    border: none !important;
    cursor: pointer !important;
    transition: all 0.14s ease !important;
  }
  .aar-action-pill:hover {
    background: var(--accent, #a45b46) !important;
    color: #ffffff !important;
  }
  body.dark-mode .aar-action-pill {
    background: rgba(164, 91, 70, 0.18) !important;
    color: #ff9e87 !important;
  }
  body.dark-mode .aar-action-pill:hover {
    background: var(--accent, #a45b46) !important;
    color: #ffffff !important;
  }

  .abr-date-text {
    font-size: 10.5px !important;
    font-weight: 550 !important;
    color: var(--muted) !important;
  }
  .abr-date-text.today {
    color: #db2777 !important;
    font-weight: 750 !important;
  }
  .abr-action-pill.pink {
    background: rgba(236, 72, 153, 0.1) !important;
    color: #db2777 !important;
  }
  .abr-action-pill.pink:hover {
    background: #db2777 !important;
    color: #ffffff !important;
  }

  .apple-chevron {
    width: 20px !important;
    height: 20px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    border-radius: 50% !important;
    background: transparent !important;
    border: none !important;
    color: var(--muted) !important;
    font-size: 16px !important;
    font-weight: 300 !important;
    cursor: pointer !important;
  }

  .apple-clean-empty {
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    justify-content: center !important;
    text-align: center !important;
    padding: 24px 16px !important;
    background: #fbfcfd !important;
    border: 1px dashed rgba(0, 0, 0, 0.06) !important;
    border-radius: 14px !important;
  }
  .apple-clean-empty.mini { padding: 14px 10px !important; }
  body.dark-mode .apple-clean-empty {
    background: #141721 !important;
    border-color: rgba(255, 255, 255, 0.08) !important;
  }

  .ace-icon {
    width: 40px !important;
    height: 40px !important;
    border-radius: 10px !important;
    background: #ffffff !important;
    border: 1px solid rgba(0, 0, 0, 0.06) !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    font-size: 20px !important;
    margin-bottom: 8px !important;
  }
  .ace-icon.small {
    width: 28px !important;
    height: 28px !important;
    font-size: 14px !important;
    margin-bottom: 4px !important;
  }
  body.dark-mode .ace-icon {
    background: #181c27 !important;
    border-color: rgba(255, 255, 255, 0.08) !important;
  }

  .apple-clean-empty h3 {
    margin: 0 !important;
    font-size: 13.5px !important;
    font-weight: 800 !important;
    color: var(--text) !important;
  }
  body.dark-mode .apple-clean-empty h3 {
    color: #f8fafc !important;
  }

  .apple-clean-empty p {
    margin: 3px 0 10px !important;
    font-size: 11.5px !important;
    color: var(--muted) !important;
    max-width: 300px !important;
  }
  .apple-clean-empty.mini p { margin: 0 !important; }
  body.dark-mode .apple-clean-empty p {
    color: #94a3b8 !important;
  }

  /* ==========================================================================
     Apple Native Week Summary Tiles (Apple Bento Style)
     ========================================================================== */
  .apple-week-tiles {
    display: grid !important;
    grid-template-columns: 1fr 1fr !important;
    gap: 10px !important;
    padding-top: 2px !important;
  }

  .awt-tile {
    background: #fbfcfd !important;
    border: 1px solid rgba(0, 0, 0, 0.05) !important;
    border-radius: 12px !important;
    padding: 10px 12px !important;
    display: flex !important;
    flex-direction: column !important;
    justify-content: space-between !important;
    gap: 2px !important;
    cursor: pointer !important;
    transition: all 0.15s cubic-bezier(0.16, 1, 0.3, 1) !important;
  }
  .awt-tile:hover {
    background: #f4f6fa !important;
    transform: translateY(-1px) !important;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.03) !important;
  }
  body.dark-mode .awt-tile {
    background: #181c27 !important;
    border-color: rgba(255, 255, 255, 0.07) !important;
  }
  body.dark-mode .awt-tile:hover {
    background: #212634 !important;
    border-color: rgba(255, 255, 255, 0.14) !important;
  }

  .awt-top {
    display: flex !important;
    align-items: center !important;
    gap: 6px !important;
  }
  .awt-icon {
    font-size: 13px !important;
  }
  .awt-label {
    font-size: 11px !important;
    font-weight: 700 !important;
    color: var(--muted) !important;
  }
  body.dark-mode .awt-label {
    color: #94a3b8 !important;
  }

  .awt-val {
    font-size: 18px !important;
    font-weight: 850 !important;
    color: var(--text) !important;
    letter-spacing: -0.3px !important;
    line-height: 1.15 !important;
    margin: 2px 0 1px !important;
  }
  body.dark-mode .awt-val {
    color: #f8fafc !important;
  }
  .awt-val small {
    font-size: 11.5px !important;
    font-weight: 600 !important;
    color: var(--muted) !important;
  }
  body.dark-mode .awt-val small {
    color: #94a3b8 !important;
  }

  .awt-sub {
    font-size: 10px !important;
    font-weight: 550 !important;
    color: var(--muted) !important;
  }
  body.dark-mode .awt-sub {
    color: #94a3b8 !important;
  }

  /* ==========================================================================
     Apple Native Modals (Payment Modal, Searchable Picker, Bento Summary)
     ========================================================================== */
  .apple-modal-header {
    display: flex !important;
    align-items: center !important;
    gap: 10px !important;
    padding-bottom: 12px !important;
    border-bottom: 1px solid rgba(0, 0, 0, 0.05) !important;
    margin-bottom: 12px !important;
    position: relative !important;
  }
  body.dark-mode .apple-modal-header {
    border-bottom-color: rgba(255, 255, 255, 0.08) !important;
  }
  .amh-icon-circle {
    width: 32px !important;
    height: 32px !important;
    border-radius: 9px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    font-size: 16px !important;
  }
  .amh-icon-circle.blue { background: rgba(59, 130, 246, 0.1) !important; color: #2563eb !important; }
  .amh-text { display: flex !important; flex-direction: column !important; gap: 1px !important; flex: 1 !important; }
  .amh-title { margin: 0 !important; font-size: 17px !important; font-weight: 850 !important; color: var(--text) !important; letter-spacing: -0.3px !important; }
  body.dark-mode .amh-title { color: #f8fafc !important; }
  .amh-sub { margin: 0 !important; font-size: 11.5px !important; color: var(--muted) !important; }
  body.dark-mode .amh-sub { color: #94a3b8 !important; }

  .apple-modal-form {
    display: flex !important;
    flex-direction: column !important;
    gap: 12px !important;
  }

  .apple-form-section {
    display: flex !important;
    flex-direction: column !important;
    gap: 5px !important;
  }
  .afs-label {
    font-size: 11.5px !important;
    font-weight: 750 !important;
    color: var(--text) !important;
  }
  body.dark-mode .afs-label { color: #f8fafc !important; }
  .afs-header-row {
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
  }

  .apple-form-grid-2 {
    display: grid !important;
    grid-template-columns: 1fr 1fr !important;
    gap: 10px !important;
  }
  .apple-form-group {
    display: flex !important;
    flex-direction: column !important;
    gap: 5px !important;
  }
  .afg-label {
    font-size: 11.5px !important;
    font-weight: 750 !important;
    color: var(--text) !important;
  }
  body.dark-mode .afg-label { color: #f8fafc !important; }

  .apple-modal-input {
    width: 100% !important;
    background: #f8fafc !important;
    border: 1px solid rgba(0, 0, 0, 0.08) !important;
    border-radius: 9px !important;
    padding: 7px 10px !important;
    font-size: 13px !important;
    font-weight: 650 !important;
    color: var(--text) !important;
    font-family: inherit !important;
    outline: none !important;
    transition: all 0.14s ease !important;
  }
  .apple-modal-input:focus {
    border-color: var(--accent, #a45b46) !important;
    background: #ffffff !important;
    box-shadow: 0 0 0 3px rgba(164, 91, 70, 0.15) !important;
  }
  body.dark-mode .apple-modal-input {
    background: #181c27 !important;
    border-color: rgba(255, 255, 255, 0.1) !important;
    color: #f8fafc !important;
  }
  body.dark-mode .apple-modal-input:focus {
    background: #212634 !important;
    border-color: var(--accent, #a45b46) !important;
    box-shadow: 0 0 0 3px rgba(164, 91, 70, 0.25) !important;
  }

  .apple-modal-input-mini {
    width: 60px !important;
    background: #f8fafc !important;
    border: 1px solid rgba(0, 0, 0, 0.08) !important;
    border-radius: 7px !important;
    padding: 3px 7px !important;
    font-size: 13px !important;
    font-weight: 750 !important;
    text-align: center !important;
    color: var(--text) !important;
    font-family: inherit !important;
  }
  body.dark-mode .apple-modal-input-mini {
    background: #181c27 !important;
    border-color: rgba(255, 255, 255, 0.1) !important;
    color: #f8fafc !important;
  }

  /* Searchable Student Picker */
  .apple-student-search-container {
    position: relative !important;
    width: 100% !important;
  }
  .ass-input-wrap {
    position: relative !important;
    display: flex !important;
    align-items: center !important;
  }
  .ass-search-icon {
    position: absolute !important;
    left: 10px !important;
    font-size: 13px !important;
    color: var(--muted) !important;
    pointer-events: none !important;
  }
  .apple-student-search-input {
    width: 100% !important;
    background: #f8fafc !important;
    border: 1px solid rgba(0, 0, 0, 0.08) !important;
    border-radius: 9px !important;
    padding: 8px 12px 8px 32px !important;
    font-size: 13px !important;
    font-weight: 600 !important;
    color: var(--text) !important;
    font-family: inherit !important;
    outline: none !important;
    transition: all 0.14s ease !important;
  }
  .apple-student-search-input:focus {
    background: #ffffff !important;
    border-color: var(--accent, #a45b46) !important;
    box-shadow: 0 0 0 3px rgba(164, 91, 70, 0.15) !important;
  }
  body.dark-mode .apple-student-search-input {
    background: #181c27 !important;
    border-color: rgba(255, 255, 255, 0.1) !important;
    color: #f8fafc !important;
  }
  body.dark-mode .apple-student-search-input:focus {
    background: #212634 !important;
    border-color: var(--accent, #a45b46) !important;
  }

  .apple-student-dropdown {
    position: absolute !important;
    top: calc(100% + 4px) !important;
    left: 0 !important;
    right: 0 !important;
    max-height: 200px !important;
    overflow-y: auto !important;
    background: #ffffff !important;
    border: 1px solid rgba(0, 0, 0, 0.08) !important;
    border-radius: 11px !important;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1) !important;
    z-index: 1000 !important;
    padding: 4px !important;
    display: flex !important;
    flex-direction: column !important;
    gap: 2px !important;
  }
  body.dark-mode .apple-student-dropdown {
    background: #181c27 !important;
    border-color: rgba(255, 255, 255, 0.12) !important;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.5) !important;
  }

  .ass-dropdown-item {
    display: flex !important;
    align-items: center !important;
    gap: 8px !important;
    padding: 6px 8px !important;
    border-radius: 7px !important;
    cursor: pointer !important;
    transition: background 0.12s ease !important;
  }
  .ass-dropdown-item:hover {
    background: #f1f4f9 !important;
  }
  body.dark-mode .ass-dropdown-item:hover {
    background: #242a3a !important;
  }

  .ass-item-avatar {
    width: 28px !important;
    height: 28px !important;
    flex-shrink: 0 !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
  }
  .ass-item-main {
    display: flex !important;
    flex-direction: column !important;
    flex: 1 !important;
    min-width: 0 !important;
    gap: 1px !important;
  }
  .ass-item-name {
    font-size: 13px !important;
    font-weight: 750 !important;
    color: var(--text) !important;
    white-space: nowrap !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
  }
  body.dark-mode .ass-item-name { color: #f8fafc !important; }
  .ass-item-meta {
    font-size: 11px !important;
    color: var(--muted) !important;
  }
  body.dark-mode .ass-item-meta { color: #94a3b8 !important; }
  .ass-item-price {
    font-size: 12px !important;
    font-weight: 750 !important;
    color: #16a34a !important;
    flex-shrink: 0 !important;
  }
  .ass-empty-msg {
    padding: 12px !important;
    text-align: center !important;
    font-size: 12px !important;
    color: var(--muted) !important;
  }

  /* Selected Student Chip */
  .apple-selected-student-chip {
    display: flex !important;
    align-items: center !important;
    gap: 9px !important;
    background: #f8fafc !important;
    border: 1px solid rgba(0, 0, 0, 0.06) !important;
    border-radius: 10px !important;
    padding: 7px 10px !important;
  }
  body.dark-mode .apple-selected-student-chip {
    background: #181c27 !important;
    border-color: rgba(255, 255, 255, 0.08) !important;
  }
  .ass-avatar {
    width: 32px !important;
    height: 32px !important;
    flex-shrink: 0 !important;
  }
  .ass-info {
    display: flex !important;
    flex-direction: column !important;
    gap: 1px !important;
    flex: 1 !important;
    min-width: 0 !important;
  }
  .ass-name {
    font-size: 13.5px !important;
    font-weight: 800 !important;
    color: var(--text) !important;
  }
  body.dark-mode .ass-name { color: #f8fafc !important; }
  .ass-sub {
    font-size: 11px !important;
    color: var(--muted) !important;
  }
  body.dark-mode .ass-sub { color: #94a3b8 !important; }
  .ass-change-btn {
    background: #ffffff !important;
    border: 1px solid rgba(0, 0, 0, 0.08) !important;
    border-radius: 6px !important;
    padding: 3px 8px !important;
    font-size: 11px !important;
    font-weight: 700 !important;
    color: var(--text) !important;
    cursor: pointer !important;
    transition: all 0.14s ease !important;
  }
  .ass-change-btn:hover {
    background: #f1f4f9 !important;
  }
  body.dark-mode .ass-change-btn {
    background: #242a3a !important;
    border-color: rgba(255, 255, 255, 0.12) !important;
    color: #f8fafc !important;
  }

  /* Quick Pills */
  .apple-quick-pills {
    display: flex !important;
    gap: 5px !important;
    flex-wrap: wrap !important;
    margin-top: 3px !important;
  }
  .aq-pill {
    background: #f4f6fa !important;
    border: 1px solid rgba(0, 0, 0, 0.04) !important;
    border-radius: 7px !important;
    padding: 4px 10px !important;
    font-size: 11.5px !important;
    font-weight: 700 !important;
    color: var(--text) !important;
    cursor: pointer !important;
    transition: all 0.14s ease !important;
  }
  .aq-pill:hover {
    background: #e9ecf2 !important;
  }
  .aq-pill.is-active {
    background: var(--accent, #a45b46) !important;
    color: #ffffff !important;
    border-color: var(--accent, #a45b46) !important;
    box-shadow: 0 2px 6px rgba(164, 91, 70, 0.3) !important;
  }
  body.dark-mode .aq-pill {
    background: #181c27 !important;
    border-color: rgba(255, 255, 255, 0.08) !important;
    color: #f8fafc !important;
  }
  body.dark-mode .aq-pill:hover {
    background: #242a3a !important;
  }
  body.dark-mode .aq-pill.is-active {
    background: var(--accent, #a45b46) !important;
    color: #ffffff !important;
    border-color: var(--accent, #a45b46) !important;
  }

  /* Total Banner */
  .apple-total-banner {
    background: linear-gradient(135deg, rgba(164, 91, 70, 0.06) 0%, rgba(164, 91, 70, 0.02) 100%) !important;
    border: 1px solid rgba(164, 91, 70, 0.2) !important;
    border-radius: 11px !important;
    padding: 9px 12px !important;
    display: flex !important;
    justify-content: space-between !important;
    align-items: center !important;
    margin-top: 4px !important;
  }
  body.dark-mode .apple-total-banner {
    background: rgba(164, 91, 70, 0.12) !important;
    border-color: rgba(164, 91, 70, 0.28) !important;
  }
  .atb-left { display: flex !important; flex-direction: column !important; gap: 1px !important; }
  .atb-label { font-size: 11px !important; font-weight: 700 !important; color: var(--accent, #a45b46) !important; }
  body.dark-mode .atb-label { color: #ff9e87 !important; }
  .atb-calc { font-size: 11.5px !important; color: var(--muted) !important; }
  body.dark-mode .atb-calc { color: #94a3b8 !important; }
  .atb-total { font-size: 20px !important; font-weight: 850 !important; color: var(--text) !important; letter-spacing: -0.3px !important; }
  body.dark-mode .atb-total { color: #f8fafc !important; }

  /* Modal Actions */
  .apple-modal-actions {
    display: flex !important;
    justify-content: flex-end !important;
    gap: 8px !important;
    margin-top: 8px !important;
  }
  .apple-modal-btn {
    font-family: inherit !important;
    display: inline-flex !important;
    align-items: center !important;
    gap: 5px !important;
    padding: 7px 15px !important;
    border-radius: 9px !important;
    font-size: 12.5px !important;
    font-weight: 750 !important;
    cursor: pointer !important;
    transition: all 0.14s ease !important;
  }
  .apple-modal-btn.cancel {
    background: #f4f6fa !important;
    color: var(--text) !important;
    border: 1px solid rgba(0, 0, 0, 0.06) !important;
  }
  .apple-modal-btn.cancel:hover { background: #e9ecf2 !important; }
  body.dark-mode .apple-modal-btn.cancel {
    background: #181c27 !important;
    border-color: rgba(255, 255, 255, 0.08) !important;
    color: #f8fafc !important;
  }
  .apple-modal-btn.submit {
    background: var(--accent, #a45b46) !important;
    color: #ffffff !important;
    border: 1px solid var(--accent, #a45b46) !important;
    box-shadow: 0 2px 8px rgba(164, 91, 70, 0.25) !important;
  }
  .apple-modal-btn.submit:hover {
    background: #8b4937 !important;
    border-color: #8b4937 !important;
    transform: translateY(-1px) !important;
  }

  /* ==========================================================================
     Desktop Schedule Overhaul (Time on top, Student full name on body)
     ========================================================================== */
  .apple-sch-toolbar {
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    background: #ffffff !important;
    border: 1px solid rgba(0, 0, 0, 0.05) !important;
    border-radius: 16px !important;
    padding: 10px 16px !important;
    margin-bottom: 16px !important;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.015) !important;
    gap: 12px !important;
  }
  .ast-left { display: flex !important; align-items: center !important; gap: 10px !important; }
  .ast-title { margin: 0 !important; font-size: 22px !important; font-weight: 850 !important; letter-spacing: -0.5px !important; color: var(--text) !important; margin-right: 6px !important; }
  .ast-nav-group { display: flex !important; align-items: center !important; gap: 4px !important; background: #f4f6f9 !important; border: 1px solid rgba(0, 0, 0, 0.04) !important; border-radius: 10px !important; padding: 3px 5px !important; }
  .ast-nav-btn { width: 26px !important; height: 26px !important; border-radius: 7px !important; display: flex !important; align-items: center !important; justify-content: center !important; background: transparent !important; border: none !important; color: var(--text) !important; font-size: 16px !important; font-weight: 700 !important; cursor: pointer !important; }
  .ast-nav-btn:hover { background: #ffffff !important; box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08) !important; }
  .ast-date-label { display: flex !important; align-items: center !important; gap: 6px !important; padding: 0 8px !important; font-size: 13px !important; font-weight: 800 !important; color: var(--text) !important; cursor: pointer !important; }
  .ast-cal-icon { font-size: 13px !important; }
  .ast-today-pill { background: #ffffff !important; border: 1px solid rgba(0, 0, 0, 0.08) !important; border-radius: 8px !important; padding: 5px 12px !important; font-size: 12px !important; font-weight: 750 !important; color: var(--text) !important; cursor: pointer !important; }
  .ast-today-pill.is-current { background: rgba(164, 91, 70, 0.08) !important; color: var(--accent, #a45b46) !important; border-color: rgba(164, 91, 70, 0.2) !important; }
  .ast-right { display: flex !important; align-items: center !important; gap: 8px !important; }
  .apple-segmented-control { display: flex !important; align-items: center !important; background: #f4f6f9 !important; border: 1px solid rgba(0, 0, 0, 0.04) !important; border-radius: 10px !important; padding: 3px !important; gap: 2px !important; }
  .asc-item { padding: 5px 12px !important; border-radius: 7px !important; font-size: 12px !important; font-weight: 700 !important; color: var(--muted) !important; border: none !important; background: transparent !important; cursor: pointer !important; }
  .asc-item.active { background: #ffffff !important; color: var(--text) !important; font-weight: 800 !important; box-shadow: 0 1px 4px rgba(0, 0, 0, 0.06) !important; }

  .apple-format-filters { display: flex !important; align-items: center !important; gap: 4px !important; background: #f4f6f9 !important; border: 1px solid rgba(0, 0, 0, 0.04) !important; border-radius: 10px !important; padding: 3px !important; }
  .aff-btn { display: inline-flex !important; align-items: center !important; gap: 5px !important; padding: 5px 10px !important; border-radius: 7px !important; font-size: 12px !important; font-weight: 700 !important; border: 1px solid transparent !important; background: transparent !important; cursor: pointer !important; color: var(--muted) !important; }
  .aff-dot { width: 7px !important; height: 7px !important; border-radius: 50% !important; }
  .aff-dot.ind { background: #3b82f6 !important; }
  .aff-dot.pair { background: #10b981 !important; }
  .aff-dot.group { background: #8b5cf6 !important; }
  .aff-btn.all.active { background: #ffffff !important; color: var(--text) !important; font-weight: 800 !important; box-shadow: 0 1px 4px rgba(0, 0, 0, 0.06) !important; }
  .aff-btn.ind { color: #2563eb !important; }
  .aff-btn.ind.active { background: #3b82f6 !important; color: #ffffff !important; font-weight: 800 !important; }
  .aff-btn.ind.active .aff-dot.ind { background: #ffffff !important; }
  .aff-btn.pair { color: #059669 !important; }
  .aff-btn.pair.active { background: #10b981 !important; color: #ffffff !important; font-weight: 800 !important; }
  .aff-btn.pair.active .aff-dot.pair { background: #ffffff !important; }
  .aff-btn.group { color: #7c3aed !important; }
  .aff-btn.group.active { background: #8b5cf6 !important; color: #ffffff !important; font-weight: 800 !important; }
  .aff-btn.group.active .aff-dot.group { background: #ffffff !important; }

  .seven-col-schedule-grid {
    display: grid !important;
    grid-template-columns: repeat(7, minmax(0, 1fr)) !important;
    gap: 12px !important;
    align-items: stretch !important;
  }
  .col-day-box {
    background: #ffffff !important;
    border: 1px solid rgba(0, 0, 0, 0.05) !important;
    border-radius: 16px !important;
    display: flex !important;
    flex-direction: column !important;
    min-height: 480px !important;
    overflow: hidden !important;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.015) !important;
  }
  .col-day-box.is-today {
    border-color: rgba(164, 91, 70, 0.25) !important;
    box-shadow: 0 0 0 1px rgba(164, 91, 70, 0.4), 0 3px 10px rgba(164, 91, 70, 0.05) !important;
  }
  .col-day-head {
    display: flex !important;
    justify-content: space-between !important;
    align-items: center !important;
    padding: 10px 12px 8px !important;
    background: #fbfcfd !important;
    border-bottom: 1px solid rgba(0, 0, 0, 0.04) !important;
  }
  .col-day-head.head-today { background: rgba(164, 91, 70, 0.04) !important; }
  .cd-day-name { font-size: 13.5px !important; font-weight: 850 !important; color: var(--text) !important; line-height: 1.15 !important; }
  .cd-day-name.is-today-name { color: var(--accent, #a45b46) !important; font-weight: 900 !important; }
  body.dark-mode .cd-day-name.is-today-name { color: #ff9e87 !important; }
  .cd-date-num { font-size: 11px !important; color: var(--muted) !important; font-weight: 650 !important; }
  .cd-date-num.is-today-num { color: var(--accent, #a45b46) !important; font-weight: 750 !important; }
  body.dark-mode .cd-date-num.is-today-num { color: #ff9e87 !important; }
  .cdh-actions { display: flex !important; align-items: center !important; gap: 4px !important; }
  .cd-add-btn { border: 1px solid rgba(0, 0, 0, 0.08) !important; background: #ffffff !important; color: var(--muted) !important; border-radius: 6px !important; width: 22px !important; height: 22px !important; display: flex !important; align-items: center !important; justify-content: center !important; font-size: 13px !important; font-weight: 800 !important; cursor: pointer !important; padding: 0 !important; }
  .cd-add-btn:hover { border-color: var(--accent, #a45b46) !important; color: var(--accent, #a45b46) !important; background: rgba(164, 91, 70, 0.08) !important; }
  .col-day-lessons { padding: 9px 8px !important; display: flex !important; flex-direction: column !important; gap: 8px !important; flex: 1 !important; }

  /* Structured Apple Pro Card: Header (Time + Status) & Body (Full Width Name) */
  .col-lesson-card.compact {
    background: #ffffff !important;
    border: 1px solid rgba(0, 0, 0, 0.05) !important;
    border-left: 3.5px solid #3b82f6 !important;
    border-radius: 10px !important;
    padding: 7px 9px 8px !important;
    display: flex !important;
    flex-direction: column !important;
    gap: 4px !important;
    cursor: pointer !important;
    transition: transform 0.14s ease, box-shadow 0.14s ease, border-color 0.14s ease !important;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.02) !important;
    text-align: left !important;
    box-sizing: border-box !important;
    width: 100% !important;
  }
  .col-lesson-card.compact:hover { transform: translateY(-1px) !important; box-shadow: 0 3px 10px rgba(0, 0, 0, 0.05) !important; border-color: rgba(0, 0, 0, 0.14) !important; }
  .col-lesson-card.compact.type-individual { border-left-color: #3b82f6 !important; }
  .col-lesson-card.compact.type-pair { border-left-color: #10b981 !important; }
  .col-lesson-card.compact.type-group { border-left-color: #8b5cf6 !important; }

  .clc-card-header {
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    width: 100% !important;
  }
  .clc-time-pill {
    font-size: 11px !important;
    font-weight: 800 !important;
    color: var(--text) !important;
    background: #f1f4f8 !important;
    padding: 1.5px 5px !important;
    border-radius: 4px !important;
    line-height: 1.1 !important;
  }
  .clc-icon { font-size: 11.5px !important; font-weight: 900 !important; line-height: 1 !important; }
  .clc-icon.done { color: #16a34a !important; }
  .clc-icon.cancelled { color: #dc2626 !important; }
  .clc-icon.rescheduled { color: #d97706 !important; }

  .clc-card-body {
    display: flex !important;
    flex-direction: column !important;
    gap: 0.5px !important;
    width: 100% !important;
  }
  .clc-student-name {
    font-size: 12.5px !important;
    font-weight: 750 !important;
    color: var(--text) !important;
    line-height: 1.25 !important;
    white-space: normal !important;
    word-break: normal !important;
    overflow-wrap: break-word !important;
  }
  .clc-student-name.strike-name {
    text-decoration: line-through !important;
    color: var(--muted) !important;
    font-weight: 550 !important;
  }

  .clc-offline-pill {
    font-size: 9px !important;
    font-weight: 700 !important;
    color: var(--muted) !important;
    background: #f1f4f8 !important;
    padding: 1px 4px !important;
    border-radius: 3px !important;
    align-self: flex-start !important;
  }

  /* ==========================================================================
     Time Grid ("Сітка") 2-Row Name Cards (50px slot, 44px card, zero horizontal scroll)
     ========================================================================== */
  .schedule-grid {
    display: grid !important;
    grid-template-columns: 54px 1fr !important;
    width: 100% !important;
    max-height: calc(100vh - 170px) !important;
    min-height: 520px !important;
    box-sizing: border-box !important;
    overflow-y: auto !important;
    overflow-x: hidden !important;
    background: #ffffff !important;
    border: 1px solid #cbd5e1 !important;
    border-radius: 14px !important;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.02) !important;
  }
  .time-axis {
    display: grid !important;
    grid-template-rows: 38px repeat(14, 50px) !important;
    height: 738px !important;
    width: 54px !important;
    min-width: 54px !important;
    max-width: 54px !important;
    box-sizing: border-box !important;
    background: #f8fafc !important;
    border-right: 1px solid #e2e8f0 !important;
  }
  .time-axis-head {
    height: 38px !important;
    box-sizing: border-box !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    font-size: 11px !important;
    font-weight: 750 !important;
    color: #64748b !important;
    border-bottom: 1px solid #e2e8f0 !important;
    background: #f8fafc !important;
    position: sticky !important;
    top: 0 !important;
    z-index: 10 !important;
  }
  .time-label {
    height: 50px !important;
    min-height: 50px !important;
    max-height: 50px !important;
    box-sizing: border-box !important;
    display: flex !important;
    align-items: flex-start !important;
    justify-content: center !important;
    padding: 4px 0 0 0 !important;
    font-size: 11px !important;
    font-weight: 750 !important;
    color: #64748b !important;
    border-bottom: 1px solid #e2e8f0 !important;
    line-height: 12px !important;
    position: static !important;
    transform: none !important;
  }
  .schedule-days {
    display: grid !important;
    grid-template-columns: repeat(7, 1fr) !important;
    height: 738px !important;
    width: 100% !important;
    min-width: 0 !important;
    gap: 0 !important;
    background: #ffffff !important;
  }
  .schedule-grid .schedule-day {
    display: grid !important;
    grid-template-rows: 38px 700px !important;
    min-width: 0 !important;
    width: 100% !important;
    height: 738px !important;
    margin: 0 !important;
    padding: 0 !important;
    border: 0 !important;
    border-right: 1px solid #e2e8f0 !important;
    border-radius: 0 !important;
    background: #ffffff !important;
    box-shadow: none !important;
  }
  .schedule-grid .schedule-day:last-child {
    border-right: 0 !important;
  }
  .schedule-grid .schedule-day.is-today {
    background: rgba(164, 91, 70, 0.015) !important;
  }
  .schedule-day-head {
    height: 38px !important;
    min-height: 38px !important;
    max-height: 38px !important;
    margin: 0 !important;
    padding: 0 6px !important;
    box-sizing: border-box !important;
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    border: 0 !important;
    border-bottom: 1px solid #e2e8f0 !important;
    background: #ffffff !important;
    position: sticky !important;
    top: 0 !important;
    z-index: 10 !important;
  }
  .schedule-grid .schedule-day.is-today .schedule-day-head {
    background: rgba(164, 91, 70, 0.05) !important;
  }
  .sdh-title {
    display: flex !important;
    align-items: baseline !important;
    gap: 3px !important;
  }
  .sdh-title strong {
    font-size: 12px !important;
    font-weight: 850 !important;
    color: var(--text) !important;
  }
  .sdh-title span {
    font-size: 10px !important;
    color: var(--muted) !important;
    font-weight: 650 !important;
  }
  .schedule-day-body {
    position: relative !important;
    width: 100% !important;
    height: 700px !important;
    min-height: 700px !important;
    max-height: 700px !important;
    margin: 0 !important;
    padding: 0 !important;
    box-sizing: border-box !important;
    display: grid !important;
    grid-template-rows: repeat(14, 50px) !important;
    background: #ffffff !important;
  }
  .time-slot {
    height: 50px !important;
    min-height: 50px !important;
    max-height: 50px !important;
    box-sizing: border-box !important;
    border-bottom: 1px solid #e2e8f0 !important;
    cursor: pointer !important;
    background: transparent !important;
  }
  .time-slot:hover {
    background: rgba(164, 91, 70, 0.06) !important;
  }

  /* Standardized Schedule Item in Grid (100% identical to col-lesson-card) */
  .schedule-grid .schedule-item {
    position: absolute !important;
    left: 2px !important;
    right: 2px !important;
    top: var(--lesson-top, 0px) !important;
    height: 48px !important;
    min-height: 48px !important;
    max-height: 48px !important;
    padding: 4px 6px !important;
    box-sizing: border-box !important;
    display: flex !important;
    flex-direction: column !important;
    justify-content: space-between !important;
    border-radius: 8px !important;
    background: #ffffff !important;
    border: 1px solid var(--line) !important;
    border-left: 3.5px solid #2563eb !important;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.03) !important;
    cursor: pointer !important;
    z-index: 5 !important;
    transition: transform 0.15s ease, box-shadow 0.15s ease, border-color 0.15s ease !important;
    overflow: hidden !important;
    text-align: left !important;
    user-select: none !important;
  }
  .schedule-grid .schedule-item:hover {
    transform: translateY(-1px) !important;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.07) !important;
    border-color: var(--accent) !important;
    z-index: 10 !important;
  }
  .schedule-grid .schedule-item.type-individual {
    background: #f0f7ff !important;
    border-color: #c7dcfb !important;
    border-left-color: #2563eb !important;
  }
  .schedule-grid .schedule-item.type-pair {
    background: #f0fdf4 !important;
    border-color: #bbf7d0 !important;
    border-left-color: #16a34a !important;
  }
  .schedule-grid .schedule-item.type-group {
    background: #faf5ff !important;
    border-color: #e9d5ff !important;
    border-left-color: #9333ea !important;
  }

  .sch-card-inner {
    display: flex !important;
    flex-direction: column !important;
    justify-content: space-between !important;
    width: 100% !important;
    height: 100% !important;
    box-sizing: border-box !important;
    font-family: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", system-ui, sans-serif !important;
    gap: 1px !important;
  }

  .sch-card-header {
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    width: 100% !important;
    height: 12px !important;
    line-height: 12px !important;
    margin-bottom: 0px !important;
    flex-shrink: 0 !important;
  }

  .sch-card-time {
    font-family: inherit !important;
    font-size: 10px !important;
    font-weight: 800 !important;
    color: #64748b !important;
    line-height: 1 !important;
    letter-spacing: -0.2px !important;
    white-space: nowrap !important;
    background: transparent !important;
    padding: 0 !important;
    border: 0 !important;
  }
  body.dark-mode .sch-card-time {
    color: #94a3b8 !important;
  }

  .sch-card-badges {
    display: flex !important;
    align-items: center !important;
    gap: 3px !important;
    flex-shrink: 0 !important;
  }

  .sch-card-offline {
    font-size: 9px !important;
    line-height: 1 !important;
  }

  .sch-card-status {
    font-family: inherit !important;
    font-size: 11px !important;
    font-weight: 900 !important;
    line-height: 1 !important;
  }
  .sch-card-status.status-done,
  .sch-card-status.status-done-debt { color: #16a34a !important; }
  .sch-card-status.status-cancelled,
  .sch-card-status.status-no-show { color: #dc2626 !important; }
  .sch-card-status.status-rescheduled { color: #d97706 !important; }

  .sch-card-body {
    display: flex !important;
    flex-direction: column !important;
    justify-content: center !important;
    gap: 0px !important;
    width: 100% !important;
    height: 26px !important;
    min-height: 26px !important;
    text-align: left !important;
    flex-shrink: 0 !important;
  }

  .sch-card-name {
    font-family: inherit !important;
    font-size: 11.5px !important;
    font-weight: 700 !important;
    color: #0f172a !important;
    line-height: 1.15 !important;
    white-space: nowrap !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    display: block !important;
    padding: 0 !important;
    margin: 0 !important;
    width: 100% !important;
  }
  body.dark-mode .sch-card-name {
    color: #f8fafc !important;
  }

  .strike-name .sch-card-name {
    text-decoration: line-through !important;
    color: #94a3b8 !important;
    opacity: 0.75 !important;
  }

  /* Muted styles */
  .schedule-grid .schedule-item.status-completed {
    opacity: 0.75 !important;
    background: #f1f5f9 !important;
    border-color: #cbd5e1 !important;
  }
  .schedule-grid .schedule-item.status-cancelled:not(.status-cancelled-charged):not(.is-deducted),
  .schedule-grid .schedule-item.status-no-show:not(.status-cancelled-charged):not(.is-deducted),
  .schedule-grid .schedule-item.status-rescheduled {
    opacity: 0.45 !important;
    background: #f8fafc !important;
    border-color: #e2e8f0 !important;
    border-left-color: #94a3b8 !important;
  }
  .schedule-grid .schedule-item.status-cancelled-charged,
  .schedule-grid .schedule-item.is-deducted {
    opacity: 0.92 !important;
    background: #fef2f2 !important;
    border-color: #fecaca !important;
    border-left-color: #ef4444 !important;
  }

  /* ABSOLUTELY SUPPRESS ALL DUPLICATE ::before AND ::after PSEUDO ICONS */
  .schedule-item::before,
  .schedule-item::after,
  .schedule-grid .schedule-item::before,
  .schedule-grid .schedule-item::after,
  .schedule-day-body .schedule-item::before,
  .schedule-day-body .schedule-item::after {
    content: none !important;
    display: none !important;
  }

  /* Dark mode for Desktop Toolbar & 7-Col Schedule ("По днях") */
  body.dark-mode .apple-sch-toolbar {
    background: #141721 !important;
    border-color: rgba(255, 255, 255, 0.08) !important;
    box-shadow: none !important;
  }
  body.dark-mode .ast-title {
    color: #f8fafc !important;
  }
  body.dark-mode .ast-today-pill {
    background: #181c27 !important;
    border-color: rgba(255, 255, 255, 0.1) !important;
    color: #f8fafc !important;
  }
  body.dark-mode .ast-today-pill.is-current {
    background: rgba(164, 91, 70, 0.25) !important;
    color: #ff9e87 !important;
    border-color: rgba(164, 91, 70, 0.4) !important;
  }
  body.dark-mode .ast-nav-group {
    background: #181c27 !important;
    border-color: rgba(255, 255, 255, 0.08) !important;
  }
  body.dark-mode .ast-nav-btn {
    color: #f8fafc !important;
  }
  body.dark-mode .ast-nav-btn:hover {
    background: #222736 !important;
  }
  body.dark-mode .ast-date-label {
    color: #f8fafc !important;
  }
  body.dark-mode .apple-segmented-control {
    background: #181c27 !important;
    border-color: rgba(255, 255, 255, 0.08) !important;
  }
  body.dark-mode .asc-item {
    color: #94a3b8 !important;
  }
  body.dark-mode .asc-item.active {
    background: #222736 !important;
    color: #f8fafc !important;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.3) !important;
  }
  body.dark-mode .apple-format-filters {
    background: #181c27 !important;
    border-color: rgba(255, 255, 255, 0.08) !important;
  }
  body.dark-mode .aff-btn {
    color: #94a3b8 !important;
  }
  body.dark-mode .aff-btn.all.active {
    background: #222736 !important;
    color: #f8fafc !important;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.3) !important;
  }
  body.dark-mode .col-day-box {
    background: #141721 !important;
    border-color: rgba(255, 255, 255, 0.08) !important;
    box-shadow: none !important;
  }
  body.dark-mode .col-day-box.is-today {
    border-color: rgba(164, 91, 70, 0.45) !important;
    box-shadow: 0 0 0 1px rgba(164, 91, 70, 0.5), 0 3px 10px rgba(0, 0, 0, 0.25) !important;
  }
  body.dark-mode .col-day-head {
    background: #181c27 !important;
    border-bottom-color: rgba(255, 255, 255, 0.08) !important;
  }
  body.dark-mode .cd-day-name {
    color: #f8fafc !important;
  }
  body.dark-mode .cd-date-num {
    color: #94a3b8 !important;
  }
  body.dark-mode .cd-add-btn {
    background: #181c27 !important;
    border-color: rgba(255, 255, 255, 0.1) !important;
    color: #94a3b8 !important;
  }
  body.dark-mode .cd-add-btn:hover {
    background: rgba(164, 91, 70, 0.2) !important;
    color: #ff9e87 !important;
    border-color: #a45b46 !important;
  }
  body.dark-mode .col-day-empty {
    background: #181c27 !important;
    border-color: rgba(255, 255, 255, 0.1) !important;
    color: #94a3b8 !important;
  }

  /* Dark mode for Time Grid ("Сітка") */
  body.dark-mode .schedule-grid {
    background: #141721 !important;
    border-color: rgba(255, 255, 255, 0.08) !important;
  }
  body.dark-mode .schedule-grid .time-axis {
    background: #181c27 !important;
    border-right-color: rgba(255, 255, 255, 0.08) !important;
  }
  body.dark-mode .schedule-grid .time-axis-head {
    background: #181c27 !important;
    border-bottom-color: rgba(255, 255, 255, 0.08) !important;
  }
  body.dark-mode .schedule-grid .time-label {
    background: #181c27 !important;
    border-bottom-color: rgba(255, 255, 255, 0.1) !important;
    color: #94a3b8 !important;
  }
  body.dark-mode .schedule-grid .schedule-days {
    background: #141721 !important;
  }
  body.dark-mode .schedule-grid .schedule-day {
    background: #141721 !important;
    border-right-color: rgba(255, 255, 255, 0.1) !important;
  }
  body.dark-mode .schedule-grid .schedule-day-head {
    background: #181c27 !important;
    border-bottom-color: rgba(255, 255, 255, 0.1) !important;
  }
  body.dark-mode .schedule-grid .schedule-day-body {
    background: #141721 !important;
  }
  body.dark-mode .schedule-grid .time-slot {
    border-bottom-color: rgba(255, 255, 255, 0.1) !important;
  }
  body.dark-mode .schedule-grid .schedule-item.type-individual {
    background: rgba(37, 99, 235, 0.14) !important;
    border-color: rgba(59, 130, 246, 0.28) !important;
    border-left-color: #60a5fa !important;
  }
  body.dark-mode .schedule-grid .schedule-item.type-pair {
    background: rgba(22, 163, 74, 0.14) !important;
    border-color: rgba(34, 197, 94, 0.28) !important;
    border-left-color: #4ade80 !important;
  }
  body.dark-mode .schedule-grid .schedule-item.type-group {
    background: rgba(147, 51, 234, 0.14) !important;
    border-color: rgba(168, 85, 247, 0.28) !important;
    border-left-color: #c084fc !important;
  }
  body.dark-mode .schedule-grid .schedule-item.status-completed {
    background: rgba(255, 255, 255, 0.05) !important;
    border-color: rgba(255, 255, 255, 0.1) !important;
  }
  body.dark-mode .schedule-grid .schedule-item.status-cancelled,
  body.dark-mode .schedule-grid .schedule-item.status-no-show,
  body.dark-mode .schedule-grid .schedule-item.status-rescheduled {
    background: rgba(255, 255, 255, 0.03) !important;
    border-color: rgba(255, 255, 255, 0.08) !important;
  }
  body.dark-mode .sch-card-time,
  body.dark-mode .clc-card-time {
    background: transparent !important;
    color: #94a3b8 !important;
  }
  body.dark-mode .sch-card-name,
  body.dark-mode .clc-card-name {
    color: #f8fafc !important;
  }
}

@keyframes modalPop {
  0% { transform: scale(0.92); opacity: 0; }
  100% { transform: scale(1); opacity: 1; }
}

.confirm-modalback .modal {
  animation: modalPop 0.18s cubic-bezier(0.16, 1, 0.3, 1);
}

.quick-search-modal {
  animation: modalPop 0.18s cubic-bezier(0.16, 1, 0.3, 1);
}

/* ==========================================================================
   DESKTOP AUDIT FIXES & POLISH (01.09.2026)
   ========================================================================== */

/* 1. Base Location Badge Pill */
.location-badge-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 2px 6px;
  border-radius: 5px;
  font-size: 11px;
  background: var(--surface-2, #f1f5f9);
  border: 1px solid var(--line, #e2e8f0);
  line-height: 1.2;
}
body.dark-mode .location-badge-pill {
  background: #1c212d;
  border-color: rgba(255, 255, 255, 0.08);
}

/* 2. Badge Blue */
.badge.blue {
  background: rgba(59, 130, 246, 0.1);
  color: #2563eb;
}
body.dark-mode .badge.blue {
  background: rgba(59, 130, 246, 0.18);
  color: #60a5fa;
}

/* 3. KPI Tone Overrides */
.apple-kpi-card.tone-terracotta,
.apple-kpi-card.terracotta-tone {
  border-color: rgba(164, 91, 70, 0.25);
}
.apple-kpi-card.tone-green {
  border-color: rgba(22, 163, 74, 0.25);
}
.apple-kpi-card.tone-blue {
  border-color: rgba(59, 130, 246, 0.25);
}
.apple-kpi-card.tone-amber {
  border-color: rgba(245, 158, 11, 0.25);
}
.apple-kpi-card.tone-purple {
  border-color: rgba(139, 92, 246, 0.25);
}

/* 4. Desktop Modal Max-Width Constraints */
@media (min-width: 769px) {
  .modal:has(#paymentForm),
  .modal:has(.apple-modal-header) {
    max-width: 500px !important;
  }
  .modal:has(.lesson-clean-modal-head) {
    max-width: 620px !important;
  }
  .modal:has(#cancel_reason) {
    max-width: 500px !important;
  }
  .modal:has(#rd) {
    max-width: 480px !important;
  }
  .modal:has(#eloc) {
    max-width: 560px !important;
  }
  .modal:has(#tgMessageText) {
    max-width: 560px !important;
  }
  .modal:has(#modal_tpl_text) {
    max-width: 560px !important;
  }
  .modal:has(#bankCardsList) {
    max-width: 580px !important;
  }
  .modal:has(#report_copy_area) {
    max-width: 560px !important;
  }
  .modal:has(#sf) {
    max-width: 580px !important;
  }
  .modal:has(.group-clean-modal-wrap) {
    max-width: 680px !important;
  }

  /* 2x2 fallback for Finance KPI cards on compact desktops */
  @media (max-width: 1120px) {
    .apple-kpi-grid.fin-kpi-grid {
      grid-template-columns: repeat(2, 1fr) !important;
    }
  }
}

/* 5. Apple Button Component for Desktop */
.apple-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  border-radius: 9px;
  font-size: 13px;
  font-weight: 700;
  padding: 8px 14px;
  border: 1px solid var(--line, #e2e8f0);
  background: var(--card, #ffffff);
  color: var(--text, #1d222b);
  cursor: pointer;
  transition: all 0.14s ease;
  text-decoration: none;
  font-family: inherit;
}
.apple-btn:hover {
  background: var(--surface-2, #f1f5f9);
  border-color: #cbd5e1;
}
.apple-btn.apple-btn-primary {
  background: var(--accent, #a45b46) !important;
  color: #ffffff !important;
  border-color: var(--accent, #a45b46) !important;
}
.apple-btn.apple-btn-primary:hover {
  background: #8e4c39 !important;
  border-color: #8e4c39 !important;
}
.apple-btn.small {
  padding: 5px 10px !important;
  font-size: 11.5px !important;
  border-radius: 7px !important;
}
.apple-btn.btn-danger-soft {
  background: rgba(239, 68, 68, 0.08) !important;
  color: #ef4444 !important;
  border-color: rgba(239, 68, 68, 0.22) !important;
}
.apple-btn.btn-danger-soft:hover {
  background: rgba(239, 68, 68, 0.15) !important;
  border-color: rgba(239, 68, 68, 0.35) !important;
}
body.dark-mode .apple-btn {
  background: #1a1e2b;
  border-color: rgba(255, 255, 255, 0.08);
  color: #f8fafc;
}
body.dark-mode .apple-btn:hover {
  background: #242a3b;
}

/* 6. Dark Mode Polish */
body.dark-mode .apple-action-btn {
  background: rgba(255, 255, 255, 0.08) !important;
  color: #f8fafc !important;
}
body.dark-mode .fin-fmt-bar {
  background: #1c212d !important;
}
body.dark-mode .fin-month-picker-btn {
  background: #181d28 !important;
  border-color: rgba(255, 255, 255, 0.08) !important;
  color: #f8fafc !important;
}
body.dark-mode .apple-segment-btn.active {
  color: #f8fafc !important;
}

/* 7. Groups Table Container Radius */
.groups-tablewrap {
  border-radius: 14px !important;
}

/* 8. Student Portal Widget */
.portal-widget {
  background: linear-gradient(145deg, var(--surface, #fff), var(--surface-subtle, #f8fafc)) !important;
  border: 1px solid rgba(164, 91, 70, 0.22) !important;
  box-shadow: 0 4px 18px rgba(164, 91, 70, 0.05) !important;
}
.portal-preview-badge {
  font-size: 11.5px;
  font-weight: 700;
  color: var(--accent);
  background: var(--accent-soft);
  padding: 4px 10px;
  border-radius: 999px;
  text-decoration: none;
  transition: all 0.15s ease;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}
.portal-preview-badge:hover {
  background: var(--accent);
  color: #fff;
}
.portal-link-copy-box {
  display: flex;
  gap: 8px;
  margin: 12px 0 10px;
}
.portal-link-input {
  flex: 1;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, monospace;
  font-size: 12px;
  font-weight: 600;
  padding: 9px 12px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--surface, #fff);
  color: var(--text);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
body.dark-mode .portal-link-input {
  background: #181d28;
  border-color: rgba(255, 255, 255, 0.12);
  color: #f8fafc;
}
.portal-copy-btn {
  background: var(--accent);
  color: #fff;
  border: 0;
  padding: 0 14px;
  border-radius: 10px;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.15s ease;
}
.portal-copy-btn:hover {
  background: #8f4c39;
}
.portal-copy-btn:active {
  transform: scale(0.95);
}
.portal-quick-actions-row {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}
.portal-action-btn {
  flex: 1;
  min-width: 140px;
  padding: 9px 14px;
  border-radius: 10px;
  font-size: 12.5px;
  font-weight: 700;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  border: 0;
  transition: all 0.15s ease;
}
.portal-action-btn.tg {
  background: #229ed9;
  color: #fff;
}
.portal-action-btn.tg:hover {
  background: #1e8dc2;
}
.portal-action-btn.outline {
  background: var(--surface);
  border: 1px solid var(--line);
  color: var(--muted);
}
.portal-action-btn.outline:hover {
  background: var(--surface-subtle);
  color: var(--text);
}
body.dark-mode .portal-action-btn.outline {
  background: #181d28;
  border-color: rgba(255, 255, 255, 0.12);
  color: #f8fafc;
}
.portal-action-btn:active {
  transform: scale(0.96);
}

/* Terms Card Builder Modal Styles */
.terms-cards-builder {
  display: flex;
  flex-direction: column;
  gap: 10px;
  max-height: 58vh;
  overflow-y: auto;
  padding-right: 4px;
}
.tcb-card {
  background: var(--surface, #f8fafc);
  border: 1px solid var(--line, #e2e8f0);
  border-radius: 12px;
  padding: 10px 12px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  transition: border-color 0.15s ease;
}
.tcb-card:hover {
  border-color: var(--accent, #a45b46);
}
.tcb-head {
  display: flex;
  align-items: center;
  gap: 8px;
}
.tcb-emoji-input {
  width: 38px;
  height: 38px;
  border-radius: 9px;
  border: 1px solid var(--line, #e2e8f0);
  background: var(--card, #fff);
  text-align: center;
  font-size: 18px;
  flex-shrink: 0;
  cursor: pointer;
}
.tcb-emoji-input.hidden-icon {
  display: none !important;
}
.tcb-title-input {
  flex: 1;
  min-width: 0;
  height: 38px;
  border-radius: 9px;
  border: 1px solid var(--line, #e2e8f0);
  background: var(--card, #fff);
  padding: 0 10px;
  font-size: 13.5px;
  font-weight: 700;
  color: var(--text);
}
.tcb-actions {
  display: flex;
  align-items: center;
  gap: 4px;
  flex-shrink: 0;
}
.tcb-btn {
  width: 28px;
  height: 28px;
  border-radius: 7px;
  border: 1px solid var(--line, #e2e8f0);
  background: var(--card, #fff);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  cursor: pointer;
  color: var(--muted);
  transition: all 0.15s ease;
}
.tcb-btn:hover:not(:disabled) {
  background: var(--surface-2, #e2e8f0);
  color: var(--text);
}
.tcb-btn:disabled {
  opacity: 0.35;
  cursor: not-allowed;
}
.tcb-btn.del:hover {
  background: rgba(239, 68, 68, 0.12);
  border-color: rgba(239, 68, 68, 0.3);
  color: #ef4444;
}
.tcb-desc-input {
  width: 100%;
  border-radius: 9px;
  border: 1px solid var(--line, #e2e8f0);
  background: var(--card, #fff);
  padding: 8px 10px;
  font-size: 13px;
  line-height: 1.45;
  color: var(--text);
  resize: vertical;
  min-height: 52px;
  box-sizing: border-box;
}

body.dark-mode .tcb-card {
  background: #151922;
  border-color: #242b3a;
}
body.dark-mode .tcb-emoji-input,
body.dark-mode .tcb-title-input,
body.dark-mode .tcb-desc-input,
body.dark-mode .tcb-btn {
  background: #1a202c;
  border-color: #2d3748;
  color: #f1f5f9;
}


