/* Pagewright Studio · base styles. Colours come from the client's theme (CSS variables set per request).
   Solid colours only: no rgba, opacity tricks or blend modes. */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; font-family: 'Inter', system-ui, -apple-system, 'Segoe UI', sans-serif; font-size: 15px; line-height: 1.5; color: var(--text); background: var(--bg); font-feature-settings: "tnum" 1, "cv11" 1; }
a { color: inherit; }
h1, h2, h3, .display { font-family: var(--heading-font); font-weight: 800; letter-spacing: -0.005em; line-height: 1.02; margin: 0; }
h1 { font-size: 34px; }
h2 { font-size: 22px; }
h3 { font-size: 17px; font-weight: 700; }
p { margin: 0 0 10px; }
.muted { color: var(--muted); }
.small { font-size: 13px; }
.tiny { font-size: 12px; }
.visually-hidden { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ---------- Shell ---------- */
.shell { display: grid; grid-template-columns: 248px 1fr; min-height: 100vh; }
.side { background: var(--side-bg); color: var(--side-text); padding: 22px 14px; display: flex; flex-direction: column; position: sticky; top: 0; height: 100vh; }
.side .logo { display: block; width: 118px; margin: 2px 8px 26px; }
.nav { display: flex; flex-direction: column; gap: 2px; }
.nav a { display: flex; align-items: center; gap: 11px; padding: 9px 11px; border-radius: 8px; text-decoration: none; font-weight: 500; font-size: 14.5px; color: var(--side-text); }
.nav a:hover { background: var(--side-hover); }
.nav a.on { background: var(--side-on-bg); color: var(--side-on-text); font-weight: 700; }
.nav a svg { width: 18px; height: 18px; flex: none; }
.nav a .count { margin-left: auto; background: var(--main); color: var(--main-ink); font-size: 11.5px; font-weight: 700; border-radius: 20px; padding: 0 7px; min-width: 20px; text-align: center; }
.nav a.on .count { background: var(--dark); color: #ffffff; }
.side-foot { margin-top: auto; padding: 14px 10px 2px; border-top: 1px solid var(--side-hover); font-size: 13px; }
.side-foot .who { font-weight: 700; color: var(--side-text); }
.side-foot .role { color: var(--side-muted); font-size: 12px; text-transform: capitalize; }
.side-foot form { margin-top: 8px; }
.side-foot button { background: none; border: 0; color: var(--side-muted); padding: 0; font: inherit; font-size: 12.5px; cursor: pointer; text-decoration: underline; }
.content { min-width: 0; padding: 28px 34px 60px; max-width: 1280px; }
.topbar, .tabbar { display: none; }

/* ---------- Banners ---------- */
.banner { border-radius: 10px; padding: 11px 15px; margin-bottom: 20px; font-size: 14px; display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.banner.test { background: #f6e7c7; color: #5e420c; border: 1px solid #e8cf97; }
.banner.ok { background: var(--soft-pale); color: var(--text); border: 1px solid var(--soft); }
.banner.error { background: #f5d9d1; color: #7d2a19; border: 1px solid #e8b6a8; }
.banner b { font-weight: 700; }
.banner a { font-weight: 600; }

/* ---------- Page head ---------- */
.page-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 16px; margin-bottom: 22px; flex-wrap: wrap; }
.page-head .sub { color: var(--muted); font-size: 14px; margin-top: 6px; }
.actions { display: flex; gap: 8px; flex-wrap: wrap; }

/* ---------- Buttons ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 7px; padding: 10px 16px; border-radius: 8px; border: 1px solid var(--main); background: var(--main); color: var(--main-ink); font: inherit; font-weight: 700; font-size: 14px; text-decoration: none; cursor: pointer; white-space: nowrap; }
.btn:hover { background: var(--main-deep); border-color: var(--main-deep); }
.btn.ghost { background: var(--surface); color: var(--text); border-color: var(--line); }
.btn.ghost:hover { background: var(--surface-2); }
.btn.soft { background: var(--soft); color: var(--soft-ink); border-color: var(--soft); }
.btn.danger { background: var(--surface); color: #a33a24; border-color: #e3b9ad; }
.btn.small { padding: 6px 11px; font-size: 13px; }
.btn.block { display: flex; width: 100%; }
.btn[disabled] { background: var(--surface-2); color: var(--muted); border-color: var(--line); cursor: not-allowed; }

/* ---------- Tiles ---------- */
.tiles { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; margin-bottom: 22px; }
.tile { background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 15px 17px; }
.tile .lab { font-size: 11.5px; font-weight: 700; letter-spacing: .09em; text-transform: uppercase; color: var(--muted); }
.tile .val { font-family: var(--heading-font); font-weight: 800; font-size: 32px; line-height: 1.05; margin: 6px 0 2px; }
.tile .val.main { color: var(--main); }
.tile .hint { font-size: 12.5px; color: var(--muted); }

/* ---------- Panels & lists ---------- */
.cols { display: grid; grid-template-columns: 1.6fr 1fr; gap: 16px; align-items: start; }
.panel { background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 18px 20px; }
.panel + .panel { margin-top: 16px; }
.panel-h { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; margin-bottom: 12px; }
.panel-h h2, .panel-h h3 { margin: 0; }
.todo { display: flex; align-items: center; gap: 12px; padding: 11px 12px; border-radius: 10px; background: var(--surface-2); margin-bottom: 8px; }
.todo .badge { width: 40px; height: 40px; border-radius: 9px; flex: none; display: flex; align-items: center; justify-content: center; font-weight: 800; font-size: 11px; text-transform: uppercase; letter-spacing: .04em; }
.todo .t1 { font-weight: 700; }
.todo .t2 { font-size: 13px; color: var(--muted); }
.todo .act { margin-left: auto; }
.todo.done { background: var(--surface); border: 1px solid var(--line); }
.todo.done .t1 { color: var(--muted); }
.empty { text-align: center; padding: 38px 20px; color: var(--muted); }
.empty .big { font-family: var(--heading-font); font-size: 24px; font-weight: 800; color: var(--text); margin-bottom: 6px; }
.empty.card { background: var(--surface); border: 1px solid var(--line); border-radius: 12px; }
.kv { display: flex; justify-content: space-between; gap: 12px; padding: 8px 0; border-bottom: 1px solid var(--line); font-size: 14px; }
.kv:last-child { border-bottom: 0; }

/* ---------- Pills ---------- */
.pill { display: inline-block; font-size: 12px; font-weight: 700; padding: 2px 9px; border-radius: 20px; white-space: nowrap; }
.pill.green { background: var(--soft-pale); color: var(--text); border: 1px solid var(--soft); }
.pill.amber { background: #f6e7c7; color: #6b4a0b; }
.pill.red { background: #f5d9d1; color: #82301e; }
.pill.blue { background: #dbe5ee; color: #284763; }
.pill.grey { background: var(--surface-2); color: var(--muted); border: 1px solid var(--line); }

/* ---------- Tables ---------- */
table.table { width: 100%; border-collapse: collapse; font-size: 14px; }
table.table th { text-align: left; font-size: 11.5px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); padding: 8px 10px; border-bottom: 1px solid var(--line); }
table.table td { padding: 10px; border-bottom: 1px solid var(--line); vertical-align: top; }
table.table tr:last-child td { border-bottom: 0; }
.table-wrap { overflow-x: auto; }

/* ---------- Forms ---------- */
.form { max-width: 760px; }
.field { margin-bottom: 14px; }
.field label, .label { display: block; font-size: 12px; font-weight: 700; letter-spacing: .07em; text-transform: uppercase; color: var(--muted); margin-bottom: 5px; }
.field .hint { font-size: 12.5px; color: var(--muted); margin-top: 4px; }
input:not([type]), input[type=text], input[type=email], input[type=tel], input[type=number], input[type=time], input[type=date], input[type=search], input[type=url], select, textarea {
  width: 100%; font: inherit; font-size: 15px; padding: 10px 12px; border-radius: 8px; border: 1px solid var(--line); background: var(--surface); color: var(--text);
}
input:focus, select:focus, textarea:focus { outline: 2px solid var(--main); outline-offset: 1px; border-color: var(--main); }
textarea { min-height: 90px; resize: vertical; }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 0 14px; }
.grid-3 { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 0 14px; }
.check { display: flex; gap: 10px; align-items: flex-start; margin-bottom: 10px; font-size: 14.5px; }
.check input { width: 18px; height: 18px; margin-top: 2px; accent-color: var(--main); }
.colour { display: flex; gap: 8px; align-items: center; }
.colour input[type=color] { width: 46px; height: 42px; padding: 2px; border: 1px solid var(--line); border-radius: 8px; background: var(--surface); }


/* ---------- Lists (enquiries, customers) ---------- */
.tabs { display: flex; gap: 4px; flex-wrap: wrap; margin-bottom: 12px; }
.tabs a { text-decoration: none; padding: 7px 12px; border-radius: 8px; font-size: 14px; font-weight: 600; color: var(--muted); border: 1px solid transparent; }
.tabs a:hover { background: var(--surface); border-color: var(--line); }
.tabs a.on { background: var(--surface); color: var(--text); border-color: var(--line); }
.tabs a .n { margin-left: 6px; font-size: 12px; color: var(--muted); font-weight: 700; }
.filters { display: flex; gap: 8px; margin-bottom: 14px; flex-wrap: wrap; }
.filters input[type=search] { flex: 1; min-width: 220px; }
.filters select { width: auto; min-width: 160px; }
.list { background: var(--surface); border: 1px solid var(--line); border-radius: 12px; overflow: hidden; }
.lrow { display: grid; grid-template-columns: 1fr 150px 100px 120px; gap: 12px; align-items: center; padding: 12px 16px; border-bottom: 1px solid var(--line); text-decoration: none; }
.lrow:last-child { border-bottom: 0; }
.lrow:hover { background: var(--surface-2); }
.lrow.flat { grid-template-columns: 1fr 110px 110px; padding: 10px 0; }
.lrow.flat:hover { background: none; }
.lrow .t1 { font-weight: 700; display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.lrow .t2 { font-size: 13px; color: var(--muted); }
.lrow .src { font-size: 13px; color: var(--muted); }
.lrow .l-when { font-size: 13px; color: var(--muted); }
.lrow .l-st { text-align: right; }
.tiny-pill { font-size: 11px; padding: 1px 7px; }

/* ---------- Detail pages ---------- */
.crumbs { font-size: 13px; color: var(--muted); margin-bottom: 8px; }
.crumbs a { color: var(--muted); }
.said { margin-top: 12px; background: var(--surface-2); border-radius: 10px; padding: 12px 14px; }
.said p { margin: 4px 0 0; white-space: pre-wrap; }
details.more { margin-top: 12px; border-top: 1px solid var(--line); padding-top: 10px; }
details.more summary { cursor: pointer; font-weight: 600; font-size: 14px; color: var(--main); }
details.more[open] summary { margin-bottom: 12px; }
.thumbs { display: grid; grid-template-columns: repeat(auto-fill, minmax(110px, 1fr)); gap: 8px; }
.thumbs img { width: 100%; aspect-ratio: 1; object-fit: cover; border-radius: 8px; display: block; border: 1px solid var(--line); }
.filechip { display: flex; align-items: center; justify-content: center; aspect-ratio: 1; border-radius: 8px; border: 1px solid var(--line); background: var(--surface-2); font-size: 12px; padding: 8px; text-align: center; word-break: break-all; }
.tl { list-style: none; margin: 0; padding: 0; }
.tl li { display: grid; grid-template-columns: 96px 1fr; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--line); font-size: 14px; }
.tl li:last-child { border-bottom: 0; }
.tl .when { font-size: 12.5px; color: var(--muted); padding-top: 1px; }
.msg .mh { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.msg .mb { margin-top: 6px; padding: 9px 12px; border-radius: 10px; background: var(--surface-2); white-space: pre-wrap; font-size: 14px; }
.msg.in .mb { background: var(--soft-pale); border: 1px solid var(--soft); }
.row-btns { display: flex; gap: 8px; flex-wrap: wrap; }
.grid-2.tight { gap: 0 10px; }
aside .panel .form { max-width: none; }

/* ---------- Connections ---------- */
h3.sec { margin: 4px 0 12px; }
h3.sec ~ h3.sec { margin-top: 26px; }
.conn { border: 1px solid var(--line); border-radius: 12px; padding: 14px 16px; margin-bottom: 12px; background: var(--surface); }
.conn-h { display: flex; justify-content: space-between; gap: 12px; align-items: flex-start; margin-bottom: 10px; flex-wrap: wrap; }
.copy { display: flex; gap: 6px; }
.copy input { font-family: ui-monospace, Menlo, Consolas, monospace; font-size: 12.5px; }
form.inline { display: inline; }
.linkbtn { background: none; border: 0; padding: 0; font: inherit; color: var(--main); text-decoration: underline; cursor: pointer; }
.steps { margin: 0; padding-left: 20px; font-size: 14px; }
.steps li { margin-bottom: 7px; }
code { font-family: ui-monospace, Menlo, Consolas, monospace; font-size: 12.5px; background: var(--surface-2); border: 1px solid var(--line); border-radius: 5px; padding: 0 4px; }


/* ---------- Price list and costings ---------- */
.r { text-align: right; }
.nowrap { white-space: nowrap; }
table.table tr.click { cursor: pointer; }
table.table tr.click:hover td { background: var(--surface-2); }
table.table.pl td a { text-decoration: none; }
.try { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 10px; background: var(--soft-pale); border: 1px solid var(--soft); border-radius: 12px; padding: 12px 16px; font-size: 15px; }
.try input { width: 96px; padding: 7px 10px; font: inherit; border-radius: 8px; border: 1px solid var(--line); background: var(--surface); color: var(--text); }
.try .main, .main { color: var(--main); }
.try .out { flex: 1 1 320px; }
details.rowedit summary { cursor: pointer; font-size: 13px; font-weight: 600; color: var(--main); list-style: none; }
details.rowedit summary::-webkit-details-marker { display: none; }
details.rowedit[open] { position: relative; }
.rowform { position: absolute; right: 0; top: 24px; z-index: 5; width: min(640px, 86vw); text-align: left; background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 14px; }
.addcosts { margin-top: 14px; gap: 12px; }
.addcosts .conn { margin: 0; }
.grid-3.tight { gap: 0 10px; }
.inline-fields { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; max-width: none; }
.inline-fields input { width: 100px; padding: 7px 10px; }


/* ---------- Quote builder ---------- */
.qcols { grid-template-columns: minmax(0, 1.7fr) minmax(280px, 1fr); }
.optchips { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.optchip { position: relative; display: flex; gap: 10px; align-items: center; border: 1px solid var(--line); border-radius: 10px; padding: 9px 12px; background: var(--surface-2); }
.optchip.pick { border-color: var(--main); background: var(--soft-pale); }
.pickstamp { display: inline-block; background: var(--main); color: var(--main-ink); font-size: 10.5px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; padding: 2px 7px; border-radius: 5px; margin-right: 4px; }
.pickstamp.sm { font-size: 9.5px; padding: 1px 6px; margin-left: 6px; vertical-align: 2px; }
.optadd { display: flex; gap: 6px; }
.optadd input { width: 200px; padding: 7px 10px; }
.qsec { margin-bottom: 14px; }
.qsec > .label { margin: 4px 0 6px; }
.qline { display: grid; grid-template-columns: 1fr auto auto; gap: 12px; align-items: start; padding: 10px 0; border-bottom: 1px solid var(--line); }
.qline:last-child { border-bottom: 0; }
.qline .pill { margin-left: 6px; }
.ql-num { text-align: right; white-space: nowrap; }
.inside { color: var(--main); font-weight: 600; }
.addbox { margin-top: 12px; border-top: 1px solid var(--line); padding-top: 14px; }
.addpl { display: flex; flex-wrap: wrap; gap: 0 10px; align-items: flex-end; max-width: none; }
.addpl .field { margin-bottom: 10px; }
.addpl .grow { flex: 1 1 260px; }
.addpl .qty input { width: 110px; }
.addpl .btn { margin-bottom: 10px; }
.addpl .check { margin-bottom: 14px; }
.totals .tblock { padding-bottom: 12px; margin-bottom: 12px; border-bottom: 1px solid var(--line); }
.totals .tblock:last-of-type { border-bottom: 0; }
.totals .tname { font-weight: 700; margin-bottom: 4px; }
.kv.big { font-weight: 800; font-size: 17px; }
.inside-box { margin-top: 8px; background: var(--soft-pale); border: 1px solid var(--soft); border-radius: 9px; padding: 4px 10px; }
.inside-box .kv { border-bottom-color: var(--soft); font-size: 13.5px; }

/* ---------- Customer quote page ---------- */
.qp { min-height: 100vh; background: var(--bg); }
.qp-top { background: var(--dark); color: #ffffff; padding: 14px 20px; display: flex; align-items: center; gap: 14px; }
.qp-top img { height: 40px; display: block; }
.qp-top span { font-size: 12px; letter-spacing: .12em; text-transform: uppercase; color: #d9dcd3; }
.qp-preview { background: #f6e7c7; color: #5e420c; text-align: center; padding: 8px; font-size: 13px; }
.qp-main { max-width: 640px; margin: 0 auto; padding: 22px 16px 60px; }
.qp-head h1 { font-size: 38px; margin: 6px 0 6px; }
.qp-intro { margin: 18px 0; font-size: 16px; }
.qp-facts { display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 18px; }
.qp-facts > div { background: var(--surface); border: 1px solid var(--line); border-radius: 10px; padding: 8px 12px; }
.qp-facts .label { display: block; margin: 0; }
.qp-card { background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 18px 20px; margin: 18px 0; }
.qp-card.done { border-color: var(--main); }
.qp-card .tick { width: 44px; height: 44px; border-radius: 50%; background: var(--main); color: var(--main-ink); display: flex; align-items: center; justify-content: center; font-size: 24px; font-weight: 800; margin-bottom: 8px; }
.qp-card ol { padding-left: 20px; }
.qp-form h2 { font-size: 22px; margin: 22px 0 10px; }
.qp-opt { display: flex; align-items: center; gap: 12px; background: var(--surface); border: 2px solid var(--line); border-radius: 12px; padding: 14px 16px; margin-bottom: 10px; cursor: pointer; }
.qp-opt.on { border-color: var(--main); background: var(--soft-pale); }
.qp-opt input { width: 20px; height: 20px; accent-color: var(--main); flex: none; }
.qp-opt .nm { flex: 1; font-weight: 700; }
.qp-opt .pr { font-weight: 800; white-space: nowrap; }
.qp-opt small { font-weight: 500; color: var(--muted); }
.qp-total { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 12px; background: var(--dark); color: #ffffff; border-radius: 12px; padding: 14px 18px; margin: 16px 0; }
.qp-total b { font-family: var(--heading-font); font-size: 34px; margin-left: auto; }
.qp-total small { width: 100%; text-align: right; color: #d9dcd3; }
.qp-accept { background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 16px 18px; }
.btn.big { padding: 15px 18px; font-size: 17px; }
.qp-breakdown { background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 14px 18px; margin-top: 18px; }
.qp-breakdown summary { cursor: pointer; font-weight: 700; }
.qp-sec h3 { margin: 16px 0 6px; }
.qp-sec .label { margin: 12px 0 4px; }
.qp-line { display: flex; justify-content: space-between; gap: 12px; padding: 8px 0; border-bottom: 1px solid var(--line); font-size: 14.5px; }
.qp-line.sum { font-weight: 700; border-bottom: 0; }
.qp-more { display: grid; gap: 10px; margin-top: 18px; }
.qp-more details { background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 12px 16px; }
.qp-more summary { cursor: pointer; font-weight: 700; color: var(--main); }
.qp-more form { margin-top: 10px; }
.qp-foot { margin-top: 30px; text-align: center; font-size: 13.5px; color: var(--muted); }
@media print { .qp-accept, .qp-more, .qp-preview, .noprint { display: none; } .qp-breakdown { border: 0; } .terms h2 { break-after: avoid; } .terms li { break-inside: avoid; } }


/* ---------- Terms ---------- */
.terms { margin-top: 18px; }
.terms h2 { font-size: 21px; margin: 26px 0 10px; display: flex; gap: 10px; align-items: baseline; }
.terms h2 .tn { color: var(--main); font-size: 17px; min-width: 22px; }
.terms ul { padding-left: 20px; margin: 0 0 10px; }
.terms li { margin-bottom: 7px; }
.terms .tform { border: 2px dashed var(--line); border-radius: 0; background: var(--surface); padding: 14px 18px; }

/* ---------- Settings layout ---------- */
.settings { display: grid; grid-template-columns: 220px minmax(0, 1fr); gap: 22px; align-items: start; }
.settings > section { min-width: 0; }
.setnav { background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 8px; position: sticky; top: 20px; }
.setnav a { display: flex; justify-content: space-between; align-items: center; padding: 8px 11px; border-radius: 7px; text-decoration: none; font-size: 14px; }
.setnav a:hover { background: var(--surface-2); }
.setnav a.on { background: var(--soft); color: var(--soft-ink); font-weight: 700; }
.setnav a .soon { font-size: 10.5px; color: var(--muted); font-weight: 600; }
.swatches { display: flex; gap: 10px; flex-wrap: wrap; }
.swatch { width: 54px; height: 54px; border-radius: 10px; border: 1px solid var(--line); }
.preview { border: 1px solid var(--line); border-radius: 12px; overflow: hidden; display: grid; grid-template-columns: 120px 1fr; min-height: 150px; }

/* ---------- Sign in ---------- */
.signin { min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 24px; background: var(--dark); position: relative; overflow: hidden; }
.signin .contours { position: absolute; inset: 0; width: 100%; height: 100%; }
.signin-card { position: relative; z-index: 1; background: #f1f0e9; color: #1f2523; width: 100%; max-width: 400px; border-radius: 16px; padding: 34px 30px 26px; text-align: center; }
.signin-card .logo { width: 132px; margin: 0 auto 18px; display: block; }
.signin-card h1 { font-size: 30px; margin-bottom: 18px; }
.gbtn { display: flex; width: 100%; align-items: center; justify-content: center; gap: 10px; background: #ffffff; color: #1f2523; border: 1px solid #c9ccc0; border-radius: 9px; padding: 12px; font: inherit; font-weight: 600; font-size: 15px; text-decoration: none; cursor: pointer; }
.gbtn:hover { background: #f7f7f3; }
.gbtn svg { width: 20px; height: 20px; }
.or { display: flex; align-items: center; gap: 10px; color: #7a8078; font-size: 13px; margin: 16px 0; }
.or::before, .or::after { content: ""; flex: 1; height: 1px; background: #d3d5c9; }
.signin-card input { background: #ffffff; border-color: #c9ccc0; color: #1f2523; }
.signin-card .btn.ghost { background: #ffffff; color: #1f2523; border-color: #c9ccc0; }
.signin-card .foot { font-size: 12px; color: #7a8078; margin-top: 18px; }
.signin-card .msg { text-align: left; font-size: 14px; border-radius: 9px; padding: 10px 12px; margin-bottom: 14px; }
.signin-card .msg.error { background: #f5d9d1; color: #7d2a19; }
.signin-card .msg.ok { background: #e4e9d8; color: #2f4a34; }

/* ---------- Mobile ---------- */
@media (max-width: 900px) {
  .shell { display: block; }
  .side { display: none; }
  .topbar { display: flex; align-items: center; justify-content: space-between; background: var(--side-bg); color: var(--side-text); padding: 10px 16px; position: sticky; top: 0; z-index: 10; }
  .topbar .logo { height: 34px; display: block; }
  .topbar details { position: relative; }
  .topbar summary { list-style: none; cursor: pointer; padding: 8px 10px; border-radius: 8px; font-weight: 600; font-size: 14px; color: var(--side-text); border: 1px solid var(--side-hover); }
  .topbar summary::-webkit-details-marker { display: none; }
  .topbar .menu { position: absolute; right: 0; top: 44px; background: var(--side-bg); border: 1px solid var(--side-hover); border-radius: 12px; padding: 8px; width: 240px; }
  .content { padding: 18px 16px 96px; }
  .tabbar { display: grid; grid-template-columns: repeat(5, 1fr); position: fixed; left: 0; right: 0; bottom: 0; background: var(--surface); border-top: 1px solid var(--line); z-index: 10; padding: 6px 4px calc(6px + env(safe-area-inset-bottom)); }
  .tabbar a { display: flex; flex-direction: column; align-items: center; gap: 2px; text-decoration: none; font-size: 11px; font-weight: 600; color: var(--muted); padding: 4px 0; border-radius: 8px; }
  .tabbar a svg { width: 22px; height: 22px; }
  .tabbar a.on { color: var(--main); }
  h1 { font-size: 28px; }
  .tiles { grid-template-columns: 1fr 1fr; gap: 10px; }
  .tile .val { font-size: 26px; }
  .cols, .settings, .grid-2, .grid-3 { grid-template-columns: 1fr; }
  .rowform { position: static; width: auto; margin-top: 8px; }
  .qcols { grid-template-columns: 1fr; }
  .qline { grid-template-columns: 1fr auto; }
  .qline details.rowedit { grid-column: 1 / -1; }
  .setnav { position: static; display: flex; overflow-x: auto; gap: 4px; }
  .setnav a { white-space: nowrap; }
  .todo { flex-wrap: wrap; }
  .lrow { grid-template-columns: 1fr auto; gap: 4px 10px; }
  .lrow .l-src { grid-column: 1; grid-row: 2; }
  .lrow .l-when { grid-column: 2; grid-row: 1; text-align: right; }
  .lrow .l-st { grid-column: 2; grid-row: 2; }
  .lrow.flat { grid-template-columns: 1fr auto; }
  .tl li { grid-template-columns: 1fr; gap: 2px; }
  .page-head .actions { width: 100%; }
  .page-head .actions .btn { flex: 1; }
}
