:root {
  --green: #1a7a3e;
  --green-dark: #0f5c2c;
  --green-light: #2fa85a;
  --bg-dark: #0b2e1a;
  --pending: #f2994a;
  --pending-bg: #fdf1e6;
  --calling: #2f80ed;
  --calling-bg: #e8f1fd;
  --processed: #27ae60;
  --processed-bg: #e6f7ed;
  --dismissed: #eb5757;
  --dismissed-bg: #fdeaea;
  --gray: #667085;
  --border: #e4e7ec;
}

* { box-sizing: border-box; }

body {
  font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
  margin: 0;
  background: #fff;
  color: #101828;
}

.dark-bg {
  background: radial-gradient(ellipse at center, var(--green-dark), var(--bg-dark));
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
}

.card {
  background: #fff;
  border-radius: 28px;
  padding: 40px 32px;
  max-width: 420px;
  width: 100%;
  text-align: center;
  box-shadow: 0 20px 60px rgba(0,0,0,0.3);
}

.logo {
  width: 90px;
  height: 90px;
  border-radius: 50%;
  margin-bottom: 16px;
}

.title {
  font-size: 28px;
  font-weight: 800;
  margin: 8px 0 4px;
}
.title .green { color: var(--green); }

.subtitle {
  color: var(--gray);
  font-size: 15px;
  margin-bottom: 24px;
}

