/* ================================================================
   CSMART BASE — Tokens, Reset, Fonts
   ================================================================ */

:root {
  --bg: #FAF7F2;
  --bg-2: #F5F1EA;
  --surface: #FFFFFF;
  --surface-2: #FAFAF8;
  --border: #E7E2D9;
  --border-2: #D6D0C4;

  --text: #1C1917;
  --text-2: #57534E;
  --text-3: #A8A29E;

  --primary: #0D9488;
  --primary-hover: #0F766E;
  --primary-soft: #CCFBF1;
  --primary-fg: #FFFFFF;

  --accent: #F59E0B;
  --accent-soft: #FEF3C7;

  --success: #059669;
  --success-soft: #D1FAE5;
  --success-fg: #064E3B;

  --warning: #EA580C;
  --warning-soft: #FFEDD5;

  --danger: #DC2626;
  --danger-soft: #FEE2E2;

  --r-xs: 6px;
  --r-sm: 10px;
  --r: 14px;
  --r-lg: 20px;
  --r-pill: 999px;

  --sh-1: 0 1px 2px rgba(28,25,23,0.04), 0 1px 3px rgba(28,25,23,0.06);
  --sh-2: 0 4px 12px rgba(28,25,23,0.06), 0 2px 4px rgba(28,25,23,0.04);
  --sh-3: 0 12px 32px rgba(28,25,23,0.08), 0 4px 8px rgba(28,25,23,0.04);
  --sh-pop: 0 20px 60px rgba(13,148,136,0.18);

  --font-display: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, system-ui, sans-serif;
  --font: 'Inter', -apple-system, BlinkMacSystemFont, system-ui, sans-serif;
}

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

body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  font-size: 11px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

h1, h2, h3, h4, h5, h6 { font-family: var(--font-display); font-weight: 700; letter-spacing: -0.02em; }
a { color: var(--primary); text-decoration: none; }
button { font-family: inherit; }
input, select, textarea { font-family: inherit; font-size: 11px; }
code { font-family: 'SF Mono', 'Monaco', 'Cascadia Code', monospace; font-size: 10px; color: var(--text-2); }

@media (prefers-reduced-motion: reduce) {
  * { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; }
}/* ================================================================
   CSMART LAYOUT — AppShell, Topbar, Sidebar, Bottombar, Checkout
   All chrome elements are position:fixed. Only .appshell-main scrolls.
   ================================================================ */

/* ===== APPSHELL ROOT ===== */
.appshell { min-height: 100vh; min-height: 100dvh; }

/* ===== TOPBAR (fixed, always visible, 56px) ===== */
.topbar {
  position: fixed;
  top: 0; left: 0; right: 0;
  height: 56px;
  z-index: 50;
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 0 16px;
  box-shadow: var(--sh-1);
}

