/* SamSolve internal tool – one colour family (SamSolve blue), quiet surfaces, numbers that line up. */
:root {
  --navy: #12305A; --blue: #1B4F8C; --mid: #8FB0D9; --tint: #DCE6F2; --wash: #EEF3FA; --paper: #F4F7FB; --white: #FFFFFF;
  --ink: #14233A; --soft: #55677F; --line: #C9D6E6; --hair: #E4ECF5;
  --alert: #12305A; --font: "Segoe UI Variable Text", "Segoe UI", system-ui, -apple-system, "Helvetica Neue", Arial, sans-serif;
  --r: 6px;
}
* { box-sizing: border-box; }
html, body { margin: 0; }
body { font: 14px/1.5 var(--font); color: var(--ink); background: var(--paper); -webkit-font-smoothing: antialiased; }
button, input, select, textarea { font: inherit; color: inherit; }
a { color: var(--blue); text-underline-offset: 2px; }
:focus-visible { outline: 2px solid var(--blue); outline-offset: 2px; }
h1 { font-size: 23px; font-weight: 650; margin: 0; letter-spacing: -0.01em; color: var(--navy); }
h2 { font-size: 15px; font-weight: 650; margin: 0; color: var(--navy); }
h3 { font-size: 14px; font-weight: 650; margin: 18px 0 8px; color: var(--navy); }
.num { font-variant-numeric: tabular-nums; text-align: right; white-space: nowrap; }
.soft { color: var(--soft); } .small { font-size: 12.5px; } .big { font-size: 22px; font-weight: 650; font-variant-numeric: tabular-nums; color: var(--navy); }
code { font-family: ui-monospace, "Cascadia Mono", Consolas, monospace; font-size: 12.5px; background: var(--wash); border: 1px solid var(--hair); padding: 0 4px; border-radius: 3px; overflow-wrap: anywhere; }
[hidden] { display: none !important; }

