@import url('https://fonts.googleapis.com/css2?family=DM+Sans:wght@400;500;600;700&family=Manrope:wght@400;500;600;700;800&display=swap');
:root{--ink:#2a1e49;--muted:#7665a3;--blue:#6b39e8;--blue-dark:#5024c1;--pale:#f2edff;--line:#e9e5f2;--bg:#f8f6fd;--white:#fff;--green:#16856b;--shadow:0 8px 30px rgba(89,57,155,.055)}*{box-sizing:border-box}body{margin:0;background:var(--bg);color:var(--ink);font-family:'DM Sans',sans-serif;font-size:14px}a{color:var(--blue);text-decoration:none}a:hover{color:var(--blue-dark)}.sidebar{position:fixed;inset:0 auto 0 0;width:252px;background:#fff;border-right:1px solid var(--line);padding:24px 15px 14px;display:flex;flex-direction:column;z-index:5}.brand{display:flex;align-items:center;gap:11px;padding:0 10px 30px;color:var(--ink)}.brand b{font:800 15px Manrope,sans-serif;display:block}.brand small{display:block;color:var(--muted);font-size:11px;margin-top:4px}.brand-mark{width:42px;height:42px;border-radius:14px;background:linear-gradient(135deg,#7743fa,#5f31d4);color:white;display:inline-flex;align-items:center;justify-content:center;font:800 14px Manrope;box-shadow:0 6px 15px #6b39e833;flex-shrink:0}.nav-label,.eyebrow{font-size:10px;font-weight:700;letter-spacing:1.3px;color:#8f80b5}.nav-label{padding:0 12px 11px}.nav-link{display:flex;gap:12px;align-items:center;padding:11px 12px;margin:2px 0;color:#6f5e9c;border-radius:10px;font-size:12.5px;font-weight:600}.nav-link span{font-size:16px;width:19px;text-align:center}.nav-link:hover,.nav-link.active{background:#f2edff;color:#5a28d7}.nav-link.active{box-shadow:inset 3px 0 #6b39e8}.sidebar-bottom{margin-top:auto;border-top:1px solid var(--line);padding:17px 5px 0;display:flex;align-items:center;gap:9px}.avatar{width:36px;height:36px;border-radius:50%;display:inline-flex;align-items:center;justify-content:center;background:#e9e0ff;color:#5c2fce;font-weight:800;flex-shrink:0}.avatar.small{width:32px;height:32px}.user-meta{min-width:0;flex:1}.user-meta b{display:block;font-size:12px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.user-meta small{color:var(--muted);font-size:11px}.logout{font-size:20px;color:#8c7db2}.main{margin-left:252px;min-height:100vh;display:flex;flex-direction:column}.topbar{height:91px;padding:19px 34px;background:#fff;border-bottom:1px solid var(--line);display:flex;align-items:center;justify-content:space-between}.topbar h2{font:800 22px Manrope;margin:6px 0 0;text-transform:capitalize}.top-actions{display:flex;align-items:center;gap:14px}.date-chip{font-size:11px;color:#288b72;background:#eaf8f2;padding:9px 12px;border-radius:20px}.content{padding:27px 34px 36px;flex:1;max-width:1800px;width:100%;margin:0 auto}.welcome{background:linear-gradient(110deg,#5a28d8,#7644f4);border-radius:18px;padding:27px 32px;color:#fff;display:flex;justify-content:space-between;align-items:center;overflow:hidden;position:relative;min-height:170px}.welcome h1{font:800 25px Manrope;margin:9px 0}.welcome p{color:#eae1ff;margin:0;max-width:570px}.eyebrow.light{color:#dfd3ff}.welcome-art{width:190px;align-self:stretch;position:relative;display:flex;align-items:center;justify-content:center;font-size:60px;color:#ffffff55}.welcome-art span{position:absolute;font-size:28px;right:30px;top:4px}.welcome-art b{position:absolute;right:0;bottom:0;font:800 12px Manrope;line-height:1.8;letter-spacing:2px;color:#fff;text-align:right}.stat-grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:15px;margin:20px 0}.stat-card{background:#fff;border:1px solid var(--line);border-radius:14px;padding:17px 19px;box-shadow:var(--shadow);min-width:0}.stat-top{display:flex;justify-content:space-between;align-items:center;color:#7967a6;font-size:12px}.stat-top i{font-style:normal;width:31px;height:31px;border-radius:10px;background:#f3eeff;color:#6534e2;display:flex;align-items:center;justify-content:center;font-size:16px}.stat-card strong{font:800 25px Manrope;display:block;margin:10px 0 5px;overflow-wrap:anywhere}.stat-card small{font-size:11px;color:#8f80b5}.dashboard-grid{display:grid;grid-template-columns:minmax(0,1.6fr) minmax(290px,1fr);gap:16px;margin-bottom:17px}.panel{background:#fff;border:1px solid var(--line);border-radius:14px;padding:20px;margin-bottom:17px;box-shadow:var(--shadow);min-width:0}.dashboard-grid .panel{margin-bottom:0}.panel h3{font:800 15px Manrope;margin:0 0 7px}.panel-head{display:flex;align-items:center;justify-content:space-between;gap:12px;margin-bottom:16px}.panel-head h3{margin:0 0 5px}.panel-head p,.muted{margin:0;color:var(--muted);font-size:12px}.panel-head>a{font-size:11px;font-weight:700;white-space:nowrap}.table-wrap{overflow-x:auto;width:100%}table{border-collapse:collapse;width:100%;font-size:12px;white-space:normal}th{text-align:left;color:#8c7db2;font-size:10px;letter-spacing:.5px;text-transform:uppercase;background:#f9f8fd;font-weight:700}th,td{padding:12px 10px;border-bottom:1px solid #f0edf6;vertical-align:middle}td{color:#574683}td b{color:#332655}tbody tr:last-child td{border-bottom:0}.subline{display:block;font-size:10px;color:#988bba;margin-top:4px}.empty{color:#988bba;text-align:center;padding:25px!important}.padded{padding:20px}.pill{display:inline-block;padding:5px 8px;border-radius:20px;background:#f1eff7;color:#6d5c98;font-size:10px;font-weight:700;text-transform:capitalize;white-space:nowrap}.pill.active,.pill.paid,.pill.present,.pill.resolved,.pill.enrolled{background:#e8f7f0;color:#188467}.pill.new,.pill.unpaid,.pill.absent,.pill.withdrawn,.pill.complaint{background:#fff0ef;color:#cf625b}.pill.partial,.pill.pending,.pill.contacted,.pill.in_progress,.pill.late{background:#fff6e7;color:#b98026}.pill.scheduled,.pill.trial_booked,.pill.excused{background:#f2edff;color:#653bce}.quick-actions{display:flex;flex-direction:column}.quick{display:flex;align-items:center;gap:10px;padding:13px 0;border-bottom:1px solid #f0edf6;color:var(--ink)}.quick:last-child{border-bottom:0}.quick i{font-style:normal;width:35px;height:35px;display:flex;align-items:center;justify-content:center;border-radius:11px;background:#f3eeff;color:#6736e2;font-size:16px}.quick span{flex:1}.quick b,.quick small{display:block}.quick b{font-size:12px}.quick small{font-size:10px;color:#8f80b5;margin-top:4px}.quick em{font-style:normal;color:#9586ba}.two-col{display:grid;grid-template-columns:minmax(300px,.85fr) minmax(0,1.4fr);gap:17px;align-items:start}.form-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:13px}.form-grid.compact{grid-template-columns:repeat(3,minmax(0,1fr))}.form-grid label,.filterbar label,.mini-form label{display:flex;flex-direction:column;gap:6px;font-size:11px;font-weight:700;color:#675496;min-width:0}.form-grid input,.form-grid select,.form-grid textarea,.filterbar input,.filterbar select,.mini-form input,.mini-form select,.mini-form textarea,select{font:12px 'DM Sans',sans-serif;color:#423465;background:#fff;border:1px solid #e4dfef;border-radius:8px;padding:10px 11px;min-width:0;width:100%;outline:none}.form-grid input:focus,.form-grid select:focus,.form-grid textarea:focus{border-color:#9c78f7;box-shadow:0 0 0 3px #6b39e814}.wide{grid-column:1/-1}.form-actions{display:flex;gap:9px;align-items:center}.btn{border:1px solid #e4dfef;background:#fff;color:#5a4886;border-radius:8px;padding:10px 14px;font:700 11px 'DM Sans';display:inline-flex;justify-content:center;align-items:center;cursor:pointer}.btn.primary{background:var(--blue);border-color:var(--blue);color:#fff}.btn.primary:hover{background:var(--blue-dark)}.btn.full{width:100%;margin-top:18px}.searchbox{border:1px solid #e4e0ef;padding:10px;border-radius:8px;width:100%;margin:0 0 13px;font:12px 'DM Sans'}.progress{height:5px;background:#f0edf7;border-radius:10px;margin-top:7px;overflow:hidden}.progress span{display:block;height:100%;background:#794aef;border-radius:10px}.progress.tall{height:10px}.filterbar{display:flex;gap:12px;align-items:end;margin:15px 0}.filterbar label{min-width:180px}.mini-form{display:grid;gap:9px;min-width:220px;padding:12px 0}.mini-form label{font-weight:500}details summary{cursor:pointer;color:var(--blue);font-weight:700}.notice{padding:12px;background:#fff8e9;border:1px solid #f7e8c7;border-radius:9px;color:#8e6b2c;font-size:11px;margin-top:15px}.big-number{font:800 28px Manrope;margin:18px 0 7px}.small-stats{grid-template-columns:repeat(3,minmax(0,1fr))}.small-stats .stat-card>span{font-size:11px;color:var(--muted)}footer{padding:16px 34px;border-top:1px solid var(--line);display:flex;justify-content:space-between;color:#988bba;font-size:10px}footer span{color:#a195c0}.alert{padding:12px 14px;border-radius:9px;margin-bottom:16px;font-size:12px}.alert.success{background:#eaf8f2;color:#188467}.alert.error{background:#fff0ef;color:#c6524b}.auth-bg{min-height:100vh;display:grid;place-items:center;background:radial-gradient(ellipse at top left,#eae1ff,transparent 48%),#f8f6fd;padding:20px}.auth-card{width:min(430px,100%);padding:32px;background:#fff;border:1px solid var(--line);border-radius:20px;box-shadow:0 20px 70px #3e248014;text-align:center}.auth-card .brand-mark{margin:0 auto 15px}.auth-card h1{font:800 21px Manrope;margin:0 0 7px}.auth-card>p{margin:0 0 24px}.auth-card form{text-align:left}.auth-card label{display:block;font-size:11px;font-weight:700;color:#675496;margin:14px 0 6px}.auth-card input,.auth-card textarea{width:100%;padding:12px;border:1px solid #e4dfef;border-radius:9px;font:13px 'DM Sans'}.demo-box{margin:18px 0;padding:13px;background:#f7f5fc;border-radius:10px;font-size:11px;line-height:1.9;color:#6e5c9d;text-align:left}.auth-card>a{font-size:11px;font-weight:700}@media(max-width:1200px){.sidebar{width:220px}.main{margin-left:220px}.content{padding:22px}.topbar{padding:18px 22px}.stat-grid{gap:10px}.stat-card{padding:14px}.dashboard-grid{grid-template-columns:minmax(0,1.3fr) minmax(260px,1fr)}}@media(max-width:900px){.sidebar{width:68px;padding:17px 8px}.brand{padding:0 4px 25px}.brand>span:last-child,.nav-label,.nav-link:not(.active){font-size:0}.brand .brand-mark{width:44px}.nav-link{justify-content:center;padding:12px 5px;font-size:0}.nav-link span{font-size:18px}.nav-link.active{font-size:0}.sidebar-bottom{flex-wrap:wrap;justify-content:center}.user-meta,.logout{display:none}.main{margin-left:68px}.dashboard-grid,.two-col{grid-template-columns:1fr}.stat-grid{grid-template-columns:repeat(2,minmax(0,1fr))}.form-grid.compact{grid-template-columns:repeat(2,minmax(0,1fr))}}@media(max-width:560px){.content{padding:14px}.topbar{height:78px;padding:13px 15px}.topbar h2{font-size:18px}.date-chip{display:none}.welcome{padding:20px;min-height:140px}.welcome h1{font-size:19px}.welcome-art{display:none}.stat-grid{gap:8px}.stat-card{padding:12px}.stat-card strong{font-size:21px}.panel{padding:14px}.form-grid,.form-grid.compact{grid-template-columns:1fr}.wide{grid-column:auto}.filterbar{align-items:stretch;flex-direction:column}.filterbar label{min-width:0}footer{padding:13px;display:block;line-height:1.8}footer span{display:block}}
@media print{.sidebar,.topbar,.btn,.form-actions,footer{display:none!important}.main{margin:0}.content{padding:0}.panel,.stat-card{box-shadow:none;break-inside:avoid}}

/* Version 3 listing filters and performance charts */
.filterbar{display:flex;align-items:end;gap:12px;flex-wrap:wrap;margin:16px 0}.filterbar label{min-width:150px;flex:1}.filterbar input,.filterbar select{width:100%;padding:10px;border:1px solid #e1dbef;border-radius:9px;background:#fff}.chart-list{display:grid;gap:12px;padding:8px 0 18px}.chart-row{display:grid;grid-template-columns:minmax(110px,1fr) minmax(140px,3fr) 54px 80px;align-items:center;gap:12px}.chart-row .progress{margin:0}.chart-row small{color:#7665a2}@media(max-width:700px){.chart-row{grid-template-columns:1fr 2fr 45px}.chart-row small{display:none}}


.nav-group-label{padding-top:14px;padding-bottom:6px;font-size:9px;color:#8aa0a7;letter-spacing:1.2px}
.quick-section{margin:22px 0 24px}.quick-section>h3{font:700 14px Manrope;margin:0 0 12px}.quick-grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:12px}.quick-card{background:#fff;border:1px solid #dcefe8;border-radius:14px;padding:17px;display:flex;flex-direction:column;gap:7px;color:var(--ink);box-shadow:0 3px 10px rgba(14,116,90,.035);min-height:112px;transition:transform .15s,box-shadow .15s}.quick-card:hover{transform:translateY(-2px);box-shadow:0 8px 20px rgba(14,116,90,.09);color:var(--ink)}.quick-card>span{display:flex;align-items:center;justify-content:center;width:34px;height:34px;border-radius:10px;background:#e8faf3;color:#008b68;font-size:19px}.quick-card b{font-size:13px}.quick-card small{font-size:11px;color:var(--muted)}
.role-permission-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:16px;margin:18px 0}.role-permission-card{border:1px solid var(--line);border-radius:14px;padding:18px;background:#fcfbff}.role-permission-card h3{margin:0 0 6px}.role-permission-card .muted{color:var(--muted);font-size:12px}.permission-check{display:flex;align-items:center;gap:9px;padding:8px 0;border-bottom:1px solid #efedf5;font-size:13px}.permission-check:last-child{border-bottom:0}.permission-check input{width:16px;height:16px;accent-color:#07896d}.student-result-heading{display:flex;align-items:center;justify-content:space-between;margin-top:22px}.student-result-heading h3{margin:0}
@media(max-width:1100px){.quick-grid{grid-template-columns:repeat(2,minmax(0,1fr))}}@media(max-width:700px){.role-permission-grid{grid-template-columns:1fr}.quick-grid{grid-template-columns:1fr 1fr}}

/* V7.3 account management and layout refinement */
.sidebar{overflow-y:auto;overflow-x:hidden;padding-top:18px;padding-bottom:12px}.brand{padding-bottom:20px}.nav-label{padding-bottom:7px}.nav-link{padding:9px 11px;margin:1px 0;line-height:1.25}.nav-group-label{margin-top:7px}.dashboard-grid{grid-template-columns:minmax(0,1fr)!important}.dashboard-grid>.panel{width:100%;min-width:0}.dashboard-grid .table-wrap{overflow-x:auto}.dashboard-grid table{min-width:650px}.content{padding-top:24px;padding-bottom:40px}.form-actions form{display:inline-flex}.permission-check{display:flex;align-items:center;gap:8px}
@media(max-width:900px){.sidebar{overflow-y:auto}.nav-link{padding:11px 5px}}

/* V7.3 payment summary: keep payment entry concise; subject details belong on receipt. */
.payment-total-summary{padding:14px 16px;border:1px solid var(--line,#e1dcef);border-radius:12px;background:var(--soft,#f8f7fc);display:flex;align-items:center;justify-content:space-between;gap:12px;flex-wrap:wrap;font-weight:600}
.pill.partial{background:#fff4d8;color:#8a5a00}.pill.unpaid{background:#ffe8e8;color:#a51f2b}.pill.paid{background:#e3f7ed;color:#087443}.pill.no_fee{background:#efedf4;color:#58497d}


/* Academic student-result search layout */
.academic-result-filterbar{display:grid;grid-template-columns:minmax(160px,.8fr) minmax(220px,1.2fr) minmax(260px,1.4fr) auto;align-items:end;gap:12px;width:100%;}
.academic-result-filterbar label{display:flex;flex-direction:column;gap:6px;min-width:0;flex:initial;}
.academic-result-filterbar input,.academic-result-filterbar select{width:100%;min-width:0;box-sizing:border-box;height:40px;padding:10px 11px;border:1px solid #e4dfef;border-radius:8px;background:#fff;font:12px 'DM Sans',sans-serif;color:#423465;}
.academic-result-filterbar .btn{height:40px;white-space:nowrap;}
@media(max-width:1050px){.academic-result-filterbar{grid-template-columns:repeat(2,minmax(0,1fr));}.academic-result-filterbar .btn{align-self:end;}}
@media(max-width:560px){.academic-result-filterbar{grid-template-columns:1fr;}.academic-result-filterbar .btn{width:100%;}}

/* Monthly payment matrix */
.payment-matrix{min-width:1120px;font-size:11px}.payment-matrix th,.payment-matrix td{padding:9px 7px}.payment-matrix th{white-space:nowrap}.payment-matrix td.matrix-cell{text-align:center;min-width:86px}.matrix-cell b,.matrix-cell small{display:block;white-space:nowrap}.matrix-cell b{font-size:10px}.matrix-cell small{font-size:10px;margin-top:4px;font-weight:700}.matrix-paid{background:#dff4e6;color:#146c43}.matrix-partial{background:#fff0c9;color:#875c00}.matrix-unpaid{background:#ffe0df;color:#a12626}.matrix-no_fee{background:#efedf5;color:#685b88}.payment-matrix-wrap{border:1px solid var(--line);border-radius:9px}.matrix-note{font-size:11px;margin-top:12px;line-height:1.6}
/* Attendance history matrix */
.attendance-matrix-wrap{max-height:68vh;overflow:auto;border:1px solid var(--line);border-radius:10px}
.attendance-matrix{width:max-content;min-width:100%;font-size:11px}
.attendance-matrix th,.attendance-matrix td{min-width:125px;text-align:center;padding:10px 9px}
.attendance-matrix th:first-child,.attendance-matrix td:first-child{position:sticky;left:0;min-width:190px;max-width:230px;text-align:left;z-index:2}
.attendance-matrix th:first-child{background:#f9f8fd;z-index:4}
.attendance-matrix td:first-child{background:#fff}
.attendance-matrix-session{vertical-align:top;white-space:normal;min-width:160px!important}
.attendance-matrix-session span{display:block;color:#645390;font-weight:800;text-transform:none;letter-spacing:0;font-size:11px}
.attendance-matrix-session small{display:block;color:#6b589a;font-size:10px;font-weight:600;text-transform:none;letter-spacing:0;line-height:1.35;margin-top:4px;min-width:140px;max-width:175px}
.attendance-matrix td:not(:first-child){white-space:nowrap}
.matrix-empty{color:#a79cc3}
.attendance-matrix-legend{display:flex;align-items:center;gap:8px;flex-wrap:wrap;margin:12px 0 0}


/* Attendance matrix jump target */
.attendance-matrix-panel{scroll-margin-top:24px}
html{scroll-behavior:smooth}
@media(max-width:560px){.panel-head:has(> a.btn){align-items:flex-start;flex-direction:column}.panel-head:has(> a.btn)>.btn{align-self:flex-start}}

/* Monthly attendance summary */
.attendance-actions{display:flex;align-items:center;justify-content:flex-end;gap:8px;flex-wrap:wrap}.attendance-summary-stats{grid-template-columns:repeat(4,minmax(0,1fr));margin-top:18px}.summary-explainer{margin:12px 0 20px;padding:12px 14px;border:1px solid #e5dcfb;background:#f6f3ff;border-radius:9px;color:#65558c;font-size:11px;line-height:1.6}.summary-table-head{margin-top:18px}.attendance-rate-value{font-size:12px;color:#65558c}.attendance-rate-low{color:#c34d49}.attendance-rate-high{color:#178469}@media(max-width:1000px){.attendance-summary-stats{grid-template-columns:repeat(2,minmax(0,1fr))}}@media(max-width:560px){.attendance-actions{justify-content:flex-start}.attendance-summary-stats{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media print{.attendance-actions,form.filterbar,.summary-explainer{display:none!important}.attendance-summary-stats{grid-template-columns:repeat(4,minmax(0,1fr))}.panel{border:0}}

/* Academic performance and progress */
.academic-performance-filters{display:grid;grid-template-columns:minmax(150px,.8fr) minmax(160px,.9fr) minmax(230px,1.3fr) auto auto;gap:10px;align-items:end}
.academic-performance-filters label{display:flex;flex-direction:column;gap:6px;min-width:0;font-size:11px;font-weight:700;color:#675496}
.academic-performance-filters input,.academic-performance-filters select{width:100%;min-width:0;box-sizing:border-box;height:40px;padding:10px 11px;border:1px solid #e4dfef;border-radius:8px;background:#fff;font:12px 'DM Sans',sans-serif;color:#423465}
.performance-stats{grid-template-columns:repeat(4,minmax(0,1fr));margin:18px 0 24px}
.performance-subhead{margin-top:22px;margin-bottom:10px}
.performance-average,.performance-percent{display:flex;align-items:center;gap:10px;min-width:130px}
.performance-average .progress{flex:1;min-width:60px}
.performance-average b,.performance-percent b{font-variant-numeric:tabular-nums;white-space:nowrap;color:#38295f}
.performance-percent{gap:8px;min-width:100px}
.performance-percent .progress{flex:1;min-width:38px;margin:0}
.progress-table-head{margin-top:28px}
@media(max-width:1050px){.academic-performance-filters{grid-template-columns:repeat(2,minmax(0,1fr))}.performance-stats{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media(max-width:560px){.academic-performance-filters,.performance-stats{grid-template-columns:1fr}.academic-performance-filters .btn{width:100%}}


/* Tutor subject selector: accessible dropdown + removable selected-subject chips. */
.tutor-form-panel .tutor-profile-form .tutor-subject-field {
    grid-column: 1 / -1;
    display: block;
    min-width: 0;
    padding: 16px;
    border: 1px solid var(--line);
    border-radius: 12px;
    background: #faf8ff;
}
.tutor-subject-field > label {
    display: block;
    margin-bottom: 7px;
    color: var(--ink);
    font-size: 12px;
    font-weight: 700;
}
.subject-picker-help {
    margin: 0 0 12px;
    color: var(--muted);
    font-size: 12px;
    line-height: 1.5;
}
.tutor-subject-controls {
    display: flex;
    align-items: stretch;
    gap: 10px;
}
.tutor-subject-controls select {
    flex: 1 1 auto;
    min-width: 0;
    min-height: 42px;
    background: #fff;
}
.tutor-subject-controls .btn {
    width: auto;
    min-width: 145px;
    align-self: stretch;
    white-space: nowrap;
}
.tutor-selected-subjects {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    min-height: 18px;
    margin-top: 13px;
}
.tutor-subject-chip {
    display: inline-flex;
    align-items: center;
    gap: 9px;
    padding: 6px 8px 6px 12px;
    border: 1px solid #dbcdff;
    border-radius: 999px;
    background: #f0eaff;
    color: #5024c1;
    font-size: 12px;
    font-weight: 700;
}
.tutor-subject-chip-remove {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 21px;
    height: 21px;
    padding: 0;
    border: 0;
    border-radius: 50%;
    background: #e2d6ff;
    color: #5024c1;
    font: 700 16px/1 'DM Sans', sans-serif;
    cursor: pointer;
}
.tutor-subject-chip-remove:hover,
.tutor-subject-chip-remove:focus-visible {
    background: #5024c1;
    color: #fff;
}
.subject-picker-count {
    display: block;
    margin-top: 10px;
    color: var(--muted);
    font-size: 11px;
}
@media (max-width: 620px) {
    .tutor-subject-controls {
        flex-direction: column;
    }
    .tutor-subject-controls .btn {
        width: 100%;
        min-width: 0;
    }
}


/* Tutor subject selector — refined dropdown, chips and responsive controls */
/* Tutor subject selector: clear control row and selected-subject chips */
.subject-picker.wide {
    display: flex;
    flex-direction: column;
    gap: 14px;
    min-width: 0;
    margin: 2px 0 0;
    padding: 18px;
    border: 1px solid #e3dcf5;
    border-radius: 14px;
    background: linear-gradient(135deg, #faf8ff 0%, #ffffff 82%);
    box-shadow: inset 3px 0 0 rgba(107,57,232,0.72);
}

.subject-picker-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
}

.subject-picker-heading {
    min-width: 0;
}

.form-grid .subject-picker-label {
    display: block;
    margin: 0 0 6px;
    color: #342659;
    font-size: 13px;
    font-weight: 800;
    line-height: 1.35;
}

.subject-picker-hint {
    margin: 0;
    max-width: 720px;
    color: #7665a3;
    font-size: 12px;
    font-weight: 400;
    line-height: 1.55;
}

.subject-picker-count {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 auto;
    min-height: 28px;
    padding: 6px 10px;
    border: 1px solid #e3d9fb;
    border-radius: 999px;
    background: #f3eeff;
    color: #5b32c4;
    font-size: 11px;
    font-weight: 700;
    white-space: nowrap;
}

.subject-select-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: stretch;
    gap: 10px;
    width: 100%;
}

.form-grid .subject-select-row select.subject-select-dropdown {
    width: 100%;
    min-width: 0;
    min-height: 44px;
    margin: 0;
    padding: 11px 13px;
    border: 1px solid #dfd8f0;
    border-radius: 10px;
    background-color: #fff;
    color: #423465;
    font: 500 13px 'DM Sans', sans-serif;
    box-shadow: 0 1px 2px rgba(36,20,75,0.025);
    transition: border-color .18s ease, box-shadow .18s ease;
}

.form-grid .subject-select-row select.subject-select-dropdown:focus {
    border-color: #9c78f7;
    box-shadow: 0 0 0 4px rgba(107,57,232,0.11);
}

.form-grid .subject-select-row .subject-add-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 44px;
    padding: 10px 17px;
    border: 1px solid #6b39e8;
    border-radius: 10px;
    background: #6b39e8;
    color: #fff;
    font-size: 12px;
    font-weight: 700;
    white-space: nowrap;
    box-shadow: 0 4px 10px rgba(107,57,232,.15);
    transition: background .18s ease, transform .18s ease, box-shadow .18s ease;
}

.form-grid .subject-select-row .subject-add-button > span {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: rgba(255,255,255,.2);
    font-size: 16px;
    font-weight: 500;
    line-height: 1;
}

.form-grid .subject-select-row .subject-add-button:hover {
    background: #5024c1;
    border-color: #5024c1;
    box-shadow: 0 5px 13px rgba(107,57,232,.22);
    transform: translateY(-1px);
}

.form-grid .subject-select-row .subject-add-button:active {
    transform: translateY(0);
}

.selected-subjects-panel {
    min-width: 0;
    padding: 13px 14px;
    border: 1px solid #eae5f7;
    border-radius: 11px;
    background: rgba(255,255,255,.82);
}

.selected-subjects-heading {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 6px 12px;
    color: #615383;
    font-size: 11px;
    font-weight: 800;
}

.selected-subjects-help {
    color: #8f80b5;
    font-size: 10px;
    font-weight: 400;
}

.selected-subject-list {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    min-height: 0;
    margin-top: 10px;
}

.subject-chip {
    display: inline-flex;
    align-items: center;
    gap: 9px;
    max-width: 100%;
    padding: 6px 7px 6px 12px;
    border: 1px solid #dbcffa;
    border-radius: 999px;
    background: #f3eeff;
    color: #532fae;
    font-size: 12px;
    font-weight: 700;
    line-height: 1.4;
    box-shadow: 0 1px 2px rgba(89,57,155,.04);
}

.subject-chip-name {
    overflow-wrap: anywhere;
}

.form-grid .subject-chip-remove {
    display: inline-flex;
    flex: 0 0 23px;
    align-items: center;
    justify-content: center;
    width: 23px;
    height: 23px;
    margin: 0;
    padding: 0 0 1px;
    border: 1px solid #ddd2fa;
    border-radius: 50%;
    background: #fff;
    color: #6c54a9;
    font: 500 16px/1 'DM Sans', sans-serif;
    cursor: pointer;
    transition: color .15s ease, background .15s ease, border-color .15s ease;
}

.form-grid .subject-chip-remove:hover {
    border-color: #efc1c1;
    background: #fff0f0;
    color: #c44e4e;
}

.subject-empty {
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 10px 0 0;
    padding: 10px 11px;
    border: 1px dashed #e1dbf1;
    border-radius: 8px;
    background: #fcfbff;
    color: #8776b0;
    font-size: 11px;
    font-weight: 400;
    line-height: 1.5;
}

.subject-empty[hidden] {
    display: none !important;
}

.subject-empty-icon {
    display: inline-flex;
    flex: 0 0 22px;
    align-items: center;
    justify-content: center;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background: #f3eeff;
    color: #6b39e8;
    font-size: 16px;
}

.subject-picker input[type="hidden"] {
    display: none !important;
}

@media (max-width: 720px) {
    .subject-picker.wide {
        padding: 14px;
    }

    .subject-picker-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }

    .subject-select-row {
        grid-template-columns: minmax(0, 1fr);
    }

    .form-grid .subject-select-row .subject-add-button {
        width: 100%;
    }
}



/* Dashboard overview: focused KPIs, alerts and visual summaries */
.dashboard-welcome { align-items: stretch; }
.dashboard-welcome-copy { max-width: 760px; display: flex; flex-direction: column; align-items: flex-start; justify-content: center; }
.dashboard-date-label { display: inline-flex; flex-wrap: wrap; gap: 8px; margin-top: 17px; color: #e6dcff; font-size: 11px; font-weight: 600; }
.dashboard-stats { align-items: stretch; }
.dashboard-stat-card { position: relative; overflow: hidden; min-height: 126px; }
.dashboard-stat-card::after { content: ""; position: absolute; inset: auto 0 0; height: 3px; background: #6b39e8; opacity: .85; }
.dashboard-stat-card.tone-green::after { background: #20a879; }
.dashboard-stat-card.tone-orange::after { background: #e6a23a; }
.dashboard-stat-card.tone-violet::after { background: #916ee8; }
.dashboard-stat-card.tone-cyan::after { background: #1da6b8; }
.dashboard-stat-card.tone-red::after { background: #de6464; }
.dashboard-stat-card.tone-green .stat-top i { background: #e8f8f1; color: #188467; }
.dashboard-stat-card.tone-orange .stat-top i { background: #fff5e6; color: #b87a21; }
.dashboard-stat-card.tone-violet .stat-top i { background: #f2edff; color: #7354c8; }
.dashboard-stat-card.tone-cyan .stat-top i { background: #e7f8fb; color: #16889a; }
.dashboard-stat-card.tone-red .stat-top i { background: #fff0ef; color: #c6524b; }
.dashboard-quick-section { margin: 22px 0 25px; }
.dashboard-section-heading { display: flex; align-items: end; justify-content: space-between; margin-bottom: 12px; }
.dashboard-section-heading h3 { font: 800 15px Manrope, sans-serif; margin: 0 0 5px; }
.dashboard-section-heading p { margin: 0; color: var(--muted); font-size: 12px; }
.dashboard-quick-grid .quick-card { border-color: #e5dff3; }
.dashboard-main-grid, .dashboard-secondary-grid, .dashboard-lower-grid { align-items: stretch; margin-bottom: 17px; }
.dashboard-panel { min-width: 0; height: 100%; }
.dashboard-panel .panel-head { align-items: flex-start; }
.dashboard-panel .panel-head > a { margin-top: 2px; }
.dashboard-panel-icon { display: inline-flex; align-items: center; justify-content: center; width: 30px; height: 30px; flex: 0 0 30px; border-radius: 10px; background: #fff4e5; color: #b77c23; font-weight: 800; }
.dashboard-alert-list { display: flex; flex-direction: column; gap: 9px; }
.dashboard-alert-item { display: flex; gap: 10px; align-items: center; padding: 11px; border: 1px solid #f0edf6; border-radius: 11px; color: var(--ink); transition: transform .15s ease, border-color .15s ease, background .15s ease; }
.dashboard-alert-item:hover { transform: translateY(-1px); border-color: #dfd7f4; background: #fcfbff; color: var(--ink); }
.dashboard-alert-icon { display: inline-flex; align-items: center; justify-content: center; flex: 0 0 34px; width: 34px; height: 34px; border-radius: 10px; background: #f3eeff; color: #6534e2; font-size: 15px; font-weight: 800; }
.dashboard-alert-item.tone-orange .dashboard-alert-icon { background: #fff5e6; color: #b87a21; }
.dashboard-alert-item.tone-red .dashboard-alert-icon { background: #fff0ef; color: #c6524b; }
.dashboard-alert-item.tone-violet .dashboard-alert-icon { background: #f2edff; color: #7354c8; }
.dashboard-alert-copy { flex: 1; min-width: 0; }
.dashboard-alert-copy b, .dashboard-alert-copy small { display: block; }
.dashboard-alert-copy b { font-size: 12px; }
.dashboard-alert-copy small { margin-top: 4px; color: var(--muted); font-size: 10px; line-height: 1.45; }
.dashboard-alert-item > strong { font: 800 18px Manrope, sans-serif; color: var(--ink); white-space: nowrap; }
.dashboard-clear-state { display: flex; align-items: center; gap: 11px; padding: 18px 13px; border: 1px solid #d9f0e5; border-radius: 12px; background: #f4fcf8; }
.dashboard-clear-state > span { display: inline-flex; align-items: center; justify-content: center; width: 34px; height: 34px; border-radius: 50%; background: #e1f7ec; color: #188467; font-weight: 800; }
.dashboard-clear-state b, .dashboard-clear-state small { display: block; }
.dashboard-clear-state b { font-size: 12px; }
.dashboard-clear-state small { margin-top: 4px; color: var(--muted); font-size: 10px; }
.dashboard-footnote { margin-top: 13px; color: #8c7db2; font-size: 10px; line-height: 1.5; }
.dashboard-attendance-rate { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 13px 0 16px; border-bottom: 1px solid #f0edf6; }
.dashboard-attendance-rate > div:first-child strong { display: block; font: 800 30px Manrope, sans-serif; color: var(--green); }
.dashboard-attendance-rate > div:first-child small { color: var(--muted); font-size: 11px; }
.dashboard-attendance-counts { display: grid; grid-template-columns: auto auto; gap: 9px 8px; align-items: center; color: var(--muted); font-size: 11px; }
.dashboard-attendance-counts b { justify-self: end; color: var(--ink); }
.status-dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; }
.present-dot { background: #1ba77a; }
.late-dot { background: #e7a33b; }
.absent-dot { background: #dc6464; }
.excused-dot { background: #7d52e8; }
.dashboard-status-list { display: grid; gap: 14px; margin-top: 10px; }
.dashboard-status-label { display: flex; align-items: center; gap: 8px; color: #5b4988; font-size: 11px; }
.dashboard-status-label b { margin-left: auto; color: var(--ink); font-variant-numeric: tabular-nums; }
.dashboard-status-track, .dashboard-subject-track { overflow: hidden; height: 7px; margin-top: 7px; border-radius: 20px; background: #f0edf6; }
.dashboard-status-track > span, .dashboard-subject-track > span { display: block; height: 100%; border-radius: inherit; transition: width .25s ease; }
.present-fill { background: #1ba77a; }
.late-fill { background: #e7a33b; }
.absent-fill { background: #dc6464; }
.excused-fill { background: #7d52e8; }
.dashboard-status-footer { display: flex; flex-wrap: wrap; align-items: center; gap: 7px; margin-top: 17px; padding-top: 12px; border-top: 1px solid #f0edf6; color: var(--muted); font-size: 10px; }
.dashboard-status-footer strong { color: var(--ink); }
.dashboard-subject-list { display: grid; gap: 13px; }
.dashboard-subject-label { display: flex; justify-content: space-between; gap: 12px; color: #5b4988; font-size: 11px; }
.dashboard-subject-label span { overflow-wrap: anywhere; }
.dashboard-subject-label strong { color: var(--ink); white-space: nowrap; font-variant-numeric: tabular-nums; }
.dashboard-subject-track > span { background: linear-gradient(90deg, #6b39e8, #9b73ff); }
.dashboard-subject-row > small { display: block; margin-top: 5px; color: #9588b8; font-size: 10px; }
.dashboard-empty-state { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 7px; padding: 25px 15px; border: 1px dashed #e4dff0; border-radius: 12px; background: #fcfbff; }
.dashboard-empty-state > span { display: inline-flex; align-items: center; justify-content: center; width: 36px; height: 36px; border-radius: 11px; background: #f3eeff; color: #6b39e8; font-size: 19px; }
.dashboard-empty-state b { font-size: 12px; color: var(--ink); }
.dashboard-empty-state small { max-width: 270px; color: var(--muted); font-size: 10px; line-height: 1.5; }
.dashboard-empty-state.compact { padding: 18px 12px; }
.dashboard-rate-badge { display: inline-block; padding: 5px 8px; border-radius: 999px; background: #eaf8f2; color: #188467; font-size: 10px; font-weight: 800; white-space: nowrap; }
.dashboard-rate-badge.low { background: #fff0ef; color: #c6524b; }
.dashboard-enquiries-panel { margin-bottom: 0; }
.dashboard-table { min-width: 630px; }
.dashboard-grid .dashboard-panel { margin-bottom: 0; }
@media (max-width: 1200px) {
    .dashboard-stats { grid-template-columns: repeat(4, minmax(0, 1fr)); }
    .dashboard-main-grid, .dashboard-secondary-grid, .dashboard-lower-grid { grid-template-columns: minmax(0, 1fr) minmax(260px, 1fr); }
}
@media (max-width: 900px) {
    .dashboard-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .dashboard-main-grid, .dashboard-secondary-grid, .dashboard-lower-grid { grid-template-columns: minmax(0, 1fr); }
    .dashboard-attendance-rate { align-items: flex-start; flex-direction: column; }
}
@media (max-width: 560px) {
    .dashboard-stats { grid-template-columns: minmax(0, 1fr); }
    .dashboard-welcome { padding: 20px; }
    .dashboard-date-label { font-size: 10px; }
    .dashboard-attendance-counts { width: 100%; }
    .dashboard-panel .panel-head { flex-direction: column; }
}


/* Dark navigation refresh: single Overview group label */
.sidebar {
    background: #241956;
    border-right: 1px solid #30244e;
    color: #f2edff;
    box-shadow: 8px 0 28px rgba(23,13,47,0.08);
}
.sidebar .brand {
    color: #f6f4fc;
}
.sidebar .brand b {
    color: #f6f4fc;
}
.sidebar .brand small {
    color: #aea4c9;
}
.sidebar .nav-label,
.sidebar .nav-group-label {
    color: #9d8fbf;
}
.sidebar .nav-link {
    color: #c9c0e0;
    background: transparent;
    transition: background-color .16s ease, color .16s ease;
}
.sidebar .nav-link span {
    color: #b4a8d1;
}
.sidebar .nav-link:hover {
    background: #2d204f;
    color: #ffffff;
}
.sidebar .nav-link:hover span {
    color: #ffffff;
}
.sidebar .nav-link.active {
    background: #392963;
    color: #ffffff;
    box-shadow: inset 3px 0 #9a72ff;
}
.sidebar .nav-link.active span {
    color: #c1a8ff;
}
.sidebar .sidebar-bottom {
    border-top-color: #362a56;
}
.sidebar .avatar {
    background: #3e2972;
    color: #e6dcff;
}
.sidebar .user-meta b {
    color: #f3f0fc;
}
.sidebar .user-meta small {
    color: #aea4c9;
}
.sidebar .logout {
    color: #b5a9d2;
}
.sidebar .logout:hover {
    color: #ffffff;
}


/* Parent portal: family-scoped child summary cards */
.parent-children-panel { margin-bottom: 24px; }
.parent-child-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 16px; }
.parent-child-card { min-width: 0; padding: 18px; border: 1px solid var(--border, #e7e3f2); border-radius: 16px; background: var(--surface, #fff); }
.parent-child-head { display: flex; align-items: center; gap: 12px; margin-bottom: 16px; }
.parent-child-avatar { display: grid; place-items: center; width: 42px; height: 42px; flex: 0 0 42px; border-radius: 13px; background: #efe8ff; color: #45249a; font-weight: 800; }
.parent-child-name { min-width: 0; }
.parent-child-name h4 { margin: 0 0 4px; font-size: 15px; }
.parent-child-name p { margin: 0; color: var(--muted, #7665a2); font-size: 12px; overflow-wrap: anywhere; }
.parent-child-metrics { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.parent-child-metrics > div { padding: 11px; border-radius: 10px; background: var(--surface-soft, #f7f6fb); }
.parent-child-metrics span { display: block; font-size: 11px; color: var(--muted, #7665a2); margin-bottom: 5px; }
.parent-child-metrics b { font-size: 15px; line-height: 1.35; overflow-wrap: anywhere; }
.parent-child-actions { display: flex; flex-wrap: wrap; gap: 14px; padding-top: 15px; margin-top: 14px; border-top: 1px solid var(--border, #e7e3f2); font-size: 12px; font-weight: 700; }
.parent-link-required { border-left: 4px solid #c88b18; }
@media (max-width: 560px) { .parent-child-card { padding: 14px; } .parent-child-metrics { gap: 8px; } }


/* Recurring class period controls */
.class-period-controls {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
    min-width: 0;
}
.class-period-controls[hidden] {
    display: none !important;
}
#class-weekday-hint {
    display: block;
    margin-top: 5px;
    color: var(--muted, #7867a3);
    line-height: 1.45;
}
@media (max-width: 760px) {
    .class-period-controls {
        grid-template-columns: minmax(0, 1fr);
    }
}


/* Student QR attendance check-in */
.attendance-qr-tools{display:flex;align-items:center;justify-content:space-between;gap:20px;margin:18px 0;padding:18px 20px;border:1px solid #dfd7f4;border-radius:14px;background:linear-gradient(115deg,#f9f7ff,#f2eefc)}
.attendance-qr-tools-copy{max-width:760px}.attendance-qr-eyebrow{display:inline-block;color:#6139c7;font-size:10px;letter-spacing:.11em;font-weight:800;margin-bottom:6px}.attendance-qr-tools h4,.attendance-qr-card h4{margin:0 0 7px;color:#28184f;font-size:16px}.attendance-qr-tools p,.attendance-qr-card p{margin:0;color:#675497;font-size:12px;line-height:1.65}.attendance-qr-generate-form{flex:0 0 auto}
.attendance-qr-card{margin:16px 0 22px;padding:22px;border:1px solid #d8cfef;border-radius:16px;background:#fff;box-shadow:0 8px 22px rgba(43,28,82,.06)}.attendance-qr-content{display:grid;grid-template-columns:minmax(0,1fr) 290px;gap:26px;align-items:center}.attendance-qr-content>div:first-child{min-width:0}.attendance-qr-note{margin-top:12px!important;max-width:620px}.attendance-qr-image-wrap{display:flex;flex-direction:column;align-items:center;gap:12px;padding:18px 14px;border:1px solid #e6e1f4;border-radius:14px;background:#faf8ff}.attendance-qr-image-wrap #attendance-qr-image{display:flex;align-items:center;justify-content:center;width:260px;min-height:260px;background:#fff;border-radius:10px}.attendance-qr-image-wrap #attendance-qr-image img,.attendance-qr-image-wrap #attendance-qr-image canvas{display:block;max-width:100%;height:auto!important}.attendance-qr-image-wrap .btn{width:100%;justify-content:center}.attendance-qr-error{max-width:240px;color:#973b36;font-size:12px;text-align:center;line-height:1.5}.attendance-qr-link{margin-top:15px;padding:11px 13px;border-radius:9px;background:#f8f7fc;display:flex;align-items:center;justify-content:space-between;gap:12px;flex-wrap:wrap;font-size:12px}.attendance-qr-link span{color:#7766a3}.attendance-qr-link a{overflow-wrap:anywhere;font-weight:700}.attendance-qr-host-warning{margin-top:14px!important;font-size:12px}.attendance-qr-host-warning code{font-size:11px}
@media(max-width:760px){.attendance-qr-tools{align-items:stretch;flex-direction:column}.attendance-qr-generate-form .btn{width:100%;justify-content:center}.attendance-qr-content{grid-template-columns:1fr}.attendance-qr-image-wrap{max-width:100%}}
@media print{body:has(#attendance-qr-card) .sidebar,body:has(#attendance-qr-card) .topbar,body:has(#attendance-qr-card) footer,body:has(#attendance-qr-card) .attendance-qr-tools,body:has(#attendance-qr-card) .filterbar,body:has(#attendance-qr-card) #attendance-qr-card .attendance-qr-link,body:has(#attendance-qr-card) #attendance-qr-card .btn{display:none!important}body:has(#attendance-qr-card) .main{margin:0!important;width:100%!important}body:has(#attendance-qr-card) .content{padding:0!important}body:has(#attendance-qr-card) #attendance-qr-card{border:0;box-shadow:none;max-width:760px;margin:0 auto}.attendance-qr-content{grid-template-columns:1fr}.attendance-qr-image-wrap{border:0;background:#fff}}

/* Retain the requested darker navigation theme across the latest TMS pages. */
.sidebar{background:#241956;border-right-color:#332655;color:#f2eefb}
.sidebar .brand{color:#f3f0fc}
.sidebar .brand small{color:#a99ec6}
.sidebar .nav-group-label,.sidebar .nav-label{color:#9b8ebb}
.sidebar .nav-link{color:#c5bdda}
.sidebar .nav-link:hover{background:#28194f;color:#fff}
.sidebar .nav-link.active{background:#2e1d5a;color:#fff;box-shadow:inset 3px 0 #9368ff}
.sidebar .sidebar-bottom{border-top-color:#382a5d}
.sidebar .user-meta b{color:#f2effb}
.sidebar .user-meta small{color:#a89dc5}
.sidebar .logout{color:#bab0d4}
.sidebar .avatar{background:#3a2965;color:#f5f2fd}


/* QR attendance action: keep generation obvious in the attendance header. */
.attendance-qr-header-form{display:inline-flex;align-items:center;margin:0}
.attendance-qr-header-form .btn{white-space:nowrap;min-height:36px}
.attendance-qr-header-form .btn:disabled{opacity:.55;cursor:not-allowed;filter:saturate(.45)}
.attendance-qr-tools{align-items:flex-start}
.attendance-qr-tools.is-ready{border-color:#ccbcf4;background:linear-gradient(115deg,#f8f5ff,#f2edff)}
.attendance-qr-tools.is-unavailable{border-color:#e6d9fb;background:linear-gradient(115deg,#faf7ff,#fff5e4)}
.attendance-qr-reason{margin-top:9px!important;color:#986018!important}
.attendance-qr-ready-note{margin-top:9px!important;color:#176b50!important;font-weight:700}
@media(max-width:980px){.attendance-qr-header-form{width:100%}.attendance-qr-header-form .btn{width:100%;justify-content:center}}


/* Payment Matrix: per-student / per-month payment editing */
.payment-matrix .matrix-cell-content{display:flex;flex-direction:column;align-items:center;gap:3px;min-width:70px}
.payment-matrix-edit-btn{font-size:10px;padding:4px 8px;min-height:24px;line-height:1.1;margin-top:3px;color:#5428c2;border-color:#d7cbf7;background:#fff}
.payment-matrix-edit-btn:hover{background:#f4efff;border-color:#b298f3}
.payment-month-edit-header{align-items:flex-start}
.payment-month-edit-actions{display:flex;gap:8px;flex-wrap:wrap}
.payment-month-stat-grid{margin:16px 0 0}
.payment-month-stat-grid .stat-card strong{font-size:22px}
.payment-month-hint{margin-top:0}
.payment-record-edit-panel .panel-head p{display:flex;align-items:center;gap:8px;flex-wrap:wrap}
.payment-month-edit-form{margin-top:10px}
@media(max-width:760px){.payment-month-edit-header{flex-direction:column}.payment-month-edit-actions{width:100%}.payment-month-edit-actions .btn{flex:1}}


/* Parent online payment workflow */
.online-payment-panel { max-width: 1180px; }
.online-payment-filter { flex-wrap: wrap; align-items: end; margin: 18px 0 22px; }
.online-payment-filter label { min-width: 220px; flex: 1; }
.online-payment-summary { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; margin: 18px 0 22px; }
.online-payment-summary > div { min-width: 0; padding: 16px; background: #f9f7ff; border: 1px solid #eae5f7; border-radius: 12px; display: flex; flex-direction: column; gap: 7px; }
.online-payment-summary strong { font: 800 20px Manrope, sans-serif; color: var(--ink); overflow-wrap: anywhere; }
.online-payment-summary small { color: var(--muted); font-size: 11px; line-height: 1.4; }
.online-payment-summary .online-amount-due { background: #fff8eb; border-color: #e6d9fb; }
.online-method-choice { display: flex; align-items: center; gap: 14px; padding: 17px; border: 1px solid #b99dff; background: #f5f1ff; border-radius: 12px; margin: 18px 0; }
.online-method-icon { width: 42px; height: 42px; border-radius: 12px; background: #e6dcff; color: #5024c1; display: flex; align-items: center; justify-content: center; font-size: 23px; font-weight: 800; flex-shrink: 0; }
.online-method-text { display: flex; flex-direction: column; gap: 5px; flex: 1; min-width: 0; }
.online-method-text strong { color: var(--ink); font-size: 13px; }
.online-method-text span { color: var(--muted); font-size: 11px; line-height: 1.6; }
.online-method-selected { color: #5024c1; background: #e6dcff; border-radius: 20px; padding: 6px 10px; white-space: nowrap; font-size: 10px; font-weight: 800; }
.online-pay-action { margin-top: 18px; }
.online-pay-button { padding: 13px 18px; font-size: 12px; }
.online-payment-footnote { max-width: 700px; line-height: 1.65; margin-top: 13px; }
.online-setup-notice { line-height: 1.7; }
.online-result-icon { width: 54px; height: 54px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 28px; font-weight: 800; margin: 18px 0; }
.online-result-icon.success { background: #e2f7eb; color: #13845f; }
.online-result-icon.warning { background: #fff2d6; color: #a86b00; }
.online-result-icon.pending { background: #efe8ff; color: #592ccb; }
.online-result-amount { font: 800 28px Manrope, sans-serif; margin: 18px 0; color: var(--ink); }
@media(max-width:850px) { .online-payment-summary { grid-template-columns: repeat(2, minmax(0,1fr)); } }
@media(max-width:560px) { .online-payment-summary { grid-template-columns: 1fr; } .online-method-choice { align-items: flex-start; flex-wrap: wrap; } .online-method-selected { margin-left: 56px; } }

.online-reconciliation-panel { border-color: #e6d9fb; }
.online-reconciliation-panel .panel-head { margin-bottom: 12px; }


/* Optional LMS login controls embedded in TMS profile forms. */
.profile-login-panel{grid-column:1/-1;min-width:0;margin:4px 0;padding:16px 18px;border:1px solid #e1d8f7;border-radius:12px;background:#f8f5ff;}
.profile-login-panel legend{padding:0 7px;color:#5024c1;font-size:12px;font-weight:800;letter-spacing:.02em;}
.profile-login-toggle-label{display:flex;align-items:center;gap:9px;font-weight:700;color:#2a1e49;margin:2px 0 12px;}
.profile-login-toggle-label input{width:auto;min-height:auto;accent-color:#6b39e8;}
.profile-login-fields{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px;margin:10px 0;}
.profile-login-fields[hidden]{display:none!important;}
.profile-login-fields label{display:flex;flex-direction:column;gap:6px;min-width:0;color:#675496;font-size:11px;font-weight:700;}
.profile-login-panel>small{display:block;color:#7665a3;font-size:11px;line-height:1.55;margin-top:8px;}
.profile-login-existing{border-left:3px solid #6b39e8;}
@media(max-width:700px){.profile-login-fields{grid-template-columns:1fr;}}


/* TTI official logo integration */
.tti-logo{display:block;object-fit:contain;background:#fff;flex:0 0 auto;}
.brand .tti-logo-sidebar{width:48px;height:48px;padding:2px;border-radius:9px;margin-right:10px;}
.brand{align-items:center;}
.auth-card .tti-logo-login{width:96px;height:96px;object-fit:contain;padding:3px;border-radius:12px;margin:0 auto 14px;}
.auth-card{text-align:center;}
.auth-card form,.auth-card .alert,.auth-card .muted{text-align:left;}
@media(max-width:700px){.brand .tti-logo-sidebar{width:42px;height:42px;margin-right:8px}.auth-card .tti-logo-login{width:82px;height:82px}}

/* TTI TMS identity: operational management uses navy and gold; intentionally distinct from teal/violet LMS. */
:root{--ink:#2a1e49;--muted:#8f81b2;--blue:#8546ee;--blue-dark:#6732d5;--pale:#f7f3ff;--line:#e9e1fb;--bg:#f8f7fa;--white:#fff;--green:#16856b;--shadow:0 8px 30px rgba(89,57,155,.06)}
body{background:#f8f7fa}
.sidebar{background:#30206f;border-right-color:#4a3792;color:#f3eeff}
.sidebar .brand{color:#f7f3ff}
.sidebar .brand small{color:#d2bfff}
.sidebar .nav-label,.sidebar .nav-group-label{color:#d2bfff}
.sidebar .nav-link{color:#ccc6dc}
.sidebar .nav-link:hover{background:#ffffff0d;color:#fff}
.sidebar .nav-link.active{background:linear-gradient(100deg,#9a5af5,#6732d5);color:#fff;box-shadow:inset 3px 0 #e1d0ff}
.sidebar .nav-link.active span{color:#fff}
.sidebar .sidebar-bottom{border-top-color:#4a3792}
.sidebar .avatar{background:#efe5ff;color:#4a2399}
.topbar{border-bottom-color:#e9e1fb;background:#fff}
.topbar .eyebrow{color:#7c3aed}
.date-chip{color:#6f3fd4;background:#f1e9ff}
.btn.primary{background:#7c3aed;border-color:#7c3aed;color:#fff}
.btn.primary:hover{background:#6732d5}
.btn:focus-visible,.nav-link:focus-visible{outline:3px solid #b69cf5;outline-offset:2px}
a{color:#7c3aed}
a:hover{color:#5b2bbd}
.stat-top i,.quick i{background:#f1e9ff;color:#7c3aed}
.progress span{background:linear-gradient(90deg,#8546ee,#b78bf8)}
.pill.scheduled,.pill.trial_booked,.pill.excused{background:#f1e9ff;color:#6f3fd4}
.form-grid input:focus,.form-grid select:focus,.form-grid textarea:focus{border-color:#a98cf0;box-shadow:0 0 0 3px #8546ee18}
.details summary{color:#7c3aed}
.profile-login-panel{border-color:#e0d3fa;background:#faf7ff;box-shadow:inset 3px 0 #8546ee}
.profile-login-panel legend{color:#6f3fd4}
.profile-login-toggle-label input{accent-color:#7c3aed}
.profile-login-existing{border-left-color:#8546ee}
@media(max-width:900px){.sidebar{background:#30206f}}

/* Payment record month is independent from the monthly-status filter. */
.payment-record-month-control{padding:14px 16px;border:1px solid var(--line,#e5dcf5);border-radius:12px;background:var(--soft,#f9f6ff)}
.payment-record-month-row{display:flex;align-items:center;gap:10px;flex-wrap:wrap;margin-top:6px}
.payment-record-month-row input[type="month"]{max-width:220px;min-width:180px}
.payment-record-month-row strong{color:var(--ink,#241745);font-size:13px}
.payment-record-month-control small{display:block;margin-top:7px;color:var(--muted,#7665a2);font-size:12px}
#payment-charge-type{max-width:100%}

/* Parent attendance: linked-student drawer cards and individual reports */
.parent-attendance-page .panel-head { margin-bottom: 20px; }
.parent-attendance-drawers { display: grid; gap: 12px; }
.parent-attendance-drawer { border: 1px solid var(--border, #e3dfed); border-radius: 14px; background: var(--surface, #fff); overflow: hidden; }
.parent-attendance-drawer[open] { box-shadow: 0 8px 24px rgba(31,20,60,.07); }
.parent-attendance-drawer-trigger { display: flex; align-items: center; gap: 14px; padding: 16px 18px; cursor: pointer; list-style: none; min-height: 76px; }
.parent-attendance-drawer-trigger::-webkit-details-marker { display: none; }
.parent-attendance-avatar { width: 44px; height: 44px; flex: 0 0 44px; border-radius: 50%; display: grid; place-items: center; font-weight: 750; background: #efe8ff; color: #4b27a5; }
.parent-attendance-student-info { display: grid; gap: 4px; min-width: 0; flex: 1; }
.parent-attendance-student-info strong { font-size: 1rem; }
.parent-attendance-student-info small { color: var(--muted, #6c5d92); font-size: .84rem; }
.parent-attendance-open-label { color: var(--primary, #5c31c8); font-size: .88rem; font-weight: 650; white-space: nowrap; }
.parent-attendance-chevron { color: var(--muted, #6c5d92); font-size: 1.25rem; transition: transform .18s ease; }
.parent-attendance-drawer[open] .parent-attendance-chevron { transform: rotate(180deg); }
.parent-attendance-drawer-content { padding: 4px 18px 20px; border-top: 1px solid var(--border, #e9e6f0); }
.parent-attendance-report-heading { display: flex; justify-content: space-between; align-items: center; gap: 16px; padding: 16px 0; }
.parent-attendance-report-heading h4 { margin: 0 0 5px; }
.parent-attendance-report-heading p { margin: 0; color: var(--muted, #6c5d92); font-size: .88rem; }
.parent-attendance-rate { text-align: right; flex: 0 0 auto; }
.parent-attendance-rate strong { display: block; font-size: 1.5rem; }
.parent-attendance-rate span { color: var(--muted, #6c5d92); font-size: .78rem; }
.parent-attendance-stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; margin: 4px 0 18px; }
.parent-attendance-stats > div { padding: 12px 14px; border-radius: 10px; background: var(--surface-soft, #f7f6fb); display: grid; gap: 5px; }
.parent-attendance-stats span { color: var(--muted, #6c5d92); font-size: .82rem; }
.parent-attendance-stats strong { font-size: 1.25rem; }
.parent-attendance-history { margin-top: 4px; }
@media (max-width: 620px) {
  .parent-attendance-drawer-trigger { gap: 10px; padding: 13px; }
  .parent-attendance-open-label { display: none; }
  .parent-attendance-drawer-content { padding: 4px 12px 14px; }
  .parent-attendance-report-heading { align-items: flex-start; }
  .parent-attendance-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

/* Titian Impian premium shell and dashboard refresh (2026-11-04). */
:root{--ink:#241746;--muted:#72619c;--blue:#50319e;--blue-dark:#3e2480;--pale:#f1eef7;--line:#e4e2eb;--bg:#f7f4ff;--white:#fff;--green:#28715d;--gold:#8546ee;--shadow:0 4px 16px rgba(89,57,155,.045)}
html{scrollbar-color:#b5abd0 #eee9fa;scrollbar-width:thin}body{background:var(--bg);color:var(--ink)}a{color:#50319e}a:focus-visible,button:focus-visible,input:focus-visible,select:focus-visible,textarea:focus-visible,summary:focus-visible{outline:3px solid rgba(133,70,238,.55);outline-offset:2px}::-webkit-scrollbar{width:10px;height:10px}::-webkit-scrollbar-track{background:#eee9fa}::-webkit-scrollbar-thumb{background:#c9bfe3;border:2px solid #eee9fa;border-radius:10px}::-webkit-scrollbar-thumb:hover{background:#9a8fbd}
.sidebar{width:264px;padding:18px 14px 14px;background:#30206f;border-right:1px solid #4a3792;color:#eae7f2}.brand{gap:10px;padding:0 8px 20px;color:#f8f5ff}.brand .tti-logo-sidebar{width:46px;height:46px;margin:0;padding:2px;border:1px solid #ffffff38;border-radius:8px}.brand b{color:#fff;font-size:14px}.brand small{color:#b4a9d0;font-size:10px}.sidebar-navigation{min-height:0;flex:1;overflow-y:auto;overflow-x:hidden;scrollbar-color:#7d6bb8 #30206f;scrollbar-width:thin}.sidebar-navigation::-webkit-scrollbar-track{background:#30206f}.sidebar-navigation::-webkit-scrollbar-thumb{background:#7d6bb8;border-color:#30206f}.nav-group-label{margin-top:10px;padding:12px 12px 6px;color:#d2bfff;font-size:9px;letter-spacing:1.35px}.nav-link{min-height:38px;gap:11px;margin:2px 0;padding:8px 11px;border-radius:6px;color:#c4bcda;font-size:12px;font-weight:500;transition:color .16s,background .16s}.nav-link span{width:19px;color:#d2bfff;font-size:15px}.nav-link:hover{background:#ffffff12;color:#fff}.nav-link.active{background:#45308c;box-shadow:inset 3px 0 var(--gold);color:#fff;font-weight:700}.nav-link.active span{color:#e1d0ff}.sidebar-bottom{gap:9px;margin-top:10px;padding:13px 5px 2px;border-color:#4a3792}.sidebar .avatar{background:#e1d0ff;color:#2d1e52}.sidebar .user-meta b{color:#fff}.sidebar .user-meta small,.sidebar .logout{color:#bdb4d5}.sidebar .logout:hover{color:#e1d0ff}.main{margin-left:264px}
.topbar{min-height:82px;height:auto;padding:16px 34px;background:#fffffff0;border-color:#e9e1fb}.topbar .eyebrow{color:#81759f;font-size:9px;letter-spacing:1.55px}.topbar h2{margin-top:5px;color:#281b4a;font-size:21px;letter-spacing:-.035em}.date-chip{display:inline-flex;align-items:center;gap:8px;border:1px solid #d9e9e1;border-radius:5px;background:#f3f8f5;color:#417560;padding:8px 11px;font-size:10px;font-weight:700}.date-chip span{font-size:8px}.content{max-width:1680px;padding:28px 34px 42px}
.welcome.dashboard-welcome{min-height:186px;padding:28px 32px;border:1px solid #392477;border-radius:9px;background:#392477;box-shadow:0 10px 28px #2012421c}.dashboard-welcome::after{position:absolute;right:125px;bottom:-140px;width:310px;height:310px;border:1px solid #dec2852b;border-radius:50%;content:""}.dashboard-welcome-copy{position:relative;z-index:1}.eyebrow.light{color:#e1d0ff;font-size:9px;letter-spacing:1.7px}.welcome h1{margin:10px 0 8px;font-size:clamp(23px,2vw,30px);letter-spacing:-.04em}.welcome p{max-width:620px;color:#d7d1e6;font-size:13px;line-height:1.65}.dashboard-date-label{display:inline-block;margin-top:16px;color:#c1bad4;font-size:10px}.welcome-art{z-index:1;width:210px;color:#dec18594;font-size:80px}.welcome-art span{top:12px;right:45px;color:#dec185cc;font-size:27px}.welcome-art b{right:0;bottom:8px;color:#e1d0ff;font-size:9px;letter-spacing:2.2px}
.dashboard-stats{gap:12px;margin:16px 0 25px}.dashboard-stat-card.stat-card{position:relative;overflow:hidden;padding:15px 16px 14px;border:1px solid #e9e1fb;border-radius:8px;background:#fff;box-shadow:0 2px 10px #23193e08}.dashboard-stat-card::after{top:0;right:auto;bottom:auto;left:0;width:100%;height:2px;background:#6a569d}.dashboard-stat-card.tone-green::after{background:#4a8b73}.dashboard-stat-card.tone-orange::after{background:#8546ee}.dashboard-stat-card.tone-violet::after{background:#7d6ca6}.dashboard-stat-card.tone-cyan::after{background:#5a8790}.dashboard-stat-card.tone-red::after{background:#b66d65}.dashboard-stat-card .stat-top{color:#756699;font-size:10px;line-height:1.35}.dashboard-stat-card .stat-top i{width:28px;height:28px;border:1px solid #e9e3f6;border-radius:7px;background:#f6f2ff;color:#6c5f8e;font-size:14px}.dashboard-stat-card.tone-green .stat-top i,.dashboard-stat-card.tone-orange .stat-top i,.dashboard-stat-card.tone-violet .stat-top i,.dashboard-stat-card.tone-cyan .stat-top i,.dashboard-stat-card.tone-red .stat-top i{border-color:#e9e3f6;background:#f6f2ff;color:#6c5f8e}.dashboard-stat-card strong{margin:12px 0 5px;color:#2a1c4e;font-size:clamp(19px,1.7vw,24px);letter-spacing:-.045em;font-variant-numeric:tabular-nums}.dashboard-stat-card small{color:#897ea6;font-size:9px;line-height:1.45}
.dashboard-section-heading{margin-bottom:11px}.dashboard-section-heading h3{color:#2a1c4e;font-size:14px;letter-spacing:-.02em}.dashboard-section-heading p{color:#796c9c;font-size:11px}.dashboard-quick-section{margin:23px 0 25px}.dashboard-quick-grid{gap:10px}.dashboard-quick-grid .quick-card{min-height:110px;gap:6px;padding:14px;border:1px solid #e9e1fb;border-radius:8px;background:#fff;box-shadow:none;transition:border-color .16s,transform .16s,background .16s}.dashboard-quick-grid .quick-card:hover{transform:translateY(-2px);border-color:#cdb8f3;background:#fcfaff;box-shadow:0 5px 14px #23193e0d}.dashboard-quick-grid .quick-card>span{width:30px;height:30px;border-radius:7px;background:#f1ebff;color:#7c3aed;font-size:16px}.dashboard-quick-grid .quick-card b{color:#342656;font-size:11px}.dashboard-quick-grid .quick-card small{color:#7f729e;font-size:9px;line-height:1.4}
.dashboard-grid{gap:14px}.dashboard-main-grid{grid-template-columns:minmax(0,1.45fr) minmax(290px,.85fr)!important}.dashboard-secondary-grid{grid-template-columns:repeat(2,minmax(0,1fr))!important}.dashboard-lower-grid{grid-template-columns:minmax(0,1.25fr) minmax(280px,.9fr)!important}.panel,.dashboard-panel{border:1px solid #e9e1fb;border-radius:8px;background:#fff;box-shadow:0 2px 10px #23193e08}.panel{padding:18px}.panel h3,.panel-head h3{color:#2a1c4e;font-size:13px;letter-spacing:-.015em}.panel-head{margin-bottom:14px}.panel-head p,.muted{color:#796c9c;font-size:10px;line-height:1.5}.panel-head>a{color:#7c3aed;font-size:10px}.panel-head>a:hover{color:#4a2399}th{background:#f7f6f2;color:#7a6e9a;font-size:9px;letter-spacing:.65px}th,td{padding:10px 9px;border-bottom-color:#ede9f8}td{color:#625386;font-size:11px}td b{color:#312354}.subline{color:#8c80a9;font-size:9px}.dashboard-alert-item{border-color:#e9e3f6;border-radius:7px;background:#fff}.dashboard-alert-item:hover{border-color:#dccbf8;background:#fcfaff}.dashboard-alert-icon{border-radius:7px;background:#efecf8;color:#5a4986}.dashboard-alert-item.tone-orange .dashboard-alert-icon,.dashboard-alert-item.tone-red .dashboard-alert-icon,.dashboard-alert-item.tone-violet .dashboard-alert-icon{background:#f4efff;color:#7a62b5}.dashboard-alert-copy b{color:#342656;font-size:10px}.dashboard-alert-copy small,.dashboard-footnote{color:#8579a5;font-size:9px}.dashboard-alert-item>strong{color:#342656;font-size:16px}.dashboard-clear-state{border-color:#dce9e1;border-radius:7px;background:#f6faf7}.dashboard-clear-state>span{background:#e4f0e8;color:#39715a}.dashboard-clear-state b{color:#342656;font-size:11px}.dashboard-clear-state small{color:#796c9c;font-size:9px}.dashboard-attendance-rate>div:first-child strong{color:#39715a;font-size:28px}.dashboard-attendance-counts{font-size:10px}.dashboard-status-list{gap:12px}.dashboard-status-track,.dashboard-subject-track{height:6px;background:#ece8f7}.dashboard-status-footer{color:#8579a5;font-size:9px}.dashboard-subject-label{color:#5e4e87;font-size:10px}.dashboard-subject-label strong{color:#342656}.dashboard-subject-track>span{background:#8173a6}.dashboard-subject-row>small{color:#897ea6;font-size:9px}.dashboard-empty-state{border-color:#e5e0f3;border-radius:7px;background:#faf8fe}.dashboard-empty-state>span{border-radius:7px;background:#f1ebff;color:#7c3aed}.dashboard-empty-state b{color:#342656}.dashboard-empty-state small{color:#796c9c}.dashboard-rate-badge.low{background:#f7efeb;color:#9e554c}.parent-child-card{border-color:#e9e1fb;border-radius:8px;background:#fff}.parent-child-avatar{border-radius:8px;background:#efebfa;color:#6c5a9a}.parent-child-name h4{color:#312354}.parent-child-metrics>div{border:1px solid #eeeaf8;border-radius:6px;background:#f9f7fd}.parent-child-actions{border-color:#ebe7f6}.parent-child-actions a{color:#50319e}.dashboard-welcome+.dashboard-stats{margin-top:15px}footer{border-color:#e9e1fb;color:#887ca5;font-size:9px}footer span{color:#968cb0}.btn{border-color:#e2ddf2;border-radius:6px;color:#4e3f74}.btn.primary{background:#3e2679;border-color:#3e2679}.btn.primary:hover{background:#2d1960}
a:focus-visible,button:focus-visible,input:focus-visible,select:focus-visible,textarea:focus-visible,summary:focus-visible{outline:3px solid #8546ee8c;outline-offset:2px}
@media(max-width:1200px){.sidebar{width:240px}.main{margin-left:240px}.topbar{padding-right:24px;padding-left:24px}.content{padding-right:24px;padding-left:24px}.dashboard-stats{grid-template-columns:repeat(4,minmax(0,1fr))}}
@media(max-width:900px){.sidebar{width:220px;padding-right:10px;padding-left:10px}.main{margin-left:220px}.sidebar-bottom{gap:7px}.user-meta b{font-size:10px}.dashboard-main-grid,.dashboard-secondary-grid,.dashboard-lower-grid{grid-template-columns:minmax(0,1fr)!important}}
@media(max-width:700px){.sidebar{position:sticky;inset:0 0 auto;z-index:20;display:block;width:100%;max-height:148px;overflow:hidden;padding:8px 12px 7px;border-right:0;border-bottom:1px solid #4a3792}.brand{height:45px;padding:0 2px 7px;gap:8px}.brand .tti-logo-sidebar{width:34px;height:34px}.brand b{font-size:12px}.brand small{margin-top:1px;font-size:9px}.sidebar-navigation{display:flex;gap:4px;overflow-x:auto;overflow-y:hidden;padding:2px 0 5px}.nav-group-label{display:none}.nav-link{flex:0 0 auto;min-height:36px;gap:7px;margin:0;padding:6px 9px;border:1px solid transparent;border-radius:5px;font-size:10px;white-space:nowrap}.nav-link span{width:auto;font-size:13px}.nav-link.active{border-color:#6a52b8;box-shadow:inset 0 -2px #b78bf8;background:#45308c}.sidebar-bottom{display:none}.main{min-height:calc(100vh - 90px);margin-left:0}.topbar{min-height:70px;padding:12px 16px}.topbar h2{font-size:18px}.topbar .eyebrow{font-size:8px}.content{padding:16px 14px 26px}.welcome.dashboard-welcome{min-height:165px;padding:20px}.welcome-art{width:110px;font-size:55px}.welcome-art span{right:22px}.dashboard-stats{grid-template-columns:repeat(2,minmax(0,1fr));gap:8px}.dashboard-stat-card.stat-card{padding:12px}.dashboard-stat-card strong{font-size:19px}.dashboard-quick-grid{grid-template-columns:repeat(2,minmax(0,1fr))}footer{padding:12px 14px}}
@media(max-width:420px){.top-actions{gap:8px}.top-actions .avatar{display:none}.welcome-art{display:none}.dashboard-stat-card .stat-top{align-items:flex-start;gap:5px}.dashboard-stat-card .stat-top i{width:24px;height:24px;flex:0 0 24px}.dashboard-stat-card small{font-size:8px}.dashboard-quick-grid{grid-template-columns:1fr 1fr}}
@media(prefers-reduced-motion:reduce){*,*::before,*::after{scroll-behavior:auto!important;animation-duration:.01ms!important;animation-iteration-count:1!important;transition-duration:.01ms!important}}
@media(forced-colors:active){.nav-link.active,.btn.primary,.dashboard-stat-card,.panel{forced-color-adjust:auto}}

/* Attendance reports: absences are marked in red */
.att-report .pill.absent{background:#d92d20;color:#fff;font-weight:700;border-color:#d92d20}
.att-report .pill.att-zero{background:#f2f0f7;color:#8e80b2}
.att-report td.att-absent-cell,.att-report tr.att-absent-row td{background:#fdeceb}
.att-report tr.att-absent-row td{color:#b42318}
.att-absent-text{color:#d92d20!important}
.att-absent-stat{border-color:#f5b5b0}
@media print{.att-report .pill.absent,.att-report td.att-absent-cell,.att-report tr.att-absent-row td{-webkit-print-color-adjust:exact;print-color-adjust:exact}}

/* ==========================================================================
   LMS-matched purple theme (2026-11-10)
   TMS now shares the TTI LMS palette: lavender canvas, purple sidebar,
   violet gradient actions. Tokens below mirror lms/assets/css/app.css.
   ========================================================================== */
:root{
  --ink:#302453;--muted:#81759f;--blue:#8546ee;--blue-dark:#6732d5;--pale:#f7f4ff;
  --line:#e9e1fb;--bg:#f7f4ff;--white:#fff;--gold:#a76bfa;
  --navy:#382477;--navy-deep:#29185f;--violet:#8546ee;--violet-dark:#6732d5;
  --shadow:0 8px 25px rgba(89,57,155,.08);
}
html{scrollbar-color:#c9bfe3 #f1ecfb}
body{background:#f7f4ff;color:#302453}
a{color:#7c3aed}a:hover{color:#6732d5}
a:focus-visible,button:focus-visible,input:focus-visible,select:focus-visible,textarea:focus-visible,summary:focus-visible{outline:3px solid #b9a0f5;outline-offset:2px}
::-webkit-scrollbar-track{background:#f1ecfb}::-webkit-scrollbar-thumb{background:#c9bfe3;border-color:#f1ecfb}::-webkit-scrollbar-thumb:hover{background:#a995dc}

/* Sidebar: LMS purple gradient with soft violet active row */
.sidebar{background:linear-gradient(180deg,#392477 0%,#30206f 60%,#241956 100%);border-right:1px solid rgba(255,255,255,.1);box-shadow:8px 0 30px rgba(56,37,121,.08);color:#eee7ff}
.sidebar-navigation{scrollbar-color:#6a52b8 #30206f}
.sidebar-navigation::-webkit-scrollbar-track{background:transparent}
.sidebar-navigation::-webkit-scrollbar-thumb{background:#6a52b8;border-color:transparent}
.brand b{color:#fff}.brand small{color:#d2bfff}
.sidebar .nav-label,.sidebar .nav-group-label,.nav-group-label{color:#d2bfff}
.nav-link,.sidebar .nav-link{color:#eee7ff;border-radius:10px;font-weight:600}
.nav-link span,.sidebar .nav-link span{color:#d2bfff}
.nav-link:hover,.sidebar .nav-link:hover{background:rgba(255,255,255,.10);color:#fff}
.nav-link.active,.sidebar .nav-link.active{background:linear-gradient(110deg,#a76bfa,#7542e8);box-shadow:0 5px 15px rgba(19,9,54,.2);color:#fff;font-weight:700}
.nav-link.active span,.sidebar .nav-link.active span{color:#fff}
.nav-link:focus-visible{outline:3px solid #c9b0ff;outline-offset:2px}
.sidebar-bottom,.sidebar .sidebar-bottom{border-top:1px solid rgba(255,255,255,.12)}
.sidebar .avatar{background:#e7d9ff;color:#4a2399}
.sidebar .user-meta b{color:#fff}.sidebar .user-meta small,.sidebar .logout{color:#d2bfff}.sidebar .logout:hover{color:#fff}
.brand .tti-logo-sidebar{border-color:rgba(255,255,255,.28)}

/* Workspace shell */
.main{background:radial-gradient(ellipse at top right,rgba(224,207,255,.35),transparent 45%),#f7f4ff}
.topbar{background:rgba(255,255,255,.94);border-bottom:1px solid #e9e1fb}
.topbar h2{color:#35216f}.topbar .eyebrow,.eyebrow{color:#8050d8}
.date-chip{color:#6732d5;background:#f1e9ff;border:1px solid #e3d5fb;border-radius:99px}
footer{border-top-color:#e9e1fb;color:#9a8fb8}footer span{color:#b3a9cc}

/* Dashboard welcome hero */
.welcome.dashboard-welcome,.welcome{background:linear-gradient(110deg,#352579 0%,#5a31b8 55%,#8546ee 100%);border:1px solid rgba(255,255,255,.35);border-radius:20px;box-shadow:0 12px 30px rgba(93,61,160,.18)}
.dashboard-welcome::after{border-color:rgba(255,255,255,.18)}
.eyebrow.light{color:#e1d0ff}
.welcome p{color:#eee7ff}.dashboard-date-label{color:#e1d0ff}
.welcome-art{color:rgba(255,255,255,.35)}.welcome-art span{color:#d9c2ff}.welcome-art b{color:#fff}

/* Stat cards: white->lavender, 3px purple base like LMS */
.stat-card,.dashboard-stat-card.stat-card{background:linear-gradient(145deg,#fff,#fbf8ff);border:1px solid #e8defb;border-bottom:3px solid #8c56ed;border-radius:16px;box-shadow:0 7px 20px rgba(87,54,148,.06);transition:transform .2s,box-shadow .2s}
.stat-card:hover{transform:translateY(-3px);box-shadow:0 12px 25px rgba(87,54,148,.11)}
.dashboard-stat-card::after{display:none}
.dashboard-stat-card.tone-green,.dashboard-stat-card.tone-cyan{border-bottom-color:#8d78ed}
.dashboard-stat-card.tone-orange{border-bottom-color:#e9b65c}
.dashboard-stat-card.tone-violet{border-bottom-color:#dc80d8}
.dashboard-stat-card.tone-red{border-bottom-color:#e07a8a}
.stat-card strong,.dashboard-stat-card strong{color:#302064}
.stat-top,.dashboard-stat-card .stat-top{color:#796a9c}
.stat-top i,.quick i,.dashboard-stat-card .stat-top i,.dashboard-stat-card.tone-green .stat-top i,.dashboard-stat-card.tone-orange .stat-top i,.dashboard-stat-card.tone-violet .stat-top i,.dashboard-stat-card.tone-cyan .stat-top i,.dashboard-stat-card.tone-red .stat-top i{background:#f1e9ff;border:0;border-radius:12px;color:#7c3aed}
.stat-card small,.dashboard-stat-card small{color:#8e82ad}

/* Panels, headings, tables */
.panel,.dashboard-panel{background:rgba(255,255,255,.97);border:1px solid #e9e1fb;border-radius:17px;box-shadow:0 7px 22px rgba(87,54,148,.055)}
.panel h3,.panel-head h3,.dashboard-section-heading h3{color:#35216f}
.panel-head p,.muted,.dashboard-section-heading p{color:#81759f}
.panel-head>a{color:#8046e8}.panel-head>a:hover{color:#5b2bbd}
th{background:#f7f3ff;color:#7d6fa3}
th,td{border-bottom-color:#eee8fb}
td{color:#4d4270}td b{color:#302064}
tbody tr:hover td{background:#fcfaff}
.subline{color:#9a8fb8}
.table-wrap{scrollbar-color:#c9bfe3 #f1ecfb}

/* Quick actions */
.dashboard-quick-grid .quick-card,.quick-card{background:#fff;border:1px solid #e9e1fb;border-radius:14px}
.dashboard-quick-grid .quick-card:hover,.quick-card:hover{border-color:#c9b2f3;background:#faf6ff;box-shadow:0 8px 20px rgba(87,54,148,.10)}
.dashboard-quick-grid .quick-card>span,.quick-card>span{background:#f1e9ff;color:#7c3aed;border-radius:11px}
.dashboard-quick-grid .quick-card b,.quick-card b{color:#35216f}
.dashboard-quick-grid .quick-card small,.quick-card small{color:#8e82ad}
.dashboard-alert-item:hover{border-color:#c9b2f3;background:#faf6ff}
.dashboard-alert-icon,.dashboard-alert-item.tone-orange .dashboard-alert-icon,.dashboard-alert-item.tone-red .dashboard-alert-icon,.dashboard-alert-item.tone-violet .dashboard-alert-icon{background:#f1e9ff;color:#7c3aed}
.dashboard-empty-state{background:#faf8ff;border-color:#e9e1fb}.dashboard-empty-state>span{background:#f1e9ff;color:#7c3aed}
.dashboard-subject-track>span{background:linear-gradient(90deg,#9b5cf6,#7138df)}
.dashboard-status-track,.dashboard-subject-track{background:#eee8fb}

/* Buttons, progress, forms */
.btn{border-color:#e1d6f7;color:#5e409c;border-radius:10px;font-weight:800}
.btn:hover{background:#f8f4ff;border-color:#c9b2f3}
.btn.primary,.btn.primary:visited{background:linear-gradient(115deg,#9a5af5,#7138dc);border-color:transparent;color:#fff;box-shadow:0 5px 13px rgba(116,56,220,.18)}
.btn.primary:hover{background:linear-gradient(115deg,#9a5af5,#7138dc);filter:brightness(1.05);color:#fff}
.btn:focus-visible,.nav-link:focus-visible{outline:3px solid #b9a0f5}
.progress{background:#eee8fb}.progress span{background:linear-gradient(90deg,#9b5cf6,#7138df)}
.form-grid input,.form-grid select,.form-grid textarea,.filterbar input,.filterbar select,.mini-form input,.mini-form select,.mini-form textarea,select,.searchbox{border-color:#ddd2f5;border-radius:10px;background:#fdfcff;color:#3b2f66}
.form-grid input:focus,.form-grid select:focus,.form-grid textarea:focus,.filterbar input:focus,.filterbar select:focus,.mini-form input:focus,.mini-form select:focus,.mini-form textarea:focus,select:focus{border-color:#9862e8;box-shadow:0 0 0 4px #8b5ce51b;background:#fff}
.form-grid label,.filterbar label,.mini-form label,.auth-card label{color:#5c4f85}
details summary{color:#7c3aed}
.pill{background:#f1ecfb;color:#6f6290}
.pill.scheduled,.pill.trial_booked,.pill.excused{background:#f1e9ff;color:#6732d5}
.summary-explainer{background:#f7f3ff;border-color:#e3d8f9;color:#6a5b93}
.profile-login-panel{border-color:#e3d5fb;background:#faf7ff;box-shadow:inset 3px 0 #8546ee}
.profile-login-panel legend{color:#6732d5}
.profile-login-toggle-label input,.permission-check input{accent-color:#7c3aed}
.profile-login-existing{border-left-color:#8546ee}
.tutor-subject-chip{border-color:#dccbf8;background:#f1e9ff;color:#6732d5}

/* Sign-in / public enquiry */
.auth-bg{background:radial-gradient(circle at 100% 0,#efe5ff 0,transparent 42%),radial-gradient(ellipse at top left,#e9dcff,transparent 48%),#faf8ff}
.auth-card{border:1px solid #ebe1fb;border-radius:24px;box-shadow:0 22px 65px rgba(69,42,130,.13)}
.auth-card h1{color:#342579}
.auth-card input,.auth-card textarea{border-color:#ddd2f5;border-radius:11px;background:#fdfcff}
.auth-card input:focus,.auth-card textarea:focus{border-color:#9862e8;box-shadow:0 0 0 4px #8b5ce51b;outline:0;background:#fff}
.demo-box{background:#f7f3ff;color:#6a5b93}
.auth-card>a{color:#7d42d9}

@media(max-width:700px){
  .sidebar{background:linear-gradient(180deg,#392477,#2a1b65);border-bottom:1px solid rgba(255,255,255,.12)}
  .nav-link.active{border-color:rgba(255,255,255,.28);box-shadow:0 4px 12px rgba(19,9,54,.25);background:linear-gradient(110deg,#a76bfa,#7542e8)}
}
@media(max-width:900px){.sidebar{background:linear-gradient(180deg,#392477,#241956)}}
@media print{.stat-card,.panel{background:#fff!important}}




/* Compact multi-select dropdown for tutor subjects. The menu opens below the
   familiar single-line control; multiple checkboxes can be ticked before Confirm. */
.subject-dropdown-wrap {
    position: relative;
    min-width: 0;
    width: 100%;
}
.form-grid .subject-select-row button.subject-dropdown-trigger {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    width: 100%;
    min-width: 0;
    min-height: 44px;
    margin: 0;
    padding: 11px 13px;
    border: 1px solid #dfd8f0;
    border-radius: 10px;
    background: #fff;
    color: #423465;
    font: 500 13px 'DM Sans', sans-serif;
    text-align: left;
    cursor: pointer;
    box-shadow: 0 1px 2px rgba(36,20,75,.025);
}
.form-grid .subject-select-row button.subject-dropdown-trigger:focus-visible,
.form-grid .subject-select-row button.subject-dropdown-trigger[aria-expanded="true"] {
    outline: none;
    border-color: #9c78f7;
    box-shadow: 0 0 0 4px rgba(107,57,232,.11);
}
.subject-dropdown-chevron {
    color: #57428b;
    font-size: 18px;
    line-height: 1;
}
.subject-dropdown-menu {
    position: absolute;
    z-index: 100;
    top: calc(100% + 5px);
    left: 0;
    right: 0;
    max-height: 260px;
    overflow-y: auto;
    padding: 6px;
    border: 1px solid #dfd8f0;
    border-radius: 10px;
    background: #fff;
    box-shadow: 0 12px 28px rgba(39,22,79,.16);
}
.subject-dropdown-menu[hidden] {
    display: none !important;
}
.subject-dropdown-option {
    display: flex;
    align-items: center;
    gap: 10px;
    min-height: 36px;
    margin: 0;
    padding: 7px 9px;
    border-radius: 7px;
    color: #423465;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
}
.subject-dropdown-option:hover {
    background: #f5f0ff;
}
.subject-dropdown-option input[type="checkbox"] {
    flex: 0 0 auto;
    width: 16px;
    height: 16px;
    margin: 0;
    accent-color: #6b39e8;
}
.subject-dropdown-option input[type="checkbox"]:disabled + span {
    color: #a69bbd;
}
@media (max-width: 620px) {
    .subject-select-row {
        grid-template-columns: minmax(0, 1fr) auto;
    }
    .form-grid .subject-select-row .subject-add-button {
        min-width: 96px;
        padding-inline: 13px;
    }
}


/* Ensure the custom tutor subject dropdown receives the same styled control
   treatment even when its form is rendered outside a .form-grid wrapper. */
.subject-select-row .subject-dropdown-wrap {
    display: block;
    width: 100%;
    min-width: 0;
}
.subject-select-row button.subject-dropdown-trigger {
    box-sizing: border-box;
    appearance: none;
    -webkit-appearance: none;
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    min-width: 0;
    min-height: 44px;
    padding: 11px 13px;
    border: 1px solid #dfd8f0;
    border-radius: 10px;
    background: #fdfcff;
    color: #423465;
    font: 500 13px 'DM Sans', sans-serif;
    line-height: 1.4;
    text-align: left;
    box-shadow: 0 1px 2px rgba(36,20,75,.025);
    cursor: pointer;
}
.subject-select-row button.subject-dropdown-trigger:hover {
    border-color: #bba5ed;
    background: #fff;
}
.subject-select-row button.subject-dropdown-trigger:focus,
.subject-select-row button.subject-dropdown-trigger[aria-expanded="true"] {
    outline: none;
    border-color: #9c78f7;
    box-shadow: 0 0 0 4px rgba(107,57,232,.11);
}
.subject-select-row .subject-add-button {
    box-sizing: border-box;
    min-height: 44px;
    min-width: 104px;
    padding: 10px 17px;
}
.subject-select-row .subject-dropdown-menu {
    box-sizing: border-box;
    width: 100%;
}


/* Tutor subjects: align each checkbox and subject name on one clean row.
   Scoped IDs override the global form label/grid rules that were centering them. */
#tutor-subject-picker .subject-dropdown-menu {
    box-sizing: border-box !important;
    display: block !important;
    padding: 7px !important;
    max-height: 270px !important;
    overflow-x: hidden !important;
    overflow-y: auto !important;
}
#tutor-subject-picker .subject-dropdown-menu .subject-dropdown-option {
    box-sizing: border-box !important;
    display: flex !important;
    flex-direction: row !important;
    align-items: center !important;
    justify-content: flex-start !important;
    gap: 11px !important;
    width: 100% !important;
    min-height: 39px !important;
    margin: 0 !important;
    padding: 8px 11px !important;
    border: 0 !important;
    border-radius: 7px !important;
    background: transparent !important;
    color: #423465 !important;
    text-align: left !important;
    cursor: pointer !important;
}
#tutor-subject-picker .subject-dropdown-menu .subject-dropdown-option:hover {
    background: #f4efff !important;
}
#tutor-subject-picker .subject-dropdown-menu .subject-dropdown-option:has(input:checked) {
    background: #eee7ff !important;
    color: #4f22bd !important;
}
#tutor-subject-picker .subject-dropdown-menu .subject-dropdown-option input[type="checkbox"] {
    -webkit-appearance: auto !important;
    appearance: auto !important;
    display: inline-block !important;
    flex: 0 0 16px !important;
    width: 16px !important;
    height: 16px !important;
    min-width: 16px !important;
    margin: 0 !important;
    padding: 0 !important;
    accent-color: #6b39e8 !important;
    vertical-align: middle !important;
}
#tutor-subject-picker .subject-dropdown-menu .subject-dropdown-option > span {
    display: block !important;
    flex: 1 1 auto !important;
    min-width: 0 !important;
    margin: 0 !important;
    padding: 0 !important;
    color: inherit !important;
    font-family: 'DM Sans', sans-serif !important;
    font-size: 13px !important;
    font-weight: 500 !important;
    line-height: 1.4 !important;
    text-align: left !important;
}
#tutor-subject-picker .subject-dropdown-menu .subject-dropdown-option input:disabled + span {
    color: #aaa0bd !important;
}
#tutor-subject-picker .subject-dropdown-menu .subject-dropdown-option:has(input:disabled) {
    opacity: .65 !important;
    cursor: not-allowed !important;
}
#tutor-subject-picker .subject-dropdown-menu .subject-dropdown-option:has(input:disabled):hover {
    background: transparent !important;
}


/* Tutor subject picker — refined popup surface and dependable close affordance. */
#tutor-subject-picker .subject-dropdown-menu {
    display: flex !important;
    flex-direction: column !important;
    max-height: min(320px, 45vh) !important;
    padding: 0 !important;
    overflow: hidden !important;
    border: 1px solid #e5ddf5 !important;
    border-radius: 12px !important;
    background: #fff !important;
    box-shadow: 0 16px 36px rgba(43, 24, 87, .18), 0 3px 8px rgba(43, 24, 87, .07) !important;
}
#tutor-subject-picker .subject-dropdown-menu[hidden] {
    display: none !important;
}
#tutor-subject-picker .subject-dropdown-menu-header {
    position: sticky;
    top: 0;
    z-index: 1;
    display: flex;
    flex: 0 0 auto;
    align-items: center;
    justify-content: space-between;
    min-height: 42px;
    padding: 0 12px 0 14px;
    border-bottom: 1px solid #eee9f7;
    background: #fbf9ff;
    color: #57428b;
    font-family: 'DM Sans', sans-serif;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: .045em;
    text-transform: uppercase;
}
#tutor-subject-picker .subject-dropdown-close {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    padding: 0;
    border: 1px solid transparent;
    border-radius: 7px;
    background: transparent;
    color: #74658f;
    font-size: 21px;
    line-height: 1;
    cursor: pointer;
}
#tutor-subject-picker .subject-dropdown-close:hover {
    border-color: #e4daf8;
    background: #f0eaff;
    color: #572ac8;
}
#tutor-subject-picker .subject-dropdown-close:focus-visible {
    outline: 2px solid #8b5cf6;
    outline-offset: 2px;
}
#tutor-subject-picker .subject-dropdown-options {
    min-height: 0;
    overflow-x: hidden;
    overflow-y: auto;
    padding: 6px;
    overscroll-behavior: contain;
}
#tutor-subject-picker .subject-dropdown-options .subject-dropdown-option {
    display: flex !important;
    flex-direction: row !important;
    align-items: center !important;
    justify-content: flex-start !important;
    gap: 11px !important;
    width: 100% !important;
    min-height: 40px !important;
    margin: 0 !important;
    padding: 8px 11px !important;
    border-radius: 8px !important;
    background: transparent !important;
    color: #423465 !important;
    text-align: left !important;
    cursor: pointer !important;
}
#tutor-subject-picker .subject-dropdown-options .subject-dropdown-option:hover {
    background: #f6f2ff !important;
}
#tutor-subject-picker .subject-dropdown-options .subject-dropdown-option:has(input:checked) {
    background: #eee8ff !important;
    color: #5127bd !important;
}
#tutor-subject-picker .subject-dropdown-options .subject-dropdown-option input[type="checkbox"] {
    flex: 0 0 17px !important;
    width: 17px !important;
    height: 17px !important;
    min-width: 17px !important;
    margin: 0 !important;
    padding: 0 !important;
    accent-color: #6b39e8 !important;
}
#tutor-subject-picker .subject-dropdown-options .subject-dropdown-option > span {
    flex: 1 1 auto !important;
    min-width: 0 !important;
    margin: 0 !important;
    padding: 0 !important;
    color: inherit !important;
    font-size: 13px !important;
    font-weight: 500 !important;
    line-height: 1.4 !important;
    text-align: left !important;
}
