/* LEVIAPAY Dashboard — Fintech Theme */
:root {
  --bg: #f5f5f9;
  --surface: #ffffff;
  --surface-elevated: #f0eef6;
  --accent: #652CD1;
  --accent-hover: #46208F;
  --accent-light: #ECE9FC;
  --accent-50: #F5F3FE;
  --accent-blue: #528ff5;
  --destructive: #ef4444;
  --destructive-light: rgba(239, 68, 68, 0.08);
  --warning: #F29C06;
  --warning-light: #FFF6E0;
  --success: #10b981;
  --success-light: rgba(16, 185, 129, 0.08);
  --text-primary: #110E34;
  --text-secondary: #97A3B6;
  --text-tertiary: #9d9daf;
  --divider: #e8e8ef;
  --radius: 16px;
  --radius-sm: 10px;
  --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.04), 0 1px 2px rgba(0, 0, 0, 0.06);
  --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.05), 0 1px 3px rgba(0, 0, 0, 0.04);
  --shadow-lg: 0 10px 30px rgba(0, 0, 0, 0.08), 0 2px 8px rgba(0, 0, 0, 0.04);
  --shadow-card-bold: 20px 24px 32px rgba(0, 0, 0, 0.2);
  --shadow-card: 21px 28px 66px rgba(52, 20, 139, 0.11);
  --sidebar-bg: #fafafc;
  --sidebar-width: 80px;
  --transition: 0.2s ease;
  --hero-gradient: linear-gradient(45deg, #1C0E3F 19%, rgba(90, 64, 154, 0.7) 86%);
}

* { margin: 0; padding: 0; box-sizing: border-box; }

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'SF Pro', 'Segoe UI', sans-serif;
  background: var(--bg);
  color: var(--text-primary);
  min-height: 100vh;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

.hidden { display: none !important; }

/* ── Login ─────────────────────────────────────── */
#login-screen {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  padding: 0;
  background: linear-gradient(135deg, #f5f5f9 0%, #ECE9FC 100%);
  overflow-x: hidden;
}

.login-card,
.signup-card,
.onboarding-card,
.pending-card {
  background: var(--surface);
  border-radius: var(--radius);
  padding: 48px 40px;
  width: 100%;
  box-shadow: var(--shadow-lg);
  border: 1px solid var(--divider);
}

.login-card {
  max-width: none;
  width: 100%;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: var(--bg);
  border: none;
  border-radius: 0;
  box-shadow: none;
  padding: 48px 40px;
  overflow: visible;
}

.login-card .auth-logo { height: 48px; margin-bottom: 12px; }

.login-card p,
.login-card .login-toggle { text-align: center; }

.login-card form,
.login-card .mfa-icon,
.login-card h2,
.login-card .mfa-resend,
.login-card .status-dropup {
  width: 100%;
  max-width: 380px;
}

.signup-card { max-width: 580px; margin: 16px; }
.onboarding-card { max-width: 520px; margin: 16px; }
.pending-card { max-width: 460px; text-align: center; margin: 16px; }

.login-card h1,
.signup-card h1,
.onboarding-card h1,
.pending-card h1 {
  text-align: center;
  font-size: 28px;
  font-weight: 700;
  margin-bottom: 8px;
  color: var(--accent);
  letter-spacing: -0.5px;
}

.auth-logo {
  display: block;
  margin: 0 auto 8px;
  height: 40px;
  width: auto;
  object-fit: contain;
}

.login-card p,
.signup-card > p,
.pending-card > p {
  text-align: center;
  color: var(--text-secondary);
  margin-bottom: 32px;
}

.pending-card h2 {
  font-size: 22px;
  font-weight: 700;
  margin-bottom: 12px;
  color: var(--text-primary);
}

.pending-icon {
  font-size: 48px;
  margin-bottom: 16px;
}

.step-indicator {
  text-align: center;
  font-size: 13px;
  color: var(--accent);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  background: var(--accent-light);
  width: fit-content;
  margin: 0 auto 24px;
  padding: 6px 16px;
  border-radius: 20px;
}

/* Section divider labels inside signup form */
.signup-section-label {
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  color: var(--text-tertiary);
  margin-top: 24px;
  margin-bottom: 12px;
  padding-top: 20px;
  border-top: 1px solid var(--divider);
}

.signup-section-label:first-of-type {
  margin-top: 0;
  padding-top: 0;
  border-top: none;
}

/* Login / Signup toggle */
.login-toggle {
  text-align: center;
  margin-top: 20px;
  font-size: 14px;
  color: var(--text-secondary);
}

.login-toggle a {
  color: var(--accent);
  text-decoration: none;
  font-weight: 600;
  transition: color var(--transition);
}

.login-toggle a:hover {
  color: var(--accent-hover);
  text-decoration: underline;
}

/* ── Status Drop-up ───────────────────────────── */
.status-dropup {
  position: relative;
  margin-top: 32px;
  width: 100%;
  max-width: 380px;
}

.status-dropup-toggle {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  padding: 10px 16px;
  background: none;
  border: 1px solid var(--divider);
  border-radius: var(--radius-sm);
  color: var(--text-secondary);
  font-size: 13px;
  font-family: inherit;
  cursor: pointer;
  transition: all var(--transition);
}

.status-dropup-toggle:hover {
  border-color: var(--accent);
  color: var(--text-primary);
}

.status-dropup-chevron {
  width: 16px;
  height: 16px;
  transform: rotate(180deg);
  transition: transform var(--transition);
}

.status-dropup-toggle.open .status-dropup-chevron {
  transform: rotate(0deg);
}

.status-dropup-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #34C759;
  flex-shrink: 0;
}

.status-dropup-panel {
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  right: 0;
  background: var(--surface);
  border: 1px solid var(--divider);
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow-lg);
  padding: 8px 0;
  z-index: 100;
  animation: dropdown-in 0.15s ease-out;
}

@keyframes dropdown-in {
  from { opacity: 0; transform: translateY(-8px); }
  to { opacity: 1; transform: translateY(0); }
}

.status-dropup-header {
  padding: 8px 16px 12px;
  font-size: 12px;
  font-weight: 600;
  color: var(--text-tertiary);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  border-bottom: 1px solid var(--divider);
  margin-bottom: 4px;
}

.status-dropup-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 16px;
  font-size: 14px;
  color: var(--text-primary);
}

.status-dropup-label {
  margin-left: auto;
  font-size: 13px;
  color: #34C759;
  font-weight: 500;
}

/* ── Forms ─────────────────────────────────────── */
.form-group {
  margin-bottom: 16px;
}

.form-group label {
  display: block;
  font-size: 13px;
  color: var(--text-secondary);
  margin-bottom: 6px;
  font-weight: 500;
}

.form-group input,
.form-group select,
.form-group textarea {
  width: 100%;
  padding: 12px 14px;
  background: var(--bg);
  border: 1.5px solid var(--divider);
  border-radius: var(--radius-sm);
  color: var(--text-primary);
  font-size: 15px;
  outline: none;
  transition: border-color var(--transition), box-shadow var(--transition);
  font-family: inherit;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-light);
}

.form-group input::placeholder,
.form-group textarea::placeholder {
  color: var(--text-tertiary);
}

.form-group input[type="color"] {
  height: 44px;
  cursor: pointer;
}

.form-row {
  display: flex;
  gap: 12px;
}

.form-row .form-group { flex: 1; }

.checkbox-group {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 16px;
}

.checkbox-group input[type="checkbox"] {
  width: 18px;
  height: 18px;
  accent-color: var(--accent);
  cursor: pointer;
}

.checkbox-group label {
  font-size: 14px;
  color: var(--text-secondary);
  cursor: pointer;
}

.login-error {
  color: var(--destructive);
  font-size: 13px;
  text-align: center;
  min-height: 20px;
  margin-bottom: 8px;
  background: var(--destructive-light);
  border-radius: var(--radius-sm);
  padding: 8px 12px;
}

.login-error:empty {
  background: transparent;
  padding: 0;
}

/* ── Buttons ───────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 12px 24px;
  border: none;
  border-radius: var(--radius-sm);
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--transition);
  font-family: inherit;
  letter-spacing: -0.1px;
}

.btn:hover {
  transform: translateY(-1px);
  box-shadow: var(--shadow-sm);
}

.btn:active {
  transform: translateY(0);
}

.btn-primary {
  background: var(--accent);
  color: #ffffff;
  width: 100%;
  border-radius: var(--radius-sm);
}

.btn-primary:hover {
  background: var(--accent-hover);
}

.btn-success {
  background: var(--accent);
  color: #ffffff;
}

.btn-success:hover {
  background: var(--accent-hover);
}

.btn-danger {
  background: var(--destructive);
  color: #ffffff;
}

.btn-danger:hover {
  background: #dc2626;
}

.btn-ghost {
  background: var(--surface);
  color: var(--text-primary);
  border: 1px solid var(--divider);
}

.btn-ghost:hover {
  background: var(--surface-elevated);
}

.btn-sm {
  padding: 7px 14px;
  font-size: 13px;
  border-radius: 8px;
}

/* ── Dashboard Layout ──────────────────────────── */
#dashboard {
  display: flex;
  min-height: 100vh;
}

.sidebar {
  width: var(--sidebar-width);
  background: var(--surface);
  border-right: 1px solid var(--divider);
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 20px 0;
  min-height: 100vh;
  position: sticky;
  top: 0;
  overflow: hidden;
}

/* Purple gradient blob on left edge */
.sidebar::before {
  content: '';
  position: absolute;
  left: -40px;
  top: 60px;
  width: 70px;
  height: 140px;
  background: linear-gradient(135deg, #652CD1, #8b5cf6);
  border-radius: 50%;
  filter: blur(10px);
  opacity: 0.7;
}

.sidebar-brand {
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 28px;
  flex-shrink: 0;
  position: relative;
  z-index: 1;
}

.sidebar-brand-icon {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  display: block;
}

.sidebar nav {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  padding: 0;
  width: 100%;
}

.nav-btn {
  width: 44px;
  height: 44px;
  border: none;
  background: none;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: #8a8a8e;
  transition: all 0.2s;
  position: relative;
  z-index: 1;
}

.nav-btn svg {
  width: 22px;
  height: 22px;
}

.nav-btn:hover {
  background: var(--accent-light);
  color: var(--accent);
}

.nav-btn.active {
  background: var(--accent-light);
  color: var(--accent);
}

.sidebar-footer {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  padding: 0;
  border-top: none;
}

.sidebar-footer .user-email {
  display: none;
}

.main-content {
  flex: 1;
  padding: 32px 40px;
  overflow-y: auto;
  background: var(--bg);
}

.section-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 28px;
}

.section-header h2 {
  font-size: 24px;
  font-weight: 700;
  color: var(--text-primary);
  letter-spacing: -0.3px;
}

/* ── Table ─────────────────────────────────────── */
table {
  width: 100%;
  border-collapse: collapse;
  background: var(--surface);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
}

th {
  text-align: left;
  padding: 14px 16px;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--text-tertiary);
  border-bottom: 1px solid var(--divider);
  background: var(--sidebar-bg);
  font-weight: 600;
}

td {
  padding: 14px 16px;
  border-bottom: 1px solid var(--divider);
  font-size: 14px;
  color: var(--text-primary);
}

