:root {
  --lime: #9BBC0E;
  --lime-dark: #7a9a0b;
  --blue: #2086BA;
  --blue-light: #D9E8FF;
  --black: #000000;
  --white: #FFFFFF;
  --gray-50: #F9FAFB;
  --gray-100: #F3F4F6;
  --gray-200: #E5E7EB;
  --gray-300: #D1D5DB;
  --gray-400: #9CA3AF;
  --gray-500: #6B7280;
  --gray-700: #374151;
  --gray-900: #111827;
  --red: #DC2626;
  --orange: #D97706;
  --header-h: 52px;
  --radius: 6px;
}

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

html { font-size: 14px; }

body {
  font-family: 'Inter', -apple-system, system-ui, sans-serif;
  background: var(--gray-50);
  color: var(--gray-900);
  line-height: 1.5;
}

/* ── Header ── */
.admin-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: #1a1f2e;
  border-bottom: 1px solid rgba(255,255,255,0.08);
  height: var(--header-h);
}

.header-inner {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  height: 100%;
  padding: 0 1.25rem;
  max-width: 1400px;
  margin: 0 auto;
}

.header-logo {
  text-decoration: none;
  display: flex;
  align-items: baseline;
  gap: 3px;
  flex-shrink: 0;
}

.logo-fw {
  font-family: 'Playfair Display', serif;
  font-weight: 700;
  font-size: 1.125rem;
  color: var(--lime);
  letter-spacing: -0.5px;
}

.logo-admin {
  font-size: 0.6875rem;
  font-weight: 600;
  color: var(--gray-400);
  text-transform: uppercase;
  letter-spacing: 0.8px;
}

.header-nav {
  display: flex;
  align-items: center;
  gap: 2px;
  flex: 1;
}

.nav-link {
  text-decoration: none;
  color: var(--gray-400);
  font-size: 0.875rem;
  font-weight: 500;
  padding: 0.375rem 0.625rem;
  border-radius: var(--radius);
  transition: color 0.12s, background 0.12s;
}

.nav-link:hover {
  color: var(--white);
  background: rgba(255,255,255,0.08);
}

.nav-link.active {
  color: var(--lime);
  background: rgba(155,188,14,0.12);
}

.header-user {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex-shrink: 0;
}

.user-email {
  font-size: 0.8125rem;
  color: var(--gray-400);
  max-width: 180px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.btn-signout {
  text-decoration: none;
  font-size: 0.8125rem;
  color: var(--gray-400);
  padding: 0.25rem 0.625rem;
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: var(--radius);
  transition: color 0.12s, border-color 0.12s;
  white-space: nowrap;
}

.btn-signout:hover {
  color: var(--white);
  border-color: rgba(255,255,255,0.35);
}

/* ── Layout ── */
.main-content {
  max-width: 1400px;
  margin: 0 auto;
  padding: 1.5rem 1.25rem;
}

.page-header {
  display: flex;
  align-items: baseline;
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.page-header h1 {
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--gray-900);
}

.text-muted {
  font-size: 0.875rem;
  color: var(--gray-500);
}

/* ── Alerts ── */
.alert {
  padding: 0.75rem 1rem;
  border-radius: var(--radius);
  font-size: 0.875rem;
  margin-bottom: 1rem;
}

.alert-error {
  background: #FEF2F2;
  color: var(--red);
  border: 1px solid #FECACA;
}

.alert-warning {
  background: #FFFBEB;
  color: #92400E;
  border: 1px solid #FDE68A;
}

/* ── Dashboard widget grid ── */
.widget-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}

/* ── Widget ── */
.widget {
  background: var(--white);
  border: 1px solid var(--gray-200);
  border-radius: var(--radius);
  padding: 1.25rem;
  min-width: 0;
}

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

.widget-header h2 {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--gray-500);
  text-transform: uppercase;
  letter-spacing: 0.6px;
}

