:root {
  --bg: #f4f7fa;
  --bg-soft: #ffffff;
  --surface: rgba(255, 255, 255, 0.92);
  --surface-strong: #ffffff;
  --text: #172126;
  --muted: #60707b;
  --line: rgba(31, 60, 79, 0.12);
  --primary: #1f3c4f;
  --primary-dark: #142b39;
  --accent: #f5c25b;
  --danger: #cb2f27;
  --danger-soft: #fff1ef;
  --success: #1d7a46;
  --warning: #a86700;
  --shadow: 0 24px 60px rgba(31, 60, 79, 0.1);
  --radius: 24px;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  min-height: 100%;
}

body {
  font-family: "Manrope", sans-serif;
  color: var(--text);
  background:
    radial-gradient(circle at top left, rgba(245, 194, 91, 0.2), transparent 28%),
    radial-gradient(circle at right center, rgba(31, 60, 79, 0.08), transparent 30%),
    linear-gradient(180deg, #fbfdff 0%, #eef4f8 100%);
}

button,
input,
select {
  font: inherit;
}

.page-shell {
  width: min(1180px, calc(100% - 2rem));
  margin: 0 auto;
  padding: 1.5rem 0 2rem;
}

.topbar,
.panel,
.admin-view-card,
.popup-card,
.subpanel,
.stat-card {
  backdrop-filter: blur(14px);
  background: var(--surface);
  border: 1px solid rgba(31, 60, 79, 0.08);
  box-shadow: var(--shadow);
}

.topbar {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  align-items: center;
  padding: 1.25rem 1.5rem;
  border-radius: 28px;
  background: linear-gradient(135deg, #1f3c4f 0%, #2a5169 100%);
  color: white;
}

.admin-brand-bar {
  margin-bottom: 1.25rem;
  padding: 1rem 1.25rem;
  border-radius: 24px;
  background: linear-gradient(135deg, #1f3c4f 0%, #2a5169 100%);
  color: white;
}

.admin-brand-wrap {
  justify-content: center;
  text-align: center;
}

.brand-wrap {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.brand-logo {
  width: auto;
  min-width: 150px;
  max-width: 280px;
  height: 90px;
  object-fit: contain;
  border-radius: 0;
  background: transparent;
  padding: 0;
}

.eyebrow {
  margin: 0 0 0.45rem;
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--primary);
}

.topbar .eyebrow,
.topbar h1,
.admin-brand-bar .eyebrow,
.admin-brand-bar h2 {
  color: white;
}

h1,
h2,
h3,
.countdown {
  margin: 0;
  font-family: "Space Grotesk", sans-serif;
  letter-spacing: -0.03em;
}

h1 {
  font-size: clamp(2rem, 4vw, 3.4rem);
}

h2 {
  font-size: clamp(1.6rem, 3vw, 2.4rem);
}

h3 {
  font-size: 1.2rem;
}

p {
  margin: 0;
}

.layout {
  margin-top: 1.2rem;
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 1rem;
}

.panel {
  padding: 1.4rem;
  border-radius: var(--radius);
}

.hero-panel {
  display: grid;
  grid-template-columns: 1fr 320px;
  gap: 1rem;
  align-items: stretch;
}

.lead {
  margin-top: 0.8rem;
  color: var(--muted);
  max-width: 58ch;
}

.countdown-card,
.credential-card {
  border-radius: 22px;
  padding: 1.25rem;
  background: linear-gradient(180deg, rgba(31, 60, 79, 0.07), rgba(255, 255, 255, 0.98));
  border: 1px solid rgba(31, 60, 79, 0.12);
}

.terms-card {
  display: grid;
  gap: 0.9rem;
  border-radius: 22px;
  padding: 1.25rem;
  background: linear-gradient(180deg, rgba(31, 60, 79, 0.05), rgba(255, 255, 255, 0.98));
  border: 1px solid rgba(31, 60, 79, 0.12);
  color: var(--text);
}

.holiday-list-wrap {
  margin-top: 1rem;
}

.holiday-list-wrap h4 {
  margin: 0 0 0.65rem;
  font-family: "Space Grotesk", sans-serif;
}

.holiday-list {
  display: grid;
  gap: 0.55rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.holiday-list li {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.75rem;
  padding: 0.7rem 0.85rem;
  border-radius: 14px;
  background: rgba(31, 60, 79, 0.05);
  border: 1px solid rgba(31, 60, 79, 0.08);
}

.toolbar-row {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
  margin-bottom: 1rem;
}

.count-label {
  color: var(--muted);
  margin-bottom: 0.5rem;
}

.countdown {
  font-size: clamp(2.7rem, 7vw, 4.6rem);
  line-height: 1;
}

.status-pill {
  display: inline-flex;
  align-items: center;
  min-height: 40px;
  margin-top: 0.9rem;
  padding: 0.55rem 0.9rem;
  border-radius: 999px;
  background: rgba(15, 118, 110, 0.12);
  color: var(--primary-dark);
  font-weight: 700;
}

.time-meta {
  margin-top: 1rem;
  display: grid;
  gap: 0.45rem;
  color: var(--muted);
  font-size: 0.95rem;
}

.employee-login-panel,
.quick-info-panel {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.section-head {
  display: grid;
  gap: 0.45rem;
}

.section-head p:last-child,
.small-note,
label span,
.message-box,
th,
td {
  color: var(--muted);
}

.form-grid {
  display: grid;
  gap: 0.95rem;
}

label {
  display: grid;
  gap: 0.4rem;
}

input,
select {
  width: 100%;
  min-height: 48px;
  padding: 0.8rem 0.95rem;
  border-radius: 16px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.88);
  color: var(--text);
  outline: none;
}

input:focus,
select:focus {
  border-color: rgba(31, 60, 79, 0.45);
  box-shadow: 0 0 0 4px rgba(31, 60, 79, 0.08);
}

.btn {
  border: 0;
  border-radius: 999px;
  min-height: 48px;
  padding: 0.85rem 1.2rem;
  background: linear-gradient(135deg, var(--primary), #2e5973);
  color: white;
  font-weight: 800;
  cursor: pointer;
  transition: transform 0.2s ease, opacity 0.2s ease;
}

.btn:hover {
  transform: translateY(-1px);
}

.btn-secondary {
  background: white;
  color: var(--primary-dark);
  border: 1px solid rgba(31, 60, 79, 0.16);
}

.message-box {
  min-height: 52px;
  padding: 0.95rem 1rem;
  border-radius: 18px;
  background: rgba(247, 250, 252, 0.96);
  border: 1px dashed rgba(31, 60, 79, 0.15);
}

.message-box.success {
  color: var(--success);
  background: rgba(29, 122, 70, 0.08);
  border-style: solid;
  border-color: rgba(29, 122, 70, 0.18);
}

.message-box.error {
  color: var(--danger);
  background: var(--danger-soft);
  border-style: solid;
  border-color: rgba(203, 47, 39, 0.16);
}

.info-trigger {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  margin-left: 0.35rem;
  border: 0;
  border-radius: 50%;
  background: var(--primary);
  color: white;
  font-weight: 800;
  cursor: pointer;
}

.admin-view {
  width: min(1540px, calc(100% - 2rem));
  margin: 0 auto;
  padding: 1.5rem 0 2rem;
}

.popup-shell {
  position: fixed;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 1rem;
  z-index: 115;
}

.popup-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(16, 24, 40, 0.45);
}

.popup-card {
  position: relative;
  width: min(760px, 100%);
  max-height: calc(100vh - 2rem);
  overflow: auto;
  padding: 1.5rem;
  border-radius: 28px;
  background: rgba(250, 252, 254, 0.99);
  border: 1px solid rgba(31, 60, 79, 0.08);
  box-shadow: var(--shadow);
}

.info-popup {
  position: fixed;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 1rem;
  background: rgba(16, 24, 40, 0.45);
  z-index: 120;
}

.employee-view {
  width: min(1180px, calc(100% - 2rem));
  margin: 0 auto;
  padding: 1.5rem 0 2rem;
}

.employee-view-card {
  width: 100%;
  padding: 1.4rem;
  border-radius: 28px;
  background: white;
  border: 1px solid rgba(31, 60, 79, 0.1);
  box-shadow: var(--shadow);
}

.employee-view-head {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 1rem;
  align-items: center;
  margin-bottom: 1rem;
}

.employee-view .table-wrap th,
.employee-view .table-wrap td {
  text-align: center;
}

.info-popup-card {
  position: relative;
  width: min(460px, 100%);
  padding: 1.4rem;
  border-radius: 24px;
  background: white;
  border: 1px solid rgba(31, 60, 79, 0.1);
  box-shadow: var(--shadow);
}

.admin-view-card {
  width: 100%;
  min-height: calc(100vh - 3rem);
  border-radius: 30px;
  padding: 1.75rem;
  background: rgba(250, 252, 254, 0.98);
}

#adminLoginView {
  width: min(760px, 100%);
  margin: 0 auto;
}

#adminDashboardView {
  width: 100%;
}

.modal-close {
  position: absolute;
  top: 1rem;
  right: 1rem;
  width: 42px;
  height: 42px;
  border: 0;
  border-radius: 50%;
  background: white;
  cursor: pointer;
  font-weight: 700;
}

.dashboard-head,
.stats-grid,
.dashboard-grid,
.form-actions {
  display: grid;
  gap: 1rem;
}

.dashboard-head {
  grid-template-columns: 1fr auto;
  align-items: center;
  margin-bottom: 1rem;
}

.stats-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin-bottom: 1.25rem;
}

.stat-card,
.subpanel {
  border-radius: 24px;
  padding: 1.35rem;
}

.stat-card span {
  color: var(--muted);
}

.stat-card strong {
  display: block;
  margin-top: 0.4rem;
  font-size: 2rem;
  font-family: "Space Grotesk", sans-serif;
}

.dashboard-grid {
  grid-template-columns: minmax(0, 1fr);
  align-items: start;
  gap: 1.25rem;
}

.compact {
  margin-bottom: 0.9rem;
}

.form-actions {
  grid-template-columns: 1fr 1fr;
}

.table-panel {
  overflow: hidden;
  width: 100%;
}

.table-wrap {
  overflow: auto;
  border-radius: 18px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.8);
  padding-bottom: 0.25rem;
}

