/* ============================================================
   HONDA CENGKARENG — DESIGN SYSTEM (Automotive Trust)
   Shared tokens + components for all mockup previews
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Rubik:wght@400;500;600;700;800&family=Inter:wght@400;500;600;700&family=JetBrains+Mono:wght@500;700&display=swap');

:root {
  /* ===== BRAND HONDA ===== */
  --honda-red: #CC0000;
  --honda-red-dark: #990000;
  --honda-red-light: #FF1A1A;
  --honda-red-soft: #FEF2F2;
  --honda-red-shadow: 0 8px 24px rgba(204, 0, 0, 0.22);

  /* ===== PROFESSIONAL SLATE ===== */
  --slate-900: #0F172A;
  --slate-800: #1E293B;
  --slate-700: #334155;
  --slate-600: #475569;
  --slate-500: #64748B;
  --slate-400: #94A3B8;
  --slate-300: #CBD5E1;
  --slate-200: #E2E8F0;
  --slate-100: #F1F5F9;
  --slate-50:  #F8FAFC;
  --white:     #FFFFFF;

  /* ===== STATUS COLORS ===== */
  --status-waiting:   #F59E0B;   /* Kuning */
  --status-called:    #3B82F6;   /* Biru */
  --status-serving:   #8B5CF6;   /* Ungu */
  --status-completed: #10B981;   /* Hijau */
  --status-canceled:  #EF4444;   /* Merah */
  --status-warehouse: #06B6D4;   /* Cyan */

  /* ===== SEMANTIC ===== */
  --success: #059669;
  --success-soft: #D1FAE5;
  --warning: #D97706;
  --warning-soft: #FEF3C7;
  --error:   #DC2626;
  --error-soft: #FEE2E2;
  --info:    #0369A1;
  --info-soft: #DBEAFE;

  /* ===== ELEVATION ===== */
  --shadow-xs: 0 1px 2px rgba(15, 23, 42, 0.04);
  --shadow-sm: 0 2px 8px rgba(15, 23, 42, 0.08);
  --shadow-md: 0 8px 24px rgba(15, 23, 42, 0.12);
  --shadow-lg: 0 20px 48px rgba(15, 23, 42, 0.18);

  /* ===== MOTION ===== */
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-in-out: cubic-bezier(0.65, 0, 0.35, 1);
  --duration-fast: 150ms;
  --duration-base: 220ms;
  --duration-slow: 320ms;

  /* ===== RADIUS ===== */
  --radius-sm: 6px;
  --radius-md: 12px;
  --radius-lg: 20px;
  --radius-xl: 28px;
  --radius-full: 9999px;

  /* ===== SPACING (8pt system) ===== */
  --space-1: 4px;  --space-2: 8px;  --space-3: 12px;
  --space-4: 16px; --space-5: 20px; --space-6: 24px;
  --space-8: 32px; --space-10: 40px; --space-12: 48px;
  --space-16: 64px;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html, body {
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  color: var(--slate-900);
  -webkit-font-smoothing: antialiased;
  height: 100%;
}

body { min-height: 100vh; }

/* ============================================================
   PAGE BACKGROUNDS
   ============================================================ */

/* Honda branded page (kiosk, login, display, rating) */
.page-honda {
  background-image:
    linear-gradient(180deg, rgba(15,23,42,0.35) 0%, rgba(15,23,42,0.55) 100%),
    url('../assets/background.jpg');
  background-size: cover;
  background-position: center center;
  background-repeat: no-repeat;
  background-attachment: fixed;
  color: var(--white);
}

/* Ops/staff page (counter, warehouse, storage, admin) */
.page-ops {
  background-image:
    linear-gradient(180deg, rgba(255,255,255,0.82) 0%, rgba(245,245,250,0.88) 100%),
    url('../assets/background.jpg');
  background-size: cover;
  background-position: center center;
  background-repeat: no-repeat;
  background-attachment: fixed;
  color: var(--slate-900);
}

/* ============================================================
   TYPOGRAPHY
   ============================================================ */
