:root {
  --bg: #eef4fb;
  --surface: rgba(255, 255, 255, 0.48);
  --surface-strong: rgba(255, 255, 255, 0.68);
  --surface-dark: rgba(22, 24, 29, 0.68);
  --ink: #111318;
  --muted: #6b7280;
  --line: rgba(255, 255, 255, 0.5);
  --line-soft: rgba(17, 19, 24, 0.08);
  --accent: #0a84ff;
  --accent-soft: rgba(10, 132, 255, 0.14);
  --status-active: #008000;
  --status-idle: #ffd700;
  --status-offline: #ff0000;
  --shadow: 0 24px 60px rgba(15, 23, 42, 0.14);
  --shadow-soft: 0 14px 28px rgba(15, 23, 42, 0.09);
  --radius: 28px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: "Plus Jakarta Sans", sans-serif;
  color: var(--ink);
  background:
    radial-gradient(circle at top left, rgba(10, 132, 255, 0.16), transparent 24%),
    radial-gradient(circle at top right, rgba(255, 255, 255, 0.92), transparent 30%),
    radial-gradient(circle at bottom left, rgba(168, 201, 255, 0.36), transparent 28%),
    linear-gradient(180deg, #f8fbff 0%, #eef4fb 48%, #e8eef7 100%);
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background:
    linear-gradient(rgba(255, 255, 255, 0.18), rgba(255, 255, 255, 0.02)),
    radial-gradient(circle at 20% 20%, rgba(255, 255, 255, 0.44), transparent 18%);
}

.eyebrow {
  margin: 0 0 4px;
  color: var(--accent);
  text-transform: uppercase;
  letter-spacing: 0.14em;
  font-size: 0.72rem;
  font-weight: 700;
}

.ghost-button,
.primary-button,
.filter-chip {
  font: inherit;
  cursor: pointer;
  border: 0;
  border-radius: 999px;
  padding: 11px 18px;
  transition: transform 180ms ease, box-shadow 180ms ease, background 180ms ease;
}

.ghost-button,
.filter-chip {
  color: var(--ink);
  background: rgba(255, 255, 255, 0.42);
  border: 1px solid rgba(255, 255, 255, 0.56);
  backdrop-filter: blur(20px) saturate(180%);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.62), var(--shadow-soft);
}

.primary-button,
.filter-chip.active {
  color: white;
  background: linear-gradient(180deg, rgba(41, 151, 255, 0.98), rgba(10, 132, 255, 0.92));
  border: 1px solid rgba(255, 255, 255, 0.3);
  box-shadow: 0 14px 30px rgba(10, 132, 255, 0.25), inset 0 1px 0 rgba(255, 255, 255, 0.34);
}

.ghost-button:hover,
.primary-button:hover,
.filter-chip:hover {
  transform: translateY(-1px);
}

.dashboard {
  position: relative;
  z-index: 1;
  max-width: 1400px;
  margin: 0 auto;
  padding: 34px 24px 132px;
  width: 100%;
}

.topbar {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 18px;
  margin-bottom: 24px;
}

.topbar h1,
.panel-head h2 {
  margin: 0;
  font-family: "Space Grotesk", sans-serif;
  letter-spacing: -0.04em;
}

.topbar h1 {
  font-size: clamp(2rem, 3vw, 3rem);
}

.subcopy {
  margin: 10px 0 0;
  color: var(--muted);
  max-width: 72ch;
  line-height: 1.65;
}

.topbar-actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.summary-strip {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
}

.payroll-summary {
  margin-bottom: 0;
}

.summary-card,
.panel {
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.58), rgba(255, 255, 255, 0.36));
  border: 1px solid rgba(255, 255, 255, 0.54);
  box-shadow: var(--shadow);
  backdrop-filter: blur(24px) saturate(180%);
  -webkit-backdrop-filter: blur(24px) saturate(180%);
}

.summary-card {
  padding: 20px 22px;
  border-radius: 24px;
  display: grid;
  gap: 8px;
}

.summary-card span {
  color: var(--muted);
  font-size: 0.92rem;
}

