:root {
  color-scheme: light;
  --bg: #f5f7fb;
  --surface: rgba(255, 255, 255, 0.88);
  --surface-strong: #ffffff;
  --text: #1d2433;
  --muted: #667085;
  --soft: #eef2f7;
  --line: #e3e8ef;
  --blue: #2563eb;
  --blue-soft: #eaf1ff;
  --green: #0f9f76;
  --green-soft: #e7f7f1;
  --orange: #d9822b;
  --orange-soft: #fff2df;
  --red: #d64555;
  --red-soft: #fff0f2;
  --coral: #f45f73;
  --mint: #2fc3a2;
  --sun: #f6c855;
  --violet: #7c6df2;
  --accent: #2563eb;
  --ink: #111827;
  --shadow: 0 24px 64px rgba(15, 23, 42, 0.12);
  --panel-shadow: 0 14px 36px rgba(15, 23, 42, 0.07);
  --control-shadow: 0 1px 0 rgba(255, 255, 255, 0.86) inset;
  --radius: 8px;
}

[data-theme="dark"] {
  color-scheme: dark;
  --bg: #131116;
  --surface: rgba(31, 28, 35, 0.9);
  --surface-strong: #24202a;
  --text: #f6f0e8;
  --muted: #b8aeb4;
  --soft: #2d2731;
  --line: #403846;
  --blue: #74a7ff;
  --blue-soft: rgba(116, 167, 255, 0.16);
  --green: #73e3c0;
  --green-soft: rgba(115, 227, 192, 0.14);
  --orange: #ffd36b;
  --orange-soft: rgba(255, 211, 107, 0.14);
  --red: #ff8796;
  --red-soft: rgba(255, 135, 150, 0.14);
  --coral: #ff8796;
  --mint: #73e3c0;
  --sun: #ffd36b;
  --violet: #b2a5ff;
  --accent: #74a7ff;
  --ink: #fffaf2;
  --shadow: 0 24px 70px rgba(0, 0, 0, 0.38);
  --panel-shadow: 0 22px 56px rgba(0, 0, 0, 0.28);
  --control-shadow: 0 1px 0 rgba(255, 255, 255, 0.04) inset;
}

* {
  box-sizing: border-box;
}

html {
  min-height: 100%;
  background: var(--bg);
  overflow-x: hidden;
}

body {
  min-height: 100vh;
  margin: 0;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.92) 0%, rgba(245, 247, 251, 0.96) 46%, #eef3f8 100%);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Display", "SF Pro Text",
    "PingFang SC", "Microsoft YaHei", "Segoe UI", sans-serif;
  letter-spacing: 0;
  font-size: 14px;
  line-height: 1.5;
  overflow-x: hidden;
}

[data-theme="dark"] body {
  background:
    linear-gradient(180deg, #151219 0%, #1c1821 52%, #131116 100%);
}

button,
input,
select,
textarea {
  font: inherit;
}

button {
  cursor: pointer;
}

button,
input,
select,
textarea,
.panel,
.card,
.level-card,
.metric-chip,
.table-wrap {
  min-width: 0;
}

button:disabled,
input:disabled,
select:disabled {
  cursor: not-allowed;
  opacity: 0.55;
}

.auth-shell {
  min-height: 100vh;
  display: grid;
  grid-template-columns: minmax(0, 1.08fr) minmax(360px, 0.78fr);
  gap: 28px;
  align-items: center;
  padding: clamp(18px, 5vw, 68px);
}

.auth-story {
  position: relative;
  max-width: 720px;
}

.brand-lockup {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 34px;
}

.brand-mark {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, 0.9);
  border-radius: 8px;
  background:
    linear-gradient(135deg, #171419 0 52%, #ff6b7a 52% 100%);
  box-shadow: 0 12px 26px rgba(255, 107, 122, 0.24);
  color: var(--ink);
  color: #fff;
  font-weight: 700;
}

.brand-text {
  font-size: 18px;
  font-weight: 700;
}

.brand-caption {
  color: var(--muted);
  font-size: 13px;
  margin-top: 2px;
}

.auth-title {
  margin: 0;
  max-width: 780px;
  color: var(--ink);
  font-size: clamp(42px, 7vw, 84px);
  font-weight: 800;
  line-height: 1.02;
  letter-spacing: 0;
}

.auth-subtitle {
  max-width: 560px;
  margin: 22px 0 0;
  color: var(--muted);
  font-size: clamp(17px, 2vw, 21px);
  line-height: 1.62;
}

.auth-metrics {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  max-width: 620px;
  margin-top: 44px;
}

.metric-chip {
  min-height: 88px;
  padding: 16px;
  border: 1px solid rgba(255, 255, 255, 0.86);
  border-radius: var(--radius);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.86), rgba(255, 255, 255, 0.68)),
    var(--surface-strong);
  box-shadow: 0 14px 32px rgba(77, 55, 42, 0.08);
}

.metric-value {
  font-size: 24px;
  font-weight: 700;
}

.metric-label {
  margin-top: 5px;
  color: var(--muted);
  font-size: 13px;
}

.auth-stage {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 190px;
  gap: 12px;
  max-width: 680px;
  margin-top: 28px;
}

.stage-card,
.stage-shelf,
.stage-capsule,
.dashboard-hero,
.dashboard-prize .prize-card {
  border: 1px solid rgba(255, 255, 255, 0.86);
  border-radius: var(--radius);
  box-shadow: 0 18px 42px rgba(77, 55, 42, 0.12);
}

.stage-card-main {
  min-height: 168px;
  display: grid;
  align-content: end;
  gap: 8px;
  padding: 20px;
  background:
    linear-gradient(135deg, rgba(255, 107, 122, 0.9), rgba(255, 212, 90, 0.82)),
    #ffb86f;
  color: #fff;
  overflow: hidden;
}

.stage-card-main::before {
  content: "";
  width: 84%;
  height: 34px;
  align-self: start;
  border-radius: 8px;
  background: repeating-linear-gradient(
    90deg,
    rgba(255, 255, 255, 0.76) 0 18px,
    rgba(255, 255, 255, 0.18) 18px 30px
  );
}

.stage-tag {
  width: fit-content;
  min-height: 26px;
  display: inline-flex;
  align-items: center;
  padding: 4px 10px;
  border: 1px solid rgba(255, 255, 255, 0.62);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.26);
  color: inherit;
  font-size: 12px;
  font-weight: 800;
}

.stage-card-main strong {
  font-size: 30px;
  line-height: 1;
}

.stage-card-main small {
  color: rgba(255, 255, 255, 0.88);
}

.stage-shelf {
  display: grid;
  gap: 9px;
  padding: 12px;
  background: rgba(255, 255, 255, 0.72);
}

.stage-token {
  min-height: 46px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, 0.72);
  border-radius: 8px;
  color: #171419;
  font-size: 13px;
  font-weight: 900;
  box-shadow: inset 0 -8px 18px rgba(255, 255, 255, 0.32);
}

.token-coral {
  background: #ff8d9b;
}

.token-mint {
  background: #7be1c7;
}

.token-sun {
  background: #ffe178;
}

.stage-capsule {
  grid-column: 1 / -1;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  min-height: 58px;
  padding: 12px 16px;
  background:
    linear-gradient(90deg, #171419 0%, #2b2630 58%, #8f7cff 58%, #43d6ad 100%);
  color: #fff;
}

.stage-capsule span {
  color: rgba(255, 255, 255, 0.72);
  font-size: 13px;
  font-weight: 700;
}

.stage-capsule strong {
  font-size: 18px;
}

.auth-panel {
  width: min(100%, 460px);
  justify-self: end;
  padding: 28px;
  border: 1px solid rgba(255, 255, 255, 0.86);
  border-radius: var(--radius);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.92), rgba(255, 255, 255, 0.78)),
    #fff;
  box-shadow: var(--shadow);
  backdrop-filter: blur(22px);
}

.auth-version {
  margin-top: 18px;
  padding-top: 14px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
  text-align: center;
}

.auth-panel-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
}

.panel-title {
  margin: 0;
  color: var(--ink);
  font-size: 26px;
  font-weight: 700;
}

.panel-subtitle {
  margin: 8px 0 24px;
  color: var(--muted);
  line-height: 1.55;
}

.theme-toggle {
  flex: 0 0 auto;
  min-height: 36px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface-strong);
  color: var(--text);
  padding: 7px 12px;
  font-size: 12px;
  font-weight: 800;
  box-shadow: 0 8px 20px rgba(77, 55, 42, 0.08);
}

.auth-tabs,
.segmented {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 4px;
  padding: 4px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--soft);
}

.segmented.three {
  grid-template-columns: repeat(3, 1fr);
}

.subpage-tabs {
  grid-template-columns: repeat(auto-fit, minmax(112px, 1fr));
  margin-top: 18px;
  max-width: 100%;
}

.auth-tab,
.segment-btn {
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: var(--muted);
  padding: 10px 12px;
}

.segment-btn {
  display: grid;
  gap: 3px;
  align-content: center;
  min-height: 58px;
  min-width: 0;
  overflow-wrap: anywhere;
}

.segment-btn .hint {
  font-size: 11px;
}

.auth-tab.active,
.segment-btn.active {
  background: var(--surface-strong);
  color: var(--text);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.08);
}

.form {
  display: grid;
  gap: 14px;
  margin-top: 22px;
}

.field {
  display: grid;
  gap: 8px;
}

.field span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 760;
  line-height: 1.35;
}

.input,
.select,
.textarea {
  width: 100%;
  min-height: 44px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.96);
  color: var(--text);
  outline: none;
  padding: 10px 13px;
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.88) inset, 0 1px 2px rgba(15, 23, 42, 0.03);
  transition: border-color 160ms ease, box-shadow 160ms ease, background 160ms ease, transform 160ms ease;
}