.widget-link {
  font-size: 0.8125rem;
  color: var(--blue);
  text-decoration: none;
}

.widget-link:hover { text-decoration: underline; }

.widget-stat {
  font-size: 2.75rem;
  font-weight: 700;
  color: var(--gray-900);
  line-height: 1;
  margin-bottom: 0.25rem;
  font-variant-numeric: tabular-nums;
}

.widget-subtext {
  font-size: 0.8125rem;
  color: var(--gray-500);
  margin-bottom: 1rem;
}

/* ── Mini tables ── */
.mini-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.8125rem;
}

.mini-table th {
  text-align: left;
  font-weight: 600;
  color: var(--gray-500);
  padding: 0.375rem 0.5rem;
  border-bottom: 1px solid var(--gray-200);
  white-space: nowrap;
  font-size: 0.75rem;
}

.mini-table td {
  padding: 0.4rem 0.5rem;
  border-bottom: 1px solid var(--gray-100);
  color: var(--gray-700);
  vertical-align: middle;
}

.mini-table tr:last-child td { border-bottom: none; }
.mini-table tr:hover td { background: var(--gray-50); }

.mini-table a {
  color: var(--blue);
  text-decoration: none;
  font-weight: 500;
}

.mini-table a:hover { text-decoration: underline; }

.mini-table small {
  color: var(--gray-400);
  font-size: 0.75rem;
  display: block;
  line-height: 1.3;
}

.mono {
  font-family: ui-monospace, 'Courier New', monospace;
  font-size: 0.75rem;
  color: var(--gray-500);
}

/* ── Badges ── */
.badge {
  display: inline-block;
  padding: 0.125rem 0.5rem;
  border-radius: 100px;
  font-size: 0.6875rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.3px;
  white-space: nowrap;
}

