 :root {
  color-scheme: light;
  --ink: #172438;
  --muted: #64748b;
  --line: #dbe3ed;
  --surface: #ffffff;
  --page: #f3f6fa;
  --primary: #1769aa;
  --primary-dark: #0e4f86;
  --danger: #b42318;
  --radius: 18px;
}
* { box-sizing: border-box; }
body {
  margin: 0;
  background: var(--page);
  color: var(--ink);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 16px;
  line-height: 1.5;
}
[hidden] { display: none !important; }
.home-page { overflow: hidden; }
.splash {
  position: fixed;
  inset: 0;
  z-index: 10;
  display: grid;
  place-items: center;
  overflow: hidden;
  background: #132238;
  color: white;
  opacity: 1;
  visibility: visible;
  transition: opacity .45s ease, visibility .45s ease;
}
.splash-hidden { opacity: 0; visibility: hidden; pointer-events: none; }
.splash-image { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.splash-shade { position: absolute; inset: 0; background: linear-gradient(135deg, rgba(9, 23, 42, .88), rgba(14, 57, 89, .72)); }
.splash-content { position: relative; z-index: 1; width: min(90%, 560px); padding: 28px 20px; text-align: center; animation: rise-in .65s ease both; }
.splash-mark { display: grid; place-items: center; width: 76px; height: 76px; margin: 0 auto 22px; border: 1px solid rgba(255,255,255,.65); border-radius: 22px; background: rgba(255,255,255,.12); font-size: 24px; font-weight: 800; letter-spacing: -.06em; }
.splash h1 { margin: 4px 0 12px; color: white; font-size: clamp(2rem, 6vw, 3.3rem); line-height: 1.08; letter-spacing: -.045em; }
.eyebrow { margin: 0 0 8px; color: #3282bc; font-size: .76rem; font-weight: 800; letter-spacing: .16em; }
.splash .eyebrow { color: #a8d9ff; }
.splash-subtitle { margin: 0; color: #e0eaf4; font-size: 1.05rem; }
.loading-track { width: min(220px, 70%); height: 3px; margin: 30px auto 20px; overflow: hidden; border-radius: 99px; background: rgba(255,255,255,.22); }
.loading-track span { display: block; width: 40%; height: 100%; border-radius: inherit; background: #9bd4ff; animation: loading 2.4s ease-in-out infinite; }
.page-shell { width: min(100% - 32px, 960px); margin: 0 auto; padding: 36px 0 48px; }
.page-header { margin: 0 auto 24px; text-align: center; }
.page-header h1 { margin: 0 0 8px; font-size: clamp(1.8rem, 5vw, 2.6rem); line-height: 1.15; letter-spacing: -.04em; }
.page-header p:last-child { margin: 0; color: var(--muted); }
.panel { padding: clamp(18px, 4vw, 32px); border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); box-shadow: 0 12px 36px rgba(22, 43, 70, .06); }
.panel h2 { margin: 0 0 22px; font-size: 1.25rem; }
form { display: grid; gap: 9px; max-width: 620px; margin: 0 auto; }
label { margin-top: 7px; font-size: .92rem; font-weight: 700; }
input { width: 100%; min-height: 46px; padding: 11px 13px; border: 1px solid #cbd5e1; border-radius: 10px; background: white; color: var(--ink); font: inherit; }
input:focus { outline: 3px solid rgba(23,105,170,.16); border-color: var(--primary); }
input[aria-invalid="true"] { border-color: var(--danger); }
.field-help, .storage-note { color: var(--muted); font-size: .88rem; }
.field-help { margin: 0 0 8px; }
.storage-note { margin: 16px 4px 0; text-align: center; }
.form-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 10px; }
.button { min-height: 44px; padding: 10px 16px; border: 0; border-radius: 10px; background: var(--primary); color: white; font: inherit; font-weight: 700; cursor: pointer; transition: background .15s ease, transform .15s ease; }
.button:hover { background: var(--primary-dark); }
.button:active { transform: translateY(1px); }
.button-secondary { background: #e8eef5; color: #24364b; }
.button-secondary:hover { background: #d7e2ee; }
.button-danger { background: #fff0ef; color: var(--danger); }
.button-danger:hover { background: #ffe0dd; }
.button-ghost { border: 1px solid rgba(255,255,255,.5); background: rgba(255,255,255,.08); color: white; }
.button-ghost:hover { background: rgba(255,255,255,.18); }
.form-message { min-height: 1.5em; margin: 8px 0 0; color: var(--primary-dark); font-size: .9rem; }
.table-toolbar { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 12px; margin-bottom: 10px; }
.table-toolbar h2 { margin: 0; }
.table-wrap { width: 100%; overflow-x: auto; border: 1px solid var(--line); border-radius: 12px; }
#employee-table { width: 100%; min-width: 650px; border-collapse: collapse; background: white; font-size: .94rem; }
#employee-table th, #employee-table td { padding: 13px 14px; border-bottom: 1px solid var(--line); text-align: left; white-space: nowrap; }
#employee-table th { background: #f1f5f9; color: #334155; font-size: .82rem; letter-spacing: .02em; }
#employee-table tbody tr:hover { background: #f8fbff; }
#employee-table tfoot { font-weight: 800; background: #eaf3fb; }
#employee-table tfoot td { border-bottom: 0; }
#employee-table .empty-state { padding: 32px 16px; color: var(--muted); text-align: center; white-space: normal; }
@keyframes loading { from { transform: translateX(-110%); } to { transform: translateX(280%); } }
@keyframes rise-in { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: translateY(0); } }
@media (max-width: 600px) {
  .page-shell { width: min(100% - 22px, 960px); padding-top: 24px; }
  .panel { border-radius: 14px; }
  .form-actions { flex-direction: column; }
  .form-actions .button { width: 100%; }
  .table-toolbar { align-items: stretch; }
  .table-toolbar .form-actions { width: 100%; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; scroll-behavior: auto !important; transition-duration: .01ms !important; }
}
