/* One Exchange theme layer - generated from index-CYrfvzAO.css by gen_theme.py. Loaded after the bundle; remove the <link> to roll back. */
.border-indigo-100{--tw-border-opacity:1;border-color:rgb(215 242 231/var(--tw-border-opacity,1))}
.border-indigo-500{--tw-border-opacity:1;border-color:rgb(124 58 237/var(--tw-border-opacity,1))}
.border-primary-100{--tw-border-opacity:1;border-color:rgb(215 242 231/var(--tw-border-opacity,1))}
.border-primary-200{--tw-border-opacity:1;border-color:rgb(176 228 208/var(--tw-border-opacity,1))}
.border-primary-700{--tw-border-opacity:1;border-color:rgb(91 33 182/var(--tw-border-opacity,1))}
.border-violet-700{--tw-border-opacity:1;border-color:rgb(91 33 182/var(--tw-border-opacity,1))}
.bg-indigo-50{--tw-bg-opacity:1;background-color:rgb(239 250 246/var(--tw-bg-opacity,1))}
.bg-primary-100{--tw-bg-opacity:1;background-color:rgb(215 242 231/var(--tw-bg-opacity,1))}
.bg-primary-50{--tw-bg-opacity:1;background-color:rgb(239 250 246/var(--tw-bg-opacity,1))}
.bg-primary-500{--tw-bg-opacity:1;background-color:rgb(124 58 237/var(--tw-bg-opacity,1))}
.bg-primary-600{--tw-bg-opacity:1;background-color:rgb(109 40 217/var(--tw-bg-opacity,1))}
.bg-primary-700{--tw-bg-opacity:1;background-color:rgb(91 33 182/var(--tw-bg-opacity,1))}
.bg-violet-100{--tw-bg-opacity:1;background-color:rgb(215 242 231/var(--tw-bg-opacity,1))}
.bg-violet-500{--tw-bg-opacity:1;background-color:rgb(124 58 237/var(--tw-bg-opacity,1))}
.bg-violet-600{--tw-bg-opacity:1;background-color:rgb(109 40 217/var(--tw-bg-opacity,1))}
.from-indigo-500{--tw-gradient-from:#7C3AED var(--tw-gradient-from-position);--tw-gradient-to:#7C3AED00 var(--tw-gradient-to-position);--tw-gradient-stops:var(--tw-gradient-from), var(--tw-gradient-to)}
.from-indigo-600{--tw-gradient-from:#6D28D9 var(--tw-gradient-from-position);--tw-gradient-to:#6D28D900 var(--tw-gradient-to-position);--tw-gradient-stops:var(--tw-gradient-from), var(--tw-gradient-to)}
.from-primary-500{--tw-gradient-from:#7C3AED var(--tw-gradient-from-position);--tw-gradient-to:#7C3AED00 var(--tw-gradient-to-position);--tw-gradient-stops:var(--tw-gradient-from), var(--tw-gradient-to)}
.from-primary-600{--tw-gradient-from:#6D28D9 var(--tw-gradient-from-position);--tw-gradient-to:#6D28D900 var(--tw-gradient-to-position);--tw-gradient-stops:var(--tw-gradient-from), var(--tw-gradient-to)}
.from-violet-500{--tw-gradient-from:#7C3AED var(--tw-gradient-from-position);--tw-gradient-to:#7C3AED00 var(--tw-gradient-to-position);--tw-gradient-stops:var(--tw-gradient-from), var(--tw-gradient-to)}
.from-violet-600{--tw-gradient-from:#6D28D9 var(--tw-gradient-from-position);--tw-gradient-to:#6D28D900 var(--tw-gradient-to-position);--tw-gradient-stops:var(--tw-gradient-from), var(--tw-gradient-to)}
.via-violet-500{--tw-gradient-to:#7C3AED00 var(--tw-gradient-to-position);--tw-gradient-stops:var(--tw-gradient-from), #7C3AED var(--tw-gradient-via-position), var(--tw-gradient-to)}
.to-primary-700{--tw-gradient-to:#5B21B6 var(--tw-gradient-to-position)}
.to-primary-800{--tw-gradient-to:#3B0764 var(--tw-gradient-to-position)}
.to-purple-600{--tw-gradient-to:#6D28D9 var(--tw-gradient-to-position)}
.to-violet-600{--tw-gradient-to:#6D28D9 var(--tw-gradient-to-position)}
.to-violet-700{--tw-gradient-to:#5B21B6 var(--tw-gradient-to-position)}
.to-violet-800{--tw-gradient-to:#3B0764 var(--tw-gradient-to-position)}
.text-indigo-500{--tw-text-opacity:1;color:rgb(124 58 237/var(--tw-text-opacity,1))}
.text-indigo-700{--tw-text-opacity:1;color:rgb(91 33 182/var(--tw-text-opacity,1))}
.text-primary-600{--tw-text-opacity:1;color:rgb(109 40 217/var(--tw-text-opacity,1))}
.text-primary-700{--tw-text-opacity:1;color:rgb(91 33 182/var(--tw-text-opacity,1))}
.text-primary-800{--tw-text-opacity:1;color:rgb(10 74 59/var(--tw-text-opacity,1))}
.text-violet-300{--tw-text-opacity:1;color:rgb(196 181 253/var(--tw-text-opacity,1))}
.text-violet-600{--tw-text-opacity:1;color:rgb(109 40 217/var(--tw-text-opacity,1))}
.shadow-primary-500\/30{--tw-shadow-color:#7C3AED4d;--tw-shadow:var(--tw-shadow-colored)}
.ring-primary-100{--tw-ring-opacity:1;--tw-ring-color:rgb(215 242 231/var(--tw-ring-opacity,1))}
.gradient-brand{background:linear-gradient(135deg,#7C3AED 0%,#7C3AED 50%,#ec4899 100%)}
.text-gradient{background:linear-gradient(135deg,#7C3AED,#ec4899);-webkit-text-fill-color:transparent;-webkit-background-clip:text;background-clip:text}
.hover\:border-primary-300:hover{--tw-border-opacity:1;border-color:rgb(196 181 253/var(--tw-border-opacity,1))}
.hover\:border-primary-400:hover{--tw-border-opacity:1;border-color:rgb(139 92 246/var(--tw-border-opacity,1))}
.hover\:bg-primary-700:hover{--tw-bg-opacity:1;background-color:rgb(91 33 182/var(--tw-bg-opacity,1))}
.hover\:bg-violet-700:hover{--tw-bg-opacity:1;background-color:rgb(91 33 182/var(--tw-bg-opacity,1))}
.hover\:text-primary-600:hover{--tw-text-opacity:1;color:rgb(109 40 217/var(--tw-text-opacity,1))}
.focus\:border-primary-500:focus{--tw-border-opacity:1;border-color:rgb(124 58 237/var(--tw-border-opacity,1))}
.focus\:ring-primary-500\/40:focus{--tw-ring-color:#7C3AED66}
.focus-visible\:ring-primary-500\/50:focus-visible{--tw-ring-color:#7C3AED80}
.active\:bg-primary-800:active{--tw-bg-opacity:1;background-color:rgb(10 74 59/var(--tw-bg-opacity,1))}
.active\:bg-violet-800:active{--tw-bg-opacity:1;background-color:rgb(10 74 59/var(--tw-bg-opacity,1))}
.dark\:border-indigo-800\/40:is(.dark *),.dark\:border-primary-800\/40:is(.dark *){border-color:#3B076466}
.dark\:bg-indigo-900\/10:is(.dark *){background-color:#4C1D951a}
.dark\:bg-indigo-900\/20:is(.dark *){background-color:#4C1D9533}
.dark\:bg-primary-500\/\[0\.12\]:is(.dark *){background-color:#7C3AED1f}
.dark\:bg-primary-900\/20:is(.dark *){background-color:#4C1D9533}
.dark\:bg-primary-900\/30:is(.dark *){background-color:#4C1D954d}
.dark\:bg-violet-900\/30:is(.dark *){background-color:#4C1D954d}
.dark\:text-indigo-400:is(.dark *){--tw-text-opacity:1;color:rgb(139 92 246/var(--tw-text-opacity,1))}
.dark\:text-indigo-500:is(.dark *){--tw-text-opacity:1;color:rgb(124 58 237/var(--tw-text-opacity,1))}
.dark\:text-primary-200:is(.dark *){--tw-text-opacity:1;color:rgb(176 228 208/var(--tw-text-opacity,1))}
.dark\:text-primary-300:is(.dark *){--tw-text-opacity:1;color:rgb(196 181 253/var(--tw-text-opacity,1))}
.dark\:text-primary-400:is(.dark *){--tw-text-opacity:1;color:rgb(139 92 246/var(--tw-text-opacity,1))}
.dark\:text-violet-400:is(.dark *){--tw-text-opacity:1;color:rgb(139 92 246/var(--tw-text-opacity,1))}
.dark\:ring-primary-800\/60:is(.dark *){--tw-ring-color:#3B076499}
.dark\:ring-primary-900\/40:is(.dark *){--tw-ring-color:#4C1D9566}
.dark\:hover\:border-primary-700:hover:is(.dark *){--tw-border-opacity:1;border-color:rgb(91 33 182/var(--tw-border-opacity,1))}
.dark\:hover\:text-primary-400:hover:is(.dark *){--tw-text-opacity:1;color:rgb(139 92 246/var(--tw-text-opacity,1))}

/* ---- One Exchange polish layer: tokens + small, layout-neutral refinements ---- */

:root {
  --pk-brand: #6D28D9;
  --pk-brand-strong: #5B21B6;
  --pk-brand-soft: #EDE9FE;
  --pk-ring: #6D28D959;
  --radius: 14px;
  --color-bg: #F8FAFC;
  --color-surface: #ffffff;
  --color-surface-2: #F8FAFC;
  --color-border: #E2E8F0;
  --color-border-md: #CBD5E1;
  --color-text-1: #0F172A;
  --color-text-2: #475569;
  --color-text-3: #64748B;
  --color-text-4: #94A3B8;
  --toast-shadow: 0 10px 30px -12px #0F172A40, 0 2px 6px #0F172A14;
  --scrollbar-thumb: #CBD5E1;
  --chart-grid: #6D28D914;
}

.dark {
  --pk-brand-soft: #6D28D933;
  --pk-ring: #A78BFA66;
  --color-bg: #0B0F19;
  --color-surface: #131826;
  --color-surface-2: #ffffff06;
  --color-overlay: #131826;
  --color-border: #ffffff10;
  --color-border-md: #ffffff1a;
  --color-text-1: #F8FAFC;
  --color-text-2: #94A3B8;
  --color-text-3: #64748B;
  --color-text-4: #475569;
  --toast-bg: #131826;
  --toast-border: #ffffff14;
  --scrollbar-thumb: #334155;
  --chart-tooltip-bg: #131826;
}

body {
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  /* clip, not hidden: stops sideways scroll without breaking sticky headers */
  overflow-x: clip;
}

::selection { background: #6D28D933; }

/* Softer, layered shadows (keep Tailwind's ring composition). */
.shadow-sm { --tw-shadow: 0 1px 2px #0F172A0d, 0 1px 1px #0F172A0a; }
.shadow { --tw-shadow: 0 1px 3px #0F172A12, 0 1px 2px #0F172A0d; }
.shadow-md { --tw-shadow: 0 6px 16px -6px #0F172A1f, 0 2px 4px #0F172A0f; }
.shadow-lg { --tw-shadow: 0 14px 30px -12px #0F172A2e, 0 4px 8px #0F172A0f; }
.shadow-xl { --tw-shadow: 0 22px 44px -16px #0F172A38, 0 6px 12px #0F172A12; }
.dark .shadow-sm, .dark .shadow, .dark .shadow-md, .dark .shadow-lg, .dark .shadow-xl {
  --tw-shadow: 0 10px 30px -14px #000000b3, 0 1px 0 #ffffff08 inset;
}

/* One clear, brand-coloured keyboard focus everywhere. */
:where(a, button, input, select, textarea, [role="button"], [tabindex]):focus-visible {
  outline: 2px solid var(--pk-brand);
  outline-offset: 2px;
  border-radius: 10px;
}
:where(input, select, textarea):focus-visible { box-shadow: 0 0 0 4px var(--pk-ring); outline-offset: 0; }

/* Press feedback and a consistent disabled look while API calls run. */
:where(button, [role="button"]) { transition: transform .12s ease, background-color .15s ease, box-shadow .15s ease, opacity .15s ease; }
:where(button, [role="button"]):not(:disabled):active { transform: scale(.98); }
:where(button):disabled, :where(button)[aria-disabled="true"] { opacity: .55; cursor: not-allowed; transform: none; }

/* Inputs: comfortable height on touch screens, no iOS zoom on focus. */
@media (pointer: coarse) {
  :where(input:not([type="checkbox"]):not([type="radio"]), select, textarea) { font-size: max(16px, 1em); }
}

/* Money and ids line up in tables and lists. */
:where(table) { font-variant-numeric: tabular-nums; }

/* Scrollbars that match the theme. */
* { scrollbar-color: var(--scrollbar-thumb) transparent; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; scroll-behavior: auto !important; }
}

/* Charts (recharts) set colours as SVG attributes from JS; recolour them here. */
[fill="#6366f1"], [fill="#4f46e5"], [fill="#4338ca"] { fill: #6D28D9; }
[fill="#8b5cf6"], [fill="#7c3aed"], [fill="#818cf8"] { fill: #7C3AED; }
[stroke="#6366f1"], [stroke="#4f46e5"], [stroke="#4338ca"] { stroke: #6D28D9; }
[stroke="#8b5cf6"], [stroke="#7c3aed"], [stroke="#818cf8"] { stroke: #7C3AED; }
[stop-color="#6366f1"], [stop-color="#4f46e5"] { stop-color: #6D28D9; }

/* Brand gradients: the bundle mixes indigo with pink; keep them in the green family. */
.gradient-brand { background: linear-gradient(135deg, #6D28D9 0%, #7C3AED 55%, #8B5CF6 100%); }
.text-gradient { background: linear-gradient(135deg, #6D28D9, #8B5CF6); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; }

/* User panel: the login / auth hero paints its gradients with inline styles
   from JS. Inline styles serialise colours as rgb(), so match on those. */
[style*="linear-gradient(135deg, rgb(30, 27, 75) 0%, rgb(49, 46, 129) 30%"] {
  background: linear-gradient(135deg, #04241d 0%, #4C1D95 30%, #5B21B6 60%, #6D28D9 80%, #7C3AED 100%) !important;
}
[style*="linear-gradient(135deg, rgb(30, 27, 75) 0%, rgb(67, 56, 202) 50%"] {
  background: linear-gradient(135deg, #04241d 0%, #5B21B6 50%, #7C3AED 100%) !important;
}
[style*="radial-gradient(circle, rgb(129, 140, 248)"],
[style*="radial-gradient(circle, rgb(165, 180, 252)"] { background: radial-gradient(circle, #A78BFA, transparent 70%) !important; }
[style*="radial-gradient(circle, rgb(167, 139, 250)"] { background: radial-gradient(circle, #7dcfb3, transparent 70%) !important; }
[style*="radial-gradient(circle, rgb(236, 72, 153)"] { background: radial-gradient(circle, #f2b84b, transparent 70%) !important; }
[style*="linear-gradient(90deg, rgb(165, 180, 252), rgb(240, 171, 252))"] {
  background: linear-gradient(90deg, #9fe3c9, #f6d58b) text !important;
  -webkit-background-clip: text !important;
  background-clip: text !important;
}

/* ---- One Exchange theme v2: fintech polish on top of the compiled Tailwind UI.
   Only restyles existing utility classes; no layout or behaviour changes. ---- */

:root { --pk-card-shadow: 0 1px 2px #0F172A0a, 0 8px 24px -14px #0F172A26; }
.dark { --pk-card-shadow: 0 1px 0 #ffffff08 inset, 0 12px 30px -16px #000000b3; }

body { background: var(--color-bg, #F8FAFC); letter-spacing: -.005em; }

/* Cards: one soft shadow, hairline border, larger radius. */
.shadow-card { --tw-shadow: var(--pk-card-shadow); }
.shadow-card-md { --tw-shadow: 0 2px 4px #0F172A0d, 0 16px 32px -16px #0F172A33; }
.shadow-modal { --tw-shadow: 0 30px 70px -20px #0F172A59, 0 6px 16px #0F172A1a; }
.rounded-2xl { border-radius: 1.125rem; }
.shadow-card.border-gray-100, .rounded-2xl.border-gray-100 { border-color: #e7ede9; }
.hover\:shadow-lg:hover { --tw-shadow: 0 18px 36px -18px #6D28D940, 0 4px 10px #0F172A0f; }

/* Wallet / hero cards painted with the brand gradient. */
.gradient-brand { background: radial-gradient(120% 140% at 100% 0%, #8B5CF6 0%, transparent 55%), linear-gradient(135deg, #5B21B6 0%, #6D28D9 50%, #7C3AED 100%); }
.gradient-brand.rounded-2xl, .rounded-2xl .gradient-brand { box-shadow: 0 14px 30px -14px #6D28D999; }

/* Primary buttons. */
.bg-primary-600 { background-color: #6D28D9; }
button.bg-primary-600, a.bg-primary-600 { box-shadow: 0 6px 14px -8px #6D28D9b3; font-weight: 600; }
.hover\:bg-primary-700:hover, .bg-primary-700 { background-color: #5B21B6; }

/* Inputs: taller, softer, brand focus. */
input.rounded-xl, select.rounded-xl, textarea.rounded-xl { min-height: 44px; border-color: #CBD5E1; }
.dark input.rounded-xl, .dark select.rounded-xl { border-color: #ffffff1a; }
input.rounded-xl:focus, select.rounded-xl:focus { border-color: #6D28D9; box-shadow: 0 0 0 4px #6D28D926; }

/* Status chips (Success / Pending / Failed / Refunded). */
.rounded-full.bg-emerald-50 { background: #F5F3FF; color: #067647; box-shadow: inset 0 0 0 1px #06764726; }
.rounded-full.bg-amber-50 { background: #fff6e0; color: #a15c07; box-shadow: inset 0 0 0 1px #a15c0726; }
.rounded-full.bg-red-50 { background: #fdecea; color: #b42318; box-shadow: inset 0 0 0 1px #b4231826; }
.rounded-full.bg-blue-50, .rounded-full.bg-sky-50 { background: #e8f1fd; color: #1d5fbf; box-shadow: inset 0 0 0 1px #1d5fbf26; }
.rounded-full:where(.bg-emerald-50, .bg-amber-50, .bg-red-50, .bg-blue-50, .bg-sky-50) { font-weight: 600; letter-spacing: .01em; }

/* Amount colours a touch deeper for contrast. */
.text-emerald-600 { color: #067647; } .text-red-500 { color: #c4320a; } .text-amber-500 { color: #b54708; }

/* Transaction lists and tables. */
.divide-gray-50 > :not([hidden]) ~ :not([hidden]) { border-color: #eef2f0; }
.divide-y > :where(div, li, a) { transition: background-color .15s ease; }
.divide-y > :where(div, li, a):hover { background-color: #6D28D906; }
thead.bg-gray-50\/90, .bg-gray-50\/90 { background: #f6f9f7; }
td { font-variant-numeric: tabular-nums; }

/* Pill tabs: active one is brand green, others quiet. */
.bg-primary-50 { background-color: #F5F3FF; }
.text-primary-600 { color: #6D28D9; }

/* Icon tiles in the service grid. */
.bg-primary-100 { background-color: #EDE9FE; }
:where(a, button).rounded-2xl:hover .bg-primary-100, :where(a, button).rounded-xl:hover .bg-primary-100 { background-color: #c3ead9; }

/* Skeleton loaders in brand-neutral grey. */
.animate-pulse.bg-gray-100 { background-color: #e9efec; }

/* Small screens: comfortable gutters, no clipped cards. */
@media (max-width: 640px) {
  .rounded-2xl.p-5 { padding: 1rem; }
  .grid.gap-4 { gap: .75rem; }
  table { font-size: 13px; }
}

/* Auth screens (login / register / forgot): the bundle frames them in a dark
   strip with p-4 and a shrink-wrapped child; let them fill the window. */
.min-h-screen.bg-gradient-to-br.from-slate-950 { padding: 0; background: var(--color-bg, #F8FAFC); }
.dark .min-h-screen.bg-gradient-to-br.from-slate-950 { background: #0B0F19; }
.from-slate-950 > .min-h-screen { width: 100%; align-self: stretch; }

/* Login hero: hide the hard-coded "Active Traders / Daily Volume / Uptime" figures. */
.mx-8.mb-10.rounded-2xl:has(> .grid-cols-3.divide-x) { display: none; }

/* Register: "Terms of Service" / "Privacy Policy" point nowhere; show as plain text. */
p a[href="#"] { pointer-events: none; cursor: default; color: inherit; text-decoration: none; font-weight: 600; }

/* KYC-first: until KYC is approved the sidebar shows only the eKYC link. */
.pk-kyc-locked aside nav > div:not(:has(a[href="/kyc"])) { display: none; }
.pk-kyc-locked aside nav a[href="/kyc"] ~ *, .pk-kyc-locked aside nav :has(> a[href="/kyc"]) > :not(a[href="/kyc"]) { display: none; }

/* ---- One Exchange UI v3: self-hosted font, responsive shell, overflow fixes, polish.
   Appended after the earlier theme layers; restyles the compiled Tailwind UI only. ---- */

/* Inter, self-hosted (was a render-blocking @import to Google Fonts). One
   variable file covers weights 300-800; the latin-ext file (incl. the rupee
   sign) loads only when such characters appear. */
@font-face { font-family: "Inter"; font-style: normal; font-weight: 300 800; font-display: swap;
  src: url(/assets/inter-latin-v20.woff2) format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Inter"; font-style: normal; font-weight: 300 800; font-display: swap;
  src: url(/assets/inter-latin-ext-v20.woff2) format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF; }

html { -webkit-text-size-adjust: 100%; text-rendering: optimizeLegibility; }
body { -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; font-feature-settings: "cv11", "ss01"; }

/* Brand gradient text: the generated layer still ended in pink (#ec4899). */
.text-gradient { background: linear-gradient(135deg, #6D28D9 0%, #7C3AED 55%, #c98a1a 100%); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; }

/* Keyboard focus: one visible ring everywhere, never on mouse clicks. */
:where(a, button, input, select, textarea, [tabindex]):focus-visible { outline: 2px solid #6D28D9; outline-offset: 2px; }
.dark :where(a, button, input, select, textarea, [tabindex]):focus-visible { outline-color: #A78BFA; }

/* The content column is a flex item: without min-width 0 a wide table made the
   whole column wider than the screen (cut-off buttons, page scrolls sideways). */
.ml-\[72px\], .ml-\[260px\] { min-width: 0; }

/* Tables never push the page sideways: they scroll inside their own box. */
main div:has(> table) { overflow-x: auto; max-width: 100%; -webkit-overflow-scrolling: touch; }
main table { min-width: 100%; }
main :where(th, td) { white-space: nowrap; }

/* Filter bars and stat rows built as fixed N-column grids wrap instead of
   overflowing on narrower screens. */
@media (max-width: 1279.98px) {
  main .grid.grid-cols-5, main .grid.grid-cols-6 { grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); }
}
@media (max-width: 1023.98px) {
  main .grid.grid-cols-4 { grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); }
}
@media (max-width: 639.98px) {
  main .grid.grid-cols-3 { grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); }
  main .grid.grid-cols-2 > * { min-width: 0; }
}

/* Page headers: the title block (flex-1 min-w-0) used to shrink to a sliver
   beside the action buttons on phones ("Transa / ctions"); give it a real
   basis so the buttons wrap below instead. */
main .flex.flex-wrap > .flex-1.min-w-0 { flex-basis: 240px; }

/* Phones: stat cards stack the icon above the figures, labels wrap at spaces
   and amounts stay whole (never "Rs1,04,4..." or split across lines). */
@media (max-width: 1279.98px) {
  main :where(p, span).uppercase.truncate { white-space: normal; overflow: visible; text-overflow: clip; }
  main .grid > .rounded-2xl > .flex.items-start.gap-4 { flex-direction: column; gap: 10px; }
  main .num { white-space: nowrap; }
}
@media (max-width: 639.98px) {
  main .grid > .rounded-2xl > .flex.items-start.gap-4 { flex-direction: column; gap: 10px; }
  main .grid > .rounded-2xl.p-5 { padding: 14px; }
  main .num { white-space: nowrap; overflow: visible; text-overflow: clip; }
  main .grid p.num.text-2xl { font-size: 1.25rem; }
}

/* ---- Phones and tablets (< 1024px): the sidebar becomes a drawer. ---- */
@media (max-width: 1023.98px) {
  /* Closed: off-canvas instead of a 72px rail that squeezes the page. */
  aside.fixed.w-\[72px\] { transform: translateX(-100%); visibility: hidden; }
  /* Open: drawer over a dimmed page (pk-mobile-nav.js closes it on outside tap). */
  aside.fixed.w-\[260px\] { width: min(86vw, 300px); box-shadow: 0 0 0 100vmax rgb(4 12 9 / .45), 0 18px 50px rgb(0 0 0 / .35); z-index: 60; }
  .ml-\[72px\], .ml-\[260px\] { margin-left: 0 !important; min-width: 0; }
  /* The admin top-bar menu button is md:hidden (gone from 768px); tablets need it
     because the sidebar is a closed drawer there. */
  header.sticky button.md\:hidden { display: inline-flex; }
  main.p-6 { padding: 16px; }
  main { min-width: 0; }
  header.sticky { gap: 8px; padding-left: 12px; padding-right: 12px; }
  /* Touch targets: at least 44px for icon buttons in the top bar and sidebar. */
  header.sticky button, aside nav :where(a, button) { min-height: 44px; }
  header.sticky button.p-2, header.sticky button.p-1\.5 { min-width: 44px; display: inline-flex; align-items: center; justify-content: center; }
}
@media (max-width: 639.98px) {
  main h1 { font-size: 1.375rem; line-height: 1.25; }
  /* 16px inputs stop iOS from zooming in on focus. */
  main :where(input, select, textarea) { font-size: 16px; }
}


/* Respect reduced-motion settings. */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; scroll-behavior: auto !important; }
}

/* Thin, quiet scrollbars for the inner scroll areas. */
main div:has(> table)::-webkit-scrollbar { height: 8px; }
main div:has(> table)::-webkit-scrollbar-thumb { background: #CBD5E1; border-radius: 8px; }
.dark main div:has(> table)::-webkit-scrollbar-thumb { background: #2b3d36; }

/* Error screen ("Something went wrong"): brand button instead of indigo. */
button.bg-indigo-600, a.bg-indigo-600 { background-color: #6D28D9; }
button.bg-indigo-600:hover, a.bg-indigo-600:hover { background-color: #5B21B6; }
