:root{
  --bg:#F1F3F9; --surface:#FFFFFF; --ink:#1A1D29; --ink-soft:#8A8FA3;
  --primary:#4C5FE0; --primary-light:#6B7CEE; --primary-soft:#EEF0FE;
  --accent:#F5A623; --accent-soft:#FDF1DC;
  --line:#EBEDF5; --success:#1FAE6A; --success-soft:#E5F8EE; --danger:#F0506E; --danger-soft:#FDEAEF;
  --radius:18px; --shadow:0 2px 16px rgba(31,45,90,.07);
}
[data-theme="dark"]{
  --bg:#0F1117; --surface:#1A1D29; --ink:#EDEFF7; --ink-soft:#9199B5;
  --primary:#6B7CEE; --primary-light:#8B99F2; --primary-soft:#242A44;
  --accent:#F5B84C; --accent-soft:#3A2E15;
  --line:#2A2E3D; --success:#3ECB8C; --success-soft:#12301F; --danger:#F27189; --danger-soft:#3A1B24;
  --shadow:0 2px 16px rgba(0,0,0,.35);
}
.theme-toggle{display:flex;align-items:center;gap:10px;background:transparent;border:none;color:var(--ink-soft);padding:11px 14px;border-radius:12px;font-size:13.5px;font-family:inherit;cursor:pointer;text-align:right;width:100%;}
.theme-toggle:hover{background:var(--primary-soft);color:var(--primary);}
*{box-sizing:border-box;}
body{margin:0;font-family:'IBM Plex Sans Arabic',sans-serif;background:var(--bg);color:var(--ink);-webkit-font-smoothing:antialiased;}
.mono{font-family:'IBM Plex Mono',monospace;}
a{text-decoration:none;color:inherit;}
#app{display:flex;min-height:100vh;}
.sidebar{width:230px;flex-shrink:0;background:#16323D;color:#fff;display:flex;flex-direction:column;padding:24px 14px;transition:width .2s ease;position:relative;}
.sidebar.collapsed{width:76px;padding:24px 12px;}
.sidebar-toggle{position:absolute;top:24px;left:-12px;width:24px;height:24px;border-radius:50%;background:var(--primary);color:#fff;border:2px solid #16323D;display:flex;align-items:center;justify-content:center;cursor:pointer;font-size:11px;z-index:5;}
.brand{display:flex;align-items:center;gap:10px;margin-bottom:20px;padding:0 4px;}
.brand-mark{width:34px;height:34px;border-radius:12px;background:var(--primary);display:flex;align-items:center;justify-content:center;font-family:'IBM Plex Mono',monospace;font-weight:600;color:#fff;font-size:14px;}
.brand-text{font-weight:700;font-size:15px;line-height:1.3;color:#fff;}
.brand-text span{display:block;font-size:11px;font-weight:400;color:#9FB3BB;}
.sidebar.collapsed .brand-text,.sidebar.collapsed .brand img{display:none;}
nav{display:flex;flex-direction:column;gap:3px;}
.nav-btn{display:flex;align-items:center;gap:10px;background:transparent;border:none;color:#C4D2D6;padding:11px 14px;border-radius:12px;font-size:13.5px;font-family:inherit;cursor:pointer;text-align:right;transition:.15s;}
.nav-icon{flex-shrink:0;width:20px;text-align:center;font-size:15px;}
.nav-label{white-space:nowrap;overflow:hidden;}
.sidebar.collapsed .nav-btn{justify-content:center;padding:11px 8px;}
.sidebar.collapsed .nav-label{display:none;}
.nav-btn:hover{background:rgba(255,255,255,.08);color:#fff;}
.nav-btn.active{background:var(--primary);color:#fff;font-weight:600;box-shadow:0 4px 12px rgba(76,95,224,.35);}
.sidebar.collapsed .theme-toggle,.sidebar.collapsed #pwaInstallBtn{display:none !important;}
.theme-toggle{color:#C4D2D6;}
.theme-toggle:hover{background:rgba(255,255,255,.08);color:#fff;}
.sidebar-foot{margin-top:auto;font-size:11px;color:#8CA0A6;line-height:1.6;padding-top:20px;border-top:1px solid rgba(255,255,255,.1);}
.sidebar.collapsed .sidebar-foot{display:none;}
main{flex:1;padding:32px 40px;max-width:1180px;}
.ledger-header{background:linear-gradient(135deg,var(--primary),var(--primary-light));color:#fff;border-radius:var(--radius);padding:16px 22px;display:flex;justify-content:space-between;align-items:center;margin-bottom:20px;position:relative;overflow:hidden;box-shadow:var(--shadow);}
.lh-date{position:relative;z-index:1;text-align:right;}
.lh-today{font-size:10px;color:#D8DEFC;letter-spacing:.06em;margin-bottom:2px;}
.lh-date-ar{font-size:13px;font-weight:600;}
.lh-date-en{font-size:10px;color:#C3CBF7;margin-top:1px;font-family:'IBM Plex Mono',monospace;}
.lh-clock{position:relative;z-index:1;text-align:left;}
.lh-clock-time{font-family:'IBM Plex Mono',monospace;font-size:18px;font-weight:600;letter-spacing:.02em;display:flex;gap:2px;align-items:baseline;direction:ltr;}
.lh-clock-time .sec{color:#FFD98A;font-size:13px;}
.lh-clock-label{font-size:9px;color:#C3CBF7;margin-top:1px;text-align:left;}
h1.page-title{font-size:21px;margin:0 0 4px;font-weight:700;}
.page-sub{color:var(--ink-soft);font-size:13px;margin-bottom:22px;}
.card{background:var(--surface);border:none;border-radius:var(--radius);padding:22px;margin-bottom:18px;box-shadow:var(--shadow);}
.card h2{font-size:15px;margin:0 0 14px;font-weight:700;}
label{display:block;font-size:13px;color:var(--ink-soft);margin-bottom:5px;}
input[type=text],input[type=tel],input[type=password],input[type=email],input[type=number],input[type=date],input[type=month],textarea,select{width:100%;padding:10px 12px;border:1px solid var(--line);border-radius:10px;font-family:inherit;font-size:14px;background:#FAFBFF;color:var(--ink);}
input:focus,textarea:focus,select:focus{outline:2px solid var(--primary-soft);outline-offset:1px;border-color:var(--primary);}
.field{margin-bottom:14px;}
.btn{border:none;border-radius:10px;padding:10px 18px;font-size:13.5px;font-weight:600;cursor:pointer;font-family:inherit;display:inline-flex;align-items:center;gap:6px;transition:.15s;}
.btn-primary{background:var(--primary);color:#fff;box-shadow:0 4px 12px rgba(76,95,224,.25);}
.btn-primary:hover{background:var(--primary-light);}
.btn-accent{background:var(--accent);color:#fff;}
.btn-ghost{background:var(--primary-soft);color:var(--primary);border:none;}
.btn-ghost:hover{background:#E2E6FD;}
.btn-danger{background:var(--danger-soft);color:var(--danger);}
.btn-sm{padding:6px 10px;font-size:12px;border-radius:8px;}
.btn:disabled{opacity:.5;cursor:not-allowed;}
.ledger{border:1px solid var(--line);border-radius:14px;overflow:hidden;}
.ledger-row{display:flex;align-items:flex-start;gap:12px;padding:13px 14px;border-bottom:1px dashed var(--line);background:var(--surface);}
.ledger-row:last-child{border-bottom:none;}
.ledger-num{width:26px;height:26px;border-radius:50%;background:var(--primary);color:#fff;font-family:'IBM Plex Mono',monospace;font-size:12px;font-weight:600;display:flex;align-items:center;justify-content:center;flex-shrink:0;margin-top:2px;}
.ledger-row textarea{border:none;background:transparent;padding:4px 2px;resize:vertical;min-height:20px;}
.ledger-row textarea:focus{outline:none;}
.ledger-del{background:none;border:none;color:var(--ink-soft);cursor:pointer;font-size:15px;padding:2px 6px;flex-shrink:0;}
.ledger-del:hover{color:var(--danger);}
.ledger-empty{padding:24px;text-align:center;color:var(--ink-soft);font-size:13px;}
.row-actions{display:flex;gap:8px;margin-top:14px;flex-wrap:wrap;}
.status-pill{display:inline-flex;align-items:center;gap:5px;padding:4px 10px;border-radius:20px;font-size:11.5px;font-weight:600;}
.pill-pending{background:var(--accent-soft);color:#B87700;}
.pill-sent{background:var(--success-soft);color:var(--success);}
.pill-auto{background:var(--primary-soft);color:var(--primary);}
.attach-list{display:flex;flex-wrap:wrap;gap:8px;margin-top:10px;}
.attach-chip{background:var(--primary-soft);border:none;border-radius:8px;padding:5px 10px;font-size:12px;display:flex;align-items:center;gap:6px;color:var(--primary);}
.folder-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(220px,1fr));gap:14px;}
.charts-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(260px,1fr));gap:16px;margin-bottom:22px;}

/* ---- بطاقات الإحصائيات (Stat Cards) ---- */
.stat-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(200px,1fr));gap:16px;margin-bottom:20px;}
.stat-card{background:var(--surface);border-radius:var(--radius);padding:18px 20px;box-shadow:var(--shadow);position:relative;}
.stat-icon{position:absolute;top:16px;left:16px;width:30px;height:30px;border-radius:9px;display:flex;align-items:center;justify-content:center;font-size:14px;}
.stat-icon.c-blue{background:var(--primary-soft);color:var(--primary);}
.stat-icon.c-green{background:var(--success-soft);color:var(--success);}
.stat-icon.c-gold{background:var(--accent-soft);color:var(--accent);}
.stat-icon.c-red{background:var(--danger-soft);color:var(--danger);}
.stat-value{font-size:26px;font-weight:700;color:var(--ink);line-height:1.2;margin-top:4px;}
.stat-label{font-size:11.5px;color:var(--ink-soft);margin-top:4px;}

/* ---- بطاقة الرسم البياني بالتبديل (شهر/سنة) ---- */
.chart-card-head{display:flex;justify-content:space-between;align-items:flex-start;margin-bottom:6px;}
.chart-big-value{font-size:24px;font-weight:700;color:var(--ink);}
.pill-toggle-group{display:flex;background:var(--bg);border-radius:20px;padding:3px;gap:2px;}
.pill-toggle{border:none;background:transparent;padding:6px 14px;border-radius:16px;font-size:11.5px;font-family:inherit;cursor:pointer;color:var(--ink-soft);}
.pill-toggle.active{background:var(--primary);color:#fff;font-weight:600;}

.topbar-row{display:flex;justify-content:space-between;align-items:center;gap:12px;margin-bottom:10px;flex-wrap:wrap;}
/* ---- عناصر الشريط العلوي الموحّد (كانت بلا تنسيق — أُضيفت هنا) ---- */
.nu-topbar-user{display:flex;align-items:center;gap:9px;}
.nu-topbar-user .avatar{width:36px;height:36px;flex:0 0 36px;border-radius:50%;display:flex;align-items:center;justify-content:center;background:var(--primary-soft);color:var(--primary);font-size:17px;}
.nu-topbar-user strong{display:block;font-size:12.5px;color:var(--ink);}
.nu-topbar-user span{display:block;font-size:10.5px;color:var(--ink-soft);margin-top:1px;}
.nu-topbar-date{display:flex;align-items:center;gap:8px;padding:7px 12px;border-radius:12px;background:var(--surface);box-shadow:var(--shadow);}
.nu-topbar-date .cal{width:24px;height:24px;flex:0 0 24px;border-radius:8px;display:flex;align-items:center;justify-content:center;background:var(--primary-soft);color:var(--primary);font-size:12.5px;}
.nu-topbar-date strong{font-size:11.5px;color:var(--ink);display:block;}
.nu-topbar-date span{font-size:9.5px;color:var(--ink-soft);display:block;margin-top:1px;}
/* الشعار في الشريط العلوي: صغير ومتناسق دائماً، بلا تمدد لحجمه الأصلي */
.nu-topbar-school{display:flex;align-items:center;gap:8px;}
.nu-topbar-school img{width:32px !important;height:32px !important;max-width:32px !important;max-height:32px !important;min-width:32px !important;min-height:32px !important;border-radius:9px;object-fit:contain !important;flex:0 0 32px !important;background:var(--surface);}
.nu-topbar-school strong{display:block;font-size:12.5px;color:var(--ink);}
.nu-topbar-school span{display:block;font-size:10px;color:var(--ink-soft);margin-top:1px;}
@media(max-width:640px){.nu-topbar-date{display:none;}}
.notif-bell-wrap{position:relative;}
.notif-bell{background:var(--surface);border:none;border-radius:12px;width:38px;height:38px;font-size:17px;cursor:pointer;position:relative;display:flex;align-items:center;justify-content:center;box-shadow:var(--shadow);}
.notif-badge{position:absolute;top:-4px;left:-4px;background:var(--danger);color:#fff;font-size:10px;font-weight:700;border-radius:10px;min-width:16px;height:16px;display:flex;align-items:center;justify-content:center;padding:0 3px;line-height:1;}
.notif-dropdown{display:none;position:absolute;top:44px;left:0;width:300px;max-width:88vw;background:var(--surface);border:none;border-radius:14px;box-shadow:0 8px 30px rgba(31,45,90,.15);z-index:50;max-height:400px;overflow-y:auto;}
.notif-dropdown.open{display:block;}
.notif-dropdown-head{padding:10px 14px;font-weight:700;font-size:13px;border-bottom:1px solid var(--line);}
.notif-empty{padding:20px 14px;text-align:center;color:var(--ink-soft);font-size:12.5px;}
.notif-item{display:block;padding:10px 14px;border-bottom:1px solid var(--line);text-decoration:none;color:var(--ink);}
.notif-item:last-of-type{border-bottom:none;}
.notif-item.unread{background:var(--primary-soft);}
.notif-title{font-size:12.5px;font-weight:600;}
.notif-body{font-size:11.5px;color:var(--ink-soft);margin-top:2px;}
.notif-time{font-size:10px;color:var(--ink-soft);margin-top:4px;font-family:'IBM Plex Mono',monospace;}
.notif-viewall{display:block;text-align:center;padding:10px;font-size:12px;color:var(--primary);font-weight:600;text-decoration:none;}
.folder-card{background:var(--surface);border:none;border-radius:var(--radius);padding:16px;transition:.15s;display:block;box-shadow:var(--shadow);}
.folder-card:hover{transform:translateY(-2px);box-shadow:0 8px 24px rgba(31,45,90,.12);}
.folder-card .fname{font-weight:700;font-size:14px;margin-bottom:2px;}
.folder-card .fmeta{font-size:12px;color:var(--ink-soft);}
.folder-card .fcount{margin-top:10px;font-family:'IBM Plex Mono',monospace;font-size:11px;color:var(--primary);background:var(--primary-soft);display:inline-block;padding:2px 8px;border-radius:6px;}
.report-list{display:flex;flex-direction:column;gap:10px;}
.report-item{border:none;border-radius:14px;padding:14px 16px;background:var(--surface);display:flex;justify-content:space-between;align-items:center;gap:12px;box-shadow:var(--shadow);}
.report-item:hover{box-shadow:0 6px 20px rgba(31,45,90,.12);}
.ri-left .ri-date{font-weight:700;font-size:13.5px;}
.ri-left .ri-meta{font-size:12px;color:var(--ink-soft);margin-top:2px;}
.empty-state{text-align:center;padding:50px 20px;color:var(--ink-soft);}
.empty-state .ico{font-size:30px;margin-bottom:10px;}
.comment{background:var(--bg);border-radius:12px;padding:10px 12px;margin-bottom:8px;font-size:13px;}
.comment .c-meta{font-size:11px;color:var(--ink-soft);margin-top:4px;}
.note{background:var(--accent-soft);color:#8A6100;font-size:12.5px;padding:10px 14px;border-radius:12px;margin-bottom:18px;line-height:1.6;}
.auth-wrap{min-height:100vh;display:flex;align-items:center;justify-content:center;padding:20px;}
.auth-card{background:var(--surface);border:none;border-radius:var(--radius);padding:32px;max-width:400px;width:100%;box-shadow:var(--shadow);}
.auth-card h1{font-size:19px;margin:0 0 4px;}
.auth-card .sub{color:var(--ink-soft);font-size:13px;margin-bottom:20px;}
.alert{padding:10px 14px;border-radius:10px;font-size:13px;margin-bottom:16px;}
.alert-error{background:var(--danger-soft);color:var(--danger);}
.alert-success{background:var(--success-soft);color:var(--success);}
.credential-box{background:linear-gradient(135deg,var(--primary),var(--primary-light));color:#fff;border-radius:14px;padding:16px;margin-bottom:16px;font-family:'IBM Plex Mono',monospace;font-size:15px;text-align:center;line-height:1.8;}
@media print{
  .sidebar,.row-actions,nav,.no-print{display:none !important;}
  main{padding:0;max-width:100%;}
}
@media (max-width:760px){
  #app{flex-direction:column;}
  .sidebar{width:100%;flex-direction:row;overflow-x:auto;padding:14px;border-left:none;border-bottom:1px solid var(--line);}
  nav{flex-direction:row;}
  .sidebar-foot{display:none;}
  main{padding:18px;}
  .ledger-header{flex-direction:column;align-items:flex-start;gap:14px;}
}

/* ===== Nuzum Premium UI 2026 ===== */
html[data-theme="dark"] body:has(#app){background:#070B14;color:#EAF0FA;}
html[data-theme="dark"] body:has(#app) .sidebar{background:linear-gradient(180deg,#0B1220 0%,#070B14 100%);border-left:1px solid rgba(255,255,255,.06);box-shadow:10px 0 35px rgba(0,0,0,.18);}
html[data-theme="dark"] body:has(#app) main{max-width:none;padding:26px 34px;background:radial-gradient(circle at 80% 0%,rgba(35,196,180,.07),transparent 28%),#070B14;}
html[data-theme="dark"] body:has(#app) .ledger-header{background:linear-gradient(135deg,#111B2C,#0C1422);border:1px solid rgba(255,255,255,.07);box-shadow:0 18px 50px rgba(0,0,0,.22);}
html[data-theme="dark"] body:has(#app) .card,html[data-theme="dark"] body:has(#app) .stat-card,html[data-theme="dark"] body:has(#app) .folder-card,html[data-theme="dark"] body:has(#app) .report-item,html[data-theme="dark"] body:has(#app) .notif-bell{background:linear-gradient(145deg,#101827,#0C1320);border:1px solid rgba(255,255,255,.065);box-shadow:0 14px 35px rgba(0,0,0,.18);}
html[data-theme="dark"] body:has(#app) .stat-card{overflow:hidden;}
html[data-theme="dark"] body:has(#app) .stat-card:after{content:"";position:absolute;inset:auto -20px -30px auto;width:90px;height:90px;border-radius:50%;background:rgba(37,205,183,.07);filter:blur(3px);}
html[data-theme="dark"] body:has(#app) h1.page-title{font-size:28px;letter-spacing:-.02em;}
html[data-theme="dark"] body:has(#app) .page-sub{color:#7F8DA6;}
html[data-theme="dark"] body:has(#app) input[type=text],html[data-theme="dark"] body:has(#app) input[type=tel],html[data-theme="dark"] body:has(#app) input[type=password],html[data-theme="dark"] body:has(#app) input[type=email],html[data-theme="dark"] body:has(#app) input[type=number],html[data-theme="dark"] body:has(#app) input[type=date],html[data-theme="dark"] body:has(#app) input[type=month],html[data-theme="dark"] body:has(#app) textarea,html[data-theme="dark"] body:has(#app) select{background:#0B1320;color:#EAF0FA;border-color:#223047;}
html[data-theme="dark"] body:has(#app) .btn-primary{background:linear-gradient(135deg,#21C6B2,#2B8DFF);box-shadow:0 8px 24px rgba(33,198,178,.18);}
html[data-theme="dark"] body:has(#app) .btn-ghost{background:#152238;color:#8FE8DB;border:1px solid #223754;}
html[data-theme="dark"] body:has(#app) .btn-accent{background:linear-gradient(135deg,#F5B84C,#E58B2A);}
html[data-theme="dark"] body:has(#app) .nav-btn.active{background:linear-gradient(135deg,#174E58,#173C5D);box-shadow:inset 0 0 0 1px rgba(63,218,197,.2),0 8px 25px rgba(0,0,0,.2);}
html[data-theme="dark"] body:has(#app) .nav-btn{color:#93A1B7;}
html[data-theme="dark"] body:has(#app) .nav-btn:hover{background:rgba(255,255,255,.045);color:#fff;}
html[data-theme="dark"] body:has(#app) .stat-value{font-size:30px;color:#F5F8FF;}
html[data-theme="dark"] body:has(#app) .stat-label{color:#71819A;}
html[data-theme="dark"] body:has(#app) .chart-big-value{color:#F5F8FF;}
html[data-theme="dark"] body:has(#app) .folder-card:hover,html[data-theme="dark"] body:has(#app) .report-item:hover{transform:translateY(-3px);border-color:rgba(63,218,197,.22);box-shadow:0 20px 45px rgba(0,0,0,.28);}
html[data-theme="dark"] body:has(#app) .folder-card .fcount{background:#102A31;color:#5CE2D0;}
html[data-theme="dark"] body:has(#app) .comment,html[data-theme="dark"] body:has(#app) .note{background:#0C1624;border-color:#223047;color:#A9B6C9;}
html[data-theme="dark"] body:has(#app) .empty-state{background:rgba(255,255,255,.02);border:1px dashed #25344A;border-radius:18px;}
html[data-theme="dark"] body:has(#app) .tabs{border-color:#1D2A3E;}
html[data-theme="dark"] body:has(#app) .tab-btn{color:#7787A0;}
html[data-theme="dark"] body:has(#app) .tab-btn.active{color:#5CE2D0;border-bottom-color:#2CC8B4;}
html[data-theme="dark"] body:has(#app) table th{color:#71819A;border-color:#1D2A3E;}
html[data-theme="dark"] body:has(#app) table td{border-color:#172338;}
html[data-theme="dark"] body:has(#app) .badge-open{background:#3A2B12;color:#F5C86A;}
html[data-theme="dark"] body:has(#app) .badge-closed{background:#0F332C;color:#5CE2D0;}
.lp-plans{display:grid;grid-template-columns:repeat(2,minmax(240px,1fr));gap:18px;max-width:760px;margin:0 auto;}
.lp-plan{position:relative;background:var(--surface);border:1px solid var(--line);border-radius:20px;padding:28px 24px;display:flex;flex-direction:column;gap:8px;cursor:default;box-shadow:var(--shadow);}
.lp-plan.featured{border:2px solid var(--accent);transform:translateY(-3px);}
.lp-plan strong{font-size:20px;color:var(--primary);}.lp-plan b{font-size:28px;color:var(--ink);}.lp-plan small{color:var(--ink-soft);line-height:1.8;}.plan-badge{align-self:flex-start;background:var(--accent-soft);color:#9A6A16;padding:5px 10px;border-radius:999px;font-size:11px;font-weight:700;}
.lp-plan-picker{gap:10px;}.lp-plan-picker .lp-stage-chip{flex:1;min-width:220px;}
@media(max-width:760px){.lp-plans{grid-template-columns:1fr;} html[data-theme="dark"] body:has(#app) main{padding:18px;}}
.kpi-trend{font-size:10px;color:#5B6A82;margin-top:8px;} .super-kpis{grid-template-columns:repeat(6,minmax(150px,1fr));} @media(max-width:1100px){.super-kpis{grid-template-columns:repeat(3,minmax(150px,1fr));}} @media(max-width:700px){.super-kpis{grid-template-columns:repeat(2,minmax(130px,1fr));}}

/* ===== Nuzum Premium System v2 ===== */
:root{
  --premium-bg:#070b14;
  --premium-panel:#0d1523;
  --premium-panel-2:#101b2c;
  --premium-border:rgba(255,255,255,.075);
  --premium-text:#eef4fb;
  --premium-muted:#8190a6;
  --premium-teal:#39d4c0;
  --premium-blue:#4b8dff;
  --premium-purple:#8b6cff;
  --premium-gold:#f5b84c;
  --premium-red:#ff6b78;
}
html[data-theme="dark"] body.dashboard-page{background:var(--premium-bg);}
html[data-theme="dark"] body.dashboard-page #app{min-height:100vh;background:radial-gradient(circle at 15% 0%,rgba(75,141,255,.08),transparent 24%),radial-gradient(circle at 85% 5%,rgba(57,212,192,.07),transparent 26%),var(--premium-bg);}
html[data-theme="dark"] .sidebar{background:linear-gradient(180deg,#0a111e 0%,#060a12 100%)!important;border-left:1px solid var(--premium-border)!important;}
html[data-theme="dark"] .sidebar .brand{padding-bottom:18px;margin-bottom:8px;border-bottom:1px solid var(--premium-border);}
html[data-theme="dark"] .sidebar .brand img{filter:drop-shadow(0 8px 22px rgba(57,212,192,.12));}
html[data-theme="dark"] .sidebar .nav-btn{border:1px solid transparent;transition:.18s ease;}
html[data-theme="dark"] .sidebar .nav-btn:hover{transform:translateX(-2px);background:rgba(255,255,255,.035)!important;border-color:var(--premium-border);}
html[data-theme="dark"] .sidebar .nav-btn.active{background:linear-gradient(135deg,rgba(57,212,192,.16),rgba(75,141,255,.12))!important;border-color:rgba(57,212,192,.18)!important;box-shadow:0 10px 30px rgba(0,0,0,.16),inset 0 1px 0 rgba(255,255,255,.035);}
html[data-theme="dark"] .sidebar .nav-icon{filter:saturate(.85);}
html[data-theme="dark"] .sidebar-foot{color:#53627a;border-top:1px solid var(--premium-border);}
html[data-theme="dark"] .sidebar-toggle{background:#101a2b!important;color:#b8c5d8!important;border:1px solid var(--premium-border)!important;}
html[data-theme="dark"] body.dashboard-page main{padding:28px 34px 50px;}
html[data-theme="dark"] .topbar-row{margin-bottom:14px;}
html[data-theme="dark"] .topbar-row form input{background:#0c1524!important;border:1px solid var(--premium-border)!important;color:#eaf0fa!important;box-shadow:0 8px 28px rgba(0,0,0,.16);}
html[data-theme="dark"] .notif-bell{background:#0d1726!important;border:1px solid var(--premium-border)!important;color:#dbe5f2;}
html[data-theme="dark"] .notif-dropdown{background:#0d1523;border:1px solid var(--premium-border);box-shadow:0 24px 60px rgba(0,0,0,.35);}
html[data-theme="dark"] .notif-item{color:#eaf0fa;border-color:rgba(255,255,255,.055);}
html[data-theme="dark"] .notif-item.unread{background:rgba(57,212,192,.06);}
html[data-theme="dark"] .ledger-header{position:relative;overflow:hidden;border-radius:22px!important;padding:20px 24px!important;}
html[data-theme="dark"] .ledger-header:before{content:"";position:absolute;inset:0;background:linear-gradient(90deg,transparent,rgba(57,212,192,.035),transparent);pointer-events:none;}
html[data-theme="dark"] .page-title{font-weight:700;letter-spacing:-.035em;}
html[data-theme="dark"] .page-sub{font-size:13px;}
html[data-theme="dark"] .card{border-radius:20px!important;}
html[data-theme="dark"] .stat-card{position:relative;min-height:132px;padding:20px!important;border-radius:20px!important;}
html[data-theme="dark"] .stat-card .stat-icon{border-radius:14px;padding:8px;width:40px;height:40px;display:flex;align-items:center;justify-content:center;background:rgba(255,255,255,.035);}
html[data-theme="dark"] .stat-card .stat-value{font-weight:700;letter-spacing:-.03em;}
html[data-theme="dark"] .stat-card .stat-label{font-size:11.5px;}
html[data-theme="dark"] .kpi-trend{color:#63748d;font-size:10.5px;}
html[data-theme="dark"] .charts-grid{gap:18px;}
html[data-theme="dark"] .chart-card-head{align-items:flex-start;}
html[data-theme="dark"] .chart-big-value{font-weight:700;letter-spacing:-.03em;}
html[data-theme="dark"] .tabs{padding:6px;background:#0a111d;border:1px solid var(--premium-border)!important;border-radius:16px;gap:4px;}
html[data-theme="dark"] .tab-btn{border-radius:11px!important;border:0!important;padding:10px 14px!important;}
html[data-theme="dark"] .tab-btn.active{background:linear-gradient(135deg,rgba(57,212,192,.14),rgba(75,141,255,.12));color:#dffdfa!important;}
html[data-theme="dark"] table th{background:#0a111d;color:#7789a3;}
html[data-theme="dark"] table tr:hover td{background:rgba(255,255,255,.018);}
html[data-theme="dark"] .report-item{border:1px solid var(--premium-border)!important;}
html[data-theme="dark"] .folder-grid{gap:14px;}
html[data-theme="dark"] .folder-card{border:1px solid var(--premium-border)!important;min-height:120px;}
html[data-theme="dark"] .folder-card .fname{font-size:14px;}
html[data-theme="dark"] .btn{border-radius:11px;}
html[data-theme="dark"] .btn-primary{font-weight:700;}
html[data-theme="dark"] .btn-danger{background:rgba(255,107,120,.08);border:1px solid rgba(255,107,120,.2);}
html[data-theme="dark"] .alert{border:1px solid var(--premium-border);}
html[data-theme="dark"] .note{border:1px solid rgba(57,212,192,.12)!important;}
.premium-page-head{display:flex;justify-content:space-between;align-items:flex-end;gap:18px;margin:10px 0 22px;}
.premium-page-head .head-copy{min-width:0;}
.premium-page-head .head-actions{display:flex;gap:8px;flex-wrap:wrap;justify-content:flex-end;}
.premium-eyebrow{font-size:11px;font-weight:700;letter-spacing:.06em;color:var(--premium-teal);margin-bottom:7px;}
.premium-health{display:inline-flex;align-items:center;gap:8px;padding:8px 11px;border:1px solid rgba(57,212,192,.18);background:rgba(57,212,192,.055);border-radius:999px;font-size:11px;color:#b8e9e2;}
.premium-health i{width:7px;height:7px;border-radius:50%;background:var(--premium-teal);box-shadow:0 0 12px rgba(57,212,192,.7);}
.premium-mini-grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:14px;}
.premium-mini{padding:16px 18px;border:1px solid var(--premium-border);background:linear-gradient(145deg,#101a2a,#0b1220);border-radius:18px;}
.premium-mini .label{color:#708199;font-size:11px}.premium-mini .value{font-size:23px;font-weight:700;margin-top:5px}.premium-mini .meta{font-size:10px;color:#52627a;margin-top:5px}
.subscription-chip{display:inline-flex;align-items:center;gap:6px;border-radius:999px;padding:5px 9px;font-size:10.5px;font-weight:700;background:rgba(75,141,255,.1);color:#a9c9ff;border:1px solid rgba(75,141,255,.16);}
.subscription-chip.semester{background:rgba(245,184,76,.1);color:#f4d18c;border-color:rgba(245,184,76,.18);}
.subscription-chip.expired{background:rgba(255,107,120,.1);color:#ff9ca5;border-color:rgba(255,107,120,.18);}
.super-action-grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:12px;margin:18px 0;}
.super-action{display:flex;align-items:center;gap:12px;padding:14px 16px;border:1px solid var(--premium-border);border-radius:17px;background:linear-gradient(145deg,#0f1928,#0b1220);text-decoration:none;color:#eaf0fa;transition:.18s;}
.super-action:hover{transform:translateY(-2px);border-color:rgba(57,212,192,.2);}
.super-action .ico{width:40px;height:40px;display:grid;place-items:center;border-radius:13px;background:rgba(57,212,192,.08);font-size:19px;}
.super-action strong{display:block;font-size:12.5px}.super-action span{display:block;font-size:10px;color:#71829a;margin-top:3px}
@media(max-width:900px){.premium-mini-grid{grid-template-columns:repeat(2,1fr)}.super-action-grid{grid-template-columns:repeat(2,1fr)}.premium-page-head{align-items:flex-start;flex-direction:column}.premium-page-head .head-actions{justify-content:flex-start}}
@media(max-width:520px){.premium-mini-grid,.super-action-grid{grid-template-columns:1fr}.premium-page-head{margin-top:4px}}




/* ===== Nuzum school logo definitive hardening 2026-09 (global — كل الصفحات) ===== */
/* حاوية الشعار داخل الـ Sidebar: مقاس ثابت أينما ظهرت، بغضّ النظر عن الصفحة. */
.sidebar .brand-mark{
  width:40px !important; height:40px !important;
  min-width:40px !important; min-height:40px !important;
  max-width:40px !important; max-height:40px !important;
  border-radius:12px; overflow:hidden; display:flex !important;
  align-items:center; justify-content:center; flex:0 0 40px !important;
  background:#fff; padding:5px; box-sizing:border-box;
}
.sidebar .brand-mark img{
  width:100% !important; height:100% !important;
  max-width:100% !important; max-height:100% !important;
  object-fit:contain !important; display:block !important;
}
/* ===== Nuzum school logo definitive hardening 2026-09-08 ===== */
/* الشعار لا يُسمح له أبداً بالتمدد بحجمه الأصلي. */
.sidebar .brand > img {
  width: 32px !important;
  height: 32px !important;
  max-width: 32px !important;
  max-height: 32px !important;
  min-width: 32px !important;
  min-height: 32px !important;
  object-fit: contain !important;
  object-position: center !important;
  display: block !important;
  flex: 0 0 32px !important;
}
main img[src*="uploads/"] {
  max-width: 140px !important;
  max-height: 80px !important;
  width: auto !important;
  height: auto !important;
  object-fit: contain !important;
}
img[src*="school_"][src*="logo"] {
  max-width: 140px !important;
  max-height: 80px !important;
  width: auto !important;
  height: auto !important;
  object-fit: contain !important;
}
.school-logo-box {
  width: 44px !important; height: 44px !important;
  min-width: 44px !important; max-width: 44px !important;
  min-height: 44px !important; max-height: 44px !important;
  overflow: hidden !important; display:flex !important;
  align-items:center !important; justify-content:center !important;
}
.school-logo-box img {
  width:100% !important; height:100% !important;
  max-width:100% !important; max-height:100% !important;
  object-fit:contain !important;
}
