:root {
  color-scheme: light;
  --ink: #06265a;
  --muted: #5e739c;
  --line: #d1daf4;
  --border: var(--line);
  --panel: #ffffff;
  --page: #f5f9ff;
  --accent: #1f58de;
  --accent-dark: #1646b4;
  --accent-soft: #eef4ff;
  --orange: #fc6e20;
  --rose: #c43d4d;
  --blue: #1f58de;
  --navy: #011b46;
  --sidebar: #061f4f;
  --sidebar-muted: #aebde2;
  --chart-purple: #390c78;
  --chart-blue: #02a5ea;
  --chart-light-blue: #b1e7fe;
  --shadow: 0 0 10px rgba(211, 218, 234, 0.9);
}

* {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

body {
  margin: 0;
  min-height: 100vh;
  background:
    linear-gradient(180deg, #ffffff 0, var(--page) 320px),
    var(--page);
  color: var(--ink);
  font-family:
    "IBM Plex Sans", Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI",
    sans-serif;
}

body:has(.app-tutorial) {
  overflow: hidden;
}

.app-tutorial {
  position: fixed;
  inset: 0;
  pointer-events: none;
}

.app-tutorial-shade {
  position: absolute;
  z-index: 10000;
  inset: 0;
  background: rgba(1, 17, 45, 0.72);
  backdrop-filter: blur(2px);
  pointer-events: auto;
}

body:has(.app-tutorial) #dashboard-shell > .dashboard-sidebar,
body:has(.app-tutorial) #dashboard-shell > .user-dashboard-topbar {
  z-index: 10001;
}

.results-menu-item.is-tutorial-highlight,
.profile-menu-toggle.is-tutorial-highlight {
  position: relative;
  z-index: 10001;
  border-radius: 8px;
  background: #fff !important;
  color: var(--navy) !important;
  box-shadow: 0 0 0 5px rgba(252, 110, 32, 0.95), 0 18px 50px rgba(0, 0, 0, 0.35);
  pointer-events: none;
}

.profile-menu-toggle.is-tutorial-highlight {
  border-radius: 50%;
}

.app-tutorial-card {
  position: fixed;
  z-index: 10002;
  overflow: hidden;
  width: min(390px, calc(100vw - 32px));
  max-width: none;
  max-height: none;
  margin: 0;
  border: 1px solid rgba(209, 218, 244, 0.9);
  border-radius: 14px;
  padding: 28px;
  background: white;
  color: var(--ink);
  box-shadow: 0 24px 70px rgba(0, 10, 35, 0.35);
  pointer-events: auto;
}

.app-tutorial-card::backdrop {
  background: transparent;
}

.app-tutorial-close {
  position: absolute;
  top: 12px;
  right: 14px;
  border: 0;
  padding: 4px 8px;
  background: transparent;
  color: var(--muted);
  font-size: 1.7rem;
  line-height: 1;
  cursor: pointer;
}

.app-tutorial-step {
  color: var(--accent);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.app-tutorial-card h2 {
  margin: 8px 28px 8px 0;
  font-size: 1.45rem;
}

.app-tutorial-card p {
  margin: 0;
  color: var(--muted);
  line-height: 1.55;
}

.app-tutorial-actions,
.app-tutorial-actions > div {
  display: flex;
  align-items: center;
  gap: 10px;
}

.app-tutorial-actions {
  justify-content: space-between;
  margin-top: 24px;
}

.app-tutorial-actions button {
  border: 1px solid var(--line);
  border-radius: 7px;
  padding: 9px 13px;
  background: white;
  color: var(--ink);
  font-weight: 700;
  cursor: pointer;
}

.app-tutorial-actions .app-tutorial-next {
  border-color: var(--accent);
  background: var(--accent);
  color: white;
}

.app-tutorial-actions button:disabled {
  opacity: 0.4;
  cursor: default;
}

@media (max-width: 719px) {
  .app-tutorial-card {
    top: auto !important;
    bottom: 16px;
    padding: 24px;
  }
}

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

.shell {
  width: min(1480px, calc(100% - 32px));
  margin: 0 auto;
  padding: 24px 0 64px;
}

.brand-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  min-height: 64px;
  margin-bottom: 24px;
  border: 1px solid rgba(209, 218, 244, 0.82);
  border-radius: 4px;
  padding: 14px 20px;
  background: rgba(255, 255, 255, 0.94);
  box-shadow: var(--shadow);
}

.brand-bar img {
  display: block;
  width: min(280px, 58vw);
  height: auto;
}

.brand-bar span {
  color: var(--muted);
  font-size: 0.95rem;
  font-weight: 500;
  text-align: right;
}

.panel {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 4px;
  box-shadow: var(--shadow);
}

.input-panel {
  position: relative;
  overflow: hidden;
  padding: 38px;
}

.dashboard-shell {
  display: grid;
  grid-template-columns: 260px minmax(0, 1fr);
  gap: 20px;
  min-height: calc(100vh - 48px);
}

.dashboard-sidebar {
  position: sticky;
  top: 24px;
  display: grid;
  grid-template-rows: auto 1fr auto;
  gap: 28px;
  align-self: start;
  min-height: calc(100vh - 48px);
  border-radius: 4px;
  padding: 24px 20px;
  background: var(--sidebar);
  color: white;
  box-shadow: 0 18px 44px rgba(1, 27, 70, 0.2);
}

.sidebar-brand {
  display: grid;
  gap: 12px;
  color: white;
  text-decoration: none;
}

.sidebar-brand img {
  display: block;
  width: min(230px, 100%);
  height: auto;
  border-radius: 2px;
  background: transparent;
}

.sidebar-brand span {
  color: var(--sidebar-muted);
  font-size: 0.92rem;
  font-weight: 700;
}

.dashboard-main {
  display: grid;
  align-content: start;
  gap: 18px;
  min-width: 0;
}

.dashboard-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  min-height: 86px;
  border: 1px solid rgba(209, 218, 244, 0.82);
  border-radius: 4px;
  padding: 18px 22px;
  background: rgba(255, 255, 255, 0.96);
  box-shadow: var(--shadow);
}

.dashboard-topbar h1 {
  font-size: clamp(1.55rem, 2.2vw, 2.35rem);
  line-height: 1;
}

.mobile-menu-button {
  display: none;
}

.dashboard-shell.is-profile-view .dashboard-grid {
  grid-template-columns: minmax(0, 1fr);
}

.dashboard-shell.is-profile-view .profile-panel {
  position: static;
  width: 100%;
}

.community-view-banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  border: 1px solid rgba(225, 135, 62, 0.34);
  border-left: 5px solid var(--orange);
  border-radius: 4px;
  padding: 16px 18px;
  background: #fff6ed;
  color: var(--text);
  box-shadow: 0 12px 26px rgba(116, 73, 28, 0.08);
}

.community-view-banner strong {
  display: block;
  margin-top: 4px;
  font-size: 1rem;
}

.community-view-banner span {
  flex: 0 0 auto;
  color: var(--muted);
  font-weight: 800;
}

.expert-group-invitations-widget {
  display: grid;
  gap: 16px;
  border: 1px solid rgba(225, 135, 62, 0.5);
  border-left: 6px solid var(--orange);
  border-radius: 4px;
  padding: 20px;
  background: linear-gradient(135deg, #fff8ec 0%, #ffffff 58%, #eef4ff 100%);
  box-shadow: 0 18px 38px rgba(116, 73, 28, 0.12);
}

.expert-group-invitations-widget h2 {
  margin: 4px 0 0;
  color: var(--navy);
  font-size: clamp(1.2rem, 2vw, 1.7rem);
}

.expert-group-invitations-widget p {
  max-width: 760px;
  margin: 8px 0 0;
  color: var(--muted);
  font-weight: 650;
}

.expert-group-invitations-list {
  display: grid;
  gap: 10px;
}

.expert-group-invitation-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 14px;
  align-items: center;
  border: 1px solid rgba(209, 218, 244, 0.9);
  border-radius: 4px;
  padding: 14px;
  background: rgba(255, 255, 255, 0.92);
}

.expert-group-invitation-card strong,
.expert-group-invitation-card span {
  display: block;
}

.expert-group-invitation-card strong {
  color: var(--ink);
  font-size: 1.02rem;
}

.expert-group-invitation-card span {
  margin-top: 3px;
  color: var(--muted);
  font-size: 0.86rem;
  font-weight: 700;
}

.expert-group-invitation-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 10px;
}

.dashboard-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 18px;
  align-items: start;
}

.dashboard-content {
  display: grid;
  gap: 18px;
  min-width: 0;
}

.profile-panel {
  position: sticky;
  top: 24px;
  padding: 22px;
}

.profile-panel::before {
  background: linear-gradient(90deg, var(--orange), var(--accent));
}

.profile-panel h2 {
  font-size: 1.2rem;
}

.login-role-panel,
.auth-panel {
  position: relative;
  overflow: hidden;
  padding: 38px;
}

.admin-panel,
.community-panel {
  position: relative;
  overflow: hidden;
  padding: 38px;
}

.login-role-panel,
.auth-panel,
.onboarding-panel,
.admin-panel,
.community-panel {
  max-width: 920px;
  margin: 0 auto;
}

.input-panel::before {
  position: absolute;
  inset: 0 0 auto;
  height: 5px;
  background: linear-gradient(90deg, var(--accent), var(--orange));
  content: "";
}

.login-role-panel::before,
.auth-panel::before {
  position: absolute;
  inset: 0 0 auto;
  height: 5px;
  background: linear-gradient(90deg, var(--orange), var(--accent));
  content: "";
}

.login-role-panel {
  display: grid;
  gap: 22px;
  margin-bottom: 18px;
}

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

.login-role-button {
  display: grid;
  gap: 6px;
  min-height: 92px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f9fbff;
  color: var(--ink);
  text-align: left;
  text-decoration: none;
  cursor: pointer;
}

.login-role-button strong {
  font-size: 0.98rem;
}

.login-role-button span {
  color: var(--muted);
  font-size: 0.86rem;
  line-height: 1.35;
}

.login-role-button:hover,
.login-role-button.is-active {
  border-color: var(--accent);
  background: #eef6ff;
}

.login-role-button:focus-visible,
.logout-button:focus-visible {
  border-color: var(--accent);
  outline: 3px solid rgba(31, 88, 222, 0.16);
}

.candidate-hero {
  position: relative;
  max-width: 1120px;
  min-height: 560px;
  margin: 0 auto;
  padding: 54px clamp(24px, 6vw, 76px) 112px;
  color: var(--ink);
}

.candidate-hero::after { display: none; }

.candidate-hero-nav,
.candidate-hero-copy,
.candidate-benefits,
.candidate-start-button {
  position: relative;
  z-index: 1;
}

.candidate-hero-nav {
  display: flex;
  justify-content: center;
}

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

.candidate-brand img {
  display: block;
  width: 224px;
  height: auto;
  max-height: 224px;
  object-fit: contain;
}

.auth-brand {
  display: inline-flex;
  margin: 0 0 24px;
}

.auth-brand img {
  display: block;
  width: 260px;
  height: auto;
}

.candidate-hero-copy {
  max-width: 780px;
  margin: 26px auto 0;
  text-align: center;
}

.candidate-kicker {
  margin: 0 0 26px;
  color: #1559df;
  font-size: 1.08rem;
  font-weight: 700;
}

.candidate-hero h1 {
  max-width: 770px;
  margin: 0 auto;
  color: var(--ink);
  font-size: clamp(2rem, 4vw, 2.75rem);
  line-height: 1.14;
}

.candidate-subtitle {
  margin: 24px 0 0;
  color: rgba(255, 255, 255, 0.88);
  font-size: 1.17rem;
  font-weight: 600;
}

.candidate-intro {
  max-width: 590px;
  margin: 24px auto 0;
  color: #697a96;
  line-height: 1.55;
}

.candidate-benefits {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
  max-width: 900px;
  margin: 50px auto 0;
}

.candidate-benefits article {
  display: flex;
  align-items: center;
  gap: 14px;
  min-height: 90px;
  border: 1px solid #dfe4ed;
  border-radius: 14px;
  padding: 18px 24px;
  background: #fff;
  box-shadow: 0 2px 7px rgba(4, 30, 73, 0.08);
}

.candidate-benefit-icon { color: #1261ff; font-size: 1.55rem; }
.candidate-benefits strong,
.candidate-benefits small { display: block; }
.candidate-benefits strong { color: #1054dc; font-size: 0.88rem; }
.candidate-benefits small { margin-top: 5px; color: #99a6ba; font-size: 0.76rem; line-height: 1.35; }

.candidate-start-button {
  display: none;
  width: fit-content;
  margin: 34px auto 0;
  border-radius: 8px;
  padding: 14px 22px;
  background: #ffffff;
  color: #31008d;
  font-weight: 700;
  text-decoration: none;
}

.candidate-auth-card {
  z-index: 2;
  position: relative;
  overflow: hidden;
  max-width: 620px;
  margin-top: -52px;
  border: 0;
  border-radius: 14px;
  padding: 48px 40px 38px;
  box-shadow: 0 12px 30px rgba(8, 30, 68, 0.12);
}

.candidate-auth-card::before {
  display: block;
  position: absolute;
  inset: 0 0 auto;
  height: 7px;
  background: linear-gradient(90deg, #37008f, #3f4be1 54%, #13b7ed);
  content: "";
}
.candidate-auth-card .title-row { align-items: flex-start; }
.candidate-auth-card .title-row .session-actions { display: none; }
.auth-panel.candidate-auth-card h1 { margin: 0; font-size: 1.45rem; text-align: left; }
.candidate-auth-card .title-row > div:first-child { width: 100%; text-align: left; }

.candidate-auth-tabs {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 5px;
  margin-bottom: 28px;
  border-radius: 10px;
  padding: 5px;
  background: #f0f1f6;
}

.candidate-auth-tab {
  min-height: 44px;
  border: 0;
  border-radius: 7px;
  background: transparent;
  color: #70758a;
  font-weight: 700;
  cursor: pointer;
}

.candidate-auth-tab.is-active {
  background: linear-gradient(135deg, #3b0096, #2a007c);
  color: #ffffff;
  box-shadow: 0 6px 16px rgba(54, 0, 142, 0.25);
}

.candidate-auth-lead { margin: 8px 0 0; color: #71819a; text-align: left; }
.candidate-auth-card form { margin-top: 28px; }
.candidate-auth-card #auth-request-form { gap: 10px; }
.auth-email-row { display: flex; align-items: center; gap: 18px; }
.auth-email-row .text-input { min-width: 0; }
.auth-change-email { border: 0; padding: 8px 0; background: transparent; color: #079ee9; font-size: .82rem; cursor: pointer; }
.auth-cv-label { margin-top: 22px; }
.candidate-auth-card .drop-zone { margin-top: 8px; border-style: dashed; background: #fbfcfe; }
.candidate-auth-card .expert-group-field { margin-top: 10px; border: 0; padding: 0; }
.candidate-auth-card .expert-group-field legend { padding: 0; }
.candidate-auth-card .expert-group-options { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.candidate-auth-card .drop-zone { min-height: 72px; padding: 12px 16px; }
.candidate-auth-card .drop-icon { width: 42px; height: 42px; background: #edf1f7; color: #71819a; font-size: 1.1rem; }
.candidate-auth-card .drop-copy strong { font-size: .92rem; }
.candidate-auth-card .drop-copy small { color: #9ba8bc; font-size: .78rem; }
.candidate-auth-card #auth-terms-field { margin-top: 20px; }
.candidate-auth-card #auth-terms-field .check-option { border: 0; padding: 0; background: transparent; font-weight: 400; }
.candidate-auth-card #auth-request-button { width: 100%; min-height: 52px; border-radius: 11px; background: linear-gradient(90deg, #36008e, #2868d7 62%, #13b7ed); box-shadow: 0 9px 20px rgba(54, 0, 142, .18); }
.candidate-auth-card #auth-message:empty { display: none; }
.candidate-auth-card #auth-message { margin-top: 12px; }
.shell:has(#auth-panel[hidden]) .candidate-start-button { display: flex; gap: 18px; }

@media (max-width: 820px) {
  .candidate-hero {
    min-height: auto;
    padding: 28px 10px 78px;
  }

  .candidate-brand img { width: 180px; }
  .candidate-hero-copy { margin-top: 18px; }
  .candidate-intro { font-size: 0.92rem; }
  .candidate-benefits { grid-template-columns: 1fr; gap: 10px; margin-top: 36px; }
  .candidate-benefits article { min-height: 72px; }
  .candidate-auth-card { margin-top: -42px; border-radius: 14px; padding: 34px 20px 28px; }
  .auth-email-row { align-items: stretch; flex-direction: column; gap: 4px; }
  .auth-change-email { align-self: flex-start; }
  .candidate-auth-card .expert-group-options { grid-template-columns: 1fr; }
}

/* DTB Kompas page frame */
#dashboard-shell {
  --ink: #06265a;
  grid-template-rows: auto minmax(0, 1fr);
  gap: 0;
  min-height: calc(100vh - 48px);
  overflow: visible;
  border-radius: 10px;
  background: #eef2fa;
  box-shadow: 0 12px 38px rgba(6, 38, 90, 0.09);
}

#dashboard-shell > .user-dashboard-topbar {
  position: relative;
  z-index: 20;
  grid-column: 1 / -1;
  grid-row: 1;
  min-height: 76px;
  border: 0;
  border-bottom: 1px solid #e2e8f5;
  border-radius: 10px 10px 0 0;
  padding: 12px 24px;
  background: #ffffff;
  box-shadow: 0 3px 12px rgba(6, 38, 90, 0.06);
}

.user-topbar-brand,
.user-topbar-brand > a {
  display: flex;
  align-items: center;
}

.user-topbar-brand > a {
  gap: 11px;
  color: #06265a;
  text-decoration: none;
}

.user-topbar-brand img {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  object-fit: cover;
}

.user-topbar-brand strong {
  font-size: 1.06rem;
  font-weight: 800;
}

#dashboard-shell > .dashboard-sidebar {
  position: sticky;
  top: 0;
  grid-column: 1;
  grid-row: 2;
  min-height: calc(100vh - 124px);
  border-radius: 0 0 0 10px;
  background: #19136a;
  box-shadow: none;
}

#dashboard-shell > .dashboard-main {
  grid-column: 2;
  grid-row: 2;
  gap: 20px;
  padding: 26px;
  background: #eef2fa;
}

#dashboard-shell .results-menu-item.is-active {
  border-left: 3px solid #ffb30f;
  border-radius: 0 5px 5px 0;
  background: rgba(31, 88, 222, 0.26);
  color: #fff;
  box-shadow: none;
}

#dashboard-shell .results-menu-item.is-active .menu-count {
  background: #ffb30f;
  color: #06265a;
}

#dashboard-shell .results-menu {
  padding-top: 15px;
}

#dashboard-shell .results-menu-item.is-active {
  border-left: 3px solid #ffb30f;
  border-radius: 0 5px 5px 0;
  background: rgba(31, 88, 222, 0.26);
  color: #ffffff;
  box-shadow: none;
}

#dashboard-shell .menu-count {
  background: #ffb30f;
  color: #06265a;
}

#dashboard-shell .profile-menu-toggle {
  border-color: #1f58de;
  background: #1f58de;
  color: #ffffff;
}

#dashboard-shell .user-session-actions > .status-pill {
  display: none;
}

.user-page-heading {
  display: grid;
  gap: 18px;
}

.user-page-heading > h1 {
  margin: 0;
  color: #06265a;
  font-size: clamp(1.65rem, 2.2vw, 2.2rem);
  letter-spacing: -0.025em;
}

#dashboard-shell .panel,
#dashboard-shell .matching-assignment-card,
#dashboard-shell .admin-list-item {
  color: #06265a;
}

@media (max-width: 820px) {
  #dashboard-shell {
    grid-template-columns: 1fr;
    grid-template-rows: auto 1fr;
  }

  #dashboard-shell > .user-dashboard-topbar {
    grid-column: 1;
    padding: 11px 16px;
  }

  #dashboard-shell > .dashboard-sidebar {
    position: fixed;
    grid-column: auto;
    grid-row: auto;
    min-height: 100dvh;
    border-radius: 0;
  }

  #dashboard-shell > .dashboard-main {
    grid-column: 1;
    grid-row: 2;
    padding: 18px 14px;
  }

  .user-topbar-brand .mobile-menu-button {
    display: inline-flex;
    margin-right: 10px;
  }

}

/* Profile redesign */
.profile-panel {
  display: grid;
  gap: 22px;
  min-width: 0;
}

.profile-page-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

.profile-page-heading h2 {
  margin: 0;
  color: #06265a;
  font-size: clamp(1.75rem, 2.2vw, 2.35rem);
  letter-spacing: -.035em;
}

.profile-save-button {
  min-height: 44px;
  gap: 9px;
  border-radius: 9px;
  padding-inline: 18px;
}

.profile-save-button svg {
  width: 17px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.8;
}

.profile-intro-card {
  display: grid;
  grid-template-columns: 48px minmax(0, 1fr);
  gap: 18px;
  align-items: start;
  border: 1px solid #dce3ee;
  border-radius: 13px;
  padding: 24px 28px;
  background: #fff;
  box-shadow: 0 2px 7px rgba(6, 38, 90, .035);
}

