/* =====================================================================
   ANTRIAN ADMIN — Tema "Papan Display Antrian"
   Palet ruang kontrol: navy pekat + LED amber + cyan
   ===================================================================== */

:root {
  --bg:         #080B1E;
  --bg-grad:    #0B1030;
  --surface:    #121937;
  --surface-2:  #19224a;
  --border:     #283469;
  --border-soft:#1e2952;

  --text:       #EAEEFF;
  --muted:      #8893C4;
  --faint:      #5c668f;

  --amber:      #FFB627;   /* "sedang dipanggil" — LED amber */
  --amber-soft: rgba(255,182,39,.14);
  --cyan:       #34E0E0;
  --cyan-soft:  rgba(52,224,224,.14);
  --green:      #34D399;
  --green-soft: rgba(52,211,153,.14);
  --red:        #F8717A;
  --red-soft:   rgba(248,113,122,.14);
  --violet:     #A78BFA;

  --radius:     16px;
  --radius-sm:  10px;
  --shadow:     0 24px 60px -20px rgba(0,0,0,.7);

  --font-display: 'Space Grotesk', system-ui, sans-serif;
  --font-body:    'Inter', system-ui, sans-serif;
  --font-mono:    'JetBrains Mono', ui-monospace, monospace;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html { -webkit-text-size-adjust: 100%; }

body {
  font-family: var(--font-body);
  color: var(--text);
  background:
    radial-gradient(1200px 600px at 100% -10%, rgba(52,224,224,.08), transparent 60%),
    radial-gradient(900px 500px at -10% 110%, rgba(167,139,250,.10), transparent 55%),
    linear-gradient(160deg, var(--bg-grad), var(--bg));
  background-attachment: fixed;
  min-height: 100vh;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; text-decoration: none; }

/* ---- subtle grid texture used across surfaces ---------------------- */
.grid-texture {
  background-image:
    linear-gradient(rgba(255,255,255,.025) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,.025) 1px, transparent 1px);
  background-size: 38px 38px;
}

/* =====================================================================
   LOGIN
   ===================================================================== */
.login-wrap {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 1.05fr .95fr;
}

