/* ==========================================================================
   DHT Business HUD — Lưu Tiểu Linh Live Sales
   Design System: UI/UX Pro Max · Obsidian Emerald Liquid Glass × Champagne Gold
   Typography: Playfair Display (Editorial) · Be Vietnam Pro (UI) · JetBrains Mono (Tabular VND)
   WCAG AA+ Contrast (>= 4.5:1) · WCAG 2.2 Focus Rings · 44px Touch Targets · Reduced Motion
   ========================================================================== */

:root {
  --bg-canvas: #050c0b;
  --surface-1: rgba(11, 25, 22, 0.84);
  --surface-2: rgba(15, 35, 30, 0.92);
  --surface-inset: rgba(5, 14, 12, 0.9);
  --surface-hover: rgba(20, 48, 41, 0.92);

  --emerald: #0f6b55;
  --emerald-mid: #169474;
  --emerald-bright: #2de0ae;
  --emerald-soft: rgba(45, 224, 174, 0.14);

  --gold: #e7c478;
  --gold-bright: #f5da9a;
  --gold-soft: rgba(231, 196, 120, 0.14);
  --on-gold: #0a1915;

  --text-primary: #f3f8f6;
  --text-secondary: #bdd3cc;
  --text-muted: #8ea9a1;
  --danger: #fca5a5;
  --danger-bg: rgba(220, 38, 38, 0.16);
  --danger-border: rgba(248, 113, 113, 0.5);

  --border-subtle: rgba(231, 196, 120, 0.16);
  --border-medium: rgba(231, 196, 120, 0.3);
  --border-strong: rgba(231, 196, 120, 0.58);
  --rim-highlight: inset 0 1px 0 rgba(255, 248, 228, 0.08);
  --focus-ring: #f5da9a;

  --font-display: "Playfair Display", Georgia, serif;
  --font-sans: "Be Vietnam Pro", "Segoe UI", system-ui, -apple-system, sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, Consolas, monospace;

  --radius-sm: 10px;
  --radius-md: 14px;
  --radius-lg: 20px;

  --ease-ui: cubic-bezier(0.22, 1, 0.36, 1);
  --t-fast: 150ms;
  --t-med: 240ms;
}

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

html {
  color-scheme: dark;
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-sans);
  font-size: 14px;
  line-height: 1.55;
  color: var(--text-primary);
  background:
    radial-gradient(ellipse 60% 42% at 10% 0%, rgba(22, 148, 116, 0.2), transparent 60%),
    radial-gradient(ellipse 48% 36% at 92% 4%, rgba(231, 196, 120, 0.14), transparent 58%),
    radial-gradient(ellipse 50% 40% at 50% 100%, rgba(15, 107, 85, 0.12), transparent 65%),
    var(--bg-canvas);
  min-height: 100vh;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.mono-num {
  font-family: var(--font-mono);
  font-variant-numeric: tabular-nums;
}

.ico {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
}

.ico-gold {
  color: var(--gold);
}

/* Global accessible focus ring (WCAG 2.2) */
:focus-visible {
  outline: 2px solid var(--focus-ring);
  outline-offset: 2px;
}

/* ==========================================================================
   TOP NAVIGATION BAR (LIQUID GLASS)
   ========================================================================== */
.topbar {
  position: sticky;
  top: 0;
  z-index: 40;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 62px;
  padding: 10px 24px;
  padding-top: max(10px, env(safe-area-inset-top));
  background: rgba(5, 14, 12, 0.82);
  backdrop-filter: blur(20px) saturate(140%);
  border-bottom: 1px solid var(--border-subtle);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.35);
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

.brand-mark {
  width: 40px;
  height: 40px;
  flex-shrink: 0;
  border-radius: 12px;
  display: grid;
  place-items: center;
  background: linear-gradient(145deg, #0d5442, #17866a);
  border: 1px solid rgba(231, 196, 120, 0.6);
  box-shadow: var(--rim-highlight), 0 6px 18px rgba(15, 107, 85, 0.35);
  color: var(--gold-bright);
}

.brand-copy {
  min-width: 0;
}

.brand h1 {
  font-family: var(--font-display);
  font-size: 17px;
  font-weight: 700;
  letter-spacing: 0.01em;
  color: var(--gold-bright);
  line-height: 1.2;
}

.brand-sep {
  opacity: 0.45;
  margin: 0 2px;
}

.brand-sub-inline {
  font-family: var(--font-sans);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--emerald-bright);
}