.summary-card strong {
  font-size: 1.9rem;
  letter-spacing: -0.04em;
}

.panel {
  padding: 24px;
  border-radius: var(--radius);
  overflow: hidden;
}

.view-layout {
  display: grid;
  gap: 24px;
  align-content: start;
}

.aligned-panel {
  width: 100%;
}

.is-hidden {
  display: none;
}

.panel-head {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: center;
  margin-bottom: 18px;
  flex-wrap: wrap;
}

.filter-chip-group {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.table-wrap {
  overflow-x: auto;
  border-radius: 22px;
  -webkit-overflow-scrolling: touch;
}

table {
  width: 100%;
  border-collapse: collapse;
  min-width: 1180px;
}

th,
td {
  padding: 16px 14px;
  text-align: left;
  border-bottom: 1px solid var(--line-soft);
  vertical-align: middle;
}

th {
  color: var(--muted);
  font-size: 0.84rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-weight: 700;
}

tbody tr {
  transition: background 180ms ease;
}

tbody tr:hover {
  background: rgba(255, 255, 255, 0.28);
}

.employee-cell {
  display: grid;
  gap: 4px;
}

.employee-cell span {
  color: var(--muted);
  font-size: 0.9rem;
}

.time-cell {
  white-space: nowrap;
  min-width: 112px;
  font-variant-numeric: tabular-nums;
  font-feature-settings: "tnum";
}

.status-badge,
.score,
.access-badge {
  border: 1px solid rgba(255, 255, 255, 0.5);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.58);
}

.status-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  border-radius: 999px;
  font-weight: 700;
  font-size: 0.82rem;
  background: rgba(255, 255, 255, 0.52);
}

.status-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: currentColor;
  box-shadow: 0 0 0 0 currentColor;
  animation: pulse 1.4s infinite ease-out;
}

.status-badge.active {
  color: var(--status-active);
}

.status-badge.idle {
  color: #9a8400;
}

.status-badge.offline {
  color: var(--status-offline);
}

.score {
  display: inline-flex;
  min-width: 44px;
  justify-content: center;
  padding: 8px 12px;
  border-radius: 999px;
  font-weight: 800;
  background: rgba(255, 255, 255, 0.52);
}

.score.good {
  color: var(--status-active);
}

.score.mid {
  color: #9a8400;
}

.access-badge {
  display: inline-flex;
  padding: 8px 12px;
  border-radius: 999px;
  font-size: 0.82rem;
  font-weight: 700;
  background: rgba(255, 255, 255, 0.52);
}

.access-badge.enabled {
  color: var(--status-active);
}

.access-badge.disabled {
  color: var(--status-offline);
}

.salary-badge {
  display: inline-flex;
  padding: 8px 12px;
  border-radius: 999px;
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--accent);
  background: rgba(255, 255, 255, 0.52);
  border: 1px solid rgba(255, 255, 255, 0.5);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.58);
}

.report-badge {
  display: inline-flex;
  padding: 8px 12px;
  border-radius: 999px;
  font-size: 0.82rem;
  font-weight: 700;
  background: rgba(255, 255, 255, 0.52);
  border: 1px solid rgba(255, 255, 255, 0.5);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.58);
}

.report-badge.ready {
  color: var(--status-active);
}

.report-badge.review {
  color: #9a8400;
}

.report-badge.hold {
  color: var(--status-offline);
}

.action-group {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.table-action {
  font: inherit;
  cursor: pointer;
  border: 1px solid rgba(255, 255, 255, 0.5);
  background: rgba(255, 255, 255, 0.48);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.58);
  border-radius: 999px;
  padding: 8px 12px;
  font-size: 0.82rem;
  font-weight: 700;
  transition: transform 180ms ease, background 180ms ease, color 180ms ease;
}

.table-action:hover {
  transform: translateY(-1px);
}

.table-action.edit {
  color: var(--accent);
}

.table-action.delete {
  color: var(--status-offline);
}

