/* Gateway Parking Console — shared design tokens & primitives.
   Palette sampled from logo-gateway.png (flame flag, maroon wordmark, tower grays). */

:root {
  --flame: #EF4224;
  --flame-soft: #FDE5DF;
  --maroon: #A31E22;
  --maroon-deep: #7E1114;
  --maroon-soft: #F7E6E6;
  --steel: #757475;
  --silver: #B6B6B7;
  --line: #E4E4E6;
  --fog: #F4F4F5;
  --paper: #FCFCFB;
  --ink: #232324;
  --ok: #1E7A46;
  --ok-soft: #E2F1E8;
  --warn: #8A5A10;
  --warn-soft: #FAF0DB;
  --radius: 10px;
  --font: 'Archivo', 'Segoe UI', system-ui, sans-serif;
}

* { margin: 0; padding: 0; box-sizing: border-box; }
[hidden] { display: none !important; }

body {
  font-family: var(--font);
  font-size: 15px;
  color: var(--ink);
  background: var(--paper);
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; }
button { font-family: inherit; cursor: pointer; }
input, select { font-family: inherit; }
table { border-collapse: collapse; }

/* ---- the flame notch: section titles carry the logo's flag wedge ---- */
.notch-title {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 21px;
  font-weight: 700;
  letter-spacing: -0.01em;
}
.notch-title::before {
  content: '';
  width: 11px;
  height: 22px;
  background: var(--flame);
  clip-path: polygon(0 0, 100% 22%, 100% 100%, 0 100%);
  flex: none;
}

/* ---- license plate chip (plat hitam) ---- */
.plate {
  display: inline-block;
  background: #141416;
  color: #FFFFFF;
  border: 2px solid #3A3A3E;
  border-radius: 6px;
  padding: 2px 10px 3px;
  font-weight: 700;
  font-stretch: condensed;
  letter-spacing: 0.08em;
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}

/* ---- badges ---- */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  border-radius: 999px;
  padding: 3px 10px;
  font-size: 12.5px;
  font-weight: 600;
}
.badge::before { content: ''; width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.badge.member { background: var(--maroon-soft); color: var(--maroon); }
.badge.tiket { background: var(--fog); color: var(--steel); }
.badge.ok { background: var(--ok-soft); color: var(--ok); }
.badge.warn { background: var(--warn-soft); color: var(--warn); }
.badge.err { background: var(--flame-soft); color: #B3300F; }

/* ---- buttons ---- */
.btn {
  border: 0;
  border-radius: var(--radius);
  padding: 10px 18px;
  font-size: 15px;
  font-weight: 600;
  transition: background .15s ease;
}
.btn.primary { background: var(--maroon); color: #fff; }
.btn.primary:hover { background: var(--maroon-deep); }
.btn.ghost { background: transparent; color: var(--maroon); border: 1.5px solid var(--silver); }
.btn.ghost:hover { border-color: var(--maroon); }
.btn:focus-visible, a:focus-visible, input:focus-visible, select:focus-visible {
  outline: 2.5px solid var(--flame);
  outline-offset: 2px;
}

/* ---- inputs ---- */
.field { display: flex; flex-direction: column; gap: 6px; }
.field label { font-size: 13.5px; font-weight: 600; color: var(--steel); }
.field input, .field select {
  border: 1.5px solid var(--line);
  border-radius: var(--radius);
  padding: 10px 12px;
  font-size: 15px;
  background: #fff;
  color: var(--ink);
}
.field input:focus, .field select:focus { border-color: var(--maroon); outline: none; }

/* ---- panels ---- */
.panel {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 20px 22px;
}

/* ================= login page ================= */
.login-body {
  min-height: 100vh;
  display: flex;
  align-items: stretch;
  background: var(--paper);
}
.login-brand {
  flex: 1.1;
  background: linear-gradient(160deg, var(--maroon) 0%, var(--maroon-deep) 78%);
  color: #fff;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 48px 52px;
  position: relative;
  overflow: hidden;
}
.login-brand::after {
  content: '';
  position: absolute;
  right: -60px;
  top: -40px;
  width: 300px;
  height: 460px;
  background: var(--flame);
  opacity: .14;
  clip-path: polygon(0 0, 100% 18%, 100% 100%, 0 82%);
}
.login-brand .logo-card {
  background: #fff;
  border-radius: 16px;
  padding: 18px 22px;
  width: min(300px, 70%);
}
.login-brand h1 { font-size: 30px; line-height: 1.2; letter-spacing: -0.01em; max-width: 20ch; }
.login-brand p { margin-top: 12px; color: #F3D9D9; max-width: 44ch; line-height: 1.55; }
.login-brand .foot { font-size: 13px; color: #DFB9BA; }
.login-form-wrap {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 40px;
}
.login-form { width: min(380px, 100%); display: flex; flex-direction: column; gap: 18px; }
.login-form .hint {
  font-size: 13px;
  color: var(--steel);
  background: var(--fog);
  border-radius: var(--radius);
  padding: 10px 14px;
  line-height: 1.6;
}
.login-error { color: #B3300F; font-size: 14px; font-weight: 600; }

@media (max-width: 820px) {
  .login-body { flex-direction: column; }
  .login-brand { padding: 32px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; animation: none !important; }
}

/* ================= simulated entry gate ================= */
.gate-body { min-height: 100vh; background: var(--paper); }
.gate-wrap { max-width: 560px; margin: 0 auto; padding: 28px 20px 48px; display: flex; flex-direction: column; gap: 16px; }
.gate-head { display: flex; align-items: center; gap: 14px; }
.gate-head .logo-card { background: #fff; border: 1px solid var(--line); border-radius: 10px; padding: 6px 10px; }
.gate-head .logo-card img { height: 34px; display: block; }
.gate-head h1 { font-size: 22px; font-weight: 800; color: var(--maroon); flex: 1; }
.gate-head a { font-size: 13.5px; color: var(--steel); }
.gate-panel { display: flex; flex-direction: column; gap: 14px; }
.gate-panel h2 { font-size: 16px; font-weight: 700; }
.gate-row { display: flex; gap: 8px; align-items: flex-end; }
.gate-row .field { flex: 1; }
.gate-result { border-radius: 14px; padding: 18px 20px; font-weight: 600; }
.gate-result.ok { display: flex; gap: 16px; align-items: center; background: var(--ok-soft); border: 1px solid var(--ok); color: var(--ink); }
.gate-result.ok img { width: 150px; border-radius: 8px; flex: none; }
.gate-result .big-ticket { font-size: 34px; font-weight: 800; color: var(--ok); font-variant-numeric: tabular-nums; line-height: 1.1; }
.gate-result .plate { font-size: 18px; font-weight: 700; margin-top: 2px; }
.gate-result .meta { font-size: 13px; font-weight: 500; color: var(--steel); margin-top: 6px; }
.gate-result.err { background: var(--flame-soft); border: 1px solid var(--flame); color: #B3300F; font-size: 14.5px; }
@media (max-width: 480px) { .gate-result.ok { flex-direction: column; align-items: flex-start; } .gate-result.ok img { width: 100%; } }

/* ---- mode switch (shared) ---- */
.mode-switch { display: inline-flex; background: var(--fog); border-radius: 999px; padding: 3px; }
.mode-switch button {
  border: 0; background: none; border-radius: 999px;
  padding: 6px 14px; font-size: 13px; font-weight: 600; color: var(--steel);
}
.mode-switch button.on { background: var(--maroon); color: #fff; }