tr:last-child td {
  border-bottom: none;
}

tr:hover { background: var(--accent-light); }

.badge {
  display: inline-block;
  padding: 5px 12px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 600;
}

.badge-success {
  background: var(--success-light);
  color: var(--success);
}

.badge-pending {
  background: var(--warning-light);
  color: #b45309;
}

.badge-deactivated {
  background: #f3f4f6;
  color: #6b7280;
}

.badge-role {
  background: var(--accent-light, #f0ebff);
  color: var(--accent);
}

.badge-perm {
  background: #f0f4ff;
  color: #3b6cf4;
  font-size: 11px;
  padding: 3px 8px;
}

/* ── Team Management ───────────────────────────── */
.section-header-actions {
  display: flex;
  gap: 8px;
  align-items: center;
}

.row-deactivated {
  opacity: 0.5;
}

.form-hint {
  display: block;
  font-size: 12px;
  color: var(--text-3);
  margin-top: 4px;
}

/* Permissions toggle grid */
.permissions-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  padding: 12px;
  background: var(--bg-2, #f9fafb);
  border-radius: var(--radius-sm, 10px);
  margin: 8px 0 16px;
}

.permission-toggle {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 10px;
  border-radius: 8px;
  cursor: pointer;
  transition: background 0.15s;
}

.permission-toggle:hover {
  background: rgba(0,0,0,0.04);
}

.permission-toggle input[type="checkbox"] {
  width: 18px;
  height: 18px;
  accent-color: var(--accent);
  cursor: pointer;
}

.permission-toggle input[type="checkbox"]:disabled {
  cursor: default;
  opacity: 0.6;
}

.permission-label {
  font-size: 13px;
  font-weight: 500;
  color: var(--text-primary);
}

/* Custom role items */
.custom-role-item {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  padding: 12px;
  border: 1px solid var(--divider);
  border-radius: var(--radius-sm, 10px);
  margin-bottom: 8px;
}

.custom-role-info strong {
  display: block;
  margin-bottom: 6px;
}

.custom-role-perms {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
}

.custom-role-actions {
  display: flex;
  gap: 4px;
  flex-shrink: 0;
}

/* ── Catalog Cards ─────────────────────────────── */
.catalog-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 16px;
}

.catalog-card {
  background: var(--surface);
  border-radius: var(--radius);
  padding: 20px;
  border: 1px solid var(--divider);
  box-shadow: var(--shadow-sm);
  transition: box-shadow var(--transition), transform var(--transition);
}

.catalog-card:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}

.catalog-card-header {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 10px;
}

.catalog-card-header strong {
  font-size: 15px;
  color: var(--text-primary);
}

.catalog-card-meta {
  font-size: 13px;
  color: var(--text-tertiary);
  margin-bottom: 14px;
}

.catalog-card-actions {
  display: flex;
  gap: 8px;
  padding-top: 12px;
  border-top: 1px solid var(--divider);
}

.color-dot {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  display: inline-block;
  box-shadow: 0 0 0 2px rgba(0, 0, 0, 0.08);
}

.sort-badge {
  font-size: 12px;
  color: var(--text-tertiary);
  margin-left: auto;
  background: var(--surface-elevated);
  padding: 2px 8px;
  border-radius: 12px;
}

.price {
  margin-left: auto;
  font-family: 'SF Mono', 'Fira Code', monospace;
  font-weight: 700;
  color: var(--accent);
  font-size: 15px;
}

/* ── Variant Row ───────────────────────────────── */
.variant-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 14px;
  background: var(--bg);
  border: 1px solid var(--divider);
  border-radius: var(--radius-sm);
  margin-bottom: 8px;
  font-size: 14px;
  transition: background var(--transition);
}

.variant-row:hover {
  background: var(--surface-elevated);
}

/* ── Modal ─────────────────────────────────────── */
.modal {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 100;
  background: rgba(26, 26, 46, 0.4);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  align-items: center;
  justify-content: center;
}

.modal.active { display: flex; }

.modal-content {
  background: var(--surface);
  border-radius: var(--radius);
  padding: 32px;
  width: 100%;
  max-width: 480px;
  max-height: 80vh;
  overflow-y: auto;
  box-shadow: var(--shadow-lg);
  border: 1px solid var(--divider);
  animation: modal-enter 0.2s ease-out;
}

@keyframes modal-enter {
  from {
    opacity: 0;
    transform: scale(0.95) translateY(10px);
  }
  to {
    opacity: 1;
    transform: scale(1) translateY(0);
  }
}

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 24px;
}

.modal-header h3 {
  font-size: 20px;
  font-weight: 700;
  color: var(--text-primary);
}

.modal-close {
  background: var(--surface-elevated);
  border: none;
  color: var(--text-tertiary);
  font-size: 18px;
  cursor: pointer;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all var(--transition);
}

.modal-close:hover {
  color: var(--text-primary);
  background: var(--divider);
}

/* ── Toast ─────────────────────────────────────── */
#toast {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%) translateY(80px);
  background: var(--text-primary);
  color: var(--surface);
  padding: 12px 24px;
  border-radius: 12px;
  font-weight: 600;
  font-size: 14px;
  transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  z-index: 200;
  box-shadow: var(--shadow-lg);
}

#toast.show { transform: translateX(-50%) translateY(0); }

/* ── Settings Form ─────────────────────────────── */
.settings-form {
  max-width: 640px;
}

.settings-form .btn-primary {
  margin-top: 20px;
  width: auto;
  padding: 12px 32px;
}

/* ── Settings Cards ───────────────────────────── */
.settings-card {
  background: var(--surface);
  border: 1px solid var(--divider);
  border-radius: var(--radius);
  padding: 28px 32px;
  margin-bottom: 24px;
  box-shadow: var(--shadow-sm);
}

.settings-card h3 {
  font-size: 18px;
  font-weight: 600;
  margin-bottom: 4px;
  color: var(--text-primary);
}

.settings-card-desc {
  font-size: 13px;
  color: var(--text-tertiary);
  margin-bottom: 20px;
  line-height: 1.5;
}

/* ── Field Tooltip ────────────────────────────── */
.label-with-tip {
  display: flex;
  align-items: center;
  gap: 6px;
}

.field-tip {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: var(--divider);
  color: var(--text-tertiary);
  font-size: 10px;
  font-weight: 700;
  cursor: help;
  flex-shrink: 0;
}

.field-tip::after {
  content: attr(data-tip);
  position: absolute;
  bottom: calc(100% + 8px);
  left: 50%;
  transform: translateX(-50%);
  background: var(--text-primary);
  color: #fff;
  font-size: 12px;
  font-weight: 400;
  line-height: 1.4;
  padding: 8px 12px;
  border-radius: 8px;
  white-space: normal;
  width: max-content;
  max-width: 260px;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.15s ease;
  z-index: 100;
  box-shadow: var(--shadow-md);
}

.field-tip:hover::after {
  opacity: 1;
}

/* ── Cash Register Cards ─────────────────────── */
.cash-register-card {
  border: 1px solid var(--divider);
  border-radius: var(--radius);
  padding: 20px 24px;
  margin-bottom: 16px;
  background: var(--bg);
}

.cash-register-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
}

.cash-register-name {
  font-weight: 600;
  font-size: 15px;
  color: var(--text-primary);
}

.cash-register-empty {
  text-align: center;
  padding: 32px 16px;
  color: var(--text-tertiary);
  font-size: 14px;
}

/* ── Company Profile Cards ─────────────────────── */
.profile-section h3 {
  font-size: 18px;
  font-weight: 600;
  margin-bottom: 8px;
  color: var(--text-primary);
}

.profile-note {
  font-size: 13px;
  color: var(--text-tertiary);
  margin-bottom: 16px;
  font-style: italic;
}

.profile-cards {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 12px;
}

.profile-card {
  background: var(--bg);
  border: 1px solid var(--divider);
  border-radius: var(--radius-sm);
  padding: 16px 18px;
  transition: box-shadow var(--transition);
}

.profile-card:hover {
  box-shadow: var(--shadow-sm);
}

.profile-label {
  display: block;
  font-size: 11px;
  color: var(--text-tertiary);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 6px;
  font-weight: 600;
}

.profile-value {
  display: block;
  font-size: 15px;
  color: var(--text-primary);
  font-weight: 500;
}

/* ── Role Select ───────────────────────────────── */
.role-select {
  background: var(--surface);
  color: var(--text-primary);
  border: 1.5px solid var(--divider);
  border-radius: var(--radius-sm);
  padding: 7px 12px;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  outline: none;
  transition: border-color var(--transition), box-shadow var(--transition);
  font-family: inherit;
}

.role-select:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-light);
}

/* ── Responsive ────────────────────────────────── */
@media (max-width: 768px) {
  #dashboard {
    flex-direction: column;
  }

  .sidebar {
    width: 100%;
    height: 60px;
    min-height: 60px;
    flex-direction: row;
    border-right: none;
    border-bottom: 1px solid var(--divider);
    position: relative;
    padding: 0 8px;
  }

  .sidebar::before { display: none; }

  .sidebar-brand {
    width: 32px;
    height: 32px;
    margin: 0 8px 0 0;
  }

  .sidebar-brand-icon { width: 32px; height: 32px; border-radius: 8px; }

  .sidebar nav {
    flex-direction: row;
    overflow-x: auto;
    gap: 4px;
    width: auto;
    flex: 1;
  }

  .nav-btn {
    width: 38px;
    height: 38px;
    flex-shrink: 0;
  }

  .sidebar-footer {
    flex-direction: row;
    gap: 4px;
  }

  .main-content {
    padding: 16px;
  }

  .overview-topbar-right { display: none; }

  .catalog-grid {
    grid-template-columns: 1fr;
  }

  .profile-cards {
    grid-template-columns: 1fr;
  }

  .form-row {
    flex-direction: column;
    gap: 0;
  }

  .login-card {
    padding: 32px 20px;
  }

  .signup-card,
  .onboarding-card,
  .pending-card {
    max-width: 100%;
    padding: 32px 20px;
    box-shadow: var(--shadow-md);
  }

  .modal-content {
    margin: 16px;
    max-height: 90vh;
  }

  .section-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
  }
}

@media (max-width: 480px) {
  .main-content {
    padding: 12px;
  }

  .section-header h2 {
    font-size: 20px;
  }

  .catalog-card {
    padding: 16px;
  }
}

/* ── Overview Section ─────────────────────────── */
.overview-topbar {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 28px;
}

.overview-topbar-left h2 {
  font-size: 24px;
  font-weight: 700;
  color: var(--text-primary);
  letter-spacing: -0.3px;
}

.overview-greeting {
  color: var(--text-secondary);
  font-size: 15px;
  margin-top: 4px;
}

.overview-topbar-right {
  display: flex;
  align-items: center;
  gap: 16px;
}

/* Date range filter buttons */
.date-range-btns {
  display: flex;
  gap: 6px;
}

.range-btn {
  padding: 6px 14px;
  border-radius: 8px;
  border: 1px solid var(--divider);
  background: var(--surface);
  color: var(--text-secondary);
  font-size: 13px;
  font-weight: 500;
  font-family: inherit;
  cursor: pointer;
  transition: all 0.15s;
}

