:root {
  color-scheme: light;
  --ink: #1f2329;
  --muted: #667085;
  --line: #dfe3ea;
  --paper: #f3f5f9;
  --panel: #ffffff;
  --accent: #0052d9;
  --accent-dark: #003cab;
  --soft: #eaf2ff;
  --success: #00a870;
  --warning: #f79009;
  --shadow: 0 8px 20px rgba(31, 35, 41, 0.06);
}

* {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100dvh;
  color: var(--ink);
  font-family:
    ui-sans-serif,
    -apple-system,
    BlinkMacSystemFont,
    "SF Pro Display",
    "PingFang SC",
    "Microsoft YaHei",
    sans-serif;
  background:
    linear-gradient(90deg, rgba(17, 24, 39, 0.035) 1px, transparent 1px) 0 0 / 52px 52px,
    linear-gradient(180deg, #ffffff 0%, var(--paper) 56%, #f3f4f6 100%);
}

button,
input,
select {
  font: inherit;
}

a {
  color: inherit;
  text-decoration: none;
}

.shell {
  width: min(1440px, calc(100% - 40px));
  margin: 0 auto;
}

.workbench-shell {
  display: grid;
  grid-template-columns: 232px minmax(0, 1fr);
  min-height: 100dvh;
}

.workspace-sidebar {
  position: sticky;
  top: 0;
  height: 100dvh;
  display: flex;
  flex-direction: column;
  gap: 22px;
  border-right: 1px solid rgba(23, 32, 51, 0.08);
  background: rgba(255, 255, 255, 0.86);
  padding: 24px 14px;
  backdrop-filter: blur(18px);
}

.workspace-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 4px 8px 18px;
  border-bottom: 1px solid rgba(23, 32, 51, 0.08);
}

.workspace-mark {
  width: 40px;
  height: 40px;
  border-radius: 8px;
  background: #202123;
  box-shadow: 0 10px 24px rgba(17, 24, 39, 0.12);
}

.workspace-brand strong {
  display: block;
  font-size: 18px;
  letter-spacing: 0;
}

.workspace-brand small {
  display: block;
  margin-top: 3px;
  color: var(--muted);
  font-size: 12px;
}

.workspace-nav {
  display: grid;
  gap: 8px;
}

.workspace-nav-button {
  width: 100%;
  border: 0;
  border-radius: 8px;
  padding: 13px 14px;
  color: var(--muted);
  background: transparent;
  font-weight: 760;
  text-align: left;
  cursor: pointer;
}

.workspace-nav-button:hover,
.workspace-nav-button.active {
  color: var(--accent-dark);
  background: var(--soft);
}

.workspace-nav-button.active {
  box-shadow: inset 3px 0 0 var(--accent);
}

.workspace-status {
  margin: auto 8px 0;
  color: var(--success);
  font-size: 13px;
}

.workspace-content {
  min-width: 0;
  min-height: 100dvh;
  position: relative;
}

.workspace-empty {
  min-height: 100dvh;
  display: grid;
  place-items: center;
  color: #344054;
  font-size: 48px;
  font-weight: 760;
}

.workspace-content .app-shell {
  width: min(1280px, calc(100% - 48px));
}

.entry-screen {
  min-height: 100dvh;
  display: grid;
  place-items: center;
  padding: 28px;
}

.entry-inner {
  width: min(980px, 100%);
}

.entry-inner h1 {
  max-width: 760px;
  margin: 0;
  font-size: clamp(44px, 6vw, 82px);
  line-height: 0.98;
  letter-spacing: 0;
}

.entry-inner p:not(.kicker) {
  max-width: 680px;
  margin: 24px 0 0;
  color: var(--muted);
  font-size: 19px;
  line-height: 1.6;
}

.entry-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
  margin-top: 42px;
}

.entry-card {
  min-height: 170px;
  border: 1px solid rgba(16, 18, 20, 0.1);
  border-radius: 28px;
  padding: 26px;
  color: var(--ink);
  background: rgba(255, 255, 255, 0.88);
  box-shadow: var(--shadow);
  text-align: left;
  cursor: pointer;
  transition:
    transform 180ms ease,
    border-color 180ms ease,
    background 180ms ease;
}

.entry-card:hover {
  transform: translateY(-3px);
  border-color: rgba(17, 24, 39, 0.32);
  background: #fff;
}

.entry-card span {
  display: block;
  font-size: 28px;
  font-weight: 820;
}

.entry-card small {
  display: block;
  margin-top: 14px;
  color: var(--muted);
  font-size: 15px;
  line-height: 1.55;
}

.topbar {
  position: relative;
  top: 0;
  z-index: 5;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  height: 72px;
}

.topbar::before {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  left: calc((100vw - 232px - 100%) / -2);
  z-index: -1;
  width: calc(100vw - 232px);
  height: 100%;
  border-bottom: 1px solid rgba(16, 18, 20, 0.08);
  background: rgba(247, 248, 247, 0.82);
  backdrop-filter: blur(18px);
}

.brand,
.nav {
  display: flex;
  align-items: center;
}

.brand {
  gap: 10px;
  font-weight: 760;
  letter-spacing: 0.01em;
}

.brand-mark {
  display: block;
  width: 28px;
  height: 28px;
  border-radius: 7px;
  background: #202123;
}

.nav {
  gap: 8px;
  color: var(--muted);
  font-size: 14px;
}

.nav a {
  border-radius: 999px;
  padding: 8px 12px;
}

.nav-button {
  border: 0;
  border-radius: 999px;
  padding: 8px 12px;
  color: var(--muted);
  background: transparent;
  font-size: 14px;
  cursor: pointer;
}

.nav a:hover,
.nav-button:hover {
  background: rgba(17, 24, 39, 0.08);
  color: var(--accent-dark);
}

.source-switch-button {
  border: 1px solid var(--accent);
  color: #fff;
  background: var(--accent);
  font-weight: 760;
  box-shadow: 0 8px 20px rgba(17, 24, 39, 0.18);
}

.source-switch-button:hover {
  border-color: var(--accent-dark);
  color: #fff;
  background: var(--accent-dark);
}

.source-switch-wrap {
  position: relative;
}

.source-type-menu {
  position: absolute;
  top: calc(100% + 10px);
  right: 0;
  z-index: 30;
  width: 190px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 6px;
  background: #fff;
  box-shadow: 0 18px 44px rgba(16, 18, 20, 0.16);
}

.source-type-menu[hidden] {
  display: none;
}

.source-type-menu button {
  width: 100%;
  border: 0;
  border-radius: 6px;
  padding: 10px 12px;
  color: var(--ink);
  background: transparent;
  font: inherit;
  font-weight: 680;
  text-align: left;
  cursor: pointer;
}

.source-type-menu button:hover,
.source-type-menu button:focus-visible,
.source-type-menu button.active {
  color: var(--accent-dark);
  background: rgba(17, 24, 39, 0.1);
  outline: none;
}

.calculator-nav-button {
  position: relative;
  border: 1px solid rgba(17, 24, 39, 0.28);
  color: var(--accent-dark);
  background: #fff;
  font-weight: 760;
}

.ghost-button {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px 14px;
  color: #344054;
  background: #fff;
  font-weight: 720;
  cursor: pointer;
}

.ghost-button:hover {
  border-color: rgba(17, 24, 39, 0.34);
  color: var(--accent-dark);
  background: var(--soft);
}

.danger-lite {
  color: #7f1d1d;
}

.calculator-nav-button::after {
  position: absolute;
  top: calc(100% + 10px);
  right: 0;
  z-index: 1900;
  width: max-content;
  max-width: min(320px, calc(100vw - 24px));
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 8px 10px;
  color: var(--ink);
  background: #fff;
  box-shadow: 0 10px 28px rgba(24, 45, 42, 0.14);
  content: attr(data-shortcut-tooltip);
  font-size: 12px;
  font-weight: 680;
  line-height: 1.4;
  opacity: 0;
  pointer-events: none;
  transform: translateY(-3px);
  transition: opacity 140ms ease, transform 140ms ease;
}

.calculator-nav-button:hover::after,
.calculator-nav-button:focus-visible::after {
  opacity: 1;
  transform: translateY(0);
}

.calculator-nav-button:hover {
  border-color: var(--accent);
  color: var(--accent-dark);
  background: var(--soft);
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, 0.92fr) minmax(420px, 0.68fr);
  gap: 48px;
  align-items: center;
  min-height: calc(100dvh - 72px);
  padding: 42px 0 56px;
}

.hero-copy {
  padding-left: clamp(0px, 3vw, 42px);
}

.kicker,
.label {
  margin: 0 0 16px;
  color: var(--accent);
  font-size: 12px;
  font-weight: 780;
  letter-spacing: 0.15em;
  text-transform: uppercase;
}

.hero h1 {
  max-width: 760px;
  margin: 0;
  font-size: clamp(44px, 7vw, 92px);
  line-height: 0.96;
  letter-spacing: 0;
}

.source-title {
  margin: 0 0 16px;
  color: var(--accent);
  font-size: clamp(18px, 2.4vw, 26px);
  font-weight: 820;
  line-height: 1.22;
  letter-spacing: 0;
}

.hero-text {
  max-width: 520px;
  margin: 28px 0 0;
  color: var(--muted);
  font-size: 20px;
  line-height: 1.55;
}

.search-panel,
.result-card,
.data-strip {
  border: 1px solid rgba(16, 18, 20, 0.1);
  background: rgba(255, 255, 255, 0.88);
  box-shadow: var(--shadow);
}

.search-panel {
  border-radius: 28px;
  padding: 28px;
}

.panel-head,
.results-head,
.card-title,
.panel-head h2,
.results-head h2 {
  margin: 0;
  font-size: 28px;
  letter-spacing: 0;
}

.panel-head,
.results-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
}

.workspace-content .panel-head .label {
  display: none;
}

.workspace-content .panel-head {
  min-height: 0;
  padding: 8px 16px;
}

.workspace-content .data-source-panel,
.workspace-content .marketing-panel {
  padding-top: 6px;
}

.status-pill {
  flex: 0 0 auto;
  border-radius: 999px;
  padding: 8px 12px;
  background: var(--soft);
  color: var(--accent-dark);
  font-size: 13px;
  font-weight: 720;
}

.panel-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
}

