/* ==========================================================================
   SPMA corporate theme — Suthra Punjab green.  Tokens first, components after.
   ========================================================================== */
:root {
  --brand-950: #072A20;
  --brand-900: #0B3D2E;
  --brand-800: #0F4A37;
  --brand-700: #125A3F;
  --brand-600: #1B6B45;
  --brand-500: #24824F;
  --brand-100: #DDEEE4;
  --brand-50:  #EEF5F1;
  --accent:     #E39B12;
  --accent-600: #C4840C;
  --accent-soft:#FBF0DA;

  --ok:     #1B7F4C; --ok-soft:     #DFF3E7;
  --info:   #1C6E85; --info-soft:   #DCEFF5;
  --warn:   #B5720A; --warn-soft:   #FBEFD6;
  --danger: #B4342C; --danger-soft: #F9E1DF;
  --muted:  #6B7A72; --muted-soft:  #ECEFED;

  --ground:   #F3F6F4;
  --surface:  #FFFFFF;
  --surface-2:#EDF2EF;
  --line:     #D8E1DC;
  --ink:      #15211B;
  --ink-2:    #4A5851;
  --ink-3:    #7A8781;

  --font-display: "Sora", "Segoe UI", system-ui, sans-serif;
  --font-body:    "Source Sans 3", "Segoe UI", system-ui, sans-serif;
  --font-mono:    "JetBrains Mono", Consolas, monospace;

  --sidebar-w: 256px;
  --sidebar-w-min: 72px;
  --topbar-h: 60px;
  --radius: 10px;
  --shadow-1: 0 1px 2px rgba(11,61,46,.06), 0 1px 3px rgba(11,61,46,.08);
  --shadow-2: 0 6px 20px rgba(11,61,46,.12);
  --ease: cubic-bezier(.2,.7,.2,1);
}

html[dir="rtl"] body { font-family: "Noto Nastaliq Urdu", var(--font-body); }
html[dir="rtl"] .kpi-value, html[dir="rtl"] .num, html[dir="rtl"] .mono, html[dir="rtl"] h1, html[dir="rtl"] .brand-name { font-family: var(--font-display); }

* { box-sizing: border-box; }
html, body { height: 100%; }
body {
  margin: 0; background: var(--ground); color: var(--ink);
  font: 15px/1.5 var(--font-body);
  -webkit-font-smoothing: antialiased;
}
h1,h2,h3,h4,h5,.display { font-family: var(--font-display); letter-spacing: -.01em; }
a { color: var(--brand-600); text-decoration: none; }
a:hover { color: var(--brand-800); }
.num, .tabular { font-variant-numeric: tabular-nums; }
.mono { font-family: var(--font-mono); font-size: .88em; }
.eyebrow { font-family: var(--font-display); font-size: .7rem; letter-spacing: .12em; text-transform: uppercase; color: var(--ink-3); font-weight: 600; }

/* ---------- App shell -------------------------------------------------- */
.app { display: grid; grid-template-columns: var(--sidebar-w) minmax(0, 1fr); min-height: 100vh; transition: grid-template-columns .25s var(--ease); }
.app.is-collapsed { grid-template-columns: var(--sidebar-w-min) minmax(0, 1fr); }
.main { min-width: 0; }
.backdrop { position: fixed; inset: 0; background: rgba(7,42,32,.45); z-index: 99; display: none; }

