/* OmiScan Demo — Shared styles (v0.2, OmiGroup style) */

@import url('https://fonts.googleapis.com/css2?family=Be+Vietnam+Pro:wght@400;500;600;700&family=JetBrains+Mono:wght@400;500&display=swap');

:root {
  /* OmiGroup primary blue */
  --primary: #0F4D8A;
  --primary-dark: #0A3563;
  --primary-light: #3B7DB8;
  --primary-50: #F0F6FC;
  --primary-100: #DCE9F4;
  /* Nutrition accent green (gần với OmiMeal) */
  --nutrition: #16A34A;
  --nutrition-dark: #14532D;
  --nutrition-50: #F0FDF4;
  --nutrition-100: #DCFCE7;
  /* Functional */
  --secondary: #16A34A;
  --warning: #EAB308;
  --warning-50: #FEFCE8;
  --warning-100: #FEF9C3;
  --danger: #DC2626;
  --danger-50: #FEF2F2;
  --danger-100: #FEE2E2;
  --advisory: #0891B2;
  /* Neutrals */
  --neutral-900: #0F172A;
  --neutral-700: #334155;
  --neutral-500: #64748B;
  --neutral-400: #94A3B8;
  --neutral-300: #CBD5E1;
  --neutral-200: #E2E8F0;
  --neutral-100: #F1F5F9;
  --neutral-50: #F8FAFC;
}

* {
  box-sizing: border-box;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  margin: 0;
  font-family: 'Be Vietnam Pro', system-ui, -apple-system, sans-serif;
  background: var(--neutral-50);
  color: var(--neutral-900);
}

/* ─── OmiGroup top bar ─── */

.omi-topbar {
  background: white;
  border-bottom: 1px solid var(--neutral-200);
  padding: 12px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: sticky;
  top: 0;
  z-index: 100;
  backdrop-filter: blur(10px);
  background: rgba(255, 255, 255, 0.95);
}

.omi-topbar .brand {
  display: flex;
  align-items: center;
  gap: 8px;
  text-decoration: none;
  color: var(--neutral-900);
  font-weight: 700;
  font-size: 17px;
}

.omi-topbar .brand .emoji {
  font-size: 24px;
}

.omi-topbar .version-badge {
  background: var(--primary-50);
  color: var(--primary);
  padding: 3px 10px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 600;
  font-family: 'JetBrains Mono', monospace;
}

.omi-topbar .nav-links {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
}

.omi-topbar .nav-links a {
  text-decoration: none;
  color: var(--neutral-700);
  padding: 6px 12px;
  border-radius: 8px;
  transition: all 0.15s;
}

.omi-topbar .nav-links a:hover {
  background: var(--neutral-100);
  color: var(--primary);
}

.omi-topbar .nav-links a.active {
  background: var(--primary-50);
  color: var(--primary);
  font-weight: 600;
}

.omi-topbar .actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.locale-switch {
  display: inline-flex;
  background: var(--neutral-100);
  border-radius: 8px;
  padding: 2px;
}

.locale-switch button {
  background: none;
  border: none;
  padding: 4px 10px;
  font-size: 12px;
  font-weight: 600;
  color: var(--neutral-500);
  cursor: pointer;
  border-radius: 6px;
  font-family: inherit;
}

.locale-switch button.active {
  background: white;
  color: var(--primary);
  box-shadow: 0 1px 2px rgba(0,0,0,0.1);
}

/* ─── Buttons (OmiGroup bracket notation) ─── */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 10px 16px;
  border-radius: 10px;
  font-weight: 600;
  font-size: 14px;
  border: none;
  cursor: pointer;
  transition: all 0.15s;
  text-decoration: none;
  font-family: inherit;
  white-space: nowrap;
}

.btn-primary {
  background: var(--primary);
  color: white;
}

.btn-primary:hover {
  background: var(--primary-dark);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(15, 77, 138, 0.25);
}

