/* ─────────────────────────────────────────────────────────────
   RefundPanda — web app + PWA design system
   Flashy, tech-forward dark aesthetic: deep navy surfaces,
   teal → cyan → blue neon gradients, glassmorphism cards and
   geometric display headings. All legacy component class names
   are preserved so every template inherits the new look.
   ───────────────────────────────────────────────────────────── */

:root {
  /* Brand */
  --accent: #2dd4bf;       /* teal */
  --accent-2: #22d3ee;     /* cyan (links / active text) */
  --accent-soft: rgba(45, 212, 191, 0.14);
  --pink: #4f8cff;         /* repurposed → electric blue (gradient tail) */
  --pink-2: #7c5cff;       /* repurposed → violet */
  --pink-soft: rgba(79, 140, 255, 0.14);
  --cyan: #22d3ee;
  --ink: #10192e;          /* elevated dark chip / high-contrast CTA */
  --ink-2: #16223c;

  /* Surfaces */
  --bg: #070b16;
  --surface: #0d1526;
  --surface-2: #111a30;
  --surface-muted: #16213a;
  --glass: rgba(11, 17, 33, 0.72);

  /* Text */
  --text: #eaf0ff;
  --text-2: #a7b2cf;
  --text-3: #6f7b9a;

  /* Lines */
  --border: rgba(255, 255, 255, 0.09);
  --border-2: rgba(255, 255, 255, 0.15);

  /* Semantic */
  --success: #34d399;
  --warning: #fbbf24;
  --danger: #f87171;

  /* Shape */
  --radius: 20px;
  --radius-lg: 28px;
  --radius-sm: 13px;
  --shadow: 0 22px 60px -26px rgba(0, 0, 0, 0.75);
  --shadow-sm: 0 3px 16px rgba(0, 0, 0, 0.35);
  --shadow-lift: 0 30px 70px -30px rgba(0, 0, 0, 0.85);
  --nav-h: 66px;

  /* Type */
  --font-ui: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --font-display: 'Space Grotesk', 'Inter', sans-serif;

  /* Signature gradients */
  --grad-brand: linear-gradient(120deg, #2dd4bf 0%, #22d3ee 45%, #4f8cff 100%);
  --grad-brand-soft: linear-gradient(120deg, rgba(45, 212, 191, 0.16), rgba(79, 140, 255, 0.16));
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html, body { height: 100%; }
body {
  font-family: var(--font-ui);
  color: var(--text);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  line-height: 1.55;
  background:
    radial-gradient(1100px 520px at 12% -8%, rgba(45, 212, 191, 0.18), transparent 60%),
    radial-gradient(950px 520px at 100% 0%, rgba(79, 140, 255, 0.16), transparent 55%),
    var(--bg);
  background-attachment: fixed;
}

h1, h2, h3 { letter-spacing: -0.015em; }

/* ── Website layout: sticky glass navbar + centered column ── */
.site-nav {
  position: sticky; top: 0; z-index: 30;
  background: var(--glass);
  -webkit-backdrop-filter: saturate(180%) blur(16px);
  backdrop-filter: saturate(180%) blur(16px);
  border-bottom: 1px solid var(--border);
}
.site-nav-inner {
  max-width: 1200px; margin: 0 auto; padding: 13px 24px;
  display: flex; align-items: center; gap: 14px;
}
.site-brand { display: flex; align-items: center; gap: 10px; font-weight: 700;
  font-size: 1.06rem; color: var(--text); text-decoration: none; white-space: nowrap; }
.site-brand img { width: 36px; height: 36px; border-radius: 11px; object-fit: contain;
  box-shadow: 0 4px 12px rgba(109, 94, 252, 0.28); }
.site-brand b { font-weight: 800; }
.site-brand .brand-accent { background: var(--grad-brand); -webkit-background-clip: text;
  background-clip: text; color: transparent; }

.nav-links-top { display: flex; gap: 3px; margin-left: 16px; flex: 1; overflow-x: auto;
  scrollbar-width: none; }
.nav-links-top::-webkit-scrollbar { display: none; }
.nav-links-top a { padding: 8px 15px; border-radius: 999px; color: var(--text-2);
  text-decoration: none; font-size: 14.5px; font-weight: 500; white-space: nowrap;
  transition: background .16s, color .16s; }
.nav-links-top a:hover { background: var(--surface-muted); color: var(--text); }
.nav-links-top a.active { background: var(--accent-soft); color: var(--accent-2); font-weight: 600; }

.nav-right { display: flex; align-items: center; gap: 11px; flex-shrink: 0; }
.nav-install { display: inline-flex; align-items: center; gap: 6px; padding: 9px 16px; border: none;
  border-radius: 999px; background: var(--ink); color: #fff;
  font-weight: 600; font-size: 13.5px; cursor: pointer; transition: filter .15s, transform .05s; }
.nav-install:hover { filter: brightness(1.12); }
.nav-install:active { transform: translateY(1px); }
.nav-logout { color: var(--text-2); text-decoration: none; font-size: 14px; white-space: nowrap;
  font-weight: 500; }
.nav-logout:hover { color: var(--text); }

.site-main { max-width: 1200px; margin: 0 auto; padding: 34px 24px 96px; }
.narrow { max-width: 680px; margin-left: auto; margin-right: auto; }

@media (max-width: 720px) {
  .site-nav-inner { padding: 11px 15px; gap: 8px; }
  .site-brand span { display: none; }
  .nav-links-top { display: none; }              /* mobile uses bottom-nav */
  .nav-logout { display: none; }
  .site-main { padding: 22px 16px 104px; }
}

/* ── Cards ── */
.card {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); box-shadow: var(--shadow-sm); padding: 20px;
}
.card + .card { margin-top: 14px; }

/* ── Hero / assistant banner ── */
.hero {
  position: relative; overflow: hidden;
  border-radius: var(--radius-lg); padding: 30px 30px 32px;
  background: var(--grad-brand-soft);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
}
.hero::after {
  content: ''; position: absolute; right: -60px; top: -70px; width: 260px; height: 260px;
  background: radial-gradient(circle, rgba(255, 119, 176, 0.35), transparent 70%);
  pointer-events: none;
}
.hero-eyebrow { display: inline-flex; align-items: center; gap: 7px; font-size: 12.5px;
  font-weight: 600; color: var(--accent-2); background: var(--glass); border: 1px solid var(--border);
  padding: 5px 12px; border-radius: 999px; margin-bottom: 14px; }
.hero h1 { font-family: var(--font-display); font-weight: 500; font-size: clamp(28px, 5vw, 40px);
  line-height: 1.08; margin-bottom: 8px; }
.hero h1 em { font-style: italic; color: var(--accent-2); }
.hero p { color: var(--text-2); font-size: 15px; max-width: 44ch; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 20px; }

/* ── Auth screens ── */
.auth-wrap { min-height: 100dvh; display: flex; flex-direction: column; justify-content: center;
  max-width: 440px; margin: 0 auto; padding: 40px 22px; width: 100%; }
.auth-logo { display: flex; flex-direction: column; align-items: center; gap: 12px; margin-bottom: 26px; }
.auth-logo img { width: 72px; height: 72px; border-radius: 22px; object-fit: contain; box-shadow: var(--shadow); }
.auth-logo h1 { font-family: var(--font-display); font-weight: 500; font-size: 27px; }
.auth-logo p { color: var(--text-3); font-size: 14px; text-align: center; }
.auth-card { background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius-lg); box-shadow: var(--shadow); padding: 26px; }
.auth-title { font-family: var(--font-display); font-weight: 500; font-size: 23px; margin-bottom: 4px; }
.auth-sub { color: var(--text-3); font-size: 14px; margin-bottom: 20px; }
.auth-alt { text-align: center; margin-top: 18px; font-size: 14px; color: var(--text-3); }
.auth-alt a { color: var(--accent-2); font-weight: 600; text-decoration: none; }

