/* Bootstrap dashboard shell matching the supplied reference. */
:root {
  --bs-body-font-family: system-ui,-apple-system,"Segoe UI",Roboto,"Helvetica Neue","Noto Sans","Liberation Sans",Arial,sans-serif,"Apple Color Emoji","Segoe UI Emoji","Segoe UI Symbol","Noto Color Emoji";
  --bs-body-font-size: .875rem;
  --bs-body-color: #202a35;
}
body.bg-body-tertiary { background: #f3f4f8 !important; }
[x-cloak] { display: none !important; }
.sidebar { position: fixed; inset: 0 auto 0 0; width: 247px; background: #222e3c; color: #b7c4d1; display: flex; flex-direction: column; overflow-y: auto; z-index: 1030; }
.sidebar-brand { position: relative; padding: 18px 14px; border-bottom: 1px solid #3a4653; min-height: 63px; }
.sidebar-brand a { color: white; font-size: 1.05rem; font-weight: 600; text-decoration: none; }
.sidebar-brand i { margin-right: 5px; }
.sidebar-group { padding: 22px 14px 10px; color: #93a5b7; font-size: .625rem; font-weight: 600; letter-spacing: .09em; }
.sidebar-link { width: 100%; display: flex; align-items: center; gap: 10px; border: 0; border-radius: 0; padding: 14px; background: transparent; color: #b7c4d1; font-size: .8125rem; text-align: left; }
.sidebar-link:hover, .sidebar-link.active { background: #33404f; color: #fff; }
.sidebar-link:focus-visible, .sidebar-toggle:focus-visible { outline: 2px solid #c7d2df; outline-offset: -3px; }
.sidebar-footer { margin-top: auto; padding: 20px 14px; color: #93a5b7; font-size: .75rem; }
.sidebar-toggle { display: none; }
.workspace-topbar { min-height: 51px; margin-left: 247px; padding: 8px 24px; display: flex; align-items: center; justify-content: space-between; gap: 16px; background: white; border-bottom: 1px solid #dce1e9; }
.topbar-title { font-size: 1rem; }
.topbar-account { display: flex; align-items: center; justify-content: flex-end; flex-wrap: wrap; min-width: 0; gap: 14px; font-size: .8125rem; }
.topbar-account > span { overflow-wrap: anywhere; min-width: 0; }
.topbar-account .badge { font-size: .65rem; }
.workspace { margin-left: 247px; padding: 24px; }
h1.h3 { font-size: 1.4rem; } h2.h5 { font-size: 1rem; } h3.h6 { font-size: .875rem; }
.form-label { font-weight: 500; }
.form-control, .form-select, .btn { font-size: .875rem; }
.btn-lg { font-size: 1rem; }
.card { border-color: #cecece; border-radius: 6px; box-shadow: 0 2px 4px rgb(0 0 0 / 5%); }
.card-body { padding: 16px; }
.panel-heading, .card-body > h2.h5:first-child { margin: -16px -16px 16px; padding: 11px 16px; background: #f7f7f7; border-bottom: 1px solid #cecece; border-radius: 6px 6px 0 0; }
.summary-card { color: white; border: 0; box-shadow: none; border-radius: 9px; padding: 14px 20px; }
.summary-card .text-body-secondary { color: rgb(255 255 255 / 85%) !important; }
.summary-card .h3 { font-size: 1.5rem; font-weight: 600; }
.summary-card small { color: rgb(255 255 255 / 75%); }
.summary-blue { background: #338dca; }
.summary-purple { background: #855199; }
.summary-green { background: #259e75; }
.coefficient { font-size: 2.3rem; font-weight: 600; font-variant-numeric: tabular-nums; }
.table { font-size: .8125rem; }
.table > thead { background: #f7f7f7; }
.nav-tabs .nav-link { font-size: .875rem; padding: 10px 15px; }
.login-card { max-width: 900px; }
.mapping-row, .mapping-fields, .builder-row { display: flex; gap: .5rem; align-items: center; margin-bottom: .75rem; min-width: 0; }
.mapping-row > .form-select { width: 9rem; }
.mapping-fields { flex: 1; margin-bottom: 0; }
.mapping-fields .form-select { width: 10rem; }
.variable { min-width: 4rem; max-width: 7rem; }
.builder-row { align-items: end; flex-wrap: wrap; }
.builder-row > div:first-child { width: 7rem; }
.builder-row > .flex-grow-1 { min-width: 12rem; }
.evidence { max-height: 25rem; overflow: auto; white-space: pre-wrap; overflow-wrap: anywhere; }
@media (max-width: 991.98px) {
  .sidebar { position: relative; width: 100%; }
  .sidebar-brand { min-height: 56px; padding: 16px; }
  .sidebar-toggle { display: block; position: absolute; right: 12px; top: 6px; color: white; font-size: 1.5rem; }
  .sidebar nav { display: none; }
  .sidebar nav.is-open { display: block; padding-bottom: 12px; }
  .sidebar-footer { display: none; }
  .workspace-topbar { margin-left: 0; padding: 10px 16px; flex-wrap: wrap; gap: 8px; }
  .topbar-account { flex-wrap: wrap; gap: 8px; }
  .workspace { margin-left: 0; padding: 20px 16px; }
}
@media (max-width: 767.98px) {
  .mapping-row, .mapping-fields { flex-wrap: wrap; }
  .mapping-fields { flex-basis: 100%; }
  .mapping-fields .form-control, .mapping-fields .form-select { width: 100%; }
  .nav-tabs .nav-link { padding: 10px; }
}

.calculation-details .operation-symbol { color: #1e4f83; font-weight: 600; }
.calculation-details .operation-expression { color: #1e4f83; background: #f1f5fa; width: 48%; }
.calculation-details .operation-value { color: #202a35; font-weight: 600; font-variant-numeric: tabular-nums; }
.operation-table td, .calculation-variables td { overflow-wrap: anywhere; white-space: normal; }
.operation-table td { padding: .85rem; }
.operation-table { min-width: 32rem; }
.operation-settlement { background: #f7f9fc; }

.calculation-details { scroll-margin-top: 1rem; }
.total-initial { background: #edf2f7; color: #31465c; }
.total-revision { background: #e4f2e9; color: #175936; }
.total-revised { background: #e7effa; color: #1e4f83; }
.result-totals strong { font-size: 1.2rem; font-variant-numeric: tabular-nums; }
.revision-results .coefficient { font-size: .9rem; }
.revision-results .revision-cell { font-weight: 600; background: #eef7f1; }
.revision-editor { min-width: 48rem; }
.revision-results { min-width: 52rem; }
