:root {
  color-scheme: light;
  --ink: #1F2942;
  --muted: #5A6072;
  --line: #E3E7F0;
  --soft-line: #E9EDF5;
  --paper: #ffffff;
  --wash: #F4F6FA;
  --nav: #1F2942;
  --nav-2: #2A3551;
  --teal: #1B4FD8;
  --teal-dark: #1440B8;
  --gold: #c58a2b;
  --coral: #D8402B;
  --blue: #1B4FD8;
  --green: #1E9E6A;
  --shadow: 0 18px 46px rgba(31, 41, 66, 0.12);
  --radius: 8px;
}

* {
  box-sizing: border-box;
}

html,
body {
  min-height: 100%;
}

body {
  margin: 0;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: var(--wash);
  color: var(--ink);
}

button,
input {
  font: inherit;
}

button {
  cursor: pointer;
}

button:disabled {
  cursor: not-allowed;
  opacity: 0.65;
}

[hidden] {
  display: none !important;
}

.visually-hidden {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  overflow: hidden !important;
  clip: rect(0 0 0 0) !important;
  white-space: nowrap !important;
}

.login-screen {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 24px;
  background:
    radial-gradient(circle at 18% 18%, rgba(27, 79, 216, 0.08), transparent 28%),
    linear-gradient(180deg, #ffffff 0%, var(--wash) 100%);
}

.login-card {
  width: min(420px, 100%);
  display: grid;
  gap: 14px;
  background: #ffffff;
  border: 1px solid var(--soft-line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 30px;
}

.access-card {
  gap: 16px;
}

.login-card .brand-mark {
  width: 46px;
  height: 46px;
}

.login-card label {
  display: grid;
  gap: 6px;
  font-weight: 750;
}

.login-card input {
  border: 1px solid var(--line);
  border-radius: 8px;
  min-height: 42px;
  padding: 0 12px;
}

.access-code-input {
  font-family: "IBM Plex Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 24px;
  font-weight: 600;
  letter-spacing: 0.22em;
  text-align: center;
}

.login-card input:focus {
  outline: 3px solid rgba(27, 79, 216, 0.14);
  border-color: var(--blue);
}

.login-card h1,
.login-card p {
  margin: 0;
}

.login-card h1,
h1,
h2 {
  font-family: Archivo, Inter, ui-sans-serif, system-ui, sans-serif;
}

.login-copy,
.login-domain {
  color: var(--muted);
  line-height: 1.4;
}

.login-status {
  min-height: 18px;
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  font-weight: 750;
  line-height: 1.35;
}

.login-status[data-type="success"] {
  color: var(--teal);
}

.login-status[data-type="error"] {
  color: var(--coral);
}

.login-domain {
  font-size: 13px;
  font-weight: 750;
}

.app-shell {
  display: grid;
  grid-template-columns: 236px minmax(0, 1fr);
  min-height: 100vh;
}

.sidebar {
  background: var(--nav);
  color: #f8fafc;
  padding: 18px 14px;
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
}

.brand-mark {
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  background: #f8fafc;
  color: var(--nav);
  border-radius: 8px;
  font-family: Archivo, Inter, sans-serif;
  font-weight: 800;
  letter-spacing: 0.01em;
}

.brand strong,
.brand span {
  display: block;
}

.brand span {
  color: #AAB3C6;
  font-size: 12px;
}

.nav-list {
  display: grid;
  gap: 6px;
}

.nav-item {
  border: 0;
  color: #DDE3F0;
  background: transparent;
  min-height: 36px;
  border-radius: 8px;
  padding: 0 12px;
  display: flex;
  align-items: center;
  gap: 10px;
  text-align: left;
}

.nav-item:hover,
.nav-item.active {
  background: var(--nav-2);
  color: #ffffff;
}

.nav-item.active {
  box-shadow: inset 3px 0 0 var(--blue);
}

.icon {
  width: 22px;
  text-align: center;
  color: #9FB1D2;
}

.library-card {
  margin-top: auto;
  background: #17213A;
  border: 1px solid #3C4864;
  border-radius: 8px;
  padding: 10px;
}

.account-card {
  display: grid;
  gap: 5px;
  background: #17213A;
  border: 1px solid #3C4864;
  border-radius: 8px;
  padding: 10px;
}

.account-card strong {
  color: #ffffff;
}

.account-card span {
  color: #AAB3C6;
  font-size: 12px;
  overflow-wrap: anywhere;
}

.account-card .button {
  min-height: 30px;
  padding: 0 10px;
}

.library-card canvas {
  width: 100%;
  height: auto;
  display: block;
  border-radius: 6px;
  background: #f7f8fa;
}

.library-card p {
  margin: 12px 0 4px;
  font-weight: 700;
}

.library-card span {
  color: #AAB3C6;
  font-size: 12px;
  line-height: 1.45;
}

.workspace {
  min-width: 0;
  padding: 14px;
}

.topbar {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  align-items: center;
  margin-bottom: 12px;
  padding: 4px 2px;
}

.eyebrow {
  margin: 0 0 5px;
  color: var(--blue);
  font-size: 12px;
  text-transform: uppercase;
  font-weight: 800;
  letter-spacing: 0.08em;
}

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

h1 {
  font-size: 28px;
  line-height: 1.15;
}

h2 {
  font-size: 16px;
}

.sheet-meta {
  display: block;
  color: var(--muted);
  font-size: 13px;
  margin-top: 5px;
}

.topbar-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

.cloud-save-status {
  min-width: 112px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #ffffff;
  color: var(--muted);
  padding: 7px 10px;
  font-size: 12px;
  font-weight: 800;
  text-align: center;
  white-space: nowrap;
}

.cloud-save-status[data-type="saved"] {
  border-color: #9ed4c7;
  background: #e9f7f3;
  color: var(--teal-dark);
}

.cloud-save-status[data-type="saving"] {
  border-color: #cdd8ef;
  background: #edf3ff;
  color: var(--blue);
}

.cloud-save-status[data-type="warning"] {
  border-color: #e2cf9b;
  background: #fff8e7;
  color: #8a5b11;
}

.cloud-save-status[data-type="error"] {
  border-color: #e1aaa4;
  background: #fff5f3;
  color: #9f352d;
}

.cloud-save-status[data-type="conflict"] {
  border-color: #df9d90;
  background: #fff0ed;
  color: #9f352d;
}

.presence {
  display: flex;
  align-items: center;
}

.avatar {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border: 2px solid var(--wash);
  border-radius: 50%;
  color: #ffffff;
  font-size: 12px;
  font-weight: 800;
}

.avatar + .avatar {
  margin-left: -9px;
}

.green {
  background: var(--green);
}

.coral {
  background: var(--coral);
}

.blue {
  background: var(--blue);
}

.button,
.icon-button {
  border: 0;
  min-height: 40px;
  border-radius: 8px;
  font-weight: 800;
}

.button {
  display: inline-grid;
  place-items: center;
  padding: 0 15px;
}

.button.compact {
  min-height: 34px;
  padding: 0 10px;
  font-size: 12px;
}

.import-budget-button {
  cursor: pointer;
}

.button.primary {
  background: var(--blue);
  color: #ffffff;
}

.button.primary:hover {
  background: var(--teal-dark);
  transform: translateY(-1px);
}

.button.secondary {
  background: #ffffff;
  border: 1px solid var(--line);
  color: var(--ink);
}

.button.secondary:hover {
  border-color: #B8C5DC;
  box-shadow: 0 8px 20px rgba(31, 41, 66, 0.08);
}

.button.danger {
  background: #fff5f3;
  border: 1px solid #e1aaa4;
  color: #9f352d;
}

.summary-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(160px, 1fr));
  gap: 12px;
  margin-bottom: 12px;
}

