/* EduSaaS — Pakistani emerald + gold, glass cards, RTL ready. Koi blue rang nahi. */
:root {
  --emerald: 158 64% 32%;
  --gold: 43 78% 46%;
  --bg: 150 24% 96%;
  --ink: 162 28% 12%;
  --muted: 160 9% 38%;
  --line: 152 16% 84%;
  --surface: 0 0% 100%;
  --glass: hsla(0, 0%, 100%, .7);
  --glass-strong: hsla(0, 0%, 100%, .88);
  --glass-border: hsla(0, 0%, 100%, .8);
  --danger: 0 62% 44%;
  --ok-soft: 152 48% 91%;
  --gold-soft: 44 92% 90%;
  --danger-soft: 0 78% 95%;
  --shadow: 0 1px 2px hsla(160, 40%, 10%, .05), 0 10px 30px hsla(158, 50%, 18%, .08);
  --radius: 12px;
  --font: 'Manrope', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --font-ur: 'Noto Nastaliq Urdu', 'Manrope', serif;
  --sb-w: 256px;
  color-scheme: light;
}
:root[data-theme="dark"] {
  --emerald: 158 56% 44%; --gold: 43 80% 55%;
  --bg: 162 32% 6%; --ink: 150 18% 92%; --muted: 155 10% 66%; --line: 160 18% 20%; --surface: 160 26% 10%;
  --glass: hsla(160, 30%, 12%, .66); --glass-strong: hsla(160, 30%, 11%, .92); --glass-border: hsla(150, 30%, 60%, .14);
  --ok-soft: 158 45% 15%; --gold-soft: 43 45% 16%; --danger-soft: 0 40% 17%; --danger: 0 70% 62%;
  --shadow: 0 1px 2px rgba(0, 0, 0, .3), 0 10px 30px rgba(0, 0, 0, .25);
  color-scheme: dark;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --emerald: 158 56% 44%; --gold: 43 80% 55%;
    --bg: 162 32% 6%; --ink: 150 18% 92%; --muted: 155 10% 66%; --line: 160 18% 20%; --surface: 160 26% 10%;
    --glass: hsla(160, 30%, 12%, .66); --glass-strong: hsla(160, 30%, 11%, .92); --glass-border: hsla(150, 30%, 60%, .14);
    --ok-soft: 158 45% 15%; --gold-soft: 43 45% 16%; --danger-soft: 0 40% 17%; --danger: 0 70% 62%;
    --shadow: 0 1px 2px rgba(0, 0, 0, .3), 0 10px 30px rgba(0, 0, 0, .25);
    color-scheme: dark;
  }
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; font: 14px/1.5 var(--font); color: hsl(var(--ink)); min-height: 100vh;
  background-color: hsl(var(--bg));
  background-image: radial-gradient(60rem 40rem at 100% -10%, hsla(43, 80%, 55%, .13), transparent 60%),
                    radial-gradient(50rem 40rem at -10% 110%, hsla(158, 64%, 40%, .13), transparent 60%);
  background-attachment: fixed;
}
[dir="rtl"] body { font-family: var(--font-ur); line-height: 2; }
[dir="rtl"] .num, [dir="rtl"] td.num, [dir="rtl"] input[type="number"], [dir="rtl"] kbd { font-family: var(--font); }
a { color: hsl(var(--emerald)); text-decoration: none; }
a:hover { text-decoration: underline; }
:focus-visible { outline: 2px solid hsl(var(--gold)); outline-offset: 2px; }
::selection { background: hsla(43, 80%, 50%, .3); }
input, select, textarea, button { font: inherit; color: inherit; }
input[type="checkbox"], input[type="radio"] { accent-color: hsl(var(--emerald)); width: 16px; height: 16px; }
h1, h2, h3 { line-height: 1.3; }
[hidden] { display: none !important; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; inset-inline-start: 8px; top: -40px; z-index: 100; background: hsl(var(--gold)); color: #111; padding: 6px 10px; border-radius: 8px; }
.skip:focus { top: 8px; }
.muted { color: hsl(var(--muted)); }
.small { font-size: 12px; }
.num { text-align: end; font-variant-numeric: tabular-nums; white-space: nowrap; }
.flip { display: inline-block; }
[dir="rtl"] .flip { transform: scaleX(-1); }
.row-gap { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.spacer { flex: 1; }

/* ---------- Shell ---------- */
.shell { display: grid; grid-template-columns: var(--sb-w) minmax(0, 1fr); min-height: 100vh; }
.sidebar {
  position: sticky; top: 0; height: 100vh; overflow-y: auto; scrollbar-width: thin;
  background: hsla(160, 58%, 12%, .95); color: hsl(150 22% 86%);
  padding: 14px 10px 28px; border-inline-end: 1px solid hsla(43, 80%, 50%, .2);
}
.brand { display: flex; gap: 10px; align-items: center; padding: 4px 8px 14px; border-bottom: 1px solid hsla(150, 30%, 60%, .15); margin-bottom: 10px; }
.brand img, .brand-mark { width: 38px; height: 38px; border-radius: 10px; object-fit: cover; flex: none; }
.brand-mark { display: grid; place-items: center; background: hsl(var(--gold)); color: hsl(160 58% 12%); font-weight: 700; font-family: var(--font); }
.brand strong { display: block; color: #fff; font-size: 14px; line-height: 1.3; }
.brand small { color: hsl(150 15% 70%); font-size: 12px; }
.nav-link, .nav-group summary { display: flex; align-items: center; gap: 10px; padding: 7px 10px; border-radius: 8px; color: inherit; cursor: pointer; font-size: 13.5px; text-decoration: none; }
.nav-group summary { list-style: none; }
.nav-group summary::-webkit-details-marker { display: none; }
.nav-link:hover, .nav-group summary:hover { background: hsla(150, 30%, 60%, .1); text-decoration: none; }
.nav-link.active { background: hsla(43, 80%, 50%, .18); color: #fff; box-shadow: inset 3px 0 0 hsl(var(--gold)); }
[dir="rtl"] .nav-link.active { box-shadow: inset -3px 0 0 hsl(var(--gold)); }
.nav-link.sub { padding-inline-start: 40px; font-size: 13px; }
.nav .ti { font-size: 18px; opacity: .9; }
.chev { margin-inline-start: auto; transition: transform .15s; font-size: 14px !important; }
.nav-group[open] > summary .chev { transform: rotate(180deg); }
.soon { margin-inline-start: auto; font-style: normal; font-size: 10px; line-height: 16px; padding: 0 6px; border-radius: 6px; background: hsla(150, 30%, 60%, .14); color: hsl(150 15% 72%); font-family: var(--font); }

.main { min-width: 0; display: flex; flex-direction: column; }
.topbar {
  position: sticky; top: 0; z-index: 20; display: flex; align-items: center; gap: 8px; height: 52px; padding: 0 16px;
  background: var(--glass-strong); backdrop-filter: blur(14px) saturate(150%); -webkit-backdrop-filter: blur(14px) saturate(150%);
  border-bottom: 1px solid hsl(var(--line));
}
.ctx { margin: 0; }
.ctx select { height: 32px; padding: 0 8px; border-radius: 8px; border: 1px solid hsl(var(--line)); background: hsl(var(--surface)); max-width: 230px; font-size: 13px; font-weight: 600; }
.chip { display: inline-flex; align-items: center; gap: 6px; height: 30px; padding: 0 10px; border-radius: 8px; background: hsl(var(--ok-soft)); color: hsl(var(--emerald)); font-weight: 600; font-size: 13px; }
.search { position: relative; flex: 1; max-width: 340px; margin: 0; }
.search .ti { position: absolute; inset-inline-start: 10px; top: 50%; transform: translateY(-50%); color: hsl(var(--muted)); }
.search input { width: 100%; height: 34px; padding-inline: 32px 10px; border-radius: 9px; border: 1px solid hsl(var(--line)); background: hsl(var(--surface)); }
.top-actions { margin-inline-start: auto; display: flex; align-items: center; gap: 4px; }
.top-actions form { margin: 0; }
.btn-icon { display: inline-grid; place-items: center; width: 34px; height: 34px; border-radius: 9px; border: 0; background: transparent; color: hsl(var(--ink)); cursor: pointer; position: relative; text-decoration: none; }
.btn-icon:hover { background: hsla(158, 64%, 32%, .1); text-decoration: none; }
.btn-icon .ti { font-size: 19px; }
.bell b { position: absolute; top: 2px; inset-inline-end: 2px; min-width: 16px; height: 16px; padding: 0 4px; border-radius: 8px; background: hsl(var(--gold)); color: hsl(160 58% 12%); font: 700 10px/16px var(--font); }
.lang-btn { width: auto; padding: 0 10px; font-weight: 700; font-size: 13px; }
.usermenu { position: relative; }
.avatar { list-style: none; width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; background: hsl(var(--emerald)); color: #fff; font: 700 13px var(--font); cursor: pointer; }
.avatar::-webkit-details-marker { display: none; }
.pop { position: absolute; inset-inline-end: 0; top: 42px; width: 250px; padding: 6px; z-index: 40; background: var(--glass-strong); }
.pop a, .pop button { display: flex; gap: 10px; align-items: center; width: 100%; padding: 8px 10px; border: 0; background: none; border-radius: 8px; color: hsl(var(--ink)); cursor: pointer; text-align: start; text-decoration: none; }
.pop a:hover, .pop button:hover { background: hsla(158, 64%, 32%, .1); }
.pop form { margin: 0; }
.pop-head { padding: 8px 10px 10px; border-bottom: 1px solid hsl(var(--line)); margin-bottom: 4px; }
.pop-head small { display: block; color: hsl(var(--muted)); font-size: 12px; }

/* ---------- Content ---------- */
.content { padding: 12px 18px 40px; width: 100%; max-width: 1480px; }
.page-head { display: flex; align-items: center; gap: 8px; min-height: 34px; margin-bottom: 10px; flex-wrap: wrap; }
.page-head h1 { margin: 0; font-size: 16px; font-weight: 700; }
.page-actions { margin-inline-start: auto; display: flex; gap: 6px; flex-wrap: wrap; }
.card { background: var(--glass); backdrop-filter: blur(14px) saturate(140%); -webkit-backdrop-filter: blur(14px) saturate(140%); border: 1px solid var(--glass-border); border-radius: var(--radius); box-shadow: var(--shadow); }
.panel { padding: 16px; margin-bottom: 14px; }
.panel > h2, .panel-title { margin: 0 0 12px; font-size: 14px; font-weight: 700; }
.grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 0 14px; }
.grid-2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(330px, 1fr)); gap: 14px; }
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 12px; margin-bottom: 14px; }
.stat { padding: 14px 16px; position: relative; overflow: hidden; }
.stat span { display: block; color: hsl(var(--muted)); font-size: 12.5px; }
.stat b { display: block; font: 700 22px/1.35 var(--font); }
.stat .ti { position: absolute; inset-inline-end: 12px; top: 12px; font-size: 22px; color: hsl(var(--gold)); }
.stat.income b { color: hsl(var(--emerald)); }

/* ---------- Forms ---------- */
label { display: block; font-size: 12.5px; font-weight: 600; color: hsl(var(--muted)); margin-bottom: 12px; }
input:not([type="checkbox"]):not([type="radio"]):not([type="file"]):not([type="hidden"]), select, textarea {
  display: block; width: 100%; margin-top: 4px; height: 36px; padding: 0 10px; border: 1px solid hsl(var(--line)); border-radius: 8px;
  background: hsl(var(--surface)); color: hsl(var(--ink)); font-weight: 500; font-size: 13.5px;
}
[dir="rtl"] input:not([type="checkbox"]):not([type="radio"]):not([type="file"]), [dir="rtl"] select { height: 40px; line-height: 1.6; }
textarea { height: auto; min-height: 76px; padding: 8px 10px; resize: vertical; }
input:focus, select:focus, textarea:focus { outline: none; border-color: hsl(var(--emerald)); box-shadow: 0 0 0 3px hsla(158, 64%, 32%, .18); }
input[readonly] { background: hsla(158, 20%, 50%, .06); }
.req { color: hsl(var(--danger)); }
.check { display: flex; align-items: center; gap: 8px; color: hsl(var(--ink)); font-weight: 500; }
.hint { display: block; font-weight: 400; font-size: 12px; color: hsl(var(--muted)); margin-top: 3px; }
.form-actions { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 4px; }
.alert { display: flex; gap: 10px; align-items: flex-start; padding: 10px 14px; border-radius: 10px; margin-bottom: 14px; }
.alert ul { margin: 0; padding-inline-start: 18px; }
.alert-error { background: hsl(var(--danger-soft)); color: hsl(var(--danger)); }
.alert-ok { background: hsl(var(--ok-soft)); color: hsl(var(--emerald)); }
.alert-warn { background: hsl(var(--gold-soft)); color: hsl(38 70% 28%); }
:root[data-theme="dark"] .alert-warn { color: hsl(43 80% 70%); }

/* ---------- Buttons ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; height: 34px; padding: 0 14px; border-radius: 9px; border: 1px solid hsl(var(--line)); background: hsl(var(--surface)); color: hsl(var(--ink)); font-weight: 600; font-size: 13px; cursor: pointer; text-decoration: none; white-space: nowrap; }
.btn:hover { border-color: hsl(var(--emerald)); text-decoration: none; }
.btn-primary { background: hsl(var(--emerald)); border-color: hsl(var(--emerald)); color: #fff; }
.btn-primary:hover { filter: brightness(1.08); }
.btn-gold { background: hsl(var(--gold)); border-color: hsl(var(--gold)); color: hsl(160 58% 10%); }
.btn-danger { color: hsl(var(--danger)); }
.btn-danger:hover { border-color: hsl(var(--danger)); }
.btn-sm { height: 28px; padding: 0 10px; font-size: 12px; border-radius: 7px; }
.btn .ti { font-size: 16px; }
.actions { display: flex; gap: 4px; flex-wrap: wrap; }
.actions form { margin: 0; display: inline; }
.btn-group { display: inline-flex; gap: 0; }
.btn-group .btn { border-radius: 0; margin-inline-start: -1px; }
.btn-group .btn:first-child { border-start-start-radius: 9px; border-end-start-radius: 9px; margin-inline-start: 0; }
.btn-group .btn:last-child { border-start-end-radius: 9px; border-end-end-radius: 9px; }

/* ---------- Tables ---------- */
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: 13px; }
th, td { padding: 7px 10px; text-align: start; border-bottom: 1px solid hsl(var(--line)); vertical-align: middle; }
th { font-size: 12px; font-weight: 700; color: hsl(var(--muted)); background: hsla(158, 30%, 50%, .06); white-space: nowrap; }
tbody tr:hover { background: hsla(158, 64%, 32%, .04); }
tr:last-child td { border-bottom: 0; }
tfoot td { font-weight: 700; border-top: 2px solid hsl(var(--line)); }
.sort { color: inherit; }
.cell-sub { display: block; font-size: 12px; color: hsl(var(--muted)); }
tr.group-row td { font-weight: 700; background: hsla(158, 30%, 50%, .05); }
tr.inactive td { opacity: .55; }
.indent-1 { padding-inline-start: 26px !important; } .indent-2 { padding-inline-start: 44px !important; } .indent-3 { padding-inline-start: 62px !important; }