.settings-form {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.payroll-form {
  margin-top: 4px;
}

.settings-form label {
  display: grid;
  gap: 8px;
}

.settings-form span {
  font-size: 0.9rem;
  font-weight: 600;
}

.settings-form input,
.settings-form select {
  width: 100%;
  border: 1px solid rgba(255, 255, 255, 0.56);
  border-radius: 16px;
  padding: 12px 14px;
  font: inherit;
  color: var(--ink);
  background: rgba(255, 255, 255, 0.46);
  backdrop-filter: blur(20px) saturate(180%);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.62);
}

.settings-form .full-width {
  grid-column: 1 / -1;
}

.settings-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  margin-top: 18px;
  flex-wrap: wrap;
}

.hint-card {
  padding: 14px 16px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.44);
  border: 1px solid rgba(255, 255, 255, 0.54);
  backdrop-filter: blur(18px) saturate(180%);
  -webkit-backdrop-filter: blur(18px) saturate(180%);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.6);
}

.hint-card strong,
.hint-card p {
  margin: 0;
}

.hint-card p {
  margin-top: 6px;
  color: var(--muted);
}

.bottom-nav {
  position: fixed;
  left: 50%;
  bottom: 18px;
  transform: translateX(-50%);
  z-index: 40;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  grid-auto-rows: 1fr;
  align-items: stretch;
  gap: 6px;
  width: min(920px, calc(100% - 28px));
  padding: 6px;
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.38);
  border: 1px solid rgba(255, 255, 255, 0.62);
  box-shadow: 0 18px 40px rgba(15, 23, 42, 0.14), inset 0 1px 0 rgba(255, 255, 255, 0.46);
  backdrop-filter: blur(26px) saturate(180%);
  -webkit-backdrop-filter: blur(26px) saturate(180%);
}

.bottom-nav-link {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-width: 0;
  gap: 8px;
  min-height: 54px;
  padding: 10px 8px;
  border-radius: 18px;
  text-decoration: none;
  color: #667085;
  font-size: 0.86rem;
  font-weight: 700;
  letter-spacing: -0.01em;
  transition: background 180ms ease, color 180ms ease, transform 180ms ease, box-shadow 180ms ease;
}

.bottom-nav-link:hover,
.bottom-nav-link.active {
  background: rgba(255, 255, 255, 0.72);
  color: var(--ink);
  box-shadow: 0 10px 22px rgba(15, 23, 42, 0.1), inset 0 1px 0 rgba(255, 255, 255, 0.72);
}

.bottom-nav-icon {
  width: 28px;
  height: 28px;
  flex: 0 0 28px;
  display: grid;
  place-items: center;
  border-radius: 9px;
  background: rgba(255, 255, 255, 0.42);
  border: 1px solid rgba(255, 255, 255, 0.5);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.58);
}