.precise-toggle {
  flex: 0 0 auto;
  border: 1px solid rgba(17, 24, 39, 0.22);
  border-radius: 999px;
  padding: 8px 12px;
  color: var(--accent-dark);
  background: #fff;
  font-size: 13px;
  font-weight: 820;
  cursor: pointer;
  transition: background 160ms ease, color 160ms ease, border-color 160ms ease, box-shadow 160ms ease;
}

.precise-toggle:hover,
.precise-toggle:focus-visible {
  border-color: var(--accent);
  outline: none;
  box-shadow: 0 0 0 4px rgba(17, 24, 39, 0.12);
}

.precise-toggle[aria-pressed="true"] {
  border-color: var(--accent);
  color: #fff;
  background: var(--accent);
  box-shadow: 0 10px 22px rgba(17, 24, 39, 0.18);
}

.public-security-control {
  display: inline-flex;
  align-items: center;
  justify-content: flex-start;
  gap: 9px;
  min-height: 24px;
  color: #4f565c;
  font-size: 13px;
  font-weight: 720;
}

.public-security-switch {
  position: relative;
  flex: 0 0 42px;
  width: 42px;
  height: 24px;
  border: 1px solid #c8d2d0;
  border-radius: 999px;
  padding: 2px;
  background: #e7eceb;
  cursor: pointer;
  transition: background 160ms ease, border-color 160ms ease;
}

.public-security-switch span {
  display: block;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 2px 5px rgba(18, 45, 40, 0.2);
  transition: transform 160ms ease;
}

.public-security-switch[aria-checked="true"] {
  border-color: var(--accent);
  background: var(--accent);
}

.public-security-switch[aria-checked="true"] span {
  transform: translateX(18px);
}

.public-security-switch:focus-visible {
  outline: 3px solid rgba(17, 24, 39, 0.22);
  outline-offset: 2px;
}

.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-top: 28px;
}

.mode-switch {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
  margin-top: 22px;
  border: 1px solid #d8e7e3;
  border-radius: 999px;
  padding: 5px;
  background: #f4f8f7;
}

.mode-button {
  min-height: 40px;
  border: 0;
  border-radius: 999px;
  color: #51615e;
  background: transparent;
  font-weight: 760;
  cursor: pointer;
}

.mode-button.active {
  color: #fff;
  background: var(--accent);
  box-shadow: 0 10px 22px rgba(17, 24, 39, 0.18);
}

label {
  display: grid;
  gap: 8px;
  position: relative;
}

label span,
.upload-card span {
  color: #4f565c;
  font-size: 13px;
  font-weight: 720;
}

input,
select {
  width: 100%;
  min-height: 48px;
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 0 14px;
  color: var(--ink);
  background: #fbfcfc;
  outline: none;
}

input:focus,
select:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 4px rgba(17, 24, 39, 0.12);
}

.native-select {
  position: absolute;
  width: 1px;
  height: 1px;
  min-height: 0;
  margin: 0;
  padding: 0;
  opacity: 0;
  pointer-events: none;
}

.custom-select {
  position: relative;
  width: 100%;
}

.custom-select-trigger {
  position: relative;
  width: 100%;
  min-height: 48px;
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 0 42px 0 14px;
  color: var(--ink);
  background: #fbfcfc;
  text-align: left;
  cursor: pointer;
  outline: none;
}

.custom-select-trigger::after {
  content: "";
  position: absolute;
  top: 50%;
  right: 17px;
  width: 7px;
  height: 7px;
  border-right: 1.5px solid #65716f;
  border-bottom: 1.5px solid #65716f;
  transform: translateY(-65%) rotate(45deg);
  transition: transform 160ms ease;
}

.custom-select.open .custom-select-trigger {
  border-color: var(--accent);
  box-shadow: 0 0 0 4px rgba(17, 24, 39, 0.12);
}

.custom-select.open .custom-select-trigger::after {
  transform: translateY(-30%) rotate(225deg);
}

label .custom-select-value {
  display: block;
  overflow: hidden;
  color: var(--ink);
  font-size: 14px;
  font-weight: 500;
  text-overflow: ellipsis;
  white-space: nowrap;
}

label .custom-select-trigger.placeholder .custom-select-value {
  color: #7c858b;
}

.custom-select-menu {
  position: fixed;
  top: 0;
  left: 0;
  right: auto;
  z-index: 2200;
  display: none;
  max-height: 260px;
  overflow: auto;
  border: 1px solid rgba(16, 18, 20, 0.1);
  border-radius: 16px;
  padding: 4px 0;
  background: #fff;
  box-shadow: 0 18px 42px rgba(24, 38, 42, 0.14);
}

.custom-select-menu.open {
  display: grid;
}

.custom-select-option {
  min-height: 42px;
  border: 0;
  border-bottom: 1px solid rgba(16, 18, 20, 0.07);
  padding: 10px 14px;
  color: var(--ink);
  background: transparent;
  text-align: left;
  cursor: pointer;
  outline: none;
}

.custom-select-option:last-child {
  border-bottom: 0;
}

.custom-select-option:hover,
.custom-select-option:focus,
.custom-select-option.active {
  background: #f4f8f7;
}

.custom-select-option[aria-selected="true"] {
  color: var(--accent-dark);
  font-weight: 720;
}

.major-suggestions {
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  right: 0;
  z-index: 8;
  display: none;
  max-height: 260px;
  overflow: auto;
  border: 1px solid rgba(16, 18, 20, 0.1);
  border-radius: 16px;
  background: #fff;
  box-shadow: 0 18px 42px rgba(24, 38, 42, 0.14);
}

.major-suggestions.show {
  display: grid;
}

.suggestion-item {
  display: grid;
  gap: 3px;
  border: 0;
  border-bottom: 1px solid rgba(16, 18, 20, 0.07);
  padding: 11px 14px;
  color: var(--ink);
  background: transparent;
  text-align: left;
  cursor: pointer;
}

.suggestion-item:hover,
.suggestion-item:focus {
  background: #f4f8f7;
  outline: none;
}

.suggestion-item strong {
  font-size: 14px;
}

.suggestion-item small {
  color: var(--muted);
  font-size: 12px;
}

.wide {
  grid-column: 1 / -1;
}

.graduate-box {
  border-radius: 20px;
  padding: 16px;
  background: #f4f8f7;
  border: 1px solid #d8e7e3;
}

.graduate-actions,
.legend {
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--muted);
  font-size: 13px;
}

.candidate-list {
  display: grid;
  gap: 10px;
  margin: 14px 0;
}

.candidate-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  border: 1px solid #d7e5e1;
  border-radius: 14px;
  padding: 12px;
  background: #fff;
  cursor: pointer;
}

.candidate-item input {
  width: auto;
  min-height: auto;
}

.candidate-item strong {
  display: block;
}

.candidate-item small {
  color: var(--muted);
}

.manual-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.primary,
.secondary,
.upload-card button {
  min-height: 48px;
  border: 0;
  border-radius: 999px;
  padding: 0 18px;
  font-weight: 760;
  cursor: pointer;
  transition:
    transform 160ms ease,
    background 160ms ease,
    opacity 160ms ease;
}

.primary {
  color: #fff;
  background: var(--accent);
}

.primary:hover,
.upload-card button:hover {
  background: var(--accent-dark);
}

.secondary {
  border: 1px solid #b9d2cb;
  color: var(--accent-dark);
  background: #fff;
}

.primary:active,
.secondary:active,
.upload-card button:active {
  transform: translateY(1px) scale(0.99);
}

.results-head p,
.card-title p {
  margin: 8px 0 0;
  color: var(--muted);
}

.results-section {
  padding: 44px 0 72px;
}

.legend span {
  width: 10px;
  height: 10px;
  border-radius: 999px;
  background: var(--accent);
}

.result-tools {
  display: grid;
  justify-items: end;
  gap: 12px;
}

.year-toggle {
  display: inline-grid;
  grid-template-columns: 1fr 1fr;
  gap: 4px;
  border: 1px solid #d8e7e3;
  border-radius: 999px;
  padding: 4px;
  background: #f4f8f7;
}

.year-button {
  min-width: 68px;
  min-height: 34px;
  border: 0;
  border-radius: 999px;
  color: #51615e;
  background: transparent;
  font-size: 13px;
  font-weight: 800;
  cursor: pointer;
}

.year-button.active {
  color: #fff;
  background: var(--accent);
  box-shadow: 0 10px 22px rgba(17, 24, 39, 0.18);
}

.year-button:disabled {
  cursor: not-allowed;
  opacity: 0.45;
}

.results-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  margin-top: 22px;
}

.year-results {
  margin-top: 32px;
}

.year-divider {
  display: flex;
  align-items: center;
  gap: 14px;
  color: var(--accent-dark);
  font-size: 13px;
  font-weight: 820;
}

.year-divider::before,
.year-divider::after {
  content: "";
  flex: 1;
  height: 1px;
  background: rgba(16, 18, 20, 0.1);
}

.result-card {
  overflow: hidden;
  border-radius: 24px;
}

.card-title {
  padding: 22px 24px;
  border-bottom: 1px solid rgba(16, 18, 20, 0.08);
}

.card-title h3 {
  margin: 0;
  font-size: 22px;
}

.table-wrap {
  overflow: auto;
  max-height: 560px;
}

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}

th,
td {
  padding: 14px 16px;
  text-align: left;
  border-bottom: 1px solid rgba(16, 18, 20, 0.08);
  white-space: nowrap;
}

th {
  position: sticky;
  top: 0;
  z-index: 1;
  color: #4c5359;
  background: #f6f8f7;
  font-size: 12px;
}

th span,
th small {
  display: block;
}

th small {
  margin-top: 3px;
  color: #6a7278;
  font-size: 11px;
  font-weight: 720;
}

.score-average-heading {
  cursor: help;
  outline: none;
}

.score-average-heading::after {
  content: attr(data-average-tooltip);
  position: absolute;
  top: calc(100% - 3px);
  left: 50%;
  z-index: 4;
  width: max-content;
  max-width: 190px;
  border-radius: 6px;
  padding: 7px 10px;
  color: #fff;
  background: #182226;
  box-shadow: 0 10px 28px rgba(18, 34, 38, 0.2);
  font-size: 12px;
  font-weight: 720;
  line-height: 1.35;
  opacity: 0;
  transform: translate(-50%, -4px);
  pointer-events: none;
  transition:
    opacity 140ms ease,
    transform 140ms ease;
}

