/* Logo/image sizing safety: prevent any uploaded logo from covering the page. */
img { max-width: 100%; height: auto; }
.auth-screen img, .auth-art img.auth-logo, .mobile-auth-brand img, .sidebar img.logo, .print-head img { display: block; object-fit: contain; flex-shrink: 0; }
.auth-art img.auth-logo { width: 58px !important; height: 58px !important; max-width: 58px !important; max-height: 58px !important; }
.mobile-auth-brand img { width: 44px !important; height: 44px !important; max-width: 44px !important; max-height: 44px !important; }
.sidebar img.logo { width: 44px !important; height: 44px !important; max-width: 44px !important; max-height: 44px !important; }
.print-head img { width: 65px !important; height: 65px !important; max-width: 65px !important; max-height: 65px !important; }
.login-logo { width: 72px !important; height: 72px !important; max-width: 72px !important; max-height: 72px !important; object-fit: contain; display: block; margin: 0 auto 12px; }
.auth-logo, .auth-logo-placeholder { box-sizing: border-box; }
:root{font-family:Inter,system-ui,Arial,sans-serif;color:#17243a;background:#f3f6fb}*{box-sizing:border-box}body{margin:0}a{color:inherit;text-decoration:none}.layout{display:flex;min-height:100vh}.sidebar{width:250px;flex-shrink:0;background:#172b50;color:white;padding:20px;position:sticky;top:0;height:100vh;overflow:auto}.brand{display:flex;align-items:center;gap:10px;font-weight:800;margin-bottom:26px}.logo{width:44px;height:44px;object-fit:contain;flex-shrink:0}.brand span{font-size:14px;line-height:1.35}.nav a{display:block;padding:11px 12px;border-radius:9px;margin:3px 0;color:#dbe5f6}.nav a:hover,.nav a.active{background:#314d7c;color:white}.main{flex:1;min-width:0;padding:26px;max-width:100%}.top{display:flex;justify-content:space-between;align-items:center;gap:12px;margin-bottom:22px}h1{font-size:25px;margin:0}h2{font-size:18px;margin:0 0 15px}.card{background:white;border:1px solid #e4eaf2;border-radius:14px;padding:20px;margin-bottom:20px;box-shadow:0 3px 12px #142d5108}.stats{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:15px}.stat strong{font-size:30px;display:block;color:#244e90}.muted{color:#67758b;font-size:13px}.grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:14px}label{font-weight:600;font-size:13px;display:block;margin-bottom:5px}input,select,textarea{width:100%;padding:11px;border:1px solid #cdd6e4;border-radius:8px;background:white;font:inherit;min-width:0}textarea{min-height:85px}button,.btn{display:inline-block;border:0;border-radius:8px;padding:10px 15px;background:#2357a1;color:white;font-weight:650;cursor:pointer;font:inherit}.btn.secondary{background:#e8edf5;color:#213d68}.btn.danger{background:#a62e3b}.actions{display:flex;gap:8px;flex-wrap:wrap;margin-top:15px}.tablewrap{overflow:auto}table{width:100%;border-collapse:collapse;font-size:14px}th,td{padding:10px 9px;text-align:left;border-bottom:1px solid #e9edf4}th{background:#f4f7fb;white-space:nowrap}td input,td select{min-width:75px}.alert{background:#eaf7ef;color:#185d38;padding:12px;border-radius:9px;margin-bottom:16px}.error{background:#fff0f0;color:#9e2532;padding:12px;border-radius:9px;margin-bottom:16px}.login{min-height:100vh;display:grid;place-items:center;padding:16px}.login .card{width:min(420px,100%)}.login-logo{width:80px;height:80px;object-fit:contain;margin:0 auto 12px;display:block}.print-head{display:none}.menu-toggle{display:none}.small{font-size:12px}.filters{display:flex;gap:10px;align-items:end;flex-wrap:wrap}.filters>div{min-width:150px;flex:1}.nowrap{white-space:nowrap}@media(max-width:950px){.stats{grid-template-columns:repeat(2,1fr)}.sidebar{width:210px}.main{padding:16px}}@media(max-width:680px){.sidebar{position:fixed;z-index:20;transform:translateX(-100%);transition:transform .2s;width:255px}.sidebar.open{transform:translateX(0)}.menu-toggle{display:inline-block}.grid,.stats{grid-template-columns:1fr}.top{align-items:start}.main{padding:14px}.card{padding:14px}h1{font-size:21px}}@media print{@page{size:A4 landscape;margin:13mm}body{background:white;color:black;font-size:11px}.sidebar,.top,.no-print,.actions,button,.btn,form{display:none!important}.main{padding:0}.card{box-shadow:none;border:0;padding:0;margin:0}.print-head{display:flex;align-items:center;gap:15px;border-bottom:3px double black;padding-bottom:10px;margin-bottom:16px}.print-head img{height:65px;width:65px;object-fit:contain}.print-head h2{font-size:18px;margin:0}.print-head p{margin:3px 0}th,td{border:1px solid #333;padding:5px;color:black}th{background:#eee!important}table{font-size:10px}h1{font-size:16px}.signature{display:block!important;text-align:right;margin:28px 35px 0 0;page-break-inside:avoid}}


/* Modern artistic login / first-time setup */
.auth-screen{--ink:#142c3b;--muted:#73818d;--teal:#4ce0c1;min-height:100vh;display:grid;grid-template-columns:minmax(0,1.08fr) minmax(420px,.92fr);background:#f8fafb;color:var(--ink);overflow:hidden;font-family:Inter,ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif}
.auth-art{position:relative;isolation:isolate;display:flex;min-height:100vh;overflow:hidden;background:radial-gradient(ellipse at 78% 19%,rgba(52,207,181,.22),transparent 32%),radial-gradient(ellipse at 8% 88%,rgba(76,120,191,.25),transparent 38%),linear-gradient(145deg,#102d3b 0%,#153b4a 48%,#132a3a 100%);color:#f5fbfa;padding:clamp(30px,5vw,76px)}
.auth-art:before{content:"";position:absolute;inset:0;z-index:-1;opacity:.14;background-image:linear-gradient(rgba(255,255,255,.16) 1px,transparent 1px),linear-gradient(90deg,rgba(255,255,255,.16) 1px,transparent 1px);background-size:48px 48px;mask-image:linear-gradient(135deg,#000,transparent 82%)}
.art-content{width:100%;max-width:680px;display:flex;flex-direction:column;position:relative;z-index:2}.art-brand{display:flex;align-items:center;gap:14px;max-width:100%}.auth-logo,.auth-logo-placeholder{width:58px;height:58px;flex:0 0 58px;object-fit:contain;background:rgba(255,255,255,.96);border:1px solid rgba(255,255,255,.48);border-radius:17px;padding:6px;box-shadow:0 12px 28px rgba(0,0,0,.14)}.auth-logo-placeholder{display:grid;place-items:center;color:#173b49;font-weight:850;font-size:20px}.art-brand>div{display:flex;flex-direction:column;gap:5px;min-width:0}.art-brand strong{font-size:clamp(12px,1vw,15px);letter-spacing:.025em;line-height:1.4}.eyebrow,.auth-kicker{font-size:10px;font-weight:800;letter-spacing:.19em;color:#81e9d5}.art-message{margin:auto 0;max-width:600px;padding:70px 0 88px}.art-pill{display:inline-flex;align-items:center;gap:9px;border:1px solid rgba(135,234,215,.28);background:rgba(66,199,175,.09);border-radius:100px;padding:9px 13px;color:#a5f2e4;font-size:10px;letter-spacing:.15em;font-weight:750}.live-dot{width:6px;height:6px;background:#60e8c8;border-radius:50%;box-shadow:0 0 0 4px rgba(96,232,200,.12)}.art-message h1{font-size:clamp(48px,6.1vw,88px);letter-spacing:-.065em;line-height:.99;margin:28px 0 23px;font-weight:760}.art-message h1 em{font-style:normal;color:#62e2c7}.art-message p{font-size:clamp(14px,1.25vw,17px);line-height:1.9;color:#b8cbd1;max-width:460px;margin:0}.art-footer{display:flex;align-items:center;gap:12px;color:#a7bec6;font-size:11px;flex-wrap:wrap}.footer-mark{font-size:22px;color:#69e5c9}.footer-line{height:1px;width:34px;background:rgba(177,210,215,.36)}.art-orbit{position:absolute;border:1px solid rgba(109,227,207,.2);border-radius:50%;z-index:0;pointer-events:none}.orbit-one{width:min(54vw,690px);aspect-ratio:1;right:-20%;top:15%;box-shadow:inset 0 0 80px rgba(68,217,188,.035)}.orbit-two{width:min(38vw,500px);aspect-ratio:1;right:-8%;top:27%;border-color:rgba(109,227,207,.12)}.art-glow{position:absolute;right:13%;top:34%;width:180px;height:180px;background:#4ce0c1;filter:blur(115px);opacity:.18;pointer-events:none}.art-decoration{position:absolute;pointer-events:none;border-radius:20px;border:1px solid rgba(118,234,211,.2);transform:rotate(35deg)}.deco-a{width:80px;height:80px;right:12%;top:18%;background:linear-gradient(145deg,rgba(88,224,196,.15),rgba(88,224,196,0))}.deco-b{width:34px;height:34px;right:23%;bottom:23%;background:rgba(90,211,188,.08)}
.auth-panel{display:flex;align-items:center;justify-content:center;padding:clamp(28px,5vw,76px) clamp(24px,5vw,80px);background:linear-gradient(145deg,#fbfcfd,#f4f7f8)}.auth-panel-inner{width:100%;max-width:410px}.auth-heading{margin-bottom:34px}.auth-heading h2{font-size:clamp(28px,3vw,37px);letter-spacing:-.045em;line-height:1.16;margin:13px 0 12px;color:#163242}.auth-heading p{color:#7a8a94;font-size:14px;line-height:1.75;margin:0;max-width:350px}.auth-kicker{color:#248d7d}.auth-form{display:flex;flex-direction:column;gap:21px}.auth-field label{font-size:12px;color:#344d5b;font-weight:750;margin-bottom:9px}.auth-field input{height:52px;padding:0 15px;border:1px solid #dbe4e7;border-radius:12px;background:rgba(255,255,255,.88);color:#173543;font-size:14px;box-shadow:0 2px 5px rgba(17,51,65,.02);transition:border-color .2s,box-shadow .2s,background .2s}.auth-field input::placeholder{color:#a4b0b7}.auth-field input:focus{outline:none;border-color:#48bda8;background:#fff;box-shadow:0 0 0 4px rgba(72,189,168,.13)}.auth-field small{display:block;color:#7d8b93;font-size:11px;margin-top:8px;line-height:1.5}.auth-submit{width:100%;min-height:54px;display:flex;align-items:center;justify-content:space-between;gap:12px;padding:0 18px 0 20px;border-radius:12px;background:linear-gradient(105deg,#176b69,#1b8e7e);color:white;font-size:13px;font-weight:750;box-shadow:0 10px 22px rgba(25,126,112,.18);transition:transform .18s,box-shadow .18s,filter .18s}.auth-submit:hover{transform:translateY(-2px);box-shadow:0 14px 26px rgba(25,126,112,.25);filter:saturate(1.12)}.submit-arrow{width:29px;height:29px;border-radius:9px;background:rgba(255,255,255,.16);display:grid;place-items:center;font-size:17px}.auth-alert{font-size:13px;line-height:1.55;margin:0 0 18px}.auth-security{display:flex;align-items:center;gap:9px;color:#7c8b93;font-size:11px;margin-top:25px}.security-icon{width:19px;height:19px;border-radius:50%;display:grid;place-items:center;background:#e0f5ed;color:#20856d;font-weight:800;font-size:11px}.auth-copyright{margin:48px 0 0;color:#9aa7ad;font-size:10px;line-height:1.7}.auth-copyright span{padding:0 5px;color:#c0c9cd}.mobile-auth-brand{display:none}
@media(max-width:900px){.auth-screen{grid-template-columns:minmax(0,.85fr) minmax(380px,1fr)}.auth-art{padding:34px}.art-message h1{font-size:clamp(46px,6vw,66px)}.art-footer{font-size:10px}.auth-panel{padding:38px 30px}}
@media(max-width:680px){.auth-screen{display:block;min-height:100svh;background:#f7f9fa}.auth-art{display:none}.auth-panel{min-height:100svh;align-items:flex-start;padding:28px 23px 32px;background:radial-gradient(ellipse at 100% 0%,rgba(82,205,179,.12),transparent 34%),#f8fafb}.auth-panel-inner{max-width:440px;margin:auto}.mobile-auth-brand{display:flex;align-items:center;gap:11px;margin:0 0 46px;font-size:12px;font-weight:800;line-height:1.4;color:#193c49}.mobile-auth-brand img{width:44px;height:44px;object-fit:contain;background:#fff;border:1px solid #e4ecec;border-radius:13px;padding:4px}.auth-heading{margin-bottom:29px}.auth-heading h2{font-size:31px}.auth-form{gap:19px}.auth-field input{height:52px}.auth-copyright{margin-top:38px}.auth-security{margin-top:23px}}
@media(prefers-reduced-motion:reduce){.auth-field input,.auth-submit{transition:none}}


/* Modern red & navy dashboard theme — admin and teacher */
:root{--brand-navy:#101d38;--brand-navy-2:#192b4b;--brand-red:#d62839;--brand-red-dark:#b91f31;--brand-red-soft:#fff0f1;--brand-blue:#315b91;--ink:#17243a;--canvas:#f4f6fa}
body{background:var(--canvas);color:var(--ink)}
.sidebar{background:linear-gradient(180deg,#101a31 0%,#172744 100%);border-right:1px solid rgba(255,255,255,.06);box-shadow:8px 0 30px rgba(15,28,52,.06)}
.brand{padding:7px 5px 17px;border-bottom:1px solid rgba(255,255,255,.12);margin-bottom:20px}
.nav a{color:#c8d3e5;transition:background .18s ease,color .18s ease,transform .18s ease;border-left:3px solid transparent}
.nav a:hover{background:rgba(255,255,255,.08);color:#fff;transform:translateX(2px)}
.nav a.active{background:linear-gradient(90deg,rgba(214,40,57,.28),rgba(214,40,57,.08));color:#fff;border-left-color:#ef4655;box-shadow:inset 0 0 0 1px rgba(239,70,85,.09)}
.main{background:linear-gradient(180deg,#f7f8fb 0%,#f2f5f9 100%)}
.top{padding:0 0 17px;border-bottom:1px solid #e3e8f0}
.top h1{font-size:clamp(22px,2vw,29px);letter-spacing:-.035em;color:var(--brand-navy);margin:5px 0 7px}
.top .muted{font-size:12px}
button,.btn{background:var(--brand-red);border-radius:10px;box-shadow:0 5px 12px rgba(214,40,57,.13);transition:transform .16s ease,box-shadow .16s ease,background .16s ease}
button:hover,.btn:not(.secondary):hover{background:var(--brand-red-dark);transform:translateY(-1px);box-shadow:0 8px 17px rgba(214,40,57,.2)}
.btn.secondary{background:#e9edf4;color:#263a5b;box-shadow:none}
.card{border:1px solid #e6eaf1;border-radius:17px;box-shadow:0 8px 24px rgba(19,36,64,.045);transition:border-color .18s ease,box-shadow .18s ease}
.card h2{color:var(--brand-navy);letter-spacing:-.02em}
input:focus,select:focus,textarea:focus{outline:none;border-color:#d94351;box-shadow:0 0 0 3px rgba(214,40,57,.1)}
.stats.dashboard-stats{grid-template-columns:repeat(4,minmax(0,1fr));gap:16px;margin-bottom:22px}
.dashboard-hero{position:relative;isolation:isolate;overflow:hidden;min-height:250px;border-radius:23px;margin:0 0 27px;padding:clamp(24px,3.2vw,39px);display:flex;align-items:center;background:radial-gradient(ellipse at 78% 18%,rgba(216,48,66,.22),transparent 33%),linear-gradient(115deg,#111d37 0%,#182c4d 63%,#243757 100%);box-shadow:0 18px 38px rgba(17,29,55,.16);color:#fff}
.dashboard-hero:before{content:"";position:absolute;inset:0;z-index:-1;opacity:.13;background-image:linear-gradient(rgba(255,255,255,.18) 1px,transparent 1px),linear-gradient(90deg,rgba(255,255,255,.18) 1px,transparent 1px);background-size:34px 34px;mask-image:linear-gradient(100deg,#000,transparent 85%)}
.dashboard-hero-content{position:relative;z-index:2;max-width:650px;padding:8px 0 18px}
.dashboard-kicker,.section-eyebrow{display:inline-flex;align-items:center;gap:8px;font-size:10px;font-weight:850;letter-spacing:.17em;color:#e85b68}
.dashboard-kicker{color:#ffb2b9}
.dashboard-kicker i{width:7px;height:7px;border-radius:50%;background:#ef4052;box-shadow:0 0 0 5px rgba(239,64,82,.16)}
.dashboard-hero h2{color:white;font-size:clamp(27px,3.1vw,41px);letter-spacing:-.045em;line-height:1.1;margin:18px 0 12px}
.dashboard-hero p{max-width:550px;color:#c6d0e0;font-size:13px;line-height:1.8;margin:0}
.dashboard-hero p strong{color:#fff;font-weight:750}
.dashboard-actions{display:flex;gap:10px;flex-wrap:wrap;margin-top:23px}
.dash-action{display:inline-flex;align-items:center;gap:9px;padding:11px 15px;border-radius:10px;font-size:12px;font-weight:750;transition:transform .18s ease,background .18s ease}
.dash-action:hover{transform:translateY(-2px)}
.dash-action span{font-size:17px;line-height:1}
.dash-action.primary{background:var(--brand-red);color:white;box-shadow:0 7px 17px rgba(214,40,57,.22)}
.dash-action.primary:hover{background:#e63849}
.dash-action.ghost{background:rgba(255,255,255,.08);border:1px solid rgba(255,255,255,.16);color:#f2f5fb}
.dash-action.ghost:hover{background:rgba(255,255,255,.14)}
.dashboard-hero-art{position:absolute;inset:0 0 0 auto;width:37%;pointer-events:none;overflow:hidden}
.hero-orbit{position:absolute;border:1px solid rgba(255,255,255,.12);border-radius:50%;aspect-ratio:1}
.orbit-a{width:350px;right:-35px;top:-65px;box-shadow:inset 0 0 60px rgba(255,255,255,.025)}
.orbit-b{width:245px;right:18px;top:-10px;border-color:rgba(239,64,82,.3)}
.hero-emblem{position:absolute;right:18%;top:50%;transform:translateY(-50%) rotate(-7deg);width:110px;height:110px;border:1px solid rgba(255,255,255,.26);border-radius:28px;background:linear-gradient(145deg,rgba(255,255,255,.13),rgba(255,255,255,.035));box-shadow:0 18px 45px rgba(0,0,0,.12);display:flex;flex-direction:column;align-items:center;justify-content:center;color:#fff;font-size:38px;font-weight:900;letter-spacing:-.08em;backdrop-filter:blur(8px)}
.hero-emblem span{font-size:8px;line-height:1.4;letter-spacing:.18em;text-align:center;color:#f3b8bf;margin-top:3px}
.hero-red-slab{position:absolute;width:65px;height:180px;right:8%;top:33%;border-radius:15px;transform:rotate(35deg);background:linear-gradient(180deg,rgba(220,43,61,.85),rgba(220,43,61,.05));filter:drop-shadow(0 10px 20px rgba(0,0,0,.1))}
.dashboard-role{position:absolute;right:22px;bottom:20px;border:1px solid rgba(255,255,255,.17);background:rgba(255,255,255,.07);border-radius:100px;padding:7px 10px;color:#d7e0ee;font-size:9px;font-weight:800;letter-spacing:.13em}
.dashboard-section-head{display:flex;justify-content:space-between;align-items:end;gap:12px;margin:0 0 14px}
.dashboard-section-head h2{font-size:21px;margin:5px 0 0;color:var(--brand-navy);letter-spacing:-.035em}
.dashboard-period{font-size:11px;color:#7b8799;padding-bottom:3px}
.dashboard-stat{position:relative;overflow:hidden;min-height:150px;margin-bottom:0;padding:17px 18px 16px}
.dashboard-stat:after{content:"";position:absolute;width:85px;height:85px;border-radius:50%;right:-35px;bottom:-42px;background:var(--stat-tint,rgba(214,40,57,.08))}
.stat-top{display:flex;align-items:center;justify-content:space-between;margin-bottom:15px;gap:7px}
.stat-icon{width:38px;height:38px;border-radius:12px;display:grid;place-items:center;background:var(--stat-tint,#fff0f1);color:var(--stat-color,var(--brand-red));font-size:20px;font-weight:800}
.stat-indicator{font-size:8px;letter-spacing:.09em;color:#8b96a6;font-weight:800}
.dashboard-stat .muted{display:block;font-size:11px;font-weight:650;color:#6c788c}
.dashboard-stat strong{display:block;font-size:32px;line-height:1.2;margin-top:5px;color:var(--brand-navy);letter-spacing:-.045em}
.stat-caption{display:block;color:#9aa4b2;font-size:10px;margin-top:3px}
.tone-red{--stat-color:#d62839;--stat-tint:#fff0f1;border-top:3px solid #d62839}
.tone-navy{--stat-color:#192b4b;--stat-tint:#edf1f8;border-top:3px solid #192b4b}
.tone-blue{--stat-color:#315b91;--stat-tint:#edf4ff;border-top:3px solid #315b91}
.tone-rose{--stat-color:#b92d50;--stat-tint:#fff0f4;border-top:3px solid #c63859}
.dashboard-bottom-grid{display:grid;grid-template-columns:minmax(0,1.35fr) minmax(250px,.8fr);gap:18px;margin-top:20px}
.dashboard-work-card,.dashboard-note-card{margin:0;min-width:0}
.dashboard-card-heading{display:flex;justify-content:space-between;align-items:center;margin-bottom:9px}
.dashboard-card-heading h2{margin:5px 0 0;font-size:19px}
.heading-mark{width:32px;height:32px;display:grid;place-items:center;border-radius:10px;background:#fff0f1;color:var(--brand-red);font-size:17px}
.quick-links{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px;margin-top:14px}
.quick-links a{display:flex;align-items:center;gap:11px;min-width:0;padding:13px 11px;border:1px solid #e9edf3;border-radius:12px;background:#fff;transition:border-color .18s ease,transform .18s ease,box-shadow .18s ease}
.quick-links a:hover{border-color:#e9a0a8;transform:translateY(-2px);box-shadow:0 8px 18px rgba(22,39,68,.06)}
.quick-icon{width:35px;height:35px;flex:0 0 35px;display:grid;place-items:center;border-radius:11px;font-size:17px;font-weight:800}
.quick-icon.red{background:#fff0f1;color:#d62839}.quick-icon.navy{background:#edf1f8;color:#192b4b}.quick-icon.rose{background:#fff0f4;color:#b92d50}.quick-icon.blue{background:#edf4ff;color:#315b91}
.quick-links a>span:nth-child(2){display:flex;flex-direction:column;gap:4px;min-width:0;flex:1}
.quick-links strong{font-size:11px;color:#1b2b47;line-height:1.35}
.quick-links small{font-size:10px;color:#7e8999;line-height:1.5}
.quick-links b{font-size:15px;color:#a4adbb;font-weight:500}
.dashboard-note-card{position:relative;isolation:isolate;overflow:hidden;background:linear-gradient(145deg,#fff 0%,#fff8f8 100%);padding:24px}
.note-decoration{position:absolute;z-index:-1;width:180px;height:180px;border:1px solid rgba(214,40,57,.09);border-radius:50%;right:-75px;top:-75px;box-shadow:0 0 0 24px rgba(214,40,57,.025),0 0 0 48px rgba(214,40,57,.02)}
.note-icon{width:38px;height:38px;display:grid;place-items:center;border-radius:12px;background:var(--brand-red);color:white;font-size:18px;margin-bottom:20px;box-shadow:0 8px 17px rgba(214,40,57,.2)}
.dashboard-note-card h2{font-size:20px;line-height:1.3;margin:9px 0 10px;max-width:260px}
.dashboard-note-card p{font-size:12px;line-height:1.8;color:#6e7a8d;margin:0}
.note-rule{height:1px;background:#f0dfe2;margin:22px 0 13px}
.note-foot{font-size:9px;letter-spacing:.14em;font-weight:850;color:#9b5360}
@media(max-width:1100px){.stats.dashboard-stats{grid-template-columns:repeat(2,minmax(0,1fr))}.dashboard-hero-art{width:31%}.hero-emblem{right:12%;width:90px;height:90px;font-size:32px}.dashboard-bottom-grid{grid-template-columns:minmax(0,1.2fr) minmax(220px,.8fr)}}
@media(max-width:760px){.dashboard-hero{min-height:260px;padding:23px 20px;border-radius:18px}.dashboard-hero-content{max-width:100%;padding:8px 0 22px}.dashboard-hero p{max-width:100%;font-size:12px;padding-right:0}.dashboard-hero-art{opacity:.28;width:48%}.hero-emblem{right:7%;top:23%;transform:rotate(-7deg);width:72px;height:72px;border-radius:20px;font-size:27px}.hero-emblem span{font-size:6px}.hero-red-slab{right:1%;top:37%;height:120px}.dashboard-role{right:14px;bottom:12px}.dashboard-bottom-grid{grid-template-columns:1fr}.dashboard-section-head h2{font-size:19px}.dashboard-period{font-size:10px}.dashboard-stat{min-height:135px}}
@media(max-width:480px){.stats.dashboard-stats{gap:10px}.dashboard-stat{padding:14px 13px;min-height:129px}.stat-top{margin-bottom:11px}.stat-icon{width:33px;height:33px;border-radius:10px}.stat-indicator{font-size:7px}.dashboard-stat strong{font-size:27px}.dashboard-stat .muted{font-size:10px}.quick-links{grid-template-columns:1fr}.quick-links a{padding:12px}.dashboard-actions{gap:8px}.dash-action{padding:10px 11px;font-size:11px}.dashboard-hero h2{font-size:28px}.dashboard-kicker{font-size:8px}.dashboard-section-head{align-items:start;flex-direction:column;gap:4px}}
@media print{.dashboard-hero,.dashboard-section-head,.dashboard-bottom-grid{display:none!important}.dashboard-stats{display:none!important}}

/* Riwayat catatan sikap dan pratinjau lampiran */
.section-title-row,.history-heading{display:flex;align-items:center;justify-content:space-between;gap:16px;margin-bottom:18px}
.section-title-row h2,.history-heading h2{margin:5px 0 7px;color:var(--brand-navy,#172b50)}
.section-title-row p,.history-heading p{margin:0;line-height:1.6}
.section-eyebrow{display:block;color:var(--brand-red,#d62839);font-size:10px;font-weight:850;letter-spacing:.14em}
.status-pill{display:inline-flex;align-items:center;padding:5px 9px;border-radius:999px;font-size:11px;font-weight:750;white-space:nowrap}
.status-pill.positive{background:#e8f7ef;color:#187348}
.status-pill.attention{background:#fff0f1;color:#b42336}
.follow-up-preview{margin-top:8px;padding:8px 10px;border-left:3px solid #d62839;background:#fff7f7;border-radius:0 7px 7px 0;font-size:12px;color:#5c6678;line-height:1.6}
.attachment-link{display:inline-flex;align-items:center;gap:6px;color:#b92336;font-weight:750;font-size:12px;white-space:nowrap}
.attachment-link:hover{text-decoration:underline}
.attachment-kind{display:block;margin-top:5px;font-size:10px;letter-spacing:.08em}
.empty-state{text-align:center!important;color:#7b8798;padding:28px!important}
.attachment-viewer-card{min-height:60vh}
.attachment-viewer{display:flex;align-items:center;justify-content:center;min-height:280px;padding:14px;border:1px solid #e5eaf2;border-radius:14px;background:#f3f6fa;overflow:hidden}
.attachment-viewer img{display:block;width:auto;height:auto;max-width:100%;max-height:75vh;object-fit:contain;border-radius:8px;box-shadow:0 8px 30px rgba(16,29,56,.12)}
.attachment-viewer iframe{display:block;width:100%;height:75vh;min-height:520px;border:0;border-radius:8px;background:white}
@media(max-width:760px){.section-title-row,.history-heading{align-items:flex-start;flex-direction:column}.section-title-row>.btn,.history-heading>.btn{width:100%;text-align:center}.attachment-viewer{padding:7px;min-height:220px}.attachment-viewer iframe{height:68vh;min-height:400px}.attachment-viewer img{max-height:68vh}.filters>div{min-width:100%}}
@media print{.attachment-viewer-card .attachment-viewer{border:0;background:white;padding:0}.attachment-viewer iframe{height:90vh}.attachment-viewer img{max-height:230mm}.section-title-row{display:block}.follow-up-preview{border-left:1px solid #555;background:white}.status-pill{border:1px solid #999;background:white!important;color:black!important}}

/* Wali kelas: catatan tindak lanjut dan bukti pendukung */
.homeroom-response{background:#f7f9fc;border:1px solid #e2e8f0;border-left:3px solid #d62839;border-radius:10px;padding:10px 12px;margin:0 0 10px;min-width:220px}
.homeroom-response strong{color:#14213d;font-size:.88rem}
.homeroom-response p{margin:7px 0;color:#26344c;white-space:normal;overflow-wrap:anywhere}
.homeroom-response .muted{font-size:.75rem}
.followup-form-details{margin-top:10px;border:1px solid #dce3ed;border-radius:10px;padding:10px;background:#fff;min-width:220px}
.followup-form-details summary{cursor:pointer;color:#c9273a;font-weight:750;font-size:.88rem;list-style:none}
.followup-form-details summary::-webkit-details-marker{display:none}
.followup-form-details summary:after{content:'＋';float:right;color:#14213d}
.followup-form-details[open] summary:after{content:'−'}
.followup-form{display:grid;gap:8px;margin-top:12px}
.followup-form label{font-size:.82rem;font-weight:700;color:#24334c}
.followup-form textarea{width:100%;min-height:86px;resize:vertical;border:1px solid #d7deea;border-radius:9px;padding:10px;font:inherit;font-size:.88rem;box-sizing:border-box}
.followup-form input[type=file]{max-width:100%;font-size:.8rem}
.followup-form button{background:#d62839;color:#fff;border:0;border-radius:9px;padding:10px 13px;font-weight:750;cursor:pointer}
.followup-form button:hover{background:#b91f30}
.attachment-link{display:inline-flex;align-items:center;gap:5px;margin-top:6px;color:#b91f30;font-weight:700;font-size:.82rem;text-decoration:none}
.attachment-link:hover{text-decoration:underline}
@media(max-width:760px){.homeroom-response,.followup-form-details{min-width:180px}.tablewrap table{min-width:900px}}
@media print{.followup-form-details,.followup-form,.no-print{display:none!important}.homeroom-response{break-inside:avoid;background:#fff;border-color:#999}}


/* Administrasi data master: impor Excel, edit, dan hapus */
.import-form{display:flex;align-items:center;gap:12px;flex-wrap:wrap;margin-top:14px;padding:14px;border:1px dashed #d5ddeb;border-radius:12px;background:#f8faff}
.import-form input[type=file]{flex:1;min-width:220px;max-width:100%;background:#fff}
.inline-edit{display:flex;align-items:center;gap:8px;min-width:280px}
.inline-edit input{min-width:180px}
.inline-edit .btn,.student-edit-form .btn{white-space:nowrap;padding:9px 11px;font-size:12px}
.student-edit-form{display:grid;grid-template-columns:minmax(85px,.7fr) minmax(150px,1.4fr) minmax(120px,1fr) minmax(95px,.8fr) minmax(120px,1fr) auto;align-items:center;gap:8px;min-width:900px}
.student-edit-form input,.student-edit-form select{min-width:0;padding:9px;font-size:12px}
.delete-inline{display:flex;justify-content:flex-end;margin-top:8px}
.btn.danger{background:#b42336;color:#fff}
.btn.danger:hover{background:#941d2b}
@media(max-width:760px){.import-form{align-items:stretch;flex-direction:column}.import-form input[type=file],.import-form button{width:100%}.inline-edit{min-width:240px}.student-edit-form{min-width:900px}}
@media print{.import-form,.inline-edit,.student-edit-form,.delete-inline{display:none!important}}


/* Dashboard admin: grafik catatan sikap Perlu Pembinaan */
.admin-behavior-analytics{margin:24px 0 6px;min-width:0}
.analytics-section-head{align-items:center;margin-bottom:14px}
.analytics-section-head h2{font-size:21px}
.behavior-chart-grid{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr);gap:18px;align-items:stretch}
.behavior-chart-card{margin:0;min-width:0;padding:21px 20px 17px;border:1px solid #e7ebf2;box-shadow:0 8px 24px rgba(20,36,64,.045)}
.behavior-chart-heading{display:flex;align-items:flex-start;justify-content:space-between;gap:12px;margin-bottom:20px}
.behavior-chart-heading h3{font-size:17px;line-height:1.35;margin:5px 0 6px;color:var(--brand-navy,#192b4b);letter-spacing:-.025em}
.behavior-chart-heading p{font-size:11px;line-height:1.6;margin:0;max-width:360px}
.chart-mini-label{font-size:8px;letter-spacing:.14em;font-weight:850;color:#8994a5}
.chart-icon{display:grid;place-items:center;flex:0 0 38px;width:38px;height:38px;border-radius:12px;font-size:18px;font-weight:800}
.chart-icon.red{background:#fff0f1;color:#d62839}.chart-icon.navy{background:#edf1f8;color:#192b4b}
.horizontal-chart{display:flex;flex-direction:column;gap:13px;min-width:0}
.chart-row{display:grid;grid-template-columns:minmax(72px,100px) minmax(45px,1fr) 28px;gap:10px;align-items:center;min-width:0}
.chart-row-label{font-size:10px;font-weight:750;color:#3d4a60;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.chart-track{height:10px;min-width:0;overflow:hidden;border-radius:99px;background:#f0f2f6;box-shadow:inset 0 1px 2px rgba(25,43,75,.035)}
.chart-bar{height:100%;min-width:0;border-radius:99px;transition:width .35s ease}
.class-bar{background:linear-gradient(90deg,#d62839,#ef6875);box-shadow:0 2px 6px rgba(214,40,57,.12)}
.student-bar{background:linear-gradient(90deg,#192b4b,#42618d)}
.chart-value{font-size:11px;color:#192b4b;text-align:right;font-weight:850;font-variant-numeric:tabular-nums}
.chart-footnote{display:flex;align-items:center;gap:7px;margin-top:19px;padding-top:13px;border-top:1px solid #edf0f5;color:#8994a5;font-size:9px;line-height:1.5}
.legend-dot{display:inline-block;width:7px;height:7px;flex:0 0 7px;border-radius:50%}.red-dot{background:#d62839}.navy-dot{background:#192b4b}
.top-students-chart{gap:12px}
.top-student-row{grid-template-columns:22px minmax(100px,1.25fr) minmax(40px,1fr) 24px;gap:8px}
.student-rank{display:grid;place-items:center;width:22px;height:22px;border-radius:7px;background:#f0f3f8;color:#52617a;font-size:10px;font-weight:850}
.top-student-row:nth-child(1) .student-rank{background:#fff0f1;color:#d62839}
.chart-student-label{display:flex;flex-direction:column;gap:3px;min-width:0;overflow:hidden}
.chart-student-label strong{font-size:10px;color:#263650;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.chart-student-label small{font-size:8px;color:#929cad;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.chart-empty{display:flex;flex-direction:column;align-items:center;justify-content:center;text-align:center;min-height:210px;padding:20px 12px;color:#7c8798}
.chart-empty-icon{display:grid;place-items:center;width:42px;height:42px;margin-bottom:12px;border-radius:14px;background:#edf8f1;color:#258253;font-size:21px;font-weight:800}
.chart-empty strong{font-size:12px;color:#263650}.chart-empty p{max-width:250px;font-size:10px;line-height:1.7;margin:7px 0 0}
@media(max-width:1050px){.behavior-chart-grid{grid-template-columns:1fr}.behavior-chart-card{padding:19px}.horizontal-chart{gap:12px}.chart-row{grid-template-columns:minmax(85px,140px) minmax(40px,1fr) 30px}.top-student-row{grid-template-columns:24px minmax(110px,1.3fr) minmax(40px,1fr) 28px}}
@media(max-width:600px){.admin-behavior-analytics{margin-top:20px}.analytics-section-head{align-items:flex-start;flex-direction:column}.analytics-section-head .btn{align-self:flex-start}.analytics-section-head h2{font-size:18px}.behavior-chart-card{padding:16px 13px}.behavior-chart-heading{margin-bottom:17px}.behavior-chart-heading h3{font-size:15px}.chart-row{grid-template-columns:minmax(68px,94px) minmax(35px,1fr) 22px;gap:7px}.chart-row-label{font-size:9px}.chart-value{font-size:10px}.top-student-row{grid-template-columns:20px minmax(80px,1.1fr) minmax(35px,.8fr) 22px;gap:6px}.student-rank{width:20px;height:20px;font-size:9px}.chart-student-label strong{font-size:9px}.chart-student-label small{font-size:7px}.chart-track{height:8px}.chart-footnote{font-size:8px}}
@media print{.admin-behavior-analytics{break-inside:avoid}.behavior-chart-grid{grid-template-columns:1fr 1fr}.behavior-chart-card{box-shadow:none;border:1px solid #d8dee8}.chart-bar{-webkit-print-color-adjust:exact;print-color-adjust:exact}}


/* Direct camera capture and attachment upload */
.camera-upload-field{grid-column:1/-1;min-width:0;padding:15px;border:1px solid #e3e8f0;border-radius:14px;background:#fbfcfe}
.camera-upload-options{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:14px;margin-top:10px}
.camera-upload-options>div{display:flex;flex-direction:column;align-items:flex-start;gap:8px;min-width:0;padding:13px;border:1px solid #e3e8f0;border-radius:11px;background:#fff}
.camera-option-label{display:inline-flex;align-items:center;gap:7px;font-size:12px;font-weight:800;color:#192b4b;cursor:pointer}
.camera-upload-options input[type=file]{width:100%;max-width:100%;font-size:12px}
.camera-upload-options .muted{font-size:10px;line-height:1.5}
.camera-upload-warning{display:block;margin-top:10px;color:#9a3440;font-size:10px;font-weight:700}
@media(max-width:600px){.camera-upload-field{padding:11px}.camera-upload-options{grid-template-columns:1fr;gap:10px}.camera-upload-options>div{padding:11px}.camera-upload-options input[type=file]{font-size:11px}}

/* Excel report actions */
.excel-button{background:#16834a!important;color:#fff!important;border-color:#16834a!important}.report-assessment-filter{min-width:min(320px,100%)}@media(max-width:680px){.report-assessment-filter{min-width:100%}}

/* Dashboard admin: analitik tindak lanjut wali kelas dan produktivitas guru */
.admin-activity-analytics{margin-top:26px}
.activity-chart-row{grid-template-columns:minmax(130px,1.25fr) minmax(45px,1fr) 30px;gap:10px}
.activity-chart-row .chart-student-label{min-width:0}
.activity-chart-row .chart-student-label strong{font-size:11px}
.activity-chart-row .chart-student-label small{font-size:9px;line-height:1.45;white-space:normal;overflow-wrap:anywhere}
@media(max-width:1050px){.activity-chart-row{grid-template-columns:minmax(130px,1.1fr) minmax(40px,1fr) 30px}}
@media(max-width:600px){.activity-chart-row{grid-template-columns:minmax(105px,1.15fr) minmax(32px,.8fr) 23px;gap:7px}.activity-chart-row .chart-student-label strong{font-size:9px}.activity-chart-row .chart-student-label small{font-size:7px}.admin-activity-analytics .dashboard-period{font-size:9px}}
