/* ==========================================================================
   Veriss Payments — Design System
   Brand: navy #123A5D + teal #117984 (from the Veriss logo)
   Loaded on every page together with /assets/js/config/tailwind.js
   ========================================================================== */

@import url("https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800&display=swap");

:root {
  /* Brand teal (primary) */
  --primary-50: #effafa;
  --primary-100: #d4f1f2;
  --primary-200: #aee3e6;
  --primary-300: #77cdd3;
  --primary-400: #3faeb7;
  --primary-500: #22929d;
  --primary-600: #127a85;
  --primary-700: #11636d;
  --primary-800: #13505a;
  --primary-900: #14434b;

  /* Brand navy */
  --navy-50: #f3f6fa;
  --navy-100: #e4ebf3;
  --navy-200: #c6d4e5;
  --navy-300: #97b2cf;
  --navy-500: #3f6c99;
  --navy-700: #264567;
  --navy-800: #1c3a5a;
  --navy-900: #142c46;
  --navy-950: #0b1b2e;

  /* Neutrals (cool slate) */
  --neutral-0: #ffffff;
  --neutral-50: #f7f9fb;
  --neutral-100: #f0f3f6;
  --neutral-200: #e3e8ee;
  --neutral-300: #cdd5df;
  --neutral-400: #98a2b3;
  --neutral-500: #667085;
  --neutral-600: #475467;
  --neutral-700: #344054;
  --neutral-800: #1d2939;
  --neutral-900: #101828;

  /* Semantic */
  --success-50: #ecfdf3;
  --success-100: #d1fadf;
  --success-200: #a6f4c5;
  --success-500: #12b76a;
  --success-600: #039855;
  --success-700: #027a48;
  --success-800: #05603a;

  --error-50: #fef3f2;
  --error-100: #fee4e2;
  --error-200: #fecdca;
  --error-500: #f04438;
  --error-600: #d92d20;
  --error-700: #b42318;
  --error-800: #912018;

  --warning-50: #fffaeb;
  --warning-100: #fef0c7;
  --warning-500: #f79009;
  --warning-600: #dc6803;
  --warning-700: #b54708;

  /* Elevation */
  --shadow-xs: 0 1px 2px rgba(16, 24, 40, 0.05);
  --shadow-sm: 0 1px 2px rgba(16, 24, 40, 0.04), 0 1px 3px rgba(16, 24, 40, 0.07);
  --shadow-md: 0 4px 8px -2px rgba(16, 24, 40, 0.08), 0 2px 4px -2px rgba(16, 24, 40, 0.05);
  --shadow-lg: 0 12px 16px -4px rgba(16, 24, 40, 0.08), 0 4px 6px -2px rgba(16, 24, 40, 0.03);
  --shadow-xl: 0 20px 24px -4px rgba(16, 24, 40, 0.09), 0 8px 8px -4px rgba(16, 24, 40, 0.04);
  --shadow-2xl: 0 24px 48px -12px rgba(16, 24, 40, 0.2);
  --ring: 0 0 0 4px rgba(18, 122, 133, 0.14);

  /* Radius */
  --radius-sm: 6px;
  --radius: 8px;
  --radius-md: 10px;
  --radius-lg: 14px;
  --radius-xl: 20px;

  /* Theme surfaces */
  --surface: #ffffff;
  --header-bg: rgba(255, 255, 255, 0.88);
  --overlay-bg: rgba(247, 249, 251, 0.92);
  --brand-ink: var(--navy-900);

  /* Tailwind slate palette (RGB triplets, consumed by /assets/js/config/tailwind.js) */
  --slate-50: 248 250 252;
  --slate-100: 241 245 249;
  --slate-200: 226 232 240;
  --slate-300: 203 213 225;
  --slate-400: 148 163 184;
  --slate-500: 100 116 139;
  --slate-600: 71 85 105;
  --slate-700: 51 65 85;
  --slate-800: 30 41 59;
  --slate-900: 15 23 42;

  --sidebar-w: 264px;
  --header-h: 68px;
}

/* ---------- Dark theme ----------
   Applied when <html data-theme="dark"> (set by /assets/js/theme.js).
   Components read the variables above, so most of the work is redefining them here. */
[data-theme="dark"] {
  color-scheme: dark;

  --surface: #111a2b;
  --header-bg: rgba(17, 26, 43, 0.86);
  --overlay-bg: rgba(11, 18, 32, 0.9);
  --brand-ink: #ffffff;

  --neutral-50: #0c1422;
  --neutral-100: #172238;
  --neutral-200: #233049;
  --neutral-300: #314061;
  --neutral-400: #66758f;
  --neutral-500: #8c99b0;
  --neutral-600: #a9b4c6;
  --neutral-700: #c4cddb;
  --neutral-800: #dce3ec;
  --neutral-900: #eef2f7;

  /* Teal: tints become translucent, text shades become lighter */
  --primary-50: rgba(63, 174, 183, 0.1);
  --primary-100: rgba(63, 174, 183, 0.16);
  --primary-200: rgba(63, 174, 183, 0.3);
  --primary-300: #5fc3cb;
  --primary-700: #7fd3d9;
  --primary-800: #a6e2e6;
  --primary-900: #cdeff1;

  --navy-50: rgba(97, 138, 180, 0.14);
  --navy-100: rgba(97, 138, 180, 0.22);
  --navy-200: rgba(97, 138, 180, 0.32);
  --navy-700: #a9c1dc;

  --success-50: rgba(18, 183, 106, 0.12);
  --success-100: rgba(18, 183, 106, 0.18);
  --success-200: rgba(18, 183, 106, 0.3);
  --success-700: #6ce9a6;
  --success-800: #a6f4c5;

  --error-50: rgba(240, 68, 56, 0.12);
  --error-100: rgba(240, 68, 56, 0.18);
  --error-200: rgba(240, 68, 56, 0.32);
  --error-700: #fda29b;
  --error-800: #fecdca;

  --warning-50: rgba(247, 144, 9, 0.12);
  --warning-100: rgba(247, 144, 9, 0.18);
  --warning-700: #fec84b;

  --shadow-xs: 0 1px 2px rgba(0, 0, 0, 0.3);
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.3), 0 1px 3px rgba(0, 0, 0, 0.25);
  --shadow-md: 0 4px 8px -2px rgba(0, 0, 0, 0.4);
  --shadow-lg: 0 12px 16px -4px rgba(0, 0, 0, 0.45);
  --shadow-xl: 0 20px 24px -4px rgba(0, 0, 0, 0.5);
  --shadow-2xl: 0 24px 48px -12px rgba(0, 0, 0, 0.6);
  --ring: 0 0 0 4px rgba(63, 174, 183, 0.25);

  --slate-50: 13 21 36;
  --slate-100: 24 35 56;
  --slate-200: 35 48 73;
  --slate-300: 49 64 97;
  --slate-400: 107 122 147;
  --slate-500: 141 154 176;
  --slate-600: 169 180 197;
  --slate-700: 196 205 217;
  --slate-800: 220 226 234;
  --slate-900: 238 242 247;
}