.score-average-heading:hover::after,
.score-average-heading:focus-visible::after {
  opacity: 1;
  transform: translate(-50%, 0);
}

.score-average-heading:focus-visible {
  box-shadow: inset 0 0 0 2px rgba(17, 24, 39, 0.55);
}

td:nth-child(3),
td:nth-child(4),
td:nth-child(5),
td:nth-child(6),
td:nth-child(7),
td:nth-child(8) {
  font-weight: 780;
}

th:nth-child(3),
th:nth-child(4),
th:nth-child(5),
th:nth-child(6),
th:nth-child(7),
th:nth-child(8),
td:nth-child(3),
td:nth-child(4),
td:nth-child(5),
td:nth-child(6),
td:nth-child(7),
td:nth-child(8) {
  text-align: center;
}

body.modal-open {
  overflow: hidden;
}

.result-modal {
  position: fixed;
  inset: 0;
  z-index: 900;
  display: grid;
  place-items: center;
  padding: 24px;
}

.result-modal[hidden] {
  display: none;
}

.result-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(18, 25, 24, 0.56);
  backdrop-filter: blur(4px);
}

.result-dialog {
  position: relative;
  width: min(1600px, calc(100vw - 24px));
  max-height: calc(100dvh - 48px);
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0;
  background: var(--panel);
  box-shadow: 0 24px 80px rgba(18, 45, 40, 0.28);
}

.result-dialog .results-head {
  position: sticky;
  top: 0;
  z-index: 5;
  border-bottom: 1px solid var(--line);
  padding: 18px 22px;
  background: rgba(255, 255, 255, 0.96);
  backdrop-filter: blur(14px);
}

.result-dialog-heading {
  display: flex;
  align-items: flex-start;
  gap: 14px;
}

.result-dialog > .results-grid {
  margin: 18px 22px 22px;
}

.result-dialog .year-results {
  padding: 0 22px 22px;
}

.result-dialog .result-card .table-wrap {
  overflow-x: hidden;
  max-height: calc(100dvh - 330px);
}

.result-dialog .result-card table {
  table-layout: fixed;
}

.result-dialog .result-card th,
.result-dialog .result-card td {
  padding-right: 10px;
  padding-left: 10px;
  white-space: normal;
  overflow-wrap: anywhere;
}

.result-dialog .result-card td.position-composition {
  min-width: 0;
  white-space: nowrap;
  overflow-wrap: normal;
}

body[data-source="civil"] .result-dialog th:nth-child(1) {
  width: 10%;
}

body[data-source="civil"] .result-dialog th:nth-child(2) {
  width: 22%;
}

body[data-source="civil"] .result-dialog th:nth-child(3) {
  width: 10%;
}

body[data-source="civil"] .result-dialog th:nth-child(4) {
  width: 24%;
}

body[data-source="civil"] .result-dialog th:nth-child(5),
body[data-source="civil"] .result-dialog th:nth-child(6) {
  width: 17%;
}

body[data-source="civil"] .result-dialog .results-grid > .result-card:first-child th:nth-child(2) {
  width: 14%;
}

body[data-source="civil"] .result-dialog .results-grid > .result-card:first-child th:nth-child(4) {
  width: 32%;
}

body[data-source="civil"] .result-dialog .results-grid > .result-card:nth-child(2) table.wide-position-composition th:nth-child(1) {
  width: 9%;
}

body[data-source="civil"] .result-dialog .results-grid > .result-card:nth-child(2) table.wide-position-composition th:nth-child(2) {
  width: 18%;
}

body[data-source="civil"] .result-dialog .results-grid > .result-card:nth-child(2) table.wide-position-composition th:nth-child(3) {
  width: 8%;
}

body[data-source="civil"] .result-dialog .results-grid > .result-card:nth-child(2) table.wide-position-composition th:nth-child(4) {
  width: 35%;
}

body[data-source="civil"] .result-dialog .results-grid > .result-card:nth-child(2) table.wide-position-composition th:nth-child(5) {
  width: 15%;
}

body[data-source="civil"] .result-dialog .results-grid > .result-card:nth-child(2) table.wide-position-composition th:nth-child(6) {
  width: 15%;
}

body[data-source="institution"] .result-dialog th:nth-child(1) {
  width: 18%;
}

body[data-source="institution"] .result-dialog th:nth-child(2) {
  width: 22%;
}

body[data-source="institution"] .result-dialog th:nth-child(3) {
  width: 14%;
}

body[data-source="institution"] .result-dialog th:nth-child(5),
body[data-source="institution"] .result-dialog th:nth-child(6) {
  width: 23%;
}

.public-security-modal {
  position: fixed;
  inset: 0;
  z-index: 900;
  display: grid;
  place-items: center;
  padding: 24px;
}

.public-security-modal[hidden] {
  display: none;
}

.public-security-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(18, 25, 24, 0.56);
  backdrop-filter: blur(4px);
}

.public-security-dialog {
  position: relative;
  width: min(1600px, calc(100vw - 24px));
  max-height: calc(100dvh - 48px);
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  box-shadow: 0 24px 80px rgba(18, 45, 40, 0.28);
}

.public-security-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  border-bottom: 1px solid var(--line);
  padding: 18px 22px;
}

.public-security-heading {
  display: flex;
  align-items: flex-start;
  gap: 14px;
}

.public-security-heading .label {
  margin: 0 0 4px;
}

.public-security-heading h2 {
  margin: 0;
  font-size: 22px;
  letter-spacing: 0;
}

.public-security-content {
  max-height: calc(100dvh - 134px);
  overflow: hidden;
  padding: 18px 22px 22px;
}

.public-security-tabs {
  display: inline-grid;
  grid-template-columns: repeat(3, minmax(88px, 1fr));
  gap: 4px;
  border: 1px solid #d8e7e3;
  border-radius: 8px;
  padding: 4px;
  background: #f4f8f7;
}

.public-security-tab {
  min-height: 38px;
  border: 0;
  border-radius: 5px;
  padding: 0 18px;
  color: #51615e;
  background: transparent;
  font-size: 14px;
  font-weight: 800;
  cursor: pointer;
}

.public-security-tab.active {
  color: #fff;
  background: var(--accent);
  box-shadow: 0 8px 18px rgba(17, 24, 39, 0.18);
}

.public-security-tab:focus-visible {
  outline: 3px solid rgba(17, 24, 39, 0.22);
  outline-offset: 1px;
}

.public-security-summary {
  margin: 12px 0 0;
  color: var(--muted);
  font-size: 13px;
}

.public-security-results-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-top: 16px;
}

.public-security-result {
  min-width: 0;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.public-security-result .table-wrap {
  overflow-x: hidden;
  max-height: calc(100dvh - 400px);
}

.public-security-result table {
  table-layout: fixed;
}

.public-security-result th,
.public-security-result td {
  padding-right: 10px;
  padding-left: 10px;
  white-space: normal;
  overflow-wrap: anywhere;
}

.public-security-result th:nth-child(1) {
  width: 14%;
}

.public-security-result th:nth-child(2) {
  width: 22%;
}

.public-security-result th:nth-child(3) {
  width: 12%;
}

.public-security-result th:nth-child(4),
.public-security-result th:nth-child(5) {
  width: 26%;
}

@media (max-width: 1100px) {
  .result-dialog,
  .public-security-content {
    overflow-y: auto;
  }

  .public-security-results-grid,
  .result-dialog .results-grid {
    grid-template-columns: minmax(0, 1fr);
  }
}

.position-count-button {
  border: 0;
  border-radius: 4px;
  padding: 2px 5px;
  color: var(--accent-dark);
  background: transparent;
  font: inherit;
  font-weight: 820;
  text-decoration: underline;
  text-decoration-color: rgba(17, 24, 39, 0.35);
  text-underline-offset: 3px;
  cursor: pointer;
}

.position-count-button:hover {
  background: var(--soft);
  text-decoration-color: var(--accent);
}

.position-count-note {
  display: inline-flex;
  align-items: center;
  margin-left: 6px;
  border: 1px solid rgba(17, 24, 39, 0.16);
  border-radius: 999px;
  padding: 2px 6px;
  color: var(--accent-dark);
  background: rgba(17, 24, 39, 0.08);
  font-size: 11px;
  font-weight: 760;
  line-height: 1.35;
  white-space: nowrap;
  vertical-align: middle;
}

.city-average-trigger {
  position: relative;
  display: inline-flex;
  align-items: center;
  width: max-content;
  max-width: 100%;
  white-space: nowrap;
}

.secondary-city-button {
  border: 0;
  border-radius: 4px;
  padding: 3px 5px;
  color: var(--accent-dark);
  background: transparent;
  font: inherit;
  font-weight: 800;
  text-decoration: underline;
  text-decoration-color: rgba(17, 24, 39, 0.32);
  text-underline-offset: 3px;
  cursor: pointer;
}

.city-average-trigger::after {
  content: attr(data-city-average-tooltip);
  position: absolute;
  left: calc(100% + 8px);
  top: 50%;
  z-index: 20;
  display: none;
  min-width: max-content;
  border-radius: 8px;
  padding: 6px 9px;
  color: #fff;
  background: rgba(18, 45, 40, 0.95);
  box-shadow: 0 10px 24px rgba(18, 45, 40, 0.22);
  font-size: 12px;
  font-weight: 760;
  line-height: 1.2;
  text-decoration: none;
  transform: translateY(-50%);
  pointer-events: none;
}

.city-average-trigger:hover::after,
.city-average-trigger:focus-visible::after {
  display: block;
}

.secondary-city-button:hover,
.secondary-city-button[aria-pressed="true"] {
  color: #fff;
  background: var(--accent);
  text-decoration-color: transparent;
}

.secondary-city-button:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.position-composition {
  min-width: 160px;
  white-space: normal;
}

.position-composition span {
  display: inline;
  margin: 0;
  color: #4c5359;
  font-size: 12px;
  font-weight: 720;
}

.position-count-button:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.detail-modal {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: grid;
  place-items: center;
  padding: 24px;
}

.detail-modal[hidden] {
  display: none;
}

.detail-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(18, 25, 24, 0.52);
  backdrop-filter: blur(4px);
}

