:root {
  --page-bg: #e9f0fb;
  --page-bg-deep: #dce6f8;
  --card-bg: rgba(255, 255, 255, 0.92);
  --card-line: rgba(108, 145, 203, 0.16);
  --text-main: #1b2c4a;
  --text-soft: #6f7f99;
  --blue: #1f64d8;
  --blue-deep: #134ca8;
  --blue-soft: #e8f0ff;
  --blue-ghost: rgba(31, 100, 216, 0.08);
  --warn-bg: #f3f5f8;
  --warn-line: #6cb2ff;
  --shadow: 0 30px 80px rgba(73, 106, 158, 0.18);
}

* {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

html,
body {
  min-height: 100%;
}

body {
  margin: 0;
  color: var(--text-main);
  font-family: "Avenir Next", "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  background:
    radial-gradient(circle at 15% 15%, rgba(255, 255, 255, 0.65), transparent 30%),
    radial-gradient(circle at 85% 20%, rgba(210, 227, 255, 0.75), transparent 32%),
    linear-gradient(180deg, var(--page-bg) 0%, var(--page-bg-deep) 100%);
}

.front-page {
  --page-bg: #e7eef9;
  --page-bg-deep: #d8e3f5;
  --card-bg: rgba(255, 255, 255, 0.95);
  --card-line: rgba(96, 124, 179, 0.14);
  --text-main: #1f2b40;
  --text-soft: #71819b;
  --blue: #2e67cb;
  --blue-deep: #173f85;
  --blue-soft: #edf3ff;
  --blue-ghost: rgba(46, 103, 203, 0.08);
  --warn-bg: #f7f8fb;
  --warn-line: #86afe9;
  --shadow: 0 30px 78px rgba(67, 93, 142, 0.16);
  position: relative;
  overflow-x: hidden;
  background:
    radial-gradient(circle at 14% 16%, rgba(255, 255, 255, 0.96) 0%, rgba(255, 255, 255, 0.62) 14%, transparent 34%),
    radial-gradient(circle at 82% 18%, rgba(132, 176, 255, 0.46) 0%, rgba(132, 176, 255, 0.14) 18%, transparent 38%),
    radial-gradient(circle at 78% 74%, rgba(96, 145, 231, 0.16) 0%, transparent 28%),
    radial-gradient(circle at 18% 82%, rgba(208, 227, 255, 0.52) 0%, transparent 24%),
    linear-gradient(180deg, #eef4ff 0%, #dce7fb 100%);
}

.front-page::before,
.front-page::after {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
}

.front-page::before {
  background:
    radial-gradient(circle at 18% 24%, rgba(73, 131, 255, 0.18) 0%, rgba(73, 131, 255, 0.08) 16%, transparent 34%),
    radial-gradient(circle at 84% 26%, rgba(122, 197, 255, 0.22) 0%, rgba(122, 197, 255, 0.08) 18%, transparent 36%),
    radial-gradient(circle at 54% 78%, rgba(78, 108, 201, 0.14) 0%, transparent 32%);
  filter: blur(24px);
  opacity: 0.92;
}

.front-page::after {
  background-image:
    linear-gradient(rgba(84, 121, 190, 0.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(84, 121, 190, 0.05) 1px, transparent 1px);
  background-size: 34px 34px;
  opacity: 0.36;
  -webkit-mask-image: radial-gradient(circle at 50% 46%, rgba(0, 0, 0, 0.88), transparent 82%);
  mask-image: radial-gradient(circle at 50% 46%, rgba(0, 0, 0, 0.88), transparent 82%);
}

body.modal-open {
  overflow: hidden;
}

.portal-stage {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 32px 18px;
}

.front-page .portal-stage {
  position: relative;
  isolation: isolate;
}

.front-page .portal-stage::before,
.front-page .portal-stage::after {
  content: "";
  position: absolute;
  pointer-events: none;
  z-index: 0;
}

.front-page .portal-stage::before {
  width: min(880px, 92vw);
  height: min(620px, 72vh);
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  background:
    radial-gradient(circle at 30% 30%, rgba(132, 176, 255, 0.22) 0%, transparent 26%),
    radial-gradient(circle at 70% 22%, rgba(255, 255, 255, 0.74) 0%, transparent 18%),
    radial-gradient(circle at 68% 72%, rgba(73, 131, 255, 0.16) 0%, transparent 28%);
  filter: blur(22px);
}

.front-page .portal-stage::after {
  width: min(760px, 84vw);
  height: min(520px, 64vh);
  right: 2%;
  top: 8%;
  background: radial-gradient(circle, rgba(173, 207, 255, 0.22) 0%, transparent 64%);
  filter: blur(34px);
}

.portal-card-shell {
  position: relative;
  width: min(100%, 580px);
  z-index: 1;
}

.front-page .portal-card-shell {
  width: min(100%, 648px);
}

.portal-card {
  width: 100%;
  padding: 42px 34px 28px;
  border-radius: 22px;
  border: 1px solid var(--card-line);
  background: var(--card-bg);
  box-shadow: var(--shadow);
  backdrop-filter: blur(10px);
}

.front-page .portal-card {
  position: relative;
  overflow: hidden;
  padding: 46px 38px 30px;
}

.front-page .portal-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 5px;
  background: linear-gradient(
    90deg,
    #163c7d 0%,
    #2558b0 22%,
    #6fa4ff 50%,
    #2558b0 78%,
    #163c7d 100%
  );
  background-size: 200% 100%;
  border-radius: 22px 22px 10px 10px;
  animation: portal-line-flow 5.6s linear infinite;
  box-shadow: 0 1px 10px rgba(46, 103, 203, 0.18);
}

@keyframes portal-line-flow {
  0% {
    background-position: 200% 50%;
  }

  100% {
    background-position: -200% 50%;
  }
}

@media (prefers-reduced-motion: reduce) {
  .front-page .portal-card::before {
    animation: none;
  }
}

.portal-header {
  text-align: center;
}

.front-page .portal-header {
  display: flex;
  flex-direction: column;
  gap: 18px;
  text-align: left;
}

.portal-header-copy {
  text-align: center;
}

.portal-title-row {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
}

.portal-title-row h1 {
  margin: 0;
  font-size: clamp(28px, 4vw, 36px);
  font-weight: 800;
  letter-spacing: 0.02em;
  color: var(--blue-deep);
}

.portal-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 22px;
  padding: 0 9px;
  border-radius: 999px;
  background: var(--blue);
  color: white;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.04em;
}

.portal-version {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 22px;
  padding: 0 9px;
  border-radius: 999px;
  background: rgba(148, 163, 184, 0.18);
  color: var(--text-soft);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.04em;
  font-variant-numeric: tabular-nums;
}

.portal-subtitle {
  margin: 12px 0 0;
  color: var(--text-soft);
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.04em;
}

.portal-description {
  margin: 8px auto 0;
  max-width: 380px;
  color: #7f8ca3;
  font-size: 13px;
  line-height: 1.7;
}

.front-page .portal-subtitle {
  margin-top: 14px;
  color: #5f7190;
  font-size: 15px;
  font-weight: 800;
  letter-spacing: 0.02em;
}

.front-page .portal-description {
  margin-top: 10px;
  max-width: 430px;
  color: #7384a2;
  font-size: 13.5px;
  line-height: 1.75;
}

.portal-meta-card {
  width: 100%;
  padding: 14px 16px;
  border: 1px solid rgba(108, 145, 203, 0.14);
  border-radius: 18px;
  background:
    linear-gradient(180deg, rgba(247, 251, 255, 0.98) 0%, rgba(240, 246, 255, 0.94) 100%);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.7);
}

.portal-meta-label {
  color: #6e82a7;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.portal-meta {
  margin-top: 12px;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 12px;
}

.portal-meta-main {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  gap: 12px;
  flex-wrap: wrap;
}

.portal-sync-block {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
}

.portal-sync-label {
  color: #7f8da7;
  font-size: 12px;
  font-weight: 600;
}

.portal-sync-time {
  color: var(--blue-deep);
  font-size: 20px;
  font-weight: 800;
  line-height: 1.15;
  letter-spacing: 0.01em;
}

.meta-text {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: #8b96ab;
  font-size: 13px;
}

.meta-icon {
  font-size: 14px;
}

.sync-mode-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 32px;
  padding: 0 12px;
  border-radius: 999px;
  border: 1px solid rgba(23, 63, 133, 0.1);
  background: rgba(23, 63, 133, 0.06);
  color: var(--blue-deep);
  font-size: 13px;
  font-weight: 700;
}

.sync-mode-badge.is-running {
  border-color: rgba(215, 153, 0, 0.18);
  background: rgba(255, 232, 163, 0.54);
  color: #866100;
}

.sync-mode-badge.is-auto {
  border-color: rgba(23, 63, 133, 0.12);
  background: rgba(23, 63, 133, 0.06);
  color: var(--blue-deep);
}

.sync-mode-badge.is-webhook {
  border-color: rgba(35, 114, 225, 0.16);
  background: rgba(40, 115, 230, 0.09);
  color: #1552b4;
}

.sync-mode-badge.is-idle {
  border-color: rgba(134, 148, 170, 0.14);
  background: rgba(134, 148, 170, 0.08);
  color: #6f7f99;
}

.sync-meta-note {
  margin: 10px 0 0;
  color: #7d8ca4;
  font-size: 12px;
  line-height: 1.6;
}

.search-panel {
  margin-top: 26px;
}

.search-shell {
  display: grid;
  grid-template-columns: 1fr 118px;
  gap: 0;
  border: 1px solid rgba(126, 155, 205, 0.28);
  border-radius: 12px;
  overflow: hidden;
  background: white;
}

.front-page .search-shell {
  border-color: rgba(96, 124, 179, 0.22);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.66);
}

.search-shell input {
  width: 100%;
  min-width: 0;
  border: 0;
  padding: 15px 16px;
  font-size: 15px;
  color: var(--text-main);
  outline: none;
  background: transparent;
}

.search-shell input::placeholder {
  color: #96a2b5;
}