/* ---------- Base ---------- */
html {
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  font-size: 14px;
  line-height: 1.55;
  color: var(--neutral-800);
  background-color: var(--neutral-50);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  font-feature-settings: "cv11", "ss01";
}

[v-cloak] {
  display: none !important;
}

h1, h2, h3, h4, h5, h6 {
  color: var(--neutral-900);
  letter-spacing: -0.015em;
  line-height: 1.25;
}

::selection {
  background: var(--primary-100);
  color: var(--primary-900);
}

*:focus-visible {
  outline: 2px solid var(--primary-500);
  outline-offset: 2px;
}

.tabular {
  font-variant-numeric: tabular-nums;
}

.lucide {
  flex-shrink: 0;
}

/* ---------- Brand ---------- */
.brand-logo {
  display: inline-flex;
  align-items: center;
  gap: 0.625rem;
  text-decoration: none;
}

.brand-logo img {
  height: 30px;
  width: auto;
}

.brand-logo .brand-name {
  font-weight: 700;
  font-size: 1.0625rem;
  letter-spacing: -0.02em;
  color: var(--brand-ink);
}

.brand-logo .brand-name span {
  color: var(--primary-600);
  font-weight: 600;
}

.brand-tile {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: #fff;
  border-radius: 10px;
  padding: 6px 7px;
  box-shadow: var(--shadow-sm);
}

.brand-tile img {
  height: 22px;
  width: auto;
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.625rem 1rem;
  font-size: 0.875rem;
  font-weight: 600;
  line-height: 1.25rem;
  border-radius: var(--radius);
  border: 1px solid transparent;
  cursor: pointer;
  text-decoration: none;
  white-space: nowrap;
  user-select: none;
  transition: background-color 0.15s ease, border-color 0.15s ease, color 0.15s ease, box-shadow 0.15s ease;
}

.btn:focus-visible {
  outline: none;
  box-shadow: var(--ring);
}

.btn:disabled,
.btn[disabled] {
  opacity: 0.55;
  cursor: not-allowed;
}

.btn svg {
  width: 1rem;
  height: 1rem;
}

.btn-primary {
  background: var(--primary-600);
  border-color: var(--primary-600);
  color: #fff;
  box-shadow: var(--shadow-xs);
}

.btn-primary:hover:not(:disabled) {
  background: #11636d;
  border-color: #11636d;
}

.btn-navy {
  background: var(--navy-800);
  border-color: var(--navy-800);
  color: #fff;
  box-shadow: var(--shadow-xs);
}

.btn-navy:hover:not(:disabled) {
  background: var(--navy-900);
  border-color: var(--navy-900);
}

.btn-secondary {
  background: var(--surface);
  border-color: var(--neutral-300);
  color: var(--neutral-700);
  box-shadow: var(--shadow-xs);
}

.btn-secondary:hover:not(:disabled) {
  background: var(--neutral-50);
  color: var(--neutral-900);
  border-color: var(--neutral-400);
}

.btn-outline {
  background: transparent;
  border-color: var(--primary-600);
  color: var(--primary-700);
}

.btn-outline:hover:not(:disabled) {
  background: var(--primary-50);
}

.btn-ghost {
  background: transparent;
  color: var(--neutral-600);
}

.btn-ghost:hover:not(:disabled) {
  background: var(--neutral-100);
  color: var(--neutral-900);
}

.btn-success {
  background: var(--success-600);
  border-color: var(--success-600);
  color: #fff;
}

.btn-success:hover:not(:disabled) {
  background: #027a48;
  border-color: #027a48;
}

.btn-danger {
  background: var(--error-600);
  border-color: var(--error-600);
  color: #fff;
}

.btn-danger:hover:not(:disabled) {
  background: #b42318;
  border-color: #b42318;
}

.btn-danger-soft {
  background: var(--surface);
  border-color: var(--error-200);
  color: var(--error-700);
}

.btn-danger-soft:hover:not(:disabled) {
  background: var(--error-50);
  border-color: var(--error-500);
}

.btn-sm {
  padding: 0.4375rem 0.75rem;
  font-size: 0.8125rem;
}

.btn-lg {
  padding: 0.8125rem 1.25rem;
  font-size: 0.9375rem;
}

.btn-block {
  width: 100%;
}

.icon-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.25rem;
  height: 2.25rem;
  border-radius: var(--radius);
  color: var(--neutral-500);
  background: transparent;
  border: 1px solid transparent;
  cursor: pointer;
  transition: background-color 0.15s ease, color 0.15s ease;
}

.icon-btn:hover {
  background: var(--neutral-100);
  color: var(--neutral-900);
}

.icon-btn svg {
  width: 1.125rem;
  height: 1.125rem;
}

/* ---------- Links ---------- */
.modern-link {
  color: var(--primary-700);
  font-weight: 600;
  text-decoration: none;
}

.modern-link:hover {
  color: var(--primary-800);
  text-decoration: underline;
  text-underline-offset: 3px;
}

/* ---------- Forms ---------- */
.form-label {
  display: block;
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--neutral-700);
  margin-bottom: 0.375rem;
}

.form-label .req,
.req {
  color: var(--error-600);
}

.form-hint {
  margin-top: 0.375rem;
  font-size: 0.75rem;
  color: var(--neutral-500);
}

.form-error {
  margin-top: 0.375rem;
  font-size: 0.75rem;
  font-weight: 500;
  color: var(--error-600);
}