.btn-primary:disabled {
  background: var(--neutral-300);
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

.btn-secondary {
  background: white;
  color: var(--neutral-900);
  border: 1px solid var(--neutral-300);
}

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

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

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

.btn-block {
  width: 100%;
}

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

.btn-lg {
  padding: 14px 22px;
  font-size: 16px;
}

/* ─── Demo map sitemap ─── */

.demo-map-section {
  background: white;
  border: 1px solid var(--neutral-200);
  border-radius: 16px;
  padding: 24px;
  margin-bottom: 16px;
}

.demo-map-section .section-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 16px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--neutral-200);
}

.demo-map-section .section-emoji {
  font-size: 28px;
}

.demo-map-section .section-title {
  flex: 1;
}

.demo-map-section h2 {
  margin: 0;
  font-size: 18px;
}

.demo-map-section h2 .count {
  font-size: 13px;
  color: var(--neutral-500);
  font-weight: 500;
  margin-left: 8px;
}

.demo-map-section .section-desc {
  margin: 4px 0 0;
  font-size: 13px;
  color: var(--neutral-500);
}

.demo-map-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 12px;
}

.demo-map-item {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 14px;
  border: 1px solid var(--neutral-200);
  border-radius: 12px;
  text-decoration: none;
  color: inherit;
  transition: all 0.15s;
  background: white;
}

.demo-map-item:hover {
  border-color: var(--primary);
  background: var(--primary-50);
  transform: translateY(-1px);
}

.demo-map-item .item-emoji {
  font-size: 24px;
  flex-shrink: 0;
}

.demo-map-item .item-info {
  flex: 1;
  min-width: 0;
}

.demo-map-item .item-id {
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
  color: var(--primary);
  font-weight: 600;
  margin-bottom: 2px;
}

.demo-map-item .item-title {
  font-weight: 600;
  font-size: 14px;
  margin: 0 0 4px;
  color: var(--neutral-900);
}

.demo-map-item .item-desc {
  font-size: 12px;
  color: var(--neutral-500);
  margin: 0;
  line-height: 1.4;
}

.demo-map-item .item-arrow {
  color: var(--neutral-400);
  flex-shrink: 0;
  margin-top: 2px;
}

.demo-map-item:hover .item-arrow {
  color: var(--primary);
}

/* ─── Phone frame ─── */

.phone-frame {
  width: 390px;
  height: 844px;
  background: white;
  border-radius: 48px;
  border: 12px solid #1a1a1a;
  box-shadow: 0 30px 60px -15px rgba(0,0,0,0.3), 0 0 0 1px rgba(0,0,0,0.05);
  overflow: hidden;
  position: relative;
  flex-shrink: 0;
}

.phone-frame::before {
  content: '';
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 130px;
  height: 32px;
  background: #1a1a1a;
  border-radius: 0 0 18px 18px;
  z-index: 100;
}

.phone-screen {
  width: 100%;
  height: 100%;
  background: white;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  position: relative;
  display: flex;
  flex-direction: column;
}

.phone-screen::-webkit-scrollbar { width: 4px; }
.phone-screen::-webkit-scrollbar-thumb { background: var(--neutral-300); border-radius: 2px; }

.status-bar {
  height: 48px;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  padding: 0 28px 6px;
  font-size: 14px;
  font-weight: 600;
  color: var(--neutral-900);
  flex-shrink: 0;
}

.status-bar .right {
  display: flex;
  gap: 6px;
  align-items: center;
}

.home-indicator {
  position: absolute;
  bottom: 8px;
  left: 50%;
  transform: translateX(-50%);
  width: 134px;
  height: 5px;
  background: var(--neutral-900);
  border-radius: 3px;
  z-index: 50;
}

.app-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 20px;
  background: white;
  border-bottom: 1px solid var(--neutral-200);
  flex-shrink: 0;
}

.app-bar h1 {
  margin: 0;
  font-size: 18px;
  font-weight: 600;
}

.app-bar .icon-btn {
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  border-radius: 8px;
  transition: background 0.15s;
}

.app-bar .icon-btn:hover { background: var(--neutral-100); }