/* Kiri: panel "papan antrian" hidup */
.login-stage {
  position: relative;
  overflow: hidden;
  padding: 48px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  border-right: 1px solid var(--border-soft);
  background:
    radial-gradient(700px 380px at 30% 20%, rgba(255,182,39,.10), transparent 60%),
    linear-gradient(180deg, #0c1330, #090d22);
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  font-family: var(--font-display);
  font-weight: 600;
  letter-spacing: .2px;
  position: relative;
  z-index: 2;
}
.brand .logo {
  width: 40px; height: 40px;
  border-radius: 11px;
  display: grid; place-items: center;
  background: linear-gradient(140deg, var(--amber), #ff8a3d);
  color: #1a1205;
  font-family: var(--font-mono);
  font-weight: 700;
  box-shadow: 0 8px 24px -6px rgba(255,182,39,.6);
}
.brand small { color: var(--muted); font-weight: 400; font-size: .72rem; display:block; }

/* Papan display besar */
.board {
  position: relative;
  z-index: 2;
  align-self: center;
  text-align: center;
}
.board .eyebrow {
  font-family: var(--font-mono);
  font-size: .72rem;
  letter-spacing: .32em;
  text-transform: uppercase;
  color: var(--amber);
}
.board .now-serving {
  font-family: var(--font-mono);
  font-weight: 700;
  font-size: clamp(4rem, 12vw, 8.5rem);
  line-height: 1;
  margin: 8px 0 4px;
  color: var(--amber);
  text-shadow: 0 0 38px rgba(255,182,39,.45);
  font-variant-numeric: tabular-nums;
}
.board .counter-line {
  font-family: var(--font-mono);
  color: var(--muted);
  letter-spacing: .18em;
  font-size: .82rem;
}
.board .counter-line b { color: var(--cyan); font-weight: 600; }

/* baris loket mini */
.board-strip {
  position: relative; z-index: 2;
  display: flex; gap: 10px;
}
.chip {
  flex: 1;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 12px 14px;
  background: rgba(255,255,255,.02);
  backdrop-filter: blur(4px);
}
.chip .k {
  font-family: var(--font-mono);
  font-size: .7rem; letter-spacing: .2em;
  color: var(--faint); text-transform: uppercase;
}
.chip .v {
  font-family: var(--font-mono);
  font-size: 1.55rem; font-weight: 700;
  color: var(--text); margin-top: 2px;
}
.chip.is-amber .v { color: var(--amber); }
.chip.is-cyan  .v { color: var(--cyan); }
.chip.is-green .v { color: var(--green); }

/* glow blobs */
.login-stage::before,
.login-stage::after {
  content: '';
  position: absolute;
  border-radius: 50%;
  filter: blur(60px);
  z-index: 0;
}
.login-stage::before { width: 320px; height: 320px; top: -80px; right: -60px; background: rgba(52,224,224,.12); }
.login-stage::after  { width: 260px; height: 260px; bottom: -70px; left: -40px; background: rgba(167,139,250,.14); }

/* Kanan: form */
.login-form-side {
  display: grid;
  place-items: center;
  padding: 48px;
}
.login-card {
  width: 100%;
  max-width: 380px;
}
.login-card h1 {
  font-family: var(--font-display);
  font-size: 1.65rem;
  font-weight: 600;
  letter-spacing: -.01em;
}
.login-card .sub {
  color: var(--muted);
  margin: 6px 0 28px;
  font-size: .92rem;
}

/* ---- form controls ------------------------------------------------- */
.field { margin-bottom: 18px; }
.field label {
  display: block;
  font-size: .76rem;
  font-weight: 500;
  letter-spacing: .04em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 8px;
}
.input {
  width: 100%;
  padding: 13px 15px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text);
  font-size: .95rem;
  font-family: var(--font-body);
  transition: border-color .15s, box-shadow .15s, background .15s;
}
.input::placeholder { color: var(--faint); }
.input:focus {
  outline: none;
  border-color: var(--amber);
  background: var(--surface-2);
  box-shadow: 0 0 0 3px var(--amber-soft);
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  padding: 13px 18px;
  border: none;
  border-radius: var(--radius-sm);
  font-family: var(--font-display);
  font-size: .95rem;
  font-weight: 600;
  letter-spacing: .01em;
  cursor: pointer;
  color: #1a1205;
  background: linear-gradient(135deg, var(--amber), #ff9a3c);
  box-shadow: 0 12px 28px -10px rgba(255,182,39,.7);
  transition: transform .12s ease, box-shadow .12s ease, filter .12s;
}
.btn:hover { transform: translateY(-1px); filter: brightness(1.04); }
.btn:active { transform: translateY(0); }
.btn:focus-visible { outline: 3px solid var(--cyan); outline-offset: 2px; }

.login-hint {
  margin-top: 22px;
  padding: 12px 14px;
  border: 1px dashed var(--border);
  border-radius: var(--radius-sm);
  font-size: .8rem;
  color: var(--muted);
  font-family: var(--font-mono);
}
.login-hint b { color: var(--cyan); }

/* =====================================================================
   FLASH / ALERTS
   ===================================================================== */
.alert {
  padding: 12px 15px;
  border-radius: var(--radius-sm);
  font-size: .88rem;
  margin-bottom: 20px;
  border: 1px solid transparent;
  display: flex; align-items: center; gap: 10px;
}
.alert.error   { background: var(--red-soft);   border-color: rgba(248,113,122,.4); color: #ffd0d4; }
.alert.success { background: var(--green-soft); border-color: rgba(52,211,153,.4);  color: #c7f6e3; }
.alert::before { font-family: var(--font-mono); font-weight: 700; }
.alert.error::before   { content: '!'; }
.alert.success::before { content: '✓'; }

/* =====================================================================
   LAYOUT DASHBOARD (sidebar + konten)
   ===================================================================== */
.layout { display: flex; min-height: 100vh; }

.sidebar {
  width: 256px;
  flex-shrink: 0;
  padding: 24px 18px;
  border-right: 1px solid var(--border-soft);
  background: linear-gradient(180deg, rgba(18,25,55,.7), rgba(9,13,34,.7));
  backdrop-filter: blur(8px);
  display: flex;
  flex-direction: column;
  position: sticky;
  top: 0;
  height: 100vh;
}
.sidebar .brand { margin-bottom: 30px; padding: 0 8px; }

.nav { display: flex; flex-direction: column; gap: 4px; }
.nav a {
  display: flex; align-items: center; gap: 12px;
  padding: 11px 14px;
  border-radius: var(--radius-sm);
  color: var(--muted);
  font-size: .92rem;
  font-weight: 500;
  transition: background .15s, color .15s;
}
.nav a svg { width: 18px; height: 18px; stroke-width: 1.8; }
.nav a:hover { background: rgba(255,255,255,.04); color: var(--text); }
.nav a.active {
  background: var(--amber-soft);
  color: var(--amber);
  box-shadow: inset 2px 0 0 var(--amber);
}
.nav .label {
  font-size: .68rem; letter-spacing: .18em; text-transform: uppercase;
  color: var(--faint); padding: 16px 14px 8px;
}

.sidebar-foot {
  margin-top: auto;
  padding-top: 18px;
  border-top: 1px solid var(--border-soft);
}
.user-pill {
  display: flex; align-items: center; gap: 11px;
  padding: 6px 4px 14px;
}
.user-pill .avatar {
  width: 38px; height: 38px; border-radius: 10px;
  display: grid; place-items: center;
  background: linear-gradient(140deg, var(--cyan), var(--violet));
  color: #06121a; font-weight: 700; font-family: var(--font-display);
}
.user-pill .meta b { font-size: .88rem; display: block; }
.user-pill .meta span { font-size: .72rem; color: var(--faint); }

.logout-link {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 14px; border-radius: var(--radius-sm);
  font-size: .88rem; color: var(--muted);
  border: 1px solid var(--border);
  transition: background .15s, color .15s, border-color .15s;
}
.logout-link:hover { color: var(--red); border-color: rgba(248,113,122,.4); background: var(--red-soft); }

/* ---- konten -------------------------------------------------------- */
.content { flex: 1; padding: 32px 36px 48px; min-width: 0; }

.page-head {
  display: flex; align-items: flex-end; justify-content: space-between;
  gap: 16px; margin-bottom: 28px; flex-wrap: wrap;
}
.page-head h1 {
  font-family: var(--font-display);
  font-size: 1.7rem; font-weight: 600; letter-spacing: -.01em;
}
.page-head p { color: var(--muted); font-size: .9rem; margin-top: 4px; }
.clock {
  font-family: var(--font-mono);
  font-size: .85rem; color: var(--cyan);
  border: 1px solid var(--border); border-radius: var(--radius-sm);
  padding: 8px 14px; letter-spacing: .05em;
}

/* =====================================================================
   KARTU STATISTIK
   ===================================================================== */
.stat-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  margin-bottom: 28px;
}
.stat {
  position: relative;
  background: var(--surface);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius);
  padding: 20px;
  overflow: hidden;
}
.stat::after {
  content: ''; position: absolute; inset: 0 0 auto 0; height: 3px;
  background: var(--accent, var(--cyan));
  opacity: .9;
}
.stat .icon {
  width: 40px; height: 40px; border-radius: 11px;
  display: grid; place-items: center; margin-bottom: 14px;
  background: var(--accent-soft, var(--cyan-soft));
  color: var(--accent, var(--cyan));
}
.stat .icon svg { width: 20px; height: 20px; stroke-width: 1.9; }
.stat .num {
  font-family: var(--font-mono);
  font-size: 2.3rem; font-weight: 700; line-height: 1;
  font-variant-numeric: tabular-nums;
}
.stat .cap { color: var(--muted); font-size: .82rem; margin-top: 6px; }
.stat.amber { --accent: var(--amber); --accent-soft: var(--amber-soft); }
.stat.cyan  { --accent: var(--cyan);  --accent-soft: var(--cyan-soft); }
.stat.green { --accent: var(--green); --accent-soft: var(--green-soft); }
.stat.violet{ --accent: var(--violet);--accent-soft: rgba(167,139,250,.14); }

/* =====================================================================
   PANEL / KARTU UMUM
   ===================================================================== */
.panel {
  background: var(--surface);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius);
  overflow: hidden;
}
.panel-head {
  display: flex; align-items: center; justify-content: space-between;
  gap: 12px; padding: 18px 22px;
  border-bottom: 1px solid var(--border-soft);
}
.panel-head h2 {
  font-family: var(--font-display);
  font-size: 1.05rem; font-weight: 600;
}
.panel-head .hint { color: var(--faint); font-size: .8rem; }

.panel-grid {
  display: grid;
  grid-template-columns: 1.6fr 1fr;
  gap: 20px;
  align-items: start;
}

/* =====================================================================
   TABEL
   ===================================================================== */
.table-wrap { overflow-x: auto; }
table.data { width: 100%; border-collapse: collapse; font-size: .9rem; }
table.data th {
  text-align: left;
  font-size: .7rem; letter-spacing: .12em; text-transform: uppercase;
  color: var(--faint); font-weight: 600;
  padding: 13px 22px; border-bottom: 1px solid var(--border-soft);
}
table.data td {
  padding: 14px 22px;
  border-bottom: 1px solid var(--border-soft);
  color: var(--text);
}
table.data tr:last-child td { border-bottom: none; }
table.data tbody tr { transition: background .12s; }
table.data tbody tr:hover { background: rgba(255,255,255,.02); }
.tnum {
  font-family: var(--font-mono);
  font-weight: 700; letter-spacing: .04em;
  font-size: .95rem;
}

/* badge status */
.badge {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: .74rem; font-weight: 600;
  padding: 4px 10px; border-radius: 999px;
  border: 1px solid transparent;
  font-family: var(--font-mono); letter-spacing: .02em;
}
.badge::before { content:''; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.badge.menunggu  { background: var(--cyan-soft);  color: var(--cyan);  border-color: rgba(52,224,224,.35); }
.badge.dipanggil { background: var(--amber-soft); color: var(--amber); border-color: rgba(255,182,39,.35); }
.badge.selesai   { background: var(--green-soft); color: var(--green); border-color: rgba(52,211,153,.35); }
.badge.batal     { background: var(--red-soft);   color: var(--red);   border-color: rgba(248,113,122,.35); }
.badge.dipanggil::before { animation: blink 1.1s steps(2,start) infinite; }
@keyframes blink { 50% { opacity: .25; } }

/* =====================================================================
   PANEL "SEDANG DIPANGGIL" (mini board di dashboard)
   ===================================================================== */
.mini-board { padding: 22px; }
.mini-board .lbl {
  font-family: var(--font-mono);
  font-size: .68rem; letter-spacing: .3em; text-transform: uppercase;
  color: var(--amber); text-align: center;
}
.mini-board .big {
  font-family: var(--font-mono);
  text-align: center;
  font-size: clamp(2.6rem, 7vw, 4rem); font-weight: 700;
  color: var(--amber); line-height: 1.1; margin: 6px 0;
  text-shadow: 0 0 30px rgba(255,182,39,.4);
  font-variant-numeric: tabular-nums;
}
.mini-board .loket-name {
  text-align: center; color: var(--muted); font-size: .9rem;
}
.mini-board .empty {
  text-align: center; color: var(--faint);
  font-family: var(--font-mono); padding: 22px 0;
}
.loket-list { display: flex; flex-direction: column; gap: 10px; margin-top: 18px; }
.loket-row {
  display: flex; align-items: center; justify-content: space-between;
  padding: 12px 14px; border: 1px solid var(--border-soft);
  border-radius: var(--radius-sm); background: rgba(255,255,255,.015);
}
.loket-row .name { font-size: .88rem; }
.loket-row .name small { display:block; color: var(--faint); font-family: var(--font-mono); font-size: .7rem; }
.loket-row .serving { font-family: var(--font-mono); font-weight: 700; color: var(--amber); }
.loket-row .idle { color: var(--faint); font-family: var(--font-mono); font-size: .85rem; }

/* =====================================================================
   FORM & TOMBOL AKSI (halaman antrian)
   ===================================================================== */
.toolbar {
  display: flex; gap: 12px; flex-wrap: wrap; align-items: center;
  margin-bottom: 20px;
}
.toolbar form { display: flex; gap: 10px; flex-wrap: wrap; }
.select, .toolbar .input { width: auto; }
.btn-sm {
  width: auto; padding: 9px 16px; font-size: .85rem;
}
.btn-ghost {
  background: transparent; color: var(--text);
  border: 1px solid var(--border); box-shadow: none;
}
.btn-ghost:hover { filter: none; background: rgba(255,255,255,.04); }

.row-actions { display: flex; gap: 8px; }
.act {
  border: 1px solid var(--border); background: transparent;
  color: var(--muted); border-radius: 8px; padding: 6px 11px;
  font-size: .78rem; font-weight: 600; cursor: pointer;
  font-family: var(--font-body);
  transition: all .12s;
}
.act:hover { color: var(--text); border-color: var(--faint); }
.act.call   { color: var(--amber); border-color: rgba(255,182,39,.4); }
.act.call:hover { background: var(--amber-soft); }
.act.done   { color: var(--green); border-color: rgba(52,211,153,.4); }
.act.done:hover { background: var(--green-soft); }
.act.cancel { color: var(--red); border-color: rgba(248,113,122,.4); }
.act.cancel:hover { background: var(--red-soft); }

.empty-state {
  text-align: center; padding: 56px 20px; color: var(--muted);
}
.empty-state .em-icon {
  width: 54px; height: 54px; margin: 0 auto 14px;
  border-radius: 14px; display: grid; place-items: center;
  background: var(--surface-2); color: var(--faint);
}

/* =====================================================================
   PENCARIAN (search box pada toolbar)
   ===================================================================== */
.search-box {
  position: relative;
  display: flex;
  align-items: center;
  flex: 1 1 280px;
  max-width: 360px;
}
.search-box svg {
  position: absolute; left: 14px;
  width: 16px; height: 16px;
  color: var(--faint);
  pointer-events: none;
}
.search-box .input {
  padding-left: 38px;
}

.is-hidden { display: none !important; }

/* =====================================================================
   MODAL (popup tambah loket)
   ===================================================================== */
.modal-overlay {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 1000;
  align-items: center;
  justify-content: center;
  padding: 20px;
  background: rgba(5, 8, 22, .68);
  backdrop-filter: blur(4px);
}
.modal-overlay.is-open { display: flex; }
.modal {
  width: 100%;
  max-width: 420px;
  background: var(--surface);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow: hidden;
  animation: modal-pop .15s ease-out;
}
@keyframes modal-pop {
  from { opacity: 0; transform: translateY(8px) scale(.98); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}
.modal-head {
  display: flex; align-items: center; justify-content: space-between;
  gap: 12px; padding: 18px 22px;
  border-bottom: 1px solid var(--border-soft);
}
.modal-head h2 {
  font-family: var(--font-display);
  font-size: 1.05rem; font-weight: 600;
}
.modal-close {
  width: 30px; height: 30px;
  display: grid; place-items: center;
  border: 1px solid var(--border); background: transparent;
  border-radius: 8px; color: var(--muted);
  font-size: 1.2rem; line-height: 1; cursor: pointer;
  transition: all .12s;
}
.modal-close:hover { color: var(--text); border-color: var(--faint); }
.modal-body { padding: 22px; }
.modal-body .field:last-child { margin-bottom: 0; }
.modal-actions {
  display: flex; justify-content: flex-end; gap: 10px;
  padding: 18px 22px; border-top: 1px solid var(--border-soft);
}
.modal-actions .btn,
.modal-actions .btn-ghost { width: auto; }

/* =====================================================================
   RESPONSIVE
   ===================================================================== */
@media (max-width: 980px) {
  .stat-grid { grid-template-columns: repeat(2, 1fr); }
  .panel-grid { grid-template-columns: 1fr; }
}
@media (max-width: 820px) {
  .login-wrap { grid-template-columns: 1fr; }
  .login-stage { display: none; }
  .login-form-side { padding: 32px 24px; }
}
@media (max-width: 720px) {
  .layout { flex-direction: column; }
  .sidebar {
    width: 100%; height: auto; position: static;
    flex-direction: row; align-items: center; flex-wrap: wrap;
    gap: 10px; padding: 14px 16px;
  }
  .sidebar .brand { margin-bottom: 0; }
  .nav { flex-direction: row; flex-wrap: wrap; flex: 1; }
  .nav .label, .sidebar-foot .user-pill { display: none; }
  .sidebar-foot { margin: 0; padding: 0; border: none; }
  .content { padding: 22px 18px 40px; }
  .stat-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 460px) {
  .stat-grid { grid-template-columns: 1fr; }
}

/* aksesibilitas: kurangi animasi */
@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition: none !important; }
}
/* =====================================================================
   ENHANCED ANIMATIONS & UI POLISH
   ===================================================================== */

/* ---- Page load: fade-in semua konten utama ------------------------- */
@keyframes fade-up {
  from { opacity: 0; transform: translateY(18px); }
  to   { opacity: 1; transform: translateY(0); }
}
@keyframes fade-in {
  from { opacity: 0; }
  to   { opacity: 1; }
}
@keyframes slide-in-left {
  from { opacity: 0; transform: translateX(-20px); }
  to   { opacity: 1; transform: translateX(0); }
}
@keyframes scale-in {
  from { opacity: 0; transform: scale(.93); }
  to   { opacity: 1; transform: scale(1); }
}
@keyframes shimmer {
  0%   { background-position: -400px 0; }
  100% { background-position: 400px 0; }
}
@keyframes pulse-glow {
  0%, 100% { box-shadow: 0 0 0 0 rgba(255,182,39,.0); }
  50%       { box-shadow: 0 0 18px 4px rgba(255,182,39,.22); }
}
@keyframes float {
  0%, 100% { transform: translateY(0); }
  50%       { transform: translateY(-5px); }
}
@keyframes spin-slow {
  from { transform: rotate(0deg); }
  to   { transform: rotate(360deg); }
}
@keyframes border-glow {
  0%, 100% { border-color: var(--border-soft); }
  50%       { border-color: rgba(52,224,224,.5); }
}

/* Page entry */
.content { animation: fade-in .35s ease both; }
.page-head { animation: fade-up .35s .05s ease both; }
.stat-grid .stat:nth-child(1) { animation: fade-up .35s .08s ease both; }
.stat-grid .stat:nth-child(2) { animation: fade-up .35s .14s ease both; }
.stat-grid .stat:nth-child(3) { animation: fade-up .35s .20s ease both; }
.stat-grid .stat:nth-child(4) { animation: fade-up .35s .26s ease both; }
.panel { animation: fade-up .38s .18s ease both; }

/* Sidebar nav items stagger */
.nav a:nth-child(1) { animation: slide-in-left .3s .05s ease both; }
.nav a:nth-child(2) { animation: slide-in-left .3s .10s ease both; }
.nav a:nth-child(3) { animation: slide-in-left .3s .15s ease both; }
.nav a:nth-child(4) { animation: slide-in-left .3s .20s ease both; }
.nav a:nth-child(5) { animation: slide-in-left .3s .25s ease both; }
.nav a:nth-child(6) { animation: slide-in-left .3s .30s ease both; }
.nav a:nth-child(7) { animation: slide-in-left .3s .35s ease both; }

/* ---- Stat cards: richer hover -------------------------------------- */
.stat {
  transition: transform .22s cubic-bezier(.34,1.56,.64,1),
              box-shadow .22s ease,
              border-color .22s ease;
  cursor: default;
}
.stat:hover {
  transform: translateY(-4px);
  box-shadow: 0 20px 48px -16px rgba(0,0,0,.55),
              0 0 0 1px var(--border);
  border-color: var(--border);
}
.stat.amber:hover { box-shadow: 0 20px 40px -16px rgba(255,182,39,.25); }
.stat.cyan:hover  { box-shadow: 0 20px 40px -16px rgba(52,224,224,.2); }
.stat.green:hover { box-shadow: 0 20px 40px -16px rgba(52,211,153,.2); }
.stat.violet:hover{ box-shadow: 0 20px 40px -16px rgba(167,139,250,.2); }

/* Icon pulse on hover */
.stat:hover .icon { animation: float 2s ease-in-out infinite; }

/* ---- Tombol: lebih ekspresif --------------------------------------- */
.btn {
  transition: transform .18s cubic-bezier(.34,1.56,.64,1),
              box-shadow .18s ease,
              filter .15s ease;
  position: relative;
  overflow: hidden;
}
/* Ripple shimmer on btn */
.btn::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(105deg, transparent 40%, rgba(255,255,255,.18) 50%, transparent 60%);
  background-size: 300% 100%;
  background-position: 200% 0;
  transition: background-position .55s ease;
}
.btn:hover::after { background-position: -100% 0; }
.btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 16px 32px -10px rgba(255,182,39,.65);
  filter: brightness(1.06);
}
.btn:active {
  transform: translateY(1px) scale(.98);
  box-shadow: 0 4px 12px -6px rgba(255,182,39,.4);
  transition-duration: .08s;
}