.modern-input {
  display: block;
  width: 100%;
  padding: 0.625rem 0.875rem;
  font-size: 0.9375rem;
  line-height: 1.5rem;
  color: var(--neutral-900);
  background-color: var(--surface);
  border: 1px solid var(--neutral-300);
  border-radius: var(--radius);
  box-shadow: var(--shadow-xs);
  outline: none;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.modern-input:hover:not(:disabled):not([readonly]) {
  border-color: var(--neutral-400);
}

.modern-input:focus {
  border-color: var(--primary-500);
  box-shadow: var(--ring);
}

.modern-input::placeholder {
  color: var(--neutral-400);
}

.modern-input:disabled,
.modern-input[readonly] {
  background-color: var(--neutral-50);
  color: var(--neutral-600);
  cursor: not-allowed;
}

select.modern-input {
  appearance: none;
  -webkit-appearance: none;
  cursor: pointer;
  padding-right: 2.5rem;
  background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 20 20'%3e%3cpath stroke='%23667085' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.6' d='M6 8l4 4 4-4'/%3e%3c/svg%3e");
  background-position: right 0.75rem center;
  background-repeat: no-repeat;
  background-size: 1.125rem;
}

select.modern-input:disabled {
  cursor: not-allowed;
}

textarea.modern-input {
  resize: vertical;
  min-height: 96px;
}

.modern-input.has-icon {
  padding-left: 2.625rem;
}

.input-wrap {
  position: relative;
}

.input-wrap > .input-icon {
  position: absolute;
  left: 0.875rem;
  top: 50%;
  transform: translateY(-50%);
  width: 1.125rem;
  height: 1.125rem;
  color: var(--neutral-400);
  pointer-events: none;
}

.input-wrap > .input-action {
  position: absolute;
  right: 0.375rem;
  top: 50%;
  transform: translateY(-50%);
}

input[type="checkbox"],
input[type="radio"] {
  accent-color: var(--primary-600);
}

.check-row {
  display: flex;
  align-items: center;
  gap: 0.625rem;
  cursor: pointer;
  font-size: 0.875rem;
  color: var(--neutral-700);
}

.check-row input {
  width: 1rem;
  height: 1rem;
}

/* Option tiles (radio / account-type cards) */
.radio-card,
.account-type-card,
.option-tile {
  position: relative;
  display: flex;
  align-items: center;
  gap: 0.625rem;
  padding: 0.75rem 0.875rem;
  background: var(--surface);
  border: 1px solid var(--neutral-300);
  border-radius: var(--radius-md);
  cursor: pointer;
  font-weight: 600;
  font-size: 0.875rem;
  color: var(--neutral-700);
  transition: border-color 0.15s ease, background-color 0.15s ease, box-shadow 0.15s ease;
}

.radio-card:hover,
.account-type-card:hover,
.option-tile:hover {
  border-color: var(--neutral-400);
}

.radio-card.selected,
.account-type-card.selected,
.option-tile.selected {
  border-color: var(--primary-500);
  background: var(--primary-50);
  color: var(--primary-800);
  box-shadow: 0 0 0 1px var(--primary-500);
}

.radio-card svg,
.account-type-card svg,
.option-tile svg {
  width: 1.125rem;
  height: 1.125rem;
  color: var(--neutral-400);
}

.radio-card.selected svg,
.account-type-card.selected svg,
.option-tile.selected svg {
  color: var(--primary-600);
}

/* Segmented control */
.segmented {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: 1fr;
  gap: 4px;
  padding: 4px;
  background: var(--neutral-100);
  border: 1px solid var(--neutral-200);
  border-radius: var(--radius-md);
}

.segmented button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.5rem 0.75rem;
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--neutral-600);
  border-radius: 7px;
  cursor: pointer;
  transition: background-color 0.15s ease, color 0.15s ease, box-shadow 0.15s ease;
}

.segmented button:hover {
  color: var(--neutral-900);
}

.segmented button.active {
  background: var(--surface);
  color: var(--primary-700);
  box-shadow: var(--shadow-sm);
}

.segmented button svg {
  width: 1rem;
  height: 1rem;
}

/* OTP code inputs */
.code-input {
  width: clamp(2.5rem, 11vw, 3.25rem);
  height: clamp(2.875rem, 12vw, 3.5rem);
  text-align: center;
  font-size: 1.375rem;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  color: var(--neutral-900);
  background: var(--surface);
  border: 1px solid var(--neutral-300);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-xs);
  outline: none;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.code-input:focus {
  border-color: var(--primary-500);
  box-shadow: var(--ring);
}

/* ---------- Cards ---------- */
.modern-card {
  background: var(--surface);
  border: 1px solid var(--neutral-200);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  padding: 1.5rem;
}

.modern-card-compact {
  background: var(--surface);
  border: 1px solid var(--neutral-200);
  border-radius: var(--radius-lg);
  padding: 1.25rem;
}

.card-title {
  font-size: 0.9375rem;
  font-weight: 600;
  color: var(--neutral-900);
}

.card-subtitle {
  font-size: 0.8125rem;
  color: var(--neutral-500);
}

.card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1rem;
}

.section-card {
  background: var(--surface);
  border: 1px solid var(--neutral-200);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
}

.section-card > .section-card-head {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 1rem 1.25rem;
  border-bottom: 1px solid var(--neutral-200);
}

.section-card > .section-card-body {
  padding: 1.25rem;
}

.icon-chip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.25rem;
  height: 2.25rem;
  border-radius: var(--radius);
  background: var(--primary-50);
  color: var(--primary-700);
  flex-shrink: 0;
}

.icon-chip svg {
  width: 1.125rem;
  height: 1.125rem;
}

.icon-chip.navy { background: var(--navy-50); color: var(--navy-700); }
.icon-chip.success { background: var(--success-50); color: var(--success-700); }
.icon-chip.warning { background: var(--warning-50); color: var(--warning-700); }
.icon-chip.error { background: var(--error-50); color: var(--error-700); }

/* ---------- Stat cards ---------- */
.stat-card {
  position: relative;
  background: var(--surface);
  border: 1px solid var(--neutral-200);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  padding: 1.25rem;
  overflow: hidden;
}

.stat-card .stat-label {
  font-size: 0.8125rem;
  font-weight: 500;
  color: var(--neutral-500);
}

.stat-card .stat-value {
  margin-top: 0.75rem;
  font-size: 1.625rem;
  line-height: 1.15;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--neutral-900);
  font-variant-numeric: tabular-nums;
}

.stat-card .stat-foot {
  margin-top: 0.375rem;
  font-size: 0.75rem;
  color: var(--neutral-500);
}

.stat-card.featured {
  background: linear-gradient(135deg, var(--navy-800) 0%, var(--navy-900) 60%, #0f3a44 100%);
  border-color: transparent;
}

.stat-card.featured .stat-label,
.stat-card.featured .stat-foot {
  color: rgba(255, 255, 255, 0.7);
}

.stat-card.featured .stat-value {
  color: #fff;
}

.stat-card.featured .icon-chip {
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
}

/* ---------- Tables ---------- */
.data-table {
  background: var(--surface);
  border: 1px solid var(--neutral-200);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  overflow-x: auto;
}

.modern-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
}

.modern-table thead th {
  position: sticky;
  top: 0;
  background: var(--neutral-50);
  padding: 0.75rem 1rem;
  text-align: left;
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--neutral-500);
  border-bottom: 1px solid var(--neutral-200);
  white-space: nowrap;
}

.modern-table tbody td {
  padding: 0.875rem 1rem;
  font-size: 0.875rem;
  color: var(--neutral-700);
  border-bottom: 1px solid var(--neutral-100);
  vertical-align: middle;
}

.modern-table tbody tr {
  background: var(--surface);
  transition: background-color 0.12s ease;
}

.modern-table tbody tr:hover {
  background: var(--neutral-50);
}

.modern-table tbody tr:last-child td {
  border-bottom: none;
}

.cell-strong {
  font-weight: 600;
  color: var(--neutral-900);
}

.cell-muted {
  color: var(--neutral-500);
}

.cell-link {
  font-weight: 600;
  color: var(--primary-700);
  text-decoration: none;
}

.cell-link:hover {
  text-decoration: underline;
  text-underline-offset: 3px;
}

/* ---------- Badges ---------- */
.status-badge,
.badge {
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
  padding: 0.125rem 0.625rem;
  font-size: 0.75rem;
  font-weight: 600;
  line-height: 1.25rem;
  border-radius: 9999px;
  text-transform: capitalize;
  white-space: nowrap;
  background: var(--neutral-100);
  color: var(--neutral-700);
}