.search-btn {
  border: 0;
  background: linear-gradient(180deg, #1f67e2 0%, #1a57be 100%);
  color: white;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
}

.admin-console-page .search-btn {
  height: 34px;
  min-height: 34px;
  padding: 0 14px;
  font-size: 13px;
  font-weight: 600;
  border-radius: 6px;
}

.front-page .search-btn {
  background: linear-gradient(180deg, #214f9f 0%, #173f85 100%);
  letter-spacing: 0.02em;
}

.search-btn:hover {
  background: linear-gradient(180deg, #205fd0 0%, #184ca4 100%);
}

.front-page .search-btn:hover {
  background: linear-gradient(180deg, #1d4a94 0%, #153770 100%);
}

.search-support {
  margin-top: 10px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.support-toggle {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--text-soft);
  font-size: 13px;
}

.support-stats {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: #8d98aa;
  font-size: 12px;
}

.support-stats strong {
  color: var(--blue-deep);
}

.dot {
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: #a8b9d4;
}

.notice-box {
  margin-top: 10px;
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 12px 14px;
  border-left: 3px solid var(--warn-line);
  border-radius: 8px;
  background: var(--warn-bg);
}

.notice-icon {
  flex: 0 0 auto;
  font-size: 16px;
  line-height: 1;
}

.notice-box p {
  margin: 0;
  color: #748296;
  font-size: 12.5px;
  line-height: 1.55;
}

.notice-copy {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.notice-title {
  margin: 0;
  color: #1b2c4a;
  font-size: 13px;
  font-weight: 800;
}

.notice-action {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  color: var(--blue-deep);
  font-size: 12.5px;
  font-weight: 700;
  text-decoration: none;
}

.notice-action:hover {
  color: var(--blue);
  text-decoration: underline;
}

.hint-trigger {
  margin-top: 10px;
  width: fit-content;
  max-width: 100%;
  min-height: 0;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 4px 2px;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: #907024;
  text-align: left;
  cursor: pointer;
  box-shadow: none;
  transition: background-color 160ms ease, color 160ms ease;
}

.hint-trigger:hover {
  background: rgba(255, 241, 186, 0.28);
  color: #765910;
}

.hint-trigger-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: rgba(196, 145, 18, 0.14);
  color: #9b7410;
  font-size: 11px;
  font-weight: 800;
}

.hint-trigger-copy {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.hint-trigger-copy strong {
  font-size: 12.5px;
  font-weight: 700;
}

.hint-trigger-copy small {
  color: rgba(122, 97, 33, 0.72);
  font-size: 11.5px;
}

.hint-trigger-inline {
  width: 100%;
  margin-top: 12px;
  padding: 12px 14px;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  border: 1px solid rgba(229, 189, 79, 0.24);
  border-radius: 14px;
  background: linear-gradient(180deg, rgba(255, 248, 221, 0.94) 0%, rgba(255, 243, 197, 0.92) 100%);
  box-shadow: 0 10px 22px rgba(176, 139, 45, 0.08);
  color: #8a6918;
  transition: transform 160ms ease, box-shadow 160ms ease, background-color 160ms ease;
}

.hint-trigger-inline:hover {
  background: linear-gradient(180deg, rgba(255, 245, 208, 0.96) 0%, rgba(255, 237, 182, 0.94) 100%);
  box-shadow: 0 12px 24px rgba(176, 139, 45, 0.12);
  transform: translateY(-1px);
}

.hint-trigger-inline .hint-trigger-icon {
  width: 24px;
  height: 24px;
  flex: 0 0 auto;
  background: rgba(201, 151, 19, 0.16);
  color: #9d7410;
  font-size: 12px;
}

.hint-trigger-inline .hint-trigger-copy {
  display: flex;
  flex-direction: column;
  flex: 1 1 auto;
  align-items: flex-start;
  justify-content: center;
  gap: 3px;
  min-width: 0;
  text-align: left;
}

.hint-trigger-inline .hint-trigger-copy strong {
  display: block;
  font-size: 13px;
  line-height: 1.2;
  color: #795810;
}

.hint-trigger-inline .hint-trigger-copy small {
  display: block;
  color: rgba(122, 97, 33, 0.84);
  font-size: 12px;
  line-height: 1.35;
}

.hint-trigger-action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 30px;
  padding: 0 12px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.44);
  color: #8d6914;
  font-size: 12px;
  font-weight: 700;
  white-space: nowrap;
}

.hint-trigger-floating {
  position: absolute;
  top: 244px;
  right: -48px;
  margin-top: 0;
  width: 76px;
  min-height: 90px;
  padding: 10px 8px 9px 12px;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 5px;
  border: 1px solid rgba(226, 176, 44, 0.2);
  border-left: 0;
  border-radius: 0 16px 16px 0;
  background: linear-gradient(180deg, rgba(255, 248, 219, 0.98) 0%, rgba(255, 239, 190, 0.98) 100%);
  box-shadow: 0 12px 24px rgba(150, 121, 43, 0.1);
  backdrop-filter: blur(6px);
  color: #805f10;
  transition: transform 180ms ease, background-color 160ms ease, box-shadow 180ms ease;
}

.hint-trigger-floating:hover {
  background: linear-gradient(180deg, rgba(255, 244, 204, 0.98) 0%, rgba(255, 235, 174, 0.98) 100%);
  box-shadow: 0 14px 28px rgba(150, 121, 43, 0.14);
  transform: translateX(-2px);
}

.hint-trigger-floating::before {
  content: "";
  position: absolute;
  left: -10px;
  top: 50%;
  width: 11px;
  height: 40px;
  border: 1px solid rgba(226, 176, 44, 0.18);
  border-right: 0;
  border-radius: 12px 0 0 12px;
  background: rgba(255, 245, 209, 0.94);
  transform: translateY(-50%);
}

.hint-trigger-floating .hint-trigger-icon {
  width: 20px;
  height: 20px;
  font-size: 10px;
}

.hint-trigger-floating .hint-trigger-copy {
  flex-direction: column;
  align-items: center;
  gap: 2px;
  text-align: center;
}

.hint-trigger-floating .hint-trigger-copy strong {
  font-size: 11.5px;
  line-height: 1.1;
}

.hint-trigger-floating .hint-trigger-copy small {
  font-size: 10px;
  line-height: 1.1;
  color: rgba(122, 97, 33, 0.8);
}

.hint-modal {
  position: fixed;
  inset: 0;
  z-index: 50;
  display: none;
}

.hint-modal.is-open {
  display: block;
}

.hint-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(21, 41, 76, 0.42);
  backdrop-filter: blur(8px);
}

.hint-modal-panel {
  position: relative;
  width: min(920px, calc(100% - 28px));
  max-height: min(82vh, 920px);
  margin: 5vh auto 0;
  border-radius: 24px;
  border: 1px solid rgba(96, 124, 179, 0.2);
  background: rgba(255, 255, 255, 0.96);
  box-shadow: 0 36px 90px rgba(46, 72, 117, 0.28);
  overflow: hidden;
}

.hint-modal-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
  padding: 24px 24px 18px;
  border-bottom: 1px solid rgba(238, 193, 74, 0.24);
  background: linear-gradient(180deg, rgba(255, 248, 217, 0.96) 0%, rgba(255, 241, 186, 0.88) 100%);
}

.hint-modal-kicker {
  margin: 0;
  color: #b07a0d;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.08em;
}

.hint-modal-head h2 {
  margin: 8px 0 0;
  color: #5a4313;
  font-size: 26px;
}

.hint-modal-copy {
  margin: 8px 0 0;
  color: #7b6a42;
  font-size: 13px;
  line-height: 1.6;
}

.hint-close-btn {
  width: 40px;
  height: 40px;
  border: 0;
  border-radius: 12px;
  background: rgba(193, 143, 19, 0.12);
  color: #79570f;
  font-size: 26px;
  line-height: 1;
  cursor: pointer;
}

.hint-close-btn:hover {
  background: rgba(193, 143, 19, 0.18);
}

.hint-modal-body {
  max-height: calc(82vh - 110px);
  overflow: auto;
  padding: 18px 24px 24px;
}

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

.hint-item {
  padding: 14px;
  border-radius: 14px;
  background: linear-gradient(180deg, rgba(247, 250, 255, 0.96) 0%, rgba(241, 246, 255, 0.96) 100%);
  border: 1px solid rgba(96, 124, 179, 0.12);
}

.hint-item-wide {
  grid-column: span 2;
}

.hint-item h3 {
  margin: 0;
  color: var(--blue-deep);
  font-size: 15px;
}

.hint-note {
  margin: 8px 0 0;
  color: var(--text-soft);
  font-size: 12px;
  line-height: 1.6;
}

.hint-range-list {
  margin-top: 10px;
  display: grid;
  gap: 8px;
}

.hint-range-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 12px;
  border-radius: 12px;
  background: rgba(233, 240, 251, 0.72);
}

.hint-range-row-accent {
  background: rgba(255, 241, 186, 0.82);
}

.hint-range-row span {
  color: var(--text-soft);
  font-size: 12px;
  white-space: nowrap;
}

.hint-range-row strong {
  color: var(--text-main);
  font-size: 13px;
  line-height: 1.4;
  text-align: right;
}

.results-panel {
  margin-top: 0;
  max-height: 0;
  overflow: hidden;
  opacity: 0;
  transform: translateY(-8px);
  transition: opacity 180ms ease, transform 180ms ease, max-height 240ms ease, margin-top 180ms ease;
}

.results-panel.active {
  margin-top: 18px;
  max-height: 5200px;
  overflow: visible;
  opacity: 1;
  transform: translateY(0);
}

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

.results-head-copy {
  min-width: 0;
}

.results-head h2 {
  margin: 0;
  font-size: 16px;
  font-weight: 700;
  color: var(--blue-deep);
}

.results-summary {
  margin: 6px 0 0;
  color: var(--text-soft);
  font-size: 12.5px;
  line-height: 1.6;
}

.results-count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 56px;
  height: 26px;
  padding: 0 10px;
  border-radius: 999px;
  background: rgba(23, 63, 133, 0.08);
  color: var(--blue-deep);
  font-size: 12px;
  font-weight: 700;
}

.empty-state {
  margin-top: 12px;
  padding: 16px;
  border-radius: 12px;
  background: rgba(245, 248, 253, 0.9);
  border: 1px dashed rgba(108, 145, 203, 0.24);
  text-align: center;
}