.profile-intro-icon {
  display: grid;
  width: 46px;
  height: 46px;
  place-items: center;
  border-radius: 11px;
  background: linear-gradient(145deg, #29138e, #1762dc);
  color: #fff;
}

.profile-intro-icon svg {
  width: 23px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-width: 1.7;
}

.profile-intro-card .eyebrow { margin: 0 0 7px; color: #1f58de; }
.profile-intro-card h3 { margin: 0; font-size: 1.08rem; }
.profile-intro-card p:last-child { max-width: 800px; margin: 8px 0 0; color: #74839b; line-height: 1.55; }

.profile-panel form { margin: 0; }
.profile-form-layout { grid-template-columns: minmax(360px, .95fr) minmax(500px, 1.05fr); gap: 20px; }

.profile-form-section {
  gap: 20px;
  border-color: #dce3ee;
  border-radius: 13px;
  padding: 0 24px 24px;
  background: #fff;
  box-shadow: 0 2px 7px rgba(6, 38, 90, .035);
}

.profile-section-heading { margin: 0 -24px; padding: 22px 24px 18px; }
.profile-section-icon { background: linear-gradient(145deg, #29138e, #245ade); }
.profile-section-heading h3 { font-size: 1.05rem; }
.profile-section-heading p { color: #74839b; }
.profile-form-section .profile-fields { gap: 18px 14px; }
.profile-form-section .text-input { min-height: 46px; }

.profile-native-select {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  overflow: hidden !important;
  clip: rect(0 0 0 0) !important;
  clip-path: inset(50%) !important;
}

.profile-segmented-control { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; gap: 8px; }
.profile-segmented-control button {
  min-height: 44px;
  border: 1px solid #d6deeb;
  border-radius: 9px;
  background: #fff;
  color: #233b63;
  cursor: pointer;
}
.profile-segmented-control button:hover { border-color: #1f58de; }
.profile-segmented-control button.is-active {
  border-color: #1f58de;
  background: #275ddd;
  color: #fff;
  font-weight: 700;
}

.profile-assignment-note { margin: 0; border: 1px solid; border-radius: 8px; padding: 9px 12px; font-size: .82rem; }
.profile-assignment-note.is-positive { border-color: #a9e9bf; background: #effcf3; color: #19964a; }
.profile-assignment-note.is-neutral { border-color: #cbd9ee; background: #f5f8fd; color: #59708f; }
.profile-panel .drop-zone { min-height: 84px; border-radius: 10px; background: #fbfcff; }
.profile-panel .drop-icon { border-radius: 10px; background: #1f58de; color: #fff; }
.profile-panel .secondary-action { border-radius: 7px; background: #eff4fd; }
.role-editor .criteria-head { margin-top: 3px; color: #74839b; font-size: .87rem; }
.role-editor .criteria-head strong { color: #06265a; }
.editable-role-group { gap: 0; padding: 0 16px 14px; border-radius: 10px; overflow: hidden; }
.editable-role-head { display: flex; align-items: center; gap: 10px; margin: 0 -16px 14px; padding: 15px 16px; background: #f0f4fc; }
.editable-role-head h2 { font-size: .88rem; }
.role-count { color: #74839b; font-size: .8rem; }
.profile-panel .editable-tag { border-color: #dce3ee; border-radius: 7px; background: #f0f3f8; }
.profile-panel .add-chip { order: 10; min-width: 108px; border-radius: 7px; color: #fff; background: #1f58de; }
.profile-form-actions { display: none; }

@media (max-width: 1100px) {
  .profile-form-layout { grid-template-columns: 1fr; }
}

@media (max-width: 820px) {
  .profile-page-heading { align-items: stretch; flex-direction: column; }
  .profile-save-button { width: 100%; }
  .profile-intro-card { grid-template-columns: 40px minmax(0, 1fr); padding: 20px; }
  .profile-intro-icon { width: 40px; height: 40px; }
  .profile-form-section { padding-inline: 18px; }
  .profile-section-heading { margin-inline: -18px; padding-inline: 18px; }
  .profile-segmented-control { grid-auto-flow: row; }
}

#auth-request-button,
#community-request-button {
  margin-bottom: 18px;
}

.onboarding-panel::before {
  position: absolute;
  inset: 0 0 auto;
  height: 5px;
  background: linear-gradient(90deg, var(--accent), var(--orange));
  content: "";
}

.admin-panel::before {
  position: absolute;
  inset: 0 0 auto;
  height: 5px;
  background: linear-gradient(90deg, var(--accent), var(--navy));
  content: "";
}

.community-panel::before {
  position: absolute;
  inset: 0 0 auto;
  height: 5px;
  background: linear-gradient(90deg, var(--blue), var(--orange));
  content: "";
}

.onboarding-panel {
  position: relative;
  overflow: hidden;
  padding: 38px;
}

.onboarding-panel .title-row {
  align-items: flex-start;
}

.onboarding-panel h1 {
  max-width: min(100%, 1080px);
  font-size: clamp(2rem, 3.2vw, 3rem);
  line-height: 1.22;
}

.onboarding-panel .criteria-note {
  max-width: 1320px;
  margin: 28px 0 0;
  font-size: 1.05rem;
  line-height: 1.45;
}

.booking-list {
  display: grid;
  gap: 10px;
  margin: 24px 0;
}

.onboarding-expert-groups {
  display: grid;
  gap: 10px;
  margin: 24px 0 12px;
}

.linked-expert-groups {
  margin: 18px 0 0;
}

.linked-expert-groups-card {
  display: grid;
  gap: 10px;
  border: 1px solid var(--line);
  border-radius: 4px;
  background: #ffffff;
  padding: 14px;
}

.linked-expert-groups-card > span {
  color: var(--muted);
}

.linked-expert-group-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.booking-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  border: 1px solid var(--line);
  border-radius: 4px;
  background: #ffffff;
  color: var(--ink);
  padding: 16px 18px;
  text-decoration: none;
}

.booking-item:hover {
  border-color: var(--accent);
  background: var(--accent-soft);
}

.booking-item.is-requested {
  border-color: var(--accent);
  background: var(--accent-soft);
}

.booking-item span {
  color: var(--muted);
  font-size: 0.9rem;
}

.booking-item > div:first-child {
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 6px;
  min-width: 0;
}

.booking-item strong,
.booking-item span {
  overflow-wrap: anywhere;
}

.booking-actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
}

.booking-actions .submit-button {
  width: auto;
  min-height: 36px;
  padding: 0 12px;
}

.booking-actions .booking-confirm-button {
  background: var(--orange);
  box-shadow: 0 8px 16px rgba(252, 110, 32, 0.18);
}

.booking-actions .booking-confirm-button:hover {
  background: #dc5711;
}

.booking-actions .booking-confirm-button.is-requested[disabled] {
  background: var(--accent);
  cursor: default;
  opacity: 1;
}

.expert-group-signup {
  display: grid;
  gap: 12px;
}

.expert-group-signup-panel {
  padding: 24px;
}

.expert-group-signup .criteria-note {
  margin: 0;
}

.expert-group-signup-form {
  display: grid;
  grid-template-columns: minmax(280px, 460px) auto;
  gap: 12px;
  align-items: end;
  border: 1px solid rgba(209, 218, 244, 0.84);
  border-radius: 4px;
  background: #f8fbff;
  padding: 12px;
}

.expert-group-signup-field {
  display: grid;
  gap: 7px;
  min-width: 0;
}

.expert-group-signup-form .submit-button {
  width: auto;
  min-width: 136px;
  min-height: 46px;
  padding: 0 18px;
}

.expert-group-signup-message {
  color: var(--muted);
  font-weight: 700;
}

.expert-group-signup-bookings {
  margin: 4px 0 0;
}

.secondary-action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 36px;
  border: 1px solid var(--line);
  border-radius: 4px;
  background: #ffffff;
  color: var(--accent);
  padding: 0 14px;
  font-weight: 700;
  line-height: 1;
  text-decoration: none;
  cursor: pointer;
}

.secondary-action[disabled] {
  cursor: not-allowed;
  opacity: 0.62;
}

.secondary-action:hover:not([disabled]) {
  border-color: var(--accent);
  background: var(--accent-soft);
}

.booking-actions .logout-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 36px;
  border: 1px solid var(--line);
  border-radius: 4px;
  background: #ffffff;
  color: var(--accent);
  padding: 0 14px;
  font-weight: 700;
  line-height: 1;
  text-decoration: none;
}

.booking-actions .logout-button:hover {
  border-color: var(--accent);
  background: var(--accent-soft);
}

.title-row,
.section-head,
.criteria-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.eyebrow {
  margin: 0 0 6px;
  color: var(--accent);
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0;
  text-transform: uppercase;
}

h1,
h2 {
  margin: 0;
  letter-spacing: 0;
}

h1 {
  max-width: 920px;
  color: var(--navy);
  font-size: clamp(1.8rem, 3vw, 2.8rem);
  font-weight: 700;
  line-height: 1.22;
}

.login-role-panel h1,
.auth-panel h1,
.community-panel h1,
.admin-panel h1 {
  max-width: 980px;
  font-size: clamp(2rem, 3.2vw, 3rem);
  line-height: 1.22;
}

h2 {
  color: var(--navy);
  font-size: 1.35rem;
  font-weight: 700;
}

.status-pill,
.result-count {
  display: inline-flex;
  align-items: center;
  min-height: 32px;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 0 12px;
  color: var(--muted);
  font-size: 0.9rem;
  white-space: nowrap;
}

form {
  display: grid;
  gap: 16px;
  margin-top: 34px;
}

.field-label {
  color: var(--navy);
  font-weight: 700;
}

.text-input {
  width: 100%;
  min-height: 48px;
  border: 1px solid var(--line);
  border-radius: 4px;
  background: #ffffff;
  color: var(--ink);
  padding: 0 14px;
}

select.text-input {
  height: 48px;
}

.text-input:focus {
  border-color: var(--accent);
  outline: 3px solid rgba(31, 88, 222, 0.16);
}

.code-input {
  max-width: 180px;
  font-weight: 700;
  letter-spacing: 0;
}

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

.profile-menu {
  position: relative;
}

.profile-menu-toggle {
  display: grid;
  width: 44px;
  height: 44px;
  place-items: center;
  border: 2px solid var(--accent);
  border-radius: 50%;
  padding: 0;
  background: var(--accent-soft);
  color: var(--accent);
  cursor: pointer;
}

.profile-menu-toggle svg {
  width: 25px;
  height: 25px;
  overflow: visible;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.8;
}

.profile-menu-toggle:hover,
.profile-menu-toggle:focus-visible {
  background: var(--accent);
  color: white;
  outline: 3px solid rgba(31, 88, 222, 0.18);
}

.profile-menu-popover {
  position: absolute;
  z-index: 900;
  top: calc(100% + 10px);
  right: 0;
  display: grid;
  width: 210px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: white;
  box-shadow: 0 18px 44px rgba(1, 27, 70, 0.2);
}

.profile-menu-popover a,
.profile-menu-popover button {
  display: flex;
  align-items: center;
  min-height: 44px;
  width: 100%;
  border: 0;
  border-bottom: 1px solid var(--line);
  padding: 0 16px;
  background: white;
  color: var(--ink);
  font: inherit;
  font-weight: 700;
  text-align: left;
  text-decoration: none;
  cursor: pointer;
}

.profile-menu-popover > :last-child {
  border-bottom: 0;
  color: var(--rose);
}

.profile-menu-popover a:hover,
.profile-menu-popover a:focus-visible,
.profile-menu-popover button:hover,
.profile-menu-popover button:focus-visible {
  background: var(--accent-soft);
  outline: none;
}

.logout-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 36px;
  border: 1px solid var(--line);
  border-radius: 4px;
  background: #ffffff;
  color: var(--accent);
  padding: 0 14px;
  font-weight: 700;
  line-height: 1;
  text-decoration: none;
  cursor: pointer;
}

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

.danger-button {
  border-color: #f0b4a8;
  color: #b83224;
}

.danger-button:hover {
  border-color: #b83224;
  background: #fff1ef;
}

.drop-zone {
  display: grid;
  grid-template-columns: 52px 1fr;
  gap: 16px;
  align-items: center;
  min-height: 112px;
  border: 1px dashed var(--line);
  border-radius: 4px;
  padding: 20px;
  background: #ffffff;
  cursor: pointer;
}

.drop-zone:hover {
  border-color: var(--accent);
  background: var(--accent-soft);
}

.drop-zone input {
  position: absolute;
  inline-size: 1px;
  block-size: 1px;
  opacity: 0;
}

.compact-drop-zone {
  min-height: 78px;
  grid-template-columns: 44px minmax(0, 1fr);
  padding: 14px;
}

.compact-drop-zone .drop-icon {
  width: 44px;
  height: 44px;
  font-size: 1.2rem;
}

.drop-icon {
  display: grid;
  place-items: center;
  width: 52px;
  height: 52px;
  border-radius: 4px;
  background: var(--accent);
  color: white;
  font-size: 1.5rem;
  font-weight: 700;
}

.drop-copy {
  display: grid;
  gap: 4px;
}

.drop-copy strong {
  font-size: 1.08rem;
  font-weight: 700;
}

.drop-copy small {
  color: var(--muted);
}

.criteria-head label {
  color: var(--navy);
  font-weight: 700;
}

.criteria-note {
  margin: -4px 0 0;
  color: var(--muted);
  font-size: 0.94rem;
}

.error-note {
  color: var(--rose);
}

.expert-group-field {
  display: grid;
  gap: 10px;
  border: 1px solid var(--line);
  border-radius: 4px;
  margin: 0;
  padding: 16px;
}

.expert-group-field legend {
  padding: 0 6px;
  color: var(--navy);
  font-weight: 700;
}

.expert-group-options {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 8px;
}

.check-option {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  min-height: 42px;
  border: 1px solid var(--line);
  border-radius: 4px;
  padding: 10px 12px;
  color: var(--ink);
  font-weight: 700;
  cursor: pointer;
}

.check-option:has(input:checked) {
  border-color: var(--accent);
  background: var(--accent-soft);
}

.check-option.is-disabled {
  background: #f8f9fd;
  color: var(--muted);
  cursor: not-allowed;
}

.check-option.is-readonly {
  border-color: var(--accent);
  background: var(--accent-soft);
  cursor: default;
}

.expert-group-invitation-message {
  margin: 8px 0 0;
  color: var(--ink);
  font-size: 0.92rem;
  font-weight: 500;
  white-space: pre-line;
}

.check-option small {
  margin-left: auto;
  color: var(--muted);
  font-size: 0.78rem;
}

.check-option input {
  width: 18px;
  height: 18px;
  margin: 2px 0 0;
  accent-color: var(--accent);
}

.admin-workspace,
.community-workspace {
  display: grid;
  gap: 22px;
  margin-top: 28px;
}

.admin-dashboard-view {
  display: grid;
  gap: 20px;
}

.admin-dashboard-heading,
.admin-metric-card-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
}

.admin-dashboard-heading h2,
.admin-metric-card h3 {
  margin: 0;
}

.admin-dashboard-description {
  margin: 7px 0 0;
  color: var(--muted);
  font-size: 0.92rem;
}

.admin-dashboard-range {
  display: grid;
  gap: 6px;
  color: var(--muted);
  font-size: 0.76rem;
  font-weight: 750;
  text-transform: uppercase;
  letter-spacing: 0.045em;
}

.admin-dashboard-range .text-input {
  width: auto;
  min-width: 130px;
  color: var(--ink);
  font-size: 0.88rem;
  font-weight: 650;
  text-transform: none;
  letter-spacing: 0;
}

.admin-dashboard-update {
  display: flex;
  align-items: center;
  gap: 8px;
  width: max-content;
  max-width: 100%;
  border: 1px solid #dce7df;
  border-radius: 999px;
  padding: 7px 11px;
  background: #f5fbf7;
}

.admin-dashboard-update .status-dot {
  position: static;
  flex: 0 0 auto;
  width: 7px;
  height: 7px;
  background: #22a979;
  box-shadow: 0 0 0 3px rgba(34, 169, 121, 0.12);
}

.admin-dashboard-update p {
  margin: 0;
  color: #39715d;
  font-size: 0.78rem;
  font-weight: 650;
}

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

.admin-metric-card {
  position: relative;
  min-width: 0;
  overflow: hidden;
  border-color: rgba(209, 218, 244, 0.9);
  border-radius: 8px;
  padding: 22px;
  box-shadow: 0 4px 14px rgba(20, 55, 115, 0.07);
}

.admin-metric-card::before {
  position: absolute;
  inset: 0 auto 0 0;
  width: 4px;
  background: var(--accent);
  content: "";
}

.admin-metric-card[data-metric="subscriptions"]::before {
  background: var(--chart-purple);
}

.admin-metric-card[data-metric="logins"]::before {
  background: var(--chart-blue);
}

.admin-metric-card:last-child {
  grid-column: 1 / -1;
}

.admin-metric-card-head strong {
  color: var(--accent);
  font-size: clamp(1.75rem, 4vw, 2.5rem);
  line-height: 1;
}

.admin-metric-card-head > div > p:last-child {
  margin: 6px 0 0;
  color: var(--muted);
  font-size: 0.78rem;
}

.admin-metric-card[data-metric="subscriptions"] .admin-metric-card-head strong {
  color: var(--chart-purple);
}

.admin-metric-card[data-metric="logins"] .admin-metric-card-head strong {
  color: #0789c2;
}

.admin-today-logins-card {
  border-color: rgba(209, 218, 244, 0.9);
  border-radius: 8px;
  padding: 22px;
  box-shadow: 0 4px 14px rgba(20, 55, 115, 0.07);
}

.admin-duplicate-contacts-card {
  border-color: rgba(209, 218, 244, 0.9);
  border-radius: 8px;
  padding: 22px;
  box-shadow: 0 4px 14px rgba(20, 55, 115, 0.07);
}

.admin-duplicate-contacts-card h3 { margin: 0; }
.admin-duplicate-contacts-card .admin-metric-card-head p:last-child { margin: 6px 0 0; color: var(--muted); font-size: 0.78rem; }
.admin-duplicate-contacts-table-wrap { margin-top: 18px; overflow-x: auto; border: 1px solid #e3e9f7; border-radius: 7px; }
.admin-duplicate-contacts-table { width: 100%; border-collapse: collapse; background: #fff; }
.admin-duplicate-contacts-table th,
.admin-duplicate-contacts-table td { padding: 12px 16px; border-bottom: 1px solid #e3e9f7; text-align: left; vertical-align: top; }
.admin-duplicate-contacts-table th { color: var(--muted); background: #f7f9fd; font-size: 0.74rem; text-transform: uppercase; letter-spacing: 0.035em; }
.admin-duplicate-contacts-table th:last-child,
.admin-duplicate-contacts-table td:last-child { width: 180px; text-align: right; }
.admin-duplicate-contacts-table tbody tr:last-child td { border-bottom: 0; }
.admin-duplicate-count { display: inline-flex; min-width: 34px; justify-content: center; padding: 3px 9px; border-radius: 999px; color: #fff; background: var(--accent); font-weight: 800; }
.admin-duplicate-contact-link { padding: 0; border: 0; color: var(--accent); background: transparent; font: inherit; font-weight: 750; text-align: left; text-decoration: underline; text-underline-offset: 3px; cursor: pointer; }
.admin-duplicate-contact-link:hover { color: var(--accent-dark); }
.admin-duplicate-contact-detail { border-color: rgba(209, 218, 244, 0.9); border-radius: 8px; padding: 22px; box-shadow: 0 4px 14px rgba(20, 55, 115, 0.07); }
.admin-duplicate-contact-detail-head { display: flex; align-items: flex-start; gap: 20px; }
.admin-duplicate-contact-detail-head h3 { margin: 2px 0 0; overflow-wrap: anywhere; }
.admin-duplicate-contact-instance-table-wrap { margin-top: 20px; overflow-x: auto; border: 1px solid #e3e9f7; border-radius: 7px; }
.admin-duplicate-contact-instance-table { width: 100%; border-collapse: collapse; background: #fff; }
.admin-duplicate-contact-instance-table th,
.admin-duplicate-contact-instance-table td { padding: 13px 15px; border-bottom: 1px solid #e3e9f7; text-align: left; vertical-align: middle; }
.admin-duplicate-contact-instance-table th { color: var(--muted); background: #f7f9fd; font-size: .72rem; text-transform: uppercase; letter-spacing: .035em; }
.admin-duplicate-contact-instance-table tbody tr:last-child td { border-bottom: 0; }
.admin-duplicate-contact-instance-table code { font-size: .76rem; overflow-wrap: anywhere; }
.admin-powerapps-record-link { display: inline-flex; align-items: center; gap: 7px; color: var(--accent); font-weight: 700; text-decoration: none; }
.admin-powerapps-record-link:hover { color: var(--accent-dark); text-decoration: underline; text-underline-offset: 3px; }
.admin-relation-indicator { display: inline-flex; align-items: center; gap: 6px; font-size: .82rem; font-weight: 750; }
.admin-relation-indicator > span { display: inline-grid; width: 22px; height: 22px; place-items: center; border-radius: 50%; }
.admin-relation-indicator.is-present { color: #177245; }
.admin-relation-indicator.is-present > span { color: #fff; background: #177245; }
.admin-relation-indicator.is-absent { color: var(--muted); }
.admin-relation-indicator.is-absent > span { background: #edf1f7; }
.admin-duplicate-merge-actions { display: flex; align-items: center; justify-content: space-between; gap: 18px; margin-top: 20px; }
.admin-duplicate-merge-actions p { margin: 0; }
.admin-duplicate-merge-status { display: inline-flex; align-items: center; min-width: max-content; color: var(--muted); font-size: .78rem; font-weight: 750; }
.admin-duplicate-merge-status.is-master { color: var(--accent); }
.admin-duplicate-merge-status.is-merging { color: #9a6700; }
.admin-duplicate-merge-status.is-merged { color: #177245; }
.admin-duplicate-merge-status.is-error { color: var(--rose); }
.admin-duplicate-merge-modal .modal-panel { max-width: 620px; }

@media (max-width: 640px) {
  .admin-duplicate-contact-detail-head { flex-direction: column; }
  .admin-duplicate-merge-actions { align-items: stretch; flex-direction: column; }
  .admin-duplicate-contacts-table thead { display: none; }
  .admin-duplicate-contacts-table,
  .admin-duplicate-contacts-table tbody,
  .admin-duplicate-contacts-table tr,
  .admin-duplicate-contacts-table td { display: block; width: 100%; }
  .admin-duplicate-contacts-table tr { padding: 8px 0; border-bottom: 1px solid #e3e9f7; }
  .admin-duplicate-contacts-table tbody tr:last-child { border-bottom: 0; }
  .admin-duplicate-contacts-table td,
  .admin-duplicate-contacts-table td:last-child { display: grid; grid-template-columns: 120px minmax(0, 1fr); gap: 10px; border: 0; padding: 6px 12px; text-align: left; }
  .admin-duplicate-contacts-table td::before { content: attr(data-label); color: var(--muted); font-size: 0.72rem; font-weight: 750; text-transform: uppercase; }
  .admin-duplicate-count { justify-self: start; }
  .admin-duplicate-contact-instance-table thead { display: none; }
  .admin-duplicate-contact-instance-table,
  .admin-duplicate-contact-instance-table tbody,
  .admin-duplicate-contact-instance-table tr,
  .admin-duplicate-contact-instance-table td { display: block; width: 100%; }
  .admin-duplicate-contact-instance-table tr { padding: 8px 0; border-bottom: 1px solid #e3e9f7; }
  .admin-duplicate-contact-instance-table td { display: grid; grid-template-columns: 115px minmax(0, 1fr); gap: 10px; border: 0; padding: 7px 12px; }
  .admin-duplicate-contact-instance-table td::before { content: attr(data-label); color: var(--muted); font-size: .7rem; font-weight: 750; text-transform: uppercase; }
}

.admin-dashboard-shell .admin-view.admin-market-monitor-validations-view {
  align-content: start;
  gap: 24px;
  padding: 0;
  background: transparent;
}

.admin-market-monitor-validation-hero,
.admin-market-monitor-validation-card {
  border: 1px solid rgba(209, 218, 244, 0.9);
  border-radius: 8px;
  background: #fff;
  box-shadow: var(--shadow);
}

.admin-market-monitor-validation-hero {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 28px;
  padding: 28px 30px;
}

.admin-market-monitor-validation-hero h2,
.admin-market-monitor-validation-card h3 {
  margin: 0;
}

.admin-market-monitor-validation-hero h2 {
  margin-top: 3px;
  font-size: clamp(1.45rem, 2vw, 1.9rem);
}

.admin-market-monitor-validation-hero p:last-child,
.admin-market-monitor-validation-card-head p {
  max-width: 720px;
  margin: 7px 0 0;
  color: var(--muted);
  line-height: 1.55;
}

.admin-market-monitor-validation-count {
  display: grid;
  flex: 0 0 auto;
  min-width: 150px;
  padding: 16px 20px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--page);
  text-align: center;
}

.admin-market-monitor-validation-count strong {
  color: var(--accent);
  font-size: 2rem;
}

.admin-market-monitor-validation-count span {
  color: var(--muted);
  font-size: 0.82rem;
}

.admin-market-monitor-validation-card {
  padding: 28px 30px 30px;
}

.admin-market-monitor-validation-card-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 24px;
}

.admin-market-monitor-validation-list {
  display: grid;
  gap: 0.75rem;
  margin-top: 24px;
}

.admin-market-monitor-validation-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 18px 20px;
  border: 1px solid var(--border-color, #dfe5e8);
  border-radius: 0.8rem;
  background: #fff;
}

.admin-market-monitor-validation-item > div {
  display: grid;
  gap: 0.2rem;
  min-width: 0;
}

.admin-market-monitor-validation-item strong,
.admin-market-monitor-validation-item span,
.admin-market-monitor-validation-item small {
  overflow-wrap: anywhere;
}

.admin-market-monitor-validation-item span,
.admin-market-monitor-validation-item small {
  color: var(--muted, #627078);
}

.admin-market-monitor-validation-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 0.75rem;
}

.admin-market-monitor-validation-actions [data-admin-market-monitor-sync-status].is-error {
  color: var(--danger, #b42318);
  font-weight: 650;
}

.admin-market-monitor-validation-actions [data-admin-market-monitor-sync-status].is-success {
  color: #177245;
  font-weight: 650;
}

[data-admin-sync-market-monitor-id] {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
}

.admin-market-monitor-sync-spinner {
  display: none;
  width: 0.85rem;
  height: 0.85rem;
  border: 2px solid currentColor;
  border-right-color: transparent;
  border-radius: 50%;
  animation: admin-market-monitor-sync-spin 0.7s linear infinite;
}

[data-admin-sync-market-monitor-id].is-loading .admin-market-monitor-sync-spinner {
  display: block;
}

@keyframes admin-market-monitor-sync-spin {
  to { transform: rotate(360deg); }
}

.market-monitor-validation-status {
  margin-right: auto;
  font-size: 0.86rem;
  font-weight: 600;
}

.market-monitor-validation-status.is-checked {
  color: #177245;
}

@media (max-width: 640px) {
  .admin-market-monitor-validation-hero,
  .admin-market-monitor-validation-card-head {
    align-items: stretch;
    flex-direction: column;
  }

  .admin-market-monitor-validation-hero,
  .admin-market-monitor-validation-card {
    padding: 20px;
  }

  .admin-market-monitor-validation-count {
    width: 100%;
  }

  .admin-market-monitor-validation-item {
    align-items: stretch;
    flex-direction: column;
  }

  .admin-market-monitor-validation-actions {
    justify-content: space-between;
  }
}

.admin-today-logins-card h3 {
  margin: 0;
}

.admin-today-logins-card .admin-metric-card-head > div > p:last-child {
  margin: 6px 0 0;
  color: var(--muted);
  font-size: 0.78rem;
}

.admin-today-logins-list {
  display: grid;
  gap: 0;
  margin-top: 18px;
  border: 1px solid #e3e9f7;
  border-radius: 7px;
  background: #fbfdff;
}

.admin-today-login-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 13px 16px;
}

.admin-today-login-item + .admin-today-login-item {
  border-top: 1px solid #e3e9f7;
}

.admin-today-login-item > div {
  display: grid;
  gap: 3px;
  min-width: 0;
}

.admin-today-login-item strong,
.admin-today-login-item span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.admin-today-login-item span,
.admin-today-login-item time {
  color: var(--muted);
  font-size: 0.8rem;
}

.admin-today-login-item time {
  flex: 0 0 auto;
  font-weight: 650;
}

.admin-chart-frame {
  margin-top: 18px;
  border: 1px solid #e3e9f7;
  border-radius: 7px;
  padding: 18px 18px 10px;
  background: linear-gradient(180deg, #fbfdff, #f7faff);
}

.admin-chart {
  min-height: 220px;
}

.admin-chart svg {
  display: block;
  width: 100%;
  height: auto;
  overflow: visible;
}

.admin-chart-grid {
  stroke: #d9e2e1;
  stroke-width: 1;
}

.admin-chart-grid.is-dashed {
  stroke-dasharray: 4 5;
}

.admin-chart-area {
  fill: rgba(31, 88, 222, 0.1);
}

.admin-chart-line {
  fill: none;
  stroke: var(--accent);
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 3;
}

.admin-metric-card[data-metric="subscriptions"] .admin-chart-line {
  stroke: var(--chart-purple);
}

.admin-metric-card[data-metric="subscriptions"] .admin-chart-area {
  fill: rgba(57, 12, 120, 0.09);
}

.admin-metric-card[data-metric="logins"] .admin-chart-line {
  stroke: var(--chart-blue);
}

.admin-metric-card[data-metric="logins"] .admin-chart-area {
  fill: rgba(2, 165, 234, 0.1);
}

.admin-chart-label {
  fill: var(--muted);
  font-family: inherit;
  font-size: 12px;
}

.admin-metric-card.is-unavailable .admin-chart,
.admin-metric-card.is-unavailable [data-metric-total] {
  opacity: 0.45;
}

.admin-metric-card.is-unavailable .admin-chart-frame {
  background: #f8f9fc;
}

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

  .admin-metric-card:last-child {
    grid-column: auto;
  }

  .admin-dashboard-heading {
    align-items: stretch;
    flex-direction: column;
  }

  .admin-dashboard-range {
    width: 100%;
  }

  .admin-dashboard-range .text-input {
    width: 100%;
  }

  .admin-chart-frame {
    padding: 12px 10px 6px;
  }
}

.community-dashboard-shell .community-workspace {
  grid-template-columns: minmax(0, 1fr);
  gap: 18px;
  margin-top: 0;
}

.dashboard-message {
  min-height: 22px;
  margin: 0;
}

.community-dashboard-shell .panel {
  padding: 24px;
}

.community-dashboard-shell .community-managed-groups {
  gap: 14px;
}

.community-dashboard-shell .community-users-manager {
  display: grid;
  gap: 16px;
}

.community-inbox {
  display: grid;
  gap: 16px;
}

.community-inbox-layout {
  display: grid;
  grid-template-columns: minmax(260px, 360px) minmax(0, 1fr);
  gap: 18px;
  min-height: 520px;
}

.community-inbox-list {
  display: grid;
  align-content: start;
  gap: 8px;
  min-width: 0;
  border-right: 1px solid var(--line);
  padding-right: 16px;
}

.community-inbox-item {
  display: grid;
  gap: 5px;
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 4px;
  background: white;
  color: var(--ink);
  padding: 12px;
  cursor: pointer;
  text-align: left;
}

.community-inbox-item:hover,
.community-inbox-item.is-active {
  border-color: rgba(31, 88, 222, 0.42);
  background: #f4f7ff;
}

.community-inbox-item.has-open-question {
  border-left: 4px solid var(--orange);
}

.community-inbox-item span,
.community-inbox-item time {
  min-width: 0;
  overflow: hidden;
  color: var(--muted);
  font-size: 0.84rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.community-inbox-item strong {
  min-width: 0;
  overflow: hidden;
  color: var(--ink);
  text-overflow: ellipsis;
  white-space: nowrap;
}

.community-inbox-item-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.community-inbox-item .community-inbox-preview {
  color: var(--ink);
}

.inbox-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 24px;
  height: 24px;
  border-radius: 999px;
  background: var(--orange);
  color: white !important;
  font-size: 0.78rem !important;
  font-weight: 700;
}

.community-inbox-thread {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
  min-width: 0;
  min-height: 0;
}

.compact-button {
  width: auto;
  min-height: 42px;
  padding: 10px 14px;
}

.inline-form {
  margin-top: 0;
}

.community-member-form {
  display: grid;
  gap: 14px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 4px;
  background: #ffffff;
  margin-bottom: 14px;
}

.community-member-form .event-form-actions {
  align-items: center;
}

.inline-control {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
}

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

.community-managed-groups {
  display: grid;
  gap: 12px;
}

.community-managed-groups .expert-group-picker {
  max-width: 360px;
  border-bottom: 0;
  padding-bottom: 0;
  margin: 4px 0 0;
}

.community-managed-groups .expert-group-picker label {
  color: var(--muted);
}

.community-managed-groups .expert-group-picker select {
  border-color: var(--line);
  background: #ffffff;
  color: var(--ink);
}

.admin-list-section {
  display: grid;
  gap: 12px;
  margin-top: 24px;
}

.admin-sync-log-section {
  border-top: 1px solid var(--line);
  padding-top: 20px;
}

.admin-sync-summary {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.admin-sync-summary span {
  border: 1px solid var(--line);
  border-radius: 4px;
  padding: 8px 10px;
  background: #ffffff;
  color: var(--muted);
  font-size: 0.88rem;
}

.admin-sync-summary strong {
  color: var(--ink);
  margin-right: 4px;
}

.admin-sync-log {
  display: grid;
  max-height: 420px;
  overflow: auto;
  gap: 8px;
  padding-right: 4px;
}

.admin-sync-log-item {
  display: grid;
  gap: 6px;
  border: 1px solid var(--line);
  border-left: 4px solid #6b7280;
  border-radius: 4px;
  padding: 10px 12px;
  background: #ffffff;
}

.admin-sync-log-item.is-warning {
  border-left-color: #b7791f;
}

.admin-sync-log-item.is-error {
  border-left-color: #c2410c;
}

.admin-sync-log-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  color: var(--muted);
  font-size: 0.82rem;
}

.admin-sync-log-item strong,
.admin-sync-log-item p {
  overflow-wrap: anywhere;
}

.admin-sync-log-item p {
  margin: 0;
  color: var(--muted);
  font-size: 0.88rem;
}

.admin-sync-log-item .admin-sync-log-details {
  color: var(--ink);
  font-weight: 600;
}

.admin-user-bulk-form {
  display: grid;
  gap: 12px;
}

.admin-user-create-form {
  margin-bottom: 20px;
}

.admin-user-create-form .inline-control {
  grid-template-columns: minmax(180px, 0.8fr) minmax(240px, 1.2fr) auto;
  align-items: stretch;
}

.admin-user-create-form input[type="file"] {
  min-width: 240px;
}

.admin-user-search {
  width: min(100%, 520px);
}

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

.admin-bulk-toolbar .text-input {
  width: min(100%, 320px);
}

.admin-list-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  border: 1px solid var(--line);
  border-radius: 4px;
  padding: 14px;
  background: #ffffff;
}

.admin-user-select {
  flex: 0 0 auto;
  width: 18px;
  height: 18px;
}

.admin-user-bulk-form .admin-list-item {
  text-align: left;
}

.admin-user-bulk-form .admin-list-main {
  flex: 1 1 auto;
  justify-items: start;
  text-align: left;
}

.admin-user-groups {
  color: var(--muted);
  font-size: 0.78rem !important;
  font-style: italic;
}

.admin-user-auto-apply {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.admin-user-auto-apply::before {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #98a2b3;
  content: '';
}

.admin-user-auto-apply.is-active::before {
  background: #16855b;
}

.admin-user-auto-apply.is-error::before {
  background: #c2413b;
}

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

.admin-user-pagination {
  justify-content: space-between;
}

.admin-user-page-buttons .logout-button {
  min-width: 40px;
  padding-inline: 10px;
}

.admin-user-page-buttons .logout-button.is-active {
  border-color: var(--ink);
  background: var(--ink);
  color: #ffffff;
}

.admin-list-item.is-inactive {
  background: #f8f9fd;
  color: var(--muted);
}

.admin-list-main {
  display: grid;
  gap: 12px;
  min-width: 0;
}

.admin-list-item strong {
  overflow-wrap: anywhere;
}

.admin-list-item span {
  color: var(--muted);
  font-size: 0.9rem;
}

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

.admin-row-actions .submit-button.compact-button {
  min-height: 42px;
  padding: 0 14px;
  color: #ffffff;
}

.admin-row-actions .submit-button.compact-button span {
  color: inherit;
}

.community-manager-row {
  display: grid;
  gap: 7px;
}

.community-manager-row > span,
.muted-inline {
  color: var(--muted);
  font-size: 0.9rem;
  font-weight: 700;
}

.community-manager-list {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}

.community-manager-tag {
  border-radius: 4px;
}

.community-user-remove-button {
  width: 42px;
  height: 42px;
  min-width: 42px;
  border: 1px solid color-mix(in srgb, var(--rose) 32%, var(--line));
  background: #fff7f8;
  color: var(--rose);
  font-size: 1.1rem;
}

.community-user-remove-button:hover,
.community-user-remove-button:focus-visible {
  border-color: var(--rose);
  background: #fff1ef;
  color: var(--rose);
}

.community-manager-tag small {
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 700;
}

.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 30;
  display: grid;
  place-items: center;
  padding: 20px;
  background: rgba(1, 27, 70, 0.34);
}

.modal-panel {
  width: min(520px, 100%);
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #ffffff;
  box-shadow: 0 18px 60px rgba(1, 27, 70, 0.24);
  padding: 24px;
}

.announcement-modal {
  align-items: start;
  overflow: auto;
}

.announcement-modal-panel {
  display: grid;
  gap: 18px;
  width: min(940px, 100%);
  max-height: calc(100vh - 40px);
  overflow: auto;
}

.announcement-modal .announcement-form,
.announcement-modal .event-form {
  border: 0;
  background: transparent;
  padding: 0;
  box-shadow: none;
}

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

.modal-head h2 {
  font-size: 1.25rem;
}

.assignment-detail-top-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
}

.assignment-top-back-button,
.assignment-top-apply-button {
  display: inline-flex;
  height: 42px;
  min-height: 42px;
  max-width: min(260px, 50vw);
  align-items: center;
  justify-content: center;
  border-radius: 4px;
  padding: 0 12px;
  font: inherit;
  font-size: 0.84rem;
  font-weight: 850;
  line-height: 1.2;
  text-align: center;
  cursor: pointer;
}

.assignment-top-back-button {
  display: none;
  border: 1px solid var(--line);
  background: #ffffff;
  color: var(--ink);
}

.assignment-detail-modal.is-application-page .assignment-top-back-button,
.assignment-detail-modal.is-professional-results-page .assignment-top-back-button {
  display: inline-flex;
}

.assignment-top-back-button:hover,
.assignment-top-back-button:focus-visible {
  border-color: var(--accent);
  background: var(--accent-soft);
  color: var(--accent);
  outline: none;
}

.assignment-top-apply-button {
  border: 1px solid var(--accent);
  background: var(--accent);
  color: #ffffff;
}

.assignment-top-apply-button:hover,
.assignment-top-apply-button:focus-visible {
  background: #1748b4;
  outline: none;
}

.assignment-top-apply-button:disabled {
  border-color: var(--line);
  background: #eef2f7;
  color: var(--muted);
  cursor: not-allowed;
}

.icon-button {
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  flex: 0 0 auto;
  border: 1px solid var(--line);
  border-radius: 4px;
  background: #ffffff;
  color: var(--muted);
  font-size: 1.25rem;
  font-weight: 700;
  cursor: pointer;
}

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

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

.tailored-cv-confirm-modal {
  z-index: 40;
}

.tailored-cv-confirm-modal .modal-panel {
  display: grid;
  gap: 20px;
}

.tailored-cv-confirm-modal p {
  margin: 0;
}

.tailored-cv-confirm-button.assignment-top-back-button {
  display: inline-flex;
}

.expert-group-decline-form {
  display: grid;
  gap: 12px;
  margin-top: 18px;
}

.expert-group-decline-form textarea {
  min-height: 128px;
  resize: vertical;
}

.danger-submit-button {
  border-color: var(--rose);
  background: var(--rose);
}

.danger-submit-button:hover,
.danger-submit-button:focus-visible {
  border-color: #9f2f3c;
  background: #9f2f3c;
}

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

.profile-panel .role-editor {
  grid-template-columns: 1fr;
}

.profile-panel form {
  margin-top: 20px;
}

.profile-intro {
  max-width: 680px;
  margin: 8px 0 0;
  color: var(--muted);
  line-height: 1.5;
}

.profile-form-layout {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 400px), 1fr));
  gap: 20px;
  align-items: start;
}

.profile-form-section {
  display: grid;
  gap: 18px;
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 22px;
  background: #f9fbff;
}

.profile-section-heading {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr);
  gap: 12px;
  align-items: start;
  border-bottom: 1px solid var(--line);
  padding-bottom: 16px;
}

.profile-section-icon {
  display: grid;
  width: 34px;
  height: 34px;
  place-items: center;
  border-radius: 50%;
  background: var(--accent);
  color: white;
  font-size: 0.86rem;
  font-weight: 800;
}

.profile-section-heading h3,
.profile-section-heading p {
  margin: 0;
}

.profile-section-heading h3 {
  color: var(--navy);
  font-size: 1.08rem;
}

.profile-section-heading p {
  margin-top: 5px;
  color: var(--muted);
  font-size: 0.86rem;
  line-height: 1.4;
}

.profile-form-section .profile-fields {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

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

.profile-form-actions {
  display: flex;
  justify-content: flex-end;
  grid-column: 1 / -1;
  border-top: 1px solid var(--line);
  padding-top: 18px;
}

.profile-panel .drop-zone {
  grid-template-columns: 44px 1fr;
  min-height: 92px;
  padding: 16px;
}

.profile-panel .drop-icon {
  width: 44px;
  height: 44px;
}

.profile-cv-actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
}

.profile-cv-actions .criteria-note {
  margin: 0;
}

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

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

.profile-fields[hidden],
.role-editor[hidden],
.criteria-note[hidden] {
  display: none;
}

.role-editor .criteria-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  grid-column: 1 / -1;
}

.compact-secondary-action {
  min-height: 32px;
  padding: 0 10px;
  font-size: 0.82rem;
  white-space: nowrap;
}

.editable-role-group {
  display: grid;
  align-content: start;
  gap: 12px;
  min-height: 132px;
  border: 1px solid var(--line);
  border-radius: 4px;
  background: #ffffff;
  padding: 14px;
}

.editable-role-head h2 {
  margin: 0;
  color: var(--navy);
  font-size: 0.96rem;
  font-weight: 700;
}

.editable-tags {
  display: flex;
  flex-wrap: wrap;
  align-content: flex-start;
  align-items: flex-start;
  gap: 8px;
  min-height: 36px;
}

.editable-tag {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  max-width: 100%;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #ffffff;
  color: var(--ink);
  padding: 6px 7px 6px 10px;
  font-size: 0.9rem;
  font-weight: 700;
  line-height: 1.2;
}

.editable-tag span {
  min-width: 0;
  overflow-wrap: anywhere;
}

.editable-tag-edit,
.editable-tag-remove {
  display: grid;
  place-items: center;
  min-width: 22px;
  height: 22px;
  border: 0;
  border-radius: 999px;
  background: var(--soft);
  font-weight: 700;
  cursor: pointer;
}

.editable-tag-edit {
  padding: 0 8px;
  color: var(--accent);
  font-size: 0.76rem;
}

.editable-tag-remove {
  width: 22px;
  color: var(--rose);
  font-size: 1rem;
}

.add-chip {
  display: inline-grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border: 1px dashed var(--accent);
  border-radius: 999px;
  background: var(--accent-soft);
  color: var(--accent);
  font-size: 1.15rem;
  font-weight: 800;
  cursor: pointer;
}

.input-chip {
  padding: 4px 10px;
}

.input-chip[hidden] {
  display: none;
}

.input-chip input {
  width: clamp(120px, 28vw, 220px);
  min-height: 26px;
  border: 0;
  outline: 0;
  color: var(--ink);
  background: transparent;
  font: inherit;
}

.input-chip input::placeholder {
  color: var(--muted);
}

.submit-button:focus,
.icon-button:focus,
.logout-button:focus,
.secondary-action:focus {
  border-color: var(--accent);
  outline: 3px solid rgba(31, 88, 222, 0.16);
  outline-offset: 2px;
}

.icon-button {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border: 1px solid var(--line);
  border-radius: 4px;
  background: white;
  color: var(--accent);
  font-size: 1.3rem;
  font-weight: 700;
  cursor: pointer;
}

.remove-button {
  color: var(--rose);
}

.submit-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 52px;
  border: 0;
  border-radius: 4px;
  background: var(--accent);
  color: white;
  padding: 0 26px;
  font-weight: 700;
  cursor: pointer;
  justify-self: start;
}

.submit-button:hover {
  background: var(--accent-dark);
}

.submit-button[disabled] {
  cursor: progress;
  opacity: 0.72;
}

.results-layout {
  display: grid;
  gap: 22px;
  margin-top: 24px;
}

.results-menu {
  display: grid;
  gap: 8px;
  align-content: start;
}

.expert-group-picker {
  display: grid;
  gap: 7px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.12);
  padding-bottom: 14px;
  margin-bottom: 6px;
}

.expert-group-picker label {
  color: var(--sidebar-muted);
  font-size: 0.78rem;
  font-weight: 800;
  text-transform: uppercase;
}

.expert-group-picker select {
  width: 100%;
  min-height: 40px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.1);
  color: white;
  padding: 0 10px;
  font: inherit;
  font-weight: 700;
}

.expert-group-picker select:disabled {
  color: var(--sidebar-muted);
  cursor: default;
  opacity: 1;
}

.expert-group-picker select:focus {
  border-color: rgba(255, 255, 255, 0.44);
  outline: 3px solid rgba(31, 88, 222, 0.38);
  outline-offset: 2px;
}

.expert-group-picker option {
  color: var(--ink);
}

.results-menu-item {
  display: grid;
  grid-template-columns: 28px minmax(0, 1fr);
  gap: 10px;
  align-items: center;
  min-height: 44px;
  border: 1px solid transparent;
  border-radius: 4px;
  background: transparent;
  color: var(--sidebar-muted);
  padding: 0 12px;
  font-weight: 700;
  cursor: pointer;
  text-align: left;
  text-decoration: none;
}

.results-menu-item:hover {
  border-color: rgba(255, 255, 255, 0.18);
  background: rgba(255, 255, 255, 0.08);
  color: white;
}

.results-menu-item:focus {
  border-color: rgba(255, 255, 255, 0.44);
  outline: 3px solid rgba(31, 88, 222, 0.38);
  outline-offset: 2px;
}

.results-menu-item.is-active {
  border-color: rgba(255, 255, 255, 0.18);
  background: var(--accent);
  color: white;
}

/* User dashboard navigation */
#dashboard-shell {
  grid-template-columns: 364px minmax(0, 1fr);
}

#dashboard-shell .dashboard-sidebar {
  grid-template-rows: auto minmax(0, 1fr);
  gap: 0;
  padding: 0;
  overflow: hidden;
  background: #082b62;
}

.user-sidebar-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 96px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  padding: 24px 20px;
}

#dashboard-shell .sidebar-brand {
  display: flex;
  width: 100%;
  flex-direction: column;
  align-items: flex-start;
  gap: 22px;
}

#dashboard-shell .dashboard-brand-logo {
  width: 336px;
  max-width: 100%;
  max-height: 213px;
  object-fit: contain;
}

#dashboard-shell .dashboard-brand-name {
  display: block;
  width: 100%;
  border-bottom: 1px solid rgba(255, 255, 255, 0.28);
  padding-bottom: 14px;
  color: #ffffff;
  font-size: 1.45rem;
  font-weight: 850;
  line-height: 1.2;
  letter-spacing: 0.02em;
  white-space: nowrap;
}

.sidebar-brand-mark {
  display: grid;
  width: 36px;
  height: 36px;
  flex: 0 0 auto;
  place-items: center;
  border-radius: 7px;
  background: linear-gradient(135deg, #67259d, #00a9ee);
  color: #fff !important;
  font-size: 0.72rem !important;
  font-weight: 900;
  box-shadow: 0 5px 14px rgba(0, 169, 238, 0.2);
}

#dashboard-shell .sidebar-brand-name {
  color: #fff;
  font-size: 0.84rem;
  font-weight: 850;
  line-height: 1.18;
  text-transform: uppercase;
}

#dashboard-shell .results-menu {
  display: block;
  overflow-y: auto;
  padding: 0 9px 16px;
  scrollbar-width: thin;
  scrollbar-color: rgba(255, 255, 255, 0.18) transparent;
}

#dashboard-shell .expert-group-picker {
  gap: 6px;
  margin: 10px 3px 12px;
  border: 1px solid rgba(255, 255, 255, 0.09);
  border-radius: 7px;
  padding: 10px;
  background: rgba(255, 255, 255, 0.045);
}

#dashboard-shell .expert-group-picker label {
  color: #7897be;
  font-size: 0.67rem;
  font-weight: 850;
  letter-spacing: 0.1em;
}

#dashboard-shell .expert-group-picker select {
  min-height: 42px;
  appearance: none;
  border-color: rgba(255, 255, 255, 0.14);
  border-radius: 5px;
  padding: 0 34px 0 11px;
  background-color: #123b73;
  background-image:
    linear-gradient(45deg, transparent 50%, #8eabd0 50%),
    linear-gradient(135deg, #8eabd0 50%, transparent 50%);
  background-position:
    calc(100% - 16px) 18px,
    calc(100% - 11px) 18px;
  background-repeat: no-repeat;
  background-size: 5px 5px, 5px 5px;
  color: #fff;
  font-size: 0.82rem;
  font-weight: 650;
}

#dashboard-shell .expert-group-picker select:hover {
  border-color: rgba(255, 255, 255, 0.26);
  background-color: #17457f;
}

.sidebar-section-title {
  margin: 15px 9px 6px;
  color: #6687b3;
  font-size: 0.67rem;
  font-weight: 900;
  letter-spacing: 0.13em;
  text-transform: uppercase;
}

#dashboard-shell .results-menu-item {
  grid-template-columns: 20px minmax(0, 1fr) auto;
  gap: 8px;
  min-height: 42px;
  width: 100%;
  margin: 1px 0;
  border-radius: 5px;
  padding: 0 11px;
  color: #b3c5df;
  font-size: 0.86rem;
  font-weight: 500;
}

#dashboard-shell .results-menu-item.is-active {
  border-color: rgba(255, 255, 255, 0.08);
  background: #2e61df;
  color: #fff;
  font-weight: 750;
  box-shadow: 0 4px 10px rgba(10, 28, 91, 0.22);
}

.menu-icon {
  color: #06b5ec;
  font-size: 1rem;
  font-weight: 850;
  text-align: center;
}

.menu-icon img {
  display: block;
  width: 16px;
  height: 16px;
  margin: 0 auto;
  object-fit: contain;
}

.results-menu-item.is-active .menu-icon { color: white; }
.menu-chevron { color: #7592b9; font-size: 0.9rem; }

.menu-count {
  display: inline-grid;
  min-width: 18px;
  height: 18px;
  place-items: center;
  border-radius: 10px;
  padding: 0 5px;
  background: #08a9df;
  color: white;
  font-size: 0.61rem;
  font-weight: 850;
}

.results-menu-item.is-active .menu-count { background: rgba(255, 255, 255, 0.25); }

.community-chat-panel {
  grid-column: 1 / -1;
  padding: 24px;
}

.community-events-panel {
  grid-column: 1 / -1;
  display: grid;
  gap: 18px;
  padding: 24px;
}

.community-announcements-panel {
  grid-column: 1 / -1;
  display: grid;
  gap: 18px;
  padding: 24px;
}

.knowledge-panel {
  grid-column: 1 / -1;
  display: grid;
  gap: 18px;
  padding: 24px;
}

.auto-apply-panel {
  grid-column: 1 / -1;
  display: grid;
  gap: 18px;
  padding: 24px;
}

/* Opdrachtenradar */
.auto-apply-panel {
  border: 0;
  background: transparent;
  box-shadow: none;
  padding: 0;
}

.auto-apply-panel > .section-head {
  border: 0;
  background: transparent;
  padding: 0 0 8px;
}

.auto-apply-panel > .section-head h2 {
  font-size: clamp(1.75rem, 2vw, 2.15rem);
}

.auto-apply-panel > .section-head .result-count {
  display: none;
}

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

.auto-apply-intro {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 16px;
  border: 1px solid rgba(31, 88, 222, 0.18);
  border-color: #dbe3ef;
  border-radius: 12px;
  background: #ffffff;
  padding: 22px 24px;
}

.auto-apply-intro-icon {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border-radius: 10px;
  background: linear-gradient(135deg, #202898, #245ce1);
  box-shadow: 0 8px 20px rgba(31, 88, 222, 0.2);
  color: #ffffff;
}

.auto-apply-intro-icon svg {
  width: 24px;
  height: 24px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.8;
}

.auto-apply-intro h3,
.auto-apply-create-bar strong {
  margin: 0;
  color: var(--navy);
}

.auto-apply-intro h3 {
  font-size: 1.05rem;
}

.auto-apply-intro .eyebrow {
  margin: 0 0 7px;
  color: var(--accent);
  font-size: 0.7rem;
  letter-spacing: 0.1em;
}

.auto-apply-intro p {
  max-width: 880px;
  margin: 7px 0 0;
  color: var(--muted);
  font-size: 0.9rem;
  line-height: 1.55;
}

.auto-apply-intro p:last-child {
  color: var(--muted);
}

.auto-apply-create-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #ffffff;
  padding: 18px 24px;
}

.auto-apply-create-bar > div:first-child {
  display: grid;
  gap: 3px;
}

.auto-apply-create-bar span {
  color: var(--muted);
  font-size: 0.86rem;
}

.auto-apply-create-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
}

.auto-apply-source {
  margin: 0;
  color: var(--muted);
  font-size: 0.84rem;
  font-weight: 700;
}

.auto-apply-card {
  display: grid;
  position: relative;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #ffffff;
  padding: 0;
  overflow: hidden;
  box-shadow: 0 4px 16px rgba(6, 38, 90, 0.05);
  transition: border-color 160ms ease, box-shadow 160ms ease;
}

.auto-apply-card:hover,
.auto-apply-card[open] {
  border-color: rgba(31, 88, 222, 0.28);
  box-shadow: 0 8px 24px rgba(6, 38, 90, 0.09);
}

.auto-apply-card-head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 14px 24px;
  cursor: pointer;
  list-style: none;
  padding: 20px 24px;
  background: #ffffff;
}

.auto-apply-card-head::-webkit-details-marker {
  display: none;
}

.auto-apply-card-head::before {
  display: none;
}

.auto-apply-card[open] .auto-apply-card-head::before {
  content: "-";
}

.auto-apply-card-head h3 {
  margin: 0;
  color: var(--navy);
  font-size: 1.08rem;
  line-height: 1.25;
}

.auto-apply-card-title-line {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 9px;
}

.auto-apply-card-title > p {
  margin: 7px 0 0;
  color: var(--muted);
  font-size: 0.82rem;
}

.auto-apply-active-status {
  border: 1px solid #fecaca;
  border-radius: 5px;
  padding: 3px 8px;
  background: #fff1f2;
  color: #b91c1c;
  font-size: 0.72rem;
  font-weight: 750;
}

.auto-apply-active-status.is-active {
  border-color: #bbf7d0;
  background: #f0fdf4;
  color: #15803d;
}

.auto-apply-card-meta {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  flex: 0 0 auto;
}

.auto-apply-edit-label,
.auto-apply-delete-button {
  min-height: 34px;
  border: 1px solid #dbe3ef;
  border-radius: 6px;
  padding: 0 14px;
  background: #f4f7fb;
  color: var(--navy);
  font: inherit;
  font-size: 0.78rem;
  line-height: 32px;
}

.auto-apply-edit-label {
  font-weight: 700;
}

.auto-apply-delete-button {
  position: static;
  width: auto;
  height: auto;
  border-color: #dbe3ef;
  color: #dc2626;
  cursor: pointer;
}

.auto-apply-card-summary {
  display: grid;
  grid-column: 1 / -1;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 18px;
  margin: 0;
  border-top: 1px solid #e2e8f0;
  padding-top: 16px;
}

.auto-apply-card-summary div {
  min-width: 0;
}

.auto-apply-card-summary dt {
  margin-bottom: 7px;
  color: #718096;
  font-size: 0.67rem;
  font-weight: 850;
  letter-spacing: 0.09em;
  text-transform: uppercase;
}

.auto-apply-card-summary dd {
  margin: 0;
  overflow-wrap: anywhere;
  color: var(--navy);
  font-size: 0.82rem;
  font-weight: 650;
}

.auto-apply-delete-button:hover,
.auto-apply-delete-button:focus-visible {
  border-color: #be123c;
  background: #fff1f2;
  outline: none;
}

.auto-apply-delete-button:disabled {
  border-color: var(--line);
  background: #f1f5f9;
  color: var(--muted);
  cursor: wait;
}

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

.auto-apply-basic-fields {
  grid-template-columns: minmax(0, 1fr);
}

.auto-apply-field {
  display: grid;
  gap: 7px;
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 4px;
  background: #f9fbff;
  padding: 10px 12px;
}

.auto-apply-field > span,
.auto-apply-field-label > span:first-child {
  color: var(--muted);
  font-size: 0.75rem;
  font-weight: 800;
  text-transform: uppercase;
}

.auto-apply-field-label {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-width: 0;
}

.info-dot {
  display: inline-grid;
  place-items: center;
  width: 17px;
  height: 17px;
  border: 1px solid rgba(31, 88, 222, 0.28);
  border-radius: 50%;
  background: #ffffff;
  color: var(--accent);
  font-size: 0.72rem;
  font-weight: 900;
  line-height: 1;
  text-transform: none;
  cursor: help;
}

.info-dot:focus-visible {
  outline: 2px solid rgba(31, 88, 222, 0.18);
  outline-offset: 2px;
}

.auto-apply-field input {
  width: 100%;
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 4px;
  background: #ffffff;
  color: var(--ink);
  font: inherit;
  font-size: 0.95rem;
  font-weight: 700;
  padding: 9px 10px;
}

.auto-apply-field input:focus {
  border-color: var(--accent);
  outline: 2px solid rgba(33, 118, 255, 0.16);
  outline-offset: 1px;
}

.auto-apply-checkbox-field {
  align-items: center;
  display: flex;
  flex-direction: row;
  gap: 12px;
  border: 1px solid rgba(31, 88, 222, 0.2);
  border-radius: 8px;
  background: var(--accent-soft);
  cursor: pointer;
  padding: 13px 14px;
}

.auto-apply-checkbox-field input[type="checkbox"] {
  accent-color: var(--accent);
  height: 1.1rem;
  margin: 0;
  width: 1.1rem;
  flex: 0 0 auto;
}

.auto-apply-checkbox-field > span {
  display: grid;
  gap: 3px;
}

.auto-apply-checkbox-field strong {
  color: var(--navy);
  font-size: 0.9rem;
}

.auto-apply-checkbox-field small {
  color: var(--muted);
  font-size: 0.8rem;
  line-height: 1.35;
}

.auto-apply-slider-field,
.auto-apply-hours-field {
  gap: 12px;
}

.auto-apply-field-head,
.auto-apply-slider-control {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.auto-apply-field-head strong,
.auto-apply-slider-control output {
  min-width: 54px;
  border: 1px solid var(--line);
  border-radius: 4px;
  background: #ffffff;
  color: var(--navy);
  font-size: 0.88rem;
  font-weight: 800;
  line-height: 1;
  padding: 8px 9px;
  text-align: center;
}

.auto-apply-slider-control input[type="range"] {
  min-width: 0;
  height: 28px;
  border: 0;
  background: transparent;
  padding: 0;
  accent-color: var(--accent);
}

.auto-apply-slider-control input[type="range"]:focus {
  outline: 2px solid rgba(31, 88, 222, 0.16);
  outline-offset: 2px;
}

.auto-apply-slider-control {
  display: grid;
  grid-template-columns: minmax(120px, 1fr) auto;
}

.auto-apply-dual-range {
  position: relative;
  height: 28px;
  border-radius: 999px;
  background:
    linear-gradient(
      90deg,
      transparent 0,
      transparent 100%
    );
}

.auto-apply-dual-range::before {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  top: 50%;
  height: 8px;
  border-radius: 999px;
  background:
    linear-gradient(
      90deg,
      #dbe4f8 0%,
      #dbe4f8 var(--min-percent),
      var(--accent) var(--min-percent),
      var(--accent) var(--max-percent),
      #dbe4f8 var(--max-percent),
      #dbe4f8 100%
    );
  transform: translateY(-50%);
}

.auto-apply-dual-range input[type="range"] {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 28px;
  border: 0;
  background: transparent;
  margin: 0;
  padding: 0;
  pointer-events: none;
  -webkit-appearance: none;
  appearance: none;
}

.auto-apply-dual-range input[type="range"]:focus {
  outline: 2px solid rgba(31, 88, 222, 0.16);
  outline-offset: 3px;
}

.auto-apply-dual-range input[type="range"]::-webkit-slider-runnable-track {
  height: 28px;
  background: transparent;
}

.auto-apply-dual-range input[type="range"]::-moz-range-track {
  height: 28px;
  background: transparent;
}

.auto-apply-dual-range input[type="range"]::-webkit-slider-thumb {
  width: 18px;
  height: 18px;
  border: 2px solid #ffffff;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 2px 7px rgba(6, 38, 90, 0.22);
  cursor: pointer;
  pointer-events: auto;
  -webkit-appearance: none;
  appearance: none;
}

.auto-apply-dual-range input[type="range"]::-moz-range-thumb {
  width: 18px;
  height: 18px;
  border: 2px solid #ffffff;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 2px 7px rgba(6, 38, 90, 0.22);
  cursor: pointer;
  pointer-events: auto;
}

.auto-apply-form {
  display: grid;
  gap: 16px;
  border-top: 1px solid var(--line);
  background: #f7f9fd;
  padding: 20px;
}

.auto-apply-editor-section,
.auto-apply-filters {
  display: grid;
  gap: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
  padding: 18px;
}

.auto-apply-editor-section-head {
  display: flex;
  align-items: flex-start;
  gap: 11px;
}

.auto-apply-editor-step {
  display: inline-grid;
  place-items: center;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: var(--accent-soft);
  color: var(--accent);
  flex: 0 0 auto;
  font-size: 0.78rem;
  font-weight: 900;
}

.auto-apply-editor-section-head h4 {
  margin: 2px 0 0;
  color: var(--navy);
  font-size: 0.98rem;
}

.auto-apply-editor-section-head p {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 0.82rem;
  line-height: 1.4;
}

.auto-apply-filters {
  gap: 14px;
}

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

.auto-apply-filters-head h4 {
  margin: 0;
  color: var(--navy);
  font-size: 1rem;
}

.auto-apply-actions {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
  padding: 12px 14px;
}

.auto-apply-action-statuses {
  display: grid;
  gap: 2px;
  margin-right: auto;
}

.auto-apply-match-button,
.auto-apply-create-actions .secondary-button,
.auto-apply-actions .secondary-button {
  min-height: 38px;
  border: 1px solid var(--line);
  border-radius: 4px;
  font: inherit;
  font-size: 0.86rem;
  font-weight: 850;
  cursor: pointer;
  transition:
    background-color 160ms ease,
    border-color 160ms ease,
    color 160ms ease,
    transform 160ms ease,
    box-shadow 160ms ease;
}

.auto-apply-match-button,
.auto-apply-create-actions .secondary-button {
  align-items: center;
  background: #ffffff;
  color: var(--accent);
  display: inline-flex;
  gap: 8px;
  justify-content: center;
  padding: 0 14px;
}

.auto-apply-actions .secondary-button {
  border-color: var(--accent);
  background: var(--accent);
  color: #ffffff;
  padding: 0 18px;
  box-shadow: 0 8px 18px rgba(31, 88, 222, 0.18);
}

.auto-apply-match-button:hover,
.auto-apply-create-actions .secondary-button:hover {
  border-color: var(--accent);
  background: var(--accent-soft);
}

.auto-apply-actions .secondary-button:hover {
  background: var(--accent-dark);
  border-color: var(--accent-dark);
  box-shadow: 0 10px 22px rgba(22, 70, 180, 0.22);
}

.auto-apply-match-button:focus-visible,
.auto-apply-create-actions .secondary-button:focus-visible,
.auto-apply-actions .secondary-button:focus-visible {
  outline: 3px solid rgba(31, 88, 222, 0.18);
  outline-offset: 2px;
}

.auto-apply-match-button:active,
.auto-apply-create-actions .secondary-button:active,
.auto-apply-actions .secondary-button:active {
  transform: translateY(1px);
}

.auto-apply-match-button:disabled,
.auto-apply-create-actions .secondary-button:disabled,
.auto-apply-actions .secondary-button:disabled {
  border-color: var(--line);
  background: #dbe4f8;
  color: var(--muted);
  cursor: wait;
  box-shadow: none;
}

.auto-apply-button-spinner {
  display: none;
  width: 16px;
  height: 16px;
  border: 2px solid rgba(31, 88, 222, 0.24);
  border-top-color: var(--accent);
}

.auto-apply-match-button.is-loading .auto-apply-button-spinner {
  display: inline-block;
}

.auto-apply-loading-state .spinner {
  border-color: rgba(31, 88, 222, 0.22);
  border-top-color: var(--accent);
}

.auto-apply-match-status {
  color: var(--muted);
  font-size: 0.84rem;
  font-weight: 800;
  min-width: 84px;
}

.auto-apply-matches {
  display: grid;
  gap: 12px;
}

.auto-apply-match-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  border-top: 1px solid var(--line);
  padding-top: 14px;
}

.auto-apply-match-head h4 {
  margin: 0;
  color: var(--navy);
  font-size: 1rem;
}

.auto-apply-match-head span {
  color: var(--muted);
  font-size: 0.84rem;
  font-weight: 800;
  text-align: right;
}

.auto-apply-match-list {
  display: grid;
  gap: 10px;
}

.auto-apply-match-list .matching-assignment-card.is-excluded {
  border-color: #dce4ef;
  background: #f8fafc;
  opacity: 0.82;
}

.auto-apply-filter-summary {
  display: grid;
  gap: 6px;
  border: 1px solid var(--line);
  border-radius: 4px;
  background: #f8fafc;
  padding: 10px 12px;
}

.auto-apply-filter-summary p {
  margin: 0;
  color: var(--muted);
  font-size: 0.84rem;
  line-height: 1.4;
}

.auto-apply-filter-summary strong {
  color: var(--navy);
}

.auto-apply-excluded-results {
  display: grid;
  gap: 10px;
  border: 1px solid var(--line);
  border-radius: 4px;
  background: #f8fafc;
  padding: 0;
}

.auto-apply-excluded-results summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  color: var(--navy);
  cursor: pointer;
  font-size: 0.9rem;
  font-weight: 850;
  list-style: none;
  padding: 12px 14px;
}

.auto-apply-excluded-results summary::-webkit-details-marker {
  display: none;
}

.auto-apply-excluded-results summary::before {
  content: "+";
  display: inline-grid;
  place-items: center;
  width: 22px;
  height: 22px;
  border: 1px solid var(--line);
  border-radius: 4px;
  background: #ffffff;
  color: var(--accent);
  flex: 0 0 auto;
}

.auto-apply-excluded-results[open] summary::before {
  content: "-";
}

.auto-apply-excluded-results summary span {
  flex: 1 1 auto;
}

.auto-apply-excluded-results summary strong {
  color: var(--muted);
  font-size: 0.82rem;
}

.auto-apply-excluded-results .auto-apply-match-list {
  padding: 0 12px 12px;
}

.auto-apply-assignment-card {
  display: grid;
  gap: 10px;
  border: 1px solid var(--line);
  border-left: 4px solid var(--accent);
  border-radius: 4px;
  background: #ffffff;
  padding: 13px 14px;
  cursor: pointer;
  transition: border-color 160ms ease, box-shadow 160ms ease, transform 160ms ease;
}

.auto-apply-assignment-card.is-excluded {
  border-left-color: #94a3b8;
  background: #f8fafc;
}

.auto-apply-assignment-card:hover,
.auto-apply-assignment-card:focus-visible {
  border-color: rgba(31, 88, 222, 0.36);
  box-shadow: 0 10px 22px rgba(24, 34, 48, 0.08);
  transform: translateY(-1px);
  outline: none;
}

.auto-apply-assignment-card h5 {
  margin: 0;
  color: var(--navy);
  font-size: 0.98rem;
  line-height: 1.25;
}

.auto-apply-assignment-card p {
  margin: 5px 0 0;
  color: var(--muted);
  font-size: 0.86rem;
  font-weight: 700;
  line-height: 1.4;
}

.auto-apply-assignment-head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  align-items: start;
  min-width: 0;
}

.auto-apply-assignment-visual {
  display: grid;
  justify-items: end;
  gap: 8px;
  min-width: 0;
}

.auto-apply-filter-list {
  display: flex;
  flex-wrap: wrap;
  align-content: flex-start;
  align-items: flex-start;
  gap: 8px;
}

.auto-apply-shared-location {
  display: grid;
  grid-template-columns: minmax(180px, 1fr) minmax(110px, 180px);
  gap: 8px;
  border: 1px solid var(--line);
  border-radius: 4px;
  background: #f9fbff;
  padding: 12px;
}

.auto-apply-shared-location label {
  display: grid;
  gap: 6px;
  min-width: 0;
}

.auto-apply-shared-location span {
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 800;
  text-transform: uppercase;
}

.auto-apply-shared-location input {
  width: 100%;
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 4px;
  background: #ffffff;
  color: var(--ink);
  font: inherit;
  font-size: 0.9rem;
  font-weight: 700;
  padding: 9px 10px;
}

.auto-apply-shared-location input:focus {
  border-color: var(--accent);
  outline: 2px solid rgba(31, 88, 222, 0.16);
  outline-offset: 1px;
}

.auto-apply-shared-radius {
  display: grid;
  gap: 10px;
  min-width: 0;
}

.auto-apply-shared-radius input[type="range"] {
  width: 100%;
  min-width: 0;
  height: 28px;
  border: 0;
  background: transparent;
  padding: 0;
  accent-color: var(--accent);
}

.auto-apply-shared-radius input[type="range"]:focus {
  outline: 2px solid rgba(31, 88, 222, 0.16);
  outline-offset: 2px;
}

.auto-apply-filter-row.input-chip {
  min-height: 34px;
}

.auto-apply-filter-row.input-chip input {
  width: clamp(150px, 28vw, 260px);
}

.auto-apply-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 12px;
}

