.hero {
  position: relative;
  overflow: hidden;
  padding: 88px 0 78px;
  background:
    radial-gradient(circle at 15% 15%, rgba(37, 99, 235, 0.11), transparent 30%),
    radial-gradient(circle at 90% 10%, rgba(14, 165, 233, 0.09), transparent 27%),
    linear-gradient(180deg, #ffffff, #f8fbff);
}

.hero-grid {
  display: grid;
  grid-template-columns: 1.02fr 0.98fr;
  align-items: center;
  gap: 64px;
}

.hero h1 {
  margin: 18px 0 20px;
  letter-spacing: -0.055em;
}

.hero h1 span {
  color: var(--primary);
}

.hero-copy {
  max-width: 650px;
  color: var(--text-soft);
  font-size: 1.13rem;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin: 30px 0 16px;
}

.hero-preview {
  padding: 22px;
  border: 1px solid rgba(226, 232, 240, 0.95);
  border-radius: 26px;
  background: rgba(255, 255, 255, 0.93);
  box-shadow: var(--shadow);
}

.preview-label {
  margin-bottom: 12px;
  color: var(--muted);
  font-size: 0.8rem;
  font-weight: 800;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.preview-window {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: white;
}

.preview-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 14px 16px;
  border-bottom: 1px solid var(--line);
  background: var(--surface-soft);
}

.preview-body {
  padding: 18px;
}

.preview-intro {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 17px;
  border-radius: 14px;
  background: var(--primary-soft);
}

.example-list {
  display: grid;
  gap: 10px;
  margin-top: 14px;
}

.example-row {
  display: grid;
  grid-template-columns: 36px 1fr auto;
  align-items: center;
  gap: 12px;
  padding: 13px;
  border: 1px solid var(--line);
  border-radius: 13px;
}

.example-rank {
  width: 32px;
  height: 32px;
  display: grid;
  place-items: center;
  border-radius: 10px;
  color: var(--primary);
  background: var(--primary-soft);
  font-weight: 900;
}

.score-badge {
  padding: 5px 9px;
  border-radius: 999px;
  color: var(--success);
  background: var(--success-soft);
  font-size: 0.82rem;
  font-weight: 900;
}

.page-hero {
  padding: 68px 0 50px;
  border-bottom: 1px solid var(--line);
  background: linear-gradient(180deg, #f8fbff, #ffffff);
}

.page-hero h1 {
  margin: 10px 0 12px;
  font-size: clamp(2.35rem, 5vw, 3.8rem);
  letter-spacing: -0.045em;
}

.page-hero p {
  max-width: 740px;
  color: var(--muted);
}

.pricing-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 22px;
  align-items: stretch;
}

.price-card {
  position: relative;
  display: flex;
  flex-direction: column;
  padding: 28px;
}

.price-card--featured {
  border-color: #93c5fd;
  box-shadow: 0 18px 50px rgba(37, 99, 235, 0.12);
  transform: translateY(-8px);
}

.price-label {
  position: absolute;
  top: 18px;
  right: 18px;
  padding: 5px 9px;
  border-radius: 999px;
  color: white;
  background: var(--text);
  font-size: 0.75rem;
  font-weight: 850;
}

.price {
  margin: 18px 0 8px;
  font-size: 2.6rem;
  line-height: 1;
  font-weight: 900;
  letter-spacing: -0.04em;
}

.plan-features {
  display: grid;
  gap: 10px;
  margin: 22px 0;
  padding: 0;
  list-style: none;
  color: #334155;
}

.plan-features li::before {
  content: "✓";
  margin-right: 9px;
  color: var(--success);
  font-weight: 900;
}

.price-card .button {
  margin-top: auto;
}

.dashboard-layout {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 250px 1fr;
  background: var(--surface-soft);
}

.sidebar {
  position: sticky;
  top: 0;
  height: 100vh;
  padding: 22px 18px;
  color: white;
  background: var(--text);
}

.sidebar-logo {
  display: block;
  width: 205px;
  max-width: 100%;
  height: auto;
  max-height: 46px;
  object-fit: contain;
  object-position: left center;
}

.sidebar-nav {
  display: grid;
  gap: 7px;
  margin-top: 30px;
}

.sidebar-nav button,
.sidebar-nav a {
  width: 100%;
  border: 0;
  border-radius: 10px;
  padding: 12px;
  color: #cbd5e1;
  background: transparent;
  text-align: left;
  font-weight: 750;
}

.sidebar-nav button:hover,
.sidebar-nav button.is-active,
.sidebar-nav a:hover {
  color: white;
  background: #1e293b;
}

.sidebar-footer {
  position: absolute;
  right: 18px;
  bottom: 22px;
  left: 18px;
}

.dashboard-main {
  min-width: 0;
}

.dashboard-topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  min-height: 74px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 0 28px;
  border-bottom: 1px solid var(--line);
  background: white;
}

.dashboard-content {
  width: min(100%, 1320px);
  margin-inline: auto;
  padding: 28px;
}

.dashboard-section {
  display: none;
}

.dashboard-section.is-active {
  display: block;
}

.panel {
  padding: 24px;
}

.panel-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 18px;
}

.panel-heading h1,
.panel-heading h2,
.panel-heading h3 {
  margin-bottom: 0;
}

.stat-card {
  padding: 20px;
}

.stat-card strong {
  display: block;
  margin-top: 7px;
  font-size: 1.75rem;
}

.screening-grid {
  display: grid;
  grid-template-columns: 1fr 340px;
  gap: 22px;
  align-items: start;
}

.dropzone {
  padding: 30px;
  border: 1.5px dashed #93c5fd;
  border-radius: 16px;
  background: #f8fbff;
  text-align: center;
}

.dropzone.is-dragging {
  border-color: var(--primary);
  background: var(--primary-soft);
}

.file-list {
  display: grid;
  gap: 8px;
  margin-top: 14px;
}

.file-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: white;
}

.progress {
  height: 9px;
  overflow: hidden;
  border-radius: 999px;
  background: #e2e8f0;
}