.bottom-nav-icon svg {
  width: 16px;
  height: 16px;
  stroke: currentColor;
  stroke-width: 1.9;
  fill: none;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.bottom-nav-link.active .bottom-nav-icon {
  background: rgba(10, 132, 255, 0.12);
  color: var(--accent);
}

.bottom-nav-text {
  white-space: nowrap;
}

@keyframes pulse {
  0% {
    box-shadow: 0 0 0 0 currentColor;
  }
  70% {
    box-shadow: 0 0 0 10px rgba(255, 255, 255, 0);
  }
  100% {
    box-shadow: 0 0 0 0 rgba(255, 255, 255, 0);
  }
}

@media (max-width: 1180px) {
  .summary-strip {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .topbar h1 {
    font-size: clamp(1.85rem, 4vw, 2.6rem);
  }

  .panel {
    padding: 22px;
  }

  table {
    min-width: 980px;
  }
}

@media (max-width: 760px) {
  .dashboard {
    padding: 14px 10px 86px;
  }

  .topbar,
  .panel-head,
  .topbar-actions,
  .settings-footer {
    flex-direction: column;
    align-items: stretch;
  }

  .topbar {
    gap: 10px;
    margin-bottom: 12px;
  }

  .topbar h1 {
    font-size: 1.5rem;
    line-height: 1.02;
  }

  .subcopy {
    max-width: none;
    margin-top: 6px;
    font-size: 0.88rem;
    line-height: 1.45;
  }

  .summary-strip {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
  }

  .summary-card {
    padding: 12px 14px;
    border-radius: 18px;
    gap: 4px;
  }

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

  .panel {
    padding: 14px;
    border-radius: 18px;
  }

  .panel-head {
    margin-bottom: 10px;
    gap: 10px;
  }

  .panel-head h2 {
    font-size: 1.1rem;
  }

  .filter-chip-group {
    width: 100%;
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 6px;
  }

  .filter-chip {
    width: 100%;
    min-width: 0;
    text-align: center;
    padding: 8px 6px;
    font-size: 0.76rem;
  }

  .ghost-button,
  .primary-button {
    padding: 9px 12px;
    font-size: 0.84rem;
  }

  .topbar-actions {
    gap: 8px;
  }

  .topbar-actions .ghost-button,
  .topbar-actions .primary-button {
    flex: 1 1 0;
  }

  .eyebrow {
    font-size: 0.64rem;
    letter-spacing: 0.12em;
  }

  table {
    min-width: 720px;
  }

  th,
  td {
    padding: 12px 10px;
    font-size: 0.84rem;
  }

  th {
    font-size: 0.72rem;
  }

  .employee-cell {
    gap: 2px;
  }

  .employee-cell span {
    font-size: 0.78rem;
  }

  .time-cell {
    min-width: 96px;
  }

  .status-badge,
  .score,
  .access-badge,
  .salary-badge,
  .report-badge,
  .table-action {
    padding: 6px 9px;
    font-size: 0.74rem;
  }

  .action-group {
    gap: 6px;
  }

  .bottom-nav {
    width: calc(100% - 16px);
    bottom: 6px;
    border-radius: 16px;
    gap: 3px;
    padding: 3px;
  }

  .bottom-nav-link {
    min-height: 42px;
    padding: 5px 1px;
    gap: 3px;
    font-size: 0.62rem;
    border-radius: 12px;
  }

  .bottom-nav-text {
    max-width: 100%;
    line-height: 1;
    text-align: center;
    white-space: nowrap;
    font-size: 0.62rem;
  }

  .bottom-nav-icon {
    width: 20px;
    height: 20px;
    flex-basis: 20px;
    border-radius: 7px;
  }

  .bottom-nav-icon svg {
    width: 11px;
    height: 11px;
  }

  .settings-form {
    grid-template-columns: 1fr;
    gap: 10px;
  }

  .settings-form .full-width {
    grid-column: auto;
  }

  .settings-form input,
  .settings-form select {
    min-height: 40px;
    padding: 10px 12px;
    border-radius: 12px;
  }

  .settings-form span {
    font-size: 0.82rem;
  }

  .settings-footer {
    gap: 10px;
    margin-top: 12px;
  }

  .hint-card {
    padding: 12px;
    border-radius: 14px;
  }

  .hint-card p {
    font-size: 0.82rem;
  }
}

@media (max-width: 520px) {
  .dashboard {
    padding: 12px 8px 82px;
  }

  .topbar h1 {
    font-size: 1.34rem;
  }

  .eyebrow {
    font-size: 0.6rem;
  }

  .summary-card {
    padding: 11px 12px;
  }

  .ghost-button,
  .primary-button,
  .filter-chip {
    padding: 8px 10px;
    font-size: 0.78rem;
  }

  .panel {
    padding: 12px;
    border-radius: 16px;
  }

  .panel-head h2 {
    font-size: 1rem;
  }

  .bottom-nav {
    width: calc(100% - 12px);
    gap: 2px;
    padding: 2px;
    border-radius: 14px;
  }

  .bottom-nav-link {
    min-height: 38px;
    padding: 4px 0;
    gap: 2px;
    border-radius: 10px;
    font-size: 0.56rem;
  }

  .bottom-nav-text {
    font-size: 0.56rem;
    letter-spacing: -0.02em;
  }

  .bottom-nav-icon {
    width: 18px;
    height: 18px;
    flex-basis: 18px;
    border-radius: 6px;
  }

  .bottom-nav-icon svg {
    width: 10px;
    height: 10px;
  }

  table {
    min-width: 680px;
  }
}

.modal-open {
  overflow: hidden;
}

.danger-button {
  font: inherit;
  cursor: pointer;
  border: 0;
  border-radius: 999px;
  padding: 11px 18px;
  color: white;
  background: linear-gradient(180deg, rgba(255, 95, 95, 0.98), rgba(237, 72, 72, 0.92));
  box-shadow: 0 14px 30px rgba(220, 38, 38, 0.22), inset 0 1px 0 rgba(255, 255, 255, 0.3);
}

.app-modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 120;
  display: grid;
  place-items: center;
  padding: 24px;
  background: rgba(9, 16, 31, 0.38);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  opacity: 0;
  pointer-events: none;
  transition: opacity 180ms ease;
}

.app-modal-overlay.is-visible {
  opacity: 1;
  pointer-events: auto;
}

.app-modal-shell {
  width: min(560px, 100%);
  padding: 24px;
  border-radius: 28px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.86), rgba(244, 248, 255, 0.78));
  border: 1px solid rgba(255, 255, 255, 0.72);
  box-shadow: 0 28px 80px rgba(15, 23, 42, 0.24);
  transform: translateY(12px) scale(0.98);
  transition: transform 180ms ease;
}