.h-display { font-family: 'Rubik', sans-serif; font-weight: 800; font-size: clamp(48px, 6vw, 80px); letter-spacing: -2px; line-height: 1; }
.h-1       { font-family: 'Rubik', sans-serif; font-weight: 700; font-size: clamp(32px, 4vw, 52px); letter-spacing: -1.2px; line-height: 1.1; }
.h-2       { font-family: 'Rubik', sans-serif; font-weight: 700; font-size: 28px; letter-spacing: -0.5px; line-height: 1.2; }
.h-3       { font-family: 'Rubik', sans-serif; font-weight: 600; font-size: 22px; letter-spacing: -0.3px; line-height: 1.3; }
.h-4       { font-family: 'Rubik', sans-serif; font-weight: 600; font-size: 18px; letter-spacing: -0.2px; line-height: 1.4; }
.text-lg   { font-size: 18px; line-height: 1.55; }
.text-base { font-size: 15px; line-height: 1.55; }
.text-sm   { font-size: 13px; line-height: 1.5; }
.text-xs   { font-size: 12px; line-height: 1.45; }

.mono { font-family: 'JetBrains Mono', monospace; font-variant-numeric: tabular-nums; }

.eyebrow {
  display: inline-block;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--slate-500);
}

/* ============================================================
   BRAND
   ============================================================ */
.brand { display: flex; align-items: center; gap: 14px; }

.brand-mark {
  width: 48px; height: 48px;
  background: var(--honda-red);
  border-radius: 12px;
  display: grid; place-items: center;
  color: var(--white);
  font-family: 'Rubik', sans-serif;
  font-weight: 800; font-size: 24px;
  letter-spacing: -1px;
  box-shadow: var(--honda-red-shadow);
  flex-shrink: 0;
}

.brand-mark-lg { width: 56px; height: 56px; font-size: 28px; border-radius: 14px; }

.brand-text .brand-title {
  font-family: 'Rubik', sans-serif;
  font-weight: 700; font-size: 18px;
  line-height: 1.2; letter-spacing: -0.3px;
}

.brand-text .brand-sub {
  font-size: 12px; font-weight: 500;
  opacity: 0.75; letter-spacing: 0.2px;
}

/* ============================================================
   CARDS
   ============================================================ */
.card {
  background: var(--white);
  border-radius: var(--radius-lg);
  border: 1px solid var(--slate-200);
  box-shadow: var(--shadow-sm);
  padding: var(--space-6);
}

.card-elevated { box-shadow: var(--shadow-md); }

.card-glass {
  background: #ffffff;
  border: 1px solid rgba(0, 0, 0, 0.08);
  box-shadow: var(--shadow-lg);
}

/* ============================================================
   BUTTONS
   ============================================================ */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  gap: 8px;
  padding: 12px 22px;
  border-radius: var(--radius-md);
  font-family: 'Rubik', sans-serif;
  font-weight: 600; font-size: 15px;
  border: none;
  cursor: pointer;
  transition: all var(--duration-base) var(--ease-out);
  min-height: 44px;
  text-decoration: none;
  white-space: nowrap;
  line-height: 1;
}

.btn svg { width: 18px; height: 18px; stroke-width: 2; }

.btn-primary {
  background: var(--honda-red);
  color: var(--white);
  box-shadow: var(--honda-red-shadow);
}
.btn-primary:hover { background: var(--honda-red-dark); transform: translateY(-1px); }

.btn-secondary {
  background: var(--slate-900);
  color: var(--white);
}
.btn-secondary:hover { background: var(--slate-700); transform: translateY(-1px); }

.btn-ghost {
  background: var(--white);
  color: var(--slate-900);
  border: 1px solid var(--slate-300);
}
.btn-ghost:hover { background: var(--slate-50); border-color: var(--slate-500); }