.progress span {
  display: block;
  width: 0;
  height: 100%;
  background: var(--primary);
  transition: width 0.35s ease;
}

.candidate-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
  margin: 18px 0;
}

/* The results mount is a full-width wrapper. The actual three-column grid is
   rendered inside it by dashboard-selection-v3.js. */
#topCandidates {
  width: 100%;
  min-width: 0;
}

#topCandidates > .top-candidates-section {
  width: 100%;
  min-width: 0;
}

.top-candidates-section {
  margin: 18px 0 24px;
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: linear-gradient(180deg, #f8fbff 0%, #ffffff 100%);
}

.top-candidates-section__heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
}

.top-candidates-section__heading h3 {
  margin: 4px 0 6px;
  font-size: clamp(1.2rem, 2vw, 1.55rem);
}

.top-candidates-section__heading p {
  max-width: 760px;
  margin: 0;
}

.candidate-grid--top-three {
  margin-bottom: 14px;
}

.candidate-card {
  min-width: 0;
  padding: 20px;
}

.candidate-card--rank-1 {
  border-color: #93c5fd;
  box-shadow: 0 18px 38px rgba(37, 99, 235, 0.12);
}

.candidate-card__heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
}

.candidate-card__heading .score-ring {
  flex: 0 0 64px;
}

.candidate-card__identity {
  min-width: 0;
}

.candidate-card__identity h4 {
  margin: 8px 0 0;
  overflow-wrap: break-word;
  word-break: normal;
  font-size: 1.08rem;
}

.candidate-card__identity-meta {
  display: grid;
  min-width: 0;
  gap: 5px;
  margin-top: 6px;
}

.candidate-card__file,
.results-table__file,
.candidate-modal-summary__file {
  display: block;
  max-width: 100%;
  overflow: hidden;
  color: var(--muted);
  text-overflow: ellipsis;
  white-space: nowrap;
}

.candidate-card__file {
  font-size: 0.76rem;
  line-height: 1.35;
}

.candidate-reference {
  display: inline-flex;
  width: fit-content;
  max-width: 100%;
  align-items: center;
  padding: 4px 7px;
  border: 1px solid #dbe3ef;
  border-radius: 999px;
  color: #475569;
  background: #f8fafc;
  font-size: 0.68rem;
  font-weight: 800;
  line-height: 1;
  letter-spacing: 0.035em;
  white-space: nowrap;
}

.candidate-reference--table {
  margin-top: 2px;
}

.results-table__candidate {
  min-width: 190px;
}

.candidate-rank-badge,
.results-table__top-badge {
  display: inline-flex;
  width: fit-content;
  align-items: center;
  border-radius: 999px;
  color: #1d4ed8;
  background: #dbeafe;
  font-size: 0.72rem;
  font-weight: 850;
  line-height: 1;
}

.candidate-rank-badge {
  padding: 7px 9px;
}

.candidate-card__scores {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  margin: 18px 0;
}

.candidate-card__scores span {
  display: grid;
  gap: 2px;
  padding: 9px;
  border-radius: 10px;
  color: var(--muted);
  background: #f8fafc;
  font-size: 0.74rem;
  line-height: 1.35;
}

.candidate-card__scores strong {
  color: var(--text);
  font-size: 0.92rem;
}

.candidate-card__insight {
  margin-bottom: 12px;
  padding: 11px 12px;
  border-left: 3px solid #60a5fa;
  border-radius: 0 10px 10px 0;
  background: #eff6ff;
}

.candidate-card__insight--gap {
  border-left-color: #f59e0b;
  background: #fffbeb;
}

.candidate-card__insight-label {
  display: block;
  margin-bottom: 4px;
  color: var(--text);
  font-size: 0.72rem;
  font-weight: 850;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.candidate-card__insight p {
  display: -webkit-box;
  margin: 0;
  overflow: hidden;
  color: var(--text-soft);
  font-size: 0.84rem;
  line-height: 1.45;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
}

.candidate-card > .button {
  width: 100%;
}

.top-candidates-section__disclaimer {
  margin: 0;
  color: var(--muted);
  font-size: 0.78rem;
  line-height: 1.45;
}

.results-table__top-row {
  background: #f8fbff;
}

.results-table__top-badge {
  padding: 5px 7px;
}

.score-ring {
  --score: 0;
  position: relative;
  width: 64px;
  height: 64px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: conic-gradient(var(--primary) calc(var(--score) * 1%), #e2e8f0 0);
  font-weight: 900;
}

.score-ring::after {
  content: "";
  position: absolute;
  width: 50px;
  height: 50px;
  border-radius: 50%;
  background: white;
}

.score-ring span {
  position: relative;
  z-index: 1;
  font-size: 0.88rem;
}

.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: grid;
  place-items: center;
  padding: 20px;
  background: rgba(15, 23, 42, 0.58);
}

.modal {
  width: min(100%, 680px);
  max-height: 90vh;
  overflow: auto;
  border-radius: 20px;
  background: white;
  box-shadow: 0 30px 80px rgba(15, 23, 42, 0.25);
}

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

.modal-body {
  padding: 22px;
}

.modal-close {
  width: 36px;
  height: 36px;
  border: 0;
  border-radius: 10px;
  background: var(--surface-soft);
  font-size: 1.1rem;
}

/* Billing workspace v5 */
.billing-section {
  --billing-blue: #2563eb;
  --billing-navy: #0f172a;
  --billing-soft-blue: #eff6ff;
}

.billing-page-heading,
.billing-block-heading,
.billing-history-heading {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
}

.billing-page-heading {
  margin-bottom: 24px;
}

.billing-page-heading h2 {
  margin: 12px 0 8px;
  font-size: clamp(2.15rem, 4vw, 3.15rem);
}

.billing-page-heading p,
.billing-block-heading p,
.billing-history-heading p {
  margin: 0;
  color: var(--muted);
}

.billing-message {
  margin-bottom: 20px;
}

.billing-summary-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
  margin-bottom: 24px;
}