.empty-state p {
  margin: 0;
  font-size: 14px;
  font-weight: 700;
  color: var(--text-main);
}

.empty-state small {
  display: block;
  margin-top: 6px;
  color: var(--text-soft);
  font-size: 12px;
  line-height: 1.7;
  white-space: pre-line;
}

.empty-state-detail {
  margin-top: 12px;
  display: grid;
  gap: 10px;
  text-align: left;
}

.occupied-overview {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.occupied-chip {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 0 11px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
}

.occupied-chip-project {
  background: rgba(35, 79, 157, 0.1);
  color: var(--blue-deep);
}

.occupied-chip-status {
  background: rgba(226, 176, 44, 0.18);
  color: #7b5d12;
}

.occupied-history-list {
  display: grid;
  gap: 10px;
}

.occupied-card {
  padding: 12px 13px;
  border-radius: 12px;
  border: 1px solid rgba(226, 176, 44, 0.18);
  background: rgba(255, 255, 255, 0.82);
}

.occupied-card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.occupied-card-head strong {
  color: var(--text-main);
  font-size: 13px;
}

.occupied-card-head span {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 0 9px;
  border-radius: 999px;
  background: rgba(226, 176, 44, 0.16);
  color: #7b5d12;
  font-size: 11px;
  font-weight: 700;
}

.occupied-card-body {
  margin-top: 10px;
  display: grid;
  gap: 8px;
}

.occupied-row {
  display: grid;
  gap: 3px;
}

.occupied-row span {
  color: var(--text-soft);
  font-size: 11px;
}

.occupied-row strong {
  color: var(--text-main);
  font-size: 13px;
  line-height: 1.5;
  word-break: break-word;
}

.occupied-more {
  color: #7b6942;
  font-size: 11.5px;
  line-height: 1.6;
}

.empty-state.available {
  border-style: solid;
  border-color: rgba(44, 124, 196, 0.18);
  background: linear-gradient(180deg, rgba(239, 247, 255, 0.96) 0%, rgba(233, 243, 255, 0.96) 100%);
}

.empty-state.available p {
  color: var(--blue-deep);
}

.empty-state.occupied {
  border-style: solid;
  border-color: rgba(226, 176, 44, 0.26);
  background: linear-gradient(180deg, rgba(255, 248, 224, 0.96) 0%, rgba(255, 244, 203, 0.96) 100%);
}

.empty-state.occupied p {
  color: #6a5117;
}

.empty-state.occupied small {
  color: #7b6942;
}

.results-list {
  margin-top: 12px;
  display: grid;
  gap: 14px;
}

.result-item {
  padding: 18px 18px 16px;
  border-radius: 18px;
  background:
    linear-gradient(180deg, rgba(247, 250, 255, 0.98) 0%, rgba(239, 245, 255, 0.95) 100%);
  border: 1px solid rgba(108, 145, 203, 0.2);
  box-shadow: 0 12px 28px rgba(105, 131, 177, 0.08);
}

.front-page .result-item {
  position: relative;
}

.front-page .result-item::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: 4px;
  border-radius: 18px 0 0 18px;
  background: linear-gradient(180deg, #234f9d 0%, #5f88d2 100%);
}

.result-top {
  display: flex;
  align-items: flex-start;
  justify-content: flex-start;
  gap: 14px;
}

.result-order {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  border-radius: 14px;
  background: linear-gradient(180deg, rgba(35, 79, 157, 0.14) 0%, rgba(35, 79, 157, 0.08) 100%);
  color: var(--blue-deep);
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.08em;
}

.result-identity {
  display: flex;
  align-items: flex-start;
  width: 100%;
}

.identity-copy {
  min-width: 0;
  flex: 1;
}

.identity-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
}

.service-chip {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 0 11px;
  border-radius: 999px;
  background: rgba(35, 79, 157, 0.08);
  color: var(--blue-deep);
  font-size: 12px;
  font-weight: 700;
}

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

.alias-name {
  margin: 0;
  font-size: 24px;
  line-height: 1.1;
  color: var(--blue-deep);
}

.resume-name {
  margin: 7px 0 0;
  color: var(--text-soft);
  font-size: 13px;
  line-height: 1.5;
}

.resume-name:empty {
  display: none;
}

.match-tag-list {
  margin-top: 10px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.match-tag-list:empty {
  display: none;
}

.match-tag {
  display: inline-flex;
  align-items: center;
  min-height: 26px;
  padding: 0 10px;
  border-radius: 999px;
  background: rgba(255, 214, 94, 0.22);
  color: #7a5600;
  font-size: 12px;
  font-weight: 700;
}

.status-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 60px;
  height: 24px;
  padding: 0 10px;
  border-radius: 999px;
  background: rgba(27, 159, 103, 0.12);
  color: #16754b;
  font-size: 12px;
  font-weight: 700;
}

.status-pill.other {
  background: rgba(31, 100, 216, 0.1);
  color: var(--blue);
}

.code-strip {
  margin-top: 14px;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.code-strip[data-cards="1"] {
  grid-template-columns: 1fr;
}

.source-tag {
  display: inline-flex;
  align-items: center;
  min-height: 22px;
  padding: 0 9px;
  border-radius: 6px;
  background: rgba(108, 145, 203, 0.12);
  color: var(--text-soft);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.02em;
}

.source-tag:empty {
  display: none;
}

.code-card {
  padding: 14px 15px;
  border-radius: 14px;
  border: 1px solid rgba(108, 145, 203, 0.18);
  background: rgba(255, 255, 255, 0.84);
}

.code-card-primary {
  background: linear-gradient(180deg, rgba(31, 100, 216, 0.12) 0%, rgba(31, 100, 216, 0.07) 100%);
  border-color: rgba(31, 100, 216, 0.16);
}

.front-page .code-card-primary {
  background: linear-gradient(180deg, rgba(33, 79, 159, 0.12) 0%, rgba(33, 79, 159, 0.06) 100%);
  border-color: rgba(33, 79, 159, 0.14);
}

.code-card span {
  display: block;
  color: var(--text-soft);
  font-size: 12px;
}

.code-card strong {
  display: block;
  margin-top: 7px;
  color: var(--blue-deep);
  font-size: 20px;
  line-height: 1.2;
  letter-spacing: 0.02em;
  word-break: break-word;
}

.result-grid {
  margin-top: 14px;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.result-field {
  padding: 11px 12px;
  border-radius: 10px;
  border: 1px solid rgba(108, 145, 203, 0.14);
  background: rgba(255, 255, 255, 0.92);
}

.result-field span {
  display: block;
  margin-bottom: 6px;
  color: var(--text-soft);
  font-size: 12px;
}

.result-field strong {
  display: block;
  color: var(--text-main);
  font-size: 14px;
  line-height: 1.5;
  word-break: break-word;
}

.result-field-wide {
  grid-column: span 2;
}

.match-highlight {
  padding: 0 3px;
  border-radius: 4px;
  background: rgba(255, 219, 109, 0.7);
  color: inherit;
}

.portal-footer {
  margin-top: 28px;
  text-align: center;
  color: #9aa5b8;
  font-size: 12px;
}

.account-float {
  position: fixed;
  top: 22px;
  right: 22px;
  z-index: 10;
}

.account-card {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-radius: 16px;
  border: 1px solid rgba(108, 145, 203, 0.18);
  background: rgba(255, 255, 255, 0.8);
  box-shadow: 0 18px 40px rgba(88, 112, 156, 0.12);
  backdrop-filter: blur(10px);
}

.front-page .account-card {
  border-color: rgba(96, 124, 179, 0.16);
  box-shadow: 0 20px 42px rgba(70, 95, 145, 0.12);
}

.admin-console-page {
  min-height: 100vh;
  background:
    radial-gradient(circle at top left, rgba(56, 106, 196, 0.18) 0, rgba(56, 106, 196, 0) 28%),
    radial-gradient(circle at bottom right, rgba(24, 73, 158, 0.12) 0, rgba(24, 73, 158, 0) 24%),
    linear-gradient(180deg, #eef4ff 0%, #e6eefc 100%);
}

.admin-shell {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 220px minmax(0, 1fr);
}

.admin-sidebar {
  position: sticky;
  top: 0;
  height: 100vh;
  padding: 16px 14px;
  border-right: 1px solid rgba(83, 121, 190, 0.16);
  background: linear-gradient(180deg, rgba(19, 44, 92, 0.98) 0%, rgba(17, 37, 79, 0.96) 100%);
  color: rgba(255, 255, 255, 0.88);
  overflow-y: auto;
  display: flex;
  flex-direction: column;
}

.admin-brand {
  display: flex;
  align-items: center;
  gap: 12px;
}

.admin-brand-mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border-radius: 8px;
  background: linear-gradient(180deg, rgba(78, 130, 231, 0.92) 0%, rgba(54, 100, 199, 0.92) 100%);
  color: white;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.08em;
}

.admin-brand-copy {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.admin-brand-copy strong {
  font-size: 14px;
  color: white;
}

.admin-brand-copy span {
  color: rgba(215, 225, 246, 0.7);
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.admin-sidebar-nav {
  margin-top: 20px;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.admin-nav-link {
  display: flex;
  align-items: center;
  min-height: 34px;
  padding: 0 10px;
  border-radius: 6px;
  color: rgba(223, 233, 250, 0.82);
  font-size: 13px;
  font-weight: 600;
  text-decoration: none;
  transition: background 120ms ease, color 120ms ease;
}

.admin-nav-link:hover,
.admin-nav-link.is-active {
  background: rgba(82, 126, 213, 0.2);
  color: white;
}

.admin-sidebar-account {
  margin-top: auto;
  padding-top: 16px;
}

.admin-sidebar .account-card {
  width: 100%;
  border-color: rgba(109, 148, 220, 0.18);
  background: rgba(255, 255, 255, 0.08);
  box-shadow: none;
}

.admin-sidebar .account-copy strong,
.admin-sidebar .text-link,
.admin-sidebar .test-tag {
  color: white;
}

.admin-sidebar .account-copy span {
  color: rgba(224, 234, 252, 0.72);
}

.admin-sidebar-note {
  margin-top: 16px;
  padding: 12px 10px;
  border: 1px solid rgba(109, 148, 220, 0.18);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.06);
}

.admin-sidebar-note span {
  display: block;
  color: rgba(188, 207, 243, 0.78);
  font-size: 11px;
}

.admin-sidebar-note strong {
  display: block;
  margin-top: 4px;
  color: white;
  font-size: 13px;
}

.admin-sidebar-note p {
  margin: 6px 0 0;
  color: rgba(220, 231, 249, 0.72);
  font-size: 12px;
  line-height: 1.5;
}

.admin-workspace {
  min-width: 0;
  padding: 16px 20px 24px;
}

.admin-topbar {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  padding: 16px 20px;
  border: 1px solid rgba(108, 145, 203, 0.14);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.72);
  box-shadow: 0 4px 16px rgba(76, 100, 144, 0.08);
  backdrop-filter: blur(10px);
}

.admin-topbar-kicker {
  color: var(--blue);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
}

.admin-topbar h1 {
  margin: 4px 0 4px;
  color: var(--blue-deep);
  font-size: 18px;
}

.admin-topbar p {
  margin: 0;
  max-width: 640px;
  color: var(--text-soft);
  font-size: 13px;
  line-height: 1.6;
}

.admin-topbar.admin-topbar-slim {
  justify-content: flex-end;
  padding: 10px 16px;
}

.admin-topbar.admin-topbar-slim .admin-topbar-actions {
  flex-direction: row;
  align-items: center;
  gap: 16px;
}

.admin-topbar-actions {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 14px;
}

.admin-topbar-tools {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  flex-wrap: wrap;
}

.admin-tab-bar {
  margin-top: 12px;
  display: flex;
  align-items: center;
  gap: 4px;
  flex-wrap: wrap;
  border-bottom: 1px solid rgba(108, 145, 203, 0.14);
  padding-bottom: 0;
}

.admin-tab-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 34px;
  padding: 0 14px;
  border: none;
  border-bottom: 2px solid transparent;
  border-radius: 0;
  background: transparent;
  color: var(--text-soft);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: color 120ms ease, border-color 120ms ease;
}

.admin-tab-btn:hover {
  color: var(--blue);
}

.admin-tab-btn.is-active {
  color: var(--blue-deep);
  border-bottom-color: var(--blue);
  font-weight: 700;
}

.admin-tab-panels {
  margin-top: 14px;
}

.admin-tab-panel {
  display: none;
}

.admin-tab-panel.is-active {
  display: block;
}

.admin-topbar-chips {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  flex-wrap: wrap;
}

.admin-top-chip {
  display: inline-flex;
  align-items: center;
  min-height: 26px;
  padding: 0 10px;
  border-radius: 4px;
  background: rgba(31, 100, 216, 0.08);
  color: var(--blue);
  font-size: 11px;
  font-weight: 600;
}

.admin-overview-grid {
  margin-top: 10px;
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
}

.admin-status-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
}

.admin-status-card {
  padding: 10px 12px;
  border: 1px solid rgba(108, 145, 203, 0.14);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.8);
  box-shadow: 0 1px 4px rgba(82, 105, 145, 0.06);
}