.sync-conflict-banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 12px;
  border: 1px solid #df9d90;
  border-radius: 8px;
  background: #fff5f3;
  color: #742a25;
  padding: 12px 14px;
}

.sync-conflict-banner[hidden] {
  display: none;
}

.sync-conflict-banner strong,
.sync-conflict-banner span {
  display: block;
}

.sync-conflict-banner span {
  margin-top: 3px;
  color: #8a4b43;
  font-size: 13px;
}

.conflict-actions {
  display: flex;
  flex: 0 0 auto;
  gap: 8px;
}

.metric {
  background: var(--paper);
  border: 1px solid var(--soft-line);
  border-radius: var(--radius);
  padding: 14px 16px;
  box-shadow: 0 10px 30px rgba(31, 41, 66, 0.06);
}

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

.metric strong {
  display: block;
  margin: 4px 0 0;
  font-family: "IBM Plex Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 22px;
  line-height: 1.1;
}

.metric.alert strong {
  color: var(--coral);
}

.beta-panel {
  display: grid;
  grid-template-columns: minmax(220px, 0.35fr) minmax(0, 1fr);
  gap: 14px;
  padding: 16px;
  border-top: 1px solid var(--soft-line);
  background: #F8FAFE;
}

.beta-panel h3 {
  margin: 2px 0 0;
  font-size: 15px;
}

