/* ============================================================
   OLLIN · BUSINESS TOOL THEME
   For daily-use staff app: dense, stable, fast, no decoration.
   Brand colors extracted from https://ollincafe.vn/
   ============================================================
   Philosophy:
     - 1 font (Raleway) for everything. Playfair chỉ cho "Giỏ QR" logo.
     - Radius nhỏ: 4/6/8. Không có 16/20/24.
     - Shadow tối thiểu. Panel dùng border, không shadow.
     - Accent orange = primary action + active state. Không decor.
     - Mật độ cao: row 36-44px, padding 8-12px.
   ============================================================ */

/* Fonts imported from base template (<link>) — Mona Sans variable */
@import url('https://fonts.googleapis.com/css2?family=JetBrains+Mono:wght@400;500;600;700&display=swap');

:root {
  /* === SURFACES (light, monochrome brand) === */
  --bg:           #FFFFFF;
  --bg-2:         #F7F7F7;
  --surface:      #FFFFFF;
  --surface-2:    #F7F7F7;
  --surface-3:    #EAEAEA;
  --border:       #EAEAEA;
  --border-strong:#8B8B8B;

  /* === INK (pure monochrome) === */
  --text:         #000000;
  --text-2:       #404040;
  --text-3:       #6B6B6B;
  --text-4:       #8B8B8B;

  /* === BRAND ACCENT === */
  --accent:       #000000;
  --accent-hover: #141414;
  --accent-2:     #404040;
  --accent-soft:  #F7F7F7;

  /* === INK DARK === */
  --ink:          #000000;
  --ink-2:        #141414;
  --ink-3:        #2B2B2B;

  /* === STATUS (only destructive/warning keep a hint of color; others monochrome) === */
  --success:      #000000;
  --success-soft: #F7F7F7;
  --warning:      #404040;
  --warning-soft: #F7F7F7;
  --danger:       #B91C1C;
  --danger-soft:  #FEF2F2;
  --info:         #000000;
  --info-soft:    #F7F7F7;

  /* === FONTS === */
  --font-display: 'Mona Sans', ui-sans-serif, system-ui, sans-serif;
  --font:         'Mona Sans', ui-sans-serif, system-ui, sans-serif;
  --font-mono:    'JetBrains Mono', ui-monospace, Menlo, monospace;

  /* === RADIUS (tight, business) === */
  --r-xs: 4px;
  --r-sm: 6px;
  --r:    8px;
  --r-lg: 10px;

  /* === SHADOW (minimal) === */
  --shadow-xs: 0 1px 0 rgba(26, 26, 36, 0.04);
  --shadow-sm: 0 1px 2px rgba(26, 26, 36, 0.06), 0 0 0 1px rgba(26, 26, 36, 0.02);
  --shadow:    0 2px 8px rgba(26, 26, 36, 0.08);

  /* === MOTION === */
  --ease: cubic-bezier(0.2, 0.8, 0.2, 1);
  --dur:  160ms;
}

/* === DARK VARIANT (warehouse TV) === */
[data-theme="dark"] {
  --bg:           #18181F;
  --bg-2:         #1F1F29;
  --surface:      #242434;
  --surface-2:    #2A2A3A;
  --surface-3:    #323240;
  --border:       #33333F;
  --border-strong:#484855;

  --text:         #F0EFE8;
  --text-2:       #C2C1B9;
  --text-3:       #8A8A94;
  --text-4:       #5A5A65;

  --accent:       #E5A273;
  --accent-hover: #D18447;
  --accent-soft:  rgba(229, 162, 115, 0.12);

  --ink:          #F0EFE8;
  --ink-2:        #242434;

  --success:      #7EB073;
  --success-soft: rgba(126, 176, 115, 0.1);
  --warning:      #DDAC5C;
  --warning-soft: rgba(221, 172, 92, 0.1);
  --danger:       #D4755A;
  --danger-soft:  rgba(212, 117, 90, 0.1);
  --info:         #759ABF;
  --info-soft:    rgba(117, 154, 191, 0.1);

  --shadow-xs: 0 1px 0 rgba(0, 0, 0, 0.3);
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.35);
  --shadow:    0 2px 8px rgba(0, 0, 0, 0.4);
}

/* ============ RESET ============ */
* { box-sizing: border-box; margin: 0; padding: 0; -webkit-tap-highlight-color: transparent; }

html { -webkit-text-size-adjust: 100%; }

body {
  font-family: var(--font);
  font-size: 13px;
  line-height: 1.5;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  font-feature-settings: "kern" 1, "liga" 1;
}

/* All headings use Raleway by default */
h1, h2, h3, h4, h5 {
  font-family: var(--font);
  font-weight: 600;
  letter-spacing: -0.005em;
  line-height: 1.25;
  color: var(--text);
}
h1 { font-size: 22px; font-weight: 700; }
h2 { font-size: 18px; }
h3 { font-size: 15px; }
h4 { font-size: 13px; font-weight: 600; }

p { color: var(--text-2); }