/* ---------- Bits ---------- */
.badge { display: inline-block; padding: 1px 9px; border-radius: 20px; font-size: 11.5px; font-weight: 600; background: hsla(158, 20%, 50%, .12); color: hsl(var(--muted)); white-space: nowrap; }
.badge-ok { background: hsl(var(--ok-soft)); color: hsl(var(--emerald)); }
.badge-warn { background: hsl(var(--gold-soft)); color: hsl(38 70% 30%); }
.badge-bad { background: hsl(var(--danger-soft)); color: hsl(var(--danger)); }
.badge-gold { background: hsl(var(--gold)); color: hsl(160 58% 10%); }
.tabs { display: flex; gap: 2px; border-bottom: 1px solid hsl(var(--line)); margin-bottom: 12px; overflow-x: auto; }
.tabs a { padding: 8px 14px; color: hsl(var(--muted)); font-weight: 600; font-size: 13px; border-bottom: 2px solid transparent; white-space: nowrap; text-decoration: none; }
.tabs a.active { color: hsl(var(--emerald)); border-bottom-color: hsl(var(--gold)); }
.toolbar { display: flex; flex-wrap: wrap; gap: 8px; align-items: end; margin-bottom: 12px; }
.toolbar label { margin: 0; min-width: 140px; }
.pagination { display: flex; gap: 4px; flex-wrap: wrap; align-items: center; margin-top: 12px; }
.pagination a { min-width: 30px; height: 30px; display: inline-grid; place-items: center; padding: 0 8px; border: 1px solid hsl(var(--line)); border-radius: 7px; background: hsl(var(--surface)); text-decoration: none; font-family: var(--font); }
.pagination a.active { background: hsl(var(--emerald)); color: #fff; border-color: hsl(var(--emerald)); }
.pagination .muted { margin-inline-start: 8px; font-size: 12px; }
.empty { text-align: center; padding: 34px 16px; color: hsl(var(--muted)); }
.empty .ti { font-size: 34px; color: hsl(var(--gold)); }
.empty h3 { margin: 8px 0 4px; font-size: 15px; color: hsl(var(--ink)); }
.empty p { margin: 0 0 12px; }
kbd { display: inline-block; padding: 1px 7px; border: 1px solid hsl(var(--line)); border-bottom-width: 2px; border-radius: 6px; font: 600 11.5px var(--font); background: hsl(var(--surface)); white-space: nowrap; }
.chip-list { display: flex; gap: 4px; flex-wrap: wrap; }
.chip-list form { margin: 0; }
.role-chip { display: inline-flex; align-items: center; gap: 2px; padding: 1px 4px 1px 9px; border-radius: 20px; font-size: 11.5px; font-weight: 600; background: hsl(var(--ok-soft)); color: hsl(var(--emerald)); }
.role-chip button { border: 0; background: none; color: inherit; cursor: pointer; padding: 0 3px; line-height: 1; }
.modules { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 12px; }
.modules .panel { margin: 0; }
.modules ul { list-style: none; margin: 0; padding: 0; }
.modules li { display: flex; align-items: center; gap: 6px; padding: 4px 0; border-bottom: 1px dashed hsl(var(--line)); font-size: 13px; }
.modules li:last-child { border-bottom: 0; }
.modules li kbd, .modules li .badge { margin-inline-start: auto; }

/* ---------- Toasts & dialogs ---------- */
.toasts { position: fixed; top: 60px; inset-inline-end: 16px; z-index: 90; display: grid; gap: 8px; max-width: min(420px, calc(100vw - 32px)); }
.toast { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 10px; background: var(--glass-strong); backdrop-filter: blur(12px); border: 1px solid hsl(var(--line)); box-shadow: var(--shadow); border-inline-start: 4px solid hsl(var(--emerald)); }
.toast-error { border-inline-start-color: hsl(var(--danger)); }
.toast-error .ti-alert-circle { color: hsl(var(--danger)); }
.toast .ti-circle-check { color: hsl(var(--emerald)); }
.toast span { flex: 1; }
.toast button { border: 0; background: none; cursor: pointer; color: hsl(var(--muted)); }
.modal { border: 1px solid var(--glass-border); border-radius: 14px; padding: 18px; width: min(640px, calc(100vw - 24px)); max-height: calc(100vh - 40px); background: hsl(var(--surface)); color: hsl(var(--ink)); box-shadow: 0 20px 60px rgba(0, 0, 0, .25); }
.modal.wide { width: min(900px, calc(100vw - 24px)); }
.modal::backdrop { background: hsla(160, 40%, 5%, .45); backdrop-filter: blur(3px); }
.modal-head { display: flex; align-items: center; gap: 8px; margin-bottom: 12px; }
.modal-head h2 { margin: 0; font-size: 16px; flex: 1; }
.modal .form-actions { justify-content: flex-end; border-top: 1px solid hsl(var(--line)); padding-top: 12px; margin-top: 6px; }
.sc-list { list-style: none; margin: 10px 0 0; padding: 0; max-height: 55vh; overflow-y: auto; }
.sc-list li { display: flex; justify-content: space-between; gap: 12px; padding: 6px 2px; border-bottom: 1px solid hsl(var(--line)); }
fieldset { border: 1px solid hsl(var(--line)); border-radius: 10px; padding: 10px 12px 0; margin: 0 0 12px; }
legend { font-size: 12px; font-weight: 700; color: hsl(var(--muted)); padding: 0 6px; }

/* ---------- Auth pages ---------- */
.auth-body { display: grid; place-items: center; min-height: 100vh; padding: 16px; background-color: hsl(160 58% 10%); }
.auth-card { width: 100%; max-width: 420px; padding: 28px; border-top: 4px solid hsl(var(--gold)); background: var(--glass-strong); }
.auth-card.wide { max-width: 640px; }
.auth-card h1 { margin: 0 0 4px; font-size: 22px; }
.auth-card > p { margin-top: 0; }
.auth-brand { display: flex; align-items: center; gap: 10px; margin-bottom: 18px; }
.auth-brand .brand-mark { width: 42px; height: 42px; border-radius: 12px; display: grid; place-items: center; background: hsl(var(--gold)); color: hsl(160 58% 12%); font-weight: 800; }
.auth-lang { position: fixed; top: 14px; inset-inline-end: 14px; margin: 0; }
.btn-block { width: 100%; height: 40px; }
.error-detail { white-space: pre-wrap; font-size: 12px; background: hsl(var(--danger-soft)); color: hsl(var(--danger)); padding: 10px; border-radius: 8px; }

/* ---------- Voucher print ---------- */
.voucher { max-width: 900px; margin: 0 auto; padding: 24px; background: hsl(var(--surface)); }
.v-head { display: flex; gap: 14px; align-items: center; border-bottom: 2px solid hsl(var(--emerald)); padding-bottom: 12px; margin-bottom: 12px; }
.v-head img { width: 56px; height: 56px; object-fit: contain; }
.v-head h2 { margin: 0; font-size: 18px; }
.v-title { text-align: center; margin: 10px 0; }
.v-title span { display: inline-block; padding: 4px 18px; border: 1px solid hsl(var(--gold)); border-radius: 20px; font-weight: 700; letter-spacing: .02em; }
.v-meta { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 6px 16px; margin-bottom: 12px; font-size: 13px; }
.v-meta b { color: hsl(var(--muted)); font-weight: 600; margin-inline-end: 6px; }
.v-words { margin: 10px 0; padding: 8px 12px; border-radius: 8px; background: hsla(158, 30%, 50%, .06); font-style: italic; }
.v-sign { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; margin-top: 54px; text-align: center; font-size: 12px; }
.v-sign div { border-top: 1px solid hsl(var(--ink)); padding-top: 6px; }
.v-stamp { color: hsl(var(--danger)); border: 2px solid hsl(var(--danger)); display: inline-block; padding: 2px 12px; border-radius: 6px; font-weight: 800; transform: rotate(-6deg); }

/* ---------- Voucher form lines ---------- */
.lines td { padding: 4px 6px; }
.lines input, .lines select { margin-top: 0 !important; }
.lines .w-amt { width: 150px; }
.totals-bar { display: flex; gap: 18px; flex-wrap: wrap; justify-content: flex-end; padding: 10px; font-weight: 700; }
.diff-bad { color: hsl(var(--danger)); }
.diff-ok { color: hsl(var(--emerald)); }

/* ---------- Mobile ---------- */
.scrim { display: none; position: fixed; inset: 0; background: hsla(160, 40%, 5%, .45); z-index: 50; }
.bottom-nav { display: none; position: fixed; inset-inline: 0; bottom: 0; z-index: 30; height: 62px; padding-bottom: env(safe-area-inset-bottom); background: var(--glass-strong); backdrop-filter: blur(14px); border-top: 1px solid hsl(var(--line)); justify-content: space-around; }
.bottom-nav a, .bottom-nav button { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; font-size: 11px; color: hsl(var(--muted)); background: none; border: 0; text-decoration: none; cursor: pointer; }
.bottom-nav .active { color: hsl(var(--emerald)); font-weight: 700; }
.bottom-nav .ti { font-size: 20px; }
@media (min-width: 1024px) {
  body.sb-collapsed .shell { grid-template-columns: minmax(0, 1fr); }
  body.sb-collapsed .sidebar { display: none; }
}
@media (max-width: 1023px) {
  .shell { grid-template-columns: minmax(0, 1fr); }
  .sidebar { position: fixed; inset-block: 0; inset-inline-start: 0; width: min(84vw, 300px); z-index: 60; transform: translateX(-105%); transition: transform .2s ease; }
  [dir="rtl"] .sidebar { transform: translateX(105%); }
  body.sb-open .sidebar { transform: none; }
  body.sb-open .scrim { display: block; }
  .content { padding: 10px 10px 84px; }
  .search, .hide-sm { display: none; }
  .bottom-nav { display: flex; }
  .ctx select { max-width: 150px; }
  .topbar { padding: 0 8px; gap: 4px; }
  .v-sign { grid-template-columns: repeat(2, 1fr); }
}

/* ---------- Loading bar ---------- */
body.is-loading::before { content: ""; position: fixed; top: 0; inset-inline: 0; height: 3px; z-index: 200; background: linear-gradient(90deg, hsl(var(--emerald)), hsl(var(--gold))); animation: load 1.1s ease-in-out infinite; transform-origin: left; }
@keyframes load { 0% { transform: scaleX(.1); } 60% { transform: scaleX(.8); } 100% { transform: scaleX(1); opacity: .4; } }
@media (prefers-reduced-motion: reduce) { * { transition: none !important; animation: none !important; } }

/* ---------- Print ---------- */
@media print {
  .sidebar, .topbar, .bottom-nav, .toasts, .no-print, .scrim, .pagination, .tabs { display: none !important; }
  body { background: #fff !important; color: #000; }
  .shell { display: block; }
  .content { padding: 0; max-width: none; }
  .card { box-shadow: none; backdrop-filter: none; background: #fff; border: 0; }
  .voucher { padding: 0; }
  a { color: inherit; }
  th { background: #eee !important; -webkit-print-color-adjust: exact; print-color-adjust: exact; }
}

/* ---------- Timetable ---------- */
.tt th, .tt td { text-align: center; vertical-align: middle; min-width: 92px; }
.tt td.tt-cell { padding: 4px; }
.tt td.tt-break { background: hsla(43, 78%, 46%, .10); color: hsl(var(--gold)); font-weight: 600; font-size: 12px; }
.tt .slot { display: block; width: 100%; border: 1px dashed hsl(var(--line)); background: transparent; border-radius: 10px; padding: 6px 4px; min-height: 52px; cursor: pointer; color: inherit; font: inherit; }
.tt .slot.filled { border: 1px solid hsla(158, 64%, 32%, .35); background: hsla(158, 64%, 32%, .08); }
.tt .slot b { display: block; font-size: 12.5px; }
.tt .slot small { display: block; opacity: .75; font-size: 11px; }
.tt .slot:hover { border-color: hsl(var(--emerald)); }
@media print { .tt .slot { border: 1px solid #999; min-height: 40px; } }

/* ---------- PWA install banner / mobile app ---------- */
.app-banner { position: fixed; left: 12px; right: 12px; bottom: calc(70px + env(safe-area-inset-bottom, 0px)); z-index: 60; display: flex; gap: 10px; align-items: center;
  padding: 10px 12px; border-radius: 16px; background: hsl(var(--surface)); color: hsl(var(--ink)); box-shadow: 0 10px 30px rgba(0,0,0,.18); border: 1px solid hsla(158,64%,32%,.25); }
.app-banner img { width: 40px; height: 40px; border-radius: 10px; }
.app-banner div { flex: 1; min-width: 0; } .app-banner strong { display: block; font-size: 14px; } .app-banner span { display: block; font-size: 12px; opacity: .8; }
@media (min-width: 900px) { .app-banner { left: auto; width: 380px; bottom: 20px; } }
@media (display-mode: standalone) {
  body { padding-top: env(safe-area-inset-top, 0px); }
  .bottom-nav { padding-bottom: env(safe-area-inset-bottom, 0px); }
}

/* ---------- Related pages (ek line, chhota menu) ---------- */
.related { display: flex; gap: 6px; flex-wrap: nowrap; overflow-x: auto; margin: -4px 0 14px; padding-bottom: 2px; scrollbar-width: thin; }
.related .rel { display: inline-flex; align-items: center; gap: 6px; flex: 0 0 auto; padding: 6px 12px; border-radius: 999px; border: 1px solid hsl(var(--line));
  background: hsl(var(--surface)); color: hsl(var(--ink)); text-decoration: none; font-size: 13px; white-space: nowrap; }
.related .rel i { font-size: 16px; color: hsl(var(--emerald)); }
.related .rel:hover { border-color: hsl(var(--emerald)); }
.related .rel.active { background: hsl(var(--emerald)); border-color: hsl(var(--emerald)); color: #fff; }
.related .rel.active i { color: #fff; }
.related .rel.icon-only { padding: 6px 9px; }

/* ---------- Role-based home ---------- */
.quick-actions { display: grid; grid-template-columns: repeat(auto-fill, minmax(110px, 1fr)); gap: 10px; margin-bottom: 14px; }
.quick-actions a { display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 14px 8px; border-radius: 16px; background: hsl(var(--surface));
  border: 1px solid hsl(var(--line)); text-decoration: none; color: hsl(var(--ink)); font-size: 13px; font-weight: 600; text-align: center; }
.quick-actions a i { font-size: 26px; color: hsl(var(--emerald)); }
.quick-actions a:hover { border-color: hsl(var(--emerald)); }
.task-row { display: flex; gap: 10px; align-items: center; padding: 10px 4px; border-bottom: 1px solid hsl(var(--line)); text-decoration: none; color: inherit; }
.task-row:last-child { border-bottom: 0; }
.task-row > i:first-child { font-size: 20px; } .task-row span { flex: 1; }

/* =========================================================
   v3.2 — wazeh, khubsurat aur mobile-friendly
   ========================================================= */
body { font-size: 15px; font-variant-numeric: tabular-nums; }
.num, td.num, th.num { font-variant-numeric: tabular-nums; }
.muted, .cell-sub, .hint { color: hsl(var(--ink) / .68); }
.table-wrap thead th { position: sticky; top: 0; z-index: 1; background: hsl(var(--surface)); box-shadow: inset 0 -1px 0 hsl(var(--line)); }
.table-wrap tbody tr:nth-child(even) { background: hsl(var(--ink) / .025); }
.table-wrap tbody tr:hover { background: hsla(158, 64%, 32%, .06); }
.table-wrap tfoot td { font-weight: 700; background: hsla(43, 78%, 46%, .08); }
.btn, .btn-icon, input, select { min-height: 40px; }
@media (max-width: 760px) { .btn, .btn-icon { min-height: 44px; } }

/* Field validation */
input.invalid, select.invalid { border-color: hsl(var(--danger)) !important; box-shadow: 0 0 0 3px hsl(var(--danger) / .15); }
.field-err { display: block; color: hsl(var(--danger)); font-size: 12px; margin-top: 4px; font-weight: 600; }

/* Ctrl+K command palette */
.cmdk { position: fixed; inset: 0; z-index: 100; background: rgba(8, 24, 18, .45); backdrop-filter: blur(3px); display: flex; justify-content: center; align-items: flex-start; padding: 10vh 12px 12px; }
.cmdk[hidden] { display: none; }
.cmdk-panel { width: 100%; max-width: 680px; background: hsl(var(--surface)); color: hsl(var(--ink)); border-radius: 18px; box-shadow: 0 30px 80px rgba(0,0,0,.35); overflow: hidden; border: 1px solid hsl(var(--line)); }
.cmdk-input { display: flex; align-items: center; gap: 10px; padding: 12px 16px; border-bottom: 1px solid hsl(var(--line)); }
.cmdk-input i { font-size: 20px; color: hsl(var(--emerald)); }
.cmdk-input input { flex: 1; border: 0; background: transparent; font-size: 17px; outline: none; box-shadow: none; margin: 0; min-height: 36px; color: inherit; }
.cmdk-input kbd { font-size: 11px; opacity: .6; }
.cmdk-list { max-height: 60vh; overflow: auto; padding: 6px; }
.cmdk-item { display: flex; gap: 10px; align-items: center; padding: 10px; border-radius: 12px; }
.cmdk-item:hover { background: hsla(158, 64%, 32%, .06); }
.cmdk-item > i, .cmdk-item > img { width: 36px; height: 36px; flex: 0 0 36px; border-radius: 10px; display: grid; place-items: center; font-size: 18px; background: hsla(158, 64%, 32%, .1); color: hsl(var(--emerald)); object-fit: cover; }
.cmdk-text { flex: 1; min-width: 0; } .cmdk-text strong { display: block; } .cmdk-text small { display: block; opacity: .7; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cmdk-acts { display: flex; gap: 6px; flex-wrap: wrap; justify-content: flex-end; }
.cmdk-acts a { display: inline-flex; gap: 4px; align-items: center; padding: 6px 10px; border-radius: 10px; border: 1px solid hsl(var(--line)); text-decoration: none; color: inherit; font-size: 13px; white-space: nowrap; }
.cmdk-acts a.sel, .cmdk-acts a:hover { background: hsl(var(--emerald)); border-color: hsl(var(--emerald)); color: #fff; }
.cmdk-empty { padding: 18px; text-align: center; opacity: .7; margin: 0; }
.cmdk-foot { padding: 8px 16px; font-size: 11px; opacity: .55; border-top: 1px solid hsl(var(--line)); }
@media (max-width: 600px) { .cmdk { padding-top: 12px; } .cmdk-item { flex-wrap: wrap; } .cmdk-acts { width: 100%; justify-content: flex-start; } }
form.search input { cursor: pointer; }

/* Undo bar */
.undo-bar { position: fixed; left: 50%; transform: translateX(-50%); bottom: calc(80px + env(safe-area-inset-bottom, 0px)); z-index: 90; display: flex; gap: 10px; align-items: center;
  padding: 10px 14px; border-radius: 14px; background: #173b2e; color: #fff; box-shadow: 0 12px 30px rgba(0,0,0,.3); font-weight: 600; max-width: calc(100% - 24px); }
.undo-bar .btn { background: rgba(255,255,255,.15); border-color: transparent; color: #fff; }
.undo-bar .btn-primary { background: hsl(var(--gold)); color: #2b2100; }

/* Tour */
.tour-ring { position: absolute; z-index: 95; border-radius: 14px; box-shadow: 0 0 0 4px hsl(var(--gold)), 0 0 0 9999px rgba(8, 24, 18, .5); pointer-events: none; transition: all .25s; }
.tour-tip { position: absolute; z-index: 96; width: 310px; max-width: calc(100vw - 20px); background: hsl(var(--surface)); color: hsl(var(--ink)); border-radius: 16px; padding: 14px 16px; box-shadow: 0 20px 50px rgba(0,0,0,.35); }
.tour-tip p { margin: 6px 0 10px; font-size: 14px; opacity: .85; } .tour-nav { display: flex; gap: 8px; align-items: center; } .tour-nav span { flex: 1; font-size: 12px; opacity: .6; }

/* Mobile: tables cards ban jayen */
@media (max-width: 640px) {
  table.cardify thead { display: none; }
  table.cardify, table.cardify tbody, table.cardify tr, table.cardify td { display: block; width: 100%; }
  table.cardify tr { border: 1px solid hsl(var(--line)); border-radius: 14px; margin: 0 0 10px; padding: 8px 12px; background: hsl(var(--surface)) !important; }
  table.cardify td { border: 0 !important; padding: 5px 0 !important; display: flex; justify-content: space-between; gap: 12px; text-align: end; min-height: 0; }
  table.cardify td::before { content: attr(data-label); font-weight: 600; opacity: .6; text-align: start; flex: 0 0 40%; font-size: 12.5px; }
  table.cardify td:first-child { font-size: 15px; font-weight: 600; justify-content: flex-start; text-align: start; }
  table.cardify td:first-child::before { display: none; }
  table.cardify td:empty { display: none; }
  table.cardify td .cv { min-width: 0; flex: 1; text-align: end; }
  table.cardify td .cv .cell-sub { display: block; }
  table.cardify td:first-child .cv { text-align: start; }
  table.cardify tr { display: flex !important; flex-wrap: wrap; }
  table.cardify td:first-child { width: auto; flex: 0 0 auto; padding-inline-end: 8px !important; color: hsl(var(--muted)); font-size: 13px; }
  table.cardify td.card-title2 { flex: 1 1 60%; order: -1; font-size: 15.5px; font-weight: 700; justify-content: flex-start; text-align: start; }
  table.cardify td.card-title2::before { display: none; }
  table.cardify td.card-title2 .cv { text-align: start; }
  table.cardify td:first-child { order: -2; }
  table.cardify td:not(:first-child):not(.card-title2) { flex: 1 1 100%; }
  table.cardify td .actions { justify-content: flex-end; }
  table.cardify tfoot { display: block; } table.cardify tfoot tr { display: flex; flex-wrap: wrap; justify-content: space-between; }
  table.cardify tfoot td { display: inline; width: auto; }
  table.cardify td input, table.cardify td select { max-width: 60%; }
}
@media print { table.cardify thead { display: table-header-group !important; } }

/* Apna confirm box */
.confirm-box { position: fixed; inset: 0; z-index: 120; background: rgba(8, 24, 18, .5); display: grid; place-items: center; padding: 16px; }
.confirm-card { width: 100%; max-width: 400px; background: hsl(var(--surface)); color: hsl(var(--ink)); border-radius: 18px; padding: 20px; box-shadow: 0 30px 70px rgba(0,0,0,.35); text-align: center; }
.confirm-card > i { font-size: 38px; color: hsl(var(--gold)); }
.confirm-card p { margin: 10px 0 18px; font-size: 15px; line-height: 1.6; }
.confirm-acts { display: flex; gap: 10px; justify-content: center; } .confirm-acts .btn { flex: 1; }

/* =========================================================
   v3.3 — Responsive aur alignment (desktop · tablet · mobile)
   ========================================================= */
/* Info (label : value) — har jagah seedhi line mein */
.v-meta { grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)) !important; }
.v-meta > div { display: grid; grid-template-columns: 128px minmax(0, 1fr); gap: 10px; align-items: baseline; padding: 4px 0; overflow-wrap: break-word; }
.v-meta b { margin: 0; }

/* Profile ka sar (photo + naam) */
.profile-head { display: flex; gap: 16px; align-items: flex-start; }
.profile-head .ph { width: 96px; height: 112px; border-radius: 12px; object-fit: cover; flex: 0 0 96px; display: grid; place-items: center; font-size: 32px; }
.profile-head .pinfo { flex: 1; min-width: 0; }
.profile-head h2 { margin: 0 0 8px; font-size: 20px; overflow-wrap: break-word; }

/* Page header ke buttons */
.page-head h1 { overflow-wrap: break-word; }
.page-actions .btn { white-space: nowrap; }

/* Tabs: scroll ka ishara */
.tabs { scrollbar-width: none; -webkit-mask-image: linear-gradient(90deg, #000 85%, transparent); mask-image: linear-gradient(90deg, #000 85%, transparent); }
.tabs::-webkit-scrollbar { display: none; }
[dir="rtl"] .tabs { -webkit-mask-image: linear-gradient(270deg, #000 85%, transparent); mask-image: linear-gradient(270deg, #000 85%, transparent); }

/* Mobile ke liye search button (top bar) */
.search-btn { display: none; }

/* Forms: label aur input hamesha poori chaurai */
label > input, label > select, label > textarea { width: 100%; }
.form-actions { display: flex; gap: 8px; flex-wrap: wrap; }

/* ---------- Tablet (≤ 1023px) ---------- */
@media (max-width: 1023px) {
  .search-btn { display: inline-grid; }
  .grid-2[style] { grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)) !important; }
}

/* ---------- Mobile (≤ 760px) ---------- */
@media (max-width: 760px) {
  html { -webkit-text-size-adjust: 100%; }
  .content { padding: 8px 8px 90px; }
  /* Har do-column layout ek column */
  .grid-2, .grid-2[style] { grid-template-columns: minmax(0, 1fr) !important; gap: 10px; }
  .grid { grid-template-columns: minmax(0, 1fr); }
  .row-gap[style*="nowrap"] { flex-wrap: wrap !important; }
  .panel { padding: 14px 12px; margin-bottom: 10px; }
  .card { border-radius: 14px; }

  /* Top bar: chhota aur saaf */
  .topbar { height: 54px; }
  .ctx select { max-width: 42vw; height: 36px; }
  .ctx + .ctx { display: none; }
  .lang-btn { padding: 0 6px; }

  /* Page header: naam upar, buttons neeche barabar */
  .page-head { gap: 6px; margin-bottom: 8px; }
  .page-head h1 { font-size: 17px; flex: 1; min-width: 0; }
  .page-actions { margin: 0; width: 100%; display: grid; grid-template-columns: repeat(auto-fit, minmax(0, 1fr)); gap: 6px; }
  .page-actions > * { min-width: 0; }
  .page-actions .btn { width: 100%; justify-content: center; padding-inline: 8px; font-size: 13px; overflow: hidden; text-overflow: ellipsis; }
  .page-actions form { margin: 0; display: contents; }

  /* Stats: 2 x 2 */
  .stats { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
  .stats .stat { padding: 10px 12px; min-width: 0; }
  .stats .stat b { font-size: 18px; overflow-wrap: break-word; }
  .stats .stat span { font-size: 12px; }

  /* Profile: photo upar beech mein, naam neeche */
  .profile-head { flex-direction: column; align-items: center; text-align: center; gap: 10px; }
  .profile-head .ph { width: 84px; height: 84px; flex-basis: auto; border-radius: 50%; }
  .profile-head .pinfo { width: 100%; text-align: start; }
  .profile-head h2 { text-align: center; font-size: 19px; }

  /* Info rows: label baen, value daen, halki line */
  .v-meta { grid-template-columns: minmax(0, 1fr) !important; gap: 0; font-size: 14px; }
  .v-meta > div { grid-template-columns: 42% minmax(0, 1fr); padding: 7px 0; border-bottom: 1px dashed hsl(var(--line)); }
  .v-meta > div:last-child { border-bottom: 0; }

  /* Buttons ki line: barabar chaurai */
  .panel .row-gap > .btn, .panel .row-gap > a.btn { flex: 1 1 calc(50% - 8px); justify-content: center; }
  .actions { flex-wrap: wrap; }

  /* Toolbar (filters): 2 columns */
  .toolbar { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
  .toolbar label { min-width: 0 !important; max-width: none !important; }
  .toolbar label[style*="flex"] , .toolbar .btn:last-child:nth-child(odd) { grid-column: 1 / -1; }
  .toolbar > .btn, .toolbar > button { width: 100%; justify-content: center; }
  .toolbar > .btn-primary:last-of-type, .toolbar > button[type=submit] { grid-column: 1 / -1; }
  .toolbar .check { grid-column: 1 / -1; }

  /* Dialogs: neeche se poori chaurai */
  .modal, .modal.wide { width: 100vw; max-width: 100vw; max-height: 92vh; margin: auto 0 0; border-radius: 18px 18px 0 0; padding: 16px 14px calc(16px + env(safe-area-inset-bottom, 0px)); }
  .modal .form-actions { position: sticky; bottom: -16px; background: hsl(var(--surface)); padding-bottom: 6px; }
  .modal .form-actions .btn { flex: 1; justify-content: center; }

  /* Lambe text aur raqamein na tooten */
  h1, h2, h3, td, .cell-sub { overflow-wrap: break-word; }
  .num { white-space: nowrap; }
  .alert { font-size: 13.5px; }
  .quick-actions { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
  .quick-actions a { padding: 12px 4px; font-size: 12px; }
  .quick-actions a i { font-size: 24px; }
  .related { margin-inline: -8px; padding-inline: 8px; }
}

/* ---------- Bohat chhote phone (≤ 380px) ---------- */
@media (max-width: 380px) {
  .stats .stat b { font-size: 16px; }
  .page-head h1 { font-size: 16px; }
  .top-actions .lang-btn { display: none; }
}

/* ---------- Bara desktop: parhne ki aasan chaurai ---------- */
@media (min-width: 1600px) { .content { max-width: 1560px; margin-inline: auto; } }

/* =========================================================
   v3.4 — Yaksaniyat (ek jaisa design) aur asaani
   ========================================================= */
/* Breadcrumb + page help */
.crumbs { display: flex; align-items: center; gap: 6px; font-size: 12.5px; color: hsl(var(--muted)); margin: 2px 0 2px; flex-wrap: wrap; }
.crumbs a, .crumbs span { color: inherit; text-decoration: none; display: inline-flex; align-items: center; gap: 4px; }
.crumbs > * + *::before { content: "›"; margin-inline-end: 6px; opacity: .6; }
.crumbs a:hover { color: hsl(var(--emerald)); }
.page-head h1 { font-size: 20px; letter-spacing: -.01em; }
.page-help { display: flex; gap: 8px; align-items: flex-start; margin: -2px 0 12px; font-size: 13.5px; color: hsl(var(--ink) / .72); line-height: 1.55; }
.page-help i { color: hsl(var(--emerald)); font-size: 17px; margin-top: 1px; flex: none; }

/* Section headings: har card mein ek jaisa */
.panel > h2 { display: flex; align-items: center; gap: 8px; font-size: 15px; padding-bottom: 10px; margin-bottom: 12px; border-bottom: 1px solid hsl(var(--line)); }
.panel > h2 .ti { color: hsl(var(--emerald)); }

/* Buttons: ek jaisi unchai, gol kone aur saaf focus */
.btn { border-radius: 10px; font-weight: 600; gap: 6px; display: inline-flex; align-items: center; }
.btn-sm { min-height: 34px; padding: 4px 10px; font-size: 13px; }
:focus-visible { outline: 3px solid hsl(var(--gold) / .7); outline-offset: 2px; border-radius: 8px; }
input:focus, select:focus, textarea:focus { border-color: hsl(var(--emerald)); box-shadow: 0 0 0 3px hsla(158, 64%, 32%, .15); outline: none; }

/* Forms: labels ek jaisi */
label { font-weight: 600; font-size: 13px; }
label > input, label > select, label > textarea { margin-top: 5px; font-weight: 400; font-size: 14.5px; }
.req { color: hsl(var(--danger)); }
.hint { display: block; font-weight: 400; font-size: 12.5px; margin-top: 4px; }

/* Stats cards: ek jaisi */
.stat { padding: 14px 16px; }
.stat span { display: block; font-size: 12.5px; color: hsl(var(--muted)); font-weight: 600; }
.stat b { display: block; font-size: 22px; margin-top: 4px; font-variant-numeric: tabular-nums; }

/* Badges: ek size */
.badge { display: inline-flex; align-items: center; gap: 4px; padding: 2px 9px; border-radius: 999px; font-size: 12px; font-weight: 700; line-height: 1.6; white-space: nowrap; vertical-align: middle; }

/* Empty state */
.empty { padding: 36px 16px; text-align: center; }
.empty > i { font-size: 44px; color: hsl(var(--emerald) / .55); }
.empty h3 { margin: 8px 0 4px; font-size: 16px; }
.empty p { margin: 0 auto 12px; max-width: 420px; color: hsl(var(--muted)); }

/* Top bar ka search (Ctrl+K) */
button.search { display: flex; align-items: center; gap: 8px; height: 36px; padding: 0 10px; border: 1px solid hsl(var(--line)); border-radius: 10px; background: hsl(var(--surface)); color: hsl(var(--muted)); cursor: pointer; font: inherit; font-size: 13.5px; text-align: start; }
button.search .ti { position: static; transform: none; font-size: 17px; }
button.search span { flex: 1; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
button.search kbd { font-size: 11px; border: 1px solid hsl(var(--line)); border-radius: 6px; padding: 1px 6px; background: hsl(var(--ink) / .04); }
button.search:hover { border-color: hsl(var(--emerald)); }
@media (max-width: 760px) { .page-help { font-size: 13px; margin-bottom: 10px; } .crumbs { font-size: 12px; } .page-head h1 { font-size: 18px; } }
@media (max-width: 1023px) { button.search { display: none; } }

/* =========================================================
   v3.8 — Ek jaise action buttons (har page par)
   Tarteeb: Report · Import · Export · Print · … · Add (hamesha aakhir mein)
   ========================================================= */
.act { gap: 6px; }
.act .ti { font-size: 17px; }
.act-export .ti { color: #1d7d4f; }
.act-import .ti, .act-template .ti { color: hsl(var(--gold)); }
.act-report .ti { color: hsl(var(--emerald)); }
.act-print .ti { color: hsl(var(--ink) / .75); }
.act-print.btn-primary .ti, .act-add .ti { color: #fff; }
.page-actions, .toolbar, .bar { --o-report: 1; }
.page-actions > *, .bar > * { order: 5; }
.page-actions > .act-report, .bar > .act-report { order: 1; }
.page-actions > .act-import, .page-actions > .act-template { order: 2; }
.page-actions > .act-export, .bar > .act-export { order: 3; }
.page-actions > .act-print, .bar > .act-print { order: 4; }
.page-actions > .act-add, .page-actions > .btn-primary { order: 9; }
.page-actions { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
/* Filters ki line mein Export hamesha aakhir mein */
.toolbar > .act-export { order: 20; margin-inline-start: auto; }
/* Chhote (icon) buttons: tooltip ka nishaan */
.btn-sm.act { min-width: 34px; justify-content: center; }
@media (max-width: 760px) {
  .page-actions > .act-report, .page-actions > .act-import, .page-actions > .act-template, .page-actions > .act-export, .page-actions > .act-print { font-size: 12.5px; }
  .toolbar > .act-export { margin: 0; grid-column: 1 / -1; }
}
@media (max-width: 760px) {
  .page-actions { display: grid !important; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px; }
  .page-actions > .act-add, .page-actions > .btn-primary:not(.act-print) { grid-column: 1 / -1; }
}
/* Filters: har page par ek jaisa card */
form.toolbar { background: hsl(var(--surface)); border: 1px solid hsl(var(--line)); border-radius: 14px; padding: 10px 12px; margin-bottom: 12px; gap: 10px; align-items: flex-end; box-shadow: 0 1px 2px rgba(0,0,0,.03); }
form.toolbar label { margin: 0; }
form.toolbar .btn { min-height: 40px; }
@media print { form.toolbar { display: none; } }