.section-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 12px;
  flex-wrap: wrap;
}

.auto-apply-save-status {
  min-height: 1.2em;
  color: var(--muted);
  font-size: 0.84rem;
  font-weight: 700;
}

.community-events-manager,
.community-announcements-manager,
.community-assignments-manager,
.knowledge-manager {
  display: grid;
  gap: 16px;
}

.event-form,
.community-assignment-search-form,
.announcement-form {
  display: grid;
  gap: 14px;
  margin-top: 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  background:
    linear-gradient(180deg, #ffffff 0, #f9fbff 100%);
  padding: 18px;
  box-shadow: 0 8px 24px rgba(6, 38, 90, 0.06);
}

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

.event-form textarea {
  min-height: 112px;
  padding-top: 12px;
  resize: vertical;
}

.community-assignment-search-form textarea {
  min-height: 132px;
  padding-top: 12px;
  resize: vertical;
}

.community-assignment-search-form .secondary-button {
  align-self: stretch;
  border: 1px solid var(--line);
  border-radius: 4px;
  background: #ffffff;
  color: var(--accent);
  cursor: pointer;
  font-weight: 800;
  padding: 10px 14px;
}

.community-assignment-search-form .secondary-button:hover,
.community-assignment-search-form .secondary-button:focus-visible {
  border-color: var(--accent);
  outline: none;
}

.wysiwyg-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  border: 1px solid var(--line);
  border-bottom: 0;
  border-radius: 8px 8px 0 0;
  background: #eef4ff;
  padding: 8px;
}

.wysiwyg-toolbar .icon-button {
  min-width: 38px;
  height: 38px;
  padding: 0 10px;
  border-color: transparent;
  background: transparent;
  color: var(--ink);
  font-size: 0.98rem;
  box-shadow: none;
}

.wysiwyg-toolbar .icon-button:hover,
.wysiwyg-toolbar .icon-button:focus-visible {
  border-color: rgba(31, 88, 222, 0.26);
  background: #ffffff;
  color: var(--accent);
}

.wysiwyg-select {
  min-width: 138px;
  height: 38px;
  border: 1px solid rgba(31, 88, 222, 0.16);
  border-radius: 6px;
  background: #ffffff;
  color: var(--ink);
  font: inherit;
  font-size: 0.92rem;
  font-weight: 700;
  padding: 0 32px 0 10px;
}

.toolbar-divider {
  width: 1px;
  height: 28px;
  background: rgba(94, 115, 156, 0.28);
}

.wysiwyg-editor {
  min-height: 240px;
  max-height: 420px;
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: 0 0 8px 8px;
  background: #ffffff;
  color: var(--ink);
  padding: 18px 20px;
  line-height: 1.6;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.9);
}

.wysiwyg-editor:empty::before {
  color: var(--muted);
  content: attr(data-placeholder);
  pointer-events: none;
}

.wysiwyg-editor:focus {
  border-color: var(--accent);
  outline: 3px solid rgba(31, 88, 222, 0.14);
  outline-offset: 0;
}

.cms-edit-button {
  border: 1px solid rgba(255, 255, 255, 0.7);
  border-radius: 999px;
  padding: 0.65rem 1rem;
  background: #fff;
  color: #17352d;
  font: inherit;
  font-weight: 700;
  cursor: pointer;
}

.cms-management-actions {
  display: flex;
  gap: 0.65rem;
  margin-left: auto;
  flex-wrap: wrap;
}

.cms-management-actions[hidden] {
  display: none;
}

.cms-modal-panel {
  width: min(880px, calc(100vw - 2rem));
  max-height: calc(100vh - 2rem);
  overflow: auto;
}

.cms-editor-list > h3 {
  margin: 1.5rem 0 0.75rem;
}

.cms-editor-card {
  margin-bottom: 1rem;
  padding: 1rem;
  border: 1px solid #dce5e1;
  border-radius: 12px;
  background: #f9fbfa;
}

.cms-editor-card > label {
  display: block;
  margin-bottom: 0.55rem;
  font-weight: 700;
}

.cms-wysiwyg-editor {
  min-height: 90px;
  background: #fff;
}

.wysiwyg-editor h2,
.wysiwyg-editor h3,
.announcement-body h2,
.announcement-body h3 {
  margin: 0.85em 0 0.35em;
  line-height: 1.2;
}

.wysiwyg-editor h2,
.announcement-body h2 {
  font-size: 1.32rem;
}

.wysiwyg-editor h3,
.announcement-body h3 {
  font-size: 1.08rem;
}

.wysiwyg-editor blockquote,
.announcement-body blockquote {
  margin: 12px 0;
  border-left: 4px solid var(--accent);
  border-radius: 0 6px 6px 0;
  padding: 10px 14px;
  background: var(--accent-soft);
  color: var(--ink);
}

.wysiwyg-editor ul,
.wysiwyg-editor ol,
.announcement-body ul,
.announcement-body ol {
  padding-left: 24px;
}

.wysiwyg-editor figure,
.announcement-body figure {
  margin: 16px 0;
}

.wysiwyg-editor img,
.announcement-body img,
.wysiwyg-editor video,
.announcement-body video,
.wysiwyg-editor iframe,
.announcement-body iframe {
  display: block;
  width: 100%;
  max-width: 760px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f5f9ff;
  box-shadow: 0 10px 28px rgba(6, 38, 90, 0.08);
}

.wysiwyg-editor img,
.announcement-body img {
  height: auto;
}

.wysiwyg-editor video,
.announcement-body video,
.wysiwyg-editor iframe,
.announcement-body iframe {
  aspect-ratio: 16 / 9;
  height: min(52vw, 428px);
  min-height: 220px;
}

.wysiwyg-editor video,
.announcement-body video {
  height: auto;
  min-height: 0;
}

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

.event-list-toolbar {
  display: flex;
  justify-content: flex-end;
}

.calendar-board {
  display: grid;
  gap: 10px;
  border: 1px solid var(--line);
  border-radius: 4px;
  background: #ffffff;
  padding: 16px;
}

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

.calendar-head h3 {
  margin: 0;
  color: var(--navy);
  font-size: 1.05rem;
}

.calendar-head span {
  color: var(--muted);
  font-size: 0.9rem;
  font-weight: 700;
}

.calendar-weekdays,
.calendar-grid {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 6px;
}

.calendar-weekdays span {
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 800;
  text-align: center;
  text-transform: uppercase;
}

.calendar-day {
  display: grid;
  align-content: start;
  gap: 6px;
  min-height: 104px;
  border: 1px solid var(--line);
  border-radius: 4px;
  background: #ffffff;
  padding: 8px;
}

.calendar-day.is-muted {
  background: #f7f9fe;
  color: var(--muted);
}

.calendar-day > span {
  color: var(--navy);
  font-size: 0.86rem;
  font-weight: 800;
}

.calendar-day strong,
.calendar-day small {
  display: block;
  min-width: 0;
  overflow: hidden;
  border-radius: 4px;
  background: var(--accent-soft);
  color: var(--accent);
  padding: 3px 5px;
  font-size: 0.72rem;
  line-height: 1.25;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.calendar-day small {
  background: #fff4ed;
  color: var(--orange);
  font-weight: 800;
}

.event-list,
.announcement-list {
  display: grid;
  gap: 10px;
}

.knowledge-toolbar {
  display: grid;
  grid-template-columns: minmax(280px, 460px) minmax(0, 1fr);
  gap: 14px;
  align-items: center;
  border: 1px solid rgba(209, 218, 244, 0.84);
  border-radius: 4px;
  background: #f8fbff;
  padding: 12px;
}

.knowledge-toolbar .criteria-note {
  margin: 0;
  text-align: right;
}

.knowledge-search {
  position: relative;
  display: block;
}

.knowledge-search span {
  position: absolute;
  z-index: 1;
  top: 50%;
  left: 14px;
  color: var(--accent);
  font-size: 1.05rem;
  font-weight: 800;
  transform: translateY(-50%);
}

.knowledge-search .text-input {
  min-height: 44px;
  padding-left: 40px;
}

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

.knowledge-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 14px;
  align-items: start;
  border: 1px solid var(--line);
  border-radius: 4px;
  background: #ffffff;
  padding: 16px;
  box-shadow: 0 8px 20px rgba(6, 38, 90, 0.04);
}

.knowledge-card:hover {
  border-color: rgba(31, 88, 222, 0.34);
  box-shadow: 0 12px 26px rgba(6, 38, 90, 0.08);
}

.knowledge-card-main {
  display: grid;
  gap: 10px;
  min-width: 0;
}

.knowledge-card-main h3 {
  margin: 0;
  color: var(--navy);
  font-size: 1.1rem;
  line-height: 1.25;
}

.knowledge-card-main p {
  margin: 0;
  color: var(--muted);
  line-height: 1.45;
}

.knowledge-body {
  min-width: 0;
  color: var(--ink);
}

.knowledge-body img,
.knowledge-body video,
.knowledge-body iframe {
  max-width: 100%;
}

.knowledge-meta,
.knowledge-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
}

.knowledge-meta {
  gap: 8px;
}

.knowledge-pill {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  border-radius: 999px;
  background: var(--accent-soft);
  color: var(--accent);
  padding: 3px 9px;
  font-size: 0.78rem;
  font-weight: 800;
  text-transform: capitalize;
}

.knowledge-source {
  display: inline-flex;
  align-items: center;
  color: var(--muted);
  font-size: 0.84rem;
  font-weight: 700;
}

.knowledge-tag {
  display: inline-flex;
  align-items: center;
  min-height: 22px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--muted);
  padding: 2px 8px;
  font-size: 0.76rem;
  font-weight: 700;
}

.knowledge-link {
  display: inline-flex;
  align-items: center;
  justify-self: start;
  min-height: 34px;
  border: 1px solid rgba(31, 88, 222, 0.24);
  border-radius: 4px;
  background: var(--accent-soft);
  color: var(--accent);
  padding: 0 12px;
  font-weight: 800;
  text-decoration: none;
}

.knowledge-link:hover {
  border-color: var(--accent);
  background: #e6efff;
  text-decoration: none;
}

.event-card {
  display: grid;
  grid-template-columns: 62px minmax(0, 1fr) auto;
  gap: 14px;
  align-items: start;
  border: 1px solid var(--line);
  border-radius: 4px;
  background: #ffffff;
  padding: 14px;
}

.event-card-selectable {
  cursor: pointer;
  transition:
    border-color 160ms ease,
    box-shadow 160ms ease,
    transform 160ms ease;
}

.event-card-selectable:hover,
.event-card-selectable:focus-visible,
.event-card-selectable.is-expanded {
  border-color: rgba(31, 88, 222, 0.36);
  box-shadow: 0 10px 22px rgba(24, 34, 48, 0.08);
}

.event-card-selectable:hover,
.event-card-selectable:focus-visible {
  transform: translateY(-1px);
  outline: none;
}

.event-date-badge {
  display: grid;
  place-items: center;
  min-height: 58px;
  border-radius: 4px;
  background: var(--navy);
  color: white;
  padding: 7px;
  text-align: center;
}

.event-date-badge strong {
  font-size: 1.25rem;
  line-height: 1;
}

.event-date-badge span {
  font-size: 0.72rem;
  font-weight: 800;
  text-transform: uppercase;
}

.event-card-main {
  display: grid;
  gap: 6px;
  min-width: 0;
}

.event-card-main h3 {
  margin: 0;
  color: var(--navy);
  font-size: 1.02rem;
  line-height: 1.25;
}

.event-card-main p,
.event-description {
  margin: 0;
  color: var(--muted);
  line-height: 1.45;
}

.event-description {
  color: var(--ink);
}

.event-details {
  display: grid;
  gap: 8px;
}

.announcement-card {
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr) auto;
  gap: 14px;
  align-items: start;
  border: 1px solid rgba(209, 218, 244, 0.94);
  border-radius: 8px;
  background: #ffffff;
  padding: 18px;
  box-shadow: 0 10px 28px rgba(6, 38, 90, 0.07);
}

.announcement-card .admin-row-actions {
  grid-column: 3;
}