.billing-summary-card {
  min-height: 150px;
  display: grid;
  grid-template-columns: 52px minmax(0, 1fr);
  align-items: start;
  gap: 16px;
  padding: 22px;
  overflow: hidden;
}

.billing-summary-card--plan {
  background: linear-gradient(145deg, #ffffff, #f5f9ff);
}

.billing-summary-card--credits {
  background: linear-gradient(145deg, #ffffff, #f0fdf8);
}

.billing-summary-card--support {
  background: linear-gradient(145deg, #ffffff, #fffaf0);
}

.billing-summary-icon,
.billing-plan-icon,
.payment-order-summary__icon,
.payment-method-option__icon,
.billing-method-chip__icon {
  display: inline-grid;
  place-items: center;
  color: var(--primary);
  background: var(--primary-soft);
}

.billing-summary-icon {
  width: 52px;
  height: 52px;
  border-radius: 16px;
}

.billing-summary-card--credits .billing-summary-icon {
  color: var(--success);
  background: var(--success-soft);
}

.billing-summary-card--support .billing-summary-icon {
  color: var(--warning);
  background: var(--warning-soft);
}

.billing-summary-icon svg,
.billing-plan-icon svg,
.payment-order-summary__icon svg,
.payment-method-option__icon svg,
.billing-method-chip__icon svg {
  width: 25px;
  height: 25px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.billing-summary-label,
.billing-kicker {
  display: block;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 850;
  letter-spacing: 0.075em;
  text-transform: uppercase;
}

.billing-summary-card strong {
  display: block;
  margin-top: 4px;
  font-size: 1.65rem;
  line-height: 1.15;
}

.billing-summary-card p {
  margin: 8px 0 0;
  color: var(--muted);
  font-size: 0.88rem;
  line-height: 1.5;
}

.billing-status-monitor {
  margin-bottom: 30px;
  overflow: hidden;
  border: 1px solid #bfdbfe;
  border-radius: 20px;
  background: linear-gradient(135deg, #f8fbff, #eff6ff);
  box-shadow: 0 14px 35px rgba(37, 99, 235, 0.08);
}

.billing-status-monitor__main {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 24px;
  padding: 24px;
}

.billing-status-monitor__title {
  display: flex;
  align-items: center;
  gap: 12px;
}

.billing-status-monitor__pulse {
  width: 12px;
  height: 12px;
  flex: 0 0 auto;
  border-radius: 50%;
  background: var(--primary);
  box-shadow: 0 0 0 7px rgba(37, 99, 235, 0.12);
  animation: billing-pulse 1.8s ease-in-out infinite;
}

@keyframes billing-pulse {
  50% {
    box-shadow: 0 0 0 12px rgba(37, 99, 235, 0.03);
  }
}

.billing-status-monitor__title strong {
  font-size: 1.15rem;
}

.billing-status-monitor__description {
  margin: 9px 0 0 24px;
  color: var(--text-soft);
}

.billing-status-monitor__meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 22px;
  margin: 16px 0 0 24px;
  color: var(--muted);
  font-size: 0.9rem;
}

.billing-status-monitor__meta strong {
  color: var(--text);
}

.billing-status-monitor__timer {
  min-width: 205px;
  padding: 18px;
  border: 1px solid rgba(37, 99, 235, 0.16);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.82);
  text-align: center;
}

.billing-status-monitor__timer span {
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 750;
}

.billing-status-monitor__timer strong {
  display: block;
  margin: 4px 0 10px;
  color: var(--primary-dark);
  font-size: 2rem;
  line-height: 1;
  letter-spacing: 0.02em;
}

.billing-status-monitor__footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 15px 24px;
  border-top: 1px solid rgba(37, 99, 235, 0.14);
  color: var(--text-soft);
  background: rgba(255, 255, 255, 0.55);
  font-size: 0.9rem;
}

.billing-status-monitor__footer a {
  color: var(--primary-dark);
  font-weight: 800;
}

.billing-block-heading {
  margin: 32px 0 18px;
}

.billing-block-heading h3,
.billing-history-heading h3 {
  margin: 5px 0 6px;
  font-size: clamp(1.6rem, 3vw, 2.15rem);
}

.billing-plan-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
  align-items: stretch;
}

.billing-plan-card {
  position: relative;
  min-width: 0;
  display: flex;
  flex-direction: column;
  padding: 24px;
  transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

.billing-plan-card:hover {
  border-color: #bfdbfe;
  box-shadow: 0 18px 42px rgba(15, 23, 42, 0.08);
  transform: translateY(-3px);
}

.billing-plan-card--featured {
  border-color: #93c5fd;
  background: linear-gradient(180deg, #ffffff, #f7faff);
  box-shadow: 0 18px 45px rgba(37, 99, 235, 0.11);
}

.billing-plan-card.is-current {
  border-color: #86efac;
  box-shadow: 0 14px 36px rgba(4, 120, 87, 0.09);
}

.billing-plan-card__header {
  min-height: 48px;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.billing-plan-name {
  display: block;
  font-size: 1.3rem;
  font-weight: 900;
}

.billing-current-badge,
.billing-popular-badge {
  display: inline-flex;
  margin-top: 6px;
  padding: 4px 8px;
  border-radius: 999px;
  font-size: 0.7rem;
  font-weight: 850;
}

.billing-current-badge {
  color: var(--success);
  background: var(--success-soft);
}

.billing-popular-badge {
  position: absolute;
  top: 18px;
  right: 18px;
  color: white;
  background: var(--text);
}

.billing-plan-icon {
  width: 44px;
  height: 44px;
  flex: 0 0 auto;
  border-radius: 14px;
}

.billing-plan-card--featured .billing-plan-icon {
  color: white;
  background: var(--primary);
}

.billing-plan-price {
  margin: 24px 0 8px;
  font-size: clamp(2.25rem, 4vw, 3rem);
  line-height: 1;
  font-weight: 950;
  letter-spacing: -0.045em;
}

.billing-plan-credit {
  margin: 0;
  color: var(--muted);
}

.billing-plan-credit strong {
  color: var(--text);
}

.billing-plan-features {
  display: grid;
  gap: 11px;
  margin: 22px 0 24px;
  padding: 0;
  color: var(--text-soft);
  list-style: none;
}

.billing-plan-features li {
  position: relative;
  padding-left: 25px;
}

.billing-plan-features li::before {
  content: "✓";
  position: absolute;
  left: 0;
  color: var(--success);
  font-weight: 900;
}

.billing-plan-card .button {
  margin-top: auto;
}

.billing-currency-note {
  margin: 18px 0 0;
  color: var(--muted);
  font-size: 0.88rem;
  text-align: center;
}

.billing-method-strip {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 26px 0;
  padding: 16px 18px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: white;
}

.billing-method-strip__intro {
  min-width: 0;
  display: grid;
  gap: 2px;
  margin-right: auto;
}

.billing-method-strip__intro span {
  color: var(--muted);
  font-size: 0.82rem;
}

.billing-method-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 11px;
  border-radius: 11px;
  color: #334155;
  background: var(--surface-soft);
  font-size: 0.86rem;
  font-weight: 750;
  white-space: nowrap;
}

.billing-method-chip__icon {
  width: 28px;
  height: 28px;
  border-radius: 9px;
}

.billing-method-chip__icon svg {
  width: 17px;
  height: 17px;
}

.billing-history-panel {
  margin-top: 28px;
  padding: 26px;
}

.billing-history-heading {
  margin-bottom: 20px;
}

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

.payment-history-card {
  display: grid;
  grid-template-columns: minmax(170px, 1.3fr) minmax(120px, 0.8fr) minmax(130px, 0.8fr) minmax(180px, 1fr) auto;
  align-items: center;
  gap: 18px;
  padding: 17px 18px;
  border: 1px solid var(--line);
  border-radius: 15px;
  background: white;
}

.payment-history-card:hover {
  border-color: #cbd5e1;
  background: #fcfdff;
}

.payment-history-card__primary strong,
.payment-history-card__value strong {
  display: block;
}

.payment-history-card__primary span,
.payment-history-card__label,
.payment-history-card__value span {
  color: var(--muted);
  font-size: 0.78rem;
}

.payment-history-card__reference {
  min-width: 0;
}

.payment-history-card__reference-row {
  display: flex;
  align-items: center;
  gap: 7px;
}

.payment-history-card__reference code {
  max-width: 150px;
  overflow: hidden;
  color: var(--text);
  font-family: inherit;
  font-size: 0.87rem;
  font-weight: 750;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.copy-value-button {
  min-width: 34px;
  min-height: 34px;
  display: inline-grid;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 9px;
  color: var(--muted);
  background: white;
  font-size: 0.75rem;
  font-weight: 800;
}

.copy-value-button:hover {
  border-color: #93c5fd;
  color: var(--primary);
  background: var(--primary-soft);
}

.payment-history-card__status {
  display: grid;
  justify-items: end;
  gap: 7px;
  text-align: right;
}

.payment-history-card__support {
  color: var(--primary-dark);
  font-size: 0.78rem;
  font-weight: 800;
}

.payment-modal {
  width: min(100%, 820px);
}

.payment-modal-header {
  align-items: flex-start;
  padding: 22px 26px;
}

.payment-modal-header h3 {
  margin: 4px 0 0;
  font-size: 1.65rem;
}

.payment-modal-body {
  padding: 24px 26px 26px;
}

.payment-order-summary {
  display: grid;
  grid-template-columns: 52px minmax(0, 1fr) auto;
  align-items: center;
  gap: 15px;
  padding: 18px;
  border: 1px solid #bfdbfe;
  border-radius: 17px;
  background: linear-gradient(135deg, #f8fbff, #eff6ff);
}

.payment-order-summary__icon {
  width: 52px;
  height: 52px;
  border-radius: 16px;
}

.payment-order-summary span,
.payment-order-summary small {
  display: block;
  color: var(--muted);
}

.payment-order-summary strong {
  display: block;
  margin: 2px 0;
  font-size: 1.2rem;
}

.payment-order-summary__amount {
  text-align: right;
}

.payment-order-summary__amount strong {
  color: var(--primary-dark);
  font-size: 1.5rem;
}

.payment-process-note {
  display: grid;
  gap: 4px;
  margin: 16px 0 20px;
  padding: 13px 15px;
  border-radius: 13px;
  color: #334155;
  background: var(--surface-soft);
  font-size: 0.88rem;
}

.payment-process-note span {
  color: var(--muted);
}

.payment-method-fieldset {
  margin: 0 0 18px;
  padding: 0;
  border: 0;
}

.payment-method-fieldset legend {
  margin-bottom: 9px;
  color: #334155;
  font-size: 0.91rem;
  font-weight: 800;
}

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

.payment-method-option {
  position: relative;
  cursor: pointer;
}

.payment-method-option input {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  opacity: 0;
}

.payment-method-option__content {
  min-height: 76px;
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: white;
  transition: border-color 0.2s ease, background 0.2s ease, box-shadow 0.2s ease;
}

.payment-method-option:hover .payment-method-option__content {
  border-color: #93c5fd;
  background: #fbfdff;
}

.payment-method-option input:checked + .payment-method-option__content {
  border-color: var(--primary);
  background: var(--primary-soft);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.08);
}

.payment-method-option input:focus-visible + .payment-method-option__content {
  outline: 3px solid rgba(37, 99, 235, 0.28);
  outline-offset: 2px;
}

.payment-method-option__icon {
  width: 40px;
  height: 40px;
  flex: 0 0 auto;
  border-radius: 12px;
}

.payment-account-card {
  min-height: 108px;
  margin-bottom: 18px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 15px;
  background: #fbfcfe;
}

.payment-account-card__empty {
  min-height: 74px;
  display: grid;
  place-items: center;
  color: var(--muted);
  text-align: center;
}

.payment-account-card__heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 11px;
}

.payment-account-card__heading span {
  color: var(--success);
  font-size: 0.78rem;
  font-weight: 850;
}

.payment-account-detail-list {
  display: grid;
  gap: 8px;
}

.payment-account-detail {
  display: grid;
  grid-template-columns: 130px minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  padding: 9px 10px;
  border-radius: 10px;
  background: white;
}

.payment-account-detail__label {
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 750;
}

.payment-account-detail__value {
  min-width: 0;
  overflow-wrap: anywhere;
  font-size: 0.9rem;
  font-weight: 800;
}

.payment-form-row {
  align-items: start;
}

.payment-proof-input {
  padding: 9px;
}

.payment-submit-note {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin: 2px 0 16px;
  padding: 12px 14px;
  border-radius: 12px;
  color: #065f46;
  background: var(--success-soft);
  font-size: 0.86rem;
}

.payment-submit-note span {
  font-weight: 950;
}

.payment-submit-note p {
  margin: 0;
}

.payment-submit-button {
  min-height: 52px;
}

.payment-modal-support {
  margin: 13px 0 0;
  color: var(--muted);
  font-size: 0.82rem;
  text-align: center;
}

.payment-modal-support a {
  color: var(--primary-dark);
  font-weight: 800;
}


/* Senior audit refinements — 25 July 2026 */
.faq-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
}

.dashboard-page-title {
  margin-bottom: 0;
  font-size: clamp(2rem, 4vw, 2.75rem);
}

.sidebar-nav button,
.sidebar-nav a {
  display: flex;
  align-items: center;
  gap: 11px;
  white-space: nowrap;
}

.sidebar-nav svg,
.dashboard-mobile-account svg {
  width: 20px;
  height: 20px;
  flex: 0 0 auto;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.sidebar-nav button:first-child svg path {
  fill: currentColor;
  stroke: none;
}

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

.dashboard-mobile-account {
  display: none;
  width: 42px;
  height: 42px;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 12px;
  color: var(--text);
  background: white;
}

.dashboard-greeting {
  min-width: 0;
}

.dashboard-greeting__line {
  min-width: 0;
  display: flex;
  align-items: baseline;
  gap: 0.32em;
  color: var(--text);
  font-size: 1rem;
  line-height: 1.25;
}

.dashboard-greeting__line strong {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.dashboard-greeting__subtitle {
  display: block;
  margin-top: 5px;
  color: var(--muted);
  font-size: 0.92rem;
  line-height: 1.3;
}

.billing-plan-card--featured .billing-plan-card__header {
  padding-right: 104px;
}

.table-cell-value {
  min-width: 0;
  overflow-wrap: anywhere;
}

.table-cell-stack {
  display: grid;
  gap: 3px;
}

.table-cell-value--status {
  display: flex;
  align-items: center;
}

.table-cell-value--action {
  display: flex;
  align-items: center;
}

.candidate-card h3,
.candidate-modal-summary__identity,
.candidate-modal-summary__identity h2,
.file-item__details,
.file-item__details strong {
  min-width: 0;
  overflow-wrap: anywhere;
}

.candidate-modal-summary {
  min-width: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 20px;
}

.candidate-modal-summary__identity h2 {
  margin-bottom: 4px;
}

.account-form-actions {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 4px;
}

.project-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.table--responsive td[data-label]::before {
  content: none;
}

/* Rich-text project fields and automatic multi-CV screening */
.field-label-row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 8px;
}

.field-label {
  color: var(--text);
  font-weight: 800;
}

.rich-text-counter {
  flex: 0 0 auto;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 750;
}

.rich-text-counter.is-over-limit {
  color: var(--danger);
}

.rich-text-control {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 13px;
  background: white;
  transition: border-color 0.18s ease, box-shadow 0.18s ease;
}

.rich-text-control:focus-within {
  border-color: #60a5fa;
  box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.1);
}

.rich-text-control[aria-invalid="true"] {
  border-color: var(--danger);
  box-shadow: 0 0 0 4px rgba(190, 18, 60, 0.08);
}

.rich-text-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  padding: 8px;
  border-bottom: 1px solid var(--line);
  background: var(--surface-soft);
}

.rich-text-toolbar button {
  min-width: 38px;
  min-height: 36px;
  display: inline-grid;
  place-items: center;
  padding: 6px 10px;
  border: 1px solid transparent;
  border-radius: 8px;
  color: var(--text-soft);
  background: transparent;
  font: inherit;
  font-size: 0.84rem;
  font-weight: 750;
  cursor: pointer;
}

.rich-text-toolbar button:hover,
.rich-text-toolbar button[aria-pressed="true"] {
  border-color: #bfdbfe;
  color: var(--primary);
  background: var(--primary-soft);
}

.rich-text-toolbar button:focus-visible {
  outline: 3px solid rgba(37, 99, 235, 0.25);
  outline-offset: 1px;
}

.rich-text-editor {
  min-height: 148px;
  padding: 14px 16px;
  color: var(--text);
  background: white;
  line-height: 1.65;
  overflow-wrap: anywhere;
  white-space: normal;
}

.rich-text-editor--compact {
  min-height: 112px;
}

.rich-text-editor--description {
  min-height: 220px;
}

.rich-text-editor:focus {
  outline: 0;
}

.rich-text-editor:empty::before {
  content: attr(data-placeholder);
  color: #94a3b8;
  pointer-events: none;
}

.rich-text-editor p {
  margin: 0 0 9px;
}

.rich-text-editor p:last-child {
  margin-bottom: 0;
}

.rich-text-editor ul,
.rich-text-editor ol {
  margin: 7px 0 9px 22px;
  padding: 0;
}

.rich-text-editor li + li {
  margin-top: 4px;
}

.dropzone__icon {
  font-size: 2rem;
  line-height: 1;
}

.screening-selection-summary {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  margin-top: 16px;
}

.screening-selection-stat {
  min-width: 0;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 11px;
  background: var(--surface-soft);
}

.screening-selection-stat span {
  display: block;
  color: var(--muted);
  font-size: 0.76rem;
  font-weight: 700;
}

.screening-selection-stat strong {
  display: block;
  margin-top: 4px;
  color: var(--text);
  font-size: 1.18rem;
  overflow-wrap: anywhere;
}

.screening-selection-bar {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-top: 14px;
}

.screening-selection-bar p {
  margin: 4px 0 0;
}

.screening-progress-wrap {
  margin-top: 18px;
}

.screening-progress-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 8px;
}