.status-badge::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 9999px;
  background: currentColor;
  opacity: 0.85;
}

.status-paid,
.status-completed,
.status-active {
  background: var(--success-50) !important;
  color: var(--success-700) !important;
}

.status-pending,
.status-suspended {
  background: var(--warning-50) !important;
  color: var(--warning-700) !important;
}

.status-ended {
  background: var(--neutral-100) !important;
  color: var(--neutral-600) !important;
}

.status-failed {
  background: var(--error-50) !important;
  color: var(--error-700) !important;
}

.badge-brand {
  background: var(--primary-50);
  color: var(--primary-700);
}

.badge-navy {
  background: var(--navy-50);
  color: var(--navy-700);
}

/* ---------- Alerts ---------- */
.alert {
  display: flex;
  gap: 0.75rem;
  padding: 0.875rem 1rem;
  border-radius: var(--radius-md);
  border: 1px solid;
  font-size: 0.8125rem;
}

.alert svg {
  width: 1.125rem;
  height: 1.125rem;
  flex-shrink: 0;
  margin-top: 1px;
}

.alert-info {
  background: var(--primary-50);
  border-color: var(--primary-200);
  color: var(--primary-900);
}

.alert-info svg { color: var(--primary-600); }

.alert-error {
  background: var(--error-50);
  border-color: var(--error-200);
  color: var(--error-800);
}

.alert-error svg { color: var(--error-600); }

/* ---------- App shell ---------- */
.sidebar {
  position: fixed;
  inset: 0 auto 0 0;
  width: var(--sidebar-w);
  display: flex;
  flex-direction: column;
  background: var(--navy-950);
  background-image: linear-gradient(180deg, var(--navy-900) 0%, var(--navy-950) 100%);
  color: rgba(255, 255, 255, 0.72);
  z-index: 100;
  transition: transform 0.25s ease;
}

.sidebar-brand {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  height: var(--header-h);
  padding: 0 1.25rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.07);
  text-decoration: none;
}

.sidebar-brand .brand-text {
  font-weight: 700;
  font-size: 1.0625rem;
  letter-spacing: -0.02em;
  color: #fff;
  line-height: 1.1;
}

.sidebar-brand .brand-text small {
  display: block;
  font-size: 0.6875rem;
  font-weight: 500;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--primary-300);
  margin-top: 2px;
}

.sidebar-nav {
  flex: 1;
  overflow-y: auto;
  padding: 1rem 0.75rem;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.sidebar-section {
  padding: 1rem 0.75rem 0.5rem;
  font-size: 0.6875rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.38);
}

.sidebar-section:first-child {
  padding-top: 0.25rem;
}

.sidebar-item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.625rem 0.75rem;
  font-size: 0.875rem;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.72);
  text-decoration: none;
  border-radius: var(--radius);
  cursor: pointer;
  transition: background-color 0.15s ease, color 0.15s ease;
}

.sidebar-item svg {
  width: 1.125rem;
  height: 1.125rem;
  opacity: 0.85;
}

.sidebar-item:hover {
  background: rgba(255, 255, 255, 0.06);
  color: #fff;
}

.sidebar-item.active {
  background: rgba(63, 174, 183, 0.16);
  color: #fff;
  box-shadow: inset 3px 0 0 var(--primary-400);
}

.sidebar-item.active svg {
  color: var(--primary-300);
  opacity: 1;
}

.sidebar-footer {
  padding: 1rem 0.75rem 1.25rem;
  border-top: 1px solid rgba(255, 255, 255, 0.07);
}

.sidebar-user {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.625rem 0.75rem;
  border-radius: var(--radius);
  text-decoration: none;
  color: #fff;
}

.sidebar-user:hover {
  background: rgba(255, 255, 255, 0.06);
}

.sidebar-user .who {
  min-width: 0;
  flex: 1;
}

.sidebar-user .who p {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.sidebar-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(11, 27, 46, 0.5);
  backdrop-filter: blur(2px);
  z-index: 95;
}

.avatar {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.25rem;
  height: 2.25rem;
  border-radius: 9999px;
  background: linear-gradient(135deg, var(--primary-500), var(--navy-800));
  color: #fff;
  font-weight: 700;
  font-size: 0.8125rem;
  flex-shrink: 0;
}

.main-content {
  margin-left: var(--sidebar-w);
  min-height: 100vh;
  background: var(--neutral-50);
}

.header-bar {
  position: fixed;
  top: 0;
  left: var(--sidebar-w);
  right: 0;
  height: var(--header-h);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0 2rem;
  background: var(--header-bg);
  backdrop-filter: saturate(180%) blur(10px);
  -webkit-backdrop-filter: saturate(180%) blur(10px);
  border-bottom: 1px solid var(--neutral-200);
  z-index: 90;
}

.header-title {
  font-size: 1rem;
  font-weight: 600;
  color: var(--neutral-900);
}

.header-crumb {
  font-size: 0.75rem;
  color: var(--neutral-500);
}

.content-area {
  margin-top: var(--header-h);
  padding: 2rem;
  max-width: 1400px;
}

.page-header {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.page-title {
  font-size: 1.5rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--neutral-900);
}

.page-subtitle {
  margin-top: 0.25rem;
  font-size: 0.875rem;
  color: var(--neutral-500);
}

.toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.625rem;
}

.search-input {
  position: relative;
  min-width: 240px;
}

.search-input > svg {
  position: absolute;
  left: 0.75rem;
  top: 50%;
  transform: translateY(-50%);
  width: 1rem;
  height: 1rem;
  color: var(--neutral-400);
  pointer-events: none;
}

.search-input .modern-input {
  padding-left: 2.25rem;
  font-size: 0.875rem;
}

/* Standalone top bar (profile / detail pages) */
.topbar {
  position: sticky;
  top: 0;
  z-index: 50;
  height: var(--header-h);
  background: var(--header-bg);
  backdrop-filter: saturate(180%) blur(10px);
  -webkit-backdrop-filter: saturate(180%) blur(10px);
  border-bottom: 1px solid var(--neutral-200);
}

.topbar-inner {
  height: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1.25rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

@media (max-width: 1024px) {
  .sidebar {
    transform: translateX(-100%);
    box-shadow: var(--shadow-2xl);
  }

  .sidebar.open {
    transform: translateX(0);
  }

  .main-content {
    margin-left: 0;
  }

  .header-bar {
    left: 0;
    padding: 0 1rem;
  }

  .content-area {
    padding: 1.25rem 1rem 2rem;
  }
}

@media (max-width: 640px) {
  .page-title {
    font-size: 1.25rem;
  }

  .search-input {
    min-width: 0;
    flex: 1 1 100%;
  }

  .modern-card {
    padding: 1.125rem;
  }
}

/* ---------- Tabs ---------- */
.tabs {
  display: flex;
  gap: 0.25rem;
  border-bottom: 1px solid var(--neutral-200);
  overflow-x: auto;
  scrollbar-width: none;
}

.tabs::-webkit-scrollbar {
  display: none;
}

.tab {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.625rem 0.875rem;
  margin-bottom: -1px;
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--neutral-500);
  border-bottom: 2px solid transparent;
  white-space: nowrap;
  cursor: pointer;
  transition: color 0.15s ease, border-color 0.15s ease;
}

