/* ==========================================================================
   APP.CSS — single-file design system for the admin dashboard
   Font: Jost (self-hosted). Author every style here; no other CSS file.
   ========================================================================== */

@font-face {
  font-family: 'Jost';
  src: url('/fonts/jost/Jost-Light.woff2') format('woff2');
  font-weight: 300; font-style: normal; font-display: swap;
}
@font-face {
  font-family: 'Jost';
  src: url('/fonts/jost/Jost-Regular.woff2') format('woff2');
  font-weight: 400; font-style: normal; font-display: swap;
}
@font-face {
  font-family: 'Jost';
  src: url('/fonts/jost/Jost-Medium.woff2') format('woff2');
  font-weight: 500; font-style: normal; font-display: swap;
}
@font-face {
  font-family: 'Jost';
  src: url('/fonts/jost/Jost-SemiBold.woff2') format('woff2');
  font-weight: 600; font-style: normal; font-display: swap;
}
@font-face {
  font-family: 'Jost';
  src: url('/fonts/jost/Jost-Bold.woff2') format('woff2');
  font-weight: 700; font-style: normal; font-display: swap;
}

/* ---------------------------------------------------------------------- */
/* DESIGN TOKENS                                                          */
/* ---------------------------------------------------------------------- */
:root {
  /* Brand palette (from the existing app, extended) */
  --c-teal:        #37a296;
  --c-sky:         #33B1EE;
  --c-mint:        #84fab0;
  --c-powder:      #8fd3f4;
  --c-lilac:       #e0c3fc;
  --c-blue-soft:   #8ec5fc;
  --c-peach:       #fccb90;
  --c-orchid:      #d57eeb;
  --c-aqua:        #89f7fe;
  --c-azure:       #66a6ff;

  /* Extended neutrals & semantics */
  --c-ink:         #16213a;   /* primary text / headings   */
  --c-slate:       #4b5875;   /* secondary text            */
  --c-muted:       #8992a8;   /* placeholders, meta text   */
  --c-bg:          #f5f7fb;   /* app background            */
  --c-surface:     #ffffff;   /* cards, panels             */
  --c-border:      #e7ebf3;
  --c-paper:       #faf9f6;   /* warm-neutral auth panel bg */

  --c-success:     #22a06b;
  --c-warning:     #f2a93b;
  --c-danger:      #e5484d;
  --c-info:        var(--c-sky);

  /* Gradients — apply sparingly on KPI cards, badges, chart accents */
  --grad-teal-blue:   linear-gradient(135deg, var(--c-teal), var(--c-sky));
  --grad-mint-powder: linear-gradient(135deg, var(--c-mint), var(--c-powder));
  --grad-lilac-blue:  linear-gradient(135deg, var(--c-lilac), var(--c-blue-soft));
  --grad-peach-orchid:linear-gradient(135deg, var(--c-peach), var(--c-orchid));
  --grad-aqua-azure:  linear-gradient(135deg, var(--c-aqua), var(--c-azure));
  --grad-dark:        linear-gradient(135deg, #1c2b4a, #16213a);

  /* Type scale */
  --font-primary: 'Jost', system-ui, -apple-system, sans-serif;
  --fs-xs: 0.75rem;   --fs-sm: 0.875rem;  --fs-base: 1rem;
  --fs-lg: 1.125rem;  --fs-xl: 1.375rem;  --fs-2xl: 1.75rem;  --fs-3xl: 2.25rem;

  /* Spacing scale */
  --sp-1: 4px; --sp-2: 8px; --sp-3: 12px; --sp-4: 16px;
  --sp-5: 20px; --sp-6: 24px; --sp-8: 32px; --sp-10: 40px; --sp-12: 48px;

  /* Radii & shadows */
  --radius-sm: 8px; --radius-md: 12px; --radius-lg: 18px; --radius-full: 999px;
  --shadow-sm: 0 1px 2px rgba(22, 33, 58, 0.06);
  --shadow-md: 0 8px 24px rgba(22, 33, 58, 0.08);
  --shadow-lg: 0 16px 40px rgba(22, 33, 58, 0.12);

  --sidebar-width: 264px;
  --topbar-height: 72px;
}

/* ---------------------------------------------------------------------- */
/* RESET & BASE                                                           */
/* ---------------------------------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; }
html, body { height: 100%; }
body {
  margin: 0;
  font-family: var(--font-primary);
  font-size: var(--fs-base);
  color: var(--c-ink);
  background: var(--c-bg);
  -webkit-font-smoothing: antialiased;
}
h1, h2, h3, h4, h5, h6 { font-weight: 600; margin: 0 0 var(--sp-2); color: var(--c-ink); }
h1 { font-size: var(--fs-3xl); } h2 { font-size: var(--fs-2xl); }
h3 { font-size: var(--fs-xl); }  h4 { font-size: var(--fs-lg); }
p  { margin: 0 0 var(--sp-3); color: var(--c-slate); }
a  { color: var(--c-sky); text-decoration: none; }
a:hover { text-decoration: underline; }

/* ---------------------------------------------------------------------- */
/* LAYOUT SHELL                                                            */
/* ---------------------------------------------------------------------- */
.app-shell { display: flex; min-height: 100vh; }

.sidebar {
  width: var(--sidebar-width);
  flex-shrink: 0;
  background: var(--grad-dark);
  color: #fff;
}
/* Bootstrap's offcanvas-lg already handles mobile positioning (fixed,
   translated off-screen, shown via .show) — we must NOT touch position
   below the lg breakpoint, or we break its off-screen mechanic entirely
   (a `position: sticky` override here previously made the closed
   drawer occupy full-width in normal flow and collapse the content
   area to zero width). Only pin it as a static, sticky column at the
   same breakpoint Bootstrap itself switches offcanvas-lg to static. */
@media (min-width: 992px) {
  .sidebar { position: sticky; top: 0; height: 100vh; }
}
/* Bootstrap's offcanvas-body already gives us the slide-out mechanics,
   scroll, and the lg+ "always visible, static" breakpoint behavior —
   we only need to restyle its surface and spacing to match the brand. */
.sidebar .offcanvas-header { border-bottom: 1px solid rgba(255,255,255,.1); }
/* Bootstrap's offcanvas-body already gives us the slide-out mechanics,
   scroll, and the lg+ "always visible" breakpoint behavior — but at
   that same breakpoint Bootstrap ALSO applies
   `.offcanvas-lg .offcanvas-body { display:flex; padding:0; }`
   (a two-class compound selector, since offcanvas-lg is designed
   primarily for horizontal navbar-collapse use, not vertical
   sidebars). That selector has higher specificity than a plain
   `.sidebar__body` class rule, so it wins even though app.css loads
   after Bootstrap — the result was the brand and <nav> laying out as
   flex-row siblings instead of stacking, which is the bug that was
   reported. Anchoring on the ID here (specificity 0,1,1,0) reliably
   outranks Bootstrap's 0,0,2,0 regardless of load order. */
#sidebarOffcanvas .offcanvas-body {
  display: block;
  padding: var(--sp-6) var(--sp-4);
  overflow-y: auto;
}
/* `overflow-y: auto` alone does nothing without a BOUNDED height to
   overflow against — on mobile this works "for free" because
   Bootstrap's own flex mechanics (offcanvas-lg as flex column,
   offcanvas-body as flex-grow:1) give it one automatically. At desktop
   we forced offcanvas-body to `display: block` (see the comment on
   .sidebar above), which drops out of that flex context, so height
   reverts to auto and content just overflows past the sidebar's own
   100vh box — visible only if you scroll the page, and since the
   sidebar is sticky, its lower nav items end up permanently
   inaccessible. Give it the same 100vh bound explicitly here, scoped
   to the same breakpoint as the sticky-positioning fix, so mobile's
   already-working flex-based sizing is untouched. */
@media (min-width: 992px) {
  #sidebarOffcanvas .offcanvas-body {
    height: 100vh;
  }
}

.sidebar .brand { display: flex; align-items: center; gap: var(--sp-3); margin-bottom: var(--sp-8); }
.sidebar .brand img { height: 32px; }
.sidebar .brand span { font-weight: 700; font-size: var(--fs-lg); }

