/* app.html (the tool) only. Loaded alongside base.css. */

/* ---------- app shell / sidebar navigation ---------- */

.app-shell { display: flex; align-items: flex-start; min-height: 100vh; }

.sidebar {
  width: 240px; flex-shrink: 0; background: var(--graphite); color: #fff;
  display: flex; flex-direction: column;
  position: sticky; top: 0; height: 100vh; overflow-y: auto; z-index: 40;
}
.sidebar-brand { padding: 18px 20px; }

.sidebar-nav { display: flex; flex-direction: column; gap: 2px; padding: 8px 12px; flex: 1; }
.nav-item {
  display: flex; align-items: center; gap: 11px; text-align: left; width: 100%;
  padding: 10px; border: 1px solid transparent; border-radius: var(--radius-md);
  background: transparent; color: rgba(255,255,255,.75); cursor: pointer;
  transition: background .15s, border-color .15s, color .15s;
}
.nav-item:hover { background: rgba(255,255,255,.06); color: #fff; }
.nav-item.active { background: var(--volt); border-color: var(--volt); color: var(--graphite); }
.nav-item-icon {
  width: 26px; height: 26px; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
}
.nav-item-label { display: flex; flex-direction: column; gap: 1px; }
.nav-item-label strong { font-size: 14px; font-weight: 600; }
.nav-item-label small { font-size: 11px; color: rgba(255,255,255,.55); }
.nav-item.active .nav-item-label small { color: rgba(20,23,26,.65); }

.sidebar-footer {
  padding: 12px; border-top: 1px solid rgba(255,255,255,.12);
  display: flex; flex-direction: column; gap: 6px;
}
.account-status-signed-in { display: flex; flex-direction: column; gap: 6px; margin-bottom: 2px; }
.account-email {
  font-size: 12px; color: rgba(255,255,255,.85); padding: 0 2px;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.sidebar-footer button {
  width: 100%; justify-content: flex-start;
  background: transparent; color: #fff; border-color: rgba(255,255,255,.22);
}
.sidebar-footer button:hover { border-color: #fff; background: rgba(255,255,255,.06); }

.main-column { flex: 1; min-width: 0; }

/* ---------- layout ---------- */

main { padding: 32px 24px; max-width: 1200px; margin: 0 auto; }
.panel { display: none; }
.panel.active { display: block; animation: fade-in .2s ease-out; }

.section-intro { margin-bottom: 22px; }
.section-intro h1 { font-family: var(--font-display); font-size: 22px; margin: 0 0 6px; letter-spacing: -0.01em; }
.section-intro p { margin: 0; color: var(--slate); font-size: 13.5px; line-height: 1.5; max-width: 640px; }

.card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
  padding: 4px;
}

.toolbar { display: flex; align-items: center; gap: 10px; margin-bottom: 14px; flex-wrap: wrap; }
.hint { color: var(--slate); font-size: 12px; margin-left: auto; line-height: 1.5; max-width: 420px; }

.bid-meta.card { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 16px; margin-bottom: 20px; padding: 20px 22px; }
.stacked-label { display: flex; flex-direction: column; font-size: 12px; color: var(--slate); gap: 5px; font-weight: 500; }
.bid-fields { display: flex; gap: 14px; flex-wrap: wrap; }
.bid-fields label { display: flex; flex-direction: column; font-size: 12px; color: var(--slate); gap: 5px; font-weight: 500; }
.bid-fields input { font-size: 13px; padding: 8px 10px; border: 1px solid var(--line); border-radius: var(--radius-sm); }
.bid-fields input:focus { outline: 2px solid var(--volt); outline-offset: 1px; }
.bid-notes-field { width: 100%; margin-top: 14px; }
.bid-notes-field textarea {
  width: 100%; min-height: 50px; font-size: 13px; font-family: var(--font-body);
  padding: 9px 11px; border: 1px solid var(--line); border-radius: var(--radius-sm); resize: vertical;
}

/* ---------- bid list (Bid Builder) ---------- */

.bid-list-card { margin-bottom: 20px; }
.bid-list-header { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 14px; }
.bid-list-header h3 { margin: 0; font-family: var(--font-display); font-size: 15px; }
.bid-list { display: flex; flex-direction: column; gap: 8px; max-height: 300px; overflow-y: auto; }
.bid-list-item {
  display: flex; align-items: center; justify-content: space-between; gap: 14px;
  width: 100%; text-align: left; padding: 12px 14px;
  border: 1px solid var(--line); border-radius: var(--radius-md); background: #fff;
  cursor: pointer; transition: border-color .15s, background .15s, box-shadow .15s;
}
.bid-list-item:hover { border-color: var(--slate-light); box-shadow: var(--shadow-sm); }
.bid-list-item.active { background: var(--volt-tint); border-color: var(--volt); cursor: default; }
.bid-list-item-main { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.bid-list-item-main strong { font-size: 14px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bid-list-item.active .bid-list-item-main strong { color: var(--volt-deep); }
.bid-list-item-meta { font-size: 12px; color: var(--slate); }
.bid-list-item-total { font-family: var(--font-display); font-weight: 700; font-size: 14px; flex-shrink: 0; }

.totals {
  display: flex; gap: 32px; margin-top: 18px; padding: 18px 22px;
  background: var(--graphite); color: #fff; border-radius: var(--radius-md);
  font-size: 13px; box-shadow: var(--shadow-md);
}
.totals span { display: flex; flex-direction: column; gap: 3px; color: #a7b0aa; }
.totals strong { font-size: 18px; font-family: var(--font-display); color: #fff; }
.totals span:last-child strong { color: var(--volt-bright); }

.stats-bar { display: flex; gap: 24px; margin-bottom: 14px; font-size: 12.5px; color: var(--slate); }
.stats-bar strong { color: var(--ink); font-weight: 600; }

.grid-btn { font-size: 12px; padding: 6px 11px; border-radius: var(--radius-sm); border: 1px solid var(--line); background: #fff; cursor: pointer; display: inline-flex; align-items: center; gap: 4px; transition: background .15s, border-color .15s, color .15s; }
.grid-btn:hover { background: var(--volt-tint); border-color: var(--volt); }

/* ---------- empty states ---------- */

.empty-state { text-align: center; padding: 56px 20px; color: var(--slate); }
.empty-state strong { display: block; font-size: 16px; color: var(--ink); margin-bottom: 6px; }
.empty-state p { margin: 0; font-size: 13px; max-width: 360px; margin-left: auto; margin-right: auto; line-height: 1.5; }

/* ---------- modals ---------- */

.modal-backdrop {
  position: fixed; inset: 0; background: rgba(15,18,15,0.6); backdrop-filter: blur(2px);
  display: flex; align-items: center; justify-content: center; z-index: 100;
  animation: fade-in .15s ease-out;
}
.modal-backdrop.hidden { display: none; }
.modal {
  background: #fff; border-radius: var(--radius-lg); padding: 30px; width: 560px; max-width: 92vw;
  max-height: 86vh; overflow-y: auto; box-shadow: var(--shadow-lg);
  animation: pop-in .18s ease-out;
}
@keyframes fade-in { from { opacity: 0; } to { opacity: 1; } }
@keyframes pop-in { from { opacity: 0; transform: translateY(8px) scale(.98); } to { opacity: 1; transform: none; } }

.modal h2 { margin-top: 0; font-family: var(--font-display); font-size: 19px; letter-spacing: -0.01em; }
.complexity-q { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--line); }
.complexity-q label { font-size: 13px; flex: 1; }
.complexity-q select { font-size: 13px; padding: 7px; border-radius: var(--radius-sm); border: 1px solid var(--line); min-width: 220px; }
.complexity-result-box { background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius-md); padding: 14px 16px; margin: 14px 0; }
.complexity-result-box.ai { background: var(--volt-tint); border-color: var(--volt); }
.complexity-result-box strong { display: flex; align-items: center; gap: 6px; }
.complexity-result-box pre { white-space: pre-wrap; font-family: var(--font-body); font-size: 13px; margin: 8px 0 0; color: var(--slate); }
#complexity-notes { width: 100%; min-height: 60px; margin-top: 10px; padding: 9px; border-radius: var(--radius-sm); border: 1px solid var(--line); font-family: var(--font-body); resize: vertical; }
.modal-actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 22px; }
#modal-settings label { display: flex; flex-direction: column; gap: 6px; font-size: 13px; margin: 14px 0; font-weight: 500; color: var(--slate); }
#modal-settings input, #modal-settings select { padding: 9px; border-radius: var(--radius-sm); border: 1px solid var(--line); font-weight: 400; color: var(--ink); }
#modal-settings input[type="color"] { padding: 3px; height: 38px; }

.branding-logo-row { display: flex; align-items: center; gap: 10px; margin: -4px 0 14px; }
.branding-logo-preview { max-width: 120px; max-height: 48px; border-radius: var(--radius-sm); border: 1px solid var(--line); object-fit: contain; background: #fff; }

.ai-status-badge { display: flex; align-items: flex-start; gap: 9px; padding: 13px 15px; border-radius: var(--radius-md); font-size: 13px; line-height: 1.55; }
.ai-status-badge.ready { background: var(--volt-tint); color: var(--volt-deep); border: 1px solid var(--volt); }
.ai-status-badge.not-ready { background: var(--paper); color: var(--slate); border: 1px solid var(--line); }
.ai-status-badge svg { margin-top: 2px; }

.settings-privacy { margin-top: 14px; padding-top: 14px; border-top: 1px solid var(--line); }
.settings-privacy .settings-help { margin: 8px 0 0 24px; }

.settings-advanced { margin-top: 18px; border-top: 1px solid var(--line); padding-top: 14px; }
.settings-advanced summary { cursor: pointer; font-size: 13px; color: var(--slate); }
.settings-help { font-size: 12px; color: var(--slate); margin: 10px 0; line-height: 1.5; }

/* ---------- welcome modal ---------- */

.welcome-modal { text-align: left; }
.welcome-mark {
  width: 46px; height: 46px; border-radius: var(--radius-md); background: var(--volt); color: var(--graphite);
  display: flex; align-items: center; justify-content: center; font-family: var(--font-display);
  font-weight: 700; font-size: 15px; margin-bottom: 16px;
}
.welcome-steps { padding-left: 20px; margin: 12px 0; font-size: 14px; line-height: 1.75; }
.welcome-note { font-size: 12px; color: var(--slate); background: var(--paper); border-radius: var(--radius-sm); padding: 11px 13px; }
.welcome-actions { justify-content: space-between; align-items: center; }

/* ---------- toasts ---------- */

#toast-container {
  position: fixed; bottom: 22px; right: 22px; z-index: 300;
  display: flex; flex-direction: column; gap: 8px; max-width: 340px;
}
.toast {
  display: flex; align-items: center; gap: 8px;
  background: var(--graphite); color: #fff; padding: 12px 15px; border-radius: var(--radius-sm);
  font-size: 13px; box-shadow: var(--shadow-lg);
  opacity: 0; transform: translateY(6px); transition: opacity .2s, transform .2s;
}
.toast.show { opacity: 1; transform: none; }
.toast-icon { color: var(--volt-bright); display: flex; }
.toast.toast-error { background: #3a1f1c; }
.toast.toast-error .toast-icon { color: #ff8a75; }

/* ---------- spinner ---------- */

.spinner {
  width: 12px; height: 12px; border-radius: 50%;
  border: 2px solid rgba(0,0,0,0.15); border-top-color: currentColor;
  animation: spin .7s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ---------- guided tour ---------- */

.tour-backdrop {
  position: fixed; inset: 0; background: rgba(15,18,15,0.55); z-index: 200; cursor: pointer;
}
.tour-backdrop.hidden { display: none; }
.tour-highlight {
  position: fixed; z-index: 201; border-radius: var(--radius-md);
  box-shadow: 0 0 0 4px var(--volt), 0 0 0 6000px rgba(15,18,15,0.55);
  pointer-events: none; transition: top .2s ease, left .2s ease, width .2s ease, height .2s ease;
}
.tour-highlight.hidden { display: none; }
.tour-tooltip {
  position: fixed; z-index: 202; background: #fff; border-radius: var(--radius-lg); padding: 20px 22px;
  width: 320px; max-width: calc(100vw - 32px); box-shadow: var(--shadow-lg);
  transition: top .2s ease, left .2s ease;
}
.tour-tooltip.hidden { display: none; }
.tour-step-count { font-family: var(--font-display); font-size: 11px; color: var(--volt-deep); text-transform: uppercase; letter-spacing: .04em; margin-bottom: 6px; }
.tour-tooltip h3 { margin: 0 0 8px; font-size: 15px; }
.tour-tooltip p { margin: 0; font-size: 13px; color: var(--slate); line-height: 1.55; }
.tour-controls { display: flex; align-items: center; justify-content: space-between; margin-top: 16px; }
.tour-nav { display: flex; gap: 8px; }

/* ---------- item cards (Bid Builder) ---------- */

#bid-items-list { display: flex; flex-direction: column; gap: 10px; }
.item-card {
  display: flex; align-items: center; gap: 18px; padding: 16px 18px;
  transition: box-shadow .15s, border-color .15s;
}
.item-card:hover { box-shadow: var(--shadow-md); border-color: var(--slate-light); }
.item-card-clin {
  flex-shrink: 0; width: 28px; height: 28px; border-radius: 50%;
  background: var(--paper); border: 1px solid var(--line); color: var(--slate);
  display: flex; align-items: center; justify-content: center; font-size: 12px; font-weight: 700;
  font-family: var(--font-display);
}
.item-card-main { flex: 1; min-width: 0; }
.item-card-title { font-weight: 600; font-size: 14.5px; }
.item-card-meta { font-size: 12px; color: var(--slate); margin-top: 3px; }
.item-card-numbers { display: flex; gap: 28px; }
.item-card-numbers > div { display: flex; flex-direction: column; align-items: flex-end; font-size: 11.5px; color: var(--slate); gap: 2px; }
.item-card-numbers strong { font-size: 16px; color: var(--ink); font-family: var(--font-display); }
.item-card-reorder { display: flex; flex-direction: column; gap: 3px; flex-shrink: 0; }
.icon-btn {
  padding: 4px; border-radius: var(--radius-sm); border: 1px solid var(--line); background: #fff;
  cursor: pointer; display: flex; align-items: center; justify-content: center; color: var(--slate);
  transition: border-color .15s, color .15s;
}
.icon-btn:hover { border-color: var(--slate-light); color: var(--ink); }
.icon-btn:disabled { opacity: 0.3; cursor: not-allowed; }
.item-card-actions { display: flex; gap: 8px; flex-shrink: 0; }
.grid-btn.danger:hover { background: var(--danger-tint); border-color: var(--danger); color: var(--danger); }

/* ---------- input affixes ($, %, /hr) ---------- */

.input-affix { position: relative; display: flex; }
.input-affix input { width: 100%; }
.input-affix-prefix, .input-affix-suffix {
  position: absolute; top: 50%; transform: translateY(-50%);
  color: var(--slate); font-size: 13px; pointer-events: none;
}
.input-affix-prefix { left: 11px; }
.input-affix-suffix { right: 11px; }
.input-affix.prefix input { padding-left: 24px !important; }
.input-affix.suffix input { padding-right: 30px !important; }

/* ---------- item wizard ---------- */

.wizard-modal { width: 620px; }
.wizard-header { margin-bottom: 18px; }
.wizard-header h2 { margin: 0 0 14px; }

.wizard-progress { display: flex; align-items: center; gap: 6px; }
.wizard-progress-step { display: flex; align-items: center; gap: 6px; flex: 1; }
.wizard-progress-dot {
  width: 24px; height: 24px; border-radius: 50%; flex-shrink: 0;
  background: var(--paper); border: 1px solid var(--line); color: var(--slate);
  display: flex; align-items: center; justify-content: center;
  font-size: 11px; font-weight: 700; font-family: var(--font-display);
  transition: background .15s, border-color .15s, color .15s;
}
.wizard-progress-dot.done { background: var(--volt); border-color: var(--volt); color: var(--graphite); }
.wizard-progress-dot.active { border-color: var(--volt); color: var(--volt-deep); background: #fff; box-shadow: 0 0 0 3px var(--volt-tint); }
.wizard-progress-line { flex: 1; height: 2px; background: var(--line); }
.wizard-progress-line.done { background: var(--volt); }
.wizard-step-title { font-size: 17px; font-weight: 600; margin: 16px 0 18px; letter-spacing: -0.01em; }
.wizard-step .stacked-label { margin-bottom: 16px; }
.wizard-step .stacked-label input { font-size: 14px; padding: 10px 12px; border: 1px solid var(--line); border-radius: var(--radius-sm); width: 100%; }
.field-error { color: var(--danger); font-size: 12px; margin-top: 5px; }
input.input-error, .input-affix.input-error input { border-color: var(--danger) !important; }
.wizard-hint { font-size: 12.5px; color: var(--slate); margin: 0 0 12px; line-height: 1.5; }
/* ---------- login modal ---------- */

.login-modal { position: relative; width: 380px; padding: 36px 32px 30px; text-align: center; }
.login-modal-close {
  position: absolute; top: 14px; right: 14px; width: 30px; height: 30px;
  border: none; background: transparent; border-radius: 50%; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  transition: background .15s;
}
.login-modal-close::before, .login-modal-close::after {
  content: ""; position: absolute; width: 14px; height: 2px; background: var(--slate); border-radius: 1px;
}
.login-modal-close::before { transform: rotate(45deg); }
.login-modal-close::after { transform: rotate(-45deg); }
.login-modal-close:hover { background: var(--paper); }
.login-modal-close:hover::before, .login-modal-close:hover::after { background: var(--ink); }
.login-modal-brand { margin-bottom: 16px; }
.login-modal-brand .brand-mark { font-size: 15px; padding: 6px 12px; }
.login-modal h2 { text-align: center; margin: 0 0 24px; }
.login-modal label {
  display: flex; flex-direction: column; gap: 6px; text-align: left;
  font-size: 12.5px; font-weight: 500; color: var(--slate); margin-bottom: 14px;
}
.login-modal input {
  width: 100%; font-size: 14px; padding: 10px 12px;
  border: 1px solid var(--line); border-radius: var(--radius-sm);
}
.login-modal input:focus { outline: 2px solid var(--volt); outline-offset: 1px; }
.login-submit-btn { width: 100%; justify-content: center; margin-top: 4px; }
.login-toggle { font-size: 12.5px; color: var(--slate); text-align: center; margin: 16px 0 0; }
.login-toggle a { color: var(--volt-deep); }
.login-recovery-note {
  font-size: 11.5px; color: var(--slate-light); text-align: center; line-height: 1.5;
  margin: 20px 0 0; padding-top: 16px; border-top: 1px solid var(--line);
}
.wizard-suggestion-card {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  background: var(--volt-tint); border: 1px solid var(--volt); border-radius: var(--radius-md); padding: 13px 15px;
  font-size: 13px; margin-bottom: 14px;
}
.wizard-estimate-help { margin: -4px 0 16px; font-size: 13px; }
.wizard-estimate-help summary { cursor: pointer; color: var(--slate); padding: 4px 0; }
.wizard-buildup-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 11px; margin-top: 11px; }
.wizard-buildup-grid label { display: flex; flex-direction: column; font-size: 12px; color: var(--slate); gap: 5px; }
.wizard-buildup-span2 { grid-column: 1 / -1; }
.wizard-buildup-grid input { font-size: 13px; padding: 8px 10px; border: 1px solid var(--line); border-radius: var(--radius-sm); }
.wizard-buildup-total { font-size: 13px; font-weight: 600; margin: 11px 0; }
.wizard-lc-block { background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius-md); padding: 13px 15px; margin-bottom: 18px; }
.wizard-toggle { display: flex; align-items: flex-start; gap: 8px; font-size: 13px; cursor: pointer; line-height: 1.5; }
.wizard-toggle input { margin-top: 2px; }
#wizard-lc-slope { margin-top: 8px; font-size: 13px; padding: 7px; border-radius: var(--radius-sm); border: 1px solid var(--line); }
#wizard-ai-btn { margin-top: 12px; }
.wizard-receipt { background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius-md); padding: 6px 18px; }
.wizard-receipt-row { display: flex; justify-content: space-between; padding: 10px 0; border-bottom: 1px solid var(--line); font-size: 13px; }
.wizard-receipt-row:last-child { border-bottom: none; }
.wizard-receipt-row.emphasize { font-weight: 700; font-size: 16px; }
.wizard-margin-field { margin-top: 16px; max-width: 180px; }
.wizard-margin-field input { font-size: 13px; padding: 8px 10px; border: 1px solid var(--line); border-radius: var(--radius-sm); width: 100%; }
.wizard-nav { display: flex; align-items: center; justify-content: space-between; }

/* ---------- tabulator ---------- */

.tabulator { font-size: 13px; border: none; border-radius: var(--radius-md); overflow: hidden; }
.tabulator-row.tabulator-selected { background: var(--volt-tint) !important; }
.tabulator-row:hover { background: rgba(20,23,26,0.025); }
.tabulator-col { background: var(--paper) !important; }

/* ---------- responsive ---------- */

@media (max-width: 720px) {
  .topbar { flex-wrap: wrap; gap: 10px; }
  /* Collapse to a narrow icon rail. #btn-settings/#btn-help inject icon+text
     as one innerHTML blob (see js/app.js) with no wrapping element around
     the text, so their labels are stacked under the icon and shrunk rather
     than hidden — hiding would need a markup change, this doesn't. */
  .sidebar { width: 64px; overflow: hidden; }
  .sidebar-brand { overflow: hidden; }
  .nav-item-label, .brand-name { display: none; }
  .nav-item { justify-content: center; }
  .sidebar-footer button {
    flex-direction: column; gap: 2px; padding: 8px 2px;
    font-size: 9px; line-height: 1.2; text-align: center;
  }
  main { padding: 18px 14px; }
  .tour-tooltip { width: calc(100vw - 32px); }
  .item-card { flex-wrap: wrap; }
  .item-card-numbers { flex: 1; justify-content: space-between; }
  .wizard-buildup-grid { grid-template-columns: 1fr; }
}

/* ---------- SOW import ---------- */

.sow-modal { width: 640px; }
.sow-modal textarea { width: 100%; min-height: 160px; font-size: 13px; font-family: var(--font-body); padding: 9px 11px; border: 1px solid var(--line); border-radius: var(--radius-sm); resize: vertical; margin-top: 11px; }
.wizard-subhead-sow { font-size: 12.5px; margin: 18px 0 9px; color: var(--slate); text-transform: uppercase; letter-spacing: .04em; font-weight: 600; }
.sow-review-row { display: grid; grid-template-columns: 20px 1.4fr 1fr 70px; gap: 8px; align-items: center; padding: 7px 0; border-bottom: 1px solid var(--line); }
.sow-review-row:has(.sow-req-check) { grid-template-columns: 20px 100px 1fr; }
.sow-review-row input[type="text"], .sow-review-row input[type="number"] { font-size: 13px; padding: 7px 8px; border: 1px solid var(--line); border-radius: var(--radius-sm); width: 100%; }

/* ---------- proposal tab ---------- */

.proposal-section { padding: 20px 22px; margin-bottom: 16px; }
.proposal-section h3 { margin: 0 0 12px; font-size: 15.5px; letter-spacing: -0.01em; }
.proposal-section textarea {
  width: 100%; min-height: 80px; font-size: 13px; font-family: var(--font-body);
  padding: 9px 11px; border: 1px solid var(--line); border-radius: var(--radius-sm); resize: vertical; margin-bottom: 11px;
}

.data-table { width: 100%; border-collapse: collapse; margin-bottom: 12px; font-size: 13px; }
.data-table th { text-align: left; font-size: 11px; text-transform: uppercase; letter-spacing: .03em; color: var(--slate); padding: 7px 8px; border-bottom: 1px solid var(--line); font-weight: 600; }
.data-table td { padding: 5px 6px; border-bottom: 1px solid var(--line); vertical-align: top; }
.data-table input[type="text"], .data-table input[type="date"], .data-table select {
  width: 100%; font-size: 13px; padding: 7px 8px; border: 1px solid var(--line); border-radius: var(--radius-sm);
}
.data-table .col-actions { width: 36px; text-align: center; }
.data-table .row-delete { background: none; border: none; color: var(--slate); cursor: pointer; padding: 4px; display: flex; }
.data-table .row-delete:hover { color: var(--danger); }
.data-table-empty { color: var(--slate); font-size: 13px; padding: 12px 4px; }

.data-table tr.row-flagged td:first-child { box-shadow: inset 3px 0 0 var(--danger); }
.data-table tr.row-flagged { background: var(--danger-tint); }

.flag-banner { display: flex; align-items: center; gap: 8px; padding: 10px 13px; border-radius: var(--radius-sm); font-size: 13px; margin-bottom: 12px; }
.flag-banner.warn { background: var(--danger-tint); color: var(--danger); }
.flag-banner.ok { background: var(--volt-tint); color: var(--volt-deep); }

#actuals-group-toggle.active { background: var(--volt-tint); border-color: var(--volt); color: var(--volt-deep); }

/* ---------- print proposal ---------- */

.print-only { display: none; }

.proposal-header { display: flex; justify-content: space-between; align-items: flex-start; border-bottom: 2px solid var(--brand-color, var(--ink)); padding-bottom: 14px; margin-bottom: 18px; }
.proposal-brand-block { display: flex; align-items: center; gap: 10px; }
.proposal-logo { max-height: 40px; max-width: 140px; object-fit: contain; }
.proposal-brand { font-family: var(--font-display); font-weight: 700; font-size: 18px; color: var(--brand-color, var(--ink)); }
.proposal-meta { text-align: right; font-size: 13px; line-height: 1.6; }
.proposal-meta .label { color: var(--slate); }
.proposal-notes { font-size: 13px; color: var(--slate); margin: 0 0 16px; white-space: pre-wrap; }
.proposal-section-title { font-family: var(--font-display); font-size: 13px; text-transform: uppercase; letter-spacing: .04em; border-bottom: 1px solid var(--line); padding-bottom: 6px; margin: 22px 0 12px; }
.proposal-boe-item { margin-bottom: 10px; font-size: 13px; }
.proposal-boe-item strong { display: block; margin-bottom: 2px; }
.proposal-boe-item p { margin: 0; color: var(--slate); }
.proposal-table { width: 100%; border-collapse: collapse; font-size: 13px; margin-bottom: 18px; }
.proposal-table th, .proposal-table td { border-bottom: 1px solid var(--line); padding: 8px 10px; text-align: left; }
.proposal-table th { text-transform: uppercase; font-size: 11px; letter-spacing: .03em; color: var(--slate); }
.proposal-table td.num, .proposal-table th.num { text-align: right; }
.proposal-totals { display: flex; justify-content: flex-end; }
.proposal-totals table { border-collapse: collapse; font-size: 13px; }
.proposal-totals td { padding: 5px 10px; }
.proposal-totals tr.grand td { font-weight: 700; font-size: 16px; border-top: 2px solid var(--brand-color, var(--ink)); padding-top: 10px; }
.proposal-footer { margin-top: 24px; padding-top: 10px; border-top: 1px solid var(--line); font-size: 11px; color: var(--slate); text-align: center; }

@media print {
  body * { visibility: hidden; }
  #print-proposal, #print-proposal * { visibility: visible; }
  #print-proposal.print-only { display: block; position: absolute; top: 0; left: 0; width: 100%; padding: 20px; }
}