.tab:hover {
  color: var(--neutral-800);
}

.tab.active {
  color: var(--primary-700);
  border-bottom-color: var(--primary-600);
}

.tab svg {
  width: 1rem;
  height: 1rem;
}

.tab .count {
  padding: 0 0.4375rem;
  font-size: 0.6875rem;
  line-height: 1.125rem;
  border-radius: 9999px;
  background: var(--neutral-100);
  color: var(--neutral-600);
}

.tab.active .count {
  background: var(--primary-50);
  color: var(--primary-700);
}

/* ---------- Pagination ---------- */
.pager {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  margin-top: 1.25rem;
}

.pager-info {
  font-size: 0.8125rem;
  color: var(--neutral-500);
}

.pager-controls {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.25rem;
}

.pager-btn,
.pagination-btn {
  min-width: 2.25rem;
  height: 2.25rem;
  padding: 0 0.625rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.25rem;
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--neutral-700);
  background: var(--surface);
  border: 1px solid var(--neutral-300);
  border-radius: var(--radius);
  cursor: pointer;
  transition: background-color 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

.pager-btn:hover:not(:disabled),
.pagination-btn:hover:not(:disabled) {
  background: var(--neutral-50);
  border-color: var(--neutral-400);
}

.pager-btn:disabled,
.pagination-btn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.pager-btn.active,
.pagination-btn.active {
  background: var(--primary-600);
  border-color: var(--primary-600);
  color: #fff;
}

.pager-btn svg,
.pagination-btn svg {
  width: 1rem;
  height: 1rem;
}

.pager-ellipsis {
  padding: 0 0.375rem;
  color: var(--neutral-400);
}

.pagination {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  margin-top: 1.25rem;
}

.pagination-info {
  font-size: 0.8125rem;
  color: var(--neutral-500);
}

.pagination-controls {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.25rem;
}

/* ---------- Empty / loading ---------- */
.empty-state {
  text-align: center;
  padding: 3.5rem 1.5rem;
  color: var(--neutral-500);
}

.empty-state-icon {
  width: 3rem !important;
  height: 3rem !important;
  margin: 0 auto 1rem;
  padding: 0.75rem;
  border-radius: 9999px;
  background: var(--neutral-100);
  color: var(--neutral-500);
  box-shadow: 0 0 0 8px var(--neutral-50);
}

.empty-state .empty-title {
  font-size: 0.9375rem;
  font-weight: 600;
  color: var(--neutral-900);
  margin-bottom: 0.25rem;
}

.empty-state.boxed {
  background: var(--surface);
  border: 1px dashed var(--neutral-300);
  border-radius: var(--radius-lg);
}

.spinner {
  width: 40px;
  height: 40px;
  border: 3px solid var(--neutral-200);
  border-top-color: var(--primary-600);
  border-radius: 50%;
  animation: vp-spin 0.75s linear infinite;
}

.spinner.sm {
  width: 22px;
  height: 22px;
  border-width: 2px;
}

@keyframes vp-spin {
  to {
    transform: rotate(360deg);
  }
}

.loading-overlay {
  position: fixed;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--overlay-bg);
  backdrop-filter: blur(2px);
  z-index: 9999;
}

.skeleton {
  background: linear-gradient(90deg, var(--neutral-100) 25%, var(--neutral-200) 50%, var(--neutral-100) 75%);
  background-size: 200% 100%;
  animation: vp-shimmer 1.4s ease-in-out infinite;
  border-radius: var(--radius-sm);
}

@keyframes vp-shimmer {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

/* ---------- Modals ---------- */
.modal-overlay {
  position: fixed;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  background: rgba(11, 27, 46, 0.55);
  backdrop-filter: blur(3px);
  z-index: 1000;
  animation: vp-fade 0.18s ease-out;
}

.modal-content {
  width: 100%;
  max-width: 560px;
  max-height: 92vh;
  overflow-y: auto;
  background: var(--surface);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-2xl);
  animation: vp-rise 0.22s ease-out;
}

.modal-header {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  padding: 1.25rem 1.5rem;
  background: var(--surface);
  border-bottom: 1px solid var(--neutral-200);
}

.modal-title {
  font-size: 1.0625rem;
  font-weight: 700;
  color: var(--neutral-900);
}

.modal-subtitle {
  margin-top: 0.125rem;
  font-size: 0.8125rem;
  color: var(--neutral-500);
}

.modal-body {
  padding: 1.5rem;
}

.modal-footer {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 0.625rem;
  padding-top: 1.25rem;
  margin-top: 0.5rem;
  border-top: 1px solid var(--neutral-200);
}

@media (max-width: 640px) {
  .modal-overlay {
    align-items: flex-end;
    padding: 0;
  }

  .modal-content {
    max-height: 94vh;
    border-radius: var(--radius-xl) var(--radius-xl) 0 0;
  }

  .modal-header,
  .modal-body {
    padding-left: 1.125rem;
    padding-right: 1.125rem;
  }

  .modal-footer > .btn {
    flex: 1 1 100%;
  }
}

@keyframes vp-fade {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes vp-rise {
  from { opacity: 0; transform: translateY(12px); }
  to { opacity: 1; transform: translateY(0); }
}

/* Form sections inside modals / pages */
.form-section {
  margin-bottom: 1.75rem;
}

.form-section:last-of-type {
  margin-bottom: 0;
}

.form-section-title {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--neutral-500);
  margin-bottom: 0.875rem;
}

.form-section-title::after {
  content: "";
  flex: 1;
  height: 1px;
  background: var(--neutral-200);
}

.kv-label {
  font-size: 0.75rem;
  font-weight: 500;
  color: var(--neutral-500);
  margin-bottom: 0.25rem;
}

.kv-value {
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--neutral-900);
}

.metric-tile {
  padding: 1rem;
  border-radius: var(--radius-md);
  border: 1px solid var(--neutral-200);
  background: var(--neutral-50);
}

.metric-tile .kv-value {
  font-size: 1.25rem;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}

.select-list {
  max-height: 220px;
  overflow-y: auto;
  border: 1px solid var(--neutral-300);
  border-radius: var(--radius);
  padding: 0.25rem;
}

.select-list .subscriber-item {
  display: flex;
  align-items: center;
  gap: 0.625rem;
  padding: 0.5rem 0.625rem;
  border-radius: var(--radius-sm);
  font-size: 0.8125rem;
  color: var(--neutral-700);
}

.select-list .subscriber-item:hover {
  background: var(--neutral-50);
}