.admin-status-card span {
  display: block;
  color: var(--text-soft);
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.admin-status-card strong {
  display: block;
  margin-top: 3px;
  color: var(--blue-deep);
  font-size: 15px;
  line-height: 1.3;
}

.admin-status-card small {
  display: block;
  margin-top: 4px;
  color: #7c8ba3;
  font-size: 12px;
  line-height: 1.4;
}

.account-avatar,
.account-avatar-fallback {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  object-fit: cover;
}

.account-avatar-fallback {
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--blue);
  color: white;
  font-size: 14px;
  font-weight: 700;
}

.account-copy {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.account-copy strong {
  font-size: 13px;
}

.account-copy span {
  color: #8694aa;
  font-size: 12px;
}

.text-link,
.test-tag {
  margin-left: 4px;
  color: var(--blue);
  font-size: 12px;
  font-weight: 700;
  text-decoration: none;
}

.test-tag {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 7px;
  height: 22px;
  border-radius: 999px;
  background: var(--blue-soft);
}

.login-card {
  width: min(100%, 548px);
  padding: 38px 30px 24px;
  text-align: center;
}

.login-header {
  margin-bottom: 18px;
}

.login-tip-line {
  margin-top: 12px;
  color: #8b96aa;
  font-size: 13px;
}

.google-login-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  width: 100%;
  min-height: 52px;
  padding: 0 18px;
  border-radius: 12px;
  background: linear-gradient(180deg, #1f67e2 0%, #1a57be 100%);
  color: white;
  text-decoration: none;
  font-size: 15px;
  font-weight: 700;
}

.google-login-btn:hover {
  background: linear-gradient(180deg, #205fd0 0%, #184ca4 100%);
}

.google-mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  border-radius: 9px;
  background: rgba(255, 255, 255, 0.96);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.72);
}

.google-mark svg {
  display: block;
  width: 18px;
  height: 18px;
}

.login-error {
  margin-bottom: 18px;
}

.login-access-help {
  margin-top: 16px;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
  border: 1px solid rgba(226, 181, 82, 0.34);
  border-left: 3px solid #e2b552;
  background: linear-gradient(180deg, rgba(255, 248, 224, 0.92) 0%, rgba(255, 243, 206, 0.86) 100%);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.45);
}

.login-access-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 12px;
  background: rgba(226, 181, 82, 0.18);
  font-size: 18px;
}

.login-access-copy {
  width: 100%;
  text-align: left;
}

.login-access-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
}

.login-access-badge {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 0 9px;
  border-radius: 999px;
  background: rgba(158, 112, 9, 0.1);
  color: #8a6100;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.03em;
}

.login-access-text {
  color: #7d6b42 !important;
  font-size: 12.5px;
  line-height: 1.7;
}

.login-access-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
}

.login-access-action {
  min-height: 32px;
  padding: 0 12px;
  border-radius: 999px;
  background: rgba(27, 63, 133, 0.08);
}

.login-access-action:hover {
  background: rgba(27, 63, 133, 0.12);
  text-decoration: none;
}

.login-access-hint {
  color: #9a8759;
  font-size: 11.5px;
}

.admin-access-notice {
  margin-top: 10px;
  border-left-color: #e2b552;
  background: rgba(255, 245, 212, 0.72);
}

.login-meta {
  margin-top: 18px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  flex-wrap: wrap;
  color: #8a96aa;
  font-size: 12px;
}

.admin-stage {
  min-height: 100vh;
  width: min(1280px, calc(100% - 40px));
  margin: 0 auto;
  padding: 88px 0 40px;
}

.admin-hero,
.admin-panel,
.metric-card {
  border: 1px solid var(--card-line);
  background: var(--card-bg);
  box-shadow: 0 2px 8px rgba(73, 106, 158, 0.08);
  backdrop-filter: blur(8px);
}

.admin-hero {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 16px;
  border-radius: 8px;
}

.admin-kicker {
  display: inline-flex;
  align-items: center;
  height: 18px;
  padding: 0 6px;
  border-radius: 3px;
  background: var(--blue-soft);
  color: var(--blue);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.06em;
}

.admin-hero h1,
.admin-hero h2 {
  margin: 4px 0 2px;
  font-size: 14px;
  color: var(--blue-deep);
}

.admin-hero p {
  margin: 0;
  max-width: 620px;
  color: var(--text-soft);
  font-size: 12px;
  line-height: 1.4;
}

.admin-hero-meta {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 6px;
  flex-shrink: 0;
}

.admin-meta-block {
  display: flex;
  flex-direction: column;
  gap: 3px;
  color: #8190a6;
  font-size: 12px;
  text-align: right;
}

.admin-meta-block strong {
  color: var(--text-main);
  font-size: 14px;
}

.admin-link-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 90px;
  height: 32px;
  padding: 0 12px;
  border-radius: 6px;
  background: var(--blue);
  color: white;
  font-size: 13px;
  font-weight: 600;
  text-decoration: none;
}

.admin-link-btn:hover {
  background: var(--blue-deep);
}

.admin-metrics {
  margin-top: 8px;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
}

.admin-project-grid {
  margin-top: 16px;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 14px;
}

.admin-project-card {
  padding: 14px;
  border: 1px solid rgba(108, 145, 203, 0.16);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.96);
  box-shadow: 0 2px 8px rgba(82, 105, 145, 0.06);
}

.admin-project-card.is-part-time {
  background:
    linear-gradient(180deg, rgba(255, 249, 232, 0.96) 0%, rgba(255, 245, 214, 0.88) 100%);
  border-color: rgba(226, 181, 82, 0.28);
}

.admin-project-card-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.admin-project-head-meta {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 8px;
}

.admin-project-card-copy h3 {
  margin: 0;
  color: var(--blue-deep);
  font-size: 17px;
  line-height: 1.35;
}

.admin-project-card-copy p {
  margin: 8px 0 0;
  color: var(--text-soft);
  font-size: 12px;
  line-height: 1.6;
}

.admin-project-rank {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 44px;
  min-height: 28px;
  padding: 0 10px;
  border-radius: 999px;
  background: rgba(31, 100, 216, 0.08);
  color: var(--blue);
  font-size: 12px;
  font-weight: 800;
}

.admin-project-kind-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 26px;
  padding: 0 10px;
  border-radius: 999px;
  background: rgba(226, 181, 82, 0.18);
  color: #9a6a12;
  font-size: 11px;
  font-weight: 800;
}

.admin-project-total {
  display: block;
  margin-top: 18px;
  color: var(--blue-deep);
  font-size: 32px;
  line-height: 1;
}