.btn-success { background: var(--success); color: var(--white); }
.btn-success:hover { background: #047857; }

.btn-danger { background: var(--error); color: var(--white); }
.btn-danger:hover { background: #b91c1c; }

.btn-warning { background: var(--warning); color: var(--white); }

.btn-sm { padding: 8px 14px; font-size: 13px; min-height: 36px; }
.btn-lg { padding: 16px 28px; font-size: 17px; min-height: 52px; }
.btn-xl { padding: 20px 36px; font-size: 20px; min-height: 64px; border-radius: 16px; }

.btn:disabled { opacity: 0.5; cursor: not-allowed; transform: none !important; }

/* ============================================================
   STATUS PILL / BADGE
   ============================================================ */
.pill {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 4px 10px;
  border-radius: var(--radius-full);
  font-size: 12px; font-weight: 600;
  letter-spacing: 0.2px;
  border: 1px solid transparent;
}

.pill svg { width: 12px; height: 12px; }

.pill-waiting    { background: #FEF3C7; color: #92400E; border-color: #FDE68A; }
.pill-called     { background: #DBEAFE; color: #1E40AF; border-color: #BFDBFE; }
.pill-serving    { background: #EDE9FE; color: #5B21B6; border-color: #DDD6FE; }
.pill-completed  { background: #D1FAE5; color: #065F46; border-color: #A7F3D0; }
.pill-canceled   { background: #FEE2E2; color: #991B1B; border-color: #FECACA; }
.pill-warehouse  { background: #CFFAFE; color: #155E75; border-color: #A5F3FC; }
.pill-neutral    { background: var(--slate-100); color: var(--slate-700); border-color: var(--slate-200); }

/* Dot indicator */
.dot {
  width: 8px; height: 8px; border-radius: 50%;
  display: inline-block;
}
.dot-live {
  background: #22c55e;
  box-shadow: 0 0 0 4px rgba(34, 197, 94, 0.22);
  animation: pulse 2s infinite;
}
.dot-warn { background: var(--warning); }
.dot-off  { background: var(--slate-400); }

@keyframes pulse { 0%,100% { opacity: 1; } 50% { opacity: 0.55; } }

/* ============================================================
   QUEUE NUMBER
   ============================================================ */
.queue-num {
  font-family: 'JetBrains Mono', monospace;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  letter-spacing: -1px;
}
.queue-num-display { font-size: clamp(96px, 14vw, 180px); line-height: 1; }
.queue-num-lg      { font-size: 56px; line-height: 1; }
.queue-num-md      { font-size: 32px; line-height: 1; }
.queue-num-sm      { font-size: 20px; line-height: 1; }

.queue-prefix { color: var(--honda-red); }
.queue-digits { color: var(--slate-900); }
.queue-num-display .queue-digits,
.queue-num-display .queue-prefix { letter-spacing: -4px; }

/* ============================================================
   TABLE
   ============================================================ */
.tbl { width: 100%; border-collapse: separate; border-spacing: 0; }
.tbl thead th {
  background: var(--slate-50);
  color: var(--slate-600);
  font-size: 11px; font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
  padding: 14px 16px;
  text-align: left;
  border-bottom: 1px solid var(--slate-200);
  border-top: 1px solid var(--slate-200);
  position: sticky; top: 0;
}
.tbl tbody td {
  padding: 14px 16px;
  border-bottom: 1px solid var(--slate-100);
  font-size: 14px;
  color: var(--slate-800);
  vertical-align: middle;
}
.tbl tbody tr { transition: background var(--duration-fast) var(--ease-out); }
.tbl tbody tr:hover { background: var(--slate-50); }

/* ============================================================
   FORM
   ============================================================ */
.field { display: flex; flex-direction: column; gap: 6px; }
.field label {
  font-size: 13px;
  font-weight: 600;
  color: var(--slate-700);
  letter-spacing: 0.1px;
}
.field input, .field select, .field textarea {
  padding: 12px 14px;
  border-radius: var(--radius-md);
  border: 1px solid var(--slate-300);
  font-family: inherit;
  font-size: 15px;
  background: var(--white);
  color: var(--slate-900);
  transition: border var(--duration-fast) var(--ease-out),
              box-shadow var(--duration-fast) var(--ease-out);
  min-height: 44px;
}
.field input:focus, .field select:focus, .field textarea:focus {
  outline: none;
  border-color: var(--honda-red);
  box-shadow: 0 0 0 3px rgba(204, 0, 0, 0.15);
}
.field-helper { font-size: 12px; color: var(--slate-500); }

/* ============================================================
   KPI TILE
   ============================================================ */
.kpi {
  background: var(--white);
  border-radius: var(--radius-lg);
  border: 1px solid var(--slate-200);
  padding: var(--space-6);
  display: flex; flex-direction: column; gap: 8px;
  transition: all var(--duration-base) var(--ease-out);
}
.kpi:hover { border-color: var(--honda-red); box-shadow: var(--shadow-md); transform: translateY(-2px); }
.kpi-label {
  font-size: 12px; font-weight: 700;
  color: var(--slate-500);
  letter-spacing: 1.5px;
  text-transform: uppercase;
}
.kpi-value {
  font-family: 'Rubik', sans-serif;
  font-weight: 700; font-size: 36px;
  color: var(--slate-900); line-height: 1;
  letter-spacing: -1px;
}
.kpi-delta { font-size: 13px; font-weight: 600; display: flex; align-items: center; gap: 4px; }
.kpi-delta.up   { color: var(--success); }
.kpi-delta.down { color: var(--error); }
.kpi-icon {
  width: 40px; height: 40px;
  border-radius: var(--radius-md);
  background: var(--honda-red-soft);
  color: var(--honda-red);
  display: grid; place-items: center;
  margin-left: auto;
}
.kpi-icon svg { width: 22px; height: 22px; }

/* ============================================================
   SIDEBAR (counter, admin, warehouse)
   ============================================================ */
.app-shell { display: grid; grid-template-columns: 260px 1fr; height: var(--app-height, 100vh); }
.sidebar {
  background: var(--slate-900);
  color: var(--white);
  padding: var(--space-6) var(--space-4);
  display: flex; flex-direction: column; gap: var(--space-6);
  max-height: var(--app-height, 100vh);
  overflow-y: auto;
  position: sticky;
  top: 0;
}
.sidebar-brand { color: var(--white); padding: 0 var(--space-2); }
.sidebar-brand .brand-text .brand-sub { opacity: 0.6; }
.sidebar nav { display: flex; flex-direction: column; gap: 4px; }
.sidebar nav a {
  display: flex; align-items: center; gap: 12px;
  padding: 12px 14px;
  border-radius: var(--radius-md);
  color: rgba(255,255,255,0.72);
  text-decoration: none;
  font-size: 14px;
  font-weight: 500;
  transition: all var(--duration-fast) var(--ease-out);
}
.sidebar nav a:hover { background: rgba(255,255,255,0.06); color: var(--white); }
.sidebar nav a.active { background: var(--honda-red); color: var(--white); box-shadow: var(--honda-red-shadow); }
.sidebar nav a svg { width: 18px; height: 18px; stroke-width: 2; }
.sidebar-footer {
  margin-top: auto;
  padding: var(--space-4);
  border-top: 1px solid rgba(255,255,255,0.08);
  position: sticky;
  bottom: 0;
  background: var(--slate-900);
  flex-shrink: 0;
}

.main {
  overflow-y: auto;
  padding: var(--space-6) var(--space-8);
  padding-bottom: 80px;
}

.topbar {
  display: flex; align-items: center; justify-content: space-between;
  padding: var(--space-4) 0;
  margin-bottom: var(--space-6);
  border-bottom: 1px solid var(--slate-200);
}

/* ============================================================
   UTILITIES
   ============================================================ */
.flex { display: flex; } .grid { display: grid; }
.gap-1 { gap: 4px; } .gap-2 { gap: 8px; } .gap-3 { gap: 12px; }
.gap-4 { gap: 16px; } .gap-6 { gap: 24px; } .gap-8 { gap: 32px; }
.items-center { align-items: center; }
.justify-between { justify-content: space-between; }
.flex-col { flex-direction: column; }
.flex-1 { flex: 1; }
.text-center { text-align: center; }

.mb-2 { margin-bottom: 8px; } .mb-4 { margin-bottom: 16px; } .mb-6 { margin-bottom: 24px; }
.mt-2 { margin-top: 8px; } .mt-4 { margin-top: 16px; } .mt-6 { margin-top: 24px; }

/* ============================================================
   ACCESSIBILITY
   ============================================================ */
:focus-visible { outline: 3px solid var(--honda-red); outline-offset: 3px; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
}

/* ============================================================
   RESPONSIVE BASE
   ============================================================ */
@media (max-width: 900px) {
  .app-shell { grid-template-columns: 1fr; }
  .sidebar { display: none; }
  .main { padding: var(--space-4); }
}