.textarea {
  min-height: 92px;
  resize: vertical;
}

.input:focus,
.select:focus,
.textarea:focus {
  border-color: rgba(37, 99, 235, 0.72);
  box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.12), 0 6px 16px rgba(15, 23, 42, 0.05);
  background: #fff;
}

.primary-btn,
.secondary-btn,
.ghost-btn,
.danger-btn,
.icon-btn {
  min-height: 42px;
  border-radius: var(--radius);
  border: 1px solid transparent;
  padding: 10px 15px;
  font-weight: 760;
  line-height: 1.2;
  transition: transform 150ms ease, box-shadow 150ms ease, border-color 150ms ease, background 150ms ease, color 150ms ease;
}

.primary-btn:hover,
.secondary-btn:hover,
.danger-btn:hover,
.icon-btn:hover {
  transform: translateY(-1px);
}

.primary-btn {
  border-color: rgba(17, 24, 39, 0.88);
  background: linear-gradient(180deg, #1e293b, #111827);
  color: #fff;
  box-shadow: 0 14px 28px rgba(17, 24, 39, 0.18);
}

.secondary-btn {
  border-color: rgba(195, 204, 217, 0.92);
  background: rgba(255, 255, 255, 0.9);
  color: var(--text);
  box-shadow: 0 8px 18px rgba(15, 23, 42, 0.045);
}

.ghost-btn {
  border-color: transparent;
  background: transparent;
  color: var(--muted);
}

.danger-btn {
  border-color: rgba(214, 69, 85, 0.26);
  background: var(--red-soft);
  color: var(--red);
}

.icon-btn {
  width: 40px;
  padding: 0;
  border-color: var(--line);
  background: var(--surface-strong);
  color: var(--text);
}

.hint {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.5;
}

.audit-readable,
.audit-json {
  max-width: 420px;
  max-height: 220px;
  overflow: auto;
  white-space: pre-wrap;
  word-break: break-word;
  margin: 8px 0 10px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-strong);
  color: var(--text);
  font-size: 12px;
}

.audit-readable {
  display: grid;
  gap: 6px;
  line-height: 1.55;
}

.app-frame {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 262px minmax(0, 1fr);
}

.sidebar {
  position: sticky;
  top: 0;
  height: 100vh;
  display: flex;
  flex-direction: column;
  border-right: 1px solid var(--line);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.92), rgba(246, 249, 252, 0.86)),
    var(--surface);
  backdrop-filter: blur(22px);
}

.sidebar-head {
  padding: 22px 20px 18px;
  border-bottom: 1px solid var(--line);
}

.nav {
  display: grid;
  gap: 6px;
  padding: 14px 12px;
  overflow-y: auto;
}

.nav-group {
  display: grid;
  gap: 5px;
}

.nav-group-summary {
  min-height: 40px;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0 10px;
  border-radius: var(--radius);
  color: var(--muted);
  font-weight: 760;
  list-style: none;
  cursor: pointer;
  user-select: none;
}

.nav-group-summary::-webkit-details-marker {
  display: none;
}

.nav-group-summary::after {
  content: "v";
  color: var(--muted);
  font-size: 12px;
  transition: transform 0.18s ease;
}

.nav-group[open] > .nav-group-summary::after {
  transform: rotate(180deg);
}

.nav-group-summary:hover,
.nav-group-summary.active {
  background: rgba(255, 255, 255, 0.82);
  color: var(--text);
  box-shadow: 0 8px 18px rgba(15, 23, 42, 0.045);
}

.nav-group-icon {
  width: 22px;
  height: 22px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, 0.76);
  border-radius: 7px;
  background: var(--soft);
  color: var(--text);
  font-size: 11px;
  font-weight: 800;
}

.nav-group-label {
  flex: 1;
}

.nav-group-items {
  display: grid;
  gap: 4px;
  padding: 2px 0 6px 10px;
}

.nav-btn {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 44px;
  border: 0;
  border-radius: var(--radius);
  background: transparent;
  color: var(--muted);
  padding: 0 12px;
  text-align: left;
  font-weight: 700;
  transition: background 150ms ease, box-shadow 150ms ease, color 150ms ease, transform 150ms ease;
}

.nav-btn:hover,
.nav-btn.active {
  background: #fff;
  color: var(--text);
  box-shadow: 0 12px 26px rgba(15, 23, 42, 0.08);
}

.nav-btn:hover {
  transform: translateX(2px);
}

.nav-icon {
  width: 24px;
  height: 24px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, 0.76);
  border-radius: 7px;
  background: linear-gradient(135deg, rgba(246, 200, 85, 0.92), rgba(47, 195, 162, 0.92));
  color: #171419;
  font-size: 12px;
  font-weight: 700;
}

.nav-count {
  margin-left: auto;
  min-width: 22px;
  min-height: 22px;
  display: inline-grid;
  place-items: center;
  padding: 0 6px;
  border-radius: 999px;
  background: var(--red);
  color: #fff;
  font-size: 11px;
  font-weight: 800;
}

.sidebar-foot {
  margin-top: auto;
  padding: 16px 12px;
  border-top: 1px solid var(--line);
}

.user-pill {
  display: grid;
  gap: 6px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.94), rgba(248, 250, 252, 0.94)),
    var(--surface-strong);
  box-shadow: 0 10px 22px rgba(15, 23, 42, 0.05);
}

.user-name {
  font-weight: 700;
}

.user-role {
  color: var(--muted);
  font-size: 12px;
}

.main {
  min-width: 0;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.38), transparent 260px),
    transparent;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  padding: 16px clamp(18px, 3.5vw, 36px);
  border-bottom: 1px solid rgba(226, 232, 240, 0.82);
  background: rgba(248, 250, 252, 0.82);
  backdrop-filter: blur(20px);
}

.topbar > div:first-child {
  min-width: 0;
}

.page-kicker {
  color: var(--muted);
  font-size: 13px;
}

.page-title {
  margin: 3px 0 0;
  color: var(--ink);
  font-size: clamp(24px, 2.6vw, 34px);
  line-height: 1.1;
  font-weight: 850;
  overflow-wrap: anywhere;
}

.toolbar {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  flex-wrap: wrap;
  min-width: 0;
}

.toolbar > * {
  min-width: 0;
}

.content {
  display: grid;
  gap: 22px;
  width: 100%;
  max-width: 1500px;
  margin: 0 auto;
  padding: clamp(18px, 3.5vw, 36px);
  align-items: start;
}

.content.view-management,
.content.view-users,
.content.view-levels,
.content.view-audit {
  max-width: 1640px;
}

.app-footer {
  padding: 0 clamp(18px, 4vw, 40px) clamp(18px, 4vw, 32px);
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
  text-align: center;
}

.dashboard-hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(260px, 0.48fr);
  gap: 18px;
  align-items: center;
  min-height: 230px;
  padding: clamp(18px, 4vw, 34px);
  background:
    linear-gradient(135deg, rgba(23, 20, 25, 0.96), rgba(43, 38, 48, 0.94)),
    #171419;
  color: #fff;
  overflow: hidden;
}

.dashboard-hero h2 {
  max-width: 760px;
  margin: 14px 0 10px;
  font-size: clamp(28px, 4vw, 54px);
  line-height: 1.08;
}

.dashboard-hero p {
  max-width: 620px;
  margin: 0;
  color: rgba(255, 255, 255, 0.72);
  line-height: 1.65;
}

.dashboard-prize {
  position: relative;
  min-height: 188px;
}

.dashboard-prize .prize-card {
  position: absolute;
  width: 132px;
  min-height: 116px;
  display: grid;
  align-content: end;
  gap: 4px;
  padding: 14px;
  color: #171419;
}

.prize-card span {
  font-size: 12px;
  font-weight: 800;
  color: rgba(23, 20, 25, 0.56);
}

.prize-card strong {
  font-size: 38px;
  line-height: 1;
}

.prize-score {
  top: 0;
  right: 72px;
  background: #ffd45a;
}

.prize-people {
  left: 18px;
  bottom: 0;
  background: #43d6ad;
}

.prize-level {
  right: 0;
  bottom: 12px;
  background: #ff8d9b;
}

.tenure-clock {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1.34fr) minmax(300px, 0.66fr);
  gap: 20px;
  align-items: stretch;
  padding: clamp(22px, 4vw, 40px);
  border: 1px solid rgba(255, 255, 255, 0.82);
  border-radius: var(--radius);
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.98), rgba(255, 251, 244, 0.86)),
    linear-gradient(90deg, rgba(255, 107, 122, 0.18), rgba(255, 212, 90, 0.24), rgba(67, 214, 173, 0.18), rgba(39, 120, 255, 0.14));
  box-shadow: 0 24px 68px rgba(77, 55, 42, 0.14);
  overflow: hidden;
}

.tenure-clock::after {
  content: "";
  position: absolute;
  inset: auto 0 0;
  height: 5px;
  background: linear-gradient(90deg, var(--coral), var(--sun), var(--mint), var(--blue));
}

.tenure-story {
  position: relative;
  z-index: 1;
}

.tenure-clock p {
  margin: 12px 0 0;
  color: var(--text);
  font-size: clamp(18px, 2.3vw, 28px);
  line-height: 1.45;
  font-weight: 750;
  max-width: 780px;
}

.tenure-days {
  display: flex;
  align-items: baseline;
  gap: 12px;
  margin-top: 18px;
  color: var(--ink);
}

.tenure-days strong {
  font-size: clamp(104px, 18vw, 240px);
  line-height: 0.9;
  font-weight: 900;
  letter-spacing: 0;
  font-variant-numeric: tabular-nums;
  text-shadow: 0 18px 38px rgba(77, 55, 42, 0.14);
}

.tenure-days span {
  font-size: clamp(28px, 4vw, 48px);
  font-weight: 800;
}

.tenure-progress {
  max-width: 720px;
  margin-top: 24px;
}