.screening-progress-note {
  margin: 8px 0 0;
}

.file-list:not(:empty) {
  max-height: 420px;
  overflow-y: auto;
  padding-right: 3px;
}

.file-item__status {
  display: inline-flex;
  align-items: center;
  margin-top: 5px;
  padding: 3px 7px;
  border-radius: 999px;
  color: var(--muted);
  background: #eef2f7;
  font-size: 0.72rem;
  font-weight: 800;
}

.file-item__status--processing {
  color: #1d4ed8;
  background: #dbeafe;
}

.file-item__status--failed {
  color: #9f1239;
  background: #ffe4e6;
}

.file-item__status--waiting {
  color: #475569;
  background: #f1f5f9;
}

.file-item.is-processing {
  border-color: #93c5fd;
  background: #f8fbff;
}

.file-item.is-failed {
  border-color: #fecdd3;
  background: #fff8f8;
}

.dropzone.is-disabled {
  opacity: 0.66;
  cursor: not-allowed;
}

.dropzone.is-disabled .button {
  pointer-events: none;
}

/* Background CV screening queue */
.file-item__status--uploading {
  background: var(--primary-soft);
  color: var(--primary-dark);
}

.file-item__status--uploaded {
  background: var(--success-soft);
  color: var(--success-dark);
}

