/* One shared palette for landing, every portal role, dialogs and legal pages. */
:root{
 --bg:#fffaf7;--surface:#fff;--surface-2:#fff5ef;--ink:#302326;--muted:#88716f;
 --line:#eee0db;--brand:#421b1e;--brand-2:#f8e7e7;--brand-soft:#f8e7e7;
 --danger:#a83632;--warn:#865521;--shadow:0 8px 28px rgba(66,27,30,.045);
 --radius:16px;--radius-sm:10px;--peach:#ffe3c9;--pink:#f6d5e4;--lavender:#e4d9fb;
 --logo-filter:brightness(0) saturate(100%) invert(13%) sepia(19%) saturate(1810%) hue-rotate(308deg) brightness(91%) contrast(91%);
}
html,body{background:var(--bg);color:var(--ink);font-family:-apple-system,BlinkMacSystemFont,'Segoe UI',sans-serif;-webkit-font-smoothing:antialiased}
button,input,select,textarea{accent-color:var(--brand)}
:where(button,a,input,select,textarea):focus-visible{outline:3px solid #be83a7;outline-offset:3px}
.app-shell{background:var(--bg)}.app-shell .sidebar{background:#fff;border-color:var(--line);box-shadow:none}
.brand img,.legal-brand img{filter:var(--logo-filter)!important}.brand{border-bottom:1px solid #f0e4de;padding-bottom:12px}
.sidebar .role-pill{background:#fff4ef;border:1px solid #f1ded4;color:#8c7168;border-radius:10px}.sidebar .role-pill strong{color:#421b1e}
.sidebar .nav button{color:#806a68;font-weight:500;border-radius:9px;min-height:42px}.sidebar .nav button:hover{background:#fff4ef}.sidebar .nav button.active{background:#421b1e;color:#fff}.sidebar .nav button.active .nav-mini-dot{background:#f3bfd4;box-shadow:0 0 0 3px #421b1e}.sidebar .nav-icon{font-size:15px;opacity:.9}.sidebar .sidebar-bottom{border-color:#eee0db}.sidebar .mini-profile .sub{color:#967d77}
.app-shell .topbar{background:rgba(255,255,255,.94);border-color:#eee0db;backdrop-filter:blur(22px);-webkit-backdrop-filter:blur(22px)}.app-shell .top-title{font-weight:600;color:#421b1e;letter-spacing:-.025em}.app-shell .top-profile{border:2px solid #efddd7}.app-shell .icon-btn{background:white;border-color:#eee0db;color:#694147;box-shadow:none}.app-shell .icon-btn:hover{background:#fcf0ec}
.app-shell .page-head h1{font-size:29px;font-weight:650;color:#421b1e;letter-spacing:-.045em}.app-shell .page-head p{font-size:13px;color:#927772}.app-shell .content{background:transparent}
.card,.settings-card,.matching-teacher-cell,.chat-list,.table-wrap,.calendar-grid,.admin-panel{border-color:#eee0db;box-shadow:0 3px 12px #421b1e03;border-radius:16px;background:white}.card h3,.settings-card h3{font-weight:600;color:#421b1e;letter-spacing:-.025em}.card .card-sub,.list-sub,.small-text.muted{color:#937b76}.card .list-row,.table td,.table th{border-color:#f0e4de}.list-row:hover{transform:none;background:#fffaf7}.list-title{font-weight:550}
.btn{font-weight:550;border-color:#e8d6ce;border-radius:8px;color:#62423f;box-shadow:none}.btn:hover{box-shadow:0 4px 12px #421b1e08}.btn.primary{background:#211c1c;border-color:#211c1c;color:white}.btn.primary:hover{background:#421b1e;border-color:#421b1e}.btn.soft{background:#f7e7eb;color:#74374b;border-color:#ecd0d8}.btn.danger{background:#fff0ef;color:#a43632;border-color:#ecc8c5}.btn.small{border-radius:7px}.input,.select,.textarea{background:#fffdfb;border-color:#e7d8d0;border-radius:9px;color:#382b29}.input:focus,.select:focus,.textarea:focus{border-color:#bc8295;box-shadow:0 0 0 3px #f3dce5;outline:0}label,.field label{color:#715551}input[type=range]{accent-color:#944765}
.next-class{background:linear-gradient(120deg,#fac8c7,#ffe1c7);color:#421b1e;box-shadow:none;border-radius:16px;border:1px solid #f4d4c9}.next-class .eyebrow{color:#895550;opacity:1;font-size:10px}.next-class h2{color:#421b1e;font-weight:650}.next-class .line{color:#865c54}.next-class .btn.primary{background:#211c1c;color:white;border-color:#211c1c}.next-class .btn.soft{background:#fff7;color:#643d34;border-color:#deb4a3}.next-class .muted{color:#896359}
.kpi-strip>.card:nth-child(3n+1),.grid.four>.card:nth-child(4n+1){background:#f5dce9;border-color:#f0cfe1}.kpi-strip>.card:nth-child(3n+2),.grid.four>.card:nth-child(4n+2){background:#ffead3;border-color:#f4ddc4}.kpi-strip>.card:nth-child(3n),.grid.four>.card:nth-child(4n+3){background:#e7dff9;border-color:#dcd1f0}.kpi-strip .value,.stat-value,.kpi-value{color:#421b1e;font-weight:650;letter-spacing:-.04em}
.table thead,.table th{background:#fff5ef;color:#98746a;font-size:10px;font-weight:600;letter-spacing:.04em}.table tbody tr:hover{background:#fffaf7}.status.green{background:#e9f4ec;color:#31634a}.status.yellow{background:#fff0d7;color:#83582d}.status.red{background:#fbe3e2;color:#a24642}.status.blue{background:#eee7fa;color:#6a4c99}.status{font-weight:600;border-radius:6px}.pill-tabs button{font-weight:550;border-color:#eadad3;border-radius:8px}.pill-tabs button.active{background:#421b1e;border-color:#421b1e;color:white}
.calendar-grid,.calendar-cell,.calendar-day{border-color:#eaded8}.calendar-cell.today,.calendar-day.today{background:#fff0e7}.class-block{background:#f5dce8;border-color:#ecd0dc;color:#713c50}.class-block:hover{box-shadow:0 5px 12px #421b1e0b}.timezone-pair{background:#fff8f2;border-color:#eadbd1}.tz-arrow{color:#965565}.check-card{background:#fffaf7;border-color:#eadbd2}.check-card:has(input:checked){background:#f8e5ed;border-color:#c88da4;box-shadow:0 0 0 2px #f7e5ed}.avatar{background:#f0d9e1;color:#7e3d54}.student-chip,.matching-student-cell{background:#fff6f0;border-color:#ebd8ca}.matching-student-cell:hover{background:#fae7e3;border-color:#d6a8a0}.location-hint{background:#fff1e7;border-color:#edcfb9;color:#885c48}
.message-thread{background:#fff6f0;border-color:#eadbd2}.bubble.me{background:#421b1e;color:white}.bubble.them{background:#fff;border-color:#e9dbd5;color:#47312e}.message-compose{border-color:#e9d6ca;background:white}.chat-person:hover{background:#fff5ef}.chat-person.active{background:#f9e2e8;color:#74344b}.message-count,.header-count{background:#a75b76;color:white}
.modal{border:1px solid #ecdcd4;border-radius:18px;box-shadow:0 28px 100px #421b1e25;background:white}.modal-head,.modal-foot{background:#fff9f5;border-color:#efdfd5}.modal h3{color:#421b1e}.modal-backdrop{background:rgba(48,22,26,.3);backdrop-filter:blur(5px)}.modal-close{background:#f8e9e4;color:#865950}.notice{background:#fff1e2;border-color:#edceb5;color:#8d654f}.toast{background:#302025;color:#fff;border-color:#5a3039}.live-notification{border-color:#e7c5cb;box-shadow:0 15px 45px #421b1e16}.language-pill{border-color:#ead6ce;color:#86445a}.language-choice.active,.avatar-choice.selected{border-color:#aa5e7b;background:#fbebf2;box-shadow:0 0 0 3px #f6e4ee}.profile-summary-grid>div{background:#fff7f1;border-color:#edddd3}
/* Reader chrome changes color only; page fit, QCF type, spread and flip geometry stay module-owned. */
.reader-global-controls :is(button,input,select),.route-control-group :is(button,input,select),.reader-global-controls>.mac-tools :is(button,input){color:#6c444b;border-color:#e7d2cc}.route-control-group,.reader-global-controls>.mac-tools{background:#fff8f3!important;border-color:#eadad2!important}.route-control-group button.active,.reader-global-controls>.mac-tools button.active{background:#efd6e0!important;color:#732e49!important}.route-control-group button:hover,.reader-global-controls>.mac-tools button:hover{background:#f9e7e8}.quran-reader-shell>.quran-spread,.quran-webp-stage,.reader-stage,.book-reader-viewport{background:#faf1eb!important}.quran-page-meta{color:#9a7062}.quran-text-page{color:#2a2520}.quran-mini-actions button.play{background:#421b1e;color:white}.book-card:hover{border-color:#c79b9b}
.spotify-player{background:linear-gradient(130deg,#f5d2e1,#ffe5ce);border-color:#edd0d1;color:#421b1e;box-shadow:none}.spotify-copy h2,.spotify-copy p{color:#63343f}.spotify-copy .muted{color:#9b6c71}.audio-disc-shell{box-shadow:0 22px 50px #6c304b20}.audio-disc-ring{background:repeating-radial-gradient(circle,#302227 0 3px,#49323b 4px 5px)}.audio-disc{background:conic-gradient(#421b1e,#b86e90,#421b1e)}.audio-media-toolbar{background:#fff8f3;border-color:#ead8ce;color:#693f47}.quran-playlist{background:#fffdfb;border-color:#eeded6}.playlist-head{background:#fff5ec;border-color:#edddd3}.playlist-scroll button:hover,.playlist-scroll button.active{background:#f6e2ec;color:#7d3b57}.playlist-scroll button span,.playlist-scroll button i{color:#a38583}.audio-repeat-modes button.active{background:#f1d8e4;border-color:#c98da8;color:#77324e}.audio-repeat-modes button{border-color:#ead4cd;color:#8c6d6c}.audio-media-buttons button.active,.audio-play-button{background:#421b1e;color:white}
.legal-shell{color:#46302f}.legal-nav{border-color:#ead8d0}.legal-card{background:white;border-color:#edddd5;box-shadow:var(--shadow)}.legal-hero h1{color:#421b1e}.legal-hero{background:linear-gradient(120deg,#fff0e8,#f6eafa);border-color:#ecdcd5}.back-link{color:#8c4865}
@media(max-width:760px){.app-shell .sidebar{box-shadow:20px 0 50px #421b1e12}.app-shell .page-head h1{font-size:25px}.app-shell .content{padding-inline:14px}.next-class{padding:22px}.app-shell .topbar{background:rgba(255,255,255,.96)}}
/* Replace the legacy blue message shortcut and unify the remaining toolbars. */
.header-message-btn{background:#421b1e!important;border-color:#421b1e!important;color:white!important}.header-message-btn:hover{background:#693041!important}.header-message-btn .chat-header-icon circle{fill:#421b1e!important}.audio-quran-page{background:#fff8f3}.audio-media-buttons .primary{background:#421b1e;color:white}.audio-toolbar-progress input{accent-color:#9e5a79}.arabic-fast-reader{background:#fffaf6!important}.legal-shell .eyebrow{background:#f8e3e9;color:#8a4563}