/* ---------- frame ---------- */
.shell { display: grid; grid-template-columns: 236px minmax(0, 1fr); min-height: 100vh; }
.side { background: var(--navy); color: #fff; display: flex; flex-direction: column; position: sticky; top: 0; height: 100vh; overflow-y: auto; padding: 18px 0 14px; }
.brand { display: block; padding: 0 16px 10px; text-decoration: none; color: #fff; }
.brand small { display: block; color: var(--mid); font-size: 12px; margin: 6px 0 0 2px; letter-spacing: .02em; }
.logotile { display: flex; align-items: center; justify-content: center; background: #fff; border-radius: var(--r); padding: 8px 10px; }
.logotile img { display: block; max-width: 100%; height: 56px; object-fit: contain; }
.logotile.big { width: 200px; padding: 12px 16px; margin-bottom: 28px; } .logotile.big img { height: 92px; }
.nav { flex: 1; }
.navgroup { margin-top: 10px; }
.navlabel { padding: 6px 20px 3px; font-size: 11.5px; color: var(--mid); text-transform: uppercase; letter-spacing: .06em; }
.navlink { display: block; padding: 6px 20px; color: #E6EEF8; text-decoration: none; border-left: 3px solid transparent; }
.navlink:hover { background: rgba(255,255,255,.07); color: #fff; }
.navlink.on { background: var(--blue); border-left-color: #fff; color: #fff; font-weight: 600; }
.who { padding: 14px 20px 0; border-top: 1px solid rgba(255,255,255,.15); font-size: 13px; margin-top: 14px; }
.who b { display: block; } .who .role { display: block; color: var(--mid); font-size: 12px; margin-bottom: 6px; }
.who a, .who .linkbtn { color: var(--mid); font-size: 12.5px; } .who a:hover, .who .linkbtn:hover { color: #fff; }
.mainwrap { min-width: 0; display: flex; flex-direction: column; }
.topbar { display: flex; align-items: center; gap: 12px; padding: 10px 28px; background: var(--white); border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 20; }
.topbar .grow { flex: 1; } .topbar .menu { display: none; background: none; border: 1px solid var(--line); border-radius: 4px; padding: 3px 9px; cursor: pointer; }
.topbar select.fy { width: auto; font-weight: 600; color: var(--navy); }
.lock { font-size: 12.5px; color: var(--soft); border: 1px solid var(--line); padding: 2px 8px; border-radius: 10px; white-space: nowrap; }
.searchbox { position: relative; width: min(420px, 50vw); }
.searchbox input { width: 100%; }
.results { position: absolute; top: 40px; left: 0; right: 0; background: var(--white); border: 1px solid var(--line); border-radius: var(--r); box-shadow: 0 14px 40px rgba(18,48,90,.18); max-height: 70vh; overflow-y: auto; z-index: 30; }
.results a { display: grid; grid-template-columns: 92px 1fr; column-gap: 10px; padding: 8px 12px; text-decoration: none; color: var(--ink); border-bottom: 1px solid var(--hair); }
.results a:hover, .results a:focus { background: var(--wash); }
.results .rtype { grid-row: span 2; color: var(--soft); font-size: 12px; padding-top: 2px; } .results small { color: var(--soft); } .results .none { padding: 12px; color: var(--soft); }
.main { padding: 24px 28px 70px; outline: none; min-width: 0; }
.main.loading { opacity: .55; transition: opacity .2s .15s; }

/* ---------- page parts ---------- */
.pagehead { display: flex; align-items: flex-start; gap: 16px; flex-wrap: wrap; margin-bottom: 18px; }
.pagehead .grow { flex: 1; min-width: 260px; } .pagehead .sub { color: var(--soft); margin: 4px 0 0; max-width: 90ch; }
.actions, .row { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.row.spread { justify-content: space-between; } .row + .row { margin-top: 8px; }
.stack { display: flex; flex-direction: column; gap: 6px; align-items: flex-start; }
.card { background: var(--white); border: 1px solid var(--line); border-radius: var(--r); padding: 16px 18px; margin-bottom: 16px; min-width: 0; }
.cardhead { margin-bottom: 12px; } .cardhead .row { width: 100%; }
.card.mini { padding: 12px 14px; margin: 0; } .card.mini .btn { margin-top: 8px; }
.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 14px; margin-bottom: 16px; }
.card.bank { cursor: pointer; display: flex; flex-direction: column; gap: 6px; } .card.bank:hover { border-color: var(--blue); }
.grid2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(380px, 1fr)); gap: 0 16px; align-items: start; }
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 12px; margin-bottom: 18px; }
.stat { background: var(--white); border: 1px solid var(--line); border-radius: var(--r); padding: 12px 14px; border-top: 3px solid var(--tint); }
.stat[role=link] { cursor: pointer; } .stat[role=link]:hover { border-color: var(--blue); }
.stat .label { font-size: 12.5px; color: var(--soft); } .stat .value { font-size: 21px; font-weight: 650; color: var(--navy); font-variant-numeric: tabular-nums; margin-top: 2px; }
.stat .snote { font-size: 12px; color: var(--soft); margin-top: 2px; }
.stat.warn { border-top-color: var(--mid); } .stat.alert { border-top-color: var(--navy); background: var(--wash); }
.facts { display: grid; grid-template-columns: max-content 1fr; gap: 6px 18px; margin: 0; } .facts dt { color: var(--soft); } .facts dd { margin: 0; overflow-wrap: anywhere; white-space: pre-line; }
.empty { padding: 30px 20px; text-align: center; color: var(--soft); background: var(--white); border: 1px dashed var(--line); border-radius: var(--r); }
.empty p { margin: 0 0 10px; }
.list { list-style: none; margin: 0; padding: 0; }
.list li { display: flex; justify-content: space-between; gap: 12px; padding: 8px 0; border-bottom: 1px solid var(--hair); align-items: baseline; }
.list li:last-child { border-bottom: 0; } .list li > span:last-child { text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; }
.timeline { list-style: none; margin: 0; padding: 0 0 0 12px; border-left: 2px solid var(--tint); } .timeline li { padding: 4px 0 10px; }
.checks { list-style: none; margin: 0; padding: 0; } .checks li { padding: 7px 0; border-bottom: 1px solid var(--hair); }
.checks .tick { display: inline-grid; place-items: center; width: 20px; height: 20px; border-radius: 50%; margin-right: 8px; font-size: 12px; font-weight: 700; background: var(--tint); color: var(--navy); }
.checks li.bad .tick { background: var(--navy); color: #fff; }
.help { padding-left: 20px; margin: 0; } .help li { margin-bottom: 7px; max-width: 90ch; }
.chip { display: inline-block; padding: 0 7px; margin: 0 4px 2px 0; border: 1px solid var(--line); border-radius: 10px; font-size: 12.5px; text-decoration: none; }

/* ---------- controls ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; background: var(--blue); color: #fff; border: 1px solid var(--blue); border-radius: 4px; padding: 7px 14px; cursor: pointer; font-weight: 600; text-decoration: none; white-space: nowrap; }
.btn:hover { background: var(--navy); border-color: var(--navy); }
.btn:disabled { opacity: .55; cursor: progress; }
.btn.quiet { background: var(--white); color: var(--blue); border-color: var(--line); } .btn.quiet:hover { border-color: var(--blue); }
.btn.small { padding: 3px 9px; font-size: 12.5px; font-weight: 600; }
.btn.danger { color: #7A1F1F; } .btn.danger:not(.quiet) { background: #7A1F1F; border-color: #7A1F1F; color: #fff; }
.btn.wide { width: 100%; margin-top: 8px; }
.linkbtn { background: none; border: 0; padding: 0; color: var(--blue); text-decoration: underline; cursor: pointer; font-size: 12.5px; }
input[type=text], input[type=password], input[type=number], input[type=date], input[type=search], input[type=email], select, textarea {
  width: 100%; padding: 7px 9px; border: 1px solid var(--line); border-radius: 4px; background: var(--white); min-width: 0; }
input.small { padding: 4px 6px; max-width: 130px; }
textarea { resize: vertical; }
input:focus, select:focus, textarea:focus { border-color: var(--blue); outline: none; box-shadow: 0 0 0 3px var(--tint); }
input:disabled, select:disabled, textarea:disabled { background: var(--paper); color: var(--soft); }
input[type=search].search { width: 280px; }
input[type=checkbox], input[type=radio] { width: 16px; height: 16px; accent-color: var(--blue); }
.tabs { display: flex; gap: 2px; border-bottom: 1px solid var(--line); margin: 0 0 16px; overflow-x: auto; }
.tabs button { background: none; border: 0; border-bottom: 3px solid transparent; padding: 8px 14px; color: var(--soft); cursor: pointer; white-space: nowrap; }
.tabs button:hover { color: var(--ink); } .tabs button.on { color: var(--navy); border-bottom-color: var(--blue); font-weight: 600; }
.row > .tabs { margin-bottom: 0; flex: 1; }

/* ---------- forms ---------- */
.formgrid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px 14px; }
.formgrid .full { grid-column: 1 / -1; }
.field label { display: block; font-size: 12.5px; color: var(--soft); margin-bottom: 3px; } .field label input, .field label select, .field label textarea { margin-top: 3px; color: var(--ink); font-size: 14px; }
.field small { display: block; color: var(--soft); font-size: 12px; margin-top: 3px; }
.field.check, label.check { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; font-size: 14px; color: var(--ink); cursor: pointer; }
.field.check small { flex-basis: 100%; margin: 0 0 0 24px; }
.req { color: var(--blue); }
.formhead { margin: 8px 0 0; padding-top: 10px; border-top: 1px solid var(--hair); }
.info { background: var(--wash); border: 1px solid var(--hair); border-radius: 4px; padding: 8px 10px; font-size: 13px; }
.multi { display: flex; flex-wrap: wrap; gap: 4px 16px; }
.intro { color: var(--soft); margin: 0 0 14px; }
.msg { padding: 9px 12px; border-radius: 4px; margin-bottom: 14px; max-width: 110ch; }
.msg.err { background: var(--navy); color: #fff; } .msg.ok { background: var(--tint); color: var(--navy); } .msg.note { background: var(--white); border: 1px solid var(--line); border-left: 3px solid var(--blue); color: var(--ink); }
.copyrow { display: flex; gap: 8px; }

/* ---------- tables ---------- */
.tablewrap { background: var(--white); border: 1px solid var(--line); border-radius: var(--r); overflow-x: auto; margin-bottom: 16px; }
.card .tablewrap { border-radius: 4px; margin-bottom: 8px; }
table { border-collapse: collapse; width: 100%; }
th { text-align: left; font-weight: 600; font-size: 12.5px; color: var(--soft); padding: 9px 12px; border-bottom: 1px solid var(--line); white-space: nowrap; background: var(--white); }
td { padding: 9px 12px; border-bottom: 1px solid var(--hair); vertical-align: top; }
tbody tr:last-child td { border-bottom: 0; }
tfoot td { border-top: 1px solid var(--line); font-weight: 650; background: var(--wash); }
tr.click { cursor: pointer; } tr.click:hover td, tr.click:focus td { background: var(--paper); } tr.click:focus { outline: none; }
td.wrap { max-width: 380px; overflow-wrap: anywhere; }
.pill { display: inline-block; padding: 0 9px; border-radius: 10px; font-size: 12px; line-height: 20px; white-space: nowrap; background: var(--tint); color: var(--navy); }
.pill.alert { background: var(--navy); color: #fff; } .pill.warn { background: var(--wash); color: var(--navy); border: 1px solid var(--mid); line-height: 18px; }
.pill.done { background: transparent; color: var(--soft); border: 1px solid var(--line); line-height: 18px; } .pill.plain { background: var(--paper); color: var(--soft); }
table.jl { border: 1px solid var(--line); margin: 6px 0 10px; } table.jl td, table.jl th { padding: 6px 8px; } table.jl input.small { max-width: none; }
table.statement td { padding: 7px 14px; } table.statement tr.grp th { background: var(--wash); color: var(--navy); font-size: 13px; padding: 8px 14px; }
table.statement tr.tot td { font-weight: 650; border-top: 1px solid var(--line); } table.statement tr.grand td { font-weight: 700; font-size: 15px; background: var(--wash); color: var(--navy); border-top: 2px solid var(--blue); }
.neg { color: var(--navy); font-weight: 700; } .warntext { color: var(--navy); font-weight: 600; }
.meter { height: 4px; background: var(--hair); border-radius: 2px; margin-top: 4px; min-width: 60px; } .meter span { display: block; height: 100%; background: var(--blue); border-radius: 2px; }
.sharebar { display: flex; align-items: center; gap: 8px; min-width: 160px; } .sharebar span { display: block; height: 8px; background: var(--blue); border-radius: 2px; max-width: 70%; }

/* ---------- dashboard ---------- */
.forecast { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin: 10px 0; }
.forecast > div { border-left: 3px solid var(--tint); padding: 4px 12px; display: flex; flex-direction: column; } .forecast > div.neg { border-left-color: var(--navy); }
.forecast small { color: var(--soft); } .forecast b { font-size: 19px; color: var(--navy); font-variant-numeric: tabular-nums; }
.ageing { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-top: 12px; padding-top: 10px; border-top: 1px solid var(--hair); }
.ageing small { display: block; color: var(--soft); } .ageing b { font-variant-numeric: tabular-nums; }
.chart svg { width: 100%; height: auto; display: block; }
.chart .b1 { fill: var(--navy); } .chart .b2 { fill: var(--mid); } .chart .grid { stroke: var(--hair); } .chart .ax { fill: var(--soft); font-size: 10px; }
.legend { display: flex; gap: 18px; font-size: 12.5px; color: var(--soft); margin-bottom: 6px; } .legend i { display: inline-block; width: 10px; height: 10px; margin-right: 6px; vertical-align: -1px; }
.legend .k1 { background: var(--navy); } .legend .k2 { background: var(--mid); }

/* ---------- pipeline ---------- */
.board { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(200px, 1fr); gap: 10px; overflow-x: auto; align-items: start; padding-bottom: 10px; }
.lane { background: var(--wash); border: 1px solid var(--line); border-radius: var(--r); min-height: 240px; padding-bottom: 6px; }
.lane.over { outline: 2px solid var(--blue); outline-offset: -2px; }
.lanehead { padding: 9px 10px; border-bottom: 1px solid var(--line); background: var(--white); border-radius: var(--r) var(--r) 0 0; } .lanehead b { display: block; } .lanehead span { font-size: 12px; color: var(--soft); }
.dealcard { background: var(--white); border: 1px solid var(--line); border-left: 3px solid var(--blue); margin: 8px; padding: 9px 10px; cursor: grab; border-radius: 4px; display: flex; flex-direction: column; gap: 3px; }
.dealcard:hover { border-color: var(--blue); } .dealcard .soft { font-size: 12.5px; }
.dealfoot { display: flex; justify-content: space-between; font-size: 12.5px; font-variant-numeric: tabular-nums; font-weight: 600; } .dealfoot .late { color: var(--navy); text-decoration: underline; }

/* ---------- dialogs ---------- */
.backdrop { position: fixed; inset: 0; background: rgba(18,48,90,.45); display: grid; place-items: center; z-index: 100; padding: 16px; }
.modal { background: var(--white); border-radius: 8px; width: min(640px, 100%); max-height: calc(100vh - 32px); display: flex; flex-direction: column; box-shadow: 0 22px 60px rgba(18,48,90,.3); }
.modal.wide { width: min(1000px, 100%); }
.modalhead { display: flex; align-items: center; justify-content: space-between; padding: 14px 20px; border-bottom: 1px solid var(--hair); } .modalhead h2 { font-size: 17px; }
.modalhead .x { background: none; border: 0; font-size: 24px; line-height: 1; cursor: pointer; color: var(--soft); padding: 0 4px; }
.modalbody { padding: 16px 20px; overflow-y: auto; } .modalbody .docpage { padding: 0; background: none; }
.modalfoot { display: flex; justify-content: flex-end; gap: 8px; padding: 12px 20px; border-top: 1px solid var(--hair); flex-wrap: wrap; }
.toasts { position: fixed; right: 18px; bottom: 18px; display: flex; flex-direction: column; gap: 8px; z-index: 200; }
.toast { background: var(--navy); color: #fff; padding: 10px 14px; border-radius: 6px; box-shadow: 0 10px 30px rgba(18,48,90,.3); max-width: 420px; transition: opacity .3s, transform .3s; }
.toast.good { background: var(--blue); } .toast.bad { background: var(--navy); border-left: 4px solid #fff; } .toast.out { opacity: 0; transform: translateY(6px); }

/* ---------- invoice creator and viewer ---------- */
.creator { display: grid; grid-template-columns: minmax(420px, 560px) minmax(0, 1fr); gap: 20px; align-items: start; }
.creatorform .card { margin-bottom: 12px; }
.creatorpreview { position: sticky; top: 70px; max-height: calc(100vh - 90px); overflow: auto; background: #E3EAF3; border-radius: var(--r); padding: 12px; }
.docpage { display: flex; justify-content: center; overflow: auto; }
.docpage .inv { box-shadow: 0 4px 22px rgba(18,48,90,.18); flex: none; }
.docpage.live { zoom: .62; } @supports not (zoom: 1) { .docpage.live { transform: scale(.62); transform-origin: top left; } }
.fixed { padding: 7px 0; } .fixed b { font-size: 17px; color: var(--navy); font-variant-numeric: tabular-nums; }
.lines { display: grid; gap: 10px; } .line { border: 1px solid var(--line); border-left: 3px solid var(--blue); border-radius: 4px; padding: 10px 12px; background: #FBFCFE; }
.linehead { display: flex; gap: 12px; align-items: center; margin-bottom: 6px; } .linehead .grow { flex: 1; }
.amt { display: flex; gap: 6px; align-items: center; } .amt .auto { font-size: 12px; color: var(--soft); white-space: nowrap; }
.recip { margin-top: 10px; } .recip summary { cursor: pointer; color: var(--blue); margin-bottom: 10px; }
.stickybar { position: sticky; bottom: 0; background: var(--white); border: 1px solid var(--line); border-radius: var(--r); padding: 12px 16px; display: flex; justify-content: space-between; gap: 16px; align-items: center; box-shadow: 0 -6px 18px rgba(18,48,90,.08); }
.gentotals .facts { gap: 2px 18px; } .gentotals .facts dd { text-align: right; font-variant-numeric: tabular-nums; }
.invlayout { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 18px; align-items: start; }
.invlayout > div:first-child { background: #E3EAF3; border-radius: var(--r); padding: 16px; overflow: auto; }
.invside .card { margin-bottom: 12px; } .invside .list li { flex-wrap: wrap; } .invside .list li > span:last-child { margin-left: auto; }

/* ---------- sign-in ---------- */
.gate { min-height: 100vh; display: grid; grid-template-columns: minmax(300px, 42%) 1fr; }
.gateleft { background: var(--navy); color: #fff; padding: 56px 48px; display: flex; flex-direction: column; justify-content: space-between; }
.gateleft h1 { color: #fff; font-size: 32px; } .gateleft p { color: var(--mid); max-width: 36ch; margin: 10px 0 0; } .gateleft .tag { letter-spacing: .04em; }
.gateright { display: grid; place-items: center; padding: 32px; background: var(--paper); }
.gatebox { width: min(380px, 100%); background: var(--white); border: 1px solid var(--line); border-radius: 8px; padding: 26px 26px 22px; }
.gatebox h2 { font-size: 20px; margin-bottom: 6px; } .gatebox > p { color: var(--soft); margin: 0 0 16px; }
.gatebox .field { margin-bottom: 12px; } .gatebox .field label { font-size: 13px; }
.btn.ms { background: #fff; color: var(--ink); border: 1px solid #8C9BB0; gap: 10px; } .btn.ms:hover { background: var(--paper); border-color: var(--navy); }
.mslogo { display: grid; grid-template-columns: 9px 9px; gap: 2px; } .mslogo i { width: 9px; height: 9px; display: block; }
.mslogo i:nth-child(1) { background: #F25022; } .mslogo i:nth-child(2) { background: #7FBA00; } .mslogo i:nth-child(3) { background: #00A4EF; } .mslogo i:nth-child(4) { background: #FFB900; }
.or { text-align: center; color: var(--soft); margin: 14px 0 6px; font-size: 13px; }
.breakglass { margin-top: 20px; } .breakglass summary { cursor: pointer; color: var(--soft); font-size: 13px; margin-bottom: 12px; }
.qr { display: flex; justify-content: center; margin: 8px 0; } .qr img { border: 1px solid var(--line); border-radius: 4px; }
.secret { display: block; margin: 6px 0 10px; font-size: 13px; text-align: center; }
.codes { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; margin: 10px 0 14px; } .codes code { text-align: center; padding: 6px; font-size: 14px; }
ol.steps { padding-left: 18px; margin: 0 0 8px; color: var(--soft); } details.small summary { cursor: pointer; font-size: 12.5px; color: var(--blue); }
.settings { max-width: 980px; }

/* ---------- small screens ---------- */
@media (max-width: 1180px) { .creator { grid-template-columns: 1fr; } .creatorpreview { position: static; max-height: none; } .invlayout { grid-template-columns: 1fr; } }
@media (max-width: 900px) {
  .shell { grid-template-columns: 1fr; }
  .side { position: fixed; z-index: 50; width: 260px; left: -270px; transition: left .2s; }
  body.navopen .side { left: 0; box-shadow: 0 0 40px rgba(0,0,0,.3); }
  .topbar { padding: 8px 14px; } .topbar .menu { display: block; } .searchbox { width: auto; flex: 1; } .lock { display: none; }
  .main { padding: 16px 14px 60px; } .formgrid { grid-template-columns: 1fr; } .grid2 { grid-template-columns: 1fr; }
  .forecast { grid-template-columns: 1fr 1fr; } .gate { grid-template-columns: 1fr; } .gateleft { padding: 28px 24px; } .gateleft .logotile.big { margin-bottom: 14px; }
  input[type=search].search { width: 100%; }
}

/* ---------- print: only the invoice ---------- */
@media print {
  @page { size: A4; margin: 0; }
  body { background: #fff; }
  .side, .topbar, .pagehead, .stats, .invside, .msg, .toasts, .tabs { display: none !important; }
  .shell { display: block; } .main { padding: 0; } .invlayout { display: block; } .invlayout > div:first-child { background: none; padding: 0; }
  .docpage .inv { box-shadow: none; }
  .gate .gateleft { display: none; }
}

/* ---------- AI assistant ---------- */
.aiwrap { display: grid; grid-template-columns: 250px minmax(0, 1fr); gap: 16px; align-items: start; }
.convos { position: sticky; top: 70px; } .convos ul { list-style: none; margin: 10px 0 0; padding: 0; }
.convos li { display: flex; align-items: center; gap: 6px; border-radius: 4px; } .convos li a { flex: 1; padding: 7px 8px; text-decoration: none; color: var(--ink); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 13px; }
.convos li.on, .convos li:hover { background: var(--white); } .convos li.on a { color: var(--navy); font-weight: 600; } .convos .linkbtn { text-decoration: none; font-size: 16px; padding: 0 6px; color: var(--soft); }
.chat { display: flex; flex-direction: column; min-height: calc(100vh - 230px); padding: 0; overflow: hidden; }
.thread { flex: 1; overflow-y: auto; padding: 18px 20px; display: flex; flex-direction: column; gap: 10px; max-height: calc(100vh - 330px); }
.bubble { max-width: 82%; padding: 10px 14px; border-radius: 10px; line-height: 1.55; } .bubble p { margin: 0 0 8px; } .bubble p:last-child { margin-bottom: 0; }
.bubble.user { align-self: flex-end; background: var(--blue); color: #fff; border-bottom-right-radius: 3px; white-space: pre-wrap; }
.bubble.assistant { align-self: flex-start; background: var(--wash); border: 1px solid var(--hair); border-bottom-left-radius: 3px; }
.bubble ul, .bubble ol { margin: 4px 0 8px; padding-left: 20px; } .bubble .tablewrap { margin: 6px 0; } .bubble h3 { margin: 6px 0 4px; }
.toolline { align-self: flex-start; font-size: 12.5px; color: var(--soft); padding: 2px 10px; border-left: 2px solid var(--tint); } .toolline.change { color: var(--navy); border-left-color: var(--blue); } .toolline.failed { border-left-color: var(--navy); }
.approve { border: 1px solid var(--blue); border-radius: var(--r); padding: 12px 14px; background: var(--white); } .approve h3 { margin-top: 0; }
.pendcard { border: 1px solid var(--line); border-radius: 4px; padding: 10px 12px; margin-bottom: 8px; } .pendcard pre { background: var(--paper); padding: 8px; font-size: 12px; overflow: auto; max-height: 220px; margin: 6px 0; }
.pendcard details summary { cursor: pointer; font-size: 12.5px; color: var(--soft); margin: 4px 0; } .pendcard label.check { font-size: 13px; }
.composer { border-top: 1px solid var(--hair); padding: 12px 16px; display: flex; flex-direction: column; gap: 8px; background: var(--white); }
.thinking { padding: 6px 20px; font-size: 13px; color: var(--soft); } .dots i { display: inline-block; width: 6px; height: 6px; border-radius: 50%; background: var(--blue); margin-right: 3px; animation: blink 1.2s infinite; }
.dots i:nth-child(2) { animation-delay: .2s; } .dots i:nth-child(3) { animation-delay: .4s; } @keyframes blink { 0%, 80%, 100% { opacity: .25; } 40% { opacity: 1; } }
.ideas { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; } .ideas p { margin: 0 6px 0 0; }
.idea { background: var(--white); border: 1px solid var(--line); border-radius: 16px; padding: 6px 12px; cursor: pointer; font-size: 13px; text-align: left; } .idea:hover { border-color: var(--blue); color: var(--navy); }
@media (max-width: 900px) { .aiwrap { grid-template-columns: 1fr; } .convos { position: static; } .bubble { max-width: 100%; } }