.bottom-tabs {
  display: flex;
  background: white;
  border-top: 1px solid var(--neutral-200);
  padding: 8px 0 28px;
  flex-shrink: 0;
}

.bottom-tabs .tab {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  font-size: 11px;
  color: var(--neutral-500);
  text-decoration: none;
  cursor: pointer;
  background: none;
  border: none;
  font-family: inherit;
}

.bottom-tabs .tab .tab-emoji {
  font-size: 20px;
  filter: grayscale(100%);
  opacity: 0.6;
}

.bottom-tabs .tab.active { color: var(--primary); font-weight: 600; }
.bottom-tabs .tab.active .tab-emoji { filter: none; opacity: 1; }

/* ─── Cards ─── */

.card {
  background: white;
  border-radius: 14px;
  padding: 16px;
  border: 1px solid var(--neutral-200);
}

.kpi-tile {
  background: white;
  border-radius: 14px;
  padding: 14px 12px;
  border: 1px solid var(--neutral-200);
  text-align: center;
}

.kpi-tile .value {
  font-size: 24px;
  font-weight: 700;
  color: var(--primary);
}

.kpi-tile .label {
  font-size: 11px;
  color: var(--neutral-500);
  margin-top: 2px;
}

/* ─── Quality indicators ─── */

.quality-indicator {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 600;
  background: white;
}

.quality-indicator.green { color: var(--secondary); }
.quality-indicator.yellow { color: #B45309; }
.quality-indicator.red { color: var(--danger); }

.quality-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  display: inline-block;
}

.quality-dot.green { background: var(--secondary); }
.quality-dot.yellow { background: var(--warning); }
.quality-dot.red { background: var(--danger); }

/* ─── Forms ─── */

.form-field {
  margin-bottom: 14px;
}

.form-field label {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  font-weight: 500;
  color: var(--neutral-700);
  margin-bottom: 6px;
}

.form-field input,
.form-field textarea,
.form-field select {
  width: 100%;
  padding: 10px 14px;
  border: 1px solid var(--neutral-300);
  border-radius: 10px;
  font-size: 14px;
  font-family: inherit;
  background: white;
  outline: none;
  transition: border-color 0.15s;
}

.form-field input:focus,
.form-field textarea:focus,
.form-field select:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px var(--primary-50);
}

.confidence-high { border-left: 3px solid var(--secondary); }
.confidence-medium { border-left: 3px solid var(--warning); }
.confidence-low { border-left: 3px solid var(--danger); background: var(--danger-50); }

/* ─── Status pills ─── */

.pill {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 10px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 500;
}

.pill-success { background: var(--nutrition-100); color: #166534; }
.pill-warning { background: var(--warning-100); color: #854D0E; }
.pill-danger { background: var(--danger-100); color: #991B1B; }
.pill-info { background: var(--primary-100); color: var(--primary-dark); }
.pill-neutral { background: var(--neutral-100); color: var(--neutral-700); }

/* ─── List items ─── */

.list-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  border-bottom: 1px solid var(--neutral-100);
  cursor: pointer;
  transition: background 0.15s;
}

.list-item:hover { background: var(--neutral-50); }
.list-item:last-child { border-bottom: none; }

.list-item .icon-wrap {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  background: var(--primary-50);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  font-size: 20px;
}

.list-item .content { flex: 1; min-width: 0; }
.list-item .title { font-size: 14px; font-weight: 500; margin: 0; color: var(--neutral-900); }
.list-item .subtitle { font-size: 12px; color: var(--neutral-500); margin: 2px 0 0; }

/* ─── Web layout ─── */

.web-layout {
  display: flex;
  min-height: 100vh;
  background: var(--neutral-50);
}

.sidebar {
  width: 240px;
  background: white;
  border-right: 1px solid var(--neutral-200);
  display: flex;
  flex-direction: column;
  flex-shrink: 0;
}

.sidebar-brand {
  padding: 18px 20px;
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
  font-size: 16px;
  color: var(--neutral-900);
  border-bottom: 1px solid var(--neutral-200);
}

.sidebar-brand .logo-emoji {
  font-size: 28px;
}

.sidebar-nav {
  padding: 16px 12px;
  flex: 1;
  overflow-y: auto;
}

.sidebar-nav .group-label {
  font-size: 10px;
  font-weight: 700;
  color: var(--neutral-500);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  padding: 12px 12px 6px;
}

.sidebar-nav .nav-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 12px;
  border-radius: 8px;
  font-size: 13px;
  color: var(--neutral-700);
  text-decoration: none;
  margin-bottom: 2px;
  cursor: pointer;
  background: none;
  border: none;
  font-family: inherit;
  width: 100%;
  text-align: left;
}

.sidebar-nav .nav-item:hover { background: var(--neutral-100); }

.sidebar-nav .nav-item.active {
  background: var(--primary-50);
  color: var(--primary);
  font-weight: 600;
}

.sidebar-nav .nav-item .nav-emoji {
  font-size: 16px;
  flex-shrink: 0;
}

.sidebar-user {
  padding: 14px 16px;
  border-top: 1px solid var(--neutral-200);
  display: flex;
  align-items: center;
  gap: 10px;
}

.avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--primary);
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 600;
  font-size: 13px;
  flex-shrink: 0;
}