.range-btn.active,
.range-btn:hover {
  background: var(--accent);
  color: #fff;
  border-color: var(--accent);
}

/* Overview stats row */
.overview-stats {
  display: flex;
  gap: 16px;
  margin-top: 12px;
}

.stat-item {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.stat-value {
  font-size: 15px;
  font-weight: 700;
  color: var(--text-primary);
}

.stat-label {
  font-size: 11px;
  color: var(--text-tertiary);
  text-transform: uppercase;
  letter-spacing: 0.3px;
}

.search-bar {
  position: relative;
  width: 280px;
}

.search-bar input {
  width: 100%;
  padding: 10px 16px 10px 40px;
  border: 1.5px solid var(--divider);
  border-radius: 10px;
  font-size: 14px;
  color: var(--text-primary);
  background: var(--surface);
  outline: none;
  font-family: inherit;
  transition: border-color var(--transition);
}

.search-bar input::placeholder { color: var(--text-tertiary); }
.search-bar input:focus { border-color: var(--accent); }

.search-icon {
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  width: 18px;
  height: 18px;
  color: var(--text-tertiary);
  pointer-events: none;
}

.topbar-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: linear-gradient(135deg, #c4b5fd, #8b5cf6);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 600;
  color: #fff;
  font-size: 16px;
  flex-shrink: 0;
}

.overview-grid {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  grid-template-areas:
    "balance promo promo"
    "transactions receipts conversion"
    "employees chart chart";
  gap: 20px;
}

/* Widget base */
.widget {
  background: var(--surface);
  border-radius: 20px;
  padding: 24px;
  box-shadow: 0 4px 16px rgba(124, 92, 252, 0.08);
  border: 1px solid var(--divider);
}

.widget-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
}

.widget-header h3 {
  font-size: 17px;
  font-weight: 600;
  color: var(--text-primary);
}

.widget-empty {
  color: var(--text-tertiary);
  font-size: 14px;
  text-align: center;
  padding: 20px 0;
}

.widget-note {
  color: var(--text-tertiary);
  font-size: 13px;
  margin-top: 12px;
}

/* ── Balance Card Widget ──────────────────────── */
.widget-balance {
  grid-area: balance;
  padding: 24px;
  background: transparent;
  border: none;
  box-shadow: none;
  position: relative;
}

.balance-card-back {
  position: absolute;
  top: 32px;
  left: 12px;
  right: 28px;
  bottom: 12px;
  background: linear-gradient(135deg, #c4b5fd, #e8defe);
  border-radius: 16px;
  transform: rotate(-8deg);
  box-shadow: 0 12px 21px -8px rgba(119, 99, 234, 0.2);
}

.balance-card {
  background: linear-gradient(135deg, #652CD1 0%, #8b5cf6 50%, #c4b5fd 100%);
  border-radius: 16px;
  padding: 28px 24px;
  color: #fff;
  min-height: 200px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  position: relative;
  z-index: 1;
  overflow: hidden;
}

.balance-card::before {
  content: '';
  position: absolute;
  top: -30%;
  right: -20%;
  width: 200px;
  height: 200px;
  background: rgba(255, 255, 255, 0.08);
  border-radius: 50%;
}

.balance-card::after {
  content: '';
  position: absolute;
  bottom: -40%;
  left: -10%;
  width: 180px;
  height: 180px;
  background: rgba(255, 255, 255, 0.05);
  border-radius: 50%;
}

.balance-label {
  font-size: 14px;
  opacity: 0.85;
  position: relative;
  z-index: 1;
}

.balance-amount {
  font-size: 32px;
  font-weight: 700;
  margin: 8px 0;
  position: relative;
  z-index: 1;
}

.balance-card-details {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  position: relative;
  z-index: 1;
}

.balance-card-number {
  font-size: 14px;
  opacity: 0.7;
  letter-spacing: 2px;
}

.balance-card-brand {
  font-size: 12px;
  font-weight: 700;
  opacity: 0.6;
  letter-spacing: 1px;
}

/* ── Promo Banner ─────────────────────────────── */
.widget-promo {
  grid-area: promo;
  background: linear-gradient(135deg, #f8f6ff 0%, #ece8ff 100%);
  display: flex;
  flex-direction: column;
  justify-content: center;
  position: relative;
  overflow: hidden;
}

.widget-promo::after {
  content: '';
  position: absolute;
  top: -20%;
  right: -5%;
  width: 160px;
  height: 160px;
  background: rgba(124, 92, 252, 0.06);
  border-radius: 50%;
}

.widget-promo h3 {
  font-size: 24px;
  font-weight: 700;
  margin-bottom: 8px;
  color: var(--text-primary);
}

.widget-promo p {
  color: var(--text-secondary);
  margin-bottom: 16px;
  font-size: 14px;
  line-height: 1.5;
}

.btn-promo {
  background: var(--accent);
  color: #fff;
  border: none;
  padding: 12px 32px;
  border-radius: 24px;
  font-weight: 600;
  font-size: 15px;
  cursor: pointer;
  width: fit-content;
  transition: all var(--transition);
  font-family: inherit;
}

.btn-promo:hover {
  background: var(--accent-hover);
  transform: translateY(-1px);
  box-shadow: var(--shadow-sm);
}

/* ── Transactions Widget ──────────────────────── */
.widget-transactions { grid-area: transactions; }

.transaction-list {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.transaction-item {
  display: flex;
  align-items: center;
  gap: 14px;
}

.transaction-icon {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  font-weight: 600;
  flex-shrink: 0;
}

.transaction-icon-out {
  background: rgba(239, 68, 68, 0.08);
  color: var(--destructive);
  transform: rotate(45deg);
}

.transaction-icon-in {
  background: rgba(16, 185, 129, 0.08);
  color: var(--success);
}

.transaction-icon-in svg {
  flex-shrink: 0;
}

.transaction-info {
  flex: 1;
  min-width: 0;
}

.transaction-title {
  font-size: 14px;
  font-weight: 500;
  color: var(--text-primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.transaction-date {
  font-size: 12px;
  color: var(--text-tertiary);
  margin-top: 2px;
}

.transaction-amount {
  font-size: 15px;
  font-weight: 600;
  white-space: nowrap;
}

.transaction-amount-out { color: var(--destructive); }
.transaction-amount-in { color: var(--success); }
.transaction-amount-refunded { color: var(--destructive); text-decoration: line-through; }
.transaction-amount-voided { color: var(--text-tertiary); text-decoration: line-through; }

.transaction-icon-refunded {
  background: rgba(239, 68, 68, 0.08);
  color: var(--destructive);
}

.transaction-badge-refunded {
  display: inline-block;
  font-size: 10px;
  font-weight: 600;
  padding: 1px 6px;
  border-radius: 4px;
  background: rgba(239, 68, 68, 0.1);
  color: var(--destructive);
  margin-left: 6px;
  vertical-align: middle;
}

.transaction-badge-voided {
  display: inline-block;
  font-size: 10px;
  font-weight: 600;
  padding: 1px 6px;
  border-radius: 4px;
  background: rgba(107, 114, 128, 0.1);
  color: var(--text-tertiary);
  margin-left: 6px;
  vertical-align: middle;
}

.btn-refund {
  background: none;
  border: 1px solid var(--divider);
  border-radius: 6px;
  padding: 4px 10px;
  font-size: 12px;
  color: var(--text-secondary);
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.15s;
  flex-shrink: 0;
}

.btn-refund:hover {
  border-color: var(--destructive);
  color: var(--destructive);
  background: rgba(239, 68, 68, 0.05);
}

.btn-refund:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

/* ── Receipts Widget ──────────────────────────── */
.receipt-input-row {
  display: flex;
  gap: 10px;
}

.receipt-input {
  flex: 1;
  padding: 10px 16px;
  border: 1.5px solid var(--divider);
  border-radius: 24px;
  outline: none;
  font-size: 14px;
  font-family: inherit;
  background: var(--bg);
  color: var(--text-primary);
  transition: border-color var(--transition);
}

.receipt-input::placeholder { color: var(--text-tertiary); }
.receipt-input:focus { border-color: var(--accent); }

.btn-circle-accent {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--accent);
  color: #fff;
  border: none;
  font-size: 18px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: all var(--transition);
}

.btn-circle-accent:hover {
  background: var(--accent-hover);
  transform: translateY(-1px);
}

/* ── Conversion Widget ────────────────────────── */
.conversion-row {
  display: flex;
  align-items: center;
  gap: 12px;
}

.conversion-field {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 10px 14px;
  background: var(--bg);
  border-radius: 10px;
  border: 1px solid var(--divider);
  font-size: 14px;
  color: var(--text-primary);
}

.conversion-currency {
  font-weight: 600;
  color: var(--text-secondary);
  font-size: 13px;
}

.conversion-arrow {
  color: var(--accent);
  font-size: 20px;
  font-weight: 600;
  flex-shrink: 0;
}

/* ── Employees Widget ─────────────────────────── */
.employee-avatars {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 16px;
}

.avatar-circle {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 15px;
  font-weight: 600;
  color: var(--text-primary);
}

.avatar-add {
  background: var(--bg) !important;
  border: 2px dashed var(--divider);
  color: var(--text-tertiary);
  font-size: 20px;
  cursor: pointer;
  transition: all var(--transition);
}

.avatar-add:hover {
  border-color: var(--accent);
  color: var(--accent);
}

.employee-search-row {
  display: flex;
  gap: 10px;
  margin-top: 16px;
}

/* ── Chart Widget ─────────────────────────────── */
.widget-chart { grid-area: chart; }

.chart-date-range {
  font-size: 13px;
  color: var(--text-tertiary);
}

.chart-placeholder {
  position: relative;
  padding-left: 40px;
  padding-bottom: 30px;
}

.chart-svg {
  width: 100%;
  height: 200px;
}

.chart-labels {
  display: flex;
  justify-content: space-between;
  padding-left: 0;
  margin-top: 8px;
  font-size: 12px;
  color: var(--text-tertiary);
}

.chart-y-labels {
  position: absolute;
  left: 0;
  top: 0;
  height: 200px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  font-size: 12px;
  color: var(--text-tertiary);
}

/* ── Overview Grid Layout (precise) ───────────── */
.widget-receipts { grid-area: receipts; }
.widget-conversion { grid-area: conversion; }
.widget-employees { grid-area: employees; }

/* ── Overview Responsive ──────────────────────── */
@media (max-width: 768px) {
  .overview-grid {
    grid-template-columns: 1fr;
    grid-template-areas:
      "balance"
      "promo"
      "transactions"
      "receipts"
      "conversion"
      "employees"
      "chart";
  }
}

@media (max-width: 480px) {
  .balance-amount {
    font-size: 26px;
  }

  .widget-promo h3 {
    font-size: 20px;
  }
}

/* ══════════════════════════════════════════════════
   Landing Page — Figma Redesign
   ══════════════════════════════════════════════════ */

#landing-page {
  background: var(--surface);
  min-height: 100vh;
}

/* ── Landing Nav (inside hero gradient) ──────── */
.landing-nav {
  position: relative;
  z-index: 10;
}

.landing-nav-inner {
  max-width: 1312px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 60px;
}

.landing-logo {
  display: flex;
  align-items: center;
  gap: 16px;
  color: #fff;
  font-size: 24px;
  font-weight: 600;
  letter-spacing: -0.5px;
  text-decoration: none;
}

.landing-logo-icon {
  width: 50px;
  height: 50px;
  background: #fff;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--accent);
  overflow: hidden;
  padding: 10px;
}

.landing-logo-img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  transform: scaleY(-1);
}

.landing-logo-full {
  height: 36px;
  width: auto;
  object-fit: contain;
}

.landing-logo-icon svg {
  width: 28px;
  height: 28px;
}

.landing-nav-links {
  display: flex;
  align-items: center;
  gap: 0;
}

.landing-nav-links a {
  color: #fff;
  text-decoration: none;
  font-size: 16px;
  font-weight: 500;
  padding: 8px 24px;
  border-radius: 500px;
  transition: background var(--transition);
  line-height: 26px;
}

.landing-nav-links a:hover,
.landing-nav-links a.active {
  background: rgba(255, 255, 255, 0.1);
}

.landing-nav-actions {
  display: flex;
  gap: 8px;
  align-items: center;
}

.btn-hero-cta {
  background: #fff;
  color: var(--text-primary);
  border: none;
  padding: 12px 24px;
  border-radius: 5000px;
  font-weight: 600;
  font-size: 16px;
  cursor: pointer;
  transition: all var(--transition);
  font-family: inherit;
}

.btn-hero-cta:hover {
  transform: translateY(-1px);
  box-shadow: var(--shadow-md);
}

.btn-hero-cta-main {
  background: #fff;
  color: var(--text-primary);
  border: none;
  padding: 12px 24px;
  border-radius: 5000px;
  font-weight: 600;
  font-size: 16px;
  cursor: pointer;
  transition: all var(--transition);
  font-family: inherit;
}

.btn-hero-cta-main:hover {
  transform: translateY(-1px);
  box-shadow: var(--shadow-lg);
}

/* ── Hero Section ────────────────────────────── */
.landing-hero {
  position: relative;
  overflow: hidden;
  padding: 50px 64px 64px;
}

.landing-hero-bg {
  position: absolute;
  inset: 0;
  background: var(--hero-gradient);
  z-index: 0;
}

.landing-hero-bg::after {
  content: '';
  position: absolute;
  inset: 0;
  background: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.65' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)' opacity='0.3'/%3E%3C/svg%3E");
  background-size: 256px 256px;
  mix-blend-mode: soft-light;
  opacity: 0.3;
}

.landing-hero-content {
  position: relative;
  z-index: 1;
  max-width: 1312px;
  margin: 0 auto;
  min-height: 670px;
  padding-top: 64px;
}

.landing-hero-text {
  display: flex;
  flex-direction: column;
  gap: 32px;
  align-items: flex-start;
  max-width: 660px;
}

.landing-badge-hero {
  display: inline-block;
  background: rgba(255, 255, 255, 0.1);
  border: 0.5px solid rgba(255, 255, 255, 0.3);
  color: #fff;
  padding: 8px 20px;
  border-radius: 500px;
  font-size: 16px;
  font-weight: 600;
}

.landing-hero-text h1 {
  font-size: 72px;
  font-weight: 600;
  font-style: italic;
  line-height: 82px;
  color: #fff;
  letter-spacing: -2px;
  text-transform: capitalize;
}

.landing-hero-text p {
  font-size: 20px;
  line-height: 30px;
  color: #fff;
  font-weight: 400;
}

.hero-asset {
  position: absolute;
  right: 64px;
  top: 132px;
  width: 450px;
  height: 916px;
  pointer-events: none;
  z-index: 2;
}

.hero-phone-img {
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  height: 100%;
  width: auto;
  object-fit: contain;
  filter: drop-shadow(0 20px 60px rgba(0, 0, 0, 0.3));
  pointer-events: none;
}

.hero-stat-card {
  position: absolute;
  background: #fff;
  border-radius: 12px;
  padding: 12px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  box-shadow: var(--shadow-card-bold);
  width: 182px;
  z-index: 2;
}

.hero-stat-left {
  top: 88px;
  left: -133px;
  transform: rotate(-7.5deg);
}

.hero-stat-right {
  top: 469px;
  right: -67px;
  transform: rotate(7.5deg);
}

.hero-stat-icon {
  width: 38px;
  height: 38px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.hero-stat-content {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.hero-stat-value {
  font-size: 24px;
  font-weight: 600;
  color: var(--text-primary);
  line-height: 32px;
}

.hero-stat-label {
  font-size: 14px;
  color: #97A3B6;
  line-height: 26px;
}

/* ── Shared Section Styles ───────────────────── */
.landing-section-inner {
  max-width: 1440px;
  margin: 0 auto;
  padding: 0 64px;
}

.landing-section-header {
  text-align: center;
  margin-bottom: 48px;
}

.landing-badge {
  display: inline-block;
  background: var(--accent-light);
  color: var(--accent);
  padding: 8px 20px;
  border-radius: 500px;
  font-size: 16px;
  font-weight: 500;
  margin-bottom: 16px;
}

.landing-section-header h2 {
  font-size: 48px;
  font-weight: 600;
  font-style: italic;
  letter-spacing: -1px;
  color: var(--text-primary);
  line-height: 58px;
  text-transform: capitalize;
}

/* ── Services Section ────────────────────────── */
.landing-services {
  background: var(--surface);
  padding: 112px 0 80px;
}

.services-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

.service-card {
  background: var(--surface);
  border-radius: 20px;
  border: 1px solid var(--divider);
  padding: 32px;
  display: flex;
  flex-direction: column;
  gap: 24px;
  transition: transform var(--transition), box-shadow var(--transition);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
}

.service-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-card);
}

.service-card-desc h3 {
  font-size: 24px;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 8px;
  text-align: center;
}

.service-card-desc p {
  font-size: 16px;
  color: var(--text-secondary);
  line-height: 26px;
  text-align: center;
}

/* Mock: Transaction list */
.mock-transactions {
  background: var(--bg);
  border-radius: 12px;
  padding: 16px;
}

.mock-tx-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
}

.mock-tx-title { font-size: 13px; font-weight: 600; color: var(--text-primary); }
.mock-tx-date { font-size: 12px; color: var(--text-secondary); }

.mock-tx-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px 0;
}

.mock-tx-row + .mock-tx-row { border-top: 1px solid var(--divider); }

.mock-tx-info { display: flex; flex-direction: column; gap: 2px; }
.mock-tx-card { font-size: 14px; font-weight: 600; color: var(--text-primary); }
.mock-tx-detail { font-size: 12px; color: var(--text-secondary); }
.mock-tx-amount { font-size: 14px; font-weight: 600; color: var(--text-primary); }
.mock-tx-amount.green { color: var(--accent); }

/* Mock: Balance card */
.mock-balance {
  background: var(--bg);
  border-radius: 12px;
  padding: 20px;
  text-align: center;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.mock-balance-label { font-size: 13px; color: var(--text-secondary); }
.mock-balance-value { font-size: 32px; font-weight: 600; color: var(--text-primary); }
.mock-balance-info { font-size: 11px; color: var(--text-secondary); margin-top: 8px; }

/* Mock: Credit card */
.mock-creditcard {
  background: var(--hero-gradient);
  border-radius: 16px;
  padding: 24px 20px;
  color: #fff;
  display: flex;
  flex-direction: column;
  gap: 16px;
  min-height: 180px;
}

.mock-cc-brand { font-size: 16px; font-weight: 600; letter-spacing: 1px; }
.mock-cc-number { font-size: 15px; font-weight: 500; letter-spacing: 2px; margin-top: auto; }
.mock-cc-bottom { display: flex; gap: 32px; }
.mock-cc-field { display: flex; flex-direction: column; gap: 2px; }
.mock-cc-label { font-size: 10px; opacity: 0.7; }
.mock-cc-val { font-size: 13px; font-weight: 600; }

/* ── Features Section ────────────────────────── */
.landing-features {
  background: var(--accent-50);
  padding: 112px 0 80px;
}

.features-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

.feature-card {
  background: var(--surface);
  border-radius: 20px;
  border: 1px solid var(--divider);
  padding: 32px;
  display: flex;
  flex-direction: column;
  gap: 20px;
  transition: transform var(--transition), box-shadow var(--transition);
  overflow: hidden;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
  min-height: 320px;
}

.feature-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-card);
}

