/* ===== Tema dasar Sistem Antrean Puskesmas Aur Duri ===== */
:root {
  --teal-50: #f0fdfa;
  --teal-100: #ccfbf1;
  --teal-400: #2dd4bf;
  --teal-500: #14b8a6;
  --teal-600: #0d9488;
  --teal-700: #0f766e;
  --teal-800: #115e59;
  --navy-500: #1d5fa8;
  --navy-600: #154c8c;
  --navy-700: #0f3b70;
  --navy-800: #0b2d57;
  --navy-900: #071d3a;
  --slate-50: #f8fafc;
  --slate-100: #f1f5f9;
  --slate-200: #e2e8f0;
  --slate-300: #cbd5e1;
  --slate-400: #94a3b8;
  --slate-500: #64748b;
  --slate-600: #475569;
  --slate-700: #334155;
  --slate-800: #1e293b;
  --slate-900: #0f172a;
  --red-500: #ef4444;
  --red-600: #dc2626;
  --amber-400: #fbbf24;
  --white: #ffffff;

  --loket-a: var(--teal-600);
  --loket-a-dark: var(--teal-800);
  --loket-a-soft: var(--teal-50);
  --loket-b: var(--navy-600);
  --loket-b-dark: var(--navy-800);
  --loket-b-soft: #eef4fc;

  --radius: 16px;
  --shadow-sm: 0 1px 2px rgba(15, 23, 42, .06), 0 1px 3px rgba(15, 23, 42, .08);
  --shadow: 0 10px 30px -12px rgba(15, 23, 42, .25);
  --font: "Plus Jakarta Sans", "Segoe UI", system-ui, -apple-system, Roboto, Arial, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  font-family: var(--font);
  color: var(--slate-800);
  background: var(--slate-100);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
img { max-width: 100%; display: block; }
button, input, select, textarea { font: inherit; color: inherit; }
[hidden] { display: none !important; }

.tabular { font-variant-numeric: tabular-nums; }

/* Tombol */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .55em;
  border: 2px solid transparent; border-radius: 12px;
  padding: .75em 1.2em; font-weight: 700; line-height: 1.1;
  cursor: pointer; text-decoration: none; user-select: none;
  transition: transform .08s ease, background-color .15s ease, box-shadow .15s ease, opacity .15s;
}
.btn:active { transform: translateY(1px) scale(.99); }
.btn:focus-visible { outline: 3px solid var(--amber-400); outline-offset: 2px; }
.btn[disabled] { opacity: .55; cursor: not-allowed; }
.btn-primary { background: var(--teal-600); color: #fff; }
.btn-primary:hover { background: var(--teal-700); }
.btn-navy { background: var(--navy-600); color: #fff; }
.btn-navy:hover { background: var(--navy-700); }
.btn-outline { background: #fff; border-color: var(--slate-300); color: var(--slate-700); }
.btn-outline:hover { border-color: var(--slate-500); }
.btn-danger { background: #fff; border-color: #fecaca; color: var(--red-600); }
.btn-danger:hover { background: #fef2f2; border-color: var(--red-500); }
.btn-solid-danger { background: var(--red-600); color: #fff; }
.btn-solid-danger:hover { background: #b91c1c; }

kbd, .kbd {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 1.7em; padding: .12em .45em;
  font-family: ui-monospace, "Cascadia Mono", Consolas, monospace; font-size: .82em; font-weight: 700;
  border-radius: 6px; border: 1px solid rgba(15, 23, 42, .25); border-bottom-width: 3px;
  background: rgba(255, 255, 255, .92); color: var(--slate-800);
}

/* Toast */
.toast-wrap {
  position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%);
  display: flex; flex-direction: column; gap: 8px; align-items: center; z-index: 9999; pointer-events: none;
}
.toast {
  background: var(--slate-900); color: #fff; padding: 12px 18px; border-radius: 12px;
  font-weight: 600; box-shadow: var(--shadow); max-width: min(92vw, 560px); text-align: center;
  animation: toast-in .2s ease-out;
}
.toast.success { background: var(--teal-700); }
.toast.error { background: var(--red-600); }
@keyframes toast-in { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }

/* Indikator koneksi */
.conn { display: inline-flex; align-items: center; gap: 8px; font-weight: 600; }
.conn-dot { width: 10px; height: 10px; border-radius: 50%; background: var(--slate-400); }
.conn[data-status="live"] .conn-dot { background: #22c55e; box-shadow: 0 0 0 3px rgba(34, 197, 94, .25); }
.conn[data-status="offline"] .conn-dot { background: var(--red-500); box-shadow: 0 0 0 3px rgba(239, 68, 68, .25); }

.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;
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}