.detail-dialog {
  position: relative;
  width: min(1120px, 100%);
  max-height: min(780px, calc(100dvh - 48px));
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  box-shadow: 0 24px 80px rgba(18, 45, 40, 0.24);
}

body[data-source="national"] .detail-dialog {
  width: min(1600px, calc(100vw - 24px));
}

.detail-dialog-head {
  display: flex;
  align-items: flex-start;
  gap: 18px;
  padding: 22px 24px;
  border-bottom: 1px solid var(--line);
}

.detail-dialog-head .label {
  margin: 1px 0 5px;
}

.detail-dialog-head h2 {
  margin: 0;
  font-size: 24px;
  letter-spacing: 0;
}

.detail-close {
  position: relative;
  flex: 0 0 32px;
  width: 32px;
  height: 32px;
  border: 0;
  border-radius: 50%;
  padding: 0;
  background: transparent;
  cursor: pointer;
}

.detail-close::before {
  content: "";
  position: absolute;
  top: 9px;
  left: 9px;
  width: 14px;
  height: 14px;
  border: 1px solid #e0443e;
  border-radius: 50%;
  background: #ff5f57;
  box-shadow: inset 0 -1px 1px rgba(128, 0, 0, 0.16);
}

.detail-close::after {
  content: "×";
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  color: #6e1f1b;
  font-size: 11px;
  font-weight: 900;
  line-height: 1;
  opacity: 0;
  transition: opacity 120ms ease;
}

.detail-close:hover::after,
.detail-close:focus-visible::after {
  opacity: 1;
}

.detail-close:focus-visible {
  outline: 2px solid rgba(17, 24, 39, 0.5);
  outline-offset: 1px;
}

.detail-table-wrap {
  max-height: calc(min(780px, 100dvh - 48px) - 102px);
  overflow: auto;
}

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

.detail-table.national-detail-table {
  width: 100%;
  min-width: 1320px;
  table-layout: auto;
}

.detail-table.national-detail-table th,
.detail-table.national-detail-table td {
  white-space: nowrap;
  vertical-align: top;
}

.detail-table.national-detail-table th:nth-child(1) {
  width: 56px;
}

.detail-table.national-detail-table th:nth-child(2) {
  width: 82px;
}

.detail-table.national-detail-table th:nth-child(3) {
  width: 360px;
}

.detail-table.national-detail-table th:nth-child(4) {
  width: 430px;
}

.detail-table.national-detail-table th:nth-child(5) {
  width: 270px;
}

.detail-table.national-detail-table th:nth-child(6) {
  width: 110px;
}

.detail-table.national-detail-table th:nth-child(7) {
  width: 92px;
}

.detail-table th:first-child,
.detail-table td:first-child {
  min-width: 260px;
  white-space: normal;
}

.detail-table.national-detail-table th:first-child,
.detail-table.national-detail-table td:first-child {
  min-width: 0;
}

.detail-table th:not(:first-child),
.detail-table td:not(:first-child) {
  text-align: center;
}

.score-calculator {
  position: fixed;
  top: 88px;
  right: 24px;
  z-index: 1800;
  width: min(380px, calc(100vw - 24px));
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--ink);
  background: rgba(255, 255, 255, 0.98);
  box-shadow: 0 22px 70px rgba(18, 45, 40, 0.26);
  backdrop-filter: blur(16px);
}

.score-calculator-head {
  display: grid;
  grid-template-columns: 32px 1fr 32px;
  align-items: center;
  gap: 8px;
  min-height: 58px;
  border-bottom: 1px solid var(--line);
  padding: 10px 12px;
  cursor: move;
  touch-action: none;
  user-select: none;
}

.score-calculator-head h2 {
  margin: 0;
  font-size: 18px;
  letter-spacing: 0;
  text-align: center;
}

