/* ── Reset & Base ──────────────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --color-brand:       #4f46e5;
  --color-brand-dark:  #3730a3;
  --color-brand-light: #818cf8;
  --color-sidebar:     #0f172a;
  --color-sidebar-hover: #1e293b;
  --color-sidebar-active: #1e293b;
  --color-bg:          #f1f5f9;
  --color-surface:     #ffffff;
  --color-border:      #e2e8f0;
  --color-text:        #0f172a;
  --color-text-muted:  #64748b;
  --color-text-light:  #94a3b8;
  --color-success:     #22c55e;
  --color-danger:      #ef4444;
  --color-warning:     #f59e0b;
  --sidebar-width:     240px;
  --topbar-height:     64px;
  --radius:            10px;
  --shadow-sm:         0 1px 3px rgba(0,0,0,.08), 0 1px 2px rgba(0,0,0,.04);
  --shadow-md:         0 4px 16px rgba(0,0,0,.10);
  --shadow-lg:         0 20px 40px rgba(0,0,0,.14);
  --transition:        150ms ease;
}

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  font-size: 14px;
  line-height: 1.6;
  color: var(--color-text);
  background: var(--color-bg);
  -webkit-font-smoothing: antialiased;
}

a { text-decoration: none; color: inherit; }
button { cursor: pointer; border: none; background: none; font-family: inherit; }
input, textarea { font-family: inherit; }

/* ── Login Page ────────────────────────────────────────────────────────────── */
.login-page {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 1fr 1fr;
}