.main-content {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.top-bar {
  background: white;
  border-bottom: 1px solid var(--neutral-200);
  padding: 14px 28px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.top-bar h1 { margin: 0; font-size: 20px; font-weight: 600; }

.content-area {
  flex: 1;
  padding: 24px 28px;
  overflow-y: auto;
}

/* ─── Tables ─── */

table.data-table {
  width: 100%;
  border-collapse: collapse;
  background: white;
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid var(--neutral-200);
}

table.data-table th,
table.data-table td {
  padding: 12px 16px;
  text-align: left;
  font-size: 13px;
  border-bottom: 1px solid var(--neutral-100);
}

table.data-table th {
  background: var(--neutral-50);
  font-weight: 600;
  color: var(--neutral-700);
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.3px;
}

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

/* ─── Web KPI ─── */

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

.kpi-card {
  background: white;
  border-radius: 14px;
  padding: 18px;
  border: 1px solid var(--neutral-200);
}

.kpi-card .label { font-size: 12px; color: var(--neutral-500); margin-bottom: 8px; }
.kpi-card .value { font-size: 28px; font-weight: 700; color: var(--neutral-900); line-height: 1; }
.kpi-card .delta { font-size: 12px; margin-top: 6px; display: flex; align-items: center; gap: 4px; }
.kpi-card .delta.up { color: var(--secondary); }
.kpi-card .delta.down { color: var(--danger); }

/* ─── Bar chart ─── */

.bar-chart-row {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 8px;
  font-size: 13px;
}

.bar-chart-row .bar-label { width: 160px; flex-shrink: 0; color: var(--neutral-700); }

.bar-chart-row .bar-track {
  flex: 1;
  height: 22px;
  background: var(--neutral-100);
  border-radius: 4px;
  position: relative;
  overflow: hidden;
}

.bar-chart-row .bar-fill {
  height: 100%;
  background: var(--primary);
  border-radius: 4px;
  display: flex;
  align-items: center;
  padding-right: 8px;
  justify-content: flex-end;
  color: white;
  font-size: 11px;
  font-weight: 600;
}

.bar-chart-row .bar-value { width: 50px; text-align: right; font-weight: 600; color: var(--neutral-700); font-size: 12px; }

/* ─── Section nav ─── */

.section-nav {
  position: sticky;
  top: 56px;
  background: white;
  z-index: 10;
  padding: 12px 24px;
  border-bottom: 1px solid var(--neutral-200);
  display: flex;
  gap: 6px;
  overflow-x: auto;
}

.section-nav a {
  white-space: nowrap;
  padding: 6px 12px;
  border-radius: 8px;
  font-size: 13px;
  color: var(--neutral-700);
  text-decoration: none;
  font-weight: 500;
}

.section-nav a:hover { background: var(--neutral-100); }
.section-nav a.active { background: var(--primary); color: white; }

/* ─── Screen card grid ─── */

.screen-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(420px, 1fr));
  gap: 28px;
  padding: 28px;
  max-width: 1700px;
  margin: 0 auto;
}