.beta-steps {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

.beta-steps span {
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #ffffff;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  padding: 6px 9px;
}

.beta-steps .done {
  border-color: #BFCDF4;
  background: #EEF3FF;
  color: var(--blue);
}

.editor-layout {
  display: block;
  align-items: start;
}

.budget-panel,
.inspector-block {
  background: var(--paper);
  border: 1px solid var(--soft-line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.budget-panel {
  min-width: 0;
  zoom: 0.9;
}

.workbook-tabs {
  display: flex;
  gap: 4px;
  overflow-x: auto;
  padding: 6px 8px 0;
  border-bottom: 1px solid var(--soft-line);
  background: #F8FAFE;
}

.sheet-tab {
  border: 1px solid transparent;
  border-bottom: 0;
  border-radius: 8px 8px 0 0;
  background: transparent;
  color: var(--muted);
  min-height: 30px;
  padding: 0 9px;
  white-space: nowrap;
  font-size: 12px;
  font-weight: 750;
}

.sheet-tab.active {
  background: var(--paper);
  color: var(--ink);
  border-color: var(--soft-line);
}

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

.panel-head.compact {
  padding: 10px;
}

.segmented {
  display: flex;
  padding: 3px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--wash);
  overflow-x: auto;
}

.segment {
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: var(--muted);
  min-height: 28px;
  padding: 0 10px;
  font-size: 12px;
  white-space: nowrap;
}

.segment.active {
  background: #ffffff;
  color: var(--ink);
  box-shadow: 0 2px 8px rgba(23, 33, 43, 0.08);
}

.table-wrap {
  overflow-x: auto;
}

.linked-page-header {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: start;
  gap: 16px;
  padding: 4px 0 6px;
  color: #111827;
  font-size: 13px;
  line-height: 1.25;
  min-width: 1180px;
}

.linked-page-header strong,
.linked-page-header span {
  display: block;
  min-height: 16px;
  font-weight: 800;
}

.linked-page-header em {
  grid-column: 2;
  grid-row: 1 / span 3;
  align-self: start;
  font-style: normal;
  font-weight: 850;
}

.budget-table {
  width: auto;
  border-collapse: collapse;
  table-layout: fixed;
  min-width: 760px;
  font-size: 12px;
}

.budget-table.six-seven-open {
  min-width: 1040px;
}

.budget-table.ot-calc-open {
  min-width: 1040px;
}

.budget-table.six-seven-open.ot-calc-open {
  min-width: 1320px;
}

.budget-col-line {
  width: 24px;
}

.budget-col-description {
  width: 215px;
}

.budget-col-notes {
  width: 74px;
}

.budget-col-compact {
  width: 42px;
}

.budget-col-days {
  width: 50px;
}

.budget-col-rate {
  width: 58px;
}

.budget-col-total {
  width: 72px;
}

.budget-col-money {
  width: 82px;
}

.budget-table th,
.budget-table td {
  border-bottom: 1px solid var(--soft-line);
  padding: 3px 5px;
  text-align: right;
  vertical-align: middle;
  overflow: hidden;
  text-overflow: ellipsis;
}

.budget-table th {
  position: sticky;
  top: 0;
  z-index: 1;
  background: #f9fbfd;
  color: var(--muted);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0;
  white-space: normal;
  line-height: 1.05;
}

.budget-table th:nth-child(2),
.budget-table th:nth-child(3),
.budget-table td:nth-child(2),
.budget-table td:nth-child(3) {
  text-align: left;
}

.budget-table td:first-child {
  color: var(--muted);
  font-weight: 700;
  width: 24px;
  padding-left: 2px;
  padding-right: 2px;
  text-align: right;
}

.section-header-row td {
  background: #edf4f3;
  color: var(--teal-dark);
  font-weight: 850;
  text-transform: uppercase;
  border-top: 2px solid var(--teal);
  border-bottom: 1px solid #bdd8d4;
}

.section-header-row td:first-child {
  background: var(--teal);
  color: #ffffff;
  text-align: center;
  font-size: 12px;
}

.section-total-row td,
.section-grand-row td {
  background: #fafbfc;
  font-weight: 800;
}

.section-total-row.secondary-total td {
  color: var(--muted);
}

.section-days-control-row td {
  background: #f8fafc;
  border-top: 1px solid #cbd5e1;
}

.section-days-control-label {
  color: var(--muted);
  font-size: 10px;
  font-weight: 800;
  text-transform: uppercase;
}

.section-days-select {
  width: 100%;
  min-width: 46px;
  min-height: 24px;
  border: 1px solid #b7c7d9;
  border-radius: 4px;
  background: #ffffff;
  color: var(--ink);
  font-family: inherit;
  font-size: 10px;
  font-weight: 800;
  line-height: 1;
  padding: 1px 0;
  text-align: center;
  text-align-last: center;
}

.section-days-select:focus {
  outline: 2px solid rgba(20, 121, 111, 0.18);
  border-color: var(--teal);
}

.section-grand-row td {
  background: #f4efe5;
  color: #4f3510;
  border-bottom: 2px solid #d6b370;
}

.top-sheet-form {
  padding: 10px;
  background: #ffffff;
}

.aicp-sheet {
  max-width: 1260px;
  margin: 0 auto;
  color: #111827;
}

.aicp-header {
  display: grid;
  grid-template-columns: 180px minmax(0, 1fr) 180px;
  align-items: start;
  gap: 12px;
  margin-bottom: 8px;
}

.aicp-title {
  text-align: center;
  color: #001dbb;
  font-weight: 850;
  font-size: 13px;
  line-height: 1.2;
}

.logo-slot {
  min-height: 58px;
  display: grid;
  justify-items: end;
  align-content: start;
  gap: 4px;
}

.company-logo {
  max-width: 170px;
  max-height: 58px;
  object-fit: contain;
}

.logo-actions {
  display: flex;
  justify-content: flex-end;
  gap: 6px;
  font-size: 10px;
}

.logo-slot small {
  color: #6b7280;
  font-size: 9px;
}

.logo-upload,
.logo-remove {
  border: 1px solid var(--line);
  border-radius: 4px;
  background: #ffffff;
  color: #374151;
  padding: 3px 6px;
  cursor: pointer;
  font-weight: 750;
}

.logo-upload input {
  display: none;
}

.logo-remove {
  font: inherit;
}

.logo-slot.has-logo .logo-upload,
.logo-slot.has-logo .logo-remove {
  opacity: 0;
  transition: opacity 0.15s ease;
}

.logo-slot.has-logo:hover .logo-upload,
.logo-slot.has-logo:hover .logo-remove,
.logo-slot.has-logo:focus-within .logo-upload,
.logo-slot.has-logo:focus-within .logo-remove {
  opacity: 1;
}

.top-sheet-card {
  border: 1px solid #111827;
  display: grid;
  grid-template-columns: 1fr 1.18fr;
  min-height: 190px;
}

.top-sheet-card > div {
  padding: 5px 9px;
}

.top-sheet-card > div + div {
  border-left: 1px solid #111827;
}

.aicp-field {
  display: grid;
  grid-template-columns: 160px minmax(0, 1fr);
  gap: 8px;
  align-items: center;
  min-height: 16px;
  font-size: 11px;
}

.aicp-field label,
.aicp-label {
  text-align: right;
  color: #111827;
}

.aicp-input,
.aicp-comments textarea {
  width: 100%;
  min-width: 0;
  border: 0;
  border-bottom: 1px solid transparent;
  background: transparent;
  padding: 2px 4px;
  color: #111827;
}

.aicp-input:focus,
.aicp-comments textarea:focus {
  outline: 2px solid rgba(20, 121, 111, 0.18);
  border-bottom-color: var(--teal);
  background: #f8fafc;
}

.editable-text {
  display: block;
  min-height: 1em;
  cursor: text;
}

.editable-text:focus {
  outline: 1px solid var(--teal);
  outline-offset: -1px;
  background: #f8fafc;
}

.summary-editable {
  width: 100%;
}

.commercial-list {
  margin-top: 6px;
}

.commercial-row {
  display: grid;
  grid-template-columns: 24px minmax(0, 1fr) 88px 88px;
  gap: 8px;
  align-items: center;
  font-size: 11px;
}

.commercial-row.header {
  text-align: center;
  text-decoration: underline;
}

.summary-table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 10px;
  font-size: 11px;
}

.summary-table th,
.summary-table td {
  border: 1px solid #111827;
  padding: 1px 4px;
}

.summary-table th {
  color: #001dbb;
  text-align: left;
}

.summary-table td:first-child {
  width: 36px;
  color: #12803f;
  font-weight: 800;
  text-align: center;
}

.summary-table td:nth-child(3),
.summary-table td:nth-child(4),
.summary-table .actual-summary-col,
.summary-table .working-summary-col,
.summary-table .variance-summary-col {
  text-align: right;
  font-variant-numeric: tabular-nums;
}

.summary-amount-input {
  width: 100%;
  border: 0;
  background: transparent;
  color: inherit;
  font: inherit;
  font-variant-numeric: tabular-nums;
  padding: 0;
  text-align: right;
}

.summary-amount-input:focus {
  outline: 1px solid #0f8b7f;
  outline-offset: -1px;
  background: #ffffff;
}

.selected-cell {
  background: #d8ecff !important;
  outline: 2px solid #2477c7;
  outline-offset: -2px;
}

.selected-cell input,
.selected-cell textarea {
  background: transparent;
}

.selection-sum-bar {
  position: fixed;
  right: 18px;
  bottom: 18px;
  z-index: 70;
  padding: 10px 14px;
  border: 1px solid #bdd7f1;
  border-radius: 8px;
  background: #ffffff;
  box-shadow: 0 14px 40px rgba(15, 23, 42, 0.18);
  color: #17212f;
  font-size: 13px;
  font-weight: 850;
  font-variant-numeric: tabular-nums;
}

.summary-total-row td {
  font-weight: 850;
}

.grand-total {
  display: grid;
  align-items: stretch;
  gap: 0;
  margin: 9px 0;
  font-size: 12px;
}

.grand-total.has-comparison {
  grid-template-columns: minmax(120px, 1fr) 120px 170px minmax(130px, 0.6fr) minmax(130px, 0.6fr) minmax(140px, 0.7fr);
}

.grand-total.has-working {
  grid-template-columns: minmax(120px, 1fr) 120px 170px minmax(120px, 0.55fr) minmax(120px, 0.55fr) minmax(120px, 0.55fr) minmax(130px, 0.6fr);
}

.grand-total.estimate-only {
  grid-template-columns: minmax(120px, 1fr) 120px 170px minmax(150px, 0.7fr);
}

.grand-total .boxed {
  border: 1px solid #111827;
  min-height: 38px;
  display: grid;
  place-items: center;
  font-weight: 850;
  color: #001dbb;
  padding: 0 10px;
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}

.grand-total .grand-label {
  min-width: 170px;
}

.aicp-comments {
  border: 1px solid #111827;
}

.aicp-comments h3 {
  margin: 0;
  color: #001dbb;
  font-size: 12px;
  padding: 2px 5px;
  border-bottom: 1px solid #111827;
}

.aicp-comments textarea {
  display: block;
  min-height: 110px;
  resize: vertical;
  font-size: 12px;
  line-height: 1.25;
  padding: 6px 12px;
  border-bottom: 0;
}

.side-workspace {
  display: block;
}

.dashboard-workspace {
  display: block;
}

.budget-dashboard {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(318px, 1fr));
  gap: 14px;
  padding: 16px;
}

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

.jobs-dashboard-layout {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0;
  border-top: 1px solid var(--soft-line);
}

.import-shelf {
  display: grid;
  grid-template-columns: minmax(150px, 0.18fr) minmax(0, 1fr);
  gap: 12px;
  align-items: start;
  border-top: 1px solid var(--soft-line);
  background: #f2f8f7;
  padding: 12px;
}

.import-shelf-panel {
  grid-template-columns: minmax(180px, 0.22fr) minmax(0, 1fr);
  border-top: 0;
  border-radius: 8px;
  background: #f7fbfa;
}

.import-shelf h3 {
  margin: 2px 0 0;
  font-size: 15px;
}