.calculator-drag-mark {
  justify-self: center;
  width: 18px;
  height: 12px;
  opacity: 0.45;
  background: radial-gradient(circle, #65716f 1.2px, transparent 1.5px) 0 0 / 6px 6px;
}

.calculator-body {
  padding: 16px;
}

.calculator-tabs {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 4px;
  border: 1px solid #d8e7e3;
  border-radius: 8px;
  padding: 4px;
  background: #f4f8f7;
}

.calculator-tab {
  min-height: 38px;
  border: 0;
  border-radius: 5px;
  color: #51615e;
  background: transparent;
  font-weight: 780;
  cursor: pointer;
}

.calculator-tab.active {
  color: #fff;
  background: var(--accent);
}

.calculator-tab:focus-visible {
  outline: 2px solid rgba(17, 24, 39, 0.48);
  outline-offset: 1px;
}

.calculator-panel {
  margin-top: 16px;
}

.calculator-role-field {
  display: grid;
  gap: 7px;
  margin-bottom: 12px;
}

.calculator-role-field > span {
  color: #4f565c;
  font-size: 13px;
  font-weight: 720;
}

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

.calculator-fields:has([data-police-field]:not([hidden])),
.calculator-fields:has([data-national-specialized-field]:not([hidden])) {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.calculator-fields input {
  min-height: 44px;
  border-radius: 8px;
  padding: 0 10px;
}

.calculator-fields input[aria-invalid="true"] {
  border-color: #b03c2b;
  box-shadow: 0 0 0 3px rgba(176, 60, 43, 0.12);
}

.calculator-error {
  min-height: 28px;
  color: #9b3527;
  font-size: 11px;
  line-height: 1.25;
}

.calculator-switch-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 36px;
  margin-top: 2px;
  color: #4f565c;
  font-size: 13px;
  font-weight: 720;
}

.calculator-switch {
  width: 42px;
  height: 24px;
  border: 1px solid #c8d2d0;
  border-radius: 999px;
  padding: 2px;
  background: #e7eceb;
  cursor: pointer;
}

.calculator-switch span {
  display: block;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 2px 5px rgba(18, 45, 40, 0.2);
  transition: transform 160ms ease;
}

.calculator-switch[aria-checked="true"] {
  border-color: var(--accent);
  background: var(--accent);
}

.calculator-switch[aria-checked="true"] span {
  transform: translateX(18px);
}

.calculator-switch:focus-visible {
  outline: 2px solid rgba(17, 24, 39, 0.48);
  outline-offset: 2px;
}

.calculator-result {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 18px;
  border-top: 1px solid var(--line);
  margin-top: 10px;
  padding-top: 14px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 720;
}

.calculator-result output {
  color: var(--accent-dark);
  font-size: 24px;
  font-weight: 840;
  line-height: 1;
}

@media (max-width: 720px) {
  .result-modal {
    padding: 10px;
  }

  .result-dialog {
    max-height: calc(100dvh - 20px);
  }

  .result-dialog .results-head {
    padding: 14px;
  }

  .result-dialog > .results-grid {
    margin: 14px;
  }

  .public-security-modal {
    padding: 10px;
  }

  .public-security-dialog {
    max-height: calc(100dvh - 20px);
  }

  .public-security-head {
    align-items: flex-start;
    flex-direction: column;
    padding: 14px;
  }

  .public-security-content {
    max-height: calc(100dvh - 112px);
    padding: 14px;
  }

  .public-security-results-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .public-security-tabs {
    display: grid;
  }

  .detail-modal {
    padding: 10px;
  }

  .detail-dialog {
    width: 100%;
    max-height: calc(100dvh - 20px);
  }

  .detail-dialog-head {
    gap: 12px;
    padding: 16px;
  }

  .detail-dialog-head h2 {
    font-size: 20px;
  }

  .detail-table-wrap {
    max-height: calc(100dvh - 102px);
  }

  .score-calculator {
    top: 12px;
    right: 12px;
  }
}

body[data-source="civil"] .institution-only,
body[data-source="civil"] .institution-field {
  display: none;
}

body[data-source="institution"] .civil-only,
body[data-source="institution"] .civil-precise-only {
  display: none;
}

body[data-source="national"] .institution-field,
body[data-source="national"] .public-security-control,
body[data-source="national"] .eligibility-filter-field,
body[data-source="national"] .civil-only,
body[data-source="national"] .precise-source-only,
body[data-source="national"] .precise-filter-field {
  display: none;
}

.county-with-distance {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  white-space: nowrap;
}

.nearby-badge {
  display: inline-flex;
  align-items: center;
  margin-left: 0;
  border: 1px solid rgba(17, 24, 39, 0.18);
  border-radius: 999px;
  padding: 3px 7px;
  color: var(--accent-dark);
  background: var(--soft);
  font-size: 11px;
  font-weight: 760;
  vertical-align: middle;
}

.empty {
  height: 160px;
  color: var(--muted);
  text-align: center;
}

.toast {
  position: fixed;
  right: 24px;
  bottom: 24px;
  z-index: 10;
  max-width: 360px;
  border: 1px solid rgba(16, 18, 20, 0.12);
  border-radius: 18px;
  padding: 14px 16px;
  color: #fff;
  background: #182226;
  box-shadow: 0 18px 50px rgba(0, 0, 0, 0.2);
  opacity: 0;
  transform: translateY(12px);
  pointer-events: none;
  transition:
    opacity 180ms ease,
    transform 180ms ease;
}

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

.top-alert {
  position: fixed;
  top: 18px;
  left: 50%;
  z-index: 20;
  width: min(520px, calc(100% - 32px));
  border: 1px solid rgba(119, 36, 36, 0.18);
  border-radius: 18px;
  padding: 14px 18px;
  color: #5d1f1f;
  background: rgba(255, 246, 244, 0.96);
  box-shadow: 0 18px 46px rgba(97, 44, 38, 0.16);
  text-align: center;
  font-size: 14px;
  font-weight: 720;
  opacity: 0;
  transform: translate(-50%, -16px);
  pointer-events: none;
  transition:
    opacity 180ms ease,
    transform 180ms ease;
}

.top-alert.show {
  opacity: 1;
  transform: translate(-50%, 0);
}

/* Console-style refresh inspired by dense cloud management dashboards. */
body {
  background: #f3f5f9;
}

.workbench-shell {
  grid-template-columns: 212px minmax(0, 1fr);
  background: #f3f5f9;
}

.workspace-sidebar {
  gap: 14px;
  border-right: 1px solid #e5e8ef;
  background: #fff;
  padding: 14px 8px;
  backdrop-filter: none;
}

.workspace-brand {
  min-height: 52px;
  gap: 10px;
  padding: 0 10px 12px;
  border-bottom: 1px solid #eef1f6;
}

.workspace-mark {
  width: 40px;
  height: 40px;
  border-radius: 4px;
  border: 1px solid #edf0f5;
  background: #fff url("/assets/workspace-logo.png") center / contain no-repeat;
  box-shadow: none;
}

.workspace-brand strong {
  font-size: 17px;
}

.workspace-credit {
  position: fixed;
  right: 0;
  bottom: 12px;
  left: 232px;
  z-index: 8;
  color: #98a2b3;
  font-size: 12px;
  line-height: 1;
  text-align: center;
  pointer-events: none;
}

.workspace-brand small {
  margin-top: 2px;
  font-size: 12px;
}

.workspace-nav-button {
  border-radius: 2px;
  padding: 11px 12px;
  color: #303642;
  font-size: 14px;
  font-weight: 760;
}

.workspace-nav-button:hover,
.workspace-nav-button.active {
  color: #0052d9;
  background: #eaf2ff;
}

.workspace-nav-button.active {
  box-shadow: inset 3px 0 0 #0052d9;
}

.workspace-status {
  margin: auto 10px 0;
  color: #667085;
  font-size: 12px;
}

.workspace-content {
  background: #f3f5f9;
}

.workspace-empty {
  color: #475467;
  font-size: 48px;
}

.workspace-content .app-shell,
.shell {
  width: 100%;
  margin: 0;
}

.topbar {
  height: 52px;
  justify-content: space-between;
  border-bottom: 1px solid #e5e8ef;
  padding: 0 72px 0 20px;
  background: #fff;
}

.topbar::before {
  content: none;
}

.topbar-left {
  display: flex;
  align-items: center;
  min-width: 0;
  gap: 12px;
  color: #1f2329;
  font-size: 14px;
}

.topbar-left strong {
  font-size: 15px;
  font-weight: 820;
}

.topbar-left span:last-child {
  color: #667085;
  font-size: 13px;
}

.topbar-menu-mark {
  position: relative;
  width: 18px;
  height: 12px;
}

.topbar-menu-mark::before,
.topbar-menu-mark::after {
  content: "";
  position: absolute;
  left: 0;
  width: 18px;
  height: 2px;
  border-radius: 999px;
  background: #303642;
  box-shadow: 0 5px 0 #303642;
}

.topbar-menu-mark::before {
  top: 0;
}

.topbar-menu-mark::after {
  bottom: 0;
  box-shadow: none;
}

.nav {
  gap: 8px;
  font-size: 13px;
}

.nav-button,
.ghost-button {
  min-height: 32px;
  border-radius: 2px;
  padding: 0 12px;
  font-size: 13px;
}

.topbar-action-button {
  min-width: 58px;
  border-color: #cfd6e4;
  color: #303642;
  background: #fff;
}

.topbar-action-button:hover {
  border-color: #0052d9;
  color: #0052d9;
  background: #f6f9ff;
}

.announcement-sync-button {
  border-color: #0052d9;
  color: #fff;
  background: #0052d9;
}

.announcement-sync-button:hover {
  color: #fff;
  background: #0a60ea;
}

.announcement-sync-button:disabled {
  cursor: wait;
  opacity: 0.7;
}

.source-switch-button {
  border-color: #0052d9;
  background: #0052d9;
  box-shadow: none;
}

.source-switch-button:hover {
  border-color: #003cab;
  background: #003cab;
}

.calculator-nav-button {
  border-color: #cfd6e4;
  color: #303642;
}

.source-type-menu,
.custom-select-menu,
.major-suggestions {
  border-color: #dfe3ea;
  border-radius: 2px;
  box-shadow: 0 10px 30px rgba(31, 35, 41, 0.14);
}

.source-type-menu button,
.custom-select-option,
.suggestion-item {
  border-radius: 0;
}

.source-type-menu button:hover,
.source-type-menu button:focus-visible,
.source-type-menu button.active,
.custom-select-option:hover,
.custom-select-option:focus,
.custom-select-option.active,
.suggestion-item:hover,
.suggestion-item:focus {
  color: #0052d9;
  background: #f2f6ff;
}

.console-info-strip {
  display: flex;
  align-items: center;
  min-height: 40px;
  border-bottom: 1px solid #dbe7ff;
  padding: 0 22px;
  color: #334155;
  background: #eaf2ff;
  font-size: 13px;
}

.hero {
  display: block;
  min-height: auto;
  padding: 16px 22px 32px;
}

.hero-copy {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 18px;
  border: 1px solid #e5e8ef;
  border-bottom: 0;
  padding: 16px 18px 14px;
  background: #fff;
}

.kicker,
.label {
  margin-bottom: 6px;
  color: #667085;
  font-size: 12px;
  font-weight: 760;
  letter-spacing: 0;
  text-transform: none;
}

.hero h1 {
  max-width: none;
  font-size: 22px;
  line-height: 1.25;
}

.source-title {
  margin: 0;
  color: #1f2329;
  font-size: 18px;
  font-weight: 780;
  line-height: 1.35;
  white-space: nowrap;
}

.hero-text {
  max-width: 580px;
  margin: 0;
  color: #667085;
  font-size: 13px;
  line-height: 1.6;
  text-align: right;
}

.search-panel,
.result-card,
.data-strip {
  border-color: #e5e8ef;
  background: #fff;
  box-shadow: none;
}

.search-panel {
  border-radius: 0;
  padding: 0;
}

.panel-head,
.results-head {
  align-items: center;
}

.panel-head {
  min-height: 58px;
  border-bottom: 1px solid #e5e8ef;
  padding: 12px 16px;
}

.panel-head h2,
.results-head h2 {
  font-size: 18px;
}

.panel-actions {
  gap: 8px;
}

.status-pill {
  border: 1px solid #b7ebd2;
  border-radius: 2px;
  padding: 5px 8px;
  color: #067647;
  background: #ecfdf3;
  font-size: 12px;
}

.precise-toggle {
  min-height: 32px;
  border-color: #cfd6e4;
  border-radius: 2px;
  padding: 0 10px;
  color: #303642;
  font-size: 13px;
}

.precise-toggle[aria-pressed="true"] {
  border-color: #0052d9;
  background: #0052d9;
  box-shadow: none;
}

.mode-switch {
  display: inline-grid;
  width: auto;
  grid-template-columns: repeat(2, minmax(96px, 1fr));
  gap: 0;
  margin: 12px 16px 0;
  border-color: #cfd6e4;
  border-radius: 2px;
  padding: 0;
  background: #fff;
}

.mode-button {
  min-height: 34px;
  border-radius: 0;
  color: #303642;
  font-size: 13px;
}

.mode-button + .mode-button {
  border-left: 1px solid #cfd6e4;
}

.mode-button.active {
  color: #fff;
  background: #0052d9;
  box-shadow: none;
}

.form-grid {
  grid-template-columns: repeat(4, minmax(150px, 1fr));
  gap: 12px;
  margin-top: 0;
  padding: 14px 16px 18px;
}

label {
  gap: 6px;
}

label span,
.upload-card span,
.calculator-role-field > span {
  color: #4b5563;
  font-size: 12px;
  font-weight: 760;
}

input,
select,
.custom-select-trigger {
  min-height: 34px;
  border-color: #cfd6e4;
  border-radius: 2px;
  padding: 0 10px;
  background: #fff;
  font-size: 13px;
}

.custom-select-trigger {
  padding-right: 32px;
}

input:focus,
select:focus,
.custom-select.open .custom-select-trigger {
  border-color: #0052d9;
  box-shadow: 0 0 0 2px rgba(0, 82, 217, 0.12);
}

.wide {
  grid-column: 1 / -1;
}

.form-grid .public-security-control.wide {
  grid-column: 1 / -1;
  min-height: 28px;
}

.public-security-control {
  font-size: 12px;
}

.public-security-switch,
.calculator-switch {
  width: 36px;
  height: 20px;
  border-color: #cfd6e4;
}

.public-security-switch span,
.calculator-switch span {
  width: 14px;
  height: 14px;
}

.public-security-switch[aria-checked="true"] span,
.calculator-switch[aria-checked="true"] span {
  transform: translateX(16px);
}

.primary,
.secondary,
.upload-card button {
  min-height: 34px;
  border-radius: 2px;
  padding: 0 14px;
  font-size: 13px;
  box-shadow: none;
}

.primary {
  background: #0052d9;
}

.primary:hover,
.upload-card button:hover {
  background: #003cab;
}

.secondary {
  border-color: #cfd6e4;
  color: #303642;
}

.form-grid .primary.wide {
  justify-self: start;
  width: auto;
  min-width: 132px;
}

.graduate-box {
  border-color: #dfe3ea;
  border-radius: 2px;
  background: #f8fafc;
}

.candidate-item {
  border-color: #dfe3ea;
  border-radius: 2px;
}

.result-modal,
.public-security-modal,
.detail-modal {
  padding: 18px;
}

.result-modal-backdrop,
.public-security-backdrop,
.detail-modal-backdrop {
  background: rgba(15, 23, 42, 0.38);
  backdrop-filter: blur(2px);
}

.result-dialog,
.public-security-dialog,
.detail-dialog,
.score-calculator {
  border-radius: 2px;
  box-shadow: 0 18px 56px rgba(15, 23, 42, 0.22);
}

.result-dialog .results-head,
.public-security-head,
.detail-dialog-head,
.score-calculator-head {
  padding: 14px 16px;
  background: #fff;
}

.result-dialog-heading,
.public-security-heading {
  align-items: center;
}

.result-dialog > .results-grid {
  margin: 14px 16px 16px;
}

.result-dialog .year-results {
  padding: 0 16px 16px;
}

.result-card,
.public-security-result {
  border-radius: 2px;
}

.card-title {
  padding: 12px 14px;
  background: #fbfcfe;
}

.card-title h3 {
  font-size: 16px;
}

.card-title p,
.results-head p {
  margin-top: 4px;
  font-size: 12px;
}

table {
  font-size: 13px;
}

th,
td {
  padding: 10px 12px;
  border-bottom-color: #edf0f5;
}

th {
  color: #475467;
  background: #f7f9fc;
  font-size: 12px;
}

.table-wrap {
  max-height: 520px;
}

.year-toggle,
.public-security-tabs,
.calculator-tabs {
  border-color: #cfd6e4;
  border-radius: 2px;
  background: #fff;
}

.year-button,
.public-security-tab,
.calculator-tab {
  border-radius: 0;
}

.year-button.active,
.public-security-tab.active,
.calculator-tab.active {
  background: #0052d9;
  box-shadow: none;
}

.position-count-button,
.secondary-city-button {
  color: #0052d9;
  text-decoration-color: rgba(0, 82, 217, 0.35);
}

.position-count-button:hover,
.secondary-city-button:hover,
.secondary-city-button[aria-pressed="true"] {
  color: #fff;
  background: #0052d9;
}

.position-count-note,
.nearby-badge {
  border-color: #cfd6e4;
  border-radius: 2px;
  color: #475467;
  background: #f3f5f9;
}

.detail-close {
  flex-basis: 26px;
  width: 26px;
  height: 26px;
}

.detail-close::before {
  top: 6px;
  left: 6px;
}

.score-calculator {
  top: 66px;
  right: 18px;
}

.calculator-body {
  padding: 14px;
}

.calculator-fields input {
  min-height: 34px;
}

.toast,
.top-alert {
  border-radius: 2px;
}

@media (max-width: 980px) {
  .shell {
    width: 100%;
  }

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

  .workspace-sidebar {
    position: relative;
    height: auto;
    flex-direction: row;
    align-items: center;
    border-right: 0;
    border-bottom: 1px solid #e5e8ef;
  }

  .workspace-nav {
    width: auto;
  }

  .workspace-status {
    margin: 0 8px 0 auto;
  }

  .hero,
  .results-grid,
  .form-grid {
    grid-template-columns: minmax(0, 1fr);
    min-height: auto;
  }

  .panel-head,
  .results-head {
    display: grid;
  }

  .hero-copy {
    display: grid;
  }

  .hero-text {
    text-align: left;
  }
}

@media (max-width: 640px) {
  .nav {
    display: none;
  }

  .hero h1 {
    font-size: 42px;
  }

  .source-title {
    font-size: 18px;
    white-space: normal;
  }

  .hero-text {
    font-size: 17px;
  }

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

  .form-grid,
  .manual-grid,
  .entry-actions {
    grid-template-columns: 1fr;
  }
}

.hero h1.source-title {
  font-size: 18px;
  line-height: 1.35;
}

.login-card {
  display: grid;
  gap: 18px;
  border: 1px solid rgba(16, 18, 20, 0.1);
  border-radius: 8px;
  padding: 28px;
  background: #fff;
  box-shadow: var(--shadow);
}

.login-card h2 {
  margin: 4px 0 0;
  font-size: 26px;
}

.login-card label,
.admin-toolbar label {
  display: grid;
  gap: 7px;
}

.login-card label span,
.admin-toolbar label span {
  color: #475467;
  font-size: 13px;
  font-weight: 760;
}

.login-card input,
.admin-toolbar input,
.admin-toolbar select {
  width: 100%;
  border: 1px solid #cfd6e4;
  border-radius: 4px;
  padding: 10px 12px;
  color: var(--ink);
  background: #fff;
  outline: none;
}

.login-card input:focus,
.admin-toolbar input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(0, 82, 217, 0.12);
}

