/* =========================================================================
   BAP Queue System — Shared styles
   Design tokens lifted from the reference mockups:
   - Deep navy gradient background
   - White rounded card panels
   - Status chips: green (menunggu), gold (proses), red/pink (selesai)
   - Plus Jakarta Sans for an Indonesian-rooted typographic identity
   ========================================================================= */

:root {
  --navy-900: #050d1f;
  --navy-800: #0a1733;
  --navy-700: #102a5c;
  --navy-600: #1a3a82;
  --navy-500: #244ca0;
  --navy-400: #3a6cc7;
  --ink-900: #1a2845;
  --ink-700: #2d3e63;
  --ink-500: #5a6a8a;

  --paper: #ffffff;
  --paper-soft: #f6f8fc;
  --paper-line: #e6ebf3;

  --green-bg: #d6f5de;
  --green-fg: #1f6d3a;
  --gold-bg: #f5dfa1;
  --gold-fg: #7a5a14;
  --red-bg: #f4b8b8;
  --red-fg: #8c2f2f;

  --action: #28b265;
  --action-dark: #1f9352;
  --gold: #d4af37;

  --shadow-card: 0 20px 60px rgba(0, 0, 0, 0.35), 0 4px 12px rgba(0, 0, 0, 0.2);
  --radius-card: 22px;
  --radius-pill: 999px;

  --font-display: "Plus Jakarta Sans", "Segoe UI", system-ui, sans-serif;
  --font-body: "Plus Jakarta Sans", "Segoe UI", system-ui, sans-serif;
}

* {
  box-sizing: border-box;
}

html, body {
  margin: 0;
  padding: 0;
  font-family: var(--font-body);
  color: var(--ink-900);
  height: 100%;
  background:
    radial-gradient(1200px 700px at 80% 20%, #1c3a78 0%, transparent 60%),
    radial-gradient(900px 600px at 10% 90%, #0c1d44 0%, transparent 65%),
    linear-gradient(140deg, var(--navy-900) 0%, var(--navy-700) 55%, var(--navy-600) 100%);
  background-attachment: fixed;
  overflow: hidden;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

/* =========================================================================
   Layout shell — three rows: header, content, footer
   ========================================================================= */

.shell {
  display: flex;
  flex-direction: column;
  height: 100vh;
  width: 100vw;
  padding: 28px 36px;
  gap: 22px;
}

/* ---------- Header ---------- */

.shell-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  color: #fff;
  flex-shrink: 0;
}

.brand {
  display: flex;
  align-items: center;
  gap: 16px;
}

.brand-logos {
  display: flex;
  align-items: center;
  gap: 8px;
}

.brand-logos svg {
  width: 52px;
  height: 52px;
  display: block;
}

.brand-text {
  display: flex;
  flex-direction: column;
  line-height: 1.15;
}

.brand-title {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 20px;
  letter-spacing: 0.04em;
}

.brand-sub {
  font-weight: 600;
  font-size: 16px;
  letter-spacing: 0.04em;
  opacity: 0.92;
}

.header-right {
  display: flex;
  align-items: center;
  gap: 16px;
}

.pill {
  border: 1.5px solid rgba(255, 255, 255, 0.35);
  border-radius: var(--radius-pill);
  padding: 10px 26px;
  color: #fff;
  font-weight: 700;
  font-size: 18px;
  letter-spacing: 0.06em;
  background: rgba(255, 255, 255, 0.04);
  backdrop-filter: blur(6px);
  white-space: nowrap;
}

.admin-chip {
  display: flex;
  align-items: center;
  gap: 8px;
  color: #fff;
  font-weight: 600;
}

.admin-chip .dot {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: linear-gradient(135deg, #2c4474, #1a2c50);
  display: grid;
  place-items: center;
  color: #fff;
  font-weight: 800;
  font-size: 14px;
  border: 1px solid rgba(255, 255, 255, 0.18);
}

/* ---------- Footer ---------- */

.shell-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  color: #fff;
  flex-shrink: 0;
}

.footer-left {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.footer-tag {
  background: rgba(255, 255, 255, 0.06);
  border: 1.5px solid rgba(255, 255, 255, 0.32);
  border-radius: var(--radius-pill);
  padding: 12px 28px;
  font-weight: 800;
  font-size: 22px;
  letter-spacing: 0.04em;
  color: #fff;
  width: fit-content;
}

.footer-hotline {
  font-size: 13px;
  letter-spacing: 0.04em;
  opacity: 0.85;
  padding-left: 6px;
}

.footer-date {
  background: rgba(255, 255, 255, 0.04);
  border: 1.5px solid rgba(255, 255, 255, 0.32);
  border-radius: var(--radius-pill);
  padding: 12px 28px;
  font-style: italic;
  font-weight: 700;
  font-size: 20px;
  color: #fff;
}

/* ---------- Content area ---------- */

.shell-content {
  flex: 1;
  display: grid;
  gap: 26px;
  min-height: 0;
}

/* ---------- Cards ---------- */

.card {
  background: var(--paper);
  border-radius: var(--radius-card);
  box-shadow: var(--shadow-card);
  padding: 32px 36px;
  display: flex;
  flex-direction: column;
  min-height: 0;
}

.card h2 {
  margin: 0 0 18px 0;
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 26px;
  color: var(--ink-900);
  letter-spacing: 0.02em;
}

/* ---------- Status chips ---------- */

.chip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-pill);
  font-weight: 700;
  font-size: 15px;
  padding: 6px 22px;
  text-transform: capitalize;
  letter-spacing: 0.02em;
  min-width: 110px;
}

.chip-waiting  { background: var(--green-bg); color: var(--green-fg); }
.chip-progress { background: var(--gold-bg);  color: var(--gold-fg); }
.chip-done     { background: var(--red-bg);   color: var(--red-fg); }

/* ---------- Queue table ---------- */

.queue-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  font-size: 18px;
}