.screening-job-list {
  display: grid;
  gap: 16px;
}

.screening-job-card {
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 18px;
  background: var(--surface);
}

.screening-job-card__heading,
.screening-job-card__footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.screening-job-card__heading > div {
  min-width: 0;
}

.screening-job-card__heading strong {
  display: block;
  margin-top: 3px;
  overflow-wrap: anywhere;
}

.screening-job-card__metrics {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  margin: 16px 0 12px;
}

.screening-job-card__metrics span {
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 10px;
  color: var(--muted);
  font-size: 0.84rem;
}

.screening-job-card__metrics strong {
  display: block;
  color: var(--text);
  font-size: 1rem;
  margin-bottom: 2px;
}

.screening-job-card__footer {
  margin-top: 14px;
}

.screening-job-card__actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 8px;
}


/* Supabase-inspired dashboard shell — layout-only refinement, 26 July 2026 */
.dashboard-layout {
  grid-template-columns: 232px minmax(0, 1fr);
  background: #f6f8fb;
}

.sidebar {
  display: flex;
  flex-direction: column;
  padding: 14px 12px;
  border-right: 1px solid rgba(148, 163, 184, 0.18);
  background: #0b1220;
  box-shadow: 8px 0 30px rgba(15, 23, 42, 0.06);
}

