:root {
  --bg: #f5f7f9;
  --surface: #ffffff;
  --navy: #16324f;
  --navy-2: #1d446e;
  --teal: #0e8f7a;
  --teal-soft: #e2f3ef;
  --blue: #2f6db0;
  --blue-soft: #e7f0f9;
  --amber: #a86a14;
  --amber-soft: #fbf0dc;
  --rose: #b23a52;
  --rose-soft: #fbe7ec;
  --ink: #1f2937;
  --muted: #5b6776;
  --line: #dce3ea;
  --shadow: 0 1px 2px rgba(22, 50, 79, 0.05), 0 6px 18px rgba(22, 50, 79, 0.06);
  --radius: 8px;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
}

body {
  background: var(--bg);
  color: var(--ink);
  font-family: "PingFang SC", "Microsoft YaHei", "Noto Sans SC", "Source Han Sans SC", sans-serif;
  font-size: 15px;
  line-height: 1.55;
}

button,
input,
select {
  font: inherit;
}

button {
  cursor: pointer;
}

a {
  color: inherit;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 40;
  background: var(--navy);
  color: #fff;
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.08);
}

.topbar-inner {
  max-width: 1120px;
  margin: 0 auto;
  padding: 12px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
}

.brand-mark {
  width: 34px;
  height: 34px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--teal);
  border-radius: var(--radius);
  font-weight: 700;
  font-size: 17px;
  color: #fff;
}

.brand-text {
  font-weight: 700;
  font-size: 19px;
  letter-spacing: 0;
}

.topbar-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}

.chip-button {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  max-width: 320px;
  border: 1px solid rgba(255, 255, 255, 0.22);
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
  border-radius: 999px;
  padding: 7px 12px;
  font-size: 13px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.chip-button:hover {
  background: rgba(255, 255, 255, 0.18);
}

.icon-button {
  width: 36px;
  height: 36px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--navy-2);
  border-radius: var(--radius);
  flex: none;
}

.icon-button:hover {
  background: var(--blue-soft);
  border-color: #b8cfe6;
}

.topbar .icon-button {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.22);
  color: #fff;
}

.topbar .icon-button:hover {
  background: rgba(255, 255, 255, 0.18);
}

.icon-button svg {
  width: 17px;
  height: 17px;
}

main {
  max-width: 1120px;
  margin: 0 auto;
  padding: 26px 20px 48px;
}

.library-head {
  margin-bottom: 18px;
}

.library-title {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 14px;
}

.library-title h1 {
  margin: 0;
  font-size: 26px;
  color: var(--navy);
}

.library-title p {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
}

.toolbar {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.search-box {
  position: relative;
  display: block;
  flex: 1 1 280px;
  min-width: 220px;
  max-width: 520px;
}

.search-box input {
  width: 100%;
  height: 42px;
  padding: 0 14px 0 40px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  color: var(--ink);
  outline: none;
}

.search-box input:focus {
  border-color: var(--teal);
  box-shadow: 0 0 0 3px rgba(14, 143, 122, 0.12);
}

.search-icon {
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  width: 18px;
  height: 18px;
  color: var(--muted);
  pointer-events: none;
}

.search-icon svg {
  width: 18px;
  height: 18px;
}

.segmented {
  display: inline-flex;
  background: #e9edf2;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 3px;
  gap: 3px;
}

.segmented-btn,
.sort-btn {
  height: 34px;
  padding: 0 14px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: var(--muted);
  font-size: 13px;
}

.segmented-btn.active,
.sort-btn.active {
  background: var(--surface);
  color: var(--navy);
  font-weight: 600;
  box-shadow: 0 1px 2px rgba(22, 50, 79, 0.12);
}

.filter-row {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-top: 12px;
  flex-wrap: wrap;
}

.sort-switch {
  display: inline-flex;
  gap: 2px;
  flex: none;
}

.sort-btn {
  height: 32px;
  padding: 0 10px;
  color: var(--muted);
}

.chip-scroll {
  display: flex;
  align-items: center;
  gap: 8px;
  flex: 1 1 auto;
  min-width: 0;
  overflow-x: auto;
  scrollbar-width: thin;
  padding-bottom: 2px;
}

.category-chip {
  flex: none;
  height: 32px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface);
  color: var(--muted);
  font-size: 13px;
}