.badge-pending    { background: #FEF3C7; color: #92400E; }
.badge-authorized { background: #DBEAFE; color: #1E40AF; }
.badge-paid       { background: #D1FAE5; color: #065F46; }
.badge-partially_paid { background: #FEE2E2; color: #991B1B; }
.badge-refunded   { background: var(--gray-100); color: var(--gray-500); }
.badge-voided     { background: var(--gray-100); color: var(--gray-500); }

/* ── Stock indicators ── */
.qty-zero     { color: var(--red); font-weight: 700; }
.qty-critical { color: #D97706; font-weight: 600; }
.qty-low      { color: var(--gray-700); }

.row-critical td { background: #FFF5F5; }
.row-warning td  { background: #FFFBEB; }

/* ── Empty states ── */
.empty-state {
  font-size: 0.8125rem;
  color: var(--gray-400);
  text-align: center;
  padding: 1.5rem 0;
  font-style: italic;
}

/* ── Coming soon placeholder ── */
.coming-soon {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 0.5rem;
  min-height: 300px;
  color: var(--gray-400);
}

.coming-soon h2 { font-size: 1.125rem; color: var(--gray-500); }
.coming-soon p  { font-size: 0.875rem; }

/* ── Login page ── */
.login-body {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  background: #1a1f2e;
  padding: 1rem;
}

.login-card {
  background: var(--white);
  border-radius: 12px;
  padding: 2.5rem 2rem;
  width: 100%;
  max-width: 380px;
  text-align: center;
  box-shadow: 0 25px 60px rgba(0,0,0,0.35);
}

.login-logo {
  margin-bottom: 0.5rem;
  display: flex;
  align-items: baseline;
  justify-content: center;
  gap: 4px;
}

.login-logo .logo-fw   { font-size: 2rem; }
.login-logo .logo-admin { font-size: 0.9rem; color: var(--gray-400); }

.login-tagline {
  font-size: 0.875rem;
  color: var(--gray-500);
  margin-bottom: 1.75rem;
}

.btn-google {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.625rem;
  width: 100%;
  padding: 0.75rem 1rem;
  background: var(--white);
  border: 1px solid var(--gray-300);
  border-radius: var(--radius);
  color: var(--gray-700);
  font-size: 0.9375rem;
  font-weight: 500;
  text-decoration: none;
  transition: background 0.12s, box-shadow 0.12s;
  cursor: pointer;
}

.btn-google:hover {
  background: var(--gray-50);
  box-shadow: 0 1px 4px rgba(0,0,0,0.12);
}

.login-note {
  margin-top: 1rem;
  font-size: 0.75rem;
  color: var(--gray-400);
}

/* ── Responsive ── */
@media (max-width: 900px) {
  .widget-grid { grid-template-columns: 1fr; }
}

@media (max-width: 600px) {
  .main-content { padding: 1rem 0.75rem; }
  .header-inner { padding: 0 0.75rem; gap: 0.75rem; }
  .user-email { display: none; }
}

@media (max-width: 480px) {
  .header-nav .nav-link:nth-child(n+4) { display: none; }
}

/* ── Phase 2: Buttons ── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  padding: 0.45rem 0.875rem;
  font-size: 0.875rem;
  font-weight: 500;
  border-radius: var(--radius);
  border: 1px solid transparent;
  text-decoration: none;
  cursor: pointer;
  white-space: nowrap;
  transition: background 0.12s, border-color 0.12s, color 0.12s;
  font-family: inherit;
}

.btn-primary  { background: var(--lime); color: #1a2000; border-color: var(--lime-dark); }
.btn-primary:hover { background: var(--lime-dark); }
.btn-secondary { background: var(--white); color: var(--gray-700); border-color: var(--gray-300); }
.btn-secondary:hover { background: var(--gray-50); border-color: var(--gray-400); }
.btn-success  { background: #D1FAE5; color: #065F46; border-color: #6EE7B7; }
.btn-success:hover { background: #A7F3D0; }
.btn-ghost    { background: transparent; color: var(--gray-600, #4B5563); border-color: transparent; }
.btn-ghost:hover { background: var(--gray-100); }
.btn-sm   { padding: 0.3rem 0.625rem; font-size: 0.8125rem; }
.btn-xs   { padding: 0.125rem 0.375rem; font-size: 0.75rem; }

.alert-success {
  background: #D1FAE5;
  color: #065F46;
  border: 1px solid #6EE7B7;
}

/* ── Page header row ── */
.page-header-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1rem;
}
.page-header-row h1 {
  font-size: 1.25rem;
  font-weight: 600;
}

/* ── Filter bar ── */
.filter-bar {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
  margin-bottom: 1rem;
  padding: 0.625rem;
  background: var(--white);
  border: 1px solid var(--gray-200);
  border-radius: var(--radius);
}

.filter-input {
  flex: 1;
  min-width: 160px;
  padding: 0.4rem 0.625rem;
  border: 1px solid var(--gray-300);
  border-radius: var(--radius);
  font-size: 0.875rem;
  font-family: inherit;
  background: var(--gray-50);
}
.filter-input:focus {
  outline: none;
  border-color: var(--blue);
  background: var(--white);
}

.filter-select {
  padding: 0.4rem 0.625rem;
  border: 1px solid var(--gray-300);
  border-radius: var(--radius);
  font-size: 0.875rem;
  font-family: inherit;
  background: var(--gray-50);
  cursor: pointer;
}
.filter-select:focus { outline: none; border-color: var(--blue); }

/* ── Bulk action bar ── */
.bulk-bar {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.5rem 0.75rem;
  background: #EFF6FF;
  border: 1px solid #BFDBFE;
  border-radius: var(--radius);
  margin-bottom: 0.5rem;
  font-size: 0.875rem;
  font-weight: 500;
  color: #1E40AF;
}

/* ── Data tables ── */
.table-wrap {
  overflow-x: auto;
  border: 1px solid var(--gray-200);
  border-radius: var(--radius);
  background: var(--white);
}

.data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.875rem;
}

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

.data-table td {
  padding: 0.6rem 0.75rem;
  border-bottom: 1px solid var(--gray-100);
  vertical-align: middle;
  color: var(--gray-700);
}

.data-table tr:last-child td { border-bottom: none; }
.data-table tbody tr:hover td { background: var(--gray-50); }

.data-table a { color: var(--blue); text-decoration: none; font-weight: 500; }
.data-table a:hover { text-decoration: underline; }
.data-table small { color: var(--gray-400); font-size: 0.75rem; display: block; }

.col-check { width: 36px; }
.text-right { text-align: right; }
.small-text { font-size: 0.8125rem; }
.order-link { font-weight: 600; }
.table-action { color: var(--gray-400); font-size: 0.8125rem; white-space: nowrap; }
.table-action:hover { color: var(--blue); }

/* ── Pagination ── */
.pagination {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-top: 1rem;
  font-size: 0.875rem;
}

/* ── Fulfillment badges ── */
.badge-ff-unfulfilled      { background: #FEF3C7; color: #92400E; }
.badge-ff-fulfilled        { background: #D1FAE5; color: #065F46; }
.badge-ff-partially-fulfilled { background: #DBEAFE; color: #1E40AF; }
.badge-ff-restocked        { background: var(--gray-100); color: var(--gray-500); }
.badge-ff-success          { background: #D1FAE5; color: #065F46; }
.badge-ff-failure          { background: #FEE2E2; color: #991B1B; }
.badge-ff-pending          { background: #FEF3C7; color: #92400E; }
.badge-dropship            { background: #EDE9FE; color: #5B21B6; }
.badge-success             { background: #D1FAE5; color: #065F46; }
.badge-pending             { background: #FEF3C7; color: #92400E; }

/* ── Breadcrumb ── */
.breadcrumb-row { margin-bottom: 0.75rem; }
.breadcrumb {
  font-size: 0.875rem;
  color: var(--gray-500);
  text-decoration: none;
}
.breadcrumb:hover { color: var(--blue); text-decoration: underline; }

/* ── Detail header ── */
.detail-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1rem;
  flex-wrap: wrap;
}
.detail-header-left h1 {
  font-size: 1.375rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
}
.detail-header-actions { display: flex; gap: 0.5rem; flex-shrink: 0; }

/* ── Status timeline ── */
.timeline {
  display: flex;
  align-items: center;
  margin-bottom: 1.25rem;
  gap: 0;
}

.tl-step {
  flex: 1;
  text-align: center;
  font-size: 0.8125rem;
  font-weight: 500;
  color: var(--gray-400);
  padding: 0.5rem 0;
  border-bottom: 3px solid var(--gray-200);
  position: relative;
}

.tl-step.tl-done {
  color: #065F46;
  border-bottom-color: var(--lime);
}

.tl-step.tl-current {
  color: #1E40AF;
  border-bottom-color: var(--blue);
  font-weight: 600;
}

/* ── Detail grid ── */
.detail-grid {
  display: grid;
  grid-template-columns: 1fr 320px;
  gap: 1rem;
  align-items: start;
}
.detail-main { display: flex; flex-direction: column; gap: 1rem; }
.detail-side  { display: flex; flex-direction: column; gap: 1rem; }

/* ── Cards ── */
.card {
  background: var(--white);
  border: 1px solid var(--gray-200);
  border-radius: var(--radius);
  padding: 1rem;
}

.card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.75rem;
}
.card-header h2 {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--gray-500);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

/* ── Totals block ── */
.totals-block {
  border-top: 1px solid var(--gray-100);
  padding-top: 0.75rem;
  margin-top: 0.25rem;
}
.totals-row {
  display: flex;
  justify-content: space-between;
  font-size: 0.875rem;
  padding: 0.2rem 0.75rem;
  color: var(--gray-600, #4B5563);
}
.totals-total {
  font-weight: 700;
  font-size: 1rem;
  color: var(--gray-900);
  padding-top: 0.4rem;
  border-top: 1px solid var(--gray-200);
  margin-top: 0.2rem;
}

/* ── Textarea, Input ── */
.textarea {
  width: 100%;
  padding: 0.5rem 0.625rem;
  border: 1px solid var(--gray-300);
  border-radius: var(--radius);
  font-size: 0.875rem;
  font-family: inherit;
  resize: vertical;
  background: var(--gray-50);
}
.textarea:focus { outline: none; border-color: var(--blue); background: var(--white); }

.input {
  width: 100%;
  padding: 0.4rem 0.625rem;
  border: 1px solid var(--gray-300);
  border-radius: var(--radius);
  font-size: 0.875rem;
  font-family: inherit;
  background: var(--gray-50);
}
.input:focus { outline: none; border-color: var(--blue); background: var(--white); }
.input-sm { padding: 0.3rem 0.5rem; font-size: 0.8125rem; }

.form-row { display: flex; flex-direction: column; gap: 0.25rem; margin-bottom: 0.5rem; font-size: 0.875rem; }
.form-row label { font-weight: 500; color: var(--gray-600, #4B5563); }

/* ── Address display ── */
.address-block {
  font-size: 0.875rem;
  color: var(--gray-700);
  line-height: 1.7;
}

/* ── Tags ── */
.tags-list, .tags-mini {
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem;
}
.tag {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  padding: 0.125rem 0.5rem;
  background: var(--blue-light);
  color: #1E40AF;
  border-radius: 100px;
  font-size: 0.75rem;
  font-weight: 500;
}
.tag-sm { font-size: 0.6875rem; padding: 0.1rem 0.375rem; }
.tag-remove {
  background: none;
  border: none;
  cursor: pointer;
  color: #1E40AF;
  font-size: 0.875rem;
  line-height: 1;
  padding: 0;
  opacity: 0.5;
}
.tag-remove:hover { opacity: 1; }

/* ── Fulfillment rows ── */
.fulfillment-row {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.35rem 0;
  font-size: 0.875rem;
}
.tracking-link {
  color: var(--blue);
  text-decoration: none;
  font-size: 0.8125rem;
}
.tracking-link:hover { text-decoration: underline; }

/* ── KV list ── */
.kv-list { display: flex; flex-direction: column; gap: 0.375rem; }
.kv-row {
  display: flex;
  justify-content: space-between;
  font-size: 0.875rem;
  color: var(--gray-600, #4B5563);
}
.kv-row strong { font-weight: 600; color: var(--gray-900); }

/* ── Toggle ── */
.toggle-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.875rem;
  font-weight: 500;
  cursor: pointer;
  user-select: none;
}
.toggle { width: 36px; height: 20px; accent-color: var(--lime); cursor: pointer; }

/* ── Link strong ── */
.link-strong { color: var(--gray-900); font-weight: 600; text-decoration: none; }
.link-strong:hover { color: var(--blue); text-decoration: underline; }

/* ── Autocomplete dropdown ── */
.autocomplete-dropdown {
  position: absolute;
  top: calc(100% + 2px);
  left: 0; right: 0;
  background: var(--white);
  border: 1px solid var(--gray-200);
  border-radius: var(--radius);
  box-shadow: 0 4px 16px rgba(0,0,0,0.1);
  z-index: 200;
  max-height: 240px;
  overflow-y: auto;
}
.autocomplete-item {
  padding: 0.5rem 0.75rem;
  font-size: 0.875rem;
  cursor: pointer;
  border-bottom: 1px solid var(--gray-100);
}
.autocomplete-item:last-child { border-bottom: none; }
.autocomplete-item:hover { background: var(--gray-50); }
.autocomplete-item small {
  display: block;
  font-size: 0.75rem;
  color: var(--gray-400);
}

.selected-item {
  margin-top: 0.5rem;
  padding: 0.375rem 0.625rem;
  background: var(--gray-50);
  border: 1px solid var(--gray-200);
  border-radius: var(--radius);
  font-size: 0.875rem;
}

/* ── Responsive Phase 2 ── */
@media (max-width: 900px) {
  .detail-grid { grid-template-columns: 1fr; }
}
@media (max-width: 600px) {
  .timeline { flex-wrap: nowrap; overflow-x: auto; }
  .tl-step { min-width: 80px; }
  .detail-header { flex-direction: column; }
  .detail-header-actions { flex-direction: row; }
  .filter-bar { gap: 0.375rem; }
  .filter-input { min-width: 0; }
}

/* ── Phase 3: Catalog ── */
.bulk-bar {
  display: flex;
  align-items: center;
  gap: 0.625rem;
  padding: 0.5rem 0.75rem;
  background: var(--lime);
  color: #fff;
  border-radius: var(--radius);
  margin-bottom: 0.75rem;
  font-size: 0.875rem;
  font-weight: 600;
}
.tag-chip {
  display: inline-block;
  padding: 0.125rem 0.5rem;
  background: var(--marquee-blue);
  color: var(--curtain-blue);
  border-radius: 9999px;
  font-size: 0.75rem;
  font-weight: 500;
}
.row-done { opacity: 0.55; }

/* ── Phase 3: Reports ── */
.report-stats {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
  margin-bottom: 2rem;
}
.stat-card {
  background: var(--gray-50);
  border: 1px solid var(--gray-200);
  border-radius: var(--radius);
  padding: 1rem 1.25rem;
  min-width: 140px;
}
.stat-value {
  font-size: 1.75rem;
  font-weight: 700;
  color: var(--black);
  line-height: 1.1;
}
.stat-label {
  font-size: 0.8rem;
  color: var(--gray-500);
  margin-top: 0.25rem;
}
.report-section {
  margin-bottom: 2.5rem;
  border: 1px solid var(--gray-200);
  border-radius: var(--radius);
  overflow: hidden;
}
.report-section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.75rem 1rem;
  background: var(--gray-50);
  border-bottom: 1px solid var(--gray-200);
}
.report-section-header h2 {
  margin: 0;
  font-size: 0.95rem;
  font-weight: 600;
}
.chart-container {
  padding: 1rem;
  background: #fff;
  border-bottom: 1px solid var(--gray-200);
  overflow-x: auto;
}
.data-table-sm { font-size: 0.8rem; }
.data-table-sm th, .data-table-sm td { padding: 0.35rem 0.625rem; }

/* ── Phase 3: Settings ── */
.settings-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem;
  max-width: 900px;
}
.settings-section {
  background: #fff;
  border: 1px solid var(--gray-200);
  border-radius: var(--radius);
  padding: 1.25rem;
}
.settings-section h2 {
  font-size: 0.95rem;
  font-weight: 600;
  margin: 0 0 1rem;
  color: var(--black);
}
.settings-readonly { grid-column: 1 / -1; }
.settings-form { display: flex; flex-direction: column; gap: 0.75rem; }
.form-row { display: flex; flex-direction: column; gap: 0.25rem; }
.form-row label { font-size: 0.85rem; font-weight: 500; color: var(--gray-700); }
.form-input {
  padding: 0.375rem 0.625rem;
  border: 1px solid var(--gray-300);
  border-radius: var(--radius);
  font-size: 0.875rem;
  font-family: inherit;
}
.form-input:focus { outline: 2px solid var(--lime); border-color: var(--lime); }
.allowlist {
  list-style: none;
  padding: 0;
  margin: 0 0 0.5rem;
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}
.allowlist li {
  padding: 0.25rem 0.5rem;
  background: var(--gray-50);
  border-radius: var(--radius);
  font-size: 0.85rem;
  font-family: var(--font-mono, monospace);
}
.info-grid {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 0.5rem 1rem;
  font-size: 0.85rem;
}
.info-grid dt { font-weight: 500; color: var(--gray-600); white-space: nowrap; }
.info-grid dd { margin: 0; word-break: break-all; }
.pagination {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin: 1rem 0;
  font-size: 0.85rem;
}

@media (max-width: 700px) {
  .settings-grid { grid-template-columns: 1fr; }
  .settings-readonly { grid-column: 1; }
  .report-stats { flex-direction: column; }
}

/* ── Phase 4: Keyboard shortcut overlay ─────────────────────────────────────── */
.kb-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.45);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
}
.kb-overlay.hidden { display: none; }
.kb-overlay-inner {
  background: #fff;
  border-radius: var(--radius);
  padding: 1.5rem 2rem;
  max-width: 400px;
  width: 90%;
  box-shadow: 0 8px 40px rgba(0,0,0,0.18);
}
.kb-overlay-inner h3 {
  font-size: 1rem;
  font-weight: 600;
  margin: 0 0 1rem;
}
.kb-table { border-collapse: collapse; width: 100%; font-size: 0.875rem; }
.kb-table td { padding: 0.3rem 0.5rem; }
.kb-table td:first-child { white-space: nowrap; }
kbd {
  display: inline-block;
  padding: 0.1rem 0.35rem;
  font-size: 0.75rem;
  font-family: var(--font-mono, monospace);
  background: var(--gray-100);
  border: 1px solid var(--gray-300);
  border-radius: 3px;
  margin-right: 2px;
}

/* ── Phase 5: Labels page ────────────────────────────────────────────────────── */
.tab-bar {
  display: flex;
  gap: 0;
  border-bottom: 2px solid var(--gray-200);
  margin-bottom: 1rem;
}
.tab {
  background: none;
  border: none;
  border-bottom: 2px solid transparent;
  padding: 0.5rem 1.25rem;
  font-size: 0.875rem;
  font-weight: 500;
  cursor: pointer;
  color: var(--gray-600);
  margin-bottom: -2px;
}
.tab.active { border-bottom-color: var(--lime); color: var(--black); }
.tab:hover:not(.active) { color: var(--black); background: var(--gray-50); }
.tab-content { }
.tab-content.hidden { display: none; }
.row-muted td { opacity: 0.45; }
.form-input-sm { padding: 0.2rem 0.375rem; font-size: 0.8rem; }

/* ── Phase 6: Exports page ───────────────────────────────────────────────────── */
.exports-cards {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 1.25rem;
  margin-top: 0.5rem;
}
.export-card {
  display: flex;
  flex-direction: column;
  background: #fff;
  border: 1px solid var(--gray-200);
  border-radius: var(--radius);
  padding: 1.5rem;
  text-decoration: none;
  color: inherit;
  transition: border-color 0.15s, box-shadow 0.15s;
}
.export-card:hover { border-color: var(--lime); box-shadow: 0 2px 12px rgba(155,188,14,0.12); }
.export-card-icon {
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  background: var(--lime-light, #e8f3c0);
  color: var(--lime-dark, #5a7a00);
  padding: 0.2rem 0.5rem;
  border-radius: 4px;
  align-self: flex-start;
  margin-bottom: 0.75rem;
  font-family: var(--font-mono, monospace);
}
.export-card h3 { font-size: 1rem; font-weight: 600; margin: 0 0 0.4rem; }
.export-card p { font-size: 0.85rem; color: var(--gray-600); margin: 0; line-height: 1.5; }
.exports-layout {
  display: grid;
  grid-template-columns: 1fr 300px;
  gap: 1.25rem;
  align-items: start;
}
.col-checks {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}
.col-check {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.85rem;
  cursor: pointer;
}

@media (max-width: 700px) {
  .exports-layout { grid-template-columns: 1fr; }
  .tab { padding: 0.4rem 0.75rem; font-size: 0.8rem; }
}