.login-error {
  min-height: 20px;
  margin: -4px 0 0;
  color: #b42318;
  font-size: 13px;
}

.login-error:not(.show) {
  visibility: hidden;
}

.workspace-user {
  position: relative;
  display: grid;
  gap: 5px;
  margin: auto 8px 0;
  padding: 12px;
  border: 1px solid #e5e8ef;
  border-radius: 8px;
  background: #fff;
}

.workspace-user strong {
  font-size: 14px;
}

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

.workspace-user > button {
  width: fit-content;
  border: 0;
  padding: 0;
  color: var(--accent);
  background: transparent;
  font-size: 12px;
  cursor: pointer;
}

.workspace-user .account-menu-button {
  color: #1f2329;
  text-align: left;
}

.workspace-user-menu {
  position: absolute;
  left: 12px;
  bottom: calc(100% + 8px);
  z-index: 60;
  width: 132px;
  border: 1px solid #dfe3ea;
  border-radius: 4px;
  padding: 4px;
  background: #fff;
  box-shadow: 0 14px 34px rgba(31, 35, 41, 0.14);
}

.workspace-user-menu button {
  width: 100%;
  min-height: 30px;
  border: 0;
  border-radius: 2px;
  padding: 0 9px;
  color: #303642;
  background: transparent;
  font-size: 13px;
  text-align: left;
  cursor: pointer;
}

.workspace-user-menu button:hover,
.workspace-user-menu button:focus-visible {
  color: #0052d9;
  background: #f2f6ff;
  outline: none;
}

.data-source-workspace {
  width: 100%;
  margin: 0 auto;
  padding: 0;
}

.admin-toolbar,
.admin-table-panel {
  border: 1px solid #dfe3ea;
  border-radius: 4px;
  background: #fff;
  box-shadow: 0 4px 14px rgba(31, 35, 41, 0.04);
}

.admin-toolbar {
  display: grid;
  grid-template-columns: minmax(220px, 320px) minmax(260px, 1fr) auto;
  gap: 14px;
  align-items: end;
  margin-top: 14px;
  padding: 14px;
}

.admin-table-panel {
  min-width: 0;
  overflow: hidden;
}

.admin-table-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 12px 14px;
  border-bottom: 1px solid #edf0f5;
  color: #475467;
  font-size: 13px;
}

.admin-pager,
.admin-row-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.admin-pager button,
.admin-row-actions button {
  border: 1px solid #cfd6e4;
  border-radius: 3px;
  padding: 5px 9px;
  color: #344054;
  background: #fff;
  cursor: pointer;
}

.admin-pager button:disabled {
  color: #98a2b3;
  cursor: not-allowed;
}

.admin-row-actions button:first-child {
  color: var(--accent);
}

.admin-row-actions button:last-child {
  color: #b42318;
}

.admin-table-scroll {
  overflow: auto;
  max-height: calc(100dvh - 260px);
}

.admin-table {
  min-width: 1080px;
  width: 100%;
  border-collapse: collapse;
}

.admin-table th,
.admin-table td {
  max-width: 220px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.admin-table .admin-actions-column {
  width: 118px;
  min-width: 118px;
  max-width: 118px;
  text-align: left;
}

@media (max-width: 980px) {
  .login-screen,
  .admin-toolbar {
    grid-template-columns: 1fr;
  }

  .workspace-user {
    margin: 0 0 0 auto;
  }
}

.login-screen {
  position: relative;
  width: 100%;
  min-height: 100dvh;
  display: grid;
  grid-template-columns: 1fr;
  place-items: center;
  overflow: hidden;
  padding: 28px;
  background:
    radial-gradient(circle at 50% 8%, rgba(0, 82, 217, 0.08), transparent 32%),
    radial-gradient(circle at 18% 78%, rgba(148, 163, 184, 0.16), transparent 28%),
    linear-gradient(180deg, #ffffff 0%, #f7f9fc 54%, #eef2f7 100%);
}

.login-screen::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle, rgba(51, 65, 85, 0.22) 0 1px, transparent 1.4px) 8% 18% / 180px 160px,
    radial-gradient(circle, rgba(0, 82, 217, 0.16) 0 1px, transparent 1.5px) 62% 26% / 220px 180px,
    linear-gradient(90deg, rgba(17, 24, 39, 0.026) 1px, transparent 1px) 0 0 / 56px 56px,
    linear-gradient(180deg, rgba(255, 255, 255, 0.64), rgba(255, 255, 255, 0));
  pointer-events: none;
}

.meteor-field {
  position: absolute;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
}

.meteor-field span {
  position: absolute;
  top: -8%;
  left: 12%;
  width: 118px;
  height: 1px;
  border-radius: 999px;
  background: linear-gradient(90deg, transparent, rgba(100, 116, 139, 0.18), rgba(255, 255, 255, 0.92));
  box-shadow: 0 0 12px rgba(0, 82, 217, 0.12);
  transform: rotate(-24deg);
  opacity: 0;
  animation: meteor-fall 9.8s cubic-bezier(0.42, 0, 0.72, 1) infinite;
}

.meteor-field span:nth-child(2) {
  top: -18%;
  left: 42%;
  width: 164px;
  animation-delay: 2.4s;
  animation-duration: 12.6s;
}

.meteor-field span:nth-child(3) {
  top: -10%;
  left: 78%;
  width: 96px;
  animation-delay: 5.2s;
  animation-duration: 10.8s;
  background: linear-gradient(90deg, transparent, rgba(0, 82, 217, 0.14), rgba(255, 255, 255, 0.86));
}

.meteor-field span:nth-child(4) {
  top: -26%;
  left: 92%;
  width: 136px;
  animation-delay: 7.7s;
  animation-duration: 13.8s;
}

.meteor-field span:nth-child(5) {
  top: -14%;
  left: 26%;
  width: 74px;
  animation-delay: 9.4s;
  animation-duration: 12.2s;
  opacity: 0;
}

.meteor-field span:nth-child(6) {
  top: -20%;
  left: 66%;
  width: 108px;
  animation-delay: 11.6s;
  animation-duration: 14.4s;
  opacity: 0;
}

@keyframes meteor-fall {
  0% {
    transform: translate3d(0, 0, 0) rotate(-24deg);
    opacity: 0;
  }

  5% {
    opacity: 0;
  }

  11% {
    opacity: 0.68;
  }

  30% {
    opacity: 0.5;
  }

  52%,
  100% {
    transform: translate3d(-620px, 780px, 0) rotate(-24deg);
    opacity: 0;
  }
}

.login-card {
  position: relative;
  z-index: 1;
  width: min(396px, 100%);
  display: grid;
  gap: 18px;
  border: 1px solid rgba(31, 35, 41, 0.1);
  border-radius: 12px;
  padding: 30px;
  background: rgba(255, 255, 255, 0.88);
  box-shadow:
    0 24px 60px rgba(31, 35, 41, 0.12),
    inset 0 1px 0 rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(18px);
}

.login-card h1 {
  margin: 4px 0 0;
  font-size: 28px;
  line-height: 1.18;
  letter-spacing: 0;
}

.login-card .primary {
  width: 100%;
  justify-content: center;
  min-height: 42px;
}

.data-source-workspace {
  height: 100dvh;
  overflow: hidden;
  padding: 0;
}