table {
  width: 100%;
  border-collapse: collapse;
  min-width: 1180px;
}

th,
td {
  padding: 0.9rem 0.8rem;
  text-align: left;
  border-bottom: 1px solid rgba(23, 33, 38, 0.08);
}

th {
  position: sticky;
  top: 0;
  background: #eef4f8;
  font-size: 0.84rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.tag {
  display: inline-flex;
  align-items: center;
  padding: 0.3rem 0.7rem;
  border-radius: 999px;
  background: rgba(15, 118, 110, 0.12);
  color: var(--primary-dark);
  font-weight: 700;
  font-size: 0.84rem;
}

.tag.training {
  background: rgba(255, 183, 3, 0.18);
  color: var(--warning);
}

.tag.login-ok {
  background: rgba(29, 122, 70, 0.12);
  color: var(--success);
}

.tag.login-missed {
  background: rgba(203, 47, 39, 0.12);
  color: var(--danger);
}

.actions-cell {
  display: flex;
  gap: 0.55rem;
}

.action-btn {
  min-height: 36px;
  padding: 0.55rem 0.8rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: white;
  cursor: pointer;
  font-weight: 700;
}

.action-btn.delete {
  color: var(--danger);
}

.hidden {
  display: none !important;
}

@media (max-width: 1080px) {
  .layout,
  .hero-panel,
  .dashboard-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 760px) {
  .page-shell {
    width: min(100% - 1rem, 100%);
    padding-top: 0.5rem;
  }

  .topbar,
  .panel,
  .admin-view-card,
  .subpanel,
  .stat-card {
    border-radius: 22px;
  }

  .brand-wrap {
    align-items: flex-start;
  }

  .brand-logo {
    min-width: 120px;
    max-width: 180px;
    height: 68px;
  }

  .topbar,
  .dashboard-head,
  .employee-view-head {
    grid-template-columns: 1fr;
    display: grid;
  }

  .stats-grid,
  .form-actions {
    grid-template-columns: 1fr;
  }

  .toolbar-row {
    flex-direction: column;
  }
}



.admin-view .table-wrap th,
.admin-view .table-wrap td {
  text-align: center;
}


.popup-card .table-wrap th,
.popup-card .table-wrap td {
  text-align: center;
}

.popup-card-sm {
  max-width: 480px;
}

.confirm-actions {
  justify-content: center;
}

.confirm-actions .btn {
  min-width: 140px;
}