.category-chip.active {
  border-color: var(--navy);
  background: var(--navy);
  color: #fff;
  font-weight: 600;
}

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

.comp-card {
  display: flex;
  flex-direction: column;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 18px;
  min-height: 260px;
}

.card-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 10px;
}

.category-badge {
  display: inline-flex;
  align-items: center;
  height: 24px;
  padding: 0 9px;
  border-radius: 999px;
  background: var(--blue-soft);
  color: var(--blue);
  font-size: 12px;
  font-weight: 600;
  white-space: nowrap;
}

.score-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  height: 26px;
  padding: 0 9px;
  border-radius: var(--radius);
  background: var(--teal-soft);
  color: var(--teal);
  font-size: 12px;
  font-weight: 700;
  white-space: nowrap;
}

.comp-card h3 {
  margin: 0 0 4px;
  font-size: 17px;
  color: var(--navy);
  line-height: 1.35;
}

.comp-aliases {
  margin: 0 0 10px;
  color: var(--muted);
  font-size: 12px;
  min-height: 18px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.tag-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 12px;
}

.tag {
  display: inline-flex;
  align-items: center;
  height: 22px;
  padding: 0 8px;
  border-radius: 999px;
  background: #f0f3f6;
  color: var(--muted);
  font-size: 12px;
}

.card-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 12px;
}

.meta-item {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  color: var(--muted);
  font-size: 12px;
}

.meta-item svg {
  width: 14px;
  height: 14px;
}

.recognition-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 12px;
}

.recognition-pill {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  height: 24px;
  padding: 0 8px;
  border-radius: 6px;
  font-size: 12px;
}

.recognition-pill.baoyan-high,
.recognition-pill.study-high {
  background: var(--rose-soft);
  color: var(--rose);
  font-weight: 600;
}

.recognition-pill.baoyan-mid,
.recognition-pill.study-mid {
  background: var(--amber-soft);
  color: var(--amber);
}

.recognition-pill.baoyan-low,
.recognition-pill.study-low {
  background: #eef1f4;
  color: var(--muted);
}

.reason-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 14px;
}

.reason-chip {
  display: inline-flex;
  align-items: center;
  height: 22px;
  padding: 0 8px;
  border-radius: 6px;
  background: var(--teal-soft);
  color: var(--teal);
  font-size: 12px;
}

.card-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: auto;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  height: 38px;
  padding: 0 16px;
  border-radius: var(--radius);
  border: 1px solid transparent;
  font-size: 14px;
  font-weight: 600;
  white-space: nowrap;
}

.button svg {
  width: 16px;
  height: 16px;
}

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

.button.primary:hover {
  background: #0c7e6b;
}

.button.secondary {
  background: var(--surface);
  border-color: var(--line);
  color: var(--navy-2);
}

.button.secondary:hover {
  background: var(--blue-soft);
}

.button.ghost {
  background: transparent;
  border-color: var(--line);
  color: var(--muted);
  height: 36px;
  padding: 0 12px;
}

.button.ghost.active {
  border-color: var(--rose);
  color: var(--rose);
  background: var(--rose-soft);
}

.button.favorite-btn {
  margin-left: auto;
}

.button.favorite-btn.active {
  border-color: var(--amber);
  color: var(--amber);
  background: var(--amber-soft);
}

.empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  padding: 64px 20px;
  text-align: center;
  color: var(--muted);
}

.empty-state strong {
  color: var(--navy);
  font-size: 16px;
}

.records-layout {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
}

.records-panel {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 18px;
}

.panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  border-bottom: 1px solid var(--line);
  padding-bottom: 12px;
  margin-bottom: 12px;
}

.panel-head h2 {
  margin: 0;
  font-size: 16px;
  color: var(--navy);
}

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

.records-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.record-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fbfcfe;
}

.record-item .record-main {
  flex: 1 1 auto;
  min-width: 0;
}