.feature-card-wide {
  grid-column: span 1;
}

.features-grid .feature-card:nth-child(4),
.features-grid .feature-card:nth-child(5) {
  /* Row 2: 2 wide cards */
}

/* Make row 2 into 2 columns */
.features-grid {
  grid-template-columns: repeat(3, 1fr);
}

/* Override: last 2 items span wider */
.feature-card:nth-child(4) { grid-column: 1 / 3; }
.feature-card:nth-child(5) { grid-column: 3 / 4; }

/* Actually use a better approach: first 3 in row, last 2 split */
@supports (grid-template-columns: repeat(6, 1fr)) {
  .features-grid {
    grid-template-columns: repeat(6, 1fr);
  }
  .feature-card:nth-child(1),
  .feature-card:nth-child(2),
  .feature-card:nth-child(3) {
    grid-column: span 2;
  }
  .feature-card:nth-child(4) {
    grid-column: span 3;
  }
  .feature-card:nth-child(5) {
    grid-column: span 3;
  }
}

.feature-card-desc h3 {
  font-size: 22px;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 8px;
  text-align: center;
}

.feature-card-desc p {
  font-size: 16px;
  color: var(--text-secondary);
  line-height: 26px;
  text-align: center;
}

.feature-card-visual {
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 16px;
}

/* Mock: Lock */
.mock-lock {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
}

.mock-lock-dots {
  display: flex;
  gap: 8px;
}

.mock-lock-dots span {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--accent);
  opacity: 0.6;
}

/* Mock: Chart */
.mock-chart {
  width: 100%;
  background: var(--bg);
  border-radius: 12px;
  padding: 16px;
}

.mock-chart-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
}

.mock-chart-filter { font-size: 12px; color: var(--text-secondary); }
.mock-chart-value { font-size: 14px; font-weight: 600; color: var(--accent); }

.mock-chart-bars {
  display: flex;
  align-items: flex-end;
  gap: 12px;
  height: 120px;
}

.mock-bar-group {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  height: 100%;
  justify-content: flex-end;
}

.mock-bar {
  width: 100%;
  max-width: 30px;
  background: var(--accent-light);
  border-radius: 4px 4px 0 0;
}

.mock-bar.highlight {
  background: var(--accent);
}

.mock-bar-group span {
  font-size: 10px;
  color: var(--text-secondary);
}

/* Mock: Currencies */
.mock-currencies {
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 16px;
  background: var(--bg);
  border-radius: 12px;
  padding: 16px;
}

.mock-currency-row {
  display: flex;
  align-items: center;
  gap: 12px;
}

.mock-currency-flag {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--accent-light);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 10px;
  font-weight: 700;
  color: var(--accent);
}

.mock-currency-info { flex: 1; font-size: 13px; color: var(--text-secondary); }
.mock-currency-amount { font-size: 14px; font-weight: 600; color: var(--text-primary); }

/* Mock: Team avatars */
.mock-team {
  display: flex;
  gap: -8px;
  justify-content: center;
}