.workspace-content .data-source-workspace {
  width: 100%;
}

.data-source-panel {
  flex: 1;
  min-height: 0;
  margin: 16px 0;
  position: relative;
  border: 1px solid rgba(16, 18, 20, 0.1);
  border-radius: 4px;
  padding: 22px;
  background: rgba(255, 255, 255, 0.92);
  box-shadow: 0 4px 14px rgba(31, 35, 41, 0.04);
  display: flex;
  flex-direction: column;
}

.data-source-workspace main {
  height: calc(100dvh - 52px);
  min-height: 0;
  display: flex;
  flex-direction: column;
  padding: 0 22px;
}

.data-source-workspace .console-info-strip {
  margin: 0 -22px;
  padding: 0 22px;
}

.data-source-panel .panel-head {
  margin-bottom: 16px;
  padding-left: 0;
  padding-right: 0;
}

.admin-save-notice {
  position: absolute;
  top: 20px;
  left: 50%;
  z-index: 3;
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  border: 1px solid rgba(0, 168, 112, 0.2);
  border-radius: 4px;
  padding: 0 14px;
  color: #057647;
  background: rgba(236, 253, 243, 0.96);
  box-shadow: 0 10px 24px rgba(31, 35, 41, 0.08);
  font-size: 13px;
  font-weight: 760;
  opacity: 0;
  pointer-events: none;
  transform: translate(-50%, -12px);
  transition:
    opacity 220ms ease,
    transform 220ms ease;
}

.admin-save-notice.show {
  opacity: 1;
  transform: translate(-50%, 0);
}

.admin-toolbar {
  margin-top: 0;
  box-shadow: none;
}

.marketing-options-admin {
  margin-top: 14px;
  border: 1px solid #dfe3ea;
  border-radius: 4px;
  background: #fff;
  overflow: hidden;
}

.marketing-options-admin .admin-table-meta {
  padding-left: 14px;
}

.marketing-options-grid {
  display: grid;
  grid-template-columns: minmax(320px, 620px);
  gap: 16px;
  align-items: start;
  padding: 16px 14px 18px;
}

.marketing-options-grid label {
  display: grid;
  gap: 7px;
}

.marketing-option-editor-field {
  width: min(100%, 620px);
}

.marketing-option-actions {
  display: flex;
  justify-content: flex-start;
}

.marketing-options-grid label > span {
  color: #667085;
  font-size: 12px;
  font-weight: 760;
}

.marketing-options-grid textarea {
  min-height: 240px;
  border: 1px solid var(--line);
  border-radius: 4px;
  padding: 13px 14px;
  color: var(--ink);
  background:
    linear-gradient(to bottom, rgba(242, 246, 255, 0.38) 0, rgba(242, 246, 255, 0.38) 1px, transparent 1px, transparent 32px),
    #fff;
  background-size: 100% 32px;
  outline: none;
  font-family: ui-monospace, SFMono-Regular, "SF Mono", Consolas, "Liberation Mono", Menlo, monospace;
  font-size: 13px;
  line-height: 32px;
  resize: vertical;
}

.marketing-options-grid textarea:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(0, 82, 217, 0.1);
}

.admin-table-panel {
  flex: 1;
  min-height: 0;
  margin-top: 14px;
  display: flex;
  flex-direction: column;
}

.admin-table {
  min-width: 1180px;
}

.admin-table-scroll {
  flex: 1;
  min-height: 0;
  max-height: none;
}

.admin-table tr.is-editing {
  background: #f8fbff;
}

.admin-table tr.is-saving {
  opacity: 0.78;
}

.admin-row-actions.admin-actions-column {
  justify-content: flex-start;
}

.admin-editable-cell {
  padding: 4px 6px;
}

.admin-editable-cell input,
.admin-editable-cell textarea {
  width: 100%;
  min-width: 120px;
  height: 26px;
  border: 1px solid #cfd6e4;
  border-radius: 3px;
  padding: 3px 6px;
  color: var(--ink);
  background: #fff;
  outline: none;
  font-size: 12px;
  line-height: 18px;
}

.admin-editable-cell textarea {
  min-width: 180px;
  resize: none;
}

.admin-editable-cell input:focus,
.admin-editable-cell textarea:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(0, 82, 217, 0.1);
}

.admin-editable-cell .save-error {
  border-color: #d92d20;
  background: #fff7f7;
}

.workspace-role-field {
  display: grid;
  gap: 6px;
}

.workspace-role-field span {
  color: #667085;
  font-size: 12px;
  font-weight: 760;
}

.workspace-role-field .custom-select-trigger {
  min-height: 30px;
  font-size: 12px;
}

.global-message-wrap {
  position: relative;
  position: fixed;
  top: 10px;
  right: 22px;
  z-index: 35;
}

.global-message-button {
  position: relative;
  display: inline-flex;
  width: 32px;
  height: 32px;
  align-items: center;
  justify-content: center;
  border: 1px solid #dfe3ea;
  border-radius: 3px;
  color: #303642;
  background: #fff;
  cursor: pointer;
}

.global-message-button:hover {
  border-color: #0052d9;
  color: #0052d9;
}

.global-message-button svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linejoin: round;
}

.message-unread-dot {
  position: absolute;
  top: 6px;
  right: 6px;
  width: 7px;
  height: 7px;
  border-radius: 999px;
  background: #d92d20;
  box-shadow: 0 0 0 2px #fff;
}

.message-inbox {
  position: absolute;
  right: 0;
  top: calc(100% + 8px);
  z-index: 40;
  width: 260px;
  border: 1px solid #dfe3ea;
  border-radius: 4px;
  background: #fff;
  box-shadow: 0 16px 34px rgba(31, 35, 41, 0.14);
}

.message-inbox-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  border-bottom: 1px solid #edf0f5;
  padding: 10px 12px;
  color: #1f2329;
  font-size: 13px;
  font-weight: 820;
}

.message-inbox-head button {
  border: 0;
  padding: 0;
  color: #0052d9;
  background: transparent;
  font-size: 12px;
  font-weight: 500;
  cursor: pointer;
}

.message-inbox-head button:disabled {
  color: #a8b0bd;
  cursor: default;
}

.message-list {
  max-height: 280px;
  overflow: auto;
  padding: 6px;
}

.message-list p {
  margin: 0;
  padding: 18px 10px;
  color: #8a94a6;
  font-size: 13px;
  text-align: center;
}

.message-item {
  display: grid;
  width: 100%;
  gap: 4px;
  border: 0;
  border-radius: 2px;
  padding: 9px 8px;
  color: #303642;
  background: transparent;
  text-align: left;
}

.message-item:hover {
  background: #f2f6ff;
}

.message-item.unread strong::before {
  content: "";
  display: inline-block;
  width: 6px;
  height: 6px;
  margin-right: 6px;
  border-radius: 999px;
  background: #0052d9;
  vertical-align: middle;
}

.message-item strong {
  font-size: 13px;
}

.message-item span {
  color: #667085;
  font-size: 12px;
  line-height: 1.45;
}

.marketing-workspace,
.lead-pool-workspace,
.user-management-workspace,
.dashboard-workspace {
  width: 100%;
  height: 100dvh;
  margin: 0 auto;
  overflow: hidden;
  padding: 0;
}

.workspace-content .marketing-workspace,
.workspace-content .lead-pool-workspace,
.workspace-content .user-management-workspace,
.workspace-content .dashboard-workspace {
  width: 100%;
  max-width: none;
  margin: 0;
}

.marketing-workspace main,
.lead-pool-workspace main,
.user-management-workspace main,
.dashboard-workspace main {
  height: calc(100dvh - 52px);
  min-height: 0;
  display: flex;
  flex-direction: column;
  padding: 0 22px;
}

.marketing-workspace .console-info-strip,
.lead-pool-workspace .console-info-strip,
.user-management-workspace .console-info-strip,
.dashboard-workspace .console-info-strip {
  margin: 0 -22px;
  padding: 0 22px;
}

.marketing-panel {
  position: relative;
  display: flex;
  min-height: 0;
  flex: 1;
  flex-direction: column;
  margin: 16px 0;
  border: 1px solid rgba(16, 18, 20, 0.1);
  border-radius: 4px;
  padding: 22px;
  background: rgba(255, 255, 255, 0.92);
  box-shadow: 0 4px 14px rgba(31, 35, 41, 0.04);
}

.marketing-panel .panel-head {
  margin-bottom: 16px;
  padding-left: 0;
  padding-right: 0;
}

.lead-pool-workspace .admin-table-meta,
#marketingWorkspace .admin-table-meta {
  align-items: flex-start;
  padding-left: 0;
}

.lead-pool-workspace .admin-table-meta {
  padding-top: 11px;
}

body[data-work-role="销售"] #marketingWorkspace .admin-table-meta {
  padding-top: 13px;
}

.lead-pool-workspace .marketing-panel .panel-head,
body[data-work-role="销售"] #marketingWorkspace .marketing-panel .panel-head {
  margin-bottom: 0;
  padding-bottom: 0;
}

#leadPoolSummary {
  display: block;
  padding: 0 0 12px;
}

.marketing-lead-form {
  grid-template-columns: repeat(4, minmax(150px, 1fr));
  padding: 0;
}

.marketing-student-panel {
  display: flex;
  min-height: 0;
  flex: 1;
  flex-direction: column;
}

.dashboard-panel {
  overflow: hidden;
}

.announcement-workspace {
  width: 100%;
}

.announcement-panel {
  gap: 14px;
}

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

.announcement-filter-form {
  display: grid;
  grid-template-columns: minmax(220px, 1.4fr) minmax(180px, 1fr) minmax(150px, 0.7fr) minmax(150px, 0.7fr) auto;
  gap: 12px;
  align-items: end;
  margin-top: 0;
}

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

.announcement-title-cell {
  min-width: 360px;
  max-width: 620px;
  white-space: normal;
  line-height: 1.5;
}

.announcement-table .announcement-date-heading,
.announcement-table .announcement-date-cell,
.announcement-table .announcement-link-heading,
.announcement-table .announcement-link-cell {
  padding-left: 12px;
  text-align: left;
}

.announcement-table .announcement-link-cell {
  justify-content: flex-start;
}

.announcement-table .announcement-link-cell button {
  display: inline-flex;
  min-width: 48px;
  align-items: center;
  justify-content: center;
  margin-left: 0;
  padding: 5px 9px;
  text-align: center;
}