.record-item strong {
  display: block;
  color: var(--navy);
  font-size: 14px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.record-item span {
  display: block;
  color: var(--muted);
  font-size: 12px;
  margin-top: 2px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.record-item .small-btn {
  flex: none;
}

.small-btn {
  height: 30px;
  padding: 0 10px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--surface);
  color: var(--navy-2);
  font-size: 12px;
}

.small-btn:hover {
  background: var(--blue-soft);
}

.record-empty {
  padding: 28px 12px;
  text-align: center;
  color: var(--muted);
  font-size: 13px;
  border: 1px dashed var(--line);
  border-radius: var(--radius);
}

.site-footer {
  max-width: 1120px;
  margin: 0 auto;
  padding: 24px 20px 40px;
  color: var(--muted);
  font-size: 12px;
  border-top: 1px solid var(--line);
}

.site-footer p {
  margin: 4px 0;
}

.onboarding {
  position: fixed;
  inset: 0;
  z-index: 60;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  background: #edf2f7;
}

.onboarding-card {
  width: 100%;
  max-width: 620px;
  max-height: calc(100vh - 40px);
  overflow-y: auto;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 10px;
  box-shadow: 0 20px 60px rgba(22, 50, 79, 0.16);
  padding: 24px;
}

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

.eyebrow {
  display: block;
  color: var(--teal);
  font-size: 12px;
  font-weight: 700;
  margin-bottom: 4px;
}

.onboarding-head h2 {
  margin: 0;
  font-size: 22px;
  color: var(--navy);
}

.step-label {
  flex: none;
  color: var(--muted);
  font-size: 13px;
}

.progress-track {
  height: 6px;
  background: #e9edf2;
  border-radius: 999px;
  overflow: hidden;
  margin-bottom: 22px;
}

.progress-track span {
  display: block;
  height: 100%;
  width: 25%;
  background: var(--teal);
  border-radius: 999px;
  transition: width 0.2s ease;
}

.onboarding-body {
  min-height: 260px;
}

.option-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 10px;
}

.option-card {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 48px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  color: var(--ink);
  font-size: 14px;
  text-align: left;
}

.option-card:hover {
  border-color: #a9c6dd;
  background: var(--blue-soft);
}

.option-card.active {
  border-color: var(--teal);
  background: var(--teal-soft);
  color: var(--teal);
  font-weight: 600;
}

.option-card .option-check {
  width: 18px;
  height: 18px;
  flex: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: var(--surface);
  color: transparent;
}

.option-card.active .option-check {
  background: var(--teal);
  border-color: var(--teal);
  color: #fff;
}

.option-card .option-check svg {
  width: 11px;
  height: 11px;
}

.onboarding-hint {
  margin: 14px 0 0;
  color: var(--muted);
  font-size: 13px;
}

.onboarding-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 22px;
}

.action-spacer {
  flex: 1;
}

.overlay {
  position: fixed;
  inset: 0;
  z-index: 50;
  background: rgba(15, 30, 48, 0.45);
  display: flex;
  justify-content: flex-end;
}

.drawer {
  width: min(720px, 100%);
  height: 100%;
  background: var(--surface);
  box-shadow: -12px 0 40px rgba(22, 50, 79, 0.18);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.drawer-head {
  flex: none;
  display: flex;
  justify-content: flex-end;
  padding: 14px 16px 0;
}

.drawer-body {
  flex: 1 1 auto;
  overflow-y: auto;
  padding: 4px 24px 40px;
}

.detail-head {
  border-bottom: 1px solid var(--line);
  padding-bottom: 18px;
  margin-bottom: 18px;
}

.detail-head .category-badge {
  margin-bottom: 10px;
}

.detail-head h2 {
  margin: 0 0 4px;
  font-size: 24px;
  color: var(--navy);
  line-height: 1.3;
}

.detail-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 16px;
}

.detail-section {
  margin-bottom: 22px;
}

.detail-section h3 {
  margin: 0 0 10px;
  font-size: 15px;
  color: var(--navy);
}

.detail-section p {
  margin: 6px 0;
  color: var(--ink);
}

.detail-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.detail-item {
  background: #f8fafc;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 10px 12px;
}

.detail-item span {
  display: block;
  color: var(--muted);
  font-size: 12px;
}

.detail-item strong {
  display: block;
  margin-top: 2px;
  color: var(--navy);
  font-size: 14px;
  font-weight: 600;
}

.skill-list,
.grade-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 0;
  margin: 0;
  list-style: none;
}

.skill-list li,
.grade-list li {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 0 10px;
  border-radius: 6px;
  background: var(--blue-soft);
  color: var(--navy-2);
  font-size: 13px;
}

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

.recognition-card {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 12px;
  background: #fbfcfe;
}

.recognition-card .recognition-pill {
  margin-bottom: 8px;
}