/* Ghost button */
.btn-ghost {
  transition: transform .16s cubic-bezier(.34,1.56,.64,1),
              background .15s ease,
              border-color .15s ease,
              color .15s ease;
}
.btn-ghost::after { display: none; }
.btn-ghost:hover {
  transform: translateY(-1px);
  background: rgba(255,255,255,.06);
  border-color: var(--faint);
}
.btn-ghost:active { transform: translateY(0) scale(.97); transition-duration: .08s; }

/* Act buttons */
.act {
  transition: transform .16s cubic-bezier(.34,1.56,.64,1),
              background .15s ease,
              box-shadow .15s ease;
}
.act:hover { transform: translateY(-1px); }
.act:active { transform: scale(.96); transition-duration: .07s; }

/* ---- Nav sidebar hover -------------------------------------------- */
.nav a {
  transition: background .2s ease, color .2s ease, transform .18s cubic-bezier(.34,1.56,.64,1), padding-left .18s ease;
  position: relative;
}
.nav a:hover { transform: translateX(3px); }
.nav a.active {
  animation: border-glow 3s ease-in-out infinite;
}

/* ---- Tabel: row hover lebih smooth & jelas ------------------------- */
table.data tbody tr {
  transition: background .18s ease, transform .18s ease;
}
table.data tbody tr:hover {
  background: rgba(52,224,224,.045);
  transform: scale(1.002);
}