.dashboard-layout {
  display: grid;
  min-height: 0;
  flex: 1;
  grid-template-columns: minmax(320px, 0.9fr) minmax(520px, 1.5fr);
  gap: 18px;
}

.dashboard-summary-column,
.dashboard-chart-column {
  min-height: 0;
}

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

.dashboard-metric,
.dashboard-ranking,
.dashboard-chart-card {
  border: 1px solid #e4e7ec;
  border-radius: 4px;
  background: linear-gradient(180deg, #fff 0%, #fbfcff 100%);
  box-shadow: 0 8px 22px rgba(16, 24, 40, 0.045);
}

.dashboard-metric {
  padding: 10px 12px;
}

.dashboard-metric span,
.dashboard-metric small {
  display: block;
  color: #667085;
  font-size: 11px;
  line-height: 1.35;
}

.dashboard-metric strong {
  display: block;
  margin: 6px 0 3px;
  color: #1d2939;
  font-size: 20px;
  line-height: 1;
  font-weight: 400;
}

.dashboard-ranking {
  margin-top: 14px;
  padding: 14px;
}

.dashboard-ranking h3,
.dashboard-chart-card h3 {
  margin: 0 0 12px;
  color: #344054;
  font-size: 13px;
  font-weight: 400;
}

.dashboard-rank-row {
  display: grid;
  grid-template-columns: 28px minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  padding: 8px 0;
  border-top: 1px solid #f2f4f7;
  color: #475467;
}

.dashboard-rank-row:first-child {
  border-top: 0;
}

.dashboard-rank-row span {
  display: grid;
  width: 22px;
  height: 22px;
  place-items: center;
  border-radius: 999px;
  background: #f2f4f7;
  color: #667085;
}

.dashboard-rank-row strong,
.dashboard-rank-row em {
  font-style: normal;
  font-weight: 400;
}

.dashboard-chart-column {
  display: grid;
  grid-template-rows: minmax(240px, 1fr) minmax(220px, 0.95fr);
  gap: 14px;
}

.dashboard-chart-card {
  min-width: 0;
  padding: 14px;
}

.dashboard-trend-chart {
  height: calc(100% - 26px);
  min-height: 190px;
}

.dashboard-line-svg {
  width: 100%;
  height: 100%;
}

.dashboard-line-svg line {
  stroke: #e4e7ec;
  stroke-width: 1;
  stroke-dasharray: 4 5;
}

.dashboard-line-svg .area {
  fill: url("#dashboardTrendFill");
}

.dashboard-line-svg polyline {
  fill: none;
  stroke: #1f6feb;
  stroke-width: 3;
  stroke-linecap: round;
  stroke-linejoin: round;
  filter: drop-shadow(0 8px 9px rgba(31, 111, 235, 0.16));
}

.dashboard-line-svg circle {
  fill: #fff;
  stroke: #1f6feb;
  stroke-width: 2;
}

.dashboard-line-svg text {
  fill: #98a2b3;
  font-size: 11px;
}

.dashboard-pie-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

.dashboard-pie-wrap {
  display: grid;
  grid-template-columns: 108px minmax(0, 1fr);
  gap: 14px;
  align-items: center;
}

.dashboard-pie {
  width: 108px;
  aspect-ratio: 1;
  border-radius: 50%;
  background: radial-gradient(circle at center, #fff 0 46%, transparent 47%);
  box-shadow: inset 0 0 0 18px rgba(255, 255, 255, 0.82), 0 9px 18px rgba(16, 24, 40, 0.08);
}

.dashboard-pie-wrap ul {
  display: grid;
  gap: 7px;
  margin: 0;
  padding: 0;
  list-style: none;
  color: #475467;
}

.dashboard-pie-wrap li {
  display: flex;
  gap: 7px;
  align-items: center;
  min-width: 0;
}

.dashboard-pie-wrap li span {
  width: 8px;
  height: 8px;
  flex: 0 0 auto;
  border-radius: 999px;
  background: var(--dot);
}

.dashboard-empty-chart {
  display: grid;
  min-height: 120px;
  place-items: center;
  color: #98a2b3;
}

.marketing-table-scroll {
  min-height: 0;
  flex: 1;
  overflow: auto;
  border: 1px solid #dfe3ea;
  border-top: 0;
}

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

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

.password-change-form {
  grid-template-columns: minmax(180px, 260px) minmax(180px, 260px) auto;
  align-items: end;
  padding: 0 0 16px;
}

.password-submit-button {
  justify-self: start;
  min-height: 34px;
  border: 1px solid #0052d9;
  border-radius: 3px;
  padding: 0 14px;
  color: #fff;
  background: #0052d9;
  font-size: 13px;
  font-weight: 760;
  cursor: pointer;
}

.password-submit-button:hover {
  background: #003cab;
}

.password-submit-button:disabled {
  border-color: #cfd6e4;
  color: #8a94a6;
  background: #f3f5f8;
  cursor: not-allowed;
}

.marketing-table th,
.marketing-table td {
  white-space: nowrap;
}

.lead-pool-workspace .marketing-table th,
.lead-pool-workspace .marketing-table td,
.marketing-workspace .marketing-table th,
.marketing-workspace .marketing-table td,
#marketingWorkspace .marketing-table th,
#marketingWorkspace .marketing-table td,
.lead-pool-workspace .admin-table-meta,
#marketingWorkspace .admin-table-meta,
.lead-pool-workspace .lead-status,
#marketingWorkspace .lead-status {
  font-weight: 400;
}

.marketing-table th:nth-child(3),
.marketing-table td:nth-child(3),
.marketing-table th:nth-child(4),
.marketing-table td:nth-child(4) {
  min-width: 180px;
}

.marketing-table .admin-row-actions {
  align-items: center;
  min-height: 34px;
}

.marketing-table .admin-row-actions .muted {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  border: 0;
  text-decoration: none;
}

.marketing-edit-dialog {
  width: min(760px, calc(100vw - 48px));
}

.import-error-dialog {
  width: min(680px, calc(100vw - 48px));
}

.import-error-body {
  display: grid;
  gap: 12px;
  color: #475467;
}

.import-error-body p {
  margin: 0;
}

.import-error-list {
  display: grid;
  max-height: 320px;
  gap: 8px;
  margin: 0;
  overflow: auto;
  padding: 12px 14px 12px 28px;
  border: 1px solid #fecdca;
  border-radius: 4px;
  background: #fffbfa;
  color: #b42318;
}

.import-error-list li {
  line-height: 1.55;
}

.account-dialog {
  width: min(520px, calc(100vw - 48px));
}

.account-dialog-form {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 14px;
  padding: 18px 20px 20px;
}

.account-dialog-form label {
  display: grid;
  gap: 7px;
}

.account-dialog-form label > span {
  color: #667085;
  font-size: 13px;
}

.account-dialog-form input {
  min-height: 34px;
  border: 1px solid var(--line);
  border-radius: 4px;
  padding: 0 10px;
  color: var(--ink);
  background: #fff;
  outline: none;
  font: inherit;
  font-size: 13px;
}

.account-dialog-form input:focus,
.account-dialog-form .custom-select.open .custom-select-trigger {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(0, 82, 217, 0.1);
}

.marketing-edit-form {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  padding: 18px 20px 20px;
}

.marketing-edit-form label {
  display: grid;
  gap: 7px;
}

.marketing-edit-form label > span {
  color: #667085;
  font-size: 12px;
  font-weight: 760;
}

.marketing-edit-form input {
  min-height: 34px;
  border: 1px solid var(--line);
  border-radius: 4px;
  padding: 0 10px;
  color: var(--ink);
  background: rgba(255, 255, 255, 0.94);
  outline: none;
  font: inherit;
  font-size: 13px;
}

.marketing-edit-form input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(0, 82, 217, 0.1);
}

.marketing-edit-actions {
  grid-column: 1 / -1;
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  padding-top: 4px;
}

.lead-status {
  display: inline-flex;
  align-items: center;
  min-height: 22px;
  border: 1px solid #dfe3ea;
  border-radius: 2px;
  padding: 0 8px;
  color: #667085;
  background: #f8fafc;
  font-size: 12px;
  font-weight: 760;
}

.lead-status.pending {
  border-color: #fed7aa;
  color: #9a3412;
  background: #fff7ed;
}

.lead-status.claimed {
  border-color: #b7ebd2;
  color: #067647;
  background: #ecfdf3;
}

@keyframes lead-row-flash {
  0%,
  100% {
    background: transparent;
  }
  25%,
  75% {
    background: #fff4c7;
  }
}

.lead-row-highlight {
  animation: lead-row-flash 0.7s ease-in-out 2;
}

.muted {
  color: #8a94a6;
  font-size: 12px;
}

body,
button,
input,
select,
textarea,
th,
td,
strong,
b,
h1,
h2,
h3,
h4,
h5,
h6,
.workspace-brand strong,
.workspace-nav-button,
.topbar-left strong,
.source-switch-button,
.calculator-nav-button,
.ghost-button,
.primary,
.secondary,
.status-pill,
.precise-toggle,
.mode-button,
.year-button,
.public-security-tab,
.calculator-tab,
.position-count-button,
.secondary-city-button,
.position-count-note,
.nearby-badge,
.lead-status,
.message-inbox-head,
.message-item strong,
.detail-close::after {
  font-weight: 400;
}

body :where(*, *::before, *::after) {
  font-weight: 400 !important;
}

.workspace-content :where(
  p,
  label span,
  button,
  input,
  select,
  textarea,
  th,
  td,
  small,
  .custom-select-value,
  .custom-select-option,
  .suggestion-item,
  .admin-table-meta,
  .console-info-strip,
  .lead-status,
  .muted
) {
  font-size: 13px;
  font-weight: 400;
}

.workspace-empty p {
  margin: 0;
  font-size: 48px;
  line-height: 1.15;
}

.search-panel .panel-actions {
  min-height: 32px;
}

.search-panel .status-pill,
.search-panel .precise-toggle {
  display: inline-flex;
  min-height: 32px;
  align-items: center;
  justify-content: center;
  line-height: 1;
}

.search-panel .status-pill {
  padding: 0 10px;
}

@media (prefers-reduced-motion: reduce) {
  .meteor-field span {
    animation: none;
    display: none;
  }
}