.tenure-progress-head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 750;
}

.tenure-progress-bar {
  height: 10px;
  margin-top: 9px;
  border-radius: 999px;
  background: rgba(23, 20, 25, 0.08);
  overflow: hidden;
}

.tenure-progress-bar i {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--coral), var(--sun), var(--mint), var(--blue));
  transition: width 0.42s ease;
}

.tenure-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 132px;
  gap: 10px;
  position: relative;
  z-index: 1;
}

.tenure-piece {
  display: grid;
  align-content: center;
  gap: 6px;
  min-height: 86px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.82);
}

.tenure-piece.hero-note {
  grid-column: 1 / span 2;
  min-height: 116px;
  background: rgba(23, 20, 25, 0.94);
  color: #fff;
}

.tenure-piece:first-child,
.tenure-piece:nth-child(2),
.tenure-piece:nth-child(3) {
  grid-column: 1;
}

.tenure-piece.hero-note {
  grid-column: 1 / span 2;
}

.tenure-piece.accent {
  grid-column: 2;
  grid-row: 2 / span 2;
  justify-items: center;
  text-align: center;
  background: #171419;
  color: #fff;
}

.tenure-piece span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.tenure-piece strong {
  color: var(--ink);
  font-size: 17px;
  line-height: 1.25;
  font-variant-numeric: tabular-nums;
}

.tenure-piece.hero-note span,
.tenure-piece.accent span {
  color: rgba(255, 255, 255, 0.62);
}

.tenure-piece.hero-note strong,
.tenure-piece.accent strong {
  color: #fff;
}

.tenure-piece.hero-note strong {
  font-size: 22px;
  line-height: 1.35;
}

.tenure-piece.accent strong {
  font-size: 23px;
}

.growth-path {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  margin-top: 18px;
}

.growth-path span {
  display: inline-flex;
  align-items: center;
  min-height: 32px;
  padding: 6px 10px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.78);
  color: var(--ink);
  font-size: 13px;
  font-weight: 800;
}

.growth-path b {
  width: 38px;
  height: 2px;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--coral), var(--mint));
}

.grid {
  display: grid;
  gap: 14px;
}

.grid.cols-2 {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.grid.cols-3 {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.grid.cols-4 {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.panel,
.card {
  border: 1px solid rgba(226, 232, 240, 0.92);
  border-radius: var(--radius);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(250, 252, 255, 0.92)),
    var(--surface);
  box-shadow: var(--panel-shadow);
}

.panel {
  position: relative;
  padding: clamp(18px, 2.3vw, 26px);
  overflow: hidden;
}

.panel .panel {
  box-shadow: none;
  background: rgba(248, 250, 252, 0.68);
}

.card {
  padding: 18px;
  position: relative;
  overflow: hidden;
}

.card::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0;
  width: 100%;
  height: 3px;
  background: linear-gradient(90deg, rgba(244, 95, 115, 0.76), rgba(246, 200, 85, 0.72), rgba(47, 195, 162, 0.72), rgba(37, 99, 235, 0.72));
}

.section-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 18px;
  padding-bottom: 14px;
  border-bottom: 1px solid rgba(226, 232, 240, 0.9);
  flex-wrap: wrap;
}

.section-head > * {
  min-width: 0;
}

.section-title {
  margin: 0;
  color: var(--ink);
  font-size: clamp(18px, 1.5vw, 21px);
  font-weight: 850;
  line-height: 1.18;
}

.section-note {
  margin: 5px 0 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.45;
}

.section-head .section-note {
  display: none;
}

@media (min-width: 1180px) {
  .content.view-reports,
  .content.view-taskNotices,
  .content.view-periods {
    grid-template-columns: minmax(360px, 0.86fr) minmax(0, 1.14fr);
  }

  .content.view-reports > *,
  .content.view-taskNotices > *,
  .content.view-periods > * {
    min-width: 0;
  }

  .content.view-reports > :nth-child(n + 3),
  .content.view-taskNotices > :nth-child(n + 3),
  .content.view-periods > :nth-child(n + 3) {
    grid-column: 1 / -1;
  }

  .content.view-profile,
  .content.view-payslip {
    max-width: 980px;
  }
}

.content.view-reports {
  max-width: 1640px;
}

@media (min-width: 1180px) {
  .content.view-reports {
    grid-template-columns: minmax(0, 1fr);
  }

  .content.view-reports > :nth-child(n) {
    grid-column: auto;
  }
}

.reports-workbench-panel {
  overflow: visible;
}

.reports-workbench {
  display: grid;
  grid-template-columns: minmax(520px, 1.05fr) minmax(380px, 0.95fr);
  gap: 16px;
  align-items: start;
}

.reports-workbench.single-pane {
  grid-template-columns: minmax(0, 1fr);
}

.reports-compose-pane,
.reports-review-pane {
  min-width: 0;
}

.reports-compose-pane {
  display: grid;
  gap: 14px;
}

.reports-review-pane {
  position: sticky;
  top: 92px;
  max-height: calc(100vh - 122px);
  overflow: auto;
  padding: 14px;
  border: 1px solid rgba(226, 232, 240, 0.96);
  border-radius: var(--radius);
  background:
    linear-gradient(180deg, rgba(248, 250, 252, 0.94), rgba(255, 255, 255, 0.94)),
    var(--surface-strong);
  box-shadow: 0 16px 34px rgba(15, 23, 42, 0.075);
}

.report-form {
  min-width: 0;
}

.report-form-strip {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  padding: 12px;
  border: 1px solid rgba(226, 232, 240, 0.96);
  border-radius: var(--radius);
  background:
    linear-gradient(180deg, rgba(248, 250, 252, 0.94), rgba(255, 255, 255, 0.9)),
    var(--surface-strong);
  box-shadow: 0 8px 20px rgba(15, 23, 42, 0.04);
}

.report-form-strip > div:first-child,
.report-form-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
  flex-wrap: wrap;
}

.report-form-strip strong {
  color: var(--ink);
  font-size: 17px;
}

.report-form-strip span:not(.badge),
.report-form-meta {
  color: var(--muted);
  font-size: 12px;
}

.report-form-meta {
  justify-content: flex-end;
  font-weight: 700;
}

.inline-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 10px;
  flex-wrap: wrap;
}

.reports-compose-pane .report-performance-list {
  max-height: 430px;
  overflow: auto;
  padding-right: 2px;
}

.reports-review-pane .grid.cols-3 {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

.reports-review-pane .card {
  padding: 12px;
}

.reports-review-pane .stat-value {
  font-size: 22px !important;
}

.report-detail-panel {
  display: grid;
  gap: 14px;
  min-width: 0;
}

.report-detail-panel > .section-head {
  margin-bottom: 0;
}

.report-side-empty {
  display: grid;
  gap: 10px;
  min-height: 320px;
  align-content: center;
  text-align: center;
  color: var(--muted);
  border: 1px dashed rgba(148, 163, 184, 0.5);
  border-radius: var(--radius);
  background: rgba(248, 250, 252, 0.72);
}

.report-side-empty h3 {
  margin: 0;
  color: var(--ink);
  font-size: 22px;
}

.report-side-empty p {
  max-width: 360px;
  margin: 0 auto;
  line-height: 1.7;
}

.report-workbench-kpis {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 8px;
  margin: 0 0 12px;
}

.report-kpi-card {
  display: grid;
  gap: 5px;
  min-height: 74px;
  padding: 10px 12px;
  border: 1px solid rgba(226, 232, 240, 0.92);
  border-radius: var(--radius);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.96), rgba(248, 250, 252, 0.86)),
    var(--surface-strong);
  box-shadow: 0 10px 24px rgba(15, 23, 42, 0.045);
}

.report-kpi-card span,
.report-metric span,
.report-review-data span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.report-kpi-card strong {
  color: var(--ink);
  font-size: 24px;
  line-height: 1;
}

.report-kpi-card small,
.report-metric small {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.35;
}

.report-kpi-card.is-warn {
  border-color: rgba(217, 130, 43, 0.28);
  background:
    linear-gradient(180deg, rgba(255, 248, 238, 0.98), rgba(255, 255, 255, 0.9)),
    var(--surface-strong);
}

.report-form-main {
  display: grid;
  gap: 14px;
}

.report-meta-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(160px, 0.54fr) minmax(180px, 0.72fr);
  gap: 12px;
  padding: 14px;
  border: 1px solid rgba(226, 232, 240, 0.9);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.72);
}

.report-writing-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.report-writing-card {
  min-width: 0;
  padding: 14px;
  border: 1px solid rgba(226, 232, 240, 0.92);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.74);
}

.report-writing-card .textarea {
  min-height: 142px;
  border-color: rgba(226, 232, 240, 0.72);
  background: rgba(255, 255, 255, 0.9);
}

.report-writing-card-wide {
  grid-column: 1 / -1;
}

.report-submit-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding-top: 2px;
}

.report-submit-bar span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 760;
}

.report-detail-hero {
  display: grid;
  gap: 8px;
  padding: 12px;
  border: 1px solid rgba(37, 99, 235, 0.14);
  border-radius: var(--radius);
  background:
    linear-gradient(135deg, rgba(37, 99, 235, 0.09), rgba(47, 195, 162, 0.08)),
    rgba(255, 255, 255, 0.88);
}

.report-detail-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 4px;
}

.report-detail-hero h2 {
  margin: 0;
  color: var(--ink);
  font-size: clamp(20px, 2.2vw, 26px);
  line-height: 1.18;
}

.report-detail-hero p {
  margin: 8px 0 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.55;
}

.report-metrics-row {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.report-metric {
  display: grid;
  gap: 6px;
  min-height: 76px;
  padding: 10px 12px;
  border: 1px solid rgba(226, 232, 240, 0.9);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.78);
}