/* ---------- Service / list cards ---------- */
.service-card {
  display: flex;
  flex-direction: column;
  background: var(--surface);
  border: 1px solid var(--neutral-200);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  padding: 1.125rem;
  transition: box-shadow 0.18s ease, border-color 0.18s ease, transform 0.18s ease;
}

.service-card:hover {
  border-color: var(--primary-200);
  box-shadow: var(--shadow-lg);
}

.list-row {
  display: flex;
  align-items: center;
  gap: 0.875rem;
  padding: 0.75rem 0.5rem;
  border-radius: var(--radius);
  transition: background-color 0.12s ease;
}

.list-row + .list-row {
  border-top: 1px solid var(--neutral-100);
}

.list-row.clickable {
  cursor: pointer;
}

.list-row.clickable:hover {
  background: var(--neutral-50);
}

.rank {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.75rem;
  height: 1.75rem;
  border-radius: var(--radius-sm);
  font-size: 0.75rem;
  font-weight: 700;
  background: var(--navy-50);
  color: var(--navy-700);
  flex-shrink: 0;
}

/* ---------- Profile ---------- */
.profile-hero {
  position: relative;
  border-radius: var(--radius-xl);
  overflow: hidden;
  background: var(--surface);
  border: 1px solid var(--neutral-200);
  box-shadow: var(--shadow-sm);
}

.profile-cover {
  height: 112px;
  background:
    radial-gradient(600px 160px at 85% -20%, rgba(63, 174, 183, 0.55), transparent 60%),
    linear-gradient(120deg, var(--navy-800) 0%, var(--navy-900) 55%, #0f3a44 100%);
}

.profile-avatar {
  width: 88px;
  height: 88px;
  border-radius: 9999px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.875rem;
  font-weight: 700;
  color: #fff;
  background: linear-gradient(135deg, var(--primary-500), var(--navy-800));
  border: 4px solid var(--surface);
  box-shadow: var(--shadow-md);
}

.edit-toggle {
  display: flex;
  gap: 0.5rem;
}

.subscribers-card,
.referral-card {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1rem 1.125rem;
  border-radius: var(--radius-md);
  background: var(--primary-50);
  border: 1px solid var(--primary-100);
}

.referral-code {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 1.125rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  color: var(--primary-800);
}

/* ---------- Auth layout ---------- */
.auth-shell {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 1fr;
  background: var(--neutral-50);
}

@media (min-width: 1024px) {
  .auth-shell {
    grid-template-columns: minmax(420px, 5fr) 7fr;
  }
}

.auth-aside {
  display: none;
  position: relative;
  overflow: hidden;
  padding: 2.5rem 3rem;
  color: #fff;
  background:
    radial-gradient(700px 360px at 110% 0%, rgba(63, 174, 183, 0.35), transparent 60%),
    radial-gradient(500px 300px at -10% 110%, rgba(63, 174, 183, 0.18), transparent 60%),
    linear-gradient(160deg, var(--navy-800) 0%, var(--navy-900) 50%, var(--navy-950) 100%);
}

@media (min-width: 1024px) {
  .auth-aside {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
  }
}

.auth-aside::after {
  content: "";
  position: absolute;
  inset: 0;
  background-image: linear-gradient(rgba(255, 255, 255, 0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.04) 1px, transparent 1px);
  background-size: 40px 40px;
  mask-image: linear-gradient(180deg, rgba(0, 0, 0, 0.7), transparent 75%);
  -webkit-mask-image: linear-gradient(180deg, rgba(0, 0, 0, 0.7), transparent 75%);
  pointer-events: none;
}

.auth-aside > * {
  position: relative;
  z-index: 1;
}

.auth-point {
  display: flex;
  gap: 0.875rem;
  align-items: flex-start;
}

.auth-point .dot {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.25rem;
  height: 2.25rem;
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: var(--primary-300);
  flex-shrink: 0;
}

.auth-point .dot svg {
  width: 1.125rem;
  height: 1.125rem;
}

.auth-main {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  padding: 1.5rem 1.25rem;
}

@media (min-width: 640px) {
  .auth-main {
    padding: 2rem 2.5rem;
  }
}

.auth-main-body {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem 0;
}

.auth-card {
  width: 100%;
  max-width: 440px;
}

.auth-card.wide {
  max-width: 520px;
}

.auth-title {
  font-size: 1.75rem;
  font-weight: 700;
  letter-spacing: -0.025em;
  color: var(--neutral-900);
}

.auth-subtitle {
  margin-top: 0.375rem;
  font-size: 0.9375rem;
  color: var(--neutral-500);
}

.auth-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 3rem;
  height: 3rem;
  border-radius: var(--radius-md);
  background: var(--surface);
  border: 1px solid var(--neutral-200);
  box-shadow: var(--shadow-sm);
  color: var(--primary-600);
  margin-bottom: 1.25rem;
}

.auth-badge svg {
  width: 1.375rem;
  height: 1.375rem;
}

.divider {
  height: 1px;
  background: var(--neutral-200);
}

/* Centered single-card pages */
.center-shell {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background:
    radial-gradient(800px 400px at 50% -10%, rgba(63, 174, 183, 0.12), transparent 70%),
    var(--neutral-50);
}

/* ---------- Public header ---------- */
.public-header {
  position: sticky;
  top: 0;
  z-index: 40;
  background: var(--header-bg);
  backdrop-filter: saturate(180%) blur(12px);
  -webkit-backdrop-filter: saturate(180%) blur(12px);
  border-bottom: 1px solid var(--neutral-200);
}

.modern-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1.25rem;
}

@media (min-width: 1024px) {
  .modern-container {
    padding: 0 2rem;
  }
}

/* ---------- SweetAlert2 theming ---------- */
.swal2-popup {
  font-family: "Inter", system-ui, sans-serif !important;
  border-radius: var(--radius-xl) !important;
  padding: 1.75rem 1.5rem 1.5rem !important;
}

.swal2-title {
  color: var(--neutral-900) !important;
  font-size: 1.25rem !important;
  font-weight: 700 !important;
}

.swal2-html-container {
  color: var(--neutral-600) !important;
  font-size: 0.9375rem !important;
}

.swal2-styled.swal2-confirm {
  background: var(--primary-600) !important;
  border-radius: var(--radius) !important;
  padding: 0.625rem 1.5rem !important;
  font-weight: 600 !important;
  box-shadow: none !important;
}

.swal2-styled.swal2-confirm:hover {
  background: #11636d !important;
}

.swal2-styled.swal2-cancel {
  background: var(--surface) !important;
  color: var(--neutral-700) !important;
  border: 1px solid var(--neutral-300) !important;
  border-radius: var(--radius) !important;
  padding: 0.625rem 1.5rem !important;
  font-weight: 600 !important;
}

.swal2-toast {
  border-radius: var(--radius-md) !important;
  padding: 0.75rem 1rem !important;
}

.swal2-icon.swal2-success {
  border-color: var(--success-500) !important;
  color: var(--success-500) !important;
}

.swal2-icon.swal2-success [class^="swal2-success-line"] {
  background-color: var(--success-500) !important;
}