.nav-group { margin-bottom: var(--sp-6); }
.nav-group__label {
  font-size: var(--fs-xs); text-transform: uppercase; letter-spacing: .08em;
  color: rgba(255,255,255,.45); margin: 0 var(--sp-3) var(--sp-2);
}
.nav-link {
  display: flex; align-items: center; gap: var(--sp-3);
  padding: var(--sp-3); border-radius: var(--radius-md);
  color: rgba(255,255,255,.8); font-size: var(--fs-sm); font-weight: 500;
  transition: background .15s ease, color .15s ease;
}
.nav-link:hover { background: rgba(255,255,255,.08); color: #fff; text-decoration: none; }
.nav-link.active { background: var(--grad-teal-blue); color: #fff; }
.nav-link i { width: 18px; flex-shrink: 0; text-align: center; }

.main { flex: 1; min-width: 0; display: flex; flex-direction: column; }

.topbar {
  height: var(--topbar-height); background: var(--c-surface);
  border-bottom: 1px solid var(--c-border);
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 var(--sp-6); position: sticky; top: 0; z-index: 20; gap: var(--sp-4);
}
.topbar__search {
  flex: 1; max-width: 420px; display: flex; align-items: center;
  gap: var(--sp-2); background: var(--c-bg); border-radius: var(--radius-full);
  padding: var(--sp-2) var(--sp-4);
}
.topbar__search input { border: none; background: transparent; outline: none; width: 100%; font-family: var(--font-primary); }
.topbar__actions { display: flex; align-items: center; gap: var(--sp-3); }

/* Bell icon button */
.icon-btn {
  position: relative; width: 40px; height: 40px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  color: var(--c-slate); font-size: 1.1rem; flex-shrink: 0;
  transition: background .15s ease;
}
.icon-btn:hover { background: var(--c-bg); color: var(--c-ink); text-decoration: none; }
.icon-btn__dot {
  position: absolute; top: 8px; right: 9px; width: 8px; height: 8px;
  border-radius: 50%; background: var(--c-danger); border: 2px solid var(--c-surface);
}

/* Account dropdown trigger */
.account-toggle {
  display: flex; align-items: center; gap: 8px; background: none; border: none;
  cursor: pointer; padding: 6px 10px 6px 6px; border-radius: var(--radius-full);
  font-family: var(--font-primary); font-size: var(--fs-sm); font-weight: 500;
  color: var(--c-ink); transition: background .15s ease;
}
.account-toggle:hover { background: var(--c-bg); }
.account-toggle__avatar {
  width: 30px; height: 30px; border-radius: 50%; background: var(--grad-teal-blue);
  color: #fff; display: flex; align-items: center; justify-content: center;
  font-size: 12px; font-weight: 700; flex-shrink: 0;
}
.app-dropdown-menu {
  border-radius: var(--radius-md); border: 1px solid var(--c-border);
  box-shadow: var(--shadow-md); padding: 6px; min-width: 200px;
}
.app-dropdown-menu .dropdown-item {
  border-radius: 8px; font-size: var(--fs-sm); padding: 8px 10px;
  display: flex; align-items: center; gap: 10px; font-family: var(--font-primary);
}
.app-dropdown-menu .dropdown-item i { font-size: 1rem; color: var(--c-muted); width: 16px; }
.app-dropdown-menu .dropdown-item:hover { background: var(--c-bg); }
.app-dropdown-menu .dropdown-item--danger { color: var(--c-danger); width: 100%; text-align: left; border: none; background: none; cursor: pointer; }
.app-dropdown-menu .dropdown-item--danger i { color: var(--c-danger); }
.app-dropdown-menu .dropdown-item--danger:hover { background: rgba(229,72,77,.08); }
.app-dropdown-menu .dropdown-item--active { color: var(--c-teal); font-weight: 600; width: 100%; text-align: left; border: none; background: none; cursor: pointer; }
.app-dropdown-menu .dropdown-item--active:hover { background: rgba(55,162,150,.08); }
/* Plain button-reset for dropdown items that aren't links (e.g. the
   language switcher's non-selected options) — same reset
   --danger/--active already apply, without a color override. */
.app-dropdown-menu .dropdown-item--button { width: 100%; text-align: left; border: none; background: none; cursor: pointer; }

.content { padding: var(--sp-6); flex: 1; }

/* ---------------------------------------------------------------------- */
/* CARDS & KPI TILES                                                       */
/* ---------------------------------------------------------------------- */
.card {
  background: var(--c-surface); border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm); border: 1px solid var(--c-border);
  padding: var(--sp-6); position: relative; overflow: hidden;
}
/* A "bit of gradient" on the plain card, borrowed from the KPI cards'
   existing gradient system but toned way down — a thin gradient
   accent line across the top rather than a full gradient fill, since
   a content-heavy card (tables, forms) needs to stay readable, unlike
   a KPI card which is mostly a big number. */
.card::before {
  content: ''; position: absolute; top: 0; left: 0; right: 0; height: 3px;
  background: var(--grad-teal-blue); opacity: .7;
}
.card--elevated { box-shadow: var(--shadow-md); border: none; }
.card--no-accent::before { display: none; }

.kpi-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: var(--sp-5); }

.kpi-card {
  border-radius: var(--radius-lg); padding: var(--sp-6);
  color: #fff; position: relative; overflow: hidden;
  box-shadow: var(--shadow-md);
}
.kpi-card::after {
  content: ''; position: absolute; inset: 0;
  background: radial-gradient(circle at 100% 0%, rgba(255,255,255,.18), transparent 55%);
}
.kpi-card__label { font-size: var(--fs-sm); opacity: .9; margin-bottom: var(--sp-2); position: relative; }
.kpi-card__value { font-size: var(--fs-2xl); font-weight: 700; position: relative; }
.kpi-card__meta { font-size: var(--fs-xs); opacity: .85; margin-top: var(--sp-2); position: relative; }

.kpi-card--teal-blue    { background: var(--grad-teal-blue); }
.kpi-card--mint-powder  { background: var(--grad-mint-powder); color: var(--c-ink); }
.kpi-card--lilac-blue   { background: var(--grad-lilac-blue); color: var(--c-ink); }
.kpi-card--peach-orchid { background: var(--grad-peach-orchid); color: var(--c-ink); }
.kpi-card--aqua-azure   { background: var(--grad-aqua-azure); color: var(--c-ink); }

/* ---------------------------------------------------------------------- */
/* BADGES & STATUS PILLS                                                   */
/* ---------------------------------------------------------------------- */
.badge {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 4px 10px; border-radius: var(--radius-full);
  font-size: var(--fs-xs); font-weight: 600;
}
.badge--success { background: rgba(34,160,107,.12); color: var(--c-success); }
.badge--warning { background: rgba(242,169,59,.14); color: var(--c-warning); }
.badge--danger  { background: rgba(229,72,77,.12); color: var(--c-danger); }
.badge--info    { background: rgba(51,177,238,.12); color: var(--c-sky); }
.badge--neutral { background: var(--c-bg); color: var(--c-slate); }

/* Small completion-% bar — Translation Manager (per-language
   completion) is the first use, but generic enough for any future
   "% done" display. */
.progress-bar { height: 6px; border-radius: 999px; background: var(--c-border); overflow: hidden; }
.progress-bar__fill { height: 100%; background: var(--c-teal); border-radius: 999px; }