.report-metric strong {
  color: var(--ink);
  font-size: 18px;
  line-height: 1.2;
  overflow-wrap: anywhere;
}

.report-content-board {
  display: grid;
  gap: 10px;
}

.report-story-card {
  padding: 12px;
  border: 1px solid rgba(226, 232, 240, 0.92);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.82);
}

.report-story-card.is-warning {
  border-color: rgba(217, 130, 43, 0.24);
  background: rgba(255, 248, 238, 0.88);
}

.report-story-card h3 {
  margin: 0 0 8px;
  color: var(--ink);
  font-size: 14px;
}

.report-story-card p {
  margin: 0;
  color: var(--text);
  line-height: 1.55;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

.report-comments-block {
  display: grid;
  gap: 10px;
  padding: 12px;
  border: 1px solid rgba(226, 232, 240, 0.92);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.72);
}

.report-comment-editor {
  margin-top: 0;
  padding: 14px;
  border: 1px solid rgba(37, 99, 235, 0.14);
  border-radius: var(--radius);
  background: rgba(234, 241, 255, 0.48);
}

.stat-value {
  font-size: clamp(28px, 4vw, 42px);
  font-weight: 700;
  color: var(--ink);
}

.stat-label {
  margin-top: 6px;
  color: var(--muted);
  font-size: 13px;
}

.trend {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: 14px;
  padding: 5px 8px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
}

.trend.good {
  background: var(--green-soft);
  color: var(--green);
}

.trend.warn {
  background: var(--orange-soft);
  color: #9c6100;
}

.trend.bad {
  background: var(--red-soft);
  color: var(--red);
}

.badge {
  display: inline-flex;
  align-items: center;
  min-height: 25px;
  padding: 3px 9px;
  border-radius: 999px;
  background: var(--soft);
  color: var(--muted);
  font-size: 12px;
  font-weight: 780;
  white-space: nowrap;
  border: 1px solid rgba(148, 163, 184, 0.14);
}

.badge.blue {
  background: var(--blue-soft);
  color: var(--blue);
}

.badge.green {
  background: var(--green-soft);
  color: var(--green);
}

.badge.orange {
  background: var(--orange-soft);
  color: #9c6100;
}

.badge.red {
  background: var(--red-soft);
  color: var(--red);
}

.badge.pink {
  background: rgba(255, 107, 122, 0.14);
  color: var(--coral);
}

.birthday-opening {
  position: fixed;
  inset: 0;
  z-index: 90;
  display: grid;
  place-items: center;
  padding: 18px;
  background: rgba(23, 20, 25, 0.58);
  backdrop-filter: blur(18px);
}

.birthday-card {
  position: relative;
  z-index: 1;
  width: min(620px, 100%);
  padding: clamp(22px, 5vw, 44px);
  border: 1px solid rgba(255, 255, 255, 0.72);
  border-radius: var(--radius);
  background:
    linear-gradient(135deg, rgba(255, 250, 242, 0.98), rgba(255, 255, 255, 0.92)),
    #fff;
  box-shadow: 0 30px 90px rgba(23, 20, 25, 0.28);
  text-align: center;
  overflow: hidden;
  animation: birthdayPop 520ms ease both;
}

.birthday-card::before {
  content: "";
  position: absolute;
  inset: -35% -10% auto;
  height: 62%;
  background: radial-gradient(circle at 50% 50%, rgba(255, 212, 90, 0.34), transparent 66%);
  pointer-events: none;
}

.birthday-card > * {
  position: relative;
  z-index: 1;
}

.birthday-card h2 {
  margin: 14px 0 10px;
  color: var(--ink);
  font-size: clamp(34px, 7vw, 62px);
  line-height: 1.04;
}

.birthday-card p {
  max-width: 500px;
  margin: 0 auto;
  color: var(--text);
  line-height: 1.7;
}

.birthday-card-meta {
  display: grid;
  gap: 5px;
  margin: 18px 0;
  color: var(--muted);
}

.birthday-card-meta strong {
  color: var(--coral);
  font-size: 20px;
}

.birthday-confetti {
  position: absolute;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
}

.birthday-confetti i {
  position: absolute;
  top: -12%;
  width: 10px;
  height: 18px;
  border-radius: 3px;
  background: var(--sun);
  animation: confettiFall 2.8s linear infinite;
}

.birthday-confetti i:nth-child(2n) {
  background: var(--coral);
}

.birthday-confetti i:nth-child(3n) {
  background: var(--mint);
}

.birthday-confetti i:nth-child(1) {
  left: 10%;
  animation-delay: 0s;
}

.birthday-confetti i:nth-child(2) {
  left: 22%;
  animation-delay: 0.45s;
}

.birthday-confetti i:nth-child(3) {
  left: 36%;
  animation-delay: 0.2s;
}

.birthday-confetti i:nth-child(4) {
  left: 49%;
  animation-delay: 0.72s;
}

.birthday-confetti i:nth-child(5) {
  left: 62%;
  animation-delay: 0.12s;
}

.birthday-confetti i:nth-child(6) {
  left: 76%;
  animation-delay: 0.55s;
}

.birthday-confetti i:nth-child(7) {
  left: 88%;
  animation-delay: 0.28s;
}

.birthday-confetti i:nth-child(8) {
  left: 95%;
  animation-delay: 0.82s;
}

.birthday-dashboard {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(190px, 0.28fr);
  gap: 16px;
  align-items: center;
  padding: clamp(18px, 4vw, 30px);
  border: 1px solid rgba(255, 107, 122, 0.22);
  border-radius: var(--radius);
  background:
    linear-gradient(135deg, rgba(255, 107, 122, 0.14), rgba(255, 212, 90, 0.18)),
    #fff;
  box-shadow: var(--shadow);
}

.birthday-dashboard h2 {
  margin: 8px 0 10px;
  color: var(--ink);
  font-size: clamp(26px, 4vw, 44px);
  line-height: 1.12;
}

.birthday-dashboard p {
  max-width: 720px;
  margin: 0;
  color: var(--text);
  line-height: 1.7;
}

.birthday-dashboard-side {
  display: grid;
  gap: 6px;
  justify-items: start;
  padding: 16px;
  border: 1px solid rgba(255, 107, 122, 0.16);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.72);
}

.birthday-dashboard-side strong {
  color: var(--coral);
  font-size: 28px;
  line-height: 1;
}

.birthday-dashboard-side span {
  color: var(--muted);
  font-size: 13px;
}

.module-status-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 10px;
}

.todo-list {
  display: grid;
  gap: 12px;
}

.todo-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 14px;
  align-items: center;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
  box-shadow: 0 10px 22px rgba(77, 55, 42, 0.045);
}

.todo-card.urgent {
  border-color: rgba(255, 149, 0, 0.38);
  background: linear-gradient(180deg, rgba(255, 247, 232, 0.96), #fff);
}

.todo-title-row {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.todo-card p {
  margin: 8px 0 0;
  color: var(--text);
  line-height: 1.55;
}

.todo-meta {
  margin-top: 8px;
  color: var(--muted);
  font-size: 12px;
}

.todo-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.report-detail-grid {
  display: grid;
  gap: 12px;
  margin-top: 14px;
}

.report-detail-grid > div,
.report-comment {
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
}

.report-detail-grid h3 {
  margin: 0 0 8px;
  font-size: 15px;
}

.report-detail-grid p,
.report-comment p {
  margin: 0;
  color: var(--text);
  line-height: 1.6;
  white-space: pre-wrap;
}

.review-list {
  display: grid;
  gap: 6px;
  margin: 0;
  padding-left: 18px;
  color: var(--text);
  line-height: 1.65;
}

.review-list li::marker {
  color: var(--accent);
}

.report-comments {
  display: grid;
  gap: 10px;
  margin-top: 14px;
}

.report-comment {
  display: grid;
  gap: 6px;
}

.report-comment.unread {
  border-color: rgba(0, 113, 227, 0.36);
  background: rgba(231, 241, 255, 0.72);
}

.report-comment span {
  color: var(--muted);
  font-size: 12px;
}

.report-performance-panel,
.daily-link-panel {
  display: grid;
  gap: 12px;
  margin-top: 14px;
  padding: 16px;
  border: 1px solid rgba(37, 99, 235, 0.16);
  border-radius: var(--radius);
  background:
    linear-gradient(180deg, rgba(234, 241, 255, 0.62), rgba(255, 255, 255, 0.88)),
    var(--surface);
  box-shadow: 0 10px 24px rgba(37, 99, 235, 0.045);
}

.report-performance-list,
.daily-link-list {
  display: grid;
  gap: 10px;
}

.report-performance-item,
.daily-link-row {
  display: grid;
  grid-template-columns: minmax(220px, 0.9fr) minmax(0, 0.8fr) minmax(0, 0.8fr);
  gap: 10px;
  align-items: start;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.86);
  box-shadow: 0 6px 16px rgba(15, 23, 42, 0.035);
}

.report-performance-item > div,
.daily-link-row > div:first-child {
  display: grid;
  gap: 4px;
}

.report-performance-item .field {
  gap: 6px;
}

.compact-field span {
  font-size: 11px;
}

.report-performance-item strong,
.daily-link-row strong {
  color: var(--ink);
}

.report-performance-item span,
.daily-link-row span {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
}

.report-link-hint {
  display: grid;
  gap: 4px;
  padding: 12px;
  border: 1px dashed rgba(217, 75, 85, 0.28);
  border-radius: var(--radius);
  background: rgba(255, 248, 238, 0.72);
}

.report-link-hint strong {
  color: var(--ink);
}

.report-link-hint span {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.55;
}

.supervisor-error-form {
  margin-top: 18px;
  padding: 16px;
  border: 1px solid rgba(217, 75, 85, 0.16);
  border-radius: var(--radius);
  background:
    linear-gradient(180deg, rgba(255, 248, 238, 0.78), rgba(255, 255, 255, 0.88)),
    var(--surface);
}

.daily-link-row {
  grid-template-columns: minmax(0, 1fr) auto;
}

.report-review-summary {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.report-review-summary span {
  padding: 5px 9px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.78);
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.report-review-list {
  display: grid;
  gap: 10px;
}

.report-review-item {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(150px, 0.75fr) minmax(118px, 0.55fr) auto;
  gap: 12px;
  align-items: center;
  padding: 12px;
  border: 1px solid var(--line);
  border-left: 4px solid rgba(148, 163, 184, 0.48);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.88);
  box-shadow: 0 8px 18px rgba(15, 23, 42, 0.035);
}

.report-review-item.status-accurate {
  border-left-color: var(--green);
}

.report-review-item.status-inaccurate {
  border-left-color: var(--red);
}

.report-review-item.status-pending {
  border-left-color: var(--orange);
}

.report-review-main {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr);
  gap: 10px;
  align-items: start;
}