.recognition-card p {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
}

.official-link {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  height: 38px;
  padding: 0 14px;
  border-radius: var(--radius);
  background: var(--navy);
  color: #fff;
  font-size: 14px;
  font-weight: 600;
  text-decoration: none;
}

.official-link:hover {
  background: var(--navy-2);
}

.official-link svg {
  width: 16px;
  height: 16px;
}

.learning-path {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.phase-card {
  border: 1px solid var(--line);
  border-left: 4px solid var(--teal);
  border-radius: var(--radius);
  padding: 14px;
  background: #fbfcfe;
}

.phase-card h4 {
  margin: 0 0 6px;
  font-size: 14px;
  color: var(--navy);
}

.phase-card p {
  margin: 0 0 8px;
  color: var(--muted);
  font-size: 13px;
}

.phase-card ul {
  margin: 0;
  padding-left: 18px;
  color: var(--ink);
  font-size: 13px;
}

.phase-card li {
  margin: 3px 0;
}

.timeline-form {
  display: grid;
  grid-template-columns: 130px 1fr auto;
  gap: 8px;
  align-items: center;
  background: #f8fafc;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 10px;
  margin-bottom: 12px;
}

.timeline-form select,
.timeline-form input {
  height: 36px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--surface);
  color: var(--ink);
  padding: 0 8px;
  outline: none;
  min-width: 0;
  width: 100%;
}

.timeline-form select:focus,
.timeline-form input:focus {
  border-color: var(--teal);
}

.timeline-form .button {
  height: 36px;
  padding: 0 12px;
}

.timeline-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.timeline-item {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fbfcfe;
}

.timeline-item .timeline-main {
  flex: 1 1 auto;
  min-width: 0;
}

.timeline-item strong {
  display: block;
  color: var(--navy);
  font-size: 14px;
}

.timeline-item span {
  display: block;
  color: var(--muted);
  font-size: 12px;
  margin-top: 2px;
  overflow-wrap: anywhere;
}

.toast {
  position: fixed;
  left: 50%;
  bottom: 28px;
  transform: translateX(-50%);
  z-index: 80;
  max-width: calc(100vw - 40px);
  background: var(--navy);
  color: #fff;
  border-radius: 999px;
  padding: 10px 18px;
  font-size: 13px;
  box-shadow: 0 8px 24px rgba(22, 50, 79, 0.25);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease, transform 0.2s ease;
}

.toast.show {
  opacity: 1;
  transform: translateX(-50%) translateY(-4px);
}

[hidden] {
  display: none !important;
}

@media (max-width: 760px) {
  main {
    padding: 18px 14px 40px;
  }

  .topbar-inner {
    padding: 10px 14px;
  }

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

  .chip-button {
    max-width: 180px;
    font-size: 12px;
  }

  .library-title {
    flex-direction: column;
    gap: 4px;
  }

  .library-title h1 {
    font-size: 22px;
  }

  .toolbar {
    align-items: stretch;
  }

  .search-box {
    flex-basis: 100%;
    max-width: none;
  }

  .segmented {
    align-self: flex-start;
  }

  .records-layout {
    grid-template-columns: 1fr;
  }

  .detail-grid,
  .recognition-cards {
    grid-template-columns: 1fr;
  }

  .drawer-body {
    padding: 2px 16px 32px;
  }

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

  .onboarding-card {
    padding: 18px;
  }

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

  .card-actions {
    flex-wrap: wrap;
  }

  .button.favorite-btn {
    margin-left: 0;
  }
}

@media (max-width: 420px) {
  .option-grid {
    grid-template-columns: 1fr;
  }
}

/* Team plaza */
.team-head {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 16px;
  flex-wrap: wrap;
}

.team-search {
  flex: 1 1 260px;
  max-width: 380px;
  min-width: 200px;
}

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

.team-post-card {
  display: flex;
  flex-direction: column;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 18px;
}

.team-post-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 6px;
}

.team-post-head h3 {
  margin: 0;
  font-size: 16px;
  color: var(--navy);
  line-height: 1.35;
}

.team-post-owner {
  margin: 0 0 10px;
  color: var(--muted);
  font-size: 12px;
}

.team-post-section {
  margin-bottom: 10px;
}

.team-post-section h4 {
  margin: 0 0 4px;
  font-size: 13px;
  color: var(--navy);
}