/* Left panel */
.login-brand {
  background: linear-gradient(135deg, #1e1b4b 0%, #312e81 40%, #4f46e5 100%);
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: flex-start;
  padding: 60px;
  position: relative;
  overflow: hidden;
}

.login-brand::before {
  content: '';
  position: absolute;
  width: 500px; height: 500px;
  border-radius: 50%;
  background: rgba(255,255,255,.04);
  top: -120px; right: -120px;
  pointer-events: none;
}

.login-brand::after {
  content: '';
  position: absolute;
  width: 300px; height: 300px;
  border-radius: 50%;
  background: rgba(255,255,255,.06);
  bottom: -60px; left: 40px;
  pointer-events: none;
}

.brand-logo {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 60px;
}

.brand-logo-icon {
  width: 44px; height: 44px;
  background: rgba(255,255,255,.15);
  border-radius: 12px;
  display: flex; align-items: center; justify-content: center;
  backdrop-filter: blur(8px);
}

.brand-logo-icon svg { width: 24px; height: 24px; fill: white; }

.brand-logo-name {
  font-size: 20px;
  font-weight: 700;
  color: white;
  letter-spacing: -0.3px;
}

.brand-tagline {
  font-size: 36px;
  font-weight: 700;
  color: white;
  line-height: 1.2;
  letter-spacing: -0.5px;
  margin-bottom: 16px;
}

.brand-tagline span { color: #a5b4fc; }

.brand-description {
  font-size: 15px;
  color: rgba(255,255,255,.6);
  line-height: 1.7;
  margin-bottom: 48px;
  max-width: 380px;
}

.brand-features { display: flex; flex-direction: column; gap: 14px; }

.brand-feature {
  display: flex;
  align-items: center;
  gap: 12px;
  color: rgba(255,255,255,.8);
  font-size: 14px;
}

.brand-feature-icon {
  width: 28px; height: 28px;
  background: rgba(255,255,255,.12);
  border-radius: 8px;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}

.brand-feature-icon svg { width: 14px; height: 14px; stroke: #a5b4fc; }

/* Right panel — form */
.login-form-panel {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  padding: 60px 40px;
  background: var(--color-surface);
}

.login-form-box {
  width: 100%;
  max-width: 400px;
}

.login-heading {
  font-size: 26px;
  font-weight: 700;
  color: var(--color-text);
  letter-spacing: -0.4px;
  margin-bottom: 6px;
}

.login-subheading {
  font-size: 14px;
  color: var(--color-text-muted);
  margin-bottom: 36px;
}

/* Form fields */
.form-group {
  margin-bottom: 20px;
  position: relative;
}

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

.form-input {
  width: 100%;
  height: 44px;
  padding: 0 14px;
  border: 1.5px solid var(--color-border);
  border-radius: 8px;
  font-size: 14px;
  color: var(--color-text);
  background: var(--color-surface);
  transition: border-color var(--transition), box-shadow var(--transition);
  outline: none;
}

.form-input:focus {
  border-color: var(--color-brand);
  box-shadow: 0 0 0 3px rgba(79,70,229,.12);
}

.form-input.error {
  border-color: var(--color-danger);
  box-shadow: 0 0 0 3px rgba(239,68,68,.10);
}

.form-input-wrapper {
  position: relative;
}

.form-input-wrapper .form-input { padding-right: 44px; }

.btn-toggle-password {
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--color-text-light);
  display: flex; align-items: center;
  transition: color var(--transition);
}

.btn-toggle-password:hover { color: var(--color-text-muted); }
.btn-toggle-password svg { width: 18px; height: 18px; stroke: currentColor; }

/* Error message */
.error-banner {
  display: none;
  background: #fef2f2;
  border: 1px solid #fecaca;
  border-radius: 8px;
  padding: 12px 14px;
  font-size: 13px;
  color: var(--color-danger);
  margin-bottom: 20px;
  align-items: center;
  gap: 8px;
}

.error-banner.visible { display: flex; }
.error-banner svg { width: 16px; height: 16px; stroke: currentColor; flex-shrink: 0; }

/* Submit button */
.btn-primary {
  width: 100%;
  height: 46px;
  background: var(--color-brand);
  color: white;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0.1px;
  transition: background var(--transition), transform var(--transition), box-shadow var(--transition);
  display: flex; align-items: center; justify-content: center; gap: 8px;
  margin-top: 8px;
}

.btn-primary:hover:not(:disabled) {
  background: var(--color-brand-dark);
  box-shadow: 0 4px 12px rgba(79,70,229,.35);
}

.btn-primary:active:not(:disabled) { transform: translateY(1px); }

.btn-primary:disabled {
  opacity: .65;
  cursor: not-allowed;
}

.btn-spinner {
  width: 18px; height: 18px;
  border: 2px solid rgba(255,255,255,.4);
  border-top-color: white;
  border-radius: 50%;
  animation: spin .7s linear infinite;
  display: none;
}

.btn-primary.loading .btn-label { display: none; }
.btn-primary.loading .btn-spinner { display: block; }

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

.login-footer {
  text-align: center;
  margin-top: 28px;
  font-size: 13px;
  color: var(--color-text-muted);
}

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

/* Sidebar */
.sidebar {
  width: var(--sidebar-width);
  background: var(--color-sidebar);
  display: flex;
  flex-direction: column;
  position: fixed;
  top: 0; left: 0;
  height: 100vh;
  z-index: 100;
  transition: transform var(--transition);
}

.sidebar-header {
  height: var(--topbar-height);
  display: flex;
  align-items: center;
  padding: 0 20px;
  border-bottom: 1px solid rgba(255,255,255,.06);
  flex-shrink: 0;
}

.sidebar-logo {
  display: flex;
  align-items: center;
  gap: 10px;
}

.sidebar-logo-icon {
  width: 34px; height: 34px;
  background: var(--color-brand);
  border-radius: 9px;
  display: flex; align-items: center; justify-content: center;
}

.sidebar-logo-icon svg { width: 18px; height: 18px; fill: white; }

.sidebar-logo-name {
  font-size: 16px;
  font-weight: 700;
  color: white;
  letter-spacing: -0.2px;
}

/* Nav */
.sidebar-nav {
  flex: 1;
  padding: 12px 10px;
  overflow-y: auto;
}

.nav-section-label {
  font-size: 10px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: rgba(255,255,255,.25);
  padding: 16px 10px 8px;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-radius: 8px;
  color: rgba(255,255,255,.55);
  font-size: 13.5px;
  font-weight: 500;
  cursor: pointer;
  transition: background var(--transition), color var(--transition);
  margin-bottom: 2px;
  position: relative;
}

.nav-item:hover {
  background: var(--color-sidebar-hover);
  color: rgba(255,255,255,.85);
}

.nav-item.active {
  background: rgba(79,70,229,.25);
  color: #a5b4fc;
}

.nav-item.active::before {
  content: '';
  position: absolute;
  left: 0; top: 50%;
  transform: translateY(-50%);
  width: 3px; height: 18px;
  background: var(--color-brand-light);
  border-radius: 0 3px 3px 0;
}

.nav-item-icon {
  width: 36px; height: 36px;
  border-radius: 8px;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
  background: rgba(255,255,255,.06);
}

.nav-item.active .nav-item-icon { background: rgba(79,70,229,.3); }

.nav-item-icon svg { width: 16px; height: 16px; stroke: currentColor; }

.nav-item-label { flex: 1; }

/* Sidebar footer */
.sidebar-footer {
  padding: 14px 10px;
  border-top: 1px solid rgba(255,255,255,.06);
  flex-shrink: 0;
}

.sidebar-user {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-radius: 8px;
  cursor: pointer;
  transition: background var(--transition);
}

.sidebar-user:hover { background: var(--color-sidebar-hover); }

.sidebar-user-avatar {
  width: 34px; height: 34px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--color-brand), #7c3aed);
  display: flex; align-items: center; justify-content: center;
  font-size: 13px;
  font-weight: 700;
  color: white;
  flex-shrink: 0;
}

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

.sidebar-user-name {
  font-size: 13px;
  font-weight: 600;
  color: rgba(255,255,255,.9);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.sidebar-user-role {
  font-size: 11px;
  color: rgba(255,255,255,.35);
  text-transform: capitalize;
}

.sidebar-user-menu svg {
  width: 14px; height: 14px;
  stroke: rgba(255,255,255,.3);
}

/* Main */
.main-area {
  margin-left: var(--sidebar-width);
  flex: 1;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

/* Sidebar bottom nav (pinned just above footer) */
.sidebar-bottom-nav {
  padding: 4px 10px;
  border-top: 1px solid rgba(255,255,255,.06);
  flex-shrink: 0;
}

/* Sidebar logout button */
.sidebar-logout-btn {
  width: 32px; height: 32px;
  border-radius: 8px;
  display: flex; align-items: center; justify-content: center;
  color: rgba(255,255,255,.3);
  transition: background var(--transition), color var(--transition);
  flex-shrink: 0;
}

.sidebar-logout-btn:hover {
  background: rgba(239,68,68,.15);
  color: #f87171;
}

.sidebar-logout-btn svg { width: 15px; height: 15px; stroke: currentColor; }

/* Page content */
.page-content { flex: 1; padding: 28px; }

.page-header { margin-bottom: 24px; }

.page-title {
  font-size: 22px;
  font-weight: 700;
  color: var(--color-text);
  letter-spacing: -0.3px;
}

.page-subtitle { font-size: 14px; color: var(--color-text-muted); margin-top: 4px; }

/* Stats grid */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  margin-bottom: 24px;
}

.stat-card {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.stat-card-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
}

.stat-card-label {
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--color-text-muted);
}

.stat-card-icon {
  width: 36px; height: 36px;
  border-radius: 9px;
  display: flex; align-items: center; justify-content: center;
}

.stat-card-icon.purple { background: #ede9fe; }
.stat-card-icon.purple svg { stroke: #7c3aed; }
.stat-card-icon.green  { background: #dcfce7; }
.stat-card-icon.green svg  { stroke: #16a34a; }
.stat-card-icon.blue   { background: #dbeafe; }
.stat-card-icon.blue svg   { stroke: #2563eb; }
.stat-card-icon.orange { background: #ffedd5; }
.stat-card-icon.orange svg { stroke: #ea580c; }

.stat-card-icon svg { width: 18px; height: 18px; }

.stat-card-value {
  font-size: 26px;
  font-weight: 700;
  color: var(--color-text);
  letter-spacing: -0.5px;
}

.stat-card-change {
  font-size: 12px;
  color: var(--color-text-muted);
}

.stat-card-change .up { color: var(--color-success); font-weight: 600; }
.stat-card-change .down { color: var(--color-danger); font-weight: 600; }

/* Content card */
.content-card {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  overflow: hidden;
}

.content-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 20px;
  border-bottom: 1px solid var(--color-border);
}

.content-card-title {
  font-size: 14px;
  font-weight: 600;
  color: var(--color-text);
}

.content-card-action {
  font-size: 13px;
  color: var(--color-brand);
  font-weight: 500;
  transition: color var(--transition);
  cursor: pointer;
}

.content-card-action:hover { color: var(--color-brand-dark); }

/* Table */
.data-table { width: 100%; border-collapse: collapse; }

.data-table th {
  font-size: 11.5px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--color-text-muted);
  padding: 12px 20px;
  text-align: left;
  background: #f8fafc;
  border-bottom: 1px solid var(--color-border);
}

.data-table td {
  padding: 14px 20px;
  font-size: 13.5px;
  color: var(--color-text);
  border-bottom: 1px solid var(--color-border);
  vertical-align: middle;
}

.data-table tr:last-child td { border-bottom: none; }
.data-table tbody tr:hover td { background: #f8fafc; }

/* Status badges */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 11.5px;
  font-weight: 600;
  padding: 3px 9px;
  border-radius: 20px;
}

.badge::before {
  content: '';
  width: 6px; height: 6px;
  border-radius: 50%;
}

.badge-success { background: #dcfce7; color: #15803d; }
.badge-success::before { background: #22c55e; }
.badge-danger  { background: #fef2f2; color: #b91c1c; }
.badge-danger::before  { background: #ef4444; }
.badge-warning { background: #fef9c3; color: #a16207; }
.badge-warning::before { background: #eab308; }
.badge-neutral { background: #f1f5f9; color: #475569; }
.badge-neutral::before { background: #94a3b8; }

/* Empty state */
.empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 64px 20px;
  text-align: center;
}

.empty-state-icon {
  width: 56px; height: 56px;
  border-radius: 16px;
  background: var(--color-bg);
  display: flex; align-items: center; justify-content: center;
  margin-bottom: 16px;
}

.empty-state-icon svg { width: 26px; height: 26px; stroke: var(--color-text-light); }
.empty-state-title { font-size: 15px; font-weight: 600; color: var(--color-text); margin-bottom: 6px; }
.empty-state-desc { font-size: 13px; color: var(--color-text-muted); }

/* ── Page header row (title + action button side by side) ──────────────────── */
.page-header-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}

/* ── Action button (filled, smaller than btn-primary) ───────────────────────── */
.btn-action {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 38px;
  padding: 0 16px;
  background: var(--color-brand);
  color: white;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 600;
  white-space: nowrap;
  flex-shrink: 0;
  transition: background var(--transition), box-shadow var(--transition);
}

.btn-action:hover {
  background: var(--color-brand-dark);
  box-shadow: 0 4px 12px rgba(79,70,229,.3);
}

.btn-action svg { width: 15px; height: 15px; stroke: white; }

/* ── Secondary button ───────────────────────────────────────────────────────── */
.btn-secondary {
  display: inline-flex;
  align-items: center;
  height: 38px;
  padding: 0 16px;
  border: 1.5px solid var(--color-border);
  border-radius: 8px;
  font-size: 13px;
  font-weight: 500;
  color: var(--color-text-muted);
  background: var(--color-surface);
  transition: background var(--transition), border-color var(--transition);
}

.btn-secondary:hover {
  background: var(--color-bg);
  border-color: #cbd5e1;
}

/* ── Content card count badge ───────────────────────────────────────────────── */
.content-card-count {
  font-size: 12px;
  font-weight: 600;
  color: var(--color-text-muted);
  background: var(--color-bg);
  border: 1px solid var(--color-border);
  border-radius: 20px;
  padding: 2px 10px;
}

/* ── Form hint text ─────────────────────────────────────────────────────────── */
.form-hint {
  display: block;
  font-size: 12px;
  color: var(--color-text-muted);
  margin-top: 5px;
}

/* ── Uppercase input ────────────────────────────────────────────────────────── */
.form-input-upper { text-transform: uppercase; letter-spacing: 0.5px; }

/* ── Table loading skeleton ─────────────────────────────────────────────────── */
.table-loading { padding: 16px 20px; display: flex; flex-direction: column; gap: 10px; }

.skeleton-row {
  height: 20px;
  border-radius: 6px;
  background: linear-gradient(90deg, #f1f5f9 25%, #e2e8f0 50%, #f1f5f9 75%);
  background-size: 200% 100%;
  animation: shimmer 1.4s infinite;
}

.skeleton-row:nth-child(2) { width: 85%; }
.skeleton-row:nth-child(3) { width: 70%; }

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

/* ── ACL Grid (user modal) ──────────────────────────────────────────────────── */
.acl-grid {
  display: grid;
  grid-template-columns: 1fr 148px;
  gap: 8px;
  align-items: center;
  padding: 4px 0;
}

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

.acl-select {
  height: 34px;
  padding: 0 10px;
  font-size: 12px;
  border: 1px solid var(--color-border);
  border-radius: 7px;
  background: var(--color-surface);
  color: var(--color-text);
  font-family: inherit;
  cursor: pointer;
}

.acl-select:focus { outline: none; border-color: var(--color-brand); }

/* ── Modal ──────────────────────────────────────────────────────────────────── */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(15,23,42,.45);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 200;
  padding: 20px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 200ms ease;
}

.modal-overlay.open {
  opacity: 1;
  pointer-events: auto;
}

.modal {
  background: var(--color-surface);
  border-radius: 14px;
  width: 100%;
  max-width: 460px;
  box-shadow: var(--shadow-lg);
  transform: translateY(10px);
  transition: transform 200ms ease;
}

.modal-overlay.open .modal { transform: translateY(0); }

.modal-lg { max-width: 580px; }

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 24px 0;
}

.modal-title {
  font-size: 16px;
  font-weight: 700;
  color: var(--color-text);
}

.modal-close {
  width: 32px; height: 32px;
  border-radius: 8px;
  display: flex; align-items: center; justify-content: center;
  color: var(--color-text-muted);
  transition: background var(--transition), color var(--transition);
}

.modal-close:hover { background: var(--color-bg); color: var(--color-text); }
.modal-close svg { width: 16px; height: 16px; stroke: currentColor; }

.modal-body { padding: 20px 24px; }

.modal-error {
  background: #fef2f2;
  border: 1px solid #fecaca;
  color: var(--color-danger);
  font-size: 13px;
  border-radius: 8px;
  padding: 10px 14px;
  margin-bottom: 16px;
}

.modal-footer {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  padding: 0 24px 20px;
}

.modal-submit {
  width: auto;
  height: 38px;
  padding: 0 20px;
  margin-top: 0;
  font-size: 13px;
}

/* ── Inline code tag (PSP code column) ─────────────────────────────────────── */
.code-tag {
  font-family: 'SF Mono', 'Fira Mono', 'Menlo', monospace;
  font-size: 12px;
  font-weight: 600;
  background: #f1f5f9;
  color: var(--color-brand);
  border: 1px solid #e2e8f0;
  border-radius: 5px;
  padding: 2px 7px;
  letter-spacing: 0.4px;
}

.psp-name { font-weight: 500; }

/* ── Row action button (Edit) ───────────────────────────────────────────────── */
/* ── Clickable table row ────────────────────────────────────────────────────── */
.tr-clickable { cursor: pointer; }
.tr-clickable:hover td { background: #f0f4ff !important; }

/* ── Back button ────────────────────────────────────────────────────────────── */
.btn-back {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 13px;
  font-weight: 500;
  color: var(--color-text-muted);
  padding: 6px 10px;
  border-radius: 7px;
  border: 1px solid var(--color-border);
  background: var(--color-surface);
  white-space: nowrap;
  transition: background var(--transition), color var(--transition);
}

.btn-back:hover { background: var(--color-bg); color: var(--color-text); }
.btn-back svg { width: 15px; height: 15px; stroke: currentColor; }

/* ── Tag pill (payment methods / currencies) ────────────────────────────────── */
.tag {
  display: inline-block;
  font-size: 11px;
  font-weight: 500;
  background: #f1f5f9;
  color: var(--color-text-muted);
  border-radius: 4px;
  padding: 2px 7px;
  margin: 2px 2px 2px 0;
}

/* ── Row action button (Edit) ───────────────────────────────────────────────── */
.btn-row-action {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 12px;
  font-weight: 500;
  color: var(--color-text-muted);
  padding: 5px 10px;
  border-radius: 6px;
  border: 1px solid var(--color-border);
  background: var(--color-surface);
  transition: background var(--transition), color var(--transition), border-color var(--transition);
}

.btn-row-action:hover {
  background: var(--color-bg);
  color: var(--color-brand);
  border-color: var(--color-brand-light);
}

.btn-row-action svg { width: 13px; height: 13px; stroke: currentColor; }

/* ── Select input ───────────────────────────────────────────────────────────── */
.form-select {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%2364748b' stroke-width='2'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  padding-right: 36px;
  cursor: pointer;
}

/* ── Form row (two columns) ─────────────────────────────────────────────────── */
.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

/* ── Checkbox group ─────────────────────────────────────────────────────────── */
.checkbox-group {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 10px 12px;
  border: 1.5px solid var(--color-border);
  border-radius: 8px;
}

.checkbox-item {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13.5px;
  color: var(--color-text);
  cursor: pointer;
}

.checkbox-item input[type="checkbox"] {
  width: 15px; height: 15px;
  accent-color: var(--color-brand);
  cursor: pointer;
  flex-shrink: 0;
}

/* ── Key-value rows (account details) ───────────────────────────────────────── */
.kv-row {
  display: flex;
  gap: 8px;
  margin-bottom: 8px;
  align-items: center;
}

.kv-row input {
  flex: 1;
  height: 38px;
  padding: 0 12px;
  border: 1.5px solid var(--color-border);
  border-radius: 7px;
  font-size: 13px;
  color: var(--color-text);
  outline: none;
  font-family: inherit;
  transition: border-color var(--transition);
}

.kv-row input:focus { border-color: var(--color-brand); }

.kv-row input::placeholder { color: var(--color-text-light); }

.btn-remove-kv {
  width: 30px; height: 30px;
  border-radius: 6px;
  color: var(--color-text-light);
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
  transition: background var(--transition), color var(--transition);
}

.btn-remove-kv:hover { background: #fef2f2; color: var(--color-danger); }
.btn-remove-kv svg { width: 14px; height: 14px; stroke: currentColor; }

.btn-add-kv {
  font-size: 12px;
  font-weight: 500;
  color: var(--color-brand);
  transition: color var(--transition);
}

.btn-add-kv:hover { color: var(--color-brand-dark); }

/* ── Order detail grid ─────────────────────────────────────────────────────── */
.detail-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 16px;
  padding: 16px;
}
.detail-item { display: flex; flex-direction: column; gap: 4px; }
.detail-label { font-size: 11px; font-weight: 600; color: var(--color-text-muted); text-transform: uppercase; letter-spacing: .04em; }
.detail-value { font-size: 14px; color: var(--color-text); word-break: break-all; }

/* ── Clickable table rows ──────────────────────────────────────────────────── */
.data-table tbody tr.clickable { cursor: pointer; }
.data-table tbody tr.clickable:hover td { background: #eef4ff; }

/* ── Responsive ────────────────────────────────────────────────────────────── */
@media (max-width: 900px) {
  .login-page { grid-template-columns: 1fr; }
  .login-brand { display: none; }
  .stats-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 600px) {
  .stats-grid { grid-template-columns: 1fr; }
  .page-content { padding: 16px; }
}