/* ---- Badge animate ------------------------------------------------- */
.badge {
  transition: transform .15s ease, box-shadow .15s ease;
}
.badge:hover {
  transform: scale(1.06);
}
.badge.dipanggil {
  animation: pulse-glow 2.2s ease-in-out infinite;
}

/* ---- Input focus: smoother glow ------------------------------------ */
.input {
  transition: border-color .2s ease, box-shadow .25s ease, background .2s ease;
}
.input:focus {
  box-shadow: 0 0 0 4px var(--amber-soft), 0 2px 12px -4px rgba(255,182,39,.2);
}

/* ---- Modal: lebih dramatis ----------------------------------------- */
@keyframes modal-pop {
  from { opacity: 0; transform: translateY(16px) scale(.95); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}
.modal {
  animation: modal-pop .22s cubic-bezier(.34,1.56,.64,1) both;
}
.modal-overlay {
  transition: opacity .2s ease;
}
.modal-overlay.is-open {
  animation: fade-in .18s ease both;
}
.modal-close {
  transition: transform .16s cubic-bezier(.34,1.56,.64,1),
              color .14s ease, border-color .14s ease, background .14s ease;
}
.modal-close:hover { transform: rotate(90deg) scale(1.1); }

/* ---- Panel head ---------------------------------------------------- */
.panel {
  transition: box-shadow .25s ease;
}
.panel:hover {
  box-shadow: 0 12px 40px -16px rgba(0,0,0,.45);
}

/* ---- Logout link --------------------------------------------------- */
.logout-link {
  transition: background .18s ease, color .18s ease,
              border-color .18s ease, transform .18s cubic-bezier(.34,1.56,.64,1);
}
.logout-link svg {
  width: 16px; height: 16px;
  flex-shrink: 0;
}
.logout-link:hover { transform: translateX(3px); }

/* ---- Loket row hover ----------------------------------------------- */
.loket-row {
  transition: background .18s ease, border-color .2s ease, transform .2s cubic-bezier(.34,1.56,.64,1);
}
.loket-row:hover {
  background: rgba(52,224,224,.04);
  border-color: rgba(52,224,224,.25);
  transform: translateX(3px);
}

/* ---- Alert: slide in ----------------------------------------------- */
@keyframes alert-slide {
  from { opacity: 0; transform: translateY(-10px); max-height: 0; }
  to   { opacity: 1; transform: translateY(0); max-height: 80px; }
}
.alert {
  animation: alert-slide .3s ease both;
  overflow: hidden;
}

/* ---- Brand logo float ---------------------------------------------- */
.brand .logo {
  transition: transform .22s cubic-bezier(.34,1.56,.64,1), box-shadow .22s ease;
}
.brand:hover .logo {
  transform: rotate(-6deg) scale(1.1);
  box-shadow: 0 12px 28px -6px rgba(255,182,39,.7);
}

/* ---- Login board number glow --------------------------------------- */
@keyframes led-pulse {
  0%, 100% { text-shadow: 0 0 38px rgba(255,182,39,.45); }
  50%       { text-shadow: 0 0 60px rgba(255,182,39,.75), 0 0 12px rgba(255,182,39,.4); }
}
.board .now-serving {
  animation: led-pulse 2.8s ease-in-out infinite;
}
.mini-board .big {
  animation: led-pulse 2.8s ease-in-out infinite;
}

/* ---- Clock widget -------------------------------------------------- */
.clock {
  transition: border-color .2s ease, color .2s ease;
}
.clock:hover {
  border-color: var(--cyan);
  color: #fff;
}

/* ---- Chip (login stage) ------------------------------------------- */
.chip {
  transition: background .2s ease, border-color .2s ease, transform .2s cubic-bezier(.34,1.56,.64,1);
}
.chip:hover {
  background: rgba(255,255,255,.05);
  border-color: var(--border);
  transform: translateY(-2px);
}

/* aksesibilitas: kurangi animasi (override) */
@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition: none !important; }
}

