:root {
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  color: #1c2c40;
  background: #eef4f7;
  font-synthesis: none;
  text-rendering: optimizeLegibility;
  --navy: #142b45;
  --green: #16804f;
  --muted: #728198;
  --line: rgba(213, 225, 233, .82);
  --panel: rgba(255, 255, 255, .76);
  --glass-border: rgba(255, 255, 255, .76);
  --glass-shadow: 0 18px 46px rgba(28, 62, 83, .09), inset 0 1px rgba(255, 255, 255, .85);
}

* { box-sizing: border-box; }
body {
  min-width: 320px;
  min-height: 100vh;
  margin: 0;
  background:
    radial-gradient(ellipse at 88% 8%, rgba(104, 194, 178, .16), transparent 30rem),
    radial-gradient(ellipse at 12% 92%, rgba(129, 173, 218, .16), transparent 32rem),
    #eef4f7;
}
button, input, select { font: inherit; }
button { cursor: pointer; }

.signin-screen {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 24px;
  background:
    radial-gradient(ellipse at 18% 18%, rgba(86, 219, 178, .24), transparent 29rem),
    radial-gradient(ellipse at 83% 85%, rgba(102, 166, 229, .28), transparent 30rem),
    linear-gradient(145deg, #112c47 0%, #173d5a 48%, #10243d 100%);
  position: relative;
  isolation: isolate;
  overflow: hidden;
}
.signin-screen::before, .signin-screen::after {
  content: "";
  position: absolute;
  z-index: -1;
  width: 20rem;
  aspect-ratio: 1;
  border: 1px solid rgba(255, 255, 255, .13);
  border-radius: 42% 58% 63% 37% / 46% 39% 61% 54%;
  background: linear-gradient(145deg, rgba(255,255,255,.10), rgba(255,255,255,.015));
  box-shadow: inset 0 1px rgba(255,255,255,.18), 0 26px 80px rgba(2, 20, 39, .12);
  backdrop-filter: blur(4px);
}
.signin-screen::before { top: -10rem; right: -7rem; transform: rotate(24deg); }
.signin-screen::after { bottom: -14rem; left: -8rem; width: 27rem; transform: rotate(-17deg); }
.signin-card {
  width: min(100%, 430px);
  padding: 38px;
  position: relative;
  overflow: hidden;
  border: 1px solid var(--glass-border);
  border-radius: 23px;
  background: linear-gradient(145deg, rgba(255, 255, 255, .94), rgba(242, 250, 253, .79));
  box-shadow: 0 32px 90px rgba(4, 20, 38, .34), inset 0 1px rgba(255,255,255,.95);
  backdrop-filter: blur(24px) saturate(135%);
  -webkit-backdrop-filter: blur(24px) saturate(135%);
}
.signin-card::before {
  content: "";
  position: absolute;
  top: -110px;
  right: -60px;
  width: 230px;
  height: 190px;
  border-radius: 50%;
  background: rgba(119, 220, 190, .13);
  filter: blur(36px);
  pointer-events: none;
}
.brand-lockup { display: flex; align-items: center; gap: 12px; position: relative; }
.brand-lockup strong { display: block; font-size: 15px; letter-spacing: -.15px; }
.brand-lockup small { display: block; color: #8290a1; margin-top: 3px; font-size: 12px; }
.brand-mark {
  display: block;
  width: 46px;
  height: 46px;
  flex: 0 0 46px;
  border: 1px solid rgba(255,255,255,.68);
  border-radius: 15px;
  box-shadow: 0 8px 20px rgba(15, 45, 66, .2), inset 0 1px rgba(255,255,255,.3);
}
.eyebrow { margin: 0 0 8px; color: #8290a1; font-size: 10px; font-weight: 800; letter-spacing: 1.5px; }
.signin-card > .eyebrow { margin-top: 32px; color: var(--green); }
h1, h2, p { margin-top: 0; }
.signin-card h1 { margin-bottom: 7px; color: #172b43; font-size: 29px; letter-spacing: -.8px; }
.muted { color: var(--muted); font-size: 13px; }
.signin-card > label, .form-grid label { display: block; margin: 18px 0 7px; color: #52647a; font-size: 12px; font-weight: 650; }
.signin-card input, .form-grid input, .form-grid select, .search-input {
  width: 100%;
  height: 42px;
  padding: 0 12px;
  border: 1px solid rgba(207, 220, 228, .95);
  border-radius: 10px;
  outline: none;
  color: #1c2c40;
  background: rgba(255, 255, 255, .78);
  box-shadow: inset 0 1px 2px rgba(30, 59, 78, .035);
  transition: border-color .18s ease, box-shadow .18s ease, background .18s ease;
}
.signin-card input:focus, .form-grid input:focus, .form-grid select:focus, .search-input:focus {
  border-color: #56a783;
  background: #fff;
  box-shadow: 0 0 0 3px rgba(22, 128, 79, .10), 0 5px 16px rgba(28, 75, 58, .06);
}
.primary {
  padding: 11px 16px;
  border: 1px solid rgba(255,255,255,.18);
  border-radius: 10px;
  color: #fff;
  background: linear-gradient(135deg, #16804f, #197a67);
  box-shadow: 0 8px 18px rgba(22, 128, 79, .2), inset 0 1px rgba(255,255,255,.18);
  font-weight: 700;
  transition: transform .18s ease, box-shadow .18s ease, filter .18s ease;
}
.primary:hover { transform: translateY(-1px); filter: brightness(1.04); box-shadow: 0 11px 23px rgba(22, 128, 79, .25), inset 0 1px rgba(255,255,255,.2); }
.primary:active { transform: translateY(0); }
.full { width: 100%; margin-top: 23px; }
.signin-note { margin: 23px 0 0; color: #8b98a8; text-align: center; font-size: 12px; }
.form-message { margin: 12px 0 0; color: #a52b20; font-size: 13px; }

.layout { min-height: 100vh; display: grid; grid-template-columns: 248px minmax(0, 1fr); }
.sidebar {
  position: sticky;
  top: 0;
  height: 100vh;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  padding: 24px 16px 18px;
  border-right: 1px solid rgba(255,255,255,.12);
  color: #fff;
  background: linear-gradient(158deg, rgba(17, 46, 72, .97), rgba(18, 48, 73, .92) 56%, rgba(15, 39, 64, .96));
  box-shadow: 12px 0 35px rgba(24, 61, 81, .07);
}
.sidebar .brand-lockup { padding: 0 7px 29px; }
.sidebar .brand-lockup small { color: #a9b8c8; }
.nav-label { margin: 0; padding: 11px 9px; color: #8fa2b6; font-size: 10px; font-weight: 750; letter-spacing: 1.4px; }
.nav-list { display: grid; gap: 5px; }
.nav-link {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 11px 12px;
  border: 1px solid transparent;
  border-radius: 10px;
  color: #c5d1de;
  background: transparent;
  text-align: left;
  font-size: 14px;
  transition: background .18s ease, border-color .18s ease, color .18s ease;
}
.nav-link span { width: 18px; color: #a9bacb; font-size: 17px; }
.nav-link:hover, .nav-link.active { border-color: rgba(255,255,255,.1); color: #fff; background: linear-gradient(115deg, rgba(255,255,255,.12), rgba(255,255,255,.055)); box-shadow: inset 0 1px rgba(255,255,255,.08); }
.nav-link.active span { color: #81d9aa; }
.sidebar .sparkle-button { position: relative; isolation: isolate; overflow: hidden; }
.sidebar .sparkle-button::before, .sidebar .sparkle-button::after { content: ""; position: absolute; z-index: 0; pointer-events: none; }
.sidebar .sparkle-button::before {
  inset: 0;
  border-radius: inherit;
  background: radial-gradient(65% 150% at 100% 50%, rgba(149, 119, 255, .32), transparent 72%);
  opacity: 0;
  transition: opacity .24s ease;
}
.sidebar .sparkle-button::after {
  top: -35%;
  left: -65%;
  width: 36%;
  height: 170%;
  transform: skewX(-18deg);
  background: linear-gradient(90deg, transparent, rgba(255,255,255,.36), transparent);
  opacity: 0;
}
.sidebar .sparkle-button > span { position: relative; z-index: 1; transition: color .2s ease, filter .2s ease; }
.sidebar .sparkle-button.active::before { opacity: .62; }
.sidebar .sparkle-button.active { border-color: rgba(178, 159, 255, .22); background: linear-gradient(115deg, rgba(126, 108, 207, .16), rgba(255,255,255,.06)); }
.sidebar .sparkle-button.active span { color: #c2b5ff; filter: drop-shadow(0 0 7px rgba(180, 158, 255, .42)); }
.sidebar .sparkle-button:is(:hover, :focus-visible)::before { opacity: 1; }
.sidebar .sparkle-button:is(:hover, :focus-visible)::after { animation: sidebarSparkleSweep .78s ease-out; }
.sidebar .sparkle-button:focus-visible { outline: 2px solid rgba(193, 179, 255, .85); outline-offset: -3px; }
@keyframes sidebarSparkleSweep { from { left: -65%; opacity: 0; } 20% { opacity: 1; } to { left: 130%; opacity: 0; } }
.sidebar-foot { margin-top: auto; padding: 17px 8px 0; border-top: 1px solid rgba(255,255,255,.15); color: #bac6d2; font-size: 12px; }
.status-dot { display: inline-block; width: 8px; height: 8px; margin-right: 8px; border-radius: 50%; background: #62d899; box-shadow: 0 0 10px rgba(98,216,153,.55); }
.main-area {
  min-width: 0;
  background:
    radial-gradient(ellipse at 92% 4%, rgba(115, 205, 185, .11), transparent 26rem),
    radial-gradient(ellipse at 4% 60%, rgba(148, 185, 220, .10), transparent 28rem),
    linear-gradient(145deg, rgba(250,253,254,.35), rgba(233,242,246,.52));
}
.topbar {
  position: sticky;
  top: 0;
  z-index: 3;
  height: 72px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 32px;
  border-bottom: 1px solid rgba(213,225,233,.72);
  background: rgba(255,255,255,.72);
  box-shadow: 0 6px 24px rgba(41,74,91,.035);
  backdrop-filter: blur(18px) saturate(135%);
  -webkit-backdrop-filter: blur(18px) saturate(135%);
}
.topbar .eyebrow { margin-bottom: 3px; }
.topbar > div > span { font-size: 14px; font-weight: 700; }
.staff-menu { display: flex; align-items: center; gap: 10px; font-size: 13px; font-weight: 650; }
.avatar { width: 36px; height: 36px; display: grid; place-items: center; border: 1px solid rgba(255,255,255,.9); border-radius: 50%; color: var(--green); background: linear-gradient(145deg, rgba(230,249,239,.92), rgba(212,239,231,.74)); box-shadow: 0 5px 12px rgba(41, 101, 76, .08); font-weight: 800; }
.text-button { padding: 8px; border: 0; color: #64748b; background: transparent; font-size: 13px; }
.text-button:hover { color: #142b45; }
.page-content { width: min(100%, 1500px); margin: 0 auto; padding: 28px 32px 48px; }
.page-heading { display: flex; align-items: flex-end; justify-content: space-between; margin-bottom: 20px; }
.page-heading h1 { margin: 0 0 5px; color: #182d45; font-size: 25px; letter-spacing: -.45px; }
.page-heading .muted { margin: 0; }
.date-chip { padding: 9px 12px; border: 1px solid var(--glass-border); border-radius: 10px; color: #62738a; background: rgba(255,255,255,.62); box-shadow: inset 0 1px rgba(255,255,255,.9); backdrop-filter: blur(12px); font-size: 12px; }
.stats-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; margin-bottom: 18px; }
.stat-card, .panel {
  border: 1px solid var(--glass-border);
  border-radius: 16px;
  background: linear-gradient(145deg, rgba(255,255,255,.88), rgba(247,251,253,.7));
  box-shadow: var(--glass-shadow);
  backdrop-filter: blur(18px) saturate(125%);
  -webkit-backdrop-filter: blur(18px) saturate(125%);
}
.stat-card { position: relative; display: grid; grid-template-columns: 36px 1fr; align-items: center; column-gap: 11px; overflow: hidden; padding: 16px 18px; transition: transform .2s ease, box-shadow .2s ease; }
.stat-card::before { content: ""; position: absolute; top: 0; right: 18px; left: 18px; height: 1px; background: linear-gradient(90deg, transparent, rgba(255,255,255,.95), transparent); }
.stat-card::after { content: ""; position: absolute; z-index: 0; top: -42px; right: -30px; width: 100px; height: 100px; border-radius: 50%; background: rgba(104,194,178,.12); filter: blur(18px); pointer-events: none; }
.stat-card:nth-child(2)::after { background: rgba(112,159,225,.13); }
.stat-card:nth-child(3)::after { background: rgba(239,190,103,.15); }
.stat-card:nth-child(4)::after { background: rgba(224,135,124,.13); }
.stat-card > * { position: relative; z-index: 1; }
.stat-card:hover { transform: translateY(-2px); box-shadow: 0 22px 46px rgba(28,62,83,.12), inset 0 1px rgba(255,255,255,.95); }
.stat-card > span:nth-child(2) { font-size: 12px; }
.stat-card strong { grid-column: 2; margin-top: -4px; font-size: 27px; }
.stat-icon { width: 36px; height: 36px; display: grid; grid-row: span 2; place-items: center; border: 1px solid rgba(255,255,255,.78); border-radius: 11px; box-shadow: inset 0 1px rgba(255,255,255,.65); font-size: 17px; }
.green { color: #16804f; background: rgba(225,246,234,.84); }
.blue { color: #416eb7; background: rgba(229,239,255,.88); }
.amber { color: #bd7b12; background: rgba(255,244,223,.9); }
.red { color: #b93829; background: rgba(255,236,233,.88); }
.panel { padding: 19px; margin-bottom: 16px; }
.panel-heading { display: flex; align-items: center; justify-content: space-between; gap: 14px; margin-bottom: 14px; }
.panel-heading h2 { margin: 0 0 4px; color: #1c2c40; font-size: 16px; }
.panel-heading .muted { margin: 0; font-size: 12px; }
.subtle-button { padding: 9px 12px; border: 1px solid rgba(255,255,255,.8); border-radius: 9px; color: #41566d; background: rgba(236,243,246,.74); box-shadow: inset 0 1px rgba(255,255,255,.8); font-size: 12px; font-weight: 700; }
.subtle-button:hover { background: rgba(226,239,241,.9); }
.subtle-button span { margin-left: 6px; }
.count-pill { min-width: 23px; height: 22px; display: inline-grid; place-items: center; padding: 0 6px; border: 1px solid rgba(255,255,255,.8); border-radius: 99px; color: #52647a; background: rgba(237,242,246,.8); vertical-align: 2px; font-size: 11px; }
.form-grid { display: grid; grid-template-columns: repeat(3, minmax(130px, 1fr)); align-items: end; gap: 4px 12px; }
.form-grid label { margin: 7px 0; }
.form-grid input, .form-grid select { height: 40px; }
.form-action { padding-bottom: 1px; }
.search-input { width: min(260px, 45vw); height: 39px; }
.table-scroll { width: 100%; overflow: auto; }
table { width: 100%; border-collapse: collapse; white-space: nowrap; }
th { padding: 11px 12px; color: #78879a; background: rgba(242,247,249,.75); text-align: left; font-size: 10px; letter-spacing: .55px; }
td { padding: 12px; border-top: 1px solid rgba(213,225,233,.7); font-size: 13px; }
tbody tr:hover td { background: rgba(249,252,253,.75); }
.empty-cell { padding: 25px; color: #8b98a8; text-align: center; }
.badge { padding: 5px 9px; border-radius: 99px; color: #187143; background: rgba(231,246,237,.88); font-size: 10px; font-weight: 800; }
.badge.late { color: #b93829; background: rgba(255,240,237,.9); }
.notice { position: fixed; z-index: 4; top: 84px; left: 50%; max-width: calc(100vw - 30px); padding: 12px 16px; transform: translateX(-50%); border: 1px solid rgba(255,255,255,.8); border-radius: 11px; color: #176b43; background: rgba(234,247,239,.9); box-shadow: 0 12px 32px rgba(20,43,69,.13), inset 0 1px rgba(255,255,255,.9); backdrop-filter: blur(16px); font-size: 13px; }
.notice.error { color: #a8281c; background: rgba(255,241,239,.94); }
.view { display: none; }
.view.active { display: block; }
[hidden] { display: none !important; }

@supports not ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
  .signin-card { background: #f8fbfc; }
  .topbar, .stat-card, .panel, .date-chip { background: #fff; }
}

@media (max-width: 1050px) {
  .stats-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .form-grid { grid-template-columns: repeat(2, minmax(140px, 1fr)); }
}
@media (max-width: 760px) {
  .layout { grid-template-columns: minmax(0, 1fr); overflow-x: clip; }
  .sidebar { position: relative; top: auto; width: 100%; max-width: 100%; height: auto; min-width: 0; min-height: 0; padding: 14px 14px 10px; }
  .sidebar .brand-lockup { padding: 0 5px 12px; }
  .sidebar .brand-mark { width: 40px; height: 40px; flex-basis: 40px; border-radius: 13px; }
  .nav-label, .sidebar-foot { display: none; }
  .nav-list { width: 100%; min-width: 0; max-width: 100%; display: flex; gap: 5px; overflow-x: auto; padding: 2px 0 5px; overscroll-behavior-inline: contain; scrollbar-width: thin; }
  .nav-link { width: auto; flex: 0 0 auto; padding: 9px 11px; white-space: nowrap; font-size: 12px; }
  .nav-link span { font-size: 14px; }
  .main-area { width: 100%; max-width: 100%; min-width: 0; }
  .topbar { height: 62px; padding: 0 17px; }
  .page-content { width: 100%; max-width: 100%; min-width: 0; padding: 22px 16px 34px; }
  .page-heading { align-items: flex-start; gap: 12px; }
  .page-heading h1 { font-size: 22px; }
  .date-chip { white-space: nowrap; font-size: 11px; }
  .panel { padding: 15px; }
  .panel-heading { align-items: flex-start; }
  .panel-heading > .search-input { align-self: center; }
  .staff-menu { gap: 7px; }
  .staff-menu > span:nth-child(2) { display: none; }
}
@media (max-width: 480px) {
  .signin-card { padding: 27px 23px; }
  .stats-grid { gap: 9px; }
  .stat-card { grid-template-columns: 30px 1fr; column-gap: 8px; padding: 13px 12px; }
  .stat-icon { width: 30px; height: 30px; }
  .stat-card > span:nth-child(2) { font-size: 11px; }
  .stat-card strong { font-size: 24px; }
  .form-grid { grid-template-columns: 1fr; gap: 4px; }
  .form-grid .form-action { padding-top: 8px; }
  .panel-heading { flex-direction: column; align-items: stretch; }
  .panel-heading > .search-input { width: 100%; }
  .page-heading { flex-direction: column; }
  .date-chip { align-self: flex-start; }
  .subtle-button { align-self: flex-start; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition-duration: .01ms !important; animation-duration: .01ms !important; }
}