.report-review-index {
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border-radius: 999px;
  background: var(--soft);
  color: var(--muted);
  font-size: 12px;
  font-weight: 850;
}

.report-review-main strong,
.report-review-data strong {
  color: var(--ink);
  overflow-wrap: anywhere;
}

.report-review-main p,
.report-review-data p,
.report-review-state p {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
  overflow-wrap: anywhere;
}

.report-review-data,
.report-review-state {
  display: grid;
  gap: 5px;
  min-width: 0;
}

.report-review-state > span:not(.badge) {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.35;
}

.report-review-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: flex-end;
}

.daily-link-stats {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 6px;
  flex-wrap: wrap;
}

.policy-library-grid {
  display: grid;
  gap: 14px;
}

.policy-document {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
  padding: 16px;
  box-shadow: 0 10px 22px rgba(77, 55, 42, 0.045);
}

.policy-document-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 14px;
  margin-bottom: 12px;
}

.policy-document h3 {
  margin: 8px 0 0;
  font-size: 20px;
}

.policy-body {
  color: var(--text);
  line-height: 1.8;
  white-space: pre-wrap;
}

.policy-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 14px;
  color: var(--muted);
  font-size: 12px;
}

.permission-toggle {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-width: 72px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

.permission-toggle input {
  width: 18px;
  height: 18px;
  accent-color: var(--blue);
}

.table-wrap {
  width: 100%;
  max-width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  border: 1px solid rgba(226, 232, 240, 0.96);
  border-radius: var(--radius);
  background: var(--surface-strong);
  box-shadow: 0 10px 26px rgba(15, 23, 42, 0.045);
}

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

th,
td {
  padding: 13px 14px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: top;
  font-size: 14px;
  line-height: 1.5;
}

th {
  color: var(--muted);
  font-size: 12px;
  font-weight: 820;
  background: linear-gradient(180deg, #f8fafc, #f3f6fa);
  white-space: nowrap;
}

tbody tr {
  transition: background 140ms ease;
}

tbody tr:hover td {
  background: rgba(248, 250, 252, 0.82);
}

tr:last-child td {
  border-bottom: 0;
}

tr.selected-row td {
  background: var(--blue-soft);
}

.compact-table table {
  min-width: 760px;
}

.org-table table {
  min-width: 1120px;
}

.org-department-row td {
  background: #fffaf2;
}

.org-dept-line {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.table-control {
  width: 100%;
  min-width: 150px;
  min-height: 36px;
}

.promotion-rule-control {
  min-width: 110px;
}

.schedule-time-input {
  min-width: 0;
}

.table-field {
  display: grid;
  gap: 6px;
  min-width: 170px;
}

.table-field-label {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.table-textarea {
  width: 100%;
  min-width: 320px;
  min-height: 88px;
}

.stacked-controls {
  display: grid;
  gap: 8px;
  min-width: 190px;
}

.embedded-form {
  align-content: start;
  margin-top: 0;
  padding: 16px;
  border: 1px solid rgba(235, 225, 215, 0.82);
  border-radius: var(--radius);
  background:
    linear-gradient(180deg, rgba(255, 250, 242, 0.78), rgba(255, 255, 255, 0.72)),
    var(--surface);
}

.form-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 260px), 1fr));
  gap: 16px;
}

.form-grid.three {
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 220px), 1fr));
}

.form-grid.four {
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 180px), 1fr));
}

.section-head.compact {
  align-items: center;
  margin-bottom: 10px;
  padding-bottom: 0;
  border-bottom: 0;
}

.payroll-console,
.payroll-form {
  display: grid;
  gap: 14px;
  min-width: 0;
}

.payroll-console-head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(260px, 360px);
  gap: 14px;
  align-items: stretch;
  padding: 14px;
  border: 1px solid rgba(47, 195, 162, 0.18);
  border-radius: var(--radius);
  background:
    linear-gradient(135deg, rgba(47, 195, 162, 0.1), rgba(255, 212, 90, 0.1)),
    rgba(255, 255, 255, 0.9);
}

.payroll-console-head h3 {
  margin: 9px 0 5px;
  color: var(--ink);
  font-size: 19px;
  line-height: 1.22;
}

.payroll-console-head p {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.5;
}

.payroll-control-grid {
  display: grid;
  grid-template-columns: minmax(220px, 1.2fr) minmax(170px, 0.72fr) minmax(170px, 0.72fr) minmax(200px, 0.9fr);
  gap: 12px;
}

.payroll-live-summary {
  display: grid;
  gap: 6px;
  align-content: center;
  min-height: 128px;
  padding: 12px;
  border: 1px solid rgba(226, 232, 240, 0.92);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.78);
}

.payroll-live-summary strong {
  color: var(--ink);
  font-size: clamp(30px, 3vw, 46px);
  line-height: 1;
  font-variant-numeric: tabular-nums;
}

.payroll-live-summary small {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.35;
}

.payroll-summary-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.payroll-summary-chips span {
  min-height: 24px;
  padding: 4px 8px;
  border-radius: 999px;
  background: var(--soft);
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.payroll-mini-breakdown {
  margin-top: 2px;
}

.payroll-mini-breakdown summary {
  cursor: pointer;
  color: var(--blue);
  font-size: 12px;
  font-weight: 850;
  list-style-position: inside;
}

.payroll-mini-breakdown .score-breakdown {
  margin-top: 8px;
  max-height: 260px;
  overflow: auto;
}

.ops-step-card {
  border: 1px solid rgba(226, 232, 240, 0.96);
  border-radius: var(--radius);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.92), rgba(248, 250, 252, 0.76)),
    var(--surface-strong);
  overflow: hidden;
}

.ops-step-card summary {
  display: grid;
  gap: 4px;
  cursor: pointer;
  padding: 13px 14px;
  color: var(--ink);
  font-weight: 850;
  list-style-position: inside;
}

.ops-step-card summary small {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
  line-height: 1.35;
}

.ops-step-body {
  display: grid;
  gap: 12px;
  padding: 0 14px 14px;
}

.ops-card-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
}

.inline-check {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 42px;
}

.ops-submit-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding-top: 2px;
  flex-wrap: wrap;
}

.payroll-adjust-panel {
  box-shadow: none;
  padding: 14px;
}

.payroll-adjust-list {
  display: grid;
  gap: 10px;
}

.payroll-adjust-row {
  display: grid;
  grid-template-columns: minmax(120px, 0.35fr) minmax(0, 1fr) auto;
  gap: 10px;
  align-items: end;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.68);
}

.payroll-adjust-row .secondary-btn {
  white-space: nowrap;
}

.secure-panel {
  max-width: 680px;
}

.secure-form {
  max-width: 420px;
}

.payslip-list {
  display: grid;
  gap: 14px;
}

.payslip-card {
  display: grid;
  gap: 14px;
  padding: clamp(16px, 3vw, 24px);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
  box-shadow: var(--shadow);
}

.payslip-card.compact {
  box-shadow: none;
}

.payslip-net {
  display: grid;
  gap: 6px;
  padding: 18px;
  border-radius: var(--radius);
  background: linear-gradient(135deg, rgba(255, 212, 90, 0.2), rgba(255, 107, 122, 0.12));
}

.payslip-net span {
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

.payslip-net strong {
  color: var(--ink);
  font-size: clamp(34px, 6vw, 58px);
  line-height: 1;
}

.password-modal {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: grid;
  place-items: center;
  padding: 18px;
  background: rgba(23, 20, 25, 0.52);
  backdrop-filter: blur(16px);
}

.password-modal-card {
  width: min(460px, 100%);
  display: grid;
  gap: 14px;
  padding: 20px;
  border: 1px solid rgba(255, 255, 255, 0.72);
  border-radius: var(--radius);
  background: var(--surface-strong);
  box-shadow: 0 24px 70px rgba(23, 20, 25, 0.28);
}

.app-drawer-backdrop {
  position: fixed;
  inset: 0;
  z-index: 120;
  display: flex;
  justify-content: flex-end;
  background: rgba(15, 23, 42, 0.32);
  backdrop-filter: blur(10px);
}

.app-drawer {
  width: min(760px, calc(100vw - 28px));
  height: 100%;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  border-left: 1px solid rgba(226, 232, 240, 0.92);
  background: var(--surface-strong);
  box-shadow: -24px 0 64px rgba(15, 23, 42, 0.24);
}

.app-drawer-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
  padding: 18px;
  border-bottom: 1px solid var(--line);
}

.app-drawer-head h2 {
  margin: 8px 0 0;
  color: var(--ink);
  font-size: 22px;
  line-height: 1.22;
}

.app-drawer-body {
  min-height: 0;
  overflow: auto;
  padding: 18px;
}

.app-drawer-body > .panel,
.app-drawer-body .report-detail-panel > .panel {
  box-shadow: none;
}

.drawer-stack {
  display: grid;
  gap: 12px;
}