.import-shelf-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 10px;
}

.import-chip {
  display: grid;
  gap: 8px;
  border: 1px solid #b9d8d2;
  border-radius: 8px;
  background: #ffffff;
  padding: 10px;
}

.import-chip.error {
  border-color: #e1aaa4;
  background: #fff5f3;
}

.import-chip.error strong {
  color: #a83f35;
}

.import-chip strong,
.import-chip span {
  display: block;
}

.import-chip span {
  color: var(--muted);
  font-size: 12px;
  overflow-wrap: anywhere;
}

.import-chip div {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.job-folder-list {
  display: flex;
  gap: 10px;
  padding: 14px 16px;
  border-bottom: 1px solid var(--soft-line);
  background: #F8FAFE;
  cursor: grab;
  overflow-x: auto;
  overscroll-behavior-inline: contain;
  scroll-snap-type: x proximity;
  user-select: none;
  -webkit-overflow-scrolling: touch;
}

.job-folder-list.dragging {
  cursor: grabbing;
}

.job-folder-list::-webkit-scrollbar {
  height: 8px;
}

.job-folder-list::-webkit-scrollbar-thumb {
  background: #cbd5e1;
  border-radius: 999px;
}

.job-folder {
  display: grid;
  grid-template-columns: 28px minmax(0, 1fr) auto;
  flex: 0 0 205px;
  gap: 3px 8px;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 12px;
  background: #ffffff;
  color: var(--ink);
  text-align: left;
  cursor: pointer;
  scroll-snap-align: start;
}

.folder-delete {
  grid-column: 3;
  grid-row: 1 / span 2;
  align-self: center;
  border: 1px solid #e1aaa4;
  border-radius: 999px;
  color: #9f352d;
  font-size: 10px;
  font-weight: 850;
  padding: 3px 7px;
}

.job-folder[draggable="true"],
.budget-card[draggable="true"] {
  cursor: grab;
}

.job-folder.is-dragging,
.budget-card.is-dragging {
  cursor: grabbing;
  opacity: 0.55;
}

.job-folder.drag-target,
.budget-card.drag-target {
  border-color: var(--blue);
  box-shadow: 0 0 0 3px rgba(27, 79, 216, 0.16);
}

.job-folder.budget-drop-target {
  background: #EEF3FF;
  border-color: var(--blue);
}

.job-folder:hover,
.job-folder.active {
  border-color: var(--blue);
  box-shadow: 0 0 0 2px rgba(27, 79, 216, 0.1);
}

.job-folder .folder-icon {
  grid-row: span 2;
  color: var(--blue);
  font-weight: 900;
}

.job-folder strong {
  overflow-wrap: anywhere;
}

.job-folder small {
  color: var(--muted);
}

.budget-card {
  display: grid;
  gap: 12px;
  background: #ffffff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 16px;
  box-shadow: 0 10px 28px rgba(31, 41, 66, 0.05);
}

.budget-card.active {
  border-color: var(--blue);
  box-shadow: 0 0 0 2px rgba(27, 79, 216, 0.12), 0 14px 34px rgba(31, 41, 66, 0.08);
}

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

.budget-card-head strong {
  font-family: Archivo, Inter, sans-serif;
  font-size: 16px;
}

.budget-card-head span {
  color: var(--blue);
  font-weight: 850;
  white-space: nowrap;
}

.budget-card strong,
.budget-card span,
.budget-card small,
.budget-card dt,
.budget-card dd {
  display: block;
}

.budget-card span,
.budget-card small,
.budget-share-list {
  color: var(--muted);
  font-size: 12px;
}

.budget-card-meta {
  display: grid;
  gap: 6px;
  margin: 0;
}

.budget-card-meta div {
  display: grid;
  grid-template-columns: 100px minmax(0, 1fr);
  gap: 8px;
}

.budget-card-meta dt {
  color: var(--muted);
  font-size: 12px;
}

.budget-card-meta dd {
  margin: 0;
  font-weight: 750;
  overflow-wrap: anywhere;
}

.budget-card-totals {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.imported-source {
  display: grid;
  gap: 3px;
  border: 1px solid #b9d8d2;
  border-radius: 8px;
  background: #eef8f6;
  padding: 8px;
}

.imported-source strong {
  color: var(--teal-dark);
  font-size: 12px;
}

.imported-source span {
  color: var(--muted);
  font-size: 12px;
  overflow-wrap: anywhere;
}

.budget-card-totals div {
  border: 1px solid var(--soft-line);
  border-radius: 8px;
  padding: 10px;
  background: #F8FAFE;
}

.budget-card-totals strong {
  margin-top: 2px;
  font-family: "IBM Plex Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
  font-variant-numeric: tabular-nums;
}

.budget-card-actions {
  display: flex;
  gap: 8px;
  align-items: end;
  flex-wrap: wrap;
}

.move-budget-control {
  display: grid;
  gap: 3px;
  min-width: 150px;
}

.move-budget-control span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
}

.move-budget-control select {
  width: 100%;
  min-height: 34px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: #ffffff;
  color: var(--ink);
  font: inherit;
  font-weight: 750;
  padding: 0 8px;
}

.budget-share-list {
  display: grid;
  gap: 4px;
  border-top: 1px solid var(--soft-line);
  padding-top: 8px;
}

.actuals-grid,
.collaboration-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(280px, 0.6fr);
  gap: 12px;
  padding: 12px;
}

.budget-table input {
  width: 100%;
  min-width: 0;
  border: 1px solid transparent;
  border-radius: 6px;
  background: transparent;
  padding: 3px 5px;
  color: var(--ink);
  text-align: right;
}

.budget-table td:nth-child(2) input,
.budget-table td:nth-child(3) input {
  text-align: left;
}

.budget-table .pw-col,
.budget-table .ot-hours-col,
.budget-table .six-seven-col,
.budget-table .ot-calc-col {
  padding-left: 2px;
  padding-right: 2px;
  text-align: center;
}

.budget-table .pw-col input,
.budget-table .ot-hours-col input,
.budget-table .six-seven-col input {
  padding-left: 2px;
  padding-right: 2px;
  text-align: right;
}

.budget-table input:focus {
  outline: 2px solid rgba(20, 121, 111, 0.18);
  border-color: var(--teal);
  background: #ffffff;
}

.budget-table .pw-col {
  background: #c9ffd0;
}

.budget-table th.pw-col {
  color: #001dbb;
  text-align: center;
}

.budget-table .ot-hours-col {
  background: #f8fbff;
}

.budget-table th.ot-hours-col {
  text-align: center;
}

.budget-table .six-seven-col {
  background: #e9f3fb;
}

.budget-table th.six-seven-col {
  color: #b00000;
}

.budget-table .ot-calc-col {
  background: #d9d9d9;
  color: #111827;
}

.budget-table th.ot-calc-col {
  color: #001dbb;
}

.budget-table .pw-col,
.budget-table .ot-hours-col,
.budget-table .six-seven-col,
.budget-table .ot-calc-col {
  min-width: 0;
}