.mock-avatar {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: var(--accent-light);
  border: 3px solid var(--surface);
  margin-left: -8px;
}

.mock-avatar:first-child { margin-left: 0; }

/* Mock: Notifications */
.mock-notifications {
  width: 100%;
  background: var(--bg);
  border-radius: 12px;
  padding: 16px;
}

.mock-notif-header {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 16px;
}

.mock-notif-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 8px 0;
}

.mock-notif-row + .mock-notif-row { border-top: 1px solid var(--divider); }

.mock-notif-icon {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.mock-notif-icon.green-bg { background: rgba(16, 185, 129, 0.1); }
.mock-notif-icon.red-bg { background: rgba(239, 68, 68, 0.1); }

.mock-notif-info {
  flex: 1;
  display: flex;
  flex-direction: column;
}

.mock-notif-info span { font-size: 14px; font-weight: 600; color: var(--text-primary); }
.mock-notif-info .sub { font-size: 12px; font-weight: 400; color: var(--text-secondary); }

.mock-notif-amount { font-size: 14px; font-weight: 600; white-space: nowrap; }
.mock-notif-amount.green { color: var(--success); }
.mock-notif-amount.red { color: var(--destructive); }

/* ── Workflow Section ────────────────────────── */
.landing-workflow {
  position: relative;
  padding: 112px 0;
  overflow: hidden;
}

.landing-workflow-bg {
  position: absolute;
  inset: 0;
  background: var(--hero-gradient);
  z-index: 0;
}

.landing-workflow-bg::after {
  content: '';
  position: absolute;
  inset: 0;
  background: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.65' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)' opacity='0.3'/%3E%3C/svg%3E");
  background-size: 256px 256px;
  mix-blend-mode: soft-light;
  opacity: 0.3;
}

.landing-workflow .landing-section-inner {
  position: relative;
  z-index: 1;
}

.workflow-content {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 80px;
  align-items: center;
}

.workflow-left h2 {
  font-size: 48px;
  font-weight: 600;
  font-style: italic;
  color: #fff;
  line-height: 58px;
  letter-spacing: -1px;
  text-transform: capitalize;
  margin-top: 16px;
  margin-bottom: 24px;
}

.workflow-left p {
  font-size: 16px;
  color: rgba(255, 255, 255, 0.7);
  line-height: 28px;
}

.workflow-timeline {
  display: flex;
  flex-direction: column;
  gap: 0;
  position: relative;
  padding-left: 24px;
}

.workflow-timeline::before {
  content: '';
  position: absolute;
  left: 20px;
  top: 20px;
  bottom: 20px;
  width: 2px;
  background: rgba(255, 255, 255, 0.2);
}

.workflow-step {
  display: flex;
  align-items: flex-start;
  gap: 20px;
  padding: 16px 0;
  position: relative;
}

.workflow-step-icon {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.15);
  border: 2px solid rgba(255, 255, 255, 0.3);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  color: #fff;
  z-index: 1;
}

.workflow-step-text h4 {
  font-size: 18px;
  font-weight: 600;
  color: #fff;
  margin-bottom: 4px;
}

.workflow-step-text p {
  font-size: 14px;
  color: rgba(255, 255, 255, 0.6);
  line-height: 22px;
}

/* ── Testimonials Section ────────────────────── */
.landing-testimonials {
  background: var(--surface);
  padding: 112px 0 80px;
}

.testimonials-content {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 80px;
  align-items: flex-start;
}

.testimonials-left h2 {
  font-size: 48px;
  font-weight: 600;
  font-style: italic;
  color: var(--text-primary);
  line-height: 58px;
  letter-spacing: -1px;
  text-transform: capitalize;
  margin-top: 16px;
}

.testimonial-quote {
  font-size: 20px;
  line-height: 34px;
  color: var(--text-primary);
  font-weight: 400;
}

.testimonial-divider {
  height: 1px;
  background: var(--divider);
  margin: 24px 0;
}

.testimonial-author {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.testimonial-profile {
  display: flex;
  align-items: center;
  gap: 16px;
}

.testimonial-avatar {
  width: 62px;
  height: 62px;
  border-radius: 50%;
  background: var(--accent-light);
}

.testimonial-name {
  font-size: 18px;
  font-weight: 600;
  color: var(--text-primary);
}

.testimonial-arrows {
  display: flex;
  gap: 24px;
}

.testimonial-arrow {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 1px solid var(--divider);
  background: var(--surface);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: var(--text-primary);
  transition: all var(--transition);
}

.testimonial-arrow:hover {
  background: var(--accent);
  color: #fff;
  border-color: var(--accent);
}

.testimonial-separator {
  height: 1px;
  background: var(--divider);
  margin: 64px 0;
}

.testimonial-stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 40px;
}

.stat-item {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.stat-number {
  font-size: 56px;
  font-weight: 600;
  color: var(--text-primary);
  line-height: 70px;
}

.stat-label {
  font-size: 16px;
  color: var(--text-secondary);
  line-height: 26px;
}

/* ── Blog Section ────────────────────────────── */
.landing-blog {
  background: var(--surface);
  padding: 112px 0 80px;
}

.blog-header {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 80px;
  align-items: flex-start;
  margin-bottom: 48px;
}

.blog-header-left h2 {
  font-size: 48px;
  font-weight: 600;
  font-style: italic;
  color: var(--text-primary);
  line-height: 58px;
  letter-spacing: -1px;
  text-transform: capitalize;
  margin-top: 16px;
}

.blog-header-right {
  padding-top: 37px;
}

.blog-header-right p {
  font-size: 16px;
  color: var(--text-secondary);
  line-height: 26px;
  margin-bottom: 24px;
}

.btn-outlined {
  background: transparent;
  border: 1.5px solid var(--text-primary);
  color: var(--text-primary);
  padding: 10px 24px;
  border-radius: 5000px;
  font-weight: 600;
  font-size: 14px;
  cursor: pointer;
  transition: all var(--transition);
  font-family: inherit;
}

.btn-outlined:hover {
  background: var(--text-primary);
  color: #fff;
}

.blog-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

.blog-card {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.blog-card-img {
  width: 100%;
  height: 240px;
  background: var(--bg);
  border-radius: 16px;
}

.blog-category {
  font-size: 14px;
  font-weight: 600;
  color: var(--accent);
  margin-top: 4px;
}

.blog-category.cat-security { color: var(--destructive); }

.blog-card h3 {
  font-size: 20px;
  font-weight: 600;
  color: var(--text-primary);
  line-height: 28px;
}

.blog-date {
  font-size: 14px;
  color: var(--text-secondary);
}

/* ── CTA Section ─────────────────────────────── */
.landing-cta-section {
  background: var(--surface);
  padding: 80px 0;
}

.landing-cta-card {
  position: relative;
  text-align: center;
  padding: 80px 40px;
  border-radius: 32px;
  overflow: hidden;
}

.landing-cta-bg {
  position: absolute;
  inset: 0;
  background: var(--hero-gradient);
  border-radius: 32px;
}

.landing-cta-bg::after {
  content: '';
  position: absolute;
  inset: 0;
  background: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.65' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)' opacity='0.3'/%3E%3C/svg%3E");
  background-size: 256px 256px;
  mix-blend-mode: soft-light;
  opacity: 0.3;
  border-radius: 32px;
}

.landing-cta-content {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  max-width: 751px;
  margin: 0 auto;
}

.landing-cta-card h2 {
  color: #fff;
  font-size: 72px;
  font-weight: 600;
  font-style: italic;
  line-height: 82px;
  letter-spacing: -2px;
  text-transform: capitalize;
}

.landing-cta-card p {
  color: rgba(255, 255, 255, 0.8);
  font-size: 20px;
  line-height: 30px;
  font-weight: 300;
}

/* ── Contact Section ─────────────────────────── */
.landing-contact {
  background: var(--bg);
  padding: 80px 0;
}

.landing-section-subtitle {
  font-size: 16px;
  color: var(--text-secondary);
  margin-top: 8px;
  line-height: 1.5;
}

.contact-form-card {
  max-width: 700px;
  margin: 0 auto;
  background: var(--surface);
  border: 1px solid var(--divider);
  border-radius: 20px;
  padding: 40px;
  box-shadow: var(--shadow-md);
}

.contact-form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  margin-bottom: 4px;
}

.contact-form-group {
  margin-bottom: 16px;
}

.contact-form-group label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 6px;
}

.contact-form-group input,
.contact-form-group select,
.contact-form-group textarea {
  width: 100%;
  padding: 11px 14px;
  border: 1.5px solid var(--divider);
  border-radius: 10px;
  font-size: 14px;
  font-family: inherit;
  color: var(--text-primary);
  background: var(--surface);
  transition: border-color 0.2s ease;
}

.contact-form-group input:focus,
.contact-form-group select:focus,
.contact-form-group textarea:focus {
  outline: none;
  border-color: var(--accent);
}

.contact-form-group textarea {
  resize: vertical;
  min-height: 100px;
}

.contact-form-group select {
  cursor: pointer;
}

.contact-form-error {
  background: rgba(239, 68, 68, 0.08);
  color: #ef4444;
  padding: 10px 14px;
  border-radius: 10px;
  font-size: 13px;
  margin-bottom: 16px;
}

.contact-form-success {
  display: flex;
  align-items: center;
  gap: 10px;
  background: rgba(16, 185, 129, 0.08);
  color: #10b981;
  padding: 14px 18px;
  border-radius: 10px;
  font-size: 14px;
  font-weight: 500;
  margin-bottom: 16px;
}

.btn-contact-submit {
  background: var(--accent);
  color: #fff;
  border: none;
  padding: 12px 32px;
  border-radius: 10px;
  font-size: 15px;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  transition: all 0.2s ease;
  width: 100%;
}

.btn-contact-submit:hover {
  background: var(--accent-hover);
}

.btn-contact-submit:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

@media (max-width: 768px) {
  .contact-form-row {
    grid-template-columns: 1fr;
    gap: 0;
  }

  .contact-form-card {
    padding: 24px;
  }
}

/* ── Footer ──────────────────────────────────── */
.landing-footer {
  padding: 48px 0 0;
  border-top: 1px solid var(--divider);
  background: var(--surface);
}

.landing-footer-top {
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr 1fr 1.5fr;
  gap: 40px;
  padding-bottom: 48px;
}

.footer-brand .landing-logo {
  color: var(--accent);
}

.footer-brand .landing-logo-icon {
  color: #fff;
}

.footer-logo-icon {
  background: var(--accent) !important;
}

.footer-logo-icon .landing-logo-img {
  filter: brightness(0) invert(1);
}