.drawer-info-card {
  display: grid;
  gap: 8px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(248, 250, 252, 0.78);
}

.drawer-info-card span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 850;
}

.drawer-info-card strong {
  color: var(--ink);
  font-size: 18px;
  line-height: 1.25;
}

.drawer-info-card small,
.drawer-info-card p {
  margin: 0;
  color: var(--text);
  line-height: 1.6;
}

.module-review-card {
  width: min(1120px, 100%);
  max-height: min(86vh, 920px);
  overflow: auto;
}

.module-review-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
}

.module-review-meta {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}

.module-review-meta > div,
.module-change-box {
  display: grid;
  gap: 8px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
}

.module-review-meta span,
.module-change-box h4 {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.module-change-list,
.module-change-section {
  display: grid;
  gap: 12px;
}

.module-change-section h3 {
  margin: 8px 0 0;
  color: var(--ink);
  font-size: 17px;
}

.module-change-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.module-change-box pre {
  max-height: 260px;
  overflow: auto;
  margin: 0;
  white-space: pre-wrap;
  word-break: break-word;
  color: var(--text);
  font: inherit;
  line-height: 1.6;
}

.module-change-table {
  max-height: 360px;
}

.module-change-table table {
  min-width: 760px;
}

.module-diff-summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
}

.compact-btn {
  min-height: 34px;
  padding: 0 12px;
  font-size: 13px;
}

.performance-workbench {
  display: block;
}

.performance-score-form {
  margin-top: 0;
  min-width: 0;
}

.performance-score-head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(180px, 240px);
  gap: 14px;
  align-items: stretch;
  padding: 12px;
  border: 1px solid rgba(37, 99, 235, 0.14);
  border-radius: var(--radius);
  background:
    linear-gradient(135deg, rgba(37, 99, 235, 0.08), rgba(47, 195, 162, 0.08)),
    rgba(255, 255, 255, 0.9);
}

.performance-score-head h3 {
  margin: 8px 0 4px;
  color: var(--ink);
  font-size: 18px;
  line-height: 1.22;
}

.performance-score-head p {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.55;
}

.performance-live-summary {
  display: grid;
  gap: 4px;
  align-content: center;
  min-height: 92px;
  padding: 12px;
  border: 1px solid rgba(226, 232, 240, 0.92);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.76);
}

.performance-live-summary strong {
  color: var(--ink);
  font-size: 38px;
  line-height: 1;
}

.performance-live-summary small {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.35;
}

.score-context-grid {
  grid-template-columns: minmax(0, 1fr) minmax(180px, 0.38fr);
}

.score-card-list {
  display: grid;
  gap: 8px;
  max-height: min(58vh, 620px);
  overflow: auto;
  padding-right: 4px;
}

.score-item-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(168px, 0.34fr);
  gap: 7px 12px;
  align-items: center;
  padding: 10px 12px;
  border: 1px solid rgba(226, 232, 240, 0.92);
  border-left: 3px solid rgba(37, 99, 235, 0.34);
  border-radius: var(--radius);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.94), rgba(248, 250, 252, 0.8)),
    var(--surface-strong);
  box-shadow: 0 8px 18px rgba(15, 23, 42, 0.035);
}

.score-item-title {
  color: var(--ink) !important;
  font-size: 14px !important;
  font-weight: 850 !important;
  min-width: 0;
  overflow-wrap: anywhere;
}

.score-item-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  justify-content: flex-end;
}

.score-item-meta span,
.score-state-badge {
  width: fit-content;
  min-height: 24px;
  padding: 3px 8px;
  border-radius: 999px;
  background: var(--soft);
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.score-input-row {
  display: grid;
  grid-template-columns: minmax(96px, 1fr) 62px;
  gap: 10px;
  align-items: center;
}

.score-item-card .score-reference {
  grid-column: 1 / -1;
  margin: 0;
  line-height: 1.35;
}

.daily-evidence-box {
  border: 1px solid rgba(226, 232, 240, 0.92);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.72);
  overflow: hidden;
}

.daily-evidence-box summary {
  cursor: pointer;
  padding: 11px 12px;
  color: var(--ink);
  font-size: 13px;
  font-weight: 850;
  list-style-position: inside;
}

.daily-evidence-box > div {
  padding: 0 12px 12px;
}

.score-state-badge::before {
  content: "未填写";
}

.score-input:not(:placeholder-shown) + .score-state-badge {
  background: var(--green-soft);
  color: var(--green);
}

.score-input:not(:placeholder-shown) + .score-state-badge::before {
  content: "已填写";
}

.score-result {
  display: grid;
  gap: 12px;
  align-content: start;
  min-height: 100%;
  padding: 18px;
  border: 1px solid rgba(226, 232, 240, 0.96);
  border-radius: var(--radius);
  background:
    linear-gradient(180deg, rgba(248, 250, 252, 0.96), rgba(255, 255, 255, 0.96)),
    var(--surface-strong);
  box-shadow: 0 12px 28px rgba(15, 23, 42, 0.055);
}

.score-number {
  font-size: clamp(46px, 8vw, 82px);
  font-weight: 700;
  line-height: 1;
  color: var(--ink);
}

.score-number.pending {
  color: var(--muted);
}

.score-input:placeholder-shown {
  border-color: rgba(244, 162, 31, 0.46);
  background: var(--orange-soft);
}

.score-reference {
  color: var(--muted);
  font-size: 12px;
  font-style: normal;
  line-height: 1.45;
}

.score-breakdown {
  display: grid;
  gap: 8px;
}

.break-row {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  color: var(--muted);
  font-size: 13px;
}

.break-row strong {
  color: var(--text);
}

.break-row.pending strong {
  color: var(--orange);
}

.timeline {
  display: grid;
  gap: 10px;
}

.timeline-item {
  display: grid;
  grid-template-columns: 108px minmax(0, 1fr);
  gap: 12px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
  box-shadow: 0 10px 22px rgba(77, 55, 42, 0.045);
}

.timeline-time {
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

.timeline-title {
  font-weight: 700;
}

.timeline-text {
  margin-top: 4px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.45;
}

.ability-list {
  display: grid;
  gap: 8px;
  margin: 10px 0 0;
  padding: 0;
  list-style: none;
}

.ability-list li {
  position: relative;
  padding-left: 18px;
  color: var(--muted);
  line-height: 1.5;
  font-size: 13px;
}

.ability-list li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.65em;
  width: 6px;
  height: 6px;
  border-radius: 999px;
  background: var(--blue);
}

.level-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(292px, 1fr));
  gap: 16px;
}

.level-card {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(255, 250, 242, 0.82)),
    #fff;
  padding: 16px;
  box-shadow: 0 12px 28px rgba(77, 55, 42, 0.06);
}

.level-head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
}

.level-code {
  font-size: 20px;
  font-weight: 800;
}

.empty {
  display: grid;
  place-items: center;
  min-height: 180px;
  color: var(--muted);
  border: 1px dashed var(--line);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.52);
}

.toast {
  position: fixed;
  right: 18px;
  bottom: 18px;
  z-index: 100;
  max-width: min(420px, calc(100vw - 36px));
  transform: translateY(20px);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(29, 29, 31, 0.92);
  color: #fff;
  opacity: 0;
  padding: 12px 14px;
  box-shadow: var(--shadow);
  pointer-events: none;
  transition: opacity 180ms ease, transform 180ms ease;
}

.toast.show {
  transform: translateY(0);
  opacity: 1;
}