.topbar-outlet {
  display: flex; align-items: center; gap: 8px;
  background: none; border: 1px solid transparent;
  padding: 8px 12px; border-radius: var(--r-sm);
  cursor: pointer; transition: background 0.12s, border-color 0.12s;
  min-height: 40px; font-weight: 600; font-size: 11px; color: var(--text);
}
.topbar-outlet:hover { background: var(--bg-2); border-color: var(--border); }
.topbar-outlet-icon { font-size: 14px; line-height: 1; }
.topbar-outlet-name { max-width: 200px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.topbar-outlet-caret { font-size: 10px; color: var(--text-3); }

.topbar-status { flex: 1; display: flex; align-items: center; justify-content: center; gap: 8px; }

.topbar-avatar {
  width: 36px; height: 36px; border-radius: 50%;
  background: var(--primary-soft); color: var(--primary);
  display: flex; align-items: center; justify-content: center;
  font-weight: 700; font-size: 11px;
}

/* ===== SIDEBAR (desktop: fixed left, below topbar) ===== */
.sidebar {
  position: fixed;
  top: 56px; left: 0; bottom: 0;
  width: 240px;
  background: var(--surface);
  border-right: 1px solid var(--border);
  display: flex; flex-direction: column;
  padding: 16px 0;
  overflow-y: auto; overflow-x: hidden;
  z-index: 40;
}
.sidebar-brand {
  display: flex; align-items: center; gap: 10px;
  padding: 0 16px 16px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 12px;
}
.sidebar-nav { flex: 1; padding: 0 12px; overflow-y: auto; display: flex; flex-direction: column; gap: 2px; }
.sidebar-section-label {
  font-size: 9px; font-weight: 700; letter-spacing: 0.06em;
  text-transform: uppercase; color: var(--text-3);
  padding: 12px 12px 6px;
}
.sidebar-item {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 12px; border-radius: var(--r-sm);
  color: var(--text-2); font-weight: 500; font-size: 11px;
  text-decoration: none; white-space: nowrap;
  transition: background 0.12s, color 0.12s;
}
.sidebar-item:hover { background: var(--bg-2); color: var(--text); }
.sidebar-item.active { background: var(--primary-soft); color: var(--primary); font-weight: 600; }
.sidebar-item-icon { font-size: 14px; line-height: 1; flex-shrink: 0; }
.sidebar-item-label { display: inline; }

.sidebar-user {
  display: flex; align-items: center; gap: 10px;
  padding: 12px 16px; border-top: 1px solid var(--border);
  margin-top: 8px;
}
.sidebar-user-info { flex: 1; min-width: 0; }
.sidebar-user-name { font-size: 10px; font-weight: 600; line-height: 1.2; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sidebar-user-role { font-size: 9px; color: var(--text-3); line-height: 1.2; }
.sidebar-logout {
  background: none; border: none; width: 32px; height: 32px;
  border-radius: var(--r-sm); cursor: pointer; font-size: 14px;
  display: flex; align-items: center; justify-content: center;
  color: var(--text-2); transition: background 0.12s, color 0.12s;
}
.sidebar-logout:hover { background: var(--bg-2); color: var(--danger); }

/* ===== MAIN CONTENT (fixed between chrome, scrolls internally) ===== */
.appshell-main { background: var(--bg); box-sizing: border-box; }

/* Desktop: fixed between topbar and bottom, offset by sidebar */
.appshell.layout-desktop .appshell-main {
  position: fixed;
  top: 56px; bottom: 0; left: 240px; right: 0;
  overflow-y: auto;
  padding: 20px 24px 40px;
}
.appshell.layout-desktop.has-checkout .appshell-main { right: 360px; }

/* Tablet: sidebar becomes horizontal strip below topbar */
.appshell.layout-tablet .sidebar {
  top: 56px; left: 0; right: 0; bottom: auto;
  width: 100%; height: 56px;
  flex-direction: row;
  border-right: none; border-bottom: 1px solid var(--border);
  padding: 0;
}
.appshell.layout-tablet .sidebar-nav { flex-direction: row; gap: 4px; padding: 8px 12px; overflow-x: auto; }
.appshell.layout-tablet .sidebar-section-label { display: none; }
.appshell.layout-tablet .sidebar-item { padding: 8px 12px; white-space: nowrap; }
.appshell.layout-tablet .sidebar-brand { display: none; }
.appshell.layout-tablet .sidebar-user { display: none; }
.appshell.layout-tablet .appshell-main {
  position: fixed;
  top: 112px; bottom: 0; left: 0; right: 0;
  overflow-y: auto;
  padding: 16px 20px 32px;
}
.appshell.layout-tablet .checkout-panel { display: none; }

/* Mobile: sidebar hidden, bottombar shown */
.appshell.layout-mobile .sidebar { display: none; }
.appshell.layout-mobile .appshell-main {
  position: fixed;
  top: 56px; bottom: 64px; left: 0; right: 0;
  overflow-y: auto;
  padding: 16px 16px 24px;
  -webkit-overflow-scrolling: touch;
}
.appshell.layout-mobile .bottombar { display: flex; }
.appshell.layout-mobile .checkout-panel { display: none; }
.appshell.layout-mobile.has-checkout .checkout-mini { display: flex; }
.appshell.layout-mobile.has-checkout .appshell-main { bottom: calc(64px + 48px); }

/* Desktop/Tablet: hide mobile-only elements */
.appshell.layout-desktop .bottombar,
.appshell.layout-desktop .checkout-mini { display: none; }
.appshell.layout-tablet .bottombar,
.appshell.layout-tablet .checkout-mini { display: none; }

/* ===== CHECKOUT PANEL (desktop: fixed right) ===== */
.checkout-panel {
  position: fixed;
  top: 56px; right: 0; bottom: 0;
  width: 360px;
  background: var(--surface);
  border-left: 1px solid var(--border);
  display: flex; flex-direction: column;
  overflow: hidden; z-index: 40;
}
.checkout-panel-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 16px 20px; border-bottom: 1px solid var(--border);
}
.checkout-panel-header h2 { font-size: 14px; font-weight: 700; font-family: var(--font-display); margin: 0; }
.checkout-panel-count { font-size: 10px; color: var(--text-3); font-weight: 600; }
.checkout-panel-body { flex: 1; overflow-y: auto; padding: 12px 16px; }
.checkout-panel-footer { border-top: 1px solid var(--border); padding: 16px 20px; background: var(--bg); }
.checkout-totals { margin-bottom: 12px; }
.checkout-total-label { font-size: 10px; color: var(--text-2); text-transform: uppercase; letter-spacing: 0.04em; }
.checkout-total-value { font-size: 22px; font-weight: 800; font-family: var(--font-display); color: var(--text); letter-spacing: -0.02em; }
.checkout-pay { width: 100%; }

/* ===== BOTTOMBAR (mobile: fixed bottom, 64px) ===== */
.bottombar {
  position: fixed;
  bottom: 0; left: 0; right: 0;
  height: 64px;
  background: var(--surface);
  border-top: 1px solid var(--border);
  display: none;
  padding: 4px 8px calc(4px + env(safe-area-inset-bottom, 0px));
  z-index: 50;
  box-shadow: 0 -4px 20px rgba(28,25,23,0.06);
}
.bottombar-item {
  flex: 1;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 2px; padding: 4px;
  text-decoration: none; color: var(--text-2);
  font-size: 8px; line-height: 1.2;
  border-radius: var(--r-sm);
  transition: color 0.12s, background 0.12s;
  min-height: 56px; position: relative;
}
.bottombar-item-icon { font-size: 18px; line-height: 1; }
.bottombar-item-label { font-weight: 500; }
.bottombar-item:hover { background: var(--bg-2); color: var(--text); }
.bottombar-item.active { color: var(--primary); font-weight: 600; }
.bottombar-item.active::before {
  content: ''; position: absolute; top: 0; left: 50%; transform: translateX(-50%);
  width: 24px; height: 3px; background: var(--primary); border-radius: 0 0 3px 3px;
}

/* ===== CHECKOUT MINI (mobile: above bottombar, 48px) ===== */
.checkout-mini {
  position: fixed;
  left: 0; right: 0; bottom: 64px;
  height: 48px;
  background: var(--primary); color: white;
  border: none; display: none;
  align-items: center; justify-content: space-between;
  padding: 0 16px; font-size: 11px; font-weight: 600;
  cursor: pointer; z-index: 49;
  box-shadow: 0 -2px 12px rgba(13,148,136,0.3);
  transition: background 0.12s;
}
.checkout-mini:hover { background: var(--primary-hover); }
.checkout-mini-count { display: flex; align-items: center; gap: 6px; }
.badge-count {
  background: rgba(255,255,255,0.2);
  padding: 2px 8px; border-radius: var(--r-pill);
  font-size: 10px; font-weight: 700; min-width: 20px; text-align: center;
}
.checkout-mini-total { font-size: 13px; font-weight: 800; font-family: var(--font-display); }
.checkout-mini-caret { font-size: 10px; }

/* ===== CHECKOUT SHEET (mobile: slide-up overlay) ===== */
.checkout-sheet {
  position: fixed;
  left: 0; right: 0; bottom: 0;
  height: 70vh; height: 70dvh;
  background: var(--surface);
  border-radius: 20px 20px 0 0;
  box-shadow: 0 -8px 32px rgba(28,25,23,0.18);
  z-index: 60;
  transform: translateY(100%);
  transition: transform 280ms cubic-bezier(0.16,1,0.3,1);
  display: flex; flex-direction: column;
  padding-bottom: env(safe-area-inset-bottom, 0px);
}
.checkout-sheet.open { transform: translateY(0); }
.checkout-sheet-handle {
  width: 36px; height: 4px; background: var(--border-2);
  border-radius: 2px; margin: 8px auto; cursor: pointer;
}
.checkout-sheet-content {
  flex: 1; overflow-y: auto; padding: 8px 16px 20px;
  display: flex; flex-direction: column; gap: 12px;
}
.checkout-sheet .checkout-pay { margin-top: auto; }

/* ===== CHECKOUT shared items ===== */
.checkout-empty { text-align: center; padding: 40px 20px; color: var(--text-3); }
.checkout-empty-icon { font-size: 38px; opacity: 0.4; margin-bottom: 12px; }
.checkout-empty-text { font-size: 11px; line-height: 1.4; }
.checkout-items { display: flex; flex-direction: column; gap: 8px; }
.checkout-item {
  display: grid; grid-template-columns: 1fr auto auto;
  gap: 8px; align-items: center;
  padding: 10px 0; border-bottom: 1px solid var(--border); font-size: 10px;
}
.checkout-item:last-child { border-bottom: none; }
.checkout-item-name { font-weight: 600; color: var(--text); }
.checkout-item-meta { color: var(--text-2); font-size: 10px; }
.checkout-item-subtotal { font-weight: 700; color: var(--text); }

/* ===== STATUS PILLS ===== */
.status-pill {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 4px 10px; border-radius: var(--r-pill);
  font-size: 10px; font-weight: 600;
  background: var(--bg-2); color: var(--text-2);
}
.status-pill-icon { font-size: 11px; }
.status-pill-dot { width: 8px; height: 8px; border-radius: 50%; background: currentColor; animation: pulse 2s infinite; }
@keyframes pulse { 0%, 100% { opacity: 1; } 50% { opacity: 0.4; } }
.status-pill-cart { background: var(--primary-soft); color: var(--primary); }
.status-pill-warning { background: #FEF3C7; color: #92400E; }
.status-pill-info { background: #DBEAFE; color: #1E40AF; }

/* ===== STATUS BADGES ===== */
.status-badge {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 3px 8px; border-radius: var(--r-pill);
  font-size: 9px; font-weight: 700;
  text-transform: uppercase; letter-spacing: 0.04em;
  background: var(--bg-2); color: var(--text-2); white-space: nowrap;
}
.status-badge-icon { font-size: 10px; line-height: 1; }
.status-default { background: var(--bg-2); color: var(--text-2); }
.status-warning { background: #FEF3C7; color: #92400E; }
.status-info { background: #DBEAFE; color: #1E40AF; }
.status-success { background: #D1FAE5; color: #065F46; }
.status-danger { background: #FEE2E2; color: #991B1B; }/* ================================================================
   CSMART COMPONENTS — Buttons, Forms, Tabs, Tables, Badges, Modals, etc.
   ================================================================ */

/* ===== BUTTONS ===== */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 11px 18px; border-radius: var(--r-pill); border: none;
  cursor: pointer; font-size: 11px; font-weight: 600;
  transition: all 0.12s; min-height: 42px;
}
.btn:disabled { opacity: 0.5; cursor: not-allowed; }
.btn-primary { background: var(--primary); color: var(--primary-fg); }
.btn-primary:hover:not(:disabled) { background: var(--primary-hover); transform: translateY(-1px); box-shadow: var(--sh-2); }
.btn-google { background: white; color: #1f1f1f; border: 1px solid var(--border); width: 100%; justify-content: center; padding: 13px; }
.btn-google:hover { background: var(--surface-2); }
.btn-ghost { background: var(--bg-2); color: var(--text); }
.btn-ghost:hover { background: var(--border); }
.btn-danger { background: var(--danger); color: white; }
.btn-danger:hover { background: #B91C1C; }
.btn-large { padding: 14px 24px; font-size: 12px; min-height: 50px; }
.btn-sm { padding: 6px 12px; font-size: 10px; min-height: 32px; }
.btn-block { width: 100%; }
.btn-pill { border-radius: var(--r-pill); }

/* ===== FORMS ===== */
.form { background: var(--surface); border: 1px solid var(--border); border-radius: var(--r); padding: 20px; margin-bottom: 20px; box-shadow: var(--sh-1); }
.form-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 12px; margin-bottom: 12px; }
.form label { display: flex; flex-direction: column; gap: 6px; font-size: 10px; font-weight: 600; color: var(--text-2); }
.form input, .form select { padding: 11px 14px; border: 1px solid var(--border); border-radius: var(--r-sm); font-size: 11px; font-family: var(--font); transition: all 0.1s; background: var(--surface); }
.form input:focus, .form select:focus { outline: none; border-color: var(--primary); box-shadow: 0 0 0 3px var(--primary-soft); }
.form-input { padding: 11px 14px; border: 1px solid var(--border); border-radius: var(--r-sm); font-size: 11px; font-family: var(--font); background: var(--surface); transition: all 0.1s; }
.form-input:focus { outline: none; border-color: var(--primary); box-shadow: 0 0 0 3px var(--primary-soft); }
.form-actions { display: flex; gap: 8px; justify-content: flex-end; margin-top: 4px; }

/* ===== TABS ===== */
.tabs { display: flex; gap: 4px; margin-bottom: 16px; border-bottom: 1px solid var(--border); overflow-x: auto; }
.tab { background: none; border: none; padding: 10px 16px; font-size: 10px; color: var(--text-2); cursor: pointer; border-bottom: 2px solid transparent; font-weight: 600; white-space: nowrap; transition: all 0.1s; }
.tab:hover { color: var(--text); }
.tab.active { color: var(--primary); border-bottom-color: var(--primary); }

/* ===== TABLES ===== */
.table-wrap { background: var(--surface); border: 1px solid var(--border); border-radius: var(--r); overflow: auto; box-shadow: var(--sh-1); }
.data-table { width: 100%; border-collapse: collapse; }
.data-table th, .data-table td { padding: 14px 18px; text-align: left; border-bottom: 1px solid var(--border); }
.data-table th { background: var(--surface-2); font-size: 9px; text-transform: uppercase; color: var(--text-2); font-weight: 700; letter-spacing: 0.06em; }
.data-table tbody tr { transition: background 0.1s; }
.data-table tbody tr:hover { background: var(--bg-2); }
.data-table tbody tr:last-child td { border-bottom: none; }
.data-table code { font-family: 'SF Mono', monospace; font-size: 10px; color: var(--text-2); }
.data-table .low { color: var(--warning); font-weight: 700; }
.data-table .pos { color: var(--success); font-weight: 600; }
.data-table .neg { color: var(--danger); font-weight: 600; }
.empty { text-align: center; padding: 60px 20px; color: var(--text-3); }
.empty-icon { font-size: 38px; opacity: 0.4; margin-bottom: 12px; }
.empty-title { font-size: 13px; font-weight: 600; color: var(--text-2); margin-bottom: 6px; }
.empty-text { font-size: 10px; color: var(--text-3); margin-bottom: 16px; }

/* ===== BADGES ===== */
.badge { display: inline-flex; align-items: center; gap: 4px; padding: 4px 10px; border-radius: var(--r-pill); font-size: 9px; font-weight: 700; background: var(--bg-2); color: var(--text-2); text-transform: uppercase; letter-spacing: 0.04em; }
.badge-completed { background: var(--success-soft); color: var(--success-fg); }
.badge-voided { background: var(--danger-soft); color: var(--danger); }
.badge-refunded { background: var(--warning-soft); color: var(--warning); }
.badge-tax { background: var(--primary-soft); color: var(--primary); }
.badge-in { background: var(--success-soft); color: var(--success-fg); }
.badge-out { background: var(--danger-soft); color: var(--danger); }
.badge-waste { background: var(--warning-soft); color: var(--warning); }
.badge-adjust { background: var(--primary-soft); color: var(--primary); }
.badge-suggestion { background: var(--accent-soft); color: #92400E; }

/* ===== STATS ===== */
.stats-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 16px; margin: 20px 0; }
.stat-card { background: var(--surface); padding: 22px; border-radius: var(--r); border: 1px solid var(--border); box-shadow: var(--sh-1); }
.stat-label { color: var(--text-2); font-size: 10px; text-transform: uppercase; letter-spacing: 0.05em; font-weight: 600; }
.stat-value { font-size: 26px; font-weight: 800; margin-top: 8px; font-family: var(--font-display); letter-spacing: -0.02em; line-height: 1.1; }
.stat-value .currency { font-size: 13px; font-weight: 600; color: var(--text-2); margin-right: 4px; }
.stat-card.warn .stat-value { color: var(--warning); }
.stat-card.success .stat-value { color: var(--success); }
.stat-card.primary .stat-value { color: var(--primary); }
.stat-trend { font-size: 10px; color: var(--text-2); margin-top: 4px; display: flex; align-items: center; gap: 4px; }
.stat-trend.up { color: var(--success); }
.stat-trend.down { color: var(--danger); }

/* ===== MODAL ===== */
.modal-backdrop {
  position: fixed; inset: 0; background: rgba(0,0,0,0.5);
  display: flex; align-items: center; justify-content: center;
  z-index: 1000; padding: 20px; animation: fadeIn 0.15s;
}
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
.modal {
  background: var(--surface); border-radius: var(--r-lg);
  max-width: 600px; width: 100%; max-height: 90vh;
  display: flex; flex-direction: column;
  box-shadow: var(--sh-pop); animation: slideUp 0.2s;
}
@keyframes slideUp { from { transform: translateY(20px); opacity: 0; } to { transform: translateY(0); opacity: 1; } }
.modal-head { display: flex; align-items: center; justify-content: space-between; padding: 18px 24px; border-bottom: 1px solid var(--border); }
.modal-head h3 { margin: 0; font-size: 14px; font-weight: 700; }
.modal-x { background: none; border: none; font-size: 19px; cursor: pointer; color: var(--text-2); width: 32px; height: 32px; border-radius: 50%; }
.modal-x:hover { background: var(--bg-2); }
.modal-body { padding: 20px 24px; overflow-y: auto; flex: 1; }
.modal-footer { display: flex; gap: 8px; justify-content: flex-end; margin-top: 16px; padding-top: 16px; border-top: 1px solid var(--border); }

/* ===== PAGE HEAD ===== */
.page { }
.page-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 16px; gap: 12px; flex-wrap: wrap; }
.page-title { font-size: 18px; font-weight: 800; font-family: var(--font-display); letter-spacing: -0.03em; margin: 0 0 4px; }
.page-sub { color: var(--text-2); margin-top: 6px; font-size: 10px; }
.page-actions { display: flex; gap: 8px; align-items: center; }
.section-title { font-size: 14px; font-weight: 700; margin: 24px 0 12px; font-family: var(--font-display); }

/* ===== FILTER BAR ===== */
.filter-bar { display: flex; gap: 8px; margin-bottom: 12px; }
.filter-bar select { flex: 1; padding: 8px 12px; border: 1px solid var(--border); border-radius: var(--r-sm); font-size: 10px; }
.filter-label { display: flex; flex-direction: column; gap: 4px; font-size: 9px; color: var(--text-2); font-weight: 600; }
.filter-label input { padding: 6px 10px; border: 1px solid var(--border); border-radius: var(--r-sm); font-size: 10px; background: var(--surface); }

/* ===== DIVIDER / HINT ===== */
.divider { display: flex; align-items: center; gap: 12px; margin: 20px 0; color: var(--text-3); font-size: 10px; }
.divider::before, .divider::after { content: ''; flex: 1; height: 1px; background: var(--border); }
.hint { color: var(--text-3); font-size: 10px; }
.error-msg { background: #FEE2E2; color: var(--danger); padding: 10px 12px; border-radius: var(--r-sm); font-size: 10px; margin-top: 12px; }

/* ===== BRAND ===== */
.brand { display: flex; align-items: center; gap: 10px; }
.brand-logo {
  width: 40px; height: 40px;
  background: linear-gradient(135deg, #0D9488 0%, #14B8A6 100%);
  color: white; border-radius: var(--r-sm);
  display: flex; align-items: center; justify-content: center;
  font-weight: 800; font-size: 16px; box-shadow: var(--sh-2); flex-shrink: 0;
}
.brand-text { font-size: 15px; font-weight: 800; font-family: var(--font-display); letter-spacing: -0.02em; }

/* ===== AVATAR ===== */
.avatar { width: 36px; height: 36px; border-radius: var(--r-pill); background: var(--primary-soft); color: var(--primary); display: flex; align-items: center; justify-content: center; font-weight: 700; }
.avatar-sm { width: 32px; height: 32px; font-size: 10px; }

/* ===== SHIMMER (AI thinking) ===== */
.shimmer { background: linear-gradient(90deg, var(--bg-2) 0%, var(--border) 50%, var(--bg-2) 100%); background-size: 200% 100%; animation: shimmer 1.5s infinite; border-radius: var(--r-sm); }
.shimmer-line { height: 14px; margin: 8px 0; }
@keyframes shimmer { 0% { background-position: 200% 0; } 100% { background-position: -200% 0; } }

/* ===== SUGGESTION ===== */
.suggestion { background: var(--accent-soft); border: 1px solid #FCD34D; border-radius: var(--r-sm); padding: 10px 12px; font-size: 10px; color: #92400E; margin: 8px 0; display: flex; align-items: center; gap: 8px; }
.suggestion-icon { font-size: 13px; }

/* ===== TENANT BAR ===== */
.tenant-bar {
  background: linear-gradient(90deg, var(--primary-soft), #E0F2FE);
  color: var(--primary); padding: 10px 16px; border-radius: var(--r-sm);
  margin-bottom: 20px; font-size: 10px; display: flex; align-items: center; gap: 8px; font-weight: 500;
}/* ================================================================
   CSMART PAGES — Login, POS, KDS, Tambah, Onboarding, History, etc.
   ================================================================ */

/* ===== LOGIN ===== */
.login-page { min-height: 100vh; display: flex; align-items: center; justify-content: center; background: linear-gradient(135deg, #CCFBF1 0%, #FAF7F2 50%, #FEF3C7 100%); padding: 20px; position: relative; overflow: hidden; }
.login-page::before { content: ''; position: absolute; top: -100px; right: -100px; width: 400px; height: 400px; background: radial-gradient(circle, var(--primary) 0%, transparent 70%); opacity: 0.1; border-radius: 50%; }
.login-page::after { content: ''; position: absolute; bottom: -100px; left: -100px; width: 300px; height: 300px; background: radial-gradient(circle, var(--accent) 0%, transparent 70%); opacity: 0.15; border-radius: 50%; }
.login-card { background: var(--surface); padding: 40px 36px; border-radius: var(--r-lg); box-shadow: var(--sh-3); width: 100%; max-width: 420px; text-align: center; position: relative; }
.login-card .brand { flex-direction: column; gap: 12px; margin-bottom: 28px; }
.login-card .brand-logo { width: 64px; height: 64px; font-size: 26px; box-shadow: var(--sh-pop); }
.login-card .brand-name { font-size: 24px; font-weight: 800; font-family: var(--font-display); letter-spacing: -0.03em; }
.login-card .brand-tag { color: var(--text-2); font-size: 11px; line-height: 1.5; }
.loading { display: flex; align-items: center; justify-content: center; min-height: 100vh; color: var(--text-2); }

/* ===== POS ===== */
.pos-page { display: grid; grid-template-columns: 1.6fr 1fr; gap: 20px; min-height: 100%; }
.pos-products { background: var(--surface); border: 1px solid var(--border); border-radius: var(--r); padding: 16px; display: flex; flex-direction: column; box-shadow: var(--sh-1); }
.search { width: 100%; padding: 12px 16px; border: 1px solid var(--border); border-radius: var(--r-pill); font-size: 11px; margin-bottom: 16px; }
.search:focus { outline: none; border-color: var(--primary); box-shadow: 0 0 0 3px var(--primary-soft); }
.product-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 10px; flex: 1; overflow-y: auto; align-content: start; }
.product-tile { background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-sm); padding: 14px; cursor: pointer; text-align: left; transition: all 0.1s; box-shadow: var(--sh-1); }
.product-tile:hover:not(:disabled) { border-color: var(--primary); transform: translateY(-2px); box-shadow: var(--sh-2); }
.product-tile:active:not(:disabled) { transform: translateY(0); }
.product-tile:disabled { opacity: 0.4; cursor: not-allowed; }
.tile-name { font-weight: 600; font-size: 10px; line-height: 1.3; }
.tile-sku { font-family: 'SF Mono', monospace; font-size: 8px; color: var(--text-3); margin-top: 4px; }
.tile-price { color: var(--primary); font-weight: 700; font-size: 13px; margin-top: 8px; font-family: var(--font-display); }
.tile-stock { font-size: 9px; color: var(--text-2); margin-top: 4px; }
.tile-stock.low { color: var(--warning); font-weight: 700; }
.tile-stock.out { color: var(--danger); font-weight: 700; }

.pos-cart { background: var(--surface); border: 1px solid var(--border); border-radius: var(--r); padding: 20px; display: flex; flex-direction: column; box-shadow: var(--sh-1); }
.pos-cart h2 { font-size: 14px; margin-bottom: 16px; }
.cart-items { flex: 1; overflow-y: auto; min-height: 100px; }
.cart-item { display: grid; grid-template-columns: 1fr auto auto auto auto; gap: 10px; align-items: center; padding: 10px 0; border-bottom: 1px solid var(--border); font-size: 10px; }
.ci-name { font-weight: 500; }
.ci-price { color: var(--text-2); font-size: 10px; }
.ci-qty { display: flex; align-items: center; gap: 4px; }
.ci-qty button { width: 28px; height: 28px; border: 1px solid var(--border); background: var(--surface); border-radius: var(--r-xs); cursor: pointer; font-weight: 700; }
.ci-qty button:hover { background: var(--primary-soft); border-color: var(--primary); color: var(--primary); }
.ci-qty span { min-width: 24px; text-align: center; font-weight: 600; }
.ci-sub { font-weight: 700; min-width: 80px; text-align: right; font-family: var(--font-display); }
.ci-x { background: none; border: none; cursor: pointer; color: var(--text-3); font-size: 14px; }
.ci-x:hover { color: var(--danger); }
.cart-summary { padding-top: 16px; border-top: 1px solid var(--border); margin-top: 8px; }
.cart-summary .row { display: flex; justify-content: space-between; padding: 4px 0; font-size: 11px; }
.cart-summary .row.total { font-size: 18px; font-weight: 800; padding-top: 12px; border-top: 1px solid var(--border); margin-top: 8px; font-family: var(--font-display); color: var(--primary); }
.cart-pay { padding-top: 16px; display: flex; flex-direction: column; gap: 10px; }
.cart-pay label { display: flex; flex-direction: column; gap: 4px; font-size: 10px; font-weight: 600; color: var(--text-2); }
.cart-pay input, .cart-pay select { padding: 11px 14px; border: 1px solid var(--border); border-radius: var(--r-sm); font-size: 11px; }
.btn-checkout { width: 100%; padding: 16px; font-size: 13px; margin-top: 4px; }
.success-banner { background: var(--success-soft); color: var(--success-fg); padding: 12px 16px; border-radius: var(--r-sm); margin-bottom: 12px; font-size: 10px; font-weight: 500; }
@media (max-width: 900px) { .pos-page { grid-template-columns: 1fr; } }

/* POS NEW FLOW */
.pos-topbar { display: flex; gap: 10px; align-items: center; margin-bottom: 12px; }
.pos-topbar .search { margin-bottom: 0; flex: 1; }
.pos-topbar .btn { white-space: nowrap; padding: 10px 16px; font-size: 10px; }
.pos-lobby { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; padding: 40px 20px; color: var(--text-2); }
.lobby-icon { font-size: 51px; margin-bottom: 16px; opacity: 0.4; }
.pos-lobby h2 { font-size: 16px; font-weight: 700; color: var(--text); margin: 0 0 8px; }
.pos-lobby p { font-size: 11px; margin: 0 0 24px; }
.lobby-actions { display: flex; gap: 12px; flex-wrap: wrap; justify-content: center; }
.btn-lg { padding: 14px 24px; font-size: 12px; }
.tx-badge { background: linear-gradient(135deg, var(--primary), #0EA5E9); color: #fff; padding: 12px 14px; border-radius: var(--r); margin-bottom: 12px; display: flex; align-items: center; gap: 8px; position: relative; }
.tx-invoice { font-family: 'SF Mono', monospace; font-size: 10px; font-weight: 700; }
.tx-info { font-size: 10px; opacity: 0.95; flex: 1; }
.tx-close { background: rgba(255,255,255,0.2); color: #fff; border: none; width: 28px; height: 28px; border-radius: 50%; cursor: pointer; font-size: 14px; line-height: 1; }
.tx-close:hover { background: rgba(255,255,255,0.3); }

/* Customer list */
.customer-list { max-height: 280px; overflow-y: auto; margin: 12px 0; border: 1px solid var(--border); border-radius: var(--r-sm); }
.customer-row { display: flex; justify-content: space-between; align-items: center; padding: 12px 14px; cursor: pointer; border-bottom: 1px solid var(--border); transition: background 0.1s; }
.customer-row:last-child { border-bottom: none; }
.customer-row:hover { background: var(--bg-2); }
.cust-name { font-weight: 600; font-size: 11px; }
.cust-phone { font-size: 10px; color: var(--text-2); font-family: monospace; }
.new-customer-form { display: flex; flex-direction: column; gap: 10px; margin: 12px 0; padding: 14px; background: var(--bg-2); border-radius: var(--r-sm); }
.new-customer-form label { display: flex; flex-direction: column; gap: 4px; font-size: 10px; color: var(--text-2); font-weight: 600; }
.new-customer-form input { padding: 10px 12px; border: 1px solid var(--border); border-radius: var(--r-sm); font-size: 11px; }

/* Type picker */
.type-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-top: 8px; }
.type-tile { background: var(--surface); border: 2px solid var(--border); border-radius: var(--r); padding: 24px 16px; cursor: pointer; text-align: center; transition: all 0.1s; }
.type-tile:hover:not(:disabled) { border-color: var(--primary); transform: translateY(-2px); box-shadow: var(--sh-2); }
.type-tile:disabled { opacity: 0.5; cursor: not-allowed; }
.type-icon { font-size: 38px; margin-bottom: 8px; }
.type-name { font-weight: 700; font-size: 13px; margin-bottom: 4px; }
.type-desc { font-size: 10px; color: var(--text-2); }

/* Table canvas */
.table-canvas { position: relative; background: var(--bg-2); border: 2px dashed var(--border); border-radius: var(--r); padding: 0; margin: 12px 0; min-height: 360px; overflow: auto; }
.legend { display: flex; gap: 16px; font-size: 10px; color: var(--text-2); margin-bottom: 8px; }
.legend-item { display: flex; align-items: center; gap: 4px; }
.dot { width: 10px; height: 10px; border-radius: 50%; display: inline-block; }
.dot-available { background: #10B981; }
.dot-occupied { background: #F59E0B; }
.table-tile { position: absolute; background: var(--surface); border: 2px solid var(--border); cursor: pointer; display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 4px; transition: all 0.1s; box-shadow: var(--sh-1); }
.table-tile.round { border-radius: 50%; }
.table-tile.rect { border-radius: var(--r-sm); }
.table-tile.available { border-color: #10B981; background: linear-gradient(135deg, #ECFDF5, #D1FAE5); }
.table-tile.available:hover { border-color: #047857; transform: scale(1.05); box-shadow: var(--sh-2); }
.table-tile.occupied { border-color: #F59E0B; background: linear-gradient(135deg, #FFFBEB, #FEF3C7); }
.table-tile.occupied:hover { border-color: #B45309; transform: scale(1.02); }
.tbl-num { font-weight: 800; font-size: 13px; color: var(--text); }
.tbl-cap { font-size: 8px; color: var(--text-2); margin-top: 1px; }
.tbl-bills { font-size: 7px; background: #F59E0B; color: #fff; padding: 1px 4px; border-radius: 4px; margin-top: 2px; font-weight: 700; }

/* Bill gantung */
.bills-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 12px; }
.bill-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--r); padding: 14px; cursor: pointer; transition: all 0.1s; box-shadow: var(--sh-1); }
.bill-card:hover { border-color: var(--primary); transform: translateY(-2px); box-shadow: var(--sh-2); }
.bill-card.with-table { border-left: 4px solid #F59E0B; }
.bill-card.guest { border-left: 4px solid var(--primary); }
.bill-invoice { font-family: monospace; font-size: 9px; color: var(--text-2); margin-bottom: 4px; }
.bill-table { font-size: 14px; font-weight: 700; margin-bottom: 4px; }
.bill-customer { font-size: 10px; color: var(--text-2); margin-bottom: 8px; }
.bill-items { font-size: 9px; color: var(--text-2); }
.bill-total { font-size: 13px; font-weight: 700; color: var(--primary); margin-top: 4px; }
.bill-time { font-size: 8px; color: var(--text-3); margin-top: 4px; }

/* ===== KDS ===== */
.kds-page { height: 100%; display: flex; flex-direction: column; padding: 16px 20px 0; background: var(--bg); }
.appshell.layout-mobile .kds-page { height: 100%; padding: 12px; }
.kds-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 16px; flex-shrink: 0; }
.kds-title { font-family: var(--font-display); font-size: 19px; font-weight: 800; letter-spacing: -0.02em; }
.kds-columns { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 12px; flex: 1; overflow: hidden; padding-bottom: 16px; }
.appshell.layout-mobile .kds-columns { grid-template-columns: 1fr; overflow-y: auto; }
.kds-column { background: var(--surface-2); border-radius: var(--r); display: flex; flex-direction: column; overflow: hidden; min-height: 0; }
.kds-column-header { display: flex; align-items: center; justify-content: space-between; padding: 12px 16px; border-bottom: 2px solid; flex-shrink: 0; }
.kds-column-header.new { border-color: #F59E0B; }
.kds-column-header.in_progress { border-color: #3B82F6; }
.kds-column-header.ready { border-color: #10B981; }
.kds-column-title { font-size: 11px; font-weight: 800; text-transform: uppercase; letter-spacing: 0.06em; }
.kds-column-count { font-size: 10px; font-weight: 700; padding: 2px 8px; border-radius: var(--r-pill); background: var(--bg); color: var(--text-2); }
.kds-column-body { flex: 1; overflow-y: auto; padding: 8px; display: flex; flex-direction: column; gap: 8px; }
.kds-card { background: var(--surface); border-radius: var(--r); padding: 12px; border: 1px solid var(--border); cursor: pointer; transition: transform 0.12s, box-shadow 0.12s; }
.kds-card:hover { transform: translateY(-1px); box-shadow: var(--sh-2); }
.kds-card.priority-1 { border-left: 4px solid #F59E0B; }
.kds-card.priority-2 { border-left: 4px solid #DC2626; }
.kds-card-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 8px; }
.kds-card-order-no { font-family: var(--font-display); font-size: 13px; font-weight: 800; }
.kds-card-table { font-size: 10px; color: var(--text-2); }
.kds-card-timer { font-size: 10px; font-weight: 700; color: var(--warning); font-variant-numeric: tabular-nums; }
.kds-card-timer.urgent { color: var(--danger); }
.kds-card-items { display: flex; flex-direction: column; gap: 4px; margin: 8px 0; font-size: 11px; }
.kds-card-item { display: flex; gap: 8px; }
.kds-card-item-qty { font-weight: 800; min-width: 24px; color: var(--primary); }
.kds-card-item-name { flex: 1; }
.kds-card-notes { background: #FEF3C7; color: #92400E; padding: 6px 8px; border-radius: var(--r-xs); font-size: 10px; margin: 6px 0; }
.kds-card-actions { display: flex; gap: 6px; margin-top: 8px; }
.kds-card-actions .btn { flex: 1; font-size: 10px; padding: 8px; }
.kds-empty { text-align: center; padding: 32px 16px; color: var(--text-3); font-size: 10px; }

/* ===== TAMBAH (Stock Photo-In) ===== */
.tambah-page { max-width: 720px; margin: 0 auto; }
.tambah-hero { text-align: center; padding: 32px 20px 20px; }
.tambah-hero h1 { font-size: 26px; font-weight: 800; margin-bottom: 8px; font-family: var(--font-display); letter-spacing: -0.03em; }
.tambah-hero p { color: var(--text-2); font-size: 12px; }
.camera-card { background: var(--surface); border: 2px dashed var(--border-2); border-radius: var(--r-lg); padding: 60px 24px; text-align: center; cursor: pointer; transition: all 0.15s; margin: 24px 0; }
.camera-card:hover { border-color: var(--primary); background: var(--primary-soft); transform: translateY(-2px); }
.camera-card.has-photo { border-style: solid; padding: 16px; }
.camera-icon { width: 80px; height: 80px; border-radius: 50%; background: var(--primary-soft); color: var(--primary); display: flex; align-items: center; justify-content: center; margin: 0 auto 16px; font-size: 29px; }
.camera-title { font-size: 14px; font-weight: 700; margin-bottom: 4px; font-family: var(--font-display); }
.camera-hint { color: var(--text-2); font-size: 10px; }
.camera-photo { width: 100%; max-width: 480px; border-radius: var(--r); margin: 0 auto; display: block; }

/* Chat bubbles */
.chat-thread { display: flex; flex-direction: column; gap: 12px; padding: 4px 0; }
.chat-msg { display: flex; gap: 10px; align-items: flex-end; max-width: 88%; }
.chat-msg.from-user { flex-direction: row-reverse; align-self: flex-end; }
.chat-msg.from-user .chat-bubble { background: var(--primary); color: var(--primary-fg); border-bottom-right-radius: 4px; }
.chat-msg.from-system { align-self: flex-start; }
.chat-msg.from-system .chat-bubble { background: var(--surface); color: var(--text); border: 1px solid var(--border); border-bottom-left-radius: 4px; box-shadow: var(--sh-1); }
.chat-bubble { padding: 12px 16px; border-radius: 18px; font-size: 11px; line-height: 1.45; max-width: 100%; }
.chat-bubble-image { width: 100%; max-width: 240px; border-radius: 12px; margin-bottom: 8px; display: block; }
.chat-avatar { width: 32px; height: 32px; border-radius: 50%; background: var(--primary-soft); color: var(--primary); display: flex; align-items: center; justify-content: center; font-size: 13px; flex-shrink: 0; }
.chat-time { font-size: 8px; color: var(--text-3); margin: 2px 4px; align-self: center; }
.chat-msg.from-user + .chat-msg.from-user .chat-time,
.chat-msg.from-system + .chat-msg.from-system .chat-time { display: none; }

/* Chat confirm card */
.chat-confirm { background: var(--surface); border: 1px solid var(--border); border-radius: var(--r); padding: 16px; box-shadow: var(--sh-2); max-width: 100%; }
.chat-confirm-img { width: 100%; max-width: 320px; aspect-ratio: 4/3; object-fit: cover; border-radius: var(--r-sm); margin-bottom: 12px; }
.chat-confirm-name { font-family: var(--font-display); font-size: 16px; font-weight: 800; margin-bottom: 4px; }
.chat-confirm-qty { color: var(--text-2); font-size: 11px; margin-bottom: 12px; }
.chat-confirm-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin: 12px 0; }
.chat-confirm-field { padding: 10px 12px; background: var(--bg-2); border-radius: var(--r-sm); }
.chat-confirm-label { font-size: 9px; color: var(--text-3); text-transform: uppercase; letter-spacing: 0.05em; font-weight: 600; }
.chat-confirm-value { font-size: 12px; font-weight: 700; margin-top: 4px; color: var(--text); display: flex; align-items: center; gap: 6px; }
.chat-confirm-value .editable { cursor: pointer; padding: 2px 6px; border-radius: 4px; }
.chat-confirm-value .editable:hover { background: var(--primary-soft); }
.chat-confirm-actions { display: flex; gap: 10px; margin-top: 14px; }
.chat-confirm-actions .btn { flex: 1; }

/* ===== ONBOARDING ===== */
.onboarding-page { min-height: 100vh; min-height: 100dvh; background: linear-gradient(135deg, var(--primary-soft) 0%, var(--bg) 50%, #FEF3C7 100%); padding: 32px 20px; display: flex; flex-direction: column; align-items: center; justify-content: center; }
.onboarding-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-lg); padding: 32px; max-width: 520px; width: 100%; box-shadow: var(--sh-2); }
.onboarding-progress { display: flex; gap: 6px; margin-bottom: 24px; }
.onboarding-progress-step { flex: 1; height: 4px; background: var(--border); border-radius: 2px; transition: background 0.2s; }
.onboarding-progress-step.done { background: var(--primary); }
.onboarding-progress-step.current { background: var(--primary); opacity: 0.6; }
.onboarding-title { font-family: var(--font-display); font-size: 22px; font-weight: 800; letter-spacing: -0.03em; margin: 0 0 8px; }
.onboarding-subtitle { color: var(--text-2); font-size: 11px; margin: 0 0 24px; }
.business-type-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-bottom: 24px; }
@media (max-width: 480px) { .business-type-grid { grid-template-columns: 1fr; } }
.business-type-card { background: var(--surface); border: 2px solid var(--border); border-radius: var(--r); padding: 16px; cursor: pointer; text-align: left; transition: border-color 0.12s, background 0.12s, transform 0.12s; font: inherit; color: inherit; }
.business-type-card:hover { border-color: var(--primary); background: var(--primary-soft); transform: translateY(-2px); }
.business-type-card.selected { border-color: var(--primary); background: var(--primary-soft); box-shadow: 0 0 0 3px rgba(13,148,136,0.1); }
.business-type-icon { font-size: 26px; margin-bottom: 8px; }
.business-type-name { font-size: 13px; font-weight: 700; margin-bottom: 4px; font-family: var(--font-display); }
.business-type-desc { font-size: 10px; color: var(--text-2); line-height: 1.4; }
.onboarding-actions { display: flex; gap: 12px; justify-content: flex-end; margin-top: 24px; }

/* ===== TENANTS GRID ===== */
.tenant-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 16px; }
.tenant-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--r); padding: 22px; box-shadow: var(--sh-1); transition: all 0.15s; }
.tenant-card:hover { transform: translateY(-2px); box-shadow: var(--sh-2); }
.tenant-card h3 { font-size: 14px; margin-bottom: 4px; }
.tenant-card .slug { font-family: monospace; font-size: 10px; color: var(--text-3); }
.tenant-card .meta { display: flex; gap: 6px; margin: 14px 0; }
.empty-card { background: var(--surface); border: 2px dashed var(--border); border-radius: var(--r); padding: 60px 40px; text-align: center; color: var(--text-3); grid-column: 1 / -1; }

/* ===== HISTORY ===== */
.history-table-wrap { background: var(--surface); border: 1px solid var(--border); border-radius: var(--r); overflow: auto; box-shadow: var(--sh-1); }
.history-table { width: 100%; border-collapse: collapse; font-size: 10px; }
.history-table thead { background: var(--bg-2); }
.history-table th { padding: 10px 14px; text-align: left; font-weight: 600; color: var(--text-2); font-size: 9px; text-transform: uppercase; letter-spacing: 0.5px; border-bottom: 1px solid var(--border); white-space: nowrap; }
.history-table td { padding: 10px 14px; border-bottom: 1px solid var(--border); }
.history-table tr:last-child td { border-bottom: none; }
.history-table tr:hover { background: var(--bg-2); }
.history-table .mono { font-family: 'SF Mono', 'Consolas', monospace; font-size: 10px; }
.history-table .mono.small { font-size: 9px; }
.history-table .num { font-family: var(--font-display); font-weight: 600; }
.history-table .muted { color: var(--text-3); font-style: italic; }

/* Status variants */
.status-completed, .status-confirmed { background: #D1FAE5; color: #065F46; }
.status-pending, .status-pending_confirmation { background: #FEF3C7; color: #92400E; }
.status-voided, .status-cancelled, .status-rejected, .status-failed, .status-expired { background: #FEE2E2; color: #991B1B; }
.status-refunded { background: #DBEAFE; color: #1E40AF; }
.status-active { background: #D1FAE5; color: #065F46; }
.status-inactive { background: #F3F4F6; color: #6B7280; }

/* Direction pills */
.dir-pill { display: inline-block; padding: 2px 8px; border-radius: var(--r-xs); font-size: 9px; font-weight: 700; }
.dir-in { background: #D1FAE5; color: #065F46; }
.dir-out { background: #FEE2E2; color: #991B1B; }
.dir-adjust { background: #FEF3C7; color: #92400E; }

/* Audit */
.audit-action { background: var(--primary-soft); color: var(--primary); padding: 2px 8px; border-radius: var(--r-xs); font-size: 9px; font-weight: 700; font-family: monospace; }
.audit-detail code { display: block; font-family: monospace; font-size: 8px; padding: 1px 4px; border-radius: 3px; max-width: 320px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.diff-after { background: #D1FAE5; color: #065F46; }
.diff-before { background: #FEE2E2; color: #991B1B; }
.step-indicator { font-size: 10px; font-weight: 600; color: var(--primary); text-transform: uppercase; letter-spacing: 0.5px; margin-bottom: 16px; }
.picked-summary { background: var(--bg-2); padding: 10px 14px; border-radius: var(--r-sm); font-size: 10px; margin-bottom: 16px; }
.picked-summary b { color: var(--primary); }
/* ================================================================
   Admin Hub
   ================================================================ */
.admin-page {
  max-width: 1200px;
  margin: 0 auto;
  padding: 16px 16px 100px;
}

.admin-page .page-header {
  margin-bottom: 16px;
}

.admin-page .page-title {
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-size: 24px;
  font-weight: 800;
  margin: 0;
  color: var(--text);
}

.admin-page .page-subtitle {
  font-size: 12px;
  color: var(--text-2);
  margin: 4px 0 0;
  font-weight: 500;
}

.admin-stats {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
  margin-bottom: 24px;
}

.admin-stat {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  padding: 12px 14px;
}

.admin-stat-label {
  font-size: 10px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--text-2);
  margin-bottom: 4px;
}

.admin-stat-value {
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-size: 18px;
  font-weight: 700;
  color: var(--text);
}

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

.admin-tile {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  text-align: left;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  padding: 16px;
  cursor: pointer;
  transition: transform 0.1s, box-shadow 0.1s, border-color 0.1s;
  font-family: inherit;
  color: var(--text);
  min-height: 110px;
}

.admin-tile:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.08);
  border-color: var(--primary);
}

.admin-tile:active {
  transform: translateY(0);
}

.admin-tile-label {
  font-size: 14px;
  font-weight: 700;
  margin-bottom: 4px;
  color: var(--text);
}

.admin-tile-desc {
  font-size: 11px;
  color: var(--text-2);
  line-height: 1.4;
}

@media (max-width: 600px) {
  .admin-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .admin-tile {
    min-height: 96px;
    padding: 12px;
  }
  .admin-tile-label {
    font-size: 13px;
  }
}
