/* Workspace identity and the finance/document modules. */
:root {
  --bg: #edf1f4;
  --text: #24323b;
  --muted: #647581;
  --line: #dbe3e8;
  --hover: #f0f5f8;
}
:root[data-theme="dark"] {
  --surface: #242a2f;
  --bg: #171c20;
  --text: #edf1f4;
  --muted: #acbac4;
  --line: #3a454c;
  --hover: #303a41;
}
.sidebar {
  background: #202c30;
  color: #eef5f5;
  border-right: 0;
}
.sidebar .brand {
  color: #fff;
}
.sidebar .brand-icon {
  background: #b2eed6;
  color: #174d40;
  border-radius: 8px;
}
.sidebar .brand small,
.sidebar .nav-label,
.sidebar .workspace-label small,
.sidebar .user-area small,
.sidebar .local-status {
  color: #a7bec1;
}
.sidebar .workspace-label {
  border-color: #425155;
  background: #2b3a3e;
}
.sidebar .workspace-avatar {
  background: #44615c;
  color: #d1fae6;
}
.sidebar .nav-item {
  color: #c9d7db;
  font-size: 15px;
  min-height: 44px;
  transition:
    background 0.18s,
    color 0.18s,
    transform 0.18s;
}
.sidebar .nav-item:hover {
  background: #34464a;
  color: #fff;
  transform: translateX(2px);
}
.sidebar .nav-item.active {
  background: #c2f0dc;
  color: #173e33;
  box-shadow: inset 3px 0 #28b88a;
}
.sidebar .nav-item svg {
  color: #80d6b8;
}
.sidebar .nav-item:nth-of-type(3n + 2) svg {
  color: #a0bcff;
}
.sidebar .nav-item:nth-of-type(3n) svg {
  color: #efb69b;
}
.sidebar .nav-item.active svg {
  color: #176448;
}
.sidebar .sidebar-bottom,
.sidebar .user-area {
  border-color: #425155;
}
.sidebar .avatar {
  background: #eab99d;
  color: #523b2c;
}
.sidebar .icon-button {
  color: #c8d8db;
}
.sidebar .icon-button:hover {
  background: #415357;
  color: #fff;
}
.topbar {
  box-shadow: 0 2px 14px #12242e06;
}
.breadcrumb,
.global-search input {
  font-size: 14.5px;
}
.page-heading {
  border-bottom: 1px solid var(--line);
  padding-bottom: 22px;
}
.page-heading h1 {
  font-size: 28px;
}
.page-heading p {
  font-size: 15px;
}
.eyebrow {
  color: var(--accent);
  font-size: 13.5px;
}
.button,
.text-link {
  font-size: 15px;
}
.source-strip,
.source-strip strong,
.source-strip button {
  font-size: 14.5px;
}
.source-strip {
  border-left: 3px solid var(--accent);
}
.metric {
  border: 0;
  border-radius: 8px;
  min-height: 164px;
  padding: 20px;
  box-shadow: 0 3px 0 #1b353b0b;
  transition:
    transform 0.2s,
    box-shadow 0.2s;
  color: #193f36;
  background: #c2f0dc;
}
.metric.blue {
  background: #d1e1ff;
  color: #243e70;
}
.metric.peach {
  background: #ffddc7;
  color: #653b27;
}
.metric.violet {
  background: #e4daf9;
  color: #493368;
}
.metric:not(:disabled):hover {
  transform: translateY(-4px);
  box-shadow: 0 10px 22px #122b3718;
}
.metric-top {
  font-size: 14.5px;
  font-weight: 650;
  color: inherit;
}
.metric-top svg {
  width: 32px;
  height: 32px;
  padding: 6px;
  background: #ffffff66;
  border-radius: 7px;
  color: inherit !important;
}
.metric > strong {
  font-size: 28px;
  font-variant-numeric: tabular-nums;
}
.metric-foot {
  color: inherit;
  font-size: 13.5px;
  line-height: 1.5;
  opacity: 0.85;
}
.metric-foot svg {
  color: inherit;
}
:root[data-theme="dark"] .metric {
  background: #244a3e;
  color: #c3f4df;
}
:root[data-theme="dark"] .metric.blue {
  background: #2c3d5c;
  color: #c6dbff;
}
:root[data-theme="dark"] .metric.peach {
  background: #513b30;
  color: #ffdac1;
}
:root[data-theme="dark"] .metric.violet {
  background: #403351;
  color: #e7d5ff;
}
:root[data-theme="dark"] .metric-top svg {
  background: #ffffff12;
}
.dashboard-charts {
  border-top: 3px solid #35ac8c;
}
.chart-section:nth-child(2) {
  border-top: 0;
  background: color-mix(in srgb, var(--surface) 96%, #5485ee);
}
.section-heading h2 {
  font-size: 20px;
}
.section-heading p,
.legend > div,
.legend small {
  font-size: 14.5px;
}
.chart-area {
  height: 232px;
}
.attention-count {
  min-width: 42px;
  height: 42px;
  font-weight: 700;
}
.attention > button strong {
  font-size: 15px;
}
.attention > button small {
  font-size: 13.5px;
}
.attention-note {
  border-top: 3px solid #e88764;
  margin-top: 20px;
}
table {
  font-size: 15px;
}
th {
  font-size: 13.5px;
  background: var(--hover);
  font-weight: 700;
}
td small {
  font-size: 13.5px;
}
tbody tr {
  transition: background 0.15s;
}
tbody tr:nth-child(even) {
  background: color-mix(in srgb, var(--surface) 95%, #8095a4);
}
tbody tr:hover {
  background: var(--accent-soft);
}
.badge {
  font-size: 13.5px;
}
.record-link {
  font-size: 15px;
  font-weight: 700;
}
.modal-header {
  border-top: 4px solid var(--accent);
  background: var(--hover);
}
.modal {
  box-shadow: 0 24px 80px #091d3655;
}
.page-enter {
  animation: workspace-enter 0.22s ease-out;
}
@keyframes workspace-enter {
  from {
    opacity: 0.35;
    transform: translateY(7px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}
.module-tabs {
  display: flex;
  gap: 24px;
  border-bottom: 1px solid var(--line);
  margin-bottom: 24px;
}
.module-tabs button {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 14px 0;
  color: var(--muted);
  border-bottom: 3px solid transparent;
  font-weight: 650;
}
.module-tabs button[aria-selected="true"] {
  border-color: var(--accent);
  color: var(--accent);
}
.module-tabs span {
  border-radius: 4px;
  padding: 2px 6px;
  background: var(--hover);
}
.finance-filters {
  align-items: end;
  padding: 18px 0;
  border-bottom: 1px solid var(--line);
  margin-bottom: 24px;
}
.finance-filters .field {
  min-width: 145px;
  flex: 1;
}
.finance-filters .text-link {
  margin-bottom: 12px;
}
.coverage-band {
  display: grid;
  grid-template-columns: 1fr minmax(180px, 35%);
  align-items: center;
  gap: 24px;
  padding: 0 0 24px;
}
.coverage-band strong,
.coverage-band span {
  display: block;
}
.coverage-band span {
  font-size: 14.5px;
  color: var(--muted);
  margin-top: 6px;
}
.coverage-track {
  height: 10px;
  border-radius: 4px;
  overflow: hidden;
  background: var(--line);
  display: flex;
}
.coverage-track i {
  background: #17a584;
}
.coverage-track b {
  background: #5485ee;
}
.valuation {
  display: inline-block;
  padding: 5px 8px;
  font-size: 13.5px;
  font-weight: 650;
  border-radius: 4px;
  white-space: nowrap;
}
.finance-table table {
  min-width: 900px;
}
.finance-table td:nth-child(2),
.finance-table td:nth-child(4) {
  white-space: nowrap;
}
.finance-table td:last-child {
  min-width: 230px;
  max-width: 340px;
  overflow-wrap: anywhere;
}
:root[data-accent="rose"] .sidebar .nav-item.active {
  background: #f2cbdb;
  color: #61283c;
  box-shadow: inset 3px 0 #db7b9b;
}
:root[data-accent="rose"] .sidebar .nav-item.active svg {
  color: #8d3755;
}
:root[data-accent="blue"] .sidebar .nav-item.active {
  background: #ccddff;
  color: #274773;
  box-shadow: inset 3px 0 #6f9ae7;
}
:root[data-accent="blue"] .sidebar .nav-item.active svg {
  color: #355e9b;
}
.valuation.actual {
  color: #17634a;
  background: #d9f3e7;
}
.valuation.estimate {
  color: #285295;
  background: #e0ebff;
}
.valuation.missing {
  color: #835124;
  background: #fceacf;
}
.tariff-form,
.bulk-body {
  padding: 24px;
}
.tariff-form .form-grid {
  padding: 0;
}
.check-label {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 18px;
}
.check-label input {
  width: 18px;
  min-height: 18px;
  height: 18px;
  accent-color: var(--accent);
}
.form-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 24px;
  flex-wrap: wrap;
}
.document-metrics {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}
.document-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
}
.document-card {
  display: grid;
  grid-template-columns: 48px 1fr;
  gap: 16px;
  padding: 20px;
  border: 1px solid var(--line);
  border-top: 3px solid #83a8e8;
  border-radius: 8px;
  background: var(--surface);
  min-width: 0;
  transition:
    transform 0.18s,
    box-shadow 0.18s;
}
.document-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 20px #18394712;
}
.document-card.available {
  border-top-color: #25a884;
}
.document-symbol {
  width: 48px;
  height: 64px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 4px;
  background: var(--blue);
  color: var(--blue-text);
  border-radius: 5px;
}
.available .document-symbol {
  background: #d9f3e7;
  color: #17634a;
}
.document-symbol span {
  font-size: 12px;
  font-weight: 700;
}
.document-caption {
  min-width: 0;
  overflow-wrap: anywhere;
}
.document-caption h2 {
  font-size: 20px;
}
.document-caption p {
  font-size: 13.5px;
  color: var(--muted);
  margin: 7px 0 12px;
}
.document-caption .eyebrow {
  font-size: 12.5px;
}
.document-actions {
  grid-column: 1/-1;
  display: flex;
  justify-content: space-between;
  gap: 10px;
  border-top: 1px solid var(--line);
  padding-top: 14px;
}
.upload-zone {
  width: 100%;
  border: 1px dashed var(--accent);
  background: var(--accent-soft);
  color: var(--accent);
  min-height: 145px;
  border-radius: 8px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 9px;
}
.upload-zone span {
  font-size: 14.5px;
}
.bulk-list {
  margin-top: 18px;
}
.bulk-row {
  display: grid;
  grid-template-columns: 24px minmax(100px, 1fr) minmax(140px, 1fr) 34px;
  gap: 12px;
  align-items: center;
  padding: 14px 0;
  border-bottom: 1px solid var(--line);
}
.bulk-row strong {
  font-size: 14.5px;
  display: block;
  overflow-wrap: anywhere;
}
.bulk-row small {
  display: block;
  margin-top: 5px;
}
.bulk-row select {
  font-size: 14.5px;
}
.upload-success {
  color: var(--accent);
}
.load-more {
  display: flex;
  margin: 22px auto 0;
}
@media (min-width: 1800px) {
  .metric {
    min-height: 180px;
  }
  .chart-area {
    height: 280px;
  }
}
@media (max-width: 1200px) {
  .document-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .metric {
    padding: 16px;
  }
  .metric > strong {
    font-size: 25px;
  }
}
@media (max-width: 700px) {
  .page-heading h1 {
    font-size: 24px;
  }
  .page-heading {
    padding-bottom: 18px;
  }
  .metric {
    min-height: 160px;
  }
  .metric > strong {
    font-size: 23px;
  }
  .metric-top {
    font-size: 13.5px;
  }
  .metric-top svg {
    width: 26px;
    height: 26px;
    padding: 4px;
  }
  .metric-foot {
    font-size: 12.5px;
  }
  .document-metrics,
  .document-grid {
    grid-template-columns: 1fr;
  }
  .document-metrics .metric {
    min-height: 125px;
  }
  .coverage-band {
    grid-template-columns: 1fr;
    gap: 14px;
  }
  .module-tabs {
    gap: 16px;
  }
  .module-tabs button {
    font-size: 14.5px;
  }
  .finance-filters {
    flex-wrap: wrap;
  }
  .finance-filters .field {
    min-width: 125px;
  }
  .bulk-row {
    grid-template-columns: 24px minmax(0, 1fr) 34px;
  }
  .bulk-row select {
    grid-row: 2;
    grid-column: 2/4;
  }
  .bulk-row > .icon-button,
  .bulk-row > .upload-success {
    grid-row: 1;
    grid-column: 3;
  }
  .tariff-form,
  .bulk-body {
    padding: 18px;
  }
  .section-heading h2 {
    font-size: 18px;
  }
}
@media (prefers-reduced-motion: reduce) {
  .page-enter {
    animation: none;
  }
  .metric,
  .nav-item,
  .document-card,
  .button {
    transition: none !important;
    transform: none !important;
  }
}