.admin-project-meta {
  margin-top: 14px;
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.admin-project-meta-chip {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 0 11px;
  border-radius: 999px;
  background: rgba(31, 100, 216, 0.08);
  color: var(--blue);
  font-size: 12px;
  font-weight: 700;
}

.admin-project-meta-chip.is-danger {
  background: rgba(182, 72, 47, 0.1);
  color: #b6482f;
}

.admin-project-meta-chip.is-merged {
  background: rgba(31, 100, 216, 0.14);
  color: #1f64d8;
}

.admin-project-meta-chip.is-part-time {
  background: rgba(226, 181, 82, 0.18);
  color: #9a6a12;
}

.admin-project-note {
  margin: 12px 0 0;
  font-size: 12px;
  line-height: 1.6;
  word-break: break-word;
}

.admin-project-note-duplicate {
  color: #a04f3a;
}

.admin-project-note-merged {
  color: #1f64d8;
}

.admin-project-card-empty {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 140px;
  color: var(--text-soft);
  text-align: center;
}

.metric-card {
  padding: 12px 14px;
  border-radius: 8px;
}

.metric-card span {
  display: block;
  color: var(--text-soft);
  font-size: 12px;
}

.metric-card strong {
  display: block;
  margin-top: 6px;
  color: var(--blue-deep);
  font-size: 20px;
  line-height: 1.2;
}

.admin-panel {
  margin-top: 12px;
  padding: 16px;
  border-radius: 10px;
}

.admin-panel-emphasis {
  position: relative;
  overflow: hidden;
}

.admin-panel-emphasis::before {
  content: "";
  position: absolute;
  inset: 0 0 auto;
  height: 4px;
  background: linear-gradient(90deg, #1f67e2 0%, #2e7bf3 55%, #89b4ff 100%);
}

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

.admin-section-kicker {
  display: inline-flex;
  align-items: center;
  min-height: 20px;
  padding: 0 7px;
  border-radius: 3px;
  background: rgba(31, 100, 216, 0.08);
  color: var(--blue);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.06em;
}

.admin-panel-head h2 {
  margin: 6px 0 0;
  font-size: 15px;
  color: var(--blue-deep);
}

.admin-panel-head p {
  margin: 4px 0 0;
  color: var(--text-soft);
  font-size: 12px;
}

.admin-head-tag {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 34px;
  padding: 0 12px;
  border-radius: 999px;
  background: rgba(31, 100, 216, 0.08);
  color: var(--blue);
  font-size: 12px;
  font-weight: 700;
  white-space: nowrap;
}

.admin-filter-bar {
  margin-top: 12px;
  display: grid;
  grid-template-columns: 1.2fr 1fr 180px 150px;
  gap: 8px;
  padding: 10px;
  border: 1px solid rgba(108, 145, 203, 0.12);
  border-radius: 8px;
  background: rgba(245, 249, 255, 0.7);
}

.admin-filter-bar input,
.admin-filter-bar select {
  width: 100%;
  min-width: 0;
  height: 34px;
  padding: 0 10px;
  border: 1px solid rgba(126, 155, 205, 0.24);
  border-radius: 6px;
  background: white;
  color: var(--text-main);
  font-size: 13px;
  outline: none;
}

.admin-filter-bar input::placeholder {
  color: #96a2b5;
}

.admin-filter-bar-log {
  grid-template-columns: minmax(180px, 1.1fr) minmax(180px, 1fr) repeat(3, minmax(150px, 0.8fr)) repeat(2, minmax(150px, 0.72fr)) minmax(260px, auto);
  align-items: stretch;
}

.admin-date-shortcuts {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

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

.admin-mini-btn,
.admin-ghost-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 10px;
  border: 1px solid rgba(108, 145, 203, 0.18);
  background: rgba(255, 255, 255, 0.92);
  color: var(--blue);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
}

.admin-ghost-btn {
  min-width: 80px;
  height: 34px;
  border-radius: 6px;
}

.admin-mini-btn {
  min-width: 60px;
  height: 30px;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.92);
  font-size: 12px;
}

.admin-mini-btn:hover,
.admin-ghost-btn:hover {
  border-color: rgba(31, 100, 216, 0.28);
  background: rgba(237, 243, 255, 0.88);
}

.admin-message {
  margin-top: 8px;
  color: #748296;
  font-size: 13px;
}

.admin-inline-summary {
  margin-top: 8px;
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}

.admin-summary-chip {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  min-height: 26px;
  padding: 0 8px;
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.88);
  border: 1px solid rgba(108, 145, 203, 0.16);
  color: var(--text-soft);
  font-size: 11px;
  font-weight: 600;
}

.admin-summary-chip strong {
  color: var(--blue-deep);
  font-size: 12px;
}

.admin-summary-chip.is-good {
  background: rgba(27, 159, 103, 0.1);
  border-color: rgba(27, 159, 103, 0.14);
  color: #16754b;
}

.admin-summary-chip.is-danger {
  background: rgba(182, 72, 47, 0.1);
  border-color: rgba(182, 72, 47, 0.14);
  color: #b6482f;
}

.admin-summary-chip.is-muted {
  background: rgba(134, 148, 170, 0.12);
  border-color: rgba(134, 148, 170, 0.14);
  color: #6f7f99;
}

.admin-active-filters {
  margin-top: 12px;
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.admin-filter-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 30px;
  padding: 0 12px;
  border: 1px solid rgba(31, 100, 216, 0.12);
  border-radius: 999px;
  background: rgba(237, 243, 255, 0.88);
  color: var(--blue);
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
}

.admin-filter-chip::after {
  content: "×";
  font-size: 14px;
  line-height: 1;
}

.admin-table-toolbar {
  margin-top: 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.admin-table-summary {
  color: var(--text-soft);
  font-size: 13px;
}

.admin-table-shell {
  margin-top: 14px;
  overflow: auto;
  border: 1px solid rgba(108, 145, 203, 0.16);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.94);
  box-shadow: none;
}

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

.admin-table thead th {
  position: sticky;
  top: 0;
  z-index: 1;
  padding: 8px 12px;
  border-bottom: 1px solid rgba(108, 145, 203, 0.16);
  background: rgba(237, 243, 255, 0.92);
  color: var(--text-soft);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.03em;
  text-align: left;
  text-transform: uppercase;
}

.admin-table tbody td {
  padding: 8px 12px;
  border-bottom: 1px solid rgba(108, 145, 203, 0.08);
  color: var(--text-main);
  font-size: 13px;
  line-height: 1.5;
  vertical-align: middle;
}

.admin-table tbody tr:last-child td {
  border-bottom: 0;
}

.admin-table tbody tr:nth-child(even) td {
  background: rgba(245, 248, 255, 0.48);
}

.admin-empty {
  color: var(--text-soft);
  text-align: center;
}

.admin-row-index {
  color: var(--text-soft);
  font-weight: 700;
  white-space: nowrap;
}

.admin-user-cell {
  min-width: 190px;
}

.admin-user-cell strong,
.admin-user-cell span,
.admin-user-cell small {
  display: block;
}

.admin-cell-link,
.admin-user-cell .admin-cell-link {
  width: fit-content;
  color: var(--blue);
  cursor: pointer;
  transition: color 160ms ease;
}

.admin-cell-link:hover,
.admin-user-cell .admin-cell-link:hover {
  color: var(--blue-deep);
  text-decoration: underline;
}

.admin-user-cell span {
  color: var(--text-soft);
}

.admin-user-cell small {
  margin-top: 4px;
  color: var(--blue);
  font-size: 11px;
  font-weight: 700;
}

.admin-keyword-cell strong {
  display: block;
  color: var(--blue-deep);
  font-size: 14px;
  font-weight: 700;
  word-break: break-word;
}

.log-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 28px;
  padding: 0 12px;
  border-radius: 999px;
  background: rgba(31, 100, 216, 0.08);
  color: var(--blue-deep);
  font-size: 12px;
  font-weight: 700;
  white-space: nowrap;
}

.log-badge.scope {
  background: rgba(31, 100, 216, 0.1);
  color: var(--blue);
}

.log-badge.scope-alt {
  background: rgba(130, 147, 178, 0.12);
  color: #64748b;
}

.log-badge.hit {
  background: rgba(27, 159, 103, 0.12);
  color: #16754b;
}

.log-badge.no-hit {
  background: rgba(182, 72, 47, 0.12);
  color: #b6482f;
}

.log-badge.local {
  background: rgba(255, 210, 92, 0.2);
  color: #9c6910;
}

.log-badge.oauth {
  background: rgba(31, 100, 216, 0.08);
  color: var(--blue);
}

.log-badge.muted {
  background: rgba(134, 148, 170, 0.12);
  color: #6f7f99;
}

.log-record-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.log-record-chip,
.log-record-empty {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 0 10px;
  border-radius: 999px;
  background: rgba(31, 100, 216, 0.08);
  color: var(--blue-deep);
  font-size: 12px;
}

.log-record-empty {
  background: rgba(134, 148, 170, 0.12);
  color: #6f7f99;
}

.admin-pagination {
  margin-top: 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}

.admin-pagination-meta {
  color: var(--text-soft);
  font-size: 13px;
}

.admin-pagination-controls {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 12px;
  flex-wrap: wrap;
}

.admin-pagination-buttons {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.admin-page-btn {
  min-width: 40px;
  height: 36px;
  padding: 0 12px;
  border: 1px solid rgba(108, 145, 203, 0.16);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.95);
  color: var(--text-main);
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
}

.admin-page-btn:hover:not(:disabled) {
  border-color: rgba(31, 100, 216, 0.22);
  color: var(--blue);
}

.admin-page-btn.active {
  border-color: rgba(31, 100, 216, 0.18);
  background: rgba(31, 100, 216, 0.1);
  color: var(--blue);
}

.admin-page-btn:disabled {
  opacity: 0.45;
  cursor: default;
}

.admin-jump-form {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--text-soft);
  font-size: 13px;
}

.admin-jump-form input {
  width: 84px;
  height: 36px;
  padding: 0 10px;
  border: 1px solid rgba(108, 145, 203, 0.18);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.95);
  color: var(--text-main);
  font-size: 13px;
}

.access-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 58px;
  height: 28px;
  padding: 0 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
}

.access-badge.allow {
  background: rgba(27, 159, 103, 0.12);
  color: #16754b;
}

.access-badge.deny {
  background: rgba(182, 72, 47, 0.12);
  color: #b6482f;
}

.access-badge.admin {
  background: rgba(31, 100, 216, 0.14);
  color: #1b4fb3;
}

.access-badge.env_allow,
.access-badge.domain_allow {
  background: rgba(58, 119, 219, 0.1);
  color: #215dbf;
}

.access-badge.unconfigured {
  background: rgba(134, 148, 170, 0.12);
  color: #6f7f99;
}

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

.table-action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 66px;
  height: 32px;
  padding: 0 12px;
  border: 0;
  border-radius: 10px;
  background: rgba(31, 100, 216, 0.1);
  color: var(--blue);
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
}

