/* ==========================================================================
   Veriss Design System: components (shared with Veriss Payments and Veriss Forms)
   Tokens (colours, shadows, radii) live in theme.css, which must load first.
   Loaded on every page together with /assets/js/config/tailwind.js
   ========================================================================== */

/* ---------- 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: var(--primary-solid-hover);
  border-color: var(--primary-solid-hover);
}

.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: var(--success-solid-hover);
  border-color: var(--success-solid-hover);
}

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

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

.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%, var(--hero-gradient-end) 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%, var(--hero-gradient-end) 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: var(--primary-solid-hover) !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: var(--light-btn-hover);
}

/* ---------- 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: var(--dark-brand-text);
}

[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: var(--dark-error-text) !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); colour: --verified in theme.css */
.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: var(--new-accent);
  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 var(--new-accent);
  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, var(--new-accent), var(--new-accent-2));
  vertical-align: middle;
}