.budget-table .working-col,
.summary-table th.working-summary-col,
.summary-table td.working-summary-col,
.summary-table th.variance-summary-col,
.summary-table td.variance-summary-col,
.grand-total .working-summary-col,
.grand-total .variance-summary-col {
  background: #d9d9d9;
}

.budget-table th.actual-col,
.budget-table td.actual-col,
.summary-table th.actual-summary-col,
.summary-table td.actual-summary-col,
.grand-total .actual-summary-col {
  background: #ffffff !important;
}

.budget-table th.working-col {
  color: #001dbb;
  text-align: center;
}

.budget-table .working-col input {
  padding-left: 2px;
  padding-right: 2px;
  text-align: right;
}

.budget-table.pw-collapsed .pw-col {
  display: none;
}

.pw-toggle {
  background: #e5f5ec;
  color: var(--teal-dark);
  font-weight: 850;
}

.working-toggle {
  background: #fff4dc;
  color: #7a520f;
  font-weight: 850;
}

.labor-toggle {
  background: #edf4fb;
  color: #0f4d7a;
  font-weight: 850;
}

.ot-calc-toggle {
  background: #e6e7eb;
  color: #374151;
  font-weight: 850;
}

.negative {
  color: #cf352c;
}

.sheet-surface {
  padding: 18px;
  overflow-x: auto;
}

.travel-table,
.log-sheet-table,
.payroll-table,
.petty-cash-table {
  width: 100%;
  min-width: 980px;
  border-collapse: collapse;
  background: #ffffff;
}

.payroll-table {
  min-width: 1360px;
  font-size: 11px;
}

.travel-table th,
.travel-table td,
.log-sheet-table th,
.log-sheet-table td,
.payroll-table th,
.payroll-table td,
.petty-cash-table th,
.petty-cash-table td {
  border: 1px solid var(--line);
  padding: 6px;
  text-align: left;
  vertical-align: middle;
}

.travel-table th,
.log-sheet-table th,
.payroll-table th,
.petty-cash-table th {
  color: #001dbb;
  background: #f8fafc;
  font-size: 12px;
  text-transform: uppercase;
}

.travel-table input,
.log-sheet-table input,
.payroll-table input,
.petty-cash-table input {
  width: 100%;
  min-width: 0;
  border: 1px solid transparent;
  border-radius: 5px;
  padding: 6px 7px;
}

.travel-table input:focus,
.log-sheet-table input:focus,
.payroll-table input:focus,
.petty-cash-table input:focus {
  border-color: var(--teal);
  outline: 2px solid rgba(20, 121, 111, 0.18);
}

.petty-cash-table {
  min-width: 1120px;
  font-size: 12px;
}

.petty-cash-table th,
.petty-cash-table td {
  padding: 3px 5px;
}

.petty-cash-table .petty-title-row th,
.petty-cash-table .petty-envelope-row th,
.petty-cash-table .petty-name-row th {
  background: #fffec4;
  text-align: center;
  font-weight: 850;
}

.petty-cash-table .petty-side-heading {
  vertical-align: bottom;
}

.petty-cash-table .petty-title-row th {
  font-style: italic;
}

.petty-cash-table input {
  min-height: 24px;
  padding: 3px 5px;
  border-radius: 0;
}

.log-sort-button {
  width: 100%;
  border: 0;
  background: transparent;
  color: #001dbb;
  font: inherit;
  font-weight: 850;
  text-align: left;
  text-transform: uppercase;
}

.log-sort-button::after {
  content: " ↕";
  color: var(--muted);
  font-size: 10px;
}

.log-row-number {
  color: #001dbb;
  font-weight: 800;
  text-align: center;
}

.delete-log-row {
  border: 1px solid #f0c4bd;
  border-radius: 5px;
  background: #fff8f7;
  color: #b0352c;
  font-size: 11px;
  font-weight: 850;
  padding: 4px 7px;
}

.petty-number-row td,
.petty-total-row td {
  font-weight: 800;
  text-align: right;
}

.petty-row-label {
  color: #001dbb;
  font-weight: 800;
  text-align: center;
}

.petty-total-row td:nth-last-child(2) {
  text-align: left;
}

.petty-cash-surface .add-log-row {
  margin-top: 12px;
}

.travel-surface {
  display: grid;
  gap: 12px;
}

.travel-controls {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  background: #f8fafc;
}

.travel-controls label,
.travel-controls strong {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
}

.travel-controls input,
.travel-summary-table input {
  width: 72px;
  border: 1px solid var(--line);
  border-radius: 5px;
  padding: 5px 7px;
}

.travel-total-row td {
  font-weight: 850;
}

.travel-summary-table {
  width: 360px;
  border-collapse: collapse;
  background: #ffffff;
}

.travel-summary-table th,
.travel-summary-table td {
  border: 1px solid var(--line);
  padding: 6px 8px;
}

.travel-summary-table th {
  text-align: right;
}

.travel-summary-table td {
  text-align: right;
  font-weight: 850;
}

.payroll-table th,
.payroll-table td {
  padding: 3px 4px;
}

.payroll-table th {
  background: #ffffbd;
  font-size: 11px;
}

.payroll-table td:nth-child(1),
.payroll-table td:nth-child(4),
.payroll-table td:nth-child(5),
.payroll-table td:nth-child(6),
.payroll-table td:nth-child(8),
.payroll-table td:nth-child(9),
.payroll-table td:nth-child(10),
.payroll-table td:nth-child(18) {
  width: 44px;
}

.payroll-table td:nth-child(7),
.payroll-table td:nth-child(11),
.payroll-table td:nth-child(12),
.payroll-table td:nth-child(13),
.payroll-table td:nth-child(14),
.payroll-table td:nth-child(15),
.payroll-table td:nth-child(17) {
  width: 82px;
}

.add-log-row {
  margin-top: 12px;
}

.empty-state {
  color: var(--muted);
  padding: 14px;
  font-size: 14px;
}

.below-line-surface {
  display: flex;
  justify-content: flex-end;
}

.below-line-card {
  width: min(100%, 560px);
  display: grid;
  gap: 14px;
}

.below-line-table {
  min-width: 0;
}

.job-report-surface {
  display: grid;
  gap: 18px;
  padding: 12px;
  background: #ffffff;
}

.job-report-box {
  border: 2px solid #111827;
  background: #ffffbd;
  padding: 10px 14px;
}

.job-report-box h3,
.job-section-head h3 {
  margin: 0 0 10px;
  color: #001dbb;
  font-size: 13px;
  font-style: italic;
  text-align: center;
}

.reconciliation-box {
  min-height: 90px;
  display: grid;
  place-items: center;
  gap: 8px;
}

.job-report-box label {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-size: 12px;
}

.job-report-box input,
.job-report-box textarea {
  border: 1px solid #111827;
  background: #ffffff;
  min-height: 22px;
  padding: 2px 5px;
  font: inherit;
}

.job-report-box textarea {
  display: block;
  width: 100%;
  min-height: 90px;
  resize: vertical;
}

.job-markup-table,
.job-billing-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 12px;
}

.job-markup-table th,
.job-markup-table td,
.job-billing-table th,
.job-billing-table td {
  border: 0;
  padding: 3px 5px;
}

