:root {
  --bg: #05070d;
  --panel: rgba(13, 20, 36, 0.78);
  --border: rgba(148, 163, 184, 0.14);
  --cyan: #22d3ee;
  --violet: #a78bfa;
  --green: #34d399;
  --amber: #fbbf24;
  --orange: #fb923c;
  --red: #f87171;
  --sky: #38bdf8;
  --text: #e2e8f0;
  --muted: #94a3b8;
  --font-sans: "PingFang SC", "HarmonyOS Sans SC", "Microsoft YaHei", -apple-system, BlinkMacSystemFont, sans-serif;
  --font-mono: ui-monospace, "SF Mono", "JetBrains Mono", Menlo, Consolas, monospace;
}

* { box-sizing: border-box; }
[v-cloak] { display: none; }

html, body {
  margin: 0;
  padding: 0;
  min-height: 100%;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-sans);
  font-size: 14px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

.mono { font-family: var(--font-mono); font-variant-numeric: tabular-nums; }
.muted { color: var(--muted); }
.text-xs { font-size: 12px; }
.text-sm { font-size: 13px; }
.nowrap { white-space: nowrap; }
.mt-2 { margin-top: 2px; }
.mt-4 { margin-top: 4px; }
.mt-6 { margin-top: 6px; }
.mt-8 { margin-top: 8px; }
.mt-10 { margin-top: 10px; }
.mt-12 { margin-top: 12px; }
.mt-16 { margin-top: 16px; }
.mb-8 { margin-bottom: 8px; }
.mb-12 { margin-bottom: 12px; }
.ml-4 { margin-left: 4px; }
.ml-6 { margin-left: 6px; }
.ml-8 { margin-left: 8px; }
.mr-6 { margin-right: 6px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0, 0, 0, 0); }

:focus-visible { outline: 2px solid var(--cyan); outline-offset: 2px; }