.brand p {
  font-size: 12px;
  color: var(--text-secondary);
  margin-top: 2px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.top-badges {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.pill {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-height: 36px;
  padding: 6px 13px;
  border-radius: 999px;
  font-family: var(--font-sans);
  font-size: 12.5px;
  font-weight: 600;
  text-decoration: none;
  border: 1px solid var(--border-subtle);
  background: rgba(13, 36, 31, 0.72);
  color: var(--text-primary);
  transition: background var(--t-fast) var(--ease-ui), border-color var(--t-fast) var(--ease-ui);
}

.pill-live .dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--emerald-bright);
  box-shadow: 0 0 10px var(--emerald-bright);
}

.pill-gold {
  border-color: var(--border-medium);
  background: var(--gold-soft);
  color: var(--gold-bright);
  cursor: pointer;
}

.pill-gold:hover {
  background: rgba(231, 196, 120, 0.24);
  border-color: var(--border-strong);
}

.pill-cart {
  cursor: pointer;
  background: rgba(15, 107, 85, 0.24);
  border-color: rgba(45, 224, 174, 0.36);
}

.pill-cart:hover {
  background: rgba(15, 107, 85, 0.42);
  border-color: var(--gold);
}

/* ==========================================================================
   3-COLUMN EXECUTIVE COCKPIT LAYOUT
   ========================================================================== */
.layout {
  max-width: 1840px;
  margin: 0 auto;
  padding: 16px 22px 24px;
  display: grid;
  grid-template-columns: 356px minmax(0, 1fr) 392px;
  gap: 18px;
  align-items: start;
}

.card {
  background: var(--surface-1);
  backdrop-filter: blur(18px) saturate(130%);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  box-shadow: var(--rim-highlight), 0 20px 48px rgba(0, 0, 0, 0.42);
  min-width: 0;
  max-width: 100%;
}

.section-card {
  padding: 16px;
}

.section-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 12px;
}

.section-head h2 {
  font-family: var(--font-display);
  font-size: 17px;
  font-weight: 700;
  color: var(--gold-bright);
  line-height: 1.25;
}

.title-with-ico {
  display: inline-flex;
  align-items: center;
  gap: 7px;
}

.head-sub {
  font-size: 12px;
  color: var(--text-muted);
  margin-top: 2px;
}

.subtle-tag {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 600;
  padding: 3px 9px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: var(--text-secondary);
  white-space: nowrap;
}

/* ==========================================================================
   LEFT COLUMN: LƯU TIỂU LINH CONCIERGE STAGE
   ========================================================================== */
.stage-card {
  padding: 14px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.stage-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.agent-badge {
  display: flex;
  flex-direction: column;
}

.agent-name {
  font-family: var(--font-display);
  font-size: 16px;
  font-weight: 700;
  color: var(--text-primary);
  line-height: 1.2;
}

.agent-role {
  font-size: 11.5px;
  color: var(--emerald-bright);
  font-weight: 500;
}

.live-chip {
  font-size: 11px;
  font-weight: 600;
  padding: 4px 10px;
  border-radius: 999px;
  background: var(--emerald-soft);
  border: 1px solid rgba(45, 224, 174, 0.42);
  color: #82f9d7;
  white-space: nowrap;
  transition: background var(--t-med) var(--ease-ui), border-color var(--t-med) var(--ease-ui), color var(--t-med) var(--ease-ui);
}

.live-chip.speaking {
  background: rgba(231, 196, 120, 0.2);
  border-color: var(--gold);
  color: var(--gold-bright);
}

.avatar-frame {
  position: relative;
  width: 100%;
  aspect-ratio: 9 / 13.4;
  border-radius: 16px;
  overflow: hidden;
  background: #06100e;
  border: 1px solid rgba(231, 196, 120, 0.36);
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.45);
  transition: border-color var(--t-med) var(--ease-ui), box-shadow var(--t-med) var(--ease-ui);
}

.avatar-frame.is-speaking {
  border-color: var(--gold-bright);
  box-shadow: 0 0 0 1px rgba(245, 218, 154, 0.45), 0 0 32px rgba(231, 196, 120, 0.24);
}

.avatar-canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 18%;
  display: block;
  z-index: 2;
}