.job-markup-table th,
.job-billing-table th {
  color: #001dbb;
  text-transform: uppercase;
}

.job-markup-table input,
.job-billing-table input {
  width: 100%;
}

.job-markup-table td:nth-child(2),
.job-markup-table td:nth-child(3),
.job-markup-table td:nth-child(4),
.job-markup-table td:nth-child(5),
.job-markup-table td:nth-child(6),
.job-billing-table td:nth-child(3),
.job-billing-table td:nth-child(4),
.job-billing-table td:nth-child(5) {
  text-align: right;
  font-variant-numeric: tabular-nums;
}

.job-section-head {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  position: relative;
}

.job-section-head .button {
  position: absolute;
  right: 0;
  min-height: 24px;
  padding: 0 8px;
  font-size: 11px;
}

.job-note {
  margin: 8px 0 0;
  font-size: 12px;
  text-align: center;
  font-weight: 700;
}

.job-bottom-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(320px, 1fr);
  gap: 18px;
}

.check-row {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 800;
  color: var(--ink);
}

.money-cell {
  font-variant-numeric: tabular-nums;
  font-weight: 760;
}

.inspector {
  display: grid;
  gap: 18px;
}

.status-dot {
  background: #e5f5ec;
  color: var(--green);
  font-size: 12px;
  font-weight: 800;
  padding: 5px 8px;
  border-radius: 999px;
}

.detail-list {
  display: grid;
  gap: 10px;
  margin: 0;
  padding: 14px;
}

.detail-list div {
  display: flex;
  justify-content: space-between;
  gap: 12px;
}

.detail-list dt {
  color: var(--muted);
}

.detail-list dd {
  margin: 0;
  font-weight: 760;
  text-align: right;
}

.share-row {
  display: flex;
  gap: 8px;
  padding: 14px 14px 0;
}

.share-row input {
  min-width: 0;
  flex: 1;
  border: 1px solid var(--line);
  border-radius: 8px;
  min-height: 38px;
  padding: 0 10px;
}

.share-row select,
.collaborator-row select {
  border: 1px solid var(--line);
  border-radius: 8px;
  min-height: 38px;
  padding: 0 10px;
  background: #ffffff;
  color: var(--ink);
  font-weight: 750;
}

.compact-share {
  padding-top: 8px;
}

.icon-button {
  width: 40px;
  background: var(--teal);
  color: #ffffff;
  font-size: 20px;
}

.activity-list,
.log-list {
  margin: 0;
  padding: 14px;
}

.activity-list {
  list-style: none;
  display: grid;
  gap: 9px;
  color: var(--muted);
  font-size: 14px;
}

.activity-list strong {
  color: var(--ink);
}

.active-collaborators {
  display: grid;
  gap: 10px;
  padding: 14px 14px 0;
}

.collaborator-row {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) minmax(130px, auto) auto;
  align-items: center;
  gap: 10px;
  border: 1px solid var(--soft-line);
  border-radius: 8px;
  background: #ffffff;
  padding: 10px;
}

.collaborator-row strong,
.collaborator-row small {
  display: block;
}

.collaborator-row small {
  color: var(--muted);
  margin-top: 2px;
}

.role-pill {
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 850;
  padding: 4px 8px;
}

.readonly-banner {
  margin: 12px 18px 0;
  border: 1px solid #d6e5de;
  border-radius: 6px;
  background: #eef8f4;
  color: var(--teal-dark);
  font-size: 13px;
  font-weight: 850;
  padding: 9px 12px;
}

.locked-field {
  cursor: default;
  opacity: 0.75;
}

.feedback-grid {
  display: grid;
  grid-template-columns: minmax(280px, 0.38fr) minmax(0, 1fr);
  gap: 14px;
  padding: 14px;
}

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

.reliability-list {
  display: grid;
  gap: 8px;
  padding: 12px;
}

.reliability-note {
  margin: 0;
  padding: 0 12px 10px;
}

.reliability-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  border: 1px solid var(--soft-line);
  border-radius: 8px;
  background: #ffffff;
  padding: 10px 12px;
}

.reliability-row strong,
.reliability-row small {
  display: block;
}

.reliability-row small {
  margin-top: 3px;
  color: var(--muted);
  line-height: 1.35;
}

.revision-current {
  border-color: #9ed4c7;
  background: #f1fbf8;
}

.feedback-form {
  display: grid;
  gap: 12px;
  padding: 14px;
}

.feedback-form label {
  display: grid;
  gap: 6px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

.feedback-form select,
.feedback-form textarea {
  border: 1px solid var(--line);
  border-radius: 8px;
  min-height: 38px;
  padding: 8px 10px;
  font: inherit;
  color: var(--ink);
  background: #ffffff;
}

.feedback-form textarea {
  min-height: 140px;
  resize: vertical;
}

.feedback-list {
  display: grid;
  gap: 10px;
  padding: 14px;
}

.feedback-export-block {
  grid-column: 1 / -1;
}

.feedback-export-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 14px 14px 8px;
}

.feedback-export-block .sheet-meta {
  display: block;
  padding: 0 14px 14px;
}

.feedback-card {
  display: grid;
  gap: 8px;
  border: 1px solid var(--soft-line);
  border-radius: 8px;
  padding: 12px;
  background: #ffffff;
}

.feedback-card div {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  align-items: center;
}

.feedback-card p {
  margin: 0;
  line-height: 1.4;
}

.feedback-card small {
  color: var(--muted);
}

.priority {
  border-radius: 999px;
  border: 1px solid var(--line);
  color: var(--muted);
  font-size: 11px;
  font-weight: 850;
  padding: 3px 7px;
}

.priority.high {
  border-color: #e1aaa4;
  color: #9f352d;
}

.priority.low {
  color: var(--teal);
  border-color: #a8d5ce;
}

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

.log-entry {
  display: grid;
  grid-template-columns: 54px 1fr auto;
  gap: 10px;
  align-items: center;
  font-size: 13px;
}

.log-entry span:first-child {
  color: var(--muted);
  font-weight: 800;
}

.log-entry strong {
  font-variant-numeric: tabular-nums;
}

.toast {
  position: fixed;
  right: 24px;
  bottom: 24px;
  max-width: min(360px, calc(100vw - 48px));
  background: #17212b;
  color: #ffffff;
  border-radius: 8px;
  padding: 12px 14px;
  box-shadow: var(--shadow);
  opacity: 0;
  transform: translateY(8px);
  pointer-events: none;
  transition: opacity 160ms ease, transform 160ms ease;
}

.toast.visible {
  opacity: 1;
  transform: translateY(0);
}

.print-dialog-backdrop {
  position: fixed;
  inset: 0;
  z-index: 20;
  display: grid;
  place-items: center;
  padding: 20px;
  background: rgba(23, 33, 43, 0.42);
}

.print-dialog {
  width: min(680px, 100%);
  background: #ffffff;
  border: 1px solid var(--soft-line);
  border-radius: 8px;
  box-shadow: var(--shadow);
  padding: 18px;
}

.print-dialog-head,
.print-dialog-actions {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
}

