/* Affordax portal identity: calm, precise and unmistakably operational. */
.sidebar {
  background:
    radial-gradient(circle at 18% 8%, rgb(255 255 255 / .08) 0 1px, transparent 1.5px) 0 0 / 18px 18px,
    linear-gradient(165deg, #123b4a 0%, #0a303b 58%, #08252f 100%);
  border-right: 1px solid rgb(255 255 255 / .08);
}

.sidebar__logo { padding: 1.55rem 1.5rem 1.25rem; }
.sidebar__logo-mark {
  display: inline-flex;
  align-items: center;
  min-height: 34px;
  padding: 0 .75rem;
  border: 1px solid rgb(255 255 255 / .28);
  border-radius: 10px;
  background: rgb(255 255 255 / .1);
  letter-spacing: .035em;
}
.sidebar__logo-sub { margin-top: .6rem; color: rgb(255 255 255 / .62); }
.sidebar__nav { padding: .75rem; }
.sidebar__section-label { padding: 1.2rem .8rem .45rem; color: rgb(255 255 255 / .46); }
.sidebar__link {
  position: relative;
  min-height: 42px;
  margin: 2px 0;
  padding: .65rem .8rem;
  border-radius: 10px;
  color: rgb(255 255 255 / .72);
}
.sidebar__link:hover { background: rgb(255 255 255 / .08); }
.sidebar__link--active {
  border-right: 0;
  background: rgb(255 255 255 / .13);
  box-shadow: inset 0 0 0 1px rgb(255 255 255 / .08);
}
.sidebar__link--active::before {
  content: '';
  position: absolute;
  left: -4px;
  width: 4px;
  height: 22px;
  border-radius: 0 4px 4px 0;
  background: var(--brand-accent-lt);
}
.sidebar__link-icon { width: 18px; height: 18px; }
.sidebar__footer { padding: 1rem 1.25rem 1.2rem; background: rgb(0 0 0 / .08); }
.sidebar__user-avatar {
  width: 38px;
  height: 38px;
  border-radius: 12px;
  color: #163946;
  background: linear-gradient(145deg, #f2bd58, #f7d58d);
}

.topbar {
  background: rgb(255 255 255 / .88);
  backdrop-filter: blur(14px);
  box-shadow: 0 1px 0 rgb(16 42 51 / .04);
}
.topbar__title { font-size: var(--text-lg); letter-spacing: -.015em; }
.main-content { width: 100%; max-width: var(--content-max-width); margin: 0 auto; }

.page-header { margin-bottom: 1.75rem; }
.page-title { font-size: clamp(1.35rem, 2vw, 1.75rem); letter-spacing: -.025em; }
.page-subtitle { max-width: 68ch; line-height: 1.55; }

.card {
  border-color: rgb(18 59 74 / .1);
  box-shadow: 0 1px 2px rgb(16 42 51 / .04), 0 8px 24px rgb(16 42 51 / .035);
}
.card__header { background: linear-gradient(180deg, #fff, #fdfdfb); }
.card__title { letter-spacing: -.012em; }
.stat-card {
  position: relative;
  border: 1px solid rgb(18 59 74 / .1);
  border-radius: var(--radius-lg);
  background: linear-gradient(145deg, #fff 25%, #f8faf7 100%);
  box-shadow: 0 8px 26px rgb(16 42 51 / .045);
  overflow: hidden;
}
.stat-card::after {
  content: '';
  position: absolute;
  top: 0;
  right: 0;
  width: 44px;
  height: 4px;
  border-radius: 0 0 0 4px;
  background: var(--brand-accent);
}
.stat-card__label { color: var(--color-text-muted); letter-spacing: .065em; }
.stat-card__value { color: var(--brand-primary-dk); letter-spacing: -.03em; }

.btn { min-height: 38px; border-radius: 10px; font-weight: 650; }
.btn--primary {
  background: linear-gradient(145deg, var(--brand-primary-lt), var(--brand-primary));
  box-shadow: 0 5px 14px rgb(18 59 74 / .15);
}
.btn--primary:hover { transform: translateY(-1px); box-shadow: 0 7px 18px rgb(18 59 74 / .2); }
.btn--secondary { border-color: rgb(18 59 74 / .18); }

.input, .select, .textarea {
  min-height: 42px;
  border-color: #c8d2d0;
  background-color: #fff;
}
.input:hover, .select:hover, .textarea:hover { border-color: #91aaa9; }
.input:focus, .select:focus, .textarea:focus {
  border-color: #26746e;
  box-shadow: 0 0 0 3px rgb(38 116 110 / .14);
}

.data-table th {
  color: #587077;
  background: #f4f7f5;
  border-bottom-color: #dce3df;
}
.data-table tbody tr { transition: background var(--transition-fast); }
.data-table tbody tr:hover td { background: #eef6f3; }

.portal-kicker {
  display: block;
  margin-bottom: 2px;
  color: var(--color-text-muted);
  font-size: var(--text-2xs);
  font-weight: 700;
  letter-spacing: .09em;
  text-transform: uppercase;
}
.topbar__identity { min-width: 0; }

.workspace-hero {
  align-items: flex-end;
  border-bottom: 1px solid var(--color-border-light);
  padding-bottom: var(--space-5);
}
.workspace-hero__role {
  color: var(--brand-primary-lt);
  display: block;
  font-size: var(--text-2xs);
  font-weight: 800;
  letter-spacing: .1em;
  margin-bottom: var(--space-2);
  text-transform: uppercase;
}
.workspace-focus { margin-bottom: var(--space-6); }
.workspace-status { align-items: center; color: var(--color-text-muted); display: flex; flex-wrap: wrap; gap: var(--space-3); font-size: var(--text-sm); }
.workspace-clear { display: flex; flex-direction: column; gap: var(--space-1); }
.workspace-clear span { color: var(--color-text-muted); font-size: var(--text-sm); }
.stat-card--attention::after { background: var(--color-warning); }
.stat-card__value--warning { color: var(--color-warning); }
.workspace-queue { display: grid; }
.workspace-queue__item {
  align-items: center;
  border-top: 1px solid var(--color-border-light);
  color: var(--color-text);
  display: grid;
  gap: var(--space-3);
  grid-template-columns: 1fr auto auto;
  min-height: 58px;
  padding: var(--space-3) var(--space-6);
  text-decoration: none;
}
.workspace-queue__item:first-child { border-top: 0; }
.workspace-queue__item:hover { background: var(--color-surface-2); }
.workspace-queue__item strong { font-variant-numeric: tabular-nums; }
.workspace-queue__count--open { color: var(--color-warning); }
.document-reject-form {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-md);
  margin-top: var(--space-2);
  padding: var(--space-3);
  position: absolute;
  right: 0;
  width: min(300px, 80vw);
  z-index: 20;
}
.document-reject-form .btn { margin-top: var(--space-2); }
.admin-status-actions details { position: relative; }
.workspace-actions { margin-bottom: var(--space-6); }
.workspace-section-heading { align-items: end; display: flex; justify-content: space-between; margin-bottom: var(--space-3); }
.workspace-section-heading h2 { font-size: var(--text-base); margin: 0; }
.workspace-section-heading p { color: var(--color-text-muted); font-size: var(--text-xs); margin: 0; }
.workspace-actions__grid { display: grid; gap: var(--space-3); grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); }
.workspace-action {
  background: var(--color-surface); border: 1px solid var(--color-border-light);
  border-radius: var(--radius-md); color: var(--color-text); display: grid;
  gap: var(--space-1); grid-template-columns: 1fr auto; padding: var(--space-4);
  text-decoration: none;
}
.workspace-action span { color: var(--color-text-muted); font-size: var(--text-xs); grid-column: 1; line-height: 1.45; }
.workspace-action i { color: var(--brand-primary-lt); font-style: normal; grid-column: 2; grid-row: 1 / span 2; }
.workspace-action:hover { border-color: var(--brand-primary-lt); box-shadow: var(--shadow-sm); transform: translateY(-1px); }
.workspace-readiness { margin-bottom: var(--space-6); }
.workspace-readiness__items { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); }
.workspace-readiness__item { align-items: center; border-right: 1px solid var(--color-border-light); color: var(--color-text); display: flex; gap: var(--space-3); padding: var(--space-4) var(--space-5); text-decoration: none; }
.workspace-readiness__item:last-child { border-right: 0; }
.workspace-readiness__item small { color: var(--color-text-muted); display: block; margin-top: 2px; }
.workspace-readiness__mark { color: var(--color-warning); font-size: var(--text-lg); }
.workspace-readiness__mark--done { color: var(--color-success); }

.operations-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--space-5);
  margin-bottom: var(--space-5);
}
.operation-card { display: flex; flex-direction: column; min-height: 100%; }
.operation-card .card__body { display: flex; flex: 1; flex-direction: column; }
.operation-card__eyebrow {
  color: var(--brand-primary-lt); font-size: var(--text-2xs); font-weight: 800;
  letter-spacing: .1em; text-transform: uppercase;
}
.operation-card__title { margin: var(--space-2) 0 var(--space-1); font-size: var(--text-lg); }
.operation-card__copy { color: var(--color-text-muted); font-size: var(--text-sm); margin: 0 0 var(--space-5); }
.operation-card .form { display: flex; flex: 1; flex-direction: column; }
.operation-card .btn { align-self: flex-start; margin-top: auto; }
.operation-card__hint {
  color: var(--color-text-muted); font-size: var(--text-xs); line-height: 1.5;
  margin: var(--space-3) 0 var(--space-5);
}
.job-table-card .card__header { align-items: center; display: flex; justify-content: space-between; }
.job-table-card .card__title { margin: 0; }
.job-detail__meta { display: flex; flex-wrap: wrap; gap: var(--space-2); margin-top: var(--space-3); }
.job-detail__meta span { color: var(--color-text-muted); font-size: var(--text-sm); }
.file-dropzone {
  align-items: center; background: linear-gradient(145deg, #fbfdfc, #f3f8f6);
  border: 1px dashed #8eaaa5; border-radius: var(--radius-md); cursor: pointer;
  display: flex; gap: var(--space-3); min-height: 76px; padding: var(--space-4);
  transition: border-color var(--transition-fast), background var(--transition-fast), box-shadow var(--transition-fast);
}
.file-dropzone:hover, .file-dropzone:focus-within { background: #eef7f3; border-color: var(--brand-primary-lt); box-shadow: 0 0 0 3px rgb(38 116 110 / .1); }
.file-dropzone__input { height: 1px; opacity: 0; overflow: hidden; position: absolute; width: 1px; }
.file-dropzone__icon { align-items: center; background: var(--brand-light); border-radius: 10px; color: var(--brand-primary); display: inline-flex; font-size: 1.35rem; height: 40px; justify-content: center; width: 40px; }
.file-dropzone__title { color: var(--color-text-2); display: block; font-size: var(--text-sm); font-weight: 750; }
.file-dropzone__name { color: var(--color-text-muted); display: block; font-size: var(--text-xs); margin-top: 2px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.affordability-layout { align-items: start; display: grid; gap: var(--space-5); grid-template-columns: minmax(280px, .9fr) minmax(320px, 1.1fr); }
.affordability-intro { color: var(--color-text-muted); font-size: var(--text-sm); line-height: 1.55; margin: 0 0 var(--space-5); }
.affordability-tip { align-items: flex-start; background: var(--brand-light); border: 1px solid rgb(38 116 110 / .14); border-radius: var(--radius-md); color: var(--color-text-2); display: flex; font-size: var(--text-xs); gap: var(--space-2); line-height: 1.5; padding: var(--space-3); }
.affordability-tip__mark { color: var(--brand-primary-lt); font-weight: 800; }
.result-placeholder { min-height: 300px; }
@media (max-width: 767px) { .operations-grid { grid-template-columns: 1fr; }
  .affordability-layout { grid-template-columns: 1fr; }
  .topbar { height: auto; min-height: var(--topbar-height); }
  .portal-kicker { display: none; }
  .main-content { padding-top: 1.25rem; }
}