.app-modal-overlay.is-visible .app-modal-shell {
  transform: translateY(0) scale(1);
}

.app-modal-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}

.app-modal-header h3 {
  margin: 0;
  font-family: "Space Grotesk", sans-serif;
  font-size: 1.45rem;
  letter-spacing: -0.04em;
}

.app-modal-close {
  width: 42px;
  height: 42px;
  border: 0;
  border-radius: 14px;
  font: inherit;
  font-size: 1.6rem;
  line-height: 1;
  cursor: pointer;
  color: var(--muted);
  background: rgba(255, 255, 255, 0.56);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.68);
}

.app-modal-copy {
  margin: 10px 0 0;
  color: var(--muted);
  line-height: 1.6;
}

.app-modal-body {
  margin-top: 18px;
}

.app-modal-message {
  padding: 16px 18px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.54);
  border: 1px solid rgba(255, 255, 255, 0.7);
  color: var(--ink);
  line-height: 1.6;
}

.app-modal-form {
  display: grid;
  gap: 14px;
}

.app-modal-form label {
  display: grid;
  gap: 8px;
}

.app-modal-form span {
  font-size: 0.88rem;
  font-weight: 700;
}

.app-modal-form input {
  width: 100%;
  border: 1px solid rgba(255, 255, 255, 0.68);
  border-radius: 18px;
  padding: 13px 14px;
  font: inherit;
  color: var(--ink);
  background: rgba(255, 255, 255, 0.62);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.72);
}

.app-modal-form small {
  color: var(--muted);
  font-size: 0.78rem;
}

.app-checkbox-row {
  display: flex !important;
  align-items: center;
  gap: 10px;
  padding: 14px 16px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.48);
  border: 1px solid rgba(255, 255, 255, 0.66);
}

.app-checkbox-row input {
  width: 18px;
  height: 18px;
  margin: 0;
}

.app-checkbox-row span {
  font-size: 0.9rem;
  font-weight: 600;
}

.app-modal-error {
  margin: 0;
  padding: 12px 14px;
  border-radius: 16px;
  color: #b91c1c;
  background: rgba(254, 226, 226, 0.92);
  border: 1px solid rgba(248, 113, 113, 0.28);
}

.app-modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 12px;
  margin-top: 22px;
  flex-wrap: wrap;
}

.app-modal-actions.single {
  justify-content: flex-end;
}

@media (max-width: 760px) {
  .app-modal-overlay {
    padding: 14px;
  }

  .app-modal-shell {
    padding: 18px;
    border-radius: 22px;
  }

  .app-modal-header h3 {
    font-size: 1.2rem;
  }

  .app-modal-actions {
    flex-direction: column-reverse;
    align-items: stretch;
  }

  .app-modal-actions .ghost-button,
  .app-modal-actions .primary-button,
  .app-modal-actions .danger-button {
    width: 100%;
  }
}