.sidebar {
  position: sticky; top: 0; height: 100vh; overflow-y: auto; overflow-x: hidden;
  background: linear-gradient(180deg, var(--brand-900) 0%, var(--brand-950) 100%);
  color: #DCEBE2; display: flex; flex-direction: column;
  border-right: 1px solid rgba(255,255,255,.06);
}
.sidebar::-webkit-scrollbar { width: 6px; } .sidebar::-webkit-scrollbar-thumb { background: rgba(255,255,255,.15); border-radius: 3px; }
.brand { display: flex; align-items: center; gap: 12px; padding: 16px 18px; height: var(--topbar-h); border-bottom: 1px solid rgba(255,255,255,.08); }
.brand-mark { width: 34px; height: 34px; border-radius: 9px; background: var(--accent); display: grid; place-items: center; color: var(--brand-950); font-family: var(--font-display); font-weight: 700; flex: none; }
.logo-plate { display: inline-flex; align-items: center; justify-content: center; background: #fff; border-radius: 9px; padding: 3px 5px; flex: none; box-shadow: 0 1px 2px rgba(0,0,0,.25); }
.logo-plate img { display: block; height: 100%; width: auto; max-width: 100%; object-fit: contain; }
.brand-logo { height: 38px; width: 60px; }
.logo-plate-lg { height: 76px; padding: 6px 8px; border-radius: 14px; }
.auth-brands { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.auth-brands-text { border-inline-start: 1px solid rgba(255,255,255,.14); padding-inline-start: 14px; }
.brand-name { font-family: var(--font-display); font-weight: 600; font-size: 1rem; color: #fff; line-height: 1.1; white-space: nowrap; }
.brand-sub { font-size: .7rem; color: #9FBFAF; letter-spacing: .08em; text-transform: uppercase; white-space: nowrap; }

.nav-section { padding: 14px 12px 4px; font-size: .66rem; letter-spacing: .12em; text-transform: uppercase; color: #7FA491; font-family: var(--font-display); white-space: nowrap; }
.nav-item {
  display: flex; align-items: center; gap: 12px; margin: 2px 10px; padding: 9px 12px; border-radius: 8px;
  color: #C9DDD1; font-weight: 500; white-space: nowrap; position: relative;
  transition: background .15s, color .15s, transform .15s var(--ease);
}
.nav-item i { font-size: 1.1rem; width: 22px; text-align: center; flex: none; opacity: .9; }
.nav-item:hover { background: rgba(255,255,255,.07); color: #fff; }
.nav-item.active { background: rgba(227,155,18,.16); color: #fff; }
.nav-item.active::before { content: ""; position: absolute; inset-inline-start: -10px; top: 8px; bottom: 8px; width: 3px; border-radius: 2px; background: var(--accent); }
.nav-item .badge-soon { margin-left: auto; font-size: .6rem; letter-spacing: .06em; padding: 2px 6px; border-radius: 999px; background: rgba(255,255,255,.1); color: #9FBFAF; }
.nav-item .badge-count { margin-left: auto; font-size: .7rem; padding: 1px 7px; border-radius: 999px; background: var(--accent); color: var(--brand-950); font-weight: 700; }
.sidebar-foot { margin-top: auto; padding: 14px 18px; font-size: .72rem; color: #7FA491; border-top: 1px solid rgba(255,255,255,.08); white-space: nowrap; }

.app.is-collapsed .brand-name, .app.is-collapsed .brand-sub, .app.is-collapsed .nav-section,
.app.is-collapsed .sidebar .nav-item span, .app.is-collapsed .sidebar .nav-item .badge-soon, .app.is-collapsed .sidebar .nav-item .badge-count, .app.is-collapsed .sidebar-foot { display: none; }
.app.is-collapsed .nav-item { justify-content: center; padding: 11px; margin: 4px 12px; }
.app.is-collapsed .brand { justify-content: center; padding: 13px 8px; }
.app.is-collapsed .brand-logo { width: 54px; height: 34px; }

/* ---------- Top bar ----------------------------------------------------- */
.topbar {
  position: sticky; top: 0; z-index: 50; height: var(--topbar-h);
  background: rgba(255,255,255,.85); backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
  display: flex; align-items: center; gap: 14px; padding: 0 22px;
}
.topbar .btn-icon { width: 38px; height: 38px; border-radius: 9px; display: grid; place-items: center; color: var(--ink-2); border: 1px solid transparent; background: transparent; }
.topbar .btn-icon:hover { background: var(--surface-2); color: var(--ink); }
.global-search { flex: 1; max-width: 520px; position: relative; }
.global-search input { width: 100%; height: 38px; border: 1px solid var(--line); border-radius: 9px; padding-block: 0; padding-inline: 38px 12px; background: var(--surface); font: inherit; }
.global-search input:focus { outline: 2px solid var(--brand-100); border-color: var(--brand-500); }
.global-search i { position: absolute; inset-inline-start: 12px; top: 10px; color: var(--ink-3); }
.global-search kbd { position: absolute; inset-inline-end: 10px; top: 9px; font-size: .7rem; color: var(--ink-3); background: var(--surface-2); border-radius: 5px; padding: 2px 6px; border: 1px solid var(--line); }
.user-chip { display: flex; align-items: center; gap: 10px; padding: 4px 8px 4px 4px; border-radius: 999px; border: 1px solid var(--line); background: var(--surface); }
.avatar { width: 32px; height: 32px; border-radius: 50%; background: var(--brand-600); color: #fff; display: grid; place-items: center; font-weight: 600; font-family: var(--font-display); font-size: .85rem; }
.user-chip .who { line-height: 1.1; }
.user-chip .who b { display: block; font-size: .85rem; font-weight: 600; }
.user-chip .who small { color: var(--ink-3); font-size: .7rem; }
.lang-toggle { display: inline-flex; border: 1px solid var(--line); border-radius: 8px; overflow: hidden; }
.lang-toggle button { border: 0; background: var(--surface); padding: 6px 10px; font-size: .78rem; font-weight: 600; color: var(--ink-3); }
.lang-toggle button.active { background: var(--brand-900); color: #fff; }

/* ---------- Content ----------------------------------------------------- */
.content { padding: 24px 28px 48px; min-width: 0; }
.page-head { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 12px; margin-bottom: 20px; }
.page-head h1 { font-size: 1.5rem; font-weight: 600; margin: 0; color: var(--brand-900); }
.page-head .sub { color: var(--ink-3); margin-top: 2px; }

.card { border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow-1); background: var(--surface); }
.card-header { background: transparent; border-bottom: 1px solid var(--line); font-family: var(--font-display); font-weight: 600; font-size: .95rem; padding: 12px 18px; }

/* KPI tiles */
.kpi-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 14px; }
.kpi { position: relative; overflow: hidden; padding: 16px 18px; border-radius: var(--radius); background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow-1);
       display: flex; flex-direction: column; gap: 6px; transition: transform .2s var(--ease), box-shadow .2s; cursor: pointer; }
.kpi:hover { transform: translateY(-2px); box-shadow: var(--shadow-2); }
.kpi .kpi-label { padding-inline-end: 48px; font-size: .78rem; color: var(--ink-3); font-weight: 600; letter-spacing: .04em; text-transform: uppercase; font-family: var(--font-display); }
.kpi .kpi-value { font-family: var(--font-display); font-size: 1.9rem; font-weight: 700; line-height: 1; color: var(--ink); font-variant-numeric: tabular-nums; }
.kpi .kpi-foot { font-size: .8rem; color: var(--ink-3); }
.kpi::after { content: ""; position: absolute; inset: auto 0 0 0; height: 3px; background: var(--tone, var(--brand-600)); }
.kpi.tone-ok { --tone: var(--ok); } .kpi.tone-info { --tone: var(--info); } .kpi.tone-warn { --tone: var(--warn); } .kpi.tone-danger { --tone: var(--danger); } .kpi.tone-accent { --tone: var(--accent); }
.kpi .kpi-icon { position: absolute; inset-inline-end: 14px; top: 14px; width: 36px; height: 36px; border-radius: 9px; display: grid; place-items: center; background: color-mix(in srgb, var(--tone, var(--brand-600)) 12%, white); color: var(--tone, var(--brand-600)); font-size: 1.1rem; }
.kpi.pulse { animation: kpiPulse 1.2s var(--ease); }
@keyframes kpiPulse { 0% { box-shadow: 0 0 0 0 color-mix(in srgb, var(--tone, var(--brand-600)) 45%, transparent); } 100% { box-shadow: 0 0 0 14px transparent; } }

/* Status pills */
.pill { display: inline-flex; align-items: center; gap: 6px; padding: 2px 10px; border-radius: 999px; font-size: .74rem; font-weight: 600; letter-spacing: .03em; font-family: var(--font-display); white-space: nowrap; }
.pill::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.pill-ok { background: var(--ok-soft); color: var(--ok); }
.pill-info { background: var(--info-soft); color: var(--info); }
.pill-warn { background: var(--warn-soft); color: var(--warn); }
.pill-danger { background: var(--danger-soft); color: var(--danger); }
.pill-muted { background: var(--muted-soft); color: var(--muted); }

/* Buttons */
.btn { border-radius: 8px; font-weight: 600; font-family: var(--font-display); font-size: .88rem; padding: 8px 14px; }
.btn-brand { background: var(--brand-700); border-color: var(--brand-700); color: #fff; }
.btn-brand:hover, .btn-brand:focus { background: var(--brand-900); border-color: var(--brand-900); color: #fff; }
.btn-accent { background: var(--accent); border-color: var(--accent); color: var(--brand-950); }
.btn-accent:hover { background: var(--accent-600); border-color: var(--accent-600); color: var(--brand-950); }
.btn-outline-brand { border-color: var(--brand-600); color: var(--brand-700); }
.btn-outline-brand:hover { background: var(--brand-50); color: var(--brand-900); }

/* Forms */
.form-control, .form-select { border-radius: 8px; border-color: var(--line); padding: 9px 12px; }
.form-control:focus, .form-select:focus { border-color: var(--brand-500); box-shadow: 0 0 0 3px var(--brand-100); }
.form-label { font-weight: 600; font-size: .85rem; color: var(--ink-2); }
.form-label.required::after { content: " *"; color: var(--danger); }

/* Tables */
.table { --bs-table-striped-bg: #F8FAF9; }
.table thead th { font-family: var(--font-display); font-size: .72rem; letter-spacing: .06em; text-transform: uppercase; color: var(--ink-2); background: var(--surface-2); border-bottom: 1px solid var(--line); font-weight: 600; }
.table tbody tr { transition: background .15s; }
.table tbody tr:hover { background: var(--brand-50); }
div.dt-container .dt-search input { border-radius: 8px; border: 1px solid var(--line); padding: 6px 10px; }
div.dt-container .dt-paging .dt-paging-button.current { background: var(--brand-700) !important; color: #fff !important; border-color: var(--brand-700) !important; border-radius: 6px; }

/* Empty state */
.empty { text-align: center; padding: 48px 24px; color: var(--ink-3); }
.empty .empty-icon { width: 72px; height: 72px; margin: 0 auto 14px; border-radius: 20px; background: var(--brand-50); color: var(--brand-600); display: grid; place-items: center; font-size: 2rem; }
.empty h3 { font-size: 1.1rem; color: var(--ink); margin-bottom: 6px; }

/* Auth page */
.auth { min-height: 100vh; display: grid; grid-template-columns: 1.1fr 1fr; }
.auth-side { background: radial-gradient(1200px 600px at -10% -10%, var(--brand-700), transparent 60%), linear-gradient(160deg, var(--brand-900), var(--brand-950)); color: #DCEBE2; padding: 56px; display: flex; flex-direction: column; justify-content: space-between; position: relative; overflow: hidden; }
.auth-side::after { content: ""; position: absolute; right: -120px; bottom: -120px; width: 420px; height: 420px; border-radius: 50%; border: 60px solid rgba(227,155,18,.12); }
.auth-side h2 { color: #fff; font-size: 2rem; font-weight: 700; max-width: 18ch; line-height: 1.15; }
.auth-side .steps { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 6px; margin: 26px 0 0; padding: 0; list-style: none; max-width: 640px; counter-reset: step; }
.auth-side .steps li { position: relative; display: flex; flex-direction: column; align-items: center; gap: 8px; padding: 14px 6px 12px; border-radius: 12px; background: rgba(255,255,255,.07); border: 1px solid rgba(255,255,255,.08); text-align: center; }
.auth-side .steps li::before { counter-increment: step; content: counter(step); position: absolute; top: 6px; inset-inline-start: 8px; font-size: .62rem; font-family: var(--font-display); font-weight: 600; color: rgba(255,255,255,.35); }
.auth-side .steps li + li::after { content: ""; position: absolute; top: 50%; inset-inline-start: -7px; width: 8px; height: 1px; background: rgba(255,255,255,.28); }
.auth-side .steps svg { width: 30px; height: 30px; fill: none; stroke: var(--accent); stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.auth-side .steps span { font-size: .78rem; font-family: var(--font-display); font-weight: 500; color: #E6F0EA; line-height: 1.15; }
@media (max-width: 1100px) { .auth-side .steps { grid-template-columns: repeat(3, minmax(0, 1fr)); } .auth-side .steps li + li::after { display: none; } }
.auth-form { display: grid; place-items: center; padding: 40px 24px; }
.auth-card { width: 100%; max-width: 400px; animation: rise .45s var(--ease) both; }
.auth-card h1 { font-size: 1.5rem; margin-bottom: 4px; }
@keyframes rise { from { opacity: .001; transform: translateY(10px); } to { opacity: 1; transform: none; } }

/* Timeline (used from increment 3 onwards) */
.timeline { position: relative; padding-left: 26px; }
.timeline::before { content: ""; position: absolute; left: 8px; top: 4px; bottom: 4px; width: 2px; background: var(--line); }
.tl-item { position: relative; padding: 0 0 18px; }
.tl-item::before { content: ""; position: absolute; left: -23px; top: 5px; width: 12px; height: 12px; border-radius: 50%; background: var(--surface); border: 3px solid var(--tone, var(--brand-600)); }

/* Motion */
.fade-up { animation: rise .4s var(--ease) both; }
.stagger > * { animation: rise .4s var(--ease) both; }
.stagger > *:nth-child(2) { animation-delay: .05s } .stagger > *:nth-child(3) { animation-delay: .1s } .stagger > *:nth-child(4) { animation-delay: .15s }
.stagger > *:nth-child(5) { animation-delay: .2s } .stagger > *:nth-child(6) { animation-delay: .25s } .stagger > *:nth-child(7) { animation-delay: .3s } .stagger > *:nth-child(8) { animation-delay: .35s }

/* Responsive */
@media (max-width: 992px) {
  .app, .app.is-collapsed { grid-template-columns: 1fr; }
  .sidebar { position: fixed; left: 0; top: 0; width: var(--sidebar-w); transform: translateX(-100%); transition: transform .25s var(--ease); z-index: 100; }
  .app.is-open .sidebar { transform: none; box-shadow: var(--shadow-2); }
  .app.is-collapsed .brand-name, .app.is-collapsed .nav-item span, .app.is-collapsed .nav-section, .app.is-collapsed .sidebar-foot { display: initial; }
  .app.is-collapsed .nav-item { justify-content: flex-start; padding: 9px 12px; margin: 2px 10px; }
  .backdrop { position: fixed; inset: 0; background: rgba(7,42,32,.45); z-index: 99; display: none; }
  .app.is-open .backdrop { display: block; }
  .content { padding: 18px 16px 40px; }
  .auth { grid-template-columns: 1fr; } .auth-side { display: none; }
  .user-chip .who { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}

/* ---- Reports (increment 7) ---- */
.report-card { border: 1px solid var(--line); transition: transform .18s var(--ease), box-shadow .18s var(--ease); }
.report-card:hover { transform: translateY(-2px); box-shadow: var(--shadow-2); border-color: var(--brand-100); }
.report-icon { width: 46px; height: 46px; flex: 0 0 46px; border-radius: 12px; display: grid; place-items: center; background: var(--brand-50); color: var(--brand-700); font-size: 1.3rem; }
.text-brand { color: var(--brand-700); }
.report-table th { white-space: nowrap; font-size: .75rem; text-transform: uppercase; letter-spacing: .04em; color: var(--ink-3); }
.report-table td { white-space: nowrap; }

/* ---- Notifications bell (increment 8) ---- */
.bell-badge { position: absolute; top: 2px; inset-inline-end: 2px; min-width: 16px; height: 16px; padding: 0 4px; border-radius: 999px; background: var(--danger); color: #fff; font-size: .65rem; font-weight: 700; line-height: 16px; text-align: center; animation: kpiPulse 1.2s var(--ease); }
.notif-menu { width: 340px; max-width: 92vw; }
.notif-list { max-height: 360px; overflow: auto; }
.notif-item { display: flex; gap: 10px; padding: 10px 14px; border-bottom: 1px solid var(--line); color: inherit; text-decoration: none; }
.notif-item:hover { background: var(--brand-50); }
.notif-item i { font-size: 1.1rem; }
.notif-item small { color: var(--ink-3); }
.role-option:has(input:checked) { border-color: var(--brand-600) !important; background: var(--brand-50); }

/* ---- Page choreography (every page animates on load; see spma.js initEntrance) ---- */
@keyframes riseIn   { from { opacity: 0; transform: translateY(18px); } to { opacity: 1; transform: none; } }
@keyframes slideInL { from { opacity: 0; transform: translateX(-22px); } to { opacity: 1; transform: none; } }
@keyframes slideInR { from { opacity: 0; transform: translateX(22px); } to { opacity: 1; transform: none; } }
@keyframes popIn    { 0% { opacity: 0; transform: scale(.85); } 70% { transform: scale(1.03); } 100% { opacity: 1; transform: none; } }
@keyframes fadeIn   { from { opacity: 0; } to { opacity: 1; } }
@keyframes growX    { from { transform: scaleX(0); } to { transform: scaleX(1); } }
@keyframes drawLine { from { transform: scaleY(0); } to { transform: scaleY(1); } }
@keyframes barLoad  { 0% { transform: translateX(-100%); } 60% { transform: translateX(-20%); } 100% { transform: translateX(-4%); } }
@keyframes shimmer  { from { background-position: -200% 0; } to { background-position: 200% 0; } }

.anim { animation: riseIn .55s var(--ease) both; animation-delay: var(--d, 0s); }
.anim-l { animation: slideInL .55s var(--ease) both; animation-delay: var(--d, 0s); }
.anim-r { animation: slideInR .55s var(--ease) both; animation-delay: var(--d, 0s); }
.anim-pop { animation: popIn .5s var(--ease) both; animation-delay: var(--d, 0s); }
.anim-fade { animation: fadeIn .6s ease both; animation-delay: var(--d, 0s); }
/* Rows: transform on <tr> breaks table layout in some browsers, so only fade + tint sweep */
tr.anim-row { animation: fadeIn .45s ease both; animation-delay: var(--d, 0s); }
tr.anim-row > td { animation: riseIn .45s var(--ease) both; animation-delay: var(--d, 0s); }

/* Heading underline draws in; KPI accent bar grows; timeline spine draws down */
.page-head h1 { position: relative; display: inline-block; }
.page-head h1::after { content: ""; position: absolute; left: 0; bottom: -4px; width: 46px; height: 3px; border-radius: 2px; background: var(--accent); transform-origin: left; animation: growX .6s var(--ease) .35s both; }
html[dir="rtl"] .page-head h1::after { left: auto; right: 0; transform-origin: right; }
.kpi::after { transform-origin: left; animation: growX .8s var(--ease) both; animation-delay: calc(var(--d, 0s) + .25s); }
.timeline::before { transform-origin: top; animation: drawLine 1s var(--ease) .2s both; }
/* Sidebar chrome is static between pages; only the selected item lights up: highlight fades in, accent bar draws, icon pops */
@keyframes navSelect { from { background-color: transparent; } to { background-color: rgba(227,155,18,.16); } }
@keyframes navBar { from { transform: scaleY(0); } to { transform: scaleY(1); } }
.nav-item.active { animation: navSelect .45s var(--ease) both; }
.nav-item.active::before { transform-origin: center; animation: navBar .4s var(--ease) .12s both; }
.nav-item.active i { animation: popIn .45s var(--ease) .1s both; }
.progress .progress-bar { transform-origin: left; animation: growX 1s var(--ease) .3s both; }
html[dir="rtl"] .progress .progress-bar { transform-origin: right; }

/* Top loading bar during navigation + page leave */
.nav-bar { position: fixed; top: 0; left: 0; right: 0; height: 3px; z-index: 2000; pointer-events: none; opacity: 0; transition: opacity .2s; }
.nav-bar::before { content: ""; display: block; height: 100%; width: 100%; background: linear-gradient(90deg, var(--brand-600), var(--accent)); transform: translateX(-100%); }
.nav-bar.on { opacity: 1; } .nav-bar.on::before { animation: barLoad 1.6s var(--ease) forwards; }
.content.leave { animation: fadeIn .18s ease reverse both; }

/* Hover life on cards and rows */
.card { transition: transform .18s var(--ease), box-shadow .18s var(--ease); }
.content > .card:hover, .content .row > div > .card:hover { box-shadow: var(--shadow-2); }
.table-hover > tbody > tr { transition: background-color .15s ease, transform .15s ease; }
.btn { transition: transform .12s ease, box-shadow .12s ease, background-color .15s ease; }
.btn:active { transform: scale(.97); }
.nav-tabs .nav-link { transition: color .15s ease, background-color .15s ease; }
.pill { animation: popIn .4s var(--ease) both; animation-delay: var(--d, 0s); }

@media (prefers-reduced-motion: reduce) {
  .anim, .anim-l, .anim-r, .anim-pop, .anim-fade, tr.anim-row, tr.anim-row > td, .pill,
  .nav-item.active, .nav-item.active::before, .nav-item.active i { animation: none !important; opacity: 1 !important; transform: none !important; }
}
html[dir="rtl"] .anim-l { animation-name: slideInR; } html[dir="rtl"] .anim-r { animation-name: slideInL; }

/* ---------- Batch action bar (registry) ------------------------------- */
.bulk-bar { position: sticky; top: calc(var(--topbar-h) + 8px); z-index: 20; padding: 10px 16px; border-radius: var(--radius); background: var(--brand-900); color: #fff; box-shadow: var(--shadow-2); }
.bulk-bar a { color: #DCEBE2; text-decoration: underline; }