/* =====================================================================
   HIDE SCROLLBAR (semua browser)
   ===================================================================== */
* {
  scrollbar-width: none;        /* Firefox */
  -ms-overflow-style: none;     /* IE / Edge lama */
}
*::-webkit-scrollbar {
  display: none;                /* Chrome / Safari / Edge */
}
/* =====================================================================
   TEMA DASHBOARD — data-theme attribute pada <html>
   ===================================================================== */

/* Default (sudah di :root, ini alias eksplisit) */
[data-theme="default"] {
  --bg:         #080B1E;
  --bg-grad:    #0B1030;
  --surface:    #121937;
  --surface-2:  #19224a;
  --border:     #283469;
  --border-soft:#1e2952;
  --text:       #EAEEFF;
  --muted:      #8893C4;
  --faint:      #5c668f;
  --cyan:       #34E0E0;
  --cyan-soft:  rgba(52,224,224,.14);
  --amber:      #FFB627;
  --amber-soft: rgba(255,182,39,.14);
}

/* Dark */
[data-theme="dark"] {
  --bg:         #0a0a0a;
  --bg-grad:    #111111;
  --surface:    #1a1a1a;
  --surface-2:  #242424;
  --border:     #333333;
  --border-soft:#2a2a2a;
  --text:       #f0f0f0;
  --muted:      #888888;
  --faint:      #555555;
  --cyan:       #818cf8;
  --cyan-soft:  rgba(129,140,248,.14);
  --amber:      #a5b4fc;
  --amber-soft: rgba(165,180,252,.14);
}