/* Keep hidden videos INSIDE frame behind canvas so Chromium GPU never throttles or flashes */
.avatar-vid-hidden {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.001;
  z-index: 0;
  pointer-events: none;
}

.hud-overlay-top {
  position: absolute;
  top: 10px;
  left: 10px;
  right: 10px;
  z-index: 4;
  display: flex;
  justify-content: space-between;
  align-items: center;
  pointer-events: none;
}

.hud-tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 11px;
  font-weight: 600;
  padding: 4px 10px;
  border-radius: 999px;
  background: rgba(5, 14, 12, 0.76);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(231, 196, 120, 0.32);
  color: var(--text-primary);
}

.hud-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--emerald-bright);
}

.voice-wave-bar {
  position: absolute;
  left: 10px;
  right: 10px;
  bottom: 10px;
  z-index: 4;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 12px;
  border-radius: 12px;
  background: rgba(5, 14, 12, 0.82);
  backdrop-filter: blur(12px);
  border: 1px solid rgba(231, 196, 120, 0.28);
  font-size: 12px;
  color: var(--text-primary);
}

.wave-bars {
  display: flex;
  align-items: center;
  gap: 3px;
  height: 16px;
  flex-shrink: 0;
}

.wave-bars span {
  width: 3px;
  height: 5px;
  border-radius: 3px;
  background: var(--emerald-bright);
  transition: height 0.15s ease;
}

.voice-wave-bar.speaking {
  border-color: var(--gold);
}

.voice-wave-bar.speaking .wave-bars span {
  background: var(--gold-bright);
  animation: dhtWave 0.72s ease-in-out infinite;
}

.voice-wave-bar.speaking .wave-bars span:nth-child(2) { animation-delay: 0.1s; }
.voice-wave-bar.speaking .wave-bars span:nth-child(3) { animation-delay: 0.22s; }
.voice-wave-bar.speaking .wave-bars span:nth-child(4) { animation-delay: 0.34s; }
.voice-wave-bar.speaking .wave-bars span:nth-child(5) { animation-delay: 0.18s; }
.voice-wave-bar.speaking .wave-bars span:nth-child(6) { animation-delay: 0.08s; }
.voice-wave-bar.speaking .wave-bars span:nth-child(7) { animation-delay: 0.28s; }

@keyframes dhtWave {
  0%, 100% { height: 4px; }
  50% { height: 15px; }
}

.caption-box {
  background: var(--surface-inset);
  border: 1px solid rgba(45, 224, 174, 0.2);
  border-radius: var(--radius-md);
  padding: 11px 13px;
  min-height: 76px;
}

.caption-label {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  margin-bottom: 6px;
}

.caption-kicker {
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--emerald-bright);
}

.mute-btn {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 8px;
  border-radius: 8px;
  border: 1px solid rgba(231, 196, 120, 0.26);
  background: rgba(231, 196, 120, 0.08);
  color: var(--gold-bright);
  font: inherit;
  font-size: 11.5px;
  font-weight: 600;
  cursor: pointer;
  transition: background var(--t-fast) var(--ease-ui), border-color var(--t-fast) var(--ease-ui);
}

.mute-btn:hover {
  background: rgba(231, 196, 120, 0.18);
  border-color: var(--gold);
}

.caption-text {
  font-size: 13px;
  color: var(--text-primary);
  line-height: 1.55;
}

.caption-text .word {
  transition: color 0.1s ease;
}

.caption-text .word.active {
  color: var(--gold-bright);
  font-weight: 700;
}

/* Quick-Ask Customer Grid (SVG icons, 44px+ touch targets) */
.qa-panel {
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  padding-top: 10px;
}

.qa-title {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 12px;
  font-weight: 600;
  color: var(--text-secondary);
  margin-bottom: 8px;
}

.qa-hint {
  font-size: 11px;
  font-weight: 500;
  color: var(--text-muted);
}

.gesture-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 7px;
}

.g-btn {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 3px;
  min-height: 54px;
  padding: 9px 10px;
  border-radius: 11px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(9, 23, 20, 0.72);
  color: var(--text-primary);
  font: inherit;
  font-size: 12px;
  font-weight: 600;
  text-align: left;
  cursor: pointer;
  transition: background var(--t-fast) var(--ease-ui), border-color var(--t-fast) var(--ease-ui);
}