.swal2-icon.swal2-success .swal2-success-ring {
  border-color: rgba(18, 183, 106, 0.3) !important;
}

.swal2-icon.swal2-error {
  border-color: var(--error-500) !important;
  color: var(--error-500) !important;
}

.swal2-icon.swal2-warning {
  border-color: var(--warning-500) !important;
  color: var(--warning-500) !important;
}

.swal2-icon.swal2-info {
  border-color: var(--primary-500) !important;
  color: var(--primary-500) !important;
}

.swal2-timer-progress-bar {
  background: var(--primary-400) !important;
}

/* ---------- Motion preferences ---------- */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
}

/* ---------- Theme toggle ---------- */
.theme-toggle .icon-sun {
  display: none;
}

[data-theme="dark"] .theme-toggle .icon-sun {
  display: block;
}

[data-theme="dark"] .theme-toggle .icon-moon {
  display: none;
}

.theme-toggle svg {
  width: 1.125rem;
  height: 1.125rem;
}

/* ---------- Result state icon (verification pages) ---------- */
.state-icon {
  width: 64px;
  height: 64px;
  margin: 0 auto 1.25rem;
  border-radius: 9999px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.state-icon svg {
  width: 30px;
  height: 30px;
}

.state-icon.success {
  background: var(--success-50);
  color: var(--success-600);
  box-shadow: 0 0 0 8px var(--success-50);
}

.state-icon.error {
  background: var(--error-50);
  color: var(--error-600);
  box-shadow: 0 0 0 8px var(--error-50);
}

.state-icon.neutral {
  background: var(--neutral-100);
  color: var(--neutral-600);
  box-shadow: 0 0 0 8px var(--neutral-50);
}

/* Constant light button for dark backgrounds (e.g. call-to-action banners) */
.btn-light {
  background: #fff;
  border-color: #fff;
  color: var(--navy-900);
}

.btn-light:hover:not(:disabled) {
  background: #f0f3f6;
}

/* ---------- Dark theme: Tailwind utilities that aren't driven by variables ---------- */
[data-theme="dark"] .bg-white {
  background-color: var(--surface);
}

[data-theme="dark"] .border-white {
  border-color: var(--surface);
}

[data-theme="dark"] .text-navy-900 {
  color: var(--neutral-900);
}

[data-theme="dark"] .text-brand-600,
[data-theme="dark"] .text-brand-700,
[data-theme="dark"] .hover\:text-brand-700:hover,
[data-theme="dark"] .group:hover .group-hover\:text-brand-700 {
  color: #5fc3cb;
}

[data-theme="dark"] .border-brand-200 {
  border-color: rgba(63, 174, 183, 0.35);
}

[data-theme="dark"] .hover\:\!bg-red-50:hover {
  background-color: var(--error-50) !important;
}

[data-theme="dark"] .hover\:\!text-red-600:hover {
  color: #fda29b !important;
}

[data-theme="dark"] .swal2-popup {
  background: var(--surface) !important;
  color: var(--neutral-700) !important;
}

[data-theme="dark"] .swal2-icon.swal2-success [class^="swal2-success-circular-line"],
[data-theme="dark"] .swal2-icon.swal2-success .swal2-success-fix {
  background-color: transparent !important;
}

[data-theme="dark"] .bg-brand-50 {
  background-color: var(--primary-50);
}

[data-theme="dark"] .bg-navy-50 {
  background-color: var(--navy-50);
}

/* Logo: SVG variants swap with the theme (logo-mark.svg on light, logo-mark-on-dark.svg on dark) */
.logo-on-dark {
  display: none !important;
}

[data-theme="dark"] .logo-on-dark {
  display: inline-block !important;
}

[data-theme="dark"] .logo-on-light {
  display: none !important;
}

/* Mark on permanently dark surfaces (sidebar, auth panel) */
.brand-mark {
  height: 30px;
  width: auto;
  flex-shrink: 0;
}

[data-theme="dark"] .text-navy-700 {
  color: var(--navy-700);
}

[data-theme="dark"] .brand-logo .brand-name span {
  color: var(--primary-400);
}

[data-theme="dark"] .sidebar {
  border-right: 1px solid var(--neutral-200);
}

/* Status colours returned as Tailwind classes by the member dashboard's getStatusClass() */
[data-theme="dark"] .bg-green-100 { background-color: var(--success-50); }
[data-theme="dark"] .text-green-700 { color: var(--success-700); }
[data-theme="dark"] .bg-yellow-100 { background-color: var(--warning-50); }
[data-theme="dark"] .text-yellow-700 { color: var(--warning-700); }
[data-theme="dark"] .bg-red-100 { background-color: var(--error-50); }
[data-theme="dark"] .text-red-700 { color: var(--error-700); }
[data-theme="dark"] .bg-gray-100 { background-color: var(--neutral-100); }
[data-theme="dark"] .text-gray-800 { color: var(--neutral-800); }

/* Filter bar (organization payments) */
.filter-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: 0.75rem;
  padding: 1rem;
  background: var(--surface);
  border: 1px solid var(--neutral-200);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-xs);
}

.filter-field {
  flex: 1 1 150px;
  min-width: 140px;
  max-width: 200px;
}

.filter-field-wide {
  flex: 2 1 240px;
  max-width: 360px;
}

.filter-field .form-label {
  font-size: 0.75rem;
  color: var(--neutral-500);
}

.filter-field .modern-input {
  padding-top: 0.5rem;
  padding-bottom: 0.5rem;
  font-size: 0.875rem;
}

@media (max-width: 640px) {
  .filter-field,
  .filter-field-wide {
    max-width: none;
    flex-basis: 100%;
  }
}

/* Progress bar (fundraisers) */
.progress-track {
  height: 8px;
  border-radius: 9999px;
  background: var(--neutral-200);
  overflow: hidden;
}

.progress-fill {
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--primary-500), var(--primary-400));
  transition: width 0.6s ease;
}

.progress-on-dark {
  background: rgba(255, 255, 255, 0.15);
}

.progress-lg {
  height: 12px;
}