.sidebar > a:first-child {
  min-height: 58px;
  display: flex;
  align-items: center;
  padding: 0 10px 14px;
  border-bottom: 1px solid rgba(148, 163, 184, 0.16);
}

.sidebar-logo {
  width: 184px;
  max-height: 40px;
}

.sidebar-nav {
  flex: 1 1 auto;
  align-content: start;
  gap: 5px;
  margin-top: 14px;
}

.sidebar-nav button,
.sidebar-nav a {
  position: relative;
  min-height: 44px;
  padding: 10px 12px;
  border: 1px solid transparent;
  border-radius: 8px;
  color: #aebbd0;
  font-size: 0.92rem;
  font-weight: 680;
  transition: color 0.16s ease, background 0.16s ease, border-color 0.16s ease;
}

.sidebar-nav button::before,
.sidebar-nav a::before {
  content: "";
  position: absolute;
  top: 9px;
  bottom: 9px;
  left: -12px;
  width: 3px;
  border-radius: 0 999px 999px 0;
  background: transparent;
}

.sidebar-nav button:hover,
.sidebar-nav button.is-active,
.sidebar-nav a:hover {
  color: #ffffff;
  border-color: rgba(148, 163, 184, 0.12);
  background: rgba(30, 41, 59, 0.82);
}

.sidebar-nav button.is-active::before,
.sidebar-nav a[aria-current="page"]::before {
  background: var(--primary);
}

.sidebar-footer {
  position: static;
  flex: 0 0 auto;
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px solid rgba(148, 163, 184, 0.16);
}

.sidebar-footer .button {
  min-height: 42px;
  border-color: rgba(148, 163, 184, 0.22);
  color: #dbe5f3;
  background: rgba(30, 41, 59, 0.62);
}

.sidebar-footer .button:hover {
  background: rgba(51, 65, 85, 0.82);
}

.dashboard-main {
  min-height: 100vh;
  background: #f6f8fb;
}

.dashboard-topbar {
  min-height: 68px;
  padding: 8px 22px;
  border-bottom-color: #dfe5ee;
  background: rgba(255, 255, 255, 0.96);
  backdrop-filter: blur(18px);
}

.dashboard-workspace-context {
  min-width: 0;
  display: grid;
  gap: 3px;
}

.dashboard-workspace-path {
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 9px;
  color: var(--text);
  font-size: 0.96rem;
  line-height: 1.25;
}

.dashboard-workspace-product {
  color: var(--muted);
  font-weight: 720;
}

.dashboard-workspace-separator {
  color: #c0cad8;
}

#headerWorkspaceName {
  min-width: 0;
  max-width: min(48vw, 620px);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.dashboard-workspace-meta {
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 5px;
  color: var(--muted);
  font-size: 0.78rem;
  line-height: 1.25;
}