@keyframes birthdayPop {
  from {
    opacity: 0;
    transform: translateY(18px) scale(0.96);
  }

  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@keyframes confettiFall {
  from {
    transform: translateY(-12vh) rotate(0deg);
    opacity: 1;
  }

  to {
    transform: translateY(118vh) rotate(360deg);
    opacity: 0.2;
  }
}

.mobile-only {
  display: none;
}

[data-theme="dark"] .brand-mark {
  border-color: rgba(255, 255, 255, 0.14);
  background: linear-gradient(135deg, #fffaf2 0 52%, #ff8796 52% 100%);
  color: #171419;
}

[data-theme="dark"] .auth-panel,
[data-theme="dark"] .metric-chip,
[data-theme="dark"] .stage-shelf,
[data-theme="dark"] .panel,
[data-theme="dark"] .card {
  border-color: rgba(255, 255, 255, 0.1);
  background: linear-gradient(180deg, rgba(37, 33, 43, 0.96), rgba(31, 28, 35, 0.9));
  box-shadow: var(--shadow);
}

[data-theme="dark"] .sidebar {
  background: linear-gradient(180deg, rgba(31, 28, 35, 0.96), rgba(25, 22, 29, 0.92));
}

[data-theme="dark"] .topbar {
  border-bottom-color: rgba(255, 255, 255, 0.1);
  background: rgba(19, 17, 22, 0.82);
}

[data-theme="dark"] .section-head {
  border-bottom-color: rgba(255, 255, 255, 0.1);
}

[data-theme="dark"] .input,
[data-theme="dark"] .select,
[data-theme="dark"] .textarea,
[data-theme="dark"] .secondary-btn,
[data-theme="dark"] .theme-toggle,
[data-theme="dark"] .icon-btn,
[data-theme="dark"] .user-pill,
[data-theme="dark"] .table-wrap,
[data-theme="dark"] .reports-review-pane,
[data-theme="dark"] .report-form-strip,
[data-theme="dark"] .report-kpi-card,
[data-theme="dark"] .report-meta-card,
[data-theme="dark"] .report-writing-card,
[data-theme="dark"] .report-detail-hero,
[data-theme="dark"] .report-metric,
[data-theme="dark"] .report-story-card,
[data-theme="dark"] .report-comments-block,
[data-theme="dark"] .report-comment-editor,
[data-theme="dark"] .report-review-item,
[data-theme="dark"] .performance-score-head,
[data-theme="dark"] .performance-live-summary,
[data-theme="dark"] .payroll-console-head,
[data-theme="dark"] .payroll-live-summary,
[data-theme="dark"] .ops-step-card,
[data-theme="dark"] .score-item-card,
[data-theme="dark"] .daily-evidence-box,
[data-theme="dark"] .level-card,
[data-theme="dark"] .app-drawer,
[data-theme="dark"] .drawer-info-card,
[data-theme="dark"] .policy-document,
[data-theme="dark"] .payroll-adjust-row,
[data-theme="dark"] .todo-card,
[data-theme="dark"] .report-detail-grid > div,
[data-theme="dark"] .report-comment,
[data-theme="dark"] .tenure-clock,
[data-theme="dark"] .tenure-piece,
[data-theme="dark"] .timeline-item,
[data-theme="dark"] .birthday-card,
[data-theme="dark"] .birthday-dashboard,
[data-theme="dark"] .birthday-dashboard-side,
[data-theme="dark"] .payslip-card,
[data-theme="dark"] .password-modal-card {
  border-color: var(--line);
  background: var(--surface-strong);
  color: var(--text);
}

[data-theme="dark"] .todo-card.urgent,
[data-theme="dark"] .report-comment.unread {
  background: rgba(45, 40, 31, 0.92);
}

[data-theme="dark"] .input:focus,
[data-theme="dark"] .select:focus,
[data-theme="dark"] .textarea:focus {
  border-color: rgba(116, 167, 255, 0.8);
  box-shadow: 0 0 0 4px rgba(116, 167, 255, 0.16);
  background: #282430;
}

[data-theme="dark"] .tenure-piece.accent {
  background: #0f0d13;
}

[data-theme="dark"] .tenure-piece.hero-note {
  background: #0f0d13;
}

[data-theme="dark"] .birthday-card h2,
[data-theme="dark"] .birthday-dashboard h2,
[data-theme="dark"] .payslip-net strong {
  color: var(--text);
}

[data-theme="dark"] .growth-path span {
  background: rgba(255, 255, 255, 0.08);
}

[data-theme="dark"] .auth-tab.active,
[data-theme="dark"] .segment-btn.active,
[data-theme="dark"] .nav-group-summary:hover,
[data-theme="dark"] .nav-group-summary.active,
[data-theme="dark"] .nav-btn:hover,
[data-theme="dark"] .nav-btn.active {
  background: #2d2731;
  color: var(--text);
}

[data-theme="dark"] th,
[data-theme="dark"] .org-department-row td,
[data-theme="dark"] .score-result {
  background: #211d27;
}

[data-theme="dark"] .panel .panel {
  background: rgba(36, 32, 42, 0.66);
}

[data-theme="dark"] .embedded-form {
  border-color: var(--line);
  background: rgba(36, 32, 42, 0.58);
}

[data-theme="dark"] .report-performance-panel,
[data-theme="dark"] .daily-link-panel {
  border-color: var(--line);
  background: rgba(36, 32, 42, 0.62);
}

[data-theme="dark"] .report-link-hint,
[data-theme="dark"] .supervisor-error-form {
  border-color: var(--line);
  background: rgba(45, 40, 31, 0.62);
}

[data-theme="dark"] .report-performance-item,
[data-theme="dark"] .daily-link-row,
[data-theme="dark"] .report-review-summary span {
  background: rgba(31, 28, 35, 0.9);
}

[data-theme="dark"] .daily-evidence-box > div {
  background: rgba(36, 32, 42, 0.5);
}

[data-theme="dark"] .report-kpi-card.is-warn,
[data-theme="dark"] .report-story-card.is-warning {
  border-color: rgba(255, 211, 107, 0.22);
  background: rgba(45, 40, 31, 0.72);
}

[data-theme="dark"] tbody tr:hover td {
  background: rgba(255, 255, 255, 0.04);
}

[data-theme="dark"] .empty {
  background: rgba(36, 32, 42, 0.62);
}

[data-theme="dark"] .dashboard-hero {
  border-color: rgba(255, 255, 255, 0.1);
  background:
    linear-gradient(135deg, rgba(255, 135, 150, 0.18), rgba(115, 227, 192, 0.12)),
    #171419;
}

@media (max-width: 1280px) {
  .reports-workbench {
    grid-template-columns: 1fr;
  }

  .reports-review-pane {
    position: static;
    max-height: none;
    overflow: visible;
  }
}

@media (max-width: 1080px) {
  .grid.cols-4,
  .grid.cols-3 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .report-workbench-kpis {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .reports-workbench {
    grid-template-columns: 1fr;
  }

  .reports-review-pane {
    position: static;
    max-height: none;
    overflow: visible;
  }
}

@media (max-width: 860px) {
  .auth-shell {
    grid-template-columns: 1fr;
    align-items: start;
  }

  .auth-panel {
    justify-self: stretch;
    width: 100%;
  }

  .auth-metrics {
    grid-template-columns: 1fr;
  }

  .auth-stage,
  .dashboard-hero,
  .tenure-clock,
  .birthday-dashboard {
    grid-template-columns: 1fr;
  }

  .dashboard-prize {
    min-height: 150px;
  }

  .tenure-clock {
    padding: 16px;
  }

  .tenure-grid {
    grid-template-columns: 1fr;
  }

  .tenure-piece:first-child,
  .tenure-piece:nth-child(2),
  .tenure-piece:nth-child(3),
  .tenure-piece.hero-note,
  .tenure-piece.accent {
    grid-column: auto;
    grid-row: auto;
  }

  .app-frame {
    grid-template-columns: 1fr;
    width: 100%;
    max-width: 100vw;
    overflow-x: hidden;
  }

  .sidebar {
    position: static;
    height: auto;
    width: 100%;
    max-width: 100vw;
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .main,
  .topbar,
  .content,
  .app-footer {
    width: 100%;
    max-width: 100vw;
    min-width: 0;
  }

  .sidebar-head {
    padding: 14px 16px;
  }

  .sidebar .brand-caption {
    display: none;
  }

  .nav {
    display: grid;
    overflow-x: visible;
    overflow-y: visible;
    padding: 10px 12px;
    scroll-snap-type: none;
  }

  .nav-btn {
    width: 100%;
    min-width: 0;
    scroll-snap-align: none;
  }

  .nav-group-items {
    padding-left: 8px;
  }

  .sidebar-foot {
    display: none;
  }

  .mobile-only {
    display: inline-flex;
  }

  .topbar {
    position: static;
    align-items: flex-start;
    flex-wrap: wrap;
    padding: 12px;
  }

  .topbar .toolbar {
    width: 100%;
    justify-content: flex-start;
  }

  .page-title {
    font-size: 24px;
  }

  .content {
    gap: 12px;
    padding: 12px;
  }

  .app-footer {
    padding: 0 12px 16px;
  }

  .content > *,
  .grid,
  .panel,
  .card,
  .score-result,
  .level-card {
    width: 100%;
    max-width: 100%;
    min-width: 0;
  }

  .section-head {
    display: grid;
    grid-template-columns: 1fr;
  }

  .section-head > .segmented,
  .section-head > .toolbar,
  .section-head > .field,
  .field[style] {
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
  }

  .section-head > .segmented {
    display: flex;
    overflow-x: auto;
    padding-bottom: 4px;
    scroll-snap-type: x proximity;
  }

  .section-head > .segmented .segment-btn {
    flex: 0 0 112px;
    scroll-snap-align: start;
  }

  .grid.cols-2,
  .grid.cols-3,
  .grid.cols-4,
  .form-grid,
  .form-grid.three,
  .form-grid.four,
  .report-workbench-kpis,
  .report-meta-card,
  .report-writing-grid,
  .report-metrics-row,
  .performance-score-head,
  .score-context-grid,
  .payroll-console-head,
  .payroll-control-grid,
  .reports-review-pane .grid.cols-3,
  .report-form-strip,
  .report-performance-item,
  .report-review-item,
  .daily-link-row,
  .payroll-adjust-row {
    grid-template-columns: 1fr;
  }

  .score-card-list {
    max-height: none;
    overflow: visible;
    padding-right: 0;
  }

  .score-item-card {
    grid-template-columns: 1fr;
  }

  .score-item-meta {
    justify-content: flex-start;
  }

  .report-form-meta {
    justify-content: flex-start;
  }

  .report-submit-bar,
  .report-review-actions,
  .ops-submit-bar {
    align-items: stretch;
    flex-direction: column;
  }

  .report-submit-bar .primary-btn,
  .report-review-actions .primary-btn,
  .report-review-actions .danger-btn,
  .ops-submit-bar .primary-btn,
  .ops-card-actions .secondary-btn {
    width: 100%;
  }

  .app-drawer-backdrop {
    align-items: stretch;
    padding: 0;
  }

  .app-drawer {
    width: 100vw;
  }

  .app-drawer-head,
  .app-drawer-body {
    padding: 14px;
  }

  .reports-compose-pane .report-performance-list {
    max-height: none;
    overflow: visible;
    padding-right: 0;
  }

  .daily-link-stats {
    justify-content: flex-start;
  }

  .todo-card {
    grid-template-columns: 1fr;
  }

  .todo-actions {
    justify-content: flex-start;
  }

  .timeline-item {
    grid-template-columns: 1fr;
  }

  .table-field,
  .stacked-controls {
    width: 100%;
    min-width: 0;
  }

  .table-control {
    min-width: 0;
  }

  .table-textarea {
    min-width: 0;
  }

  .org-table table {
    min-width: 760px;
  }
}

@media (max-width: 560px) {
  .auth-shell {
    padding: 16px;
  }

  .auth-title {
    font-size: 40px;
  }

  .auth-stage {
    display: none;
  }

  .dashboard-hero {
    min-height: auto;
    padding: 14px;
  }

  .birthday-card {
    padding: 20px 16px;
  }

  .birthday-dashboard {
    padding: 16px;
  }

  .birthday-dashboard-side {
    padding: 12px;
  }

  .dashboard-hero h2 {
    font-size: 26px;
  }

  .dashboard-prize {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 8px;
    min-height: auto;
  }

  .dashboard-prize .prize-card {
    position: static;
    width: auto;
    min-height: 88px;
  }

  .prize-card strong {
    font-size: 28px;
  }

  .auth-panel,
  .panel,
  .card {
    padding: 14px;
  }

  .topbar {
    display: grid;
  }

  .toolbar {
    justify-content: flex-start;
    gap: 8px;
  }

  .content {
    padding: 14px;
  }

  .table-wrap:not(.org-table) {
    overflow: visible;
    border: 0;
    background: transparent;
  }

  .table-wrap:not(.org-table) table,
  .table-wrap:not(.org-table) thead,
  .table-wrap:not(.org-table) tbody,
  .table-wrap:not(.org-table) tr,
  .table-wrap:not(.org-table) td {
    display: block;
    width: 100%;
    min-width: 0;
  }

  .table-wrap:not(.org-table) thead {
    display: none;
  }

  .table-wrap:not(.org-table) tr {
    display: grid;
    gap: 9px;
    margin-bottom: 10px;
    padding: 12px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: var(--surface-strong);
    box-shadow: 0 10px 22px rgba(77, 55, 42, 0.05);
  }

  .table-wrap:not(.org-table) td {
    display: grid;
    grid-template-columns: minmax(82px, 34%) minmax(0, 1fr);
    gap: 8px;
    align-items: start;
    padding: 0;
    border: 0;
    font-size: 13px;
    overflow-wrap: anywhere;
  }

  .table-wrap:not(.org-table) td::before {
    content: attr(data-label);
    color: var(--muted);
    font-size: 12px;
    font-weight: 800;
    line-height: 1.45;
  }

  .table-wrap:not(.org-table) td[colspan] {
    display: block;
  }

  .table-wrap:not(.org-table) td[colspan]::before {
    display: none;
  }

  .table-wrap:not(.org-table) td > * {
    min-width: 0;
  }

  .org-table {
    overflow-x: auto;
  }

  .org-table table {
    min-width: 680px;
  }

  th,
  td {
    padding: 10px;
  }

  .table-wrap:not(.org-table) td {
    padding: 0;
    border: 0;
  }

  .auth-panel-head {
    display: grid;
  }

  .theme-toggle {
    width: fit-content;
  }

  .segmented,
  .auth-tabs {
    gap: 3px;
  }

  .subpage-tabs {
    display: flex;
    overflow-x: auto;
    padding-bottom: 4px;
    scroll-snap-type: x proximity;
  }

  .subpage-tabs .segment-btn {
    flex: 0 0 128px;
    scroll-snap-align: start;
  }

  .segment-btn,
  .auth-tab {
    padding: 9px 8px;
  }

  .module-review-meta,
  .module-change-grid {
    grid-template-columns: 1fr;
  }

  .module-review-card {
    max-height: 92vh;
    padding: 14px;
  }

  .module-review-head {
    display: grid;
  }

  .module-change-table {
    overflow: auto;
  }
}

/* Final login overrides */
.auth-shell {
  position: relative;
  grid-template-columns: minmax(0, 1fr) minmax(380px, 452px);
  gap: clamp(24px, 4vw, 56px);
  align-items: center;
  background:
    linear-gradient(115deg, rgba(255, 255, 255, 0.86) 0%, rgba(245, 247, 251, 0.74) 46%, rgba(232, 239, 248, 0.72) 100%),
    repeating-linear-gradient(90deg, rgba(15, 23, 42, 0.035) 0 1px, transparent 1px 96px);
}

.auth-story {
  max-width: 760px;
}

.brand-lockup {
  margin-bottom: 42px;
}

.brand-mark {
  width: 46px;
  height: 46px;
  border-color: rgba(17, 24, 39, 0.08);
  background: linear-gradient(135deg, #111827 0 48%, #ff7282 48% 100%);
  box-shadow: 0 16px 34px rgba(17, 24, 39, 0.16);
}

.auth-title {
  max-width: 760px;
  margin-top: 22px;
  font-size: clamp(42px, 6.4vw, 76px);
}

.auth-subtitle {
  max-width: 610px;
  margin-top: 20px;
  font-size: clamp(16px, 1.8vw, 20px);
}

.auth-highlights {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  max-width: 700px;
  margin-top: 38px;
}

.auth-highlight-card {
  min-height: 132px;
  display: grid;
  align-content: start;
  gap: 8px;
  padding: 16px;
  border: 1px solid rgba(226, 232, 240, 0.94);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.78);
  box-shadow: 0 14px 34px rgba(15, 23, 42, 0.07);
}

.auth-highlight-card span {
  color: var(--coral);
  font-size: 12px;
  font-weight: 900;
}

.auth-highlight-card strong {
  color: var(--ink);
  font-size: 17px;
}

.auth-highlight-card small {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.55;
}

.auth-eyebrow {
  width: fit-content;
  min-height: 32px;
  display: inline-flex;
  align-items: center;
  padding: 0 12px;
  border: 1px solid rgba(31, 41, 55, 0.08);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.72);
  color: #5f6673;
  font-size: 12px;
  font-weight: 800;
  box-shadow: 0 10px 22px rgba(15, 23, 42, 0.05);
}

.auth-preview {
  max-width: 700px;
  margin-top: 14px;
  padding: 16px;
  border: 1px solid rgba(226, 232, 240, 0.92);
  border-radius: var(--radius);
  background: linear-gradient(135deg, rgba(17, 24, 39, 0.94), rgba(35, 42, 57, 0.94));
  color: #fff;
  box-shadow: 0 20px 48px rgba(17, 24, 39, 0.18);
}

.auth-preview-head,
.auth-preview-grid {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.auth-preview-head span,
.auth-preview-grid small {
  color: rgba(255, 255, 255, 0.62);
  font-size: 12px;
  font-weight: 760;
}

.auth-preview-grid {
  margin-top: 18px;
}

.auth-preview-grid div {
  flex: 1;
  display: grid;
  gap: 5px;
  min-height: 72px;
  padding: 12px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.06);
}

.auth-preview-line {
  display: grid;
  gap: 8px;
  margin-top: 14px;
}

.auth-preview-line span {
  height: 6px;
  border-radius: 999px;
  background: linear-gradient(90deg, #73e3c0, #ffd36b, #ff8796);
}

.auth-preview-line span:nth-child(2) {
  width: 74%;
  opacity: 0.72;
}

.auth-preview-line span:nth-child(3) {
  width: 52%;
  opacity: 0.44;
}

.auth-panel {
  width: min(100%, 452px);
  padding: 30px;
  border-color: rgba(226, 232, 240, 0.9);
  background: rgba(255, 255, 255, 0.88);
  box-shadow: 0 30px 80px rgba(15, 23, 42, 0.14);
}

.auth-panel-head {
  align-items: center;
}

.panel-title {
  font-size: 28px;
}

.panel-subtitle {
  margin-bottom: 18px;
}

.auth-tabs {
  margin-top: 2px;
  border-color: rgba(226, 232, 240, 0.9);
  background: rgba(241, 245, 249, 0.9);
}

.auth-tab {
  min-height: 42px;
  font-weight: 850;
}

.auth-tab.active {
  background: #111827;
  color: #fff;
  box-shadow: 0 10px 24px rgba(17, 24, 39, 0.16);
}

.auth-assurance {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
}

.auth-assurance span {
  min-height: 28px;
  display: inline-flex;
  align-items: center;
  padding: 0 10px;
  border: 1px solid rgba(226, 232, 240, 0.88);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.72);
  color: var(--muted);
  font-size: 12px;
  font-weight: 760;
}

.auth-form {
  gap: 13px;
  margin-top: 18px;
}

.auth-input {
  min-height: 48px;
}

.auth-submit {
  width: 100%;
  min-height: 48px;
  margin-top: 4px;
}

.auth-hint {
  margin: 0;
  text-align: center;
}

[data-theme="dark"] .auth-shell {
  background:
    linear-gradient(115deg, rgba(19, 17, 22, 0.96) 0%, rgba(28, 24, 33, 0.94) 58%, rgba(15, 13, 19, 0.94) 100%),
    repeating-linear-gradient(90deg, rgba(255, 255, 255, 0.035) 0 1px, transparent 1px 96px);
}

[data-theme="dark"] .auth-eyebrow,
[data-theme="dark"] .auth-highlight-card,
[data-theme="dark"] .auth-assurance span {
  border-color: rgba(255, 255, 255, 0.1);
  background: rgba(36, 32, 42, 0.78);
}

[data-theme="dark"] .auth-preview {
  border-color: rgba(255, 255, 255, 0.1);
  background: linear-gradient(135deg, rgba(15, 13, 19, 0.96), rgba(37, 33, 43, 0.96));
}

[data-theme="dark"] .auth-tab.active {
  background: #fffaf2;
  color: #171419;
}

@media (max-width: 860px) {
  .auth-shell {
    grid-template-columns: 1fr;
    align-items: start;
    gap: 18px;
  }

  .auth-story {
    max-width: none;
  }

  .auth-highlights {
    grid-template-columns: 1fr;
  }

  .auth-preview {
    display: none;
  }

  .auth-panel {
    justify-self: stretch;
    width: 100%;
  }
}

@media (max-width: 560px) {
  .auth-shell {
    padding: 14px;
  }

  .brand-lockup {
    margin-bottom: 24px;
  }

  .auth-title {
    font-size: 36px;
  }

  .auth-subtitle {
    font-size: 15px;
  }

  .auth-highlights {
    display: none;
  }

  .auth-panel {
    padding: 16px;
  }

  .auth-panel-head {
    display: grid;
  }
}