/* ── Forms ── */
.field { margin-bottom: 15px; }
.field label { display: block; font-size: 13px; font-weight: 600; color: var(--text-2); margin-bottom: 6px; }
.field input, .field select, .field textarea {
  width: 100%; padding: 13px 15px; border: 1px solid var(--border-2); border-radius: 13px;
  font-size: 15px; font-family: inherit; background: var(--surface-2); color: var(--text);
  transition: border-color .15s, box-shadow .15s, background .15s;
}
.field input:focus, .field select:focus, .field textarea:focus {
  outline: none; border-color: var(--accent); background: var(--surface);
  box-shadow: 0 0 0 4px var(--accent-soft);
}
.field .errorlist, .field-error { color: var(--danger); font-size: 12.5px; margin-top: 5px; list-style: none; }
.otp-input { letter-spacing: 10px; text-align: center; font-size: 22px; font-weight: 700; }

.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; width: 100%;
  padding: 14px 20px; border: none; border-radius: 999px; font-size: 15px; font-weight: 600;
  font-family: inherit; cursor: pointer; transition: transform .05s, filter .15s, box-shadow .2s;
  text-decoration: none; }
.btn:active { transform: translateY(1px); }
.btn-primary { background: var(--grad-brand); color: #04121a; box-shadow: 0 10px 28px -8px rgba(45, 212, 191, 0.6); }
.btn-primary:hover { filter: brightness(1.08); box-shadow: 0 14px 36px -8px rgba(45, 212, 191, 0.75); }
.btn-dark { background: var(--ink); color: #fff; }
.btn-dark:hover { filter: brightness(1.15); }
.btn-ghost { background: var(--surface-muted); color: var(--accent-2); }
.btn-ghost:hover { background: var(--accent-soft); }
.btn-outline { background: var(--surface); color: var(--text); border: 1px solid var(--border-2); }
.btn-outline:hover { border-color: var(--accent); color: var(--accent-2); }
.btn[disabled] { opacity: .6; cursor: not-allowed; }

.divider { display: flex; align-items: center; gap: 12px; color: var(--text-3); font-size: 12px; margin: 18px 0; }
.divider::before, .divider::after { content: ''; flex: 1; height: 1px; background: var(--border); }

.link-row { display: flex; justify-content: flex-end; margin-top: -6px; margin-bottom: 12px; }
.link-row a { font-size: 13px; color: var(--accent-2); text-decoration: none; }

/* ── Messages / toasts ── */
.messages { position: sticky; top: 0; z-index: 40; }
.msg { padding: 11px 16px; font-size: 14px; border-radius: 13px; margin: 8px 0; display: flex; gap: 8px; }
.msg.success { background: rgba(52, 211, 153, 0.14); color: #34d399; border: 1px solid rgba(52, 211, 153, 0.3); }
.msg.info { background: var(--accent-soft); color: var(--accent-2); border: 1px solid rgba(45, 212, 191, 0.3); }
.msg.error, .msg.warning { background: rgba(248, 113, 113, 0.14); color: #f87171; border: 1px solid rgba(248, 113, 113, 0.3); }
.form-nonfield { background: rgba(248, 113, 113, 0.14); color: #f87171; padding: 10px 14px; border-radius: 11px;
  border: 1px solid rgba(248, 113, 113, 0.3); font-size: 13.5px; margin-bottom: 14px; }

.muted { color: var(--text-3); font-size: 13px; }
.ok { color: var(--success); font-size: 13px; font-weight: 600; }
.text-center { text-align: center; }

/* ── Dashboard ── */
.greeting h2 { font-family: var(--font-display); font-weight: 500; font-size: 27px; }
.greeting p { color: var(--text-3); font-size: 14px; }

.tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 16px; margin-top: 20px; }
.tile { position: relative; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 18px; text-decoration: none; color: var(--text); box-shadow: var(--shadow-sm);
  display: flex; flex-direction: column; gap: 9px; min-height: 128px; overflow: hidden;
  transition: transform .12s ease, box-shadow .2s ease, border-color .2s; }
.tile::before { content: ''; position: absolute; inset: 0; border-radius: inherit; opacity: 0;
  background: var(--grad-brand-soft); transition: opacity .2s; z-index: 0; }
.tile:hover { transform: translateY(-3px); box-shadow: var(--shadow); border-color: var(--border-2); }
.tile:hover::before { opacity: .55; }
.tile > * { position: relative; z-index: 1; }
.tile .ico { width: 46px; height: 46px; border-radius: 13px; background: var(--grad-brand-soft);
  border: 1px solid var(--border); display: grid; place-items: center; font-size: 22px; }
.tile .t-title { font-weight: 700; font-size: 15.5px; }
.tile .t-sub { color: var(--text-3); font-size: 12.5px; margin-top: -2px; }
.tile .t-flag { position: absolute; top: 14px; right: 14px; z-index: 1; font-size: 10.5px; font-weight: 700;
  letter-spacing: .04em; text-transform: uppercase; color: var(--accent-2);
  background: var(--accent-soft); padding: 3px 9px; border-radius: 999px; }
.section-title { font-family: var(--font-display); font-weight: 500; font-size: 19px; margin: 30px 0 12px; }

/* ── Bottom navigation (mobile app shell) ── */
.bottom-nav {
  position: fixed; bottom: 0; left: 50%; transform: translateX(-50%); width: 100%; max-width: 560px;
  background: var(--glass); -webkit-backdrop-filter: blur(18px); backdrop-filter: blur(18px);
  border-top: 1px solid var(--border);
  display: flex; z-index: 30; padding-bottom: env(safe-area-inset-bottom);
}
.bottom-nav a { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 3px; color: var(--text-3); text-decoration: none; font-size: 11px; font-weight: 500;
  height: var(--nav-h); transition: color .15s; }
.bottom-nav a .nico { font-size: 21px; line-height: 1; }
.bottom-nav a.active { color: var(--accent-2); font-weight: 600; }
.bottom-nav a.nav-fab { flex: 0 0 auto; }
.bottom-nav .fab { width: 52px; height: 52px; margin-top: -20px; border-radius: 50%;
  background: var(--grad-brand); color: #04121a; display: grid; place-items: center; font-size: 24px;
  box-shadow: 0 12px 30px -8px rgba(45, 212, 191, 0.75); }
@media (min-width: 721px) { .bottom-nav { display: none; } }

/* ── Page head + small button + back link ── */
.page-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 16px; }
.page-head h2 { font-family: var(--font-display); font-weight: 500; font-size: 25px; }
.btn-sm { width: auto; padding: 9px 16px; font-size: 13.5px; }
.back { color: var(--text-2); text-decoration: none; font-size: 14px; font-weight: 600;
  display: inline-flex; align-items: center; gap: 5px; margin-bottom: 12px; }
.back:hover { color: var(--accent-2); }
.two-col { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }

/* ── Stat row ── */
.stat-row { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin-bottom: 20px; }
.stat { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-sm);
  padding: 14px; text-align: center; box-shadow: var(--shadow-sm); }
.stat-label { display: block; font-size: 11.5px; color: var(--text-3); margin-bottom: 4px; font-weight: 500; }
.stat-val { font-size: 17px; font-weight: 800; letter-spacing: -0.02em; }
.stat-val.ok { color: var(--success); } .stat-val.bad { color: var(--danger); }

/* ── Lists ── */
.list { display: flex; flex-direction: column; gap: 11px; }
.list-row { display: flex; align-items: center; gap: 13px; background: var(--surface);
  border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 13px 15px;
  text-decoration: none; color: var(--text); box-shadow: var(--shadow-sm);
  transition: transform .1s, box-shadow .2s, border-color .2s; }
.list-row:not(.static):hover { transform: translateY(-2px); box-shadow: var(--shadow); border-color: var(--border-2); }
.list-ico { width: 46px; height: 46px; border-radius: 13px; background: var(--grad-brand-soft);
  border: 1px solid var(--border); display: grid; place-items: center; font-size: 21px; flex-shrink: 0; }
.list-body { flex: 1; min-width: 0; }
.list-title { font-weight: 700; font-size: 15px; }
.list-sub { color: var(--text-3); font-size: 12.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.chev { color: var(--text-3); font-size: 22px; }

/* ── Status badges ── */
.badge { padding: 5px 11px; border-radius: 999px; font-size: 11.5px; font-weight: 700; white-space: nowrap; }
.badge-pending, .badge-processing { background: rgba(251, 191, 36, 0.15); color: #fbbf24; }
.badge-approved { background: rgba(79, 140, 255, 0.16); color: #7fb0ff; }
.badge-credited { background: rgba(52, 211, 153, 0.16); color: #34d399; }
.badge-rejected { background: rgba(248, 113, 113, 0.16); color: #f87171; }

/* ── Detail key-values ── */
.detail-top { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.detail-title { font-family: var(--font-display); font-weight: 500; font-size: 20px; }
.kv { display: flex; justify-content: space-between; gap: 12px; padding: 9px 0; font-size: 14px;
  border-bottom: 1px solid var(--border); }
.kv:last-child { border-bottom: none; }
.kv span { color: var(--text-3); }

/* ── Timeline ── */
.timeline { position: relative; padding-left: 6px; }
.tl-item { display: flex; gap: 12px; padding-bottom: 16px; position: relative; }
.tl-item:not(:last-child)::before { content: ''; position: absolute; left: 11px; top: 24px; bottom: 0;
  width: 2px; background: var(--border); }
.tl-dot { width: 24px; height: 24px; border-radius: 50%; display: grid; place-items: center;
  font-size: 12px; background: var(--surface-muted); color: var(--text-3); border: 2px solid var(--border); flex-shrink: 0; z-index: 1; }
.tl-completed .tl-dot { background: var(--success); color: #fff; border-color: var(--success); }
.tl-current .tl-dot { background: var(--accent); color: #fff; border-color: var(--accent); }
.tl-title { font-weight: 600; font-size: 14.5px; }
.tl-desc { font-size: 12.5px; }
.tl-subs { margin-top: 8px; display: flex; flex-direction: column; gap: 4px; }
.tl-sub { font-size: 12.5px; color: var(--text-2); display: flex; align-items: center; gap: 6px; }
.tl-sub-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--border); display: inline-block; }
.tl-sub.tl-completed .tl-sub-dot { background: var(--success); }
.tl-sub.tl-current .tl-sub-dot { background: var(--accent); }

/* ── Empty states ── */
.empty { text-align: center; padding: 48px 20px; color: var(--text-3); }
.empty-ico { font-size: 46px; margin-bottom: 12px; }
.empty p { margin-bottom: 18px; }
.empty .btn { max-width: 260px; margin: 0 auto; }

/* ── Plan badge in navbar ── */
.plan-badge { padding: 7px 13px; border-radius: 999px; font-size: 12.5px; font-weight: 600;
  text-decoration: none; background: var(--surface-muted); color: var(--accent-2); white-space: nowrap;
  border: 1px solid var(--border); }
.plan-badge-paid { background: var(--grad-brand); color: #04121a; border-color: transparent; }

/* ── Pricing / plans page ── */
.plans-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 18px; margin-top: 24px; }
.plan-card { position: relative; background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 26px 22px; box-shadow: var(--shadow-sm); display: flex; flex-direction: column;
  transition: transform .15s, box-shadow .2s; }
.plan-card:hover { transform: translateY(-3px); box-shadow: var(--shadow); }
.plan-featured { border-color: transparent; background:
  linear-gradient(var(--surface), var(--surface)) padding-box,
  var(--grad-brand) border-box; box-shadow: var(--shadow-lift); }
.plan-current { outline: 2px solid var(--success); outline-offset: -2px; }
.plan-flag { position: absolute; top: -12px; left: 50%; transform: translateX(-50%);
  background: var(--grad-brand); color: #04121a; font-size: 11px;
  font-weight: 700; padding: 5px 14px; border-radius: 999px; white-space: nowrap;
  box-shadow: 0 8px 20px -6px rgba(45, 212, 191, 0.7); }
.plan-name { font-family: var(--font-display); font-weight: 500; font-size: 20px; }
.plan-cycle { font-size: 12px; font-weight: 600; color: var(--text-3); background: var(--surface-muted);
  padding: 2px 8px; border-radius: 6px; margin-left: 4px; }
.plan-tagline { color: var(--text-3); font-size: 12.5px; margin-top: 2px; min-height: 16px; }
.plan-price { margin: 16px 0 6px; }
.plan-price .amt { font-size: 34px; font-weight: 800; letter-spacing: -0.03em; }
.plan-price .per { color: var(--text-3); font-weight: 600; font-size: 14px; }
.plan-features { list-style: none; margin: 14px 0 20px; display: flex; flex-direction: column; gap: 9px; flex: 1; }
.plan-features li { position: relative; padding-left: 26px; font-size: 13.5px; color: var(--text-2); }
.plan-features li::before { content: '✓'; position: absolute; left: 0; top: 0; color: var(--success); font-weight: 800; }
.plan-card .btn { margin-top: auto; }
.linklike { background: none; border: none; color: var(--text-3); text-decoration: underline;
  cursor: pointer; font-size: 13px; font-family: inherit; }

/* ── E-challan vehicle detail ── */
.detail-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-sm);
  padding: 15px 17px; margin-bottom: 16px; box-shadow: var(--shadow-sm); }
.detail-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px 18px; }
.detail-cell { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.detail-label { font-size: 11.5px; font-weight: 600; letter-spacing: .03em; text-transform: uppercase; color: var(--text-3); }
.detail-value { font-size: 14.5px; font-weight: 600; color: var(--text); word-break: break-word; }

/* ── E-challan filter tabs ── */
.filter-tabs { display: flex; gap: 8px; margin-bottom: 16px; }
.filter-tab { display: inline-flex; align-items: center; gap: 7px; padding: 8px 14px; border-radius: 999px;
  border: 1px solid var(--border); background: var(--surface); color: var(--text-2);
  font-size: 13px; font-weight: 600; text-decoration: none; transition: all .15s; }
.filter-tab:hover { border-color: var(--border-2); color: var(--text); }
.filter-tab.active { background: var(--grad-brand-soft); border-color: var(--accent-2); color: var(--text); }
.filter-count { font-size: 11.5px; font-weight: 700; padding: 1px 7px; border-radius: 999px;
  background: rgba(127, 127, 127, 0.15); }
.filter-tab.active .filter-count { background: rgba(79, 140, 255, 0.2); color: #7fb0ff; }

/* ── E-challan detail cards ── */
.due-banner { display: flex; align-items: center; justify-content: space-between;
  background: linear-gradient(120deg, rgba(251, 191, 36, 0.12), rgba(248, 113, 113, 0.1));
  border: 1px solid rgba(251, 191, 36, 0.3); color: #fbbf24;
  border-radius: 14px; padding: 14px 18px; margin-bottom: 16px; font-size: 14px; }
.due-banner strong { font-size: 19px; }
.challan-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-sm);
  padding: 15px 17px; box-shadow: var(--shadow-sm); }
.challan-top { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.challan-amt { font-size: 19px; font-weight: 800; }
.challan-meta { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 8px; font-size: 12.5px; color: var(--text-3); }
.challan-meta .court { color: var(--warning); font-weight: 600; }
.violations { list-style: none; margin: 12px 0 0; border-top: 1px dashed var(--border); padding-top: 10px;
  display: flex; flex-direction: column; gap: 7px; }
.violations li { display: flex; justify-content: space-between; gap: 12px; font-size: 13px; color: var(--text-2); }
.violations li strong { color: var(--text); white-space: nowrap; }
.challan-pay { margin-top: 14px; }

/* ── HTMX loading affordance ── */
.htmx-indicator { opacity: 0; transition: opacity .2s; }
.htmx-request .htmx-indicator, .htmx-request.htmx-indicator { opacity: 1; }

/* ── Modal (native <dialog>: Esc-to-close and focus handling come free) ── */
dialog.modal {
  /* `* { margin: 0 }` above kills the UA's `dialog:modal { margin: auto }`,
     which is what centres a modal — restore it or it pins to the top-left. */
  margin: auto;
  width: min(520px, calc(100vw - 32px));
  max-height: calc(100vh - 56px);
  padding: 0; border: 1px solid var(--border-2); border-radius: var(--radius);
  background: var(--surface); color: var(--text); box-shadow: var(--shadow-lift);
}
dialog.modal::backdrop { background: rgba(4, 8, 18, .74); -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); }
dialog.modal[open] { animation: modal-in .16s ease-out; }
dialog.modal[open]::backdrop { animation: backdrop-in .16s ease-out; }
@keyframes modal-in { from { opacity: 0; transform: translateY(8px) scale(.98); } }
@keyframes backdrop-in { from { opacity: 0; } }
@media (prefers-reduced-motion: reduce) {
  dialog.modal[open], dialog.modal[open]::backdrop { animation: none; }
}

.modal-head {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 18px 20px; border-bottom: 1px solid var(--border);
}
.modal-title { font-family: var(--font-display); font-weight: 600; font-size: 18px; }
.modal-close {
  background: transparent; border: none; color: var(--text-3); cursor: pointer;
  font-size: 20px; line-height: 1; padding: 6px 9px; border-radius: 9px;
}
.modal-close:hover { color: var(--text); background: var(--surface-muted); }
.modal-body { padding: 18px 20px; overflow-y: auto; }
.modal-body .field:last-child { margin-bottom: 0; }
.modal-foot {
  display: flex; gap: 10px; justify-content: flex-end;
  padding: 16px 20px; border-top: 1px solid var(--border); background: var(--surface-2);
  border-radius: 0 0 calc(var(--radius) - 1px) calc(var(--radius) - 1px);
}
.modal-foot .btn { width: auto; }

/* Sticky bulk-action bar above the bottom nav. */
.bulk-bar {
  position: sticky; bottom: calc(var(--nav-h) + 10px); z-index: 5;
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
  margin-top: 16px; padding: 12px 14px;
  background: var(--glass); -webkit-backdrop-filter: blur(18px); backdrop-filter: blur(18px);
  border: 1px solid var(--border-2); border-radius: var(--radius); box-shadow: var(--shadow);
}
.bulk-bar .sel-count { font-size: 13.5px; font-weight: 600; color: var(--text-2); margin-right: auto; }
.bulk-bar select { width: auto; min-width: 190px; padding: 10px 12px; font-size: 13.5px;
  border: 1px solid var(--border-2); border-radius: 11px; background: var(--surface-2);
  color: var(--text); font-family: inherit; }
.bulk-bar .btn { width: auto; }
@media (max-width: 560px) {
  .bulk-bar { bottom: calc(var(--nav-h) + 6px); }
  .bulk-bar select, .bulk-bar .btn { flex: 1 1 100%; }
}