.queue-table thead th {
  font-weight: 700;
  text-align: left;
  color: var(--ink-700);
  padding: 12px 14px;
  font-size: 18px;
  border-bottom: 1px solid var(--paper-line);
}

.queue-table thead th:last-child {
  text-align: center;
}

.queue-table tbody td {
  padding: 16px 14px;
  border-bottom: 1px solid var(--paper-line);
  font-weight: 600;
  color: var(--ink-900);
  vertical-align: middle;
}

.queue-table tbody tr:last-child td {
  border-bottom: none;
}

.queue-table td.col-no {
  width: 60px;
  font-weight: 700;
  color: var(--ink-700);
}

.queue-table td.col-status {
  width: 160px;
  text-align: center;
}

.queue-empty {
  text-align: center;
  padding: 40px 20px;
  color: var(--ink-500);
  font-style: italic;
}

/* ---------- Buttons ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  border: none;
  border-radius: var(--radius-pill);
  padding: 18px 32px;
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 20px;
  cursor: pointer;
  letter-spacing: 0.03em;
  transition: transform 0.15s ease, box-shadow 0.15s ease, filter 0.15s ease;
  color: #fff;
}

.btn-primary {
  background: linear-gradient(180deg, var(--action) 0%, var(--action-dark) 100%);
  box-shadow: 0 8px 20px rgba(40, 178, 101, 0.35);
}

.btn-primary:hover:not(:disabled) {
  transform: translateY(-1px);
  filter: brightness(1.05);
}

.btn-primary:active:not(:disabled) {
  transform: translateY(0);
}

.btn:disabled {
  opacity: 0.55;
  cursor: not-allowed;
  filter: grayscale(0.3);
}

.btn-ghost {
  background: transparent;
  color: var(--ink-700);
  border: 1.5px solid var(--paper-line);
  font-size: 15px;
  padding: 10px 18px;
  font-weight: 700;
}

.btn-ghost:hover {
  background: var(--paper-soft);
  border-color: var(--ink-500);
}

/* ---------- Toast / inline error ---------- */

.toast {
  position: fixed;
  top: 28px;
  left: 50%;
  transform: translateX(-50%) translateY(-200%);
  background: #fff;
  color: var(--ink-900);
  border-left: 5px solid var(--red-fg);
  padding: 14px 22px;
  border-radius: 12px;
  box-shadow: var(--shadow-card);
  font-weight: 600;
  z-index: 100;
  transition: transform 0.35s cubic-bezier(0.2, 0.9, 0.3, 1.2);
  max-width: 420px;
}

.toast.show {
  transform: translateX(-50%) translateY(0);
}

.toast.success {
  border-left-color: var(--green-fg);
}

/* ---------- Connection indicator ---------- */

.conn-status {
  position: fixed;
  bottom: 12px;
  right: 18px;
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  color: rgba(255, 255, 255, 0.6);
  z-index: 50;
}

.conn-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #888;
  transition: background 0.3s ease;
}

.conn-dot.online  { background: #4ade80; box-shadow: 0 0 8px #4ade80; }
.conn-dot.offline { background: #ef4444; box-shadow: 0 0 8px #ef4444; }

/* Subtle decorative diamond, like the reference mockup's footer flourish */
.diamond {
  width: 12px;
  height: 12px;
  background: #6a8bb6;
  transform: rotate(45deg);
  opacity: 0.5;
  margin-left: 8px;
}
