/* Quote-to-Cash Engine — pack styles.
   Only what the engine primitives do not already cover. Every value here is an
   engine token, so light, dark and the green accent all follow along.
*/

/* ------------------------------------------------------------- shared --- */

.linkbtn {
  border: 0; background: none; padding: 0;
  font: inherit; font-weight: 600;
  color: var(--accent-ink);
  text-decoration: underline;
  text-underline-offset: 2px;
  cursor: pointer;
  text-align: left;
}
.linkbtn:hover { text-decoration-thickness: 2px; }

.input--slim { height: 32px; font-size: 13px; padding: 0 26px 0 9px; width: auto; min-width: 150px; max-width: 100%; }

.detail { display: flex; flex-direction: column; gap: 18px; }
.detail__top { display: flex; align-items: flex-start; gap: 12px; }
.detail__v { font-size: 27px; font-weight: 600; letter-spacing: -0.03em; line-height: 1.1; }
.detail__vs { font-size: 12px; color: var(--ink-mute); margin-top: 3px; }
.detail__top .badge { margin-left: auto; }
.detail__bar { display: flex; flex-wrap: wrap; gap: 6px; }
.detail__sec { display: flex; flex-direction: column; min-width: 0; }
.detail__sec .sec-head { margin-bottom: 8px; }
.detail__chips { gap: 6px; }

.kvs { display: flex; flex-direction: column; }
.kvs .kv { border-bottom: 1px solid var(--line-2); }
.kvs .kv:last-child { border-bottom: 0; }
.kvs--tight .kv { padding-top: 5px; padding-bottom: 5px; }

.notecard {
  background: var(--surface-2);
  border: 1px solid var(--line-2);
  border-radius: var(--radius-sm);
  padding: 10px 12px;
  font-size: 12.5px;
  color: var(--ink-2);
  line-height: 1.55;
}
.notecard--access { display: flex; gap: 8px; align-items: flex-start; }
.notecard--access .ic { flex: 0 0 auto; margin-top: 2px; color: var(--ink-mute); }

.gstnote { margin-top: 8px; font: 500 11px var(--mono); color: var(--ink-mute); }

.lineswrap { border: 1px solid var(--line); border-radius: var(--radius); overflow: auto; min-width: 0; max-width: 100%; position: relative; }
.lines { width: 100%; border-collapse: collapse; font-size: 12.5px; }
.lines th {
  text-align: left;
  padding: 8px 10px;
  font: 600 10.5px var(--sans);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--ink-mute);
  background: var(--surface-2);
  border-bottom: 1px solid var(--line);
  white-space: nowrap;
}
.lines th.ta-right { text-align: right; }
.lines td { padding: 8px 10px; border-bottom: 1px solid var(--line-2); color: var(--ink-2); vertical-align: top; }
.lines tbody tr:last-child td { border-bottom: 1px solid var(--line); }
.lines tfoot td { padding: 6px 10px; border-bottom: 0; color: var(--ink-mute); font-size: 12px; }
.lines tfoot .lines__tot td { padding-top: 8px; padding-bottom: 10px; color: var(--ink); font-weight: 700; border-top: 1px solid var(--line); }