.footer-col {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.footer-col h4 {
  font-size: 16px;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 4px;
}

.footer-col a {
  color: var(--text-secondary);
  text-decoration: none;
  font-size: 14px;
  transition: color var(--transition);
}

.footer-col a:hover { color: var(--accent); }

.footer-subscribe p {
  font-size: 14px;
  color: var(--text-secondary);
  line-height: 22px;
}

.footer-email-form {
  display: flex;
  align-items: center;
  background: var(--bg);
  border: 1px solid var(--divider);
  border-radius: 5000px;
  padding: 4px 4px 4px 16px;
  gap: 8px;
  margin-top: 8px;
}

.footer-email-icon { display: flex; flex-shrink: 0; }

.footer-email-form input {
  flex: 1;
  border: none;
  background: transparent;
  font-size: 14px;
  color: var(--text-primary);
  outline: none;
  font-family: inherit;
  min-width: 0;
}

.footer-email-form input::placeholder { color: var(--text-tertiary); }

.footer-send-btn {
  background: var(--accent);
  color: #fff;
  border: none;
  padding: 8px 20px;
  border-radius: 5000px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  font-family: inherit;
  transition: background var(--transition);
  flex-shrink: 0;
}

.footer-send-btn:hover { background: var(--accent-hover); }

.landing-footer-bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 24px 0;
  border-top: 1px solid var(--divider);
}

.landing-footer-copy {
  font-size: 13px;
  color: var(--text-secondary);
}

.footer-social {
  display: flex;
  gap: 16px;
}

.social-icon {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--bg);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-secondary);
  transition: all var(--transition);
}

.social-icon:hover {
  background: var(--accent);
  color: #fff;
}

/* ── Landing Responsive ──────────────────────── */
@media (max-width: 1024px) {
  .landing-hero {
    padding: 40px 32px 48px;
  }

  .landing-hero-content {
    min-height: auto;
  }

  .hero-asset {
    display: none;
  }

  .landing-hero-text h1 {
    font-size: 48px;
    line-height: 56px;
  }

  .landing-section-inner {
    padding: 0 32px;
  }

  .services-grid,
  .blog-grid {
    grid-template-columns: 1fr;
  }

  .features-grid {
    grid-template-columns: 1fr !important;
  }

  .feature-card:nth-child(n) {
    grid-column: span 1 !important;
  }

  .workflow-content {
    grid-template-columns: 1fr;
    gap: 48px;
  }

  .testimonials-content {
    grid-template-columns: 1fr;
    gap: 32px;
  }

  .testimonial-stats {
    grid-template-columns: repeat(2, 1fr);
  }

  .blog-header {
    grid-template-columns: 1fr;
    gap: 24px;
  }

  .blog-header-right { padding-top: 0; }

  .landing-cta-card h2 {
    font-size: 40px;
    line-height: 48px;
  }

  .landing-footer-top {
    grid-template-columns: 1fr 1fr;
    gap: 32px;
  }

  .footer-brand {
    grid-column: span 2;
  }

  .footer-subscribe {
    grid-column: span 2;
  }
}

@media (max-width: 768px) {
  .landing-nav-links {
    display: none;
  }

  .landing-nav-inner {
    padding: 0;
  }

  .landing-hero {
    padding: 24px 20px 40px;
  }

  .landing-hero-text h1 {
    font-size: 36px;
    line-height: 44px;
  }

  .landing-section-inner {
    padding: 0 20px;
  }

  .landing-services,
  .landing-features,
  .landing-testimonials,
  .landing-blog,
  .landing-workflow {
    padding: 64px 0;
  }

  .landing-section-header h2,
  .workflow-left h2,
  .testimonials-left h2,
  .blog-header-left h2 {
    font-size: 32px;
    line-height: 40px;
  }

  .testimonial-stats {
    grid-template-columns: repeat(2, 1fr);
    gap: 24px;
  }

  .stat-number {
    font-size: 40px;
    line-height: 48px;
  }

  .landing-footer-top {
    grid-template-columns: 1fr;
  }

  .footer-brand,
  .footer-subscribe {
    grid-column: span 1;
  }

  .landing-footer-bottom {
    flex-direction: column;
    gap: 16px;
    text-align: center;
  }
}

@media (max-width: 480px) {
  .landing-hero-text h1 {
    font-size: 28px;
    line-height: 36px;
  }

  .landing-cta-card {
    padding: 40px 20px;
  }

  .landing-cta-card h2 {
    font-size: 28px;
    line-height: 36px;
  }

  .testimonial-stats {
    grid-template-columns: 1fr;
  }

  .landing-nav-actions {
    gap: 4px;
  }

  .btn-hero-cta {
    padding: 8px 16px;
    font-size: 13px;
  }
}

/* ══════════════════════════════════════════════════
   Icon Picker & Image Upload
   ══════════════════════════════════════════════════ */

/* ── Icon Picker Grid ────────────────────────── */
.icon-picker {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(64px, 1fr));
  gap: 8px;
  max-height: 200px;
  overflow-y: auto;
  padding: 4px;
}

.icon-option {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  padding: 8px 4px;
  border: 2px solid var(--divider);
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all var(--transition);
  background: var(--surface);
}

.icon-option:hover {
  border-color: var(--accent);
  background: var(--accent-light);
}

.icon-option.selected {
  border-color: var(--accent);
  background: var(--accent-light);
  box-shadow: 0 0 0 3px rgba(124, 92, 252, 0.15);
}

.icon-option .icon-emoji {
  font-size: 24px;
  line-height: 1;
}

.icon-option .icon-label {
  font-size: 10px;
  color: var(--text-secondary);
  text-align: center;
  line-height: 1.2;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 100%;
}

/* ── Image Upload Area ───────────────────────── */
.image-upload-area {
  border: 2px dashed var(--divider);
  border-radius: var(--radius-sm);
  padding: 24px;
  text-align: center;
  cursor: pointer;
  transition: all var(--transition);
  position: relative;
  min-height: 120px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.image-upload-area:hover {
  border-color: var(--accent);
  background: var(--accent-light);
}

.image-upload-placeholder {
  color: var(--text-tertiary);
  font-size: 14px;
}

.image-upload-placeholder svg {
  display: block;
  margin: 0 auto 8px;
  width: 32px;
  height: 32px;
  color: var(--text-tertiary);
}

.image-preview {
  max-width: 200px;
  max-height: 200px;
  border-radius: var(--radius-sm);
  object-fit: cover;
}

.image-remove-btn {
  position: absolute;
  top: 8px;
  right: 8px;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--destructive);
  color: #fff;
  border: none;
  cursor: pointer;
  font-size: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all var(--transition);
  line-height: 1;
}

.image-remove-btn:hover {
  background: #dc2626;
  transform: scale(1.1);
}

/* ── Catalog Card Thumbnail ──────────────────── */
.catalog-card-thumb {
  width: 36px;
  height: 36px;
  border-radius: 6px;
  object-fit: cover;
  flex-shrink: 0;
}

/* ══════════════════════════════════════════════════
   MFA / Two-Factor Authentication
   ══════════════════════════════════════════════════ */

.mfa-icon {
  text-align: center;
  font-size: 48px;
  margin-bottom: 16px;
}

.mfa-code-input {
  text-align: center;
  font-size: 28px !important;
  font-family: 'SF Mono', 'Fira Code', monospace !important;
  letter-spacing: 8px;
  padding: 14px 16px !important;
}

.mfa-resend {
  text-align: center;
  margin-top: 16px;
  font-size: 13px;
}

.mfa-resend a {
  color: var(--accent);
  text-decoration: none;
  font-weight: 500;
}

.mfa-resend a:hover {
  text-decoration: underline;
}

.mfa-qr-container {
  display: flex;
  justify-content: center;
  margin-bottom: 16px;
}

.mfa-qr-container canvas {
  border-radius: var(--radius-sm);
  border: 1px solid var(--divider);
}

.mfa-secret-text {
  text-align: center;
  font-family: 'SF Mono', 'Fira Code', monospace;
  font-size: 12px;
  color: var(--text-tertiary);
  margin-bottom: 8px;
  word-break: break-all;
}

/* ══════════════════════════════════════════════════
   Setup Wizard (Post-Approval)
   ══════════════════════════════════════════════════ */

.setup-subtitle {
  color: var(--text-secondary);
  font-size: 15px;
  margin-top: 4px;
}

.setup-progress { margin-bottom: 32px; }

.setup-progress-track {
  height: 4px;
  background: var(--divider);
  border-radius: 2px;
  overflow: hidden;
  margin-bottom: 16px;
}

.setup-progress-fill {
  height: 100%;
  background: var(--accent);
  border-radius: 2px;
  transition: width 0.4s cubic-bezier(0.16, 1, 0.3, 1);
  width: 0%;
}

.setup-steps-indicator {
  display: flex;
  justify-content: space-between;
}

.setup-step-dot {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  flex: 1;
}

.setup-step-dot span {
  font-size: 12px;
  color: var(--text-tertiary);
  font-weight: 500;
  transition: color var(--transition);
}

.setup-step-dot.active span { color: var(--accent); font-weight: 600; }
.setup-step-dot.completed span { color: var(--success); }

.setup-dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--divider);
  border: 2px solid var(--divider);
  transition: all var(--transition);
}

.setup-step-dot.active .setup-dot {
  background: var(--accent);
  border-color: var(--accent);
  box-shadow: 0 0 0 4px var(--accent-light);
}

.setup-step-dot.completed .setup-dot {
  background: var(--success);
  border-color: var(--success);
}

.setup-card {
  background: var(--surface);
  border-radius: var(--radius);
  border: 1px solid var(--divider);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
}

.setup-card-header {
  display: flex;
  align-items: flex-start;
  gap: 16px;
  padding: 24px;
  border-bottom: 1px solid var(--divider);
}

.setup-card-header > div:nth-child(2) { flex: 1; }
.setup-card-header h3 { font-size: 18px; font-weight: 600; margin-bottom: 4px; }
.setup-card-header p { font-size: 14px; color: var(--text-secondary); line-height: 1.5; }

.setup-card-icon {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--accent);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  font-weight: 700;
  flex-shrink: 0;
}

.setup-card-body { padding: 24px; }
.setup-card-body .settings-form { max-width: 100%; }

.setup-actions {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 20px;
}

.setup-card-complete {
  padding: 20px 24px;
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--success);
  font-weight: 500;
  font-size: 15px;
}

.setup-card-complete .btn { margin-left: auto; }

.setup-check {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--success-light);
  color: var(--success);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  font-weight: 700;
  flex-shrink: 0;
}

.setup-info-message {
  font-size: 14px;
  color: var(--text-secondary);
  line-height: 1.6;
  padding: 16px;
  background: var(--accent-light);
  border-radius: var(--radius-sm);
  border-left: 3px solid var(--accent);
}

.setup-complete-banner {
  text-align: center;
  padding: 48px 32px;
  background: var(--surface);
  border-radius: var(--radius);
  border: 1px solid var(--divider);
  box-shadow: var(--shadow-sm);
  margin-top: 24px;
}

.setup-complete-icon { font-size: 48px; margin-bottom: 16px; }
.setup-complete-banner h3 { font-size: 22px; font-weight: 700; margin-bottom: 8px; }
.setup-complete-banner p { color: var(--text-secondary); font-size: 15px; }

#nav-setup { position: relative; }
#nav-setup .setup-indicator-dot {
  position: absolute;
  top: 6px;
  right: 6px;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--warning);
}

/* ═══ Transactions Tab ═══ */

.tx-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 16px;
  flex-wrap: wrap;
}

