/* Escalation bill app - on top of the shared culvert/style.css */
.new-work { display: grid; grid-template-columns: minmax(260px, 1.4fr) minmax(220px, 1fr) auto; gap: 14px; align-items: end; }
.new-work input, .new-work select { padding: 7px 9px; border: 1px solid #c9d2dc; border-radius: 6px; font: inherit; background: #fff; }
.total-chip { background: #eef6ff; color: var(--accent); border-radius: 99px; padding: 5px 12px; font-size: 13px; }
.big-tabs { margin: 4px 0 12px; }
.big-tabs .tab { font-size: 13.5px; padding: 6px 14px; }
.field.wide2 { grid-column: span 2; }
.field .hint { font-size: 11.5px; color: var(--muted); }
.warn-line { background: #fff4e5; color: #8a5300; padding: 6px 10px; border-radius: 6px; margin-bottom: 6px; font-size: 12.8px; }
.formula { font-family: "Cambria Math", Cambria, "Times New Roman", serif; font-size: 16px; background: #f6f8fb;
  border-left: 3px solid var(--accent); padding: 8px 12px; margin: 4px 0 8px; }
.inline-tools { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin: 8px 0; font-size: 13px; }
.inline-tools .sep { flex: 1; }
.inline-tools select, .inline-tools input { padding: 5px 8px; border: 1px solid #c9d2dc; border-radius: 6px; font: inherit; }
.bill-tbl td, .comp-tbl td, .idx-tbl td { padding: 3px 4px; vertical-align: middle; font-size: 12.5px; }
.bill-tbl th, .comp-tbl th, .idx-tbl th { font-size: 12px; }
.bill-tbl input, .bill-tbl select, .comp-tbl input, .comp-tbl select, .idx-tbl input {
  padding: 4px 6px; border: 1px solid #c9d2dc; border-radius: 5px; font: inherit; font-size: 12.5px; background: #fff; }
.bill-tbl input[type=date] { width: 130px; }
.bill-tbl input.money { width: 120px; text-align: right; }
.bill-tbl input.short, .comp-tbl input.short { width: 76px; }
.bill-tbl input[type=text]:not(.short) { width: 140px; }
.bill-tbl tr.final td { background: #f3f8ff; }
.bill-tbl tfoot td, .stm tfoot td { background: #f3f6fa; border-top: 2px solid var(--accent); }
.comp-tbl input[type=text] { width: 200px; }
.comp-tbl input[type=number] { text-align: right; }
.comp-tbl select { max-width: 320px; }
.idx-tbl input { width: 96px; text-align: right; }
.idx-tbl { width: auto; min-width: 420px; }
.idx-tbl th.n { min-width: 150px; }
.idx-tbl tr.base td { background: #fff8db; }
.idx-tbl .badge { background: #e0b84a; color: #fff; margin-left: 6px; }
td.n, th.n { text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; }
.acts { white-space: nowrap; }
.acts button { border: 1px solid var(--line); background: #fff; border-radius: 5px; width: 26px; height: 26px; cursor: pointer; margin-left: 2px; }
.pane-actions { display: flex; gap: 8px; margin-top: 10px; }
h3.sub { font-size: 14.5px; margin: 18px 0 6px; color: var(--accent); }
.stm td { font-size: 12.8px; }
.bad { color: var(--bad); font-weight: 600; }
@media (max-width: 1000px) { .new-work { grid-template-columns: 1fr; } .field.wide2 { grid-column: auto; } }
.idx-tbl input.fromdb::placeholder { color: #6b7785; opacity: 1; }
.idx-tbl input.fromdb { background: #f4f7fb; }
.base-box .tbl td { padding: 3px 6px; font-size: 12.5px; }
.small-t td { font-size: 12px; }
/* index database */
.idb-head { display: flex; flex-wrap: wrap; gap: 14px; align-items: center; justify-content: space-between; }
.idb-pick { display: flex; gap: 8px; align-items: center; }
.idb-pick select { padding: 6px 9px; border: 1px solid #c9d2dc; border-radius: 6px; font: inherit; min-width: 300px; }
.idb-update { margin: 0; }
.idb-layout { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(280px, 0.6fr); gap: 16px; align-items: start; }
.idb-tbl td { font-size: 13px; padding: 5px 8px; }
.idb-tbl tr.manual td { background: #fff8db; }
.warnc { color: #8a5300; }
.idb-tbl tr.linked td { background: #eef4ff; }
details.card > summary { cursor: pointer; }
.custom-form { margin-top: 10px; }
textarea { width: 100%; font: 13px/1.4 ui-monospace, Consolas, monospace; padding: 6px 8px; border: 1px solid #c9d2dd; border-radius: 6px; box-sizing: border-box; }
textarea.full { margin: 4px 0 8px; }
.inline-del { display: inline; margin-left: 6px; }
.inline-del button { border: 0; background: none; color: #a33; cursor: pointer; padding: 0 2px; }
.btn-danger { color: #a33; border-color: #e3b8b8; margin-top: 10px; }
.reduced { color: #8a5300; }
.formulas { background: #f6f8fb; border: 1px solid #dde4ee; border-radius: 6px; padding: 8px 12px; margin: 10px 0; font-size: 13px; }
.formulas ol { margin: 4px 0 0 18px; padding: 0; }
.formulas li { margin: 2px 0; font-family: ui-monospace, Consolas, monospace; font-size: 12.5px; }
.stm tr.calc td { background: #fbfcfe; color: #3b4a5c; font: 12px/1.5 ui-monospace, Consolas, monospace; border-top: 0; padding-top: 2px; }
.calc-t { font-family: ui-monospace, Consolas, monospace; color: #3b4a5c; }
.linkc { color: #2a5a9e; }
@media (max-width: 1000px) { .idb-layout { grid-template-columns: 1fr; } }
.comp-tbl input.series-in { width: 420px; }
.idb-head .tabs { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin: 0; }
.idb-head .tabs .sep { width: 18px; }
.idb-head .tabs a.tab { text-decoration: none; color: var(--ink); }
.idb-head .tabs a.tab.active { color: #fff; }
.idb-pick input[type=search] { padding: 6px 9px; border: 1px solid #c9d2dc; border-radius: 6px; font: inherit; min-width: 260px; }
.idb-title { margin-top: 12px; }
.stm tr.qtot td { background: #f3f6fa; border-top: 1px solid var(--accent); }
.basis { background: #fff8db; border: 1px solid #ecd58a; border-radius: 8px; padding: 8px 12px; margin-bottom: 10px; font-size: 13px; display: flex; gap: 12px; align-items: center; flex-wrap: wrap; }
.basis.ok { background: #eef6ff; border-color: #c6dcf5; }
