/* ===== Global [hidden] guard ===== */
/* Many CSS rules below use display:flex/grid/block which override the browser's
   default [hidden] { display: none } rule due to specificity. This guard ensures
   any element with the HTML [hidden] attribute is always actually hidden. */
/* ===== Material Icons (self-hosted with Google CDN fallback) ===== */
@font-face {
  font-family: 'Material Icons Round';
  font-style: normal;
  font-weight: 400;
  font-display: block;
  src: local('Material Icons Round'),
       url('/assets/fonts/material-icons-round.otf') format('opentype');
}
.material-icons-round, .material-icons {
  font-family: 'Material Icons Round', 'Material Icons', sans-serif;
  font-weight: normal;
  font-style: normal;
  line-height: 1;
  letter-spacing: normal;
  text-transform: none;
  display: inline-block;
  white-space: nowrap;
  word-wrap: normal;
  direction: ltr;
  -webkit-font-feature-settings: 'liga';
  -webkit-font-smoothing: antialiased;
}

[hidden] { display: none !important; }

/* =================================================================
   VCardSaaS — Design System v2
   Modern, professional, dark-first with day/night theme support
   ================================================================= */

/* ---------- THEME: dark (default) ---------- */
:root,
[data-theme="dark"] {
  --bg:           #07080d;
  --bg-2:         #0d0f17;
  --bg-3:         #14171f;
  --surface:      #161924;
  --surface-2:    #1d2030;
  --surface-3:    #252a3d;
  --bd:           #232838;
  --bd-strong:    #2e3447;
  --bd-soft:      rgba(255,255,255,.04);
  --txt:          #ecedf2;
  --txt-2:        #a8acbb;
  --txt-3:        #6b7186;
  --accent:       #67e8f9;   /* cyan-300 */
  --accent-2:     #a3e635;   /* lime-400 */
  --accent-3:     #c4b5fd;   /* violet-300 */
  --accent-on:    #07080d;
  --accent-soft:  rgba(103,232,249, .12);
  --warn:         #fbbf24;
  --danger:       #f87171;
  --success:      #34d399;
  --info:         #60a5fa;

  --bg-glow-1:    rgba(103,232,249,.08);
  --bg-glow-2:    rgba(196,181,253,.06);
  --bg-glow-3:    rgba(163,230,53,.04);

  --shadow-soft:  0 1px 0 rgba(255,255,255,.04) inset, 0 8px 24px rgba(0,0,0,.35);
  --shadow-pop:   0 24px 48px -12px rgba(0,0,0,.6);
  --shadow-glow:  0 0 0 1px var(--accent-soft), 0 8px 32px -8px var(--accent-soft);

  --radius-sm:    8px;
  --radius:       12px;
  --radius-lg:    20px;
  --radius-pill:  999px;

  --font-display: 'Bricolage Grotesque', 'Inter Tight', system-ui, sans-serif;
  --font-body:    'Manrope', system-ui, -apple-system, sans-serif;
  --font-mono:    'JetBrains Mono', ui-monospace, monospace;

  --t-fast:       .12s ease;
  --t-base:       .2s cubic-bezier(.4, 0, .2, 1);
  --t-slow:       .35s cubic-bezier(.4, 0, .2, 1);
}

/* ---------- THEME: light ---------- */
[data-theme="light"] {
  --bg:           #f8f9fc;
  --bg-2:         #ffffff;
  --bg-3:         #f1f3f9;
  --surface:      #ffffff;
  --surface-2:    #f6f7fb;
  --surface-3:    #eef0f6;
  --bd:           #e3e6ef;
  --bd-strong:    #cdd2df;
  --bd-soft:      rgba(15, 20, 40, .04);
  --txt:          #11141c;
  --txt-2:        #4a5067;
  --txt-3:        #757b91;
  --accent:       #0891b2;
  --accent-2:     #65a30d;
  --accent-3:     #7c3aed;
  --accent-on:    #ffffff;
  --accent-soft:  rgba(8, 145, 178, .08);
  --warn:         #d97706;
  --danger:       #dc2626;
  --success:      #059669;
  --info:         #2563eb;
  --bg-glow-1:    rgba(8,145,178,.04);
  --bg-glow-2:    rgba(124,58,237,.03);
  --bg-glow-3:    rgba(101,163,13,.03);
  --shadow-soft:  0 1px 0 rgba(255,255,255,1) inset, 0 4px 12px rgba(15,20,40,.04);
  --shadow-pop:   0 20px 40px -12px rgba(15,20,40,.18);
  --shadow-glow:  0 0 0 1px var(--accent-soft), 0 8px 32px -8px var(--accent-soft);
}

* { box-sizing: border-box; }

html { transition: background-color .25s ease; scroll-behavior: smooth; }

html, body {
  margin: 0; padding: 0;
  background: var(--bg);
  color: var(--txt);
  font-family: var(--font-body);
  font-size: 14.5px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body::before {
  content: ""; position: fixed; inset: 0;
  background:
    radial-gradient(900px 600px at 8% -10%, var(--bg-glow-1), transparent 60%),
    radial-gradient(700px 500px at 95% 110%, var(--bg-glow-2), transparent 60%),
    radial-gradient(500px 400px at 50% 50%, var(--bg-glow-3), transparent 70%);
  pointer-events: none; z-index: 0;
}
body > * { position: relative; z-index: 1; }

/* ---------- Typography ---------- */
h1, h2, h3, h4 { font-family: var(--font-display); font-weight: 700; color: var(--txt); margin: 0 0 12px; line-height: 1.2; }
h1 { font-size: 28px; letter-spacing: -.02em; }
h2 { font-size: 22px; letter-spacing: -.01em; }
h3 { font-size: 17px; }
h4 { font-size: 15px; }
p  { margin: 0 0 12px; color: var(--txt-2); }
a  { color: var(--accent); text-decoration: none; transition: color var(--t-fast); }
a:hover { color: var(--accent-3); }
.muted { color: var(--txt-2); }
.small { font-size: 12.5px; }
code   { font-family: var(--font-mono); font-size: 12.5px; padding: 1px 6px; background: var(--bg-3); border-radius: 4px; border: 1px solid var(--bd); color: var(--accent); }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 10px 18px;
  background: var(--surface);
  color: var(--txt);
  border: 1px solid var(--bd);
  border-radius: var(--radius-pill);
  font-family: var(--font-body); font-weight: 600; font-size: 13.5px;
  cursor: pointer;
  transition: all var(--t-base);
  text-decoration: none;
  white-space: nowrap;
  user-select: none;
}
.btn:hover { background: var(--surface-2); transform: translateY(-1px); border-color: var(--bd-strong); color: var(--txt); }
.btn:active { transform: translateY(0); }
.btn .material-icons-round { font-size: 18px; }

.btn--solid {
  background: linear-gradient(135deg, var(--accent), var(--accent-3));
  color: var(--accent-on);
  border-color: transparent;
  font-weight: 700;
}
.btn--solid:hover { background: linear-gradient(135deg, var(--accent-3), var(--accent)); color: var(--accent-on); box-shadow: var(--shadow-glow); }
.btn--ghost { background: transparent; }
.btn--ghost:hover { background: var(--surface); }
.btn--danger { color: var(--danger); border-color: rgba(248,113,113,.3); }
.btn--danger:hover { background: rgba(248,113,113,.08); border-color: var(--danger); color: var(--danger); }
.btn--sm { padding: 6px 12px; font-size: 12px; }
.btn--lg { padding: 14px 24px; font-size: 15px; }
.btn--block { width: 100%; }
.btn:disabled { opacity: .5; cursor: not-allowed; transform: none; }

/* ---------- Forms ---------- */
.form { display: grid; gap: 16px; }
.form__row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.form__row--3 { grid-template-columns: 1fr 1fr 1fr; }
.form__actions { display: flex; gap: 10px; padding-top: 8px; }
.field { display: grid; gap: 6px; }
.field > span { font-size: 12px; font-weight: 600; color: var(--txt-2); text-transform: uppercase; letter-spacing: .04em; }
.field small { font-size: 12px; color: var(--txt-3); margin-top: 2px; }
.field input, .field select, .field textarea, .form input, .form select, .form textarea {
  width: 100%;
  padding: 10px 14px;
  background: var(--bg-2);
  border: 1px solid var(--bd);
  border-radius: var(--radius);
  color: var(--txt);
  font-family: var(--font-body); font-size: 14px;
  transition: border-color var(--t-base), box-shadow var(--t-base), background var(--t-base);
}
.field input:focus, .field select:focus, .field textarea:focus,
.form input:focus, .form select:focus, .form textarea:focus {
  outline: none;
  border-color: var(--accent);
  background: var(--surface);
  box-shadow: 0 0 0 3px var(--accent-soft);
}
.field textarea { resize: vertical; min-height: 80px; font-family: var(--font-mono); font-size: 13px; }
.field input[type="color"] { padding: 4px; height: 40px; cursor: pointer; }
.field input[type="file"] {
  padding: 8px;
  cursor: pointer;
  font-size: 13px;
}

.form-collapse { background: var(--surface); border: 1px solid var(--bd); border-radius: var(--radius-lg); padding: 16px; margin-bottom: 18px; box-shadow: var(--shadow-soft); }
.form-collapse > summary { cursor: pointer; list-style: none; }
.form-collapse > summary::-webkit-details-marker { display: none; }
.form-collapse > .form { padding: 18px 0 4px; }

/* ---------- App shell ---------- */
.app-shell {
  display: grid;
  grid-template-columns: 240px 1fr;
  min-height: 100vh;
}

/* ---------- Sidebar ---------- */
.sidebar {
  background: var(--bg-2);
  border-right: 1px solid var(--bd);
  padding: 20px 16px;
  display: flex; flex-direction: column;
  gap: 6px;
  position: sticky; top: 0;
  height: 100vh;
  overflow-y: auto;
}
.sidebar__brand {
  display: flex; align-items: center; gap: 10px;
  padding: 4px 12px 16px;
  margin-bottom: 4px;
  font-family: var(--font-display); font-weight: 800; font-size: 18px;
  color: var(--txt);
  text-decoration: none;
}
.sidebar__brand .material-icons-round {
  font-size: 28px;
  background: linear-gradient(135deg, var(--accent), var(--accent-3));
  -webkit-background-clip: text; background-clip: text;
  color: transparent;
}
.sidebar__role-pill {
  display: inline-flex; align-items: center;
  padding: 4px 10px;
  background: var(--accent-soft);
  border: 1px solid var(--accent);
  color: var(--accent);
  border-radius: var(--radius-pill);
  font-size: 10.5px; font-weight: 700;
  letter-spacing: .08em;
  margin: 0 12px 18px;
  width: fit-content;
}
.sidebar__nav { display: flex; flex-direction: column; gap: 2px; flex: 1; }
.sidebar__link {
  display: flex; align-items: center; gap: 12px;
  padding: 10px 12px;
  border-radius: var(--radius);
  color: var(--txt-2);
  font-size: 13.5px; font-weight: 500;
  text-decoration: none;
  transition: all var(--t-fast);
  border: 1px solid transparent;
  background: transparent;
  cursor: pointer;
  font-family: var(--font-body);
  width: 100%;
  text-align: left;
}
.sidebar__link:hover { background: var(--surface); color: var(--txt); }
.sidebar__link.is-active {
  background: var(--surface-2);
  color: var(--txt);
  border-color: var(--bd);
  box-shadow: inset 3px 0 0 var(--accent);
}
.sidebar__link .material-icons-round { font-size: 19px; color: var(--txt-3); transition: color var(--t-fast); }
.sidebar__link:hover .material-icons-round,
.sidebar__link.is-active .material-icons-round { color: var(--accent); }
.sidebar__logout { margin-top: auto; padding-top: 12px; border-top: 1px solid var(--bd); }
.sidebar__link--ghost { color: var(--txt-3); }

/* ---------- Main area ---------- */
.main { display: flex; flex-direction: column; min-width: 0; }
.topbar {
  display: flex; align-items: center; justify-content: space-between;
  padding: 18px 32px;
  border-bottom: 1px solid var(--bd);
  background: var(--bg-2);
  position: sticky; top: 0; z-index: 5;
  backdrop-filter: blur(10px);
}
.topbar__title h1 { font-size: 22px; margin: 0; }
.topbar__title p { margin: 2px 0 0; color: var(--txt-2); font-size: 13px; }
.topbar__user { display: flex; align-items: center; gap: 12px; }

.theme-toggle {
  display: inline-flex; align-items: center; justify-content: center;
  width: 38px; height: 38px;
  background: var(--surface);
  color: var(--txt);
  border: 1px solid var(--bd);
  border-radius: 50%;
  cursor: pointer;
  transition: all var(--t-base);
}
.theme-toggle:hover { background: var(--surface-2); transform: scale(1.05); border-color: var(--accent); color: var(--accent); }
.theme-toggle .material-icons-round { font-size: 18px; }
.theme-toggle .icon-light { display: none; }
[data-theme="light"] .theme-toggle .icon-dark { display: none; }
[data-theme="light"] .theme-toggle .icon-light { display: inline-block; }

.user-chip {
  display: flex; align-items: center; gap: 10px;
  padding: 4px 14px 4px 4px;
  background: var(--surface);
  border: 1px solid var(--bd);
  border-radius: var(--radius-pill);
}
.user-chip__avatar {
  width: 30px; height: 30px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--accent), var(--accent-3));
  color: var(--accent-on);
  display: grid; place-items: center;
  font-weight: 700; font-size: 12px;
}
.user-chip__meta { display: flex; flex-direction: column; line-height: 1.2; }
.user-chip__meta strong { font-size: 13px; color: var(--txt); }
.user-chip__meta span { font-size: 11px; color: var(--txt-3); }

.content { padding: 28px 32px 60px; max-width: 1400px; }