code, kbd {
  font-family: var(--font-mono);
  font-feature-settings: "tnum" 1, "zero" 1;
  font-size: 0.92em;
}

a { color: var(--accent); text-decoration: none; }
a:hover { color: var(--accent-hover); text-decoration: underline; }

/* Mono numeric utility */
.mono, .num {
  font-family: var(--font-mono);
  font-variant-numeric: tabular-nums;
  font-feature-settings: "tnum" 1;
}

/* ============ PRIMITIVES ============ */

/* Buttons — flat, business */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  height: 32px;
  padding: 0 12px;
  border-radius: var(--r-sm);
  border: 1px solid var(--border-strong);
  background: var(--surface);
  color: var(--text);
  font-family: var(--font);
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: background var(--dur) var(--ease), border-color var(--dur) var(--ease);
  white-space: nowrap;
}
.btn:hover { background: var(--surface-2); border-color: var(--text-3); }
.btn:active { background: var(--surface-3); }

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

.btn.ink {
  background: var(--ink-2);
  color: #fff;
  border-color: var(--ink-2);
}
.btn.ink:hover { background: var(--ink); }

.btn.ghost {
  background: transparent;
  border-color: transparent;
  color: var(--text-2);
}
.btn.ghost:hover { background: var(--surface-2); color: var(--text); }

.btn.danger {
  color: var(--danger);
  border-color: var(--border-strong);
}
.btn.danger:hover { background: var(--danger-soft); border-color: var(--danger); }

.btn.lg { height: 40px; padding: 0 18px; font-size: 13px; }
.btn.sm { height: 26px; padding: 0 10px; font-size: 11px; }

.btn svg { width: 14px; height: 14px; flex-shrink: 0; }

/* Inputs */
.input {
  width: 100%;
  height: 32px;
  padding: 0 12px;
  background: var(--surface);
  border: 1px solid var(--border-strong);
  border-radius: var(--r-sm);
  font-family: var(--font);
  font-size: 13px;
  color: var(--text);
  outline: none;
}
.input:focus { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(209, 132, 71, 0.15); }
.input::placeholder { color: var(--text-3); }

/* Pills / chips */
.chip {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  height: 22px;
  padding: 0 8px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--r-sm);
  font-size: 11px;
  font-weight: 600;
  color: var(--text-2);
}
.chip.ok   { background: var(--success-soft); color: var(--success); border-color: transparent; }
.chip.warn { background: var(--warning-soft); color: var(--warning); border-color: transparent; }
.chip.err  { background: var(--danger-soft);  color: var(--danger);  border-color: transparent; }
.chip.info { background: var(--info-soft);    color: var(--info);    border-color: transparent; }
.chip .dot { width: 5px; height: 5px; border-radius: 50%; background: currentColor; }

/* Cards / Panels */
.panel {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r);
  overflow: hidden;
}

.panel-head {
  padding: 10px 14px;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  background: var(--surface-2);
}
.panel-head h3 {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  color: var(--text-2);
}

/* Kbd */
kbd {
  display: inline-block;
  padding: 1px 5px;
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 600;
  background: var(--surface);
  border: 1px solid var(--border-strong);
  border-bottom-width: 2px;
  border-radius: var(--r-xs);
  color: var(--text);
  line-height: 1.3;
}

/* Brand mark */
.brand-mark {
  width: 32px;
  height: 32px;
  background: var(--ink-2);
  border-radius: var(--r);
  display: grid;
  place-items: center;
  position: relative;
  flex-shrink: 0;
}
.brand-mark::before {
  content: '';
  position: absolute;
  inset: 5px;
  border: 1.5px solid var(--accent);
  border-radius: 3px;
}
.brand-mark::after {
  content: '';
  position: absolute;
  left: 50%;
  top: 50%;
  width: 10px;
  height: 1.5px;
  background: var(--accent);
  transform: translate(-50%, -50%);
  box-shadow: 0 3px 0 var(--accent), 0 -3px 0 var(--accent);
}

/* The only place Playfair lives */
.brand-name {
  font-family: var(--font-display);
  font-size: 17px;
  font-weight: 600;
  letter-spacing: -0.01em;
  line-height: 1;
  color: var(--text);
}
.brand-name small {
  display: block;
  font-family: var(--font);
  font-size: 9px;
  font-weight: 600;
  color: var(--text-3);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  margin-top: 3px;
}

/* Scrollbar */
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--border-strong); border-radius: 0; }
::-webkit-scrollbar-thumb:hover { background: var(--text-3); }

/* Focus */
:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 1px;
  border-radius: var(--r-xs);
}

/* Tables — dense business style */
table { border-collapse: collapse; width: 100%; font-size: 12px; }
th {
  text-align: left;
  padding: 8px 12px;
  font-weight: 700;
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-3);
  background: var(--surface-2);
  border-bottom: 1px solid var(--border);
}
td {
  padding: 10px 12px;
  border-bottom: 1px solid var(--border);
  color: var(--text);
  vertical-align: middle;
}
tbody tr:hover td { background: var(--surface-2); }
tbody tr:last-child td { border-bottom: 0; }