/* ==================== Subdued Atmospheric Background ==================== */
.bg-backdrop {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  overflow: hidden;
  background: var(--bg);
}
.bg-glow-cyan {
  position: absolute;
  top: -20%;
  left: -12%;
  width: 58vw;
  height: 58vw;
  background: radial-gradient(circle, rgba(34, 211, 238, 0.06) 0%, rgba(34, 211, 238, 0) 68%);
}
.bg-grid {
  position: absolute;
  inset: 0;
  background-image:
    repeating-linear-gradient(0deg, rgba(148, 163, 184, 0.03) 0 1px, transparent 1px 44px),
    repeating-linear-gradient(90deg, rgba(148, 163, 184, 0.03) 0 1px, transparent 1px 44px);
  mask-image: radial-gradient(ellipse 85% 85% at 50% 45%, #000 35%, transparent 100%);
  -webkit-mask-image: radial-gradient(ellipse 85% 85% at 50% 45%, #000 35%, transparent 100%);
}

/* ==================== Panel & Controls ==================== */
.panel {
  border-radius: 14px;
  background: var(--panel);
  border: 1px solid var(--border);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
}

input, select, textarea {
  width: 100%;
  background: rgba(8, 12, 24, 0.9);
  border: 1px solid rgba(148, 163, 184, 0.22);
  border-radius: 9px;
  color: var(--text);
  padding: 8px 12px;
  font-family: inherit;
  font-size: 13px;
}

.input-compact, .select-compact { padding: 6px 10px; width: auto; min-width: 118px; }

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 8px 16px;
  border-radius: 9px;
  border: 1px solid transparent;
  font-family: inherit;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  text-decoration: none;
  white-space: nowrap;
  transition: background-color 0.15s ease, border-color 0.15s ease, opacity 0.15s ease;
}
.btn:disabled { opacity: 0.45; cursor: not-allowed; }
.btn-block { width: 100%; }

.btn-primary { background: #0891b2; color: #f8fafc; border-color: rgba(34, 211, 238, 0.4); }
.btn-primary:hover:not(:disabled) { background: #06b6d4; }
.btn-outline-cyan { background: rgba(34, 211, 238, 0.1); border-color: rgba(34, 211, 238, 0.35); color: #67e8f9; }
.btn-outline-cyan:hover { background: rgba(34, 211, 238, 0.18); }
.btn-outline-muted { background: rgba(148, 163, 184, 0.08); border-color: rgba(148, 163, 184, 0.25); color: var(--text); }
.btn-outline-muted:hover { background: rgba(148, 163, 184, 0.14); }

.btn-ghost-sm {
  background: transparent;
  border: 1px solid rgba(148, 163, 184, 0.2);
  color: var(--muted);
  border-radius: 7px;
  padding: 3px 9px;
  font-size: 12px;
  cursor: pointer;
}
.btn-ghost-sm:hover { color: var(--text); border-color: rgba(34, 211, 238, 0.45); }

.btn-icon {
  background: rgba(148, 163, 184, 0.1);
  border: 1px solid rgba(148, 163, 184, 0.22);
  color: var(--text);
  width: 30px;
  height: 30px;
  border-radius: 8px;
  cursor: pointer;
}

.text-link {
  background: none;
  border: none;
  color: var(--cyan);
  font-size: 13px;
  cursor: pointer;
  padding: 0;
  text-decoration: underline;
  text-underline-offset: 3px;
}
.text-link-active { font-weight: 700; color: #a5f3fc; }

.chip-btn {
  background: rgba(15, 23, 42, 0.72);
  border: 1px solid rgba(148, 163, 184, 0.24);
  color: var(--muted);
  padding: 5px 11px;
  border-radius: 999px;
  font-size: 12px;
  cursor: pointer;
}
.chip-btn.active, .chip-btn:hover {
  border-color: var(--cyan);
  color: #a5f3fc;
  background: rgba(34, 211, 238, 0.14);
}

/* ==================== Toasts ==================== */
.toast-stack { position: fixed; top: 14px; left: 50%; transform: translateX(-50%); z-index: 2000; display: flex; flex-direction: column; align-items: center; gap: 8px; pointer-events: none; }
.toast {
  pointer-events: auto;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 15px;
  border-radius: 10px;
  background: rgba(13, 20, 36, 0.96);
  border: 1px solid rgba(34, 211, 238, 0.4);
  font-size: 13px;
}
.toast-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--cyan); }
.toast-success .toast-dot { background: var(--green); }
.toast-error { border-color: rgba(248, 113, 113, 0.5); }
.toast-error .toast-dot { background: var(--red); }

/* ==================== Boot & Login ==================== */
.boot-screen, .login-shell {
  position: relative;
  z-index: 1;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
}
.boot-card { padding: 26px 34px; text-align: center; }

.login-card { width: 100%; max-width: 410px; padding: 32px 30px 28px; }
.login-title { margin: 0 0 6px; font-size: 22px; font-weight: 700; color: #f8fafc; }
.login-sub { margin: 0 0 22px; color: var(--muted); font-size: 13px; }
.login-form { display: flex; flex-direction: column; gap: 14px; }
.field label { display: block; font-size: 12px; color: var(--muted); margin-bottom: 5px; }
.login-hints {
  margin-top: 18px;
  padding-top: 14px;
  border-top: 1px solid var(--border);
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

/* ==================== App Shell (Top-Down, No Sidebar) ==================== */
.app-shell { position: relative; z-index: 1; display: flex; flex-direction: column; min-height: 100vh; }

.brand-logo { font-size: 19px; font-weight: 700; color: var(--cyan); letter-spacing: 0.02em; }

.topbar {
  min-height: 60px;
  padding: 10px 28px;
  border-bottom: 1px solid var(--border);
  background: rgba(7, 11, 22, 0.78);
  backdrop-filter: blur(12px);
  position: sticky;
  top: 0;
  z-index: 20;
}
.topbar-inner {
  width: 100%;
  max-width: 1240px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px 16px;
}
.topbar-left, .topbar-right { display: flex; align-items: center; gap: 12px; flex-wrap: nowrap; }
.topbar-brand { text-decoration: none; display: inline-flex; align-items: center; }
.topbar-tagline { padding-left: 10px; border-left: 1px solid var(--border); white-space: nowrap; }
.back-home-btn {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 10px;
  border-radius: 8px;
  border: 1px solid rgba(148, 163, 184, 0.24);
  background: rgba(15, 23, 42, 0.72);
  color: var(--text);
  text-decoration: none;
  font-size: 12px;
  font-weight: 500;
  white-space: nowrap;
  transition: border-color 0.15s ease, color 0.15s ease;
}
.back-home-btn:hover { border-color: var(--cyan); color: #a5f3fc; }
.page-title { margin: 0; font-size: 16px; font-weight: 700; white-space: nowrap; }
.month-switcher { display: flex; align-items: center; gap: 8px; white-space: nowrap; flex-shrink: 0; }

.service-pill {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 5px 12px;
  border-radius: 999px;
  font-size: 12px;
  border: 1px solid var(--border);
  background: rgba(15, 23, 42, 0.72);
  white-space: nowrap;
  flex-shrink: 0;
}
.status-dot { width: 8px; height: 8px; border-radius: 50%; }
.service-online .status-dot { background: var(--green); }
.service-offline .status-dot { background: var(--amber); }

.user-pill {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 4px 10px;
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.72);
  border: 1px solid var(--border);
  white-space: nowrap;
  flex-shrink: 0;
}
.role-dot { width: 7px; height: 7px; border-radius: 50%; }
.role-admin { background: var(--cyan); }
.role-clerk { background: var(--green); }

.page-body { width: 100%; max-width: 1240px; margin: 0 auto; padding: 22px 28px 28px; flex: 1; }
.view-stack { display: flex; flex-direction: column; gap: 20px; }
.panel-card { padding: 18px 20px; }
.card-header { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 12px; }
.card-title { margin: 0; font-size: 15px; font-weight: 700; }

/* ==================== Home / Overview ==================== */
.kpi-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
}
.kpi-card {
  position: relative;
  padding: 17px 19px;
  min-height: 120px;
  overflow: hidden;
}
.kpi-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.kpi-arrow { font-size: 11px; color: var(--muted); transition: color 0.15s ease, transform 0.15s ease; }
.kpi-clickable { cursor: pointer; transition: border-color 0.16s ease, background 0.16s ease; }
.kpi-clickable:hover { background: rgba(17, 26, 46, 0.9); border-color: rgba(148, 163, 184, 0.3); }
.kpi-clickable:hover .kpi-arrow { color: #f8fafc; transform: translateX(2px); }

.kpi-accent-sky {
  border-top: 2px solid rgba(56, 189, 248, 0.55);
  background: radial-gradient(ellipse 75% 65% at 18% 0%, rgba(56, 189, 248, 0.11), transparent 70%), var(--panel);
}
.kpi-accent-cyan {
  border-top: 2px solid rgba(34, 211, 238, 0.55);
  background: radial-gradient(ellipse 75% 65% at 18% 0%, rgba(34, 211, 238, 0.11), transparent 70%), var(--panel);
}
.kpi-accent-amber {
  border-top: 2px solid rgba(251, 191, 36, 0.55);
  background: radial-gradient(ellipse 75% 65% at 18% 0%, rgba(251, 191, 36, 0.11), transparent 70%), var(--panel);
}
.kpi-accent-green {
  border-top: 2px solid rgba(52, 211, 153, 0.55);
  background: radial-gradient(ellipse 75% 65% at 18% 0%, rgba(52, 211, 153, 0.11), transparent 70%), var(--panel);
}
.kpi-accent-violet {
  border-top: 2px solid rgba(167, 139, 250, 0.55);
  background: radial-gradient(ellipse 75% 65% at 18% 0%, rgba(167, 139, 250, 0.11), transparent 70%), var(--panel);
}
.kpi-gauge-card { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.kpi-label { font-size: 12px; color: var(--muted); font-weight: 500; }
.kpi-value { font-size: 32px; font-weight: 800; line-height: 1.15; margin: 6px 0 8px; letter-spacing: -0.02em; }
.kpi-num {
  display: inline-block;
  font-size: 33px;
  font-weight: 800;
  line-height: 1.12;
  letter-spacing: -0.02em;
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
}
.kpi-num-sky {
  background-image: linear-gradient(180deg, #f0f9ff 0%, #38bdf8 52%, #0284c7 100%);
  filter: drop-shadow(0 2px 1px rgba(2, 6, 23, 0.92)) drop-shadow(0 0 8px rgba(56, 189, 248, 0.56)) drop-shadow(0 5px 18px rgba(56, 189, 248, 0.28));
}
.kpi-num-cyan {
  background-image: linear-gradient(180deg, #ecfeff 0%, #22d3ee 52%, #0891b2 100%);
  filter: drop-shadow(0 2px 1px rgba(2, 6, 23, 0.92)) drop-shadow(0 0 8px rgba(34, 211, 238, 0.58)) drop-shadow(0 5px 18px rgba(34, 211, 238, 0.3));
}
.kpi-num-amber {
  background-image: linear-gradient(180deg, #fef9c3 0%, #fbbf24 52%, #d97706 100%);
  filter: drop-shadow(0 2px 1px rgba(2, 6, 23, 0.92)) drop-shadow(0 0 8px rgba(251, 191, 36, 0.56)) drop-shadow(0 5px 18px rgba(251, 191, 36, 0.28));
}
.kpi-num-green {
  background-image: linear-gradient(180deg, #d1fae5 0%, #34d399 52%, #059669 100%);
  filter: drop-shadow(0 2px 1px rgba(2, 6, 23, 0.92)) drop-shadow(0 0 8px rgba(52, 211, 153, 0.56)) drop-shadow(0 5px 18px rgba(52, 211, 153, 0.28));
}
.kpi-num-violet {
  background-image: linear-gradient(180deg, #f3e8ff 0%, #a78bfa 52%, #7c3aed 100%);
  filter: drop-shadow(0 2px 1px rgba(2, 6, 23, 0.92)) drop-shadow(0 0 8px rgba(167, 139, 250, 0.58)) drop-shadow(0 5px 18px rgba(167, 139, 250, 0.3));
}
.kpi-unit { font-size: 13px; font-weight: 400; color: var(--muted); margin-left: 2px; }
.kpi-sub-pills { display: flex; flex-wrap: wrap; gap: 5px; }
.stp-ring { width: 70px; height: 70px; flex-shrink: 0; filter: drop-shadow(0 0 6px rgba(34, 211, 238, 0.42)); }

/* ==================== Centered Circular Quick-Action Stage ==================== */
.orb-stage { padding: 34px 32px 42px; }
.orb-stage-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 34px;
  flex-wrap: wrap;
}
.orb-stage-head > div { display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; }
.orb-track {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 68px;
  padding: 14px 0 12px;
}
.orb-card {
  width: 236px;
  height: 236px;
  border-radius: 50%;
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 22px;
  text-align: center;
  text-decoration: none;
  color: inherit;
  font-family: inherit;
  cursor: pointer;
  border: 1.5px solid rgba(148, 163, 184, 0.24);
  box-shadow: inset 0 0 0 7px rgba(255, 255, 255, 0.018);
  transition: border-color 0.18s ease, box-shadow 0.18s ease, transform 0.18s ease;
}
.orb-card:hover { transform: translateY(-2px); }
.orb-cyan {
  border-color: rgba(34, 211, 238, 0.44);
  background: radial-gradient(circle at 50% 24%, rgba(34, 211, 238, 0.16), rgba(9, 14, 29, 0.94) 72%);
}
.orb-cyan:hover, .orb-cyan.orb-dragover {
  border-color: rgba(34, 211, 238, 0.85);
  box-shadow: inset 0 0 0 7px rgba(34, 211, 238, 0.05), 0 0 0 7px rgba(34, 211, 238, 0.08);
}
.orb-cyan .orb-icon { color: var(--cyan); }
.orb-emerald {
  border-color: rgba(52, 211, 153, 0.44);
  background: radial-gradient(circle at 50% 24%, rgba(52, 211, 153, 0.15), rgba(9, 14, 29, 0.94) 72%);
}
.orb-emerald:hover {
  border-color: rgba(52, 211, 153, 0.85);
  box-shadow: inset 0 0 0 7px rgba(52, 211, 153, 0.05), 0 0 0 7px rgba(52, 211, 153, 0.08);
}
.orb-emerald .orb-icon { color: var(--green); }
.orb-indigo {
  border-color: rgba(167, 139, 250, 0.44);
  background: radial-gradient(circle at 50% 24%, rgba(167, 139, 250, 0.16), rgba(9, 14, 29, 0.94) 72%);
}
.orb-indigo:hover {
  border-color: rgba(167, 139, 250, 0.85);
  box-shadow: inset 0 0 0 7px rgba(167, 139, 250, 0.05), 0 0 0 7px rgba(167, 139, 250, 0.08);
}
.orb-indigo .orb-icon { color: var(--violet); }
.orb-icon { width: 34px; height: 34px; }
.orb-title { font-size: 17px; font-weight: 700; color: #f8fafc; line-height: 1.25; }
.orb-sub { font-size: 12px; color: var(--muted); line-height: 1.3; }

.home-footnote {
  text-align: center;
  font-size: 12px;
  color: var(--muted);
  opacity: 0.72;
  padding-top: 8px;
}

/* ==================== Export Modal ==================== */
.export-list { display: flex; flex-direction: column; gap: 10px; }
.export-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 13px 15px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: rgba(8, 13, 27, 0.72);
  color: var(--text);
  text-decoration: none;
  transition: border-color 0.15s ease, background 0.15s ease;
}
.export-item:hover { border-color: rgba(34, 211, 238, 0.5); background: rgba(15, 25, 48, 0.88); }
.export-item-title { font-size: 14px; font-weight: 600; color: #f8fafc; }

.notice-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 16px;
  border-radius: 10px;
  background: rgba(251, 191, 36, 0.1);
  border: 1px solid rgba(251, 191, 36, 0.32);
  color: #fde68a;
  font-size: 13px;
}

.mini-pill {
  display: inline-flex;
  align-items: center;
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 600;
  border: 1px solid rgba(148, 163, 184, 0.24);
  background: rgba(15, 23, 42, 0.72);
  color: var(--text);
}
.mini-pill.clickable { cursor: pointer; font-family: inherit; transition: border-color 0.15s ease, filter 0.15s ease; }
.mini-pill.clickable:hover { filter: brightness(1.15); }
.pill-green { background: rgba(52, 211, 153, 0.14); border-color: rgba(52, 211, 153, 0.35); color: #6ee7b7; }
.pill-cyan { background: rgba(34, 211, 238, 0.14); border-color: rgba(34, 211, 238, 0.35); color: #67e8f9; }
.pill-violet { background: rgba(167, 139, 250, 0.14); border-color: rgba(167, 139, 250, 0.35); color: #ddd6fe; }
.pill-amber { background: rgba(251, 191, 36, 0.14); border-color: rgba(251, 191, 36, 0.38); color: #fde68a; }
.pill-orange { background: rgba(251, 146, 60, 0.14); border-color: rgba(251, 146, 60, 0.38); color: #fdba74; }
.pill-red { background: rgba(248, 113, 113, 0.16); border-color: rgba(248, 113, 113, 0.42); color: #fca5a5; }
.pill-muted { color: var(--muted); }

/* ==================== Upload & Validator ==================== */
.month-input-wrap { display: flex; align-items: center; gap: 8px; }
.dropzone {
  border: 1.5px dashed rgba(148, 163, 184, 0.3);
  border-radius: 12px;
  padding: 24px 18px;
  text-align: center;
  background: rgba(8, 13, 27, 0.55);
  cursor: pointer;
}
.dropzone:hover, .dropzone-active { border-color: var(--cyan); background: rgba(34, 211, 238, 0.06); }
.dropzone-icon { width: 38px; height: 38px; color: var(--cyan); margin-bottom: 6px; }
.dropzone-title { font-weight: 600; margin-bottom: 4px; }

.val-banner { display: flex; justify-content: space-between; align-items: center; padding: 10px 14px; border-radius: 10px; border: 1px solid; }
.val-green { background: rgba(52, 211, 153, 0.12); border-color: rgba(52, 211, 153, 0.4); color: #6ee7b7; }
.val-yellow { background: rgba(251, 191, 36, 0.12); border-color: rgba(251, 191, 36, 0.42); color: #fde68a; }
.val-red { background: rgba(248, 113, 113, 0.14); border-color: rgba(248, 113, 113, 0.45); color: #fca5a5; }

.checklist-grid { display: flex; flex-wrap: wrap; gap: 7px; }
.check-chip { display: inline-flex; align-items: center; gap: 5px; padding: 4px 10px; border-radius: 999px; font-size: 12px; border: 1px solid; }
.check-ok { background: rgba(52, 211, 153, 0.1); border-color: rgba(52, 211, 153, 0.35); color: #6ee7b7; }
.check-warn { background: rgba(251, 191, 36, 0.1); border-color: rgba(251, 191, 36, 0.35); color: #fde68a; }
.check-red { background: rgba(248, 113, 113, 0.12); border-color: rgba(248, 113, 113, 0.4); color: #fca5a5; }
.check-opt { background: rgba(148, 163, 184, 0.08); border-color: rgba(148, 163, 184, 0.22); color: var(--muted); }

.file-cards { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.file-card { padding: 9px 11px; border-radius: 10px; background: rgba(8, 13, 27, 0.72); border: 1px solid var(--border); }
.file-red { border-color: rgba(248, 113, 113, 0.45); }
.file-yellow { border-color: rgba(251, 191, 36, 0.4); }
.file-card-top { display: flex; justify-content: space-between; align-items: center; gap: 6px; }
.file-name { font-size: 12px; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.file-msgs { margin: 5px 0 0; padding-left: 16px; font-size: 12px; color: var(--muted); }
.passed-summary { font-size: 12px; color: var(--green); }

.alert { padding: 8px 12px; border-radius: 9px; font-size: 12px; margin-bottom: 6px; border: 1px solid; }
.alert-red { background: rgba(248, 113, 113, 0.14); border-color: rgba(248, 113, 113, 0.4); color: #fecaca; }
.alert-amber { background: rgba(251, 191, 36, 0.12); border-color: rgba(251, 191, 36, 0.4); color: #fde68a; }

.val-actions { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.ack-check { display: inline-flex; align-items: center; gap: 7px; font-size: 12px; color: #fde68a; cursor: pointer; }
.ack-check input { width: auto; }

/* ==================== To Confirm (Review Table) ==================== */
.filter-topbar {
  padding: 12px 16px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}
.seg-tabs { display: flex; gap: 6px; flex-wrap: wrap; }
.seg-btn {
  padding: 6px 12px;
  border-radius: 8px;
  background: rgba(8, 13, 27, 0.65);
  border: 1px solid var(--border);
  color: var(--muted);
  font-size: 12px;
  cursor: pointer;
}
.seg-btn:hover { color: var(--text); }
.seg-btn.active { background: rgba(34, 211, 238, 0.14); border-color: rgba(34, 211, 238, 0.42); color: #f8fafc; font-weight: 600; }
.filter-controls { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }

.table-panel { padding: 14px 16px; overflow: hidden; }
.table-toolbar { display: flex; justify-content: space-between; align-items: center; margin-bottom: 10px; }
.table-scroll { overflow: auto; max-height: calc(100vh - 245px); }

.data-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.data-table th {
  position: sticky;
  top: 0;
  z-index: 2;
  background: rgba(9, 14, 29, 0.98);
  color: var(--muted);
  font-weight: 600;
  text-align: left;
  padding: 9px 10px;
  border-bottom: 1px solid rgba(148, 163, 184, 0.22);
  white-space: nowrap;
}
.data-table td { padding: 10px 10px; border-bottom: 1px solid rgba(148, 163, 184, 0.1); vertical-align: middle; }
.clickable-row { cursor: pointer; }
.clickable-row:hover { background: rgba(34, 211, 238, 0.05); }
.row-selected { background: rgba(34, 211, 238, 0.11) !important; }
.punches-cell { min-width: 170px; }

.tier-tag { display: inline-block; padding: 1px 7px; border-radius: 5px; font-size: 11px; font-weight: 600; }
.tag-P1 { background: rgba(248, 113, 113, 0.18); color: #fca5a5; border: 1px solid rgba(248, 113, 113, 0.4); }
.tag-P2 { background: rgba(251, 146, 60, 0.18); color: #fdba74; border: 1px solid rgba(251, 146, 60, 0.4); }
.tag-P3 { background: rgba(251, 191, 36, 0.16); color: #fde68a; border: 1px solid rgba(251, 191, 36, 0.38); }
.tag-reviewed { background: rgba(52, 211, 153, 0.16); color: #6ee7b7; border: 1px solid rgba(52, 211, 153, 0.38); }
.tag-normal { background: rgba(148, 163, 184, 0.14); color: var(--muted); }

/* Unified Status Colors across Pills & Timeline */
.status-pill { display: inline-block; padding: 2px 9px; border-radius: 999px; font-size: 12px; font-weight: 600; border: 1px solid; }
.st-green { background: rgba(52, 211, 153, 0.14); border-color: rgba(52, 211, 153, 0.4); color: var(--green); }
.st-violet { background: rgba(167, 139, 250, 0.15); border-color: rgba(167, 139, 250, 0.4); color: var(--violet); }
.st-cyan { background: rgba(34, 211, 238, 0.14); border-color: rgba(34, 211, 238, 0.4); color: var(--cyan); }
.st-sky { background: rgba(56, 189, 248, 0.14); border-color: rgba(56, 189, 248, 0.4); color: var(--sky); }
.st-amber { background: rgba(251, 191, 36, 0.15); border-color: rgba(251, 191, 36, 0.42); color: var(--amber); }
.st-orange { background: rgba(251, 146, 60, 0.16); border-color: rgba(251, 146, 60, 0.42); color: var(--orange); }
.st-red { background: rgba(248, 113, 113, 0.16); border-color: rgba(248, 113, 113, 0.42); color: var(--red); }
.st-muted { background: rgba(148, 163, 184, 0.12); border-color: rgba(148, 163, 184, 0.28); color: var(--muted); }

.text-sky { color: var(--sky); }
.text-green { color: var(--green); }
.text-cyan { color: var(--cyan); }
.text-violet { color: var(--violet); }
.text-amber { color: var(--amber); }
.text-orange { color: var(--orange); }
.text-red { color: var(--red); }

/* ==================== Review Drawer & Timeline ==================== */
.drawer-backdrop {
  position: fixed;
  inset: 0;
  z-index: 1000;
  background: rgba(2, 6, 23, 0.65);
  backdrop-filter: blur(4px);
  display: flex;
  justify-content: flex-end;
}
.drawer-panel {
  width: min(620px, 95vw);
  height: 100vh;
  border-radius: 14px 0 0 14px;
  display: flex;
  flex-direction: column;
  background: rgba(9, 14, 29, 0.98);
}
.drawer-head { padding: 18px 22px; border-bottom: 1px solid var(--border); display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; }
.drawer-title-row { display: flex; align-items: center; gap: 10px; }
.drawer-title-row h3 { margin: 0; font-size: 18px; }
.drawer-conclusion { font-size: 13px; color: #f1f5f9; background: rgba(34, 211, 238, 0.08); border-left: 2px solid var(--cyan); padding: 6px 10px; border-radius: 4px; }
.drawer-body { flex: 1; overflow-y: auto; padding: 18px 22px; display: flex; flex-direction: column; gap: 16px; }
.drawer-foot { padding: 14px 22px; border-top: 1px solid var(--border); display: flex; justify-content: flex-end; gap: 10px; }
.section-label { font-size: 12px; font-weight: 700; color: var(--cyan); margin-bottom: 8px; }

.tl-legend { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.tl-legend span { display: inline-flex; align-items: center; gap: 4px; }
.lg-dot { display: inline-block; width: 8px; height: 8px; border-radius: 2px; }
.lg-shift { background: rgba(148, 163, 184, 0.35); }
.lg-punch { background: var(--cyan); border-radius: 50%; }
.lg-leave { background: var(--violet); }
.lg-out { background: var(--cyan); }
.lg-ot { background: var(--sky); }
.lg-line { display: inline-block; width: 10px; border-top: 1.5px dashed rgba(34, 211, 238, 0.7); }

.timeline-box { background: rgba(5, 8, 18, 0.85); border: 1px solid var(--border); border-radius: 10px; padding: 14px 14px 10px; }
.timeline-track { position: relative; height: 108px; background: rgba(148, 163, 184, 0.05); border-radius: 8px; border: 1px solid rgba(148, 163, 184, 0.14); overflow: visible; }
.tl-shift {
  position: absolute; top: 4px; height: 22px;
  background: rgba(148, 163, 184, 0.12); border: 1px solid rgba(148, 163, 184, 0.24);
  border-radius: 5px; display: flex; align-items: center; justify-content: center;
  font-size: 10px; color: var(--muted); overflow: hidden; white-space: nowrap; padding: 0 4px;
}
.tl-tol { position: absolute; top: 26px; bottom: 24px; border-left: 1px dashed rgba(34, 211, 238, 0.38); }
.tl-baseline { position: absolute; left: 0; right: 0; top: 56px; height: 1px; background: rgba(148, 163, 184, 0.18); }
.tl-interval {
  position: absolute; bottom: 4px; height: 18px; border-radius: 4px; font-size: 10px;
  display: flex; align-items: center; justify-content: center; overflow: hidden; border: 1px solid; z-index: 2;
}
.tl-请假 { background: rgba(167, 139, 250, 0.28); border-color: var(--violet); color: #ede9fe; }
.tl-外出, .tl-出差 { background: rgba(34, 211, 238, 0.25); border-color: var(--cyan); color: #cffafe; }
.tl-加班 { background: rgba(56, 189, 248, 0.26); border-color: var(--sky); color: #e0f2fe; }

.tl-punch { position: absolute; top: 51px; transform: translateX(-50%); width: 10px; height: 10px; z-index: 4; }
.tl-punch-dot { display: block; width: 10px; height: 10px; border-radius: 50%; background: var(--cyan); border: 2px solid #05070d; }
.tl-punch-dedup .tl-punch-dot { background: var(--amber); }
.tl-punch-lbl {
  position: absolute; left: 50%; transform: translateX(-50%); white-space: nowrap; font-size: 10px;
  line-height: 1.25; color: #f8fafc; background: rgba(5, 7, 13, 0.92);
  border: 1px solid rgba(34, 211, 238, 0.28); padding: 1px 4px; border-radius: 4px;
}
.tl-lvl-0 .tl-punch-lbl { bottom: 13px; }
.tl-lvl-1 .tl-punch-lbl { top: 13px; }
.tl-lvl-2 .tl-punch-lbl { bottom: 29px; }
.tl-axis { display: flex; justify-content: space-between; font-size: 10px; color: var(--muted); margin-top: 6px; }

.evidence-grid { display: flex; flex-direction: column; gap: 6px; background: rgba(8, 13, 27, 0.6); padding: 12px; border-radius: 10px; border: 1px solid var(--border); }
.evidence-empty { padding: 10px 12px; background: rgba(8, 13, 27, 0.45); border-radius: 8px; border: 1px solid var(--border); }
.ev-row { display: grid; grid-template-columns: 76px minmax(0, 1fr); gap: 8px; font-size: 12px; }
.ev-key { color: var(--muted); }

.more-details { font-size: 12px; background: rgba(8, 13, 27, 0.5); border: 1px solid var(--border); border-radius: 9px; padding: 8px 12px; }
.more-details summary { cursor: pointer; color: var(--cyan); }
.more-body { margin-top: 8px; line-height: 1.6; }

.form-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.form-grid-2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.rule-promote-box { padding: 10px 12px; border-radius: 9px; background: rgba(34, 211, 238, 0.06); border: 1px solid rgba(34, 211, 238, 0.25); }
.switch-row { display: flex; align-items: center; gap: 8px; font-size: 13px; cursor: pointer; }
.switch-row input { width: auto; }

/* ==================== Reports & Calendar ==================== */
.reports-toolbar { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 10px; }
.tab-pills { display: flex; align-items: center; gap: 8px; }
.tab-pill { padding: 7px 16px; border-radius: 999px; background: rgba(15, 23, 42, 0.7); border: 1px solid var(--border); color: var(--muted); cursor: pointer; font-weight: 600; }
.tab-pill.active { background: rgba(34, 211, 238, 0.16); border-color: var(--cyan); color: #f8fafc; }
.export-btns { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.emp-link { background: none; border: none; color: #67e8f9; font-weight: 600; cursor: pointer; padding: 0; text-decoration: underline dotted rgba(34, 211, 238, 0.55); }

.cal-weekdays, .cal-grid { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 6px; }
.cal-weekdays { text-align: center; margin-bottom: 6px; }
.cal-cell { padding: 8px 6px; border-radius: 8px; border: 1px solid var(--border); background: rgba(8, 13, 27, 0.72); color: var(--text); text-align: left; cursor: pointer; }
.cal-cell:hover { border-color: var(--cyan); }
.cal-day { font-weight: 700; font-size: 12px; }
.cal-status { font-size: 11px; margin-top: 2px; font-weight: 600; }
.cal-meta { font-size: 10px; color: var(--muted); margin-top: 2px; }
.cal-green { border-color: rgba(52, 211, 153, 0.35); }
.cal-green .cal-status { color: var(--green); }
.cal-violet { border-color: rgba(167, 139, 250, 0.38); }
.cal-violet .cal-status { color: var(--violet); }
.cal-cyan { border-color: rgba(34, 211, 238, 0.38); }
.cal-cyan .cal-status { color: var(--cyan); }
.cal-amber { border-color: rgba(251, 191, 36, 0.45); }
.cal-amber .cal-status { color: var(--amber); }
.cal-orange { border-color: rgba(251, 146, 60, 0.45); }
.cal-orange .cal-status { color: var(--orange); }
.cal-red { border-color: rgba(248, 113, 113, 0.5); background: rgba(248, 113, 113, 0.08); }
.cal-red .cal-status { color: var(--red); }
.cal-muted .cal-status { color: var(--muted); }

/* ==================== Rules & Modals ==================== */
.rules-list { display: flex; flex-direction: column; gap: 10px; }
.rule-card { padding: 13px 15px; border-radius: 10px; background: rgba(8, 13, 27, 0.72); border: 1px solid var(--border); }
.rule-disabled { opacity: 0.58; }
.rule-card-head { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.rule-badges, .rule-actions, .rule-meta { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.rule-raw { margin: 8px 0; font-size: 13px; font-weight: 500; }
.chip-tag { padding: 2px 8px; border-radius: 6px; font-size: 11px; background: rgba(148, 163, 184, 0.14); color: var(--text); }
.chip-cyan { background: rgba(34, 211, 238, 0.14); color: #67e8f9; }

.switch { position: relative; display: inline-block; width: 36px; height: 20px; }
.switch input { opacity: 0; width: 0; height: 0; }
.slider { position: absolute; cursor: pointer; inset: 0; background: rgba(148, 163, 184, 0.3); border-radius: 999px; transition: .2s; }
.slider:before { position: absolute; content: ""; height: 14px; width: 14px; left: 3px; bottom: 3px; background: #f8fafc; border-radius: 50%; transition: .2s; }
.switch input:checked + .slider { background: var(--cyan); }
.switch input:checked + .slider:before { transform: translateX(16px); }

.changelog-fold { border-top: 1px solid var(--border); padding-top: 12px; }
.changelog-timeline { display: flex; flex-direction: column; gap: 10px; padding-left: 4px; }
.changelog-item { display: flex; gap: 10px; align-items: flex-start; }
.changelog-dot { width: 7px; height: 7px; margin-top: 6px; border-radius: 50%; background: var(--cyan); flex-shrink: 0; }

.how-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.how-step { padding: 12px 14px; border-radius: 10px; background: rgba(8, 13, 27, 0.65); border: 1px solid var(--border); }
.how-num { font-size: 11px; color: var(--cyan); font-weight: 700; }
.how-title { font-size: 14px; font-weight: 700; margin-top: 2px; }
.how-count { font-size: 12px; color: var(--text); }
.course-item { padding: 9px 11px; border-radius: 9px; background: rgba(8, 13, 27, 0.6); border: 1px solid var(--border); margin-bottom: 8px; }

.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 1200;
  background: rgba(2, 6, 23, 0.72);
  backdrop-filter: blur(5px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}
.modal-card { width: min(600px, 95vw); max-height: 90vh; display: flex; flex-direction: column; padding: 20px 22px; background: rgba(9, 14, 29, 0.98); }
.modal-wide { width: min(820px, 96vw); }
.modal-head { display: flex; justify-content: space-between; align-items: flex-start; margin-bottom: 14px; }
.modal-head h3 { margin: 0; font-size: 16px; }
.modal-body { overflow-y: auto; flex: 1; }
.modal-foot { display: flex; justify-content: flex-end; gap: 10px; margin-top: 16px; padding-top: 12px; border-top: 1px solid var(--border); }
.chip-selector { display: flex; flex-wrap: wrap; gap: 6px; }

.skeleton-box {
  background: linear-gradient(90deg, rgba(15, 23, 42, 0.6) 25%, rgba(30, 41, 59, 0.75) 50%, rgba(15, 23, 42, 0.6) 75%);
  background-size: 200% 100%;
  animation: shimmer 1.4s infinite;
}
.skeleton-table { display: flex; flex-direction: column; gap: 8px; padding: 8px 0; }
.skeleton-row { height: 36px; border-radius: 8px; background: rgba(30, 41, 59, 0.55); }
@keyframes shimmer { to { background-position: -200% 0; } }

.empty-state { text-align: center; padding: 36px 16px; }
.empty-state svg { width: 96px; height: 72px; margin-bottom: 8px; }
.empty-title { font-weight: 600; margin-bottom: 4px; }

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

@media (max-width: 900px) {
  .orb-track { gap: 24px; }
  .orb-card { width: 184px; height: 184px; gap: 7px; padding: 16px; }
  .how-grid, .file-cards { grid-template-columns: 1fr; }
}

@media (max-width: 680px) {
  .kpi-grid { grid-template-columns: 1fr; }
  .orb-track { flex-direction: column; gap: 16px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
  }
}