/* ---------- Panels & cards ---------- */
.panel {
  background: var(--surface);
  border: 1px solid var(--bd);
  border-radius: var(--radius-lg);
  padding: 24px;
  margin-bottom: 18px;
  box-shadow: var(--shadow-soft);
}
.panel__head {
  display: flex; align-items: flex-start; justify-content: space-between;
  margin-bottom: 18px;
  gap: 16px;
  flex-wrap: wrap;
}
.panel__head h2 { margin: 0 0 4px; }
.panel__head p  { margin: 0; }

/* ---------- Stats grid ---------- */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 14px;
  margin-bottom: 20px;
}
.stat {
  background: var(--surface);
  border: 1px solid var(--bd);
  border-radius: var(--radius-lg);
  padding: 18px 20px;
  position: relative;
  overflow: hidden;
  transition: transform var(--t-base), border-color var(--t-base);
}
.stat:hover { transform: translateY(-2px); border-color: var(--accent); }
.stat::before {
  content: ""; position: absolute;
  top: 0; right: 0; width: 100px; height: 100px;
  background: radial-gradient(circle at top right, var(--accent-soft), transparent 70%);
  opacity: 0; transition: opacity var(--t-base);
}
.stat:hover::before { opacity: 1; }
.stat__label {
  font-size: 11px; font-weight: 600; color: var(--txt-3);
  text-transform: uppercase; letter-spacing: .08em;
  margin-bottom: 8px;
}
.stat__value {
  font-family: var(--font-display); font-weight: 800;
  font-size: 32px; color: var(--txt); line-height: 1;
}
.stat--accent { background: linear-gradient(135deg, var(--accent), var(--accent-2)); border-color: transparent; color: var(--accent-on); }
.stat--accent .stat__label { color: rgba(7,8,13,.7); }
.stat--accent .stat__value { color: var(--accent-on); }

/* ---------- Tables ---------- */
.table { width: 100%; border-collapse: collapse; }
.table th, .table td {
  text-align: left;
  padding: 12px 14px;
  font-size: 13.5px;
  border-bottom: 1px solid var(--bd);
}
.table th {
  font-size: 11px; font-weight: 600;
  color: var(--txt-3); text-transform: uppercase; letter-spacing: .06em;
  background: var(--bg-2);
}
.table tbody tr { transition: background var(--t-fast); }
.table tbody tr:hover { background: var(--surface-2); }
.table tbody tr:last-child td { border-bottom: none; }

/* ---------- Badges ---------- */
.badge {
  display: inline-flex; align-items: center;
  padding: 3px 10px;
  font-size: 11px; font-weight: 700;
  border-radius: var(--radius-pill);
  text-transform: uppercase; letter-spacing: .04em;
}
.badge--active { background: rgba(52,211,153,.12); color: var(--success); }
.badge--inactive { background: rgba(248,113,113,.12); color: var(--danger); }
.badge--warn { background: rgba(251,191,36,.12); color: var(--warn); }
.badge--info { background: rgba(96,165,250,.12); color: var(--info); }

/* ---------- Alerts ---------- */
.alert {
  display: flex; align-items: flex-start; gap: 12px;
  padding: 14px 16px;
  border-radius: var(--radius);
  border: 1px solid transparent;
  font-size: 13.5px;
  margin-bottom: 16px;
}
.alert .material-icons-round { font-size: 20px; flex-shrink: 0; }
.alert--success { background: rgba(52,211,153,.08); border-color: rgba(52,211,153,.25); color: var(--success); }
.alert--error   { background: rgba(248,113,113,.08); border-color: rgba(248,113,113,.25); color: var(--danger); }
.alert--warn    { background: rgba(251,191,36,.08); border-color: rgba(251,191,36,.25); color: var(--warn); }
.alert--info    { background: rgba(96,165,250,.08); border-color: rgba(96,165,250,.25); color: var(--info); }

/* ---------- Card tile (My Cards) ---------- */
.card-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 16px; }
.card-tile {
  background: var(--surface);
  border: 1px solid var(--bd);
  border-radius: var(--radius-lg);
  padding: 18px;
  display: flex; flex-direction: column; gap: 10px;
  transition: all var(--t-base);
}
.card-tile:hover { transform: translateY(-2px); border-color: var(--accent); box-shadow: var(--shadow-glow); }
.card-tile header { display: flex; justify-content: space-between; align-items: flex-start; gap: 8px; }
.card-tile h4 { margin: 0; font-size: 15px; }
.card-tile__actions { display: flex; gap: 6px; flex-wrap: wrap; margin-top: auto; padding-top: 12px; border-top: 1px solid var(--bd); }
.card-tile__actions .btn { font-size: 11px; padding: 5px 10px; }

/* ---------- Item cards (plugins, templates uploaded list) ---------- */
.item-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 16px; }
.item-card {
  background: var(--surface);
  border: 1px solid var(--bd);
  border-radius: var(--radius-lg);
  padding: 18px;
  display: flex; flex-direction: column; gap: 10px;
  transition: all var(--t-base);
  position: relative;
}
.item-card:hover { transform: translateY(-2px); border-color: var(--accent); }
.item-card__head { display: flex; align-items: flex-start; gap: 12px; }
.item-card__icon {
  width: 44px; height: 44px;
  background: linear-gradient(135deg, var(--accent-soft), transparent);
  border: 1px solid var(--bd);
  border-radius: var(--radius);
  display: grid; place-items: center;
  flex-shrink: 0;
}
.item-card__icon .material-icons-round { font-size: 22px; color: var(--accent); }
.item-card__title { flex: 1; }
.item-card__title h4 { margin: 0 0 2px; font-size: 15px; }
.item-card__title .small { color: var(--txt-3); font-size: 12px; }
.item-card__meta { display: flex; gap: 12px; flex-wrap: wrap; padding: 8px 0; font-size: 12px; color: var(--txt-2); }
.item-card__meta span { display: flex; align-items: center; gap: 4px; }
.item-card__actions {
  display: flex; gap: 6px; flex-wrap: wrap;
  padding-top: 12px; margin-top: auto;
  border-top: 1px solid var(--bd);
}
.item-card__actions .btn { font-size: 11.5px; padding: 6px 12px; }
.item-card pre {
  background: var(--bg-3);
  border: 1px solid var(--bd);
  border-radius: var(--radius-sm);
  padding: 10px;
  margin: 4px 0 0;
  font-family: var(--font-mono); font-size: 11px;
  color: var(--txt-2);
  overflow-x: auto;
  max-height: 100px;
}

