/* Ilmora — design system */
:root {
  --brand: #0e7c86; --brand-d: #0b5f67; --brand-l: #e3f4f3; --brand-ll: #f1faf9;
  --ink: #0f2a2f; --ink2: #33484d; --muted: #63767b; --line: #e2eaea; --line2: #edf2f2;
  --bg: #f4f7f6; --card: #fff; --side: #0b2226; --side2: #12343a; --side-t: #b9cfd0;
  --amber: #f59e0b; --amber-l: #fff4dd; --red: #e11d48; --red-l: #ffe9ee; --green: #15803d; --green-l: #e5f6eb; --blue: #2563eb; --blue-l: #e8efff; --violet: #7c3aed; --violet-l: #f1eaff; --grey-l: #eef2f3;
  --r: 14px; --r-s: 10px; --sh: 0 1px 2px rgba(15, 42, 47, .05), 0 4px 16px rgba(15, 42, 47, .05); --sh-l: 0 18px 60px rgba(15, 42, 47, .22);
  --font: 'Plus Jakarta Sans', 'IBM Plex Sans Arabic', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --sidew: 248px; --toph: 64px;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; font-family: var(--font); font-size: 14px; color: var(--ink); background: var(--bg); line-height: 1.45; -webkit-font-smoothing: antialiased; }