.minilist { display: flex; flex-direction: column; border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.minilist__i, .minilist__plain {
  display: flex; align-items: center; gap: 9px;
  width: 100%; padding: 8px 11px;
  border: 0; border-bottom: 1px solid var(--line-2);
  background: none; text-align: left; font: inherit;
}
.minilist__i { cursor: pointer; }
.minilist li:last-child .minilist__i, .minilist li:last-child .minilist__plain { border-bottom: 0; }
.minilist__i:hover { background: var(--surface-2); }
.minilist__t { flex: 1; min-width: 0; font-size: 12.5px; font-weight: 600; color: var(--ink); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.minilist__d { font-size: 11px; color: var(--ink-mute); white-space: nowrap; }
.minilist__v { font-size: 12px; font-weight: 600; color: var(--ink); white-space: nowrap; min-width: 62px; text-align: right; }

.custhead { display: flex; align-items: center; gap: 14px; }
.custhead__n { font: 700 18px var(--display); letter-spacing: -0.015em; }
.custhead__s { font-size: 12.5px; color: var(--ink-mute); margin-top: 2px; }

.crewrows { display: flex; flex-direction: column; }
.crewrows__i { display: flex; align-items: center; gap: 10px; padding: 9px 16px; border-bottom: 1px solid var(--line-2); }
.crewrows li:last-child .crewrows__i, .crewrows__i:last-child { border-bottom: 0; }
.crewrows__n2 { font-size: 12.5px; font-weight: 600; color: var(--ink); flex: 0 0 132px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.crewrows__n2--wide { flex: 0 0 176px; }
.crewrows__n { font-size: 11px; color: var(--ink-mute); white-space: nowrap; }
.crewrows__v { font-size: 12.5px; font-weight: 600; white-space: nowrap; min-width: 68px; text-align: right; }

.ageing { display: flex; flex-direction: column; gap: 9px; }
.ageing__r { display: grid; grid-template-columns: 108px minmax(0, 1fr) 84px 56px; align-items: center; gap: 12px; }
.ageing__l { font-size: 12px; color: var(--ink-2); }
.ageing__v { font-size: 12.5px; font-weight: 600; text-align: right; }
.ageing__n { font-size: 11.5px; color: var(--ink-mute); text-align: right; }

.legend { display: flex; flex-wrap: wrap; gap: 14px; margin-bottom: 6px; }
.legend__i { display: inline-flex; align-items: center; gap: 6px; font-size: 11.5px; color: var(--ink-2); }
.legend__i i { width: 10px; height: 10px; border-radius: 3px; display: inline-block; }

.explain__l { margin: 0; padding-left: 20px; list-style: decimal outside; font-size: 12.5px; color: var(--ink-2); line-height: 1.55; }
.explain__l li { margin-bottom: 8px; padding-left: 2px; }
.explain__l li:last-child { margin-bottom: 0; }
.explain__l li::marker { color: var(--accent-ink); font-weight: 700; }
.explain__n { margin-top: 10px; font-size: 11.5px; color: var(--ink-mute); line-height: 1.5; }

/* ---------------------------------------------------------- row lists --- */

.rows { display: flex; flex-direction: column; }
.rows__i {
  display: flex; align-items: center; gap: 11px;
  width: 100%; padding: 10px 16px;
  border: 0; border-bottom: 1px solid var(--line-2);
  background: none; text-align: left; font: inherit; cursor: pointer;
}
.rows__i--static { cursor: default; }
.rows li:last-child .rows__i { border-bottom: 0; }
.rows__i:not(.rows__i--static):hover { background: var(--surface-2); }
.rows__i.is-on { background: var(--accent-soft); }
.rows--tight .rows__i { padding: 8px 14px; }
.rows__txt { flex: 1; min-width: 0; }
.rows__t { display: block; font-size: 13px; font-weight: 600; color: var(--ink); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rows__s { display: block; font-size: 11.5px; color: var(--ink-mute); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rows__meta { display: flex; align-items: center; gap: 5px; flex-wrap: wrap; justify-content: flex-end; }
.rows__v { font-size: 12.5px; font-weight: 600; white-space: nowrap; min-width: 66px; text-align: right; }
.rows__go { color: var(--ink-mute); flex: 0 0 auto; }
.rows__ic {
  flex: 0 0 auto; display: grid; place-items: center;
  width: 27px; height: 27px; border-radius: 7px;
  background: var(--surface-2); color: var(--ink-mute);
}
.rows__ic.is-ok { background: var(--ok-soft); color: var(--ok); }
.rows__ic.is-warn { background: var(--warn-soft); color: var(--warn); }

.filterbar { display: flex; gap: 6px; overflow-x: auto; padding-bottom: 2px; scrollbar-width: none; }
.filterbar::-webkit-scrollbar { display: none; }
.filterbar .btn { flex: 0 0 auto; }

.syncstrip { display: flex; align-items: center; gap: 10px; }
.syncstrip__d { display: grid; place-items: center; width: 30px; height: 30px; border-radius: 8px; background: var(--surface-2); color: var(--ink-mute); flex: 0 0 auto; }
.syncstrip__d.is-ok { background: var(--ok-soft); color: var(--ok); }
.syncstrip__d.is-warn { background: var(--warn-soft); color: var(--warn); }
.syncstrip__t { font-size: 13px; font-weight: 600; color: var(--ink); }
.syncstrip__s { font-size: 11.5px; color: var(--ink-mute); margin-top: 1px; }

/* ------------------------------------------------------ the quote pane -- */

.qwrap { display: grid; grid-template-columns: 320px minmax(0, 1fr); gap: 16px; align-items: start; }

.qlist {
  display: flex; flex-direction: column;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  max-height: calc(100vh - 150px);
}
.qlist .tabs { padding: 8px 8px 4px; flex-wrap: wrap; gap: 4px; overflow: visible; }
.qlist .tabs__t { padding: 4px 8px; font-size: 11.5px; }
.qlist__search { display: flex; align-items: center; gap: 7px; padding: 8px 12px; border-bottom: 1px solid var(--line-2); color: var(--ink-mute); }
.qlist__searchi { flex: 1; min-width: 0; border: 0; background: none; font: inherit; font-size: 12.5px; color: var(--ink); }
.qlist__searchi:focus { outline: none; }
.qlist__l { display: flex; flex-direction: column; overflow-y: auto; }
.qlist__i {
  display: block; width: 100%; text-align: left;
  padding: 10px 13px;
  border: 0; border-bottom: 1px solid var(--line-2); border-left: 3px solid transparent;
  background: none; font: inherit; cursor: pointer;
}
.qlist__i:hover { background: var(--surface-2); }
.qlist__i.is-on { background: var(--accent-soft); border-left-color: var(--accent); }
.qlist__h { display: flex; align-items: baseline; gap: 8px; }
.qlist__n { flex: 1; min-width: 0; font-size: 12.5px; font-weight: 700; color: var(--ink); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.qlist__v { font-size: 12px; font-weight: 600; color: var(--ink-2); white-space: nowrap; }
.qlist__t { font-size: 11.5px; color: var(--ink-2); margin-top: 2px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.qlist__m { display: flex; align-items: center; gap: 6px; margin-top: 5px; flex-wrap: wrap; }
.qlist__id { font-size: 10.5px; color: var(--ink-mute); }
.qlist__a { font-size: 10.5px; color: var(--ink-mute); }

.qdetail {
  display: flex; flex-direction: column; gap: 16px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 18px;
  min-width: 0;
}
.qdetail__head { display: flex; align-items: flex-start; gap: 12px; }
.qdetail__t { font: 700 18px var(--display); letter-spacing: -0.02em; line-height: 1.25; }
.qdetail__s { font-size: 12px; color: var(--ink-mute); margin-top: 4px; display: flex; flex-wrap: wrap; gap: 2px; align-items: baseline; }

.qmeta {
  display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1px;
  background: var(--line-2);
  border: 1px solid var(--line-2);
  border-radius: var(--radius-sm);
  overflow: hidden;
}
.qmeta__c { background: var(--surface); padding: 8px 11px; min-width: 0; }
.qmeta__l { display: block; font: 600 10px var(--sans); letter-spacing: 0.06em; text-transform: uppercase; color: var(--ink-mute); }
.qmeta__v { display: block; font-size: 12.5px; color: var(--ink); margin-top: 3px; overflow-wrap: anywhere; }

.qactions { display: flex; flex-wrap: wrap; gap: 6px; }

.qbrief {
  margin: 0; padding: 12px 14px;
  border: 1px solid var(--accent-soft-2);
  background: var(--accent-soft);
  border-radius: var(--radius-sm);
}
.qbrief p { font-size: 13.5px; color: var(--ink); line-height: 1.5; }
.qbrief__f { margin-top: 6px; font-size: 11px; color: var(--ink-mute); }

.qdone { display: flex; gap: 10px; align-items: flex-start; padding: 11px 13px; border-radius: var(--radius-sm); border: 1px solid var(--line); }
.qdone.is-ok { background: var(--ok-soft); border-color: transparent; color: var(--ok); }
.qdone.is-bad { background: var(--bad-soft); border-color: transparent; color: var(--bad); }
.qdone.is-warn { background: var(--warn-soft); border-color: transparent; color: var(--warn); }
.qdone__t { font-size: 13px; font-weight: 700; color: var(--ink); }
.qdone__s { font-size: 12px; color: var(--ink-2); margin-top: 2px; line-height: 1.5; }

/* the editor itself */
.qeditor { border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; min-width: 0; }
.qeditor.is-locked .qlines__t input { pointer-events: none; }
.qlines { min-width: 0; }
/* positioned so a visually hidden label inside cannot escape the clip and
   stretch the page on a phone */
.qlines__scroll { overflow-x: auto; max-width: 100%; position: relative; }
.qlines__t { width: 100%; border-collapse: collapse; font-size: 12.5px; min-width: 560px; }
.qlines__t th {
  text-align: left; padding: 8px 10px;
  font: 600 10.5px var(--sans); letter-spacing: 0.06em; text-transform: uppercase;
  color: var(--ink-mute); background: var(--surface-2);
  border-bottom: 1px solid var(--line); white-space: nowrap;
}
.qlines__t th.ta-right { text-align: right; }
.qlines__t td { padding: 5px 8px; border-bottom: 1px solid var(--line-2); vertical-align: middle; color: var(--ink-2); }
.qlines__t tbody tr:last-child td { border-bottom: 0; }
.qlines__t tbody tr:hover { background: var(--surface-2); }
.qlines__desc { min-width: 240px; }
.qlines__unit { font-size: 11.5px; color: var(--ink-mute); white-space: nowrap; }
.qlines__amt { font-weight: 600; color: var(--ink); white-space: nowrap; }
.qlines__none { padding: 22px 12px; text-align: center; color: var(--ink-mute); font-size: 12.5px; }

.lk {
  display: inline-block; margin-right: 7px;
  padding: 1px 6px; border-radius: 4px;
  font: 600 9.5px var(--sans); letter-spacing: 0.05em; text-transform: uppercase;
  background: var(--surface-3); color: var(--ink-mute);
  vertical-align: 1px;
}
.lk--labour { background: var(--info-soft); color: var(--info); }
.lk--plant { background: var(--warn-soft); color: var(--warn); }
.lk--sub { background: var(--surface-3); color: var(--ink-2); }
.lk--adjustment { background: var(--bad-soft); color: var(--bad); }

.qin {
  width: 100%; min-width: 0;
  border: 1px solid transparent; border-radius: var(--radius-sm);
  background: none; font: inherit; font-size: 12.5px; color: var(--ink);
  padding: 4px 6px;
}
.qin:hover { border-color: var(--line); }
.qin:focus { outline: none; border-color: var(--accent); background: var(--surface); box-shadow: 0 0 0 3px hsl(var(--accent-h) var(--accent-s) var(--accent-l) / 0.16); }
.qin--desc { min-width: 180px; }
.qin--num { width: 92px; text-align: right; }
.qin__ro { font-size: 12.5px; color: var(--ink-2); }
.qeditor.is-locked .qin { border-color: transparent; background: none; }

.qtot { display: flex; flex-direction: column; gap: 3px; margin-top: 12px; margin-left: auto; width: min(340px, 100%); }
.qtot__r { display: flex; justify-content: space-between; gap: 16px; font-size: 12.5px; color: var(--ink-2); padding: 2px 0; }
.qtot__r--big { border-top: 1px solid var(--line); margin-top: 5px; padding-top: 8px; font-size: 15px; font-weight: 700; color: var(--ink); }
.qtot__split { display: flex; gap: 10px; margin-top: 10px; padding-top: 9px; border-top: 1px dashed var(--line); }
.qtot__m { flex: 1; min-width: 0; }
.qtot__ml { display: block; font: 600 9.5px var(--sans); letter-spacing: 0.06em; text-transform: uppercase; color: var(--ink-mute); }
.qtot__mv { display: block; font-size: 13px; font-weight: 600; color: var(--ink); margin-top: 2px; }
.qtot__dep { display: flex; gap: 7px; align-items: flex-start; margin-top: 10px; font-size: 11.5px; color: var(--ink-mute); line-height: 1.45; }
.qtot__dep .ic { flex: 0 0 auto; margin-top: 1px; }

.qterms { display: flex; flex-wrap: wrap; gap: 14px; }
.qterm { display: flex; flex-direction: column; gap: 4px; min-width: 168px; }
.qterm__l { font: 600 11px var(--sans); color: var(--ink-2); }
.qterm__h { font-size: 10.5px; color: var(--ink-mute); }

/* follow ups */
.nudges { display: flex; flex-direction: column; border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.nudges__i { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-bottom: 1px solid var(--line-2); }
.nudges li:last-child .nudges__i, .nudges__i:last-child { border-bottom: 0; }
.nudges__ic { display: grid; place-items: center; width: 26px; height: 26px; border-radius: 7px; background: var(--surface-2); color: var(--ink-mute); flex: 0 0 auto; }
.nudges__i.is-done .nudges__ic { background: var(--ok-soft); color: var(--ok); }
.nudges__i.is-due .nudges__ic { background: var(--warn-soft); color: var(--warn); }
.nudges__t { font-size: 12.5px; font-weight: 600; color: var(--ink); }
.nudges__s { font-size: 11.5px; color: var(--ink-mute); margin-top: 1px; }

/* the email log */
.maillog { display: flex; flex-direction: column; gap: 8px; }
.maillog__i { border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 9px 11px; background: var(--surface-2); }
.maillog__h { display: flex; align-items: center; gap: 7px; color: var(--ink-mute); }
.maillog__su { flex: 1; min-width: 0; font-size: 12.5px; font-weight: 600; color: var(--ink); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.maillog__m { font-size: 10.5px; color: var(--ink-mute); margin-top: 4px; overflow-wrap: anywhere; }
.maillog__l { font-size: 10.5px; color: var(--accent-ink); margin-top: 2px; overflow-wrap: anywhere; }

/* -------------------------------------------------- the client's screen -- */

.grid--approve { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 16px; align-items: start; }

.cframe {
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  overflow: hidden;
  background: var(--surface-2);
  box-shadow: var(--shadow-2);
  min-width: 0;
}
.cframe__bar {
  display: flex; align-items: center; gap: 10px;
  padding: 8px 12px;
  background: var(--surface-3);
  border-bottom: 1px solid var(--line);
}
.cframe__dots { display: inline-flex; gap: 5px; }
.cframe__dots i { width: 9px; height: 9px; border-radius: 50%; background: var(--line); display: block; }
.cframe__url {
  flex: 1; min-width: 0;
  display: inline-flex; align-items: center; gap: 6px;
  padding: 3px 10px; border-radius: 999px;
  background: var(--surface); border: 1px solid var(--line);
  font-size: 11px; color: var(--ink-2);
  overflow: hidden; white-space: nowrap; text-overflow: ellipsis;
}
.cframe__url .ic { color: var(--ok); flex: 0 0 auto; }
.cframe__tag { font: 600 10px var(--sans); letter-spacing: 0.06em; text-transform: uppercase; color: var(--ink-mute); white-space: nowrap; }
.cframe__page { background: var(--surface); padding: 22px; display: flex; flex-direction: column; gap: 18px; min-width: 0; }

.cdoc__head { display: flex; align-items: flex-start; gap: 12px; padding-bottom: 14px; border-bottom: 2px solid var(--accent); }
.cdoc__mark { color: var(--accent); display: inline-flex; }
.cdoc__biz { font: 700 15px var(--display); letter-spacing: -0.015em; color: var(--ink); }
.cdoc__meta { font-size: 11px; color: var(--ink-mute); margin-top: 2px; }
.cdoc__ref { text-align: right; }
.cdoc__refn { font-size: 13px; font-weight: 700; color: var(--ink); }
.cdoc__refd { font-size: 11px; color: var(--ink-mute); margin-top: 2px; }

.cdoc__h { font: 700 21px var(--display); letter-spacing: -0.025em; line-height: 1.2; color: var(--ink); }
.cdoc__sub { font-size: 12.5px; color: var(--ink-mute); margin-top: 4px; }
.cdoc__brief { font-size: 13px; color: var(--ink-2); line-height: 1.6; font-style: normal; }

.cdoc__lines { border: 1px solid var(--line); border-radius: var(--radius); overflow-x: auto; min-width: 0; max-width: 100%; position: relative; }
.cdoc__t { width: 100%; border-collapse: collapse; font-size: 12.5px; min-width: 420px; }
.cdoc__t th {
  text-align: left; padding: 9px 12px;
  font: 600 10.5px var(--sans); letter-spacing: 0.06em; text-transform: uppercase;
  color: var(--ink-mute); background: var(--surface-2); border-bottom: 1px solid var(--line);
}
.cdoc__t th.ta-right { text-align: right; }
.cdoc__t td { padding: 9px 12px; border-bottom: 1px solid var(--line-2); color: var(--ink-2); }
.cdoc__t tfoot td { border-bottom: 0; padding: 5px 12px; font-size: 12px; color: var(--ink-mute); }
.cdoc__t tfoot tr:first-child td { padding-top: 10px; border-top: 1px solid var(--line); }
.cdoc__tot td { padding-top: 8px !important; padding-bottom: 12px !important; font-size: 15px; font-weight: 700; color: var(--ink); }

.cdoc__terms { display: flex; flex-direction: column; }
.cdoc__terms .kv { border-bottom: 1px solid var(--line-2); }
.cdoc__terms .kv:last-child { border-bottom: 0; }

.cdoc__sign { border: 1px solid var(--accent); border-radius: var(--radius); padding: 16px; background: var(--accent-soft); }
.cdoc__sh { font: 700 15px var(--display); letter-spacing: -0.015em; color: var(--ink); }
.cdoc__sp { font-size: 12.5px; color: var(--ink-2); margin-top: 4px; line-height: 1.55; }
.cdoc__grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 14px; margin: 14px 0 12px; align-items: end; }
.cdoc__sign .field { display: flex; flex-direction: column; gap: 5px; margin-bottom: 12px; }
.cdoc__sign .field__l { font: 600 11px var(--sans); color: var(--ink-2); }
.cdoc__alt { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; justify-content: center; }
.cdoc__foot { font-size: 10.5px; color: var(--ink-mute); text-align: center; padding-top: 6px; border-top: 1px solid var(--line-2); overflow-wrap: anywhere; }

.signpad { border: 1px dashed var(--accent); border-radius: var(--radius-sm); padding: 8px 12px; background: var(--surface); }
.signpad__l { font: 600 9.5px var(--sans); letter-spacing: 0.06em; text-transform: uppercase; color: var(--ink-mute); }
.signpad__v { font: 400 22px "Bricolage Grotesque", cursive, var(--display); color: var(--ink); line-height: 1.5; min-height: 34px; overflow-wrap: anywhere; }
.signpad__v.is-empty { color: var(--ink-mute); font-size: 13px; font-style: normal; }
.signpad__r { font-size: 10.5px; color: var(--ink-mute); }

.done { text-align: center; display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 8px 0; }
.done__ic { color: var(--ok); }
.done__t { font: 700 18px var(--display); letter-spacing: -0.015em; color: var(--ink); }
.done__s { font-size: 13px; color: var(--ink-2); line-height: 1.55; }
.done__box { margin-top: 10px; width: 100%; border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 11px 13px; background: var(--surface-2); text-align: left; }
.done__bt { font-size: 13.5px; font-weight: 700; color: var(--ink); }
.done__bs { font-size: 12.5px; color: var(--ink-2); margin-top: 3px; line-height: 1.5; }
.done__n { font-size: 11.5px; color: var(--ink-mute); margin-top: 10px; }

.methods { display: flex; flex-direction: column; gap: 11px; }
.methods__r { display: grid; grid-template-columns: minmax(0, 1fr) auto; grid-template-rows: auto auto; gap: 3px 10px; align-items: baseline; }
.methods__l { font-size: 12.5px; color: var(--ink-2); }
.methods__v { font-size: 12.5px; font-weight: 600; color: var(--ink); text-align: right; }
.methods__b { grid-column: 1; height: 6px; border-radius: 999px; background: var(--surface-3); overflow: hidden; }
.methods__b i { display: block; height: 100%; border-radius: 999px; }
.methods__p { grid-column: 2; font-size: 11px; color: var(--ink-mute); text-align: right; }

.nowrap, .tbl__c.nowrap { white-space: nowrap; }

/* ------------------------------------------------------------ invoices -- */

.paybar { display: flex; flex-direction: column; gap: 5px; }
.paybar__t { font-size: 11.5px; color: var(--ink-mute); }

/* ----------------------------------------------------------- templates -- */

.tpls { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1px; background: var(--line-2); }
.tpls__i {
  display: block; width: 100%; height: 100%; text-align: left;
  padding: 13px 15px; border: 0; background: var(--surface); font: inherit; cursor: pointer;
}
.tpls__i:hover { background: var(--accent-soft); }
.tpls__h { display: flex; flex-wrap: wrap; align-items: baseline; gap: 8px; }
.tpls__fam { font: 600 9.5px var(--sans); letter-spacing: 0.07em; text-transform: uppercase; color: var(--accent-ink); }
.tpls__used { font-size: 10.5px; color: var(--ink-mute); margin-left: auto; white-space: nowrap; }
.tpls__n { flex: 1 0 100%; font: 700 14px var(--display); letter-spacing: -0.015em; color: var(--ink); }
.tpls__b { font-size: 12px; color: var(--ink-2); margin-top: 5px; line-height: 1.5; }
.tpls__m { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 9px; }

.rulerow { display: flex; align-items: flex-start; gap: 12px; }
.rulerow__t { flex: 1; min-width: 0; }
.rulerow__tt { display: block; font-size: 13px; font-weight: 600; color: var(--ink); }
.rulerow__ts { display: block; font-size: 11.5px; color: var(--ink-mute); margin-top: 2px; line-height: 1.5; }

.cadence { display: flex; flex-direction: column; }
.cadence__i { padding: 11px 14px; border-bottom: 1px solid var(--line-2); }
.cadence li:last-child .cadence__i, .cadence__i:last-child { border-bottom: 0; }
.cadence__h { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.cadence__day {
  font: 700 9.5px var(--sans); letter-spacing: 0.06em; text-transform: uppercase;
  background: var(--accent); color: var(--accent-on);
  padding: 2px 7px; border-radius: 4px; white-space: nowrap;
}
.cadence__n { font-size: 12.5px; font-weight: 600; color: var(--ink); }
.cadence__sub { font-size: 12px; color: var(--ink-2); margin-top: 7px; font-weight: 600; }
.cadence__body { font-size: 11.5px; color: var(--ink-mute); margin-top: 3px; line-height: 1.5; }

/* ---------------------------------------------------------------- sync -- */

.conn { display: flex; align-items: center; gap: 11px; }
.conn__ic { display: grid; place-items: center; width: 38px; height: 38px; border-radius: 10px; background: var(--accent-soft); color: var(--accent-ink); flex: 0 0 auto; }
.conn__t { font-size: 14px; font-weight: 700; color: var(--ink); }
.conn__s { font-size: 11.5px; color: var(--ink-mute); margin-top: 2px; line-height: 1.45; }

.mis { display: flex; flex-direction: column; }
.mis__i { display: flex; gap: 11px; align-items: flex-start; padding: 13px 16px; border-bottom: 1px solid var(--line-2); }
.mis li:last-child .mis__i, .mis__i:last-child { border-bottom: 0; }
.mis__i.is-done { opacity: 0.62; }
.mis__ic { display: grid; place-items: center; width: 28px; height: 28px; border-radius: 8px; flex: 0 0 auto; background: var(--warn-soft); color: var(--warn); }
.mis__i.is-done .mis__ic { background: var(--ok-soft); color: var(--ok); }
.mis__ic--missing { background: var(--bad-soft); color: var(--bad); }
.mis__t { font-size: 13px; font-weight: 700; color: var(--ink); }
.mis__d { font-size: 12px; color: var(--ink-2); margin-top: 3px; line-height: 1.5; }
.mis__f { display: flex; gap: 6px; align-items: flex-start; font-size: 11.5px; color: var(--accent-ink); margin-top: 6px; line-height: 1.45; }
.mis__f .ic { flex: 0 0 auto; margin-top: 2px; }
.mis__m { font-size: 10.5px; color: var(--ink-mute); margin-top: 6px; overflow-wrap: anywhere; }

.synclist { display: flex; flex-direction: column; border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.synclist__i { display: flex; gap: 10px; align-items: flex-start; padding: 9px 12px; border-bottom: 1px solid var(--line-2); }
.synclist li:last-child .synclist__i, .synclist__i:last-child { border-bottom: 0; }
.synclist__d { display: grid; place-items: center; width: 22px; height: 22px; border-radius: 6px; flex: 0 0 auto; }
.synclist__d--push { background: var(--accent-soft); color: var(--accent-ink); }
.synclist__d--pull { background: var(--info-soft); color: var(--info); }
.synclist__t { font-size: 12.5px; font-weight: 600; color: var(--ink); }
.synclist__s { font-size: 11.5px; color: var(--ink-mute); margin-top: 2px; line-height: 1.45; }
.synclist__m { font-size: 10.5px; color: var(--ink-mute); white-space: nowrap; }

.dirchip {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 2px 7px; border-radius: 999px;
  font: 600 10.5px var(--sans);
  background: var(--surface-3); color: var(--ink-2);
  white-space: nowrap;
}
.dirchip--push { background: var(--accent-soft); color: var(--accent-ink); }
.dirchip--pull { background: var(--info-soft); color: var(--info); }

/* -------------------------------------------------------------- narrow -- */

@media (max-width: 1240px) {
  .qwrap { grid-template-columns: 268px minmax(0, 1fr); }
  .grid--approve { grid-template-columns: minmax(0, 1fr); }
  .tpls { grid-template-columns: minmax(0, 1fr); }
}

@media (max-width: 900px) {
  .qwrap { grid-template-columns: minmax(0, 1fr); }
  .qlist { max-height: 340px; }
  .qdetail { padding: 14px; }
  .qmeta { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .cframe__page { padding: 15px; }
  .cdoc__grid { grid-template-columns: minmax(0, 1fr); }
  .cdoc__head { flex-wrap: wrap; }
  .cdoc__ref { text-align: left; }
  .ageing__r { grid-template-columns: 88px minmax(0, 1fr) 74px; }
  .ageing__n { display: none; }
  .qtot { width: 100%; }
  .crewrows__n2 { flex: 0 0 96px; }
  .crewrows__n2--wide { flex: 0 0 120px; }
  .crewrows__n { display: none; }
  .rows__meta { display: none; }
}

@media (max-width: 700px) {
  .stat__l { white-space: normal; overflow: visible; text-overflow: clip; line-height: 1.3; }
  .top__a .input--slim { max-width: 168px; min-width: 0; }
}

@media (max-width: 560px) {
  .qmeta { grid-template-columns: minmax(0, 1fr); }
  .qdetail__head { flex-wrap: wrap; }
  .cdoc__h { font-size: 18px; }
  .detail__v { font-size: 23px; }
}