.announcement-author-avatar,
.announcement-comment-avatar {
  display: inline-grid;
  place-items: center;
  flex: 0 0 auto;
  width: 44px;
  height: 44px;
  border: 1px solid #dfe7fb;
  border-radius: 999px;
  background: linear-gradient(180deg, #f8fbff 0%, #eef4ff 100%);
  color: var(--accent-dark);
  font-size: 0.78rem;
  font-weight: 800;
}

.announcement-card-main {
  display: grid;
  gap: 10px;
  min-width: 0;
}

.announcement-card-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.announcement-card-header div {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.announcement-card-header strong {
  color: var(--navy);
  line-height: 1.25;
}

.announcement-card-header span {
  color: var(--muted);
  font-size: 0.84rem;
  font-weight: 700;
  line-height: 1.35;
}

.announcement-card-main h3 {
  margin: 0;
  color: var(--navy);
  font-size: 1.18rem;
  line-height: 1.25;
}

.announcement-card-main > p {
  margin: 0;
  color: var(--muted);
  line-height: 1.45;
}

.announcement-body {
  border: 1px solid #edf2ff;
  border-radius: 8px;
  background: #fbfdff;
  color: var(--ink);
  line-height: 1.58;
  padding: 14px;
}

.announcement-body :first-child {
  margin-top: 0;
}

.announcement-body :last-child {
  margin-bottom: 0;
}

.announcement-body a {
  color: var(--accent);
  font-weight: 800;
}

.announcement-comments {
  display: grid;
  gap: 12px;
  border-top: 1px solid #e4ebfb;
  margin-top: 2px;
  padding-top: 14px;
}

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

.announcement-comments-head strong {
  color: var(--navy);
  font-size: 0.9rem;
}

.announcement-comments-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  min-height: 36px;
  border: 1px solid var(--line);
  border-radius: 4px;
  background: #ffffff;
  color: var(--accent);
  padding: 0 12px;
  font: inherit;
  font-size: 0.9rem;
  font-weight: 700;
  cursor: pointer;
}

.announcement-comments-toggle:hover,
.announcement-comments-toggle:focus-visible {
  border-color: var(--accent);
  background: var(--accent-soft);
  outline: none;
}

.announcement-comments-toggle span:last-child {
  color: var(--muted);
  font-size: 1.05rem;
  line-height: 1;
}

.announcement-comments-panel {
  display: grid;
  gap: 12px;
}

.announcement-comments-empty {
  margin: 0;
  color: var(--muted);
  font-size: 0.9rem;
  font-weight: 700;
}

.announcement-comment {
  display: flex;
  gap: 10px;
  align-items: flex-start;
}

.announcement-comment-avatar {
  width: 32px;
  height: 32px;
  font-size: 0.68rem;
}

.announcement-comment-main {
  display: grid;
  gap: 6px;
  min-width: 0;
  border: 1px solid #edf2ff;
  border-radius: 8px;
  background: #f8fbff;
  padding: 10px 12px;
}

.announcement-comment-main div {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: baseline;
}

.announcement-comment strong {
  color: var(--navy);
}

.announcement-comment span {
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 700;
}

.announcement-comment p {
  margin: 0;
  line-height: 1.45;
}

.announcement-comment-form {
  display: grid;
  gap: 9px;
  border: 1px solid #e4ebfb;
  border-radius: 8px;
  background: #ffffff;
  padding: 12px;
}

.announcement-comment-form textarea {
  min-height: 90px;
  resize: vertical;
  padding-top: 12px;
  line-height: 1.45;
}

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

.announcement-comment-actions .submit-button {
  min-height: 42px;
  padding: 0 18px;
}

.announcement-comment-status {
  color: var(--muted);
  font-size: 0.84rem;
  font-weight: 700;
}

.community-chat-layout {
  display: grid;
  grid-template-columns: minmax(220px, 280px) minmax(0, 1fr);
  gap: 18px;
  margin-top: 18px;
  min-height: 520px;
}

.community-manager-list {
  display: grid;
  align-content: start;
  gap: 8px;
  border-right: 1px solid var(--border);
  padding-right: 16px;
}

.community-manager-chat-item {
  display: grid;
  gap: 4px;
  width: 100%;
  border: 1px solid var(--border);
  border-radius: 4px;
  background: white;
  color: var(--ink);
  padding: 12px;
  cursor: pointer;
  text-align: left;
}

.community-manager-chat-item:hover,
.community-manager-chat-item.is-active {
  border-color: rgba(47, 111, 237, 0.42);
  background: #f4f7ff;
}

.community-manager-chat-item strong {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.community-manager-chat-item span {
  min-width: 0;
  overflow: hidden;
  color: var(--muted);
  font-size: 0.84rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.community-chat-thread {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
  min-width: 0;
  min-height: 0;
}

.community-chat-empty {
  border: 1px dashed var(--border);
  border-radius: 4px;
  color: var(--muted);
  padding: 18px;
  font-weight: 700;
}

.community-chat-messages {
  display: grid;
  align-content: start;
  gap: 12px;
  min-height: 260px;
  max-height: 420px;
  overflow-y: auto;
  padding: 4px 2px 16px;
}

.community-chat-message {
  display: flex;
}

.community-chat-message.is-own {
  justify-content: flex-end;
}

.community-chat-bubble {
  max-width: min(620px, 82%);
  border: 1px solid var(--border);
  border-radius: 8px;
  background: white;
  padding: 12px 14px;
}

.community-chat-message.is-own .community-chat-bubble {
  border-color: rgba(47, 111, 237, 0.36);
  background: #ecf3ff;
}

.community-chat-sender {
  display: block;
  margin-bottom: 6px;
  color: var(--ink);
  font-size: 0.82rem;
}

.community-chat-bubble p {
  margin: 0;
  line-height: 1.5;
}

.community-chat-bubble time {
  display: block;
  margin-top: 8px;
  color: var(--muted);
  font-size: 0.76rem;
  font-weight: 700;
}

.community-chat-form {
  display: grid;
  gap: 10px;
  border-top: 1px solid var(--border);
  padding-top: 16px;
}

.community-chat-form textarea {
  min-height: 112px;
  resize: vertical;
}

.sidebar-status {
  display: flex;
  align-items: center;
  gap: 9px;
  min-width: 0;
  border-top: 1px solid rgba(255, 255, 255, 0.12);
  padding-top: 18px;
  color: var(--sidebar-muted);
  font-size: 0.88rem;
  font-weight: 700;
}

.sidebar-status span:last-child {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.status-dot {
  width: 9px;
  height: 9px;
  flex: 0 0 auto;
  border-radius: 999px;
  background: #24b47e;
  box-shadow: 0 0 0 4px rgba(36, 180, 126, 0.16);
}

.monthly-chart-panel {
  padding: 24px;
}

.monthly-chart {
  display: grid;
  gap: 22px;
  margin-top: 18px;
}

.monthly-chart-subhead {
  margin-top: 26px;
  border-top: 1px solid var(--line);
  padding-top: 22px;
}

.monthly-chart-subhead h3 {
  margin: 0;
  color: var(--navy);
  font-size: 1.22rem;
  line-height: 1.2;
}

.monthly-metric {
  display: grid;
  gap: 10px;
}

.monthly-metric h3 {
  margin: 0;
  color: var(--navy);
  font-size: 0.98rem;
  font-weight: 700;
}

.monthly-metric-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.monthly-rate-legend {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px 12px;
  color: var(--muted);
  font-size: 0.76rem;
  font-weight: 700;
}

.monthly-rate-legend-item {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  white-space: nowrap;
}

.monthly-rate-legend-swatch {
  width: 10px;
  height: 10px;
  border-radius: 2px;
}

.monthly-rate-legend-swatch.is-rate-range {
  background: var(--chart-purple);
}

.monthly-rate-legend-swatch.is-rate-average {
  background: var(--chart-blue);
}

.monthly-rate-legend-swatch.is-assignment-total {
  background: var(--chart-purple);
}

.monthly-rate-legend-swatch.is-assignment-rate {
  background: var(--chart-blue);
}

.monthly-rate-candlestick {
  min-width: 0;
  overflow-x: auto;
  padding: 2px 0 0;
}

.monthly-rate-candlestick svg {
  display: block;
  width: 100%;
  min-width: 720px;
  height: auto;
}

.rate-grid-line {
  stroke: rgba(15, 23, 42, 0.11);
  stroke-width: 1;
}

.rate-axis-line {
  stroke: rgba(15, 23, 42, 0.28);
  stroke-width: 1.2;
}

.rate-axis-label {
  fill: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.rate-range-line,
.rate-range-cap {
  stroke: var(--chart-purple);
  stroke-width: 3;
  stroke-linecap: round;
}

.rate-average-body {
  fill: var(--chart-blue);
  stroke: var(--chart-purple);
  stroke-width: 1;
}

.rate-candle:hover .rate-range-line,
.rate-candle:hover .rate-range-cap {
  stroke: var(--chart-purple);
}

.rate-candle:hover .rate-average-body {
  fill: var(--chart-blue);
  stroke: var(--chart-purple);
}

.rate-month-label {
  fill: var(--muted);
  font-size: 12px;
  font-weight: 800;
  text-transform: capitalize;
}

.rate-year-label {
  fill: var(--muted);
  font-size: 11px;
  font-weight: 700;
}

.monthly-bars {
  display: grid;
  grid-template-columns: repeat(12, minmax(42px, 1fr));
  gap: 10px;
  align-items: end;
  min-width: 0;
  overflow-x: auto;
  padding: 4px 2px 0;
}

.monthly-bar-item {
  display: grid;
  grid-template-rows: 24px 150px auto;
  gap: 7px;
  min-width: 42px;
  text-align: center;
}

.monthly-bar-value {
  color: var(--navy);
  font-size: 0.86rem;
  font-weight: 700;
  line-height: 24px;
}

.monthly-bar-track {
  display: flex;
  align-items: end;
  justify-content: center;
  border-radius: 4px;
  background: #fff;
  overflow: hidden;
}

.monthly-bar-fill {
  width: 100%;
  min-height: 0;
  border-radius: 4px 4px 0 0;
  background: var(--chart-purple);
}

.monthly-bar-fill-rate {
  background: var(--chart-blue);
}

.monthly-bars-count-comparison {
  grid-template-columns: repeat(12, minmax(42px, 1fr));
}

.monthly-count-group {
  min-width: 42px;
}

.monthly-count-stack {
  height: 150px;
}

.monthly-bar-fill-total {
  position: relative;
  background: var(--chart-purple);
  overflow: hidden;
}

.monthly-bar-fill-with-rate {
  position: absolute;
  right: 0;
  bottom: 0;
  left: 0;
  background: var(--chart-blue);
}

.monthly-bars-rate-comparison {
  grid-template-columns: repeat(12, minmax(54px, 1fr));
}

.monthly-rate-group {
  grid-template-rows: 150px auto;
  min-width: 54px;
}

.monthly-rate-bars {
  display: grid;
  grid-template-columns: repeat(4, minmax(7px, 1fr));
  gap: 3px;
  align-items: end;
  height: 150px;
}

.monthly-rate-track {
  height: 150px;
  min-width: 0;
}

.monthly-bar-fill-rate.is-average-max,
.monthly-rate-legend-swatch.is-average-max {
  background: var(--chart-purple);
}

.monthly-bar-fill-rate.is-average-min,
.monthly-rate-legend-swatch.is-average-min {
  background: var(--chart-blue);
}

.monthly-bar-fill-rate.is-maximum-max,
.monthly-rate-legend-swatch.is-maximum-max {
  background: var(--chart-light-blue);
}

.monthly-bar-fill-rate.is-minimum-min,
.monthly-rate-legend-swatch.is-minimum-min {
  background: var(--chart-light-blue);
}

.monthly-bar-label {
  display: grid;
  gap: 1px;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 700;
  line-height: 1.15;
  text-transform: capitalize;
}

.monthly-bar-label small {
  color: var(--muted);
  font-size: 0.72rem;
}

.progress-panel {
  position: fixed;
  right: 18px;
  bottom: 18px;
  z-index: 20;
  width: min(390px, calc(100vw - 32px));
  max-height: min(460px, calc(100vh - 36px));
  padding: 24px;
  box-shadow: 0 18px 48px rgba(1, 27, 70, 0.22);
}

.progress-panel.is-collapsed {
  width: auto;
  max-height: none;
  padding: 8px;
}

.progress-panel.is-collapsed .section-head {
  display: block;
}

.progress-panel.is-collapsed .section-head > div {
  display: none;
}

.progress-toggle {
  flex: 0 0 34px;
  width: 34px;
  height: 34px;
  font-size: 1.15rem;
  line-height: 1;
}

.advice-panel {
  padding: 0;
  border: 0;
  background: transparent;
  box-shadow: none;
  font-family: "IBM Plex Sans", Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 16px;
}

.advice-panel button,
.advice-panel summary,
.advice-panel input,
.advice-panel output {
  font-family: inherit;
}

.cv-advice-page-head {
  display: none;
}

.cv-advice-page-head h2 {
  margin: 6px 0 0;
  color: #111a2d;
  font-size: clamp(1.75rem, 2.4vw, 2.25rem);
}

.cv-advice-intro {
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr);
  gap: 18px;
  border: 1px solid #dce3f1;
  border-radius: 14px;
  padding: 24px;
  background: #fff;
  box-shadow: 0 4px 14px rgba(21, 43, 81, 0.04);
}

.cv-advice-intro-icon {
  display: grid;
  width: 44px;
  height: 44px;
  place-items: center;
  border-radius: 11px;
  background: linear-gradient(145deg, #22168f, #1479e9);
  color: white;
}

.cv-advice-intro-icon svg,
.cv-upload-icon svg {
  width: 23px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.8;
}

.cv-advice-intro h3 {
  margin: 5px 0 8px;
  color: #141b2d;
  font-size: 1.08rem;
}

.cv-advice-intro p:last-child {
  max-width: 850px;
  margin: 0;
  color: #71809b;
  line-height: 1.55;
}

.cv-advice-overview {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 200px;
  gap: 14px;
  margin-top: 18px;
}

.cv-score-card,
.cv-upload-card {
  border: 1px solid #dce3f1;
  border-radius: 13px;
  background: white;
}

.cv-score-card {
  display: grid;
  grid-template-columns: 96px minmax(0, 1fr);
  align-items: center;
  gap: 22px;
  min-height: 178px;
  padding: 22px 28px;
}

.cv-score-ring {
  --score: 0;
  display: grid;
  width: 96px;
  height: 96px;
  place-items: center;
  border-radius: 50%;
  background: conic-gradient(#2363e6 calc(var(--score) * 1%), #e6ecf7 0);
}

.cv-score-ring::before {
  grid-area: 1 / 1;
  width: 72px;
  height: 72px;
  border-radius: 50%;
  background: white;
  content: '';
}

.cv-score-ring div {
  z-index: 1;
  display: grid;
  grid-area: 1 / 1;
  text-align: center;
}

.cv-score-ring strong { color: #2363e6; font-size: 1.55rem; line-height: 1; }
.cv-score-ring span { margin-top: 4px; color: #7d89a0; font-size: 0.65rem; font-weight: 700; text-transform: uppercase; }
.cv-subscore-list { display: grid; gap: 11px; }
.cv-subscore { display: grid; grid-template-columns: 105px minmax(70px, 1fr) 28px; align-items: center; gap: 12px; font-size: 0.82rem; }
.cv-subscore > span:first-child { color: #72809a; font-weight: 600; }
.cv-subscore-track { height: 5px; overflow: hidden; border-radius: 99px; background: #e7ecf5; }
.cv-subscore-track i { display: block; height: 100%; border-radius: inherit; background: #bd9030; }
.cv-subscore.excellent .cv-subscore-track i { background: #47915f; }
.cv-subscore.improve .cv-subscore-track i { background: #b95a5a; }
.cv-subscore strong { color: #876a29; font-size: 0.78rem; }
.cv-subscore.excellent strong { color: #3d8053; }
.cv-subscore.improve strong { color: #a94b4b; }

.cv-advice-actions { display: grid; grid-template-rows: 1fr 1fr auto; gap: 10px; }
.cv-action-stat { display: flex; align-items: center; gap: 12px; border: 1px solid; border-radius: 12px; padding: 13px 15px; }
.cv-action-stat > span { display: grid; flex: 0 0 38px; width: 38px; height: 38px; place-items: center; border-radius: 9px; color: white; font-size: 1.15rem; font-weight: 800; }
.cv-action-stat strong, .cv-action-stat small { display: block; }
.cv-action-stat strong { font-size: 1.45rem; line-height: 1; }
.cv-action-stat small { margin-top: 4px; font-size: .74rem; }
.cv-action-stat.is-missing { border-color: #ffc8c8; background: #fff0f0; color: #a92c2c; }
.cv-action-stat.is-missing > span { background: #e62e32; }
.cv-action-stat.is-explicit { border-color: #f5d671; background: #fff8d9; color: #995000; }
.cv-action-stat.is-explicit > span { background: #e17c00; }
.cv-upload-button { width: 100%; border: 0; border-radius: 8px; padding: 13px 16px; background: #2862df; color: white; font-weight: 700; cursor: pointer; }
.cv-upload-button span { margin-right: 7px; }
.cv-upload-button:hover { background: #184fc7; }

.cv-advice-legend { display: flex; align-items: center; flex-wrap: wrap; gap: 8px 22px; margin: 14px 0 16px; border: 1px solid #dce3f1; border-radius: 9px; padding: 10px 14px; background: white; color: #77849b; font-size: 0.78rem; }
.cv-advice-legend span { display: inline-flex; align-items: center; gap: 6px; }
.cv-advice-legend .cv-legend-item { gap: 7px; }
.cv-advice-legend .cv-legend-item i {
  display: inline-grid;
  flex: 0 0 20px;
  width: 20px;
  height: 20px;
  place-items: center;
  border-radius: 50%;
  background: #fff0f0;
  color: #a94242;
  font-size: 0.72rem;
  font-style: normal;
  font-weight: 800;
}
.cv-advice-legend .cv-legend-item.is-explicit i {
  border-radius: 5px;
  background: #fff7df;
  color: #8b6819;
}
.cv-advice-legend .cv-legend-item.is-explicit strong { color: #806019; }
.cv-advice-legend .cv-legend-item.is-missing strong { color: #9f3e3e; }
.cv-advice-legend strong { color: #263149; }
.cv-advice-legend .cv-reference-count { margin-left: auto; border: 1px solid #dce3f1; border-radius: 7px; padding: 6px 10px; color: #2761dd; font-weight: 700; }

.progress-log {
  display: grid;
  gap: 8px;
  max-height: 300px;
  margin-top: 18px;
  overflow: auto;
}

.progress-item {
  border-left: 3px solid var(--accent);
  border-radius: 4px;
  background: var(--accent-soft);
  color: var(--ink);
  padding: 9px 11px;
  font-size: 0.92rem;
  line-height: 1.35;
}

.progress-debug {
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", monospace;
  white-space: pre-wrap;
  word-break: break-word;
}

.progress-error {
  border-left-color: var(--rose);
  color: var(--rose);
}

.advice-grid { display: grid; gap: 10px; }

.advice-background {
  margin-top: 30px;
  border: 1px solid #dce3f1;
  border-radius: 12px;
  background: rgba(255, 255, 255, .72);
  overflow: hidden;
}

.advice-background-summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  min-height: 76px;
  padding: 18px 22px;
  background: white;
  cursor: pointer;
  list-style: none;
}

.advice-background-summary::-webkit-details-marker { display: none; }
.advice-background-summary span { display: grid; gap: 4px; }
.advice-background-summary small { color: #2761dd; font-size: .7rem; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; }
.advice-background-summary strong { color: var(--navy); font-size: 1rem; }
.advice-background-summary i { color: #8d99ae; font-style: normal; transition: transform 180ms ease; }
.advice-background[open] .advice-background-summary { border-bottom: 1px solid #dce3f1; }
.advice-background[open] .advice-background-summary i { transform: rotate(180deg); }

.advice-background-content {
  display: grid;
  gap: 18px;
  padding: 22px;
}

.advice-background-head {
  gap: 14px;
}

.advice-background-head h3 {
  margin: 0;
  color: var(--navy);
  font-size: 1.08rem;
}

.background-tabs {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 6px;
  border: 1px solid var(--line);
  border-radius: 4px;
  padding: 4px;
  background: var(--soft);
}

.background-tab {
  min-height: 34px;
  border: 1px solid transparent;
  border-radius: 3px;
  background: transparent;
  color: var(--muted);
  padding: 0 12px;
  font: inherit;
  font-size: 0.88rem;
  font-weight: 800;
  cursor: pointer;
}

.background-tab:hover {
  color: var(--accent);
}

.background-tab:focus {
  border-color: var(--accent);
  outline: 3px solid rgba(31, 88, 222, 0.16);
  outline-offset: 2px;
}

.background-tab.is-active {
  border-color: var(--line);
  background: white;
  color: var(--accent);
}

.background-panel {
  min-width: 0;
}

.advice-background .matches,
.advice-background .all-results {
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  padding: 0;
}

.advice-background .sticky-head {
  margin: 0 0 18px;
  border: 0;
  border-bottom: 1px solid var(--line);
  padding: 0 0 14px;
  background: var(--panel);
}

.advice-block {
  overflow: hidden;
  border: 1px solid #dce3f1;
  border-radius: 12px;
  background: white;
  box-shadow: 0 3px 10px rgba(28, 61, 117, 0.025);
}

.advice-block-empty {
  display: grid;
  grid-template-columns: minmax(150px, 230px) minmax(0, 1fr);
  align-items: center;
  min-height: 66px;
  padding: 14px 20px;
}

.advice-block-empty > strong {
  color: #1659da;
  font-size: .9rem;
}

.advice-block-empty > span {
  display: flex;
  align-items: center;
  gap: 10px;
  color: #19a951;
  font-size: .82rem;
}

.advice-block-empty > span i {
  display: grid;
  flex: 0 0 22px;
  width: 22px;
  height: 22px;
  place-items: center;
  border-radius: 50%;
  background: #ecfaf1;
  font-style: normal;
  font-weight: 800;
}

.advice-block summary {
  display: grid;
  grid-template-columns: minmax(130px, 1fr) auto 18px;
  align-items: center;
  gap: 16px;
  min-height: 62px;
  padding: 14px 24px;
  color: #1659da;
  font-weight: 700;
  cursor: pointer;
  list-style: none;
}

.advice-block summary::-webkit-details-marker { display: none; }
.advice-block-badges { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 7px; }
.advice-block-badges i { border: 1px solid; border-radius: 6px; padding: 5px 9px; font-size: .72rem; font-style: normal; line-height: 1; }
.advice-block-badges .is-missing { border-color: #ffc6c6; background: #fff0f0; color: #ae2d2d; }
.advice-block-badges .is-explicit { border-color: #f5d66f; background: #fff8d9; color: #995000; }
.advice-chevron { color: #8d99ae; transition: transform 180ms ease; }
.advice-block[open] .advice-chevron { transform: rotate(180deg); }
.advice-block-body { border-top: 1px solid #edf0f6; padding: 0; }

.advice-block ul {
  margin: 0;
  padding: 0;
  color: var(--ink);
  line-height: 1.4;
  list-style: none;
}

.advice-item {
  margin: 0;
  border-bottom: 1px solid #edf0f6;
  padding: 0 24px;
}
.advice-item:last-child { border-bottom: 0; }

.advice-item-head {
  display: grid;
  grid-template-columns: minmax(180px, 1fr) auto auto 14px;
  align-items: center;
  gap: 16px;
  min-height: 60px;
}
.advice-item-label { display: flex; align-items: center; gap: 12px; font-weight: 700; }
.advice-item-label i { flex: 0 0 8px; width: 8px; height: 8px; border-radius: 50%; background: #e62e32; }
.advice-item:has(.is-explicit) .advice-item-label i { background: #e17c00; }

.advice-meta {
  color: var(--muted);
  font-size: 0.9em;
}

.advice-gap-badge {
  display: inline-flex;
  align-items: center;
  min-height: 22px;
  border: 1px solid var(--line);
  border-radius: 4px;
  padding: 2px 7px;
  font-size: 0.76rem;
  font-weight: 800;
  line-height: 1.2;
}

.advice-gap-badge.is-missing {
  border-color: rgba(184, 74, 74, 0.28);
  background: rgba(184, 74, 74, 0.08);
  color: #8d3232;
}

.advice-gap-badge.is-explicit {
  border-color: #f5d66f;
  background: #fff8d9;
  color: #995000;
}
.advice-item-chevron { color: #8492aa; }
.advice-all-good { padding: 22px 24px; color: #19a951; font-size: .84rem; }
.advice-all-good span { margin-right: 10px; font-weight: 800; }

.advice-gap-reason {
  max-width: 1050px;
  margin: -2px 34px 20px;
  color: var(--muted);
  font-size: 0.88rem;
  line-height: 1.55;
  overflow-wrap: anywhere;
}

.training-panel {
  border: 0;
  padding: 28px;
  background: #f2f6ff;
  box-shadow: none;
}

.training-page-head h2 {
  margin: 0;
  font-size: clamp(1.65rem, 2vw, 2rem);
}

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

.training-intro {
  display: flex;
  gap: 16px;
  margin: 26px 0 20px;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 22px 24px;
  background: #fff;
}

.training-intro-icon {
  display: grid;
  flex: 0 0 42px;
  width: 42px;
  height: 42px;
  place-items: center;
  border-radius: 10px;
  background: linear-gradient(135deg, #3422a8, #009ee8);
  color: #fff;
  font-size: 1.5rem;
  font-weight: 800;
}

.training-intro-icon svg {
  width: 24px;
  height: 24px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.7;
}

.training-intro h3 {
  margin: 0 0 7px;
  color: var(--ink);
  font-size: 1.05rem;
}

.training-intro p:last-child {
  max-width: 760px;
  margin: 0;
  color: var(--muted);
  font-size: 0.9rem;
  line-height: 1.5;
}

.training-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 16px;
}

.training-filters button {
  min-height: 38px;
  border: 1px solid var(--line);
  border-radius: 7px;
  padding: 0 18px;
  background: #fff;
  color: var(--ink);
  font-weight: 750;
  cursor: pointer;
}

.training-filters button:hover,
.training-filters button:focus-visible {
  border-color: var(--accent);
  outline: none;
}

.training-filters button.is-active {
  border-color: var(--accent);
  background: var(--accent);
  color: #fff;
}

.matching-assignments-panel {
  padding: 24px;
}

.matching-search-criteria {
  margin-top: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 16px;
  background: #f8fafc;
}

.matching-search-criteria-head {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: start;
  margin-bottom: 12px;
}

.matching-search-criteria-head h3,
.matching-search-criteria-head p {
  margin: 0;
}

.matching-search-criteria-head h3 {
  color: var(--ink);
  font-size: 1rem;
}

.matching-search-criteria-head p {
  margin-top: 4px;
  color: var(--muted);
  font-size: 0.86rem;
  line-height: 1.4;
}

.matching-search-criteria-tags {
  min-height: 34px;
}

.matching-assignment-filters {
  display: grid;
  grid-template-columns: minmax(220px, 1fr) minmax(180px, 240px);
  gap: 14px;
  align-items: end;
  margin: 14px 0 16px;
  border-bottom: 1px solid var(--line);
  padding-bottom: 16px;
}

.matching-assignment-filters label {
  display: grid;
  gap: 8px;
  color: var(--muted);
  font-size: 0.86rem;
  font-weight: 700;
}

.matching-radius-control {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 64px;
  gap: 12px;
  align-items: center;
}

.matching-radius-control input[type="range"] {
  width: 100%;
  accent-color: var(--accent);
}

.matching-radius-control output,
.matching-freelancer-filter select {
  min-height: 36px;
  border: 1px solid var(--line);
  border-radius: 4px;
  background: #ffffff;
  color: var(--ink);
}

.matching-radius-control output {
  display: grid;
  place-items: center;
  font-weight: 800;
}

.matching-freelancer-filter select {
  padding: 0 10px;
  font: inherit;
}

.matching-assignments-note {
  margin-bottom: 14px;
  color: var(--muted);
  font-size: 0.9rem;
  line-height: 1.45;
}

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

.matching-assignment-card {
  position: relative;
  display: grid;
  gap: 16px;
  border: 1px solid var(--line);
  border-radius: 4px;
  padding: 18px 18px 16px;
  background: #ffffff;
  box-shadow: 0 6px 18px rgba(24, 34, 48, 0.05);
  overflow: hidden;
  cursor: pointer;
  transition: border-color 0.16s ease, box-shadow 0.16s ease, transform 0.16s ease;
}

.matching-assignment-card::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: 3px;
  background: var(--accent);
  opacity: 0.85;
}

.matching-assignment-card:hover,
.matching-assignment-card:focus-visible {
  border-color: rgba(31, 88, 222, 0.34);
  box-shadow: 0 12px 28px rgba(24, 34, 48, 0.09);
  transform: translateY(-1px);
  outline: none;
}

.matching-assignment-head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(190px, auto);
  gap: 18px;
  align-items: start;
  min-width: 0;
}

.matching-assignment-title-block {
  min-width: 0;
}

.matching-assignment-visual {
  display: grid;
  justify-items: end;
  gap: 10px;
  min-width: 0;
}

.matching-assignment-badges {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 7px;
  max-width: 420px;
}

.matching-assignment-fit-badges {
  display: contents;
}

.matching-badge {
  display: inline-grid;
  min-height: 28px;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 4px;
  padding: 5px 9px;
  background: #ffffff;
  color: var(--muted);
  font-size: 0.76rem;
  font-weight: 800;
  white-space: nowrap;
}

.matching-badge.is-positive {
  border-color: rgba(37, 128, 90, 0.25);
  background: rgba(37, 128, 90, 0.1);
  color: #1f6b4d;
}

.matching-badge.is-negative {
  border-color: rgba(190, 71, 85, 0.25);
  background: rgba(190, 71, 85, 0.1);
  color: #9f3342;
}

.matching-badge.is-deadline {
  border-color: rgba(38, 95, 166, 0.22);
  background: rgba(38, 95, 166, 0.08);
  color: #265fa6;
}

.matching-badge.is-application {
  border-color: rgba(37, 128, 90, 0.28);
  background: rgba(37, 128, 90, 0.11);
  color: #1f6b4d;
}

.matching-badge.is-score {
  border-color: hsl(var(--match-hue, 42) 64% 42% / 0.28);
  background: hsl(var(--match-hue, 42) 78% 91% / 0.9);
  color: hsl(var(--match-hue, 42) 70% 27%);
}

.matching-badge.is-score-loading {
  display: inline-flex;
  gap: 7px;
  color: var(--muted);
}

.matching-badge.is-score-loading span {
  width: 13px;
  height: 13px;
  flex: 0 0 auto;
  border: 2px solid rgba(31, 88, 222, 0.16);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: assignment-fit-spin 780ms linear infinite;
}

.assignment-applications-list {
  display: grid;
  gap: 18px;
  margin-top: 18px;
}

.contract-table-wrap {
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: 4px;
}

.contract-table {
  width: 100%;
  border-collapse: collapse;
  background: var(--panel);
}

.contract-table th,
.contract-table td {
  padding: 14px 16px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: middle;
}

.contract-table th {
  color: var(--muted);
  background: var(--accent-soft);
  font-size: 0.78rem;
  letter-spacing: 0.03em;
  text-transform: uppercase;
}

.contract-table tbody tr:last-child td { border-bottom: 0; }
.contract-table tbody tr:hover { background: #f8faff; }
.contract-table a { color: var(--accent-dark); font-weight: 700; }

.contract-summary-row td:nth-child(2) {
  display: flex;
  align-items: center;
  gap: 10px;
}

.contract-toggle {
  display: inline-grid;
  width: 32px;
  height: 32px;
  flex: 0 0 auto;
  place-items: center;
  border: 1px solid rgba(31, 88, 222, 0.18);
  border-radius: 8px;
  background: var(--accent-soft);
  color: var(--accent-dark);
  cursor: pointer;
  box-shadow: 0 1px 2px rgba(1, 27, 70, 0.06);
  transition: border-color 160ms ease, background 160ms ease, box-shadow 160ms ease, transform 160ms ease;
}

.contract-toggle:hover,
.contract-toggle:focus-visible {
  border-color: var(--accent);
  background: #e1ebff;
  box-shadow: 0 3px 9px rgba(31, 88, 222, 0.18);
}

.contract-toggle:active { transform: scale(0.95); }
.contract-toggle svg { width: 18px; height: 18px; transition: transform 180ms ease; }
.contract-toggle path { fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.contract-toggle[aria-expanded="true"] { border-color: var(--accent); background: var(--accent); color: white; }
.contract-toggle[aria-expanded="true"] svg { transform: rotate(90deg); }
.contract-detail-row > td { padding: 0; background: #f8faff; }
.contract-detail-row:hover { background: #f8faff !important; }
.contract-declarations { padding: 18px 22px 22px; }
.contract-declarations h4 { margin: 0 0 12px; }
.contract-declarations-empty { padding: 18px 22px; color: var(--muted); }
.contract-declaration-table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: 4px; }
.contract-declaration-table { width: 100%; border-collapse: collapse; background: var(--panel); }
.contract-declaration-table th,
.contract-declaration-table td { padding: 11px 13px; border-bottom: 1px solid var(--line); text-align: left; }
.contract-declaration-table th { color: var(--muted); background: var(--accent-soft); font-size: 0.76rem; text-transform: uppercase; }
.contract-declaration-table tbody tr:last-child td { border-bottom: 0; }
.declaration-status { display: inline-block; padding: 4px 8px; border-radius: 999px; background: var(--accent-soft); color: var(--accent-dark); font-size: 0.78rem; font-weight: 700; }

@media (max-width: 680px) {
  .contract-table thead { display: none; }
  .contract-table,
  .contract-table tbody,
  .contract-table tr,
  .contract-table td { display: block; width: 100%; }
  .contract-table tr { padding: 8px 0; border-bottom: 1px solid var(--line); }
  .contract-table tbody tr:last-child { border-bottom: 0; }
  .contract-table td {
    display: grid;
    grid-template-columns: minmax(110px, 0.7fr) minmax(0, 1fr);
    gap: 12px;
    padding: 7px 14px;
    border: 0;
  }
  .contract-table td::before {
    content: attr(data-label);
    color: var(--muted);
    font-size: 0.78rem;
    font-weight: 700;
    text-transform: uppercase;
  }
  .contract-summary-row td:nth-child(2) { display: grid; grid-template-columns: 32px minmax(0, 1fr); }
  .contract-summary-row td:nth-child(2)::before { display: none; }
  .contract-detail-row { padding: 0 !important; }
  .contract-detail-row > td { display: block; padding: 0; }
  .contract-detail-row > td::before { display: none; }
  .contract-declaration-table thead { display: none; }
  .contract-declaration-table,
  .contract-declaration-table tbody,
  .contract-declaration-table tr,
  .contract-declaration-table td { display: block; width: 100%; }
  .contract-declaration-table tr { padding: 8px 0; border-bottom: 1px solid var(--line); }
  .contract-declaration-table tbody tr:last-child { border-bottom: 0; }
  .contract-declaration-table td { display: grid; grid-template-columns: 110px minmax(0, 1fr); gap: 10px; border: 0; padding: 6px 12px; }
  .contract-declaration-table td::before { content: attr(data-label); color: var(--muted); font-size: 0.75rem; font-weight: 700; text-transform: uppercase; }
}

.assignment-applications-panel {
  padding: 24px;
}

/* Mijn sollicitaties — statusgericht overzicht */
.assignment-applications-panel[data-results-view="applications"] {
  display: grid;
  gap: 28px;
  border: 0;
  padding: 0;
  background: transparent;
  box-shadow: none;
}

.assignment-applications-panel[data-results-view="applications"] > .powerapps-sync-progress,
.assignment-applications-panel[data-results-view="applications"] > .assignment-applications-list {
  margin: 0;
}

.assignment-applications-panel[data-results-view="applications"] > .section-head {
  min-height: auto;
  border: 0;
  padding: 4px 0 0;
  background: transparent;
}

.assignment-applications-panel[data-results-view="applications"] > .section-head h2 {
  font-size: clamp(1.65rem, 2.3vw, 2.25rem);
}

.assignment-applications-panel[data-results-view="applications"] > .section-head .result-count {
  display: none;
}

.applications-intro {
  display: grid;
  grid-template-columns: 46px minmax(0, 1fr);
  gap: 16px;
  align-items: start;
  border: 1px solid rgba(209, 218, 244, 0.9);
  border-radius: 10px;
  padding: 22px 24px;
  background: #fff;
  box-shadow: 0 3px 12px rgba(6, 38, 90, 0.04);
}

.applications-intro-icon {
  display: grid;
  width: 46px;
  height: 46px;
  place-items: center;
  border-radius: 10px;
  background: linear-gradient(145deg, #2933a9, #1259dd);
  color: #fff;
}

.applications-intro-icon svg {
  width: 24px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.7;
}

.applications-intro .eyebrow {
  margin: 1px 0 7px;
  color: var(--accent);
  font-size: .7rem;
  letter-spacing: .09em;
}

.applications-intro h3 {
  margin: 0 0 7px;
  color: var(--navy);
  font-size: 1rem;
}

.applications-intro div > p:last-child {
  max-width: 780px;
  margin: 0;
  color: #71819a;
  font-size: .88rem;
  line-height: 1.55;
}

.assignment-applications-list {
  gap: 16px;
}

.assignment-application-tabs {
  display: flex;
  gap: 0;
  overflow-x: auto;
  border-bottom: 1px solid var(--line);
}

.assignment-application-tabs button {
  position: relative;
  display: inline-flex;
  min-height: 46px;
  align-items: center;
  gap: 9px;
  border: 0;
  padding: 0 20px;
  background: transparent;
  color: #63718a;
  font-size: .86rem;
  font-weight: 650;
  white-space: nowrap;
  cursor: pointer;
}

.assignment-application-tabs button::after {
  position: absolute;
  right: 0;
  bottom: -1px;
  left: 0;
  height: 2px;
  background: var(--accent);
  content: "";
  opacity: 0;
}

.assignment-application-tabs button[aria-selected="true"] {
  color: var(--accent);
}

.assignment-application-tabs button[aria-selected="true"]::after { opacity: 1; }

.assignment-application-tabs button span {
  display: inline-grid;
  min-width: 19px;
  height: 19px;
  place-items: center;
  border-radius: 10px;
  padding: 0 5px;
  background: #e8edf5;
  color: #65738a;
  font-size: .7rem;
  font-weight: 850;
}

.assignment-application-tabs button[aria-selected="true"] span {
  background: var(--accent);
  color: #fff;
}

.assignment-application-tab-panel {
  display: grid;
  gap: 12px;
}

.assignment-application-tab-panel[hidden] { display: none; }

.assignment-applications-panel[data-results-view="applications"] .assignment-application-overview-card {
  gap: 12px;
  border-radius: 10px;
  padding: 18px 22px;
  box-shadow: 0 3px 12px rgba(6, 38, 90, 0.04);
}

.assignment-applications-panel[data-results-view="applications"] .assignment-application-overview-card.is-deadline-urgent {
  border: 1px solid #f5a000;
  background: #fff;
  box-shadow: 0 5px 16px rgba(217, 119, 6, 0.08);
}

.assignment-applications-panel[data-results-view="applications"] .assignment-application-main {
  display: flex;
  flex-wrap: wrap;
  gap: 7px 9px;
}

.assignment-applications-panel[data-results-view="applications"] .assignment-application-main h3 {
  flex-basis: 100%;
  font-size: 1rem;
}

.assignment-applications-panel[data-results-view="applications"] .matching-badge {
  border: 1px solid #f5d85c;
  border-radius: 5px;
  padding: 4px 10px;
  background: #fff8d8;
  color: #985811;
  font-size: .68rem;
}

.assignment-applications-panel[data-results-view="applications"] .assignment-application-card-body {
  grid-template-columns: 1fr;
  gap: 12px;
}

.assignment-applications-panel[data-results-view="applications"] .assignment-application-meta {
  gap: 4px;
}

.assignment-applications-panel[data-results-view="applications"] .assignment-application-meta p {
  color: var(--accent);
}

.assignment-applications-panel[data-results-view="applications"] .assignment-application-meta span {
  font-size: .76rem;
  font-weight: 500;
}

.assignment-applications-panel[data-results-view="applications"] .assignment-application-metrics {
  border-width: 1px 0 0;
  border-radius: 0;
  background: transparent;
}

.assignment-applications-panel[data-results-view="applications"] .assignment-application-metrics div {
  justify-items: center;
  padding: 12px 10px 2px;
  background: transparent;
}

.assignment-applications-panel[data-results-view="applications"] .assignment-application-metrics dt {
  color: #71819a;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.assignment-applications-panel[data-results-view="applications"] .assignment-application-metrics dd {
  color: var(--navy);
  font-size: .9rem;
}

.assignment-applications-panel[data-results-view="applications"] .assignment-application-metrics dd:not([data-assignment-application-requirements-match-count]):not([data-assignment-application-wishes-match-count]) {
  color: #f59e0b;
}

@media (max-width: 700px) {
  .applications-intro { grid-template-columns: 40px minmax(0, 1fr); padding: 18px; }
  .applications-intro-icon { width: 40px; height: 40px; }
  .assignment-application-tabs button { padding: 0 13px; }
  .assignment-applications-panel[data-results-view="applications"] .assignment-application-overview-card { padding: 16px; }
  .assignment-applications-panel[data-results-view="applications"] .assignment-application-card-head { grid-template-columns: 1fr; }
  .assignment-applications-panel[data-results-view="applications"] .assignment-application-overview-actions { justify-content: flex-start; }
  .assignment-applications-panel[data-results-view="applications"] .assignment-application-metrics { grid-template-columns: repeat(2, 1fr); }
}

/* Mijn contracten */
.contracts-page { display: grid; gap: 20px; }
.contracts-page > .powerapps-sync-progress { margin-bottom: 0; }
.contracts-dashboard { display: grid; gap: 20px; }
.contracts-intro { display: grid; grid-template-columns: 48px minmax(0, 1fr) auto; gap: 16px; align-items: center; border: 1px solid rgba(31,88,222,.14); border-radius: 12px; padding: 20px 22px; background: #fff; box-shadow: 0 8px 28px rgba(6,38,90,.06); }
.contracts-intro-icon { display: grid; place-items: center; width: 44px; height: 44px; border-radius: 11px; background: linear-gradient(145deg,#273dc5,#13268d); color: #fff; }
.contracts-intro-icon svg { width: 24px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.contracts-intro h2 { margin: 4px 0 5px; font-size: 1rem; }
.contracts-intro p:last-child { margin: 0; color: var(--muted); font-size: .9rem; }
.contract-metrics { display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); gap: 14px; }
.contract-metric { display: grid; gap: 4px; min-height: 116px; padding: 21px; }
.contract-metric strong { font-size: 1.7rem; line-height: 1; }
.contract-metric span { margin-top: 7px; font-size: .84rem; font-weight: 700; }
.contract-metric small { color: var(--muted); }
.contract-metric.is-blue strong { color: #245bdd; }.contract-metric.is-purple strong { color: #37077b; }.contract-metric.is-cyan strong { color: #08a7eb; }.contract-metric.is-green strong { color: #08a54c; }
.contracts-overview { overflow: hidden; }
.contracts-overview-head { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 82px; padding: 17px 22px; border-bottom: 1px solid var(--line); }
.contracts-overview-head h3 { margin: 4px 0 0; font-size: 1.08rem; }
.contract-list { display: grid; }
.contract-item + .contract-item { border-top: 1px solid var(--line); }
.contract-row { display: grid; grid-template-columns: 44px minmax(230px,1fr) minmax(180px,auto) 90px 105px auto 18px; gap: 16px; align-items: center; width: 100%; border: 0; padding: 18px 22px; background: #fff; color: var(--ink); text-align: left; cursor: pointer; transition: background 150ms ease; }
.contract-row:hover { background: #f8faff; }
.contract-client-mark { display: grid; place-items: center; width: 40px; height: 40px; border-radius: 9px; background: #087fb8; color: white; font-size: .7rem; font-weight: 800; }
.contract-item:nth-child(3n+2) .contract-client-mark { background: #f3bd00; color: #152142; }.contract-item:nth-child(3n) .contract-client-mark { background: #078d4f; }
.contract-identity { display: grid; gap: 3px; min-width: 0; }.contract-identity strong,.contract-identity span,.contract-identity small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }.contract-identity span { color: var(--accent); font-size: .84rem; font-weight: 700; }.contract-identity small { color: var(--muted); }
.contract-fact { display: grid; gap: 5px; text-align: right; }.contract-fact small { color: var(--muted); }.contract-fact strong { white-space: nowrap; font-size: .84rem; }.contract-fact em { color: var(--muted); font-size: .72rem; font-style: normal; font-weight: 400; }
.contract-state { border: 1px solid #dce3ef; border-radius: 999px; padding: 4px 11px; background: #f1f4f8; color: #6e7f9c; font-size: .75rem; font-weight: 700; }.contract-state.is-active { border-color: #b8edcc; background: #effcf4; color: #08a54c; }
.contract-row-chevron { width: 17px; fill: none; stroke: currentColor; stroke-width: 2; transition: transform 180ms ease; }.contract-row[aria-expanded="true"] .contract-row-chevron { transform: rotate(90deg); }
.contract-detail-row { background: #f8faff; }
.contracts-empty { padding: 28px; }

@media (max-width: 1100px) { .contract-row { grid-template-columns: 44px minmax(200px,1fr) minmax(170px,auto) 90px auto 18px; }.contract-fact:nth-of-type(4) { display: none; } }
@media (max-width: 760px) { .contracts-intro { grid-template-columns: 44px 1fr; padding: 18px; }.contracts-intro .result-count { display: none; }.contract-metrics { grid-template-columns: repeat(2,minmax(0,1fr)); }.contract-row { grid-template-columns: 40px minmax(0,1fr) auto 16px; gap: 11px; padding: 16px; }.contract-fact { display: none; }.contracts-overview-head { align-items: flex-start; padding: 16px; } }
@media (max-width: 440px) { .contract-metrics { grid-template-columns: 1fr; }.contracts-intro-icon { display: none; }.contracts-intro { grid-template-columns: 1fr; }.contract-state { display: none; } }
@media print { .dashboard-sidebar,.dashboard-topbar,.contracts-intro,.powerapps-sync-progress { display: none !important; }.shell { width: 100%; padding: 0; }.dashboard-shell { display: block; }.contracts-page { display: grid !important; }.contract-row { break-inside: avoid; } }

.assignment-applications-panel .section-head > div {
  min-width: 0;
}

.assignment-application-bucket {
  display: grid;
  gap: 10px;
}

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

.assignment-application-bucket-head > div {
  display: grid;
  gap: 4px;
}

.assignment-application-bucket-head p {
  margin: 0;
  color: var(--muted);
  font-size: 0.84rem;
  font-weight: 700;
  line-height: 1.4;
}

.assignment-application-bucket.is-attention {
  border: 2px solid rgba(190, 71, 85, 0.34);
  border-radius: 8px;
  padding: 16px;
  background: rgba(190, 71, 85, 0.06);
  box-shadow: 0 10px 28px rgba(159, 51, 66, 0.08);
}

.assignment-application-bucket.is-attention .assignment-application-bucket-head {
  border-bottom-color: rgba(190, 71, 85, 0.24);
}

.assignment-application-bucket.is-attention .assignment-application-bucket-head h3,
.assignment-application-bucket.is-attention .assignment-application-bucket-head p {
  color: #8d2d3b;
}

.assignment-application-bucket.is-attention .assignment-application-bucket-head span {
  background: #9f3342;
  color: #fff;
}

.assignment-application-bucket-head h3 {
  margin: 0;
  color: var(--navy);
  font-size: 0.98rem;
  font-weight: 900;
  line-height: 1.25;
}

.assignment-application-bucket-head span {
  display: inline-grid;
  min-width: 30px;
  place-items: center;
  border-radius: 999px;
  padding: 5px 8px;
  background: #f1f5f9;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 900;
  line-height: 1;
}

.assignment-application-bucket-list {
  display: grid;
  gap: 10px;
}

.assignment-application-bucket-empty {
  border: 1px dashed rgba(209, 218, 244, 0.9);
  border-radius: 4px;
  padding: 14px;
  background: #fbfcff;
  color: var(--muted);
  font-size: 0.86rem;
  font-weight: 750;
}

.assignment-application-overview-card {
  display: grid;
  gap: 16px;
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 4px;
  padding: 18px 20px;
  background: #ffffff;
  box-shadow: 0 6px 18px rgba(24, 34, 48, 0.05);
  cursor: pointer;
  transition: border-color 0.16s ease, box-shadow 0.16s ease, transform 0.16s ease;
}

.assignment-application-overview-card.is-action-needed {
  border-color: rgba(190, 71, 85, 0.4);
  box-shadow: 0 8px 22px rgba(159, 51, 66, 0.1);
}

.assignment-application-overview-card.is-deadline-urgent {
  border: 2px solid #d97706;
  background: #fffbeb;
  box-shadow: 0 8px 22px rgba(217, 119, 6, 0.14);
}

.matching-badge.is-deadline-urgent {
  background: #d97706;
  color: #fff;
}

.assignment-application-overview-card:hover,
.assignment-application-overview-card:focus-visible {
  border-color: rgba(31, 88, 222, 0.34);
  box-shadow: 0 12px 28px rgba(24, 34, 48, 0.08);
  transform: translateY(-1px);
  outline: none;
}

.assignment-application-card-head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 18px;
  align-items: start;
  min-width: 0;
}

.assignment-application-delete-button {
  display: inline-grid;
  width: 36px;
  height: 36px;
  flex: 0 0 auto;
  place-items: center;
  border: 1px solid rgba(190, 18, 60, 0.22);
  border-radius: 4px;
  background: #ffffff;
  color: #be123c;
  cursor: pointer;
  font: inherit;
  font-size: 1.25rem;
  font-weight: 700;
  line-height: 1;
  padding: 0;
}

.assignment-application-delete-button:hover,
.assignment-application-delete-button:focus-visible {
  border-color: #be123c;
  background: #fff1f2;
  outline: none;
}

.assignment-application-delete-button:disabled {
  cursor: wait;
  opacity: 0.55;
}

.assignment-application-main {
  display: grid;
  gap: 9px;
  justify-items: start;
  min-width: 0;
}

.assignment-application-main h3 {
  margin: 0;
  color: var(--navy);
  font-size: 1.12rem;
  font-weight: 900;
  line-height: 1.2;
  overflow-wrap: anywhere;
}

.assignment-application-card-body {
  display: grid;
  grid-template-columns: minmax(220px, 0.9fr) minmax(360px, 1.1fr);
  gap: 18px;
  align-items: start;
}

.assignment-application-meta {
  display: grid;
  gap: 5px;
  min-width: 0;
}

.assignment-application-meta p,
.assignment-application-meta span {
  margin: 0;
  color: var(--muted);
  font-size: 0.88rem;
  font-weight: 800;
  line-height: 1.3;
  overflow-wrap: anywhere;
}

.assignment-application-metrics {
  display: grid;
  grid-template-columns: repeat(4, minmax(64px, 1fr));
  gap: 1px;
  min-width: 0;
  margin: 0;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 4px;
  background: var(--line);
}

.assignment-application-metrics div {
  display: grid;
  gap: 5px;
  min-width: 0;
  padding: 10px 12px;
  background: #f8fafc;
}

.assignment-application-metrics dt {
  margin: 0;
  color: var(--muted);
  font-size: 0.68rem;
  font-weight: 900;
  line-height: 1.1;
}

.assignment-application-metrics dd {
  margin: 0;
  overflow: hidden;
  color: var(--ink);
  font-size: 0.95rem;
  font-weight: 900;
  line-height: 1.2;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.assignment-application-overview-actions {
  display: flex;
  gap: 0.5rem;
  align-items: center;
  justify-content: flex-end;
  min-width: 0;
}

.matching-badge.is-score-error {
  border-color: rgba(190, 71, 85, 0.24);
  background: rgba(190, 71, 85, 0.08);
  color: #9f3342;
}

.matching-assignment-details {
  display: grid;
  grid-template-columns: repeat(5, minmax(108px, 1fr));
  gap: 1px;
  border: 1px solid var(--line);
  border-radius: 4px;
  margin: 0;
  overflow: hidden;
}

.matching-assignment-details > div {
  min-width: 0;
  padding: 10px 11px;
  background: #fbfcfd;
}

.matching-assignment-details dt {
  margin: 0 0 4px;
  color: var(--muted);
  font-size: 0.7rem;
  font-weight: 800;
  letter-spacing: 0;
  text-transform: uppercase;
}

.matching-assignment-details dd {
  margin: 0;
  color: var(--ink);
  font-size: 0.92rem;
  font-weight: 700;
  overflow-wrap: anywhere;
}

.matching-criteria-row {
  padding-top: 0;
}

.assignment-card-logo {
  display: grid;
  place-items: center;
  width: 112px;
  min-height: 54px;
  border: 1px solid rgba(209, 218, 244, 0.84);
  border-radius: 4px;
  padding: 8px 10px;
  background: #ffffff;
}

.assignment-card-logo img {
  display: block;
  max-width: 90px;
  max-height: 36px;
  object-fit: contain;
}

.assignment-card-logo img[hidden] {
  display: none;
}

.assignment-detail-modal {
  z-index: 40;
}

.assignment-detail-panel {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  width: min(1280px, calc(100vw - 32px));
  height: min(940px, calc(100vh - 32px));
  max-height: calc(100vh - 32px);
}

.assignment-detail-body {
  min-height: 0;
  margin-top: 18px;
  overflow-anchor: none;
  overflow-y: auto;
  overflow-x: hidden;
  padding-right: 8px;
}

.assignment-detail-content {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 320px;
  gap: 24px;
  align-items: start;
}

.assignment-detail-side {
  position: sticky;
  top: 0;
  display: grid;
  gap: 14px;
}

.assignment-detail-logo-card {
  display: grid;
  place-items: center;
  min-height: 132px;
  border: 1px solid var(--line);
  border-radius: 4px;
  padding: 22px;
  background: #ffffff;
  box-shadow: 0 8px 20px rgba(24, 34, 48, 0.06);
}

.assignment-detail-logo-card img {
  display: block;
  max-width: 188px;
  max-height: 88px;
  object-fit: contain;
}

.assignment-detail-logo-card img[hidden] {
  display: none;
}

.assignment-fit-panel {
  display: grid;
  gap: 14px;
}

.assignment-fit-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
  gap: 8px 12px;
}

.assignment-fit-run-meta {
  margin: 0;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 750;
  line-height: 1.35;
}

.assignment-fit-rerun-button {
  display: inline-flex;
  min-height: 34px;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--line);
  border-radius: 4px;
  padding: 0 10px;
  background: #ffffff;
  color: var(--accent);
  font: inherit;
  font-size: 0.8rem;
  font-weight: 850;
  cursor: pointer;
}

.assignment-fit-rerun-button:hover,
.assignment-fit-rerun-button:focus-visible {
  border-color: var(--accent);
  background: var(--accent-soft);
  outline: none;
}

.assignment-fit-card {
  border: 1px solid var(--line);
  border-radius: 4px;
  padding: 14px;
  background: #ffffff;
  box-shadow: 0 8px 20px rgba(24, 34, 48, 0.06);
}

.assignment-fit-card h3 {
  margin: 0 0 10px;
  color: var(--navy);
  font-size: 0.95rem;
  line-height: 1.2;
}

.assignment-professionals-panel {
  display: grid;
  gap: 12px;
  border: 1px solid var(--line);
  border-radius: 4px;
  background: #ffffff;
  padding: 14px;
  box-shadow: 0 8px 20px rgba(24, 34, 48, 0.06);
}

.assignment-professionals-content {
  display: grid;
  gap: 12px;
}

.assignment-professionals-head,
.assignment-professional-card {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
}

.assignment-professionals-head h3 {
  margin: 0;
  font-size: 1rem;
}

.assignment-professionals-head span {
  color: var(--muted);
  font-size: 0.8rem;
  font-weight: 800;
}

.assignment-professional-field {
  display: grid;
  gap: 6px;
}

.assignment-professional-step {
  border-left: 3px solid var(--accent);
  padding-left: 9px;
  color: var(--navy);
  font-size: 0.88rem;
}

.assignment-professional-actions {
  display: flex;
  justify-content: flex-end;
}

.assignment-professional-field span {
  color: var(--muted);
  font-size: 0.74rem;
  font-weight: 850;
  text-transform: uppercase;
}

.assignment-professional-chip-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  min-height: 42px;
  border: 1px solid var(--line);
  border-radius: 4px;
  background: #f8fafc;
  padding: 7px;
}

.assignment-professional-chip-row:focus-within {
  border-color: var(--accent);
  outline: 2px solid rgba(31, 88, 222, 0.16);
  outline-offset: 1px;
}

.assignment-professional-chip-list {
  display: contents;
}

.assignment-professional-chip {
  max-width: 100%;
}

.assignment-professional-chip > span {
  color: var(--ink);
  font-size: 0.82rem;
  text-transform: none;
  overflow-wrap: anywhere;
}

.assignment-professional-input-chip {
  background: #fff;
}

.assignment-professional-input-chip input {
  width: clamp(130px, 38vw, 240px);
}

.assignment-professional-list {
  display: grid;
  gap: 8px;
}

.assignment-professional-card {
  border: 1px solid var(--line);
  border-radius: 4px;
  background: #f8fafc;
  padding: 10px;
}

.assignment-professional-card div {
  display: grid;
  gap: 3px;
  min-width: 0;
}

.assignment-professional-card strong,
.assignment-professional-card span,
.assignment-professional-card small {
  overflow-wrap: anywhere;
}

.assignment-professional-card strong {
  color: var(--navy);
  font-size: 0.92rem;
}

.assignment-professional-card span,
.assignment-professional-card small {
  color: var(--muted);
  font-size: 0.8rem;
}

.assignment-professional-button-row {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
}

.assignment-professional-action-button {
  flex: 0 0 auto;
  border: 1px solid var(--line);
  border-radius: 4px;
  background: #ffffff;
  color: var(--accent);
  cursor: pointer;
  font: inherit;
  font-size: 0.78rem;
  font-weight: 850;
  padding: 7px 9px;
}

.assignment-professional-action-button:hover,
.assignment-professional-action-button:focus-visible {
  outline: none;
  transform: translateY(-1px);
}

.assignment-professional-action-button.is-view {
  border-color: rgba(31, 88, 222, 0.28);
  background: var(--accent-soft);
  color: var(--accent);
}

.assignment-professional-action-button.is-view:hover,
.assignment-professional-action-button.is-view:focus-visible {
  border-color: var(--accent);
  background: #ffffff;
  box-shadow: 0 8px 18px rgba(31, 88, 222, 0.14);
}

.assignment-professional-action-button.is-invite {
  border-color: var(--accent);
  background: var(--accent);
  color: #ffffff;
}

.assignment-professional-action-button.is-invite:hover,
.assignment-professional-action-button.is-invite:focus-visible {
  background: var(--navy);
  border-color: var(--navy);
  box-shadow: 0 8px 18px rgba(15, 23, 42, 0.18);
}

.assignment-professional-results-page {
  display: grid;
  gap: 14px;
}

.assignment-professional-results-summary {
  display: grid;
  gap: 10px;
  border-bottom: 1px solid var(--line);
  padding-bottom: 14px;
}

.assignment-professional-results-summary h3 {
  margin: 0;
  color: var(--navy);
  font-size: 1.05rem;
}

.assignment-results-kicker {
  margin: 0 0 3px;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 850;
  text-transform: uppercase;
}

.assignment-professional-score-loading {
  margin: 8px 0 0;
}

.assignment-professional-results-list {
  display: grid;
  gap: 10px;
}

.assignment-professional-distance-groups {
  display: grid;
  gap: 16px;
}

.assignment-professional-distance-group {
  display: grid;
  gap: 10px;
}

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

.assignment-professional-distance-head h4 {
  margin: 0;
  color: var(--navy);
  font-size: 0.94rem;
}

.assignment-professional-distance-head span {
  min-width: 28px;
  border-radius: 999px;
  background: #f1f5f9;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 850;
  line-height: 1;
  padding: 6px 8px;
  text-align: center;
}

.assignment-professional-result-card {
  border: 1px solid var(--line);
  border-radius: 4px;
  background: #ffffff;
  padding: 12px;
}

.assignment-professional-result-main {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
}

.assignment-professional-result-main h3 {
  margin: 0;
  color: var(--navy);
  font-size: 1rem;
}

.assignment-professional-result-main p,
.assignment-professional-result-main small {
  display: block;
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 0.82rem;
  overflow-wrap: anywhere;
}

.assignment-professional-meta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 8px;
}

.assignment-professional-meta-pill {
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #f8fafc;
  color: var(--muted);
  font-size: 0.74rem;
  font-weight: 850;
  line-height: 1.2;
  padding: 4px 7px;
}

.assignment-professional-meta-pill.is-member {
  border-color: rgba(22, 163, 74, 0.25);
  background: rgba(22, 163, 74, 0.09);
  color: #15803d;
}

.assignment-professional-meta-pill.is-pending {
  border-color: rgba(217, 119, 6, 0.28);
  background: rgba(217, 119, 6, 0.1);
  color: #92400e;
}

.assignment-professional-meta-pill.is-none {
  border-color: rgba(31, 88, 222, 0.24);
  background: var(--accent-soft);
  color: var(--accent);
}

.assignment-professional-meta-pill.is-availability-known {
  border-color: rgba(13, 148, 136, 0.28);
  background: rgba(13, 148, 136, 0.1);
  color: #0f766e;
}

.assignment-professional-meta-pill.is-assignment-known {
  border-color: rgba(79, 70, 229, 0.26);
  background: rgba(79, 70, 229, 0.09);
  color: #4338ca;
}

.assignment-professional-result-actions {
  display: grid;
  justify-items: end;
  gap: 8px;
  flex: 0 0 auto;
}

.assignment-professional-score-row {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 6px;
}

.assignment-professional-error {
  color: var(--rose) !important;
}

.assignment-professional-fit-empty {
  margin: 10px 0 0;
  color: var(--muted);
  font-size: 0.82rem;
}

.assignment-professional-fit-details {
  margin-top: 12px;
  border-top: 1px solid var(--line);
  padding-top: 10px;
}

.assignment-professional-fit-details summary {
  cursor: pointer;
  color: var(--accent);
  font-size: 0.84rem;
  font-weight: 850;
}

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

.assignment-professional-fit-grid h4 {
  margin: 0 0 8px;
  color: var(--navy);
  font-size: 0.9rem;
}

@media (max-width: 720px) {
  .assignment-professional-result-main {
    display: grid;
  }

  .assignment-professional-result-actions {
    justify-items: start;
  }

  .assignment-professional-score-row {
    justify-content: flex-start;
  }

  .assignment-professional-button-row {
    justify-content: flex-start;
  }

  .assignment-professional-fit-grid {
    grid-template-columns: 1fr;
  }
}

.assignment-fit-summary {
  display: grid;
  gap: 8px;
  margin: 0 0 12px;
  border: 1px solid rgba(31, 88, 222, 0.14);
  border-radius: 4px;
  padding: 10px;
  background: #f8fbff;
}

.assignment-fit-summary strong {
  color: var(--navy);
  font-size: 0.86rem;
  font-weight: 850;
  line-height: 1.3;
}

.assignment-fit-muted,
.assignment-fit-error,
.assignment-fit-loading {
  margin: 0;
  color: var(--muted);
  font-size: 0.86rem;
  font-weight: 700;
  line-height: 1.45;
}

.powerapps-submit-progress {
  display: grid;
  gap: 0.55rem;
  margin: 1.25rem 0 0;
  padding: 0;
  list-style: none;
}

.powerapps-sync-progress {
  margin: 0 0 1.25rem;
  padding: 1rem 1.15rem;
  border: 1px solid #dbeafe;
  border-radius: 14px;
  background: #f8fbff;
}

.powerapps-sync-progress .powerapps-submit-progress {
  margin: 0;
}

.powerapps-submit-progress-item {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  color: var(--muted, #64748b);
}

.powerapps-submit-progress-item > span {
  display: grid;
  flex: 0 0 1.75rem;
  width: 1.75rem;
  height: 1.75rem;
  place-items: center;
  border: 1px solid #cbd5e1;
  border-radius: 50%;
  background: #fff;
  font-size: 0.78rem;
  font-weight: 700;
}

.powerapps-submit-progress-item div,
.powerapps-submit-progress-item strong,
.powerapps-submit-progress-item small {
  display: block;
}

.powerapps-submit-progress-item strong {
  padding-top: 0.25rem;
  color: inherit;
}

.powerapps-submit-progress-item small {
  margin-top: 0.2rem;
}

.powerapps-submit-progress-item.is-active {
  color: #1d4ed8;
}

.powerapps-submit-progress-item.is-active > span {
  border-color: #2563eb;
  background: #dbeafe;
}

.powerapps-submit-progress-item.is-complete {
  color: #15803d;
}

.powerapps-submit-progress-item.is-complete > span {
  border-color: #22c55e;
  background: #dcfce7;
}

.powerapps-submit-progress-item.is-error {
  color: #b91c1c;
}

.powerapps-submit-progress-item.is-error > span {
  border-color: #ef4444;
  background: #fee2e2;
}

.assignment-fit-error {
  color: var(--rose);
}

.assignment-fit-loading {
  display: inline-flex;
  align-items: center;
  gap: 9px;
}

.assignment-fit-loading span {
  width: 16px;
  height: 16px;
  flex: 0 0 auto;
  border: 2px solid rgba(31, 88, 222, 0.16);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: assignment-fit-spin 780ms linear infinite;
}

@keyframes assignment-fit-spin {
  to {
    transform: rotate(360deg);
  }
}

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

.assignment-fit-list li {
  display: grid;
  gap: 7px;
  border-top: 1px solid rgba(209, 218, 244, 0.7);
  padding-top: 10px;
}

.assignment-fit-list li:first-child {
  border-top: 0;
  padding-top: 0;
}

.assignment-fit-detail {
  min-width: 0;
}

.assignment-fit-detail summary {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  align-items: start;
  min-width: 0;
  cursor: pointer;
  list-style: none;
}

.assignment-fit-detail summary::-webkit-details-marker {
  display: none;
}

.assignment-fit-detail summary::before {
  content: "+";
  grid-column: 1 / -1;
  display: none;
}

.assignment-fit-detail summary span {
  min-width: 0;
  color: var(--ink);
  font-size: 0.86rem;
  font-weight: 800;
  line-height: 1.35;
  overflow-wrap: anywhere;
}

.assignment-fit-detail summary span::after {
  content: "  +";
  color: var(--accent);
  font-weight: 900;
}

.assignment-fit-detail[open] summary span::after {
  content: "  -";
}

.assignment-fit-list p {
  margin: 0;
  color: var(--muted);
  font-size: 0.8rem;
  font-weight: 650;
  line-height: 1.4;
}

.assignment-fit-badge,
.assignment-fit-score {
  display: inline-grid;
  min-height: 26px;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 4px;
  padding: 4px 7px;
  background: #f8fafc;
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 850;
  white-space: nowrap;
}

.assignment-fit-badge.is-ja {
  border-color: rgba(37, 128, 90, 0.25);
  background: rgba(37, 128, 90, 0.1);
  color: #1f6b4d;
}

.assignment-fit-badge.is-deels {
  border-color: rgba(196, 127, 38, 0.25);
  background: rgba(196, 127, 38, 0.1);
  color: #975d18;
}

.assignment-fit-badge.is-nee {
  border-color: rgba(190, 71, 85, 0.25);
  background: rgba(190, 71, 85, 0.1);
  color: #9f3342;
}

.assignment-fit-meter {
  height: 6px;
  overflow: hidden;
  border-radius: 999px;
  background: #e7edf8;
}

.assignment-fit-meter span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--orange), var(--accent));
}

.assignment-apply-card {
  display: grid;
  gap: 12px;
  border: 1px solid var(--line);
  border-radius: 4px;
  padding: 14px;
  background: #ffffff;
  box-shadow: 0 8px 20px rgba(24, 34, 48, 0.06);
}

.assignment-apply-overview {
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  border-color: rgba(31, 88, 222, 0.2);
  background: linear-gradient(135deg, #ffffff 0%, #f7fbff 100%);
}

.assignment-apply-stats {
  display: grid;
  grid-template-columns: repeat(2, minmax(96px, 1fr));
  gap: 8px;
  margin: 0;
}

.assignment-apply-stats div {
  display: grid;
  gap: 4px;
  min-width: 0;
  border: 1px solid rgba(209, 218, 244, 0.84);
  border-radius: 4px;
  padding: 10px;
  background: #ffffff;
}

.assignment-apply-stats dt {
  margin: 0;
  color: var(--muted);
  font-size: 0.7rem;
  font-weight: 850;
  line-height: 1.2;
}

.assignment-apply-stats dd {
  margin: 0;
  color: var(--navy);
  font-size: 1.1rem;
  font-weight: 900;
  line-height: 1;
}

.assignment-rate-insight-stats {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.assignment-apply-section-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  border-bottom: 1px solid rgba(209, 218, 244, 0.72);
  padding-bottom: 12px;
}

.assignment-apply-collapsible > summary {
  cursor: pointer;
  list-style: none;
  user-select: none;
}

.assignment-apply-collapsible > summary::-webkit-details-marker {
  display: none;
}

.assignment-apply-collapse-meta {
  display: inline-flex;
  align-items: center;
  gap: 10px;
}

.assignment-apply-collapse-icon {
  width: 9px;
  height: 9px;
  border-right: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
  transform: rotate(45deg);
  transition: transform 160ms ease;
}

.assignment-apply-collapsible:not([open]) .assignment-apply-collapse-icon {
  transform: rotate(-45deg);
}

.assignment-apply-collapsible-content {
  margin-top: 18px;
}

.assignment-apply-section-head > span {
  flex: 0 0 auto;
  border: 1px solid rgba(209, 218, 244, 0.86);
  border-radius: 4px;
  padding: 5px 8px;
  background: #f8fafc;
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 850;
  line-height: 1.2;
}

.assignment-apply-kicker {
  display: block;
  margin-bottom: 4px;
  color: var(--muted);
  font-size: 0.7rem;
  font-weight: 900;
  line-height: 1.2;
  text-transform: uppercase;
}

.assignment-apply-card.is-saved {
  border-color: rgba(37, 128, 90, 0.25);
  background: rgba(37, 128, 90, 0.06);
}

.assignment-apply-card h3 {
  margin: 0;
  color: var(--navy);
  font-size: 0.95rem;
  line-height: 1.2;
}

.assignment-apply-form,
.assignment-apply-fields {
  display: grid;
  gap: 14px;
}

.assignment-application-page {
  display: grid;
  gap: 16px;
  max-width: 920px;
}

.assignment-application-stepper {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 4px;
  background: #ffffff;
}

.assignment-application-stepper.has-three-steps {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.assignment-mode-switch {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 6px;
}

.assignment-mode-switch > span {
  margin-right: 4px;
  color: var(--muted);
  font-size: .78rem;
  font-weight: 800;
}

.assignment-mode-switch button {
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 6px 10px;
  background: #fff;
  color: var(--muted);
  font: inherit;
  font-size: .76rem;
  font-weight: 850;
  cursor: pointer;
}

.assignment-mode-switch button.is-active {
  border-color: var(--accent);
  background: #eef4ff;
  color: var(--accent-dark);
}

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

.assignment-mode-options button {
  display: grid;
  gap: 7px;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 20px;
  background: #fff;
  color: var(--ink);
  font: inherit;
  text-align: left;
  cursor: pointer;
}

.assignment-mode-options button:hover { border-color: var(--accent); background: #f7faff; }
.assignment-mode-options strong { color: var(--navy); font-size: 1rem; }
.assignment-mode-options span { color: var(--muted); font-size: .84rem; line-height: 1.45; }

.traditional-cv-layout {
  display: grid;
  grid-template-columns: minmax(0, .9fr) minmax(0, 1.1fr);
  gap: 16px;
  align-items: start;
}

.traditional-cv-upload { display: grid; gap: 14px; }
.traditional-cv-upload label { display: grid; gap: 7px; font-weight: 800; }
.traditional-cv-file-field input[type="file"] {
  width: 100%;
  border: 1px dashed #aebbd0;
  border-radius: 6px;
  padding: 10px;
  background: #f8fafc;
  color: var(--ink);
  font: inherit;
  font-size: .82rem;
  cursor: pointer;
}

.traditional-cv-file-field input[type="file"]::file-selector-button {
  margin-right: 10px;
  border: 0;
  border-radius: 4px;
  padding: 8px 11px;
  background: var(--navy);
  color: #fff;
  font: inherit;
  font-weight: 850;
  cursor: pointer;
}

.traditional-cv-file-field input[type="file"]:focus-visible {
  border-color: var(--accent);
  outline: 2px solid rgba(42, 105, 190, .22);
  outline-offset: 2px;
}

.traditional-cv-file-field small { color: var(--muted); font-size: .74rem; font-weight: 700; }
.traditional-cv-warning {
  margin: 0;
  border-left: 3px solid #d58b16;
  padding: 9px 11px;
  background: #fff8e8;
  color: #79500d;
  font-size: .8rem;
  font-weight: 750;
  line-height: 1.45;
}
.traditional-analysis-refreshing {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0;
  color: var(--muted);
  font-size: .78rem;
  font-weight: 800;
}

.assignment-fit-value-spinner {
  display: inline-block;
  width: 16px;
  height: 16px;
  border: 2px solid rgba(31, 88, 222, .16);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: assignment-fit-spin 780ms linear infinite;
}

.assignment-fit-summary.is-refreshing strong,
.assignment-fit-badge.is-refreshing {
  display: inline-flex;
  align-items: center;
  min-width: 38px;
  justify-content: center;
}
.traditional-cv-analysis { display: grid; gap: 12px; }
.traditional-cv-analysis > h3 { margin: 0; color: var(--navy); }

.application-match-overall {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 8px 12px;
  border: 1px solid rgba(31, 88, 222, .2);
  border-radius: 4px;
  padding: 12px 14px;
  background: #f8fbff;
  color: var(--navy);
  font-size: .88rem;
  font-weight: 800;
}

.application-match-overall strong { color: var(--accent); font-size: 1.25rem; }
.application-match-overall .assignment-fit-meter { grid-column: 1 / -1; }
.application-match-breakdown { display: grid; gap: 8px; }
.application-match-category { border: 1px solid var(--line); border-radius: 4px; background: #fff; }
.application-match-category summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 14px;
  cursor: pointer;
  list-style: none;
}
.application-match-category summary::-webkit-details-marker { display: none; }
.application-match-category summary h3,
.application-match-category summary h4 { margin: 0; color: var(--navy); font-size: .92rem; }
.application-match-category-meta { display: flex; align-items: center; gap: 10px; color: var(--accent); }
.application-match-category-icon { width: 8px; height: 8px; border-right: 2px solid currentColor; border-bottom: 2px solid currentColor; transform: rotate(45deg); transition: transform 160ms ease; }
.application-match-category[open] .application-match-category-icon { transform: rotate(225deg); }
.application-match-category-content { border-top: 1px solid var(--line); padding: 0 14px 12px; }

@media (max-width: 760px) {
  .assignment-mode-options, .traditional-cv-layout { grid-template-columns: 1fr; }
}

.assignment-application-step {
  position: relative;
  display: flex;
  gap: 7px;
  align-items: center;
  width: 100%;
  min-width: 0;
  border: 0;
  padding: 10px 8px;
  background: transparent;
  color: var(--muted);
  font: inherit;
  text-align: left;
}

.assignment-application-step + .assignment-application-step {
  border-left: 1px solid var(--line);
}

.assignment-application-step-index {
  display: inline-grid;
  width: 24px;
  height: 24px;
  flex: 0 0 auto;
  place-items: center;
  border: 1px solid #cfd8e7;
  border-radius: 999px;
  background: #f7f9fc;
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 900;
}

.assignment-application-step-text {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.assignment-application-step-text strong,
.assignment-application-step-text small {
  overflow: hidden;
  line-height: 1.2;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.assignment-application-step-text strong {
  color: inherit;
  font-size: 0.78rem;
  font-weight: 900;
}

.assignment-application-step-text small {
  font-size: 0.68rem;
  font-weight: 800;
}

.assignment-application-step.is-current {
  background: #eef4ff;
  color: var(--accent-dark);
}

.assignment-application-step.is-current .assignment-application-step-index {
  border-color: var(--accent);
  background: var(--accent);
  color: #ffffff;
}

.assignment-application-step.is-complete {
  background: rgba(37, 128, 90, 0.06);
  color: #1f6b4d;
}

button.assignment-application-step.is-complete {
  cursor: pointer;
}

button.assignment-application-step.is-complete:hover,
button.assignment-application-step.is-complete:focus-visible {
  background: rgba(37, 128, 90, 0.12);
  outline: none;
}

button.assignment-application-step.is-complete:focus-visible {
  box-shadow: inset 0 0 0 2px rgba(37, 128, 90, 0.45);
}

.assignment-application-step.is-complete .assignment-application-step-index {
  border-color: rgba(37, 128, 90, 0.38);
  background: #25805a;
  color: #ffffff;
}

.assignment-application-step.is-locked {
  background: #f1f5f9;
  color: #94a3b8;
  opacity: 0.78;
}

.assignment-application-step.is-locked .assignment-application-step-index {
  border-color: #cbd5e1;
  background: #e2e8f0;
  color: #64748b;
}

.assignment-back-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  justify-self: start;
  border: 1px solid var(--line);
  border-radius: 4px;
  padding: 8px 11px;
  background: #ffffff;
  color: var(--ink);
  font: inherit;
  font-size: 0.84rem;
  font-weight: 850;
  line-height: 1.2;
  text-align: center;
  text-decoration: none;
  cursor: pointer;
}

.assignment-back-button:hover,
.assignment-back-button:focus-visible {
  border-color: var(--accent);
  background: var(--accent-soft);
  color: var(--accent);
  outline: none;
}

.assignment-apply-field {
  position: relative;
  display: grid;
  gap: 10px;
  min-width: 0;
  border: 1px solid rgba(209, 218, 244, 0.82);
  border-left: 4px solid var(--accent);
  border-radius: 4px;
  padding: 12px;
  background: #fbfcff;
}

.assignment-apply-field.is-requirement {
  border-left-color: var(--rose);
}

.assignment-apply-field.is-wish {
  border-left-color: var(--accent);
}

.assignment-apply-field-head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  align-items: start;
}

.assignment-apply-field-title,
.assignment-apply-confirm span {
  color: var(--ink);
  font-size: 0.9rem;
  font-weight: 850;
  line-height: 1.35;
  overflow-wrap: anywhere;
}

.assignment-apply-field-database-id {
  margin-left: 4px;
  color: var(--muted);
  font-size: 0.75rem;
  font-weight: 650;
  white-space: nowrap;
}

.assignment-apply-field-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.assignment-apply-field-meta span {
  display: inline-grid;
  min-height: 23px;
  align-items: center;
  border: 1px solid rgba(209, 218, 244, 0.86);
  border-radius: 4px;
  padding: 3px 7px;
  background: #ffffff;
  color: var(--muted);
  font-size: 0.7rem;
  font-weight: 850;
  line-height: 1.2;
}

.assignment-apply-score {
  display: inline-grid;
  min-height: 28px;
  min-width: 54px;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(31, 88, 222, 0.18);
  border-radius: 4px;
  padding: 4px 8px;
  background: #eef4ff;
  color: var(--accent-dark);
  font-size: 0.78rem;
  font-weight: 900;
  line-height: 1;
  white-space: nowrap;
}

.assignment-apply-score.is-strong {
  border-color: rgba(37, 128, 90, 0.25);
  background: rgba(37, 128, 90, 0.12);
  color: #1f6b4d;
}

.assignment-apply-score.is-partial {
  border-color: rgba(196, 127, 38, 0.28);
  background: rgba(196, 127, 38, 0.12);
  color: #8a5312;
}

.assignment-apply-score.is-low {
  border-color: rgba(190, 71, 85, 0.28);
  background: rgba(190, 71, 85, 0.12);
  color: #9f3342;
}

.assignment-apply-confirm {
  display: flex;
  gap: 9px;
  align-items: flex-start;
  width: fit-content;
  cursor: pointer;
}

.assignment-apply-confirm input {
  width: 17px;
  height: 17px;
  margin: 1px 0 0;
  accent-color: var(--accent);
  flex: 0 0 auto;
}

.assignment-apply-explanation {
  display: grid;
  gap: 7px;
}

.assignment-apply-explanation[hidden] {
  display: none;
}

.assignment-apply-context {
  display: grid;
  gap: 4px;
  border: 1px solid rgba(209, 218, 244, 0.72);
  border-radius: 4px;
  padding: 9px 10px;
  background: #ffffff;
}

.assignment-apply-context strong {
  color: var(--navy);
  font-size: 0.72rem;
  font-weight: 900;
  line-height: 1.2;
  text-transform: uppercase;
}

.assignment-apply-context span {
  color: var(--muted);
  font-size: 0.8rem;
  font-weight: 700;
  line-height: 1.45;
  overflow-wrap: anywhere;
}

.assignment-apply-field small {
  color: var(--muted);
  font-size: 0.76rem;
  font-weight: 800;
  line-height: 1.35;
}

.assignment-apply-field em {
  border-left: 3px solid rgba(31, 88, 222, 0.25);
  padding: 8px 10px;
  background: #f6f8fd;
  color: var(--muted);
  font-size: 0.78rem;
  font-style: normal;
  font-weight: 700;
  line-height: 1.45;
}

.assignment-apply-validation {
  margin: 0;
  border-radius: 4px;
  padding: 8px 10px;
  font-size: 0.78rem;
  font-weight: 800;
  line-height: 1.45;
}

.assignment-apply-validation.is-error {
  border: 1px solid rgba(190, 71, 85, 0.25);
  background: rgba(190, 71, 85, 0.08);
  color: #8f2634;
}

.assignment-apply-validation.is-pending {
  border: 1px solid rgba(31, 88, 222, 0.22);
  background: rgba(31, 88, 222, 0.08);
  color: var(--accent-dark);
}

.assignment-apply-validation.is-success {
  border: 1px solid rgba(37, 128, 90, 0.25);
  background: rgba(37, 128, 90, 0.09);
  color: #1f6b4d;
}

.assignment-apply-rate-field {
  display: grid;
  gap: 7px;
}

.assignment-apply-rate-field span {
  color: var(--ink);
  font-size: 0.86rem;
  font-weight: 850;
  line-height: 1.35;
}

.assignment-apply-field textarea,
.assignment-apply-rate-field input {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 4px;
  padding: 10px 11px;
  background: #fbfcfd;
  color: var(--ink);
  font: inherit;
  font-size: 0.88rem;
  line-height: 1.45;
}

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

.assignment-apply-rate-field input {
  max-width: 220px;
}

.assignment-apply-field textarea:focus,
.assignment-apply-rate-field input:focus {
  border-color: var(--accent);
  outline: 3px solid rgba(31, 88, 222, 0.14);
}

.assignment-suggestion-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.assignment-suggestion-button {
  min-height: 32px;
  border: 1px solid rgba(31, 88, 222, 0.22);
  border-radius: 4px;
  padding: 7px 10px;
  background: #ffffff;
  color: var(--accent-dark);
  font: inherit;
  font-size: 0.78rem;
  font-weight: 850;
  line-height: 1.2;
  cursor: pointer;
}

.assignment-suggestion-button:hover,
.assignment-suggestion-button:focus-visible {
  border-color: rgba(31, 88, 222, 0.42);
  background: rgba(31, 88, 222, 0.06);
  outline: none;
}

.assignment-suggestion-button:disabled {
  cursor: wait;
  opacity: 0.7;
}

.assignment-suggestion-status {
  color: var(--muted);
  font-size: 0.76rem;
  font-weight: 800;
}

.assignment-suggestion-button.is-accept {
  border-color: rgba(16, 122, 75, 0.32);
  background: rgba(16, 122, 75, 0.08);
  color: #0b7042;
}

.assignment-suggestion-bulk-actions {
  display: flex;
  justify-content: flex-end;
  margin-top: 14px;
}

.assignment-apply-actions {
  display: flex;
  gap: 10px;
  justify-content: flex-end;
  flex-wrap: wrap;
}

.assignment-apply-footer {
  display: grid;
  gap: 10px;
}

.assignment-apply-footer > .assignment-apply-validation {
  width: 100%;
  text-align: left;
}

.assignment-apply-actions.is-split {
  align-items: center;
  justify-content: space-between;
}

.assignment-apply-next-actions {
  align-items: flex-end;
  flex-direction: column;
}

.assignment-apply-next-actions .assignment-apply-validation {
  margin: 0;
  max-width: 680px;
  text-align: right;
}

.assignment-apply-button {
  display: inline-flex;
  min-height: 38px;
  align-items: center;
  justify-content: center;
  border: 0;
  border-radius: 4px;
  padding: 9px 13px;
  background: var(--accent);
  color: #ffffff;
  font: inherit;
  font-size: 0.84rem;
  font-weight: 850;
  line-height: 1.2;
  text-align: center;
  text-decoration: none;
  cursor: pointer;
}

.assignment-apply-button:hover,
.assignment-apply-button:focus-visible {
  background: #1748b4;
  outline: none;
}

.assignment-apply-button:disabled {
  background: #9aa7bd;
  color: #eef2f7;
  cursor: not-allowed;
}

.tailored-cv-page {
  --tailored-cv-fit-width: 260px;
  --tailored-cv-workspace-gap: 18px;
  max-width: 1280px;
}

.tailored-cv-page > .assignment-application-stepper {
  width: min(100%, calc(100% - var(--tailored-cv-fit-width) - var(--tailored-cv-workspace-gap)));
  justify-self: start;
}

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

.tailored-cv-document {
  display: grid;
  gap: 18px;
  border: 1px solid var(--line);
  border-radius: 4px;
  background: #ffffff;
  padding: clamp(18px, 3vw, 30px);
  box-shadow: 0 12px 28px rgba(24, 34, 48, 0.07);
}

.tailored-cv-workspace {
  display: grid;
  grid-template-columns: minmax(0, 1fr) var(--tailored-cv-fit-width);
  gap: var(--tailored-cv-workspace-gap);
  align-items: start;
}

.tailored-cv-main {
  display: grid;
  gap: 18px;
  min-width: 0;
}

.tailored-cv-fit-panel {
  position: sticky;
  top: 18px;
  display: grid;
  gap: 14px;
  max-height: calc(100vh - 72px);
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: 4px;
  background: #ffffff;
  padding: 14px;
  box-shadow: 0 12px 28px rgba(24, 34, 48, 0.07);
}

.tailored-cv-fit-panel h3,
.tailored-cv-fit-panel h4,
.tailored-cv-fit-panel p {
  margin: 0;
}

.tailored-cv-fit-panel h3 {
  color: var(--navy);
  font-size: 1.05rem;
  line-height: 1.2;
}

.tailored-cv-fit-section {
  display: grid;
  gap: 10px;
  border-top: 1px solid var(--line);
  padding-top: 13px;
}

.tailored-cv-fit-section h4 {
  color: var(--navy);
  font-size: 0.92rem;
}

.tailored-cv-fit-panel .assignment-fit-list {
  gap: 8px;
}

.tailored-cv-fit-panel .assignment-fit-list li {
  padding: 9px 0 0;
}

.tailored-cv-fit-panel .assignment-fit-detail summary {
  grid-template-columns: minmax(0, 1fr);
  gap: 6px;
}

.tailored-cv-tabs {
  display: inline-flex;
  width: fit-content;
  max-width: 100%;
  border: 1px solid var(--line);
  border-radius: 4px;
  overflow: hidden;
  background: #ffffff;
}

.tailored-cv-tab {
  border: 0;
  border-right: 1px solid var(--line);
  background: #ffffff;
  color: var(--muted);
  padding: 9px 14px;
  font: inherit;
  font-size: 0.86rem;
  font-weight: 850;
  cursor: pointer;
}

.tailored-cv-tab:last-child {
  border-right: 0;
}

.tailored-cv-tab.is-active,
.tailored-cv-tab:hover,
.tailored-cv-tab:focus-visible {
  background: var(--accent-soft);
  color: var(--accent);
  outline: none;
}

.tailored-cv-section {
  display: grid;
  gap: 10px;
}

.tailored-cv-section h3,
.tailored-cv-section h4,
.tailored-cv-section p,
.tailored-cv-section ul {
  margin: 0;
}

.tailored-cv-section h3 {
  color: var(--navy);
  font-size: clamp(1.25rem, 2vw, 1.65rem);
  line-height: 1.15;
}

.tailored-cv-section h4 {
  color: var(--navy);
  font-size: 0.98rem;
  line-height: 1.25;
}

.tailored-cv-section p,
.tailored-cv-section li {
  color: var(--ink);
  font-size: 0.92rem;
  line-height: 1.55;
}

.tailored-cv-section ul {
  display: grid;
  gap: 6px;
  padding-left: 18px;
}

.tailored-cv-naw {
  border-bottom: 1px solid var(--line);
  padding-bottom: 14px;
}

.tailored-cv-naw ul {
  display: flex;
  flex-wrap: wrap;
  gap: 7px 14px;
  padding-left: 0;
  list-style: none;
}

.tailored-cv-summary-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.tailored-cv-summary-group {
  display: grid;
  align-content: start;
  gap: 8px;
  border: 1px solid var(--line);
  border-radius: 4px;
  background: #f8fafc;
  padding: 12px;
}

.tailored-cv-background-group {
  gap: 14px;
}

.tailored-cv-summary-subgroup {
  display: grid;
  gap: 8px;
}

.tailored-cv-summary-subgroup + .tailored-cv-summary-subgroup {
  border-top: 1px solid var(--line);
  padding-top: 12px;
}

.tailored-cv-experience {
  display: grid;
  gap: 7px;
  border-top: 1px solid var(--line);
  padding-top: 13px;
}

.tailored-cv-soft-skill-appendix {
  border-top: 2px solid var(--navy);
  padding-top: 18px;
}

.tailored-cv-soft-skill-entry {
  display: grid;
  gap: 5px;
  border: 1px solid var(--line);
  border-radius: 4px;
  background: #f8fafc;
  padding: 12px;
}

.tailored-cv-meta {
  color: var(--muted) !important;
  font-size: 0.82rem !important;
  font-weight: 800;
}

.tailored-cv-experience-skills {
  display: grid;
  gap: 6px;
}

.tailored-cv-experience-skills strong {
  color: var(--muted);
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0;
}

.tailored-cv-experience-skills ul {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  padding-left: 0;
  list-style: none;
}

.tailored-cv-experience-skills li {
  border: 1px solid var(--line);
  border-radius: 4px;
  background: #f8fafc;
  padding: 3px 7px;
  font-size: 0.82rem;
  line-height: 1.35;
}

.tailored-cover-sheet {
  border-bottom: 1px solid var(--line);
  padding-bottom: 14px;
}

.tailored-cover-category {
  gap: 12px;
}

.tailored-cover-list {
  display: grid;
  gap: 10px;
}

.tailored-cover-item {
  display: grid;
  gap: 8px;
  border: 1px solid var(--line);
  border-radius: 4px;
  background: #f8fafc;
  padding: 12px;
}

.tailored-cover-item-head {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: space-between;
  gap: 8px;
}

.tailored-cover-item-head strong {
  color: var(--navy);
  font-size: 0.95rem;
  line-height: 1.35;
}

.tailored-cover-item-head span {
  border: 1px solid rgba(37, 128, 90, 0.24);
  border-radius: 4px;
  background: rgba(37, 128, 90, 0.09);
  color: #1f6b4d;
  padding: 3px 7px;
  font-size: 0.76rem;
  font-weight: 850;
}

.tailored-cover-candidate-input {
  border-left: 3px solid rgba(37, 128, 90, 0.28);
  padding-left: 10px;
  color: var(--ink);
}

.tailored-motivation {
  max-width: 760px;
}

.tailored-motivation p {
  font-size: 0.96rem;
}

.tailored-cv-tune-card {
  gap: 12px;
}

.tailored-cv-tune-form {
  display: grid;
  gap: 12px;
}

.tailored-cv-tune-form .assignment-apply-field {
  margin: 0;
}

.tailored-cv-tune-form .assignment-apply-field > span {
  color: var(--navy);
  font-size: 0.9rem;
  font-weight: 800;
}

.tailored-cv-tune-form [data-tailored-cv-tune-status] {
  margin-right: auto;
}

.tailored-cv-tuning-note {
  background: rgba(37, 128, 90, 0.08);
  border: 1px solid rgba(37, 128, 90, 0.22);
  border-radius: 8px;
  display: grid;
  gap: 8px;
  padding: 14px 16px;
}

.tailored-cv-tuning-note p {
  margin: 0;
}

@media (max-width: 760px) {
  .tailored-cv-page > .assignment-application-stepper {
    width: 100%;
  }

  .tailored-cv-workspace {
    grid-template-columns: 1fr;
  }

  .tailored-cv-fit-panel {
    position: static;
    max-height: none;
  }

  .tailored-cv-summary-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 720px) {
  .assignment-apply-actions.is-split {
    align-items: stretch;
    flex-direction: column-reverse;
  }

  .assignment-apply-actions.is-split .assignment-apply-button,
  .assignment-apply-actions.is-split .assignment-back-button {
    width: 100%;
  }

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

  .assignment-apply-stats {
    grid-template-columns: 1fr 1fr;
    width: 100%;
  }

  .assignment-apply-section-head {
    display: grid;
  }

  .assignment-apply-section-head > span {
    justify-self: start;
  }

  .assignment-apply-field-head {
    grid-template-columns: 1fr;
  }

  .assignment-apply-score {
    justify-self: start;
  }

  .assignment-application-stepper {
    grid-template-columns: 1fr;
  }

  .assignment-application-step + .assignment-application-step {
    border-top: 1px solid var(--line);
    border-left: 0;
  }
}

.assignment-detail-html {
  color: var(--ink);
  font-size: 0.96rem;
  line-height: 1.6;
  max-width: none;
}

.assignment-detail-html > :first-child {
  margin-top: 0;
}

.assignment-detail-html > :last-child {
  margin-bottom: 0;
}

.assignment-detail-html h1,
.assignment-detail-html h2,
.assignment-detail-html h3 {
  margin: 22px 0 10px;
  color: var(--navy);
  font-size: 1.05rem;
  line-height: 1.3;
}

.assignment-detail-html p,
.assignment-detail-html ul,
.assignment-detail-html ol {
  margin: 0 0 12px;
}

.assignment-detail-html ul,
.assignment-detail-html ol {
  padding-left: 22px;
}

.assignment-detail-html a {
  color: var(--accent);
  font-weight: 700;
}

.members-panel {
  padding: 24px;
}

.member-search {
  display: grid;
  gap: 8px;
  margin-top: 18px;
  max-width: 420px;
}

.member-search span {
  color: var(--ink);
  font-weight: 800;
}

.member-chat-layout {
  display: grid;
  grid-template-columns: minmax(220px, 300px) minmax(0, 1fr);
  gap: 18px;
  margin-top: 18px;
  min-height: 520px;
}

.member-list {
  display: grid;
  align-content: start;
  gap: 12px;
  border-right: 1px solid var(--border);
  padding-right: 16px;
}

.member-card {
  display: grid;
  grid-template-columns: 46px minmax(0, 1fr);
  gap: 12px;
  align-items: start;
  border: 1px solid var(--line);
  border-radius: 4px;
  padding: 14px;
  background: #ffffff;
  color: var(--ink);
  cursor: pointer;
  text-align: left;
}

.member-card:hover,
.member-card.is-active {
  border-color: rgba(47, 111, 237, 0.42);
  background: #f4f7ff;
}

.member-avatar {
  display: grid;
  place-items: center;
  width: 46px;
  height: 46px;
  border-radius: 4px;
  background: var(--accent-soft);
  color: var(--accent);
  font-weight: 800;
}

.group-avatar {
  background: #e7f7ef;
  color: #16784a;
}

.member-main {
  min-width: 0;
}

.member-main h3 {
  margin: 0 0 4px;
  color: var(--ink);
  font-size: 1rem;
  line-height: 1.25;
}

.member-main span {
  display: inline-block;
  max-width: 100%;
  color: var(--accent-dark);
  font-weight: 700;
  overflow-wrap: anywhere;
}

.member-main p {
  margin: 6px 0 0;
  color: var(--muted);
  font-size: 0.92rem;
  line-height: 1.35;
}

.training-section {
  display: grid;
  gap: 12px;
}

.training-section h3 {
  margin: 0;
  color: var(--blue);
  font-size: 0.95rem;
  font-weight: 800;
}

.training-card {
  display: grid;
  position: relative;
  gap: 12px;
  align-content: start;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 20px;
  background: white;
  box-shadow: 0 4px 16px rgba(6, 38, 90, 0.05);
}

.training-card::before {
  position: absolute;
  inset: 0 0 auto;
  height: 4px;
  background: linear-gradient(90deg, #36139b, #16b7ee);
  content: "";
}

.certification-card {
  border-top: 1px solid var(--line);
}

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

.training-card-identity {
  display: flex;
  min-width: 0;
  align-items: center;
  gap: 12px;
}

.training-monogram {
  display: grid;
  flex: 0 0 44px;
  width: 44px;
  height: 44px;
  place-items: center;
  border-radius: 10px;
  background: linear-gradient(135deg, #371099, #1468e8);
  color: #fff;
  font-size: 0.72rem;
  font-weight: 800;
}

.training-card-title {
  min-width: 0;
}

.training-card-title p {
  margin-top: 4px;
  font-size: 0.78rem;
}

.training-card h3 {
  margin: 0;
  color: var(--ink);
  font-size: 0.98rem;
  line-height: 1.3;
}

.training-card p {
  margin: 0;
  color: var(--muted);
  line-height: 1.45;
}

.training-match {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  border-radius: 6px;
  padding: 0 9px;
  background: #eef3ff;
  color: var(--accent);
  font-size: 0.8rem;
  font-weight: 800;
  white-space: nowrap;
}

.training-match.is-high {
  background: #eaf9ef;
  color: #159447;
}

.training-match.is-medium {
  background: #fff6df;
  color: #c87800;
}

.training-meta {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  margin: 0;
  border-top: 1px solid var(--line);
  padding-top: 14px;
}

.training-meta div {
  min-width: 0;
}

.training-meta dt {
  margin-bottom: 4px;
  color: var(--muted);
  font-size: 0.68rem;
  font-weight: 800;
  text-transform: uppercase;
}

.training-meta dd {
  margin: 0;
  color: var(--ink);
  font-size: 0.84rem;
  font-weight: 750;
}

.training-why {
  border: 1px solid #cfe0ff;
  border-radius: 8px;
  padding: 12px 14px;
  background: #f8faff;
}

.training-why strong {
  display: block;
  margin-bottom: 6px;
  color: var(--accent);
  font-size: 0.74rem;
  letter-spacing: 0.035em;
  text-transform: uppercase;
}

.training-why p {
  font-size: 0.84rem;
}

.training-steps summary {
  color: var(--accent);
  font-size: 0.84rem;
  font-weight: 750;
  cursor: pointer;
}

.training-steps ol {
  margin-top: 10px;
  font-size: 0.84rem;
}

.training-card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: auto;
  border-top: 1px solid #edf1f7;
  padding-top: 12px;
  color: var(--muted);
  font-size: 0.8rem;
}

.training-card-footer .training-links {
  justify-content: flex-end;
}

.certification-steps {
  margin: 0;
  padding-left: 22px;
  color: var(--ink);
  line-height: 1.45;
}

.training-links,
.tag-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.training-link {
  border: 1px solid var(--line);
  border-radius: 7px;
  padding: 9px 16px;
  background: var(--accent);
  color: #fff;
  font-size: 0.86rem;
  font-weight: 750;
  text-decoration: none;
}

.training-link:hover {
  border-color: var(--accent);
  background: var(--accent-dark);
  color: #fff;
}

.training-link.is-muted {
  color: var(--muted);
  background: #fff;
}

@media (max-width: 960px) {
  .training-list {
    grid-template-columns: 1fr;
  }
}

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

  .training-intro {
    padding: 16px;
  }

  .training-intro-icon {
    display: none;
  }

  .training-meta {
    gap: 10px;
  }

  .training-card-footer {
    align-items: flex-start;
    flex-direction: column;
  }
}

.matches {
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 4px;
  background: var(--panel);
  box-shadow: var(--shadow);
  padding: 24px;
}

.all-results {
  padding: 24px;
}

.sticky-head {
  position: sticky;
  top: 0;
  z-index: 2;
  margin: -24px -24px 0;
  border-bottom: 1px solid var(--line);
  padding: 18px 24px;
  background: var(--panel);
}

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

.score-filter {
  display: grid;
  gap: 8px;
  margin: 18px 0 16px;
  border-bottom: 1px solid var(--line);
  padding: 0 0 16px;
}

.score-filter[hidden] {
  display: none;
}

.score-filter label {
  color: var(--muted);
  font-size: 0.86rem;
  font-weight: 700;
}

.score-filter-control {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 44px;
  gap: 12px;
  align-items: center;
}

.score-filter input[type="range"] {
  width: 100%;
  accent-color: var(--accent);
}

.score-filter output {
  display: grid;
  place-items: center;
  min-height: 32px;
  border-radius: 4px;
  background: var(--accent-soft);
  color: var(--accent);
  font-weight: 700;
}

.all-result-list {
  display: grid;
  gap: 18px;
  margin-top: 18px;
}

.result-group {
  display: grid;
  gap: 10px;
}

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

.result-group-head h3 {
  margin: 0;
  color: var(--ink);
  font-size: 1rem;
}

.result-group-list {
  display: grid;
  gap: 10px;
}

.match-card {
  display: grid;
  gap: 14px;
  border: 1px solid var(--line);
  border-left: 5px solid var(--accent);
  border-radius: 4px;
  padding: 18px;
  background: white;
  box-shadow: var(--shadow);
}

.match-top {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 14px;
  align-items: start;
}

.match-actions {
  display: flex;
  align-items: start;
  gap: 8px;
}

.match-remove-button {
  width: 36px;
  height: 36px;
  color: var(--rose);
  font-size: 1.15rem;
}

.match-title {
  margin: 0;
  font-size: 1.08rem;
  line-height: 1.25;
}

.matching-assignment-card .match-title {
  font-size: 1.02rem;
  line-height: 1.3;
}

.meta {
  margin: 5px 0 0;
  color: var(--muted);
  font-size: 0.92rem;
}

.matching-assignment-card .meta {
  margin-top: 6px;
  font-size: 0.88rem;
  font-weight: 700;
}

.score {
  display: grid;
  place-items: center;
  width: 58px;
  height: 58px;
  border-radius: 4px;
  background: var(--accent-soft);
  color: var(--accent);
  font-weight: 700;
}

.small-score {
  width: 46px;
  height: 46px;
  font-size: 0.9rem;
}

.all-result-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 14px;
  align-items: start;
  border: 1px solid var(--line);
  border-radius: 4px;
  padding: 14px;
  background: #ffffff;
}

.all-result-row.has-match-badges {
  grid-template-columns: minmax(110px, max-content) minmax(0, 1fr);
}

.all-result-score-badges {
  display: flex;
  flex-direction: column;
  gap: 6px;
  align-items: flex-start;
}

.all-result-main {
  min-width: 0;
}

.all-result-title-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.all-result-reason {
  margin: 8px 0 10px;
  color: var(--ink);
  line-height: 1.4;
}

.matching-assignment-card.match-card,
.matching-assignment-card.all-result-row {
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
  padding: 18px 18px 16px;
  cursor: pointer;
}

.matching-assignment-card.match-card .reason-list {
  margin-top: -2px;
}

.matching-assignment-card.all-result-row .all-result-reason {
  margin: 0;
}

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

.tag {
  border-radius: 999px;
  background: var(--accent-soft);
  color: var(--muted);
  padding: 5px 9px;
  font-size: 0.8rem;
  font-weight: 700;
}

.reason-list {
  margin: 0;
  padding-left: 18px;
  color: var(--ink);
  line-height: 1.45;
}

.concerns {
  margin: 0;
  color: var(--rose);
  line-height: 1.45;
}

.assignment-link {
  color: var(--accent-dark);
  font-weight: 700;
  text-decoration: none;
}

.title-link {
  color: inherit;
  text-decoration: none;
}

.matching-assignment-card .title-link {
  color: var(--ink);
}

.assignment-link:hover {
  text-decoration: underline;
}

.title-link:hover {
  color: var(--accent);
  text-decoration: underline;
}

.empty {
  border: 1px solid var(--line);
  border-radius: 4px;
  padding: 18px;
  background: white;
  color: var(--muted);
}

.loading-state {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 84px;
  border: 1px solid var(--line);
  border-radius: 4px;
  padding: 18px;
  background: white;
  color: var(--muted);
  font-weight: 750;
}

.spinner {
  width: 24px;
  height: 24px;
  flex: 0 0 auto;
  border: 3px solid #d8dfda;
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

@media (prefers-reduced-motion: reduce) {
  .spinner,
  .assignment-fit-loading span {
    animation: none;
  }
}

@media (max-width: 820px) {
  .shell {
    width: min(100% - 20px, 720px);
    padding-top: 14px;
  }

  .dashboard-shell {
    grid-template-columns: 1fr;
    min-height: auto;
  }

  #dashboard-shell {
    grid-template-columns: 1fr;
  }

  #dashboard-shell .dashboard-sidebar {
    width: min(86vw, 300px);
  }

  #dashboard-shell .dashboard-brand-logo {
    width: 100%;
  }

  .dashboard-sidebar {
    position: fixed;
    z-index: 1001;
    inset: 0 auto 0 0;
    width: min(86vw, 340px);
    min-height: 100dvh;
    overflow-y: auto;
    border-radius: 0;
    padding: 20px 16px;
    transform: translateX(-105%);
    transition: transform 180ms ease;
  }

  .dashboard-shell.is-menu-open::before {
    position: fixed;
    z-index: 1000;
    inset: 0;
    background: rgba(1, 17, 45, 0.58);
    content: "";
  }

  .dashboard-shell.is-menu-open .dashboard-sidebar {
    transform: translateX(0);
  }

  .mobile-menu-button {
    display: inline-grid;
    width: 44px;
    height: 44px;
    flex: 0 0 auto;
    place-content: center;
    gap: 5px;
    border: 1px solid var(--line);
    border-radius: 4px;
    background: white;
    color: var(--ink);
    cursor: pointer;
  }

  .mobile-menu-button span {
    display: block;
    width: 21px;
    height: 2px;
    border-radius: 2px;
    background: currentColor;
  }

  .sidebar-brand {
    grid-template-columns: minmax(150px, 220px) minmax(0, 1fr);
    align-items: center;
  }

  .results-menu {
    grid-template-columns: 1fr;
  }

  .matching-assignment-filters {
    grid-template-columns: 1fr;
  }

  .matching-search-criteria-head {
    display: grid;
  }

  .matching-assignment-head {
    grid-template-columns: 1fr;
  }

  .matching-assignment-visual {
    justify-items: start;
  }

  .matching-assignment-badges {
    justify-content: flex-start;
    max-width: none;
  }

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

  .assignment-application-overview-card {
    padding: 16px;
  }

  .assignment-application-card-head,
  .assignment-application-card-body {
    grid-template-columns: 1fr;
  }

  .assignment-application-overview-actions {
    justify-content: flex-start;
  }

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

  .auto-apply-assignment-head {
    grid-template-columns: 1fr;
  }

  .assignment-detail-content {
    grid-template-columns: 1fr;
  }

  .assignment-detail-side {
    position: static;
    order: -1;
  }

  .assignment-detail-logo-card {
    position: static;
    justify-self: start;
    min-height: 96px;
    width: min(240px, 100%);
  }

  .login-role-options {
    grid-template-columns: 1fr;
  }

  .expert-group-picker {
    grid-column: 1 / -1;
  }

  .dashboard-topbar {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    align-items: start;
    padding: 16px;
  }

  .dashboard-topbar .session-actions {
    grid-column: 1 / -1;
  }

  .dashboard-topbar .user-session-actions {
    grid-column: 3;
    grid-row: 1;
    align-self: center;
  }

  .user-session-actions .status-pill {
    display: none;
  }

  .community-view-banner {
    align-items: flex-start;
    flex-direction: column;
    gap: 10px;
  }

  .expert-group-invitation-card {
    grid-template-columns: 1fr;
  }

  .expert-group-invitation-actions {
    justify-content: flex-start;
  }

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

  .profile-panel {
    position: static;
    order: -1;
  }

  .brand-bar {
    align-items: flex-start;
    flex-direction: column;
    gap: 10px;
  }

  .brand-bar span {
    text-align: left;
  }

  .input-panel,
  .login-role-panel,
  .auth-panel,
  .client-login-panel,
  .onboarding-panel,
  .admin-panel,
  .community-panel,
  .progress-panel,
  .monthly-chart-panel,
  .advice-panel {
    padding: 18px;
  }

  .matches {
    padding: 18px;
  }

  .title-row,
  .section-head {
    align-items: flex-start;
    flex-direction: column;
  }

  .booking-item {
    align-items: stretch;
    flex-direction: column;
  }

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

  .expert-group-signup-form {
    grid-template-columns: 1fr;
  }

  .expert-group-signup-form .submit-button {
    width: 100%;
  }

  .admin-bulk-toolbar {
    align-items: stretch;
    flex-direction: column;
  }

  .admin-bulk-toolbar .logout-button,
  .admin-bulk-toolbar .submit-button,
  .admin-bulk-toolbar .text-input {
    width: 100%;
  }

  .role-editor {
    grid-template-columns: 1fr;
  }

  .role-editor .criteria-head {
    align-items: flex-start;
    flex-direction: column;
  }

  .profile-fields {
    grid-template-columns: 1fr;
  }

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

  .profile-form-section .profile-fields {
    grid-template-columns: 1fr;
  }

  .profile-field-wide,
  .profile-form-actions {
    grid-column: auto;
  }

  .profile-form-actions .submit-button {
    width: 100%;
  }

  .inline-control {
    grid-template-columns: 1fr;
  }

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

  .modal-panel {
    padding: 18px;
  }

  .modal-actions {
    align-items: stretch;
    flex-direction: column-reverse;
  }

  .results-menu-item {
    grid-template-columns: 24px minmax(0, 1fr);
    min-height: 38px;
    padding: 0 10px;
    font-size: 0.92rem;
  }

  .progress-panel,
  .monthly-chart-panel,
  .advice-panel,
  .matches {
    grid-column: auto;
    grid-row: auto;
  }

  .progress-panel {
    right: 10px;
    bottom: 10px;
    width: min(390px, calc(100vw - 20px));
    max-height: 42vh;
  }

  .progress-panel.is-collapsed {
    width: auto;
  }

  .progress-log {
    max-height: calc(42vh - 112px);
  }

  .all-results {
    padding: 18px;
  }

  .community-chat-panel {
    padding: 18px;
  }

  .community-events-panel,
  .community-announcements-panel {
    padding: 18px;
  }

  .community-dashboard-shell .panel {
    padding: 18px;
  }

  .knowledge-panel,
  .assignment-applications-panel {
    padding: 18px;
  }

  .knowledge-toolbar {
    grid-template-columns: 1fr;
  }

  .knowledge-toolbar .criteria-note {
    text-align: left;
  }

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

  .event-form-actions {
    align-items: stretch;
    flex-direction: column-reverse;
  }

  .calendar-board {
    padding: 12px;
    overflow-x: auto;
  }

  .calendar-weekdays,
  .calendar-grid {
    min-width: 680px;
  }

  .event-card {
    grid-template-columns: 56px minmax(0, 1fr);
  }

  .event-card .admin-row-actions {
    grid-column: 1 / -1;
    justify-content: flex-start;
  }

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

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

  .announcement-card {
    grid-template-columns: 36px minmax(0, 1fr);
    gap: 10px;
    padding: 14px;
  }

  .announcement-author-avatar {
    width: 36px;
    height: 36px;
    font-size: 0.7rem;
  }

  .announcement-card-main {
    gap: 9px;
  }

  .announcement-card .admin-row-actions {
    grid-column: 1 / -1;
    justify-content: flex-start;
  }

  .community-chat-layout {
    grid-template-columns: 1fr;
    min-height: 0;
  }

  .member-chat-layout {
    grid-template-columns: 1fr;
    min-height: 0;
  }

  .community-inbox-layout {
    grid-template-columns: 1fr;
    min-height: 0;
  }

  .community-inbox-list {
    border-right: 0;
    border-bottom: 1px solid var(--line);
    padding-right: 0;
    padding-bottom: 14px;
  }

  .community-manager-list {
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    border-right: 0;
    border-bottom: 1px solid var(--border);
    padding-right: 0;
    padding-bottom: 14px;
  }

  .member-list {
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    border-right: 0;
    border-bottom: 1px solid var(--border);
    padding-right: 0;
    padding-bottom: 14px;
  }

  .community-chat-messages {
    max-height: 360px;
  }

  .community-chat-bubble {
    max-width: 92%;
  }

  .sticky-head {
    margin: -18px -18px 0;
    padding: 16px 18px;
  }

  .advice-background .sticky-head {
    margin: 0 0 18px;
    padding: 0 0 14px;
  }

  .background-tabs {
    width: 100%;
  }

  .background-tab {
    flex: 1 1 140px;
  }

  .match-top {
    grid-template-columns: 1fr;
  }

  .auto-apply-shared-location {
    grid-template-columns: 1fr;
  }

  .auto-apply-intro {
    grid-template-columns: 1fr;
    padding: 16px;
  }

  .auto-apply-intro-icon {
    width: 40px;
    height: 40px;
  }

  .auto-apply-form {
    padding: 12px;
  }

  .auto-apply-editor-section,
  .auto-apply-filters {
    padding: 14px;
  }

  .auto-apply-fields {
    grid-template-columns: 1fr;
  }

  .auto-apply-condition-fields .auto-apply-hours-field {
    grid-column: auto;
  }

  .auto-apply-create-bar {
    align-items: stretch;
    flex-direction: column;
  }

  .auto-apply-card-head {
    grid-template-columns: 1fr;
    padding: 18px;
  }

  .auto-apply-card-meta {
    grid-row: 2;
  }

  .auto-apply-card-summary {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .auto-apply-create-actions .secondary-button {
    flex: 1 1 180px;
  }

  .auto-apply-hours-field {
    grid-column: auto;
  }

  .auto-apply-filters-head,
  .auto-apply-match-head,
  .auto-apply-actions {
    align-items: stretch;
    flex-direction: column;
  }

  .auto-apply-match-head span {
    text-align: left;
  }

  .auto-apply-action-statuses {
    margin-right: 0;
  }

  .all-result-title-row {
    flex-direction: column;
    gap: 6px;
  }

  .result-group-head {
    align-items: flex-start;
    flex-direction: column;
  }

  .score {
    width: 52px;
    height: 52px;
  }
}

.client-login-panel {
  position: relative;
  width: 100%;
  max-width: 920px;
  overflow: hidden;
  margin: 0 auto;
  padding: 38px;
}

.client-login-panel::before {
  position: absolute;
  inset: 0 0 auto;
  height: 5px;
  background: linear-gradient(90deg, var(--orange), var(--accent));
  content: "";
}

.client-login-panel .title-row {
  margin-bottom: 0;
}

.client-login-panel .home-link {
  flex: 0 0 auto;
  white-space: nowrap;
}

.client-login-panel h1 {
  max-width: 980px;
  font-size: clamp(2rem, 3.2vw, 3rem);
  line-height: 1.22;
}

.client-login-panel .criteria-note {
  margin: 18px 0 0;
}

.client-login-panel form,
.client-assignment-form {
  display: grid;
  gap: 18px;
}

#client-registration-fields {
  display: grid;
  gap: 12px;
}

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

.client-form-grid label {
  display: grid;
  gap: 8px;
}

.client-assignment-card {
  display: block;
}

.client-dashboard-shell .admin-workspace {
  gap: 20px;
  margin-top: 0;
}

.client-dashboard-shell .client-view {
  display: grid;
  gap: 24px;
  padding: clamp(22px, 3vw, 34px);
}

.client-dashboard-shell .client-view[hidden] {
  display: none;
}

.client-dashboard-shell .client-view > .section-head {
  padding-bottom: 20px;
  border-bottom: 1px solid var(--line);
}

.client-dashboard-shell .client-assignment-form {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: clamp(20px, 3vw, 30px);
  background: linear-gradient(180deg, #ffffff 0%, #f9fbff 100%);
  box-shadow: 0 8px 24px rgba(6, 38, 90, 0.06);
}

.client-dashboard-shell .wysiwyg-toolbar {
  margin-bottom: -18px;
}

.client-dashboard-shell .wysiwyg-editor {
  min-height: 220px;
  padding: 18px;
}

.client-dashboard-shell .client-form-grid {
  margin: 6px 0;
}

.client-qualification-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 20px;
  margin: 6px 0;
}

.client-qualification-builder {
  display: grid;
  align-content: start;
  gap: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 18px;
  background: #ffffff;
}

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

.client-qualification-head h3 {
  margin: 0;
  color: var(--navy);
}

.client-qualification-head .logout-button {
  flex: 0 0 auto;
}

.client-qualification-builder > .criteria-note {
  margin: 0;
}

.client-qualification-list {
  display: grid;
  gap: 10px;
}

.client-qualification-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 42px;
  gap: 8px;
  align-items: center;
}

.client-qualification-row .icon-button {
  width: 42px;
  height: 42px;
  font-size: 1.25rem;
}

.client-qualification-summary {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  margin: 16px 0;
  border-top: 1px solid var(--line);
  padding-top: 16px;
}

.client-qualification-summary strong {
  color: var(--navy);
}

.client-qualification-summary ul {
  margin: 8px 0 0;
  padding-left: 20px;
}

.client-qualification-summary li + li {
  margin-top: 6px;
}

.client-admin-edit {
  margin-top: 18px;
  border-top: 1px solid var(--line);
  padding-top: 16px;
}

.client-admin-edit summary {
  color: var(--accent);
  font-weight: 700;
  cursor: pointer;
}

.client-admin-edit form {
  display: grid;
  gap: 16px;
  margin-top: 18px;
  border-radius: 8px;
  padding: 20px;
  background: #f7faff;
}

.client-admin-edit label {
  display: grid;
  gap: 8px;
}

.client-admin-edit .client-admin-description {
  min-height: 140px;
  background: #ffffff;
}

.client-admin-assignment-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.client-dashboard-shell .check-option {
  min-height: 54px;
  padding: 14px 16px;
  line-height: 1.5;
}

.client-dashboard-shell .check-option a {
  color: var(--accent);
  text-decoration-thickness: 1px;
  text-underline-offset: 2px;
}

.client-dashboard-shell .check-option a:hover,
.client-dashboard-shell .check-option a:focus-visible {
  color: var(--accent-dark);
}

.client-dashboard-shell .client-assignment-form > .submit-button {
  justify-self: start;
  min-width: 260px;
  margin-top: 6px;
}

.client-dashboard-shell #client-assignment-message {
  min-height: 22px;
  margin: 0;
}

.client-dashboard-shell #client-assignment-list {
  gap: 16px;
}

.client-overview-message {
  margin: 0;
  border-left: 4px solid #238759;
  border-radius: 4px;
  padding: 12px 14px;
  background: #e9f8ef;
  color: #176238;
  font-weight: 700;
}

.client-dashboard-shell .client-assignment-card {
  padding: 20px;
}

.client-assignment-description {
  margin: 14px 0;
  line-height: 1.65;
}

.status-pending {
  background: #fff3cd;
  color: #73510d;
}

.status-approved {
  background: #dff5e7;
  color: #176238;
}

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

  .client-dashboard-shell .client-assignment-form {
    padding: 18px;
  }

  .client-dashboard-shell .client-assignment-form > .submit-button {
    width: 100%;
    min-width: 0;
  }

  .client-qualification-grid,
  .client-qualification-summary {
    grid-template-columns: 1fr;
  }

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

/* Admin uses the same dashboard shell and controls as the user dashboards. */
.admin-panel {
  max-width: none;
  margin: 0;
  overflow: visible;
  padding: 0;
}

.admin-panel::before {
  content: none;
}

.admin-login-panel {
  position: relative;
  max-width: 920px;
  overflow: hidden;
  margin: 0 auto;
  padding: 38px;
}

.admin-login-panel::before {
  position: absolute;
  inset: 0 0 auto;
  height: 5px;
  background: linear-gradient(90deg, var(--accent), var(--navy));
  content: "";
}

.admin-dashboard-shell .admin-workspace {
  gap: 18px;
  margin-top: 0;
}

.admin-dashboard-shell .admin-view {
  display: grid;
  gap: 18px;
  padding: 24px;
}

.admin-dashboard-shell .admin-view[hidden] {
  display: none;
}

.admin-dashboard-shell .admin-dashboard-view {
  gap: 20px;
  border-color: rgba(209, 218, 244, 0.9);
  border-radius: 8px;
  padding: 26px 28px 28px;
}

.admin-dashboard-shell .admin-groups-view {
  gap: 24px;
  padding: 0;
  background: transparent;
}

.admin-groups-intro,
.admin-group-create,
.admin-group-card,
.admin-groups-empty {
  border: 1px solid rgba(209, 218, 244, 0.9);
  background: #ffffff;
  box-shadow: var(--shadow);
}

.admin-groups-intro {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 28px;
  border-radius: 8px;
  padding: 26px 28px;
}

.admin-groups-intro h2,
.admin-group-create h3,
.admin-groups-list-heading h3 {
  margin: 0;
}

.admin-groups-intro h2 {
  margin-top: 2px;
  font-size: clamp(1.45rem, 2vw, 1.9rem);
}

.admin-groups-intro p:last-child,
.admin-group-create-heading p,
.admin-groups-list-heading p,
.admin-groups-empty p {
  margin: 6px 0 0;
  color: var(--muted);
  font-size: 0.92rem;
}

.admin-groups-stats {
  display: flex;
  flex: 0 0 auto;
  align-items: stretch;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: var(--page);
}

.admin-groups-stats div {
  display: grid;
  min-width: 92px;
  padding: 12px 18px;
  text-align: center;
}

.admin-groups-stats div + div {
  border-left: 1px solid var(--line);
}

.admin-groups-stats strong {
  color: var(--accent);
  font-size: 1.35rem;
  line-height: 1.1;
}

.admin-groups-stats span {
  margin-top: 4px;
  color: var(--muted);
  font-size: 0.74rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.admin-group-create {
  display: grid;
  gap: 20px;
  border-radius: 8px;
  padding: 24px 26px;
}

.admin-group-create-heading {
  display: flex;
  align-items: center;
  gap: 13px;
}

.admin-group-create-icon {
  display: grid;
  flex: 0 0 42px;
  width: 42px;
  height: 42px;
  place-items: center;
  border-radius: 8px;
  background: var(--accent-soft);
  color: var(--accent);
  font-size: 1.45rem;
  font-weight: 500;
}

.admin-group-create-fields {
  display: grid;
  grid-template-columns: minmax(180px, 0.8fr) minmax(240px, 1.2fr) auto;
  align-items: end;
  gap: 14px;
}

.admin-group-create-fields label {
  display: grid;
  gap: 7px;
}

.admin-group-create-fields .field-label {
  margin: 0;
}

.admin-group-create-fields .field-label small {
  color: var(--muted);
  font-weight: 500;
}

.admin-group-create-fields .submit-button {
  white-space: nowrap;
}

.admin-groups-list-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  padding: 0 2px;
}

.admin-group-card-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.admin-group-card {
  display: grid;
  grid-template-rows: auto 1fr auto;
  min-width: 0;
  overflow: hidden;
  border-radius: 8px;
  transition: border-color 160ms ease, box-shadow 160ms ease, transform 160ms ease;
}

.admin-group-card:hover {
  border-color: #b7c7ec;
  box-shadow: 0 10px 25px rgba(20, 55, 115, 0.1);
  transform: translateY(-1px);
}

.admin-group-card.is-inactive {
  background: #fbfcff;
}

.admin-group-card-head {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 18px 20px 16px;
}

.admin-group-avatar,
.admin-group-manager-avatar {
  display: grid;
  place-items: center;
  border-radius: 8px;
  background: linear-gradient(145deg, var(--accent), #3d79ee);
  color: #ffffff;
  font-weight: 800;
}

.admin-group-avatar {
  flex: 0 0 44px;
  width: 44px;
  height: 44px;
  font-size: 1.05rem;
}

.admin-group-card.is-inactive .admin-group-avatar {
  background: #94a3be;
}

.admin-group-card-title {
  display: grid;
  flex: 1 1 auto;
  min-width: 0;
  gap: 5px;
}

.admin-group-card-title > strong {
  overflow-wrap: anywhere;
  color: var(--navy);
  font-size: 1.02rem;
}

.admin-group-status {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  width: max-content;
  color: var(--muted);
  font-size: 0.77rem;
  font-weight: 700;
}

.admin-group-status i {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #94a3b8;
}

.admin-group-status.is-active {
  color: #13825f;
}

.admin-group-status.is-active i {
  background: #22a979;
  box-shadow: 0 0 0 3px rgba(34, 169, 121, 0.12);
}

.admin-group-edit-button,
.admin-group-manager-action {
  display: grid;
  flex: 0 0 auto;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: #ffffff;
  color: var(--muted);
  cursor: pointer;
}

.admin-group-edit-button {
  width: 36px;
  height: 36px;
}

.admin-group-edit-button:hover,
.admin-group-edit-button:focus-visible,
.admin-group-manager-action:hover,
.admin-group-manager-action:focus-visible {
  border-color: var(--accent);
  color: var(--accent);
}

.admin-group-card-body {
  padding: 0 20px 20px;
}

.admin-group-manager-heading {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 9px;
}

.admin-group-manager-heading > span {
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.055em;
}

.admin-group-manager-heading small {
  display: grid;
  min-width: 20px;
  height: 20px;
  place-items: center;
  border-radius: 999px;
  background: var(--accent-soft);
  color: var(--accent);
  font-size: 0.7rem;
  font-weight: 800;
}

.admin-group-manager-list {
  display: grid;
  gap: 7px;
}

.admin-group-manager {
  display: flex;
  align-items: center;
  gap: 9px;
  min-width: 0;
  border: 1px solid #e3e9f7;
  border-radius: 7px;
  padding: 9px 10px;
  background: #f9fbff;
}

.admin-group-manager-avatar {
  flex: 0 0 30px;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  font-size: 0.76rem;
}

.admin-group-manager-details {
  display: grid;
  flex: 1 1 auto;
  min-width: 0;
}

.admin-group-manager-details strong,
.admin-group-manager-details small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.admin-group-manager-details strong {
  color: var(--ink);
  font-size: 0.84rem;
}

.admin-group-manager-details small {
  color: var(--muted);
  font-size: 0.73rem;
}

.admin-group-booking-status {
  color: #c4ccdc;
  font-size: 0.65rem;
}

.admin-group-booking-status.is-active {
  color: #22a979;
}

.admin-group-manager-action {
  width: 28px;
  height: 28px;
  font-size: 0.78rem;
}

.admin-group-manager-action.is-remove:hover,
.admin-group-manager-action.is-remove:focus-visible {
  border-color: var(--rose);
  color: var(--rose);
}

.admin-group-no-manager {
  display: block;
  border: 1px dashed var(--line);
  border-radius: 7px;
  padding: 12px;
  color: var(--muted);
  font-size: 0.82rem;
  text-align: center;
}

.admin-group-add-manager {
  width: 100%;
  margin-top: 8px;
  border: 0;
  background: transparent;
  color: var(--accent);
  padding: 7px;
  font-size: 0.82rem;
  font-weight: 750;
  cursor: pointer;
}

.admin-group-add-manager span {
  margin-right: 4px;
  font-size: 1rem;
}

.admin-group-add-manager:hover,
.admin-group-add-manager:focus-visible {
  text-decoration: underline;
}

.admin-group-card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  border-top: 1px solid #e8edf8;
  padding: 11px 20px;
  background: #fbfcff;
}

.admin-group-card-footer > span {
  color: var(--muted);
  font-size: 0.75rem;
}

.admin-group-toggle {
  border: 0;
  background: transparent;
  color: var(--muted);
  padding: 4px 0;
  font-size: 0.78rem;
  font-weight: 750;
  cursor: pointer;
}

.admin-group-toggle:hover,
.admin-group-toggle:focus-visible {
  color: var(--rose);
  text-decoration: underline;
}

.admin-group-card.is-inactive .admin-group-toggle {
  color: var(--accent);
}

.admin-groups-empty {
  grid-column: 1 / -1;
  display: grid;
  justify-items: center;
  border-style: dashed;
  border-radius: 8px;
  padding: 48px 24px;
  text-align: center;
}

.admin-groups-empty > span {
  display: grid;
  width: 48px;
  height: 48px;
  margin-bottom: 12px;
  place-items: center;
  border-radius: 50%;
  background: var(--accent-soft);
  color: var(--accent);
  font-size: 1.5rem;
}

.admin-dashboard-shell .admin-sync-log-section {
  border-top: 0;
  margin-top: 0;
}

.admin-dashboard-shell .submit-button,
.admin-dashboard-shell .logout-button {
  min-height: 42px;
  height: 42px;
  padding-top: 0;
  padding-bottom: 0;
}

.admin-dashboard-shell input.text-input,
.admin-dashboard-shell select.text-input {
  min-height: 42px;
  height: 42px;
}

.admin-dashboard-shell #admin-user-cv {
  width: 100%;
  min-height: 42px;
  height: 42px;
  overflow: hidden;
  padding: 0 12px 0 0;
  background: #ffffff;
  color: var(--muted);
  font: inherit;
  font-size: 0.9rem;
  line-height: 40px;
  cursor: pointer;
}

.admin-dashboard-shell #admin-user-cv::file-selector-button {
  height: 40px;
  margin-right: 12px;
  border: 0;
  border-right: 1px solid var(--line);
  background: var(--accent-soft);
  color: var(--accent);
  padding: 0 14px;
  font: inherit;
  font-weight: 700;
  cursor: pointer;
}

.admin-dashboard-shell #admin-user-cv:hover::file-selector-button,
.admin-dashboard-shell #admin-user-cv:focus::file-selector-button {
  background: var(--accent);
  color: #ffffff;
}

.admin-user-create-spinner {
  display: none !important;
  width: 16px;
  height: 16px;
  flex: 0 0 auto;
  border: 2px solid rgba(255, 255, 255, 0.42);
  border-top-color: #ffffff;
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

#admin-user-create-button.is-loading .admin-user-create-spinner {
  display: inline-block !important;
}

#admin-user-create-button.is-loading > :last-child {
  display: none;
}

.admin-user-create-progress {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 42px;
  color: var(--ink);
  font-weight: 700;
}

.admin-user-create-progress .spinner {
  width: 20px;
  height: 20px;
  border-width: 3px;
}

@media (max-width: 820px) {
  .admin-login-panel,
  .admin-dashboard-shell .admin-view {
    padding: 18px;
  }

  .admin-dashboard-shell .admin-groups-view {
    padding: 0;
  }

  .admin-dashboard-shell .admin-dashboard-view {
    padding: 22px;
  }

  .admin-groups-intro {
    align-items: stretch;
    flex-direction: column;
    padding: 22px;
  }

  .admin-groups-stats div {
    flex: 1 1 0;
    min-width: 0;
  }

  .admin-group-create-fields,
  .admin-group-card-grid {
    grid-template-columns: 1fr;
  }

  .admin-group-create-fields .submit-button {
    width: 100%;
  }
}

@media (max-width: 480px) {
  .admin-groups-stats div {
    padding: 11px 8px;
  }

  .admin-group-create {
    padding: 20px;
  }

  .admin-group-card-head,
  .admin-group-card-body {
    padding-left: 16px;
    padding-right: 16px;
  }

  .admin-group-card-footer {
    align-items: flex-start;
    flex-direction: column;
    padding-inline: 16px;
  }
}
.client-assignment-table-wrap {
  width: 100%;
  overflow-x: auto;
  border: 1px solid var(--border-color, #dfe3e8);
  border-radius: 10px;
  background: #fff;
}

.client-assignment-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.86rem;
  white-space: nowrap;
}

.client-assignment-table th,
.client-assignment-table td {
  padding: 0.42rem 0.55rem;
  text-align: left;
  vertical-align: middle;
  border-bottom: 1px solid var(--border-color, #e7eaee);
}

.client-assignment-table th {
  color: #5d6672;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  background: #f7f8fa;
}

.client-assignment-table tbody tr:last-child td { border-bottom: 0; }
.client-assignment-table tbody tr:hover { background: #fafbfc; }

.client-assignment-row-actions {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 0.35rem;
}

.client-assignment-row-actions button { min-height: 30px; padding: 0.3rem 0.55rem; }

.client-assignment-title-link {
  appearance: none;
  padding: 0;
  border: 0;
  color: var(--primary-color, #1769aa);
  background: none;
  font: inherit;
  font-weight: inherit;
  text-align: left;
  text-decoration: underline;
  text-underline-offset: 2px;
  cursor: pointer;
}

.client-assignment-title-link:hover { text-decoration-thickness: 2px; }

.client-assignment-dialog {
  width: min(760px, calc(100vw - 2rem));
  max-height: calc(100vh - 2rem);
  padding: 0;
  border: 0;
  border-radius: 16px;
  box-shadow: 0 24px 80px rgb(15 23 42 / 28%);
}

.client-assignment-dialog::backdrop { background: rgb(15 23 42 / 55%); }

.client-assignment-dialog-form {
  display: grid;
  gap: 1rem;
  padding: 1.35rem;
  overflow-y: auto;
}

.client-assignment-dialog-description { min-height: 150px; }

.client-assignment-central-link {
  color: var(--accent);
  font-weight: 700;
  text-decoration: none;
}

.client-assignment-central-link:hover { text-decoration: underline; }

.client-assignment-dialog-actions {
  display: flex;
  justify-content: flex-end;
  gap: 0.65rem;
}

.confirmation-dialog {
  width: min(460px, calc(100vw - 2rem));
  padding: 0;
  border: 0;
  border-radius: 18px;
  box-shadow: 0 24px 80px rgb(15 23 42 / 32%);
}

.confirmation-dialog::backdrop { background: rgb(15 23 42 / 58%); }

.confirmation-dialog-panel {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 1rem;
  padding: 1.5rem;
}

.confirmation-dialog-panel h2 { margin: 0.15rem 0 0.55rem; }
.confirmation-dialog-panel p:last-child { margin: 0; color: var(--muted); line-height: 1.55; }

.confirmation-dialog-icon {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: #fff0f0;
  color: #b42318;
  font-size: 1.3rem;
  font-weight: 800;
}

.confirmation-dialog-actions {
  grid-column: 1 / -1;
  display: flex;
  justify-content: flex-end;
  gap: 0.65rem;
  margin-top: 0.35rem;
}

/* Shared content theme — navigation intentionally remains unchanged. */
body {
  background:
    radial-gradient(circle at 82% 0%, rgba(31, 88, 222, 0.08), transparent 32rem),
    linear-gradient(180deg, #ffffff 0, #f4f7fc 360px),
    #f4f7fc;
}

.panel {
  border-color: rgba(209, 218, 244, 0.9);
  border-radius: 10px;
  box-shadow: 0 8px 28px rgba(6, 38, 90, 0.07);
}

.dashboard-main {
  gap: 20px;
}

.dashboard-topbar {
  min-height: 94px;
  border-color: rgba(31, 88, 222, 0.14);
  border-radius: 10px;
  background: linear-gradient(135deg, var(--accent-soft), #ffffff 68%);
  box-shadow: 0 8px 28px rgba(6, 38, 90, 0.07);
  padding: 20px 24px;
}

.dashboard-topbar h1 {
  letter-spacing: -0.025em;
}

.dashboard-main .panel > .section-head,
.dashboard-content > .panel > .section-head,
.client-view > .section-head,
.admin-view > .section-head {
  min-height: 76px;
  border: 1px solid rgba(31, 88, 222, 0.14);
  border-radius: 9px;
  background: linear-gradient(135deg, var(--accent-soft), #ffffff 76%);
  padding: 15px 18px;
}

.dashboard-main .section-head h2,
.dashboard-content .section-head h2 {
  letter-spacing: -0.015em;
}

.dashboard-main .eyebrow,
.dashboard-content .eyebrow {
  font-size: 0.75rem;
  font-weight: 850;
  letter-spacing: 0.045em;
}

.dashboard-main .result-count,
.dashboard-main .status-pill,
.dashboard-content .result-count,
.dashboard-content .status-pill {
  border-color: rgba(31, 88, 222, 0.18);
  background: rgba(255, 255, 255, 0.82);
  color: var(--accent-dark);
  font-weight: 750;
}

.dashboard-main input:not([type="range"]):not([type="checkbox"]):not([type="radio"]),
.dashboard-main select,
.dashboard-main textarea,
.dashboard-content input:not([type="range"]):not([type="checkbox"]):not([type="radio"]),
.dashboard-content select,
.dashboard-content textarea,
.modal-panel input:not([type="range"]):not([type="checkbox"]):not([type="radio"]),
.modal-panel select,
.modal-panel textarea {
  border-color: rgba(161, 176, 215, 0.72);
  border-radius: 7px;
  background: #ffffff;
  transition: border-color 160ms ease, box-shadow 160ms ease, background-color 160ms ease;
}

.dashboard-main input:not([type="range"]):not([type="checkbox"]):not([type="radio"]):focus,
.dashboard-main select:focus,
.dashboard-main textarea:focus,
.dashboard-content input:not([type="range"]):not([type="checkbox"]):not([type="radio"]):focus,
.dashboard-content select:focus,
.dashboard-content textarea:focus,
.modal-panel input:not([type="range"]):not([type="checkbox"]):not([type="radio"]):focus,
.modal-panel select:focus,
.modal-panel textarea:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(31, 88, 222, 0.12);
  outline: none;
}

.dashboard-main .inline-form,
.dashboard-main .event-form,
.dashboard-main .community-member-form,
.dashboard-main .client-assignment-form,
.dashboard-content .expert-group-signup-form {
  border: 1px solid rgba(209, 218, 244, 0.9);
  border-radius: 9px;
  background: #f9fbff;
  padding: 18px;
}

.dashboard-main .admin-list-item,
.dashboard-main .matching-assignment-card,
.dashboard-main .announcement-card,
.dashboard-main .knowledge-card,
.dashboard-main .event-card,
.dashboard-main .booking-item,
.dashboard-content .admin-list-item,
.dashboard-content .matching-assignment-card,
.dashboard-content .announcement-card,
.dashboard-content .knowledge-card,
.dashboard-content .event-card,
.dashboard-content .booking-item,
.dashboard-content .linked-expert-groups-card {
  border-color: rgba(209, 218, 244, 0.9);
  border-radius: 8px;
  background: #ffffff;
  box-shadow: 0 3px 14px rgba(6, 38, 90, 0.045);
  transition: border-color 160ms ease, box-shadow 160ms ease, transform 160ms ease;
}

.dashboard-main .admin-list-item:hover,
.dashboard-main .matching-assignment-card:hover,
.dashboard-main .announcement-card:hover,
.dashboard-main .knowledge-card:hover,
.dashboard-main .event-card:hover,
.dashboard-content .matching-assignment-card:hover,
.dashboard-content .announcement-card:hover,
.dashboard-content .knowledge-card:hover,
.dashboard-content .event-card:hover {
  border-color: rgba(31, 88, 222, 0.28);
  box-shadow: 0 9px 24px rgba(6, 38, 90, 0.085);
  transform: translateY(-1px);
}

.dashboard-main .submit-button,
.dashboard-main .secondary-button,
.dashboard-main .logout-button,
.dashboard-content .submit-button,
.dashboard-content .secondary-button,
.dashboard-content .logout-button,
.modal-panel .submit-button,
.modal-panel .secondary-button,
.modal-panel .logout-button {
  border-radius: 7px;
}

.dashboard-main .criteria-note,
.dashboard-content .criteria-note,
.dashboard-main .empty,
.dashboard-content .empty {
  border-radius: 8px;
}

.modal-panel,
.confirmation-dialog {
  border: 1px solid rgba(209, 218, 244, 0.9);
  border-radius: 12px;
  background: #ffffff;
  box-shadow: 0 24px 80px rgba(6, 38, 90, 0.24);
}

@media (max-width: 820px) {
  .dashboard-topbar {
    min-height: 76px;
    border-radius: 8px;
    padding: 16px 18px;
  }

  .dashboard-main .panel > .section-head,
  .dashboard-content > .panel > .section-head,
  .client-view > .section-head,
  .admin-view > .section-head {
    min-height: 0;
    align-items: flex-start;
    padding: 14px;
  }
}

/* Market overview charts */
.monthly-chart-panel {
  background: linear-gradient(180deg, #ffffff, #fbfcff);
}

.market-overview-panel {
  display: grid;
  gap: 16px;
  padding: 24px;
}

.market-overview-panel .market-overview-head {
  min-height: auto;
  border: 0;
  background: transparent;
  padding: 0;
}

.market-intro {
  display: grid;
  grid-template-columns: 52px minmax(0, 1fr);
  gap: 16px;
  align-items: start;
  border: 1px solid rgba(31, 88, 222, 0.16);
  border-radius: 10px;
  background: linear-gradient(135deg, #f3f7ff 0%, #ffffff 72%);
  padding: 19px 20px;
}

.market-intro-icon {
  display: grid;
  place-items: center;
  width: 52px;
  height: 52px;
  border-radius: 10px;
  background: linear-gradient(135deg, #3122a5, #2189ed);
  box-shadow: 0 8px 18px rgba(31, 88, 222, 0.2);
}

.market-intro-icon svg {
  width: 25px;
  fill: none;
  stroke: #ffffff;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.8;
}

.market-intro h3,
.market-chart-card-head h3 {
  margin: 3px 0 0;
  color: var(--navy);
  letter-spacing: -0.015em;
}

.market-intro h3 {
  font-size: 1.08rem;
}

.market-intro p:last-child {
  max-width: 780px;
  margin: 7px 0 0;
  color: var(--muted);
  font-size: 0.91rem;
  line-height: 1.5;
}

.market-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.market-filters button {
  min-height: 36px;
  border: 1px solid rgba(161, 176, 215, 0.55);
  border-radius: 7px;
  background: #ffffff;
  color: var(--muted);
  padding: 0 16px;
  font: inherit;
  font-size: 0.86rem;
  font-weight: 800;
  cursor: pointer;
}

.market-filters button:hover,
.market-filters button:focus-visible {
  border-color: var(--accent);
  color: var(--accent);
}

.market-filters button.is-active {
  border-color: var(--accent);
  background: var(--accent);
  color: #ffffff;
  box-shadow: 0 5px 14px rgba(31, 88, 222, 0.18);
}

.market-kpi-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.market-kpi {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 4px 12px;
  align-items: center;
  border: 1px solid rgba(209, 218, 244, 0.9);
  border-radius: 9px;
  background: #ffffff;
  padding: 14px 16px;
  box-shadow: 0 4px 15px rgba(6, 38, 90, 0.045);
}

.market-kpi span {
  color: var(--navy);
  font-size: 0.86rem;
  font-weight: 800;
}

.market-kpi strong {
  grid-row: 1 / span 2;
  grid-column: 2;
  color: var(--accent);
  font-size: 1.45rem;
  letter-spacing: -0.035em;
}

.market-kpi small {
  color: var(--muted);
  font-size: 0.74rem;
}

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

.market-chart-card {
  position: relative;
  display: grid;
  align-content: start;
  gap: 14px;
  min-width: 0;
  border: 1px solid rgba(209, 218, 244, 0.95);
  border-radius: 10px;
  background: #ffffff;
  padding: 18px;
  box-shadow: 0 7px 22px rgba(6, 38, 90, 0.06);
  overflow: hidden;
}

.market-chart-card::before {
  content: "";
  position: absolute;
  inset: 0 0 auto;
  height: 3px;
  background: linear-gradient(90deg, #3322a7, #20a4ed);
}

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

.market-chart-card-head h3 {
  font-size: 1rem;
}

.market-chart-card .monthly-chart {
  margin: 0;
}

.market-chart-card .monthly-metric {
  gap: 14px;
  border: 0;
  border-radius: 0;
  box-shadow: none;
  padding: 0;
}

.market-chart-card .monthly-metric-heading > h3 {
  display: none;
}

.market-chart-card .monthly-metric-heading {
  min-height: 28px;
  justify-content: flex-end;
}

.market-insight {
  border: 1px solid rgba(31, 88, 222, 0.13);
  border-radius: 8px;
  background: #f6f9ff;
  padding: 12px 13px;
}

.market-insight strong {
  display: block;
  margin-bottom: 4px;
  color: var(--accent);
  font-size: 0.72rem;
  font-weight: 850;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.market-insight p {
  margin: 0;
  color: var(--muted);
  font-size: 0.79rem;
  line-height: 1.45;
}

.market-chart-card[hidden] {
  display: none;
}

.market-chart-grid:has(.market-chart-card[hidden]) {
  grid-template-columns: minmax(0, 1fr);
}

.monthly-chart-panel .monthly-chart-subhead {
  margin-top: 8px;
  border: 1px solid rgba(31, 88, 222, 0.14);
  border-radius: 9px;
  background: linear-gradient(135deg, var(--accent-soft), #ffffff 76%);
  padding: 15px 18px;
}

.monthly-chart-panel .monthly-chart {
  margin-top: 14px;
}

.monthly-chart-panel .monthly-metric {
  gap: 18px;
  border: 1px solid rgba(209, 218, 244, 0.9);
  border-radius: 10px;
  background: #ffffff;
  box-shadow: 0 6px 22px rgba(6, 38, 90, 0.055);
  padding: 18px 20px 16px;
}

.monthly-chart-panel .monthly-metric-heading {
  min-height: 32px;
}

.monthly-chart-panel .monthly-metric h3 {
  color: var(--navy);
  font-size: 1.02rem;
  letter-spacing: -0.01em;
}

.monthly-chart-panel .monthly-rate-legend {
  gap: 7px;
}

.monthly-chart-panel .monthly-rate-legend-item {
  min-height: 28px;
  border: 1px solid rgba(31, 88, 222, 0.13);
  border-radius: 999px;
  background: #f8faff;
  color: var(--muted);
  padding: 0 9px;
}

.monthly-chart-panel .monthly-rate-legend-swatch {
  width: 9px;
  height: 9px;
  border-radius: 50%;
}

.monthly-chart-panel .monthly-rate-legend-swatch.is-assignment-total,
.monthly-chart-panel .monthly-rate-legend-swatch.is-rate-range {
  background: var(--accent);
}

.monthly-chart-panel .monthly-rate-legend-swatch.is-assignment-rate,
.monthly-chart-panel .monthly-rate-legend-swatch.is-rate-average {
  background: #7ba6ff;
}

.monthly-chart-panel .monthly-bars {
  gap: 12px;
  border-radius: 8px;
  background: linear-gradient(180deg, rgba(238, 244, 255, 0.44), rgba(255, 255, 255, 0));
  padding: 14px 8px 4px;
}

.monthly-chart-panel .monthly-bar-track {
  border: 1px solid rgba(209, 218, 244, 0.72);
  border-radius: 6px;
  background:
    repeating-linear-gradient(
      to top,
      rgba(209, 218, 244, 0.42) 0,
      rgba(209, 218, 244, 0.42) 1px,
      transparent 1px,
      transparent 25%
    ),
    #f9fbff;
}

.monthly-chart-panel .monthly-bar-fill-total {
  border-radius: 5px 5px 2px 2px;
  background: linear-gradient(180deg, #3974ee, var(--accent-dark));
  box-shadow: 0 5px 12px rgba(31, 88, 222, 0.18);
}

.monthly-chart-panel .monthly-bar-fill-with-rate {
  background: linear-gradient(180deg, #9bbaff, #6f9cff);
}

.monthly-chart-panel .monthly-bar-value {
  color: var(--accent-dark);
  font-weight: 800;
}

.monthly-chart-panel .monthly-bar-label {
  color: var(--navy);
}

.monthly-chart-panel .monthly-rate-candlestick {
  border: 1px solid rgba(209, 218, 244, 0.78);
  border-radius: 8px;
  background: linear-gradient(180deg, #f8faff, #ffffff);
  padding: 12px 10px 4px;
}

.monthly-chart-panel .rate-grid-line {
  stroke: rgba(31, 88, 222, 0.11);
}

.monthly-chart-panel .rate-axis-line {
  stroke: rgba(6, 38, 90, 0.28);
}

.monthly-chart-panel .rate-range-line,
.monthly-chart-panel .rate-range-cap,
.monthly-chart-panel .rate-candle:hover .rate-range-line,
.monthly-chart-panel .rate-candle:hover .rate-range-cap {
  stroke: var(--accent);
}

.monthly-chart-panel .rate-average-body,
.monthly-chart-panel .rate-candle:hover .rate-average-body {
  fill: #7ba6ff;
  stroke: var(--accent-dark);
}

@media (max-width: 820px) {
  .market-kpi-grid,
  .market-chart-grid {
    grid-template-columns: 1fr;
  }

  .market-chart-card-head {
    flex-direction: column;
  }

  .monthly-chart-panel .monthly-metric {
    padding: 14px;
  }

  .monthly-chart-panel .monthly-metric-heading {
    align-items: flex-start;
    flex-direction: column;
  }

  .monthly-chart-panel .monthly-rate-legend {
    justify-content: flex-start;
  }
}

@media (max-width: 520px) {
  .market-overview-panel {
    padding: 16px;
  }

  .market-intro {
    grid-template-columns: 1fr;
    padding: 16px;
  }

  .market-filters button {
    flex: 1 1 auto;
    padding-inline: 10px;
  }
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* Market overview redesign */
.market-overview-panel {
  gap: 20px;
  border: 0;
  background: transparent;
  box-shadow: none;
  padding: 0;
}

.market-overview-panel .market-overview-head h2 {
  font-size: clamp(1.55rem, 2.5vw, 2rem);
}

.market-overview-panel .market-intro,
.market-overview-panel .market-kpi,
.market-overview-panel .market-chart-card,
.market-position-card {
  border: 1px solid #dfe6f3;
  background: #fff;
  box-shadow: 0 3px 12px rgba(7, 37, 87, .035);
}

.market-overview-panel .market-intro {
  grid-template-columns: 42px minmax(0, 1fr);
  border-radius: 12px;
  padding: 22px 24px;
}

.market-overview-panel .market-intro-icon {
  width: 42px;
  height: 42px;
  border-radius: 9px;
  box-shadow: none;
}

.market-overview-panel .market-intro-icon svg { width: 21px; }
.market-overview-panel .eyebrow { color: #1768e5; font-size: .67rem; letter-spacing: .075em; text-transform: uppercase; }
.market-overview-panel .market-intro p:last-child { max-width: 720px; }

.market-overview-panel .market-kpi-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; }
.market-overview-panel .market-kpi { display: flex; flex-direction: column; align-items: flex-start; min-height: 116px; border-radius: 11px; padding: 21px 20px; }
.market-overview-panel .market-kpi strong { order: -1; color: #175fe3; font-size: 1.8rem; line-height: 1; }
.market-overview-panel .market-kpi:first-child strong { color: #260774; }
.market-overview-panel .market-kpi-growth strong { color: #10a84d; }
.market-overview-panel .market-kpi-growth strong.is-negative { color: #d84646; }
.market-overview-panel .market-kpi span { margin-top: 8px; }
.market-overview-panel .market-kpi small { margin-top: 4px; }

.market-overview-panel .market-chart-grid { grid-template-columns: 1fr; gap: 18px; }
.market-overview-panel .market-chart-card { gap: 8px; border-radius: 12px; padding: 22px 24px 18px; overflow: visible; }
.market-overview-panel .market-chart-card::before { display: none; }
.market-overview-panel .market-chart-card-head > div { width: 100%; }
.market-overview-panel .market-chart-card-head h3 { font-size: 1.08rem; }
.market-overview-panel .market-chart-card-head p:last-child { margin: 7px 0 0; color: var(--muted); font-size: .82rem; line-height: 1.45; }
.market-overview-panel .market-chart-card-head p strong { color: #1768e5; }
.market-overview-panel .monthly-chart { margin-top: 0; }
.market-overview-panel .monthly-metric { border: 0; box-shadow: none; padding: 0; }
.market-overview-panel .monthly-metric-heading { justify-content: flex-end; min-height: 25px; }
.market-overview-panel .monthly-rate-legend-item { border: 0; background: transparent; padding: 0 4px; }
.market-overview-panel .monthly-bars { min-height: 205px; border-radius: 0; background: repeating-linear-gradient(to top, rgba(190,202,225,.3) 0, rgba(190,202,225,.3) 1px, transparent 1px, transparent 25%); padding-top: 8px; }
.market-overview-panel .monthly-bar-track { border: 0; background: transparent; }
.market-overview-panel .monthly-count-stack {
  position: relative;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  gap: 5px;
  overflow: hidden;
}
.market-overview-panel .monthly-count-stack > .monthly-bar-fill-total {
  position: relative;
  inset: auto;
  flex: 0 1 22px;
  width: 22px;
  max-width: 44%;
  border-radius: 4px 4px 0 0;
  background: #185adf;
  box-shadow: none;
  overflow: visible;
}
.market-overview-panel .monthly-count-stack > .monthly-bar-fill-with-rate {
  position: relative;
  inset: auto;
  flex: 0 1 22px;
  width: 22px;
  max-width: 44%;
  border-radius: 4px 4px 0 0;
  background: #55a1f4;
}
.market-overview-panel .monthly-bar-value { opacity: 0; }

.market-rate-band-chart { position: relative; width: 100%; overflow-x: auto; }
.market-rate-band-chart svg { display: block; width: 100%; min-width: 720px; height: auto; }
.market-band-legend { display: flex; justify-content: flex-end; gap: 22px; color: var(--muted); font-size: .75rem; }
.market-band-legend span { display: inline-flex; align-items: center; gap: 7px; }
.market-band-legend i { width: 14px; height: 7px; border-radius: 2px; background: #cfe5ff; border: 1px solid #398cff; }
.market-band-legend i.is-outlier { height: 0; border: 0; border-top: 1px dashed #8ca1bc; border-radius: 0; background: none; }
.market-band-grid { stroke: #e4e9f2; stroke-dasharray: 2 3; }
.market-band-area { fill: #d7eaff; opacity: .82; }
.market-band-average-line { fill: none; stroke: #2079f2; stroke-width: 2; }
.market-band-outlier-line { fill: none; stroke: #8ca1bc; stroke-width: 1.2; stroke-dasharray: 3 3; }
.market-band-axis-label, .market-band-month { fill: #718096; font-size: 11px; }

.market-position-card { display: grid; gap: 25px; border-radius: 12px; padding: 22px 24px; }
.market-position-copy { max-width: 720px; }
.market-position-copy h3 { margin: 4px 0 8px; color: var(--navy); font-size: 1.08rem; }
.market-position-copy > p:last-child { margin: 0; color: var(--muted); font-size: .84rem; line-height: 1.55; }
.market-position-copy strong { color: var(--navy); }
.market-position-rate { display: flex; align-items: center; justify-content: flex-end; gap: 12px; margin-bottom: 8px; }
.market-position-rate > span { color: var(--muted); font-size: .72rem; }
.market-position-rate-value { color: #1764e5; font-size: 1.4rem; font-weight: 850; }
.market-position-profile-link { color: #1764e5; font-size: .78rem; font-weight: 800; text-decoration: none; }
.market-position-profile-link:hover { text-decoration: underline; }
.market-position-rate-input { display: inline-flex; align-items: center; gap: 3px; color: #1764e5; font-size: 1.4rem; font-weight: 850; }
.market-position-rate-input input { width: 78px; border: 0 !important; box-shadow: none !important; color: inherit; padding: 0; font: inherit; text-align: right; }
.market-position-track { position: relative; height: 8px; border-radius: 99px; background: #edf1f7; }
.market-position-band { position: absolute; inset-block: 0; border-radius: inherit; background: linear-gradient(90deg, #acd2ff, #3e91f6); }
.market-position-marker { position: absolute; top: 50%; width: 4px; height: 22px; border-radius: 3px; background: #1458d8; transform: translate(-50%, -50%); box-shadow: 0 1px 3px rgba(0,0,0,.15); }
.market-position-axis { display: flex; justify-content: space-between; margin-top: 10px; color: var(--muted); font-size: .7rem; }
.market-position-footer { display: flex; flex-wrap: wrap; gap: 12px 24px; border-top: 1px solid #e8edf5; margin-top: 24px; padding-top: 14px; color: var(--muted); font-size: .73rem; }
.market-position-footer strong { color: var(--navy); }
.market-position-status { margin-left: auto; border: 1px solid #b8d7ff; border-radius: 5px; background: #f2f8ff; color: #1764e5; padding: 3px 8px; font-weight: 750; }
.market-rate-advice { display: grid; grid-template-columns: 34px minmax(0, 1fr); gap: 12px; align-items: start; border: 1px solid #cfe0fa; border-radius: 9px; background: #f5f9ff; margin-top: 16px; padding: 13px 15px; }
.market-rate-advice-icon { display: grid; place-items: center; width: 30px; height: 30px; border-radius: 50%; background: #dceaff; color: #1764e5; font-weight: 900; }
.market-rate-advice strong { display: block; color: var(--navy); font-size: .82rem; }
.market-rate-advice p { margin: 4px 0 0; color: var(--muted); font-size: .77rem; line-height: 1.5; }
.market-rate-advice.is-competitive, .market-rate-advice.is-balanced { border-color: #bfe5cc; background: #f3fbf6; }
.market-rate-advice.is-competitive .market-rate-advice-icon, .market-rate-advice.is-balanced .market-rate-advice-icon { background: #d8f3e1; color: #11863e; }
.market-rate-advice.is-above { border-color: #f0c7c7; background: #fff7f7; }
.market-rate-advice.is-above .market-rate-advice-icon { background: #f9dddd; color: #c53737; }
.market-rate-advice.is-upper { border-color: #f0ddb0; background: #fffbf1; }
.market-rate-advice.is-upper .market-rate-advice-icon { background: #f8e9bf; color: #9a6b00; }

@media (max-width: 820px) {
  .market-overview-panel .market-kpi-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 520px) {
  .market-overview-panel .market-kpi-grid { grid-template-columns: 1fr; }
  .market-overview-panel .market-intro { grid-template-columns: 1fr; }
  .market-overview-panel .market-chart-card, .market-position-card { padding: 18px 15px; }
  .market-position-rate { justify-content: space-between; }
  .market-position-footer { flex-direction: column; }
  .market-position-status { margin-left: 0; align-self: flex-start; }
}

@media (max-width: 900px) {
  .cv-advice-overview { grid-template-columns: 1fr; }
  .cv-advice-actions { grid-template-columns: 1fr 1fr; grid-template-rows: auto auto; }
  .cv-advice-actions .cv-upload-button { grid-column: 1 / -1; }
}

@media (max-width: 719px) {
  .advice-panel { padding: 0; }
  .cv-advice-intro { grid-template-columns: 1fr; padding: 19px; }
  .cv-score-card { grid-template-columns: 1fr; justify-items: center; padding: 22px 18px; }
  .cv-subscore-list { width: 100%; }
  .cv-subscore { grid-template-columns: 92px minmax(45px, 1fr) 28px; gap: 8px; }
  .cv-advice-actions { grid-template-columns: 1fr; }
  .cv-advice-actions .cv-upload-button { grid-column: auto; }
  .cv-advice-legend { align-items: flex-start; flex-direction: column; }
  .cv-advice-legend .cv-reference-count { margin-left: 0; }
  .advice-block summary { grid-template-columns: minmax(105px, 1fr) 14px; gap: 8px; }
  .advice-block-badges { display: none; }
  .advice-block-empty { grid-template-columns: 1fr; gap: 10px; padding: 16px 18px; }
  .advice-item-head { grid-template-columns: minmax(130px, 1fr) auto 14px; padding-block: 10px; }
  .advice-item-head .advice-meta { grid-column: 1 / -1; grid-row: 2; padding-left: 20px; }
}

/* Keep the profile layout authoritative over legacy component rules above. */
.profile-panel .profile-form-layout { grid-template-columns: minmax(360px, .95fr) minmax(500px, 1.05fr); gap: 20px; }
.profile-panel .profile-form-section { gap: 20px; border-radius: 13px; padding: 0 24px 24px; background: #fff; }
.profile-panel .profile-section-heading { margin: 0 -24px; padding: 22px 24px 18px; }
.profile-panel .profile-form-actions { display: none; }

@media (max-width: 1100px) {
  .profile-panel .profile-form-layout { grid-template-columns: 1fr; }
}

@media (max-width: 820px) {
  .profile-panel .profile-form-section { padding-inline: 18px; }
  .profile-panel .profile-section-heading { margin-inline: -18px; padding-inline: 18px; }
}

#dashboard-shell.is-profile-view .profile-panel .profile-form-layout {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
}

#dashboard-shell.is-profile-view .profile-panel {
  position: static;
  gap: 20px;
  border: 0;
  border-radius: 0;
  padding: 0;
  background: transparent;
  box-shadow: none;
}

#dashboard-shell.is-profile-view .profile-panel::before {
  display: none;
}

#dashboard-shell.is-profile-view .profile-page-heading h2 {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
}

#dashboard-shell.is-profile-view .profile-page-heading {
  justify-content: flex-end;
}

#dashboard-shell.is-profile-view .profile-intro-card {
  min-height: 138px;
  align-items: center;
  padding: 20px 24px;
}

#dashboard-shell.is-profile-view .profile-form-section {
  align-self: start;
}

#dashboard-shell.is-profile-view #profile-fields > .profile-field:has(#candidate-available-from:disabled) {
  display: none;
}

.profile-rate-input {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 8px;
}

.profile-rate-input > span {
  color: var(--muted);
  font-size: 0.88rem;
  white-space: nowrap;
}

.profile-completion-modal .modal-panel {
  width: min(520px, calc(100vw - 32px));
}

.profile-completion-modal .modal-panel > p {
  margin: 0 0 20px;
  color: var(--muted);
  line-height: 1.55;
}

.profile-completion-fields {
  display: grid;
  gap: 16px;
}

.profile-completion-fields > label {
  display: grid;
  gap: 8px;
}

.profile-completion-fields > label[hidden] {
  display: none;
}

.profile-completion-modal .criteria-note {
  display: block;
  margin-top: 14px;
}

#dashboard-shell.is-profile-view .profile-cv-section > #criteria-status {
  display: none !important;
}

#dashboard-shell.is-profile-view .role-editor .criteria-head label {
  font-size: .86rem;
}

#dashboard-shell.is-profile-view .editable-tags {
  gap: 7px;
}

#dashboard-shell.is-profile-view .editable-tag {
  min-height: 31px;
  padding: 5px 10px;
  font-size: .8rem;
}

#dashboard-shell.is-profile-view .add-chip {
  min-width: 112px;
  min-height: 34px;
}

@media (max-width: 1100px) {
  #dashboard-shell.is-profile-view .profile-panel .profile-form-layout {
    grid-template-columns: 1fr;
  }
}

/* Keep Opleiding & Training aligned with the shared, containerless page frame. */
.dashboard-main .training-panel {
  display: grid;
  gap: 20px;
  border: 0;
  border-radius: 0;
  padding: 0;
  background: transparent;
  box-shadow: none;
}

/* Keep the opdrachtenradar layout authoritative over the shared panel theme. */
.dashboard-main .matching-assignments-panel {
  display: grid;
  gap: 20px;
  border: 0;
  border-radius: 0;
  padding: 0;
  background: transparent;
  box-shadow: none;
}

.matching-page-heading h2 {
  margin: 0;
  color: #082b62;
  font-size: clamp(1.75rem, 2.2vw, 2.2rem);
  letter-spacing: -0.025em;
}

.matching-assignments-intro {
  display: grid;
  grid-template-columns: 46px minmax(0, 1fr);
  gap: 16px;
  align-items: start;
  border: 1px solid #dce4ef;
  border-radius: 12px;
  padding: 22px 24px;
  background: #fff;
}

.matching-intro-icon {
  display: grid;
  width: 44px;
  height: 44px;
  place-items: center;
  border-radius: 10px;
  background: linear-gradient(135deg, #252099, #1458de);
  color: #fff;
  box-shadow: 0 7px 18px rgba(31, 88, 222, .18);
}

.matching-intro-icon svg {
  width: 23px;
  height: 23px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-width: 1.8;
}

.matching-assignments-intro .eyebrow,
.matching-overview .eyebrow {
  margin: 0 0 7px;
  color: #1f58de;
  font-size: .7rem;
  letter-spacing: .1em;
  text-transform: uppercase;
}

.matching-assignments-intro h3,
.matching-overview h3 {
  margin: 0;
  color: #082b62;
  font-size: 1rem;
}

.matching-assignments-intro p:last-child {
  max-width: 760px;
  margin: 7px 0 0;
  color: #718198;
  font-size: .88rem;
  line-height: 1.55;
}

.matching-overview {
  display: grid;
  gap: 16px;
  border: 1px solid #dce4ef;
  border-radius: 12px;
  padding: 22px 24px 18px;
  background: #fff;
}

.matching-overview-head {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 20px;
}

.dashboard-main .matching-overview .result-count {
  min-width: 112px;
  border-color: #dce4ef;
  border-radius: 8px;
  background: #f2f5fb;
  color: #1f58de;
  text-align: center;
}

.matching-overview .matching-search-criteria {
  display: grid;
  gap: 12px;
  border: 0;
  padding: 0;
  background: transparent;
}

.matching-overview .matching-search-criteria-head {
  align-items: end;
}

.matching-overview .matching-search-criteria-head h3 {
  font-size: .82rem;
}

.matching-overview .matching-search-criteria-head p {
  margin-top: 4px;
  font-size: .76rem;
}

.matching-overview .matching-search-criteria-tags {
  gap: 7px;
}

.matching-overview .editable-tag {
  min-height: 31px;
  border-radius: 7px;
  background: #f0f3f8;
  color: #52647e;
  font-size: .76rem;
}

.matching-overview .matching-assignment-filters {
  display: flex;
  justify-content: flex-end;
  gap: 20px;
  margin: -2px 0 0;
  border: 0;
  padding: 0;
}

.matching-overview .matching-assignment-filters label {
  gap: 7px;
  font-size: .78rem;
  font-weight: 500;
}

.matching-overview .matching-radius-control {
  display: grid;
  grid-template-columns: minmax(150px, 260px) 64px;
  gap: 10px;
  align-items: center;
}

.matching-overview .matching-radius-control input[type="range"] {
  width: 100%;
  height: 5px;
  margin: 0;
  accent-color: #1f58de;
  cursor: pointer;
}

.matching-overview .matching-radius-control output,
.matching-overview .matching-freelancer-filter select {
  min-height: 36px;
  border-color: #dce4ef;
  border-radius: 8px;
  background: #f3f6fb;
  color: #082b62;
  font-size: .8rem;
}

.matching-overview .matching-radius-control output { min-width: 64px; }
.matching-overview .matching-freelancer-filter select { min-width: 82px; background: #fff; }
.matching-overview .matching-radius-filter > span small { color: #8b98aa; font-size: inherit; font-weight: 400; }

.matching-overview .matching-assignments-note {
  margin: -2px 0 0;
  color: #7b889b;
  font-size: .78rem;
}

.matching-assignment-list { gap: 12px; }

.dashboard-main .matching-assignment-card {
  gap: 0;
  border-color: #dce4ef;
  border-radius: 12px;
  padding: 0;
  box-shadow: none;
}

.matching-assignment-card::before { display: none; }

.matching-assignment-head {
  grid-template-columns: minmax(0, 1fr) auto;
  min-height: 72px;
  align-items: center;
  gap: 16px;
  padding: 14px 20px;
}

.matching-assignment-identity {
  display: flex;
  min-width: 0;
  align-items: center;
  gap: 14px;
}

.assignment-client-initials {
  display: grid;
  width: 38px;
  height: 38px;
  flex: 0 0 38px;
  place-items: center;
  border: 0;
  border-radius: 8px;
  background: #087fb8;
  color: #fff;
  font-size: .67rem;
  font-weight: 850;
  letter-spacing: .02em;
}

.assignment-client-initials.is-color-1 { background: #f3bd00; color: #152142; }
.assignment-client-initials.is-color-2 { background: #078d4f; color: #fff; }

.matching-assignment-card .match-title {
  margin: 0;
  color: #082b62;
  font-size: .94rem;
  line-height: 1.4;
  overflow-wrap: anywhere;
}

.matching-assignment-title-line {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 7px;
  margin-bottom: 5px;
}

.matching-assignment-title-line .matching-badge.is-application {
  min-height: 21px;
  border: 1px solid #f0d36a;
  border-radius: 5px;
  padding: 2px 6px;
  background: #fff8d8;
  color: #806000;
  font-size: .67rem;
}

.matching-assignment-card .meta {
  margin: 0;
  color: #718198;
  font-size: .78rem;
  line-height: 1.45;
  overflow-wrap: anywhere;
}

.matching-assignment-visual {
  grid-template-columns: auto 16px;
  align-items: center;
  gap: 14px;
}

.matching-assignment-badges {
  display: grid;
  gap: 5px;
  justify-items: end;
}
.matching-badge { min-height: 24px; border: 0; padding: 3px 6px; background: transparent; font-size: .73rem; }
.matching-card-chevron { color: #6f8098; font-size: .86rem; }

.matching-match-summary,
.matching-freelancer-status {
  color: #718198;
  font-size: .75rem;
  line-height: 1.35;
  white-space: nowrap;
}

.matching-match-summary {
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.matching-match-summary i {
  width: 7px;
  height: 7px;
  flex: 0 0 7px;
  border-radius: 50%;
  background: hsl(var(--match-summary-hue, 36) 76% 43%);
}

.matching-match-summary strong { color: hsl(var(--match-summary-hue, 36) 76% 34%); }
.matching-match-summary.is-loading i { background: #aab5c5; }
.matching-match-summary.is-unavailable { color: #8b98aa; }

.matching-assignment-details {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  margin: 0 20px;
  border: 1px solid #dce4ef;
  border-radius: 8px;
  overflow: hidden;
}

.matching-assignment-details > div {
  min-height: 62px;
  border-right: 1px solid #dce4ef;
  padding: 13px 16px;
}

.matching-assignment-details > div:last-child { border-right: 0; }
.matching-assignment-details dt { color: #718198; font-size: .68rem; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; }
.matching-assignment-details dd { margin: 8px 0 0; color: #082b62; font-size: .84rem; font-weight: 800; }

.matching-criteria-row { margin: 14px 20px 0; }
.matching-criteria-row .tag { border: 1px solid #dde4ef; border-radius: 6px; background: #f0f3f8; color: #718198; font-size: .72rem; }

.matching-assignment-actions {
  display: flex;
  gap: 9px;
  padding: 16px 20px 18px;
}

.matching-assignment-actions span {
  display: inline-flex;
  min-height: 38px;
  align-items: center;
  border: 1px solid #dce4ef;
  border-radius: 8px;
  padding: 0 20px;
  font-size: .78rem;
  font-weight: 750;
}

.matching-assignment-actions .matching-card-deadline {
  min-height: 38px;
  align-self: center;
  margin-left: auto;
  gap: 6px;
  border: 1px solid hsl(var(--deadline-hue) 64% 72%);
  border-radius: 7px;
  background: hsl(var(--deadline-hue) 78% 96%);
  color: hsl(var(--deadline-hue) 72% 36%);
  padding: 0 12px;
  font-size: .74rem;
  font-weight: 750;
  white-space: nowrap;
}

.matching-card-deadline::before {
  content: "";
  width: 7px;
  height: 7px;
  flex: 0 0 7px;
  border-radius: 50%;
  background: hsl(var(--deadline-hue) 76% 43%);
}

.matching-primary-action { border-color: #1f58de !important; background: #1f58de; color: #fff; }
.matching-secondary-action { background: #fff; color: #082b62; }

@media (max-width: 800px) {
  .matching-overview .matching-assignment-filters { justify-content: flex-start; margin-top: 0; }
  .matching-overview .matching-radius-control { grid-template-columns: minmax(120px, 1fr) 64px; }
  .matching-assignment-head { grid-template-columns: 1fr; }
  .matching-assignment-visual { justify-items: start; }
  .matching-assignment-badges { justify-content: flex-start; }
  .matching-assignment-details { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .matching-assignment-details > div:nth-child(2) { border-right: 0; }
  .matching-assignment-details > div:nth-child(-n + 2) { border-bottom: 1px solid #dce4ef; }
}

@media (max-width: 520px) {
  .matching-assignments-intro { grid-template-columns: 1fr; padding: 20px; }
  .matching-overview { padding: 20px; }
  .matching-overview-head { align-items: stretch; flex-direction: column; }
  .dashboard-main .matching-overview .result-count { align-self: flex-start; }
  .matching-overview .matching-assignment-filters { flex-wrap: wrap; }
  .matching-assignment-details { grid-template-columns: 1fr; }
  .matching-assignment-details > div { border-right: 0; border-bottom: 1px solid #dce4ef; }
  .matching-assignment-details > div:last-child { border-bottom: 0; }
  .matching-assignment-actions { flex-direction: column; }
  .matching-assignment-actions span { justify-content: center; }
  .matching-assignment-actions .matching-card-deadline { align-self: flex-end; margin-left: 0; }
}

.dashboard-main .auto-apply-panel {
  border: 0;
  background: transparent;
  box-shadow: none;
}

.dashboard-main .auto-apply-panel > .section-head {
  min-height: 0;
  border: 0;
  background: transparent;
  padding: 0 0 8px;
}

/* Keep the applications heading editorial after the shared panel theme. */
.dashboard-main .assignment-applications-panel[data-results-view="applications"] > .section-head {
  min-height: auto;
  border: 0;
  border-radius: 0;
  padding: 4px 0 0;
  background: transparent;
}

/* Keep the user page frame authoritative after legacy dashboard rules. */
#dashboard-shell {
  grid-template-rows: auto minmax(0, 1fr);
  gap: 0;
  background: #eef2fa;
}

#dashboard-shell > .user-dashboard-topbar {
  grid-column: 1 / -1;
  grid-row: 1;
  border: 0;
  border-bottom: 1px solid #e2e8f5;
  background: #fff;
}

#dashboard-shell > #user-dashboard-sidebar {
  grid-column: 1;
  grid-row: 2;
  background: #19136a;
}

#dashboard-shell > .dashboard-main {
  grid-column: 2;
  grid-row: 2;
  padding: 26px;
  background: #eef2fa;
}

#dashboard-shell .results-menu-item.is-active {
  border-left: 3px solid #ffb30f;
  border-radius: 0 5px 5px 0;
  background: rgba(31, 88, 222, 0.26);
  color: #fff;
  box-shadow: none;
}

#dashboard-shell .results-menu-item.is-active .menu-count {
  background: #ffb30f;
  color: #06265a;
}

@media (max-width: 820px) {
  #dashboard-shell > .user-dashboard-topbar,
  #dashboard-shell > .dashboard-main {
    grid-column: 1;
  }

  #dashboard-shell > .dashboard-main {
    grid-row: 2;
    padding: 18px 14px;
  }
}

/* Keep the shared introduction layout authoritative over legacy page rules. */
#dashboard-shell .dashboard-main .page-intro {
  display: grid;
  grid-template-columns: 46px minmax(0, 1fr) auto;
  gap: 16px;
  align-items: start;
  min-height: 0;
  margin: 0;
  border: 1px solid #dce4ef;
  border-radius: 12px;
  padding: 22px 24px;
  background: #fff;
  box-shadow: none;
}

#dashboard-shell .dashboard-main .page-intro-icon {
  display: grid;
  width: 44px;
  height: 44px;
  place-items: center;
  border-radius: 10px;
  box-shadow: none;
}

#dashboard-shell .dashboard-main .page-intro-icon svg { width: 22px; height: 22px; }
#dashboard-shell .dashboard-main .page-intro .eyebrow { margin: 0 0 6px; }
#dashboard-shell .dashboard-main .page-intro h2,
#dashboard-shell .dashboard-main .page-intro h3 { margin: 0; font-size: 1.08rem; }
#dashboard-shell .dashboard-main .page-intro div > p:last-child { margin: 7px 0 0; font-size: .91rem; line-height: 1.5; }
#dashboard-shell .dashboard-main .page-intro > .result-count { align-self: start; }

@media (max-width: 719px) {
  #dashboard-shell .dashboard-main .page-intro { grid-template-columns: 44px minmax(0, 1fr); padding: 19px; }
  #dashboard-shell .dashboard-main .page-intro > .result-count { grid-column: 2; justify-self: start; }
}

@media (max-width: 440px) {
  #dashboard-shell .dashboard-main .page-intro { grid-template-columns: 1fr; }
  #dashboard-shell .dashboard-main .page-intro > .result-count { grid-column: 1; }
}
