:root {
  color-scheme: dark;
  --bg: #07111f;
  --panel: rgba(15, 31, 53, 0.9);
  --panel-border: rgba(255, 255, 255, 0.12);
  --text: #f4f8ff;
  --muted: #a9bdd8;
  --present: #34d399;
  --late: #fbbf24;
  --absent: #fb7185;
  --accent: #60a5fa;
  --leave: #d8b4fe;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html,
body {
  width: 100%;
  min-height: 100vh;
  margin: 0;
  overflow-x: hidden;
  overflow-y: auto;
}

body {
  background:
    radial-gradient(circle at top left, rgba(96, 165, 250, 0.18), transparent 28rem),
    radial-gradient(circle at bottom right, rgba(52, 211, 153, 0.12), transparent 28rem),
    linear-gradient(135deg, #050b14 0%, var(--bg) 50%, #091729 100%);
  color: var(--text);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

.dashboard-shell {
  position: relative;
  display: grid;
  width: 100%;
  min-height: 100vh;
  grid-template-rows: auto auto auto auto auto;
  gap: 16px;
  padding: 24px 30px 18px;
  overflow: visible;
}

.state-overlay {
  display: none;
}

/* Header */
.top-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
}

.top-bar-left h1 {
  margin: 0;
  font-size: 2.6rem;
  font-weight: 900;
  letter-spacing: -0.03em;
  line-height: 1.05;
}

.meta-text {
  margin: 6px 0 0;
  color: var(--muted);
  font-size: 1.25rem;
  font-weight: 700;
}

.meta-label {
  color: var(--text);
  font-weight: 800;
}

.top-bar-right {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 4px;
}

.clock {
  font-size: 3.4rem;
  font-weight: 900;
  line-height: 1;
}

/* Summary cards */
.summary-row {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 14px;
}

.summary-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 88px;
  padding: 16px 24px;
  border: 1px solid var(--panel-border);
  border-radius: 18px;
  background: linear-gradient(145deg, rgba(255,255,255,0.09), rgba(255,255,255,0.035));
}

.summary-card .card-label {
  color: var(--muted);
  font-size: 1.35rem;
  font-weight: 900;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.summary-card strong {
  font-size: 4rem;
  font-weight: 900;
  line-height: 1;
}

.summary-card.present strong { color: var(--present); }
.summary-card.late strong { color: var(--late); }
.summary-card.absent strong { color: var(--absent); }
.summary-card.total strong { color: var(--accent); }

/* Panels */
.panel {
  display: flex;
  flex-direction: column;
  overflow: visible;
  border: 1px solid var(--panel-border);
  border-radius: 18px;
  background: var(--panel);
}

.compact-panel {
  padding: 16px 18px 14px;
}

.compact-panel h2,
.panel-title-row h2 {
  margin: 0 0 10px;
  font-size: 1.65rem;
  font-weight: 900;
  letter-spacing: 0.02em;
}

.panel-title-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.badge {
  display: inline-flex;
  align-items: center;
  padding: 6px 16px;
  border-radius: 999px;
  font-size: 1.25rem;
  font-weight: 900;
}

.badge.warning {
  background: rgba(251, 191, 36, 0.18);
  color: #fde68a;
}

.badge.leave {
  background: rgba(168, 85, 247, 0.18);
  color: #d8b4fe;
}

.badge.danger {
  background: rgba(251, 113, 133, 0.18);
  color: #fecdd3;
}

/* Layout */
.tables-row,
.lists-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  overflow: visible;
  z-index: 9999;
}

.table-wrap {
    position: relative;
    overflow: hidden;
}

.data-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
}

.data-table thead {
    position: sticky;
    top: 0;
    z-index: 9999;
    background: var(--panel);
}

.data-table thead tr {
    position: relative;
    z-index: 9999;
}

.data-table thead th {
    position: sticky;
    top: 0;
    z-index: 9999;
    background: var(--panel);
    background-clip: padding-box;
}

.table-wrap table {
    width: 100%;
}

.data-table thead {
    position: sticky;
    top: 0;
    z-index: 2;
    background: var(--panel);
}

.data-table {
  width: 100%;
  border-collapse: collapse;
  table-layout: fixed;
}