html[dir=rtl] body { font-family: 'IBM Plex Sans Arabic', var(--font); }
body.noscroll { overflow: hidden; }
a { color: var(--brand); text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2, h3, h4 { margin: 0; letter-spacing: -.01em; }
p { margin: 0; }
.ic { width: 18px; height: 18px; flex: none; }
.muted { color: var(--muted); }
.num { font-variant-numeric: tabular-nums; white-space: nowrap; }
.grow { flex: 1; }
.only-m { display: none !important; }
button { font: inherit; color: inherit; }
input, select, textarea { font: inherit; color: var(--ink); }
#boot { position: fixed; inset: 0; display: grid; place-items: center; background: var(--bg); color: var(--muted); }

/* ------------------------------------------------ buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 7px; height: 38px; padding: 0 15px; border-radius: 10px; border: 1px solid var(--line); background: #fff; color: var(--ink); font-weight: 600; font-size: 13.5px; cursor: pointer; white-space: nowrap; text-decoration: none !important; transition: background .15s, border-color .15s, box-shadow .15s; }
.btn:hover { border-color: #c9d6d6; background: #fbfdfd; }
.btn:disabled { opacity: .5; cursor: not-allowed; }
.btn.primary { background: var(--brand); border-color: var(--brand); color: #fff; box-shadow: 0 2px 8px rgba(14, 124, 134, .25); }
.btn.primary:hover { background: var(--brand-d); }
.btn.amber { background: var(--amber); border-color: var(--amber); color: #3b2500; }
.btn.ghost { background: transparent; border-color: transparent; color: var(--ink2); }
.btn.ghost:hover { background: var(--grey-l); }
.btn.danger { color: var(--red); }
.btn.danger.solid { background: var(--red); color: #fff; border-color: var(--red); }
.btn.sm { height: 32px; padding: 0 11px; font-size: 12.5px; border-radius: 8px; }
.btn.xs { height: 26px; padding: 0 8px; font-size: 12px; border-radius: 7px; }
.btn.block { width: 100%; }
.btn .ic { width: 16px; height: 16px; }
.iconbtn { width: 38px; height: 38px; border-radius: 10px; border: 0; background: transparent; display: inline-grid; place-items: center; cursor: pointer; color: var(--ink2); position: relative; }
.iconbtn:hover { background: var(--grey-l); }
.link { background: none; border: 0; color: var(--brand); cursor: pointer; font-weight: 600; padding: 0; }
.btnrow { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }

/* ------------------------------------------------ app shell */
.app { display: flex; min-height: 100vh; }
.side { width: var(--sidew); background: var(--side); color: var(--side-t); position: fixed; inset: 0 auto 0 0; display: flex; flex-direction: column; z-index: 40; }
html[dir=rtl] .side { inset: 0 0 0 auto; }
.brand { display: flex; align-items: center; gap: 11px; padding: 18px 18px 14px; }
.brand b { display: block; color: #fff; font-size: 18px; letter-spacing: -.02em; }
.brand small { color: #7fb3b5; font-size: 11.5px; letter-spacing: .08em; text-transform: uppercase; }
.brand-img { width: 34px; height: 34px; border-radius: 9px; object-fit: cover; }
.schoolbox { margin: 0 14px 10px; padding: 10px 12px; border-radius: 10px; background: var(--side2); display: flex; flex-direction: column; }
.sb-l { color: #fff; font-weight: 600; font-size: 13px; } .sb-s { font-size: 11.5px; color: #8fb2b4; }
.nav { flex: 1; overflow-y: auto; padding: 4px 10px 12px; scrollbar-width: thin; scrollbar-color: #24474d transparent; }
.nav-g { font-size: 10.5px; text-transform: uppercase; letter-spacing: .1em; color: #6f9799; margin: 14px 10px 6px; font-weight: 700; }
.nav-i { display: flex; align-items: center; gap: 11px; padding: 8px 11px; border-radius: 9px; color: var(--side-t); font-weight: 500; font-size: 13.5px; margin: 1px 0; text-decoration: none !important; }
.nav-i:hover { background: rgba(255, 255, 255, .05); color: #fff; }
.nav-i.on { background: linear-gradient(90deg, rgba(20, 184, 166, .22), rgba(20, 184, 166, .08)); color: #fff; box-shadow: inset 3px 0 0 #2dd4bf; }
html[dir=rtl] .nav-i.on { box-shadow: inset -3px 0 0 #2dd4bf; }
.nav-i .ic { width: 18px; height: 18px; opacity: .9; }
.nav-c { margin-inline-start: auto; font-style: normal; background: var(--amber); color: #3b2500; font-size: 11px; font-weight: 700; border-radius: 20px; padding: 1px 7px; }
.side-f { padding: 12px; border-top: 1px solid rgba(255, 255, 255, .06); }
.demo-btn { width: 100%; display: flex; align-items: center; gap: 10px; border: 1px solid rgba(45, 212, 191, .35); background: rgba(45, 212, 191, .08); color: #ccfbf1; border-radius: 10px; padding: 9px 12px; cursor: pointer; font-weight: 600; }
.demo-btn:hover { background: rgba(45, 212, 191, .16); }
.demo-btn em { margin-inline-start: auto; font-style: normal; font-size: 12px; color: #5eead4; }
.main { flex: 1; min-width: 0; margin-inline-start: var(--sidew); display: flex; flex-direction: column; }
.top { height: var(--toph); display: flex; align-items: center; gap: 10px; padding: 0 24px; background: rgba(255, 255, 255, .92); backdrop-filter: blur(10px); border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 30; }
.top-title { font-weight: 700; font-size: 15px; }
.gsearch { position: relative; display: flex; align-items: center; gap: 8px; width: min(520px, 44vw); height: 40px; padding: 0 12px; background: var(--bg); border: 1px solid var(--line); border-radius: 11px; color: var(--muted); }
.gsearch:focus-within { border-color: var(--brand); background: #fff; box-shadow: 0 0 0 3px var(--brand-l); }
.gsearch input { flex: 1; border: 0; background: transparent; outline: 0; min-width: 0; }
.gs-res { position: absolute; top: 46px; inset-inline: 0; background: #fff; border: 1px solid var(--line); border-radius: 12px; box-shadow: var(--sh-l); max-height: 420px; overflow: auto; display: none; padding: 6px; }
.gs-res.open { display: block; }
.gs-i { display: grid; grid-template-columns: 80px 1fr; column-gap: 10px; padding: 8px 10px; border-radius: 8px; color: var(--ink); text-decoration: none !important; }
.gs-i:hover { background: var(--brand-ll); }
.gs-i b { font-weight: 600; } .gs-i small { grid-column: 2; color: var(--muted); font-size: 12px; }
.gs-t { grid-row: span 2; font-size: 11px; font-weight: 700; color: var(--brand); text-transform: uppercase; letter-spacing: .05em; padding-top: 2px; }
.gs-none { padding: 14px; color: var(--muted); text-align: center; }
.yearsel, .yearchip { height: 36px; border: 1px solid var(--line); border-radius: 10px; background: #fff; padding: 0 10px; font-weight: 600; font-size: 13px; display: inline-flex; align-items: center; gap: 6px; color: var(--ink2); }
.bellwrap { position: relative; }
.bell em { position: absolute; top: 4px; inset-inline-end: 3px; background: var(--red); color: #fff; font-style: normal; font-size: 10px; font-weight: 700; min-width: 17px; height: 17px; border-radius: 9px; display: grid; place-items: center; padding: 0 4px; border: 2px solid #fff; }
.dropdown { position: absolute; inset-inline-end: 0; top: 46px; width: 380px; max-width: calc(100vw - 24px); background: #fff; border: 1px solid var(--line); border-radius: 14px; box-shadow: var(--sh-l); display: none; overflow: hidden; z-index: 50; }
.dropdown.open { display: block; }
.dd-h { display: flex; justify-content: space-between; align-items: center; padding: 12px 14px; border-bottom: 1px solid var(--line2); }
.dd-f { display: block; text-align: center; padding: 10px; border-top: 1px solid var(--line2); font-weight: 600; }
.dropdown .nt { max-height: none; }
.nt { display: flex; gap: 11px; padding: 11px 14px; color: var(--ink); text-decoration: none !important; border-bottom: 1px solid var(--line2); position: relative; }
.nt:hover { background: var(--brand-ll); }
.nt.unread { background: #f6fbfb; }
.nt.unread::before { content: ''; position: absolute; inset-inline-start: 5px; top: 18px; width: 6px; height: 6px; border-radius: 50%; background: var(--brand); }
.nt b { display: block; font-size: 13px; } .nt small { display: block; color: var(--ink2); font-size: 12.5px; } .nt i { display: block; font-style: normal; color: var(--muted); font-size: 11.5px; margin-top: 2px; }
.nt-ic { width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center; flex: none; background: var(--brand-l); color: var(--brand); }
.nt-fee { background: var(--amber-l); color: #b45309; } .nt-attendance { background: var(--red-l); color: var(--red); } .nt-exam { background: var(--violet-l); color: var(--violet); } .nt-assignment, .nt-message { background: var(--blue-l); color: var(--blue); }
.dropdown .nt { padding-inline-start: 18px; }
.rolebtn { display: flex; align-items: center; gap: 9px; border: 1px solid var(--line); background: #fff; border-radius: 12px; padding: 4px 10px 4px 4px; cursor: pointer; max-width: 240px; }
html[dir=rtl] .rolebtn { padding: 4px 4px 4px 10px; }
.rolebtn:hover { border-color: #c9d6d6; }
.rb-t { display: flex; flex-direction: column; text-align: start; min-width: 0; }
.rb-t b { font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; } .rb-t small { font-size: 11.5px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.content { padding: 24px 28px 48px; width: 100%; }
.scrim { display: none; }
.bottomnav { display: none; }

/* ------------------------------------------------ page heading */
.ph { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; margin-bottom: 20px; flex-wrap: wrap; }
.ph h1 { font-size: 24px; font-weight: 750; }
.ph p { color: var(--muted); margin-top: 4px; }
.ph-a { display: flex; gap: 8px; flex-wrap: wrap; }
.crumbs { display: flex; align-items: center; gap: 4px; font-size: 12.5px; color: var(--muted); margin-bottom: 6px; flex-wrap: wrap; }
.crumbs .ic { width: 13px; height: 13px; }
html[dir=rtl] .crumbs .ic, html[dir=rtl] .g-step > .ic:last-child { transform: scaleX(-1); }

/* ------------------------------------------------ cards & grids */
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--r); box-shadow: var(--sh); min-width: 0; display: flex; flex-direction: column; }
.card-h { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 15px 18px 0; flex-wrap: wrap; }
.card-h h3 { font-size: 15px; font-weight: 700; display: flex; align-items: center; gap: 8px; }
.card-h h3 .ic { color: var(--brand); }
.card-a { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }
.card-b { padding: 14px 18px 18px; flex: 1; }
.card-b.flush { padding: 10px 0 0; }
.card-b.flush > .tablewrap .tbar { padding: 0 18px 10px; }
.grid { display: grid; gap: 18px; margin-bottom: 18px; }
.g2 { grid-template-columns: repeat(2, minmax(0, 1fr)); } .g3 { grid-template-columns: repeat(3, minmax(0, 1fr)); } .g4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.g21 { grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); } .g12 { grid-template-columns: minmax(0, 1fr) minmax(0, 2fr); } .g31 { grid-template-columns: minmax(0, 3fr) minmax(0, 1fr); }
.kpis { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 14px; margin-bottom: 18px; }
.kpi { background: #fff; border: 1px solid var(--line); border-radius: var(--r); padding: 14px 16px; box-shadow: var(--sh); color: var(--ink); text-decoration: none !important; display: flex; flex-direction: column; gap: 6px; transition: transform .15s, box-shadow .15s; }
a.kpi:hover { transform: translateY(-1px); box-shadow: 0 8px 26px rgba(15, 42, 47, .09); }
.kpi-top { display: flex; align-items: center; gap: 9px; }
.kpi-ic { width: 32px; height: 32px; border-radius: 9px; background: var(--brand-l); color: var(--brand); display: grid; place-items: center; }
.kpi-l { font-size: 12.5px; color: var(--muted); font-weight: 600; }
.kpi-v { font-size: 25px; font-weight: 750; letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.kpi-v small { font-size: 14px; color: var(--muted); font-weight: 600; }
.kpi-s { font-size: 12px; color: var(--muted); }
.kpi-amber .kpi-ic { background: var(--amber-l); color: #b45309; } .kpi-red .kpi-ic { background: var(--red-l); color: var(--red); } .kpi-blue .kpi-ic { background: var(--blue-l); color: var(--blue); } .kpi-violet .kpi-ic { background: var(--violet-l); color: var(--violet); } .kpi-green .kpi-ic { background: var(--green-l); color: var(--green); }
.up { color: var(--green); font-weight: 600; } .down { color: var(--red); font-weight: 600; }
.chartbox { position: relative; width: 100%; }
.hero { background: linear-gradient(120deg, #0b2b30 0%, #0e5f67 55%, #0e7c86 100%); color: #e9fbfa; border-radius: 18px; padding: 22px 26px; margin-bottom: 18px; display: flex; align-items: center; justify-content: space-between; gap: 18px; flex-wrap: wrap; position: relative; overflow: hidden; }
.hero::after { content: ''; position: absolute; inset-inline-end: -60px; top: -80px; width: 280px; height: 280px; border-radius: 50%; background: radial-gradient(circle, rgba(251, 191, 36, .28), transparent 65%); }
.hero h1 { font-size: 24px; color: #fff; } .hero p { color: #b6dcdc; margin-top: 4px; }
.hero .btn { position: relative; z-index: 1; }
.hero .btn.ghost { color: #e9fbfa; border-color: rgba(255, 255, 255, .25); } .hero .btn.ghost:hover { background: rgba(255, 255, 255, .1); }
.qa { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; }
.qa a, .qa button { display: flex; align-items: center; gap: 10px; padding: 12px; border: 1px solid var(--line); border-radius: 12px; background: #fff; cursor: pointer; color: var(--ink); font-weight: 600; font-size: 13px; text-decoration: none !important; text-align: start; }
.qa a:hover, .qa button:hover { border-color: var(--brand); background: var(--brand-ll); }
.qa .ic { color: var(--brand); width: 20px; height: 20px; }

/* ------------------------------------------------ list items */
.li { display: flex; align-items: center; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--line2); }
.li:last-child { border-bottom: 0; }
.li-main { flex: 1; min-width: 0; } .li-main b { display: block; font-weight: 600; font-size: 13.5px; } .li-main small { color: var(--muted); font-size: 12.5px; }
.li-date { width: 46px; text-align: center; border-radius: 10px; background: var(--brand-ll); border: 1px solid var(--brand-l); padding: 4px 0; flex: none; }
.li-date b { display: block; font-size: 17px; line-height: 1.1; color: var(--brand-d); } .li-date small { font-size: 10.5px; text-transform: uppercase; color: var(--muted); font-weight: 700; }
.person { display: flex; align-items: center; gap: 10px; min-width: 0; }
.person-t { display: flex; flex-direction: column; min-width: 0; } .person-t b, .person-t a { font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; } .person-t small { color: var(--muted); font-size: 12px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.av { width: 32px; height: 32px; border-radius: 50%; background: var(--av); color: #fff; display: inline-grid; place-items: center; font-weight: 700; font-size: 12px; flex: none; letter-spacing: .02em; }

/* ------------------------------------------------ badges, bars, callouts */
.badge { display: inline-flex; align-items: center; height: 22px; padding: 0 9px; border-radius: 20px; font-size: 11.5px; font-weight: 700; white-space: nowrap; }
.b-green { background: var(--green-l); color: var(--green); } .b-blue { background: var(--blue-l); color: var(--blue); } .b-amber { background: var(--amber-l); color: #b45309; } .b-red { background: var(--red-l); color: var(--red); } .b-violet { background: var(--violet-l); color: var(--violet); } .b-grey { background: var(--grey-l); color: var(--ink2); } .b-teal { background: var(--brand-l); color: var(--brand-d); }
.bar { height: 7px; border-radius: 6px; background: var(--grey-l); overflow: hidden; } .bar i { display: block; height: 100%; background: var(--brand); border-radius: 6px; } .bar i.amber { background: var(--amber); } .bar i.red { background: var(--red); } .bar i.green { background: var(--green); }
.callout { display: flex; gap: 10px; padding: 11px 14px; border-radius: 11px; font-size: 13px; margin-bottom: 14px; align-items: flex-start; }
.callout .ic { margin-top: 1px; } .c-info { background: var(--blue-l); color: #1e3a8a; } .c-warn { background: var(--amber-l); color: #78350f; } .c-ok { background: var(--green-l); color: #14532d; } .c-red { background: var(--red-l); color: #881337; }
.pill { display: inline-flex; gap: 5px; align-items: center; padding: 3px 9px; border-radius: 20px; background: var(--grey-l); font-size: 12px; font-weight: 600; color: var(--ink2); }
.chips { display: flex; gap: 6px; flex-wrap: wrap; }
.empty { text-align: center; padding: 36px 16px; color: var(--muted); }
.empty .ic { width: 34px; height: 34px; color: #a8bcbe; margin-bottom: 8px; } .empty p { margin-bottom: 12px; }
.denied { text-align: center; max-width: 440px; margin: 60px auto; } .denied .ic { width: 44px; height: 44px; color: var(--muted); } .denied h2 { margin: 12px 0 6px; } .denied p { color: var(--muted); margin-bottom: 18px; }
.dl { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 14px 20px; margin: 0; }
.dl dt { font-size: 11.5px; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); font-weight: 700; margin-bottom: 3px; }
.dl dd { margin: 0; font-weight: 500; word-break: break-word; }

/* ------------------------------------------------ tabs */
.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--line); margin-bottom: 18px; overflow-x: auto; scrollbar-width: none; }
.tab { padding: 10px 14px; color: var(--muted); font-weight: 600; font-size: 13.5px; border-bottom: 2px solid transparent; margin-bottom: -1px; white-space: nowrap; text-decoration: none !important; display: flex; gap: 6px; align-items: center; }
.tab:hover { color: var(--ink); } .tab.on { color: var(--brand-d); border-color: var(--brand); }
.tab em { font-style: normal; background: var(--grey-l); color: var(--ink2); border-radius: 10px; padding: 0 7px; font-size: 11.5px; }
.seg { display: inline-flex; background: var(--grey-l); border-radius: 10px; padding: 3px; gap: 2px; }
.seg a, .seg button { border: 0; background: transparent; padding: 6px 12px; border-radius: 8px; font-weight: 600; font-size: 12.5px; color: var(--ink2); cursor: pointer; text-decoration: none !important; }
.seg .on { background: #fff; color: var(--ink); box-shadow: 0 1px 3px rgba(0, 0, 0, .08); }

/* ------------------------------------------------ tables */
.tablewrap { min-width: 0; }
.tbar { display: flex; gap: 8px; align-items: center; margin-bottom: 10px; flex-wrap: wrap; }
.tsearch { display: flex; align-items: center; gap: 7px; height: 36px; padding: 0 10px; border: 1px solid var(--line); border-radius: 10px; background: #fff; color: var(--muted); min-width: 220px; }
.tsearch:focus-within { border-color: var(--brand); box-shadow: 0 0 0 3px var(--brand-l); }
.tsearch input { border: 0; outline: 0; background: transparent; flex: 1; min-width: 0; }
.tbar select, .fsel { height: 36px; border: 1px solid var(--line); border-radius: 10px; padding: 0 10px; background: #fff; font-size: 13px; font-weight: 500; }
.tcount { font-size: 12.5px; color: var(--muted); }
.tscroll { overflow-x: auto; border: 1px solid var(--line); border-radius: 12px; background: #fff; }
.card-b.flush .tscroll { border-inline: 0; border-bottom: 0; border-radius: 0 0 var(--r) var(--r); }
.tbl { width: 100%; border-collapse: collapse; font-size: 13.2px; }
.tbl th { text-align: start; font-size: 11.5px; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); font-weight: 700; padding: 10px 12px; background: #f8fbfb; border-bottom: 1px solid var(--line); white-space: nowrap; user-select: none; }
.tbl th.sortable { cursor: pointer; } .tbl th.sortable:hover { color: var(--ink); }
.tbl td { padding: 10px 12px; border-bottom: 1px solid var(--line2); vertical-align: middle; }
.tbl tbody tr:last-child td { border-bottom: 0; }
.tbl tr.rowlink { cursor: pointer; } .tbl tr.rowlink:hover td { background: var(--brand-ll); }
.tbl.compact td { padding: 7px 10px; }
.tbl .r, .r { text-align: end; } .tbl .c { text-align: center; }
.tbl tfoot td { font-weight: 700; background: #f8fbfb; border-top: 1px solid var(--line); }
.tempty { text-align: center; color: var(--muted); padding: 30px !important; }
.pager { display: flex; justify-content: flex-end; align-items: center; gap: 10px; padding: 10px 2px 0; font-size: 12.5px; color: var(--muted); }
tr.hl td { background: #fffbea; }

/* ------------------------------------------------ forms */
.fgrid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px 16px; }
.fgrid.c1 { grid-template-columns: 1fr; } .fgrid.c3 { grid-template-columns: repeat(3, minmax(0, 1fr)); } .fgrid.c4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.fld { display: flex; flex-direction: column; gap: 5px; min-width: 0; }
.fld.full, .chk.full { grid-column: 1 / -1; }
.fld label { font-size: 12.5px; font-weight: 650; color: var(--ink2); } .fld label i { color: var(--red); font-style: normal; }
.fld input, .fld select, .fld textarea { height: 40px; border: 1px solid #d5e0e0; border-radius: 10px; padding: 0 12px; background: #fff; outline: 0; width: 100%; }
.fld textarea { height: auto; padding: 10px 12px; resize: vertical; }
.fld input:focus, .fld select:focus, .fld textarea:focus { border-color: var(--brand); box-shadow: 0 0 0 3px var(--brand-l); }
.fld input.invalid, .fld select.invalid, .fld textarea.invalid { border-color: var(--red); box-shadow: 0 0 0 3px var(--red-l); }
.fld input:disabled { background: var(--grey-l); }
.fld small { color: var(--muted); font-size: 12px; }
.chk { display: flex; align-items: center; gap: 9px; cursor: pointer; font-weight: 500; flex-wrap: wrap; }
.chk input { width: 17px; height: 17px; accent-color: var(--brand); }
.chk small { width: 100%; color: var(--muted); padding-inline-start: 26px; font-size: 12px; }
.multi { display: flex; flex-wrap: wrap; gap: 6px; }
.pill-chk input { display: none; }
.pill-chk span { display: inline-block; padding: 6px 11px; border: 1px solid var(--line); border-radius: 20px; font-size: 12.5px; font-weight: 600; cursor: pointer; background: #fff; }
.pill-chk input:checked + span { background: var(--brand-l); border-color: var(--brand); color: var(--brand-d); }
.pill-chk input:disabled + span { opacity: .75; cursor: default; }
.fsec { font-size: 12px; text-transform: uppercase; letter-spacing: .06em; font-weight: 750; color: var(--brand-d); margin: 6px 0 -2px; grid-column: 1 / -1; }
.inline-in { height: 34px; border: 1px solid #d5e0e0; border-radius: 8px; padding: 0 9px; width: 90px; text-align: end; font-variant-numeric: tabular-nums; }
.inline-in:focus { outline: 0; border-color: var(--brand); box-shadow: 0 0 0 3px var(--brand-l); }
.inline-in.bad { border-color: var(--red); background: var(--red-l); }

/* ------------------------------------------------ modal */
#modal { position: fixed; inset: 0; z-index: 100; display: none; }
#modal.open { display: block; }
.mback { position: absolute; inset: 0; background: rgba(8, 25, 28, .55); backdrop-filter: blur(2px); animation: fade .15s; }
.mbox { position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%); width: min(640px, calc(100vw - 24px)); max-height: calc(100vh - 40px); background: #fff; border-radius: 18px; box-shadow: var(--sh-l); display: flex; flex-direction: column; animation: pop .18s; }
.mbox.sm { width: min(460px, calc(100vw - 24px)); } .mbox.lg { width: min(860px, calc(100vw - 24px)); } .mbox.xl { width: min(1080px, calc(100vw - 24px)); }
.mbox.guide { width: min(560px, calc(100vw - 24px)); top: 20px; bottom: 20px; transform: translateX(-50%); max-height: none; }
.mbox > form { display: flex; flex-direction: column; min-height: 0; flex: 1; }
.mbox header { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; padding: 18px 22px 12px; border-bottom: 1px solid var(--line2); }
.mbox header h2 { font-size: 18px; } .mbox header p { color: var(--muted); font-size: 13px; margin-top: 3px; }
.mbody { padding: 18px 22px; overflow-y: auto; flex: 1; }
.mbox footer { display: flex; gap: 8px; padding: 14px 22px; border-top: 1px solid var(--line2); align-items: center; flex-wrap: wrap; }
.confirm-t { margin-bottom: 14px; color: var(--ink2); }
@keyframes pop { from { opacity: 0; transform: translate(-50%, -48%) scale(.98); } }
.mbox.guide { animation: none; }
@keyframes fade { from { opacity: 0; } }

/* ------------------------------------------------ toasts */
#toasts { position: fixed; inset-inline-end: 18px; bottom: 18px; z-index: 200; display: flex; flex-direction: column; gap: 10px; width: min(380px, calc(100vw - 36px)); }
.toast { display: flex; gap: 11px; align-items: flex-start; padding: 13px 14px; border-radius: 13px; background: #0f2a2f; color: #e7f5f4; box-shadow: var(--sh-l); transform: translateY(14px); opacity: 0; transition: all .25s; border-inline-start: 4px solid #2dd4bf; }
.toast.in { transform: none; opacity: 1; }
.toast .ic { color: #2dd4bf; margin-top: 1px; } .toast b { display: block; font-size: 13.5px; } .toast p { font-size: 13px; color: #b7d3d3; margin-top: 2px; }
.toast > div { flex: 1; } .toast button { background: none; border: 0; color: #8fb2b4; cursor: pointer; padding: 0; }
.t-error { border-color: #fb7185; } .t-error .ic { color: #fb7185; } .t-info { border-color: #60a5fa; } .t-info .ic { color: #60a5fa; }

/* ------------------------------------------------ role switch + guide */
.rolegrid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.rolecard { display: flex; align-items: center; gap: 11px; text-align: start; padding: 11px 12px; border: 1px solid var(--line); border-radius: 13px; background: #fff; cursor: pointer; min-width: 0; }
.rolecard:hover { border-color: var(--brand); background: var(--brand-ll); }
.rolecard.on { border-color: var(--brand); box-shadow: 0 0 0 3px var(--brand-l); }
.rolecard span { display: flex; flex-direction: column; min-width: 0; flex: 1; } .rolecard b { font-size: 13.5px; } .rolecard small { color: var(--ink2); font-size: 12px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; } .rolecard i { font-style: normal; color: var(--muted); font-size: 11.5px; }
.rolecard > .ic { color: var(--muted); }
.ri { width: 38px; height: 38px; border-radius: 11px; display: grid; place-items: center; flex: none !important; background: var(--brand-l); color: var(--brand-d); }
.ri-principal { background: var(--violet-l); color: var(--violet); } .ri-teacher { background: var(--blue-l); color: var(--blue); } .ri-finance { background: var(--amber-l); color: #b45309; } .ri-parent { background: var(--red-l); color: var(--red); } .ri-student { background: var(--green-l); color: var(--green); }
.viewas { margin-top: 18px; padding: 14px; border: 1px dashed #c9d6d6; border-radius: 13px; background: #fafcfc; }
.viewas h4 { display: flex; gap: 8px; align-items: center; font-size: 14px; } .viewas p { font-size: 12.5px; margin: 3px 0 10px; }
.viewas-f { display: grid; grid-template-columns: 160px 1fr auto; gap: 10px; align-items: end; }
.g-grp { margin-top: 16px; }
.g-role { display: flex; align-items: center; gap: 10px; margin-bottom: 6px; } .g-role b { flex: 1; } .g-role .ri { width: 30px; height: 30px; border-radius: 9px; } .g-role .ri .ic { width: 16px; height: 16px; }
.g-step { display: flex; align-items: center; gap: 11px; padding: 8px 10px; border-radius: 10px; color: var(--ink); text-decoration: none !important; font-weight: 500; }
.g-step:hover { background: var(--brand-ll); }
.g-step span:nth-child(2) { flex: 1; }
.g-step > .ic { color: var(--muted); width: 15px; }
.g-n { width: 24px; height: 24px; border-radius: 50%; display: grid; place-items: center; font-size: 11.5px; font-weight: 700; background: var(--grey-l); color: var(--ink2); flex: none; }
.g-step.done .g-n { background: var(--brand); color: #fff; } .g-step.done .g-n .ic { width: 14px; height: 14px; }
.g-step.done span:nth-child(2) { color: var(--muted); text-decoration: line-through; text-decoration-color: #b5c6c7; }
.g-tip { display: flex; gap: 10px; margin-top: 18px; padding: 12px; background: var(--amber-l); border-radius: 11px; font-size: 13px; color: #78350f; }

/* ------------------------------------------------ login */
.login { min-height: 100vh; display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr); }
.login-hero { background: radial-gradient(1200px 600px at -10% -10%, #14707a 0%, transparent 60%), radial-gradient(800px 500px at 110% 110%, rgba(245, 158, 11, .35), transparent 60%), #0b2226; color: #dff3f2; display: flex; align-items: center; padding: 48px 56px; }
.lh-in { max-width: 560px; }
.lh-brand { display: flex; align-items: center; gap: 13px; margin-bottom: 38px; } .lh-brand b { font-size: 24px; color: #fff; display: block; letter-spacing: -.02em; } .lh-brand span { font-size: 12px; letter-spacing: .14em; text-transform: uppercase; color: #7fc4c4; }
.login-hero h1 { font-size: clamp(30px, 3.6vw, 46px); line-height: 1.08; color: #fff; letter-spacing: -.03em; }
.login-hero > div > p { font-size: 16.5px; color: #a8cfcf; margin: 16px 0 26px; max-width: 480px; }
.lh-feat { list-style: none; padding: 0; margin: 0 0 30px; display: grid; grid-template-columns: 1fr 1fr; gap: 12px 18px; }
.lh-feat li { display: flex; gap: 10px; align-items: center; font-size: 14px; color: #cfe8e7; } .lh-feat .ic { color: #fbbf24; }
.lh-school { display: flex; gap: 10px; align-items: flex-start; padding: 13px 15px; border-radius: 12px; background: rgba(255, 255, 255, .06); border: 1px solid rgba(255, 255, 255, .08); font-size: 13px; color: #b8d6d5; } .lh-school b { color: #fff; } .lh-school .ic { color: #5eead4; }
.login-pane { display: flex; align-items: center; justify-content: center; padding: 40px 32px; background: #fff; }
.lp-in { width: min(640px, 100%); }
.lp-in h2 { font-size: 26px; letter-spacing: -.02em; } .lp-in > p { margin: 6px 0 20px; }
.login-roles { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.lp-email { margin: 18px 0 0; border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px; }
.lp-email summary { cursor: pointer; font-weight: 600; color: var(--ink2); } .lp-email form { margin-top: 14px; display: grid; gap: 14px; }
.lp-note { display: flex; gap: 10px; margin-top: 16px; font-size: 12.5px; color: var(--muted); align-items: flex-start; }
.lp-by { margin-top: 18px; font-size: 12px; color: var(--muted); text-align: center; }

/* ------------------------------------------------ module specifics */
.kanban { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(230px, 1fr); gap: 12px; overflow-x: auto; padding-bottom: 8px; }
.kcol { background: #eef3f3; border-radius: 14px; padding: 10px; min-height: 120px; display: flex; flex-direction: column; gap: 8px; }
.kcol h4 { display: flex; justify-content: space-between; align-items: center; font-size: 12.5px; text-transform: uppercase; letter-spacing: .05em; color: var(--ink2); padding: 2px 4px 4px; }
.kcol h4 em { font-style: normal; background: #fff; border-radius: 10px; padding: 0 7px; font-size: 11.5px; }
.kcard { background: #fff; border: 1px solid var(--line); border-radius: 11px; padding: 10px 11px; cursor: pointer; display: block; color: var(--ink); text-decoration: none !important; }
.kcard:hover { border-color: var(--brand); box-shadow: var(--sh); }
.kcard b { display: block; font-size: 13.5px; } .kcard small { display: block; color: var(--muted); font-size: 12px; }
.kcard .chips { margin-top: 6px; }
.steps { display: flex; gap: 6px; margin-bottom: 18px; flex-wrap: wrap; }
.steps span { display: flex; align-items: center; gap: 7px; font-size: 12.5px; font-weight: 600; color: var(--muted); padding: 6px 12px 6px 6px; border-radius: 20px; background: var(--grey-l); }
.steps span i { font-style: normal; width: 22px; height: 22px; border-radius: 50%; display: grid; place-items: center; background: #fff; font-size: 11.5px; }
.steps span.on { background: var(--brand-l); color: var(--brand-d); } .steps span.on i { background: var(--brand); color: #fff; } .steps span.done i { background: var(--green); color: #fff; }
.timeline { position: relative; padding-inline-start: 18px; }
.timeline::before { content: ''; position: absolute; inset-inline-start: 5px; top: 6px; bottom: 6px; width: 2px; background: var(--line); }
.tl { position: relative; padding: 0 0 14px; } .tl::before { content: ''; position: absolute; inset-inline-start: -17px; top: 5px; width: 10px; height: 10px; border-radius: 50%; background: var(--brand); border: 2px solid #fff; box-shadow: 0 0 0 1px var(--brand); }
.tl b { font-size: 13px; } .tl small { display: block; color: var(--muted); font-size: 12px; }
.profile-h { display: flex; gap: 18px; align-items: center; flex-wrap: wrap; }
.photo { width: 84px; height: 84px; border-radius: 22px; display: grid; place-items: center; color: #fff; font-size: 28px; font-weight: 750; flex: none; }
.profile-h h1 { font-size: 24px; } .profile-h .chips { margin-top: 8px; }
.alertpill { display: inline-flex; gap: 6px; align-items: center; background: var(--red-l); color: var(--red); font-weight: 700; font-size: 12px; padding: 4px 10px; border-radius: 20px; }
.alertpill .ic { width: 14px; height: 14px; }
.att-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(26px, 1fr)); gap: 4px; }
.att-d { aspect-ratio: 1; border-radius: 6px; display: grid; place-items: center; font-size: 10.5px; font-weight: 700; color: #fff; }
.att-P { background: #22a06b; } .att-A { background: var(--red); } .att-L { background: var(--amber); } .att-E { background: var(--violet); } .att-N { background: var(--grey-l); color: var(--muted); }
.legend { display: flex; gap: 14px; flex-wrap: wrap; font-size: 12px; color: var(--muted); margin-top: 10px; } .legend span { display: flex; gap: 6px; align-items: center; } .legend i { width: 10px; height: 10px; border-radius: 3px; display: inline-block; }
.attrow { display: flex; gap: 6px; }
.attbtn { min-width: 38px; height: 34px; border-radius: 9px; border: 1px solid var(--line); background: #fff; font-weight: 700; cursor: pointer; font-size: 12.5px; color: var(--ink2); }
.attbtn:hover { border-color: #b9c9c9; }
.attbtn.on.P { background: #22a06b; color: #fff; border-color: #22a06b; } .attbtn.on.A { background: var(--red); color: #fff; border-color: var(--red); } .attbtn.on.L { background: var(--amber); color: #3b2500; border-color: var(--amber); } .attbtn.on.E { background: var(--violet); color: #fff; border-color: var(--violet); }
.attsum { display: flex; gap: 16px; flex-wrap: wrap; font-weight: 600; font-size: 13px; } .attsum b { font-size: 18px; margin-inline-end: 4px; }
.sticky-bar { position: sticky; bottom: 0; background: rgba(255, 255, 255, .96); backdrop-filter: blur(8px); border-top: 1px solid var(--line); padding: 12px 18px; display: flex; gap: 10px; align-items: center; border-radius: 0 0 var(--r) var(--r); flex-wrap: wrap; z-index: 2; }
.tt { display: grid; grid-template-columns: 74px repeat(5, minmax(120px, 1fr)); border: 1px solid var(--line); border-radius: 14px; overflow: hidden; background: #fff; min-width: 720px; }
.tt > div { border-inline-end: 1px solid var(--line2); border-bottom: 1px solid var(--line2); padding: 8px; min-height: 64px; }
.tt .tth { background: #f8fbfb; font-weight: 700; font-size: 12px; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); min-height: 0; text-align: center; }
.tt .ttp { background: #f8fbfb; font-size: 11.5px; color: var(--muted); display: flex; flex-direction: column; justify-content: center; }
.tt .ttp b { color: var(--ink); font-size: 13px; }
.tt .brk { grid-column: 1 / -1; min-height: 0; padding: 4px; text-align: center; font-size: 11px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: #8aa0a2; background: repeating-linear-gradient(45deg, #f6f9f9, #f6f9f9 8px, #f0f5f5 8px, #f0f5f5 16px); }
.ttc { border-radius: 9px; padding: 7px 9px; height: 100%; font-size: 12px; display: flex; flex-direction: column; gap: 1px; border-inline-start: 3px solid var(--c, var(--brand)); background: color-mix(in srgb, var(--c, var(--brand)) 9%, #fff); cursor: default; }
.ttc b { font-size: 12.5px; color: var(--ink); } .ttc small { color: var(--ink2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ttc.edit { cursor: pointer; } .ttc.edit:hover { filter: brightness(.97); }
.ttc.now { outline: 2px solid var(--amber); }
.tt-empty { height: 100%; border-radius: 9px; border: 1px dashed transparent; display: grid; place-items: center; color: transparent; cursor: pointer; }
.tt-empty:hover { border-color: #c9d6d6; color: var(--muted); }
.scroll-x { overflow-x: auto; }
.cal { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); border: 1px solid var(--line); border-radius: 14px; overflow: hidden; background: #fff; }
.cal-h { padding: 8px; font-size: 11.5px; font-weight: 700; text-transform: uppercase; color: var(--muted); background: #f8fbfb; text-align: center; border-bottom: 1px solid var(--line); }
.cal-d { min-height: 108px; padding: 6px; border-inline-end: 1px solid var(--line2); border-bottom: 1px solid var(--line2); display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.cal-d:nth-child(7n) { border-inline-end: 0; }
.cal-d.out { background: #fafcfc; } .cal-d.out .cal-n { color: #b3c3c4; }
.cal-d.wk { background: #fbfcfc; }
.cal-d.today .cal-n { background: var(--brand); color: #fff; }
.cal-n { font-size: 12px; font-weight: 700; width: 24px; height: 24px; border-radius: 50%; display: grid; place-items: center; color: var(--ink2); }
.cev { font-size: 11.5px; font-weight: 600; padding: 2px 6px; border-radius: 6px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; background: var(--brand-l); color: var(--brand-d); cursor: pointer; }
.cev.Holiday { background: var(--red-l); color: var(--red); } .cev.Exam { background: var(--violet-l); color: var(--violet); } .cev.Parent { background: var(--amber-l); color: #b45309; } .cev.Sports { background: var(--green-l); color: var(--green); } .cev.Training, .cev.Meeting { background: var(--blue-l); color: var(--blue); }
.thread { display: grid; grid-template-columns: 320px minmax(0, 1fr); border: 1px solid var(--line); border-radius: 14px; overflow: hidden; background: #fff; min-height: 480px; }
.th-list { border-inline-end: 1px solid var(--line); overflow-y: auto; max-height: 620px; }
.th-i { display: block; padding: 12px 14px; border-bottom: 1px solid var(--line2); color: var(--ink); text-decoration: none !important; }
.th-i:hover { background: var(--brand-ll); } .th-i.on { background: var(--brand-l); }
.th-i b { display: block; font-size: 13.5px; } .th-i small { color: var(--muted); display: block; font-size: 12px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.th-view { display: flex; flex-direction: column; }
.th-head { padding: 14px 18px; border-bottom: 1px solid var(--line2); } .th-head b { font-size: 15px; } .th-head small { display: block; color: var(--muted); }
.th-msgs { flex: 1; padding: 16px 18px; display: flex; flex-direction: column; gap: 10px; overflow-y: auto; max-height: 460px; background: #fafcfc; }
.msg { max-width: 76%; padding: 10px 13px; border-radius: 14px; background: #fff; border: 1px solid var(--line); }
.msg.me { align-self: flex-end; background: var(--brand); color: #fff; border-color: var(--brand); }
.msg small { display: block; font-size: 11px; opacity: .75; margin-top: 4px; }
.th-send { display: flex; gap: 8px; padding: 12px; border-top: 1px solid var(--line2); }
.th-send textarea { flex: 1; border: 1px solid var(--line); border-radius: 10px; padding: 9px 12px; resize: none; height: 44px; outline: 0; }
.th-send textarea:focus { border-color: var(--brand); }
.ann { padding: 14px 0; border-bottom: 1px solid var(--line2); } .ann:last-child { border-bottom: 0; }
.ann h4 { font-size: 14.5px; margin-bottom: 3px; } .ann p { color: var(--ink2); } .ann small { color: var(--muted); font-size: 12px; display: block; margin-top: 6px; }
.childsw { display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 18px; }
.childsw a { display: flex; align-items: center; gap: 10px; padding: 8px 14px 8px 8px; border-radius: 40px; border: 1px solid var(--line); background: #fff; color: var(--ink); text-decoration: none !important; font-weight: 600; }
.childsw a small { display: block; font-weight: 500; color: var(--muted); font-size: 11.5px; }
.childsw a.on { border-color: var(--brand); background: var(--brand-ll); box-shadow: 0 0 0 3px var(--brand-l); }
.perm { overflow-x: auto; } .perm table { min-width: 900px; } .perm td.c input { width: 16px; height: 16px; accent-color: var(--brand); }
.perm th.rot { white-space: nowrap; font-size: 11px; text-align: center; }
.rptlist a { display: flex; gap: 10px; align-items: center; padding: 10px 12px; border-radius: 10px; color: var(--ink); text-decoration: none !important; font-weight: 600; }
.rptlist a:hover, .rptlist a.on { background: var(--brand-ll); color: var(--brand-d); }
.rptlist h5 { font-size: 11px; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); margin: 14px 12px 4px; }
.rptlist .ic { color: var(--brand); width: 16px; }
.wiz-fee td, .wiz-fee th { padding: 8px 10px; }
.success { text-align: center; padding: 14px 6px 4px; } .success .ok { width: 58px; height: 58px; border-radius: 50%; display: grid; place-items: center; margin: 0 auto 12px; background: var(--green-l); color: var(--green); } .success .ok .ic { width: 30px; height: 30px; }
.success h3 { font-size: 19px; margin-bottom: 6px; } .success p { color: var(--muted); }
.success .btnrow { justify-content: center; margin-top: 16px; }
.mini-stat { display: flex; justify-content: space-between; padding: 8px 0; border-bottom: 1px dashed var(--line); font-size: 13px; } .mini-stat:last-child { border-bottom: 0; } .mini-stat b { font-variant-numeric: tabular-nums; }
.subj-row { display: flex; align-items: center; gap: 10px; padding: 7px 0; border-bottom: 1px solid var(--line2); }
.subj-row:last-child { border-bottom: 0; } .subj-row .grow b { font-weight: 600; } .subj-row small { color: var(--muted); display: block; font-size: 12px; }

/* ------------------------------------------------ printable documents */
.doc { background: #fff; border: 1px solid var(--line); border-radius: 16px; box-shadow: var(--sh); padding: 36px 40px; max-width: 900px; margin: 0 auto; }
.doc-h { display: flex; justify-content: space-between; align-items: flex-start; gap: 20px; padding-bottom: 18px; border-bottom: 2px solid var(--ink); margin-bottom: 20px; }
.doc-school { display: flex; gap: 14px; align-items: center; } .doc-school b { font-size: 19px; display: block; } .doc-school small { color: var(--muted); display: block; font-size: 12px; }
.doc-crest { width: 58px; height: 58px; border-radius: 16px; background: linear-gradient(135deg, #0e7c86, #0b3b40); color: #fbbf24; display: grid; place-items: center; font-weight: 800; font-size: 20px; flex: none; }
.doc-title { text-align: end; } .doc-title h2 { font-size: 22px; letter-spacing: .02em; text-transform: uppercase; } .doc-title small { color: var(--muted); }
.doc .tbl th { background: #f2f6f6; }
.doc-foot { display: grid; grid-template-columns: 1fr 1fr; gap: 30px; margin-top: 34px; }
.sig { border-top: 1px solid var(--ink2); padding-top: 6px; font-size: 12px; color: var(--muted); }
.remark { padding: 12px 14px; background: #f8fbfb; border-radius: 10px; border: 1px solid var(--line2); margin-top: 8px; font-size: 13.2px; }
.stamp { display: inline-block; border: 2px solid var(--green); color: var(--green); font-weight: 800; padding: 4px 12px; border-radius: 8px; transform: rotate(-6deg); letter-spacing: .1em; }
.doc-actions { display: flex; gap: 8px; justify-content: center; margin: 0 auto 16px; max-width: 900px; flex-wrap: wrap; }

@media print {
  body { background: #fff; }
  .side, .top, .bottomnav, .ph-a, .doc-actions, #toasts, .noprint { display: none !important; }
  .main { margin: 0 !important; } .content { padding: 0 !important; }
  .doc { border: 0; box-shadow: none; padding: 0; max-width: none; }
  .card { box-shadow: none; }
}

/* ------------------------------------------------ responsive */
@media (max-width: 1280px) { .g4 { grid-template-columns: repeat(2, minmax(0, 1fr)); } .rolegrid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 1100px) {
  .side { transform: translateX(-100%); transition: transform .25s; box-shadow: var(--sh-l); }
  html[dir=rtl] .side { transform: translateX(100%); }
  body.side-open .side { transform: none; }
  body.side-open .scrim { display: block; position: fixed; inset: 0; background: rgba(8, 25, 28, .45); z-index: 35; }
  .main { margin-inline-start: 0; }
  .only-m { display: inline-grid !important; }
  .g3, .g21, .g12, .g31 { grid-template-columns: minmax(0, 1fr); }
  .login { grid-template-columns: 1fr; } .login-hero { padding: 36px 28px; } .lh-feat { grid-template-columns: 1fr; }
  .thread { grid-template-columns: 1fr; } .th-list { max-height: 260px; border-inline-end: 0; border-bottom: 1px solid var(--line); }
}
@media (max-width: 760px) {
  .content { padding: 16px 14px 90px; }
  .top { padding: 0 10px; gap: 6px; }
  .gsearch { width: auto; flex: 1 1 0; min-width: 0; } .gsearch input { width: 0; } .gsearch input::placeholder { color: transparent; }
  .gs-res { position: fixed; top: 60px; inset-inline: 8px; }
  .top .iconbtn, .rolebtn { flex: none; }
  .yearsel, .yearchip, .rb-t, .rolebtn > .ic { display: none; }
  .rolebtn { padding: 3px; border-radius: 50%; }
  .g2, .g4 { grid-template-columns: minmax(0, 1fr); }
  .kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .kpi { padding: 12px; } .kpi-v { font-size: 20px; }
  .fgrid, .fgrid.c3, .fgrid.c4 { grid-template-columns: 1fr; }
  .rolegrid, .login-roles { grid-template-columns: 1fr; }
  .viewas-f { grid-template-columns: 1fr; }
  .ph h1 { font-size: 20px; }
  .hero { padding: 18px; } .hero h1 { font-size: 20px; }
  .doc { padding: 20px 16px; } .doc-h { flex-direction: column; } .doc-title { text-align: start; }
  .tbl.mcards thead { display: none; }
  .tbl.mcards, .tbl.mcards tbody, .tbl.mcards tr, .tbl.mcards td { display: block; width: 100%; }
  .tbl.mcards tr { border-bottom: 1px solid var(--line); padding: 8px 0; }
  .tbl.mcards td { border: 0; padding: 4px 12px; display: flex; justify-content: space-between; gap: 12px; text-align: end; }
  .tbl.mcards td::before { content: attr(data-l); font-size: 11.5px; font-weight: 700; color: var(--muted); text-transform: uppercase; text-align: start; }
  .tsearch { min-width: 0; flex: 1; }
  .portal .bottomnav { display: grid; grid-template-columns: repeat(5, 1fr); position: fixed; bottom: 0; inset-inline: 0; background: #fff; border-top: 1px solid var(--line); z-index: 30; padding: 6px 4px calc(6px + env(safe-area-inset-bottom)); }
  .bottomnav a { display: flex; flex-direction: column; align-items: center; gap: 2px; font-size: 10.5px; font-weight: 600; color: var(--muted); text-decoration: none !important; padding: 4px 0; }
  .bottomnav a.on { color: var(--brand); }
  .mbox { top: auto; bottom: 0; left: 0; transform: none; width: 100% !important; max-height: 92vh; border-radius: 18px 18px 0 0; animation: slide .2s; }
  .mbox.guide { top: 30px; bottom: 0; transform: none; }
  .cal-d { min-height: 64px; } .cev { font-size: 10px; padding: 1px 4px; }
  .dropdown { position: fixed; top: 60px; inset-inline: 8px; width: auto; }
  .kanban { grid-auto-columns: 80%; }
  #toasts { bottom: 76px; }
}
@keyframes slide { from { transform: translateY(30px); opacity: 0; } }

/* ------------------------------------------------ Ask by Voice (site-wide /assets/voice-nav.js) — keep clear of app controls */
#toasts { bottom: 84px; }
.sticky-bar { padding-inline-end: 200px; }
@media (max-width: 760px) {
  .sticky-bar { padding-inline-end: 18px; padding-bottom: 72px; }
  body:has(.portal) .vn-fab { bottom: 78px; }
  body:has(.portal) .vn-panel { bottom: 142px; }
  #toasts { bottom: 140px; }
}
@media print { .vn-fab, .vn-panel { display: none !important; } }