.icon-button.quiet {
  background: #f3f6f8;
  color: var(--ink);
}

.print-quick-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 16px 0;
}

.print-sheet-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 8px;
  max-height: 260px;
  overflow: auto;
  border: 1px solid var(--soft-line);
  border-radius: 8px;
  padding: 10px;
}

.print-sheet-option {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 32px;
  font-weight: 750;
}

.print-dialog-actions {
  justify-content: flex-end;
  margin-top: 16px;
}

.print-area {
  padding: 18px;
  background: #ffffff;
}

.print-page {
  position: relative;
  width: 816px;
  min-height: 1056px;
  padding: 58px 44px 42px;
  box-sizing: border-box;
  break-after: page;
  break-inside: avoid;
  margin: 0 auto 24px;
  overflow: visible;
  background: #ffffff;
}

.print-page h1 {
  font-size: 16px;
  margin: 0 0 10px;
  color: #111827;
}

.print-page-kicker {
  text-align: right;
  font-size: 10px;
  font-weight: 800;
  margin-bottom: 4px;
}

.print-page-header {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 8px;
  color: #111827;
  font-size: 12px;
}

.print-page-header div {
  display: grid;
  gap: 2px;
}

.print-page-header em {
  font-style: normal;
  font-weight: 800;
}

.print-budget-header {
  display: flex;
  justify-content: space-between;
  align-items: start;
  gap: 18px;
  margin-bottom: 5px;
  color: #000000;
  font-size: 13px;
  line-height: 1.2;
}

.print-budget-header div {
  display: grid;
  gap: 1px;
}

.print-budget-header b {
  font-size: 13px;
  white-space: nowrap;
}

.print-section-stack {
  display: grid;
  gap: 16px;
}

.print-section-table {
  width: 100%;
  border-collapse: collapse;
  table-layout: fixed;
  color: #000000;
  font-size: 10.8px;
  line-height: 1.04;
}

.print-section-table th,
.print-section-table td {
  border: 1px solid #000000;
  padding: 1px 3px;
  vertical-align: middle;
  overflow-wrap: anywhere;
}

.print-section-table th {
  color: #001dbb;
  background: #ffffff;
  font-weight: 800;
  text-transform: none;
}

.print-section-letter {
  color: #001dbb;
  text-align: center;
}

.print-section-name {
  color: #001dbb;
  text-align: left;
  text-transform: uppercase;
}

.print-col-line {
  width: 20px;
}

.print-col-description {
  width: auto;
}

.expense-print-table .print-col-description {
  width: auto;
}

.crew-print-table .print-col-description {
  width: 38%;
}

.print-col-days {
  width: 52px;
}

.print-col-rate {
  width: 60px;
}

.print-col-ot {
  width: 40px;
}

.print-col-estimate {
  width: 92px;
}

.print-col-actual {
  width: 82px;
}

.print-line {
  color: #00802b;
  font-weight: 800;
  text-align: center;
  white-space: nowrap;
  overflow-wrap: normal;
}

.print-number,
.print-money {
  text-align: right;
  white-space: nowrap;
}

.print-row-note {
  float: right;
  max-width: 48%;
  padding-left: 12px;
  color: #000000;
}

.print-section-title td {
  color: #001dbb;
  font-weight: 900;
  text-transform: uppercase;
  background: #ffffff;
}

.print-section-title td:first-child {
  text-align: center;
}

.print-total-row td,
.print-grand-row td {
  font-weight: 900;
}

.print-secondary-total td {
  color: #111827;
}

.print-grand-row td {
  color: #d00000;
}

.print-top-sheet-page {
  color: #111827;
  font-size: 9px;
  line-height: 1.1;
  padding-top: 48px;
}

.print-top-header {
  display: grid;
  grid-template-columns: 170px minmax(0, 1fr) 170px;
  align-items: start;
  gap: 10px;
  margin-bottom: 10px;
}

.print-logo-slot {
  min-height: 42px;
  display: grid;
  justify-items: end;
}

.print-company-logo {
  max-width: 165px;
  max-height: 48px;
  object-fit: contain;
}

.print-budget-section {
  padding-left: 32px;
  padding-right: 32px;
}

.print-budget-compact {
  padding-top: 44px;
  padding-left: 14px;
  padding-right: 14px;
}

.print-budget-compact .print-budget-header {
  margin-bottom: 3px;
  font-size: 12px;
  line-height: 1.08;
}

.print-budget-compact .print-section-stack {
  gap: 13px;
}

.print-budget-compact .print-section-table {
  font-size: 10.4px;
  line-height: 1.05;
}

.print-budget-compact .print-section-table th,
.print-budget-compact .print-section-table td {
  padding: 1px 2px;
}

.print-aicp-title {
  text-align: center;
  color: #001dbb;
  font-weight: 900;
  font-size: 12px;
  line-height: 1.15;
}

.print-aicp-card {
  display: grid;
  grid-template-columns: 1fr 1.18fr;
  border: 1px solid #000000;
  min-height: 242px;
}

.print-aicp-card > div {
  padding: 4px 8px;
}

.print-aicp-card > div + div {
  border-left: 1px solid #000000;
}

.print-aicp-field {
  display: grid;
  grid-template-columns: 145px minmax(0, 1fr);
  gap: 4px;
  min-height: 13px;
}

.print-aicp-field span {
  text-align: right;
}

.print-aicp-field strong,
.print-commercial-row strong {
  font-weight: 700;
}

.print-schedule-fields {
  margin-top: 38px;
}

.print-commercial-list {
  margin-top: 4px;
}

.print-commercial-row {
  display: grid;
  grid-template-columns: 22px minmax(0, 1fr) 70px 70px;
  gap: 5px;
  min-height: 13px;
}

.print-commercial-head {
  text-align: center;
  text-decoration: underline;
}

.print-top-summary {
  width: 100%;
  border-collapse: collapse;
  table-layout: fixed;
  margin-top: 12px;
  font-size: 9px;
  line-height: 1;
}

.print-top-line-col {
  width: 4%;
}

.print-top-description-col {
  width: 34%;
}

.print-top-reference-col {
  width: 26%;
}

.print-top-summary th,
.print-top-summary td {
  border: 1px solid #000000;
  padding: 1px 3px;
}

.print-top-summary th {
  color: #001dbb;
  text-align: left;
}

.print-top-summary td:first-child {
  color: #00802b;
  text-align: center;
  font-weight: 900;
  white-space: nowrap;
}

.print-top-summary td:nth-child(3),
.print-top-summary td:nth-child(4),
.print-top-summary td:nth-child(5),
.print-top-summary td:nth-child(6) {
  text-align: right;
  white-space: nowrap;
}

.print-summary-total td {
  font-weight: 900;
}

.print-grand-total {
  display: grid;
  align-items: stretch;
  margin: 12px 0;
  font-size: 9px;
}

.print-grand-total.estimate-only {
  grid-template-columns: 1fr 95px 142px 1fr;
}

.print-grand-total.has-comparison {
  grid-template-columns: 1fr 95px 142px 1fr 1fr 1fr;
}

.print-grand-total.has-working {
  grid-template-columns: 1fr 95px 142px 1fr 1fr 1fr 1fr;
}