.tx-toolbar-left {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.tx-toolbar-right {
  display: flex;
  align-items: center;
  gap: 12px;
}

.tx-filter-chips {
  display: flex;
  gap: 6px;
}

.tx-chip {
  padding: 6px 14px;
  border: 1px solid var(--divider);
  border-radius: 20px;
  background: var(--surface);
  font-size: 13px;
  font-weight: 500;
  color: var(--text-secondary);
  cursor: pointer;
  transition: all var(--transition);
  font-family: inherit;
}

.tx-chip:hover {
  border-color: var(--accent);
  color: var(--accent);
}

.tx-chip.active {
  background: var(--accent-light);
  border-color: var(--accent);
  color: var(--accent);
}

.tx-count {
  font-size: 13px;
  color: var(--text-tertiary);
  white-space: nowrap;
}

/* List header */
.tx-list-header {
  display: flex;
  align-items: center;
  padding: 8px 16px;
  font-size: 12px;
  font-weight: 600;
  color: var(--text-tertiary);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  border-bottom: 1px solid var(--divider);
}

.tx-col-icon { width: 48px; flex-shrink: 0; }
.tx-col-info { flex: 1; min-width: 0; }
.tx-col-status { width: 120px; text-align: center; flex-shrink: 0; }
.tx-col-amount { width: 120px; text-align: right; flex-shrink: 0; }

/* Transaction rows */
.tx-list {
  background: var(--surface);
  border-radius: var(--radius);
  border: 1px solid var(--divider);
  overflow: hidden;
}

.tx-row {
  display: flex;
  align-items: center;
  padding: 14px 16px;
  border-bottom: 1px solid var(--divider);
  cursor: pointer;
  transition: background var(--transition);
}

.tx-row:last-child {
  border-bottom: none;
}

.tx-row:hover {
  background: var(--accent-50);
}

.tx-row-icon {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  background: rgba(16, 185, 129, 0.08);
  color: var(--success);
  margin-right: 14px;
}

.tx-row-icon svg { flex-shrink: 0; }

.tx-icon-muted {
  background: rgba(239, 68, 68, 0.08);
  color: var(--destructive);
}

.tx-row-info {
  flex: 1;
  min-width: 0;
}

.tx-row-title {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-primary);
}

.tx-row-subtitle {
  font-weight: 400;
  color: var(--text-secondary);
  margin-left: 4px;
}

.tx-row-meta {
  font-size: 12px;
  color: var(--text-tertiary);
  margin-top: 2px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.tx-row-status {
  width: 120px;
  text-align: center;
  flex-shrink: 0;
}

.tx-status-badge {
  display: inline-block;
  font-size: 11px;
  font-weight: 600;
  padding: 3px 10px;
  border-radius: 12px;
}

.status-completed {
  background: var(--success-light);
  color: var(--success);
}

.status-refunded {
  background: var(--destructive-light);
  color: var(--destructive);
}

.status-voided {
  background: rgba(107, 114, 128, 0.1);
  color: var(--text-tertiary);
}

.tx-row-amount {
  width: 120px;
  text-align: right;
  font-size: 15px;
  font-weight: 600;
  flex-shrink: 0;
  color: var(--text-primary);
}

.tx-amount-refunded {
  color: var(--destructive);
  text-decoration: line-through;
}

.tx-amount-voided {
  color: var(--text-tertiary);
  text-decoration: line-through;
}

.tx-empty {
  padding: 48px 24px;
  text-align: center;
  color: var(--text-tertiary);
  font-size: 14px;
}

/* ── Transaction Detail Modal ── */

.tx-detail-modal {
  max-width: 640px;
}

.tx-detail-header-row {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 24px;
}

.tx-detail-header-row h3 {
  font-size: 20px;
  font-weight: 700;
  margin-bottom: 4px;
}

.tx-detail-date {
  font-size: 13px;
  color: var(--text-tertiary);
}

.tx-detail-section {
  margin-bottom: 20px;
}

.tx-detail-label {
  display: block;
  font-size: 12px;
  font-weight: 600;
  color: var(--text-tertiary);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 8px;
}

.tx-detail-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}

.tx-detail-table th {
  text-align: left;
  padding: 8px 0;
  border-bottom: 1px solid var(--divider);
  font-size: 12px;
  font-weight: 600;
  color: var(--text-tertiary);
}

.tx-detail-table th:last-child,
.tx-detail-table td:last-child {
  text-align: right;
}

.tx-detail-table th:nth-child(2),
.tx-detail-table td:nth-child(2),
.tx-detail-table th:nth-child(3),
.tx-detail-table td:nth-child(3) {
  text-align: center;
}

.tx-detail-table td {
  padding: 10px 0;
  border-bottom: 1px solid var(--divider);
  vertical-align: top;
}

.tx-detail-table tr:last-child td {
  border-bottom: none;
}

.tx-detail-item-name { font-weight: 500; }

.tx-detail-modifiers {
  margin-top: 4px;
}

.tx-detail-modifier {
  display: block;
  font-size: 12px;
  color: var(--text-tertiary);
  font-weight: 400;
}

/* Totals */
.tx-detail-totals {
  background: var(--bg);
  border-radius: var(--radius-sm);
  padding: 12px 16px;
  margin-bottom: 20px;
}

.tx-detail-total-row {
  display: flex;
  justify-content: space-between;
  padding: 4px 0;
  font-size: 14px;
  color: var(--text-secondary);
}

.tx-detail-discount {
  color: var(--success);
}

.tx-detail-total-final {
  font-weight: 700;
  font-size: 16px;
  color: var(--text-primary);
  border-top: 1px solid var(--divider);
  margin-top: 6px;
  padding-top: 8px;
}

/* Payment info */
.tx-detail-payment {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px;
  background: var(--bg);
  border-radius: var(--radius-sm);
}

.tx-detail-payment-icon {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--surface);
  border: 1px solid var(--divider);
}

.tx-detail-payment-text {
  flex: 1;
  font-size: 14px;
  font-weight: 500;
}

.tx-detail-payment-amount {
  font-size: 14px;
  font-weight: 600;
}

/* Actions */
.tx-detail-actions {
  display: flex;
  gap: 10px;
  margin-top: 24px;
  padding-top: 20px;
  border-top: 1px solid var(--divider);
}

.btn-secondary {
  background: var(--surface-elevated);
  color: var(--text-primary);
  border: 1px solid var(--divider);
}

.btn-secondary:hover {
  background: var(--divider);
}

.btn-destructive {
  background: var(--destructive);
  color: #ffffff;
}

.btn-destructive:hover {
  background: #dc2626;
}

.btn-sm {
  padding: 6px 14px;
  font-size: 13px;
}

/* ── Receipt Modal ── */

.receipt-modal-content {
  max-width: 400px;
}

.receipt-modal-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.receipt-paper {
  background: #fff;
  padding: 24px 20px;
  font-family: 'Courier New', Courier, monospace;
  font-size: 13px;
  line-height: 1.5;
  color: #111;
  border: 1px solid #e5e5e5;
  border-radius: 4px;
  box-shadow: 0 2px 12px rgba(0,0,0,0.06);
}

.receipt-header {
  text-align: center;
  margin-bottom: 12px;
}

.receipt-company {
  font-size: 18px;
  font-weight: 700;
  letter-spacing: 1px;
}

.receipt-address, .receipt-vat {
  font-size: 11px;
  color: #666;
  margin-top: 2px;
}

.receipt-divider {
  border-top: 1px dashed #ccc;
  margin: 10px 0;
}

.receipt-order-info {
  font-size: 12px;
}

.receipt-item {
  margin: 6px 0;
}

.receipt-item-row {
  display: flex;
  justify-content: space-between;
  gap: 8px;
}

.receipt-modifier {
  font-size: 11px;
  color: #888;
  padding-left: 16px;
}

.receipt-totals {
  font-size: 13px;
}

.receipt-total-line {
  font-weight: 700;
  font-size: 16px;
  margin-top: 6px;
  padding-top: 6px;
  border-top: 1px solid #ccc;
}

.receipt-tax {
  font-size: 11px;
  color: #666;
}

.receipt-tax-row {
  display: flex;
  justify-content: space-between;
  gap: 6px;
}

.receipt-payment {
  font-size: 12px;
}

.receipt-refunded-badge {
  text-align: center;
  font-size: 16px;
  font-weight: 700;
  color: var(--destructive);
  border: 2px solid var(--destructive);
  padding: 6px;
  margin: 12px 0;
  transform: rotate(-5deg);
  letter-spacing: 2px;
}

.receipt-tse {
  background: #f5f5f5;
  border-radius: 4px;
  padding: 10px;
  margin-top: 10px;
  font-size: 10px;
  word-break: break-all;
}

.receipt-tse-title {
  font-weight: 700;
  font-size: 11px;
  margin-bottom: 4px;
}

.receipt-tse-row {
  margin: 2px 0;
}

.receipt-tse-sig {
  font-family: monospace;
  font-size: 9px;
  color: #555;
  word-break: break-all;
}

.receipt-qr {
  text-align: center;
  margin-top: 8px;
}

.receipt-qr canvas {
  display: inline-block;
}

.receipt-footer {
  text-align: center;
  margin-top: 16px;
  font-size: 12px;
  color: #888;
}

/* ── Print Styles ── */
@media print {
  body * {
    visibility: hidden;
  }
  #receipt-modal,
  #receipt-modal .modal-content,
  #receipt-content,
  #receipt-content * {
    visibility: visible;
  }
  #receipt-modal {
    position: absolute;
    inset: 0;
    background: #fff;
  }
  #receipt-modal .modal-content {
    box-shadow: none;
    border: none;
    max-width: 100%;
    max-height: 100%;
    padding: 0;
  }
  #receipt-modal .modal-header {
    display: none;
  }
  .receipt-paper {
    box-shadow: none;
    border: none;
  }
}

/* ═══ Legal Pages ═══════════════════════════════════════ */