/* Blue */
[data-theme="blue"] {
  --bg:         #060d2e;
  --bg-grad:    #0a1545;
  --surface:    #0f1e5a;
  --surface-2:  #162570;
  --border:     #1e3498;
  --border-soft:#182880;
  --text:       #ddeeff;
  --muted:      #7ba3cc;
  --faint:      #4a6d99;
  --cyan:       #38bdf8;
  --cyan-soft:  rgba(56,189,248,.14);
  --amber:      #7dd3fc;
  --amber-soft: rgba(125,211,252,.14);
}

/* Green */
[data-theme="green"] {
  --bg:         #031a0e;
  --bg-grad:    #052416;
  --surface:    #0a3020;
  --surface-2:  #0f3d28;
  --border:     #165232;
  --border-soft:#0f3d28;
  --text:       #d1fae5;
  --muted:      #6aaf88;
  --faint:      #3d7a58;
  --cyan:       #22c55e;
  --cyan-soft:  rgba(34,197,94,.14);
  --amber:      #4ade80;
  --amber-soft: rgba(74,222,128,.14);
}

/* Purple */
[data-theme="purple"] {
  --bg:         #13002e;
  --bg-grad:    #1a0040;
  --surface:    #240055;
  --surface-2:  #2e006a;
  --border:     #4a0099;
  --border-soft:#3a0077;
  --text:       #ede9fe;
  --muted:      #9d77cc;
  --faint:      #6b4499;
  --cyan:       #a855f7;
  --cyan-soft:  rgba(168,85,247,.14);
  --amber:      #c084fc;
  --amber-soft: rgba(192,132,252,.14);
}