/* ---------- Auth pages — Modern SaaS split layout (reference design) ---------- */
.auth-body {
  background: linear-gradient(135deg, #f5f7fc 0%, #ffffff 50%, #faf6ff 100%);
  min-height: 100vh;
  font-family: var(--font-sans, "Manrope", system-ui, sans-serif);
}
.auth-shell {
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  min-height: 100vh;
  position: relative;
  overflow: hidden;
}
/* Floating decorative blobs */
.auth-blob {
  position: absolute;
  border-radius: 50%;
  filter: blur(2px);
  pointer-events: none;
  z-index: 1;
  box-shadow: 0 20px 60px -20px rgba(99, 102, 241, .4);
}
.auth-blob--1 {
  top: 18%; left: 38%;
  width: 28px; height: 28px;
  background: radial-gradient(circle at 30% 30%, #a78bfa, #6366f1);
}
.auth-blob--2 {
  top: 64%; left: 6%;
  width: 36px; height: 36px;
  background: radial-gradient(circle at 30% 30%, #c4b5fd, #8b5cf6);
}
.auth-blob--3 {
  bottom: 8%; right: 32%;
  width: 32px; height: 32px;
  background: radial-gradient(circle at 30% 30%, #93c5fd, #3b82f6);
}

.auth-art {
  padding: 56px 64px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  position: relative;
  z-index: 2;
  background: transparent;
  border-right: 0;
  min-height: 100vh;
}
.auth-art::before { display: none; }

.auth-art__brand {
  font-family: "Manrope", sans-serif;
  font-weight: 800;
  font-size: 22px;
  display: flex;
  align-items: center;
  gap: 10px;
  color: #0f172a;
}
.auth-art__logo {
  color: #6366f1;
  font-size: 28px !important;
}

.auth-art__hero {
  margin-top: -40px;
}
.auth-art__hero h1 {
  font-family: "Manrope", sans-serif;
  font-size: clamp(38px, 4.5vw, 56px);
  line-height: 1.05;
  letter-spacing: -.03em;
  font-weight: 800;
  color: #0f172a;
  margin: 0 0 20px;
}
.auth-art__accent {
  background: linear-gradient(135deg, #3b82f6 0%, #6366f1 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.auth-art__hero p {
  font-size: 15px;
  color: #64748b;
  max-width: 420px;
  line-height: 1.6;
  margin: 0;
}

/* Feature cards row */
.auth-features {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  max-width: 480px;
}
.auth-feature {
  background: #fff;
  border: 1px solid rgba(15, 23, 42, .06);
  border-radius: 14px;
  padding: 18px 14px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  box-shadow: 0 4px 20px rgba(15, 23, 42, .04);
  transition: transform .2s, box-shadow .2s;
}
.auth-feature:hover {
  transform: translateY(-3px);
  box-shadow: 0 12px 32px rgba(15, 23, 42, .08);
}
.auth-feature__icon {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  display: grid;
  place-items: center;
  color: #fff;
  font-size: 22px !important;
  margin-bottom: 4px;
}
.auth-feature__icon--purple {
  background: linear-gradient(135deg, #8b5cf6 0%, #6366f1 100%);
}
.auth-feature__icon--blue {
  background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
}
.auth-feature__icon--green {
  background: linear-gradient(135deg, #10b981 0%, #059669 100%);
}
.auth-feature strong {
  font-size: 13px;
  font-weight: 700;
  color: #0f172a;
}
.auth-feature small {
  font-size: 11px;
  color: #94a3b8;
  line-height: 1.3;
}

/* Right side — login/register card */
.auth-main {
  padding: 56px 64px;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  z-index: 2;
}
.auth-card {
  width: 100%;
  max-width: 440px;
  padding: 40px 36px;
  background: #fff;
  border: 1px solid rgba(15, 23, 42, .06);
  border-radius: 20px;
  box-shadow: 0 20px 60px -20px rgba(15, 23, 42, .12);
}
.auth-card__head h2 {
  font-family: "Manrope", sans-serif;
  font-size: 26px;
  font-weight: 800;
  color: #0f172a;
  letter-spacing: -.02em;
  margin: 0 0 6px;
}
.auth-card__head p {
  font-size: 14px;
  color: #64748b;
  margin: 0;
}

.auth-form {
  margin-top: 24px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

/* Field with leading icon + optional trailing eye toggle */
.field--icon {
  position: relative;
  display: block;
  margin: 0;
}
.field--icon > span:first-of-type {
  display: block;
  font-size: 11px;
  font-weight: 700;
  color: #94a3b8;
  text-transform: uppercase;
  letter-spacing: .06em;
  margin-bottom: 6px;
}
.field--icon .field__icon {
  position: absolute;
  left: 14px;
  bottom: 14px;
  color: #94a3b8;
  font-size: 18px !important;
  pointer-events: none;
  /* CRITICAL: override the inherited uppercase + letter-spacing from .field > span,
     which would convert "mail_outline" to "MAIL_OUTLINE" and break Material Icons ligatures */
  text-transform: none !important;
  letter-spacing: normal !important;
  font-weight: normal !important;
}
.field--icon input {
  width: 100%;
  height: 46px;
  padding: 0 14px 0 42px;
  background: #fff;
  border: 1.5px solid #e2e8f0;
  border-radius: 12px;
  font-size: 14px;
  color: #0f172a;
  transition: border-color .15s, box-shadow .15s;
  font-family: inherit;
}
.field--icon input::placeholder { color: #cbd5e1; }
.field--icon input:hover { border-color: #cbd5e1; }
.field--icon input:focus {
  outline: 0;
  border-color: #6366f1;
  box-shadow: 0 0 0 4px rgba(99, 102, 241, .12);
}
.field__eye {
  position: absolute;
  right: 12px;
  bottom: 12px;
  background: transparent;
  border: 0;
  cursor: pointer;
  padding: 4px;
  color: #94a3b8;
  display: grid;
  place-items: center;
  transition: color .15s;
}
.field__eye:hover { color: #6366f1; }
.field__eye .material-icons-round { font-size: 20px !important; }

/* Field row (Remember me + Forgot) */
.auth-form .field-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin: -2px 0 4px;
}
.auth-form .check {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: #64748b;
  cursor: pointer;
}
.auth-form .check input[type="checkbox"] {
  width: 16px;
  height: 16px;
  accent-color: #6366f1;
  cursor: pointer;
}
.auth-form .link-soft {
  font-size: 13px;
  color: #6366f1;
  font-weight: 600;
  text-decoration: none;
}
.auth-form .link-soft:hover { text-decoration: underline; }

/* Terms checkbox row */
.check--terms {
  align-items: flex-start;
  gap: 8px;
  font-size: 12px;
  line-height: 1.5;
}
.check--terms input[type="checkbox"] { margin-top: 2px; flex-shrink: 0; }

/* Gradient submit button (the main CTA) */
.btn-gradient {
  width: 100%;
  height: 48px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  background: linear-gradient(135deg, #3b82f6 0%, #6366f1 50%, #8b5cf6 100%);
  background-size: 150% 100%;
  background-position: 0% 50%;
  color: #fff;
  border: 0;
  border-radius: 12px;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 8px 22px -6px rgba(99, 102, 241, .5);
  transition: background-position .35s ease, transform .15s, box-shadow .2s;
}
.btn-gradient:hover {
  background-position: 100% 50%;
  transform: translateY(-1px);
  box-shadow: 0 14px 30px -6px rgba(99, 102, 241, .55);
}
.btn-gradient:active { transform: translateY(0); }
.btn-gradient .material-icons-round { font-size: 18px !important; }

/* Alt link below CTA */
.auth-card__alt {
  margin-top: 16px;
  text-align: center;
  font-size: 14px;
  color: #64748b;
}
.auth-card__alt a {
  color: #6366f1;
  font-weight: 600;
  text-decoration: none;
}
.auth-card__alt a:hover { text-decoration: underline; }

/* OR CONTINUE WITH divider */
.auth-divider {
  position: relative;
  text-align: center;
  margin: 20px 0 14px;
}
.auth-divider::before {
  content: "";
  position: absolute;
  top: 50%;
  left: 0;
  right: 0;
  height: 1px;
  background: #e2e8f0;
}
.auth-divider span {
  position: relative;
  background: #fff;
  padding: 0 14px;
  font-size: 11px;
  font-weight: 700;
  color: #94a3b8;
  letter-spacing: .12em;
}

/* Google sign-in button */
.btn-google {
  width: 100%;
  height: 46px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  background: #fff;
  color: #0f172a;
  border: 1.5px solid #e2e8f0;
  border-radius: 12px;
  font-size: 14px;
  font-weight: 600;
  text-decoration: none;
  transition: border-color .15s, box-shadow .15s, transform .15s;
}
.btn-google:hover {
  border-color: #cbd5e1;
  box-shadow: 0 4px 14px rgba(15, 23, 42, .06);
  transform: translateY(-1px);
}

/* Dark theme overrides */
[data-theme="dark"] .auth-body {
  background: linear-gradient(135deg, #0f172a 0%, #1e293b 50%, #1e1b4b 100%);
}
[data-theme="dark"] .auth-art__brand,
[data-theme="dark"] .auth-art__hero h1,
[data-theme="dark"] .auth-card__head h2 { color: #f1f5f9; }
[data-theme="dark"] .auth-art__hero p,
[data-theme="dark"] .auth-card__head p,
[data-theme="dark"] .auth-card__alt { color: #94a3b8; }
[data-theme="dark"] .auth-feature {
  background: #1e293b;
  border-color: rgba(255, 255, 255, .08);
}
[data-theme="dark"] .auth-feature strong { color: #f1f5f9; }
[data-theme="dark"] .auth-card {
  background: #1e293b;
  border-color: rgba(255, 255, 255, .08);
}
[data-theme="dark"] .field--icon input {
  background: #0f172a;
  border-color: rgba(255, 255, 255, .1);
  color: #f1f5f9;
}
[data-theme="dark"] .field--icon input::placeholder { color: #475569; }
[data-theme="dark"] .auth-divider::before { background: rgba(255, 255, 255, .08); }
[data-theme="dark"] .auth-divider span { background: #1e293b; }
[data-theme="dark"] .btn-google {
  background: #0f172a;
  border-color: rgba(255, 255, 255, .1);
  color: #f1f5f9;
}

/* Mobile */
@media (max-width: 900px) {
  .auth-shell { grid-template-columns: 1fr; }
  .auth-art {
    padding: 32px 24px;
    min-height: auto;
  }
  .auth-art__hero { margin-top: 12px; }
  .auth-art__hero h1 { font-size: 32px; }
  .auth-features { display: none; }
  .auth-main { padding: 24px; }
  .auth-card { padding: 28px 22px; }
  .auth-blob { display: none; }
}

/* ---------- Footer / sign-out / mobile collapse ---------- */
@media (max-width: 900px) {
  .app-shell { grid-template-columns: 1fr; }
  .sidebar { position: relative; height: auto; }
  .auth-shell { grid-template-columns: 1fr; }
  .auth-art { padding: 32px; }
  .content { padding: 20px; }
  .topbar { padding: 16px 20px; }
  .form__row, .form__row--3 { grid-template-columns: 1fr; }
}


/* Smooth theme transitions */
body, .sidebar, .topbar, .panel, .stat, .auth-card, .auth-art,
.btn, .form input, .form textarea, .form select, .table, .card-tile, .item-card {
  transition: background-color .25s ease, color .25s ease, border-color .25s ease;
}

/* ---------- HOW-TO INSTRUCTION PANELS (admin/plugins, admin/templates) ---------- */
.howto {
  background: var(--surface);
  border: 1px solid var(--bd);
  border-radius: var(--radius-lg);
  padding: 0;
  margin-bottom: 20px;
  box-shadow: var(--shadow-soft);
  overflow: hidden;
}
.howto__summary {
  list-style: none;
  display: flex; align-items: center; gap: 12px;
  padding: 18px 24px;
  cursor: pointer;
  font-family: var(--font-display); font-weight: 700; font-size: 17px;
  color: var(--txt);
  user-select: none;
}
.howto__summary::-webkit-details-marker { display: none; }
.howto__summary > .material-icons-round:first-child {
  background: linear-gradient(135deg, var(--accent), var(--accent-3));
  -webkit-background-clip: text; background-clip: text; color: transparent;
  font-size: 24px;
}
.howto__chevron { margin-left: auto; transition: transform .2s ease; color: var(--txt-2); }
.howto[open] .howto__chevron { transform: rotate(180deg); }
.howto__body { padding: 0 24px 24px; }
.howto__intro {
  color: var(--txt-2); font-size: 14px;
  margin: 0 0 22px;
  padding-bottom: 18px;
  border-bottom: 1px solid var(--bd);
}
.howto__steps { display: grid; grid-template-columns: 1fr; gap: 14px; }
.howto__step {
  display: grid;
  grid-template-columns: 32px 110px 1fr;
  gap: 16px;
  padding: 16px;
  background: var(--bg-2);
  border: 1px solid var(--bd);
  border-radius: var(--radius);
  align-items: start;
}
.howto__step-num {
  width: 32px; height: 32px;
  display: grid; place-items: center;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  color: var(--accent-on);
  border-radius: 50%;
  font-family: var(--font-display); font-weight: 800; font-size: 16px;
}
.howto__step-art {
  display: grid; place-items: center;
  background: var(--bg-3);
  border-radius: var(--radius-sm);
  padding: 6px;
  align-self: stretch;
}
.howto__step-text h4 { margin: 0 0 6px; font-family: var(--font-display); font-size: 15px; color: var(--txt); }
.howto__step-text p { color: var(--txt-2); margin: 0 0 10px; font-size: 13.5px; line-height: 1.6; }
.howto__step-text code { font-size: 12px; }
.howto__step-text pre {
  background: var(--bg-3);
  border: 1px solid var(--bd);
  border-radius: var(--radius-sm);
  padding: 12px;
  margin: 10px 0 0;
  overflow-x: auto;
  font-family: var(--font-mono); font-size: 11.5px;
  color: var(--txt); line-height: 1.6;
}
.howto__step-text pre code { background: none; border: none; color: inherit; padding: 0; }
.howto__example {
  margin-top: 16px;
  background: var(--bg-2);
  border: 1px solid var(--bd);
  border-radius: var(--radius);
}
.howto__example > summary {
  padding: 12px 16px;
  cursor: pointer;
  font-weight: 600; color: var(--accent);
  list-style: none;
}
.howto__example > summary::-webkit-details-marker { display: none; }
.howto__example pre { margin: 0; border-top: 1px solid var(--bd); border-radius: 0 0 var(--radius) var(--radius); padding: 16px; font-family: var(--font-mono); font-size: 11.5px; color: var(--txt); line-height: 1.7; overflow-x: auto; background: var(--bg-3); }
.howto__warn {
  margin-top: 16px;
  display: grid; grid-template-columns: 24px 1fr; gap: 12px;
  padding: 14px;
  background: rgba(251,191,36, .08);
  border: 1px solid rgba(251,191,36, .25);
  border-radius: var(--radius);
}
.howto__warn .material-icons-round { color: var(--warn); }
.howto__warn strong { color: var(--txt); display: block; margin-bottom: 6px; }
.howto__warn ul { margin: 0; padding-left: 18px; color: var(--txt-2); font-size: 13px; line-height: 1.7; }

@media (max-width: 700px) {
  .howto__step { grid-template-columns: 1fr; }
  .howto__step-art { width: 110px; }
}

/* ---------- AI Prompt panel (admin/plugins, admin/templates) ---------- */
.ai-prompt {
  background: linear-gradient(135deg, var(--surface), var(--surface-2));
  border: 1px solid var(--accent);
  border-radius: var(--radius-lg);
  padding: 20px;
  margin-bottom: 20px;
  box-shadow: 0 0 0 1px var(--accent-soft);
}
.ai-prompt__head {
  display: flex; align-items: center; gap: 10px;
  margin-bottom: 12px;
}
.ai-prompt__head .material-icons-round {
  background: linear-gradient(135deg, var(--accent), var(--accent-3));
  -webkit-background-clip: text; background-clip: text; color: transparent;
  font-size: 24px;
}
.ai-prompt__head h3 { margin: 0; font-size: 16px; color: var(--txt); }
.ai-prompt__intro { color: var(--txt-2); font-size: 13px; margin-bottom: 12px; }
.ai-prompt__body {
  position: relative;
  background: var(--bg-3);
  border: 1px solid var(--bd);
  border-radius: var(--radius);
  padding: 16px;
  font-family: var(--font-mono); font-size: 12px;
  color: var(--txt);
  line-height: 1.7;
  white-space: pre-wrap;
  max-height: 320px;
  overflow-y: auto;
}
.ai-prompt__copy {
  position: absolute; top: 8px; right: 8px;
  padding: 5px 10px;
  background: var(--surface);
  border: 1px solid var(--bd);
  border-radius: var(--radius-sm);
  color: var(--txt-2);
  font-size: 11px; font-weight: 600;
  cursor: pointer;
  transition: all var(--t-base);
  display: inline-flex; align-items: center; gap: 4px;
}
.ai-prompt__copy:hover { color: var(--accent); border-color: var(--accent); }
.ai-prompt__copy.is-copied { color: var(--success); border-color: var(--success); }

/* ---------- Confirm-delete modal (typed DELETE confirmation) ---------- */
.confirm-overlay {
  position: fixed; inset: 0;
  background: rgba(0,0,0,.65);
  backdrop-filter: blur(6px);
  display: none;
  align-items: center; justify-content: center;
  z-index: 100;
  padding: 20px;
}
.confirm-overlay.is-open { display: flex; }
.confirm-modal {
  background: var(--surface);
  border: 1px solid var(--bd);
  border-radius: var(--radius-lg);
  padding: 28px;
  max-width: 420px; width: 100%;
  box-shadow: var(--shadow-pop);
  animation: confirm-pop .2s cubic-bezier(.4,0,.2,1);
}
@keyframes confirm-pop {
  from { opacity: 0; transform: scale(.94); }
  to   { opacity: 1; transform: scale(1); }
}
.confirm-modal__icon {
  width: 56px; height: 56px;
  background: rgba(248,113,113,.12);
  border-radius: 50%;
  display: grid; place-items: center;
  margin: 0 auto 16px;
}
.confirm-modal__icon .material-icons-round { color: var(--danger); font-size: 28px; }
.confirm-modal h3 { text-align: center; margin: 0 0 8px; }
.confirm-modal p  { text-align: center; color: var(--txt-2); margin: 0 0 16px; font-size: 13.5px; }
.confirm-modal strong { color: var(--danger); font-family: var(--font-mono); }
.confirm-modal input {
  width: 100%; padding: 10px 14px;
  background: var(--bg-2); border: 1px solid var(--bd);
  border-radius: var(--radius);
  color: var(--txt); font-family: var(--font-mono); font-size: 14px;
  text-align: center; letter-spacing: .15em;
  margin-bottom: 16px;
}
.confirm-modal input:focus { outline: none; border-color: var(--danger); box-shadow: 0 0 0 3px rgba(248,113,113,.15); }
.confirm-modal__actions { display: flex; gap: 10px; }
.confirm-modal__actions .btn { flex: 1; }

/* Backwards-compat aliases for older view markup */
.stat-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 14px; margin-bottom: 20px; }
.stat__num { font-family: var(--font-display); font-weight: 800; font-size: 32px; color: var(--txt); line-height: 1; display: block; }
.stat__num::before { content: ""; display: block; height: 6px; }
.role-pill { display: inline-flex; align-items: center; padding: 3px 10px; font-size: 11px; font-weight: 700; border-radius: var(--radius-pill); text-transform: uppercase; letter-spacing: .04em; background: var(--accent-soft); color: var(--accent); }
.role-pill--admin  { background: rgba(196,181,253,.12); color: var(--accent-3); }
.role-pill--client { background: rgba(96,165,250,.12); color: var(--info); }
.role-pill--user   { background: var(--accent-soft); color: var(--accent); }
.badge--active     { background: rgba(52,211,153,.12); color: var(--success); }
.badge--suspended  { background: rgba(248,113,113,.12); color: var(--danger); }
.badge--pending    { background: rgba(251,191,36,.12); color: var(--warn); }
.kicker { display: inline-flex; align-items: center; gap: 6px; font-size: 11px; font-weight: 700; color: var(--accent); text-transform: uppercase; letter-spacing: .08em; margin-bottom: 6px; }
.kicker .material-icons-round { font-size: 14px; }
.tpl-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 16px; }

/* =================================================================
   Premium dashboard stats
   ================================================================= */
.stat-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 14px; margin-bottom: 20px; }
.stat {
  display: flex; align-items: center; gap: 14px;
  padding: 18px 20px;
  background: var(--surface);
  border: 1px solid var(--bd);
  border-radius: var(--radius-lg);
  position: relative;
  overflow: hidden;
  transition: all .25s;
}
.stat:hover { transform: translateY(-2px); border-color: var(--accent); box-shadow: 0 12px 28px -12px rgba(103,232,249,.25); }
.stat::before {
  content: ""; position: absolute; top: 0; right: 0; width: 120px; height: 120px;
  background: radial-gradient(circle at top right, var(--accent-soft), transparent 70%);
  opacity: 0; transition: opacity var(--t-base);
}
.stat:hover::before { opacity: 1; }
.stat__icon {
  width: 44px; height: 44px;
  border-radius: 12px;
  background: linear-gradient(135deg, rgba(103,232,249,.18), rgba(196,181,253,.12));
  display: grid; place-items: center;
  flex-shrink: 0;
}
.stat__icon .material-icons-round { color: var(--accent); font-size: 22px; }
.stat__label { display: block; font-size: 11px; font-weight: 600; color: var(--txt-3); text-transform: uppercase; letter-spacing: .06em; margin-bottom: 4px; }
.stat__num   { display: block; font-family: var(--font-display); font-weight: 800; font-size: 28px; color: var(--txt); line-height: 1; }
.stat__delta { display: inline-block; margin-top: 6px; padding: 2px 8px; background: rgba(52,211,153,.14); color: var(--success); border-radius: 999px; font-size: 11px; font-weight: 700; }
.stat--accent {
  background: linear-gradient(135deg, var(--accent), var(--accent-3));
  border-color: transparent;
  color: var(--accent-on);
}
.stat--accent .stat__icon { background: rgba(7,8,13,.15); }
.stat--accent .stat__icon .material-icons-round { color: var(--accent-on); }
.stat--accent .stat__label { color: rgba(7,8,13,.65); }
.stat--accent .stat__num { color: var(--accent-on); }

/* Card-tile premium */
.card-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 16px; }
.card-tile {
  background: var(--surface);
  border: 1px solid var(--bd);
  border-radius: var(--radius-lg);
  padding: 16px;
  display: flex; flex-direction: column; gap: 10px;
  transition: all .25s;
}
.card-tile:hover { transform: translateY(-2px); border-color: var(--accent); }
.card-tile header { display: flex; justify-content: space-between; align-items: flex-start; gap: 8px; }
.card-tile h4 { margin: 0; font-size: 15.5px; }
.card-tile__meta { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; font-size: 12px; color: var(--txt-2); }
.card-tile__meta span { display: inline-flex; align-items: center; gap: 4px; }
.card-tile__meta .material-icons-round { font-size: 14px; color: var(--accent); }
.card-tile__slug { color: var(--txt-3); font-family: var(--font-mono); font-size: 11px; margin-left: auto; }
.card-tile__actions {
  display: flex; gap: 6px; flex-wrap: wrap;
  padding-top: 12px; margin-top: auto;
  border-top: 1px solid var(--bd);
}
.card-tile__actions .btn--sm { padding: 6px 10px; font-size: 11.5px; }
.card-tile__actions .btn--sm .material-icons-round { font-size: 14px; }

/* Lead message ellipsis cell */
.lead-msg { line-height: 1.4; }

/* =================================================================
   Premium tables — search, sort, paginate, export
   ================================================================= */
.data-table__toolbar {
  display: flex; align-items: center; gap: 12px; flex-wrap: wrap;
  padding: 12px 0;
  border-bottom: 1px solid var(--bd);
  margin-bottom: 12px;
}
.data-table__search {
  display: flex; align-items: center; gap: 6px;
  flex: 1; min-width: 220px;
  padding: 8px 12px;
  background: var(--bg-2);
  border: 1px solid var(--bd);
  border-radius: 999px;
}
.data-table__search:focus-within { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.data-table__search .material-icons-round { color: var(--txt-3); font-size: 18px; }
.data-table__search input {
  flex: 1; border: none; background: transparent; outline: none;
  color: var(--txt); font-family: var(--font-body); font-size: 14px; padding: 0;
}
.data-table__filters { display: flex; gap: 8px; flex-wrap: wrap; }
.data-table__actions { margin-left: auto; }

.table thead th.is-sortable { cursor: pointer; user-select: none; position: relative; padding-right: 22px; }
.table thead th.is-sortable::after {
  content: "⇅"; position: absolute; right: 8px; top: 50%; transform: translateY(-50%);
  opacity: .35; font-size: 12px; font-weight: 700;
}
.table thead th.is-sortable:hover { color: var(--accent); }
.table thead th[data-sort-dir="asc"]::after  { content: "↑"; opacity: 1; color: var(--accent); }
.table thead th[data-sort-dir="desc"]::after { content: "↓"; opacity: 1; color: var(--accent); }

.data-table__pager {
  display: flex; align-items: center; gap: 8px; justify-content: flex-end;
  padding: 12px 0;
  border-top: 1px solid var(--bd);
  margin-top: 12px;
}
.data-table__count { margin-right: auto; font-size: 12px; color: var(--txt-3); }

/* Inline expandable edit details inside table cells */
.action-edit summary { list-style: none; }
.action-edit summary::-webkit-details-marker { display: none; }
.action-edit[open] {
  display: block;
  position: absolute;
  background: var(--surface);
  border: 1px solid var(--accent);
  border-radius: 12px;
  padding: 16px;
  z-index: 50;
  width: 360px;
  box-shadow: var(--shadow-pop);
  margin-top: 6px;
}

/* =================================================================
   Chart card containers
   ================================================================= */
.chart-grid { display: grid; grid-template-columns: 2fr 1fr; gap: 16px; margin-bottom: 20px; }
@media (max-width: 900px) { .chart-grid { grid-template-columns: 1fr; } }
.chart-card {
  background: var(--surface); border: 1px solid var(--bd); border-radius: var(--radius-lg);
  padding: 20px; box-shadow: var(--shadow-soft);
}
.chart-card__head {
  display: flex; align-items: center; justify-content: space-between; margin-bottom: 14px;
}
.chart-card__head h3 { margin: 0; font-size: 15px; }
.chart-card__head .small { color: var(--txt-3); font-size: 12px; }
.chart-card__canvas { position: relative; width: 100%; height: 220px; }

/* Sample download cards */
.sample-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 14px;
}
.sample-card {
  display: flex; align-items: center; gap: 14px;
  padding: 18px 20px;
  background: var(--surface);
  border: 1px solid var(--bd);
  border-radius: var(--radius-lg);
  text-decoration: none;
  transition: all .25s;
  color: var(--txt);
}
.sample-card:hover {
  transform: translateY(-2px);
  border-color: var(--accent);
  box-shadow: 0 12px 24px -10px var(--accent-soft);
  color: var(--txt);
}
.sample-card__icon {
  width: 48px; height: 48px;
  border-radius: 12px;
  display: grid; place-items: center;
  flex-shrink: 0;
}
.sample-card__icon .material-icons-round { font-size: 24px; }
.sample-card h4 { margin: 0; font-size: 14.5px; }
.sample-card p  { margin: 2px 0 0; font-size: 12px; color: var(--txt-3); }
.sample-card__dl {
  margin-left: auto;
  color: var(--txt-3);
  font-size: 20px !important;
  transition: all .2s;
}
.sample-card:hover .sample-card__dl { color: var(--accent); transform: translateY(2px); }

/* Captcha */
.captcha-field { display: flex; flex-direction: column; gap: 8px; }
.captcha-row { display: flex; align-items: center; gap: 10px; }
.captcha-image {
  flex: 1;
  background: #f8fafc;
  border: 1px solid var(--bd);
  border-radius: 10px;
  overflow: hidden;
  height: 60px;
  display: flex; align-items: center; justify-content: center;
}
.captcha-image svg { display: block; max-width: 100%; height: 100%; }
.captcha-refresh {
  width: 44px; height: 44px;
  background: var(--bg-2);
  border: 1px solid var(--bd);
  border-radius: 10px;
  cursor: pointer;
  display: grid; place-items: center;
  color: var(--accent);
  transition: all .2s;
}
.captcha-refresh:hover { transform: rotate(90deg); border-color: var(--accent); }
.captcha-field small { color: var(--txt-3); font-weight: 400; font-size: 11px; }

/* ===== AI artifact cards (admin/ai-builder) ===== */
.ai-artifact-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 12px;
}
.ai-artifact {
  background: var(--bg-2);
  border: 1px solid var(--bd);
  border-radius: 12px;
  padding: 14px;
  display: flex; flex-direction: column; gap: 10px;
  transition: all .2s;
}
.ai-artifact:hover { border-color: var(--accent); transform: translateY(-2px); }
.ai-artifact__head { display: flex; align-items: center; gap: 10px; }
.ai-artifact__head .material-icons-round { font-size: 22px; flex-shrink: 0; }
.ai-artifact__head strong { display: block; font-size: 13px; line-height: 1.2; }
.ai-artifact__type {
  display: inline-block;
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .08em;
  color: var(--txt-3);
  margin-top: 4px;
}
.ai-artifact__meta {
  display: flex; align-items: center; justify-content: space-between; gap: 6px;
  font-size: 11px;
}
.ai-artifact__meta code {
  font-size: 11px; color: var(--txt-3);
  font-family: var(--font-mono);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  max-width: 60%;
}
.ai-artifact__swatch {
  height: 36px;
  border-radius: 8px;
  border: 1px solid var(--bd);
}
.ai-artifact__actions {
  display: flex; gap: 6px; justify-content: flex-end;
  margin-top: auto;
}

/* ==========================================================
   Premium Templates Library
========================================================== */
.tpl-panel { padding-bottom: 24px; }
.tpl-categories {
  display: flex; flex-wrap: wrap; gap: 8px;
  margin-bottom: 24px;
}
.tpl-cat {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 8px 14px;
  background: var(--bg-2, rgba(255,255,255,.04));
  border: 1px solid var(--bd, rgba(148,163,184,.18));
  border-radius: 999px;
  color: var(--txt-2, #cbd5e1);
  font-size: 13px; font-weight: 600;
  text-decoration: none;
  transition: all .15s;
}
.tpl-cat .material-icons-round { font-size: 16px; }
.tpl-cat:hover {
  background: rgba(6,182,212,.1);
  border-color: rgba(6,182,212,.3);
  color: var(--accent, #06b6d4);
}
.tpl-cat.is-active {
  background: linear-gradient(135deg, var(--accent, #06b6d4), #8b5cf6);
  border-color: transparent;
  color: #fff;
  box-shadow: 0 6px 16px rgba(6,182,212,.35);
}

.tpl-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 20px;
}

.tpl-card {
  background: var(--surface, #1a1f2e);
  border: 1px solid var(--bd, rgba(148,163,184,.18));
  border-radius: 16px;
  overflow: hidden;
  transition: all .25s;
  display: flex; flex-direction: column;
  cursor: pointer;
}
.tpl-card:hover {
  transform: translateY(-4px);
  border-color: var(--accent, #06b6d4);
  box-shadow: 0 20px 40px -12px rgba(6,182,212,.35), 0 0 0 1px rgba(6,182,212,.2);
}

/* Phone-mockup preview */
.tpl-card__preview {
  position: relative;
  height: 280px;
  background: linear-gradient(135deg, #1e293b, #0f172a);
  background-size: cover;
  background-position: center;
  display: flex; align-items: center; justify-content: center;
  overflow: hidden;
}
.tpl-card__phone {
  width: 130px; height: 240px;
  border-radius: 22px;
  position: relative;
  display: flex; flex-direction: column;
  padding: 18px 12px 12px;
  box-shadow:
    0 0 0 4px rgba(255,255,255,.1),
    0 24px 50px rgba(0,0,0,.45);
}
.tpl-card__phone-notch {
  position: absolute; top: 6px; left: 50%; transform: translateX(-50%);
  width: 40px; height: 5px;
  background: rgba(0,0,0,.5);
  border-radius: 3px;
}
.tpl-card__phone-content {
  display: flex; flex-direction: column; align-items: center; gap: 6px;
  padding-top: 14px;
}
.tpl-card__phone-avatar {
  width: 36px; height: 36px;
  background: rgba(255,255,255,.85);
  border-radius: 50%;
  box-shadow: 0 2px 6px rgba(0,0,0,.2);
}
.tpl-card__phone-name {
  width: 60%; height: 7px;
  background: rgba(255,255,255,.85);
  border-radius: 3px;
}
.tpl-card__phone-title {
  width: 40%; height: 5px;
  background: rgba(255,255,255,.55);
  border-radius: 3px;
  margin-bottom: 6px;
}
.tpl-card__phone-buttons {
  display: flex; gap: 4px; margin-bottom: 8px;
}
.tpl-card__phone-buttons span {
  width: 18px; height: 18px;
  background: rgba(255,255,255,.85);
  border-radius: 50%;
}
.tpl-card__phone-card {
  width: 100%; height: 50px;
  background: rgba(255,255,255,.18);
  border-radius: 8px;
  margin-top: auto;
}

.tpl-card__badge {
  position: absolute; top: 10px; right: 10px;
  display: inline-flex; align-items: center; gap: 3px;
  background: linear-gradient(135deg, #f59e0b, #f97316);
  color: #fff;
  font-size: 10px; font-weight: 800;
  padding: 4px 8px; border-radius: 4px;
  letter-spacing: .06em;
  box-shadow: 0 4px 12px rgba(245,158,11,.5);
}
.tpl-card__badge .material-icons-round { font-size: 12px; }

.tpl-card__body { padding: 16px; display: flex; flex-direction: column; gap: 8px; }
.tpl-card__head { display: flex; align-items: flex-start; justify-content: space-between; gap: 8px; }
.tpl-card__head h4 { margin: 0; font-size: 16px; font-weight: 700; color: var(--text, #e2e8f0); flex: 1; line-height: 1.3; }
.tpl-card__cat {
  font-size: 10px; font-weight: 700; letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--accent, #06b6d4);
  background: rgba(6,182,212,.12);
  padding: 3px 8px; border-radius: 4px;
  white-space: nowrap;
}
.tpl-card__meta {
  margin: 0; font-size: 12px; color: var(--txt-3, #94a3b8);
  display: flex; align-items: center; gap: 4px;
}
.tpl-card__meta .material-icons-round { font-size: 14px; }
.tpl-card__action { margin: 0; margin-top: 6px; }
.tpl-card__use {
  width: 100%;
  display: flex; align-items: center; justify-content: center; gap: 6px;
  padding: 10px 16px;
  background: linear-gradient(135deg, var(--accent, #06b6d4), #8b5cf6);
  color: #fff;
  font-size: 13px; font-weight: 700;
  border: 0;
  border-radius: 10px;
  cursor: pointer;
  transition: transform .15s, box-shadow .15s;
}
.tpl-card__use .material-icons-round { font-size: 16px; }
.tpl-card__use:hover {
  transform: translateY(-1px);
  box-shadow: 0 8px 18px rgba(6,182,212,.4);
}

.tpl-empty {
  grid-column: 1 / -1;
  text-align: center; padding: 60px 20px;
  background: var(--bg-2, rgba(255,255,255,.02));
  border-radius: 16px;
  border: 1px dashed var(--bd, rgba(148,163,184,.18));
}
.tpl-empty .material-icons-round { font-size: 56px; color: var(--txt-3, #94a3b8); opacity: .5; }
.tpl-empty h4 { margin: 12px 0 4px; font-size: 17px; color: var(--text, #e2e8f0); }

/* ==========================================================================
   PAYMENT GATEWAY CARDS — admin/settings page (Razorpay/PhonePe/Paytm/UPI)
   ========================================================================== */

.gateway-card {
  border: 1.5px solid var(--bd, rgba(15, 23, 42, .08));
  border-radius: 14px;
  margin-bottom: 14px;
  overflow: hidden;
  background: #fff;
  transition: border-color .2s, box-shadow .2s;
}
.gateway-card:hover {
  border-color: rgba(99, 102, 241, .3);
  box-shadow: 0 4px 14px rgba(15, 23, 42, .04);
}
.gateway-card:has(input[type="checkbox"]:checked) {
  border-color: rgba(16, 185, 129, .4);
  box-shadow: 0 4px 14px rgba(16, 185, 129, .08);
}

.gateway-card__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px;
  background: linear-gradient(135deg, rgba(15, 23, 42, .02), rgba(15, 23, 42, .015));
  border-bottom: 1px solid rgba(15, 23, 42, .06);
}

.gateway-card__brand {
  display: flex;
  align-items: center;
  gap: 14px;
  flex: 1; min-width: 0;
}

.gateway-card__logo {
  width: 44px; height: 44px;
  border-radius: 12px;
  display: grid; place-items: center;
  color: #fff;
  flex-shrink: 0;
  box-shadow: 0 4px 10px rgba(15, 23, 42, .12);
}
.gateway-card__logo--razorpay { background: linear-gradient(135deg, #2D88FF, #1E3FFF); }
.gateway-card__logo--phonepe  { background: linear-gradient(135deg, #5F259F, #4A1A7E); }
.gateway-card__logo--paytm    { background: linear-gradient(135deg, #00BAF2, #002970); }
.gateway-card__logo--upi      { background: linear-gradient(135deg, #FF6B35, #FF9F1C); }

.gateway-card__name {
  font-size: 15px; font-weight: 700;
  color: var(--txt, #0f172a);
  letter-spacing: -.01em;
}
.gateway-card__sub {
  font-size: 12px; color: var(--txt-3, #94a3b8);
  margin-top: 2px;
}

/* Custom toggle switch */
.gateway-card__toggle {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  user-select: none;
}
.gateway-card__toggle input[type="checkbox"] {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}
.gateway-card__toggle-track {
  width: 42px; height: 24px;
  background: #cbd5e1;
  border-radius: 999px;
  position: relative;
  transition: background .2s;
  flex-shrink: 0;
}
.gateway-card__toggle-thumb {
  position: absolute;
  top: 2px; left: 2px;
  width: 20px; height: 20px;
  background: #fff;
  border-radius: 50%;
  transition: transform .2s, box-shadow .2s;
  box-shadow: 0 2px 4px rgba(15, 23, 42, .2);
}
.gateway-card__toggle input:checked ~ .gateway-card__toggle-track {
  background: linear-gradient(135deg, #10b981, #059669);
}
.gateway-card__toggle input:checked ~ .gateway-card__toggle-track .gateway-card__toggle-thumb {
  transform: translateX(18px);
  box-shadow: 0 2px 6px rgba(16, 185, 129, .4);
}
.gateway-card__toggle:hover .gateway-card__toggle-track { background: #94a3b8; }
.gateway-card__toggle:hover input:checked ~ .gateway-card__toggle-track {
  background: linear-gradient(135deg, #059669, #047857);
}
.gateway-card__toggle-label {
  font-size: 13px; font-weight: 600;
  color: var(--txt-2, #64748b);
  white-space: nowrap;
}
.gateway-card__toggle input:checked ~ .gateway-card__toggle-label { color: #059669; }

.gateway-card__body {
  padding: 18px 20px;
  display: none;
}
.gateway-card:has(input[type="checkbox"]:checked) .gateway-card__body { display: block; }

.gateway-card__hint {
  margin: 12px 0 0;
  font-size: 12px;
  color: var(--txt-3, #64748b);
  line-height: 1.5;
}
.gateway-card__hint a {
  color: #6366f1;
  text-decoration: none;
  font-weight: 600;
}
.gateway-card__hint a:hover { text-decoration: underline; }

/* Dark theme */
[data-theme="dark"] .gateway-card {
  background: #1e293b;
  border-color: rgba(255, 255, 255, .08);
}
[data-theme="dark"] .gateway-card:hover { border-color: rgba(99, 102, 241, .4); }
[data-theme="dark"] .gateway-card__head {
  background: linear-gradient(135deg, rgba(255, 255, 255, .02), transparent);
  border-color: rgba(255, 255, 255, .05);
}
[data-theme="dark"] .gateway-card__name { color: #f1f5f9; }
[data-theme="dark"] .gateway-card__sub { color: #94a3b8; }
[data-theme="dark"] .gateway-card__toggle-track { background: #475569; }

/* Mobile */
@media (max-width: 640px) {
  .gateway-card__head {
    flex-direction: column; align-items: flex-start; gap: 12px;
  }
  .gateway-card__toggle { align-self: flex-end; }
}

/* UPI verification mode picker — radio cards */
.upi-mode { display: grid; gap: 8px; margin-top: 12px; }
.upi-mode__option {
  display: flex; align-items: flex-start; gap: 10px;
  padding: 10px 12px;
  background: #f8fafc;
  border: 1.5px solid #e2e8f0;
  border-radius: 10px;
  cursor: pointer;
  transition: border-color .15s, background .15s;
}
.upi-mode__option:hover { border-color: #cbd5e1; }
.upi-mode__option.is-active {
  border-color: #6366f1;
  background: rgba(99, 102, 241, .04);
  box-shadow: 0 2px 8px rgba(99, 102, 241, .08);
}
.upi-mode__option input[type="radio"] {
  margin-top: 4px; flex-shrink: 0; accent-color: #6366f1;
  width: 16px; height: 16px;
}
.upi-mode__option strong {
  display: block; font-size: 13px; color: #0f172a;
  margin-bottom: 3px;
}
.upi-mode__option small {
  display: block; font-size: 11.5px; color: #64748b;
  line-height: 1.5;
}
.upi-mode__option small strong { font-size: 11.5px; color: #6366f1; display: inline; margin: 0; }

/* ============================================================
   PAYMENTS DASHBOARD UI — shared between admin/payments and
   user/customer-payments pages. Originally inlined in admin
   view, hoisted here so user dashboard inherits the same look.
   ============================================================ */
.payments-page { display: flex; flex-direction: column; gap: 16px; }

/* Stats */
.pay-stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; }
.pay-stat {
  display: flex; align-items: center; gap: 14px;
  padding: 18px;
  background: #fff;
  border: 1px solid var(--bd, rgba(15,23,42,.08));
  border-radius: 14px;
}
.pay-stat strong { display: block; font-size: 22px; font-weight: 800; color: #0f172a; line-height: 1.1; }
.pay-stat small { display: block; color: #64748b; font-size: 12px; margin-top: 2px; }
.pay-stat__icon {
  width: 44px; height: 44px;
  border-radius: 12px;
  display: grid; place-items: center;
  background: linear-gradient(135deg, #6366f1, #8b5cf6); color: #fff;
}
.pay-stat__icon--warn { background: linear-gradient(135deg, #f59e0b, #ea580c); }
.pay-stat__icon--err { background: linear-gradient(135deg, #ef4444, #dc2626); }
.pay-stat__icon--refund { background: linear-gradient(135deg, #8b5cf6, #6366f1); }
.pay-stat--rev .pay-stat__icon { background: linear-gradient(135deg, #10b981, #059669); }

/* Filters bar */
.pay-filters {
  background: #fff;
  border: 1px solid var(--bd, rgba(15,23,42,.08));
  border-radius: 14px;
  padding: 14px;
  display: grid;
  grid-template-columns: 1fr auto auto;
  gap: 12px; align-items: center;
}
.pay-filters__search {
  position: relative;
  display: flex; align-items: center;
}
.pay-filters__search .material-icons-round {
  position: absolute; left: 14px; top: 50%; transform: translateY(-50%);
  color: #94a3b8; font-size: 20px;
}
.pay-filters__search input {
  width: 100%;
  padding: 10px 14px 10px 42px;
  background: #f8fafc;
  border: 1.5px solid #e2e8f0;
  border-radius: 10px;
  font-size: 14px;
  transition: border-color .15s, background .15s;
}
.pay-filters__search input:focus { outline: 0; border-color: #6366f1; background: #fff; }

.pay-filters__group { display: flex; gap: 8px; flex-wrap: wrap; }
.pay-filter {
  display: flex; flex-direction: column; gap: 4px;
  font-size: 11px;
}
.pay-filter > span {
  font-weight: 600; color: #64748b;
  text-transform: uppercase; letter-spacing: .05em; font-size: 10px;
}
.pay-filter > select, .pay-filter > input {
  padding: 8px 10px;
  background: #fff;
  border: 1.5px solid #e2e8f0;
  border-radius: 8px;
  font-size: 13px;
  font-family: inherit;
}
.pay-filter > select:focus, .pay-filter > input:focus {
  outline: 0; border-color: #6366f1;
}

.pay-filters__actions { display: flex; gap: 8px; align-items: flex-end; }
.pay-export-group { display: flex; gap: 4px; margin-left: 8px; padding-left: 8px; border-left: 1px solid #e2e8f0; }

/* Status pills */
.pay-status-pills { display: flex; gap: 6px; flex-wrap: wrap; }
.pay-pill {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 8px 14px;
  background: #fff;
  border: 1.5px solid #e2e8f0;
  border-radius: 999px;
  font-size: 13px; font-weight: 600;
  color: #64748b;
  text-decoration: none;
  transition: border-color .15s, transform .1s;
}
.pay-pill:hover { transform: translateY(-1px); border-color: #cbd5e1; }
.pay-pill.is-active { background: rgba(99, 102, 241, .05); border-width: 2px; }
.pay-pill__count {
  background: rgba(15, 23, 42, .06);
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 11px; font-weight: 700;
}
.pay-pill.is-active .pay-pill__count { background: currentColor; color: #fff; opacity: .85; }

/* Table */
.pay-table-wrap { padding: 0; overflow: hidden; }
.pay-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.pay-table thead th {
  text-align: left;
  padding: 12px 14px;
  background: #f8fafc;
  border-bottom: 1px solid #e2e8f0;
  font-weight: 700;
  font-size: 11px;
  color: #64748b;
  text-transform: uppercase; letter-spacing: .04em;
  position: sticky; top: 0; z-index: 1;
}
.pay-table tbody td {
  padding: 14px;
  border-bottom: 1px solid rgba(15, 23, 42, .04);
  vertical-align: middle;
}
.pay-table tbody tr:hover { background: rgba(99, 102, 241, .02); }
.pay-id { font-family: ui-monospace, monospace; color: #94a3b8; font-size: 12px; }
.pay-date { display: block; font-weight: 600; }
.pay-time { display: block; color: #94a3b8; font-size: 11px; }
.pay-user { display: block; }
.pay-email { display: block; color: #64748b; font-size: 11px; }
.pay-amount { font-size: 14px; font-weight: 700; color: #0f172a; }
.pay-txn { font-family: ui-monospace, monospace; font-size: 12px; color: #64748b; }

.pay-gateway {
  display: inline-block;
  padding: 3px 10px;
  border-radius: 6px;
  font-size: 10px; font-weight: 700;
  letter-spacing: .04em;
  color: #fff;
  background: #64748b;
}
.pay-gateway--razorpay { background: linear-gradient(135deg, #2D88FF, #1E3FFF); }
.pay-gateway--phonepe { background: linear-gradient(135deg, #5F259F, #4A1A7E); }
.pay-gateway--paytm { background: linear-gradient(135deg, #00BAF2, #002970); }
.pay-gateway--upi { background: linear-gradient(135deg, #FF6B35, #FF9F1C); }

.pay-badge {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 11px; font-weight: 700;
}
.pay-badge .material-icons-round { font-size: 14px; }
.pay-note {
  display: inline-block; margin-left: 6px;
  font-size: 11px; color: #94a3b8;
  cursor: help;
}

.pay-actions { display: inline-flex; gap: 4px; }
.pay-action {
  width: 32px; height: 32px;
  background: transparent;
  border: 1.5px solid #e2e8f0;
  border-radius: 8px;
  cursor: pointer;
  display: grid; place-items: center;
  color: #64748b;
  transition: all .15s;
}
.pay-action:hover { transform: translateY(-1px); }
.pay-action .material-icons-round { font-size: 16px; }
.pay-action--accept:hover { border-color: #10b981; color: #10b981; background: rgba(16, 185, 129, .08); }
.pay-action--reject:hover { border-color: #ef4444; color: #ef4444; background: rgba(239, 68, 68, .08); }
.pay-action--refund:hover { border-color: #8b5cf6; color: #8b5cf6; background: rgba(139, 92, 246, .08); }
.pay-action--view:hover { border-color: #6366f1; color: #6366f1; background: rgba(99, 102, 241, .08); }

/* Empty state */
.pay-empty { padding: 60px 20px; text-align: center; }
.pay-empty .material-icons-round { font-size: 56px; color: #cbd5e1; margin-bottom: 12px; }
.pay-empty h3 { margin: 0 0 6px; color: #0f172a; }
.pay-empty p { margin: 0; color: #64748b; font-size: 14px; }

/* Pagination */
.pay-pagination {
  padding: 14px 20px;
  border-top: 1px solid #e2e8f0;
  display: flex; align-items: center; justify-content: space-between;
  font-size: 13px;
}
.pay-pages { display: flex; align-items: center; gap: 10px; }
.pay-page-btn {
  width: 32px; height: 32px;
  display: grid; place-items: center;
  background: #fff;
  border: 1.5px solid #e2e8f0;
  border-radius: 8px;
  text-decoration: none;
  color: #475569;
  font-weight: 700;
}
.pay-page-btn:hover { border-color: #6366f1; color: #6366f1; }
.pay-page-btn.is-disabled { opacity: .4; pointer-events: none; }

/* Modal (reused from billing) */
.pay-modal { position: fixed; inset: 0; z-index: 9999; display: grid; place-items: center;
  opacity: 0; pointer-events: none; transition: opacity .25s; }
.pay-modal[hidden] { display: none; }
.pay-modal.is-open { opacity: 1; pointer-events: auto; }
.pay-modal__backdrop { position: absolute; inset: 0; background: rgba(15, 23, 42, .55); backdrop-filter: blur(6px); }
.pay-modal__card { position: relative; width: min(480px, calc(100vw - 32px)); background: #fff; border-radius: 18px;
  box-shadow: 0 30px 80px rgba(15, 23, 42, .35);
  transform: translateY(20px) scale(.98); transition: transform .3s cubic-bezier(.34, 1.56, .64, 1); }
.pay-modal.is-open .pay-modal__card { transform: none; }
.pay-modal__head { display: flex; align-items: center; justify-content: space-between; padding: 20px 22px;
  border-bottom: 1px solid rgba(15,23,42,.06); }
.pay-modal__head h3 { margin: 0; font-size: 18px; font-weight: 800; color: #0f172a; }
.pay-modal__close { width: 36px; height: 36px; background: transparent; border: 0; border-radius: 10px;
  cursor: pointer; color: #64748b; display: grid; place-items: center; }
.pay-modal__close:hover { background: rgba(15,23,42,.06); color: #0f172a; }
.pay-modal__body { padding: 18px 22px; }
.pay-modal__body p { margin: 0 0 14px; color: #475569; font-size: 14px; line-height: 1.5; }
.pay-modal__footer { display: flex; justify-content: flex-end; gap: 8px; padding: 16px 22px;
  border-top: 1px solid rgba(15,23,42,.06); }

@media (max-width: 900px) {
  .pay-stats { grid-template-columns: repeat(2, 1fr); }
  .pay-filters { grid-template-columns: 1fr; }
  .pay-filters__group { flex-direction: column; }
  .pay-filters__actions { flex-wrap: wrap; }
  .pay-table-wrap { overflow-x: auto; }
  .pay-table { min-width: 900px; }
}

/* ════════════════════════════════════════════════════════════════════════
   PREMIUM BRAND PALETTE — overrides for the requested color system.
   Primary: #6C63FF  Secondary: #00C2FF  Accent: #FF4D8D
   Success: #22C55E  Warning: #F59E0B
   ═══════════════════════════════════════════════════════════════════════ */
:root {
  --brand-primary:   #6C63FF;
  --brand-secondary: #00C2FF;
  --brand-accent:    #FF4D8D;
  --brand-success:   #22C55E;
  --brand-warning:   #F59E0B;
  --brand-grad:      linear-gradient(135deg, #6C63FF 0%, #00C2FF 100%);
  --brand-grad-2:    linear-gradient(135deg, #FF4D8D 0%, #6C63FF 100%);
  --brand-grad-soft: linear-gradient(135deg, rgba(108,99,255,.08), rgba(0,194,255,.04));
}
[data-theme="light"], :root[data-theme="light"] {
  --bg:           #f7f8ff;
  --bg-2:         #ffffff;
  --bg-3:         #eef0ff;
  --surface:      #ffffff;
  --surface-2:    #fafbff;
  --surface-3:    #f1f3fc;
  --bd:           #e6e8f0;
  --bd-strong:    #cdd1e0;
  --txt:          #0f1024;
  --txt-2:        #4a4d63;
  --txt-3:        #8088a0;
  --accent:       var(--brand-primary);
  --accent-2:     var(--brand-secondary);
  --accent-3:     var(--brand-accent);
  --accent-on:    #ffffff;
  --accent-soft:  rgba(108, 99, 255, .12);
  --warn:         var(--brand-warning);
  --success:      var(--brand-success);
  --shadow-soft:  0 1px 2px rgba(15, 23, 42, .04), 0 4px 14px rgba(15, 23, 42, .04);
  --shadow-pop:   0 18px 40px -12px rgba(108, 99, 255, .24);
  --shadow-glow:  0 0 0 1px var(--accent-soft), 0 8px 32px -8px rgba(108, 99, 255, .35);
}

/* Modern primary buttons across dashboard */
.btn--solid {
  background: var(--brand-grad) !important;
  color: #fff !important;
  border: 0 !important;
  box-shadow: 0 6px 16px -4px rgba(108, 99, 255, .35);
  transition: transform .15s, box-shadow .2s, filter .15s;
}
.btn--solid:hover {
  transform: translateY(-1px);
  box-shadow: 0 10px 24px -6px rgba(108, 99, 255, .5);
  filter: brightness(1.04);
}
.btn--solid:active { transform: translateY(0); }

/* Soft glass card surfaces */
.panel, .pay-stat, .settings-card {
  border-radius: 16px;
  border: 1px solid var(--bd, #e6e8f0);
  background: var(--surface, #ffffff);
  box-shadow: var(--shadow-soft);
}
.pay-stat__icon {
  background: var(--brand-grad) !important;
}
.pay-stat__icon--warn   { background: linear-gradient(135deg, #F59E0B, #F97316) !important; }

/* Active sidebar item — gradient pill */
.sidebar a.is-active, .sidebar .sidenav__link.is-active {
  background: var(--brand-grad) !important;
  color: #fff !important;
  box-shadow: 0 6px 14px -4px rgba(108, 99, 255, .4);
}

/* Modern modal accents */
.modern-btn--primary {
  background: var(--brand-grad) !important;
}
.modern-modal-card__icon--primary {
  background: rgba(108, 99, 255, .14) !important;
  color: var(--brand-primary) !important;
}

/* ════════════════════════════════════════════════════════════════════════
   RESPONSIVE POLISH PASS — applies to all dashboards (admin/client/user)
   Premium typography · consistent spacing · responsive tables/cards/forms
   ═══════════════════════════════════════════════════════════════════════ */

/* Stat cards — fluid grid that always looks balanced */
.pay-stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 14px;
  margin-bottom: 16px;
}
.pay-stat {
  display: flex; gap: 14px; align-items: center;
  padding: 18px 20px;
  background: var(--surface, #fff);
  border: 1px solid var(--bd, #e6e8f0);
  border-radius: 16px;
  box-shadow: 0 1px 0 rgba(15,23,42,.02), 0 4px 16px -4px rgba(15,23,42,.06);
  transition: transform .15s ease, box-shadow .2s ease;
}
.pay-stat:hover {
  transform: translateY(-1px);
  box-shadow: 0 1px 0 rgba(15,23,42,.02), 0 8px 24px -6px rgba(108,99,255,.18);
}
.pay-stat__icon {
  flex-shrink: 0;
  width: 44px; height: 44px;
  border-radius: 12px;
  display: grid; place-items: center;
  color: #fff;
}
.pay-stat__icon .material-icons-round { font-size: 22px; }
.pay-stat strong {
  font-size: 22px;
  font-weight: 800;
  letter-spacing: -.02em;
  display: block;
  color: var(--txt, #0f172a);
}
.pay-stat small {
  font-size: 12px;
  color: var(--txt-2, #64748b);
  display: block;
  margin-top: 2px;
}

/* Tables that don't break on mobile */
@media (max-width: 720px) {
  .pay-table { display: block; }
  .pay-table thead { display: none; }
  .pay-table tbody, .pay-table tr { display: block; }
  .pay-table tr {
    background: var(--surface, #fff);
    border: 1px solid var(--bd, #e6e8f0);
    border-radius: 12px;
    padding: 12px 14px;
    margin-bottom: 10px;
  }
  .pay-table td {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 6px 0;
    border: 0;
  }
  .pay-table td:before {
    content: attr(data-label);
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: .04em;
    color: var(--txt-3, #94a3b8);
    font-weight: 600;
    margin-right: 8px;
  }
}

/* Forms — better input styling site-wide */
.field {
  display: flex; flex-direction: column; gap: 4px;
  font-size: 13px;
}
.field > span:first-child {
  font-weight: 600;
  color: var(--txt, #0f172a);
  font-size: 12.5px;
}
.field input[type=text],
.field input[type=email],
.field input[type=url],
.field input[type=tel],
.field input[type=number],
.field input[type=time],
.field input[type=date],
.field input[type=password],
.field select,
.field textarea {
  width: 100%;
  padding: 10px 12px;
  font-size: 14px;
  border: 1px solid var(--bd, #e6e8f0);
  border-radius: 10px;
  background: var(--surface, #fff);
  color: var(--txt, #0f172a);
  transition: border-color .15s, box-shadow .15s;
  font-family: inherit;
}
.field input:focus,
.field select:focus,
.field textarea:focus {
  outline: none;
  border-color: var(--brand-primary, #6C63FF);
  box-shadow: 0 0 0 3px rgba(108, 99, 255, .14);
}
.field small {
  font-size: 11.5px;
  color: var(--txt-3, #94a3b8);
}

/* Filter bar — wraps cleanly on mobile */
.pay-filters {
  display: flex; flex-wrap: wrap; gap: 10px;
  margin-bottom: 14px;
  padding: 14px;
  background: var(--surface, #fff);
  border: 1px solid var(--bd, #e6e8f0);
  border-radius: 14px;
}
.pay-filters__search {
  position: relative; flex: 1; min-width: 220px;
}
.pay-filters__search input {
  width: 100%;
  padding: 10px 12px 10px 36px;
  border: 1px solid var(--bd, #e6e8f0);
  border-radius: 10px;
  font-size: 14px;
}
.pay-filters__search .material-icons-round {
  position: absolute; top: 50%; left: 10px;
  transform: translateY(-50%);
  color: var(--txt-3, #94a3b8);
  font-size: 18px;
}
.pay-filters__group {
  display: flex; flex-wrap: wrap; gap: 10px;
}
.pay-filter {
  display: flex; flex-direction: column; gap: 3px;
}
.pay-filter > span:first-child {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: .04em;
  color: var(--txt-3, #94a3b8);
  font-weight: 600;
}
.pay-filter select, .pay-filter input {
  padding: 8px 10px;
  font-size: 13px;
  border: 1px solid var(--bd, #e6e8f0);
  border-radius: 8px;
  background: var(--surface, #fff);
}
.pay-filters__actions {
  display: flex; gap: 8px; flex-wrap: wrap;
  align-items: flex-end;
  margin-left: auto;
}

/* Buttons — consistent across all dashboards */
.btn {
  display: inline-flex;
  align-items: center; justify-content: center;
  gap: 6px;
  padding: 10px 16px;
  font-size: 13px;
  font-weight: 600;
  border: 1px solid var(--bd, #e6e8f0);
  border-radius: 10px;
  background: var(--surface, #fff);
  color: var(--txt, #0f172a);
  cursor: pointer;
  text-decoration: none;
  transition: transform .12s, background .15s, box-shadow .2s;
  font-family: inherit;
  white-space: nowrap;
}
.btn:hover { background: var(--surface-2, #fafbff); }
.btn:active { transform: translateY(1px); }
.btn .material-icons-round { font-size: 16px; }
.btn--ghost { background: transparent; }

/* Empty states */
.pay-empty {
  text-align: center;
  padding: 48px 24px;
  background: var(--surface, #fff);
  border: 1px dashed var(--bd, #e6e8f0);
  border-radius: 16px;
}
.pay-empty .material-icons-round {
  font-size: 56px;
  color: var(--txt-3, #94a3b8);
  margin-bottom: 12px;
  opacity: .6;
}
.pay-empty h3 {
  font-size: 17px;
  font-weight: 700;
  margin: 0 0 6px;
  color: var(--txt, #0f172a);
}
.pay-empty p {
  font-size: 14px;
  color: var(--txt-2, #64748b);
  max-width: 420px;
  margin: 0 auto 18px;
  line-height: 1.55;
}

/* Pills (status indicators) */
.pay-status-pills {
  display: flex; gap: 6px; flex-wrap: wrap;
  margin-bottom: 14px;
}
.pay-pill {
  padding: 7px 14px;
  font-size: 12px;
  font-weight: 600;
  background: var(--surface-2, #fafbff);
  border: 1px solid var(--bd, #e6e8f0);
  border-radius: 999px;
  color: var(--txt-2, #64748b);
  text-decoration: none;
  transition: all .15s;
}
.pay-pill:hover { background: var(--surface-3, #f1f3fc); }
.pay-pill.is-active {
  background: var(--brand-grad, linear-gradient(135deg, #6C63FF, #00C2FF));
  color: #fff;
  border-color: transparent;
  box-shadow: 0 2px 8px -2px rgba(108, 99, 255, .35);
}

/* Pricing / plan cards — equal-height responsive grid */
.pricing-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 18px;
  align-items: stretch;
}
.pricing-card {
  display: flex; flex-direction: column;
  padding: 28px 24px;
  background: var(--surface, #fff);
  border: 1px solid var(--bd, #e6e8f0);
  border-radius: 18px;
  transition: transform .2s, box-shadow .25s, border-color .15s;
}
.pricing-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 12px 32px -8px rgba(108, 99, 255, .25);
  border-color: rgba(108, 99, 255, .3);
}
.pricing-card.is-featured {
  border-color: var(--brand-primary, #6C63FF);
  background: linear-gradient(180deg, rgba(108, 99, 255, .04), transparent);
  box-shadow: 0 12px 32px -8px rgba(108, 99, 255, .25);
  position: relative;
}
.pricing-card.is-featured::before {
  content: 'Most popular';
  position: absolute; top: -12px; left: 50%;
  transform: translateX(-50%);
  background: var(--brand-grad, linear-gradient(135deg, #6C63FF, #00C2FF));
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  padding: 4px 12px;
  border-radius: 999px;
  letter-spacing: .03em;
}
.pricing-card__price {
  font-size: 32px;
  font-weight: 800;
  letter-spacing: -.02em;
  margin: 14px 0 4px;
}
.pricing-card ul {
  list-style: none;
  padding: 0; margin: 18px 0;
  flex: 1;
}
.pricing-card ul li {
  padding: 8px 0;
  font-size: 13.5px;
  color: var(--txt-2, #64748b);
  display: flex; gap: 8px; align-items: flex-start;
}
.pricing-card ul li::before {
  content: '✓';
  color: var(--brand-success, #22C55E);
  font-weight: 700;
  flex-shrink: 0;
}

/* Sidenav: responsive collapse on narrow viewports */
@media (max-width: 900px) {
  .pay-filters { padding: 10px; }
  .pay-filters__group, .pay-filter { width: 100%; }
  .pay-filters__actions { width: 100%; margin-left: 0; }
  .pay-filters__actions .btn { flex: 1; min-width: 0; }
}

/* Modal — better mobile sizing */
@media (max-width: 480px) {
  .modern-modal-card { width: calc(100% - 24px) !important; max-width: 100% !important; }
}

/* Smooth scroll site-wide */
html { scroll-behavior: smooth; }

/* Better focus rings — accessibility + premium feel */
button:focus-visible, a:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible {
  outline: 2px solid var(--brand-primary, #6C63FF);
  outline-offset: 2px;
}

/* Premium typography */
body, .dashboard {
  font-feature-settings: 'cv01', 'cv02', 'cv11';
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

/* Heading rhythm */
h1, h2, h3 {
  letter-spacing: -.02em;
  font-weight: 700;
  line-height: 1.2;
}
h1 { font-size: clamp(22px, 2.5vw, 28px); }
h2 { font-size: clamp(18px, 2vw, 22px); }
h3 { font-size: clamp(15px, 1.5vw, 17px); }

/* ════════════════════════════════════════════════════════════════════════
   PREMIUM DASHBOARD SHELL — responsive layout, polished sidebar + topbar.
   Applies to all dashboards (admin/client/user) without changing PHP files.
   ═══════════════════════════════════════════════════════════════════════ */

/* Mobile-first hamburger button */
.sidebar-toggle {
  display: none;
  position: fixed;
  top: 14px; left: 14px;
  z-index: 100;
  width: 42px; height: 42px;
  background: var(--surface, #fff);
  border: 1px solid var(--bd, #e6e8f0);
  border-radius: 12px;
  cursor: pointer;
  align-items: center; justify-content: center;
  box-shadow: 0 4px 14px -4px rgba(15, 23, 42, .12);
  transition: transform .15s, background .15s;
}
.sidebar-toggle:hover  { background: var(--surface-2, #fafbff); }
.sidebar-toggle:active { transform: scale(.95); }
.sidebar-toggle .material-icons-round { font-size: 22px; color: var(--txt, #0f172a); }

/* Backdrop only shows on mobile when sidebar is open */
.sidebar-backdrop {
  display: none;
  position: fixed; inset: 0;
  background: rgba(15, 23, 42, .55);
  backdrop-filter: blur(4px);
  z-index: 99;
  opacity: 0;
  pointer-events: none;
  transition: opacity .25s;
}
body.sidebar-open .sidebar-backdrop {
  display: block;
  opacity: 1;
  pointer-events: auto;
}

/* Premium sidebar styling — applies always */
.sidebar {
  position: relative;
  background: var(--surface, #fff);
  border-right: 1px solid var(--bd, #e6e8f0);
  box-shadow: 0 0 24px -8px rgba(15, 23, 42, .04);
}
.sidebar__brand {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 22px 22px 14px;
  font-size: 18px;
  font-weight: 800;
  letter-spacing: -.02em;
  color: var(--txt, #0f172a);
  text-decoration: none;
}
.sidebar__brand .material-icons-round {
  font-size: 26px;
  color: var(--brand-primary, #6C63FF);
  background: linear-gradient(135deg, #6C63FF, #00C2FF);
  -webkit-background-clip: text;
          background-clip: text;
  -webkit-text-fill-color: transparent;
}
.sidebar__role-pill {
  display: inline-block;
  margin: 0 22px 16px;
  padding: 4px 12px;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--brand-primary, #6C63FF);
  background: rgba(108, 99, 255, .1);
  border-radius: 999px;
  border: 1px solid rgba(108, 99, 255, .2);
}
.sidebar__nav {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 0 12px;
  flex: 1;
  overflow-y: auto;
}
.sidebar__link, .sidebar__nav a {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 11px 14px;
  margin: 0;
  font-size: 13.5px;
  font-weight: 600;
  color: var(--txt-2, #64748b);
  text-decoration: none;
  border-radius: 10px;
  transition: background .15s, color .15s, transform .12s;
  border: 0;
  background: transparent;
  cursor: pointer;
  font-family: inherit;
  width: 100%;
  text-align: left;
}
.sidebar__link .material-icons-round, .sidebar__nav a .material-icons-round {
  font-size: 19px;
  color: inherit;
}
.sidebar__link:hover, .sidebar__nav a:hover {
  background: var(--surface-2, #fafbff);
  color: var(--txt, #0f172a);
}
.sidebar__link.is-active, .sidebar__nav a.is-active {
  background: var(--brand-grad, linear-gradient(135deg, #6C63FF, #00C2FF)) !important;
  color: #fff !important;
  box-shadow: 0 6px 14px -4px rgba(108, 99, 255, .4);
}
.sidebar__link.is-active .material-icons-round,
.sidebar__nav a.is-active .material-icons-round {
  color: #fff;
}
.sidebar__logout {
  margin-top: auto;
  padding: 14px 12px;
  border-top: 1px solid var(--bd-soft, rgba(15, 23, 42, .06));
}
.sidebar__link--ghost { color: var(--txt-3, #94a3b8); }
.sidebar__link--ghost:hover { color: #ef4444; background: rgba(239, 68, 68, .06); }

/* Premium topbar */
.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 24px;
  background: var(--surface, #fff);
  border-bottom: 1px solid var(--bd, #e6e8f0);
  position: sticky;
  top: 0;
  z-index: 50;
  backdrop-filter: saturate(180%) blur(8px);
}
.topbar__title h1 {
  font-size: 22px;
  font-weight: 800;
  letter-spacing: -.02em;
  margin: 0;
  color: var(--txt, #0f172a);
}
.topbar__user {
  display: flex; align-items: center; gap: 10px;
  padding: 6px 12px 6px 6px;
  background: var(--surface-2, #fafbff);
  border-radius: 999px;
  border: 1px solid var(--bd-soft, rgba(15, 23, 42, .04));
}
.topbar__user__avatar, .topbar__avatar {
  width: 32px; height: 32px;
  border-radius: 50%;
  background: var(--brand-grad, linear-gradient(135deg, #6C63FF, #FF4D8D));
  color: #fff;
  display: grid; place-items: center;
  font-weight: 700;
  font-size: 13px;
  flex-shrink: 0;
}

/* Main content area */
.main {
  background: var(--bg, #f7f8ff);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}
.main > main, .main__content {
  padding: 22px 24px 40px;
  flex: 1;
}

/* ── DESKTOP / TABLET (>= 900px) ── */
@media (min-width: 900px) {
  .app-shell {
    display: grid;
    grid-template-columns: 256px 1fr;
    min-height: 100vh;
  }
  .sidebar {
    display: flex;
    flex-direction: column;
    height: 100vh;
    position: sticky;
    top: 0;
  }
  .sidebar-toggle, .sidebar-backdrop { display: none !important; }
}

/* ── MOBILE (<= 899px) ── */
@media (max-width: 899px) {
  .app-shell {
    display: block;
  }
  .sidebar-toggle {
    display: flex;
  }
  .sidebar {
    position: fixed;
    top: 0; left: 0; bottom: 0;
    width: 280px;
    z-index: 100;
    transform: translateX(-100%);
    transition: transform .3s cubic-bezier(.4, 0, .2, 1);
    box-shadow: 0 0 40px rgba(15, 23, 42, .25);
    display: flex;
    flex-direction: column;
  }
  .sidebar.is-open {
    transform: translateX(0);
  }
  .topbar {
    padding-left: 70px;  /* leave room for hamburger */
  }
  .topbar__title h1 {
    font-size: 18px;
  }
  .main > main, .main__content {
    padding: 16px 14px 28px;
  }
}

/* ── SMALL MOBILE (<= 480px) ── */
@media (max-width: 480px) {
  .topbar { padding: 12px 16px 12px 64px; }
  .topbar__user span:not(.material-icons-round) { display: none; }
  .topbar__user { padding: 4px; gap: 0; }

  /* Stat card stacking */
  .pay-stats { grid-template-columns: 1fr 1fr !important; gap: 10px; }
  .pay-stat { padding: 14px; }
  .pay-stat__icon { width: 36px; height: 36px; }
  .pay-stat strong { font-size: 18px; }
}

/* ════════════════════════════════════════════════════════════════════════
   PRICING PLAN CARDS — equal heights, mobile stacks, featured tier
   ═══════════════════════════════════════════════════════════════════════ */

/* Active plan banner */
.panel.panel--plan {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 24px;
  margin-bottom: 16px;
  background: linear-gradient(135deg, rgba(108, 99, 255, .06), rgba(0, 194, 255, .03));
  border: 1px solid rgba(108, 99, 255, .2);
  border-radius: 16px;
  flex-wrap: wrap;
  gap: 14px;
}
.panel--plan .kicker {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--brand-primary, #6C63FF);
  margin-bottom: 6px;
}
.panel--plan .kicker .material-icons-round { font-size: 16px; }
.panel--plan h2 {
  font-size: 22px;
  font-weight: 800;
  letter-spacing: -.02em;
  margin: 0 0 4px;
  color: var(--txt, #0f172a);
}
.panel--plan .muted {
  font-size: 13px;
  color: var(--txt-2, #64748b);
  margin: 0;
}
.panel--plan strong {
  color: var(--txt, #0f172a);
  display: block;
}

/* Pricing cards grid */
.plans-strip__grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 18px;
  align-items: stretch;
  padding: 4px;          /* breathing room for hover transforms */
}

.plan {
  display: flex;
  flex-direction: column;
  padding: 28px 24px;
  background: var(--surface, #fff);
  border: 1px solid var(--bd, #e6e8f0);
  border-radius: 18px;
  position: relative;
  transition: transform .2s, box-shadow .25s, border-color .15s;
  height: 100%;
  min-height: 360px;
}
.plan:hover {
  transform: translateY(-3px);
  box-shadow: 0 16px 40px -10px rgba(108, 99, 255, .25);
  border-color: rgba(108, 99, 255, .3);
}

.plan > header {
  margin-bottom: 18px;
  padding-bottom: 18px;
  border-bottom: 1px solid var(--bd-soft, rgba(15, 23, 42, .06));
}
.plan h3 {
  font-size: 18px;
  font-weight: 800;
  letter-spacing: -.02em;
  margin: 0 0 8px;
  color: var(--txt, #0f172a);
}
.plan__price {
  display: flex;
  align-items: baseline;
  gap: 4px;
  margin-top: 6px;
}
.plan__cur {
  font-size: 14px;
  font-weight: 600;
  color: var(--txt-3, #94a3b8);
  margin-right: 2px;
}
.plan__amt {
  font-size: 36px;
  font-weight: 800;
  letter-spacing: -.03em;
  color: var(--txt, #0f172a);
  line-height: 1;
}
.plan__per {
  font-size: 13px;
  color: var(--txt-2, #64748b);
  margin-left: 4px;
}

.plan ul {
  list-style: none;
  padding: 0;
  margin: 0 0 22px;
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.plan ul li {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-size: 13.5px;
  color: var(--txt-2, #475569);
  line-height: 1.5;
}
.plan ul li .material-icons-round {
  font-size: 18px;
  color: var(--brand-success, #22C55E);
  flex-shrink: 0;
  margin-top: 1px;
  background: rgba(34, 197, 94, .1);
  border-radius: 50%;
  padding: 2px;
  width: 22px; height: 22px;
  display: grid;
  place-items: center;
}

.plan .btn--block {
  width: 100%;
  padding: 12px 16px;
  font-size: 14px;
  font-weight: 700;
  margin-top: auto;
}
.plan .inline-form { width: 100%; }

/* Current plan — highlighted */
.plan--current {
  border-color: var(--brand-primary, #6C63FF);
  background: linear-gradient(180deg, rgba(108, 99, 255, .04) 0%, transparent 60%);
  box-shadow: 0 12px 32px -8px rgba(108, 99, 255, .25);
}
.plan--current::before {
  content: 'Current plan';
  position: absolute; top: -10px; left: 50%;
  transform: translateX(-50%);
  background: var(--brand-grad, linear-gradient(135deg, #6C63FF, #00C2FF));
  color: #fff;
  font-size: 10px;
  font-weight: 800;
  padding: 5px 14px;
  border-radius: 999px;
  letter-spacing: .08em;
  text-transform: uppercase;
}
.plan--current .btn--ghost {
  background: rgba(108, 99, 255, .1);
  color: var(--brand-primary, #6C63FF);
  border-color: rgba(108, 99, 255, .25);
}

/* Mobile */
@media (max-width: 600px) {
  .plans-strip__grid { grid-template-columns: 1fr; gap: 12px; }
  .plan { min-height: 0; padding: 22px 20px; }
  .plan__amt { font-size: 30px; }
}

/* Panel base — used everywhere */
.panel {
  background: var(--surface, #fff);
  border: 1px solid var(--bd, #e6e8f0);
  border-radius: 16px;
  margin-bottom: 16px;
  overflow: hidden;
}
.panel__head {
  padding: 18px 20px;
  border-bottom: 1px solid var(--bd-soft, rgba(15, 23, 42, .06));
}
.panel__head h2 {
  margin: 0 0 2px;
  font-size: 17px;
  font-weight: 800;
  letter-spacing: -.01em;
}
.panel__head .muted, .panel__head p {
  margin: 0;
  font-size: 13px;
  color: var(--txt-2, #64748b);
}
.panel:not(.panel--plan) > div:not(.panel__head):not(.plans-strip__grid):not(.bh-empty) {
  padding: 18px 20px;
}
.panel > .plans-strip__grid {
  padding: 18px 20px;
}

/* Alert banners */
.alert {
  display: flex; gap: 10px; align-items: flex-start;
  padding: 14px 18px;
  margin-bottom: 14px;
  background: var(--surface, #fff);
  border: 1px solid var(--bd, #e6e8f0);
  border-radius: 12px;
  font-size: 13px;
  color: var(--txt-2, #64748b);
  line-height: 1.5;
}
.alert .material-icons-round { font-size: 20px; flex-shrink: 0; }
.alert--warn {
  background: linear-gradient(135deg, rgba(245, 158, 11, .06), rgba(245, 158, 11, .02));
  border-color: rgba(245, 158, 11, .3);
  color: #92400e;
}
.alert--warn .material-icons-round { color: var(--brand-warning, #F59E0B); }
.alert--info {
  background: linear-gradient(135deg, rgba(108, 99, 255, .06), rgba(108, 99, 255, .02));
  border-color: rgba(108, 99, 255, .3);
}
.alert--info .material-icons-round { color: var(--brand-primary, #6C63FF); }

/* Block buttons */
.btn--block { width: 100%; }

/* Cards-list grid (My Cards page) */
.cards-list, .cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 16px;
}
@media (max-width: 600px) {
  .cards-list, .cards-grid { grid-template-columns: 1fr; }
}

/* ════════════════════════════════════════════════════════════════════════
   PLAN EXPIRY — toast (3-day reminder) and modal (already styled).
   ═══════════════════════════════════════════════════════════════════════ */
.expiry-toast {
  position: fixed;
  right: 20px;
  bottom: 20px;
  z-index: 1000;
  width: min(360px, calc(100vw - 40px));
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 12px;
  padding: 16px 18px;
  background: var(--surface, #fff);
  border: 1px solid var(--bd, #e6e8f0);
  border-radius: 14px;
  box-shadow: 0 24px 60px -12px rgba(15, 23, 42, .25);
  transform: translateY(120%);
  opacity: 0;
  transition: transform .35s cubic-bezier(.4, 0, .2, 1), opacity .25s;
}
.expiry-toast.is-shown { transform: translateY(0); opacity: 1; }
.expiry-toast__icon {
  width: 38px; height: 38px;
  background: linear-gradient(135deg, #F59E0B, #EF4444);
  border-radius: 10px;
  display: grid; place-items: center;
  color: #fff;
  flex-shrink: 0;
}
.expiry-toast__icon .material-icons-round { font-size: 20px; }
.expiry-toast__body strong {
  display: block;
  font-size: 14px;
  font-weight: 800;
  margin-bottom: 4px;
  color: var(--txt, #0f172a);
}
.expiry-toast__body p {
  margin: 0 0 8px;
  font-size: 12.5px;
  color: var(--txt-2, #64748b);
  line-height: 1.5;
}
.expiry-toast__btn {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 6px 12px;
  background: var(--brand-grad, linear-gradient(135deg, #6C63FF, #00C2FF));
  color: #fff !important;
  border-radius: 8px;
  font-size: 12px;
  font-weight: 700;
  text-decoration: none;
  transition: filter .15s, transform .12s;
}
.expiry-toast__btn:hover { filter: brightness(1.05); }
.expiry-toast__btn:active { transform: translateY(1px); }
.expiry-toast__close {
  width: 26px; height: 26px;
  background: transparent;
  border: 0;
  cursor: pointer;
  border-radius: 6px;
  display: grid; place-items: center;
  color: var(--txt-3, #94a3b8);
  flex-shrink: 0;
  transition: background .15s, color .15s;
}
.expiry-toast__close:hover { background: var(--surface-2, #f1f5f9); color: var(--txt, #0f172a); }
.expiry-toast__close .material-icons-round { font-size: 18px; }

@media (max-width: 480px) {
  .expiry-toast { right: 10px; bottom: 10px; padding: 14px; }
}

/* ════════════════════════════════════════════════════════════════════════
   ADMIN USER EDIT MODAL
   ═══════════════════════════════════════════════════════════════════════ */
.user-edit-overlay {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, .55);
  backdrop-filter: blur(4px);
  z-index: 999;
  display: grid;
  place-items: center;
  padding: 20px;
  opacity: 0;
  transition: opacity .25s;
}
.user-edit-overlay.is-open { opacity: 1; }
.user-edit-overlay[hidden] { display: none; }

.user-edit-modal {
  background: var(--surface, #fff);
  border-radius: 18px;
  width: min(520px, 100%);
  max-height: 90vh;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  box-shadow: 0 32px 80px -12px rgba(15, 23, 42, .35);
  transform: scale(.95);
  transition: transform .25s cubic-bezier(.4, 0, .2, 1);
}
.user-edit-overlay.is-open .user-edit-modal { transform: scale(1); }
.user-edit-modal__head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 18px 22px;
  border-bottom: 1px solid var(--bd, #e6e8f0);
}
.user-edit-modal__head h3 {
  margin: 0;
  font-size: 17px;
  font-weight: 800;
  letter-spacing: -.01em;
}
.user-edit-modal__close {
  width: 32px; height: 32px;
  background: transparent;
  border: 0;
  border-radius: 8px;
  cursor: pointer;
  color: var(--txt-3, #94a3b8);
  display: grid; place-items: center;
  transition: background .15s, color .15s;
}
.user-edit-modal__close:hover { background: var(--surface-2, #f1f5f9); color: var(--txt, #0f172a); }
.user-edit-modal__body {
  padding: 22px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.user-edit-modal__foot {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  padding: 16px 22px;
  border-top: 1px solid var(--bd, #e6e8f0);
  background: var(--surface-2, #fafbff);
}

/* ════════════════════════════════════════════════════════════════════════
   ADMIN PLAN FEATURE TOGGLES
   ═══════════════════════════════════════════════════════════════════════ */
.plan-toggles {
  margin: 16px 0;
  padding: 16px;
  background: var(--surface-2, #fafbff);
  border: 1px solid var(--bd, #e6e8f0);
  border-radius: 14px;
}
.plan-toggles__head {
  margin-bottom: 14px;
  padding-bottom: 12px;
  border-bottom: 1px dashed var(--bd, #e6e8f0);
}
.plan-toggles__head strong {
  display: block;
  font-size: 14px;
  font-weight: 800;
  margin-bottom: 4px;
  color: var(--txt, #0f172a);
}
.plan-toggles__head small {
  font-size: 12px;
  color: var(--txt-2, #64748b);
}
.plan-toggles__group {
  border: 0;
  padding: 12px 0;
  margin: 0;
}
.plan-toggles__group + .plan-toggles__group {
  border-top: 1px solid var(--bd-soft, rgba(15, 23, 42, .04));
}
.plan-toggles__group legend {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .08em;
  color: var(--brand-primary, #6C63FF);
  padding: 0 0 8px;
}
.plan-toggles__grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 6px;
}
@media (min-width: 1100px) {
  .plan-toggles__grid { grid-template-columns: 1fr 1fr; }
}
.plan-toggle {
  display: flex;
  gap: 10px;
  align-items: center;
  padding: 9px 12px;
  background: var(--surface, #fff);
  border: 1px solid var(--bd-soft, rgba(15, 23, 42, .04));
  border-radius: 8px;
  font-size: 13px;
  cursor: pointer;
  transition: background .15s, border-color .15s;
  min-width: 0;
}
.plan-toggle:hover { background: var(--surface-2, #fafbff); border-color: var(--bd, #e6e8f0); }
.plan-toggle input {
  flex-shrink: 0;
  width: 16px; height: 16px;
  margin: 0;
  accent-color: var(--brand-primary, #6C63FF);
}
.plan-toggle:has(input:checked) {
  background: rgba(108, 99, 255, .06);
  border-color: rgba(108, 99, 255, .25);
}
.plan-toggle span {
  flex: 1;
  min-width: 0;
  line-height: 1.35;
  color: var(--txt-2, #475569);
  overflow: hidden;
  text-overflow: ellipsis;
}
.plan-toggle:has(input:checked) span { color: var(--txt, #0f172a); font-weight: 600; }

/* ════════════════════════════════════════════════════════════════════════
   ACTION BUTTONS (used in admin tables — view/edit/delete inline)
   ═══════════════════════════════════════════════════════════════════════ */
.pay-actions {
  display: inline-flex;
  gap: 4px;
  align-items: center;
}
.pay-action {
  width: 32px; height: 32px;
  display: grid;
  place-items: center;
  border: 1px solid var(--bd, #e6e8f0);
  background: var(--surface, #fff);
  color: var(--txt-2, #64748b);
  border-radius: 8px;
  cursor: pointer;
  text-decoration: none;
  transition: all .15s;
}
.pay-action:hover {
  background: var(--surface-2, #fafbff);
  color: var(--brand-primary, #6C63FF);
  border-color: rgba(108, 99, 255, .3);
}
.pay-action .material-icons-round { font-size: 18px; }
.pay-action--reject:hover {
  background: #fee2e2;
  color: #b91c1c;
  border-color: #fca5a5;
}
.pay-action--confirm:hover {
  background: #dcfce7;
  color: #15803d;
  border-color: #86efac;
}

/* Admin plan grid — single column on narrower screens for legible toggle panels */
.tpl-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 14px;
  padding: 18px 20px;
}
@media (min-width: 1100px) {
  .tpl-grid { grid-template-columns: 1fr 1fr; }
}
.plan-card {
  background: var(--surface, #fff);
  border: 1px solid var(--bd, #e6e8f0);
  border-radius: 14px;
  padding: 18px 20px;
  transition: border-color .15s;
}
.plan-card:hover { border-color: rgba(108, 99, 255, .25); }
.plan-card h3 { margin: 0 0 4px; font-size: 16px; font-weight: 800; }
.plan-card__price { margin: 4px 0 12px; font-size: 14px; color: var(--txt-2, #64748b); }
.plan-card details { margin-top: 10px; }
.plan-card summary {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 14px;
  font-size: 12px;
  font-weight: 600;
  background: var(--surface-2, #fafbff);
  border: 1px solid var(--bd, #e6e8f0);
  border-radius: 8px;
  cursor: pointer;
  list-style: none;
  transition: background .15s;
}
.plan-card summary:hover { background: var(--surface-3, #f1f3fc); }
.plan-card details[open] summary {
  background: rgba(108, 99, 255, .08);
  border-color: rgba(108, 99, 255, .25);
  color: var(--brand-primary, #6C63FF);
}

/* Form rows for admin */
.form__row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-bottom: 10px;
}
@media (max-width: 600px) {
  .form__row { grid-template-columns: 1fr; }
}
.form__row .field { margin: 0; }
.form-collapse summary {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  cursor: pointer;
  list-style: none;
}
.form-collapse summary::-webkit-details-marker { display: none; }
.inline-form { display: inline-flex; align-items: center; gap: 8px; }

/* ════════════════════════════════════════════════════════════════════════
   ADMIN PAYMENTS — UPI txn ID display with copy + verify hint
   ═══════════════════════════════════════════════════════════════════════ */
.pay-txn-cell {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.pay-txn-code {
  background: #f1f5f9;
  padding: 4px 8px;
  border-radius: 6px;
  font-family: ui-monospace, "SF Mono", Menlo, monospace;
  font-size: 12px;
  font-weight: 600;
  color: var(--txt, #0f172a);
  user-select: all;
  cursor: text;
  letter-spacing: .02em;
}
.pay-txn-copy {
  width: 26px; height: 26px;
  background: transparent;
  border: 1px solid var(--bd, #e6e8f0);
  border-radius: 6px;
  cursor: pointer;
  display: grid;
  place-items: center;
  color: var(--txt-3, #94a3b8);
  transition: all .15s;
  flex-shrink: 0;
}
.pay-txn-copy:hover {
  background: rgba(108, 99, 255, .08);
  border-color: rgba(108, 99, 255, .3);
  color: var(--brand-primary, #6C63FF);
}
.pay-txn-copy.is-copied {
  background: #dcfce7;
  border-color: #86efac;
  color: #15803d;
}
.pay-txn-copy .material-icons-round { font-size: 14px; }
.pay-txn-hint {
  display: block;
  margin-top: 4px;
  font-size: 11px;
  color: #b45309;
  font-style: italic;
}

/* UPI policy banner — shown in admin settings under the UPI gateway card */
.upi-mode--locked {
  margin: 12px 0;
}
.upi-mode--locked .upi-mode__option {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  padding: 14px 16px;
  background: linear-gradient(135deg, rgba(108, 99, 255, .06), rgba(34, 197, 94, .03));
  border: 1px solid rgba(108, 99, 255, .25);
  border-radius: 12px;
  cursor: default;
}
.upi-mode--locked .upi-mode__option strong {
  display: block;
  font-size: 14px;
  font-weight: 700;
  color: var(--brand-primary, #6C63FF);
  margin-bottom: 4px;
}
.upi-mode--locked .upi-mode__option small {
  font-size: 13px;
  line-height: 1.55;
  color: var(--txt-2, #475569);
}