/* ---------------------------------------------------------------------- */
/* BUTTONS                                                                 */
/* ---------------------------------------------------------------------- */
.btn {
  font-family: var(--font-primary); font-weight: 600; font-size: var(--fs-sm);
  border: none; border-radius: var(--radius-md); padding: 10px 18px;
  cursor: pointer; display: inline-flex; align-items: center; gap: var(--sp-2);
  transition: transform .1s ease, box-shadow .15s ease;
}
.btn:active { transform: translateY(1px); }
.btn--primary { background: var(--grad-teal-blue); color: #fff; box-shadow: var(--shadow-sm); }
.btn--primary:hover { box-shadow: var(--shadow-md); }
.btn--outline { background: transparent; border: 1px solid var(--c-border); color: var(--c-ink); }
.btn--danger  { background: var(--c-danger); color: #fff; }
.btn--ghost   { background: transparent; color: var(--c-slate); }
.btn--sm { padding: 6px 12px; font-size: var(--fs-xs); }

/* Inline loading spinner for in-flight async actions (e.g. the AI Insights
   Ask button while awaiting the OpenAI response). Sized to sit inline with
   button label text via .btn's flex layout. */
.spinner {
  display: inline-block; width: 13px; height: 13px;
  border: 2px solid rgba(255, 255, 255, 0.45); border-top-color: #fff;
  border-radius: 50%; animation: spinner-rotate .7s linear infinite;
}
.btn--outline .spinner, .btn--ghost .spinner {
  border-color: rgba(0, 0, 0, 0.15); border-top-color: var(--c-ink);
}
@keyframes spinner-rotate { to { transform: rotate(360deg); } }

/* ---------------------------------------------------------------------- */
/* FORMS                                                                   */
/* ---------------------------------------------------------------------- */
.field { margin-bottom: var(--sp-5); }
.field label {
  display: block; font-size: 11px; font-weight: 600; margin-bottom: var(--sp-2);
  color: var(--c-muted); text-transform: uppercase; letter-spacing: .05em;
}
.field input, .field select, .field textarea {
  width: 100%; font-family: var(--font-primary); font-size: var(--fs-sm);
  padding: 12px 16px; border-radius: var(--radius-md); border: 1.5px solid var(--c-border);
  background: var(--c-surface); color: var(--c-ink); outline: none;
  box-shadow: 0 1px 2px rgba(22,33,58,.03);
  transition: border-color .15s ease, box-shadow .15s ease, background-color .15s ease;
}
.field select {
  appearance: none; -webkit-appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6' viewBox='0 0 10 6' fill='none'%3E%3Cpath d='M1 1L5 5L9 1' stroke='%238992A8' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 16px center; padding-right: 40px;
}
.field textarea { resize: vertical; min-height: 88px; }
.field input:hover, .field select:hover, .field textarea:hover { border-color: #d5dae5; }
.field input:focus, .field select:focus, .field textarea:focus {
  border-color: var(--c-teal); background: var(--c-surface);
  box-shadow: 0 0 0 4px rgba(55,162,150,.12), 0 1px 2px rgba(22,33,58,.03);
}
.field input:disabled, .field select:disabled, .field textarea:disabled {
  background: var(--c-bg); color: var(--c-muted); cursor: not-allowed; box-shadow: none;
}
.field--error input, .field--error select, .field--error textarea { border-color: var(--c-danger); }
.field--error input:focus, .field--error select:focus, .field--error textarea:focus {
  box-shadow: 0 0 0 4px rgba(229,72,77,.12);
}
.field__error { color: var(--c-danger); font-size: var(--fs-xs); margin-top: 6px; font-weight: 500; }

/* ---------------------------------------------------------------------- */
/* TABLES                                                                   */
/* ---------------------------------------------------------------------- */
.table-wrap {
  overflow-x: auto; border-radius: var(--radius-lg); border: 1px solid var(--c-border);
  box-shadow: 0 1px 3px rgba(22,33,58,.04);
}
table.data-table { width: 100%; border-collapse: collapse; background: var(--c-surface); }
.data-table thead th {
  position: sticky; top: 0; background: var(--c-bg); text-align: left;
  font-size: 11px; text-transform: uppercase; letter-spacing: .06em; font-weight: 600;
  color: var(--c-muted); padding: var(--sp-4); border-bottom: 1px solid var(--c-border);
  white-space: nowrap;
}
.data-table tbody td {
  padding: var(--sp-4); border-bottom: 1px solid var(--c-border); font-size: var(--fs-sm);
  transition: background-color .12s ease;
}
.data-table tbody tr { transition: background-color .12s ease; }
.data-table tbody tr:hover td { background: var(--c-bg); }
.data-table tbody tr:last-child td { border-bottom: none; }
/* Rounded corners without overflow:hidden (which would break the sticky
   header above) — applied directly to the corner cells instead. */
.data-table thead tr:first-child th:first-child { border-top-left-radius: var(--radius-lg); }
.data-table thead tr:first-child th:last-child { border-top-right-radius: var(--radius-lg); }
.data-table tbody tr:last-child td:first-child { border-bottom-left-radius: var(--radius-lg); }
.data-table tbody tr:last-child td:last-child { border-bottom-right-radius: var(--radius-lg); }

/* ---------------------------------------------------------------------- */
/* AUTH SCREENS — premium split login                                     */
/* ---------------------------------------------------------------------- */
/* Auth-only blue theme — palette sampled from the Axion reference:
   #0B5BE6 electric blue, #88BFFF light sky, #042882 navy,
   #01022F deep indigo, #EBF1F8 cool grey. Re-declared on the auth
   wrappers so it overrides the :root values (including the branding
   override) for login/register/password pages only; the admin
   dashboard keeps its own colors. Color values only. */
.auth-shell, .auth-card {
  --c-teal: #0B5BE6;
  --c-sky: #88BFFF;
  --c-info: #88BFFF;
  --c-ink: #0D1633;
  --c-paper: #EBF1F8;
  --grad-teal-blue: linear-gradient(135deg, #0B5BE6, color-mix(in srgb, #0B5BE6 75%, #88BFFF));
  --grad-dark: linear-gradient(135deg, #042882, #01022F);
}
.auth-card .field input:focus, .auth-card .field select:focus, .auth-card .field textarea:focus {
  box-shadow: 0 0 0 4px rgba(11,91,230,.14), 0 1px 2px rgba(4,40,130,.05);
}
.auth-shell {
  min-height: 100vh; display: grid; grid-template-columns: 1fr 1.05fr;
  background: var(--c-paper);
}

/* ---- Left: form panel ------------------------------------------------ */
.auth-shell__form {
  display: flex; align-items: center; justify-content: center;
  padding: var(--sp-6); position: relative;
}
.auth-card { width: 100%; max-width: 380px; }

.auth-mark { display: flex; align-items: center; gap: var(--sp-3); margin-bottom: var(--sp-10); }
.auth-mark__glyph {
  width: 38px; height: 38px; border-radius: var(--radius-md);
  background: var(--grad-teal-blue); display: flex; align-items: center; justify-content: center;
  box-shadow: var(--shadow-sm); flex-shrink: 0;
}
.auth-mark__glyph svg { width: 20px; height: 20px; }
.auth-mark__name { font-weight: 600; font-size: var(--fs-lg); color: var(--c-ink); letter-spacing: -0.01em; }

.auth-eyebrow {
  display: inline-flex; align-items: center; gap: 8px;
  font-size: 11px; font-weight: 600; letter-spacing: 0.14em; text-transform: uppercase;
  color: var(--c-teal); margin-bottom: var(--sp-3);
}
.auth-eyebrow::before {
  content: ''; width: 6px; height: 6px; border-radius: 50%; background: var(--c-teal);
  box-shadow: 0 0 0 3px rgba(11,91,230,.15);
}

.auth-card h1 {
  font-size: 2.35rem; font-weight: 300; letter-spacing: -0.02em; line-height: 1.1;
  color: var(--c-ink); margin-bottom: var(--sp-2);
}
.auth-card h1 strong { font-weight: 600; }
.auth-card__lead { color: var(--c-slate); font-size: var(--fs-sm); margin-bottom: var(--sp-8); }

/* Icon-prefixed inputs.
   Icon/toggle are positioned relative to .field__control (the input's own
   wrapper) via top:50%/translateY, NOT relative to the whole .field block.
   This keeps them centered on the input regardless of label length/wrap —
   important since labels are translated and vary in height per locale. */
.field__control { position: relative; }
/* Direct-child combinator only — this must NOT also match the svg nested
   inside .field__toggle below, or the two absolute-position rules stack
   and fling the eye icon out of the input entirely. */
.field__control > svg {
  position: absolute; left: 14px; top: 50%; transform: translateY(-50%);
  width: 17px; height: 17px; color: var(--c-muted); pointer-events: none;
}
.field--icon input { padding-left: 42px; }
.field--icon .field__toggle {
  position: absolute; right: 6px; top: 50%; transform: translateY(-50%);
  background: none; border: none; cursor: pointer;
  color: var(--c-muted); padding: 8px; line-height: 0; border-radius: 6px;
  display: flex; align-items: center; justify-content: center;
}
.field--icon .field__toggle svg { width: 17px; height: 17px; display: block; }
.field--icon .field__toggle:hover { color: var(--c-ink); background: var(--c-bg); }

.field input {
  height: 46px; font-size: var(--fs-sm); border-color: #e4e2da; background: #fff;
}
.field input::placeholder { color: #b7bcc9; }

.auth-remember { display: flex; align-items: center; gap: 8px; cursor: pointer; }
.auth-checkbox {
  width: 18px; height: 18px; border-radius: 5px; border: 1.5px solid #d7dbe5;
  display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0;
  background: #fff; transition: background .15s, border-color .15s;
}
.auth-checkbox svg { width: 11px; height: 11px; opacity: 0; transition: opacity .1s; }
input:checked ~ .auth-checkbox,
.auth-checkbox.is-checked { background: var(--grad-teal-blue); border-color: transparent; }
.auth-checkbox.is-checked svg { opacity: 1; }
.auth-remember input[type="checkbox"] { position: absolute; opacity: 0; width: 18px; height: 18px; cursor: pointer; }
.auth-remember { position: relative; }
/* Registration legal acknowledgements (auth/register.blade.php). */
.auth-remember input:checked ~ .auth-checkbox svg { opacity: 1; }
.auth-remember input:focus-visible ~ .auth-checkbox { outline: 2px solid var(--c-teal); outline-offset: 2px; }
.field .auth-legal__item {
  display: flex; align-items: flex-start; gap: 10px; margin-bottom: 0;
  font-size: var(--fs-sm); font-weight: 400; line-height: 1.45;
  color: var(--c-slate); text-transform: none; letter-spacing: normal;
}
.auth-legal__item .auth-checkbox { margin-top: 1px; }
.auth-legal__item a { color: var(--c-teal); text-decoration: underline; text-underline-offset: 2px; }

.btn--block { width: 100%; justify-content: center; height: 46px; font-size: var(--fs-sm); }
.btn--shine { position: relative; overflow: hidden; }
.btn--shine::before {
  content: ''; position: absolute; top: 0; left: -60%; width: 40%; height: 100%;
  background: linear-gradient(120deg, transparent, rgba(255,255,255,.35), transparent);
  transform: skewX(-20deg); transition: left .5s ease;
}
.btn--shine:hover::before { left: 130%; }

.auth-trust { display: flex; gap: var(--sp-5); margin-top: var(--sp-6); }
.auth-trust__item { display: flex; align-items: center; gap: 6px; font-size: 12px; color: var(--c-muted); }
.auth-trust__item svg { width: 14px; height: 14px; color: var(--c-teal); flex-shrink: 0; }

.auth-card__footer {
  margin-top: var(--sp-10); font-size: 12px; color: var(--c-muted); text-align: center;
}
.auth-card__footer a { color: var(--c-slate); font-weight: 500; }

/* ---- Right: visual panel ---------------------------------------------- */
.auth-shell__visual {
  position: relative; overflow: hidden; color: #fff;
  background:
    radial-gradient(120% 90% at 100% 0%, rgba(11,91,230,.45), transparent 55%),
    radial-gradient(90% 70% at 0% 100%, rgba(136,191,255,.14), transparent 55%),
    var(--grad-dark);
  padding: var(--sp-10) var(--sp-10) var(--sp-8);
  display: flex; flex-direction: column; justify-content: space-between;
}
.auth-shell__visual::before {
  /* fine dot-grid, evokes structured financial data */
  content: ''; position: absolute; inset: 0; opacity: .35;
  background-image: radial-gradient(rgba(255,255,255,.14) 1px, transparent 1px);
  background-size: 22px 22px;
  mask-image: linear-gradient(180deg, transparent, #000 25%, #000 75%, transparent);
}

.auth-visual__top { position: relative; z-index: 2; max-width: 380px; }
.auth-visual__top h2 {
  font-size: 2rem; font-weight: 300; line-height: 1.2; color: #fff;
  margin-bottom: var(--sp-3); letter-spacing: -0.01em;
}
.auth-visual__top h2 strong { font-weight: 600; }
.auth-visual__top p { color: rgba(255,255,255,.62); font-size: var(--fs-sm); line-height: 1.6; }

/* Floating multi-currency account cards — the signature element.
   A fanned "passbook stack": one fully-readable hero card in front,
   two rotated colour peeks behind it. The peeks are intentionally
   content-free slivers (not clipped text) so the overlap reads as a
   deliberate stack rather than a layout bug. */
.acct-stack {
  position: relative; z-index: 2; height: 168px; margin: var(--sp-6) 0 var(--sp-8);
}
.acct-card {
  position: absolute; width: 258px; border-radius: var(--radius-lg);
  box-shadow: 0 20px 45px rgba(8,14,30,.35);
}
.acct-card--peek { height: 128px; top: 18px; }
.acct-card--peek-a { background: var(--grad-mint-powder); left: 46px; transform: rotate(-7deg); z-index: 1; }
.acct-card--peek-b { background: var(--grad-peach-orchid); left: 12px; transform: rotate(5deg); z-index: 2; }

.acct-card--front {
  z-index: 3; top: 0; left: 0; padding: var(--sp-4) var(--sp-5);
  background: var(--grad-teal-blue); color: #fff;
  animation: acctFloat 6s ease-in-out infinite;
}
.acct-card__label { font-size: 11px; font-weight: 600; text-transform: uppercase; letter-spacing: .06em; opacity: .78; }
.acct-card__balance { font-size: var(--fs-xl); font-weight: 600; margin-top: 6px; font-variant-numeric: tabular-nums; }
.acct-card__foot { display: flex; justify-content: space-between; align-items: center; margin-top: var(--sp-4); font-size: 11px; opacity: .78; }

@keyframes acctFloat {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-7px); }
}

/* Scrolling ledger tape */
.ledger {
  position: relative; z-index: 2; height: 116px; overflow: hidden;
  border-top: 1px solid rgba(255,255,255,.12); border-bottom: 1px solid rgba(255,255,255,.12);
  -webkit-mask-image: linear-gradient(180deg, transparent, #000 20%, #000 80%, transparent);
  mask-image: linear-gradient(180deg, transparent, #000 20%, #000 80%, transparent);
}
.ledger__track { animation: ledgerScroll 16s linear infinite; }
.ledger__row {
  display: flex; align-items: center; justify-content: space-between;
  padding: 9px 2px; font-size: 12.5px; color: rgba(255,255,255,.72);
  border-bottom: 1px dashed rgba(255,255,255,.08);
}
.ledger__row span:first-child { color: rgba(255,255,255,.92); font-weight: 500; }
.ledger__row .amt { font-variant-numeric: tabular-nums; }
.ledger__row .amt--in { color: var(--c-mint); }
.ledger__row .amt--out { color: var(--c-peach); }

@keyframes ledgerScroll {
  0% { transform: translateY(0); }
  100% { transform: translateY(-50%); }
}

.auth-visual__bottom { position: relative; z-index: 2; display: flex; gap: var(--sp-6); }
.auth-visual__stat { }
.auth-visual__stat b { display: block; font-size: var(--fs-xl); font-weight: 600; }
.auth-visual__stat span { font-size: 11px; color: rgba(255,255,255,.6); text-transform: uppercase; letter-spacing: .06em; }

@media (max-width: 980px) {
  .auth-shell { grid-template-columns: 1fr; }
  .auth-shell__visual { display: none; }
  /* Sidebar show/hide on mobile is now handled by Bootstrap's
     offcanvas-lg mechanics (data-bs-toggle="offcanvas" in the layout) —
     no custom toggle class needed here anymore. */
}

@media (prefers-reduced-motion: reduce) {
  .acct-card, .ledger__track, .btn--shine::before { animation: none !important; transition: none !important; }
}

/* ---------------------------------------------------------------------- */
/* DASHBOARD — chart, pipeline, activity feed, approvals                  */
/* ---------------------------------------------------------------------- */
.dash-grid { display: grid; grid-template-columns: 1.6fr 1fr; gap: var(--sp-5); align-items: start; }
@media (max-width: 1100px) { .dash-grid { grid-template-columns: 1fr; } }

.card__header { display: flex; align-items: center; justify-content: space-between; margin-bottom: var(--sp-5); }
.card__header h3 { margin: 0; }
.card__header .card__meta { font-size: var(--fs-xs); color: var(--c-muted); }

/* Simple bar chart, no JS charting library needed */
.bar-chart { display: flex; align-items: flex-end; gap: var(--sp-4); height: 180px; padding-top: var(--sp-4); }
.bar-chart__col { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 8px; height: 100%; justify-content: flex-end; }
.bar-chart__bars { display: flex; align-items: flex-end; gap: 4px; height: 100%; width: 100%; justify-content: center; }
.bar-chart__bar { width: 12px; border-radius: 4px 4px 0 0; min-height: 3px; transition: transform .15s ease; }
.bar-chart__bar--deposits { background: var(--grad-teal-blue); }
.bar-chart__bar--disbursed { background: var(--grad-peach-orchid); }
.bar-chart__bar:hover { transform: scaleY(1.03); }
.bar-chart__label { font-size: 11px; color: var(--c-muted); }

.legend { display: flex; gap: var(--sp-5); margin-top: var(--sp-2); }
.legend__item { display: flex; align-items: center; gap: 6px; font-size: var(--fs-xs); color: var(--c-slate); }
.legend__dot { width: 8px; height: 8px; border-radius: 50%; }
.legend__dot--deposits { background: var(--grad-teal-blue); }
.legend__dot--disbursed { background: var(--grad-peach-orchid); }

/* Loan pipeline */
.pipeline { display: flex; flex-direction: column; gap: var(--sp-3); }
.pipeline__row { display: grid; grid-template-columns: 90px 1fr 46px; align-items: center; gap: var(--sp-3); font-size: var(--fs-sm); }
.pipeline__track { height: 8px; border-radius: var(--radius-full); background: var(--c-bg); overflow: hidden; }
.pipeline__fill { height: 100%; border-radius: var(--radius-full); }
.pipeline__fill--pending { background: var(--c-warning); }
.pipeline__fill--approved { background: var(--grad-teal-blue); }
.pipeline__fill--paid { background: var(--c-success); }
.pipeline__fill--rejected { background: var(--c-danger); }

/* Currency balance list */
.currency-list { display: flex; flex-direction: column; gap: var(--sp-3); }
.currency-row { display: flex; align-items: center; justify-content: space-between; padding: var(--sp-3); border-radius: var(--radius-md); background: var(--c-bg); }
.currency-row__name { font-weight: 600; font-size: var(--fs-sm); }
.currency-row__count { font-size: var(--fs-xs); color: var(--c-muted); }
.currency-row__balance { font-weight: 600; font-variant-numeric: tabular-nums; }

/* Activity feed */
.feed { display: flex; flex-direction: column; }
.feed__item { display: flex; gap: var(--sp-3); padding: var(--sp-3) 0; border-bottom: 1px solid var(--c-border); }
.feed__item:last-child { border-bottom: none; padding-bottom: 0; }
.feed__icon { width: 34px; height: 34px; border-radius: var(--radius-md); display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.feed__icon--deposit { background: rgba(55,162,150,.12); color: var(--c-teal); }
.feed__icon--withdrawal { background: rgba(213,126,235,.12); color: var(--c-orchid); }
.feed__body { flex: 1; min-width: 0; }
.feed__title { font-size: var(--fs-sm); font-weight: 500; }
.feed__meta { font-size: 12px; color: var(--c-muted); }
.feed__amount { font-size: var(--fs-sm); font-weight: 600; font-variant-numeric: tabular-nums; white-space: nowrap; }

/* Approvals quick list */
.approval-row { display: flex; align-items: center; justify-content: space-between; padding: var(--sp-3) 0; border-bottom: 1px solid var(--c-border); }
.approval-row:last-child { border-bottom: none; }
.approval-row__label { font-size: var(--fs-sm); }
.approval-row__count { display: inline-flex; align-items: center; justify-content: center; min-width: 26px; height: 22px; padding: 0 6px; border-radius: var(--radius-full); background: var(--c-danger); color: #fff; font-size: 11px; font-weight: 700; }
.approval-row__count--zero { background: var(--c-bg); color: var(--c-muted); }

/* Due-soon list */
.due-item { display: flex; align-items: center; justify-content: space-between; padding: var(--sp-3) 0; border-bottom: 1px solid var(--c-border); font-size: var(--fs-sm); }
.due-item:last-child { border-bottom: none; }
.due-item__date { font-size: 11px; color: var(--c-muted); }

/* ---------------------------------------------------------------------- */
/* FILTER BAR                                                              */
/* ---------------------------------------------------------------------- */
.filter-bar {
  display: flex; flex-wrap: wrap; align-items: flex-end; gap: var(--sp-4);
  background: var(--c-surface); border: 1px solid var(--c-border); border-radius: var(--radius-lg);
  padding: var(--sp-5); margin-bottom: var(--sp-6); box-shadow: 0 1px 3px rgba(22,33,58,.04);
}
.filter-bar__field { display: flex; flex-direction: column; gap: 7px; min-width: 150px; }
.filter-bar__field label { font-size: 11px; font-weight: 600; color: var(--c-muted); text-transform: uppercase; letter-spacing: .05em; }
.filter-bar .form-select, .filter-bar .form-control {
  font-family: var(--font-primary); font-size: var(--fs-sm); border-radius: var(--radius-md);
  border: 1.5px solid var(--c-border); padding: 9px 14px; box-shadow: 0 1px 2px rgba(22,33,58,.03);
  transition: border-color .15s ease, box-shadow .15s ease;
}
.filter-bar .form-select:hover, .filter-bar .form-control:hover { border-color: #d5dae5; }
.filter-bar .form-select:focus, .filter-bar .form-control:focus {
  border-color: var(--c-teal); box-shadow: 0 0 0 4px rgba(55,162,150,.12);
}
.filter-bar__actions { display: flex; gap: var(--sp-2); margin-left: auto; }

/* ---------------------------------------------------------------------- */
/* PAGINATION (Bootstrap override)                                         */
/* ---------------------------------------------------------------------- */
.pagination {
  display: flex; gap: 6px; list-style: none; margin: 0; padding: 0; flex-wrap: wrap;
}
.page-item .page-link {
  display: flex; align-items: center; justify-content: center; min-width: 38px; height: 38px;
  padding: 0 12px; border-radius: var(--radius-md); border: 1px solid var(--c-border);
  background: var(--c-surface); color: var(--c-slate);
  font-family: var(--font-primary); font-size: var(--fs-sm); font-weight: 500;
  transition: all .15s ease; box-shadow: 0 1px 2px rgba(22,33,58,.03);
}
.page-item .page-link:hover {
  background: rgba(55,162,150,.08); border-color: rgba(55,162,150,.3); color: var(--c-teal);
}
.page-item .page-link:focus { outline: none; box-shadow: 0 0 0 4px rgba(55,162,150,.12); }
.page-item.active .page-link {
  background: var(--grad-teal-blue); border-color: transparent; color: #fff;
  box-shadow: var(--shadow-sm); font-weight: 600;
}
.page-item.disabled .page-link {
  background: var(--c-bg); color: #c3c9d6; border-color: var(--c-border);
  cursor: not-allowed; box-shadow: none;
}

/* Multi-currency figure inside a KPI tile — used when "All currencies"
   is selected, since summing different currencies together would be
   meaningless. */
.kpi-card__breakdown { display: flex; flex-direction: column; gap: 2px; margin-top: 6px; position: relative; }
.kpi-card__breakdown-row { display: flex; justify-content: space-between; font-size: var(--fs-sm); font-weight: 600; }
.kpi-card__breakdown-row span:last-child { font-variant-numeric: tabular-nums; }

/* ---------------------------------------------------------------------- */
/* LEADERBOARDS                                                            */
/* ---------------------------------------------------------------------- */
.leaderboard { display: flex; flex-direction: column; gap: var(--sp-2); }
.leaderboard__row { display: flex; align-items: center; gap: var(--sp-3); padding: 8px 0; }
.leaderboard__rank {
  width: 26px; height: 26px; border-radius: 50%; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
  font-size: 11px; font-weight: 700; color: #fff; background: var(--c-muted);
}
.leaderboard__row:nth-child(1) .leaderboard__rank { background: var(--grad-teal-blue); }
.leaderboard__row:nth-child(2) .leaderboard__rank { background: var(--grad-mint-powder); color: var(--c-ink); }
.leaderboard__row:nth-child(3) .leaderboard__rank { background: var(--grad-peach-orchid); color: var(--c-ink); }
.leaderboard__body { flex: 1; min-width: 0; }
.leaderboard__name { font-size: var(--fs-sm); font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.leaderboard__meta { font-size: 11px; color: var(--c-muted); }
.leaderboard__value { font-size: var(--fs-sm); font-weight: 700; font-variant-numeric: tabular-nums; white-space: nowrap; }

/* ---------------------------------------------------------------------- */
/* PROFILE HEADER & DETAIL LISTS (Members, Savings account show pages)     */
/* ---------------------------------------------------------------------- */
.profile-header {
  display: flex; align-items: center; gap: var(--sp-5); flex-wrap: wrap;
  padding: var(--sp-6); background: var(--c-surface); border: 1px solid var(--c-border);
  border-radius: var(--radius-lg); margin-bottom: var(--sp-6);
}
.avatar {
  border-radius: 50%; background: var(--grad-teal-blue); color: #fff;
  display: flex; align-items: center; justify-content: center;
  font-weight: 700; flex-shrink: 0; overflow: hidden;
}
.avatar img { width: 100%; height: 100%; object-fit: cover; }
.avatar--lg { width: 64px; height: 64px; font-size: var(--fs-xl); }
.profile-header__body { flex: 1; min-width: 200px; }
.profile-header__name { font-size: var(--fs-xl); font-weight: 600; margin-bottom: 2px; }
.profile-header__meta { color: var(--c-muted); font-size: var(--fs-sm); display: flex; gap: var(--sp-3); flex-wrap: wrap; align-items: center; }
.profile-header__badges { display: flex; gap: 6px; margin-top: var(--sp-2); flex-wrap: wrap; }
.profile-header__actions { display: flex; gap: var(--sp-2); flex-wrap: wrap; }

.detail-list { display: flex; flex-direction: column; }
.detail-list__row {
  display: flex; justify-content: space-between; gap: var(--sp-4);
  padding: var(--sp-3) 0; border-bottom: 1px solid var(--c-border); font-size: var(--fs-sm);
}
.detail-list__row:last-child { border-bottom: none; }
.detail-list__label { color: var(--c-muted); }
.detail-list__value { font-weight: 500; text-align: right; }

.stat-mini-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: var(--sp-3); }
.stat-mini {
  background: var(--c-bg); border-radius: var(--radius-md); padding: var(--sp-4);
}
.stat-mini__label { font-size: var(--fs-xs); color: var(--c-muted); text-transform: uppercase; letter-spacing: .04em; }
.stat-mini__value { font-size: var(--fs-lg); font-weight: 700; margin-top: 4px; }

.mini-account-card {
  display: flex; align-items: center; justify-content: space-between;
  padding: var(--sp-4); border: 1px solid var(--c-border); border-radius: var(--radius-md);
  margin-bottom: var(--sp-3);
}
.mini-account-card:last-child { margin-bottom: 0; }
.mini-account-card__name { font-weight: 600; font-size: var(--fs-sm); }
.mini-account-card__meta { font-size: 12px; color: var(--c-muted); }
.mini-account-card__balance { font-weight: 700; font-variant-numeric: tabular-nums; text-align: right; }

/* ---------------------------------------------------------------------- */
/* RECIPIENT CHIPS (Marketing composer)                                    */
/* ---------------------------------------------------------------------- */
.chip-list { display: flex; flex-wrap: wrap; gap: 8px; margin-top: var(--sp-3); min-height: 1px; }
.chip {
  display: inline-flex; align-items: center; gap: 8px;
  background: var(--c-bg); border: 1px solid var(--c-border); border-radius: var(--radius-full);
  padding: 6px 8px 6px 14px; font-size: var(--fs-sm);
}
.chip__remove {
  width: 18px; height: 18px; border-radius: 50%; border: none; background: var(--c-border);
  color: var(--c-slate); display: flex; align-items: center; justify-content: center;
  cursor: pointer; font-size: 11px; line-height: 1; flex-shrink: 0;
}
.chip__remove:hover { background: var(--c-danger); color: #fff; }

.audience-option {
  display: flex; align-items: center; gap: var(--sp-3); padding: var(--sp-4);
  border: 1px solid var(--c-border); border-radius: var(--radius-md); cursor: pointer;
  margin-bottom: var(--sp-3); transition: border-color .15s ease, background .15s ease;
}
.audience-option:has(input:checked) { border-color: var(--c-teal); background: rgba(55,162,150,.04); }
.audience-option input[type="radio"] { width: auto; flex-shrink: 0; }
.audience-option__label { font-weight: 500; font-size: var(--fs-sm); }
.audience-option__meta { font-size: 12px; color: var(--c-muted); }

/* ---------------------------------------------------------------------- */
/* EVENTS                                                                   */
/* ---------------------------------------------------------------------- */
.event-card {
  display: flex; gap: var(--sp-4); align-items: flex-start;
  background: var(--c-surface); border: 1px solid var(--c-border); border-radius: var(--radius-lg);
  padding: var(--sp-5); margin-bottom: var(--sp-3);
  border-left-width: 4px; border-left-style: solid; /* color set inline per event */
}
.event-card__date {
  flex-shrink: 0; width: 64px; text-align: center; background: var(--c-bg);
  border-radius: var(--radius-md); padding: var(--sp-2) 0;
}
.event-card__date-day { font-size: var(--fs-xl); font-weight: 700; color: var(--c-ink); line-height: 1; }
.event-card__date-month { font-size: 11px; text-transform: uppercase; letter-spacing: .04em; color: var(--c-muted); margin-top: 2px; }
.event-card__body { flex: 1; min-width: 0; }
.event-card__title { font-size: var(--fs-lg); font-weight: 600; margin-bottom: 4px; }
.event-card__meta { font-size: var(--fs-sm); color: var(--c-slate); display: flex; gap: var(--sp-4); flex-wrap: wrap; margin-bottom: 6px; }
.event-card__desc { font-size: var(--fs-sm); color: var(--c-muted); }
.event-card__actions { flex-shrink: 0; display: flex; gap: var(--sp-2); }

.calendar-grid {
  display: grid; grid-template-columns: repeat(7, 1fr); gap: 1px;
  background: var(--c-border); border: 1px solid var(--c-border); border-radius: var(--radius-lg);
  overflow: hidden;
}
.calendar-grid__weekday {
  background: var(--c-bg); padding: var(--sp-2); text-align: center;
  font-size: var(--fs-xs); font-weight: 600; color: var(--c-muted); text-transform: uppercase; letter-spacing: .04em;
}
.calendar-grid__day {
  background: var(--c-surface); min-height: 96px; padding: var(--sp-2);
  display: flex; flex-direction: column; gap: 3px;
}
.calendar-grid__day--muted { background: var(--c-bg); }
.calendar-grid__day--muted .calendar-grid__day-number { color: var(--c-muted); }
.calendar-grid__day--today { box-shadow: inset 0 0 0 2px var(--c-teal); }
.calendar-grid__day-number { font-size: var(--fs-sm); font-weight: 600; color: var(--c-ink); }
.calendar-grid__pill {
  display: block; font-size: 11px; color: #fff; padding: 2px 6px; border-radius: var(--radius-sm);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis; text-decoration: none;
}
.calendar-grid__pill:hover { opacity: .85; }

/* ---------------------------------------------------------------------- */
/* SECURITY SETTINGS — 2FA, sessions, recovery codes                       */
/* ---------------------------------------------------------------------- */
.recovery-codes {
  display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px;
  background: var(--c-bg); border-radius: var(--radius-md); padding: var(--sp-4);
}
.recovery-codes code {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: var(--fs-sm); background: var(--c-surface); border: 1px solid var(--c-border);
  border-radius: 6px; padding: 8px 10px; text-align: center; letter-spacing: .02em;
}

.qr-frame {
  display: inline-flex; padding: var(--sp-4); background: #fff; border: 1px solid var(--c-border);
  border-radius: var(--radius-md);
}

.session-row {
  display: flex; align-items: center; gap: var(--sp-3);
  padding: var(--sp-3) 0; border-bottom: 1px solid var(--c-border);
}
.session-row:last-child { border-bottom: none; }
.session-row__icon {
  width: 38px; height: 38px; border-radius: var(--radius-md); flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
  background: var(--c-bg); color: var(--c-slate); font-size: 1.1rem;
}
.session-row__body { flex: 1; min-width: 0; }
.session-row__title { font-size: var(--fs-sm); font-weight: 500; display: flex; align-items: center; gap: 8px; }
.session-row__meta { font-size: 12px; color: var(--c-muted); }

.security-status {
  display: flex; align-items: center; gap: var(--sp-4); padding: var(--sp-5);
  border-radius: var(--radius-lg); border: 1px solid var(--c-border);
}
.security-status__icon {
  width: 48px; height: 48px; border-radius: 50%; display: flex; align-items: center;
  justify-content: center; font-size: 1.4rem; flex-shrink: 0;
}
.security-status__icon--on { background: rgba(34,160,107,.12); color: var(--c-success); }
.security-status__icon--off { background: rgba(242,169,59,.14); color: var(--c-warning); }

/* ---------------------------------------------------------------------- */
/* TOGGLE SWITCH                                                           */
/* ---------------------------------------------------------------------- */
.currency-toggle-form { display: inline-block; }
.toggle-switch {
  width: 42px; height: 24px; border-radius: var(--radius-full);
  background: var(--c-border); border: none; cursor: pointer;
  position: relative; padding: 0; transition: background .15s ease;
  flex-shrink: 0;
}
.toggle-switch__knob {
  position: absolute; top: 3px; left: 3px; width: 18px; height: 18px;
  border-radius: 50%; background: #fff; box-shadow: var(--shadow-sm);
  transition: transform .15s ease;
}
.toggle-switch--on { background: var(--grad-teal-blue); }
.toggle-switch--on .toggle-switch__knob { transform: translateX(18px); }

/* Compact variant — for dense grids like the Notification Settings table */
.toggle-switch--sm { width: 32px; height: 18px; }
.toggle-switch--sm .toggle-switch__knob { width: 12px; height: 12px; top: 3px; left: 3px; }
.toggle-switch--sm.toggle-switch--on .toggle-switch__knob { transform: translateX(14px); }
.toggle-switch--sm:disabled { opacity: .4; cursor: not-allowed; }

.text-muted { color: var(--c-muted); }
.text-success { color: var(--c-success); }
.text-danger { color: var(--c-danger); }
.flex { display: flex; }
.flex-col { display: flex; flex-direction: column; }
.mono { font-family: ui-monospace, 'SFMono-Regular', Menlo, Consolas, monospace; font-variant-numeric: tabular-nums; }
.stat-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: var(--sp-4); }
@media (max-width: 900px) { .stat-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 560px) { .stat-grid { grid-template-columns: 1fr; } }
.grid-2col { display: grid; grid-template-columns: 1.3fr 1fr; gap: var(--sp-6); }
@media (max-width: 900px) { .grid-2col { grid-template-columns: 1fr; } }
.items-center { align-items: center; }
.justify-between { justify-content: space-between; }
.gap-2 { gap: var(--sp-2); } .gap-3 { gap: var(--sp-3); } .gap-4 { gap: var(--sp-4); }
.mt-2 { margin-top: var(--sp-2); } .mt-4 { margin-top: var(--sp-4); } .mt-6 { margin-top: var(--sp-6); }
.mb-2 { margin-bottom: var(--sp-2); } .mb-4 { margin-bottom: var(--sp-4); } .mb-6 { margin-bottom: var(--sp-6); }

/* ---------------------------------------------------------------------- */
/* MEDIA PICKER + LIBRARY — the "Choose image" field used on Team,
   Testimonials, Blog, and Site Settings, plus the shared picker modal
   (markup lives once in layouts/admin.blade.php) and the standalone
   Media Library management page. */
/* ---------------------------------------------------------------------- */
.media-picker { display: flex; align-items: center; gap: var(--sp-3); }
.media-picker__preview {
  width: 72px; height: 72px; border-radius: var(--radius-md); border: 1px solid var(--c-border);
  background: var(--c-bg); overflow: hidden; flex-shrink: 0; display: flex; align-items: center; justify-content: center;
}
.media-picker__preview img { width: 100%; height: 100%; object-fit: cover; }
.media-picker__empty { color: var(--c-muted); font-size: 1.4rem; }
.media-picker__actions { display: flex; flex-direction: column; gap: 6px; }

.media-modal {
  position: fixed; inset: 0; z-index: 1000; display: flex; align-items: center; justify-content: center; padding: var(--sp-4);
}
.media-modal[hidden] { display: none; }
.media-modal__backdrop { position: absolute; inset: 0; background: rgba(15,23,20,.55); }
.media-modal__panel {
  position: relative; background: #fff; border-radius: var(--radius-lg); width: 100%; max-width: 760px;
  max-height: 85vh; display: flex; flex-direction: column; box-shadow: 0 24px 60px -12px rgba(0,0,0,.35);
}
.media-modal__header { display: flex; align-items: center; justify-content: space-between; padding: var(--sp-4); border-bottom: 1px solid var(--c-border); }
.media-modal__close { background: none; border: none; font-size: 1.4rem; line-height: 1; cursor: pointer; color: var(--c-muted); }
.media-modal__upload { padding: var(--sp-4); border-bottom: 1px solid var(--c-border); display: flex; align-items: center; gap: var(--sp-3); flex-wrap: wrap; }
.media-modal__body { padding: var(--sp-4); overflow-y: auto; flex: 1; }
.media-modal__grid, .media-library-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(110px, 1fr)); gap: var(--sp-3); }
.media-modal__item {
  border: 2px solid transparent; border-radius: var(--radius-md); overflow: hidden; cursor: pointer; aspect-ratio: 1;
  background: var(--c-bg); transition: border-color .15s ease, transform .15s ease;
}
.media-modal__item:hover { border-color: var(--c-teal); transform: translateY(-2px); }
.media-modal__item img { width: 100%; height: 100%; object-fit: cover; display: block; }
.media-modal__empty { color: var(--c-muted); font-size: var(--fs-sm); padding: var(--sp-6) 0; text-align: center; }
.media-modal__load-more { display: block; margin: var(--sp-4) auto 0; }

.media-library-card { border: 1px solid var(--c-border); border-radius: var(--radius-md); overflow: hidden; background: #fff; }
.media-library-card__thumb { aspect-ratio: 1; background: var(--c-bg); }
.media-library-card__thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.media-library-card__meta { padding: var(--sp-2) var(--sp-3); }
.media-library-card__name { font-size: var(--fs-xs); color: var(--c-ink); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; display: block; }
.media-library-card__size { font-size: var(--fs-xs); color: var(--c-muted); }


/* ---------------------------------------------------------------------- */
/* ELECTIONS (internal: admin, staff ballot, member portal)                */
/* ---------------------------------------------------------------------- */
.candidate-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: var(--sp-3); }
.candidate-card {
  display: flex; gap: var(--sp-3); align-items: flex-start; padding: var(--sp-3);
  border: 1.5px solid var(--c-border); border-radius: var(--radius-lg); background: var(--c-surface);
  cursor: pointer; transition: border-color .15s, box-shadow .15s; min-width: 0;
}
.candidate-card:hover { border-color: var(--c-teal); }
.candidate-card input { margin-top: 4px; flex-shrink: 0; }
.candidate-card input:checked ~ .candidate-card__body .candidate-card__name { color: var(--c-teal); }
.candidate-card:has(input:checked) { border-color: var(--c-teal); box-shadow: 0 0 0 3px rgba(55, 162, 150, .15); }
.candidate-card__body { min-width: 0; flex: 1; }
.candidate-card__name { font-weight: 600; overflow-wrap: anywhere; }
.candidate-card__statement { font-size: var(--fs-sm); color: var(--c-muted); margin-top: 4px; overflow-wrap: anywhere; }
.result-bars { display: flex; flex-direction: column; gap: var(--sp-2); }
.result-bar { display: grid; grid-template-columns: minmax(140px, 240px) 1fr 90px; gap: var(--sp-3); align-items: center; }
.result-bar__who { display: flex; gap: var(--sp-2); align-items: center; min-width: 0; }
.result-bar__who span.name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.result-bar__track { height: 14px; border-radius: 7px; background: var(--c-border); overflow: hidden; }
.result-bar__fill { height: 100%; border-radius: 7px; background: var(--c-muted); }
.result-bar__fill--winner { background: var(--grad-teal-blue, #37A296); }
.result-bar__num { text-align: right; font-family: var(--font-mono, monospace); font-size: var(--fs-sm); }
.election-steps { display: flex; flex-wrap: wrap; gap: 6px; margin: var(--sp-3) 0; padding: 0; list-style: none; }
.election-steps li { font-size: var(--fs-xs); padding: 3px 9px; border-radius: 999px; border: 1px solid var(--c-border); color: var(--c-muted); }
.election-steps li.is-done { background: rgba(55, 162, 150, .12); color: var(--c-ink); border-color: transparent; }
.election-steps li.is-current { background: var(--c-ink, #1f2937); color: #fff; border-color: transparent; }
@media (max-width: 640px) { .result-bar { grid-template-columns: 1fr 70px; } .result-bar__track { grid-column: 1 / -1; } }

/* ---------------------------------------------------------------------- */
/* MEMBER ACCOUNT (My Profile — member portal; admin member record)        */
/* ---------------------------------------------------------------------- */
.account-hero { display: grid; grid-template-columns: auto 1fr auto; gap: var(--sp-5); align-items: center; }
.account-hero__ids { display: flex; flex-wrap: wrap; gap: var(--sp-2) var(--sp-4); font-size: var(--fs-sm); color: var(--c-muted); margin-top: 2px; }
.account-hero__ids strong { color: var(--c-ink); font-weight: 600; }
.account-hero__actions { display: flex; flex-wrap: wrap; gap: var(--sp-2); margin-top: var(--sp-3); }
@media (max-width: 760px) { .account-hero { grid-template-columns: auto 1fr; } .account-hero__ring { grid-column: 1 / -1; justify-self: start; } }

.ring { --pct: 0; width: 92px; height: 92px; border-radius: 50%; display: grid; place-items: center; flex-shrink: 0;
  background: conic-gradient(var(--c-teal) calc(var(--pct) * 1%), var(--c-border) 0); }
.ring__inner { width: 72px; height: 72px; border-radius: 50%; background: var(--c-surface); display: grid; place-items: center; text-align: center; line-height: 1.1; }
.ring__value { font-size: var(--fs-lg); font-weight: 700; font-variant-numeric: tabular-nums; }
.ring__label { font-size: 10px; color: var(--c-muted); text-transform: uppercase; letter-spacing: .05em; }

.account-tabs { display: flex; gap: 4px; overflow-x: auto; padding: 4px; margin: var(--sp-5) 0; background: var(--c-surface);
  border: 1px solid var(--c-border); border-radius: var(--radius-full); scrollbar-width: thin; }
.account-tab { display: inline-flex; align-items: center; gap: 6px; white-space: nowrap; padding: 8px 14px; border-radius: var(--radius-full);
  font-size: var(--fs-sm); font-weight: 500; color: var(--c-slate); border: 0; background: transparent; cursor: pointer; }
.account-tab:hover { background: var(--c-bg); color: var(--c-ink); text-decoration: none; }
.account-tab[aria-selected="true"] { background: var(--grad-teal-blue); color: #fff; box-shadow: var(--shadow-sm); }
.account-tab:focus-visible { outline: 2px solid var(--c-sky); outline-offset: 2px; }
.account-tab__count { min-width: 18px; height: 18px; padding: 0 5px; border-radius: 9px; font-size: 11px; display: inline-grid; place-items: center; background: var(--c-warning); color: #fff; }
.account-panel[hidden] { display: none !important; }

.checklist { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: var(--sp-2); }
.checklist__item { display: flex; align-items: center; gap: var(--sp-2); padding: var(--sp-2) var(--sp-3); border-radius: var(--radius-md); background: var(--c-bg); font-size: var(--fs-sm); }
.checklist__item i { font-size: 1rem; }
.checklist__item--done i { color: var(--c-success); }
.checklist__item--todo i { color: var(--c-muted); }
.checklist__item a { margin-left: auto; font-size: var(--fs-xs); }

.kv-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: var(--sp-4); }
.kv { min-width: 0; }
.kv__label { font-size: var(--fs-xs); color: var(--c-muted); text-transform: uppercase; letter-spacing: .04em; margin-bottom: 2px; }
.kv__value { font-weight: 500; overflow-wrap: anywhere; }

.notice { display: flex; gap: var(--sp-3); align-items: flex-start; padding: var(--sp-3) var(--sp-4); border-radius: var(--radius-md); font-size: var(--fs-sm); background: var(--c-bg); color: var(--c-slate); margin-bottom: var(--sp-4); }
.notice i { font-size: 1.1rem; line-height: 1.3; }
.notice--info { background: rgba(51,177,238,.09); }
.notice--info i { color: var(--c-sky); }
.notice--warning { background: rgba(242,169,59,.12); }
.notice--warning i { color: var(--c-warning); }
.notice--danger { background: rgba(229,72,77,.09); }
.notice--danger i { color: var(--c-danger); }
.notice ul { margin: 4px 0 0; padding-left: 18px; }

.record-list { display: flex; flex-direction: column; gap: var(--sp-3); }
.record { border: 1px solid var(--c-border); border-radius: var(--radius-md); padding: var(--sp-4); background: var(--c-surface); }
.record__top { display: flex; flex-wrap: wrap; gap: var(--sp-2) var(--sp-3); align-items: center; justify-content: space-between; }
.record__title { font-weight: 600; display: flex; align-items: center; gap: var(--sp-2); flex-wrap: wrap; }
.record__meta { font-size: var(--fs-xs); color: var(--c-muted); display: flex; flex-wrap: wrap; gap: 4px var(--sp-3); margin-top: 4px; }
.record__actions { display: flex; flex-wrap: wrap; gap: var(--sp-2); align-items: center; }
.record--muted { background: var(--c-bg); opacity: .85; }
.record details > summary { cursor: pointer; font-size: var(--fs-xs); color: var(--c-sky); margin-top: var(--sp-2); list-style: none; }
.record details > summary::-webkit-details-marker { display: none; }
.record details[open] > summary { margin-bottom: var(--sp-3); }

.empty-state { text-align: center; padding: var(--sp-6) var(--sp-4); color: var(--c-muted); border: 1px dashed var(--c-border); border-radius: var(--radius-md); }
.empty-state i { font-size: 1.6rem; display: block; margin-bottom: var(--sp-2); color: var(--c-border); }
.empty-state p { margin: 0 0 var(--sp-3); }

.section-title { display: flex; align-items: center; justify-content: space-between; gap: var(--sp-3); margin: 0 0 var(--sp-3); }
.section-title h4 { margin: 0; font-size: var(--fs-base); }
.form-actions { display: flex; flex-wrap: wrap; gap: var(--sp-2); align-items: center; margin-top: var(--sp-2); }
.field__hint { font-size: 12px; color: var(--c-muted); margin: 4px 0 0; }
.diff-table { width: 100%; font-size: var(--fs-sm); border-collapse: collapse; }
.diff-table th, .diff-table td { text-align: left; padding: 6px 8px; border-bottom: 1px solid var(--c-border); vertical-align: top; }
.diff-table th { color: var(--c-muted); font-weight: 500; font-size: var(--fs-xs); }
.diff-table td.diff-from { color: var(--c-muted); text-decoration: line-through; }
.visually-hidden { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }

/* ---------------------------------------------------------------------- */
/* MEMBER DASHBOARD CHARTS (server-rendered SVG / CSS, no chart library)   */
/* ---------------------------------------------------------------------- */
.chart-card .card__header { flex-wrap: wrap; gap: var(--sp-2); }
.period-switch { display: inline-flex; gap: 2px; padding: 3px; border-radius: var(--radius-full); background: var(--c-bg); }
.period-switch a { padding: 4px 12px; border-radius: var(--radius-full); font-size: var(--fs-xs); color: var(--c-slate); }
.period-switch a[aria-current="true"] { background: var(--c-surface); color: var(--c-ink); box-shadow: var(--shadow-sm); font-weight: 600; text-decoration: none; }
.currency-tag { display: inline-block; font-size: 11px; font-weight: 700; padding: 2px 8px; border-radius: var(--radius-full); background: var(--c-bg); color: var(--c-slate); letter-spacing: .04em; }

.trend-svg { width: 100%; height: auto; display: block; overflow: visible; }
.trend-svg .grid-line { stroke: var(--c-border); stroke-width: 1; }
.trend-svg .bar-in { fill: var(--c-teal); }
.trend-svg .bar-out { fill: #f0a35e; }
.trend-svg .line-balance { fill: none; stroke: var(--c-ink); stroke-width: 2; }
.trend-svg .dot-balance { fill: var(--c-surface); stroke: var(--c-ink); stroke-width: 2; }
.trend-svg .axis-label { font-size: 12px; fill: var(--c-muted); }
.legend__dot--in { background: var(--c-teal); }
.legend__dot--out { background: #f0a35e; }
.legend__dot--balance { background: var(--c-ink); }
.legend { flex-wrap: wrap; }

.loan-progress { display: flex; flex-direction: column; gap: var(--sp-4); }
.loan-progress__row { display: grid; grid-template-columns: 1fr auto; gap: 4px var(--sp-3); align-items: center; }
.loan-progress__track { grid-column: 1 / -1; height: 10px; border-radius: var(--radius-full); background: var(--c-bg); overflow: hidden; }
.loan-progress__fill { height: 100%; border-radius: var(--radius-full); background: var(--grad-teal-blue); }
.loan-progress__fill--overdue { background: linear-gradient(135deg, var(--c-warning), var(--c-danger)); }
.loan-progress__meta { grid-column: 1 / -1; display: flex; flex-wrap: wrap; gap: 4px var(--sp-4); font-size: var(--fs-xs); color: var(--c-muted); }

.mix-bar { display: flex; height: 14px; border-radius: var(--radius-full); overflow: hidden; background: var(--c-bg); margin: var(--sp-2) 0; }
.mix-bar span { display: block; height: 100%; }
.mix--savings { background: var(--c-teal); }
.mix--fixed { background: var(--c-azure); }
.mix--shares { background: var(--c-orchid); }
.mix--loans { background: #f0a35e; }

.activity-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: var(--sp-3); }
.activity-tile { background: var(--c-bg); border-radius: var(--radius-md); padding: var(--sp-3) var(--sp-4); }
.activity-tile__label { font-size: var(--fs-xs); color: var(--c-muted); display: flex; align-items: center; gap: 6px; }
.activity-tile__value { font-weight: 700; font-variant-numeric: tabular-nums; margin-top: 2px; }
.activity-tile__count { font-size: var(--fs-xs); color: var(--c-muted); }
.chart-table summary { cursor: pointer; font-size: var(--fs-xs); color: var(--c-sky); margin-top: var(--sp-3); }
.chart-table table { margin-top: var(--sp-2); }
@media (max-width: 520px) { .account-hero { grid-template-columns: 1fr; text-align: left; } }

/* Disabled buttons look disabled (e.g. approvals waiting for the member's submission, KYC before verification). */
.btn:disabled, .btn[aria-disabled="true"] {
  opacity: .55; cursor: not-allowed; box-shadow: none; filter: saturate(.35);
}
.btn:disabled:hover, .btn[aria-disabled="true"]:hover { transform: none; }