.data-table th,
.data-table td {
  padding: 10px 12px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  overflow: hidden;
  text-align: left;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.data-table th {
  color: var(--muted);
  font-size: 1.05rem;
  font-weight: 900;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.data-table td {
  font-size: 1.35rem;
  font-weight: 850;
  line-height: 1.45;
}


.data-table tr:last-child td {
  border-bottom: 0;
}

.data-table .col-num {
  text-align: center;
}

.data-table .col-present { color: var(--present); }
.data-table .col-late { color: var(--late); }
.data-table .col-absent { color: var(--absent); }

.delay-pill,
.status-pill {
  display: inline-block;
  padding: 5px 12px;
  border-radius: 999px;
  font-size: 1.2rem;
  font-weight: 900;
}

.delay-pill {
  background: rgba(251, 191, 36, 0.18);
  color: #fde68a;
}

.status-pill {
  background: rgba(251, 113, 133, 0.16);
  color: #fecdd3;
}

.empty-state td {
  padding: 18px 12px;
  color: var(--muted);
  font-size: 1.25rem;
  font-weight: 700;
  text-align: center;
}

.more-note {
  margin: 8px 0 0;
  color: var(--muted);
  font-size: 1.15rem;
  font-weight: 800;
  text-align: right;
}

/* Footer */
.footer {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  color: var(--muted);
  font-size: 1.1rem;
  font-weight: 700;
}

.refresh-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--present);
  box-shadow: 0 0 10px var(--present);
  animation: pulse 1.8s infinite;
}

@keyframes pulse {
  0%, 100% { opacity: 0.5; transform: scale(0.85); }
  50% { opacity: 1; transform: scale(1.1); }
}

/* ==========================================================
   1080p TV (1920x1080)
   ========================================================== */
@media screen and (min-width: 1900px) {

  .dashboard-shell {
    padding: 32px 40px 24px;
    gap: 22px;
  }

  /* Header */
  .top-bar-left h1 {
    font-size: 4.2rem;
  }

  .meta-text {
    font-size: 1.8rem;
  }

  .clock {
    font-size: 5.2rem;
  }

  /* Summary cards */
  .summary-card {
    min-height: 140px;
    padding: 22px 30px;
  }

  .summary-card .card-label {
    font-size: 1.8rem;
  }

  .summary-card strong {
    font-size: 6rem;
  }

  /* Panel titles */
  .compact-panel h2,
  .panel-title-row h2 {
    font-size: 2.3rem;
  }

  /* Badges */
  .badge,
  .delay-pill,
  .status-pill {
    font-size: 1.5rem;
    padding: 8px 18px;
  }

  /* Tables */
  .data-table th {
    font-size: 1.45rem;
    padding: 14px 14px;
  }

  .data-table td {
    font-size: 2rem;
    padding: 14px 14px;
    line-height: 1.4;
  }

  .empty-state td {
    font-size: 1.8rem;
  }

  .more-note,
  .footer {
    font-size: 1.5rem;
  }
}

/* ==========================================================
   4K TV (3840x2160)
   ========================================================== */
@media screen and (min-width: 3000px) {

  .dashboard-shell {
    padding: 60px 70px;
    gap: 34px;
  }

  .top-bar-left h1 {
    font-size: 7rem;
  }

  .meta-text {
    font-size: 3rem;
  }

  .clock {
    font-size: 8.5rem;
  }

  .summary-card {
    min-height: 220px;
    padding: 34px 44px;
  }

  .summary-card .card-label {
    font-size: 3rem;
  }

  .summary-card strong {
    font-size: 9rem;
  }

  .compact-panel h2,
  .panel-title-row h2 {
    font-size: 3.8rem;
  }

  .badge,
  .delay-pill,
  .status-pill {
    font-size: 2.6rem;
    padding: 12px 24px;
  }

  .data-table th {
    font-size: 2.4rem;
    padding: 20px;
  }

  .data-table td {
    font-size: 3rem;
    padding: 20px;
    line-height: 1.5;
  }

  .empty-state td {
    font-size: 2.8rem;
  }

  .more-note,
  .footer {
    font-size: 2.3rem;
  }
}

.top-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 2rem;
}

.top-bar-left,
.top-bar-center,
.top-bar-right {
  flex: 1;
}

.top-bar-left {
  text-align: left;
}

.top-bar-center {
  display: flex;
  justify-content: center;
  align-items: center;
}

.top-bar-right {
  text-align: right;
}

.header-logo {
  height: 200px;      /* Adjust as needed */
  width: auto;
  object-fit: contain;
}