.g-btn-top {
  display: flex;
  align-items: flex-start;
  gap: 6px;
  line-height: 1.3;
}

.g-btn-top .ico {
  width: 15px;
  height: 15px;
  margin-top: 1px;
  color: var(--emerald-bright);
}

.g-btn small {
  font-size: 10.5px;
  font-weight: 400;
  color: var(--text-muted);
  line-height: 1.3;
}

.g-btn:hover {
  background: var(--surface-hover);
  border-color: var(--border-medium);
}

.g-btn.active {
  border-color: var(--gold);
  background: rgba(231, 196, 120, 0.14);
}

.g-btn.active .g-btn-top .ico,
.g-btn.active small {
  color: var(--gold-bright);
}

/* ==========================================================================
   CENTER COLUMN: FULL-HEIGHT EXECUTIVE CHAT STAGE
   ========================================================================== */
.chat-center-card {
  position: sticky;
  top: 78px;
  height: calc(100vh - 96px);
  min-height: 600px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  padding: 16px 20px;
}

.chat-center-head {
  align-items: center;
  padding-bottom: 13px;
  margin-bottom: 0;
  border-bottom: 1px solid var(--border-subtle);
}

.chat-log {
  flex: 1;
  min-height: 0;
  min-width: 0;
  padding: 16px 4px;
  overflow-y: auto;
  overflow-x: hidden;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

/* Messages stack naturally from bottom and grow upward */
.chat-log > .msg:first-child {
  margin-top: auto;
}

.msg {
  padding: 12px 15px;
  border-radius: 16px;
  font-size: 14px;
  line-height: 1.6;
  max-width: min(86%, 64ch);
  white-space: pre-line;
  overflow-wrap: break-word;
  word-break: break-word;
  animation: msgReveal 220ms var(--ease-ui);
}

@keyframes msgReveal {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: translateY(0); }
}

.msg-author {
  font-size: 11.5px;
  font-weight: 700;
  letter-spacing: 0.02em;
  margin-bottom: 4px;
}

.msg.bot {
  background: rgba(14, 45, 38, 0.72);
  border: 1px solid rgba(45, 224, 174, 0.22);
  align-self: flex-start;
  border-bottom-left-radius: 5px;
}

.msg.bot .msg-author {
  color: var(--emerald-bright);
}

.msg.user {
  background: rgba(231, 196, 120, 0.14);
  border: 1px solid rgba(231, 196, 120, 0.34);
  align-self: flex-end;
  border-bottom-right-radius: 5px;
}

.msg.user .msg-author {
  color: var(--gold-bright);
}

.chat-form {
  display: flex;
  gap: 10px;
  padding-top: 13px;
  margin-top: auto;
  border-top: 1px solid var(--border-subtle);
}

.chat-form input {
  flex: 1;
  min-width: 0;
  min-height: 46px;
  background: var(--surface-inset);
  border: 1px solid var(--border-medium);
  border-radius: 12px;
  padding: 11px 15px;
  color: var(--text-primary);
  font: inherit;
  font-size: 14px;
  transition: border-color var(--t-fast) var(--ease-ui), background var(--t-fast) var(--ease-ui);
}

.chat-form input::placeholder {
  color: var(--text-muted);
}

.chat-form input:focus {
  outline: none;
  border-color: var(--gold);
  background: rgba(7, 20, 17, 0.96);
}

/* ==========================================================================
   BUTTON SYSTEM (44px+ TOUCH TARGETS, STABLE PRESS STATES)
   ========================================================================== */
.btn {
  appearance: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  min-height: 40px;
  padding: 9px 14px;
  border-radius: 11px;
  border: 1px solid var(--border-medium);
  background: rgba(15, 65, 53, 0.45);
  color: var(--text-primary);
  font: inherit;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
  transition: background var(--t-fast) var(--ease-ui), border-color var(--t-fast) var(--ease-ui), opacity var(--t-fast) var(--ease-ui);
}

.btn:hover {
  background: rgba(20, 92, 74, 0.65);
  border-color: var(--gold);
}

.btn:active {
  opacity: 0.88;
}

.btn-sm {
  min-height: 36px;
  padding: 6px 12px;
  font-size: 12px;
}

.btn-ghost {
  background: rgba(255, 255, 255, 0.04);
  border-color: rgba(255, 255, 255, 0.14);
  color: var(--text-secondary);
}