/* Verified organization check mark (assets/js/utils/verifiedBadge.js) */
:root {
  --verified: #1d8cf8;
}
[data-theme="dark"] {
  --verified: #3ba0ff;
}
.verified-badge {
  display: inline-flex;
  flex-shrink: 0;
  vertical-align: -0.15em;
  width: 1.05em;
  height: 1.05em;
  margin-left: 0.3em;
  line-height: 1;
}
.verified-badge svg {
  width: 100%;
  height: 100%;
  overflow: visible;
}
.verified-badge-seal {
  fill: var(--verified);
}
.verified-badge-check {
  fill: none;
  stroke: #fff;
  stroke-width: 2.2;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.verified-badge-sm { width: 0.95em; height: 0.95em; }
.verified-badge-lg { width: 1.15em; height: 1.15em; }

/* "Paying to" organization block on the public service page; copes with very long names */
.payee {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}
.payee-name {
  min-width: 0;
  font-weight: 600;
  line-height: 1.35;
  overflow-wrap: anywhere;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  overflow: hidden;
}
.payee-name.is-expanded {
  -webkit-line-clamp: unset;
  line-clamp: unset;
  overflow: visible;
}

/* ---------- Developers page (API checkout) ---------- */
.dev-steps {
  display: grid;
  gap: 0.75rem;
  counter-reset: none;
}
@media (min-width: 768px) {
  .dev-steps { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
.dev-steps li {
  display: flex;
  gap: 0.875rem;
  padding: 1rem 1.125rem;
  border-radius: var(--radius-lg, 0.875rem);
  border: 1px solid var(--neutral-200);
  background: var(--surface);
  font-size: 0.8125rem;
  line-height: 1.5;
  color: var(--neutral-600);
}
.dev-steps li > span {
  flex: none;
  display: grid;
  place-items: center;
  width: 1.75rem;
  height: 1.75rem;
  border-radius: 999px;
  font-weight: 700;
  font-size: 0.8125rem;
  color: var(--primary-700);
  background: var(--primary-50);
}
.key-reveal {
  padding: 1rem;
  border-radius: 0.75rem;
  border: 1px solid var(--warning-200, #fedf89);
  background: var(--warning-50);
}
.code-inline {
  display: inline-block;
  padding: 0.5rem 0.75rem;
  border-radius: 0.5rem;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.8125rem;
  color: var(--neutral-800);
  background: var(--neutral-100);
  border: 1px solid var(--neutral-200);
}
.code-block {
  position: relative;
  border-radius: 0.75rem;
  background: #0b1220;
  border: 1px solid #1f2b40;
  overflow: hidden;
}
.code-block pre {
  margin: 0;
  padding: 1.125rem 1.25rem;
  overflow-x: auto;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.78rem;
  line-height: 1.65;
  color: #d6e2f0;
  tab-size: 2;
}
.code-copy {
  position: absolute;
  top: 0.625rem;
  right: 0.625rem;
  padding: 0.25rem 0.625rem;
  border-radius: 0.375rem;
  font-size: 0.75rem;
  font-weight: 600;
  color: #d6e2f0;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.12);
}
.code-copy:hover { background: rgba(255, 255, 255, 0.16); }
.dev-note {
  padding: 0.875rem 1rem;
  border-radius: 0.75rem;
  background: var(--neutral-50);
  border: 1px solid var(--neutral-200);
  color: var(--neutral-600);
  line-height: 1.55;
}
.dev-note p + p { margin-top: 0.25rem; }
.dev-note code, .form-hint code {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.85em;
  padding: 0.05rem 0.3rem;
  border-radius: 0.25rem;
  background: var(--neutral-100);
}
.api-link-panel {
  padding: 1rem 1.125rem;
  border-radius: 0.875rem;
  border: 1px dashed var(--primary-300);
  background: var(--primary-50);
}

/* ---------- Landing page footer ---------- */
.site-footer {
  margin-top: 1rem;
  border-top: 1px solid var(--neutral-200);
  background: var(--surface);
}
.site-footer-top {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 2rem 1.5rem;
  padding: 3rem 0 2.5rem;
}
@media (min-width: 768px) {
  .site-footer-top {
    grid-template-columns: minmax(0, 2fr) repeat(3, minmax(0, 1fr));
    gap: 2.5rem;
    padding: 3.5rem 0 3rem;
  }
}
.site-footer-brand { grid-column: 1 / -1; }
@media (min-width: 768px) { .site-footer-brand { grid-column: auto; } }
.site-footer-brand p {
  margin-top: 0.875rem;
  max-width: 22rem;
  font-size: 0.875rem;
  line-height: 1.65;
  color: var(--neutral-500);
}
.site-footer-col { display: flex; flex-direction: column; gap: 0.625rem; }
.site-footer-col h3 {
  margin-bottom: 0.25rem;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--neutral-900);
}
.site-footer-col a {
  width: fit-content;
  font-size: 0.875rem;
  color: var(--neutral-500);
  transition: color 0.15s ease;
}
.site-footer-col a:hover { color: var(--primary-600); }
.site-footer-bottom {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  padding: 1.25rem 0 1.75rem;
  border-top: 1px solid var(--neutral-200);
  font-size: 0.8125rem;
  color: var(--neutral-500);
}
@media (min-width: 640px) {
  .site-footer-bottom { flex-direction: row; align-items: center; justify-content: space-between; }
}
.site-footer-secure { display: inline-flex; align-items: center; gap: 0.4rem; }
.site-footer-secure svg { width: 0.9rem; height: 0.9rem; color: var(--primary-600); flex: none; }

/* ---------- "New feature" markers (assets/js/utils/newFeatures.js) ---------- */
.new-dot {
  position: relative;
  display: inline-block;
  flex: none;
  width: 0.5rem;
  height: 0.5rem;
  border-radius: 999px;
  background: #ff6a3d;
  box-shadow: 0 0 0 2px rgba(255, 106, 61, 0.25);
}
.new-dot::after {
  content: "";
  position: absolute;
  inset: -4px;
  border-radius: 999px;
  border: 2px solid #ff6a3d;
  animation: new-dot-pulse 1.8s ease-out infinite;
}
@keyframes new-dot-pulse {
  0% { transform: scale(0.55); opacity: 0.8; }
  100% { transform: scale(1.5); opacity: 0; }
}
@media (prefers-reduced-motion: reduce) {
  .new-dot::after { animation: none; opacity: 0.4; }
}
/* On the mobile menu button */
.new-dot-corner { position: absolute; top: 0.375rem; right: 0.375rem; }
/* Inline "New" label inside pages and forms */
.new-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  padding: 0.1rem 0.45rem;
  border-radius: 999px;
  font-size: 0.625rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #fff;
  background: linear-gradient(135deg, #ff6a3d, #ff3d71);
  vertical-align: middle;
}

/* ---------- Payment service banners ---------- */
.service-banner {
  display: block;
  width: 100%;
  aspect-ratio: 8 / 3;
  object-fit: cover;
  background: var(--neutral-100);
}
.service-card-banner {
  display: block;
  width: calc(100% + 2.25rem);
  max-width: none;
  margin: -1.125rem -1.125rem 1rem;
  aspect-ratio: 8 / 3;
  object-fit: cover;
  border-radius: var(--radius-lg) var(--radius-lg) 0 0;
  background: var(--neutral-100);
}
.banner-picker {
  display: grid;
  place-items: center;
  aspect-ratio: 8 / 3;
  overflow: hidden;
  border-radius: 0.875rem;
  border: 2px dashed var(--neutral-300, #d0d5dd);
  background: var(--neutral-50);
  text-align: center;
}
.banner-picker.has-image { border-style: solid; border-width: 1px; border-color: var(--neutral-200); }
.banner-picker img { width: 100%; height: 100%; object-fit: cover; }
.banner-picker-empty { padding: 1rem 1.5rem; max-width: 28rem; }