/* Red */
[data-theme="red"] {
  --bg:         #1a0000;
  --bg-grad:    #2a0000;
  --surface:    #3d0000;
  --surface-2:  #4d0000;
  --border:     #7f0000;
  --border-soft:#600000;
  --text:       #fee2e2;
  --muted:      #cc7777;
  --faint:      #994444;
  --cyan:       #ef4444;
  --cyan-soft:  rgba(239,68,68,.14);
  --amber:      #f87171;
  --amber-soft: rgba(248,113,113,.14);
}

/* Orange */
[data-theme="orange"] {
  --bg:         #1a0800;
  --bg-grad:    #2a1000;
  --surface:    #3d1800;
  --surface-2:  #4d2000;
  --border:     #7a3000;
  --border-soft:#5a2200;
  --text:       #ffedd5;
  --muted:      #cc8844;
  --faint:      #995522;
  --cyan:       #f97316;
  --cyan-soft:  rgba(249,115,22,.14);
  --amber:      #fb923c;
  --amber-soft: rgba(251,146,60,.14);
}

/* Body gradient ikut tema */
[data-theme] body {
  background:
    radial-gradient(1200px 600px at 100% -10%, rgba(var(--cyan-rgb,52,224,224),.08), transparent 60%),
    radial-gradient(900px 500px at -10% 110%, rgba(var(--cyan-rgb,52,224,224),.06), transparent 55%),
    linear-gradient(160deg, var(--bg-grad), var(--bg));
}
/* ── Copyright Footer ───────────────────────────────────────────────────── */
.app-copyright {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: .5rem;
  padding: .75rem 1.5rem;
  font-size: .75rem;
  color: var(--muted, #94a3b8);
  background: var(--surface, #1e293b);
  border-top: 1px solid var(--border-soft, #1e293b);
  text-align: center;
  flex-wrap: wrap;
}

.app-copyright__sep {
  opacity: .4;
}

.app-copyright a {
  color: var(--cyan, #34e0e0);
  text-decoration: none;
  font-weight: 600;
  transition: opacity .2s;
}

.app-copyright a:hover {
  opacity: .8;
  text-decoration: underline;
}