.table-action.danger {
  background: rgba(182, 72, 47, 0.1);
  color: #b6482f;
}

.table-action.ghost {
  background: rgba(31, 100, 216, 0.08);
  color: var(--blue-deep);
}

.table-action.muted {
  background: rgba(134, 148, 170, 0.12);
  color: #6f7f99;
}

@media (max-width: 680px) {
  .portal-card {
    padding: 30px 18px 22px;
  }

  .login-card {
    width: 100%;
    padding: 30px 18px 22px;
  }

  .front-page .portal-card {
    padding: 34px 20px 24px;
  }

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

  .search-btn {
    min-height: 46px;
  }

  .search-support,
  .portal-meta {
    flex-direction: column;
    align-items: flex-start;
  }

  .front-page .portal-header {
    gap: 14px;
  }

  .portal-meta-card {
    padding: 13px 14px;
    border-radius: 16px;
  }

  .portal-meta-main {
    flex-direction: column;
    align-items: flex-start;
  }

  .portal-sync-time {
    font-size: 18px;
  }

  .sync-mode-badge {
    min-height: 30px;
  }

  .admin-filter-bar,
  .admin-filter-bar-log {
    grid-template-columns: 1fr;
  }

  .admin-filter-actions {
    justify-content: stretch;
    flex-wrap: wrap;
  }

  .admin-date-shortcuts {
    width: 100%;
  }

  .admin-filter-actions .search-btn,
  .admin-ghost-btn,
  .admin-mini-btn,
  .admin-jump-form input {
    width: 100%;
  }

  .admin-panel-head,
  .admin-pagination {
    flex-direction: column;
    align-items: flex-start;
  }

  .admin-pagination-controls,
  .admin-jump-form {
    width: 100%;
    justify-content: stretch;
  }

  .results-head {
    flex-direction: column;
  }

  .results-count {
    align-self: flex-start;
  }

  .hint-trigger-floating {
    position: static;
    width: fit-content;
    margin-top: 10px;
    padding: 4px 2px;
    flex-direction: row;
    align-items: center;
    gap: 8px;
    border: 0;
    border-radius: 999px;
    background: transparent;
    box-shadow: none;
  }

  .hint-trigger-floating::before {
    display: none;
  }

  .hint-trigger-floating .hint-trigger-icon {
    width: 18px;
    height: 18px;
    font-size: 11px;
  }

  .hint-trigger-floating .hint-trigger-copy {
    flex-direction: row;
    align-items: center;
    gap: 8px;
    text-align: left;
  }

  .hint-trigger-inline {
    padding: 10px 12px;
    align-items: flex-start;
  }

  .hint-trigger-inline .hint-trigger-copy {
    flex-direction: column;
    align-items: flex-start;
    gap: 2px;
  }

  .hint-trigger-action {
    min-height: 28px;
    padding: 0 10px;
  }

  .hint-modal-panel {
    width: min(100%, calc(100% - 16px));
    margin-top: 2vh;
    max-height: 96vh;
  }

  .hint-modal-head,
  .hint-modal-body {
    padding-left: 16px;
    padding-right: 16px;
  }

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

  .hint-item-wide {
    grid-column: auto;
  }

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

  .result-field-wide {
    grid-column: auto;
  }

  .result-top {
    gap: 12px;
  }

  .result-order {
    width: 36px;
    height: 36px;
    border-radius: 12px;
  }

  .code-strip {
    grid-template-columns: 1fr;
  }

  .account-float {
    position: static;
    padding: 18px 18px 0;
  }

  .account-card {
    width: 100%;
    justify-content: space-between;
  }
}

@media (max-width: 1180px) {
.admin-shell {
    grid-template-columns: 1fr;
  }

  .admin-sidebar {
    position: static;
    height: auto;
  }

  .admin-workspace {
    padding-top: 22px;
  }

.admin-overview-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 820px) {
  .admin-topbar {
    flex-direction: column;
  }

  .admin-topbar-actions {
    width: 100%;
    align-items: flex-start;
  }

  .admin-topbar-chips {
    justify-content: flex-start;
  }

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

  .admin-sidebar {
    padding: 22px 18px;
  }

  .admin-workspace {
    padding: 20px 16px 28px;
  }
}

@media (max-width: 1080px) {
  .admin-stage {
    width: min(100%, calc(100% - 24px));
    padding-top: 86px;
  }

  .admin-hero {
    flex-direction: column;
    align-items: flex-start;
  }

  .admin-hero-meta {
    width: 100%;
    align-items: flex-start;
  }

  .admin-meta-block {
    text-align: left;
  }

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

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

@media (max-width: 680px) {
  .admin-stage {
    width: min(100%, calc(100% - 20px));
    padding-top: 22px;
  }

  .admin-hero,
  .admin-panel,
  .metric-card {
    padding-left: 18px;
    padding-right: 18px;
  }

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

  .admin-filter-bar {
    grid-template-columns: 1fr;
  }
}

/* ============================================================================
 * Result card — senior UI redesign (overrides the older .result-item ruleset)
 * ============================================================================ */

.result-item {
  position: relative;
  padding: 20px 22px;
  border-radius: 14px;
  background: #ffffff;
  border: 1px solid rgba(148, 163, 184, 0.18);
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
  transition: box-shadow 0.18s ease, border-color 0.18s ease, transform 0.18s ease;
  overflow: hidden;
}

.result-item:hover {
  border-color: rgba(31, 100, 216, 0.28);
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.07);
}

/* 冻结编号卡：整卡红色警示 */
.result-item.rc-frozen {
  background: #fef2f2;
  border-color: rgba(220, 38, 38, 0.32);
}
.result-item.rc-frozen:hover {
  border-color: rgba(220, 38, 38, 0.5);
  box-shadow: 0 8px 24px rgba(220, 38, 38, 0.12);
}
.result-item.rc-frozen .rc-dates {
  color: #b91c1c;
  font-weight: 600;
}

/* Replace the old gradient stripe — color from --rc-accent set by JS per status */
.front-page .result-item::before {
  background: var(--rc-accent, #cbd5e1);
  border-radius: 0;
}

.rc-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}

.rc-identity {
  flex: 1 1 auto;
  min-width: 0;
}

.rc-name {
  margin: 0;
  font-size: 22px;
  font-weight: 700;
  color: var(--blue-deep);
  line-height: 1.25;
  letter-spacing: 0.01em;
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 6px;
}

.rc-name .alias-name { word-break: break-word; }

.rc-name .resume-name {
  font-size: 13px;
  font-weight: 500;
  color: var(--text-soft);
  letter-spacing: 0;
  margin: 0;
  line-height: 1.4;
}

.rc-name .resume-name:empty { display: none; }

.rc-subtitle {
  margin: 6px 0 0;
  color: var(--text-soft);
  font-size: 13px;
  line-height: 1.55;
  word-break: break-word;
}

.rc-subtitle:empty { display: none; }

.rc-status {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  font-weight: 600;
  line-height: 1;
  white-space: nowrap;
  /* color (text + dot bg) set inline from JS */
}

.rc-status-dot {
  width: 7px;
  height: 7px;
  border-radius: 999px;
  background: currentColor;
  flex-shrink: 0;
}

.rc-divider {
  margin: 14px 0;
  border-top: 1px solid rgba(148, 163, 184, 0.14);
}

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

.rc-code {
  display: flex;
  align-items: baseline;
  gap: 12px;
  min-width: 0;
}

.rc-code-label {
  font-size: 11px;
  font-weight: 500;
  color: var(--text-soft);
  letter-spacing: 0.02em;
  white-space: nowrap;
}

.rc-code-value {
  font-size: 17px;
  font-weight: 700;
  color: var(--blue-deep);
  font-family: ui-monospace, 'SF Mono', 'JetBrains Mono', Menlo, Consolas, monospace;
  letter-spacing: 0.04em;
  word-break: break-all;
  min-width: 0;
}

.rc-code-empty .rc-code-value {
  color: var(--text-soft);
  font-weight: 500;
  letter-spacing: 0;
}

.rc-footer {
  margin-top: 14px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  font-size: 12px;
  color: var(--text-soft);
}

.rc-dates {
  flex: 1 1 auto;
  min-width: 0;
}

.rc-source {
  padding: 3px 9px;
  border-radius: 6px;
  background: rgba(148, 163, 184, 0.12);
  color: var(--text-soft);
  font-weight: 500;
}

/* Tame the yellow marker into a tasteful underline accent */
.match-highlight {
  background: transparent !important;
  padding: 0;
  color: inherit;
  border-radius: 0;
  box-shadow: inset 0 -2px 0 rgba(245, 158, 11, 0.85);
}

/* Mobile: stack header, single-column code grid */
@media (max-width: 520px) {
  .result-item { padding: 16px 18px; }
  .rc-codes { grid-template-columns: 1fr; gap: 8px; }
  .rc-header { flex-direction: column; gap: 6px; }
  .rc-status { align-self: flex-start; }
}

/* ============================================================================
 * Admin · 编制人数 · 下属服务单位拆分
 * ============================================================================ */
.admin-project-subgroups {
  margin-top: 14px;
  padding-top: 12px;
  border-top: 1px dashed rgba(148, 163, 184, 0.28);
}

.admin-project-subgroups summary {
  list-style: none;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  font-weight: 600;
  color: var(--text-soft);
  user-select: none;
}

.admin-project-subgroups summary::-webkit-details-marker { display: none; }

.admin-project-subgroups summary::before {
  content: "▸";
  font-size: 10px;
  transition: transform 0.15s ease;
  color: var(--text-soft);
}

.admin-project-subgroups[open] summary::before {
  transform: rotate(90deg);
}

.admin-subgroup-list {
  list-style: none;
  margin: 10px 0 0;
  padding: 0;
  display: grid;
  gap: 5px;
}

.admin-subgroup-item {
  display: grid;
  grid-template-columns: minmax(80px, 1fr) minmax(80px, 1.6fr) auto;
  align-items: center;
  gap: 10px;
  padding: 5px 10px;
  border-radius: 7px;
  background: rgba(248, 250, 252, 0.65);
  font-size: 12px;
  line-height: 1.4;
}

.admin-subgroup-item:hover {
  background: rgba(241, 245, 249, 0.95);
}