.dashboard-workspace-meta strong,
#headerWorkspaceSubtitle {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.dashboard-topbar-actions {
  flex: 0 0 auto;
  gap: 9px;
}

.dashboard-credit-pill {
  min-height: 38px;
  display: inline-flex;
  align-items: center;
  padding-inline: 13px;
  border: 1px solid #bbf7d0;
  font-size: 0.82rem;
}

.dashboard-mobile-account.dashboard-profile-button {
  width: auto;
  min-width: 44px;
  height: 42px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 4px 8px 4px 5px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #ffffff;
}

.dashboard-profile-avatar {
  width: 31px;
  height: 31px;
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  border-radius: 8px;
  color: #ffffff;
  background: var(--text);
  font-size: 0.73rem;
  font-weight: 800;
  letter-spacing: 0.02em;
}

.dashboard-profile-name {
  max-width: 126px;
  overflow: hidden;
  color: var(--text);
  font-size: 0.84rem;
  font-weight: 700;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.dashboard-profile-chevron {
  width: 15px !important;
  height: 15px !important;
  color: var(--muted);
}

.dashboard-content {
  width: min(100%, 1500px);
  padding: 24px 26px 40px;
}

.dashboard-section.is-active {
  animation: dashboard-section-enter 0.16s ease-out;
}

@keyframes dashboard-section-enter {
  from { opacity: 0; transform: translateY(3px); }
  to { opacity: 1; transform: translateY(0); }
}

.dashboard-page-title {
  font-size: clamp(1.75rem, 2.8vw, 2.3rem);
}

.screening-grid {
  grid-template-columns: minmax(0, 1fr) 310px;
  gap: 18px;
}

.screening-grid > .card,
.dashboard-content > .dashboard-section > .card,
.recent-projects-panel {
  border-radius: 14px;
}

.candidate-workspace-modal {
  width: min(100%, 1060px);
  border: 1px solid var(--line);
  border-radius: 14px;
}

#candidateModal .modal-header {
  position: sticky;
  top: 0;
  z-index: 2;
  background: rgba(255, 255, 255, 0.96);
  backdrop-filter: blur(14px);
}

#candidateModal .modal-body {
  padding: 26px;
}

#candidateModal .candidate-modal-summary {
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--surface-soft);
}

#candidateModal .grid-2 {
  align-items: stretch;
}

#candidateModal .grid-2 > .card {
  height: 100%;
  border-radius: 12px;
  box-shadow: none;
}

/* Complete Supabase-style application sidebar — 26 July 2026 */
.dashboard-layout {
  grid-template-columns: 272px minmax(0, 1fr);
}

.sidebar {
  width: 272px;
  min-width: 272px;
  padding: 0;
  overflow: hidden;
}

.sidebar-brand-row {
  min-height: 68px;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 12px 10px 16px;
  border-bottom: 1px solid rgba(148, 163, 184, 0.16);
}

.sidebar-brand-link {
  min-width: 0;
  flex: 1 1 auto;
  display: flex;
  align-items: center;
}

.sidebar-brand-row .sidebar-logo {
  width: 188px;
  max-width: 100%;
  max-height: 40px;
  object-fit: contain;
  object-position: left center;
}

.sidebar-collapse-button {
  width: 34px;
  height: 34px;
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  border: 1px solid rgba(148, 163, 184, 0.15);
  border-radius: 8px;
  color: #9fb0c8;
  background: rgba(30, 41, 59, 0.45);
}

.sidebar-collapse-button:hover {
  color: #fff;
  background: rgba(51, 65, 85, 0.8);
}

.sidebar-collapse-button svg,
.sidebar-logout-button svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.9;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.sidebar-scroll-region {
  min-height: 0;
  flex: 1 1 auto;
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-width: thin;
  scrollbar-color: rgba(148, 163, 184, 0.35) transparent;
}

.sidebar-nav {
  display: block;
  margin: 0;
  padding: 14px 10px 18px;
}

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

.sidebar-nav-group + .sidebar-nav-group,
.sidebar-nav-group--management {
  margin-top: 18px;
  padding-top: 14px;
  border-top: 1px solid rgba(148, 163, 184, 0.14);
}

.sidebar-nav-heading,
.sidebar-projects-heading > span {
  display: block;
  padding: 0 10px 7px;
  color: #74849a;
  font-size: 0.67rem;
  font-weight: 800;
  letter-spacing: 0.11em;
  text-transform: uppercase;
}

.sidebar-nav button,
.sidebar-nav a {
  min-height: 42px;
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 9px 10px;
  font-size: 0.88rem;
  text-align: left;
}

.sidebar-nav svg {
  width: 19px;
  height: 19px;
  flex: 0 0 auto;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.75;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.sidebar-projects-block {
  margin-top: 18px;
  padding-top: 14px;
  border-top: 1px solid rgba(148, 163, 184, 0.14);
}

.sidebar-projects-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding-right: 5px;
}

.sidebar-projects-heading > span {
  padding-bottom: 4px;
}

.sidebar-projects-heading > button {
  width: 28px;
  min-height: 28px;
  display: grid;
  place-items: center;
  padding: 0;
  border: 1px solid rgba(148, 163, 184, 0.16);
  border-radius: 7px;
  color: #9fb0c8;
  background: rgba(30, 41, 59, 0.42);
  font-size: 1.05rem;
  line-height: 1;
}

.sidebar-projects-heading > button:hover {
  color: #fff;
  background: rgba(51, 65, 85, 0.8);
}

.sidebar-project-list {
  display: grid;
  gap: 3px;
  margin-top: 5px;
}

.sidebar-project-button {
  width: 100%;
  min-height: 42px;
  display: grid;
  grid-template-columns: 27px minmax(0, 1fr) auto;
  align-items: center;
  gap: 9px;
  padding: 7px 9px;
  border: 1px solid transparent;
  border-radius: 8px;
  color: #9fb0c8;
  background: transparent;
  text-align: left;
}