.legal-page {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.legal-nav {
  background: var(--hero-gradient);
  padding: 20px 0;
}

.legal-nav-inner {
  max-width: 1440px;
  margin: 0 auto;
  padding: 0 64px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.legal-nav .landing-logo-full { height: 28px; }

.legal-nav-back {
  color: rgba(255,255,255,0.7);
  text-decoration: none;
  font-size: 14px;
  font-weight: 500;
  transition: color var(--transition);
}

.legal-nav-back:hover { color: #fff; }

.legal-content {
  flex: 1;
  max-width: 800px;
  margin: 0 auto;
  padding: 48px 64px 80px;
  width: 100%;
}

.legal-content h1 {
  font-size: 32px;
  font-weight: 700;
  margin-bottom: 8px;
  color: var(--text-primary);
}

.legal-content .legal-subtitle {
  font-size: 14px;
  color: var(--text-tertiary);
  margin-bottom: 40px;
}

.legal-content h2 {
  font-size: 20px;
  font-weight: 600;
  margin: 32px 0 12px;
  color: var(--text-primary);
}

.legal-content h3 {
  font-size: 16px;
  font-weight: 600;
  margin: 24px 0 8px;
  color: var(--text-primary);
}

.legal-content p {
  font-size: 15px;
  line-height: 1.7;
  color: var(--text-secondary);
  margin-bottom: 16px;
}

.legal-content ul {
  padding-left: 24px;
  margin-bottom: 16px;
}

.legal-content li {
  font-size: 15px;
  line-height: 1.7;
  color: var(--text-secondary);
  margin-bottom: 6px;
}

.legal-content a {
  color: var(--accent);
  text-decoration: none;
}

.legal-content a:hover { text-decoration: underline; }

.legal-info-card {
  background: var(--accent-50);
  border: 1px solid var(--accent-light);
  border-radius: var(--radius);
  padding: 24px 28px;
  margin-bottom: 32px;
}

.legal-info-card p {
  color: var(--text-primary);
  margin-bottom: 4px;
}

.legal-info-card p:last-child { margin-bottom: 0; }

.legal-footer {
  border-top: 1px solid var(--divider);
  padding: 24px 0;
  text-align: center;
}

.legal-footer-inner {
  max-width: 1440px;
  margin: 0 auto;
  padding: 0 64px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 13px;
  color: var(--text-tertiary);
}

.legal-footer-links { display: flex; gap: 24px; }
.legal-footer-links a { color: var(--text-secondary); text-decoration: none; font-size: 13px; }
.legal-footer-links a:hover { color: var(--accent); }

@media (max-width: 768px) {
  .legal-nav-inner { padding: 0 24px; }
  .legal-content { padding: 32px 24px 64px; }
  .legal-content h1 { font-size: 26px; }
  .legal-footer-inner { padding: 0 24px; flex-direction: column; gap: 12px; }
}

/* ═══ Admin Panel ═══════════════════════════════════════ */

.admin-tabs {
  display: flex;
  gap: 4px;
  margin-bottom: 24px;
  border-bottom: 1.5px solid var(--divider);
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.admin-tab {
  padding: 10px 20px;
  border: none;
  background: none;
  font-size: 14px;
  font-weight: 500;
  color: var(--text-secondary);
  cursor: pointer;
  border-bottom: 2.5px solid transparent;
  margin-bottom: -1.5px;
  transition: all var(--transition);
  font-family: inherit;
  white-space: nowrap;
}

.admin-tab:hover { color: var(--text-primary); }
.admin-tab.active { color: var(--accent); border-bottom-color: var(--accent); font-weight: 600; }

.admin-panel { animation: fadeIn 0.15s ease; }

/* KPI Cards */
.admin-kpi-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 16px;
  margin-bottom: 28px;
}

.admin-kpi-card {
  background: var(--surface);
  border: 1px solid var(--divider);
  border-radius: var(--radius);
  padding: 20px 24px;
  box-shadow: var(--shadow-sm);
}

.admin-kpi-label {
  display: block;
  font-size: 11px;
  color: var(--text-tertiary);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 8px;
  font-weight: 600;
}

.admin-kpi-value {
  display: block;
  font-size: 28px;
  font-weight: 700;
  color: var(--text-primary);
  line-height: 1.1;
}

.admin-kpi-sub {
  display: block;
  font-size: 12px;
  color: var(--text-tertiary);
  margin-top: 4px;
}

.admin-kpi-value.kpi-warning { color: var(--warning); }
.admin-kpi-value.kpi-success { color: var(--success); }

/* Health / Info Cards */
.admin-health-card {
  background: var(--surface);
  border: 1px solid var(--divider);
  border-radius: var(--radius);
  padding: 24px 28px;
  margin-bottom: 20px;
  box-shadow: var(--shadow-sm);
}

.admin-health-card h3 {
  font-size: 16px;
  font-weight: 600;
  margin: 0 0 4px;
}

.admin-health-card > p {
  color: var(--text-tertiary);
  font-size: 13px;
  margin: 0 0 16px;
}

.admin-health-card table { margin: 0; box-shadow: none; border: none; }

/* Toolbar (search + filter chips) */
.admin-toolbar {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 16px;
  flex-wrap: wrap;
}

.admin-toolbar .search-bar {
  position: relative;
  width: 260px;
  flex-shrink: 0;
}

.admin-toolbar .search-bar input {
  width: 100%;
  padding: 8px 12px 8px 36px;
  border: 1.5px solid var(--divider);
  border-radius: var(--radius-sm);
  font-size: 13px;
  font-family: inherit;
  background: var(--surface);
  transition: border-color var(--transition);
}

.admin-toolbar .search-bar input:focus {
  outline: none;
  border-color: var(--accent);
}

.admin-toolbar .search-icon {
  position: absolute;
  left: 10px;
  top: 50%;
  transform: translateY(-50%);
  width: 16px;
  height: 16px;
  color: var(--text-tertiary);
}

.admin-chips {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

.admin-chip {
  padding: 5px 14px;
  border-radius: 20px;
  border: 1.5px solid var(--divider);
  background: var(--surface);
  font-size: 12px;
  font-weight: 500;
  color: var(--text-secondary);
  cursor: pointer;
  transition: all var(--transition);
  font-family: inherit;
}

.admin-chip:hover { border-color: var(--accent); color: var(--text-primary); }
.admin-chip.active { background: var(--accent); color: #fff; border-color: var(--accent); }

/* Company detail */
.admin-detail-back {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 14px;
  border: 1.5px solid var(--divider);
  border-radius: var(--radius-sm);
  background: var(--surface);
  font-size: 13px;
  font-weight: 500;
  color: var(--text-secondary);
  cursor: pointer;
  margin-bottom: 20px;
  transition: all var(--transition);
  font-family: inherit;
}

.admin-detail-back:hover { border-color: var(--accent); color: var(--accent); }

.admin-detail-header {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 24px;
}

.admin-detail-header h3 {
  font-size: 20px;
  font-weight: 700;
  margin: 0;
}

.admin-detail-section {
  margin-bottom: 24px;
}

.admin-detail-section h4 {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 12px;
}

/* Quick action lists (pending approvals, recent signups) */
.admin-quick-list {
  background: var(--surface);
  border: 1px solid var(--divider);
  border-radius: var(--radius);
  padding: 20px 24px;
  margin-bottom: 20px;
  box-shadow: var(--shadow-sm);
}

.admin-quick-list h3 {
  font-size: 15px;
  font-weight: 600;
  margin: 0 0 12px;
}

.admin-quick-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 0;
  border-bottom: 1px solid var(--divider);
  font-size: 13px;
}

.admin-quick-row:last-child { border-bottom: none; }

.admin-quick-row .admin-quick-info {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.admin-quick-row .admin-quick-email { font-weight: 500; }
.admin-quick-row .admin-quick-meta { color: var(--text-tertiary); font-size: 12px; }

.admin-empty {
  text-align: center;
  color: var(--text-tertiary);
  font-size: 14px;
  padding: 32px 16px;
}

.admin-user-count {
  font-size: 13px;
  color: var(--text-tertiary);
  margin-bottom: 12px;
  display: block;
}

/* Responsive */
@media (max-width: 768px) {
  .admin-tabs { gap: 0; }
  .admin-tab { padding: 8px 14px; font-size: 13px; }
  .admin-kpi-grid { grid-template-columns: repeat(2, 1fr); gap: 10px; }
  .admin-kpi-value { font-size: 22px; }
  .admin-toolbar { flex-direction: column; align-items: stretch; }
  .admin-toolbar .search-bar { width: 100%; }
  .admin-health-card { padding: 16px; }
  .admin-health-card table { font-size: 12px; }
}

@media (max-width: 480px) {
  .admin-kpi-grid { grid-template-columns: 1fr; }
}

/* ═══ Wiki Editor ═══════════════════════════════════════ */

.wiki-editor-form { max-width: 100%; }

.wiki-editor-row {
  display: flex;
  gap: 16px;
  margin-bottom: 16px;
}

.wiki-field { flex: 1; }
.wiki-field-sm { flex: 0 0 200px; }

.wiki-field label {
  display: block;
  font-size: 11px;
  color: var(--text-tertiary);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 6px;
  font-weight: 600;
}

.wiki-field input,
.wiki-field select {
  width: 100%;
  padding: 8px 12px;
  border: 1.5px solid var(--divider);
  border-radius: var(--radius-sm);
  font-size: 14px;
  font-family: inherit;
  background: var(--surface);
  transition: border-color var(--transition);
}

.wiki-field input:focus,
.wiki-field select:focus {
  outline: none;
  border-color: var(--accent);
}

.wiki-editor-split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-bottom: 16px;
}

.wiki-editor-pane label,
.wiki-preview-pane label {
  display: block;
  font-size: 11px;
  color: var(--text-tertiary);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 6px;
  font-weight: 600;
}

.wiki-editor-pane textarea {
  width: 100%;
  height: 500px;
  padding: 16px;
  border: 1.5px solid var(--divider);
  border-radius: var(--radius-sm);
  font-size: 14px;
  font-family: 'SF Mono', 'Menlo', 'Monaco', 'Consolas', monospace;
  line-height: 1.6;
  background: var(--surface);
  resize: vertical;
  transition: border-color var(--transition);
}

.wiki-editor-pane textarea:focus {
  outline: none;
  border-color: var(--accent);
}

.wiki-preview-content {
  height: 500px;
  padding: 16px;
  border: 1.5px solid var(--divider);
  border-radius: var(--radius-sm);
  background: var(--surface);
  overflow-y: auto;
  font-size: 15px;
  line-height: 1.7;
  color: var(--text-primary);
}

.wiki-preview-content h1 { font-size: 24px; font-weight: 700; margin: 24px 0 12px; }
.wiki-preview-content h2 { font-size: 20px; font-weight: 600; margin: 20px 0 10px; }
.wiki-preview-content h3 { font-size: 16px; font-weight: 600; margin: 16px 0 8px; }
.wiki-preview-content p { margin-bottom: 12px; }
.wiki-preview-content ul, .wiki-preview-content ol { padding-left: 24px; margin-bottom: 12px; }
.wiki-preview-content li { margin-bottom: 4px; }
.wiki-preview-content code {
  background: var(--surface-elevated, #f5f5f7);
  padding: 2px 6px;
  border-radius: 4px;
  font-size: 13px;
  font-family: 'SF Mono', 'Menlo', monospace;
}
.wiki-preview-content pre {
  background: var(--surface-elevated, #f5f5f7);
  padding: 16px;
  border-radius: var(--radius-sm);
  overflow-x: auto;
  margin-bottom: 12px;
}
.wiki-preview-content pre code { background: none; padding: 0; }
.wiki-preview-content blockquote {
  border-left: 3px solid var(--accent);
  padding-left: 16px;
  margin: 12px 0;
  color: var(--text-secondary);
}
.wiki-preview-content a { color: var(--accent); text-decoration: none; }
.wiki-preview-content a:hover { text-decoration: underline; }
.wiki-preview-content img { max-width: 100%; border-radius: var(--radius-sm); }
.wiki-preview-content table { width: 100%; border-collapse: collapse; margin-bottom: 12px; }
.wiki-preview-content th, .wiki-preview-content td {
  padding: 8px 12px;
  border: 1px solid var(--divider);
  text-align: left;
}
.wiki-preview-content th { background: var(--surface-elevated, #f5f5f7); font-weight: 600; font-size: 13px; }

.wiki-editor-actions {
  display: flex;
  gap: 8px;
  justify-content: flex-end;
  padding-top: 16px;
  border-top: 1px solid var(--divider);
}

@media (max-width: 768px) {
  .wiki-editor-row { flex-direction: column; }
  .wiki-field-sm { flex: 1; }
  .wiki-editor-split { grid-template-columns: 1fr; }
  .wiki-editor-pane textarea { height: 300px; }
  .wiki-preview-content { height: 300px; }
}