.dept-btn {
  display: block;
  width: 100%;
  text-align: left;
  background: #fff;
  border: 1.5px solid var(--border);
  border-radius: 14px;
  padding: 16px 18px;
  margin-bottom: 12px;
  cursor: pointer;
  transition: all .15s ease;
}
.dept-btn:hover { border-color: var(--green); background: #f6fbf8; }
.dept-btn .name { font-size: 18px; font-weight: 700; }
.dept-btn .desc { font-size: 13px; color: var(--gray); margin-top: 2px; }

.status-box {
  border-radius: 20px;
  padding: 28px 20px;
  color: #fff;
  margin: 20px 0;
}
.status-box.pending { background: linear-gradient(135deg, var(--green-light), var(--green)); }
.status-box.calling { background: linear-gradient(135deg, var(--green-light), var(--green)); }
.status-box.processed { background: linear-gradient(135deg, var(--green-light), var(--green)); }
.status-box.dismissed { background: linear-gradient(135deg, #f36e6e, var(--dismissed)); }

.status-label { font-size: 16px; opacity: .9; margin-bottom: 8px; }
.token-number { font-size: 56px; font-weight: 800; }
.status-note { font-size: 14px; opacity: .95; margin-top: 10px; }

/* ==== Admin ==== */
.admin-layout { display: flex; min-height: 100vh; background: #fafbfc; }
.sidebar {
  width: 220px;
  background: #fff;
  border-right: 1px solid var(--border);
  padding: 24px 16px;
  display: flex;
  flex-direction: column;
}
.sidebar .brand { display: flex; align-items: center; gap: 10px; font-weight: 700; margin-bottom: 32px; font-size: 15px; }
.sidebar .brand img { width: 32px; height: 32px; border-radius: 50%; }
.nav-group-label { font-size: 11px; text-transform: uppercase; color: var(--gray); margin: 16px 0 8px; letter-spacing: .5px; }
.nav-link {
  display: block; padding: 10px 12px; border-radius: 8px; color: var(--green); font-weight: 600;
  text-decoration: none; margin-bottom: 4px; font-size: 14px;
}
.nav-link:hover { background: var(--green); color: #fff; }
.main { flex: 1; padding: 32px 40px; }

.page-title { font-size: 26px; font-weight: 800; margin: 0; }
.page-subtitle { color: var(--gray); margin: 4px 0 24px; }

.stats-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 20px; margin-bottom: 32px; }
.stat-card { background: #fff; border: 1px solid var(--border); border-radius: 16px; padding: 20px; position: relative; overflow: hidden; }
.stat-card .label { color: var(--gray); font-size: 15px; }
.stat-card .value { font-size: 32px; font-weight: 800; margin-top: 6px; }
.stat-card .bar { position: absolute; bottom: 0; left: 0; right: 0; height: 4px; }

.two-col { display: grid; grid-template-columns: 2fr 1fr; gap: 24px; align-items: start; }
.panel { background: #fff; border: 1px solid var(--border); border-radius: 16px; padding: 20px; }
.panel h3 { margin: 0 0 2px; font-size: 17px; }
.panel .sub { color: var(--gray); font-size: 13px; margin-bottom: 16px; }

table { width: 100%; border-collapse: collapse; }
th { text-align: left; background: #f2f4f7; padding: 10px 12px; font-size: 13px; color: #475467; }
td { padding: 12px; border-bottom: 1px solid var(--border); font-size: 14px; }

.badge {
  display: inline-flex; align-items: center; gap: 6px; padding: 5px 14px; border-radius: 20px;
  font-weight: 700; font-size: 13px; border: 1.5px solid;
}
.badge.pending { color: var(--pending); background: var(--pending-bg); border-color: var(--pending); }
.badge.calling { color: var(--calling); background: var(--calling-bg); border-color: var(--calling); }
.badge.processed { color: var(--processed); background: var(--processed-bg); border-color: var(--processed); }
.badge.dismissed { color: var(--dismissed); background: var(--dismissed-bg); border-color: var(--dismissed); }

.current-token-card {
  background: linear-gradient(135deg, #2f80ed, #1a56c4);
  color: #fff; border-radius: 16px; padding: 24px; text-align: center;
}
.current-token-card h4 { margin: 0 0 16px; font-weight: 600; }
.current-token-card .num { font-size: 48px; font-weight: 800; }
.current-token-card .note { font-size: 13px; opacity: .9; margin-top: 10px; }

.btn { width: 100%; padding: 14px; border: none; border-radius: 10px; font-weight: 700; font-size: 15px; cursor: pointer; margin-top: 12px; }
.btn-blue { background: linear-gradient(135deg, #6bb3f2, #2f80ed); color: #fff; }
.btn-green { background: var(--processed); color: #fff; }
.btn-red { background: var(--dismissed); color: #fff; }

input {
  width: 100%; padding: 12px 14px; border: 1.5px solid var(--border); border-radius: 10px;
  font-size: 15px; margin-bottom: 16px;
}
label { font-weight: 600; font-size: 14px; display: block; margin-bottom: 6px; }

.icon-btn { border: 1px solid var(--border); background: #fff; border-radius: 8px; width: 34px; height: 34px; cursor: pointer; }

/* ==== Waiting Display ==== */
.display-layout {
  min-height: 100vh; display: grid; grid-template-columns: 1fr 2fr; gap: 20px; padding: 24px;
  background: radial-gradient(ellipse at center, var(--green-dark), var(--bg-dark));
}
.next-list { background: #fff; border-radius: 24px; padding: 24px; }
.next-list h2 { color: var(--green); }
.next-item {
  background: linear-gradient(135deg, var(--green-light), var(--green-dark));
  color: #fff; border-radius: 14px; padding: 18px 20px; margin-bottom: 14px; font-size: 32px; font-weight: 800;
  display: flex; align-items: center; justify-content: space-between;
}
.current-panel { background: #fff; border-radius: 24px; padding: 40px; text-align: center; }
.current-panel .big-box {
  background: linear-gradient(135deg, var(--green-light), var(--green-dark));
  color: #fff; border-radius: 20px; padding: 40px; margin-top: 24px;
}
.current-panel .big-num { font-size: 90px; font-weight: 800; }
\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\
.two-col { grid-template-columns: 1fr; }
@media (min-width: 1100px) {
  .two-col { grid-template-columns: 2fr 1fr; }
}
table { table-layout: auto; }
td, th { white-space: nowrap; }
td:nth-child(1), th:nth-child(1) { white-space: normal; } /* Token# can wrap if needed */
.icon-btn { padding: 0; margin-right: 4px; }
.panel { overflow-x: auto; }

\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\
.stats-row {
  display: flex;
  flex-wrap: nowrap;
  overflow-x: auto;
  gap: 16px;
}
.stats-row .stat-card {
  flex: 1 1 0;
  min-width: 160px;
}
.stats-row {
  display: flex;
  flex-wrap: nowrap;
  gap: 10px;
}
.stats-row .stat-card {
  flex: 1 1 0;
  min-width: 0;
  padding: 14px 12px;
}
.stats-row .stat-card .label { font-size: 12px; }
.stats-row .stat-card .value { font-size: 22px; }





.next-item { font-size: clamp(28px, 4vw, 56px); padding: 1.5vw 2vw; }
.next-list h2 { font-size: clamp(20px, 2.2vw, 32px); }
.current-panel .title { font-size: clamp(24px, 5vw, 50px); }
.current-panel .big-box { padding: 2.5vw 3vw; }
.current-panel .big-num { font-size: clamp(60px, 12vw, 180px); }
#currentLabel { font-size: clamp(18px, 4vw, 40px); }
#counterLabel { font-size: clamp(18px, 4vw, 40px) !important; margin-top: 1.5vw !important; }








.status-icon {
    display: none;
    font-size: 60px;
    margin-top: 15px;
    text-align: center;
    animation: popIn .3s ease;
}

#clock {
    color: #3b82f6;
}

#loudspeaker {
    color: #f59e0b;
}

#checkmark {
    color: #22c55e;
}

#dismissedIcon {
    color: #ef4444;
}

@keyframes popIn {
    from {
        transform: scale(.5);
        opacity: 0;
    }
    to {
        transform: scale(1);
        opacity: 1;
    }
}