.sidebar-project-button:hover,
.sidebar-project-button.is-current {
  color: #fff;
  border-color: rgba(148, 163, 184, 0.12);
  background: rgba(30, 41, 59, 0.82);
}

.sidebar-project-button.is-current {
  box-shadow: inset 3px 0 0 var(--primary);
}

.sidebar-project-icon {
  width: 27px;
  height: 27px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(148, 163, 184, 0.18);
  border-radius: 7px;
  color: #dce7f6;
  background: rgba(51, 65, 85, 0.56);
  font-size: 0.7rem;
  font-weight: 850;
}

.sidebar-project-copy {
  min-width: 0;
}

.sidebar-project-copy strong,
.sidebar-project-copy small {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.sidebar-project-copy strong {
  color: inherit;
  font-size: 0.8rem;
  font-weight: 720;
}

.sidebar-project-copy small {
  margin-top: 2px;
  color: #718198;
  font-size: 0.68rem;
}

.sidebar-project-count {
  min-width: 24px;
  padding: 2px 6px;
  border-radius: 999px;
  color: #9fb0c8;
  background: rgba(51, 65, 85, 0.65);
  font-size: 0.66rem;
  font-weight: 800;
  text-align: center;
}

.sidebar-project-empty {
  margin: 5px 8px 0;
  padding: 10px;
  border: 1px dashed rgba(148, 163, 184, 0.16);
  border-radius: 8px;
  color: #718198;
  font-size: 0.75rem;
  line-height: 1.45;
}

.sidebar-footer {
  position: static;
  margin: 0;
  padding: 10px;
  border-top: 1px solid rgba(148, 163, 184, 0.16);
  background: rgba(7, 13, 24, 0.45);
}

.sidebar-profile-card {
  width: 100%;
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr);
  align-items: center;
  gap: 10px;
  padding: 7px;
  border: 1px solid transparent;
  border-radius: 9px;
  color: #dce7f6;
  background: transparent;
  text-align: left;
}

.sidebar-profile-card:hover {
  border-color: rgba(148, 163, 184, 0.15);
  background: rgba(30, 41, 59, 0.65);
}

.sidebar-profile-copy {
  min-width: 0;
}

.sidebar-profile-copy strong,
.sidebar-profile-copy small {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.sidebar-profile-copy strong {
  font-size: 0.81rem;
}

.sidebar-profile-copy small {
  margin-top: 2px;
  color: #8292a8;
  font-size: 0.7rem;
}

.sidebar-logout-button {
  min-height: 38px !important;
  display: flex !important;
  align-items: center;
  justify-content: flex-start;
  gap: 9px;
  margin-top: 5px;
  padding: 7px 10px !important;
  font-size: 0.78rem !important;
}

body.sidebar-collapsed .dashboard-layout {
  grid-template-columns: 82px minmax(0, 1fr);
}

body.sidebar-collapsed .sidebar {
  width: 82px;
  min-width: 82px;
}

body.sidebar-collapsed .sidebar-brand-link {
  overflow: hidden;
}

body.sidebar-collapsed .sidebar-brand-row {
  justify-content: center;
  padding-inline: 10px;
}

body.sidebar-collapsed .sidebar-brand-row .sidebar-logo {
  width: 43px;
  height: 42px;
  object-fit: cover;
  object-position: left center;
}

body.sidebar-collapsed .sidebar-collapse-button svg {
  transform: rotate(180deg);
}

body.sidebar-collapsed .sidebar-collapse-button {
  position: absolute;
  top: 17px;
  right: 5px;
  width: 24px;
  height: 34px;
  border-color: transparent;
  background: rgba(11, 18, 32, 0.82);
}

body.sidebar-collapsed .sidebar-nav-heading,
body.sidebar-collapsed .sidebar-projects-block,
body.sidebar-collapsed .sidebar-nav button span,
body.sidebar-collapsed .sidebar-nav a span,
body.sidebar-collapsed .sidebar-profile-copy,
body.sidebar-collapsed .sidebar-logout-button span {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  white-space: nowrap;
}

body.sidebar-collapsed .sidebar-nav button,
body.sidebar-collapsed .sidebar-nav a,
body.sidebar-collapsed .sidebar-profile-card,
body.sidebar-collapsed .sidebar-logout-button {
  justify-content: center;
  grid-template-columns: 1fr;
  padding-inline: 8px !important;
}

@media (max-width: 1180px) and (min-width: 821px) {
  .dashboard-layout {
    grid-template-columns: 248px minmax(0, 1fr);
  }

  .sidebar {
    width: 248px;
    min-width: 248px;
    padding: 0;
  }

  .sidebar-brand-row .sidebar-logo {
    width: 170px;
    height: auto;
    object-fit: contain;
  }

  .sidebar-nav button span,
  .sidebar-nav a span {
    position: static;
    width: auto;
    height: auto;
    overflow: visible;
    clip: auto;
    clip-path: none;
    white-space: normal;
  }

  .sidebar-nav button,
  .sidebar-nav a {
    min-height: 42px;
    justify-content: flex-start;
    padding: 9px 10px;
  }

  .sidebar-footer .button {
    padding-inline: 10px;
    font-size: 0.78rem;
  }
}

/* Rich-text formatting controls — professional icon toolbar */
.rich-text-toolbar {
  align-items: center;
  gap: 6px;
  padding: 8px 10px;
}

.rich-text-toolbar button {
  width: 40px;
  min-width: 40px;
  height: 38px;
  min-height: 38px;
  padding: 0;
  border-color: transparent;
}

.rich-text-toolbar button[data-rich-command="removeFormat"] {
  margin-left: auto;
}

.rich-text-tool-icon {
  width: 19px;
  height: 19px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.rich-text-editor ul,
.rich-text-editor ol {
  margin: 8px 0 12px;
  padding-left: 1.45rem;
}

.rich-text-editor li {
  padding-left: 0.2rem;
}

.rich-text-editor li::marker {
  color: var(--primary);
  font-weight: 800;
}


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

.results-export-actions .button {
  white-space: nowrap;
}