.screen-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  scroll-margin-top: 130px;
}

.screen-card .screen-meta-row {
  display: flex;
  align-items: center;
  gap: 8px;
}

.screen-card .screen-id {
  font-family: 'JetBrains Mono', monospace;
  background: var(--primary);
  color: white;
  padding: 3px 8px;
  border-radius: 6px;
  font-size: 11px;
  font-weight: 600;
}

.screen-card .screen-title {
  font-size: 14px;
  font-weight: 600;
  color: var(--neutral-900);
  margin: 0;
}

.screen-card .screen-desc {
  font-size: 12px;
  color: var(--neutral-500);
  text-align: center;
  max-width: 380px;
  margin: 0;
}

/* ─── Browser frame ─── */

.browser-frame {
  background: white;
  border-radius: 12px;
  border: 1px solid var(--neutral-200);
  overflow: hidden;
  box-shadow: 0 20px 40px -12px rgba(0,0,0,0.1);
}

.browser-bar {
  background: var(--neutral-100);
  padding: 8px 12px;
  display: flex;
  align-items: center;
  gap: 8px;
  border-bottom: 1px solid var(--neutral-200);
}

.browser-bar .dots { display: flex; gap: 6px; }
.browser-bar .dot { width: 11px; height: 11px; border-radius: 50%; }
.browser-bar .dot.red { background: #FF5F57; }
.browser-bar .dot.yellow { background: #FEBC2E; }
.browser-bar .dot.green { background: #28C840; }

.browser-bar .url {
  flex: 1;
  background: white;
  padding: 4px 12px;
  border-radius: 6px;
  font-size: 12px;
  color: var(--neutral-500);
  display: flex;
  align-items: center;
  gap: 6px;
}

.browser-content {
  height: 720px;
  overflow: hidden;
}

/* ─── Quick switcher (Cmd+K) ─── */

.qs-overlay {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.6);
  backdrop-filter: blur(4px);
  z-index: 1000;
  display: none;
  align-items: flex-start;
  justify-content: center;
  padding-top: 100px;
}

.qs-overlay.active { display: flex; }

.qs-modal {
  background: white;
  width: 600px;
  max-width: 90vw;
  border-radius: 14px;
  box-shadow: 0 25px 50px -12px rgba(0,0,0,0.3);
  overflow: hidden;
  max-height: 70vh;
  display: flex;
  flex-direction: column;
}

.qs-input-wrap {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 18px;
  border-bottom: 1px solid var(--neutral-200);
}

.qs-input-wrap .qs-icon { font-size: 20px; opacity: 0.6; }

.qs-input-wrap input {
  flex: 1;
  border: none;
  outline: none;
  font-size: 16px;
  font-family: inherit;
  background: transparent;
}

.qs-kbd {
  background: var(--neutral-100);
  border: 1px solid var(--neutral-200);
  border-radius: 4px;
  padding: 2px 6px;
  font-size: 11px;
  font-family: 'JetBrains Mono', monospace;
  color: var(--neutral-500);
}

.qs-results { flex: 1; overflow-y: auto; padding: 8px; }

.qs-group-label {
  font-size: 10px;
  text-transform: uppercase;
  font-weight: 700;
  color: var(--neutral-500);
  letter-spacing: 0.5px;
  padding: 8px 12px 4px;
}

.qs-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  border-radius: 8px;
  cursor: pointer;
  text-decoration: none;
  color: inherit;
  font-size: 14px;
}

.qs-item:hover, .qs-item.highlighted, .qs-item:focus-visible {
  background: var(--primary-50);
  outline: 2px solid var(--primary);
  outline-offset: -2px;
}

.qs-item .qs-emoji { font-size: 20px; }
.qs-item .qs-info { flex: 1; min-width: 0; }
.qs-item .qs-title { font-weight: 500; margin: 0; }
.qs-item .qs-id { font-family: monospace; font-size: 11px; color: var(--primary); margin-top: 1px; }

/* ─── Toast notification ─── */

.toast-container {
  position: fixed;
  top: 80px;
  right: 24px;
  z-index: 999;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.toast {
  background: white;
  border: 1px solid var(--neutral-200);
  border-radius: 12px;
  padding: 12px 16px;
  box-shadow: 0 10px 25px -5px rgba(0,0,0,0.15);
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 14px;
  min-width: 280px;
  animation: slideIn 0.2s ease-out;
}

.toast.toast-success { border-color: var(--secondary); }
.toast.toast-warning { border-color: var(--warning); }
.toast.toast-error { border-color: var(--danger); }

@keyframes slideIn {
  from { transform: translateX(20px); opacity: 0; }
  to { transform: translateX(0); opacity: 1; }
}

/* ─── Page header ─── */

.page-header-mini {
  background: white;
  border-bottom: 1px solid var(--neutral-200);
  padding: 20px 28px;
}

.page-header-mini .breadcrumb {
  font-size: 12px;
  color: var(--neutral-500);
  margin-bottom: 6px;
}

.page-header-mini .breadcrumb a {
  color: var(--primary);
  text-decoration: none;
}

.page-header-mini h1 {
  margin: 0 0 4px;
  font-size: 22px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.page-header-mini p {
  margin: 0;
  color: var(--neutral-500);
  font-size: 13px;
}

/* ─── Accessibility (WCAG 2.1 AA) ─── */

/* Focus visible global — keyboard-only */
button:focus-visible,
a:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible,
[role="button"]:focus-visible,
[tabindex]:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: 2px;
  border-radius: 6px;
}

.btn:focus-visible {
  outline: 3px solid var(--primary-light);
  outline-offset: 2px;
  box-shadow: 0 0 0 4px rgba(15, 77, 138, 0.2);
}

.list-item:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: -2px;
  background: var(--primary-50);
}

table.data-table tbody tr:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: -2px;
}