.team-post-section p {
  margin: 0;
  color: var(--ink);
  font-size: 13px;
  overflow-wrap: anywhere;
}

.team-post-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 2px;
  margin-bottom: 12px;
}

.team-post-meta .tag {
  height: 24px;
}

.team-post-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: auto;
  flex-wrap: wrap;
}

.team-post-actions .button {
  height: 34px;
  padding: 0 12px;
  font-size: 13px;
}

.contact-type {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  height: 24px;
  padding: 0 9px;
  border-radius: 999px;
  background: var(--teal-soft);
  color: var(--teal);
  font-size: 12px;
  font-weight: 600;
}

.contact-reveal {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 34px;
  padding: 0 12px;
  border-radius: var(--radius);
  background: var(--amber-soft);
  color: var(--amber);
  font-size: 13px;
  font-weight: 600;
  overflow-wrap: anywhere;
}

.status-badge {
  display: inline-flex;
  align-items: center;
  height: 24px;
  padding: 0 9px;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 600;
}

.status-badge.pending {
  background: var(--amber-soft);
  color: var(--amber);
}

.status-badge.accepted {
  background: var(--teal-soft);
  color: var(--teal);
}

.status-badge.rejected {
  background: #eef1f4;
  color: var(--muted);
}

.team-form {
  max-width: 720px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

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

.field-label {
  display: flex;
  flex-direction: column;
  gap: 6px;
  color: var(--navy);
  font-size: 13px;
  font-weight: 600;
}

.field-label input,
.field-label select,
.field-label textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--surface);
  color: var(--ink);
  padding: 9px 10px;
  outline: none;
  font: inherit;
  font-weight: 400;
}

.field-label textarea {
  min-height: 96px;
  resize: vertical;
}

.field-label input:focus,
.field-label select:focus,
.field-label textarea:focus {
  border-color: var(--teal);
  box-shadow: 0 0 0 3px rgba(14, 143, 122, 0.1);
}

.form-hint {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
}

.form-error {
  margin: 8px 0 0;
  color: var(--rose);
  font-size: 13px;
}

.form-success {
  margin: 8px 0 0;
  color: var(--teal);
  font-size: 13px;
}

.auth-card {
  width: min(440px, 100%);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 10px;
  box-shadow: 0 20px 60px rgba(22, 50, 79, 0.18);
  padding: 24px;
}

.auth-overlay {
  justify-content: center;
  align-items: center;
}

.auth-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 14px;
}

.auth-head h2 {
  margin: 0;
  font-size: 20px;
  color: var(--navy);
}

.auth-toggle {
  margin-bottom: 16px;
}

.auth-submit {
  width: 100%;
  margin-top: 14px;
}

.application-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 16px;
}

.application-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 8px;
}

.application-head strong {
  color: var(--navy);
  font-size: 14px;
}

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

.application-body {
  margin: 0 0 10px;
  color: var(--ink);
  font-size: 13px;
  overflow-wrap: anywhere;
}

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

.application-actions .small-btn {
  height: 32px;
}

.team-stack {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.team-section-title {
  margin: 18px 0 10px;
  font-size: 16px;
  color: var(--navy);
}

.account-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 16px;
  flex-wrap: wrap;
}

.account-row strong {
  color: var(--navy);
  font-size: 15px;
}

.account-row .account-actions {
  display: flex;
  gap: 8px;
}

.danger-btn {
  border-color: var(--rose);
  color: var(--rose);
  background: var(--surface);
}

.danger-btn:hover {
  background: var(--rose-soft);
}

.team-auth-prompt {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 32px 20px;
  text-align: center;
  color: var(--muted);
}

.team-auth-prompt strong {
  display: block;
  color: var(--navy);
  font-size: 16px;
  margin-bottom: 6px;
}

.team-auth-prompt .button {
  margin-top: 12px;
}

@media (max-width: 640px) {
  .form-row {
    grid-template-columns: 1fr;
  }

  .team-head {
    align-items: stretch;
    flex-direction: column;
  }

  .team-search {
    max-width: none;
  }

  .auth-card {
    padding: 18px;
  }
}

.archive-card {
  border-left-color: var(--amber);
}

.archive-link {
  display: inline-flex;
  height: 32px;
  padding: 0 10px;
  margin-top: 8px;
  font-size: 12px;
}
