:root {
  color-scheme: light;
  font-family: 'Noto Sans Bengali', 'Hind Siliguri', system-ui, sans-serif;
  color: #172c2a;
  background: #f3f7f5;
  font-synthesis: none;
  --brand: #176b58;
  --brand-dark: #105242;
  --brand-soft: #e8f4ef;
  --accent: #a13d55;
  --line: #dce7e2;
  --muted: #647875;
  --shadow: 0 8px 24px rgba(24, 61, 52, .07);
}

* { box-sizing: border-box; }
body { margin: 0; min-height: 100vh; background: radial-gradient(ellipse at 50% -20%, #e2f1e9 0, transparent 46%), #f3f7f5; }
.wrap { max-width: 1180px; margin: 32px auto; padding: 0 22px 48px; }
.card { background: #fff; border: 1px solid var(--line); border-radius: 16px; padding: 24px; margin: 18px 0; box-shadow: var(--shadow); }
.narrow { max-width: 500px; margin: 9vh auto; }
.brand { color: var(--brand-dark); font-size: 1.55rem; font-weight: 700; letter-spacing: -.02em; }
.muted { color: var(--muted); }
h1, h2, h3 { color: #183d35; line-height: 1.35; margin-top: 0; }
h1 { font-size: clamp(1.45rem, 3vw, 2rem); }
h2 { font-size: 1.32rem; }
p { line-height: 1.7; }
a { color: var(--brand); text-underline-offset: 3px; }
a:hover { color: var(--accent); }
.grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 18px; }
.field { display: grid; gap: 7px; margin: 12px 0; color: #354d48; font-size: .96rem; font-weight: 500; }
input, select, textarea { font: inherit; color: #183d35; background: #fff; padding: 10px 12px; border: 1px solid #cbd9d3; border-radius: 9px; width: 100%; min-height: 43px; transition: border-color .15s, box-shadow .15s; }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--brand); box-shadow: 0 0 0 3px rgba(23, 107, 88, .13); }
.password-label-row { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; }
.password-label-row a { font-size: .9rem; font-weight: 500; }
.password-wrap { display: block; position: relative; width: 100%; }
.password-wrap > input { padding-right: 48px; }
.password-toggle { position: absolute; z-index: 1; top: 50%; right: 5px; width: 36px; height: 36px; padding: 7px; transform: translateY(-50%); background: transparent; color: #52716a; border-radius: 7px; }
.password-toggle:hover { transform: translateY(-50%); background: var(--brand-soft); color: var(--brand-dark); }
.password-toggle svg { display: block; width: 20px; height: 20px; }
button, .button { font: inherit; font-weight: 600; border: 0; border-radius: 9px; background: var(--brand); color: #fff; padding: 10px 16px; cursor: pointer; text-decoration: none; display: inline-flex; align-items: center; justify-content: center; transition: background .15s, transform .15s; }
button:hover, .button:hover { background: var(--brand-dark); color: #fff; transform: translateY(-1px); }
button:focus-visible, a:focus-visible { outline: 3px solid #e5a8b5; outline-offset: 2px; }
.row { display: flex; gap: 14px; align-items: center; justify-content: space-between; flex-wrap: wrap; }
nav.card { gap: 8px; padding: 14px 16px; position: sticky; top: 10px; z-index: 5; }
nav.card > a { display: inline-flex; align-items: center; padding: 7px 11px; border-radius: 8px; background: #f2f7f4; color: #285b4e; text-decoration: none; font-weight: 500; white-space: nowrap; }
nav.card > a:hover { background: var(--brand-soft); color: var(--brand-dark); }
nav.card form { margin-left: auto; }
.notice, .good { padding: 12px 15px; border-radius: 10px; border: 1px solid transparent; }
.notice { background: #fff5e7; border-color: #f2dfbd; color: #79520c; }
.good { background: #e9f6ee; border-color: #c9e8d4; color: #17623a; }
table { width: 100%; border-collapse: separate; border-spacing: 0; font-size: .96rem; }
th, td { text-align: left; padding: 12px 13px; border-bottom: 1px solid #e8eeeb; vertical-align: middle; }
th { background: #f2f7f4; color: #31564d; font-weight: 600; white-space: nowrap; }
thead th:first-child { border-radius: 9px 0 0 0; }
thead th:last-child { border-radius: 0 9px 0 0; }
tbody tr:hover { background: #f8fbf9; }
td form { margin: 0; }
td button { padding: 7px 12px; }
.logout { margin-left: auto; }
@media (max-width: 700px) {
  .wrap { margin: 18px auto; padding: 0 13px 32px; }
  .card { padding: 18px; margin: 13px 0; border-radius: 13px; }
  nav.card { position: static; justify-content: flex-start; }
  nav.card form { margin-left: 0; }
  .grid { grid-template-columns: repeat(auto-fit, minmax(155px, 1fr)); gap: 12px; }
  table { min-width: 650px; font-size: .9rem; }
}
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { transition: none !important; scroll-behavior: auto !important; } }

/* Maroon workspace shell inspired by the supplied dashboard reference. */
:root { --brand:#870038; --brand-dark:#68002b; --brand-soft:#f8eaf0; --accent:#b04768; --line:#e1e5e9; --muted:#78828e; --shadow:0 8px 26px rgba(38,25,35,.06); }
body { background:#f4f5f7; }
h1,h2,h3 { color:#262b35; }
a { color:var(--brand); }
button,.button { background:var(--brand); }
button:hover,.button:hover { background:var(--brand-dark); }
input:focus,select:focus,textarea:focus { border-color:var(--brand); box-shadow:0 0 0 3px rgba(135,0,56,.12); }
body.app-authenticated .wrap { max-width:none; margin:0 24px 0 278px; padding:26px 16px 48px; }
.sidebar { position:fixed; z-index:20; inset:0 auto 0 0; width:254px; display:flex; flex-direction:column; overflow:auto; padding:18px 12px 14px; color:#fff; background:linear-gradient(180deg,#870038,#70002f); box-shadow:5px 0 24px rgba(57,0,24,.12); }
.sidebar-back-btn { display: inline-flex; align-items: center; justify-content: center; width: 30px; height: 30px; margin-bottom: 10px; border: 0; border-radius: 50%; background: rgba(255,255,255,.14); color: #fff; font-size: 15px; cursor: pointer; }
.sidebar-back-btn:hover { background: rgba(255,255,255,.26); }
.sidebar-brand { display:flex; align-items:center; gap:12px; padding:8px 8px 20px; color:#fff; text-decoration:none; border-bottom:1px solid rgba(255,255,255,.18); }
.sidebar-brand:hover { color:#fff; }
.brand-mark { width:44px; height:44px; display:grid; place-items:center; border-radius:13px; color:#fff; background:rgba(255,255,255,.16); font-size:1.5rem; font-weight:700; }
.sidebar-brand strong,.sidebar-brand small,.user-info strong,.user-info small { display:block; }
.sidebar-brand small,.user-info small { margin-top:3px; color:rgba(255,255,255,.68); font-size:.76rem; }
.side-links { display:grid; gap:5px; padding-top:20px; }
.side-links a { display:flex; align-items:center; gap:12px; padding:11px 12px; border-radius:9px; text-decoration:none; color:rgba(255,255,255,.88); font-size:.94rem; transition:background .15s,color .15s; }
.side-links a span { width:20px; text-align:center; color:#f3c9d8; font-size:1.1rem; }
.side-links a:hover,.side-links a:focus-visible { color:#6b002b; background:#fff; }
.side-links a:hover span { color:var(--brand); }
.sidebar-user { display:flex; align-items:center; gap:10px; margin-top:auto; padding:14px 4px 0; border-top:1px solid rgba(255,255,255,.18); }
.user-avatar { width:36px; height:36px; display:grid; place-items:center; border-radius:50%; background:#fff; color:var(--brand); }
.user-info { min-width:0; flex:1; }
.user-info strong { overflow:hidden; text-overflow:ellipsis; white-space:nowrap; font-size:.86rem; }
.user-info small { font-size:.72rem; }
.sidebar-user form { margin:0; }
.sidebar-user button { width:34px; height:34px; padding:0; background:rgba(255,255,255,.14); }
.sidebar-user button:hover { background:rgba(255,255,255,.28); }
.app-authenticated .card { border-color:#e3e6ea; border-radius:15px; box-shadow:0 6px 22px rgba(31,35,43,.045); }
.app-authenticated .card h1 { margin-bottom:18px; }
.app-authenticated th { background:#f4f5f7; color:#4d5662; }
.photo-upload { max-width:440px; padding:12px 14px; border:1px dashed #cbd1d8; border-radius:12px; background:#fafbfc; }
.photo-upload input { padding:8px; }
.student-photo-field { display:flex; align-items:center; gap:14px; max-width:540px; }
.student-photo-field .field { flex:1; }
.student-photo-preview,.student-photo-placeholder { width:74px; height:74px; border-radius:50%; object-fit:cover; display:grid; place-items:center; background:#f8eaf0; color:#870038; border:2px solid #f1d4df; }
@media(max-width:900px) { body.app-authenticated .wrap { margin-left:238px; margin-right:12px; padding:18px 8px 35px; } .sidebar { width:220px; } }
@media(max-width:650px) { .sidebar { position:relative; width:auto; max-height:220px; padding:10px; } .sidebar-brand { padding-bottom:10px; } .side-links { display:flex; overflow:auto; padding:12px 0 3px; } .side-links a { white-space:nowrap; padding:8px 10px; background:rgba(255,255,255,.1); } .sidebar-user { display:none; } body.app-authenticated .wrap { margin:0; padding:12px 10px 28px; } .student-photo-field { align-items:flex-start; } }
.dashboard-hero { display:flex; align-items:center; justify-content:space-between; min-height:150px; padding:30px 34px; color:#fff; background:linear-gradient(110deg,#870038,#67002e); border:0!important; }
.dashboard-hero h1 { color:#fff; margin:7px 0; font-size:clamp(1.5rem,3vw,2.2rem); }
.dashboard-hero p { margin:0 0 8px; color:rgba(255,255,255,.78); }
.dashboard-hero small,.dashboard-hero span { color:rgba(255,255,255,.78); }
.dashboard-hero b { width:72px; height:72px; display:grid; place-items:center; border-radius:22px; color:#fff; background:rgba(255,255,255,.13); font-size:2.3rem; }
.student-current-photo { display:flex; align-items:center; gap:14px; padding:12px 18px; color:var(--muted); }
.student-thumb { width:42px; height:42px; border-radius:50%; object-fit:cover; }
.student-thumb-empty { width:42px; height:42px; display:inline-grid; place-items:center; border-radius:50%; color:var(--brand); background:var(--brand-soft); }

/* Dashboard refresh based on the supplied Baridhara reference. */
.sidebar-brand-logo { width:48px;height:48px;flex:0 0 48px;object-fit:contain;border-radius:12px;background:#fff;padding:4px; }
.user-avatar-photo { object-fit:cover; }
.sidebar-backdrop { display:none; }
.dashboard-topbar { position:sticky;top:0;z-index:12;min-height:64px;margin:0 0 20px;padding:9px 16px;background:rgba(255,255,255,.96);border:1px solid #e7e9ed;border-radius:0 0 14px 14px;box-shadow:0 4px 18px rgba(35,24,31,.045);backdrop-filter:blur(10px); }
.dashboard-topbar .sidebar-toggle { width:40px;height:40px;padding:0;background:transparent;color:#28313a;font-size:24px; }
.dashboard-topbar .sidebar-toggle:hover { background:#f3edf0;color:var(--brand);transform:none; }
.dashboard-search,.dashboard-search-placeholder { display:flex;align-items:center;gap:10px;width:min(430px,48vw);height:42px;padding:0 14px;border-radius:24px;background:#f2f4f7;color:#657080; }
.dashboard-search>span { font-size:24px;line-height:1; }
.dashboard-search input { min-height:0;padding:7px 2px;border:0;background:transparent;box-shadow:none;font-size:14px; }
.dashboard-search input:focus { box-shadow:none; }
.dashboard-search-placeholder { margin-right:auto; }
.topbar-notice { display:grid;place-items:center;width:40px;height:40px;border-radius:50%;font-size:22px;text-decoration:none;background:#faf5f7; }
.topbar-account { display:flex;align-items:center;gap:9px;color:#252b34;text-decoration:none;font-weight:600; }
.topbar-account img,.topbar-avatar { width:38px;height:38px;border-radius:50%;object-fit:cover; }
.topbar-avatar { display:grid;place-items:center;background:#f7eaf0;color:var(--brand); }
.dashboard-hero { position:relative;display:flex;align-items:center;justify-content:space-between;min-height:146px;overflow:hidden;padding:24px 28px;color:#fff;background:linear-gradient(105deg,#78002f 0%,#95083f 55%,#55122f 100%);border:0!important; }
.dashboard-hero:after { content:"";position:absolute;inset:0;background-image:url('dashboard-mosque.svg'),radial-gradient(ellipse at 84% 110%,rgba(255,205,162,.22),transparent 36%),linear-gradient(90deg,transparent 50%,rgba(58,0,31,.22));background-repeat:no-repeat;background-position:center bottom,center,center;background-size:100% 100%,auto,auto;pointer-events:none; }
.dashboard-hero .dashboard-cover-photo { position:absolute;inset:0;width:100%;height:100%;object-fit:cover;opacity:.38; }
.hero-date,.hero-copy { position:relative;z-index:1; }
.hero-date { align-self:flex-start;display:flex;align-items:center;gap:9px;padding:8px 11px;border-radius:10px;background:rgba(255,255,255,.12);font-weight:600;font-size:13px; }
.hero-date>span:first-child { font-size:20px; }
.hero-date small { display:block;font-size:10px;color:rgba(255,255,255,.72);font-weight:400; }
.hero-copy { margin:auto auto auto 8%; }
.hero-copy small { color:rgba(255,255,255,.8); }
.dashboard-hero .hero-copy h1 { margin:5px 0;font-size:clamp(1.35rem,2.4vw,2rem);color:#fff; }
.dashboard-hero .hero-copy p { margin:0;color:rgba(255,255,255,.82); }
.dashboard-stats { display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:14px;margin:0 0 16px; }
.dashboard-stats .stat-card { display:flex;align-items:center;gap:14px;min-width:0;margin:0;padding:16px;border-radius:13px; }
.stat-icon { display:grid;place-items:center;width:52px;height:52px;flex:0 0 52px;border-radius:13px;background:#f9e7ee;color:#d32755;font-size:26px; }
.stat-card>div { display:grid;gap:2px;min-width:0; }
.stat-card small { color:#66717d;font-size:12px; }
.stat-card strong { color:#30303a;font-size:24px;line-height:1.25;overflow-wrap:anywhere; }
.stat-card a,.stat-card>div>span { color:#68727d;font-size:11px;text-decoration:none; }
.stat-card a:hover { text-decoration:underline; }
.stat-teachers .stat-icon { background:#e8f2ff;color:#1672d5; }
.stat-attendance .stat-icon { background:#e7f8ee;color:#0c9d50; }
.stat-fees .stat-icon { background:#fff0e2;color:#ef7d16; }
.dashboard-quick,.dashboard-list,.insight-card { margin:0;padding:17px;border-radius:13px; }
.dashboard-quick h2,.insight-card h2,.dashboard-list h2 { margin:0 0 13px;font-size:16px; }
.quick-actions { display:grid;grid-template-columns:repeat(6,minmax(0,1fr));gap:10px; }
.quick-action { display:flex;flex-direction:column;align-items:center;justify-content:center;gap:5px;min-height:78px;padding:10px 6px;border-radius:11px;color:#fff;text-decoration:none;text-align:center;transition:transform .15s,filter .15s; }
.quick-action:hover { color:#fff;filter:brightness(1.06);transform:translateY(-2px); }
.quick-action>span { font-size:23px;line-height:1; }
.quick-action strong { font-size:12px; }
.quick-maroon { background:linear-gradient(135deg,#8b003c,#b52355); }.quick-green{background:linear-gradient(135deg,#079a4c,#19bb67)}.quick-blue{background:linear-gradient(135deg,#0872e9,#1597ff)}.quick-orange{background:linear-gradient(135deg,#f47b0b,#ffa21e)}.quick-purple{background:linear-gradient(135deg,#6330a7,#8255c2)}.quick-teal{background:linear-gradient(135deg,#009b9b,#12b6b0)}
.dashboard-insights { display:grid;grid-template-columns:1fr 1fr 1.15fr;gap:14px;margin:16px 0; }
.donut-layout { display:flex;align-items:center;gap:14px;min-height:122px; }
.dashboard-donut { display:grid;place-items:center;width:104px;height:104px;flex:0 0 104px;border-radius:50%;background:conic-gradient(#14a754 var(--dashboard-percent),#e8edf0 0);position:relative; }
.dashboard-donut:before { content:"";position:absolute;inset:12px;border-radius:50%;background:#fff; }
.dashboard-donut strong { position:relative;z-index:1;font-size:21px;color:#242c35; }
.donut-fees { background:conic-gradient(#14a754 var(--dashboard-percent),#e8edf0 0); }
.legend-list { display:grid;gap:8px;min-width:0;font-size:12px; }
.legend-list>span { display:flex;align-items:center;gap:6px;white-space:nowrap; }
.legend-list b { margin-left:auto; }
.legend-list small { color:#7b858f; }
.legend-dot { display:inline-block;width:9px;height:9px;flex:0 0 9px;border-radius:50%; }.dot-green{background:#14a754}.dot-red{background:#ee3551}
.text-link { display:inline-block;margin-top:7px;font-size:12px;text-decoration:none; }
.class-bars { display:grid;gap:11px;min-height:122px;align-content:center; }
.class-bar-row { display:grid;grid-template-columns:minmax(52px,82px) 1fr 28px;align-items:center;gap:8px;font-size:11px; }
.class-bar-row>span { overflow:hidden;text-overflow:ellipsis;white-space:nowrap; }
.class-bar-row>div { height:10px;border-radius:8px;background:#f0f1f3;overflow:hidden; }.class-bar-row i{display:block;height:100%;border-radius:8px;background:linear-gradient(90deg,#aa1e52,#e34371)}
.dashboard-lower { display:grid;grid-template-columns:minmax(0,1.7fr) minmax(250px,1fr);gap:14px; }
.section-heading { display:flex;align-items:center;justify-content:space-between;gap:10px; }
.section-heading h2 { margin:0 0 12px; }
.section-heading>a { margin-bottom:12px;font-size:12px;text-decoration:none;white-space:nowrap; }
.dashboard-list table { min-width:550px;font-size:12px; }.dashboard-list .table-scroll{overflow:auto;}
.dashboard-list th,.dashboard-list td { padding:8px 7px; }
.student-name-cell { display:flex;align-items:center;gap:7px;white-space:nowrap; }
.student-mini-avatar { display:grid;place-items:center;width:27px;height:27px;flex:0 0 27px;overflow:hidden;border-radius:50%;background:#f5e6ed;color:var(--brand);font-style:normal; }
.student-mini-avatar img { width:100%;height:100%;object-fit:cover; }
.status-pill { display:inline-block;padding:3px 8px;border-radius:12px;background:#e7f7ed;color:#168141;font-size:11px;white-space:nowrap; }
.notice-item { display:flex;align-items:center;gap:10px;padding:10px 0;border-bottom:1px solid #edf0f2;color:#25313a;text-decoration:none; }
.notice-item:last-child { border-bottom:0; }.notice-icon { display:grid;place-items:center;width:34px;height:34px;flex:0 0 34px;border-radius:10px;background:#f2eaf8;color:#7338a4; }
.notice-item strong,.notice-item small { display:block; }.notice-item strong { font-size:12px;font-weight:500;line-height:1.5; }.notice-item small { margin-top:3px;color:#7b858f;font-size:10px; }
.empty-state { padding:18px 8px;color:#78828e;text-align:center;font-size:13px; }
@media(max-width:1100px){.dashboard-stats{grid-template-columns:repeat(2,minmax(0,1fr))}.dashboard-insights{grid-template-columns:repeat(2,minmax(0,1fr))}.class-insight{grid-column:1/-1}.class-bars{grid-template-columns:repeat(2,minmax(0,1fr));min-height:auto}.quick-actions{grid-template-columns:repeat(3,minmax(0,1fr))}}
@media(max-width:700px){body.app-authenticated .sidebar{position:fixed;inset:0 auto 0 0;width:min(280px,84vw);height:100dvh;max-height:none;transform:translateX(-105%);transition:transform .22s ease;z-index:30}.app-authenticated.sidebar-open .sidebar{transform:translateX(0)}.app-authenticated .side-links{display:grid;overflow-y:auto;overflow-x:hidden;align-content:start;padding-top:14px}.app-authenticated .sidebar-user{display:flex}.sidebar-backdrop{position:fixed;inset:0;z-index:29;border:0;border-radius:0;background:rgba(18,14,18,.5);padding:0}.app-authenticated.sidebar-open .sidebar-backdrop{display:block}.dashboard-topbar{min-height:56px;margin:0 -10px 14px;padding:7px 10px;border-radius:0}.dashboard-search,.dashboard-search-placeholder{width:auto;flex:1;min-width:0;height:38px;padding:0 10px}.dashboard-search input{font-size:12px}.topbar-account{gap:5px;font-size:12px}.topbar-account img,.topbar-avatar{width:32px;height:32px}.topbar-account>span:nth-child(2){max-width:82px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.topbar-notice{width:32px;height:32px}.dashboard-topbar .sidebar-toggle{width:34px;height:36px;font-size:22px}.dashboard-hero{min-height:140px;padding:17px 15px;display:block}.hero-date{display:inline-flex;margin-bottom:14px;font-size:11px}.hero-copy{margin:0}.dashboard-hero .hero-copy h1{font-size:20px}.dashboard-hero .hero-copy p{font-size:12px}.dashboard-stats{gap:9px}.dashboard-stats .stat-card{gap:9px;padding:11px}.stat-icon{width:40px;height:40px;flex-basis:40px;font-size:21px}.stat-card small{font-size:10px}.stat-card strong{font-size:19px}.stat-card a,.stat-card>div>span{font-size:10px}.dashboard-quick,.dashboard-list,.insight-card{padding:13px}.quick-actions{gap:7px}.quick-action{min-height:68px;padding:8px 4px}.quick-action strong{font-size:10px}.dashboard-insights{grid-template-columns:1fr;gap:10px}.class-insight{grid-column:auto}.class-bars{grid-template-columns:1fr}.dashboard-lower{grid-template-columns:1fr;gap:10px}.donut-layout{min-height:105px}.dashboard-donut{width:90px;height:90px;flex-basis:90px}}
@media(max-width:390px){.dashboard-stats .stat-card{align-items:flex-start;flex-direction:column}.dashboard-topbar{gap:5px}.topbar-account>span:nth-child(2){max-width:55px}.quick-action strong{font-size:9px}}
/* Login screen accent */
body.app-login { background:radial-gradient(ellipse at 50% 0,#f6e4eb 0,transparent 48%),#f4f5f7; }
.app-login .narrow { border-top:4px solid #870038; }
.app-login .brand { color:#870038; }
.app-login h1 { color:#2c2530; }
.app-login .password-label-row a { color:#870038; }
.student-current-photo { display:flex; align-items:center; gap:14px; padding:12px 18px; color:var(--muted); }
.student-thumb { width:42px; height:42px; border-radius:50%; object-fit:cover; }
.student-thumb-empty { width:42px; height:42px; display:inline-grid; place-items:center; border-radius:50%; color:var(--brand); background:var(--brand-soft); }

/* Browser print layout shared across the authenticated workspace. */
.print-control{position:fixed;right:92px;bottom:22px;z-index:50;border:0;border-radius:999px;padding:11px 17px;background:#870038;color:#fff;box-shadow:0 5px 18px rgba(40,0,20,.24);font-weight:700;cursor:pointer}
@media print {
  @page { margin: 12mm; }
  body,body.app-authenticated { background:#fff!important;color:#111!important; }
  .sidebar,.sidebar-backdrop,.print-control,.no-print,form,button,.button,nav,.topbar,.dashboard-topbar { display:none!important; }
  body.app-authenticated .wrap,.wrap { display:block!important;width:auto!important;max-width:none!important;margin:0!important;padding:0!important; }
  .card,.app-authenticated .card { box-shadow:none!important;border:0!important;border-radius:0!important;padding:8px 0!important;margin:0 0 10px!important;background:#fff!important; }
  h1 { font-size:19pt!important;margin:0 0 10px!important; }
  h2 { font-size:14pt!important;margin:10px 0 7px!important; }
  div[style*="overflow"] { overflow:visible!important; }
  table { width:100%!important;min-width:0!important;border-collapse:collapse!important;font-size:9pt!important; }
  thead { display:table-header-group; }
  tr { break-inside:avoid;page-break-inside:avoid; }
  th,td { border:1px solid #777!important;padding:5px!important;color:#111!important; }
  th { background:#eee!important;-webkit-print-color-adjust:exact;print-color-adjust:exact; }
  a { color:#111!important;text-decoration:none!important; }
  img { max-width:100%!important; }
}

/* ---- Nested sidebar sub-menus (added for expandable module groups) ---- */
.side-group { border-radius: 9px; }
.side-group > summary { display: flex; align-items: center; gap: 12px; padding: 11px 12px; border-radius: 9px; cursor: pointer; list-style: none; color: rgba(255,255,255,.88); font-size: .94rem; }
.side-group > summary::-webkit-details-marker { display: none; }
.side-group > summary::marker { content: ''; }
.side-group > summary .grp-icon { width: 20px; text-align: center; color: #f3c9d8; font-size: 1.1rem; }
.side-group > summary a { flex: 1; min-width: 0; color: inherit; text-decoration: none; }
.side-group > summary .grp-chevron { margin-left: auto; font-size: .8rem; color: rgba(255,255,255,.6); transition: transform .15s; }
.side-group[open] > summary .grp-chevron { transform: rotate(90deg); }
.side-group > summary:hover { background: rgba(255,255,255,.12); }
.side-group > summary:hover a { color: inherit; }
.side-sub { display: grid; gap: 2px; padding: 2px 0 6px 30px; }
.side-sub a { display: block; padding: 8px 10px; border-radius: 7px; color: rgba(255,255,255,.72); text-decoration: none; font-size: .85rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.side-sub a:hover, .side-sub a.active { color: #6b002b; background: #fff; }
.side-links a.active { color: #6b002b; background: #fff; }
.side-links a.active span { color: var(--brand); }
@media (max-width: 650px) {
  .side-links { display: grid; overflow: visible; }
  .side-group > summary { white-space: nowrap; background: rgba(255,255,255,.1); }
  .side-sub { padding-left: 24px; }
}

/* ---- Module hub landing pages (card grid, e.g. সিস্টেম সেটিংস) ---- */
.hub-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 16px; }
.hub-card { position: relative; display: flex; flex-direction: column; align-items: center; gap: 10px; padding: 22px 12px; background: #fff; border: 1px solid var(--line); border-radius: 14px; text-decoration: none; color: #2c333c; text-align: center; font-weight: 600; font-size: .92rem; box-shadow: var(--shadow); transition: transform .15s, box-shadow .15s; }
.hub-card:hover { transform: translateY(-3px); box-shadow: 0 10px 26px rgba(38,25,35,.1); color: var(--brand-dark); }
.hub-card-icon { width: 52px; height: 52px; display: grid; place-items: center; border-radius: 14px; background: var(--brand-soft); color: var(--brand); font-size: 24px; }
.hub-card.is-placeholder { opacity: .85; }
.hub-card .hub-badge { position: absolute; top: 10px; right: 10px; font-size: 10px; font-weight: 700; padding: 2px 8px; border-radius: 20px; background: #fff0e2; color: #c8690f; }
@media (max-width: 700px) {
  .hub-grid { grid-template-columns: repeat(auto-fill, minmax(118px, 1fr)); gap: 10px; }
  .hub-card { padding: 16px 8px; font-size: .82rem; }
  .hub-card-icon { width: 44px; height: 44px; font-size: 20px; }
}

/* ---- Breadcrumb + banner header for inner pages ---- */
.breadcrumb-trail { margin: 0 0 10px; font-size: 12px; color: var(--muted); }
.breadcrumb-trail a { color: var(--muted); text-decoration: none; }
.breadcrumb-trail a:hover { color: var(--brand); }
.section-banner { position: relative; overflow: hidden; display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 92px; padding: 20px 24px; margin: 0 0 18px; color: #fff; background: linear-gradient(105deg,#78002f 0%,#95083f 55%,#55122f 100%); border-radius: 16px; }
.section-banner-head { display: flex; align-items: center; gap: 14px; min-width: 0; }
.section-banner-icon { width: 46px; height: 46px; flex: 0 0 46px; display: grid; place-items: center; border-radius: 13px; background: rgba(255,255,255,.16); font-size: 22px; }
.section-banner h1 { margin: 2px 0 4px; color: #fff; font-size: clamp(1.15rem, 2.4vw, 1.5rem); }
.section-banner p { margin: 0; color: rgba(255,255,255,.82); font-size: .85rem; }
.section-banner-back { display: inline-flex; align-items: center; gap: 6px; flex: 0 0 auto; padding: 8px 14px; border-radius: 9px; background: rgba(255,255,255,.16); color: #fff; text-decoration: none; font-size: .85rem; font-weight: 600; white-space: nowrap; }
.section-banner-back:hover { background: rgba(255,255,255,.28); color: #fff; }
.coming-soon-card { display: flex; flex-direction: column; align-items: center; gap: 10px; padding: 46px 20px; text-align: center; color: var(--muted); }
.coming-soon-icon { width: 62px; height: 62px; display: grid; place-items: center; border-radius: 18px; background: var(--brand-soft); color: var(--brand); font-size: 28px; }
@media (max-width: 700px) {
  .section-banner { padding: 16px; min-height: auto; flex-direction: column; align-items: flex-start; }
  .section-banner-back { align-self: flex-start; }
}

/* ---- Topbar action cluster (AI button, notifications, role badge, theme, language, logout) ---- */
.dashboard-topbar { flex-wrap: nowrap; gap: 10px; }
.topbar-actions { display: flex; align-items: center; gap: 8px; margin-left: auto; flex: 0 0 auto; }
.topbar-ai { display: inline-flex; align-items: center; gap: 6px; height: 40px; padding: 0 14px; border-radius: 999px; background: linear-gradient(135deg,#0f9d78,#0c7a5e); color: #fff; text-decoration: none; font-weight: 700; font-size: 13px; white-space: nowrap; }
.topbar-ai:hover { color: #fff; filter: brightness(1.08); }
.topbar-ai-dot { font-size: 14px; }
.topbar-ai-plus { display: inline-grid; place-items: center; width: 16px; height: 16px; border-radius: 50%; background: rgba(255,255,255,.25); font-size: 11px; }
.topbar-icon-btn { display: inline-flex; align-items: center; gap: 4px; height: 40px; width: 40px; padding: 0; border-radius: 50%; background: #f3edf0; color: #28313a; text-decoration: none; font-size: 17px; justify-content: center; border: 0; cursor: pointer; }
.topbar-icon-btn:hover { background: var(--brand-soft); color: var(--brand-dark); }
.topbar-lang { width: auto; padding: 0 12px; border-radius: 20px; font-size: 13px; font-weight: 600; gap: 6px; }
.topbar-role-badge { display: inline-flex; align-items: center; gap: 8px; height: 40px; padding: 0 12px 0 6px; border-radius: 999px; background: #f3edf0; color: #262b35; text-decoration: none; font-size: 13px; font-weight: 600; white-space: nowrap; }
.topbar-role-badge:hover { background: var(--brand-soft); color: var(--brand-dark); }
.topbar-role-avatar { display: grid; place-items: center; width: 28px; height: 28px; border-radius: 50%; background: var(--brand); color: #fff; font-size: 13px; font-weight: 700; }
.topbar-logout-form { margin: 0; }
@media (max-width: 900px) {
  .topbar-actions { gap: 5px; }
  .topbar-ai span:not(.topbar-ai-dot) { display: none; }
  .topbar-ai { width: 40px; height: 40px; padding: 0; justify-content: center; border-radius: 50%; }
  .topbar-lang span:not([aria-hidden]) { display: none; }
  .topbar-role-badge { padding: 0 8px 0 4px; }
}
@media (max-width: 560px) {
  .topbar-role-badge span:not(.topbar-role-avatar) { display: none; }
  .topbar-role-badge { width: 40px; padding: 0; justify-content: center; }
  .topbar-lang { display: none; }
}

/* ---- Support contact banner ---- */
.support-banner { display: flex; align-items: center; gap: 18px; margin: 0 0 16px; padding: 16px 20px; color: #fff; background: linear-gradient(105deg,#0e5a46,#123f34); border: 0 !important; }
.support-banner-phone { display: flex; align-items: center; gap: 10px; flex: 0 0 auto; padding-right: 18px; border-right: 1px solid rgba(255,255,255,.22); font-size: 22px; }
.support-banner-phone small { display: block; color: rgba(255,255,255,.72); font-size: 11px; font-weight: 400; }
.support-banner-phone strong { display: block; font-size: 17px; }
.support-banner-copy strong { display: block; margin-bottom: 3px; color: #ffe8b0; font-size: 13px; }
.support-banner-copy p { margin: 0; color: rgba(255,255,255,.78); font-size: 12px; line-height: 1.6; }
@media (max-width: 700px) {
  .support-banner { flex-direction: column; align-items: flex-start; gap: 10px; padding: 14px 16px; }
  .support-banner-phone { border-right: 0; padding-right: 0; }
}

/* ---- Period filter row + license badge ---- */
.period-filter-row { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 12px; margin: 0 0 16px; padding: 12px 16px; }
.period-filter { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.period-filter-label { color: var(--muted); font-size: 13px; font-weight: 600; margin-right: 4px; }
.period-chip { display: inline-flex; align-items: center; padding: 7px 14px; border-radius: 999px; background: #f2f4f7; color: #4d5662; text-decoration: none; font-size: 12px; font-weight: 600; border: 1px solid transparent; }
.period-chip:hover { background: var(--brand-soft); color: var(--brand-dark); }
.period-chip.active { background: var(--brand); color: #fff; }
.license-badge { display: inline-flex; align-items: center; gap: 6px; padding: 8px 14px; border-radius: 999px; background: #eef7f1; color: #146c43; font-size: 12px; font-weight: 600; white-space: nowrap; }
.license-badge-dot { opacity: .5; }
.license-badge-warn { background: #fff2e2; color: #a8580c; }
@media (max-width: 700px) {
  .period-filter-row { padding: 10px 12px; }
  .period-chip { padding: 6px 10px; font-size: 11px; }
}

/* ---- Floating quick-action speed-dial (bottom-right FAB stack) ---- */
.fab-stack { position: fixed; right: 22px; bottom: 88px; z-index: 45; display: flex; flex-direction: column-reverse; align-items: center; gap: 12px; }
.fab-item { display: grid; place-items: center; width: 48px; height: 48px; border-radius: 50%; color: #fff; text-decoration: none; font-size: 19px; box-shadow: 0 6px 16px rgba(30,20,25,.22); opacity: 0; transform: translateY(10px) scale(.85); pointer-events: none; transition: opacity .18s, transform .18s; }
.fab-stack.open .fab-item { opacity: 1; transform: translateY(0) scale(1); pointer-events: auto; }
.fab-stack.open .fab-item:nth-child(2) { transition-delay: .02s; }
.fab-stack.open .fab-item:nth-child(3) { transition-delay: .05s; }
.fab-stack.open .fab-item:nth-child(4) { transition-delay: .08s; }
.fab-lightning { background: linear-gradient(135deg,#1672d5,#2f9bff); }
.fab-doc { background: linear-gradient(135deg,#a13d55,#c85a75); }
.fab-person { background: linear-gradient(135deg,#0c8a52,#12a866); }
.fab-sms { background: linear-gradient(135deg,#0c8a52,#12a866); }
.fab-toggle { position: fixed; right: 22px; bottom: 22px; z-index: 46; display: grid; place-items: center; width: 56px; height: 56px; border-radius: 50%; border: 3px solid #fff; background: var(--brand); color: #fff; font-size: 26px; box-shadow: 0 6px 18px rgba(40,0,20,.24); cursor: pointer; transition: transform .18s, background .15s; }
.fab-toggle:hover { background: var(--brand-dark); }
.fab-stack.open ~ .fab-toggle, .fab-toggle.open { transform: rotate(45deg); }
@media (max-width: 700px) {
  .fab-toggle { right: 16px; bottom: 16px; width: 50px; height: 50px; font-size: 22px; }
  .print-control { right: 74px; bottom: 18px; padding: 9px 14px; font-size: 13px; }
  .fab-stack { right: 16px; bottom: 76px; gap: 10px; }
  .fab-item { width: 42px; height: 42px; font-size: 17px; }
}

/* ---- Changelog page ---- */
.changelog-entry { position: relative; padding-left: 22px; }
.changelog-entry:before { content: ''; position: absolute; left: 0; top: 28px; width: 10px; height: 10px; border-radius: 50%; background: var(--brand); }
.changelog-date { color: var(--muted); font-size: 12px; font-weight: 600; margin-bottom: 4px; }
.changelog-points { margin: 10px 0 0; padding-left: 18px; color: #354d48; font-size: 13px; line-height: 1.9; }
.changelog-points li { margin-bottom: 2px; }

/* ---- Theme picker (palette icon dropdown) ---- */
.topbar-dropdown-wrap { position: relative; }
.topbar-dropdown { position: absolute; right: 0; top: calc(100% + 10px); z-index: 60; width: 220px; padding: 10px; background: #fff; border: 1px solid #e3e6ea; border-radius: 14px; box-shadow: 0 14px 34px rgba(20,15,20,.16); display: none; }
.topbar-dropdown.open { display: block; }
.topbar-dropdown-title { padding: 4px 8px 8px; color: var(--muted); font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .03em; }
.theme-option { display: flex; align-items: center; gap: 10px; width: 100%; padding: 9px 8px; border: 0; background: transparent; border-radius: 9px; cursor: pointer; text-align: left; font: inherit; font-size: 13px; color: #262b35; }
.theme-option:hover { background: #f4f5f7; }
.theme-dot { width: 12px; height: 12px; flex: 0 0 12px; border-radius: 50%; }
.theme-dot-green { background: #176b58; }
.theme-dot-islamic { background: #870038; }
.theme-dot-blue { background: #1672d5; }
.theme-dot-dark { background: #1b1f27; }
.theme-option-check { margin-left: auto; color: var(--brand); font-size: 13px; visibility: hidden; }
.theme-option.active .theme-option-check { visibility: visible; }

/* Alternate palettes, applied via [data-theme] on <html>. Default (no attribute) = ইসলামিক (maroon), unchanged. */
[data-theme="green"] { --brand: #176b58; --brand-dark: #105242; --brand-soft: #e8f4ef; --accent: #2f9d7c; }
[data-theme="blue"] { --brand: #1672d5; --brand-dark: #10559f; --brand-soft: #e8f1fd; --accent: #3d93e8; }
[data-theme="dark"] { --brand: #a13d55; --brand-dark: #870038; --brand-soft: #2a2230; --accent: #c85a75; --line: #33363f; --muted: #9aa2ad; }
[data-theme="green"] .sidebar { background: linear-gradient(180deg,#176b58,#0f4a3c); }
[data-theme="blue"] .sidebar { background: linear-gradient(180deg,#1672d5,#0e4f9c); }
[data-theme="dark"] .sidebar { background: linear-gradient(180deg,#1b1f27,#12151b); }
[data-theme="dark"] body { background: #0f1115; color: #e4e6ea; }
[data-theme="dark"] .card, [data-theme="dark"] .hub-card, [data-theme="dark"] .topbar-dropdown { background: #171a21; border-color: #2b2f38; color: #e4e6ea; }
[data-theme="dark"] .dashboard-topbar { background: rgba(23,26,33,.96); border-color: #2b2f38; }
[data-theme="dark"] h1, [data-theme="dark"] h2, [data-theme="dark"] h3 { color: #f0f1f4; }
[data-theme="dark"] input, [data-theme="dark"] select, [data-theme="dark"] textarea { background: #12141a; border-color: #33363f; color: #e4e6ea; }
[data-theme="dark"] th { background: #1d212a; color: #cfd3da; }
[data-theme="dark"] td { border-color: #2b2f38; }
[data-theme="dark"] .period-chip, [data-theme="dark"] .topbar-icon-btn, [data-theme="dark"] .topbar-role-badge { background: #22262f; color: #e4e6ea; }

/* ---- হবক AI chat panel (slide-over) ---- */
.ai-chat-backdrop { position: fixed; inset: 0; z-index: 70; background: rgba(15,10,14,.28); display: none; }
.ai-chat-backdrop.open { display: block; }
.ai-chat-panel { position: fixed; right: 0; top: 0; bottom: 0; z-index: 71; width: min(380px, 100vw); background: #fff; box-shadow: -14px 0 34px rgba(20,15,20,.18); display: flex; flex-direction: column; transform: translateX(100%); transition: transform .22s ease; }
.ai-chat-backdrop.open .ai-chat-panel { transform: translateX(0); }
.ai-chat-head { display: flex; align-items: center; justify-content: space-between; padding: 14px 16px 10px; border-bottom: 1px solid #eef0f2; }
.ai-chat-tabs { display: flex; gap: 6px; padding: 4px; border-radius: 10px; background: #f2f4f7; }
.ai-chat-tab { border: 0; background: transparent; padding: 7px 14px; border-radius: 8px; font: inherit; font-size: 13px; font-weight: 600; color: #667080; cursor: pointer; }
.ai-chat-tab.active { background: #fff; color: #262b35; box-shadow: 0 1px 4px rgba(20,15,20,.1); }
.ai-chat-head-icons { display: flex; align-items: center; gap: 4px; }
.ai-chat-icon-btn { display: grid; place-items: center; width: 32px; height: 32px; border-radius: 8px; border: 0; background: transparent; color: #5b6470; cursor: pointer; font-size: 14px; }
.ai-chat-icon-btn:hover { background: #f2f4f7; }
.ai-chat-icon-btn.ai-chat-close { background: #fdeaea; color: #d33; }
.ai-chat-icon-btn.ai-chat-close:hover { background: #fbd7d7; }
.ai-chat-body { flex: 1; overflow-y: auto; padding: 18px 16px; }
.ai-chat-greeting { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 6px; padding: 10px 6px 18px; }
.ai-chat-avatar { width: 58px; height: 58px; border-radius: 50%; }
.ai-chat-greeting strong { font-size: 15px; color: #262b35; }
.ai-chat-greeting p { margin: 0; color: var(--muted); font-size: 12px; }
.ai-chat-suggestion { display: flex; gap: 10px; padding: 12px; border-radius: 12px; background: var(--brand-soft); margin-bottom: 10px; }
.ai-chat-suggestion-icon { font-size: 16px; }
.ai-chat-suggestion p { margin: 0; font-size: 12px; line-height: 1.6; color: #354d48; }
.ai-chat-suggestion strong { color: var(--brand-dark); }
.ai-chat-cta { display: flex; align-items: center; justify-content: center; gap: 6px; width: 100%; padding: 12px; border: 0; border-radius: 12px; background: linear-gradient(135deg,#0f9d78,#0c7a5e); color: #fff; font: inherit; font-weight: 700; font-size: 13px; cursor: pointer; margin-bottom: 16px; }
.ai-chat-cta:hover { filter: brightness(1.05); }
.ai-chat-msg { max-width: 88%; margin-bottom: 10px; padding: 10px 13px; border-radius: 12px; font-size: 13px; line-height: 1.6; }
.ai-chat-msg-bot { background: #f2f4f7; color: #262b35; border-bottom-left-radius: 3px; white-space: pre-wrap; }
.ai-chat-msg-user { margin-left: auto; background: var(--brand); color: #fff; border-bottom-right-radius: 3px; }
.ai-chat-history-empty { padding: 40px 10px; text-align: center; color: var(--muted); font-size: 13px; }
.ai-chat-inputbar { border-top: 1px solid #eef0f2; padding: 10px 12px; }
.ai-chat-input-row { display: flex; align-items: center; gap: 8px; padding: 6px 6px 6px 12px; border: 1px solid var(--line); border-radius: 12px; }
.ai-chat-input-row input { flex: 1; border: 0; min-height: auto; padding: 6px 0; box-shadow: none !important; }
.ai-chat-input-row input:focus { box-shadow: none; }
.ai-chat-tool-btn { display: grid; place-items: center; width: 30px; height: 30px; border-radius: 50%; border: 0; background: #f2f4f7; color: #5b6470; cursor: pointer; font-size: 13px; flex: 0 0 auto; }
.ai-chat-send { background: var(--brand); color: #fff; }
.ai-chat-send:hover { background: var(--brand-dark); }
.ai-chat-disclaimer { margin: 8px 2px 0; color: var(--muted); font-size: 10px; text-align: center; }
@media (max-width: 480px) { .ai-chat-panel { width: 100vw; } }

/* ---- Notification dropdown (bell icon) ---- */
.notif-dropdown { width: 260px; }
.notif-item { display: flex; align-items: center; gap: 8px; width: 100%; padding: 9px 8px; border-radius: 9px; text-decoration: none; color: #262b35; font-size: 12.5px; background: transparent; border: 0; text-align: left; font: inherit; cursor: pointer; }
.notif-item:hover { background: #f4f5f7; }
.notif-item-empty { color: var(--muted); cursor: default; }
.notif-item-empty:hover { background: transparent; }
.notif-icon { font-size: 14px; flex: 0 0 auto; }

/* ---- Logo/favicon preview boxes on সাইট সেটিংস ---- */
.logo-preview-box { display: grid; place-items: center; width: 140px; height: 140px; margin-bottom: 12px; border: 1px dashed #cbd1d8; border-radius: 12px; background: #fafbfc; overflow: hidden; }
.logo-preview-box img { max-width: 88%; max-height: 88%; object-fit: contain; }
.logo-preview-box-round { border-radius: 50%; width: 96px; height: 96px; }
.logo-preview-empty { color: var(--muted); font-size: 12px; text-align: center; padding: 0 10px; }

/* ---- RTL layout support (Arabic) ---- */
[dir="rtl"] { text-align: right; }
[dir="rtl"] body.app-authenticated .wrap { margin: 0 278px 0 24px; }
[dir="rtl"] .sidebar { inset: 0 0 0 auto; box-shadow: -5px 0 24px rgba(57,0,24,.12); }
[dir="rtl"] .side-group > summary .grp-chevron { transform: scaleX(-1); }
[dir="rtl"] .side-group[open] > summary .grp-chevron { transform: scaleX(-1) rotate(90deg); }
[dir="rtl"] .side-sub { padding: 2px 30px 6px 0; }
[dir="rtl"] .topbar-actions { margin-left: 0; margin-right: auto; }
[dir="rtl"] .topbar-dropdown { right: auto; left: 0; }
[dir="rtl"] .fab-stack, [dir="rtl"] .fab-toggle { right: auto; left: 22px; }
[dir="rtl"] .print-control { right: auto; left: 92px; }
[dir="rtl"] .sidebar-backdrop ~ .fab-stack { left: 22px; }
[dir="rtl"] .breadcrumb-trail, [dir="rtl"] .section-banner-head { direction: rtl; }
[dir="rtl"] .section-banner { flex-direction: row-reverse; }
[dir="rtl"] .stat-card, [dir="rtl"] .hub-card, [dir="rtl"] .quick-action { text-align: right; }
[dir="rtl"] .student-name-cell { flex-direction: row-reverse; }
[dir="rtl"] .legend-list, [dir="rtl"] .support-banner-phone { direction: rtl; }
@media (max-width: 700px) {
  [dir="rtl"] body.app-authenticated .sidebar { inset: 0 0 0 auto; transform: translateX(105%); }
  [dir="rtl"] .app-authenticated.sidebar-open .sidebar { transform: translateX(0); }
  [dir="rtl"] .fab-toggle, [dir="rtl"] .fab-stack { left: 16px; right: auto; }
  [dir="rtl"] .print-control { left: 74px; right: auto; }
}
[dir="rtl"] .ai-chat-panel { right: auto; left: 0; box-shadow: 14px 0 34px rgba(20,15,20,.18); transform: translateX(-100%); }
[dir="rtl"] .ai-chat-backdrop.open .ai-chat-panel { transform: translateX(0); }

/* ---- Frame mode: a page loaded inside a floating desktop window ---- */
body.app-frame { background: #fff; }
body.app-frame .wrap { margin: 0 !important; max-width: none !important; padding: 14px !important; }
body.app-frame .sidebar, body.app-frame .sidebar-backdrop, body.app-frame .ai-chat-backdrop, body.app-frame .print-control { display: none !important; }

/* ---- Desktop window manager (floating windows opened from the sidebar) ---- */
#window-desktop { position: fixed; inset: 0; z-index: 40; pointer-events: none; }
.win { position: absolute; display: flex; flex-direction: column; min-width: 280px; min-height: 200px; background: #fff; border-radius: 10px; overflow: hidden; box-shadow: 0 18px 46px rgba(20,10,20,.28), 0 2px 8px rgba(20,10,20,.12); pointer-events: auto; }
.win.maximized { top: 0 !important; left: 0 !important; width: 100% !important; height: 100% !important; border-radius: 0; }
.win.minimized { display: none; }
.win-titlebar { display: flex; align-items: center; gap: 8px; padding: 0 6px 0 12px; height: 40px; flex: 0 0 40px; background: linear-gradient(135deg,#870038,#5c0026); color: #fff; cursor: move; user-select: none; }
.win-titlebar-icon { font-size: 15px; flex: 0 0 auto; }
.win-titlebar-text { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 13px; font-weight: 700; }
.win-controls { display: flex; align-items: center; gap: 2px; flex: 0 0 auto; }
.win-controls button { display: grid; place-items: center; width: 30px; height: 30px; border: 0; border-radius: 6px; background: transparent; color: #fff; font-size: 14px; cursor: pointer; }
.win-controls button:hover { background: rgba(255,255,255,.18); }
.win-controls .win-close-btn:hover { background: #e0304a; }
.win-body { flex: 1; min-height: 0; position: relative; background: #fff; }
.win-body iframe { width: 100%; height: 100%; border: 0; display: block; }
.win-resize-handle { position: absolute; right: 0; bottom: 0; width: 16px; height: 16px; cursor: nwse-resize; background: linear-gradient(135deg,transparent 50%,rgba(0,0,0,.18) 50%); }
.taskbar { position: fixed; left: 0; right: 0; bottom: 0; z-index: 41; display: flex; align-items: center; gap: 8px; padding: 8px 16px; overflow-x: auto; pointer-events: none; }
.taskbar:empty { display: none; }
.taskbar-item { display: flex; align-items: center; gap: 6px; padding: 8px 14px; border-radius: 999px; background: #fff; color: #262b35; box-shadow: 0 6px 16px rgba(20,10,20,.18); font-size: 12px; font-weight: 600; cursor: pointer; pointer-events: auto; white-space: nowrap; border: 1px solid #eee; }
.taskbar-item:hover { background: var(--brand-soft); }
.taskbar-item .taskbar-close { display: grid; place-items: center; width: 18px; height: 18px; border-radius: 50%; color: #999; font-size: 11px; }
.taskbar-item .taskbar-close:hover { background: #f3d9d9; color: #a33; }
@media (max-width: 700px) {
  .win { border-radius: 0 !important; }
  .win:not(.minimized) { top: 0 !important; left: 0 !important; width: 100% !important; height: calc(100% - 56px) !important; }
  .taskbar { padding: 6px 10px; }
}
[dir="rtl"] .win-titlebar { flex-direction: row-reverse; }
[dir="rtl"] .win-resize-handle { right: auto; left: 0; cursor: nesw-resize; background: linear-gradient(225deg,transparent 50%,rgba(0,0,0,.18) 50%); }

/* ---- Bengali font switcher (বিজয়/সুলাইমান লিপি/কালপুরুষ) ---- */
/* Font FILES are not bundled with this code update — see the README for
   where to upload them (public/assets/fonts/). Until they're uploaded the
   browser falls back to the default Noto Sans Bengali automatically. */
@font-face { font-family: 'SolaimanLipi'; src: url('fonts/SolaimanLipi.woff2') format('woff2'), url('fonts/SolaimanLipi.ttf') format('truetype'); font-display: swap; }
@font-face { font-family: 'Kalpurush'; src: url('fonts/Kalpurush.woff2') format('woff2'), url('fonts/Kalpurush.ttf') format('truetype'); font-display: swap; }
@font-face { font-family: 'BijoyASCII'; src: url('fonts/Bijoy.woff2') format('woff2'), url('fonts/Bijoy.ttf') format('truetype'); font-display: swap; }

[data-bn-font="sulaimanlipi"] body, [data-bn-font="sulaimanlipi"] input, [data-bn-font="sulaimanlipi"] textarea, [data-bn-font="sulaimanlipi"] select, [data-bn-font="sulaimanlipi"] button {
  font-family: 'SolaimanLipi', 'Noto Sans Bengali', 'Hind Siliguri', system-ui, sans-serif;
}
[data-bn-font="kalpurush"] body, [data-bn-font="kalpurush"] input, [data-bn-font="kalpurush"] textarea, [data-bn-font="kalpurush"] select, [data-bn-font="kalpurush"] button {
  font-family: 'Kalpurush', 'Noto Sans Bengali', 'Hind Siliguri', system-ui, sans-serif;
}
@media print {
  [data-bn-font="sulaimanlipi"] body { font-family: 'SolaimanLipi', 'Noto Sans Bengali', sans-serif; }
  [data-bn-font="kalpurush"] body { font-family: 'Kalpurush', 'Noto Sans Bengali', sans-serif; }
}
.font-option-note { display: block; font-size: 10px; color: var(--muted); font-weight: 400; margin-top: 1px; }

/* ---- DataTable toolbar (Copy/Excel/Print/Column visibility) ---- */
.dt-toolbar { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 10px; margin-bottom: 12px; }
.dt-toolbar-actions { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.dt-btn { padding: 7px 13px; border-radius: 7px; border: 1px solid var(--line); background: #fff; color: #333; font-size: 12px; font-weight: 600; cursor: pointer; }
.dt-btn:hover { background: #f4f5f7; }
.dt-toolbar .dt-copy { background: #17a2b8; color: #fff; border-color: #17a2b8; }
.dt-toolbar .dt-excel { background: #1e7e45; color: #fff; border-color: #1e7e45; }
.dt-toolbar .dt-print { background: #c0392b; color: #fff; border-color: #c0392b; }
.dt-search { padding: 8px 12px; border: 1px solid var(--line); border-radius: 7px; font-size: 12px; min-width: 180px; }
.dt-col-menu { max-height: 260px; overflow-y: auto; }
.dt-col-menu label { display: flex; align-items: center; gap: 8px; padding: 7px 8px; font-size: 12px; font-weight: 400; cursor: pointer; border-radius: 6px; }
.dt-col-menu label:hover { background: #f4f5f7; }
.dt-col-menu input { width: auto; min-height: auto; }
.dt-col-hidden { display: none !important; }
@media (max-width: 700px) {
  .dt-toolbar { flex-direction: column; align-items: stretch; }
  .dt-search { min-width: 0; }
}
@media print { .dt-toolbar { display: none !important; } }
.grid > .wide { grid-column: 1 / -1; }