/* Skip-to-content link (cho screen readers) */
.skip-link {
  position: absolute;
  top: -40px;
  left: 0;
  background: var(--primary);
  color: white;
  padding: 8px 16px;
  z-index: 1000;
  text-decoration: none;
}
.skip-link:focus {
  top: 0;
}

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

/* ─── Util ─── */

.text-muted { color: var(--neutral-500); }
.text-primary { color: var(--primary); }
.text-success { color: var(--secondary); }
.text-warning { color: #B45309; }
.text-danger { color: var(--danger); }

.flex { display: flex; }
.items-center { align-items: center; }
.justify-between { justify-content: space-between; }
.gap-2 { gap: 8px; }
.gap-3 { gap: 12px; }

.font-mono { font-family: 'JetBrains Mono', monospace; }
.font-semibold { font-weight: 600; }
.font-bold { font-weight: 700; }

.text-xs { font-size: 11px; }
.text-sm { font-size: 13px; }

.cursor-pointer { cursor: pointer; }

/* Highlighted screen — when navigating to via hash */
.screen-card.highlighted {
  animation: pulse 1.2s ease-out;
}

@keyframes pulse {
  0% { box-shadow: 0 0 0 0 rgba(15, 77, 138, 0.4); }
  50% { box-shadow: 0 0 0 12px rgba(15, 77, 138, 0); }
  100% { box-shadow: 0 0 0 0 rgba(15, 77, 138, 0); }
}

/* Visual hint that something is clickable in mockup */
.clickable-hint {
  position: relative;
}
.clickable-hint::after {
  content: '👆';
  position: absolute;
  font-size: 18px;
  top: -6px;
  right: -6px;
  animation: bounce 1.5s ease-in-out infinite;
  pointer-events: none;
  filter: drop-shadow(0 2px 4px rgba(0,0,0,0.2));
}

@keyframes bounce {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-4px); }
}