.btn-ghost:hover {
  background: rgba(231, 196, 120, 0.12);
  border-color: var(--border-medium);
  color: var(--gold-bright);
}

.btn-primary {
  background: linear-gradient(135deg, #0e6f57, #169a78);
  border-color: rgba(231, 196, 120, 0.52);
  color: #ffffff;
  box-shadow: var(--rim-highlight);
}

.btn-primary:hover {
  background: linear-gradient(135deg, #138468, #1bb28c);
  border-color: var(--gold-bright);
}

.btn-gold {
  background: linear-gradient(135deg, #c99d47, #ebd08c);
  border-color: #f6e0a8;
  color: var(--on-gold);
  font-weight: 700;
}

.btn-gold:hover {
  background: linear-gradient(135deg, #d7ac56, #f5da9a);
}

.btn-send {
  min-height: 46px;
  padding: 0 18px;
}

.btn-full {
  width: 100%;
  min-height: 44px;
}

/* ==========================================================================
   RIGHT RAIL: SCROLLABLE VERTICAL COPILOT + CATALOG + VAT CART
   ========================================================================== */
.catalog-rail {
  position: sticky;
  top: 78px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  max-height: calc(100vh - 94px);
  overflow-y: auto;
  overflow-x: hidden;
  padding-right: 4px;
  padding-bottom: 14px;
}

/* Never squash/clip cards inside scrollable flex column */
.catalog-rail > .card {
  flex: 0 0 auto;
  flex-shrink: 0;
  overflow: visible;
}

.catalog-rail::-webkit-scrollbar,
.chat-log::-webkit-scrollbar {
  width: 6px;
}

.catalog-rail::-webkit-scrollbar-thumb,
.chat-log::-webkit-scrollbar-thumb {
  background: rgba(231, 196, 120, 0.28);
  border-radius: 999px;
}

/* AUTO LIVE COPILOT CARD */
.copilot-card {
  border-color: var(--border-medium);
  background: linear-gradient(165deg, rgba(14, 37, 32, 0.94), rgba(8, 21, 18, 0.94));
  transition: border-color var(--t-med) var(--ease-ui), box-shadow var(--t-med) var(--ease-ui);
}

.copilot-card.pulse {
  border-color: var(--gold-bright);
  box-shadow: 0 0 0 1px var(--gold), 0 0 28px rgba(231, 196, 120, 0.25);
}

.copilot-head {
  margin-bottom: 10px;
}

.copilot-pill {
  font-family: var(--font-mono);
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 0.05em;
  padding: 4px 9px;
  border-radius: 999px;
  background: var(--emerald-soft);
  border: 1px solid rgba(45, 224, 174, 0.45);
  color: #82f9d7;
  white-space: nowrap;
}

.copilot-pill.active {
  background: rgba(231, 196, 120, 0.22);
  border-color: var(--gold-bright);
  color: var(--gold-bright);
}

.copilot-tabs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
  padding: 4px;
  border-radius: 12px;
  background: var(--surface-inset);
  border: 1px solid rgba(255, 255, 255, 0.08);
  margin-bottom: 12px;
}

.c-tab {
  appearance: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-height: 36px;
  border: 1px solid transparent;
  background: transparent;
  color: var(--text-secondary);
  font: inherit;
  font-size: 12px;
  font-weight: 600;
  padding: 6px 8px;
  border-radius: 9px;
  cursor: pointer;
  transition: background var(--t-fast) var(--ease-ui), color var(--t-fast) var(--ease-ui), border-color var(--t-fast) var(--ease-ui);
}

.c-tab:hover {
  color: var(--text-primary);
}

.c-tab.active {
  border-color: var(--border-medium);
  background: rgba(231, 196, 120, 0.16);
  color: var(--gold-bright);
}

.c-pane {
  display: none;
  flex-direction: column;
  gap: 10px;
}

.c-pane.active {
  display: flex;
}

.calc-controls,
.freight-grid {
  display: flex;
  flex-direction: column;
  gap: 9px;
}

.f-field {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.f-field label {
  font-size: 12px;
  font-weight: 500;
  color: var(--text-secondary);
}

.req {
  color: var(--gold-bright);
}

.c-select,
.order-form input {
  width: 100%;
  min-height: 40px;
  background: var(--surface-inset);
  border: 1px solid var(--border-subtle);
  border-radius: 10px;
  padding: 8px 11px;
  color: var(--text-primary);
  font: inherit;
  font-size: 13px;
  transition: border-color var(--t-fast) var(--ease-ui);
}

.c-select:focus,
.order-form input:focus {
  outline: none;
  border-color: var(--gold);
}

.order-form input.is-invalid {
  border-color: var(--danger-border);
  background: var(--danger-bg);
}

.field-err {
  font-size: 11.5px;
  color: var(--danger);
  min-height: 0;
}

.qty-stepper {
  display: flex;
  align-items: center;
  gap: 8px;
}

.qty-stepper button {
  width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
  border-radius: 10px;
  border: 1px solid var(--border-medium);
  background: rgba(15, 75, 60, 0.42);
  color: var(--text-primary);
  cursor: pointer;
  transition: background var(--t-fast) var(--ease-ui), border-color var(--t-fast) var(--ease-ui);
}

.qty-stepper button:hover {
  background: rgba(20, 96, 77, 0.65);
  border-color: var(--gold);
  color: var(--gold-bright);
}

.qty-stepper input {
  width: 78px;
  min-height: 40px;
  text-align: center;
  background: var(--surface-inset);
  border: 1px solid var(--border-medium);
  border-radius: 10px;
  padding: 6px;
  color: var(--gold-bright);
  font-family: var(--font-mono);
  font-variant-numeric: tabular-nums;
  font-size: 14px;
  font-weight: 700;
}

.qty-unit {
  font-size: 12.5px;
  color: var(--text-secondary);
}

.calc-screen {
  background: var(--surface-inset);
  border: 1px solid rgba(45, 224, 174, 0.22);
  border-radius: var(--radius-md);
  padding: 12px 13px;
  display: flex;
  flex-direction: column;
  gap: 7px;
}

.calc-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  font-size: 12.5px;
  color: var(--text-secondary);
}

.calc-row strong {
  color: var(--text-primary);
  font-family: var(--font-mono);
  font-variant-numeric: tabular-nums;
  font-size: 12.5px;
  text-align: right;
}

.text-emerald {
  color: var(--emerald-bright) !important;
}

.inline-check {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  cursor: pointer;
  color: var(--text-secondary);
}

.inline-check input {
  width: 16px;
  height: 16px;
  accent-color: var(--emerald-bright);
  cursor: pointer;
}

.calc-promo-tag {
  font-size: 11.5px;
  font-weight: 600;
  color: #82f9d7;
  background: rgba(45, 224, 174, 0.12);
  border: 1px dashed rgba(45, 224, 174, 0.45);
  border-radius: 9px;
  padding: 6px 9px;
}

.calc-total-bar {
  margin-top: 4px;
  padding-top: 9px;
  border-top: 1px solid rgba(231, 196, 120, 0.24);
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 8px;
}

.calc-total-bar span {
  font-size: 11.5px;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--gold);
}

.calc-grand-num {
  font-family: var(--font-mono);
  font-variant-numeric: tabular-nums;
  font-size: 18px;
  font-weight: 700;
  color: var(--gold-bright);
}

.copilot-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.copilot-actions .btn {
  font-size: 12px;
  padding: 8px 10px;
}

.freight-booked-msg {
  display: none;
  font-size: 12.5px;
  padding: 9px 11px;
  border-radius: 10px;
  background: rgba(45, 224, 174, 0.14);
  border: 1px solid rgba(45, 224, 174, 0.5);
  color: #b9fae7;
}

.freight-booked-msg.show {
  display: block;
}

/* VERTICAL PRODUCT CATALOG */
.products-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
}

.product-card {
  background: rgba(7, 19, 16, 0.86);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: var(--radius-md);
  padding: 13px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  transition: border-color var(--t-med) var(--ease-ui), background var(--t-med) var(--ease-ui), box-shadow var(--t-med) var(--ease-ui);
}

.product-card.spotlight {
  border-color: var(--gold);
  box-shadow: 0 0 0 1px rgba(231, 196, 120, 0.55), 0 10px 26px rgba(231, 196, 120, 0.14);
  background: rgba(15, 42, 35, 0.94);
}

.p-cat {
  font-size: 11px;
  font-weight: 600;
  color: var(--emerald-bright);
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
}

.p-spot-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  color: var(--gold-bright);
}