.print-grand-total span {
  display: grid;
  align-items: center;
  text-align: right;
  padding-right: 8px;
}

.print-grand-total strong,
.print-grand-total b {
  border: 1px solid #000000;
  min-height: 40px;
  display: grid;
  place-items: center;
  color: #001dbb;
  font-weight: 900;
  white-space: nowrap;
}

.print-top-summary .working-summary-col,
.print-top-summary .variance-summary-col,
.print-grand-total .working-summary-col,
.print-grand-total .variance-summary-col {
  background: #d9d9d9;
}

.print-top-summary .actual-summary-col,
.print-grand-total .actual-summary-col {
  background: #ffffff;
}

.print-comments {
  border: 1px solid #000000;
}

.print-comments h3 {
  margin: 0;
  color: #001dbb;
  font-size: 8.5px;
  padding: 1px 4px;
  border-bottom: 1px solid #000000;
}

.print-comments p {
  margin: 0;
  min-height: 292px;
  max-height: 292px;
  overflow: hidden;
  padding: 8px 14px;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 9px;
  line-height: 1.25;
}

.print-footer {
  position: absolute;
  left: 44px;
  right: 44px;
  bottom: 18px;
  color: #000000;
  font-size: 7px;
}

.print-top-sheet-page .print-footer {
  text-align: center;
}

.print-travel-page {
  padding-top: 0.52in;
}

.print-travel-title {
  display: grid;
  justify-items: center;
  margin-bottom: 10px;
  color: #000000;
  font-size: 12px;
  line-height: 1.15;
}

.print-travel-title strong {
  font-weight: 500;
}

.print-travel-table {
  width: 100%;
  border-collapse: collapse;
  table-layout: fixed;
  color: #000000;
  font-size: 9px;
  line-height: 1;
}

.print-travel-table th,
.print-travel-table td {
  border: 1px solid #000000;
  height: 12px;
  padding: 1px 2px;
  text-align: right;
  vertical-align: middle;
}

.print-travel-table th {
  font-weight: 500;
  text-align: center;
}

.print-travel-table th:first-child,
.print-travel-table td:first-child {
  text-align: left;
}

.print-travel-name {
  width: 122px;
}

.print-travel-total-row td {
  font-weight: 850;
}

.print-travel-total-row td:nth-child(2),
.print-travel-total-row td:nth-child(5),
.print-travel-total-row td:nth-child(9),
.print-travel-total-row td:nth-child(13),
.print-travel-total-row td:nth-child(17) {
  color: #a45d67;
}

.print-travel-blank-row td {
  height: 12px;
}

.print-travel-summary {
  width: 320px;
  margin-top: 8px;
  border-collapse: collapse;
  table-layout: fixed;
  color: #000000;
  font-size: 10px;
  line-height: 1;
}

.print-travel-summary th,
.print-travel-summary td {
  border: 1px solid #000000;
  padding: 3px 6px;
}

.print-travel-summary th {
  width: 240px;
  text-align: right;
  font-weight: 850;
}

.print-travel-summary td {
  text-align: right;
  font-weight: 850;
}

.print-travel-summary span {
  display: inline-block;
  min-width: 46px;
  text-align: center;
}

@media print {
  @page {
    size: letter portrait;
    margin: 0;
  }

  body {
    background: #ffffff;
  }

  .app-shell,
  .toast,
  .print-dialog-backdrop,
  .selection-sum-bar,
  .section-days-control-row {
    display: none !important;
  }

  .print-area {
    display: block !important;
    padding: 0;
  }

  .print-page {
    width: 8.5in;
    min-height: 11in;
    padding: 0.6in 0.45in 0.38in;
    break-after: page;
    page-break-after: always;
    page-break-inside: avoid;
    margin: 0;
    overflow: visible;
  }

  .print-page:last-child {
    break-after: auto;
    page-break-after: auto;
  }

  .print-top-sheet-page {
    font-size: 9px;
    padding-top: 0.45in;
  }

  .print-budget-section {
    padding-left: 0.35in;
    padding-right: 0.35in;
  }

  .print-budget-compact {
    padding-top: 0.34in;
    padding-left: 0.14in;
    padding-right: 0.14in;
  }

  .print-section-table {
    font-size: 10.4px;
    line-height: 1.02;
  }

  .print-section-table th,
  .print-section-table td {
    padding: 0.75px 2px;
  }

  .print-section-stack {
    gap: 14px;
  }

  .print-budget-compact .print-budget-header {
    margin-bottom: 2px;
    font-size: 11px;
    line-height: 1.05;
  }

  .print-budget-compact .print-section-stack {
    gap: 11px;
  }

  .print-budget-compact .print-section-table {
    font-size: 9.9px;
    line-height: 1.04;
  }

  .print-budget-compact .print-section-table th,
  .print-budget-compact .print-section-table td {
    padding: 0.75px 1.5px;
  }

  .print-aicp-title {
    font-size: 12px;
    margin-bottom: 10px;
  }

  .print-aicp-card {
    min-height: 242px;
  }

  .print-top-summary {
    font-size: 8.6px;
  }

  .print-comments p {
    min-height: 270px;
    max-height: 270px;
    font-size: 8.5px;
  }

  .print-footer {
    left: 0.45in;
    right: 0.45in;
    bottom: 0.16in;
  }

  input,
  textarea {
    border: 0 !important;
  }
}

@media (max-width: 1080px) {
  .app-shell {
    grid-template-columns: 88px minmax(0, 1fr);
  }

  .brand div:last-child,
  .nav-item:not(.active) {
    font-size: 0;
  }

  .nav-item {
    justify-content: center;
  }

  .library-card {
    display: none;
  }

  .editor-layout {
    grid-template-columns: 1fr;
  }

  .jobs-dashboard-layout {
    grid-template-columns: 1fr;
  }

  .job-folder-list {
    border-bottom: 1px solid var(--soft-line);
  }

  .aicp-header {
    grid-template-columns: 1fr;
  }

  .logo-slot {
    justify-items: center;
  }
}

@media (max-width: 760px) {
  .app-shell {
    display: block;
  }

  .sidebar {
    padding: 14px;
    flex-direction: row;
    align-items: center;
    gap: 12px;
    overflow-x: auto;
  }

  .nav-list {
    display: flex;
    min-width: max-content;
  }

  .nav-item {
    font-size: 14px;
  }

  .workspace {
    padding: 16px;
  }

  .topbar {
    align-items: flex-start;
    flex-direction: column;
  }

  .topbar-actions {
    width: 100%;
    justify-content: space-between;
    flex-wrap: wrap;
  }

  .summary-grid {
    grid-template-columns: 1fr 1fr;
  }

  .sync-conflict-banner,
  .conflict-actions {
    align-items: stretch;
    flex-direction: column;
  }

  .reliability-grid {
    grid-template-columns: 1fr;
  }

  .panel-head {
    align-items: flex-start;
    flex-direction: column;
  }
}

@media (max-width: 520px) {
  .summary-grid {
    grid-template-columns: 1fr;
  }

  .button {
    flex: 1;
  }
}
