/* Hamlass Design System — Fresh Editorial Academy */
:root{
  color-scheme: light;
  --bg:#f3f6f4;
  --paper:#ffffff;
  --paper-soft:#f8faf9;
  --ink:#1d302e;
  --muted:#6c7d79;
  --line:#dfe8e4;
  --brand:#176f67;
  --brand-dark:#105850;
  --brand-soft:#e4f3ef;
  --mint:#2aa88f;
  --danger:#c64f57;
  --warning:#b9792f;
  --navy:#1c3937;
  --radius:16px;
  --radius-sm:10px;
  --shadow:0 12px 32px rgba(28,57,55,.085);
  --shadow-soft:0 4px 15px rgba(28,57,55,.045);
  --shadow-lift:0 12px 28px rgba(28,57,55,.10);
  --space-1:4px;
  --space-2:8px;
  --space-3:12px;
  --space-4:16px;
  --space-5:20px;
  --space-6:24px;
  --space-7:32px;
  --focus-ring:0 0 0 4px rgba(23,111,103,.14);
}
*{box-sizing:border-box}
html{scroll-behavior:smooth}
body{margin:0;min-height:100vh;font:15px/1.75 "Vazirmatn","IRANSansX",Tahoma,"Segoe UI",sans-serif;background:var(--bg);color:var(--ink);-webkit-font-smoothing:antialiased}
button,input,select,textarea{font:inherit}
button,a,input,select,textarea{-webkit-tap-highlight-color:transparent}
a{color:inherit}
button{cursor:pointer}
:focus-visible{outline:3px solid rgba(81,72,229,.38);outline-offset:3px}
::selection{background:#dcd9ff;color:#28226f}

/* App shell */
.app-layout{min-height:100vh}
.sidebar{position:fixed;z-index:30;inset-block:0;inset-inline-start:0;width:276px;display:flex;flex-direction:column;padding:24px 17px 18px;background:linear-gradient(165deg,#20294d 0%,#18213f 48%,#171e37 100%);color:#eef1ff;box-shadow:8px 0 34px rgba(24,32,63,.10);overflow-y:auto}
.brand{display:flex;align-items:center;gap:12px;padding:5px 7px 25px;text-decoration:none;border-bottom:1px solid rgba(255,255,255,.1)}
.brand-mark{width:46px;height:46px;display:grid;place-items:center;border-radius:15px;color:#fff;font-weight:900;font-size:22px;background:linear-gradient(140deg,#8077ff,#5148e5 65%,#3d37bf);box-shadow:0 9px 20px rgba(81,72,229,.35)}
.brand-copy{display:flex;flex-direction:column;line-height:1.45;min-width:0}
.brand-copy strong{font-size:17px;letter-spacing:-.3px;color:#fff}
.brand-copy small{font-size:11px;color:#aeb9d8;margin-top:3px}
.nav-caption{padding:22px 12px 8px;font-size:10px;font-weight:800;letter-spacing:1.1px;color:#8290b8}
.nav-links{display:flex;flex-direction:column;gap:6px}
#nav .nav-links a{position:relative;display:flex;align-items:center;gap:12px;min-height:48px;padding:9px 11px;border:1px solid transparent;border-radius:13px;color:#bdc7e2;text-decoration:none;transition:background .18s ease,color .18s ease,border-color .18s ease;white-space:nowrap}
#nav .nav-links a .nav-icon{width:31px;height:31px;display:grid;place-items:center;flex:0 0 31px;border-radius:10px;background:rgba(255,255,255,.055);font-size:17px;color:#c4cafa}
#nav .nav-links a .nav-label{font-size:13px;font-weight:600}
#nav .nav-links a .nav-chevron{margin-inline-start:auto;font-size:19px;opacity:0;transform:translateX(4px);transition:.18s}
#nav .nav-links a:hover{background:rgba(255,255,255,.07);color:#fff}
#nav .nav-links a.on{background:linear-gradient(110deg,rgba(109,100,255,.30),rgba(109,100,255,.12));border-color:rgba(154,147,255,.19);color:#fff;box-shadow:inset -3px 0 #8f87ff}
#nav .nav-links a.on .nav-icon{background:#5b52e6;color:#fff;box-shadow:0 5px 13px rgba(0,0,0,.12)}
#nav .nav-links a.on .nav-chevron{opacity:1;transform:none}
.sidebar-spacer{flex:1;min-height:28px}
.sidebar-note{margin:15px 4px 16px;padding:14px;border-radius:15px;border:1px solid rgba(255,255,255,.09);background:rgba(255,255,255,.045);color:#b6c0db;font-size:11px;line-height:1.8}
.sidebar-note strong{display:block;color:#eef1ff;font-size:12px;margin-bottom:2px}
.sidebar-user{display:flex;align-items:center;gap:10px;padding:13px 8px 0;border-top:1px solid rgba(255,255,255,.11)}
.user-avatar{width:39px;height:39px;flex:0 0 39px;display:grid;place-items:center;border-radius:13px;background:linear-gradient(140deg,#f2b88e,#e78d8a);font-weight:900;color:#482b47}
.user-meta{display:flex;flex-direction:column;min-width:0;flex:1}
.user-meta strong{font-size:12px;color:#fff;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;max-width:130px}
.user-meta small{font-size:10px;color:#9ca9cc}
#out{border:1px solid rgba(255,255,255,.12);background:rgba(255,255,255,.06);color:#e8eaff;border-radius:10px;width:35px;height:35px;display:grid;place-items:center;font-size:17px;transition:.18s}
#out:hover{background:rgba(217,72,95,.18);border-color:rgba(255,120,135,.35);color:#ffc2cb}
.workspace{min-height:100vh;margin-inline-start:276px;display:flex;flex-direction:column;min-width:0}
.topbar{position:sticky;top:0;z-index:15;display:flex;align-items:center;gap:16px;min-height:76px;padding:14px clamp(20px,4vw,48px);background:rgba(255,255,255,.88);backdrop-filter:blur(15px);border-bottom:1px solid rgba(224,229,241,.85)}
#mb{display:none;border:1px solid var(--line);border-radius:12px;width:42px;height:42px;background:#fff;color:var(--ink);font-size:20px;box-shadow:var(--shadow-soft)}
.breadcrumbs{display:flex;align-items:center;gap:9px;color:#9aa3b8;font-size:12px;min-width:0}
.breadcrumbs strong{color:var(--ink);font-size:14px;font-weight:800;white-space:nowrap}
.top-actions{display:flex;align-items:center;gap:12px;margin-inline-start:auto}
.system-state{display:inline-flex;align-items:center;gap:7px;background:#eaf9f5;color:#14816f;border:1px solid #d3f2ea;border-radius:99px;padding:6px 11px;font-size:10px;font-weight:800;white-space:nowrap}
.system-state:before{content:"";width:6px;height:6px;border-radius:50%;background:#18b99c;box-shadow:0 0 0 3px rgba(24,185,156,.12)}
.top-avatar{width:37px;height:37px;display:grid;place-items:center;border-radius:12px;background:var(--brand-soft);color:var(--brand);font-weight:900;font-size:13px}
main{width:100%;max-width:1360px;margin:0 auto;padding:32px clamp(20px,4vw,48px) 48px;flex:1;min-width:0}
.app-footer{margin-top:auto;padding:16px clamp(20px,4vw,48px) 24px;color:#a0a8ba;font-size:10px;text-align:center}
#navbackdrop{display:none}

/* Page heading and layout elements */
#main>h1,.page-head h1{position:relative;margin:0 0 22px;font-size:clamp(23px,2vw,30px);line-height:1.45;letter-spacing:-.7px;font-weight:900;color:#202946}
#main>h1:after,.page-head h1:after{content:"";display:block;width:46px;height:4px;background:linear-gradient(90deg,var(--brand),#9b96ff);border-radius:99px;margin-top:11px}
.page-head{display:flex;align-items:flex-end;justify-content:space-between;gap:18px;margin-bottom:23px}
.page-head h1{margin-bottom:6px}
.page-head p{margin:0;color:var(--muted);font-size:12px}
.page-eyebrow{display:inline-flex;align-items:center;gap:7px;color:var(--brand);font-size:11px;font-weight:900;margin-bottom:8px}
.page-eyebrow:before{content:"";width:18px;height:2px;border-radius:9px;background:currentColor}
.page-hero{position:relative;overflow:hidden;display:flex;align-items:center;justify-content:space-between;gap:18px;padding:24px 27px;margin-bottom:23px;border-radius:22px;background:linear-gradient(115deg,#292b65 0%,#5148d9 64%,#7569f4 100%);color:#fff;box-shadow:0 13px 28px rgba(81,72,229,.18)}
.page-hero:after{content:"";position:absolute;left:-32px;top:-83px;width:240px;height:240px;border:1px solid rgba(255,255,255,.13);border-radius:50%;box-shadow:0 0 0 22px rgba(255,255,255,.035),0 0 0 48px rgba(255,255,255,.025)}
.page-hero .hero-copy{position:relative;z-index:1}
.page-hero .hero-kicker{display:block;font-size:11px;color:#d6d4ff;margin-bottom:7px;font-weight:700}
.page-hero h1{font-size:clamp(23px,2.3vw,31px);line-height:1.5;margin:0 0 5px;color:#fff;letter-spacing:-.5px}
.page-hero h1:after{display:none}
.page-hero p{margin:0;max-width:600px;color:#e0dfff;font-size:12px}
.hero-symbol{position:relative;z-index:1;width:72px;height:72px;flex:0 0 72px;display:grid;place-items:center;border-radius:22px;background:rgba(255,255,255,.14);border:1px solid rgba(255,255,255,.18);font-size:32px;box-shadow:inset 0 1px rgba(255,255,255,.13)}
.grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(min(100%,168px),1fr));gap:15px;margin:0 0 22px}
.card,.stat{background:var(--paper);border:1px solid var(--line);border-radius:var(--radius);padding:22px;margin:0 0 17px;box-shadow:var(--shadow-soft);min-width:0}
.card{transition:border-color .18s ease,box-shadow .18s ease}
.card:hover{border-color:#d9def1;box-shadow:var(--shadow)}
.card.done{opacity:.65}
.card p{white-space:pre-wrap;margin:6px 0 13px;color:#5c667e}
.card>b,.card>strong{display:block;font-size:14px;margin-bottom:12px;color:#242e4b}
.stat{position:relative;overflow:hidden;text-align:right;border:1px solid var(--line);border-top:3px solid var(--brand);padding:18px 19px 17px;min-height:116px;display:flex;flex-direction:column;justify-content:space-between;gap:5px}
.stat:after{content:"";position:absolute;width:65px;height:65px;border-radius:50%;background:currentColor;opacity:.035;left:-19px;bottom:-22px;pointer-events:none}
.stat b{display:block;font-size:30px;line-height:1.3;color:#202946;font-weight:900;letter-spacing:-.8px}
.stat:not([style*="border-color"])::before{content:"";width:28px;height:3px;border-radius:8px;background:var(--brand);opacity:.4}
.stat{color:#69748b;font-size:12px;font-weight:600}
.stat[style*="border-color"]{border-top-color:var(--brand)}

/* Forms */
label{display:block;margin:13px 0 6px;font-size:12px;font-weight:700;color:#64708a}
input,select,textarea{display:block;width:100%;min-height:46px;margin-top:6px;padding:10px 13px;border:1px solid #dfe4f0;border-radius:12px;background:#fbfcff;color:var(--ink);font-size:13px;transition:border-color .18s,box-shadow .18s,background .18s}
input::placeholder,textarea::placeholder{color:#a4acc0}
input:hover,select:hover,textarea:hover{border-color:#c8cdef}
input:focus,select:focus,textarea:focus{outline:none;border-color:#8981f1;background:#fff;box-shadow:0 0 0 4px rgba(81,72,229,.09)}
input[type=time],input[type=date]{direction:ltr;text-align:right}
textarea{min-height:100px;resize:vertical}
.btn,.card button{display:inline-flex;align-items:center;justify-content:center;gap:7px;min-height:43px;font:inherit;font-size:12px;font-weight:800;background:linear-gradient(135deg,var(--brand),#6e65f2);color:#fff;border:0;border-radius:12px;padding:10px 18px;cursor:pointer;margin:8px 0 0;box-shadow:0 6px 14px rgba(81,72,229,.13);transition:transform .16s,box-shadow .16s,filter .16s}
.btn:hover,.card button:hover{filter:brightness(1.035);transform:translateY(-1px);box-shadow:0 9px 18px rgba(81,72,229,.17)}
.btn:active,.card button:active{transform:translateY(0)}
.card div button{background:#f0f1ff;color:#4e47c8;box-shadow:none;border:1px solid #e5e4ff;margin-inline-end:5px}
.card div button:hover{background:#e7e6ff;box-shadow:none}
#out{box-shadow:none}
.err{color:#c9344d;font-size:12px;font-weight:700;margin:7px 0}
.success{color:#15816e}

/* Data tables */
.tw{overflow:auto;background:var(--paper);border-radius:18px;border:1px solid var(--line);box-shadow:var(--shadow-soft);margin:14px 0 20px;scrollbar-color:#d5d9ec transparent;scrollbar-width:thin}
table{border-collapse:separate;border-spacing:0;width:100%;min-width:570px;font-size:12px}
th,td{padding:13px 15px;border-bottom:1px solid #edf0f7;text-align:right;vertical-align:middle}
th{background:#f7f8fd;color:#74809a;font-size:11px;font-weight:900;white-space:nowrap}
th:first-child{border-top-right-radius:12px}
th:last-child{border-top-left-radius:12px}
tbody tr:hover td{background:#fbfbff}
tbody tr:last-child td{border-bottom:0}
td{color:#38435e}
td select{min-width:96px;min-height:39px;margin:0;padding:7px 9px;border-width:1px;border-radius:9px;background-color:#fff;font-size:11px}
.chip{display:inline-flex;align-items:center;gap:5px;color:#fff;border-radius:99px;padding:5px 10px;font-size:10px;font-weight:800;white-space:nowrap}
.empty{color:var(--muted);text-align:center;padding:30px 16px;font-size:12px}
#q{margin:0 0 14px}

/* Toast */
#toast{position:fixed;z-index:100;bottom:22px;inset-inline:20px;margin:auto;max-width:390px;background:#20294d;color:#fff;padding:13px 18px;border:1px solid rgba(255,255,255,.13);border-radius:14px;text-align:center;font-size:12px;font-weight:700;box-shadow:0 15px 45px rgba(17,24,48,.2);opacity:0;transform:translateY(8px);pointer-events:none;transition:opacity .2s,transform .2s}
#toast.show{opacity:1;transform:translateY(0)}#toast.bad{background:#a92e49}

/* Login and first-time setup */
.auth-page{min-height:100vh;display:grid;place-items:center;padding:26px;background:radial-gradient(ellipse at 12% 14%,rgba(127,119,255,.16),transparent 28%),radial-gradient(ellipse at 85% 85%,rgba(19,169,149,.11),transparent 24%),#f4f6fc}
.auth-layout{width:min(100%,990px);min-height:600px;display:grid;grid-template-columns:1fr 1.08fr;direction:rtl;background:#fff;border-radius:28px;overflow:hidden;border:1px solid rgba(224,228,243,.9);box-shadow:0 26px 80px rgba(32,42,88,.13)}
.auth-brand-panel{position:relative;isolation:isolate;overflow:hidden;padding:42px 38px;background:linear-gradient(150deg,#252957 0%,#34358b 54%,#5148e5 100%);color:#fff;display:flex;flex-direction:column;justify-content:space-between}
.auth-brand-panel:before{content:"";position:absolute;z-index:-1;right:-105px;top:10%;width:330px;height:330px;border:1px solid rgba(255,255,255,.12);border-radius:50%;box-shadow:0 0 0 27px rgba(255,255,255,.035),0 0 0 65px rgba(255,255,255,.025)}
.auth-brand-panel:after{content:"";position:absolute;z-index:-1;bottom:-100px;left:-80px;width:250px;height:250px;border-radius:40%;transform:rotate(25deg);background:linear-gradient(135deg,rgba(19,169,149,.22),rgba(255,255,255,.015))}
.auth-brand{display:flex;align-items:center;gap:13px}
.auth-brand .brand-mark{background:rgba(255,255,255,.16);border:1px solid rgba(255,255,255,.22);box-shadow:none}
.auth-brand strong{display:block;font-size:18px}
.auth-brand small{display:block;color:#c6c9f5;font-size:11px;margin-top:2px}
.auth-promo{margin-top:60px;position:relative;z-index:1}
.auth-promo .pill{display:inline-flex;padding:6px 11px;border-radius:99px;background:rgba(255,255,255,.1);border:1px solid rgba(255,255,255,.14);color:#dedcff;font-size:10px;font-weight:800;margin-bottom:16px}
.auth-promo h2{font-size:30px;line-height:1.7;letter-spacing:-.7px;margin:0 0 10px;color:white}
.auth-promo p{font-size:12px;line-height:2.1;color:#d0d3f3;max-width:330px;margin:0}
.auth-highlights{display:grid;gap:12px;margin-top:28px}
.auth-highlight{display:flex;align-items:center;gap:10px;color:#e4e5ff;font-size:11px}
.auth-highlight span:first-child{display:grid;place-items:center;width:27px;height:27px;background:rgba(255,255,255,.12);border-radius:9px;color:#bdf5e9}
.auth-footnote{font-size:10px;color:#aeb4e8;margin-top:38px}
.auth-panel{align-self:center;padding:clamp(25px,5vw,55px);min-width:0}
.auth-panel h1{margin:0 0 7px;font-size:26px;letter-spacing:-.6px;color:#202946}
.auth-subtitle{margin:0 0 25px;color:var(--muted);font-size:12px}
.tabs{display:flex;gap:6px;padding:5px;background:#f3f4fb;border:1px solid #eceefa;border-radius:13px;margin-bottom:18px}
.tabs button{flex:1;min-height:43px;padding:8px 10px;border:0;border-radius:10px;background:transparent;color:#7d86a0;font:inherit;font-size:12px;font-weight:800;cursor:pointer;transition:.18s}
.tabs button:hover{color:var(--brand);background:#fff}
.tabs .on{background:#fff;color:var(--brand);box-shadow:0 3px 12px rgba(40,45,90,.08)}
#f.card{border:0;border-radius:0;padding:0;margin:0;background:transparent;box-shadow:none}
.auth-panel label{margin:14px 0 6px}
.auth-panel input{min-height:49px}
.auth-panel .btn{width:100%;margin-top:16px;min-height:49px}
.auth-submit-arrow{font-size:16px}
.auth-legal{font-size:10px;color:#98a1b5;text-align:center;margin:17px 0 0}
.auth-message{min-height:20px;margin:7px 0 0}
.setup-hint{font-size:11px;color:var(--muted);line-height:2}

@media(max-width:1050px){
  .sidebar{width:250px;padding-inline:13px}
  .workspace{margin-inline-start:250px}
  main{padding-inline:26px}
  .topbar{padding-inline:26px}
  .auth-layout{max-width:850px}
  .auth-brand-panel{padding:35px 30px}
  .auth-promo h2{font-size:26px}
}
@media(max-width:760px){
  .sidebar{width:min(290px,86vw);transform:translateX(115%);transition:transform .24s ease;box-shadow:-14px 0 45px rgba(20,29,59,.2);padding:21px 15px 16px}
  .sidebar.open{transform:translateX(0)}
  .workspace{margin-inline-start:0}
  .topbar{min-height:66px;padding:11px 17px;gap:11px}
  #mb{display:grid;place-items:center;flex:0 0 40px;width:40px;height:40px}
  .breadcrumbs{gap:6px;font-size:10px}
  .breadcrumbs strong{font-size:12px;overflow:hidden;text-overflow:ellipsis}
  .top-actions{gap:7px}
  .system-state{font-size:0;padding:0;width:10px;height:10px;border:0;background:transparent}
  .system-state:before{width:8px;height:8px;box-shadow:0 0 0 4px rgba(24,185,156,.13)}
  .top-avatar{width:34px;height:34px;font-size:12px}
  #navbackdrop{display:block;position:fixed;inset:0;z-index:25;background:rgba(17,23,48,.43);backdrop-filter:blur(2px);opacity:0;visibility:hidden;transition:opacity .2s,visibility .2s}
  #navbackdrop.show{opacity:1;visibility:visible}
  main{padding:24px 17px 35px}
  .app-footer{padding:13px 18px 20px}
  #main>h1,.page-head h1{font-size:23px;margin-bottom:18px}
  .page-hero{padding:21px 20px;border-radius:18px}
  .hero-symbol{width:55px;height:55px;flex-basis:55px;border-radius:16px;font-size:25px}
  .page-hero p{max-width:80%;font-size:11px}
  .grid{grid-template-columns:repeat(2,minmax(0,1fr));gap:10px}
  .stat{padding:15px;min-height:102px;border-radius:16px;font-size:11px}
  .stat b{font-size:26px}
  .card{padding:17px;border-radius:17px;margin-bottom:13px}
  .tw{border-radius:15px}
  th,td{padding:11px 12px}
  .page-head{align-items:flex-start;flex-direction:column}
  #navbackdrop{cursor:pointer}
}
@media(max-width:600px){
  .auth-page{padding:12px;display:block}
  .auth-layout{display:flex;flex-direction:column;min-height:calc(100vh - 24px);border-radius:23px}
  .auth-brand-panel{padding:21px 22px 19px;min-height:190px;flex:0 0 auto}
  .auth-brand .brand-mark{width:39px;height:39px;border-radius:13px;font-size:19px}
  .auth-brand strong{font-size:16px}
  .auth-promo{margin-top:22px}
  .auth-promo .pill{margin-bottom:7px;padding:4px 9px}
  .auth-promo h2{font-size:21px;line-height:1.5;margin-bottom:5px}
  .auth-promo p{font-size:10px;line-height:1.8;max-width:100%}
  .auth-highlights,.auth-footnote{display:none}
  .auth-brand-panel:before{width:200px;height:200px;right:auto;left:-72px;top:-75px}
  .auth-brand-panel:after{width:125px;height:125px;bottom:-65px;left:auto;right:-20px}
  .auth-panel{padding:23px 22px 27px;flex:1}
  .auth-panel h1{font-size:23px}
  .auth-subtitle{margin-bottom:18px}
  .tabs button{font-size:11px}
}
@media(max-width:370px){
  .grid{grid-template-columns:1fr 1fr}
  .stat{padding:12px;min-height:95px}
  .stat b{font-size:23px}
  .auth-panel{padding-inline:17px}
  .breadcrumbs span{display:none}
}
@media(prefers-reduced-motion:reduce){*,*::before,*::after{scroll-behavior:auto!important;transition:none!important;animation:none!important}}

/* New polished page components */
.section-heading{display:flex;align-items:flex-end;justify-content:space-between;gap:16px;margin:27px 0 15px}
.section-heading h2{margin:0;color:#252f4d;font-size:18px;letter-spacing:-.3px}
.section-heading p{margin:4px 0 0;color:var(--muted);font-size:11px}
.overview-panels{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:16px}
.overview-card{padding:22px;margin-bottom:0}
.card-heading{display:flex;align-items:center;gap:11px;margin-bottom:17px}
.card-heading>div{display:flex;flex-direction:column;gap:3px;min-width:0}
.card-heading b{font-size:13px;color:#242e4b}
.card-heading small{color:#8a94aa;font-size:10px}
.mini-icon{width:40px;height:40px;display:grid;place-items:center;flex:0 0 40px;border-radius:13px;font-size:20px;font-weight:900}
.mini-icon.purple{color:#5148e5;background:#efeeff}
.mini-icon.mint{color:#0d9f8c;background:#e8faf5}
.mini-icon.amber{color:#bc7a16;background:#fff5e3}
.big-inline{font-size:21px!important;font-weight:900;color:#202946!important;margin:14px 0 19px!important}
.text-link{display:inline-flex;align-items:center;gap:7px;text-decoration:none;color:var(--brand);font-size:11px;font-weight:900;margin-top:7px}
.text-link span{transition:transform .15s}
.text-link:hover span{transform:translateX(-3px)}
.task-preview{display:flex;align-items:center;gap:9px;padding:10px 0;border-bottom:1px solid #eef0f7;font-size:12px;color:#4a5570}
.task-preview:last-of-type{border-bottom:0}
.task-preview small{margin-inline-start:auto;white-space:nowrap;color:#929bb0;font-size:10px}
.task-dot{width:7px;height:7px;flex:0 0 7px;border-radius:50%;background:var(--mint);box-shadow:0 0 0 4px #e8faf5}
.admin-panels{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:17px;align-items:start}
.admin-panels .card{height:100%;margin:0}
.tool-card .card-heading{padding-bottom:14px;border-bottom:1px solid #edf0f8;margin-bottom:12px}
.tool-card .btn{width:100%;margin-top:15px}
.time-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:0 13px}
.time-grid label{margin-top:6px}
.security-hint{font-size:10px!important;color:#8a94aa!important;line-height:1.9;margin:10px 0!important}
.security-card{background:linear-gradient(180deg,#fff,#fcfbff)}
.filter-bar{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));align-items:end;gap:14px 18px;padding:18px 21px;margin-bottom:20px}
.filter-bar label{margin:0}
.filter-bar input,.filter-bar select{margin-top:7px}
.filter-help{grid-column:1/-1;display:flex;align-items:center;gap:10px;padding-top:13px;border-top:1px solid #edf0f7;color:#828da5;font-size:10px}
.filter-help .mini-icon{width:31px;height:31px;flex-basis:31px;border-radius:10px;font-size:15px}
.page-tag{display:inline-flex;align-items:center;gap:7px;white-space:nowrap;background:#eeedff;color:#544bd2;padding:8px 12px;border:1px solid #e4e2ff;border-radius:99px;font-size:10px;font-weight:900}
.table-title{display:flex;align-items:center;justify-content:space-between;gap:15px;margin:24px 2px 12px}
.table-title>div{display:flex;flex-direction:column;gap:3px}
.table-title b{font-size:14px;color:#27314f}
.table-title small{font-size:10px;color:#8993aa}
.table-badge{display:inline-flex;align-items:center;gap:6px;background:#e9faf5;color:#13806e;border:1px solid #d6f3ea;padding:6px 10px;border-radius:99px;font-size:10px;font-weight:800;white-space:nowrap}
.table-badge:before{content:"";width:5px;height:5px;border-radius:50%;background:#17b396}
.student-row{display:flex;align-items:center;gap:9px;min-width:max-content}
.student-row strong{font-size:12px;font-weight:700;color:#323c59}
.row-number{display:inline-grid;place-items:center;width:30px;height:30px;flex:0 0 30px;border-radius:10px;background:#f0f0ff;color:#5850d9;font-size:11px;font-weight:900}
.reg-code{display:inline-block;padding:5px 8px;background:#f5f6fb;border:1px solid #e8ebf4;border-radius:8px;color:#6b7590;font-size:11px;letter-spacing:.3px}
.status-pill{display:inline-flex;align-items:center;gap:7px;padding:6px 9px;border-radius:99px;font-size:10px;font-weight:800;white-space:nowrap}
.status-pill>span{width:6px;height:6px;border-radius:50%;background:currentColor}
.status-active{background:#e8f8f1;color:#17856b}
.status-pending{background:#fff5e5;color:#ac741c}
.compact-hero{padding-block:20px;margin-bottom:20px}
.compact-hero .hero-symbol{width:60px;height:60px;flex-basis:60px}
.list-layout{display:grid;grid-template-columns:minmax(260px,.82fr) minmax(0,1.18fr);gap:20px;align-items:start}
.create-card{position:sticky;top:96px}
.create-card .card-heading{margin-bottom:19px}
.create-card .btn{width:100%;margin-top:15px}
.list-content{min-width:0}
.list-content .section-heading{margin-top:0}
.record-card{padding:18px 20px;margin-bottom:12px;border-radius:17px}
.record-top{display:flex;align-items:center;justify-content:space-between;gap:10px}
.record-top>b{font-size:13px;color:#27314f;overflow-wrap:anywhere}
.record-due{display:inline-block;color:#8b72d9;font-size:10px;margin-top:8px}
.record-card>p{font-size:12px;line-height:2;margin:10px 0 14px;overflow-wrap:anywhere}
.record-meta{display:flex;justify-content:space-between;align-items:center;gap:10px;padding-top:10px;border-top:1px solid #edf0f7;color:#96a0b4}
.record-meta small{font-size:10px}
.record-meta span{font-size:10px;background:#f3f4fc;border-radius:7px;padding:3px 7px;color:#747f9b}
.record-actions{display:flex;flex-wrap:wrap;gap:6px;margin-top:12px}
.record-actions button{min-height:34px!important;padding:6px 10px!important;font-size:10px!important;margin:0!important}
.empty-card{padding:35px 20px;background:#fff;border:1px dashed #d8dcef;border-radius:18px;text-align:center}
.empty-card>span{display:grid;place-items:center;width:46px;height:46px;margin:0 auto 11px;border-radius:15px;background:#efeeff;color:var(--brand);font-size:22px}
.empty-card>b{display:block;font-size:13px;color:#333e5d}
.empty-card p{margin:7px auto 0;max-width:260px;color:#8a94aa;font-size:11px}
.muted-dash{color:#c0c6d4;text-align:center}
#code[hidden]{display:none!important}

@media(max-width:950px){
  .list-layout{grid-template-columns:minmax(0,1fr)}
  .create-card{position:static}
}
@media(max-width:760px){
  .overview-panels,.admin-panels{grid-template-columns:minmax(0,1fr)}
  .filter-bar{grid-template-columns:minmax(0,1fr);gap:10px;padding:15px}
  .filter-help{grid-column:auto}
  .page-tag{align-self:flex-start}
  .table-title{align-items:flex-start}
  .table-title small{max-width:240px;line-height:1.7}
  .section-heading{margin-top:23px}
  .overview-card{padding:18px}
}
@media(max-width:430px){
  .page-hero{align-items:flex-start}
  .page-hero .hero-symbol{width:46px;height:46px;flex-basis:46px;border-radius:14px;font-size:21px}
  .compact-hero{padding:18px}
  .compact-hero .hero-symbol{width:45px;height:45px;flex-basis:45px}
  .table-badge{font-size:9px;padding:5px 8px}
  .record-card{padding:15px}
}
/* Auth pages use the full card width; the app workspace padding must not leak into them. */
main.auth-layout{padding:0;margin:0;max-width:none;flex:none;min-width:0}

/* Attendance — unified indigo/lavender/n navy/mint visual system */
.att-hero{position:relative;isolation:isolate;overflow:hidden;display:flex;align-items:center;justify-content:space-between;gap:20px;min-height:160px;margin:0 0 20px;padding:25px 28px;border:1px solid rgba(255,255,255,.14);border-radius:22px;background:linear-gradient(118deg,#252957 0%,#5148d9 72%,#458f9b 135%);box-shadow:0 12px 26px rgba(57,49,184,.13);color:#fff}
.att-hero:after{content:"";position:absolute;z-index:-1;inset-inline-end:-62px;top:-116px;width:260px;height:260px;border:1px solid rgba(255,255,255,.1);border-radius:50%;box-shadow:0 0 0 24px rgba(255,255,255,.025),0 0 0 53px rgba(255,255,255,.018);pointer-events:none}
.att-hero-copy{position:relative;z-index:1;min-width:0}.att-kicker{display:inline-flex;padding:5px 11px;border:1px solid rgba(255,255,255,.18);border-radius:99px;background:rgba(255,255,255,.1);color:#e4e1ff;font-size:11px;font-weight:900}
.att-hero h1{margin:9px 0 4px;color:#fff;font-size:clamp(25px,2.4vw,31px);letter-spacing:-.6px}.att-hero h1:after{content:none!important}.att-hero p{max-width:610px;margin:0;color:#e3e6ff;font-size:13px;line-height:1.9}
.att-current-date{display:inline-flex;align-items:center;gap:8px;margin-top:13px;padding:7px 13px;border-radius:99px;background:rgba(255,255,255,.1);border:1px solid rgba(255,255,255,.15);color:#f5f5ff;font-size:12px}
.att-hero-art{position:relative;display:grid;place-items:center;flex:0 0 82px;width:82px;height:82px;border-radius:24px;background:linear-gradient(145deg,rgba(255,255,255,.16),rgba(255,255,255,.07));border:1px solid rgba(255,255,255,.2);color:#fff;box-shadow:none}
.att-hero-art span{display:grid;place-items:center;width:49px;height:49px;border:2px solid rgba(255,255,255,.68);border-radius:15px;font-size:30px;font-weight:900;color:#baf3e6}.att-hero-art i,.att-hero-art b{position:absolute;border-radius:50%;border:1px solid rgba(255,255,255,.12)}.att-hero-art i{width:63px;height:63px}.att-hero-art b{width:100px;height:100px}
.att-panel{padding:20px 22px;margin:0 0 19px;border:1px solid var(--line);border-radius:18px;background:#fff;box-shadow:var(--shadow-soft)}
.att-controls{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:13px 16px;align-items:end}.att-controls label,.att-bulk-toolbar label,.att-time-grid label{margin:0;color:#58637c;font-size:12px;font-weight:800}.att-controls input,.att-controls select,.att-bulk-toolbar select,.att-time-grid input{margin-top:6px;min-height:45px;padding:9px 11px;border:1px solid #dfe4f0;background:#fcfcff;border-radius:11px;color:var(--ink);font-size:13px}.att-controls input[type=date]{text-align:left}.att-search-label{grid-column:auto}
.att-day-section{margin:20px 0 18px}.att-section-title,.att-section-head{display:flex;justify-content:space-between;align-items:center;gap:14px;margin:0 2px 13px}.att-section-title>div,.att-section-head>div{display:flex;align-items:center;gap:11px;min-width:0}.att-section-title h2,.att-section-head h2,.att-panel-heading h2{margin:0;color:#263150;font-size:17px;font-weight:900}.att-section-title p,.att-section-head p,.att-panel-heading p{margin:2px 0 0;color:#77829a;font-size:11px;line-height:1.8}.att-section-mark{display:grid;place-items:center;flex:0 0 38px;width:38px;height:38px;border-radius:11px;background:#eeedff;border:1px solid #e0ddff;color:#5148e5;font-size:11px;font-weight:900}.att-selected-day{color:#5148e5;background:#eeedff;border:1px solid #dedaff;border-radius:99px;padding:6px 10px;font-size:11px;font-weight:900;white-space:nowrap}
.att-daybar{display:grid;grid-template-columns:repeat(5,minmax(0,1fr));gap:8px;padding:8px;border:1px solid #e3e6f2;border-radius:16px;background:#fff}.att-day-btn{display:flex;align-items:center;justify-content:center;gap:9px;min-height:53px;padding:6px 7px;border:1px solid transparent;border-radius:12px;background:#f5f6fb;color:#58637c;transition:transform .16s,background .16s,border .16s;cursor:pointer}.att-day-btn span{display:grid;place-items:center;width:28px;height:28px;border-radius:9px;background:#eeedff;color:#5148e5;font-size:10px;font-weight:900}.att-day-btn b{font-size:11px}.att-day-btn:hover{transform:translateY(-1px);background:#eeedff;color:#443bbd}.att-day-btn.active{background:linear-gradient(120deg,#5148e5,#4740bd);border-color:#5148e5;color:#fff;box-shadow:0 5px 12px rgba(81,72,229,.15)}.att-day-btn.active span{background:rgba(255,255,255,.18);color:#fff}
.att-panel-heading{display:flex;align-items:center;gap:12px;margin-bottom:16px}.att-panel-heading>div:nth-child(2){min-width:0}.att-heading-symbol{display:grid;place-items:center;flex:0 0 42px;width:42px;height:42px;border-radius:12px;background:#eeedff;color:#5148e5;font-size:21px;font-weight:900}.att-heading-symbol.clock,.att-heading-symbol.chart{background:#e8f8f4;color:#138c7b}.att-mini-tag{margin-inline-start:auto;padding:5px 9px;border-radius:99px;background:#eeedff;border:1px solid #e0ddff;color:#5148e5;font-size:10px;font-weight:900;white-space:nowrap}
.att-bulk textarea{width:100%;min-height:95px;padding:13px 15px;border:1px solid #dfe4f0;border-radius:13px;background:#fcfcff;color:#26314e;line-height:1.95;font-size:13px;resize:vertical}.att-bulk textarea::placeholder{color:#9aa3b5}.att-bulk-toolbar{display:grid;grid-template-columns:minmax(0,1fr) minmax(180px,.5fr);gap:12px;margin-top:11px}.att-action-grid{display:flex;flex-wrap:wrap;gap:8px;margin-top:13px}.att-btn{display:inline-flex;align-items:center;justify-content:center;gap:6px;min-height:42px;padding:9px 14px;margin:0;border:1px solid transparent;border-radius:11px;font:inherit;font-size:12px;font-weight:800;cursor:pointer;transition:filter .16s,transform .16s,box-shadow .16s}.att-btn:hover{filter:brightness(.98);transform:translateY(-1px)}.att-btn:disabled{opacity:.55;cursor:wait;transform:none}.att-btn-primary{background:#5148e5;color:#fff;box-shadow:0 4px 10px rgba(81,72,229,.12)}.att-btn-primary:hover{background:#3931b8}.att-btn-gold{background:#eeedff;color:#4f46c9;border-color:#dcd8ff}.att-btn-red{background:#d9485f;color:#fff}.att-btn-green{background:#168d78;color:#fff}.att-btn-softred,.att-btn-danger{background:#fff0f2;color:#b9334c;border-color:#f3d3da}.att-btn-outline{background:#fff;color:#4f5b75;border-color:#dfe4f0}.att-btn-outline:hover{background:#f5f4ff;border-color:#d1ccff}.att-btn-danger{white-space:nowrap}
.att-extra-tools{margin-top:14px;padding-top:12px;border-top:1px dashed #e4e7f2}.att-extra-tools summary{cursor:pointer;color:#5148e5;font-size:12px;font-weight:900}.att-extra-actions{display:flex;align-items:center;flex-wrap:wrap;gap:8px;margin-top:11px}.att-tool-note{margin:9px 0 0;color:#7d879c;font-size:11px;line-height:1.9}.att-time-grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:11px}.att-time-grid input{direction:ltr;text-align:right}.att-time-actions{display:flex;align-items:center;flex-wrap:wrap;gap:12px;margin-top:12px}.att-time-actions>span{font-size:11px;color:#78839b;line-height:1.8}
.att-section-head{margin:18px 2px 12px}.att-table-actions{display:flex;flex-wrap:wrap;gap:7px}.att-table-actions .att-btn{min-height:38px;padding:7px 11px;font-size:11px}.att-primary-work-section{margin-top:18px;margin-bottom:12px}.att-legend{display:flex;flex-wrap:wrap;gap:7px;margin:0 0 12px;padding:10px 11px;border:1px solid #e5e8f2;border-radius:13px;background:#fff}.att-legend span{display:inline-flex;align-items:center;gap:5px;padding:4px 7px;border-radius:99px;color:#59657e;font-size:11px;font-weight:800}.att-legend i{width:8px;height:8px;display:inline-block;border-radius:99px;background:var(--c)}
.att-table-shell{overflow:auto;border:1px solid #e1e5f0;border-radius:17px;background:#fff;box-shadow:var(--shadow-soft);scrollbar-width:thin;scrollbar-color:#d5d9f2 transparent}.att-table{width:100%;min-width:750px;border-collapse:separate;border-spacing:0;font-size:12px;direction:rtl}.att-table th{padding:13px 10px;background:linear-gradient(135deg,#f0efff,#e7eaff);color:#4740a8;text-align:center;border-bottom:1px solid #dcd9ff;white-space:nowrap;font-size:12px}.att-table th small{display:block;margin-top:3px;font-size:10px;color:#7475b8}.att-table td{padding:9px 8px;border-bottom:1px solid #edf0f7;text-align:center;background:#fff}.att-table tbody tr:nth-child(even) td{background:#fafbff}.att-table tbody tr:hover td{background:#f1f0ff}.att-table .att-sticky-name{position:sticky;right:0;z-index:2;min-width:235px;text-align:right}.att-table th.att-sticky-name{z-index:4;background:linear-gradient(135deg,#e8e6ff,#dddfff);color:#3931a4;text-align:right}.att-table td.att-sticky-name{border-left:1px solid #e4e7f2;background:#fff}.att-table tbody tr:nth-child(even) td.att-sticky-name{background:#fafbff}.att-student-name{display:flex;align-items:center;gap:10px;min-width:210px}.att-student-name>span{display:grid;place-items:center;width:29px;height:29px;flex:0 0 29px;border-radius:9px;background:#eeedff;color:#5148e5;font-size:11px;font-weight:900}.att-student-name strong{color:#263150;font-size:12px;font-weight:800;white-space:nowrap}
.att-status-select{width:100%;min-width:86px;min-height:42px;padding:7px 8px;border:1px solid #d9d8ed;border-radius:10px;background:#f7f7fc;color:#737b92;font:inherit;font-size:11px;font-weight:800;text-align:center;cursor:pointer;outline:none;transition:border-color .15s,box-shadow .15s,background .15s;color-scheme:light}.att-status-select:focus{border-color:#9188f4;box-shadow:0 0 0 3px rgba(81,72,229,.1)}.att-status-select.status-unrecorded{border-style:dashed;background:#f7f7fc;color:#737b92}.att-status-select.status-present{background:#e3f7ef;border-color:#c4ecdf;color:#14765e}.att-status-select.status-absent{background:#fff0f2;border-color:#f3d1d8;color:#b9334c}.att-status-select.status-late{background:#fff4df;border-color:#f4dfb4;color:#98620b}.att-status-select.status-review{background:#f0f2f7;border-color:#dce1ed;color:#626d83}.att-status-select.status-excused{background:#eaf3ff;border-color:#cfdff5;color:#2e639b}.att-status-select.status-leave{background:#eeedff;border-color:#dcd8ff;color:#5148b5}.att-status-select.status-sick{background:#e1f7f5;border-color:#bcebe5;color:#087d76}.att-footnote{margin:5px 3px 0;color:#768198;font-size:11px;line-height:1.9}
.att-summary-section{margin-top:22px}.att-stats{display:grid;grid-template-columns:repeat(7,minmax(0,1fr));gap:10px}.att-stat-card{position:relative;display:flex;flex-direction:column;align-items:flex-start;gap:4px;min-width:0;padding:14px;border:1px solid #e5e8f2;border-top:3px solid var(--accent);border-radius:14px;background:#fff;box-shadow:none}.att-stat-icon{display:grid;place-items:center;width:29px;height:29px;margin-bottom:2px;border-radius:9px;background:color-mix(in srgb,var(--accent) 11%,white);color:var(--accent);font-weight:900}.att-stat-card strong{color:#25304f;font-size:26px;line-height:1.3}.att-stat-card small{color:#6f7b94;font-size:11px;font-weight:800}
.att-week-report{margin-top:22px}.att-week-chart{display:grid;grid-template-columns:repeat(5,minmax(0,1fr));gap:14px;min-height:180px;padding:14px 8px 0}.att-chart-col{display:flex;flex-direction:column;align-items:center;justify-content:flex-end;gap:7px;min-width:0;padding:9px 7px 10px;border:1px solid transparent;border-radius:13px}.att-chart-col.selected{border-color:#dcd8ff;background:#f3f1ff}.att-chart-numbers{display:flex;align-items:center;justify-content:center;gap:7px;color:#384360}.att-chart-numbers b{font-size:13px}.att-chart-numbers small{color:#7a73c8;font-size:10px}.att-bar-track{display:flex;align-items:flex-end;justify-content:center;width:min(100%,65px);height:98px;border-radius:10px 10px 5px 5px;background:#f2f3f8;overflow:hidden}.att-bar{width:100%;min-height:0;border-radius:8px 8px 3px 3px;background:linear-gradient(180deg,#8178f1,#5148e5);transition:height .3s}.att-chart-col strong{color:#56607a;font-size:11px}.att-chart-col>small{color:#8791a7;font-size:10px}.att-chart-loading{grid-column:1/-1;display:grid;place-items:center;min-height:90px;color:#7c879e;font-size:12px}
.att-download-section{margin-top:22px;background:#fff;border-color:var(--line)}.att-heading-symbol.download{background:#eeedff;color:#5148e5}.att-download-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:11px;margin-top:16px}.att-download-card{display:flex;align-items:center;gap:11px;min-width:0;padding:15px;border:1px solid #e4e7f2;border-radius:14px;background:#fff;text-align:right;cursor:pointer;transition:transform .15s,box-shadow .15s,border-color .15s;color:#303a55;font-family:inherit}.att-download-card:hover{transform:translateY(-1px);border-color:#cfcaff;box-shadow:0 6px 14px rgba(81,72,229,.07)}.att-download-card.highlight{background:linear-gradient(135deg,#f5f3ff,#f2fbf8);border-color:#e0def7}.att-download-card>span:nth-child(2){display:flex;flex:1;flex-direction:column;gap:5px;min-width:0}.att-download-card strong{font-size:12px;font-weight:900}.att-download-card small{font-size:11px;color:#77829a;font-weight:700;line-height:1.7}.att-download-card>b{font-size:18px;color:#7565c6}.att-download-icon{display:grid;place-items:center;flex:0 0 38px;width:38px;height:38px;border-radius:11px;background:#eeedff;color:#5148e5;font-size:17px;font-weight:900}.att-download-card:nth-child(2n) .att-download-icon{background:#e5f7f0;color:#168d78}.att-download-card:nth-child(3n) .att-download-icon{background:#edf0ff;color:#5148e5}.att-download-section .att-tool-note{margin-top:13px;line-height:1.8}.att-bottom-actions{display:flex;align-items:center;justify-content:space-between;gap:13px;margin-top:15px}.att-bottom-actions>span{color:#78839b;font-size:11px}.att-bottom-actions .att-btn{min-height:36px}

/* User/administrator student-preview links */
.nav-switch-link{display:flex;align-items:center;gap:10px;margin:15px 13px 0;padding:12px 11px;border:1px solid rgba(187,177,255,.25);border-radius:14px;background:linear-gradient(135deg,rgba(112,95,196,.22),rgba(29,155,132,.10));color:#f6f4ff;text-decoration:none}.nav-switch-link:hover{background:rgba(116,101,198,.27)}.nav-switch-icon{display:grid;place-items:center;width:32px;height:32px;flex:0 0 32px;border-radius:10px;background:rgba(183,170,255,.19);font-size:18px}.nav-switch-link>span:nth-child(2){display:flex;flex:1;flex-direction:column;gap:4px;min-width:0}.nav-switch-link b{font-size:11px}.nav-switch-link small{font-size:10px;color:#bbb9d5}.preview-notice{display:flex;flex-direction:column;gap:7px;margin:15px 13px 0;padding:12px;border:1px solid rgba(250,210,127,.3);border-radius:13px;background:rgba(251,220,144,.09);color:#f6eacb;font-size:11px;line-height:1.8}.preview-notice b{font-size:12px;color:#f8d885}.preview-notice a{color:#fff;text-decoration:none;font-weight:900}.preview-return{display:inline-flex;align-items:center;gap:5px;padding:7px 11px;border-radius:10px;background:#efecff;color:#5d50a8;text-decoration:none;font-size:11px;font-weight:900;white-space:nowrap}.user-preview-card{display:flex;align-items:center;gap:15px;margin:18px 0;padding:17px 19px;border-color:#e5e0f7;background:linear-gradient(115deg,#f7f4ff,#f5fbf9)}.preview-card-icon{display:grid;place-items:center;flex:0 0 48px;height:48px;border-radius:15px;background:#e9e3ff;color:#6756ba;font-size:24px}.preview-card-copy{flex:1;min-width:0}.preview-card-copy>b{font-size:13px;color:#313b57}.preview-card-copy p{margin:4px 0 0;color:#80879a;font-size:11px;line-height:1.8}.user-preview-card .btn{white-space:nowrap;text-decoration:none}.student-preview-mode .system-state{background:#fff0d2;color:#9b6d18}

@media(max-width:1050px){.att-controls{grid-template-columns:repeat(2,minmax(0,1fr))}.att-stats{grid-template-columns:repeat(4,minmax(0,1fr))}.att-table{min-width:730px}}
@media(max-width:760px){.att-hero{min-height:0;padding:20px;border-radius:19px}.att-hero-art{flex-basis:70px;width:70px;height:70px;border-radius:18px}.att-hero-art span{width:40px;height:40px;border-radius:12px;font-size:26px}.att-hero-art i{width:58px;height:58px}.att-hero-art b{width:82px;height:82px}.att-panel{padding:16px;border-radius:16px}.att-controls{grid-template-columns:1fr 1fr;gap:10px}.att-controls label,.att-bulk-toolbar label,.att-time-grid label{font-size:12px}.att-controls input,.att-controls select,.att-bulk-toolbar select,.att-time-grid input{min-height:44px;font-size:13px;padding:8px}.att-daybar{gap:5px;padding:5px;border-radius:15px}.att-day-btn{min-height:59px;flex-direction:column;gap:4px;padding:6px 2px}.att-day-btn b{font-size:10px}.att-day-btn span{width:24px;height:24px}.att-bulk-toolbar{grid-template-columns:1fr 1fr}.att-action-grid .att-btn{flex:1 1 calc(50% - 8px);font-size:11px;padding:8px 7px}.att-time-grid{grid-template-columns:repeat(2,minmax(0,1fr))}.att-section-head{align-items:flex-start;flex-direction:column}.att-table-actions{width:100%}.att-table-actions .att-btn{flex:1}.att-stats{grid-template-columns:repeat(3,minmax(0,1fr));gap:7px}.att-stat-card{padding:11px 9px}.att-stat-card strong{font-size:22px}.att-stat-card small{font-size:10px}.att-week-chart{gap:5px;padding-inline:0}.att-chart-col{padding-inline:3px}.att-chart-col strong{font-size:10px}.att-bottom-actions{align-items:flex-start;flex-direction:column}.att-bottom-actions .att-btn{width:100%}.att-selected-day{font-size:10px}.att-section-title h2,.att-section-head h2,.att-panel-heading h2{font-size:15px}.att-status-select{min-width:72px;min-height:42px;padding:7px 4px;font-size:10px}.att-download-grid{grid-template-columns:repeat(2,minmax(0,1fr))}.att-download-card{padding:12px}.att-download-card strong{font-size:11px}.att-download-card small{font-size:10px}.user-preview-card{align-items:flex-start;flex-wrap:wrap}.user-preview-card .btn{width:100%;justify-content:center}.preview-return{font-size:10px;padding:7px 8px}}
@media(max-width:430px){.att-hero{padding:17px}.att-hero-art{display:none}.att-hero h1{font-size:23px}.att-hero p{font-size:12px}.att-controls{grid-template-columns:1fr 1fr}.att-daybar{grid-template-columns:repeat(5,minmax(0,1fr))}.att-day-btn b{font-size:9px}.att-mini-tag{display:none}.att-heading-symbol{flex-basis:36px;width:36px;height:36px}.att-table .att-sticky-name{min-width:190px}.att-student-name{min-width:175px}.att-status-select{min-width:70px;padding:5px 3px;font-size:10px}.att-stats{grid-template-columns:repeat(2,minmax(0,1fr))}.att-week-chart{gap:2px}.att-chart-numbers{gap:2px;flex-direction:column}.att-chart-numbers b{font-size:11px}.att-chart-numbers small{font-size:9px}.att-chart-col>small{font-size:9px}.att-bulk-toolbar{grid-template-columns:1fr}.att-extra-actions .att-btn{flex:1 1 100%}.att-download-grid{grid-template-columns:1fr}}
@media(max-width:370px){.att-controls{grid-template-columns:1fr}.att-day-btn b{font-size:8px}.att-hero h1{font-size:21px}}
@media print{.sidebar,.topbar,.app-footer,#navbackdrop,.att-bulk,.att-time,.att-table-actions,.att-controls,.att-daybar,.att-extra-tools,.att-bottom-actions,#attClearDay,.att-download-section,.user-preview-card,.nav-switch-link,.preview-notice,.preview-return{display:none!important}.workspace{margin:0!important}.att-hero{min-height:0;box-shadow:none;padding:15px;margin-bottom:12px}.att-hero-art{display:none}main{padding:0!important}.att-table-shell{overflow:visible;box-shadow:none}.att-table{min-width:0;font-size:8pt}.att-table td,.att-table th{padding:4px}.att-status-select{min-width:0;min-height:0;padding:2px 3px;font-size:7pt}.att-stats{grid-template-columns:repeat(7,minmax(0,1fr))}.att-week-report{break-inside:avoid}}

/* Mentor journal review and unfinished student journal */
.jr-incomplete-card{display:flex;align-items:flex-start;gap:16px;padding:22px;margin:18px 0 26px;border:1px solid #eadfc9;background:linear-gradient(120deg,#fffdf8,#f8f5ff)}
.jr-incomplete-icon{flex:0 0 46px;width:46px;height:46px;display:grid;place-items:center;border-radius:15px;background:#eeeaff;color:#6756bd;font-size:22px}
.jr-incomplete-card h2{font-size:17px;margin:8px 0;color:var(--ink,#202944)}
.jr-incomplete-card p{font-size:13px;line-height:2;color:#69718a;margin:0;max-width:850px}
.jr-filters{display:grid;grid-template-columns:minmax(150px,.8fr) minmax(160px,.8fr) minmax(220px,1.4fr);gap:14px;padding:18px;margin-bottom:18px}
.jr-filters label,.jr-review-form label{display:flex;flex-direction:column;gap:7px;font-size:12px;font-weight:700;color:#4d5672}
.jr-filters select,.jr-filters input,.jr-review-form textarea{font:inherit;border:1px solid #dfe4ef;border-radius:12px;background:#fff;color:#26304c;padding:11px 12px;min-height:43px;outline:none}
.jr-filters input:focus,.jr-filters select:focus,.jr-review-form textarea:focus{border-color:#8a82ef;box-shadow:0 0 0 3px #8980ed1b}
.jr-review-layout{display:grid;grid-template-columns:minmax(270px,.85fr) minmax(0,1.4fr);gap:18px;align-items:start}
.jr-students-panel,.jr-detail-panel{padding:18px;min-width:0}
.jr-panel-title,.jr-detail-head{display:flex;align-items:center;justify-content:space-between;gap:12px;margin-bottom:16px}
.jr-panel-title h2,.jr-detail-head h2{margin:3px 0;font-size:18px;color:#222b48}
.jr-detail-head p{margin:2px 0;color:#7c849b;font-size:12px}
.jr-count{font-size:11px;font-weight:800;background:#f0efff;color:#6155bd;padding:7px 10px;border-radius:20px;white-space:nowrap}
.jr-student-list{display:flex;flex-direction:column;gap:8px;max-height:720px;overflow:auto}
.jr-student-card{display:flex;align-items:center;gap:10px;width:100%;text-align:right;border:1px solid #e9edf5;background:#fff;border-radius:14px;padding:10px;cursor:pointer;color:inherit;font:inherit;transition:border-color .16s,background .16s,transform .16s}
.jr-student-card:hover{border-color:#c1bcfa;background:#fbfaff;transform:translateY(-1px)}
.jr-student-card.active{border-color:#8b83ee;background:#f4f2ff;box-shadow:inset -3px 0 #6a5fe0}
.jr-student-avatar{width:36px;height:36px;display:grid;place-items:center;border-radius:12px;background:#edf5ff;color:#4c69ae;font-weight:800;flex:0 0 36px}
.jr-student-main{display:flex;flex-direction:column;gap:4px;min-width:0;flex:1}
.jr-student-main strong{font-size:12px;overflow-wrap:anywhere}
.jr-student-main small{font-size:10px;color:#8991a6}
.jr-status-pill{display:inline-flex;align-items:center;gap:5px;padding:5px 8px;border-radius:20px;font-size:10px;font-weight:800;white-space:nowrap}
.jr-approved{background:#e7f8ee;color:#15784b}.jr-revision{background:#fff0e7;color:#b25320}.jr-pending{background:#f0f2f7;color:#747d93}
.jr-no-selection{min-height:300px;display:flex;flex-direction:column;align-items:center;justify-content:center;text-align:center;padding:25px}
.jr-no-selection>span{width:62px;height:62px;border-radius:20px;background:#f0efff;color:#695fd0;display:grid;place-items:center;font-size:27px;margin-bottom:13px}
.jr-no-selection h2{font-size:17px;margin:0 0 6px}.jr-no-selection p{font-size:12px;color:#838aa0;line-height:1.9;max-width:320px;margin:0}
.jr-log-placeholder{display:flex;gap:12px;padding:17px;border-radius:15px;background:#faf9ff;border:1px dashed #d6d1f5;margin:14px 0 20px}
.jr-log-placeholder>span{flex:0 0 36px;width:36px;height:36px;display:grid;place-items:center;background:#eeeaff;color:#685dc7;border-radius:11px;font-size:20px}
.jr-log-placeholder b{display:block;font-size:13px;color:#343d5c;margin:0 0 5px}.jr-log-placeholder p{font-size:12px;line-height:2;color:#737b93;margin:0}
.jr-review-form{display:flex;flex-direction:column;gap:10px}
.jr-review-form textarea{resize:vertical;min-height:130px;line-height:1.9}
.jr-form-note,.jr-last-reviewed{font-size:11px;line-height:1.8;color:#838ba0;margin:0}
.jr-form-actions{display:flex;flex-wrap:wrap;gap:9px;margin-top:5px}
.jr-btn-soft{background:#fff!important;border:1px solid #d7d2fa!important;color:#5e52bd!important;box-shadow:none!important}
.jr-feedback-list{display:grid;gap:12px}.jr-feedback-card{padding:17px}.jr-feedback-head{display:flex;align-items:center;justify-content:space-between;gap:10px}.jr-feedback-card p{white-space:pre-wrap;line-height:2;color:#525d78;font-size:13px;margin:12px 0}.jr-feedback-card small{font-size:10px;color:#9299aa}
@media(max-width:850px){.jr-review-layout{grid-template-columns:1fr}.jr-student-list{max-height:400px}.jr-filters{grid-template-columns:1fr 1fr}.jr-search-label{grid-column:1/-1}}
@media(max-width:520px){.jr-filters{grid-template-columns:1fr}.jr-search-label{grid-column:auto}.jr-incomplete-card{padding:16px;gap:11px}.jr-incomplete-icon{width:38px;height:38px;flex-basis:38px}.jr-student-card{gap:7px;padding:8px}.jr-status-pill{font-size:9px;padding:4px 6px}.jr-form-actions .btn{width:100%;justify-content:center}}

/* ============================================================
   Hamlass visual refresh — calm lavender, deep navy and mint
   CSS-only refresh: preserves page logic, API calls and D1 bindings.
   ============================================================ */

html{background:var(--bg)}
body{background:radial-gradient(ellipse at 6% 8%,rgba(129,119,255,.09),transparent 26%),radial-gradient(ellipse at 95% 92%,rgba(24,168,143,.07),transparent 26%),var(--bg);color:var(--ink)}
button,a,input,select,textarea{transition-duration:.18s}
::selection{background:#dcd9ff;color:#292263}

/* More polished app navigation */
.sidebar{width:270px;padding:23px 15px 17px;background:linear-gradient(160deg,#18233f 0%,#202650 49%,#18203a 100%);box-shadow:10px 0 38px rgba(22,31,62,.11)}
.sidebar:before{content:"";position:absolute;pointer-events:none;top:175px;right:-94px;width:220px;height:220px;border:1px solid rgba(171,164,255,.1);border-radius:50%;box-shadow:0 0 0 23px rgba(171,164,255,.025),0 0 0 49px rgba(171,164,255,.018)}
.sidebar:after{content:"";position:absolute;pointer-events:none;bottom:115px;left:-100px;width:190px;height:190px;border:1px solid rgba(73,214,190,.1);border-radius:50%;box-shadow:0 0 0 24px rgba(73,214,190,.025)}
.sidebar>*{position:relative;z-index:1}
.brand{padding:5px 8px 23px;border-bottom-color:rgba(255,255,255,.09)}
.brand-mark{border-radius:16px;background:linear-gradient(140deg,#8c83ff 0%,#6257e8 58%,#27b69b 140%);box-shadow:0 10px 25px rgba(91,81,225,.32);font-size:23px}
.brand-copy strong{letter-spacing:-.5px}
.nav-caption{color:#8e9abb;letter-spacing:.7px}
#nav .nav-links{gap:7px}
#nav .nav-links a{min-height:49px;padding:9px 10px;border-radius:14px}
#nav .nav-links a .nav-icon{width:33px;height:33px;flex-basis:33px;border-radius:11px;background:rgba(255,255,255,.065);color:#c8d0f0}
#nav .nav-links a .nav-label{font-size:12px;letter-spacing:-.1px}
#nav .nav-links a.on{background:linear-gradient(105deg,rgba(111,101,255,.31),rgba(38,177,153,.11));border-color:rgba(171,165,255,.20);box-shadow:inset -3px 0 #8b83ff,0 7px 18px rgba(0,0,0,.08)}
#nav .nav-links a.on .nav-icon{background:linear-gradient(145deg,#796df5,#5c51df);box-shadow:0 5px 14px rgba(91,81,225,.25)}
.sidebar-note{background:linear-gradient(135deg,rgba(255,255,255,.065),rgba(255,255,255,.025));border-color:rgba(255,255,255,.1);border-radius:17px}
.sidebar-user{border-top-color:rgba(255,255,255,.1)}
.user-avatar{background:linear-gradient(140deg,#baf0e3,#c5c1ff);color:#283658;border-radius:14px}
#out{border-radius:12px}
.workspace{margin-inline-start:270px}
.topbar{min-height:75px;padding-inline:clamp(20px,3.7vw,45px);background:rgba(255,255,255,.82);border-bottom-color:rgba(224,229,241,.76);box-shadow:0 3px 18px rgba(36,45,87,.025)}
#mb{border-radius:13px;background:linear-gradient(180deg,#fff,#f6f7ff)}
.breadcrumbs strong{font-weight:900;letter-spacing:-.25px}
.system-state{padding:7px 12px;background:#e9f9f4;border-color:#d2f1e7;color:#157e6c}
.top-avatar{border-radius:13px;background:linear-gradient(140deg,#efedff,#dff8f1);color:#5c52cb}
main{padding-top:30px}
.app-footer{color:#99a2b6;letter-spacing:.1px}

/* Unified page headings, cards and buttons */
#main>h1,.page-head h1{color:#202943;letter-spacing:-.85px}
#main>h1:after,.page-head h1:after{width:54px;height:4px;background:linear-gradient(90deg,#6d61ee,#2eb99f);margin-top:12px}
.page-eyebrow{color:#655ae2;letter-spacing:.1px}
.page-hero{border:1px solid rgba(255,255,255,.14);border-radius:25px;background:linear-gradient(116deg,#252b5a 0%,#5148cd 58%,#3c9e98 125%);box-shadow:0 16px 36px rgba(63,69,160,.17);padding:27px 30px}
.page-hero:after{left:-38px;top:-90px;width:250px;height:250px;border-color:rgba(255,255,255,.16);box-shadow:0 0 0 24px rgba(255,255,255,.035),0 0 0 54px rgba(255,255,255,.025)}
.page-hero .hero-kicker{color:#d8ddff}
.page-hero p{color:#e1e8fb;line-height:1.95}
.hero-symbol{border-radius:22px;background:linear-gradient(145deg,rgba(255,255,255,.2),rgba(255,255,255,.075));border-color:rgba(255,255,255,.22);box-shadow:inset 0 1px rgba(255,255,255,.15),0 10px 26px rgba(14,20,63,.09)}
.grid{gap:15px}
.card,.stat{border-color:#e5e9f3;border-radius:21px;box-shadow:0 7px 23px rgba(34,43,86,.045)}
.card{padding:22px;transition:transform .18s ease,border-color .18s ease,box-shadow .18s ease}
.card:hover{border-color:#dadcf4;box-shadow:0 14px 32px rgba(34,43,86,.075)}
.stat{border-top-width:4px;border-radius:20px;min-height:120px;padding:19px 20px 18px;background:linear-gradient(160deg,#fff 0%,#fbfcff 100%)}
.stat b{color:#252e4c;font-size:32px;letter-spacing:-1px}
.stat:after{background:linear-gradient(135deg,#6358e8,#18a88f);opacity:.05}
.section-heading{margin-top:30px;margin-bottom:17px}
.section-heading h2{font-size:19px;letter-spacing:-.4px;color:#25304f}
.card-heading{gap:12px}
.mini-icon{border-radius:14px}
.mini-icon.purple{background:#efedff;color:#6257e8}
.mini-icon.mint{background:#e4f8f2;color:#168e7c}
.mini-icon.amber{background:#fff3df;color:#a9711a}
.btn,.card button{min-height:44px;border-radius:13px;background:linear-gradient(115deg,#6358e8,#7169ef 62%,#4d9fbe 145%);box-shadow:0 7px 16px rgba(86,76,211,.16);letter-spacing:-.1px}
.btn:hover,.card button:hover{box-shadow:0 10px 22px rgba(86,76,211,.22);filter:saturate(1.06);transform:translateY(-2px)}
.btn:disabled,.card button:disabled{opacity:.65;transform:none;cursor:wait}
.btn.secondary,.btn.outline{background:#fff;color:#5f56ce;border:1px solid #dcd9fa;box-shadow:none}
input,select,textarea{border-color:#e0e5f0;background:#fcfdff;border-radius:13px;color:#202943}
input:hover,select:hover,textarea:hover{border-color:#c9c8f4;background:#fff}
input:focus,select:focus,textarea:focus{border-color:#8f86f2;box-shadow:0 0 0 4px rgba(99,88,232,.095)}
label{color:#596681}
.tw{border-color:#e4e8f3;border-radius:19px;box-shadow:0 8px 25px rgba(34,43,86,.05)}
table{border-color:#e7eaf3}
th{background:#f1f1ff;color:#5a568f;border-bottom-color:#e2e3fa}
td select{border-radius:10px}
tbody tr:hover td{background:#f7f8ff}
.empty-card{border-color:#d9ddf1;background:linear-gradient(145deg,#fff,#fafaff);border-radius:20px}
.empty-card>span{background:linear-gradient(145deg,#efedff,#e3f8f2);color:#6257e8;border-radius:16px}
#toast{background:linear-gradient(120deg,#22284e,#393878);border-radius:15px;box-shadow:0 15px 45px rgba(24,31,65,.22)}
#toast.bad{background:linear-gradient(120deg,#9f2f4b,#c24b65)}

/* Login: crisp, welcoming, mobile-first */
.auth-page{background:radial-gradient(ellipse at 12% 8%,rgba(128,119,255,.18),transparent 29%),radial-gradient(ellipse at 91% 91%,rgba(35,190,158,.12),transparent 25%),#f3f5fb}
.auth-layout{border-radius:30px;border-color:rgba(224,228,243,.96);box-shadow:0 30px 95px rgba(32,42,88,.15)}
.auth-brand-panel{background:linear-gradient(148deg,#1c2546 0%,#33357b 52%,#6258dd 100%)}
.auth-brand-panel:before{border-color:rgba(255,255,255,.13);box-shadow:0 0 0 29px rgba(255,255,255,.035),0 0 0 66px rgba(255,255,255,.025)}
.auth-brand .brand-mark{border-radius:16px;background:linear-gradient(145deg,rgba(255,255,255,.25),rgba(255,255,255,.1));border-color:rgba(255,255,255,.24)}
.auth-promo .pill{background:rgba(255,255,255,.105);border-color:rgba(255,255,255,.17);color:#e5e5ff}
.auth-promo h2{letter-spacing:-1px;line-height:1.55}
.auth-highlight span:first-child{background:rgba(64,218,185,.16);color:#a1f5df}
.auth-panel h1{letter-spacing:-.9px}
.tabs{background:#f2f3fb;border-color:#e9ebf5;border-radius:15px}
.tabs button{border-radius:11px}
.tabs .on{color:#4e47bd;box-shadow:0 4px 12px rgba(41,46,91,.08)}
.auth-panel input{min-height:50px}
.auth-panel .btn{border-radius:14px;min-height:51px}
.auth-legal{line-height:1.9}

/* Attendance: replace the old heavy gold accents with softer lilac/mint */
.att-hero{border-color:#e0e4fb;border-radius:26px;background:radial-gradient(circle at 80% 0%,rgba(93,88,230,.08),transparent 30%),linear-gradient(115deg,#fbfbff 0%,#f1f1ff 52%,#e9faf5 100%);box-shadow:0 15px 34px rgba(44,54,117,.07)}
.att-kicker{border-color:#e0dcff;background:#fff;color:#5c54c9}
.att-hero h1{color:#242e4c}
.att-current-date{border-color:#e3e5f5;color:#5d5a9e;background:rgba(255,255,255,.88)}
.att-hero-art{background:linear-gradient(145deg,#5046c7,#202a50 90%);box-shadow:0 14px 28px rgba(43,42,118,.2)}
.att-hero-art span{color:#95f0d9;border-color:rgba(255,255,255,.82)}
.att-panel{border-color:#e5e9f3;border-radius:22px;background:linear-gradient(150deg,#fff 0%,#fdfdff 100%);box-shadow:0 8px 25px rgba(34,43,86,.045)}
.att-controls label,.att-bulk-toolbar label{color:#596681}
.att-controls input,.att-controls select,.att-bulk-toolbar select{border-color:#e0e5f0;background:#fcfdff}
.att-section-title h2,.att-section-head h2,.att-panel-heading h2{color:#25304f}
.att-section-mark{background:#efedff;border-color:#e2dfff;color:#6257d5;border-radius:14px}
.att-selected-day{color:#5a53c7;background:#f1efff;border-color:#e2dfff}
.att-daybar{background:#fbfbff;border-color:#e4e6f5;border-radius:20px;padding:8px;box-shadow:inset 0 1px 0 #fff}
.att-day-btn{background:#f1f3fa;color:#6d7891;border-radius:14px;min-height:55px}
.att-day-btn span{background:#fff;color:#6258cf;border:1px solid #e9e6ff}
.att-day-btn:hover{background:#efedff;border-color:#e3dfff}
.att-day-btn.active{background:linear-gradient(135deg,#6258e8,#3f478e);border-color:#5d55d5;box-shadow:0 8px 18px rgba(85,76,205,.19)}
.att-day-btn.active span{background:#bdf3e4;border-color:#bdf3e4;color:#275b58}
.att-heading-symbol{background:#efedff;color:#6257d5;border-radius:15px}
.att-heading-symbol.clock{background:#e8f0ff;color:#3c65a5}
.att-heading-symbol.chart{background:#e3f8f0;color:#168866}
.att-heading-symbol.download{background:#efedff;color:#6257bd}
.att-mini-tag{background:#e9f8f2;border-color:#d5f1e6;color:#16816e}
.att-bulk textarea{border-color:#e0e5f0;background:#fcfdff}
.att-bulk-toolbar select{background:#fcfdff}
.att-btn{border-radius:12px}
.att-btn-primary{background:linear-gradient(120deg,#5147c9,#323c7a);box-shadow:0 6px 14px rgba(67,61,166,.16)}
.att-btn-gold{background:#eae7ff;color:#5147bd;border-color:#d8d3ff}
.att-btn-green{background:#198a76;color:#fff}
.att-btn-outline{background:#fff;color:#596681;border-color:#e1e5f0}
.att-extra-tools{border-top-color:#e5e7f2}
.att-extra-tools summary{color:#6258c8}
.att-time-grid label{color:#596681}
.att-time-grid input{background:#fcfdff;border-color:#e0e5f0}
.att-legend{border-color:#e4e8f3;background:#fafbff;border-radius:15px}
.att-table-shell{border-color:#e0e5f3;border-radius:21px;box-shadow:0 9px 28px rgba(34,43,86,.06);scrollbar-color:#cfcff0 transparent}
.att-table th{background:linear-gradient(135deg,#efedff,#e6f7f2);color:#4d4b91;border-bottom-color:#deddfa}
.att-table th.att-sticky-name{background:linear-gradient(135deg,#e7e5ff,#ddf6ef)}
.att-table td{border-bottom-color:#edf0f7}
.att-table tbody tr:nth-child(even) td{background:#fafbff}
.att-table tbody tr:hover td{background:#f3f3ff}
.att-table td.att-sticky-name{background:#f7f6ff;border-left-color:#e5e2fa}
.att-student-name>span{background:#eeecff;color:#6258d1}
.att-status-select{border-radius:11px}
.att-download-section{background:linear-gradient(145deg,#fff 0%,#fbfaff 60%,#f4fbf8 100%)}
.att-download-card{border-color:#e5e8f3;border-radius:17px;box-shadow:0 3px 10px rgba(35,43,85,.02)}
.att-download-card.highlight{background:linear-gradient(130deg,#f0eeff,#eaf9f4);border-color:#dfdef6}
.att-download-icon{background:#efedff;color:#6257d5;border-radius:13px}
.att-download-card:nth-child(2n) .att-download-icon{background:#e4f8f1;color:#18896f}
.att-download-card:nth-child(3n) .att-download-icon{background:#eaf0ff;color:#4264b0}

/* Journal review should feel calm and approachable */
.jr-incomplete-card{border-color:#e1e2f7;background:linear-gradient(120deg,#fcfbff,#f0fbf7);border-radius:22px;box-shadow:0 8px 25px rgba(34,43,86,.04)}
.jr-incomplete-icon{background:linear-gradient(145deg,#efedff,#e2f8f1);color:#6258d5;border-radius:16px}
.jr-count{background:#efedff;color:#6257d5}
.jr-students-panel,.jr-detail-panel{border-radius:21px}
.jr-student-card{border-color:#e6e9f3;border-radius:15px}
.jr-student-card.active{border-color:#bcb5fb;background:linear-gradient(110deg,#f2f0ff,#f3fbf8);box-shadow:inset -3px 0 #6e62e7}
.jr-student-avatar{background:#efedff;color:#5f55c9;border-radius:13px}
.jr-no-selection>span{background:linear-gradient(145deg,#efedff,#e4f8f1);color:#6257d5;border-radius:21px}
.jr-log-placeholder{background:linear-gradient(120deg,#faf9ff,#f5fcf9);border-color:#dedbf8;border-radius:17px}
.jr-log-placeholder>span{background:#efedff;color:#6257d5;border-radius:12px}
.jr-btn-soft{background:#fff!important;border-color:#dcd8fa!important;color:#5e52bd!important}

/* Smaller polish points and responsive comfort */
#navbackdrop{backdrop-filter:blur(4px)}
.nav-switch-link{border-color:rgba(187,177,255,.24);background:linear-gradient(135deg,rgba(112,95,196,.24),rgba(29,155,132,.13));border-radius:15px}
.preview-return{background:#efedff;color:#5c52c8;border:1px solid #e0dcff}
.user-preview-card{border-radius:20px;background:linear-gradient(115deg,#f4f1ff,#f0fbf7);border-color:#e5e2f7}
.preview-card-icon{background:linear-gradient(145deg,#e8e4ff,#dff7ef);color:#6257d5;border-radius:16px}
@media(max-width:1050px){.sidebar{width:250px}.workspace{margin-inline-start:250px}}
@media(max-width:760px){
  .sidebar{width:min(290px,86vw);padding:20px 14px 16px}
  .workspace{margin-inline-start:0}
  main{padding:23px 16px 34px}
  .topbar{padding-inline:15px}
  .page-hero{padding:22px 20px;border-radius:21px;gap:14px}
  .page-hero .hero-symbol{width:53px;height:53px;flex-basis:53px;border-radius:17px}
  .card{padding:17px;border-radius:18px}
  .stat{min-height:103px;padding:15px;border-radius:17px}
  .stat b{font-size:27px}
  .att-hero{padding:20px;border-radius:21px;min-height:0}
  .att-hero-art{width:78px;height:78px;flex-basis:78px;border-radius:23px}
  .att-hero-art span{width:43px;height:43px;border-radius:14px;font-size:27px}
  .att-controls{grid-template-columns:repeat(2,minmax(0,1fr))}
  .att-daybar{gap:5px;padding:6px}
  .att-day-btn{flex-direction:column;gap:4px;min-height:57px;padding:5px 1px}
  .att-day-btn span{width:22px;height:22px;font-size:9px}
  .att-day-btn b{font-size:10px}
  .att-panel{padding:16px;border-radius:18px}
  .att-time-grid{grid-template-columns:repeat(2,minmax(0,1fr))}
  .att-download-grid{grid-template-columns:1fr}
}
@media(max-width:430px){
  main{padding-inline:13px}
  .page-hero{padding:18px 16px}
  .page-hero h1{font-size:22px}
  .page-hero p{max-width:100%;font-size:11px}
  .hero-symbol{display:none}
  .att-hero{align-items:flex-start;gap:10px;padding:17px}
  .att-hero h1{font-size:23px}
  .att-hero-art{width:53px;height:53px;flex-basis:53px;border-radius:16px;transform:rotate(-4deg)}
  .att-hero-art span{width:31px;height:31px;border-radius:10px;font-size:20px}
  .att-hero-art i{width:44px;height:44px}.att-hero-art b{width:61px;height:61px}
  .att-controls{grid-template-columns:1fr}
  .att-section-title,.att-section-head{align-items:flex-start}
  .att-selected-day{max-width:125px;white-space:normal;text-align:center}
  .att-action-grid .att-btn{flex:1 1 calc(50% - 8px)}
  .auth-layout{border-radius:22px}
  .auth-brand-panel{border-radius:0}
}
@media(prefers-reduced-motion:reduce){.card,.att-btn,.att-day-btn,.att-download-card{transition:none!important}}


/* ============================================================
   HAMCLASS UI POLISH 03 — restored indigo / lavender palette
   Design decisions: prioritize daily attendance actions, reduce
   destructive-action prominence, and keep touch targets readable.
   Visual/layout only: existing IDs, APIs, roles and D1 logic retained.
   ============================================================ */

html,body{background:var(--bg);color:var(--ink)}
body{background:linear-gradient(180deg,#f6f7fc 0%,#f1f4fb 100%)}
::selection{background:#dcd9ff;color:#28226f}
:focus-visible{outline:3px solid rgba(81,72,229,.38);outline-offset:3px}

/* Clear visual hierarchy: navy navigation, lavender active state */
.sidebar{background:linear-gradient(165deg,#20294d 0%,#18213f 48%,#171e37 100%);box-shadow:7px 0 28px rgba(24,32,63,.09)}
.brand-mark{background:linear-gradient(140deg,#8077ff,#5148e5 65%,#3d37bf);color:#fff;box-shadow:0 7px 17px rgba(81,72,229,.27)}
#nav .nav-links a.on{background:linear-gradient(110deg,rgba(109,100,255,.30),rgba(109,100,255,.12));border-color:rgba(154,147,255,.19);box-shadow:inset -3px 0 #8f87ff}
#nav .nav-links a.on .nav-icon{background:#5b52e6;color:#fff}
.nav-switch-link{border-color:rgba(187,177,255,.25);background:linear-gradient(135deg,rgba(112,95,196,.22),rgba(29,155,132,.10));border-radius:14px}
.nav-switch-link:hover{background:rgba(116,101,198,.27)}
.nav-switch-icon{background:rgba(183,170,255,.19)}
.preview-notice{border-color:rgba(250,210,127,.3);background:rgba(251,220,144,.09)}
.topbar{background:rgba(255,255,255,.9);border-bottom-color:rgba(224,229,241,.85);box-shadow:0 3px 15px rgba(36,45,87,.025)}
.system-state{background:#eaf9f5;color:#14816f;border:1px solid #d3f2ea}
.system-state:before{background:#18b99c}
.top-avatar{background:var(--brand-soft);color:var(--brand)}

/* Cards: lighter edges and a consistent rhythm */
.card,.stat,.att-panel,.jr-students-panel,.jr-detail-panel{border-color:#e4e8f3;box-shadow:0 5px 18px rgba(34,43,86,.035)}
.card,.stat,.att-panel{border-radius:18px}
.card{padding:20px;transition:border-color .16s,box-shadow .16s,transform .16s}
.card:hover{border-color:#d5d4f4;box-shadow:0 10px 24px rgba(34,43,86,.06)}
.stat{border-top-color:var(--accent,var(--brand));border-radius:17px}
.page-hero{background:linear-gradient(115deg,#f3f1ff 0%,#f5f7ff 56%,#edf9f6 100%);border:1px solid #e4e2fa;box-shadow:0 8px 24px rgba(34,43,86,.035);border-radius:20px}
.page-hero h1,#main>h1,.page-head h1{color:#252e4c}
.page-hero p,.page-head p{color:#727d96}
.page-hero:after{opacity:.22}

/* Shared controls: predictable height and subtle, high-contrast states */
input,select,textarea{border-color:#dfe4f0;background:#fcfdff;border-radius:11px;color:#26304c}
input:hover,select:hover,textarea:hover{border-color:#c8cdef}
input:focus,select:focus,textarea:focus{border-color:#8981f1;box-shadow:0 0 0 3px rgba(81,72,229,.09);background:#fff}
.btn,.card button{min-height:44px;border-radius:11px;background:linear-gradient(120deg,#5e54df,#766af0);box-shadow:0 5px 13px rgba(81,72,229,.13);transition:transform .15s,box-shadow .15s,background .15s}
.btn:hover,.card button:hover{box-shadow:0 8px 18px rgba(81,72,229,.18);transform:translateY(-1px)}
.btn:active,.card button:active{transform:translateY(0)}
.btn.secondary,.btn.outline{background:#fff;border:1px solid #dcd9fa;color:#5f56ce;box-shadow:none}
.btn.secondary:hover,.btn.outline:hover{background:#f5f3ff;border-color:#c9c4f6;box-shadow:none}
.btn.danger,.danger-btn{background:#d9485f;color:#fff}

/* Attendance: one focused task path, visible day selection, clear status colors */
.att-hero{border:1px solid #e0e4fb;border-radius:22px;background:radial-gradient(circle at 80% 0%,rgba(93,88,230,.075),transparent 30%),linear-gradient(115deg,#fbfbff 0%,#f1f1ff 52%,#e9faf5 100%);box-shadow:0 10px 26px rgba(44,54,117,.045)}
.att-kicker{border-color:#e0dcff;background:#fff;color:#5c54c9}
.att-hero h1{color:#242e4c}
.att-current-date{background:rgba(255,255,255,.88);border-color:#e3e5f5;color:#5d5a9e}
.att-hero-art{transform:none;background:linear-gradient(145deg,#5046c7,#202a50 90%);box-shadow:0 10px 22px rgba(43,42,118,.15);border-radius:23px}
.att-hero-art span{color:#95f0d9}
.att-panel{padding:20px;border-radius:18px;background:#fff;border:1px solid #e5e9f3;box-shadow:0 5px 18px rgba(34,43,86,.035)}
.att-controls label,.att-bulk-toolbar label,.att-time-grid label{color:#596681;font-size:11px;font-weight:800}
.att-controls input,.att-controls select,.att-bulk-toolbar select,.att-time-grid input{min-height:44px;border-radius:10px;border-color:#e0e5f0;background:#fcfdff;font-size:12px}
.att-section-title h2,.att-section-head h2,.att-panel-heading h2{color:#25304f}
.att-section-title p,.att-section-head p,.att-panel-heading p{color:#858da4}
.att-section-mark{background:#efedff;border-color:#e2dfff;color:#6257d5;border-radius:12px}
.att-selected-day{color:#5a53c7;background:#f1efff;border-color:#e2dfff;border-radius:9px}
.att-daybar{background:#fbfbff;border-color:#e4e6f5;border-radius:15px;padding:7px;gap:8px}
.att-day-btn{background:#f1f3fa;color:#6d7891;border-radius:11px;min-height:52px;border-color:transparent}
.att-day-btn span{background:#fff;color:#6258cf;border:1px solid #e9e6ff;border-radius:8px}
.att-day-btn:hover{background:#efedff;border-color:#e3dfff;transform:translateY(-1px)}
.att-day-btn.active{background:linear-gradient(135deg,#6258e8,#3f478e);border-color:#5d55d5;box-shadow:0 5px 12px rgba(85,76,205,.15);color:#fff}
.att-day-btn.active span{background:#bdf3e4;border-color:#bdf3e4;color:#275b58}
.att-heading-symbol{background:#efedff;color:#6257d5;border-radius:12px}
.att-heading-symbol.clock{background:#e8f0ff;color:#3c65a5}
.att-heading-symbol.chart{background:#e3f8f0;color:#168866}
.att-heading-symbol.download{background:#efedff;color:#6257bd}
.att-mini-tag{background:#e9f8f2;border-color:#d5f1e6;color:#16816e;border-radius:7px}
.att-bulk textarea{border-color:#e0e5f0;background:#fcfdff;border-radius:12px}
.att-bulk-toolbar{grid-template-columns:minmax(0,1fr) minmax(180px,.7fr);gap:13px}

/* Prioritize everyday actions. Riskier mass changes move under <details>. */
.att-action-grid.att-primary-actions{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px;margin-top:15px}
.att-action-grid.att-primary-actions .att-btn{width:100%;min-height:47px;padding:10px 13px;font-size:11px;line-height:1.65;white-space:normal;border-radius:11px}
.att-btn{min-height:43px;padding:9px 13px;border-radius:10px;font-size:11px;line-height:1.55;font-weight:850;box-shadow:none;transition:background .15s,border-color .15s,box-shadow .15s,transform .15s}
.att-btn:hover{filter:none;transform:translateY(-1px);box-shadow:0 4px 11px rgba(48,47,105,.08)}
.att-btn:disabled{opacity:.52;box-shadow:none;transform:none}
.att-btn-primary{background:linear-gradient(120deg,#5147c9,#323c7a);border-color:#5147c9;color:#fff;box-shadow:0 5px 12px rgba(67,61,166,.14)}
.att-btn-primary:hover{background:linear-gradient(120deg,#453cb9,#2a356e)}
.att-btn-gold{background:#efedff;color:#5147bd;border-color:#d8d3ff}
.att-btn-gold:hover{background:#e6e3ff}
.att-btn-green{background:#198a76;color:#fff;border-color:#198a76}
.att-btn-green:hover{background:#117862}
.att-btn-red{background:#fff0f1;color:#b93549;border-color:#f2cbd1}
.att-btn-red:hover,.att-btn-softred:hover,.att-btn-danger:hover{background:#ffe4e8;border-color:#efb6c1;color:#a52e42}
.att-btn-softred,.att-btn-danger{background:#fff4f5;color:#b73549;border:1px solid #f3d1d6}
.att-btn-outline{background:#fff;color:#596681;border-color:#e1e5f0}
.att-btn-outline:hover{background:#f5f4ff;border-color:#d6d2fa;color:#5148b9}
.att-extra-tools{margin-top:14px;padding:12px 14px;border:1px solid #e6e7f3;border-radius:13px;background:#fbfbff}
.att-extra-tools[open]{background:#f8f7ff;border-color:#dcd8f8}
.att-extra-tools summary{cursor:pointer;display:flex;align-items:center;gap:8px;color:#6258c8;font-size:11px;font-weight:900;min-height:30px}
.att-extra-tools summary::marker{color:#776bed}
.att-extra-actions{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:9px;margin-top:12px}
.att-extra-actions .att-btn{width:100%;min-height:42px;white-space:normal}
.att-tool-note{color:#8992a8;line-height:1.8}
.att-time-grid input{border-radius:10px}
.att-time-actions{gap:10px}
.att-time-actions>span{color:#828ba0;line-height:1.8}

/* Table: neutral unrecorded option; colors are reserved for actual statuses */
.att-legend{border-color:#e4e8f3;background:#fafbff;border-radius:12px;padding:10px 12px}
.att-table-shell{border-color:#e0e5f3;border-radius:16px;box-shadow:0 7px 22px rgba(34,43,86,.045);scrollbar-color:#cfcff0 transparent}
.att-table{min-width:720px;font-size:11px}
.att-table th{background:linear-gradient(135deg,#efedff,#e6f7f2);color:#4d4b91;border-bottom-color:#deddfa;padding:12px 9px}
.att-table th.att-sticky-name{background:linear-gradient(135deg,#e7e5ff,#ddf6ef)}
.att-table td{border-bottom-color:#edf0f7;padding:8px}
.att-table tbody tr:nth-child(even) td{background:#fafbff}
.att-table tbody tr:hover td{background:#f3f3ff}
.att-table td.att-sticky-name{background:#f7f6ff;border-left-color:#e5e2fa}
.att-student-name>span{background:#eeecff;color:#6258d1}
.att-status-select{width:100%;min-width:82px;min-height:42px;padding:7px 9px;border:1px solid #e1e4ec;border-radius:10px;background:#f5f6fa;color:#737b8d;font:inherit;font-size:10px;font-weight:900;text-align:center;cursor:pointer;outline:none;color-scheme:light;transition:border-color .15s,box-shadow .15s,background .15s}
.att-status-select:focus{border-color:#8b7bdd;box-shadow:0 0 0 3px rgba(118,102,200,.14)}
.att-status-select.status-present{background:#dcf5e8;border-color:#b9e8cd;color:#18734d}
.att-status-select.status-absent{background:#fff0ef;border-color:#f3cbc9;color:#bd4147}
.att-status-select.status-late{background:#fff1d4;border-color:#f3dfb2;color:#9a6412}
.att-status-select.status-review{background:#eef0f5;border-color:#dce0e8;color:#666d7e}
.att-status-select.status-excused{background:#e6f2ff;border-color:#c8def4;color:#2d6797}
.att-status-select.status-leave{background:#f0eaff;border-color:#d9cef9;color:#7153b6}
.att-status-select.status-sick{background:#ddf5f2;border-color:#bde7e1;color:#087a75}
.att-status-select.status-unrecorded{border-style:dashed;background:#f5f6fa;color:#858b9a}
.att-stats .att-stat-card{border-radius:12px;background:#fff;border-color:#e0e7f3;box-shadow:none}
.att-week-chart,.att-week-report{border-color:#e0e5f3;border-radius:15px;background:#fff}
.att-bar-track{background:#eaf0f7}
.att-bar{background:linear-gradient(180deg,#7169ef,#5148e5)}
.att-chart-col.selected{background:#f2f0ff;border-color:#e2defc}
.att-download-section{margin-top:22px;background:linear-gradient(145deg,#fff 0%,#fbfaff 60%,#f4fbf8 100%)}
.att-download-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:11px;margin-top:15px}
.att-download-card{display:flex;align-items:center;gap:11px;min-width:0;min-height:70px;padding:13px;border:1px solid #e5e8f3;border-radius:13px;background:#fff;text-align:right;cursor:pointer;transition:transform .15s,box-shadow .15s,border-color .15s;color:#303a55;font-family:inherit}
.att-download-card:hover{transform:translateY(-2px);border-color:#d7d0f5;box-shadow:0 7px 17px rgba(57,49,103,.07)}
.att-download-card.highlight{background:linear-gradient(130deg,#f0eeff,#eaf9f4);border-color:#dfdbf4}
.att-download-card>span:nth-child(2){display:flex;flex:1;flex-direction:column;gap:4px;min-width:0}
.att-download-card strong{font-size:11px;font-weight:900}
.att-download-card small{font-size:9px;color:#9095a6;font-weight:700;line-height:1.6}
.att-download-card>b{font-size:18px;color:#7565c6}
.att-download-icon{display:grid;place-items:center;flex:0 0 37px;width:37px;height:37px;border-radius:10px;background:#efedff;color:#6c5bbd;font-size:17px;font-weight:900}
.att-download-card:nth-child(2n) .att-download-icon{background:#e7f7ef;color:#1b8b63}
.att-download-card:nth-child(3n) .att-download-icon{background:#eaf0ff;color:#4264b0}
.att-download-section .att-tool-note{margin-top:13px;line-height:1.8}
.att-bottom-actions{gap:10px}
.att-bottom-actions #attMessage{color:#7c869e;font-size:11px}

/* Journal review: make selection, status and feedback visually distinct */
.jr-incomplete-card{border-color:#e1e2f7;background:linear-gradient(120deg,#fcfbff,#f0fbf7);border-radius:18px;box-shadow:0 5px 18px rgba(34,43,86,.035)}
.jr-incomplete-icon{background:linear-gradient(145deg,#efedff,#e2f8f1);color:#6258d5;border-radius:13px}
.jr-students-panel,.jr-detail-panel{border-radius:17px;background:#fff}
.jr-student-card{border-color:#e6e9f3;border-radius:12px}
.jr-student-card:hover{border-color:#c1bcfa;background:#fbfaff}
.jr-student-card.active{border-color:#bcb5fb;background:linear-gradient(110deg,#f2f0ff,#f3fbf8);box-shadow:inset -3px 0 #6e62e7}
.jr-student-avatar{background:#efedff;color:#5f55c9;border-radius:10px}
.jr-approved{background:#e7f8ee;color:#15784b}.jr-revision{background:#fff0e7;color:#b25320}.jr-pending{background:#f0f2f7;color:#747d93}
.jr-log-placeholder{background:linear-gradient(120deg,#faf9ff,#f5fcf9);border-color:#dedbf8;border-radius:13px}
.jr-log-placeholder>span{background:#efedff;color:#6257d5;border-radius:10px}
.jr-btn-soft{background:#fff!important;border-color:#dcd8fa!important;color:#5e52bd!important;box-shadow:none!important}
.nav-switch-link{border-color:rgba(187,177,255,.25);background:linear-gradient(135deg,rgba(112,95,196,.22),rgba(29,155,132,.10))}
.preview-return{background:#efedff;color:#5c52c8;border:1px solid #e0dcff}
.user-preview-card{border-radius:17px;background:linear-gradient(115deg,#f4f1ff,#f0fbf7);border-color:#e5e2f7}
.preview-card-icon{background:linear-gradient(145deg,#e8e4ff,#dff7ef);color:#6257d5;border-radius:13px}

/* Responsive behavior: tablet gets two action columns; narrow phones get one */
@media(max-width:1050px){
  .att-controls{grid-template-columns:repeat(2,minmax(0,1fr))}
  .att-action-grid.att-primary-actions{grid-template-columns:repeat(2,minmax(0,1fr))}
  .att-extra-actions{grid-template-columns:repeat(2,minmax(0,1fr))}
  .att-download-grid{grid-template-columns:repeat(2,minmax(0,1fr))}
}
@media(max-width:760px){
  .att-panel{padding:16px;border-radius:16px}
  .att-controls{grid-template-columns:repeat(2,minmax(0,1fr));gap:10px}
  .att-daybar{gap:5px;padding:5px;border-radius:13px}
  .att-day-btn{min-height:56px;flex-direction:column;gap:4px;padding:5px 2px}
  .att-day-btn span{width:23px;height:23px;font-size:9px}
  .att-day-btn b{font-size:10px}
  .att-primary-actions{grid-template-columns:repeat(2,minmax(0,1fr))!important}
  .att-primary-actions .att-btn{min-height:49px}
  .att-extra-actions{grid-template-columns:repeat(2,minmax(0,1fr))}
  .att-download-grid{grid-template-columns:repeat(2,minmax(0,1fr))}
  .att-download-card{padding:11px;gap:8px}
  .att-download-icon{width:32px;height:32px;flex-basis:32px}
  .att-time-grid{grid-template-columns:repeat(2,minmax(0,1fr))}
  .att-table-actions{width:100%}
  .att-table-actions .att-btn{flex:1}
  .att-bottom-actions{align-items:stretch;flex-direction:column}
  .user-preview-card{align-items:flex-start;flex-wrap:wrap}
  .user-preview-card .btn{width:100%;justify-content:center}
}
@media(max-width:430px){
  main{padding-inline:13px}
  .att-hero{align-items:flex-start;gap:10px;padding:17px}
  .att-hero h1{font-size:22px}
  .att-hero p{font-size:10px}
  .att-hero-art{width:53px;height:53px;flex-basis:53px;border-radius:15px}
  .att-hero-art span{width:31px;height:31px;border-radius:10px;font-size:20px}
  .att-hero-art i{width:44px;height:44px}.att-hero-art b{width:61px;height:61px}
  .att-controls{grid-template-columns:1fr}
  .att-primary-actions{grid-template-columns:1fr!important}
  .att-extra-actions{grid-template-columns:1fr}
  .att-download-grid{grid-template-columns:1fr}
  .att-section-head{align-items:flex-start;flex-direction:column}
  .att-selected-day{max-width:145px;white-space:normal;text-align:center}
  .att-table .att-sticky-name{min-width:190px}
  .att-student-name{min-width:175px}
  .att-status-select{min-width:66px;padding:6px 4px;font-size:9px}
  .att-stats{grid-template-columns:repeat(2,minmax(0,1fr))}
  .att-bulk-toolbar{grid-template-columns:1fr}
  .att-mini-tag{display:none}
  .jr-form-actions .btn{width:100%;justify-content:center}
}
@media(prefers-reduced-motion:reduce){.card,.btn,.att-btn,.att-day-btn,.att-download-card{transition:none!important}}
@media print{
 .sidebar,.topbar,.app-footer,#navbackdrop,.att-bulk,.att-time,.att-table-actions,.att-controls,.att-daybar,.att-extra-tools,.att-bottom-actions,#attClearDay{display:none!important}
 .workspace{margin:0!important}main{padding:0!important}.att-hero{min-height:0;box-shadow:none;padding:15px;margin-bottom:12px}.att-hero-art{display:none}
 .att-table-shell{overflow:visible;box-shadow:none}.att-table{min-width:0;font-size:8pt}.att-table td,.att-table th{padding:4px}.att-status-select{min-width:0;min-height:0;padding:2px 3px;font-size:7pt}
 .att-stats{grid-template-columns:repeat(7,minmax(0,1fr))}.att-week-report{break-inside:avoid}.att-download-section,.user-preview-card,.nav-switch-link,.preview-notice,.preview-return{display:none!important}
}

/* Owner-only administrator management page */
.admin-manage-shortcut{display:flex;align-items:center;gap:14px;padding:17px 20px;margin:0 0 18px;text-decoration:none;border-color:#dedcff;background:linear-gradient(110deg,#fbfaff,#f4fbfa);color:inherit}
.admin-manage-shortcut .mini-icon{margin:0;flex:0 0 40px}
.admin-manage-copy{display:flex;flex-direction:column;gap:3px;min-width:0;flex:1}
.admin-manage-copy b{color:#303957;font-size:13px}
.admin-manage-copy small{color:#7e88a0;font-size:10px;line-height:1.8}
.admin-manage-arrow{color:var(--brand);font-size:22px;font-weight:900}
.admin-count-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:13px;margin:0 0 18px}
.admin-count{display:flex;align-items:center;gap:12px;min-width:0;padding:17px 18px;background:#fff;border:1px solid var(--line);border-radius:17px;box-shadow:var(--shadow-soft)}
.admin-count>span:last-child{display:flex;flex-direction:column;gap:1px}
.admin-count b{font-size:25px;line-height:1.35;color:#252f4d}
.admin-count small{font-size:10px;color:#8791a8}
.admin-count-icon{width:39px;height:39px;flex:0 0 39px;display:grid;place-items:center;border-radius:13px;font-size:18px;font-weight:900}
.admin-count-icon.owner,.row-number.owner{background:#f1edff;color:#6452c4}
.admin-count-icon.regular,.row-number.regular{background:#e7f7f2;color:#13846e}
.admin-count-icon.full,.row-number.full{background:#eaf0ff;color:#4762bd}
.admin-manage-layout{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr);gap:17px;align-items:start}
.admin-manage-layout .card{margin:0;height:100%}
.admin-create-panel .btn{width:100%;margin-top:17px}
.admin-create-panel .field-note{display:block;color:#9aa3b7;font-size:10px;font-weight:500;margin-top:3px}
.admin-safety-panel{background:linear-gradient(160deg,#fff,#faf9ff)}
.admin-safety-panel p{font-size:11px;line-height:2;color:#6e7891;margin:9px 0 15px}
.admin-filter{grid-template-columns:minmax(0,.9fr) minmax(0,1.1fr)}
.admin-filter .filter-help{grid-column:auto;border:0;padding:0;align-self:center}
.admin-table-wrap{margin-top:0}
.admin-table-wrap table{min-width:790px}
.admin-table-wrap td{vertical-align:middle}
.admin-role-pill{display:inline-flex;align-items:center;padding:6px 10px;border-radius:9px;font-size:10px;font-weight:900;white-space:nowrap}
.admin-role-pill.owner{background:#f1edff;color:#6250be}
.admin-role-pill.regular{background:#e6f7f1;color:#13836d}
.admin-role-pill.full{background:#edf0ff;color:#4a5db7}
.admin-role-pill.scoped{background:#f2efff;color:#6b55b5}
.delivery-note{padding:12px 14px;border:1px solid #d9d5ff;background:#f6f4ff;color:#504a83;border-radius:12px;font-size:13px;line-height:1.9}
.admin-role-editor{display:flex;align-items:center;gap:7px;min-width:235px}
.admin-role-editor select{margin:0;min-height:37px;padding:6px 8px;font-size:11px;min-width:122px}
.admin-actions{display:flex;align-items:center;gap:6px;min-width:215px}
.btn.small-action{min-height:35px!important;margin:0!important;padding:6px 10px!important;border-radius:9px!important;font-size:10px!important;white-space:nowrap}
.btn.secondary{background:#f0efff!important;color:#5449c5!important;border:1px solid #e0ddff!important;box-shadow:none!important}
.btn.danger{background:#fff0f2!important;color:#b72d48!important;border:1px solid #f4d5dc!important;box-shadow:none!important}
.protected-note{font-size:10px;color:#929bb0;font-weight:700}
.admin-id-note{display:block;margin-top:2px;color:#a0a8b8;font-size:9px}
.admin-mobile-hint{display:none;color:#8a94aa;font-size:10px;margin:5px 3px 15px}
@media(max-width:850px){.admin-manage-layout{grid-template-columns:1fr}.admin-count-grid{gap:9px}.admin-count{padding:14px}}
@media(max-width:650px){.admin-count-grid{grid-template-columns:1fr 1fr}.admin-count:first-child{grid-column:1/-1}.admin-filter{grid-template-columns:1fr}.admin-filter .filter-help{padding-top:9px;border-top:1px solid #edf0f7}.admin-mobile-hint{display:block}.admin-manage-shortcut{align-items:flex-start;padding:14px}.admin-count b{font-size:22px}}

/* Added student roster, class responsibilities, lesson/task and exam screens */
.form-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:14px 18px;align-items:end}
.form-grid .span-two{grid-column:1/-1}
.form-grid .form-submit{display:flex;gap:10px;flex-wrap:wrap;align-items:center}
.form-grid input,.form-grid select,.form-grid textarea,.class-name-form input{width:100%;min-width:0}
.student-create,.class-name-tools,.role-map-settings{margin-bottom:20px}
.class-name-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:12px}
.class-name-form{display:grid;gap:10px;align-content:start;padding:14px;border:1px solid var(--line,#e6e7f0);border-radius:16px;background:var(--surface,#fff)}
.student-actions,.record-actions{display:flex;align-items:center;gap:7px;flex-wrap:wrap}
.account-sub{display:block;color:var(--muted,#697386);font-size:.78rem;margin-top:5px}
.modal-backdrop{position:fixed;inset:0;z-index:9999;background:rgba(24,29,58,.56);backdrop-filter:blur(4px);display:flex;align-items:center;justify-content:center;padding:18px;overflow:auto}
.modal-card{position:relative;width:min(540px,100%);max-height:92vh;overflow:auto;background:#fff;border:1px solid #e7e8f4;border-radius:24px;padding:26px;box-shadow:0 24px 80px #14193938;color:#242746}
.modal-card h2{font-size:1.25rem;margin:0 0 7px}.modal-card label{display:grid;gap:7px;font-weight:700;margin:14px 0}.modal-card input,.modal-card select{width:100%;min-height:43px;padding:10px 12px;border:1px solid #d9dced;border-radius:12px;background:#fbfbff;color:#242746}
.modal-help{color:#667085;line-height:1.9;margin:0 0 14px}.modal-x{position:absolute;top:11px;left:12px;background:#f1f1fa;border:0;border-radius:12px;width:34px;height:34px;font-size:1.5rem;cursor:pointer}.modal-actions{display:flex;gap:10px;flex-wrap:wrap;justify-content:flex-start;margin-top:20px}.modal-warning{background:#fff7e8;color:#815516;border:1px solid #f7dfad;padding:12px;border-radius:12px;line-height:1.8;font-size:.88rem}
.records-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:16px;margin-top:16px}.record-card{padding:19px;display:flex;flex-direction:column;gap:12px;min-width:0}.record-card h3{margin:0;font-size:1.08rem;color:#26294c;overflow-wrap:anywhere}.record-card p{margin:0;line-height:1.9;color:#58617a;white-space:pre-wrap;overflow-wrap:anywhere}.record-top,.record-bottom{display:flex;justify-content:space-between;align-items:center;gap:10px;flex-wrap:wrap}.record-bottom{padding-top:12px;margin-top:auto;border-top:1px solid #ececf4;color:#687087;font-size:.86rem}.record-kind{display:inline-flex;align-items:center;padding:5px 10px;border-radius:99px;font-size:.78rem;font-weight:800;background:#eeebff;color:#4e43bd}.record-kind.lesson{background:#e2f6ed;color:#167453}.record-kind.exam{background:#fff0df;color:#9b5a11}.record-date{font-size:.82rem;color:#67718b;background:#f6f7fc;padding:6px 10px;border-radius:10px}.empty-state{padding:28px;text-align:center;color:#697386}
.feature-shortcut-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:14px;margin:20px 0}.feature-shortcut{display:flex;flex-direction:column;gap:8px;padding:19px;text-decoration:none;color:inherit;transition:transform .18s,box-shadow .18s}.feature-shortcut:hover{transform:translateY(-2px);box-shadow:0 14px 34px #262c581a}.feature-shortcut b{color:#252849}.feature-shortcut small{line-height:1.75;color:#70788d}.student-feature-links{grid-template-columns:repeat(2,minmax(0,1fr))}
.form-hint{font-size:.86rem;line-height:1.85;color:#747b91;margin:10px 0 0}.info-card{margin-top:16px;padding:17px 20px}.info-card p{margin:8px 0 0;color:#67708a;line-height:1.9}
.role-classes{display:grid;gap:18px;margin-top:18px}.responsibility-class{overflow:hidden}.responsibility-class-head{display:flex;justify-content:space-between;align-items:center;gap:14px;padding:18px 20px}.responsibility-class-head h2{margin:3px 0 0;font-size:1.15rem}.responsibility-class .tw{margin:0 14px 16px;border-radius:14px}.responsibility-class table{width:100%;border-collapse:collapse;min-width:620px}.responsibility-class th{background:#f0eeff;color:#393675;text-align:right;padding:12px}.responsibility-class td{padding:12px;border-bottom:1px solid #eeeef5;vertical-align:top;line-height:1.95}.responsibility-class td:first-child{white-space:nowrap;width:22%;color:#30345b}.mapped-name{display:inline-block;background:#e5f7ef;color:#176b4c;border-radius:9px;padding:2px 8px;margin:3px 0;font-weight:700}.mapping-ambiguous{display:inline-block;background:#fff1dc;color:#8b5a0a;border-radius:9px;padding:2px 7px;margin:3px 0}.mapping-unresolved{display:inline-block;background:#f7e9ec;color:#a12f4b;border-radius:9px;padding:2px 7px;margin:3px 0}.mapping-note{display:block;color:#8b5b20;font-size:.76rem;line-height:1.65}.student-row .admin-id-note{display:block;font-size:.75rem;color:#7e8498;margin-top:4px}
@media(max-width:760px){.form-grid{grid-template-columns:1fr}.form-grid .span-two{grid-column:auto}.class-name-grid{grid-template-columns:1fr}.records-grid{grid-template-columns:1fr}.feature-shortcut-grid,.student-feature-links{grid-template-columns:1fr}.modal-card{padding:22px 17px}.responsibility-class-head{align-items:flex-start;flex-direction:column}.student-actions .btn{flex:1}.record-card{padding:16px}}
.reg-code-cell{display:inline-flex;align-items:center;gap:6px;flex-wrap:wrap}.reg-code-cell code{padding:4px 7px;border-radius:8px;background:#f1f0ff;color:#4439a4;font-size:.8rem}.tiny-copy{padding:4px 8px!important;min-height:28px!important;font-size:.75rem!important}


/* Explicit class-mapping inventory; prevents silently inferred class assignment. */
.class-map-inventory{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:10px;margin:12px 0 18px}
.class-map-chip{display:flex;flex-direction:column;gap:5px;padding:12px 14px;border:1px solid #e3e1f6;border-radius:13px;background:#faf9ff;min-width:0}
.class-map-chip b{font-size:.92rem;color:#292b54;overflow-wrap:anywhere}
.class-map-chip small{font-size:.78rem;color:#767b93}
@media(max-width:760px){.class-map-inventory{grid-template-columns:1fr}.class-map-chip{padding:11px 12px}}

/* Shared visual polish — consistent contrast, spacing and reusable controls. */

body{background:var(--bg);color:var(--ink)}
#main>h1:after,.page-head h1:after{background:linear-gradient(90deg,var(--brand),#a8a3ff)}
.card,.stat{border-color:var(--line);border-radius:18px;box-shadow:var(--shadow-soft)}
.card{transition:border-color .18s ease,box-shadow .18s ease}
.card:hover{transform:none;box-shadow:var(--shadow);border-color:#d8dcf4}
label{font-size:13px;color:#59657e}
input,select,textarea{font-size:14px;border-color:#dfe4f0;background:#fcfcff;border-radius:12px}
.btn,.card button{min-height:44px;font-size:13px;border-radius:11px;background:var(--brand);box-shadow:none}
.btn:hover,.card button:hover{background:var(--brand-dark);box-shadow:0 4px 12px rgba(81,72,229,.12);transform:translateY(-1px)}
.card div button{background:#f1efff;color:#4f46c9;border-color:#e5e1ff}
.card div button:hover{background:#e8e5ff}
th{font-size:12px}td{font-size:13px}
@media(max-width:760px){main{padding:22px 15px 32px}.card{padding:17px;border-radius:17px}.btn{min-height:44px}}


/* ============================================================
   HAMLASS REDESIGN — Digital Academy meets Pro Dashboard
   Visual layer only: API contracts, page IDs, roles and D1 remain intact.
   Lightweight CSS 3D geometry is used instead of heavy remote imagery.
   ============================================================ */
html{scroll-behavior:smooth;background:var(--bg)}
body{
  background:
    radial-gradient(ellipse at 2% 0%,rgba(115,102,255,.09),transparent 25%),
    radial-gradient(ellipse at 98% 100%,rgba(33,183,156,.065),transparent 26%),
    linear-gradient(180deg,#f7f8fe 0%,var(--bg) 60%,#f5f7fc 100%);
  color:var(--ink);
  font-family:"Vazirmatn","IRANSansX",Tahoma,"Segoe UI",sans-serif;
}
body:has(.app-layout){background-image:radial-gradient(circle at 1px 1px,rgba(89,86,159,.035) 1px,transparent 0),linear-gradient(180deg,#f7f8fe 0%,#f3f5fb 100%);background-size:22px 22px,auto}
::selection{background:#ddd9ff;color:#2a246d}
:focus-visible{outline:3px solid rgba(98,85,237,.48);outline-offset:3px}
button,input,select,textarea{accent-color:var(--brand)}

/* Navigation shell */
.sidebar{
  width:272px;padding:23px 16px 18px;isolation:isolate;
  background:linear-gradient(158deg,#171f42 0%,#202858 47%,#28225d 100%);
  box-shadow:10px 0 36px rgba(21,27,65,.13);border-inline-end:1px solid rgba(255,255,255,.07)
}
.sidebar:before{content:"";position:absolute;z-index:-1;left:-100px;top:28%;width:230px;height:230px;border:1px solid rgba(193,187,255,.10);border-radius:44%;transform:rotate(32deg);box-shadow:0 0 0 22px rgba(255,255,255,.018),0 0 0 52px rgba(255,255,255,.012);pointer-events:none}
.brand{padding-bottom:22px;border-bottom-color:rgba(255,255,255,.095)}
.brand-mark{
  position:relative;isolation:isolate;transform:perspective(420px) rotateY(-12deg) rotateX(8deg);
  border:1px solid rgba(255,255,255,.28);border-radius:15px 15px 18px 13px;
  background:linear-gradient(145deg,#9d94ff 0%,#6b5cf1 38%,#4439c7 100%);
  box-shadow:0 9px 0 #342a9c,0 15px 24px rgba(8,12,45,.30),inset 0 1px rgba(255,255,255,.6);
  text-shadow:0 2px 0 rgba(31,26,110,.28)
}
.brand-mark:after{content:"";position:absolute;inset:5px;border:1px solid rgba(255,255,255,.23);border-radius:10px;pointer-events:none}
.brand-copy strong{letter-spacing:-.5px}
.brand-copy small{color:#bdc5e5}
.nav-caption{font-size:10px;letter-spacing:.6px;color:#939ec6;padding-top:24px}
.nav-links{gap:5px}
#nav .nav-links a{min-height:47px;border-radius:13px;color:#c5cde8;gap:11px;padding-inline:10px;transition:background .2s ease,border-color .2s ease,transform .2s ease,color .2s ease}
#nav .nav-links a .nav-icon{border-radius:10px;background:rgba(255,255,255,.075);color:#d8dcff;box-shadow:inset 0 1px rgba(255,255,255,.06)}
#nav .nav-links a:hover{background:rgba(255,255,255,.07);border-color:rgba(255,255,255,.07);transform:translateX(-2px)}
#nav .nav-links a.on{background:linear-gradient(110deg,rgba(125,111,255,.29),rgba(88,82,205,.15));border-color:rgba(177,168,255,.25);box-shadow:inset -3px 0 #a59cff,0 7px 18px rgba(8,12,43,.12)}
#nav .nav-links a.on .nav-icon{background:linear-gradient(145deg,#8a80ff,#5548db);color:#fff;box-shadow:0 5px 12px rgba(6,9,42,.22),inset 0 1px rgba(255,255,255,.3)}
.sidebar-note{background:linear-gradient(135deg,rgba(255,255,255,.075),rgba(255,255,255,.025));border-color:rgba(192,185,255,.16);box-shadow:inset 0 1px rgba(255,255,255,.055)}
.sidebar-user{border-top-color:rgba(255,255,255,.12)}
.user-avatar{background:linear-gradient(145deg,#d8d2ff,#b7f1e5);color:#34316c;box-shadow:0 5px 15px rgba(5,9,35,.2),inset 0 1px rgba(255,255,255,.7)}
#out{border-radius:11px;transition:background .18s,border-color .18s,transform .18s}
#out:hover{transform:translateY(-1px)}
.workspace{min-width:0}
.topbar{min-height:72px;padding:13px clamp(20px,3.2vw,42px);background:rgba(255,255,255,.86);border-bottom:1px solid rgba(221,226,242,.82);box-shadow:0 4px 18px rgba(31,38,87,.035);backdrop-filter:blur(18px) saturate(140%)}
.breadcrumbs{gap:10px;color:#9aa3b8}
.breadcrumbs>span:first-child{font-weight:700;color:#858eaa}
.breadcrumbs strong{font-size:13px;color:#252d4f}
.system-state{background:#e7faf4;color:#147966;border:1px solid #caefe5;padding:7px 11px;border-radius:99px;font-size:10px}
.system-state:before{width:7px;height:7px;box-shadow:0 0 0 4px rgba(33,183,156,.13)}
.top-avatar{background:linear-gradient(145deg,#eeebff,#daf7ef);border:1px solid #e0defe;box-shadow:0 3px 10px rgba(45,45,112,.06)}
#mb{border-color:#e3e5f4;box-shadow:0 4px 12px rgba(34,39,92,.06)}
main{padding:30px clamp(20px,3.2vw,42px) 40px}
.app-footer{color:#929bb1;padding-top:20px}

/* Page headers with modest layered 3D geometry */
#main>h1,.page-head h1{color:#202849;font-size:clamp(23px,2vw,30px);letter-spacing:-.55px}
#main>h1:after,.page-head h1:after{width:52px;height:4px;background:linear-gradient(90deg,#6c5cf1,#27bea3);margin-top:12px}
.page-head{margin-bottom:25px;align-items:center}
.page-head p{font-size:12px;line-height:1.9}
.page-eyebrow{color:#6358d8;letter-spacing:.1px}
.page-hero{
  isolation:isolate;min-height:150px;padding:27px 29px;margin-bottom:23px;border:1px solid rgba(255,255,255,.17);border-radius:24px;
  background:radial-gradient(circle at 7% 14%,rgba(155,146,255,.28),transparent 23%),linear-gradient(116deg,#1e264c 0%,#303578 52%,#6457e9 100%);
  box-shadow:0 18px 38px rgba(42,43,118,.16),inset 0 1px rgba(255,255,255,.16);color:#fff
}
.page-hero:before{
  content:"";position:absolute;z-index:0;left:98px;top:calc(50% - 52px);width:94px;height:94px;border-radius:23px;
  border:1px solid rgba(255,255,255,.32);background:linear-gradient(145deg,rgba(255,255,255,.32),rgba(156,145,255,.12) 46%,rgba(31,215,185,.16));
  transform:perspective(650px) rotateX(55deg) rotateY(-18deg) rotateZ(42deg);
  box-shadow:12px 13px 0 rgba(183,177,255,.10),19px 22px 32px rgba(8,12,46,.22),inset 0 1px rgba(255,255,255,.52);pointer-events:none
}
.page-hero:after{
  content:"";position:absolute;z-index:0;left:34px;top:50%;width:55px;height:55px;border-radius:50%;transform:translateY(-50%);
  background:radial-gradient(circle at 27% 22%,#fff 0,#d9d3ff 7%,#9288ff 27%,#5a4ede 56%,#252b67 100%);
  border:1px solid rgba(255,255,255,.42);box-shadow:inset -10px -12px 18px rgba(21,24,76,.42),inset 5px 5px 13px rgba(255,255,255,.3),0 15px 26px rgba(7,11,43,.25),0 0 0 10px rgba(255,255,255,.045);pointer-events:none
}
.page-hero .hero-copy{z-index:2;max-width:min(720px,83%)}
.page-hero .hero-kicker{color:#cfcaff;font-size:11px;letter-spacing:.15px}
.page-hero h1{color:#fff;font-size:clamp(24px,2.2vw,31px);line-height:1.45}
.page-hero p{color:#e2e5ff;font-size:12px;line-height:2;max-width:620px}
.hero-symbol{z-index:2;width:68px;height:68px;flex-basis:68px;border-radius:21px;background:linear-gradient(145deg,rgba(255,255,255,.22),rgba(255,255,255,.075));border:1px solid rgba(255,255,255,.28);box-shadow:0 12px 24px rgba(9,12,47,.19),inset 0 1px rgba(255,255,255,.34);transform:perspective(520px) rotateY(-10deg) rotateX(6deg);font-size:29px;text-shadow:0 2px 0 rgba(27,24,90,.25)}
.compact-hero{min-height:126px;padding-block:22px}
.compact-hero:before{width:76px;height:76px;left:106px;top:calc(50% - 42px)}
.compact-hero:after{width:43px;height:43px;left:50px}

/* Cards, stats and content surfaces */
.card,.stat{border:1px solid var(--line);border-radius:var(--radius);background:linear-gradient(160deg,#fff 0%,#fff 75%,#fcfbff 100%);box-shadow:var(--shadow-soft)}
.card{transition:border-color .2s ease,box-shadow .2s ease,transform .2s ease}
.card:hover{border-color:#d8d4ff;box-shadow:0 12px 30px rgba(37,42,102,.085)}
.card.done{opacity:.68}
.card p{color:#606b84;line-height:1.95}
.card>b,.card>strong{color:#232c4c}
.grid{gap:14px}
.stat{position:relative;isolation:isolate;overflow:hidden;min-height:108px;padding:17px 19px;border-top:1px solid var(--line);border-inline-start:3px solid var(--brand);gap:10px}
.stat:before{content:"";position:absolute;z-index:-1;left:-7px;top:-20px;width:75px;height:75px;border-radius:24px;transform:rotate(32deg);background:linear-gradient(145deg,rgba(107,91,239,.11),rgba(37,183,156,.055));box-shadow:8px 9px 0 rgba(106,94,213,.035)}
.stat:after{width:46px;height:46px;left:9px;bottom:-27px;opacity:.045}
.stat b{font-size:clamp(25px,2vw,31px);color:#222b4c}

/* Buttons and form controls */
label{color:#56617e;font-size:12px;font-weight:800;line-height:1.7}
input,select,textarea{min-height:45px;border:1px solid #e0e4f1;border-radius:13px;background:#fbfcff;color:var(--ink);font-size:13px;box-shadow:inset 0 1px 1px rgba(31,39,90,.018);transition:border-color .18s,box-shadow .18s,background .18s}
input:hover,select:hover,textarea:hover{border-color:#c8c5fb;background:#fff}
input:focus,select:focus,textarea:focus{border-color:#8478f0;background:#fff;box-shadow:var(--focus-ring);outline:none}
input::placeholder,textarea::placeholder{color:#9ca5b9}
.btn,.card button{min-height:44px;padding:10px 17px;border:1px solid rgba(255,255,255,.12);border-radius:12px;background:linear-gradient(135deg,#6b5cf1 0%,#5144d5 55%,#4038b7 100%);color:#fff;font-size:12px;font-weight:850;box-shadow:0 7px 15px rgba(82,69,208,.18),inset 0 1px rgba(255,255,255,.2);transition:transform .18s,box-shadow .18s,filter .18s}
.btn:hover,.card button:hover{filter:brightness(1.035);transform:translateY(-1px);box-shadow:0 10px 22px rgba(82,69,208,.23),inset 0 1px rgba(255,255,255,.22)}
.btn:active,.card button:active{transform:translateY(0)}
.btn:disabled,.card button:disabled{opacity:.52;cursor:not-allowed;transform:none;box-shadow:none}
.btn.secondary,.btn.danger{box-shadow:none}
.btn.secondary{background:#f0eeff!important;color:#5144bb!important;border:1px solid #ddd8ff!important}
.btn.danger{background:#fff0f3!important;color:#b8334d!important;border:1px solid #f0d1d9!important}
.card div button{background:#f1efff;color:#5145c5;border-color:#e0dcff;box-shadow:none}
.card div button:hover{background:#e9e5ff;box-shadow:0 4px 11px rgba(83,69,199,.08)}
.err{color:#be334c;background:#fff3f5;border-inline-start:3px solid #df687b;padding:7px 10px;border-radius:8px}
.success{color:#147b68}

/* Tables and status pills */
.tw,.att-table-shell{border:1px solid #e2e6f3;border-radius:17px;background:#fff;box-shadow:0 9px 25px rgba(33,40,93,.05);scrollbar-color:#c5c3ef transparent}
table{font-size:12px}
th{background:linear-gradient(135deg,#f0eeff,#eef9f6);color:#4f4d87;border-bottom:1px solid #e1defa;font-size:11px;letter-spacing:.05px;padding:13px 14px}
th:first-child{border-top-right-radius:0}th:last-child{border-top-left-radius:0}
td{color:#404b68;padding:12px 14px;border-bottom-color:#eef0f7}
tbody tr:nth-child(even) td{background:#fbfbff}
tbody tr:hover td{background:#f3f2ff}
td select{border-radius:10px;min-height:40px}
.chip{box-shadow:inset 0 1px rgba(255,255,255,.24);letter-spacing:.05px}
.empty,.empty-state{color:#7e88a1}

/* Reusable small icons and record cards */
.mini-icon{position:relative;border-radius:14px;box-shadow:inset 0 1px rgba(255,255,255,.7),0 4px 9px rgba(40,43,100,.045)}
.mini-icon.purple{background:linear-gradient(145deg,#f3f0ff,#e7e5ff);color:#594bd1}
.mini-icon.mint{background:linear-gradient(145deg,#eafbf5,#d8f5ec);color:#158b77}
.mini-icon.amber{background:linear-gradient(145deg,#fff6e9,#ffebd1);color:#a96b1d}
.feature-shortcut,.overview-card,.record-card{border-radius:19px}
.feature-shortcut{position:relative;isolation:isolate;overflow:hidden;border-color:#e6e6f4;background:linear-gradient(145deg,#fff 0%,#fff 72%,#f8f7ff 100%)}
.feature-shortcut:after{content:"";position:absolute;z-index:-1;width:80px;height:80px;left:-26px;bottom:-35px;border-radius:23px;transform:rotate(32deg);background:linear-gradient(145deg,rgba(105,91,234,.085),rgba(30,187,157,.06))}
.feature-shortcut:hover{transform:translateY(-3px);border-color:#d3ceff;box-shadow:var(--shadow-lift)}
.record-card{border-color:#e5e8f3;background:linear-gradient(160deg,#fff,#fdfcff)}
.record-kind{box-shadow:inset 0 1px rgba(255,255,255,.65)}
.modal-backdrop{background:rgba(19,24,59,.57);backdrop-filter:blur(7px)}
.modal-card{border-color:#e4e3f6;border-radius:23px;box-shadow:0 28px 90px rgba(15,20,57,.25)}
.modal-x{background:#f1efff;color:#574bc3}

/* Journal review and responsibility mapping */
.jr-incomplete-card{background:linear-gradient(120deg,#fcfbff,#f0fbf7);border-color:#e1def9}
.jr-student-card.active{background:linear-gradient(110deg,#f1efff,#eefaf6);border-color:#b7afff;box-shadow:inset -3px 0 #6b5bec,0 5px 16px rgba(68,58,177,.06)}
.jr-student-avatar,.jr-no-selection>span,.jr-log-placeholder>span{box-shadow:inset 0 1px rgba(255,255,255,.7),0 4px 10px rgba(54,47,124,.06)}
.responsibility-class{border-radius:20px;border-color:#e4e5f3;background:linear-gradient(160deg,#fff,#fdfdff)}
.responsibility-class-head{background:linear-gradient(110deg,#fbfaff,#f0faf7);border-bottom:1px solid #e8e7f5}
.responsibility-class .tw{box-shadow:none}
.class-map-chip{border-radius:15px;background:linear-gradient(145deg,#fcfbff,#f0faf7);border-color:#e2e2f4}
.mapped-name{box-shadow:inset 0 1px rgba(255,255,255,.7)}
.mapping-ambiguous{background:#fff4df;color:#87570c}
.mapping-unresolved{background:#fff0f2;color:#a52e4a}

/* Attendance page: balanced operations and 3D cube motif */
.att-hero{
  border:1px solid rgba(255,255,255,.16);border-radius:24px;min-height:166px;padding:28px 30px;
  background:radial-gradient(circle at 5% 15%,rgba(150,143,255,.28),transparent 25%),linear-gradient(116deg,#1e264d 0%,#33367d 54%,#6155e9 100%);
  box-shadow:0 17px 38px rgba(42,43,118,.15),inset 0 1px rgba(255,255,255,.13);color:#fff
}
.att-hero:before{content:"";position:absolute;z-index:-1;left:117px;top:12px;width:100px;height:100px;border-radius:27px;border:1px solid rgba(255,255,255,.28);background:linear-gradient(145deg,rgba(255,255,255,.28),rgba(151,143,255,.08) 50%,rgba(34,206,172,.13));transform:perspective(640px) rotateX(57deg) rotateY(-22deg) rotateZ(42deg);box-shadow:12px 14px 0 rgba(172,167,255,.10),18px 24px 30px rgba(9,12,46,.2),inset 0 1px rgba(255,255,255,.5);pointer-events:none}
.att-hero:after{inset-inline-end:65px;top:-115px;width:250px;height:250px;border-color:rgba(255,255,255,.11);box-shadow:0 0 0 24px rgba(255,255,255,.025),0 0 0 52px rgba(255,255,255,.017)}
.att-hero-copy{z-index:2}
.att-kicker{background:rgba(255,255,255,.1);border-color:rgba(255,255,255,.21);color:#e2dfff;backdrop-filter:blur(8px)}
.att-hero h1{color:#fff;letter-spacing:-.55px}
.att-hero p{color:#e0e3ff}
.att-current-date{background:rgba(255,255,255,.11);border-color:rgba(255,255,255,.18);color:#f5f5ff;backdrop-filter:blur(8px)}
.att-hero-art{z-index:1;isolation:isolate;transform:perspective(600px) rotateY(-13deg) rotateX(9deg) rotateZ(-4deg);background:linear-gradient(145deg,rgba(255,255,255,.22),rgba(255,255,255,.075));border-color:rgba(255,255,255,.33);box-shadow:0 12px 25px rgba(8,12,46,.2),inset 0 1px rgba(255,255,255,.34)}
.att-hero-art span{position:relative;z-index:1;background:linear-gradient(145deg,#968bff,#5d51e1 55%,#3a367e);border:1px solid rgba(255,255,255,.62);box-shadow:0 7px 0 #322c90,0 12px 19px rgba(9,12,46,.24),inset 0 1px rgba(255,255,255,.5);transform:translateY(-3px) rotate(-5deg)}
.att-hero-art i{width:72px;height:72px;border:1px solid rgba(255,255,255,.2)}
.att-hero-art b{width:105px;height:105px;border:1px solid rgba(255,255,255,.11)}
.att-panel{border-radius:19px;border-color:#e3e7f3;box-shadow:0 8px 23px rgba(32,39,91,.045)}
.att-controls{gap:12px 15px}
.att-controls label,.att-bulk-toolbar label,.att-time-grid label{font-size:12px;color:#515e7b}
.att-controls input,.att-controls select,.att-bulk-toolbar select,.att-time-grid input{border-radius:12px;background:#fcfcff}
.att-section-mark{background:linear-gradient(145deg,#f5f2ff,#e5e5ff);border-color:#dedbff;color:#5e50d6;box-shadow:inset 0 1px white,0 4px 9px rgba(56,47,135,.035)}
.att-section-title h2,.att-section-head h2,.att-panel-heading h2{color:#222b4b;letter-spacing:-.2px}
.att-section-title p,.att-section-head p,.att-panel-heading p{font-size:11px;color:#7b859d}
.att-daybar{border-radius:17px;background:rgba(255,255,255,.84);border-color:#e1e5f2;box-shadow:0 5px 14px rgba(34,40,91,.025)}
.att-day-btn{background:#f5f6fc;border-color:transparent;border-radius:12px;min-height:54px}
.att-day-btn span{box-shadow:inset 0 1px white,0 2px 5px rgba(52,44,136,.05)}
.att-day-btn.active{background:linear-gradient(135deg,#6c5df0,#4540b9);border-color:#5a4fdb;box-shadow:0 8px 16px rgba(78,65,201,.22),inset 0 1px rgba(255,255,255,.2)}
.att-panel-heading{gap:13px}
.att-heading-symbol{border-radius:14px;box-shadow:inset 0 1px white,0 5px 10px rgba(38,43,103,.055)}
.att-mini-tag{border-radius:99px;background:#e8faf4;border-color:#d1f1e7;color:#16816f}
.att-table-shell{border-radius:18px}
.att-table{min-width:720px}
.att-table th{background:linear-gradient(135deg,#efedff,#e8f8f3);color:#4e4a88;padding:13px 10px}
.att-table td{padding:9px 8px}
.att-table tbody tr:nth-child(even) td{background:#fbfbff}
.att-table tbody tr:hover td{background:#f2f1ff}
.att-table td.att-sticky-name{background:#f7f6ff}
.att-status-select{min-height:41px;border-radius:11px;font-size:11px;transition:border-color .16s,box-shadow .16s,transform .16s}
.att-status-select:focus{box-shadow:var(--focus-ring)}
.att-status-select.status-unrecorded{border-style:dashed}
.att-stats .att-stat-card{border-radius:15px;box-shadow:0 5px 13px rgba(35,40,95,.035)}
.att-week-chart,.att-week-report{border-radius:17px;border-color:#e2e6f3}
.att-bar{background:linear-gradient(180deg,#8a7df8 0%,#5d50e6 70%,#3e50b0 100%);box-shadow:0 3px 9px rgba(81,72,229,.16)}
.att-download-section{border-radius:21px;background:linear-gradient(145deg,#fff 0%,#fcfbff 66%,#f1fbf7 100%)}
.att-download-card{border-radius:15px;border-color:#e4e7f4;box-shadow:0 4px 12px rgba(38,44,102,.025)}
.att-download-card:hover{border-color:#cfc9ff;box-shadow:0 11px 23px rgba(54,48,129,.09);transform:translateY(-2px)}
.att-download-card.highlight{background:linear-gradient(135deg,#f1efff,#eafaf4);border-color:#ded9fb}
.att-download-icon{box-shadow:inset 0 1px white,0 4px 10px rgba(48,45,130,.06)}
.att-extra-tools{border-radius:15px;background:#fbfbff;border-color:#e2e3f3}
.att-extra-tools[open]{background:#f8f7ff;border-color:#d7d1ff}
.att-btn{border-radius:11px;min-height:43px;font-size:12px}
.att-btn-primary{background:linear-gradient(135deg,#6b5cf1,#4338c1);box-shadow:0 6px 14px rgba(80,67,205,.17)}
.att-btn-green{background:linear-gradient(135deg,#1db89a,#16866f);box-shadow:0 6px 13px rgba(20,150,124,.14)}
.att-btn:focus-visible,.att-day-btn:focus-visible,.att-download-card:focus-visible{outline:3px solid rgba(98,85,237,.45);outline-offset:2px}
.att-time,.att-week-report,.att-download-section{background-image:linear-gradient(145deg,#fff,rgba(248,247,255,.9))}

/* =====================================================================
   HAMLASS — FRESH EDITORIAL REDESIGN
   New visual direction: paper, ink, teal and saffron.
   Intentionally replaces the previous purple-gradient / glass / 3D look.
   Application logic, DOM hooks and API contracts remain unchanged.
   ===================================================================== */
html{scroll-behavior:smooth;background:var(--bg)}
body{background:var(--bg);color:var(--ink);font-family:Tahoma,"Segoe UI",sans-serif}
::selection{background:#cce9df;color:#173b37}
:focus-visible{outline:3px solid rgba(23,111,103,.44);outline-offset:3px}

/* Responsive application frame: grid on desktop, full-width workspace on mobile. */
.app-layout{display:grid!important;grid-template-columns:264px minmax(0,1fr)!important;align-items:stretch;direction:rtl;min-height:100vh;width:100%;max-width:100%;overflow:clip}
.sidebar{position:sticky!important;top:0;grid-column:1;grid-row:1;width:264px!important;height:100vh;min-height:100vh;inset:auto!important;transform:none!important;padding:22px 15px 16px!important;overflow-x:hidden;overflow-y:auto;background:#fff!important;color:var(--ink)!important;border-inline-start:1px solid var(--line);box-shadow:none!important;border-radius:0!important}
.sidebar::before,.sidebar::after{content:none!important;display:none!important}
.sidebar>*{position:relative;z-index:1}
.brand{gap:11px;padding:4px 7px 20px;border-bottom:1px solid var(--line);text-decoration:none}
.brand-mark{width:43px;height:43px;flex:0 0 43px;border-radius:12px!important;background:var(--brand)!important;color:#fff!important;box-shadow:none!important;font-size:20px}
.brand-copy strong{font-size:17px;color:var(--ink);letter-spacing:-.35px}
.brand-copy small{color:var(--muted);font-size:10px}
.nav-caption{padding:23px 11px 9px;color:#87948f;letter-spacing:.4px;font-size:10px}
.nav-links{gap:4px}
#nav .nav-links a{min-height:45px;padding:7px 9px;gap:10px;border-radius:10px;border:1px solid transparent;color:#5c706c;white-space:normal;box-shadow:none;transition:background .16s,color .16s,border-color .16s}
#nav .nav-links a .nav-icon{width:31px;height:31px;flex-basis:31px;border-radius:9px;background:#f0f5f2;color:#627671;font-size:15px;box-shadow:none}
#nav .nav-links a .nav-label{font-size:12px;font-weight:700;line-height:1.55}
#nav .nav-links a .nav-chevron{color:var(--brand);font-size:18px}
#nav .nav-links a:hover{background:#f5f8f6;color:var(--ink);border-color:#edf1ee}
#nav .nav-links a.on{background:#e8f4ef;border-color:#d8eae2;color:#145f58;box-shadow:inset -3px 0 var(--brand)}
#nav .nav-links a.on .nav-icon{background:var(--brand);color:#fff;box-shadow:none}
#nav .nav-links a.on .nav-chevron{opacity:1;transform:none}
.sidebar-spacer{min-height:18px}
.sidebar-note{margin:13px 2px 14px;padding:13px;border-radius:11px;border:1px solid #dcebe4;background:#f5faf7;color:#627571;font-size:10px;line-height:1.9}
.sidebar-note strong{color:#22504a;font-size:11px}
.sidebar-user{padding:12px 4px 0;border-top:1px solid var(--line);gap:9px}
.user-avatar{width:36px;height:36px;flex-basis:36px;border-radius:10px;background:#f5e7c8;color:#71551f;box-shadow:none}
.user-meta strong{max-width:130px;color:var(--ink);font-size:11px}
.user-meta small{color:var(--muted);font-size:9px;line-height:1.6}
#out{border:1px solid #e0e8e4;background:#f8faf9;color:#60716d;border-radius:9px;box-shadow:none}
#out:hover{background:#fff0ef;border-color:#f3d4d5;color:#bd404b}
.nav-switch-link{border-radius:10px!important;background:#f8faf9!important;border:1px solid var(--line)!important;color:var(--ink)!important}
.nav-switch-icon{background:#e4f3ef!important;color:var(--brand)!important}
.preview-notice{background:#fff7e5!important;border:1px solid #f0dfb6!important;color:#735b2f!important;border-radius:10px!important}
.workspace{grid-column:2;grid-row:1;display:flex;flex-direction:column;min-width:0;width:100%;max-width:none;margin:0!important;min-height:100vh;background:var(--bg)}
.topbar{position:sticky;top:0;z-index:15;min-width:0;min-height:68px;padding:12px clamp(17px,3vw,36px);gap:13px;background:rgba(255,255,255,.96)!important;border-bottom:1px solid var(--line)!important;box-shadow:none!important;backdrop-filter:none!important}
#mb{width:40px;height:40px;border:1px solid var(--line);border-radius:10px;background:#fff;color:var(--brand);box-shadow:none;font-size:19px}
#mb:hover{background:var(--brand-soft);border-color:#c4dfd4}
.breadcrumbs{gap:8px;color:#91a09a;font-size:11px}
.breadcrumbs strong{color:var(--ink);font-size:13px}
.top-actions{gap:10px}
.system-state{padding:5px 9px;background:#e8f5ee;border:1px solid #d7eadf;color:#2d755a;border-radius:7px;font-size:10px}
.system-state:before{box-shadow:none;background:#28a274}
.top-avatar{width:35px;height:35px;border-radius:10px;background:#e4f3ef;color:var(--brand);font-size:12px}
main{width:100%;max-width:1480px;min-width:0;margin:0 auto;padding:28px clamp(17px,3vw,38px) 44px;flex:1}
.app-footer{padding:14px 20px 21px;color:#879590;font-size:10px}
#navbackdrop{display:none}

/* Headings and cards: flatter, editorial, clearly structured. */
#main>h1,.page-head h1{color:var(--ink);font-size:clamp(23px,2vw,29px);line-height:1.5;letter-spacing:-.5px}
#main>h1:after,.page-head h1:after{width:38px;height:3px;background:var(--brand);border-radius:2px;margin-top:8px}
.page-head{margin-bottom:20px}
.page-head p{color:var(--muted);font-size:12px}
.page-eyebrow{color:var(--brand);font-size:10px;letter-spacing:.15px}
.page-eyebrow:before{width:16px;height:2px;background:#d9a74c;border-radius:0}
.page-hero{display:flex;align-items:center;justify-content:space-between;gap:18px;min-width:0;margin:0 0 22px;padding:23px 24px;border:1px solid var(--line);border-inline-start:4px solid var(--brand);border-radius:13px;background:#fff!important;color:var(--ink)!important;box-shadow:var(--shadow-soft)!important;overflow:hidden}
.page-hero::before,.page-hero::after{content:none!important;display:none!important}
.page-hero .hero-copy{position:relative;z-index:1;min-width:0;max-width:100%}
.page-hero .hero-kicker{font-size:10px;color:var(--brand)!important;font-weight:800;margin-bottom:5px}
.page-hero h1{margin:0 0 5px;color:var(--ink)!important;font-size:clamp(22px,2.25vw,29px);font-weight:900;line-height:1.5;letter-spacing:-.6px;overflow-wrap:anywhere}
.page-hero h1:after{display:none!important}
.page-hero p{margin:0;max-width:640px;color:var(--muted)!important;font-size:12px;line-height:1.9}
.hero-symbol{width:58px;height:58px;flex:0 0 58px;border-radius:12px;background:#e9f4ef!important;color:var(--brand)!important;border:1px solid #d8e9e1!important;box-shadow:none!important;font-size:25px}
.compact-hero{padding:18px 21px;margin-bottom:18px}
.compact-hero .hero-symbol{width:48px;height:48px;flex-basis:48px}
.grid{grid-template-columns:repeat(auto-fit,minmax(min(100%,165px),1fr));gap:13px;margin-bottom:20px}
.card,.stat{min-width:0;margin:0 0 15px;padding:20px;background:#fff!important;border:1px solid var(--line)!important;border-radius:14px!important;box-shadow:var(--shadow-soft)!important;color:var(--ink)}
.card{transition:border-color .16s,box-shadow .16s}
.card:hover{border-color:#cbded5!important;box-shadow:0 8px 22px rgba(27,68,60,.07)!important}
.card.done{opacity:.65}
.card p{color:#667773;line-height:1.9}
.card>b,.card>strong{color:var(--ink);font-size:13px}
.stat{position:relative;overflow:hidden;display:flex;flex-direction:column;justify-content:space-between;gap:8px;min-height:102px;padding:16px 17px!important;border-inline-start:4px solid var(--brand)!important;text-align:right;background:#fff!important;color:var(--muted);font-size:11px;line-height:1.65;font-weight:700}
.stat:before,.stat:after{content:none!important;display:none!important}
.stat b{display:block;margin:0;color:var(--ink);font-size:28px;font-weight:900;line-height:1.2;letter-spacing:-.6px}
.section-heading{margin:24px 0 13px;align-items:flex-end}
.section-heading h2{margin:0;color:var(--ink);font-size:17px;font-weight:900;letter-spacing:-.25px}
.section-heading p{font-size:11px;color:var(--muted)}
.card-heading{gap:11px;margin-bottom:15px}
.card-heading b{font-size:13px;color:var(--ink)}
.card-heading small{font-size:10px;color:var(--muted);line-height:1.75}
.mini-icon,.preview-card-icon,.att-heading-symbol,.att-download-icon{box-shadow:none!important}
.mini-icon{width:37px;height:37px;flex:0 0 37px;border-radius:10px!important;border:1px solid #dcebe4;background:#e9f5ef!important;color:var(--brand)!important}
.mini-icon.purple{background:#e7f3ef!important;color:#176f67!important;border-color:#d6e9e0!important}
.mini-icon.mint{background:#e7f5ee!important;color:#247b5f!important;border-color:#d8ebde!important}
.mini-icon.amber{background:#fbf0d8!important;color:#906821!important;border-color:#f0e1bb!important}
.info-card{background:#f8fbf9!important;border-color:#e0ebe5!important}
.security-hint,.form-hint,.setup-hint{color:var(--muted);font-size:10px;line-height:1.8}

/* Controls */
label{color:#50645f;font-size:12px;font-weight:800}
input,select,textarea{min-width:0;min-height:44px;margin-top:6px;padding:10px 12px;border:1px solid #d9e4df;border-radius:9px;background:#fbfcfb;color:var(--ink);font-size:13px;box-shadow:none;transition:border-color .15s,box-shadow .15s,background .15s}
input::placeholder,textarea::placeholder{color:#9ba9a4}
input:hover,select:hover,textarea:hover{border-color:#afcec0}
input:focus,select:focus,textarea:focus{outline:none;border-color:var(--brand);background:#fff;box-shadow:var(--focus-ring)}
input[type=time],input[type=date]{direction:ltr;text-align:right}
textarea{min-height:100px;line-height:1.85}
.btn,.card button{min-height:42px;padding:10px 16px;border:1px solid var(--brand);border-radius:9px;background:var(--brand)!important;color:#fff!important;box-shadow:none!important;font-size:12px;font-weight:800;transition:background .15s,border-color .15s,transform .15s}
.btn:hover,.card button:hover{background:var(--brand-dark)!important;border-color:var(--brand-dark)!important;box-shadow:none!important;transform:translateY(-1px)}
.btn:active,.card button:active{transform:translateY(0)}
.btn:disabled,.card button:disabled{opacity:.55;cursor:wait;transform:none}
.btn.secondary,.btn.jr-btn-soft,.card .btn.secondary{background:#fff!important;color:var(--brand)!important;border-color:#cbded5!important}
.btn.secondary:hover,.btn.jr-btn-soft:hover{background:#edf6f1!important}
.btn.danger,.btn.danger:hover{background:#fff0ef!important;color:#b43d48!important;border-color:#f1d1d0!important}
.card div button{background:#f0f6f2!important;color:var(--brand)!important;border:1px solid #dae9e1!important;box-shadow:none!important}
.err{color:#bb3c47}
.success{color:#18785c}

/* General tables and lists */
.tw,.att-table-shell{overflow:auto;max-width:100%;border:1px solid var(--line)!important;border-radius:12px!important;background:#fff!important;box-shadow:var(--shadow-soft)!important;scrollbar-color:#c3d7ce transparent;scrollbar-width:thin}
table{border-collapse:separate;border-spacing:0;width:100%;font-size:12px}
th,td{padding:12px 13px;border-bottom:1px solid #eaf0ec;text-align:right;vertical-align:middle}
th{background:#eff6f2!important;color:#385950!important;font-weight:900;white-space:nowrap;border-bottom:1px solid #dce9e2}
tbody tr:nth-child(even) td{background:#fbfcfb}
tbody tr:hover td{background:#f2f8f4}
tbody tr:last-child td{border-bottom:0}
.table-badge{background:#e7f4ec!important;color:#26714f!important;border-color:#d5eadd!important;border-radius:7px}
.table-badge:before{background:#2e9c70}
.status-pill{border-radius:7px;font-size:10px}
.status-active{background:#e6f5ec!important;color:#23784f!important}
.status-pending{background:#fff3dc!important;color:#98621c!important}
.row-number{background:#f1f5f2!important;color:#6c7d76!important}
.empty,.empty-state{color:#7a8a84;text-align:center}
.empty-card{border:1px dashed #cbded5!important;border-radius:13px!important;background:#fbfdfb!important;box-shadow:none!important}
.empty-card>span,.jr-no-selection>span{background:#e7f4ee!important;color:var(--brand)!important;box-shadow:none!important;border-radius:11px!important}
.empty-card>b{color:var(--ink)!important}
.empty-card p{color:var(--muted)!important}
.text-link{color:var(--brand)!important;font-weight:800;text-decoration:none}
.text-link:hover{text-decoration:underline}

/* Dashboards and shortcuts */
.feature-shortcut-grid{gap:12px;margin:17px 0}
.feature-shortcut,.overview-card,.record-card,.admin-manage-shortcut{position:relative;isolation:isolate;overflow:hidden;border-radius:13px!important;border:1px solid var(--line)!important;background:#fff!important;box-shadow:var(--shadow-soft)!important;text-decoration:none;color:inherit;transition:border-color .15s,box-shadow .15s}
.feature-shortcut::after,.feature-shortcut::before{content:none!important;display:none!important}
.feature-shortcut:hover,.admin-manage-shortcut:hover{border-color:#bed9cc!important;box-shadow:0 9px 22px rgba(27,68,60,.08)!important;transform:translateY(-1px)}
.feature-shortcut b,.admin-manage-copy b{color:var(--ink)!important;font-size:13px}
.feature-shortcut small,.admin-manage-copy small{color:var(--muted)!important;font-size:10px;line-height:1.8}
.preview-card-icon{background:#e7f4ee!important;color:var(--brand)!important;border:1px solid #d5e7de!important;border-radius:10px!important}
.user-preview-card{display:grid;grid-template-columns:auto minmax(0,1fr) auto;gap:14px;align-items:center;background:#f8fbf9!important;border-color:#dfece4!important}
.preview-card-copy b{font-size:13px;color:var(--ink)}
.preview-card-copy p{font-size:11px;color:var(--muted);margin:3px 0 0}
.admin-manage-shortcut{padding:17px;gap:13px}
.admin-manage-arrow{color:var(--brand)!important}
.admin-panels,.overview-panels{gap:14px}
.admin-panels .card{height:100%;margin:0}
.tool-card .card-heading{border-bottom:1px solid #edf2ee;padding-bottom:13px}
.time-grid{gap:10px}
.security-card{background:#fffdfa!important;border-color:#eee4cf!important}
.security-hint{background:#fbf4e6;border:1px solid #efe2c7;color:#806537;border-radius:8px;padding:9px 11px}

/* Records: homework, lesson and exams */
.records-grid{gap:13px;margin-top:14px}
.record-card{gap:11px;padding:17px!important}
.record-card h3,.record-top>b{color:var(--ink)!important;font-size:13px;line-height:1.7}
.record-card p{color:#61736d!important;font-size:12px;line-height:1.9}
.record-bottom{border-top:1px solid #eaf0ec!important;color:#71817c!important}
.record-kind{background:#e7f4ee!important;color:#176f67!important;border-radius:6px!important;box-shadow:none!important}
.record-kind.lesson{background:#e7f5ec!important;color:#2a7c53!important}
.record-kind.exam{background:#fff1d9!important;color:#97611d!important}
.record-date{background:#f1f5f2!important;color:#61736d!important;border-radius:7px!important}
.filter-bar{gap:12px 15px;padding:17px!important;background:#fff!important}
.form-grid{gap:12px 15px}
.form-hint{line-height:1.9}
.form-submit{gap:9px}
.records-grid .card{margin:0}

/* Student journal and review */
.jr-incomplete-card{background:#fffaf0!important;border:1px solid #f0dfb8!important;border-radius:13px!important;box-shadow:none!important}
.jr-incomplete-card h2{color:var(--ink)!important}
.jr-incomplete-card p{color:#6d756b!important}
.jr-incomplete-icon{background:#faedcf!important;color:#8b641f!important;border-radius:10px!important}
.jr-filters{gap:12px;padding:16px!important}
.jr-filters label,.jr-review-form label{color:#50645f!important}
.jr-filters select,.jr-filters input,.jr-review-form textarea{border-color:#d9e4df!important;border-radius:9px!important;background:#fbfcfb!important;color:var(--ink)!important}
.jr-review-layout{gap:14px}
.jr-students-panel,.jr-detail-panel{padding:16px!important;border-radius:13px!important;background:#fff!important;box-shadow:var(--shadow-soft)!important}
.jr-panel-title h2,.jr-detail-head h2{color:var(--ink)!important}
.jr-count{background:#e7f4ee!important;color:var(--brand)!important;border-radius:7px!important}
.jr-student-list{gap:7px}
.jr-student-card{border:1px solid #e5ece7!important;border-radius:9px!important;background:#fff!important;color:var(--ink)!important;box-shadow:none!important;transform:none!important}
.jr-student-card:hover{border-color:#bfd9cc!important;background:#f8fbf9!important}
.jr-student-card.active{border-color:#9fcabd!important;background:#eaf5ef!important;box-shadow:inset -3px 0 var(--brand)!important}
.jr-student-avatar{background:#e7f4ee!important;color:var(--brand)!important;border-radius:9px!important;box-shadow:none!important}
.jr-student-main strong{color:var(--ink)}
.jr-student-main small{color:var(--muted)}
.jr-approved{background:#e7f5ec!important;color:#23784f!important}
.jr-revision{background:#fff0e8!important;color:#a64f25!important}
.jr-pending{background:#f0f4f1!important;color:#697a73!important}
.jr-no-selection>span{background:#e7f4ee!important;color:var(--brand)!important;box-shadow:none!important}
.jr-log-placeholder{background:#f7faf8!important;border:1px dashed #cbded5!important;border-radius:10px!important}
.jr-log-placeholder>span{background:#e7f4ee!important;color:var(--brand)!important;box-shadow:none!important}
.jr-form-note,.jr-last-reviewed{color:#7c8b85!important}
.jr-feedback-card{padding:16px!important}
.jr-feedback-head{align-items:flex-start}
.jr-btn-soft{background:#fff!important;border:1px solid #cfdfd7!important;color:var(--brand)!important;box-shadow:none!important}

/* Attendance: functional table first, calm colors, no ornamental sculpture. */
.att-hero{min-height:0;padding:20px 22px!important;margin-bottom:16px!important;border:1px solid var(--line)!important;border-inline-start:4px solid var(--brand)!important;border-radius:13px!important;background:#fff!important;box-shadow:var(--shadow-soft)!important;color:var(--ink)!important}
.att-hero::before,.att-hero::after{content:none!important;display:none!important}
.att-kicker{background:#e7f4ee!important;color:var(--brand)!important;border:1px solid #d6e9df!important;border-radius:6px!important;font-size:10px!important}
.att-hero h1{color:var(--ink)!important;font-size:clamp(22px,2vw,28px)!important;line-height:1.5}
.att-hero p{color:var(--muted)!important;font-size:12px!important}
.att-current-date{background:#f7faf8!important;color:#536d65!important;border:1px solid var(--line)!important;border-radius:7px!important}
.att-hero-art{flex:0 0 58px!important;width:58px!important;height:58px!important;border-radius:12px!important;background:#e7f4ee!important;border:1px solid #d6e9df!important;color:var(--brand)!important;box-shadow:none!important;transform:none!important}
.att-hero-art span{width:37px!important;height:37px!important;border:1px solid #a9d2c3!important;border-radius:9px!important;background:#fff!important;color:var(--brand)!important;font-size:22px!important}
.att-hero-art i,.att-hero-art b{display:none!important}
.att-panel{padding:18px!important;margin:0 0 15px!important;border:1px solid var(--line)!important;border-radius:13px!important;background:#fff!important;box-shadow:var(--shadow-soft)!important}
.att-controls{gap:11px 13px}
.att-controls label,.att-bulk-toolbar label,.att-time-grid label{color:#50645f!important;font-size:11px!important}
.att-controls input,.att-controls select,.att-bulk-toolbar select,.att-time-grid input,.att-bulk textarea{border-color:#d9e4df!important;border-radius:9px!important;background:#fbfcfb!important;color:var(--ink)!important}
.att-section-title h2,.att-section-head h2,.att-panel-heading h2{color:var(--ink)!important;font-size:15px!important}
.att-section-title p,.att-section-head p,.att-panel-heading p{color:var(--muted)!important}
.att-section-mark,.att-heading-symbol,.att-download-icon{background:#e7f4ee!important;border:1px solid #d7e9df!important;color:var(--brand)!important;border-radius:9px!important;box-shadow:none!important}
.att-selected-day,.att-mini-tag{background:#edf6f1!important;color:#236e5c!important;border:1px solid #d8e9df!important;border-radius:6px!important}
.att-daybar{display:grid;grid-template-columns:repeat(5,minmax(0,1fr));gap:7px;padding:7px;border:1px solid var(--line)!important;border-radius:11px!important;background:#f8faf8!important;box-shadow:none!important}
.att-day-btn{min-width:0;min-height:49px;display:flex;align-items:center;justify-content:center;gap:7px;padding:6px;border:1px solid transparent!important;border-radius:8px!important;background:#eef3f0!important;color:#52655f!important;box-shadow:none!important;transform:none!important}
.att-day-btn span{width:25px;height:25px;border-radius:7px;background:#fff!important;color:var(--brand)!important;border:1px solid #dce8e1!important;box-shadow:none!important}
.att-day-btn b{font-size:11px!important}
.att-day-btn:hover{background:#e5f2eb!important;border-color:#cfe2d7!important}
.att-day-btn.active{background:var(--brand)!important;border-color:var(--brand)!important;color:#fff!important;box-shadow:none!important}
.att-day-btn.active span{background:#fff!important;color:var(--brand)!important;border-color:#fff!important}
.att-bulk textarea{min-height:90px}
.att-btn{min-height:41px!important;padding:9px 13px!important;border-radius:8px!important;box-shadow:none!important;transform:none!important;font-size:11px!important}
.att-btn-primary{background:var(--brand)!important;color:#fff!important;border-color:var(--brand)!important}
.att-btn-green{background:#e5f4eb!important;color:#206e50!important;border-color:#d0e8d9!important}
.att-btn-gold{background:#fff3d9!important;color:#8c641e!important;border-color:#f0dfb8!important}
.att-btn-outline{background:#fff!important;color:#50645f!important;border-color:#d9e4df!important}
.att-btn-danger,.att-btn-red,.att-btn-softred{background:#fff0ef!important;color:#b24049!important;border-color:#efcfce!important}
.att-extra-tools{background:#f8faf8!important;border:1px solid #e1eae4!important;border-radius:10px!important}
.att-extra-tools[open]{background:#f3f8f5!important;border-color:#c9dfd3!important}
.att-extra-tools summary{color:var(--brand)!important}
.att-legend{background:#f8faf8!important;border-color:var(--line)!important;border-radius:9px!important}
.att-table-shell{border-radius:11px!important;overflow:auto;max-width:100%}
.att-table{min-width:720px!important;width:100%;font-size:11px!important}
.att-table th{padding:12px 10px!important;background:#eaf4ef!important;color:#345b51!important;border-bottom:1px solid #d8e7df!important}
.att-table th.att-sticky-name{background:#e4f1eb!important;color:#294c43!important}
.att-table td{padding:9px 8px!important;border-bottom:1px solid #eaf0ec!important;background:#fff!important}
.att-table tbody tr:nth-child(even) td{background:#fbfcfb!important}
.att-table tbody tr:hover td{background:#f1f8f4!important}
.att-table td.att-sticky-name{background:#fff!important;border-left-color:#e1e9e4!important}
.att-table tbody tr:nth-child(even) td.att-sticky-name{background:#fbfcfb!important}
.att-student-name>span{background:#e8f4ee!important;color:var(--brand)!important;border-radius:8px!important}
.att-status-select{border-radius:8px!important;min-height:40px!important;font-size:11px!important;box-shadow:none!important}
.att-status-select:focus{box-shadow:var(--focus-ring)!important}
.att-status-select.status-present{background:#e5f5eb!important;border-color:#c7e6d2!important;color:#23764c!important}
.att-status-select.status-absent{background:#fff0ef!important;border-color:#f2d1d0!important;color:#b43f48!important}
.att-status-select.status-late{background:#fff4df!important;border-color:#eedeb8!important;color:#8d611c!important}
.att-status-select.status-review{background:#f0f4f1!important;border-color:#dfe7e2!important;color:#66756e!important}
.att-status-select.status-excused{background:#eaf2fa!important;border-color:#d0dfeb!important;color:#366d91!important}
.att-status-select.status-leave{background:#f0edf9!important;border-color:#ddd5ef!important;color:#6d5796!important}
.att-status-select.status-sick{background:#e5f5f2!important;border-color:#c8e7df!important;color:#176f67!important}
.att-status-select.status-unrecorded{background:#fafcfb!important;border-color:#d5e0da!important;border-style:dashed!important;color:#7f8c86!important}
.att-stats{gap:10px}
.att-stat-card{border:1px solid var(--line)!important;border-radius:10px!important;background:#fff!important;box-shadow:none!important}
.att-week-chart,.att-week-report{border:1px solid var(--line)!important;border-radius:12px!important;background:#fff!important;box-shadow:var(--shadow-soft)!important}
.att-bar{background:#2b9580!important;box-shadow:none!important}
.att-download-section{background:#fff!important;background-image:none!important;border-radius:12px!important}
.att-download-card{border:1px solid var(--line)!important;border-radius:10px!important;box-shadow:none!important;transform:none!important}
.att-download-card:hover{border-color:#bdd8ca!important;box-shadow:0 5px 14px rgba(28,57,55,.06)!important;transform:translateY(-1px)!important}
.att-download-card.highlight{background:#f1f8f4!important;border-color:#d5e9dd!important}
.att-download-icon{box-shadow:none!important}
.att-footnote{color:var(--muted)!important}

/* Modals and notifications */
.modal-backdrop{background:rgba(23,43,40,.42)!important;backdrop-filter:blur(3px)!important}
.modal-card{border:1px solid var(--line)!important;border-radius:15px!important;padding:23px!important;box-shadow:0 22px 60px rgba(20,48,42,.19)!important;color:var(--ink)!important}
.modal-card h2{color:var(--ink)!important}
.modal-card input,.modal-card select{background:#fbfcfb!important;border-color:#d9e4df!important;border-radius:9px!important;color:var(--ink)!important}
.modal-x{background:#f0f5f2!important;color:#536a61!important;border-radius:8px!important}
.modal-warning{background:#fff6e4!important;border-color:#efdfba!important;color:#7c5e28!important;border-radius:9px!important}
#toast{box-shadow:0 8px 25px rgba(25,53,47,.15)!important}

/* Authentication redesigned from scratch: no 3D sculpture, no purple gradient. */
body.auth-page{display:grid!important;place-items:center;min-height:100vh;padding:clamp(14px,3vw,36px)!important;background:#edf3ef!important;background-image:none!important}
body.auth-page>main.auth-layout{display:grid!important;grid-template-columns:minmax(0,1fr) minmax(0,1.05fr);direction:rtl;width:min(100%,1000px)!important;max-width:1000px!important;min-height:590px;margin:0!important;padding:0!important;overflow:hidden;background:#fff!important;border:1px solid #dfe8e3!important;border-radius:18px!important;box-shadow:0 22px 60px rgba(26,57,49,.10)!important}
.auth-brand-panel{position:relative;isolation:isolate;overflow:hidden;display:flex;flex-direction:column;justify-content:space-between;min-width:0;padding:34px 32px!important;background:#176f67!important;color:#fff!important;border:0!important;border-radius:0!important}
.auth-brand-panel::before,.auth-brand-panel::after{content:none!important;display:none!important}
.auth-brand{position:relative;z-index:1;gap:11px}
.auth-brand .brand-mark{width:43px;height:43px;border-radius:11px!important;background:#fff!important;color:var(--brand)!important;border:0!important;box-shadow:none!important}
.auth-brand strong{color:#fff!important;font-size:18px}
.auth-brand small{color:#d5ebe4!important;font-size:10px}
.auth-3d-scene{display:none!important}
.auth-artwork{position:relative;display:flex;align-items:center;justify-content:center;min-height:155px;margin:20px 0 2px;isolation:isolate}
.auth-art-sheet{position:relative;display:flex;flex-direction:column;gap:10px;width:min(100%,280px);padding:18px 19px 17px;background:#f9fbf7;border:1px solid #d7e8df;border-radius:11px;color:#203c35;box-shadow:7px 7px 0 rgba(12,57,49,.18);transform:rotate(-2deg)}
.auth-art-sheet::before{content:"";height:5px;width:43px;border-radius:4px;background:#dfb65d;margin-bottom:5px}
.auth-art-sheet small{color:#71817b;font-size:10px;font-weight:700}
.auth-art-sheet strong{font-size:19px;letter-spacing:-.4px}
.auth-art-sheet span{font-size:10px;color:#516c62}
.auth-art-tab{position:absolute;top:7px;right:calc(50% - 146px);width:42px;height:42px;display:grid;place-items:center;border-radius:10px;background:#efc66a;color:#4f431f;font-size:12px;font-weight:900;border:1px solid rgba(99,76,23,.08);transform:rotate(6deg)}
.auth-promo{position:relative;z-index:1;margin-top:18px;max-width:100%}
.auth-promo .pill{display:inline-flex;padding:5px 9px;border:1px solid rgba(255,255,255,.24);border-radius:5px;background:rgba(255,255,255,.10);color:#f1fbf6;font-size:10px;font-weight:800;margin-bottom:13px;backdrop-filter:none}
.auth-promo h2{max-width:340px;margin:0 0 10px;color:#fff!important;font-size:clamp(26px,2.7vw,34px);line-height:1.55;letter-spacing:-.7px}
.auth-promo p{max-width:350px;margin:0;color:#d7ece5!important;font-size:12px;line-height:2}
.auth-highlights{display:grid;gap:10px;margin-top:20px}
.auth-highlight{display:flex;align-items:center;gap:9px;color:#eef7f2;font-size:11px}
.auth-highlight span:first-child{display:grid;place-items:center;width:26px;height:26px;border-radius:7px;background:rgba(255,255,255,.12);border:1px solid rgba(255,255,255,.18);color:#f3cf7b;box-shadow:none}
.auth-footnote{margin-top:25px;color:#c1e0d4;font-size:10px}
.auth-panel{align-self:center;min-width:0;padding:clamp(26px,4.6vw,52px)!important;background:#fff!important}
.auth-panel h1{margin:0 0 7px;color:var(--ink)!important;font-size:28px;letter-spacing:-.6px}
.auth-subtitle{margin:0 0 23px;color:var(--muted)!important;font-size:12px;line-height:1.9}
.tabs{display:flex;gap:5px;padding:4px;margin-bottom:17px;background:#f3f7f4!important;border:1px solid #e3ebe6!important;border-radius:9px!important}
.tabs button{min-height:42px;border:0;border-radius:6px!important;background:transparent!important;color:#6e8079!important;font-size:11px;font-weight:800;box-shadow:none!important}
.tabs button:hover{background:#e7f2ec!important;color:var(--brand)!important}
.tabs .on{background:#fff!important;color:var(--brand)!important;box-shadow:0 1px 4px rgba(20,60,47,.08)!important;border:1px solid #e0ebe4!important}
.auth-panel label{margin:13px 0 5px;color:#4d625b;font-size:11px}
.auth-panel input{min-height:47px;border-radius:8px!important;background:#fbfcfb!important;border-color:#d9e4df!important}
.auth-panel .btn{width:100%;min-height:47px;margin-top:12px;border-radius:8px!important;background:var(--brand)!important;box-shadow:none!important}
.auth-legal{font-size:10px;line-height:1.9;color:#8a9993;text-align:center;margin:16px 0 0}
.auth-message{min-height:18px;margin:7px 0 0}
.auth-submit-arrow{font-size:15px}

/* Tablet and mobile: no fixed sidebar offset, no narrow content column. */
@media(max-width:1080px){
  .app-layout{grid-template-columns:232px minmax(0,1fr)!important}
  .sidebar{width:232px!important;padding-inline:12px!important}
  main{padding-inline:22px}
  .topbar{padding-inline:22px}
  body.auth-page>main.auth-layout{max-width:900px!important}
  .auth-brand-panel{padding:29px 25px!important}
}
@media(max-width:760px){
  .app-layout{display:block!important;width:100%;max-width:100%;overflow:clip}
  .sidebar{position:fixed!important;z-index:40;inset-block:0!important;inset-inline-start:0!important;top:0!important;bottom:0!important;grid-column:auto;grid-row:auto;width:min(300px,88vw)!important;height:100dvh;min-height:100dvh;padding:20px 14px 15px!important;overflow-y:auto;transform:translateX(110%)!important;box-shadow:none!important;border-inline-start:0;border-inline-end:1px solid var(--line);transition:transform .22s ease!important}
  .sidebar.open{transform:translateX(0)!important;box-shadow:-12px 0 32px rgba(25,52,45,.14)!important}
  .workspace{display:flex!important;grid-column:auto!important;grid-row:auto!important;width:100%!important;max-width:100%!important;min-width:0!important;margin:0!important}
  #navbackdrop{display:block;position:fixed;inset:0;z-index:35;background:rgba(19,42,37,.35);backdrop-filter:blur(2px);opacity:0;visibility:hidden;transition:opacity .18s,visibility .18s}
  #navbackdrop.show{opacity:1;visibility:visible}
  .topbar{position:sticky;min-height:61px;padding:9px 13px;gap:9px}
  #mb{display:grid;place-items:center;flex:0 0 38px;width:38px;height:38px}
  .breadcrumbs{gap:5px;font-size:10px}
  .breadcrumbs strong{font-size:12px;max-width:130px;overflow:hidden;text-overflow:ellipsis}
  .top-actions{gap:7px}
  .system-state{width:9px;height:9px;padding:0;overflow:hidden;font-size:0;border:0;background:transparent}
  .system-state:before{width:8px;height:8px;margin:0;box-shadow:0 0 0 3px #e0f2e7}
  .top-avatar{width:31px;height:31px;flex:0 0 31px;border-radius:9px}
  main{width:100%!important;max-width:100%!important;min-width:0!important;margin:0!important;padding:19px 14px 31px!important}
  .app-footer{width:100%;padding:12px 14px 20px}
  .page-hero{align-items:center;gap:11px;padding:17px 15px;margin-bottom:17px;border-radius:11px!important;min-height:0}
  .page-hero .hero-copy{max-width:none!important;flex:1 1 auto;min-width:0}
  .page-hero h1{font-size:21px;line-height:1.55;overflow-wrap:anywhere}
  .page-hero p{max-width:100%;font-size:11px;line-height:1.85}
  .page-hero .hero-kicker{font-size:9px}
  .hero-symbol{width:43px;height:43px;flex:0 0 43px;border-radius:9px;font-size:20px}
  .grid{grid-template-columns:repeat(2,minmax(0,1fr));gap:9px}
  .stat{min-height:88px;padding:13px!important;border-radius:10px!important;font-size:10px}
  .stat b{font-size:24px}
  .card{padding:15px!important;border-radius:11px!important;margin-bottom:12px}
  .section-heading{margin:20px 0 11px}
  .section-heading h2{font-size:15px}
  .feature-shortcut-grid,.student-feature-links,.records-grid{grid-template-columns:repeat(2,minmax(0,1fr));gap:9px}
  .feature-shortcut{padding:14px!important;gap:6px}
  .feature-shortcut b{font-size:12px;line-height:1.7}
  .feature-shortcut small{font-size:10px}
  .overview-panels,.admin-panels{grid-template-columns:1fr}
  .user-preview-card{grid-template-columns:auto minmax(0,1fr);align-items:start}
  .user-preview-card>.btn{grid-column:1/-1;width:100%}
  .page-head{gap:10px;margin-bottom:16px}
  .page-head h1{font-size:22px}
  .att-hero{align-items:center;padding:15px!important;gap:10px;border-radius:11px!important}
  .att-hero h1{font-size:21px!important;line-height:1.5!important}
  .att-hero p{font-size:11px!important}
  .att-hero-art{width:45px!important;height:45px!important;flex:0 0 45px!important;border-radius:9px!important}
  .att-hero-art span{width:30px!important;height:30px!important;border-radius:7px!important;font-size:18px!important}
  .att-panel{padding:13px!important;border-radius:11px!important;margin-bottom:12px!important}
  .att-controls{grid-template-columns:repeat(2,minmax(0,1fr));gap:9px}
  .att-search-label{grid-column:1/-1}
  .att-daybar{gap:4px;padding:5px}
  .att-day-btn{flex-direction:column;gap:3px;min-height:51px;padding:4px 1px}
  .att-day-btn span{width:22px;height:22px;font-size:9px}
  .att-day-btn b{font-size:10px!important}
  .att-table{min-width:700px!important}
  .att-download-grid{grid-template-columns:repeat(2,minmax(0,1fr))!important;gap:8px}
  .att-download-card{min-width:0;padding:11px}
  .att-action-grid .att-btn{flex:1 1 calc(50% - 7px)}
  .att-time-grid{grid-template-columns:repeat(2,minmax(0,1fr))}
  .jr-filters{grid-template-columns:repeat(2,minmax(0,1fr));padding:13px!important}
  .jr-search-label{grid-column:1/-1}
  .jr-review-layout{grid-template-columns:1fr}
  .jr-students-panel,.jr-detail-panel{padding:13px!important}
  .jr-student-list{max-height:380px}
  .form-grid{grid-template-columns:1fr}
  .form-grid .span-two{grid-column:auto}
  .filter-bar{grid-template-columns:1fr!important;padding:13px!important}
  .tw{border-radius:10px!important}
  th,td{padding:10px 11px}
  .modal-card{padding:20px!important;border-radius:12px!important}
  body.auth-page{display:block!important;padding:10px!important}
  body.auth-page>main.auth-layout{display:flex!important;flex-direction:column;width:100%!important;max-width:500px!important;min-height:calc(100dvh - 20px);border-radius:13px!important;margin:0 auto!important}
  .auth-brand-panel{min-height:0;flex:0 0 auto;padding:19px 20px 17px!important}
  .auth-artwork{min-height:88px;margin:13px 0 5px;justify-content:flex-start;padding-inline-start:9px}
  .auth-art-sheet{width:min(100%,245px);padding:10px 13px;gap:4px;box-shadow:4px 4px 0 rgba(12,57,49,.16)}
  .auth-art-sheet::before{height:3px;margin-bottom:2px}
  .auth-art-sheet strong{font-size:14px}
  .auth-art-sheet small,.auth-art-sheet span{font-size:9px}
  .auth-art-tab{top:0;right:auto;left:5px;width:32px;height:32px;border-radius:7px}
  .auth-promo{margin-top:12px}
  .auth-promo .pill{margin-bottom:7px;padding:4px 7px;font-size:9px}
  .auth-promo h2{font-size:21px;line-height:1.45;margin-bottom:5px;max-width:100%}
  .auth-promo p{font-size:10px;line-height:1.8;max-width:100%}
  .auth-highlights{display:grid;grid-template-columns:1fr 1fr;gap:6px;margin-top:12px}
  .auth-highlight{gap:6px;font-size:9px;line-height:1.6}
  .auth-highlight span:first-child{width:22px;height:22px;flex:0 0 22px;border-radius:6px}
  .auth-footnote{display:none}
  .auth-panel{padding:22px 20px 24px!important;flex:1}
  .auth-panel h1{font-size:23px}
  .auth-subtitle{font-size:11px;margin-bottom:15px}
  .auth-panel input{min-height:45px}
  .auth-panel .btn{min-height:45px}
  .tabs button{font-size:10px;min-height:40px}
}
@media(max-width:400px){
  .topbar{padding-inline:10px;gap:7px}
  .breadcrumbs span{display:none}
  .breadcrumbs strong{max-width:110px}
  main{padding-inline:11px!important}
  .page-hero{padding:14px 12px}
  .page-hero h1{font-size:19px}
  .hero-symbol{width:38px;height:38px;flex-basis:38px;font-size:18px}
  .grid{gap:7px}
  .stat{padding:11px!important;min-height:82px}
  .stat b{font-size:22px}
  .feature-shortcut-grid,.student-feature-links,.records-grid{grid-template-columns:1fr}
  .att-controls{grid-template-columns:1fr}
  .att-search-label{grid-column:auto}
  .att-daybar{grid-template-columns:repeat(5,minmax(0,1fr))}
  .att-action-grid .att-btn{flex:1 1 100%}
  .att-download-grid{grid-template-columns:1fr!important}
  .jr-filters{grid-template-columns:1fr}
  .jr-search-label{grid-column:auto}
  .auth-brand-panel{padding-inline:16px!important}
  .auth-panel{padding-inline:16px!important}
  .auth-highlights{grid-template-columns:1fr}
}
@media(prefers-reduced-motion:reduce){*,*::before,*::after{animation:none!important;transition:none!important;scroll-behavior:auto!important}}

/* Editorial theme refinements for administration-specific components */
.preview-return{background:#e8f4ee!important;color:#176f67!important;border:1px solid #d5e8dd!important;border-radius:7px!important;box-shadow:none!important}
.student-preview-mode .system-state{background:#fff1d7!important;color:#805e22!important;border:1px solid #f0dfb8!important}
.task-preview{border-bottom-color:#eaf0ec!important;color:#52675f!important}
.task-preview small{color:#7c8d85!important}
.task-dot{background:#2aa88f!important;box-shadow:0 0 0 4px #e4f3ed!important}
.big-inline{color:var(--ink)!important}
.admin-count{border-radius:11px!important;border-color:var(--line)!important;box-shadow:var(--shadow-soft)!important}
.admin-count b{color:var(--ink)!important}
.admin-count small{color:var(--muted)!important}
.admin-count-icon{border-radius:9px!important;box-shadow:none!important}
.admin-count-icon.owner,.row-number.owner{background:#fbefcf!important;color:#805e23!important}
.admin-count-icon.regular,.row-number.regular{background:#e5f4eb!important;color:#24724f!important}
.admin-count-icon.full,.row-number.full{background:#e7f2ee!important;color:var(--brand)!important}
.admin-role-pill{border-radius:6px!important}
.admin-role-pill.owner{background:#fbefcf!important;color:#805e23!important}
.admin-role-pill.regular{background:#e5f4eb!important;color:#24724f!important}
.admin-role-pill.full,.admin-role-pill.scoped{background:#e7f2ee!important;color:var(--brand)!important}
.admin-safety-panel{background:#fffaf0!important;border-color:#eee1c4!important}
.admin-safety-panel p{color:#71654b!important}
.protected-note,.admin-id-note{color:#75857e!important}
.reg-code-cell code{background:#eef5f0!important;color:#315e51!important;border-radius:6px!important}
.tiny-copy{border-radius:6px!important}
.delivery-note{border:1px solid #dce9e2!important;background:#f3f8f4!important;color:#49665b!important;border-radius:9px!important}
.class-name-form{border-color:var(--line)!important;border-radius:10px!important;background:#f9fbf9!important}
.role-classes{gap:14px}
.responsibility-class{border:1px solid var(--line)!important;border-radius:12px!important;background:#fff!important;box-shadow:var(--shadow-soft)!important}
.responsibility-class-head{padding:15px 17px!important;background:#f7faf8!important;border-bottom:1px solid var(--line)!important}
.responsibility-class-head h2{color:var(--ink)!important}
.responsibility-class .tw{border-radius:9px!important;box-shadow:none!important}
.responsibility-class th{background:#edf5f0!important;color:#365d50!important}
.responsibility-class td:first-child{color:#304d43!important}
.class-map-inventory{gap:9px}
.class-map-chip{padding:11px 12px!important;border:1px solid #dfe9e3!important;border-radius:10px!important;background:#f8fbf9!important;box-shadow:none!important}
.class-map-chip b{color:#244c41!important}
.class-map-chip small{color:#72837b!important}
.class-map-roster{border-color:var(--line)!important}
.mapped-name{background:#e5f4eb!important;color:#24714f!important;box-shadow:none!important;border-radius:6px!important}
.mapping-ambiguous{background:#fff3d9!important;color:#845b20!important;border-radius:6px!important}
.mapping-unresolved{background:#fff0ef!important;color:#a83e45!important;border-radius:6px!important}
.mapping-note{color:#8a672b!important}
.jr-feedback-card{border-radius:11px!important}
.jr-feedback-head small,.jr-feedback-card small{color:#7b8b84!important}
.admin-manage-shortcut{display:flex;align-items:center;gap:13px}
.admin-manage-layout{gap:14px}
@media(max-width:760px){
  .admin-count-grid{grid-template-columns:repeat(2,minmax(0,1fr))!important}
  .admin-count:first-child{grid-column:1/-1}
  .class-map-inventory,.class-name-grid{grid-template-columns:1fr!important}
  .responsibility-class-head{align-items:flex-start;flex-direction:column}
  .admin-manage-shortcut{align-items:flex-start}
}