.p-name {
  font-size: 14px;
  font-weight: 700;
  color: var(--text-primary);
  line-height: 1.35;
}

.p-meta {
  font-size: 12px;
  color: var(--text-secondary);
  line-height: 1.45;
}

.p-price {
  font-family: var(--font-mono);
  font-variant-numeric: tabular-nums;
  font-size: 15.5px;
  font-weight: 700;
  color: var(--gold-bright);
  margin-top: 2px;
}

.p-price small {
  font-family: var(--font-sans);
  font-size: 12px;
  font-weight: 400;
  color: var(--text-muted);
}

.p-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-top: 6px;
}

.p-actions .btn {
  min-height: 38px;
  padding: 7px 10px;
  font-size: 12px;
}

/* CART & CHECKOUT */
.cart-items {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 12px;
}

.cart-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 10px 12px;
  border-radius: 11px;
  background: var(--surface-inset);
  border: 1px solid rgba(255, 255, 255, 0.08);
  font-size: 13px;
}

.cart-summary {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 11px 0;
  border-top: 1px solid rgba(231, 196, 120, 0.22);
  font-weight: 700;
  color: var(--gold-bright);
}

.order-form {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 6px;
}

.order-result {
  margin-top: 10px;
  padding: 10px 12px;
  border-radius: 10px;
  background: rgba(45, 224, 174, 0.14);
  border: 1px solid rgba(45, 224, 174, 0.5);
  color: #b9fae7;
  font-size: 13px;
  display: none;
}