.admin-subgroup-name {
  color: var(--text-main);
  font-weight: 500;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.admin-subgroup-bar {
  position: relative;
  height: 6px;
  border-radius: 999px;
  background: rgba(148, 163, 184, 0.18);
  overflow: hidden;
}

.admin-subgroup-bar-fill {
  position: absolute;
  inset: 0 auto 0 0;
  background: linear-gradient(90deg, #3b82f6 0%, #60a5fa 100%);
  border-radius: 999px;
}

.admin-subgroup-count {
  color: var(--text-main);
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  min-width: 32px;
  text-align: right;
}

/* ============================================================================
 * Admin · 编制人数 · Hero 汇总条
 * ============================================================================ */
.admin-headcount-hero {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 14px;
  margin: 16px 0 18px;
}

@media (max-width: 768px) {
  .admin-headcount-hero {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

.admin-hero-tile {
  position: relative;
  padding: 18px 20px 16px;
  border-radius: 14px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.96) 0%, rgba(248, 250, 252, 0.9) 100%);
  border: 1px solid rgba(148, 163, 184, 0.18);
  display: flex;
  flex-direction: column;
  gap: 4px;
  overflow: hidden;
  transition: box-shadow 0.18s ease, transform 0.18s ease;
}

.admin-hero-tile:hover {
  box-shadow: 0 8px 22px rgba(15, 23, 42, 0.06);
  transform: translateY(-1px);
}

.admin-hero-tile::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: 4px;
  background: var(--blue);
  opacity: 0.85;
}

.admin-hero-tile.is-active::before    { background: #16a34a; }
.admin-hero-tile.is-probation::before { background: #d97706; }
.admin-hero-tile.is-parttime::before  { background: #a855f7; }
.admin-hero-tile.is-total::before     { background: #2563eb; }
.admin-hero-tile.is-org::before       { background: #7c3aed; }

.admin-hero-tile-label {
  font-size: 12px;
  color: var(--text-soft);
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  line-height: 1.2;
}

.admin-hero-tile-value {
  display: block;
  font-size: 34px;
  font-weight: 700;
  line-height: 1.05;
  color: var(--text-main);
  margin-top: 4px;
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.01em;
}

.admin-hero-tile.is-active    .admin-hero-tile-value { color: #16a34a; }
.admin-hero-tile.is-probation .admin-hero-tile-value { color: #d97706; }
.admin-hero-tile.is-parttime  .admin-hero-tile-value { color: #9333ea; }
.admin-hero-tile.is-total     .admin-hero-tile-value { color: #2563eb; }
.admin-hero-tile.is-org       .admin-hero-tile-value { color: #7c3aed; }

.admin-hero-tile-detail {
  margin-top: 6px;
  font-size: 11px;
  color: var(--text-soft);
  line-height: 1.4;
  font-weight: 500;
}

/* ============================================================================
 * Admin · 编制人数 · 本周动态条
 * ============================================================================ */
.admin-week-strip {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 14px;
  padding: 12px 18px;
  margin-bottom: 14px;
  background: linear-gradient(90deg, rgba(59, 130, 246, 0.05) 0%, rgba(124, 58, 237, 0.04) 100%);
  border: 1px solid rgba(148, 163, 184, 0.2);
  border-radius: 12px;
}

.admin-week-strip-head {
  display: flex;
  align-items: baseline;
  gap: 10px;
  flex-shrink: 0;
}

.admin-week-strip-kicker {
  font-size: 12px;
  font-weight: 700;
  color: var(--text-soft);
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.admin-week-strip-range {
  font-size: 13px;
  color: var(--text-main);
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}

.admin-week-strip-stats {
  display: flex;
  align-items: center;
  gap: 18px;
  flex-wrap: wrap;
}

.admin-week-stat {
  display: inline-flex;
  align-items: baseline;
  gap: 6px;
  font-size: 13px;
}

.admin-week-stat-label {
  color: var(--text-soft);
  font-weight: 500;
}

.admin-week-stat-value {
  font-size: 20px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.01em;
}

.admin-week-stat.is-hired    .admin-week-stat-value { color: #16a34a; }
.admin-week-stat.is-resigned .admin-week-stat-value { color: #dc2626; }
.admin-week-stat.is-net      .admin-week-stat-value { color: var(--blue-deep); }
.admin-week-stat.is-net      .admin-week-stat-value.is-negative { color: #dc2626; }

.admin-week-stat-compare {
  font-size: 12px;
  color: var(--text-soft);
  padding-left: 12px;
  border-left: 1px solid rgba(148, 163, 184, 0.3);
  font-variant-numeric: tabular-nums;
}

.admin-week-stat-compare.is-negative {
  color: #dc2626;
}

@media (max-width: 640px) {
  .admin-week-strip-stats { gap: 12px; }
  .admin-week-stat-compare { padding-left: 0; border-left: none; }
}

/* ============================================================================
 * Admin · 数据源健康
 * ============================================================================ */
.admin-head-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}

.admin-action-btn {
  display: inline-flex;
  align-items: center;
  height: 30px;
  padding: 0 14px;
  border-radius: 7px;
  background: var(--blue);
  color: #fff;
  font-size: 12px;
  font-weight: 600;
  border: none;
  cursor: pointer;
  letter-spacing: 0.02em;
  transition: opacity 0.15s ease, transform 0.15s ease;
}

.admin-action-btn:hover { opacity: 0.92; transform: translateY(-1px); }
.admin-action-btn:disabled { opacity: 0.5; cursor: wait; }

.admin-sources-hero {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin: 14px 0 18px;
}

@media (max-width: 768px) {
  .admin-sources-hero { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

.admin-sources-tile {
  position: relative;
  padding: 16px 18px 14px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.95);
  border: 1px solid rgba(148, 163, 184, 0.18);
  display: flex;
  flex-direction: column;
  gap: 4px;
  overflow: hidden;
}

.admin-sources-tile::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: 4px;
}

.admin-sources-tile.is-ok::before    { background: #16a34a; }
.admin-sources-tile.is-fail::before  { background: #dc2626; }
.admin-sources-tile.is-total::before { background: #2563eb; }
.admin-sources-tile.is-meta::before  { background: #94a3b8; }

.admin-sources-tile-label {
  font-size: 11px;
  color: var(--text-soft);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.admin-sources-tile-value {
  display: block;
  font-size: 28px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.01em;
  line-height: 1.1;
  margin-top: 2px;
}

.admin-sources-tile.is-ok   .admin-sources-tile-value { color: #16a34a; }
.admin-sources-tile.is-fail .admin-sources-tile-value { color: #dc2626; }
.admin-sources-tile.is-total .admin-sources-tile-value { color: #2563eb; }
.admin-sources-tile.is-meta .admin-sources-tile-value { color: var(--text-main); }

.admin-sources-tile-detail {
  font-size: 11px;
  color: var(--text-soft);
  margin-top: 2px;
}

.admin-sources-table-wrap {
  overflow-x: auto;
  border-radius: 10px;
  border: 1px solid rgba(148, 163, 184, 0.16);
  background: #fff;
}

.admin-sources-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}

.admin-sources-table thead th {
  text-align: left;
  padding: 9px 12px;
  background: rgba(241, 245, 249, 0.7);
  color: var(--text-soft);
  font-weight: 600;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  border-bottom: 1px solid rgba(148, 163, 184, 0.2);
}

.admin-sources-table tbody td {
  padding: 8px 12px;
  border-bottom: 1px solid rgba(148, 163, 184, 0.1);
  vertical-align: middle;
}

.admin-sources-table tbody tr:last-child td { border-bottom: none; }

.admin-sources-row.is-fail { background: rgba(254, 226, 226, 0.4); }
.admin-sources-row.is-warn { background: rgba(254, 243, 199, 0.4); }
.admin-sources-row:hover   { background: rgba(241, 245, 249, 0.7); }

.admin-sources-name {
  color: var(--text-main);
  font-weight: 600;
}

.admin-sources-subtitle {
  font-size: 11px;
  color: var(--text-soft);
  margin-top: 2px;
}

.admin-sources-status {
  display: inline-flex;
  align-items: center;
  padding: 2px 9px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}

.admin-sources-status.is-ok   { background: rgba(34, 197, 94, 0.14); color: #15803d; }
.admin-sources-status.is-fail { background: rgba(220, 38, 38, 0.13); color: #b91c1c; }
.admin-sources-status.is-warn { background: rgba(217, 119, 6, 0.14);  color: #b45309; }

/* ============================================================================
 * Admin · 移动端适配（≤ 1024px：sidebar drawer；≤ 768px：紧凑布局）
 * ============================================================================ */

/* 桌面默认隐藏 mobile header + backdrop */
.admin-mobile-header {
  display: none;
  align-items: center;
  gap: 12px;
  padding: 10px 14px;
  background: rgba(255, 255, 255, 0.92);
  border-bottom: 1px solid rgba(108, 145, 203, 0.18);
  position: sticky;
  top: 0;
  z-index: 100;
  backdrop-filter: blur(10px);
}

.admin-hamburger {
  display: inline-flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 4px;
  width: 38px;
  height: 38px;
  border: none;
  background: rgba(31, 100, 216, 0.08);
  border-radius: 8px;
  cursor: pointer;
  padding: 0;
}

.admin-hamburger span {
  display: block;
  width: 18px;
  height: 2px;
  background: var(--blue-deep);
  border-radius: 1px;
}

.admin-mobile-brand {
  display: flex;
  flex-direction: column;
  line-height: 1.15;
}

.admin-mobile-brand strong {
  color: var(--blue-deep);
  font-size: 14px;
  font-weight: 700;
}

.admin-mobile-brand span {
  color: var(--text-soft);
  font-size: 11px;
}

.admin-sidebar-backdrop {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.45);
  z-index: 150;
  backdrop-filter: blur(2px);
}

.admin-sidebar-backdrop.is-open {
  display: block;
}

/* ─── ≤ 1024px：sidebar 改 off-canvas drawer ─── */
@media (max-width: 1024px) {
  .admin-mobile-header {
    display: flex;
  }

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

  .admin-sidebar {
    position: fixed;
    top: 0;
    left: 0;
    width: 260px;
    max-width: 80vw;
    height: 100vh;
    z-index: 200;
    transform: translateX(-100%);
    transition: transform 0.22s ease;
    box-shadow: 4px 0 24px rgba(15, 23, 42, 0.25);
  }

  .admin-sidebar.is-open {
    transform: translateX(0);
  }

  .admin-workspace {
    padding: 14px 14px 24px;
  }
}

/* ─── ≤ 768px：紧凑布局 ─── */
@media (max-width: 768px) {
  .admin-workspace {
    padding: 12px 10px 20px;
  }

  /* topbar 改竖排 */
  .admin-topbar {
    flex-direction: column;
    align-items: stretch;
    gap: 10px;
    padding: 12px 14px;
  }

  .admin-topbar h1 {
    font-size: 17px;
  }

  .admin-topbar-actions {
    align-items: stretch;
  }

  .admin-topbar-tools {
    justify-content: flex-start;
  }

  /* tab bar 改横向滚动 */
  .admin-tab-bar {
    flex-wrap: nowrap;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: thin;
    margin: 12px -10px 0;
    padding: 0 10px 4px;
  }

  .admin-tab-bar::-webkit-scrollbar {
    height: 4px;
  }

  .admin-tab-bar::-webkit-scrollbar-thumb {
    background: rgba(148, 163, 184, 0.4);
    border-radius: 2px;
  }

  .admin-tab-btn {
    flex-shrink: 0;
    padding: 0 12px;
    font-size: 13px;
  }

  /* admin panel 整体压缩 */
  .admin-panel {
    padding: 14px !important;
  }

  .admin-panel-head {
    flex-direction: column;
    align-items: stretch;
    gap: 10px;
  }

  .admin-head-actions {
    flex-wrap: wrap;
  }

  /* project 卡片改单列 */
  .admin-project-grid {
    grid-template-columns: 1fr !important;
  }

  /* hero tiles 2x2（已在原 CSS 里写过，这里 reinforce）*/
  .admin-headcount-hero,
  .admin-sources-hero {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
  }

  .admin-hero-tile-value,
  .admin-sources-tile-value {
    font-size: 26px;
  }

  /* week strip：标签和数字垂直叠加 */
  .admin-week-strip {
    flex-direction: column;
    align-items: flex-start;
    padding: 12px 14px;
  }

  .admin-week-strip-stats {
    width: 100%;
    justify-content: space-between;
    gap: 10px;
  }

  .admin-week-stat-compare {
    width: 100%;
    padding: 8px 0 0;
    border-left: none;
    border-top: 1px dashed rgba(148, 163, 184, 0.3);
  }

  /* 所有表格：强制横向滚动包装 */
  .admin-sources-table-wrap,
  .admin-table-wrap {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }

  /* 通用表格如果没有 wrap，自己处理 */
  .admin-table,
  .admin-sources-table {
    min-width: 540px;  /* 留够列宽，让横向滚动生效 */
  }

  /* subgroup 列表：项目卡里的服务单位条，缩小 name 列 */
  .admin-subgroup-item {
    grid-template-columns: minmax(70px, 1fr) minmax(60px, 1fr) auto;
    gap: 8px;
    padding: 4px 8px;
  }

  /* 按钮触摸目标增大 */
  .admin-action-btn,
  .admin-ghost-btn {
    min-height: 36px;
    padding: 0 14px;
  }

  /* 内联 summary chips：换行 + 缩小 */
  .admin-inline-summary {
    gap: 6px;
  }

  .admin-summary-chip {
    font-size: 11px;
    padding: 2px 8px;
  }
}

/* ─── ≤ 480px：超小屏 ─── */
@media (max-width: 480px) {
  .admin-mobile-brand strong { font-size: 13px; }
  .admin-mobile-brand span { font-size: 10px; }
  .admin-topbar h1 { font-size: 16px; }
  .admin-topbar p { font-size: 12px; }
  .admin-section-kicker { font-size: 10px; }
  .admin-panel h2 { font-size: 15px; }
  .admin-hero-tile-value,
  .admin-sources-tile-value { font-size: 22px; }
  .admin-action-btn { font-size: 11px; padding: 0 10px; }
}

/* 编制人数 — 维度切换按钮 */
.headcount-head-actions {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}
.headcount-dim-toggle {
  display: inline-flex;
  background: #eef1f6;
  border-radius: 8px;
  padding: 3px;
  gap: 2px;
}
.headcount-dim-btn {
  border: none;
  background: transparent;
  color: #5a6b85;
  font-size: 13px;
  font-weight: 600;
  padding: 6px 14px;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.15s ease;
  white-space: nowrap;
}
.headcount-dim-btn:hover { color: #1f64d8; }
.headcount-dim-btn.is-active {
  background: #fff;
  color: #1f64d8;
  box-shadow: 0 1px 3px rgba(31,100,216,0.18);
}
@media (max-width: 600px) {
  .headcount-dim-btn { padding: 6px 10px; font-size: 12px; }
}

/* 编制人数三级结构：序列分组头（直属/派驻） */
.admin-seq-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin: 10px 0 4px;
  padding: 3px 8px;
  background: rgba(31, 100, 216, 0.07);
  border-left: 3px solid rgba(31, 100, 216, 0.55);
  border-radius: 4px;
}
.admin-seq-head:first-of-type { margin-top: 6px; }
.admin-seq-name {
  font-size: 12.5px;
  font-weight: 600;
  color: #1f64d8;
  letter-spacing: 0.02em;
}
.admin-seq-count {
  font-size: 12px;
  color: #5b6b82;
  font-variant-numeric: tabular-nums;
}


/* ───────── 编制人数：状态标签（克制版，仅小圆点着色）───────── */
.admin-project-status-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 5px 12px;
  margin-top: 6px;
}
.admin-status-tag {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 12px;
  line-height: 1;
  color: var(--text-soft, #64748b);
  white-space: nowrap;
}
.admin-status-tag b {
  font-weight: 700;
  color: var(--text-main, #1e293b);
  font-variant-numeric: tabular-nums;
}
.admin-status-dot {
  width: 7px; height: 7px; border-radius: 50%;
  display: inline-block; flex: none;
  background: #cbd5e1;
}
/* 只有小圆点着色，文字保持中性 —— 不再满铺彩色背景 */
.admin-status-tag.is-active    .admin-status-dot { background: #22c55e; }
.admin-status-tag.is-probation .admin-status-dot { background: #eab308; }
.admin-status-tag.is-suspended .admin-status-dot { background: #94a3b8; }
.admin-status-tag.is-parttime  .admin-status-dot { background: #a855f7; }

/* ───────── 直属/派驻：统一主色（蓝），用深浅区分 ───────── */
.admin-seq-head.is-zhishu,
.admin-seq-head.is-paizhu {
  background: rgba(59,130,246,0.06);
  border-left-color: #3b82f6;
}
.admin-seq-head.is-zhishu .admin-seq-name,
.admin-seq-head.is-paizhu .admin-seq-name {
  color: #2563eb;
}
.admin-seq-count em {
  font-style: normal;
  color: var(--text-soft, #8294ad);
  font-size: 11px;
}
/* 比例条统一蓝色（直属/派驻都用蓝，不再蓝紫并用）*/
.admin-subgroup-bar-fill.is-zhishu,
.admin-subgroup-bar-fill.is-paizhu {
  background: linear-gradient(90deg, #60a5fa, #3b82f6);
}
/* summary 行的直属/派驻小药丸：统一淡蓝 */
.admin-seq-pill {
  display: inline-block;
  font-size: 11.5px;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: 999px;
  margin-left: 6px;
  background: rgba(59,130,246,0.1);
  color: #2563eb;
}

/* ───────── 编制人数：重复编码提醒条 ───────── */

/* ───────── 编制人数：编码问题提醒（三段）───────── */
#dup-code-alert { margin: 4px 0 16px; display: grid; gap: 8px; }
.dup-alert {
  border-radius: 10px;
  font-size: 13px;
  line-height: 1.5;
  overflow: hidden;
}
.dup-alert.is-ok {
  display: flex; align-items: center; gap: 8px;
  padding: 9px 14px;
  background: rgba(34,197,94,0.08);
  border: 1px solid rgba(34,197,94,0.25);
  color: #15803d;
}
/* details/summary 折叠样式 */
details.dup-alert > summary { list-style: none; cursor: pointer; }
details.dup-alert > summary::-webkit-details-marker { display: none; }
.dup-alert-head {
  display: flex; align-items: center; gap: 8px;
  padding: 10px 14px;
  font-weight: 500;
}
.dup-alert-head::after {
  content: "▸"; margin-left: auto; font-size: 11px; opacity: .55;
  transition: transform .15s;
}
details.dup-alert[open] > .dup-alert-head::after { transform: rotate(90deg); }
.dup-alert-head b { font-weight: 800; }
.dup-alert-icon { font-weight: 700; flex: none; }

/* 三种问题配色 */
.dup-alert.is-warn     { background: rgba(220,38,38,0.06);  border: 1px solid rgba(220,38,38,0.32); color: #b91c1c; }
.dup-alert.is-mismatch { background: rgba(217,119,6,0.06);  border: 1px solid rgba(217,119,6,0.32); color: #b45309; }
.dup-alert.is-info     { background: rgba(59,130,246,0.05); border: 1px solid rgba(59,130,246,0.28); color: #2563eb; }

/* 明细行 */
.dup-row-list {
  margin: 0; padding: 2px 14px 12px 14px;
  display: grid; gap: 4px;
  list-style: none;
}
.dup-row-list li {
  display: flex; align-items: center; flex-wrap: wrap; gap: 6px;
  font-size: 12.5px; color: var(--text-main,#334155);
  padding: 4px 0; border-top: 1px dashed rgba(100,116,139,0.18);
}
.dup-row-code {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-weight: 700; font-size: 12px;
  padding: 1px 7px; border-radius: 5px;
  background: rgba(15,23,42,0.06); color: #0f172a;
}
.dup-row-org {
  font-size: 11px; color: var(--text-soft,#64748b);
  padding: 1px 7px; border-radius: 999px;
  background: rgba(100,116,139,0.1);
}
.dup-row-rec { white-space: nowrap; }
.dup-row-rec em { font-style: normal; color: var(--text-soft,#64748b); font-size: 11px; }
.dup-row-vs { color: #94a3b8; font-size: 11px; }