.order-result.show {
  display: block;
}

.order-result.is-error {
  background: var(--danger-bg);
  border-color: var(--danger-border);
  color: var(--danger);
}

/* ==========================================================================
   RESPONSIVE BREAKPOINTS (1220px TABLET · 900px MOBILE · 375px SMALL PHONE)
   ========================================================================== */
@media (max-width: 1260px) {
  .layout {
    grid-template-columns: 340px minmax(0, 1fr);
    padding: 14px 16px 24px;
  }
  .catalog-rail {
    position: static;
    max-height: none;
    overflow: visible;
    padding-right: 0;
    grid-column: 1 / -1;
  }
  .products-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 900px) {
  .topbar {
    padding: 10px 14px;
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
  }
  .brand p {
    white-space: normal;
  }
  .layout {
    grid-template-columns: minmax(0, 1fr);
    padding: 12px;
    padding-bottom: max(20px, env(safe-area-inset-bottom));
    gap: 14px;
  }
  .chat-center-card {
    position: static;
    height: 68vh;
    min-height: 440px;
  }
  .products-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 420px) {
  .gesture-grid {
    grid-template-columns: 1fr;
  }
  .copilot-actions {
    grid-template-columns: 1fr;
  }
}

/* ==========================================================================
   ACCESSIBILITY: REDUCED MOTION
   ========================================================================== */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

/* Live Microphone & 2-Way Hands-Free Voice Call UI */
.chat-head-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

.btn-voice-call.active {
  background: rgba(25, 195, 150, 0.24);
  border-color: #6ef7cf;
  color: #bbf7e7;
  box-shadow: 0 0 14px rgba(25, 195, 150, 0.35);
}

.mic-status-bar {
  font-size: 12px;
  color: #bbf7e7;
  background: rgba(25, 195, 150, 0.14);
  border: 1px solid rgba(25, 195, 150, 0.35);
  border-radius: 10px;
  padding: 6px 12px;
  margin-bottom: 8px;
}

.mic-status-bar.warn {
  color: #fde68a;
  background: rgba(230, 193, 116, 0.14);
  border-color: rgba(230, 193, 116, 0.4);
}

.btn-mic-inline {
  width: 44px;
  height: 44px;
  padding: 0;
  flex-shrink: 0;
  border-radius: 12px;
  border: 1px solid rgba(25, 195, 150, 0.4);
  background: rgba(25, 195, 150, 0.12);
  color: #bbf7e7;
}

.btn-mic-inline:hover {
  border-color: var(--gold);
  background: rgba(25, 195, 150, 0.25);
}

.btn-mic-inline.listening {
  background: rgba(248, 113, 113, 0.28);
  border-color: #f87171;
  color: #fee2e2;
  animation: dhtMicPulse 1.1s ease-in-out infinite;
}

@keyframes dhtMicPulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(248, 113, 113, 0.45); }
  50% { box-shadow: 0 0 0 8px rgba(248, 113, 113, 0); }
}
