:root {
  --paper: #f4f6f3;
  --surface: #ffffff;
  --surface-2: #f9fbf8;
  --ink: #1b2024;
  --ink-2: #48535b;
  --ink-3: #78838a;
  --line: #dbe2dc;
  --line-2: #e9eee9;
  --pine: #0f6a31;
  --pine-2: #0a5326;
  --pine-soft: #e5f2e8;
  --leaf: #5ba51b;
  --leaf-soft: #eef7e5;
  --amber: #a85f00;
  --amber-soft: #fff3df;
  --red: #b42318;
  --red-soft: #fdecea;
  --blue: #1d5fa8;
  --blue-soft: #e8f0fa;
  --violet: #5b3fb0;
  --violet-soft: #efeafb;
  --radius: 10px;
  --radius-sm: 7px;
  --shadow: 0 1px 2px rgba(20, 40, 30, .06), 0 4px 14px rgba(20, 40, 30, .05);
  --shadow-lg: 0 20px 60px rgba(10, 30, 20, .25);
  --font: 'Public Sans', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --display: 'Archivo', 'Public Sans', system-ui, sans-serif;
  --doc: 'Times New Roman', Times, Georgia, serif;
  --side: 248px;
}
* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body { font-family: var(--font); font-size: 15px; line-height: 1.5; color: var(--ink); background: var(--paper); -webkit-font-smoothing: antialiased; }
a { color: var(--pine); text-decoration-thickness: 1px; text-underline-offset: 2px; }
a:hover { color: var(--pine-2); }
h1, h2, h3, h4 { font-family: var(--display); font-stretch: 108%; margin: 0; line-height: 1.2; letter-spacing: -0.01em; }
h1 { font-size: 26px; font-weight: 750; }
h2 { font-size: 19px; font-weight: 700; }
h3 { font-size: 16px; font-weight: 700; }
p { margin: 0 0 10px; }
small, .muted { color: var(--ink-3); }
.muted-2 { color: var(--ink-2); }
:focus-visible { outline: 3px solid rgba(91, 165, 27, .55); outline-offset: 2px; border-radius: 4px; }
.boot { min-height: 100vh; display: grid; place-items: center; }
.boot img { opacity: .9; }
.hidden { display: none !important; }
svg.i { width: 18px; height: 18px; flex: none; vertical-align: -4px; stroke: currentColor; }

/* ---------- layout ---------- */
.shell { display: grid; grid-template-columns: var(--side) 1fr; min-height: 100vh; }
.side { background: var(--surface); border-right: 1px solid var(--line); position: sticky; top: 0; height: 100vh; display: flex; flex-direction: column; overflow-y: auto; }
.side .brand { padding: 20px 20px 14px; display: block; }
.side .brand img { width: 176px; height: auto; display: block; }
.nav { padding: 6px 10px; display: flex; flex-direction: column; gap: 2px; }
.nav a { display: flex; align-items: center; gap: 11px; padding: 9px 12px; border-radius: 8px; color: var(--ink-2); text-decoration: none; font-weight: 550; font-size: 14.5px; position: relative; }
.nav a svg { width: 19px; height: 19px; flex: none; stroke: currentColor; }
.nav a:hover { background: var(--surface-2); color: var(--ink); }
.nav a.active { background: var(--pine-soft); color: var(--pine-2); }
.nav a.active::before { content: ''; position: absolute; left: -10px; top: 8px; bottom: 8px; width: 3px; border-radius: 0 3px 3px 0; background: var(--leaf); }
.nav .badge { margin-left: auto; }
.nav-group { padding: 16px 22px 4px; font-size: 12.5px; color: var(--ink-3); font-weight: 600; }
.side-foot { margin-top: auto; padding: 14px 16px 18px; border-top: 1px solid var(--line-2); }
.me { display: flex; gap: 10px; align-items: center; }
.avatar { width: 34px; height: 34px; border-radius: 50%; background: var(--pine); color: #fff; display: grid; place-items: center; font-weight: 700; font-size: 14px; flex: none; }
.me .who { min-width: 0; }
.me .who b { display: block; font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.me .who span { font-size: 12.5px; color: var(--ink-3); display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.main { min-width: 0; display: flex; flex-direction: column; }
.topbar { display: none; }
.content { padding: 28px 34px 40px; max-width: 1280px; width: 100%; }
.footer-note { padding: 0 34px 26px; font-size: 12px; color: var(--ink-3); max-width: 1280px; }

.page-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; margin-bottom: 22px; flex-wrap: wrap; }
.page-head .sub { color: var(--ink-2); margin-top: 4px; }
.page-head .actions { display: flex; gap: 8px; flex-wrap: wrap; }
.crumbs { font-size: 13.5px; color: var(--ink-3); margin-bottom: 6px; }
.crumbs a { color: var(--ink-3); text-decoration: none; }
.crumbs a:hover { color: var(--pine); text-decoration: underline; }

/* ---------- panels ---------- */
.panel { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); }
.panel-h { padding: 14px 18px; border-bottom: 1px solid var(--line-2); display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.panel-b { padding: 16px 18px; }
.panel + .panel, .stack > * + * { margin-top: 16px; }
.grid-2 { display: grid; grid-template-columns: minmax(0, 1.65fr) minmax(0, 1fr); gap: 18px; align-items: start; }
.grid-2e { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; align-items: start; }
.grid-2 > .panel, .grid-2e > .panel, .grid-2 > .stack, .grid-2e > .stack { margin-top: 0; }
.cols { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 12px 18px; }

/* stat strip */
.strip { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); margin-bottom: 18px; }
.strip > div { padding: 16px 18px; border-left: 1px solid var(--line-2); }
.strip > div:first-child { border-left: 0; }
.strip .v { font-family: var(--display); font-weight: 750; font-size: 26px; font-stretch: 112%; line-height: 1.1; }
.strip .l { color: var(--ink-2); font-size: 13.5px; margin-top: 2px; }
.strip .v.red { color: var(--red); }

/* ---------- buttons ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 7px; font: inherit; font-weight: 600; font-size: 14px; padding: 8px 14px; border-radius: 8px; border: 1px solid var(--line); background: var(--surface); color: var(--ink); cursor: pointer; text-decoration: none; white-space: nowrap; line-height: 1.3; transition: background .12s, border-color .12s, box-shadow .12s; }
.btn:hover { background: var(--surface-2); border-color: #c8d2ca; color: var(--ink); }
.btn svg { width: 16px; height: 16px; stroke: currentColor; flex: none; }
.btn.primary { background: var(--pine); border-color: var(--pine); color: #fff; }
.btn.primary:hover { background: var(--pine-2); border-color: var(--pine-2); color: #fff; }
.btn.leaf { background: var(--leaf); border-color: var(--leaf); color: #fff; }
.btn.leaf:hover { background: #4d8f15; }
.btn.danger { color: var(--red); border-color: #efc7c2; }
.btn.danger:hover { background: var(--red-soft); }
.btn.danger.solid { background: var(--red); color: #fff; border-color: var(--red); }
.btn.ghost { border-color: transparent; background: transparent; }
.btn.ghost:hover { background: var(--surface-2); }
.btn.sm { padding: 5px 10px; font-size: 13px; }
.btn.lg { padding: 11px 18px; font-size: 15px; }
.btn[disabled] { opacity: .55; cursor: not-allowed; }
.btn.ai { background: linear-gradient(180deg, #1c7a3b, #0f6a31); border-color: #0f6a31; color: #fff; }
.btn.ai:hover { background: #0a5326; color: #fff; }
.linkbtn { background: none; border: 0; padding: 0; color: var(--pine); font: inherit; cursor: pointer; text-decoration: underline; text-underline-offset: 2px; }

/* ---------- pills ---------- */
.pill { display: inline-flex; align-items: center; gap: 5px; font-size: 12.5px; font-weight: 600; padding: 2px 9px; border-radius: 999px; background: var(--line-2); color: var(--ink-2); white-space: nowrap; }
.pill.green { background: #d7eedd; color: #0a4a22; }
.pill.leaf { background: #dff0cc; color: #2c5a09; }
.pill.amber { background: var(--amber-soft); color: var(--amber); }
.pill.red { background: var(--red-soft); color: var(--red); }
.pill.blue { background: var(--blue-soft); color: var(--blue); }
.pill.violet { background: var(--violet-soft); color: var(--violet); }
.badge { min-width: 20px; height: 20px; padding: 0 6px; border-radius: 10px; background: var(--red); color: #fff; font-size: 12px; font-weight: 700; display: inline-grid; place-items: center; }

/* ---------- tables ---------- */
.table-wrap { overflow-x: auto; }
table.t { width: 100%; border-collapse: collapse; font-size: 14.5px; }
table.t th { text-align: left; font-weight: 600; color: var(--ink-3); font-size: 13px; padding: 10px 14px; border-bottom: 1px solid var(--line); background: var(--surface-2); white-space: nowrap; }
table.t td { padding: 11px 14px; border-bottom: 1px solid var(--line-2); vertical-align: middle; }
table.t tr:last-child td { border-bottom: 0; }
table.t tr.click { cursor: pointer; }
table.t tr.click:hover td { background: #f6faf6; }
table.t td.num, table.t th.num { text-align: right; font-variant-numeric: tabular-nums; }
table.t .primary-cell b { display: block; }
table.t .primary-cell span { font-size: 13px; color: var(--ink-3); }
.money { font-variant-numeric: tabular-nums; }
.money.due { color: var(--red); font-weight: 650; }

/* ---------- forms ---------- */
.form { display: grid; gap: 14px; }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px 16px; }
.form-grid.three { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.form-grid .full { grid-column: 1 / -1; }
.field label, .label { display: block; font-size: 13.5px; font-weight: 600; color: var(--ink-2); margin-bottom: 5px; }
.field .help { font-size: 12.5px; color: var(--ink-3); margin-top: 4px; }
input[type=text], input[type=email], input[type=password], input[type=number], input[type=date], input[type=time], input[type=tel], input[type=url], input[type=search], select, textarea {
  width: 100%; font: inherit; font-size: 14.5px; padding: 9px 11px; border: 1px solid #cdd6cf; border-radius: var(--radius-sm); background: #fff; color: var(--ink); transition: border-color .12s, box-shadow .12s;
}
textarea { min-height: 84px; resize: vertical; }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--leaf); box-shadow: 0 0 0 3px rgba(91, 165, 27, .18); }
.check { display: flex; gap: 9px; align-items: flex-start; font-size: 14.5px; cursor: pointer; }
.check input { margin-top: 3px; width: 16px; height: 16px; accent-color: var(--pine); flex: none; }
.checks { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px 14px; }
.input-prefix { position: relative; }
.input-prefix span { position: absolute; left: 11px; top: 50%; transform: translateY(-50%); color: var(--ink-3); pointer-events: none; }
.input-prefix input { padding-left: 24px; }
.form-actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 6px; }
.err { color: var(--red); font-size: 13.5px; }
.callout { border-radius: var(--radius-sm); padding: 11px 14px; font-size: 14px; background: var(--surface-2); border: 1px solid var(--line); }
.callout.warn { background: var(--amber-soft); border-color: #f3d9a8; color: #6b4200; }
.callout.danger { background: var(--red-soft); border-color: #f2c4bf; color: #7a1a12; }
.callout.info { background: var(--blue-soft); border-color: #c9dbf1; color: #173f6c; }
.callout.ok { background: var(--pine-soft); border-color: #c3e0cb; color: #0b4a22; }
.callout b { font-weight: 650; }
.callout ul { margin: 6px 0 0; padding-left: 18px; }

/* ---------- empty ---------- */
.empty { text-align: center; padding: 42px 20px; color: var(--ink-2); }
.empty h3 { margin-bottom: 6px; color: var(--ink); }
.empty .btn { margin-top: 12px; }

/* ---------- tabs ---------- */
.tabs { display: flex; gap: 2px; border-bottom: 1px solid var(--line); margin-bottom: 18px; overflow-x: auto; }
.tabs button { background: none; border: 0; font: inherit; font-weight: 600; font-size: 14.5px; color: var(--ink-3); padding: 10px 14px; border-bottom: 2px solid transparent; cursor: pointer; white-space: nowrap; margin-bottom: -1px; }
.tabs button:hover { color: var(--ink); }
.tabs button.on { color: var(--pine-2); border-bottom-color: var(--leaf); }

/* ---------- dashboard ---------- */
.hello { font-family: var(--display); font-weight: 780; font-size: 30px; font-stretch: 112%; }
.today-list { list-style: none; margin: 0; padding: 0; }
.today-list li { display: grid; grid-template-columns: 92px 1fr auto; gap: 14px; align-items: center; padding: 12px 18px; border-bottom: 1px solid var(--line-2); }
.today-list li:last-child { border-bottom: 0; }
.datechip { text-align: center; border-radius: 8px; padding: 6px 4px; background: var(--surface-2); border: 1px solid var(--line-2); line-height: 1.15; }
.datechip .m { font-size: 11.5px; color: var(--ink-3); font-weight: 600; }
.datechip .d { font-family: var(--display); font-weight: 780; font-size: 20px; font-stretch: 110%; }
.datechip .w { font-size: 11.5px; color: var(--ink-3); }
.datechip.now { background: var(--leaf-soft); border-color: #cfe8b6; }
.datechip.now .d { color: #3d7110; }
.datechip.court { background: var(--violet-soft); border-color: #dcd2f5; }
.datechip.court .d { color: var(--violet); }
.datechip.none .d { font-size: 15px; padding: 4px 0; color: var(--ink-3); }
.today-list .what b { display: block; font-size: 15px; }
.today-list .what span { color: var(--ink-3); font-size: 13.5px; }
.checklist { list-style: none; padding: 0; margin: 0; counter-reset: c; }
.checklist li { display: flex; gap: 12px; align-items: center; padding: 12px 0; border-bottom: 1px solid var(--line-2); }
.checklist li:last-child { border-bottom: 0; }
.checklist .n { width: 28px; height: 28px; border-radius: 50%; border: 2px solid var(--line); display: grid; place-items: center; font-weight: 700; color: var(--ink-3); flex: none; }
.checklist li.done .n { background: var(--leaf); border-color: var(--leaf); color: #fff; }
.checklist li.done .t { color: var(--ink-3); text-decoration: line-through; }
.checklist .t { flex: 1; }
.feed { list-style: none; margin: 0; padding: 0; }
.feed li { padding: 10px 18px; border-bottom: 1px solid var(--line-2); font-size: 14px; }
.feed li:last-child { border-bottom: 0; }
.feed li b { font-weight: 600; }
.feed li .when { color: var(--ink-3); font-size: 12.5px; }

/* ---------- docket (case steps) ---------- */
.docket { list-style: none; margin: 0; padding: 0; position: relative; }
.docket > li { position: relative; padding: 0 0 0 52px; }
.docket > li::before { content: ''; position: absolute; left: 17px; top: 36px; bottom: -4px; width: 2px; background: var(--line); }
.docket > li:last-child::before { display: none; }
.docket > li.done::before { background: var(--leaf); }
.docket .dot { position: absolute; left: 2px; top: 6px; width: 32px; height: 32px; border-radius: 50%; background: var(--surface); border: 2px solid var(--line); display: grid; place-items: center; font-family: var(--display); font-weight: 750; font-size: 14px; color: var(--ink-3); z-index: 1; }
.docket > li.done .dot { background: var(--leaf); border-color: var(--leaf); color: #fff; }
.docket > li.skipped .dot { background: var(--line-2); color: var(--ink-3); }
.docket > li.active .dot { background: var(--pine); border-color: var(--pine); color: #fff; box-shadow: 0 0 0 5px rgba(15, 106, 49, .14); }
.docket .row { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; padding: 9px 12px 9px 4px; cursor: pointer; border-radius: 8px; }
.docket .row:hover .ttl { color: var(--pine-2); }
.docket .ttl { font-weight: 650; font-size: 15.5px; }
.docket li.pending .ttl { color: var(--ink-2); font-weight: 600; }
.docket li.skipped .ttl { text-decoration: line-through; color: var(--ink-3); }
.docket .meta { font-size: 13px; color: var(--ink-3); margin-top: 2px; }
.docket .right { text-align: right; flex: none; }
.docket .detail { margin: 2px 0 18px 4px; }
.step-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); overflow: hidden; }
.docket li.active .step-card { border-color: #9fcdae; box-shadow: 0 0 0 1px #9fcdae, var(--shadow); }
.step-when { display: grid; grid-template-columns: auto 1fr; gap: 16px; padding: 16px 18px; background: linear-gradient(180deg, #f3faf0, #fff); border-bottom: 1px solid var(--line-2); align-items: center; }
.step-when.wait { background: linear-gradient(180deg, #fff8ea, #fff); }
.bigdate { text-align: center; min-width: 86px; border-right: 1px solid var(--line); padding-right: 16px; }
.bigdate .m { font-size: 12.5px; font-weight: 650; color: var(--ink-3); }
.bigdate .d { font-family: var(--display); font-weight: 800; font-size: 38px; line-height: 1; font-stretch: 115%; color: var(--pine); }
.step-when.wait .bigdate .d { color: var(--amber); }
.bigdate .w { font-size: 12.5px; color: var(--ink-3); }
.step-when .lead { font-size: 15.5px; font-weight: 650; }
.step-when .why { font-size: 13.5px; color: var(--ink-2); margin-top: 3px; }
.step-body { padding: 16px 18px; }
.step-body .desc { color: var(--ink-2); white-space: pre-line; }
.kv { display: grid; grid-template-columns: 150px 1fr; gap: 6px 14px; font-size: 14px; margin: 10px 0; }
.kv dt { color: var(--ink-3); }
.kv dd { margin: 0; }
.step-actions { display: flex; flex-wrap: wrap; gap: 8px; padding: 12px 18px; border-top: 1px solid var(--line-2); background: var(--surface-2); align-items: center; }
.step-actions .spacer { flex: 1; }
.doc-chip { display: flex; align-items: center; gap: 10px; padding: 9px 12px; border: 1px solid var(--line); border-radius: 8px; margin-top: 10px; background: #fff; }
.doc-chip .ic { width: 30px; height: 36px; border-radius: 4px; background: var(--pine-soft); display: grid; place-items: center; color: var(--pine); flex: none; }
.doc-chip .ic svg { width: 17px; height: 17px; }
.doc-chip .nm { flex: 1; min-width: 0; }
.doc-chip .nm b { display: block; font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.doc-chip .nm span { font-size: 12.5px; color: var(--ink-3); }
.court-box { border: 1px solid #d6cdf0; background: #faf8ff; border-radius: 8px; padding: 12px 14px; margin-top: 12px; }
.court-box h4 { font-family: var(--display); font-size: 14.5px; margin-bottom: 8px; color: var(--violet); }
.court-opts { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.court-opts > div { background: #fff; border: 1px solid #e3dcf6; border-radius: 8px; padding: 11px 12px; font-size: 14px; }
.court-opts b { display: block; margin-bottom: 4px; }

.case-head { display: flex; gap: 18px; align-items: flex-start; justify-content: space-between; flex-wrap: wrap; margin-bottom: 18px; }
.case-head h1 { font-size: 28px; }
.case-head .addr { color: var(--ink-2); margin-top: 4px; }
.progress { height: 6px; border-radius: 6px; background: var(--line-2); overflow: hidden; min-width: 80px; }
.progress > i { display: block; height: 100%; background: linear-gradient(90deg, var(--leaf), var(--pine)); border-radius: 6px; }

/* ---------- document editor ---------- */
.doc-layout { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 20px; align-items: start; }
.doc-toolbar { position: sticky; top: 0; z-index: 5; background: var(--paper); padding: 10px 0; display: flex; gap: 6px; flex-wrap: wrap; align-items: center; border-bottom: 1px solid var(--line); margin-bottom: 16px; }
.doc-toolbar .sep { width: 1px; height: 24px; background: var(--line); margin: 0 4px; }
.fmt { display: flex; gap: 2px; background: var(--surface); border: 1px solid var(--line); border-radius: 8px; padding: 2px; }
.fmt button { width: 32px; height: 30px; border: 0; background: none; border-radius: 6px; cursor: pointer; font-weight: 700; color: var(--ink-2); font-family: var(--doc); font-size: 15px; }
.fmt button:hover { background: var(--surface-2); color: var(--ink); }
.sheet-wrap { background: #e9ece8; border-radius: var(--radius); padding: 28px 20px; }
.sheet { background: #fff; max-width: 816px; min-height: 1056px; margin: 0 auto; padding: 72px 76px; box-shadow: 0 2px 8px rgba(0, 0, 0, .12), 0 12px 40px rgba(0, 0, 0, .08); font-family: var(--doc); font-size: 15.5px; line-height: 1.55; color: #111; }
.sheet:focus { outline: none; box-shadow: 0 0 0 3px rgba(91, 165, 27, .35), 0 12px 40px rgba(0, 0, 0, .08); }
.sheet h1, .sheet h2, .sheet h3 { font-family: var(--doc); font-stretch: normal; letter-spacing: 0; color: #111; }
.sheet h1 { font-size: 20px; margin: 4px 0 14px; }
.sheet h2 { font-size: 17px; margin: 18px 0 8px; }
.sheet h3 { font-size: 15.5px; margin: 14px 0 6px; }
.sheet p { margin: 0 0 11px; }
.sheet table { width: 100%; border-collapse: collapse; margin: 6px 0 14px; }
.sheet td, .sheet th { vertical-align: top; padding: 4px 6px; }
.sheet .field-missing { background: #fff1b8; color: #8a2a00; font-weight: 700; padding: 0 2px; border-radius: 2px; }
.sheet .sig-block { margin: 26px 0 16px; }
.sheet .sig-line { border-bottom: 1px solid #222; width: 300px; min-height: 52px; display: flex; align-items: flex-end; }
.sheet .sig-line img { max-height: 54px; max-width: 280px; }
.sheet .sig-block p { margin: 3px 0; }
.sheet hr { border: 0; border-top: 1px solid #888; margin: 16px 0; }
.sheet ul, .sheet ol { padding-left: 26px; }
.sheet[contenteditable=false] { cursor: default; }
.side-card h3 { margin-bottom: 8px; }
.side-card ul { margin: 0; padding-left: 18px; font-size: 14px; }
.side-card li { margin-bottom: 5px; }
.sources a { display: block; font-size: 13px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* ---------- signature pad ---------- */
.sig-pad { border: 1px dashed #aab5ad; border-radius: 8px; background: #fff; position: relative; touch-action: none; }
.sig-pad canvas { display: block; width: 100%; height: 170px; cursor: crosshair; }
.sig-pad .base { position: absolute; left: 24px; right: 24px; bottom: 36px; border-bottom: 1px solid #c5ccc7; pointer-events: none; }
.sig-pad .x { position: absolute; left: 10px; bottom: 38px; color: #aab5ad; font-size: 18px; pointer-events: none; }
.sig-typed { font-family: 'Brush Script MT', 'Segoe Script', 'Lucida Handwriting', cursive; font-size: 40px; text-align: center; padding: 30px 10px; border: 1px dashed #aab5ad; border-radius: 8px; min-height: 120px; }
.seg { display: inline-flex; background: var(--line-2); border-radius: 8px; padding: 3px; gap: 2px; margin-bottom: 10px; }
.seg button { border: 0; background: none; font: inherit; font-size: 13.5px; font-weight: 600; padding: 6px 12px; border-radius: 6px; cursor: pointer; color: var(--ink-2); }
.seg button.on { background: #fff; color: var(--ink); box-shadow: 0 1px 2px rgba(0, 0, 0, .1); }

/* ---------- chat ---------- */
.chat { display: flex; flex-direction: column; height: calc(100vh - 210px); min-height: 420px; }
.chat .msgs { flex: 1; overflow-y: auto; padding: 18px; display: flex; flex-direction: column; gap: 14px; }
.chat .msg { max-width: 82%; padding: 11px 14px; border-radius: 12px; font-size: 14.5px; line-height: 1.55; }
.chat .msg.user { align-self: flex-end; background: var(--pine); color: #fff; border-bottom-right-radius: 4px; white-space: pre-wrap; }
.chat .msg.assistant { align-self: flex-start; background: var(--surface-2); border: 1px solid var(--line); border-bottom-left-radius: 4px; }
.chat .msg.assistant p:last-child { margin-bottom: 0; }
.chat .msg.assistant ul, .chat .msg.assistant ol { margin: 4px 0 10px; padding-left: 20px; }
.chat .msg .srcs { margin-top: 8px; padding-top: 8px; border-top: 1px solid var(--line); font-size: 12.5px; }
.chat .msg .srcs a { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.chat form { display: flex; gap: 8px; padding: 12px; border-top: 1px solid var(--line); }
.chat form textarea { min-height: 46px; height: 46px; }
.chat .typing { color: var(--ink-3); font-size: 14px; }
.suggestions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; justify-content: center; }
.suggestions button { border: 1px solid var(--line); background: #fff; border-radius: 999px; padding: 7px 13px; font: inherit; font-size: 13.5px; cursor: pointer; color: var(--ink-2); }
.suggestions button:hover { border-color: var(--leaf); color: var(--pine-2); }

/* ---------- modal ---------- */
.modal-bg { position: fixed; inset: 0; background: rgba(16, 28, 22, .48); display: grid; place-items: center; z-index: 100; padding: 20px; animation: fade .12s ease-out; }
.modal { background: var(--surface); border-radius: 14px; box-shadow: var(--shadow-lg); width: 100%; max-width: 560px; max-height: calc(100vh - 40px); display: flex; flex-direction: column; animation: pop .14s ease-out; }
.modal.wide { max-width: 820px; }
.modal-h { padding: 18px 22px 12px; display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; }
.modal-h p { margin: 4px 0 0; color: var(--ink-2); font-size: 14px; }
.modal-b { padding: 6px 22px 18px; overflow-y: auto; }
.modal-f { padding: 14px 22px; border-top: 1px solid var(--line-2); display: flex; justify-content: flex-end; gap: 8px; background: var(--surface-2); border-radius: 0 0 14px 14px; }
.modal-x { border: 0; background: none; font-size: 22px; line-height: 1; cursor: pointer; color: var(--ink-3); padding: 4px; }
@keyframes fade { from { opacity: 0; } }
@keyframes pop { from { transform: translateY(8px) scale(.98); opacity: 0; } }

/* AI working overlay */
.working { text-align: center; padding: 26px 10px 10px; }
.working .orb { width: 64px; height: 64px; margin: 0 auto 18px; border-radius: 50%; background: conic-gradient(from 0deg, var(--leaf), var(--pine), #a8d978, var(--leaf)); animation: spin 1.2s linear infinite; position: relative; }
.working .orb::after { content: ''; position: absolute; inset: 7px; border-radius: 50%; background: #fff; }
.working .msg { font-weight: 650; font-size: 16px; }
.working .sub { color: var(--ink-3); font-size: 13.5px; margin-top: 6px; }
@keyframes spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .working .orb { animation-duration: 4s; } .modal, .modal-bg { animation: none; } }
.spinner { width: 16px; height: 16px; border: 2px solid rgba(0, 0, 0, .15); border-top-color: currentColor; border-radius: 50%; animation: spin .7s linear infinite; display: inline-block; }

/* toasts */
#toasts { position: fixed; bottom: 18px; right: 18px; z-index: 200; display: flex; flex-direction: column; gap: 8px; max-width: 380px; pointer-events: none; }
.toast { background: var(--ink); color: #fff; padding: 11px 16px; border-radius: 9px; box-shadow: var(--shadow-lg); font-size: 14px; animation: pop .15s ease-out; }
.toast.ok { background: #0f5126; }
.toast.err { background: #8c1d14; }

/* ---------- auth ---------- */
.auth { min-height: 100vh; display: grid; grid-template-columns: 1fr 1fr; }
.auth-art { background: #0d4f25; color: #eaf5e3; padding: 56px; display: flex; flex-direction: column; justify-content: space-between; position: relative; overflow: hidden; }
.auth-art::after { content: ''; position: absolute; right: -120px; bottom: -80px; width: 520px; height: 420px; background: linear-gradient(135deg, rgba(91, 165, 27, .55), rgba(91, 165, 27, 0)); clip-path: polygon(50% 0, 100% 40%, 100% 100%, 0 100%, 0 40%); }
.auth-art h2 { font-size: 38px; font-weight: 800; font-stretch: 115%; line-height: 1.08; color: #fff; max-width: 460px; }
.auth-art .steps { list-style: none; padding: 0; margin: 28px 0 0; position: relative; z-index: 1; }
.auth-art .steps li { display: flex; gap: 14px; align-items: flex-start; padding: 10px 0; font-size: 15.5px; color: #d6ebcc; }
.auth-art .steps li b { color: #fff; display: block; }
.auth-art .steps .k { width: 30px; height: 30px; border-radius: 50%; border: 2px solid #8fdc5c; color: #8fdc5c; display: grid; place-items: center; font-weight: 750; flex: none; font-family: var(--display); }
.auth-art small { color: #a9cf98; position: relative; z-index: 1; }
.auth-form { display: grid; place-items: center; padding: 40px 24px; background: var(--surface); }
.auth-form .box { width: 100%; max-width: 380px; }
.auth-form .logo { width: 250px; margin-bottom: 26px; }
.auth-form h1 { margin-bottom: 6px; }
.auth-form .sub { color: var(--ink-2); margin-bottom: 22px; }

/* ---------- misc ---------- */
.row-flex { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.between { display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; }
.mt { margin-top: 14px; }
.mt-s { margin-top: 8px; }
.mb { margin-bottom: 14px; }
.nowrap { white-space: nowrap; }
.right { text-align: right; }
.filters { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; margin-bottom: 14px; }
.filters input[type=search] { max-width: 280px; }
.chipset { display: inline-flex; gap: 4px; background: var(--surface); border: 1px solid var(--line); border-radius: 9px; padding: 3px; }
.chipset button { border: 0; background: none; font: inherit; font-size: 13.5px; padding: 5px 11px; border-radius: 6px; cursor: pointer; color: var(--ink-2); font-weight: 600; }
.chipset button.on { background: var(--pine); color: #fff; }
.md p { margin: 0 0 9px; }
.md h3, .md h4 { margin: 10px 0 6px; font-size: 15px; }
.md code { background: var(--line-2); padding: 1px 4px; border-radius: 4px; font-size: 13px; }
dl.facts { display: grid; grid-template-columns: 170px 1fr; gap: 8px 16px; margin: 0; font-size: 14.5px; }
dl.facts dt { color: var(--ink-3); }
dl.facts dd { margin: 0; }
.rules-sec { padding: 14px 0; border-bottom: 1px solid var(--line-2); }
.rules-sec:last-child { border-bottom: 0; }
.rules-sec h3 { margin-bottom: 6px; }
.rules-sec p { color: var(--ink-2); font-size: 14.5px; }
.temp-pass { font-family: ui-monospace, Menlo, Consolas, monospace; font-size: 18px; background: var(--surface-2); border: 1px solid var(--line); border-radius: 8px; padding: 10px 14px; user-select: all; }
.agenda-day { display: grid; grid-template-columns: 120px 1fr; gap: 16px; padding: 14px 18px; border-bottom: 1px solid var(--line-2); }
.agenda-day:last-child { border-bottom: 0; }
.agenda-day .dl b { display: block; font-family: var(--display); font-size: 16px; }
.agenda-day .dl span { color: var(--ink-3); font-size: 13px; }
.agenda-day.today { background: #f6fbf2; }
.agenda-item { display: flex; gap: 10px; align-items: center; padding: 4px 0; }
.agenda-item a { font-weight: 600; text-decoration: none; color: var(--ink); }
.agenda-item a:hover { color: var(--pine); text-decoration: underline; }

/* ---------- responsive ---------- */
@media (max-width: 1100px) {
  .grid-2, .doc-layout { grid-template-columns: 1fr; }
  .strip { grid-template-columns: repeat(2, 1fr); }
  .strip > div:nth-child(3) { border-left: 0; }
  .strip > div:nth-child(n+3) { border-top: 1px solid var(--line-2); }
}
@media (max-width: 860px) {
  .shell { grid-template-columns: 1fr; }
  .side { position: fixed; left: 0; top: 0; bottom: 0; width: 270px; z-index: 60; transform: translateX(-100%); transition: transform .2s; box-shadow: var(--shadow-lg); }
  .shell.nav-open .side { transform: none; }
  .shell.nav-open::after { content: ''; position: fixed; inset: 0; background: rgba(0, 0, 0, .3); z-index: 50; }
  .topbar { display: flex; align-items: center; gap: 12px; padding: 10px 16px; background: var(--surface); border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 40; }
  .topbar img { height: 30px; }
  .topbar button { border: 0; background: none; padding: 6px; cursor: pointer; }
  .content { padding: 18px 16px 30px; }
  .footer-note { padding: 0 16px 20px; }
  .form-grid, .form-grid.three, .grid-2e, .court-opts, .checks { grid-template-columns: 1fr; }
  .auth { grid-template-columns: 1fr; }
  .auth-art { display: none; }
  .today-list li { grid-template-columns: 72px 1fr; }
  .today-list li > :last-child { grid-column: 2; }
  .kv, dl.facts { grid-template-columns: 1fr; }
  .kv dt, dl.facts dt { margin-top: 6px; }
  .sheet { padding: 36px 24px; min-height: 0; }
  .sheet-wrap { padding: 10px; }
  .agenda-day { grid-template-columns: 1fr; gap: 6px; }
  .chat .msg { max-width: 94%; }
  .step-when { grid-template-columns: 1fr; }
  .bigdate { border-right: 0; padding-right: 0; display: flex; gap: 8px; align-items: baseline; text-align: left; }
  .bigdate .d { font-size: 28px; }
  .hello { font-size: 24px; }
}

@media print {
  .side, .topbar, .doc-toolbar, .doc-side, .footer-note, #toasts { display: none !important; }
  .shell { display: block; }
  .content { padding: 0; }
  .sheet-wrap { background: none; padding: 0; }
  .sheet { box-shadow: none; padding: 0; max-width: none; min-height: 0; }
  .sheet .field-missing { background: none; }
}

/* =================== v2: panels, search, ledger, files, guide =================== */
.logo-dark { display: none !important; }
.imp-bar { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; padding: 10px 34px; background: #3b2a7a; color: #fff; font-size: 14px; }
.imp-bar .btn { margin-left: auto; }
.side-search { display: flex; align-items: center; gap: 9px; margin: 2px 12px 10px; padding: 8px 11px; border: 1px solid var(--line); border-radius: 8px; background: var(--surface-2); color: var(--ink-3); font: inherit; font-size: 14px; cursor: pointer; text-align: left; }
.side-search:hover { border-color: var(--leaf); color: var(--ink); }
.side-search span { flex: 1; }
.side-search kbd, kbd { font-family: inherit; font-size: 11.5px; border: 1px solid var(--line); border-radius: 5px; padding: 1px 6px; background: var(--surface); color: var(--ink-3); }
.tb-search { margin-left: auto; }
.tb-title { font-family: var(--display); font-size: 16px; }
.search-modal { max-width: 620px; }
.search-modal input { font-size: 16px; padding: 12px 14px; }
.search-results { margin-top: 10px; max-height: 60vh; overflow-y: auto; }
.search-results .sr-group { font-size: 12.5px; font-weight: 650; color: var(--ink-3); padding: 10px 4px 4px; }
.search-results a { display: flex; justify-content: space-between; gap: 12px; padding: 9px 10px; border-radius: 8px; color: var(--ink); text-decoration: none; }
.search-results a span { color: var(--ink-3); font-size: 13.5px; text-align: right; }
.search-results a:hover, .search-results a.sel { background: var(--pine-soft); }
.portal-tag { display: inline-block; font-size: 12px; font-weight: 700; letter-spacing: .02em; color: #0f5126; background: #d9f0c5; border-radius: 6px; padding: 3px 8px; }
.portal-tag.big { font-size: 13px; margin-bottom: 18px; }
.cred { border: 1px solid var(--line); border-radius: 10px; padding: 12px 14px; margin-bottom: 10px; background: var(--surface-2); font-size: 15px; }
.cred .label { margin-bottom: 4px; }
.balance-cards { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; margin-bottom: 14px; }
.balance-cards > div { border: 1px solid var(--line); border-radius: 9px; padding: 10px 12px; }
.balance-cards b { display: block; font-family: var(--display); font-size: 20px; font-stretch: 110%; }
.balance-cards span { font-size: 13px; color: var(--ink-3); }
.amt-plus { color: var(--red); }
.amt-minus { color: var(--pine); }
.file-row { display: flex; align-items: center; gap: 10px; padding: 10px 18px; border-bottom: 1px solid var(--line-2); }
.file-row:last-child { border-bottom: 0; }
.file-row .nm { flex: 1; min-width: 0; }
.file-row .nm b { display: block; font-size: 14.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.file-row .nm span { font-size: 12.5px; color: var(--ink-3); }
.dropzone { border: 2px dashed var(--line); border-radius: 10px; padding: 18px; text-align: center; color: var(--ink-2); cursor: pointer; transition: border-color .12s, background .12s; }
.dropzone:hover, .dropzone.over { border-color: var(--leaf); background: var(--leaf-soft); }
.guide-steps { counter-reset: g; list-style: none; padding: 0; margin: 0; }
.guide-steps > li { position: relative; padding: 0 0 22px 56px; }
.guide-steps > li::before { counter-increment: g; content: counter(g); position: absolute; left: 0; top: 0; width: 38px; height: 38px; border-radius: 50%; background: var(--pine); color: #fff; display: grid; place-items: center; font-family: var(--display); font-weight: 800; font-size: 17px; }
.guide-steps > li::after { content: ''; position: absolute; left: 18px; top: 42px; bottom: 4px; width: 2px; background: var(--line); }
.guide-steps > li:last-child::after { display: none; }
.guide-steps h3 { font-size: 17px; margin: 6px 0 6px; }
.guide-steps p { color: var(--ink-2); margin-bottom: 6px; }
.faq details { border-bottom: 1px solid var(--line-2); padding: 12px 0; }
.faq summary { cursor: pointer; font-weight: 650; }
.faq details p { color: var(--ink-2); margin: 8px 0 0; }

/* ---------- Admin Panel: its own look ---------- */
.admin-shell .side { background: #0f2219; border-right-color: #0a1811; }
.admin-shell .side .brand { display: flex; flex-direction: column; gap: 8px; align-items: flex-start; }
.admin-shell .nav a { color: #b8cdbf; }
.admin-shell .nav a:hover { background: rgba(255, 255, 255, .06); color: #fff; }
.admin-shell .nav a.active { background: rgba(143, 220, 92, .14); color: #fff; }
.admin-shell .side-foot { border-top-color: rgba(255, 255, 255, .08); }
.admin-shell .me .who b { color: #fff; }
.admin-shell .me .who span { color: #8fa898; }
.admin-shell .side-foot .btn.ghost { color: #b8cdbf; }
.admin-shell .side-foot .btn.ghost:hover { background: rgba(255, 255, 255, .06); color: #fff; }
.admin-shell .avatar { background: #8fdc5c; color: #0f2219; }
.admin-auth .auth-art { background: #0f2219; }

/* ---------- dark theme ---------- */
:root[data-theme="dark"] {
  --paper: #0e1411; --surface: #151d19; --surface-2: #1a2420; --ink: #e7eee9; --ink-2: #b4c1b9; --ink-3: #85938b;
  --line: #2a3731; --line-2: #212c27; --pine: #2f9a57; --pine-2: #3db466; --pine-soft: #17321f; --leaf: #7ac943; --leaf-soft: #1c3114;
  --amber: #f0b456; --amber-soft: #3a2b12; --red: #ff8a7d; --red-soft: #3a1a17; --blue: #8ab8f2; --blue-soft: #15263b; --violet: #b9a6ff; --violet-soft: #251e3e;
  --shadow: 0 1px 2px rgba(0, 0, 0, .3); color-scheme: dark;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --paper: #0e1411; --surface: #151d19; --surface-2: #1a2420; --ink: #e7eee9; --ink-2: #b4c1b9; --ink-3: #85938b;
    --line: #2a3731; --line-2: #212c27; --pine: #2f9a57; --pine-2: #3db466; --pine-soft: #17321f; --leaf: #7ac943; --leaf-soft: #1c3114;
    --amber: #f0b456; --amber-soft: #3a2b12; --red: #ff8a7d; --red-soft: #3a1a17; --blue: #8ab8f2; --blue-soft: #15263b; --violet: #b9a6ff; --violet-soft: #251e3e;
    --shadow: 0 1px 2px rgba(0, 0, 0, .3); color-scheme: dark;
  }
}

:root[data-theme="dark"] .logo-light { display: none !important; }
:root[data-theme="dark"] .logo-dark { display: block !important; }
:root[data-theme="dark"] .topbar .logo-dark { display: inline !important; }
:root[data-theme="dark"] a { color: #6fcf8f; }
:root[data-theme="dark"] a:hover { color: #93dfaa; }
:root[data-theme="dark"] input[type=text],:root[data-theme="dark"] input[type=email],:root[data-theme="dark"] input[type=password],:root[data-theme="dark"] input[type=number],:root[data-theme="dark"] input[type=date],:root[data-theme="dark"] input[type=time],:root[data-theme="dark"] input[type=tel],:root[data-theme="dark"] input[type=url],:root[data-theme="dark"] input[type=search],:root[data-theme="dark"] select,:root[data-theme="dark"] textarea { background: var(--surface-2); border-color: var(--line); color: var(--ink); }
:root[data-theme="dark"] .doc-chip,:root[data-theme="dark"] .court-opts > div,:root[data-theme="dark"] .suggestions button,:root[data-theme="dark"] .auth-form { background: var(--surface); }
:root[data-theme="dark"] .court-box { background: #1b1730; border-color: #3a3166; }
:root[data-theme="dark"] .court-opts > div { border-color: #3a3166; }
:root[data-theme="dark"] .step-when { background: linear-gradient(180deg, #17301f, var(--surface)); }
:root[data-theme="dark"] .step-when.wait { background: linear-gradient(180deg, #33270f, var(--surface)); }
:root[data-theme="dark"] .sheet-wrap { background: #0a0f0c; }
:root[data-theme="dark"] table.t tr.click:hover td { background: #1b2a22; }
:root[data-theme="dark"] .agenda-day.today { background: #15261c; }
:root[data-theme="dark"] .seg button.on { background: var(--surface); color: var(--ink); }
:root[data-theme="dark"] .callout.warn { border-color: #5a4316; color: #f6d9a6; }
:root[data-theme="dark"] .callout.danger { border-color: #5c2621; color: #ffc2bb; }
:root[data-theme="dark"] .callout.info { border-color: #23405f; color: #c4dcf7; }
:root[data-theme="dark"] .callout.ok { border-color: #24502f; color: #bfe8c9; }
:root[data-theme="dark"] .pill { background: var(--line); }
:root[data-theme="dark"] .pill.green { color: #9fe0b3; }
:root[data-theme="dark"] .pill.leaf { color: #b6e690; }
:root[data-theme="dark"] .pill.amber { color: var(--amber); }
:root[data-theme="dark"] .pill.red { color: var(--red); }
:root[data-theme="dark"] .pill.blue { color: var(--blue); }
:root[data-theme="dark"] .pill.violet { color: var(--violet); }
:root[data-theme="dark"] .btn.danger { border-color: #5c2621; }
:root[data-theme="dark"] .portal-tag { background: #24502f; color: #c9f0a9; }
:root[data-theme="dark"] .chat .msg.user { background: #24723f; }
:root[data-theme="dark"] .datechip.now .d { color: #b6e690; }
:root[data-theme="dark"] .docket .dot { background: var(--surface); }
:root[data-theme="dark"] .money.due { color: var(--red); }
:root[data-theme="dark"] .modal-bg { background: rgba(0, 0, 0, .6); }
:root[data-theme="dark"] .sig-pad { background: #fff; }
@media (prefers-color-scheme: dark) {
:root:not([data-theme="light"]) .logo-light { display: none !important; }
:root:not([data-theme="light"]) .logo-dark { display: block !important; }
:root:not([data-theme="light"]) .topbar .logo-dark { display: inline !important; }
:root:not([data-theme="light"]) a { color: #6fcf8f; }
:root:not([data-theme="light"]) a:hover { color: #93dfaa; }
:root:not([data-theme="light"]) input[type=text],:root:not([data-theme="light"]) input[type=email],:root:not([data-theme="light"]) input[type=password],:root:not([data-theme="light"]) input[type=number],:root:not([data-theme="light"]) input[type=date],:root:not([data-theme="light"]) input[type=time],:root:not([data-theme="light"]) input[type=tel],:root:not([data-theme="light"]) input[type=url],:root:not([data-theme="light"]) input[type=search],:root:not([data-theme="light"]) select,:root:not([data-theme="light"]) textarea { background: var(--surface-2); border-color: var(--line); color: var(--ink); }
:root:not([data-theme="light"]) .doc-chip,:root:not([data-theme="light"]) .court-opts > div,:root:not([data-theme="light"]) .suggestions button,:root:not([data-theme="light"]) .auth-form { background: var(--surface); }
:root:not([data-theme="light"]) .court-box { background: #1b1730; border-color: #3a3166; }
:root:not([data-theme="light"]) .court-opts > div { border-color: #3a3166; }
:root:not([data-theme="light"]) .step-when { background: linear-gradient(180deg, #17301f, var(--surface)); }
:root:not([data-theme="light"]) .step-when.wait { background: linear-gradient(180deg, #33270f, var(--surface)); }
:root:not([data-theme="light"]) .sheet-wrap { background: #0a0f0c; }
:root:not([data-theme="light"]) table.t tr.click:hover td { background: #1b2a22; }
:root:not([data-theme="light"]) .agenda-day.today { background: #15261c; }
:root:not([data-theme="light"]) .seg button.on { background: var(--surface); color: var(--ink); }
:root:not([data-theme="light"]) .callout.warn { border-color: #5a4316; color: #f6d9a6; }
:root:not([data-theme="light"]) .callout.danger { border-color: #5c2621; color: #ffc2bb; }
:root:not([data-theme="light"]) .callout.info { border-color: #23405f; color: #c4dcf7; }
:root:not([data-theme="light"]) .callout.ok { border-color: #24502f; color: #bfe8c9; }
:root:not([data-theme="light"]) .pill { background: var(--line); }
:root:not([data-theme="light"]) .pill.green { color: #9fe0b3; }
:root:not([data-theme="light"]) .pill.leaf { color: #b6e690; }
:root:not([data-theme="light"]) .pill.amber { color: var(--amber); }
:root:not([data-theme="light"]) .pill.red { color: var(--red); }
:root:not([data-theme="light"]) .pill.blue { color: var(--blue); }
:root:not([data-theme="light"]) .pill.violet { color: var(--violet); }
:root:not([data-theme="light"]) .btn.danger { border-color: #5c2621; }
:root:not([data-theme="light"]) .portal-tag { background: #24502f; color: #c9f0a9; }
:root:not([data-theme="light"]) .chat .msg.user { background: #24723f; }
:root:not([data-theme="light"]) .datechip.now .d { color: #b6e690; }
:root:not([data-theme="light"]) .docket .dot { background: var(--surface); }
:root:not([data-theme="light"]) .money.due { color: var(--red); }
:root:not([data-theme="light"]) .modal-bg { background: rgba(0, 0, 0, .6); }
:root:not([data-theme="light"]) .sig-pad { background: #fff; }
}
@media (max-width: 860px) {
  .imp-bar { padding: 10px 16px; }
  .balance-cards { grid-template-columns: 1fr; }
  .topbar .tb-search { margin-left: auto; }
  .search-results a { flex-direction: column; gap: 2px; }
  .search-results a span { text-align: left; }
}
/* grid children must be allowed to shrink so wide tables scroll inside their panel on phones */
.grid-2 > *, .grid-2e > *, .stack > *, .case-head > *, .main, .content { min-width: 0; }
.side-foot .row-flex { display: flex; flex-wrap: wrap; gap: 2px; }
.side-foot .row-flex .btn { padding: 5px 8px; }
@media (max-width: 860px) { .case-head > div[style] { min-width: 0 !important; width: 100%; } }

/* ---------- phone layout: tables become stacked cards, nothing scrolls sideways ---------- */
@media (max-width: 860px) {
  table.t.cards thead { display: none; }
  table.t.cards, table.t.cards tbody, table.t.cards tr, table.t.cards td { display: block; width: 100%; }
  table.t.cards tr { padding: 10px 14px; border-bottom: 1px solid var(--line-2); }
  table.t.cards tr:last-child { border-bottom: 0; }
  table.t.cards td { display: flex; justify-content: space-between; align-items: center; gap: 14px; padding: 4px 0; border: 0; text-align: right; }
  table.t.cards td.num { text-align: right; }
  table.t.cards td::before { content: attr(data-label); color: var(--ink-3); font-size: 13px; font-weight: 600; text-align: left; flex: none; max-width: 45%; }
  table.t.cards td[data-label=""]::before, table.t.cards td:not([data-label])::before { content: none; }
  table.t.cards td:first-child { display: block; text-align: left; font-size: 15.5px; padding-bottom: 6px; }
  table.t.cards td:first-child::before { content: none; }
  table.t.cards td.primary-cell, table.t.cards td.primary-cell b, table.t.cards td.primary-cell span { text-align: left; }
  table.t.cards td:not(:first-child).primary-cell { display: flex; }
  table.t.cards td:not(:first-child).primary-cell b, table.t.cards td:not(:first-child).primary-cell span { text-align: right; }
  table.t.cards td.right { justify-content: flex-end; }
  table.t.cards td:empty { display: none; }
  .table-wrap { overflow-x: visible; }
  .tabs { flex-wrap: wrap; gap: 0; border-bottom: 0; }
  .tabs button { padding: 8px 10px; font-size: 14px; border: 1px solid var(--line); border-radius: 8px; margin: 0 6px 6px 0; }
  .tabs button.on { background: var(--pine-soft); border-color: var(--leaf); }
  .doc-toolbar { position: static; }
  .fmt { flex-wrap: wrap; max-width: 100%; }
  #title { max-width: 100% !important; min-width: 0; }
  .doc-toolbar .sep { display: none; }
  .step-actions .btn:not(.ghost) { flex: 1 1 auto; white-space: normal; text-align: center; }
  .page-head .actions .btn, .doc-toolbar .btn { white-space: normal; }
  .agenda-item { flex-wrap: wrap; gap: 4px 8px; }
  .page-head .actions { width: 100%; }
  .page-head .actions .btn { flex: 1 1 auto; }
  .strip .v { font-size: 22px; }
}

/* "Part of the Landlord 360 Network" badge */
.l360 { display: inline-flex; align-items: center; gap: 6px; font-size: 9.5px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--ink-3); text-decoration: none; white-space: nowrap; line-height: 1; }
.l360:hover { color: var(--ink); }
.l360 img.l360-i, .side .brand .l360 img.l360-i { width: 15px; height: 15px; border-radius: 4px; display: block; }
.l360 img.l360-w, .side .brand .l360 img.l360-w { width: auto; height: 8px; display: block; }
.l360-dark { color: #a9bcae; }
.l360-dark:hover { color: #fff; }
.side .brand > a:first-child { display: block; }
.side .brand .l360 { margin-top: 8px; }
.auth-form .box .l360 { margin: -6px 0 18px; }

/* ---- delivery add-ons (process server, certified mail) ---- */
.delivery-box { border: 1px solid #cfe3d4; background: var(--surface-2); border-radius: 8px; padding: 12px 14px; margin-top: 12px; }
.delivery-box h4 { font-family: var(--display); font-size: 14.5px; margin: 0; color: var(--pine-2); display: flex; align-items: center; gap: 6px; }
.delivery-box h4 .i { width: 17px; height: 17px; }
.delivery-box > p { margin: 4px 0 10px; font-size: 13.5px; }
.dl-options { display: grid; gap: 8px; }
.dl-opt { display: flex; gap: 12px; align-items: flex-start; background: var(--surface); border: 1px solid var(--line); border-radius: 8px; padding: 10px 12px; }
.dl-opt.off { opacity: .75; }
.dl-ic { width: 34px; height: 34px; border-radius: 8px; background: var(--pine-soft); color: var(--pine); display: grid; place-items: center; flex: none; }
.dl-ic .i { width: 19px; height: 19px; }
.dl-main { flex: 1; min-width: 0; font-size: 13.5px; }
.dl-main b { font-size: 14.5px; }
.dl-buy { text-align: right; display: grid; gap: 6px; justify-items: end; flex: none; }
.dl-buy .price, .buy-row .price { font-family: var(--display); font-weight: 700; font-size: 17px; color: var(--ink); }
.dl-orders { margin-top: 10px; display: grid; gap: 8px; }
.dl-order { background: var(--surface); border: 1px solid var(--line); border-radius: 8px; padding: 10px 12px; font-size: 13.5px; }
.dl-feed { list-style: none; margin: 8px 0 0; padding: 0 0 0 14px; border-left: 2px solid var(--line); display: grid; gap: 6px; }
.dl-feed li { position: relative; }
.dl-feed li::before { content: ''; position: absolute; left: -19px; top: 6px; width: 8px; height: 8px; border-radius: 50%; background: var(--leaf); }
.dl-feed .when { display: block; font-size: 12px; color: var(--ink-3); }
.dl-feed a { font-size: 12.5px; margin-left: 6px; display: inline-flex; align-items: center; gap: 3px; }
.dl-feed a .i { width: 13px; height: 13px; }
@media (max-width: 640px) { .dl-opt { flex-wrap: wrap; } .dl-buy { width: 100%; grid-auto-flow: column; justify-content: space-between; align-items: center; } }
:root[data-theme="dark"] .delivery-box { background: #142019; border-color: #24402d; }

/* ---- plans and billing ---- */
.pay-bar { background: var(--amber-soft); color: var(--amber); border-bottom: 1px solid #f1d6a6; }
.pay-off-bar { background: var(--red); color: #fff; }
.pay-off-bar .btn { background: #fff; color: var(--red); border-color: #fff; }
.buy-row { display: flex; justify-content: space-between; align-items: center; gap: 12px; border: 1px solid var(--line); border-radius: 8px; padding: 12px 14px; margin-top: 10px; background: var(--surface); }
.plan-toggle { display: inline-flex; border: 1px solid var(--line); border-radius: 999px; padding: 3px; background: var(--surface); }
.plan-toggle button { border: 0; background: none; padding: 6px 14px; border-radius: 999px; font: inherit; font-size: 13.5px; cursor: pointer; color: var(--ink-2); }
.plan-toggle button.on { background: var(--pine); color: #fff; }
.plan-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 12px; }
.plan-card { border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; background: var(--surface); display: flex; flex-direction: column; gap: 8px; }
.plan-card.current { border-color: var(--pine); box-shadow: 0 0 0 2px var(--pine-soft); }
.plan-card h3 { margin: 0; font-family: var(--display); }
.plan-card .amt { font-family: var(--display); font-size: 28px; font-weight: 800; line-height: 1.1; }
.plan-card .amt small { font-size: 13px; font-weight: 500; color: var(--ink-3); }
.plan-card ul { margin: 4px 0 8px; padding-left: 18px; font-size: 13.5px; color: var(--ink-2); }
.plan-card .btn { margin-top: auto; justify-content: center; }
.meter { height: 8px; border-radius: 999px; background: var(--line-2); overflow: hidden; margin-top: 6px; }
.meter i { display: block; height: 100%; background: var(--leaf); }
.checkout-card { max-width: 460px; margin: 30px auto; }

/* ---- process server job page ---- */
.serve-page { background: var(--paper); }
.serve-top { display: flex; align-items: center; gap: 12px; padding: 12px 16px; background: var(--surface); border-bottom: 1px solid var(--line); }
.serve-top span { font-family: var(--display); font-weight: 700; color: var(--ink-2); font-size: 14px; border-left: 1px solid var(--line); padding-left: 12px; }
.serve-main { max-width: 640px; margin: 0 auto; padding: 16px; }
.serve-h { font-size: 24px; margin: 4px 0 6px; }
.serve-addr { display: flex; gap: 6px; align-items: flex-start; font-size: 15.5px; }
.serve-addr .i { flex: none; margin-top: 3px; color: var(--pine); }
.serve-methods { list-style: none; padding: 0; margin: 0; display: grid; gap: 6px; }
.serve-methods .i { color: var(--pine); width: 16px; height: 16px; vertical-align: -3px; }
.seg { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-bottom: 4px; }
.seg label { border: 1px solid var(--line); border-radius: 8px; padding: 11px 12px; display: flex; gap: 8px; align-items: center; font-weight: 600; background: var(--surface); cursor: pointer; }
.seg label:has(input:checked) { border-color: var(--pine); background: var(--pine-soft); }
.serve-page .btn.lg { width: 100%; justify-content: center; }

/* ---------- Admin > Google Ads ---------- */
.ga-hero-in { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); gap: 28px; align-items: center; }
.ga-hero h2 { font-size: 22px; line-height: 1.25; margin: 4px 0 10px; }
.ga-kicker { text-transform: uppercase; letter-spacing: .08em; font-size: 12px; font-weight: 700; color: var(--pine-2, #1f8a3b); margin: 0; }
.ga-video { width: 100%; aspect-ratio: 16 / 9; border-radius: 12px; background: #0d1a12; }
.ga-progress { height: 10px; border-radius: 99px; background: var(--line, #e3e6e8); overflow: hidden; margin-top: 14px; }
.ga-progress i { display: block; height: 100%; background: var(--pine-2, #1f8a3b); border-radius: 99px; transition: width .3s; }
.ga-step-h { display: flex; gap: 14px; align-items: flex-start; margin-bottom: 8px; }
.ga-step-h h2 { margin: 2px 0 2px; font-size: 20px; }
.ga-step-h p { margin: 0; }
.ga-num { flex: none; width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; font-weight: 800; background: var(--pine-soft, #e6f2e9); color: var(--pine-2, #1f8a3b); }
.ga-num.done { background: var(--pine-2, #1f8a3b); color: #fff; }
.ga-how { margin: 10px 0 14px; }
.ga-how summary { cursor: pointer; font-weight: 700; color: var(--pine-2, #1f8a3b); }
.ga-how ol, .ga-step ol { padding-left: 22px; }
.ga-how li, .ga-big > li { margin: 8px 0; line-height: 1.55; }
.ga-red { color: var(--red, #b42318); }
.ga-inline { display: flex; gap: 10px; align-items: flex-end; flex-wrap: wrap; }
.ga-inline label { display: flex; flex-direction: column; gap: 4px; font-weight: 600; font-size: 14px; }
.ga-inline input { min-width: 200px; }
.ga-q { border: 0; border-top: 1px solid var(--line, #e3e6e8); margin: 0; padding: 18px 0 8px; }
.ga-q legend { font-weight: 800; font-size: 16px; padding: 0 0 8px; }
.ga-cards { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-bottom: 12px; }
.ga-card { display: flex; flex-direction: column; gap: 6px; border: 2px solid var(--line, #e3e6e8); border-radius: 12px; padding: 14px 16px; cursor: pointer; }
.ga-card.on { border-color: var(--pine-2, #1f8a3b); background: var(--pine-soft, #f1f8f3); }
.ga-card input { position: absolute; opacity: 0; pointer-events: none; }
.ga-card .pill { align-self: flex-start; }
.ga-hours select, .ga-county-add select { width: auto; min-width: 140px; }
.ga-inline input { font: inherit; padding: 9px 11px; border: 1.5px solid var(--line, #dde1e5); border-radius: 8px; background: var(--paper, #fff); color: inherit; }
.ga-card > span:last-child { color: var(--ink-2, #4b525a); font-size: 14px; line-height: 1.45; }
.ga-num-in { display: inline-flex; align-items: center; gap: 10px; font-weight: 600; margin: 6px 0; }
.ga-num-in input { width: 110px; }
.ga-est { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; margin: 12px 0 6px; }
.ga-est div { background: var(--mist, #f4f6f7); border-radius: 10px; padding: 10px 12px; }
.ga-est b { display: block; font-size: 18px; }
.ga-est span { font-size: 13px; color: var(--ink-2, #4b525a); }
.ga-regions { margin: 8px 0 4px 26px; }
.ga-states { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 2px 10px; max-height: 260px; overflow: auto; border: 1px solid var(--line, #e3e6e8); border-radius: 10px; padding: 8px 10px; }
.check.sm { font-size: 14px; }
.ga-county-add { display: flex; gap: 8px; flex-wrap: wrap; margin: 10px 0; }
.chip { display: inline-flex; align-items: center; gap: 6px; padding: 4px 10px; border-radius: 99px; background: var(--mist, #f4f6f7); margin: 2px 4px 2px 0; font-size: 14px; }
.ga-hours { display: flex; flex-wrap: wrap; gap: 6px 12px; align-items: center; margin: 6px 0 10px 26px; }
.legend-2 { margin: 14px 0 4px; }
.ga-dl { display: flex; gap: 10px; flex-wrap: wrap; margin: 8px 0; }
.ga-preview { margin-top: 22px; }
.ga-ads { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 12px; }
.ga-ad { border: 1px solid var(--line, #e3e6e8); border-radius: 12px; padding: 14px 16px; background: var(--paper, #fff); font-family: Arial, sans-serif; }
.ga-ad-top { font-size: 13px; display: flex; gap: 8px; align-items: center; color: #202124; }
.ga-spons { font-weight: 700; }
.ga-site { color: #4d5156; overflow-wrap: anywhere; }
.ga-ad-h { color: #1a0dab; font-size: 18px; line-height: 1.3; margin: 6px 0 4px; }
.ga-ad-d { color: #4d5156; font-size: 14px; line-height: 1.5; }
.ga-ad-g { margin-top: 8px; font-size: 12px; color: var(--ink-3, #79818a); }
:root[data-theme="dark"] .ga-ad { background: #1f2124; } :root[data-theme="dark"] .ga-ad-h { color: #99c3ff; } :root[data-theme="dark"] .ga-ad-top, :root[data-theme="dark"] .ga-ad-d, :root[data-theme="dark"] .ga-site { color: #bdc1c6; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .ga-ad { background: #1f2124; } :root:not([data-theme="light"]) .ga-ad-h { color: #99c3ff; } :root:not([data-theme="light"]) .ga-ad-top, :root:not([data-theme="light"]) .ga-ad-d, :root:not([data-theme="light"]) .ga-site { color: #bdc1c6; } }
.ga-table td { vertical-align: top; }
.ga-table td:first-child { font-weight: 700; width: 38%; }
@media (max-width: 860px) { .ga-hero-in, .ga-cards, .ga-est { grid-template-columns: 1fr; } .ga-regions, .ga-hours { margin-left: 0; } }

/* API key boxes: masked like a password, but browsers don't autofill saved logins into them */
input[data-secret] { -webkit-text-security: disc; font-family: ui-monospace, Menlo, monospace; letter-spacing: .04em; }

[data-show-smtp][hidden], [data-show-api][hidden] { display: none !important; }

input.bad { border-color: #dc2626 !important; box-shadow: 0 0 0 3px rgba(220,38,38,.15); }

/* ---------- free-first paywall: locked case, assistant, rules and documents ---------- */
.unlock-card { border-color: #b9dcc3; background: linear-gradient(180deg, var(--pine-soft), var(--surface) 70%); margin-bottom: 18px; }
.unlock-head { display: flex; gap: 14px; align-items: flex-start; }
.unlock-head h2 { font-size: 19px; margin: 0 0 4px; }
.unlock-head p { margin: 0; }
.unlock-ic { flex: none; width: 42px; height: 42px; border-radius: 12px; display: grid; place-items: center; background: var(--surface); border: 1px solid #b9dcc3; color: var(--pine); }
.unlock-ic .i { width: 22px; height: 22px; stroke: currentColor; }
.unlock-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 16px; }
.unlock-actions .btn { white-space: normal; text-align: center; }
.locked-docket { padding: 14px 18px 6px; }
.locked-docket li .right .i { width: 16px; height: 16px; stroke: var(--ink-3); }
.locked-docket .row { cursor: default; }
.modal-f .btn.primary { white-space: normal; text-align: center; }
.pill.free { background: var(--blue-soft); color: var(--blue); }
.stripe-steps { list-style: none; padding: 0; margin: 14px 0 0; display: grid; gap: 14px; counter-reset: st; }
.stripe-steps > li { display: grid; grid-template-columns: 30px 1fr; gap: 12px; align-items: start; }
.stripe-steps > li::before { counter-increment: st; content: counter(st); width: 28px; height: 28px; border-radius: 50%; background: var(--pine); color: #fff; display: grid; place-items: center; font-weight: 700; font-family: var(--display); }
.stripe-steps > li > div { min-width: 0; }
.key-pic { margin-top: 8px; border: 1px solid var(--line); border-radius: 8px; background: var(--surface-2); padding: 10px 12px; font-size: 12.5px; max-width: 420px; }
.key-pic .kp-row { display: flex; justify-content: space-between; gap: 10px; padding: 6px 0; border-top: 1px solid var(--line-2); }
.key-pic .kp-row:first-of-type { border-top: 0; }
.key-pic .kp-row { flex-wrap: wrap; align-items: baseline; }
.key-pic .kp-row code { white-space: nowrap; }
.key-pic .kp-row > span:first-child { white-space: nowrap; min-width: 0; }
.key-pic .kp-row.hl { background: var(--leaf-soft); outline: 2px solid var(--leaf); border-radius: 6px; padding: 6px 8px; margin: 2px -8px; }
.key-pic .kp-cap { font-weight: 700; color: var(--ink-2); margin-bottom: 4px; }
.connect-result { margin-top: 12px; }
.stripe-paste { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 13px; }
@media (max-width: 560px) {
  .unlock-head { flex-direction: column; gap: 10px; }
  .unlock-actions .btn { width: 100%; }
  /* A long pay button gets its own row on a phone, with Not now beside nothing. */
  .modal-f:has([data-ask]), .modal-f:has([data-pay]), .modal-f:has([data-send]) { flex-wrap: wrap-reverse; }
  .modal-f [data-ask], .modal-f [data-pay], .modal-f [data-send] { flex: 1 1 100%; }
  .modal-f:has([data-ask]) [data-close], .modal-f:has([data-pay]) [data-close], .modal-f:has([data-send]) [data-close] { flex: 1 1 100%; }
}
:root[data-theme="dark"] .unlock-card, :root[data-theme="dark"] .unlock-ic { border-color: #2f5a3d; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .unlock-card, :root:not([data-theme="light"]) .unlock-ic { border-color: #2f5a3d; }
}

/* ---------- admin panel: five sections, name menu, phone tab bar ---------- */
.nav-sep { margin: 14px 12px 4px; font-size: 11.5px; letter-spacing: .04em; text-transform: uppercase; color: var(--ink-3); }
.admin-shell .nav-sep { color: rgba(255, 255, 255, .45); }
.me-btn { width: 100%; background: none; border: 0; padding: 6px; margin: -6px; border-radius: 10px; cursor: pointer; text-align: left; font: inherit; color: inherit; }
.me-btn:hover { background: rgba(255, 255, 255, .06); }
.me-caret { margin-left: auto; color: var(--ink-3); font-size: 12px; }
.admin-shell .me-caret { color: rgba(255, 255, 255, .55); }
.namemenu { display: none; position: fixed; left: 14px; bottom: 74px; width: 232px; z-index: 90; background: var(--surface); border: 1px solid var(--line); border-radius: 12px; box-shadow: var(--shadow-lg); padding: 6px; }
.menu-open .namemenu { display: block; }
.namemenu .nm-who { padding: 8px 10px 10px; border-bottom: 1px solid var(--line-2); margin-bottom: 4px; }
.namemenu .nm-who b { display: block; }
.namemenu .nm-who span { font-size: 12.5px; color: var(--ink-3); overflow-wrap: anywhere; }
.namemenu a, .namemenu .nm-btn { display: flex; gap: 10px; align-items: center; width: 100%; padding: 9px 10px; border-radius: 8px; color: var(--ink); text-decoration: none; background: none; border: 0; font: inherit; cursor: pointer; text-align: left; }
.namemenu a:hover, .namemenu .nm-btn:hover { background: var(--surface-2); }
.tabbar { display: none; }
.tb-me { margin-left: auto; border: 0; background: none; padding: 0; cursor: pointer; }
.tb-me .avatar { width: 32px; height: 32px; font-size: 13px; }
@media (max-width: 860px) {
  .admin-shell .side { display: none; }
  .admin-shell .topbar { padding: 10px 16px; }
  .admin-shell .namemenu { left: auto; right: 12px; top: 56px; bottom: auto; }
  .admin-shell .content { padding-bottom: calc(96px + env(safe-area-inset-bottom)); }
  .admin-shell .tabbar { display: grid; grid-template-columns: repeat(5, 1fr); position: fixed; left: 0; right: 0; bottom: 0; z-index: 70; background: var(--surface); border-top: 1px solid var(--line); padding: 4px 2px calc(4px + env(safe-area-inset-bottom)); box-shadow: 0 -4px 16px rgba(10, 30, 20, .06); }
  .tabbar a { display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 6px 0 4px; font-size: 11.5px; font-weight: 600; color: var(--ink-3); text-decoration: none; border-radius: 8px; min-width: 0; }
  .tabbar a svg { width: 22px; height: 22px; }
  .tabbar a.on { color: var(--pine); }
  .tabbar a.on svg { stroke-width: 2.2; }
  .admin-portal #toasts { left: 12px; right: 12px; bottom: calc(80px + env(safe-area-inset-bottom)); max-width: none; }
  body.has-savebar.admin-portal #toasts { bottom: calc(150px + env(safe-area-inset-bottom)); }
}
/* Toasts: one at a time. While a dialog is open they move to the top so they never cover its buttons. */
body:has(.modal-bg) #toasts { top: 14px; bottom: auto !important; }

/* section tabs */
.subnav { display: flex; gap: 4px; flex-wrap: wrap; margin: -6px 0 20px; }
.subnav a { padding: 7px 12px; border-radius: 999px; text-decoration: none; color: var(--ink-2); font-weight: 600; font-size: 14px; border: 1px solid var(--line); background: var(--surface); }
.subnav a:hover { border-color: var(--pine); color: var(--pine-2); }
.subnav a.on { background: var(--pine); border-color: var(--pine); color: #fff; }

/* Home */
.launch { margin-bottom: 18px; overflow: hidden; }
.launch-top { display: flex; gap: 22px; align-items: center; padding: 22px 24px 8px; }
.launch-h h2 { font-size: 26px; font-weight: 750; }
.launch-h p { margin: 6px 0 0; font-size: 16px; }
.ring { flex: none; }
.ring-track { fill: none; stroke: var(--line); stroke-width: 10; }
.ring-fill { fill: none; stroke: var(--pine); stroke-width: 10; stroke-linecap: round; transition: stroke-dashoffset .8s ease; }
.ring-n { font-family: var(--display); font-weight: 750; font-size: 19px; fill: var(--ink); }
.ring-l { font-size: 12px; fill: var(--ink-3); }
.path { list-style: none; margin: 8px 0 0; padding: 0 12px 12px; }
.path li { display: grid; grid-template-columns: 40px 1fr auto; gap: 12px; align-items: center; padding: 12px; border-radius: 12px; }
.path li + li { margin-top: 2px; }
.path-ic { width: 36px; height: 36px; border-radius: 50%; display: grid; place-items: center; background: var(--surface-2); border: 1px solid var(--line); color: var(--ink-3); }
.path-t b { display: block; font-size: 15.5px; }
.path-t span { color: var(--ink-2); font-size: 14px; }
.path li.done .path-ic { background: var(--pine); border-color: var(--pine); color: #fff; }
.path li.done .path-t b { color: var(--ink-2); font-weight: 600; }
.path li.next { background: var(--pine-soft); box-shadow: inset 0 0 0 2px var(--pine); }
.path li.next .path-ic { background: var(--surface); border-color: var(--pine); color: var(--pine); }
.path li.later { opacity: .82; }
.path-acts { display: flex; flex-wrap: wrap; gap: 6px; justify-content: flex-end; }
.path-t .step-tag { display: inline-block; margin-bottom: 2px; padding: 1px 7px; border-radius: 999px; background: var(--surface-2); border: 1px solid var(--line); color: var(--ink-3); font-size: 11.5px; font-weight: 700; letter-spacing: .02em; }
.path li.next .path-t .step-tag { border-color: var(--pine); color: var(--pine); }
.path-t .path-note { display: block; margin-top: 4px; }
.path-acts .linkbtn { font-size: 13px; }
.allset { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; padding: 12px 16px; margin-bottom: 18px; border-radius: var(--radius); background: var(--pine-soft); color: var(--pine-2); }
.home-grid { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr); gap: 18px; }
.home-grid > * { min-width: 0; }
.needs { list-style: none; margin: 0; padding: 0; }
.needs > li { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; padding: 14px 18px; border-bottom: 1px solid var(--line-2); }
.needs > li > div { flex: 1 1 240px; min-width: 0; }
.needs > li.red { background: var(--red-soft); }
.needs > li.amber { background: var(--amber-soft); }
.needs-sub { margin: 6px 0 0; padding-left: 18px; font-size: 14px; }
.wins { list-style: none; margin: 0; padding: 0; }
.wins li { display: grid; grid-template-columns: 30px 1fr auto; grid-template-areas: "ic t amt" "ic when when"; column-gap: 10px; align-items: center; padding: 11px 18px; border-bottom: 1px solid var(--line-2); }
.wins li > a { grid-area: t; color: var(--ink); text-decoration: none; font-weight: 600; min-width: 0; overflow-wrap: anywhere; }
.wins li > a:hover { color: var(--pine); }
.win-ic { grid-area: ic; width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; background: var(--surface-2); color: var(--ink-3); }
.win-ic svg { width: 16px; height: 16px; }
.win-sale .win-ic { background: var(--leaf-soft); color: var(--pine); }
.win-lead .win-ic { background: var(--blue-soft); color: var(--blue); }
.win-amt { grid-area: amt; color: var(--pine-2); }
.wins .when { grid-area: when; font-size: 12.5px; color: var(--ink-3); }
.money .money-l { font-weight: 600; color: var(--ink-2); }
.money .money-v { font-family: var(--display); font-size: 40px; font-weight: 780; letter-spacing: -.02em; line-height: 1.1; margin: 4px 0; }
.money.mini .money-v { font-size: 30px; }
.money .up { color: var(--pine); }
.spark { width: 100%; height: 44px; margin-top: 8px; }
.spark polyline { fill: none; stroke: var(--pine); stroke-width: 1.6; vector-effect: non-scaling-stroke; }
.home-facts { grid-template-columns: 1fr auto; }
.whatsnew { margin-bottom: 18px; border-color: var(--pine); }
.whatsnew h2 { display: flex; gap: 8px; align-items: center; }
.wn-list { margin: 12px 0 0; padding-left: 20px; }
.wn-list li { margin: 6px 0; }
/* the one-time celebrations */
.celebrate { position: relative; overflow: hidden; margin-bottom: 18px; border-color: var(--pine); background: linear-gradient(135deg, var(--pine-soft), var(--surface) 65%); }
.cel-in { position: relative; display: flex; gap: 16px; padding: 22px 24px; align-items: flex-start; }
.cel-in h2 { font-size: 24px; }
.cel-in p { margin: 6px 0 0; font-size: 16px; }
.cel-ic { flex: none; width: 52px; height: 52px; border-radius: 50%; display: grid; place-items: center; background: var(--pine); color: #fff; }
.cel-ic svg { width: 28px; height: 28px; }
.confetti { position: absolute; inset: 0; pointer-events: none; overflow: hidden; }
.confetti i { position: absolute; top: -12px; left: var(--x); width: 8px; height: 12px; border-radius: 2px; background: var(--pine); opacity: 0; transform: rotate(var(--r)); animation: confetti 1.2s ease-out var(--d) 1 forwards; }
.confetti i:nth-child(3n+1) { background: var(--leaf); }
.confetti i:nth-child(3n+2) { background: #f5b301; }
@keyframes confetti { 0% { opacity: 1; transform: translateY(0) rotate(var(--r)); } 100% { opacity: 0; transform: translateY(220px) rotate(calc(var(--r) + 300deg)); } }
@media (prefers-reduced-motion: reduce) { .confetti { display: none; } .ring-fill { transition: none; } }
@media (max-width: 860px) {
  .launch-top { flex-direction: row; align-items: flex-start; gap: 14px; padding: 18px 16px 6px; }
  .launch-top .ring { width: 64px; height: 64px; }
  .launch-top .ring-n { font-size: 22px; }
  .launch-top .ring-l { display: none; }
  .launch-h h2 { font-size: 21px; }
  .path { padding: 0 6px 8px; }
  .path li { grid-template-columns: 34px 1fr; padding: 10px; }
  .path li > .btn, .path li > .pill, .path li > .path-acts { grid-column: 2; justify-self: start; }
  .path-acts { justify-content: flex-start; }
  .path-ic { width: 32px; height: 32px; }
  .home-grid { grid-template-columns: 1fr; }
  .cel-in { flex-direction: column; padding: 18px 16px; }
}

/* guided setup */
.guide { max-width: 760px; margin: 0 auto; }
.guide-bar { height: 6px; border-radius: 6px; background: var(--line); overflow: hidden; margin-bottom: 10px; }
.guide-bar i { display: block; height: 100%; background: var(--pine); border-radius: 6px; }
.guide-k { font-weight: 700; color: var(--pine-2); margin-bottom: 10px; }
.guide-card h1 { font-size: 28px; margin-bottom: 8px; }
.guide-card .lead { font-size: 16.5px; color: var(--ink-2); }
.guide-card .panel-b { padding: 26px; }
.guide-nav { display: flex; gap: 10px; align-items: center; margin-top: 16px; flex-wrap: wrap; }
.guide-nav .grow { flex: 1; }
.btn.big { font-size: 16px; padding: 12px 20px; }
/* numbered steps inside a guided setup screen (the help page's .guide-steps is a different, absolutely placed design) */
.setup-steps { list-style: none; margin: 18px 0 0; padding: 0; display: grid; gap: 18px; counter-reset: gs; }
.setup-steps > li { display: grid; grid-template-columns: 30px minmax(0, 1fr); gap: 12px; align-items: start; }
.setup-steps > li::before { counter-increment: gs; content: counter(gs); width: 28px; height: 28px; border-radius: 50%; background: var(--pine); color: #fff; display: grid; place-items: center; font-weight: 700; font-family: var(--display); }
.setup-steps > li > div { min-width: 0; }
.guide .f { display: grid; gap: 4px; }
.guide .f span { font-weight: 600; font-size: 14px; }
.panel.inset { box-shadow: none; margin-top: 14px; }
.shot { margin: 10px 0 0; border: 1px solid var(--line); border-radius: 10px; overflow: hidden; background: var(--surface); max-width: 460px; font-size: 13px; }
.shot-bar { display: flex; gap: 5px; align-items: center; padding: 7px 10px; background: var(--surface-2); border-bottom: 1px solid var(--line-2); }
.shot-bar i { width: 8px; height: 8px; border-radius: 50%; background: var(--line); }
.shot-bar span { margin-left: 8px; color: var(--ink-3); font-size: 12px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.shot-b { padding: 8px 10px; display: grid; gap: 4px; }
.shot-row { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; padding: 5px 6px; border-radius: 6px; }
.shot-row > span:first-child { min-width: 92px; color: var(--ink-2); }
.shot-row code { overflow-wrap: anywhere; }
.shot-row em { color: var(--ink-3); font-style: normal; font-size: 12px; }
.shot-row.hl { background: var(--leaf-soft); outline: 2px solid var(--leaf); }
.shot-row.hl em { color: var(--pine-2); font-weight: 700; }
.shot-btn { display: inline-block; padding: 3px 10px; border-radius: 6px; background: var(--ink); color: #fff; font-weight: 600; font-size: 12px; }
.shot figcaption { padding: 6px 10px 8px; color: var(--ink-3); font-size: 12px; border-top: 1px solid var(--line-2); }
.price-sum { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 10px; margin: 16px 0 6px; }
.price-sum > div { border: 1px solid var(--line); border-radius: 10px; padding: 12px; display: grid; gap: 2px; background: var(--surface-2); }
.price-sum span { color: var(--ink-2); font-size: 14px; }
.dns-box { margin-top: 18px; border-top: 1px solid var(--line-2); padding-top: 16px; }
.dns-box h3 { display: flex; gap: 6px; align-items: center; margin-bottom: 6px; }
.dns-list { display: grid; gap: 10px; margin: 12px 0; }
.dns-rec { border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; display: grid; gap: 6px; }
.dns-rec.ok { border-color: #c3e0cb; background: var(--pine-soft); }
.dns-f { display: grid; grid-template-columns: 52px 1fr; gap: 8px; align-items: start; }
.dns-f > span { color: var(--ink-3); font-size: 13px; padding-top: 6px; }
.waiting { display: flex; gap: 10px; align-items: center; color: var(--ink-2); }
@media (max-width: 560px) { .guide-card .panel-b { padding: 18px 16px; } .guide-card h1 { font-size: 23px; } .guide-nav .btn { flex: 1 1 auto; } .guide-nav .grow { display: none; } }

/* a long code that wraps, with Copy */
.codebox { display: flex; gap: 8px; align-items: flex-start; min-width: 0; }
.codebox code { flex: 1; min-width: 0; overflow-wrap: anywhere; word-break: break-all; background: var(--surface-2); border: 1px solid var(--line-2); border-radius: 6px; padding: 6px 8px; font-size: 12.5px; }
.codebox .btn { flex: none; }

/* one sticky Save bar per page */
.savebar { position: fixed; left: var(--side); right: 0; bottom: 0; z-index: 65; padding: 10px 24px calc(10px + env(safe-area-inset-bottom)); background: var(--surface); border-top: 1px solid var(--line); box-shadow: 0 -6px 20px rgba(10, 30, 20, .1); }
.savebar[hidden] { display: none; }
.savebar-in { max-width: 1280px; display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; font-weight: 600; }
.savebar-act { display: flex; gap: 8px; }
body.has-savebar .content { padding-bottom: 110px; }
@media (max-width: 860px) {
  .savebar { left: 0; bottom: calc(62px + env(safe-area-inset-bottom)); padding: 10px 16px; }
  .admin-portal:not(:has(.tabbar)) .savebar { bottom: 0; }
  body.has-savebar .admin-shell .content { padding-bottom: 180px; }
}

/* Sales */
.sales-top { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 16px; margin-bottom: 18px; }
.plan-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 16px; }
.plan-card h2 { margin-bottom: 4px; }
.price-field { margin-top: 14px; }
.price-field input { font-size: 18px; font-weight: 650; max-width: 160px; }
.keep { font-size: 13.5px; color: var(--pine-2); font-weight: 600; margin-top: 4px; }
.yearly { margin-top: 6px; font-size: 13.5px; }

/* texts with friendly merge words */
.sms-ed textarea { font-size: 15px; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.chip-btn { border: 1px dashed var(--line); background: var(--surface-2); border-radius: 999px; padding: 3px 10px; font: inherit; font-size: 12.5px; cursor: pointer; color: var(--ink-2); }
.chip-btn:hover { border-color: var(--pine); color: var(--pine-2); }
.bubble { margin-top: 10px; max-width: 340px; padding: 10px 14px; border-radius: 18px 18px 18px 4px; background: var(--surface-2); border: 1px solid var(--line); white-space: pre-wrap; overflow-wrap: anywhere; font-size: 14px; }
.bubble::before { content: 'Preview'; display: block; font-size: 11px; font-weight: 700; color: var(--ink-3); text-transform: uppercase; letter-spacing: .04em; margin-bottom: 4px; }

/* Settings lists */
.adv-search { display: flex; align-items: center; gap: 8px; background: var(--surface); border: 1px solid var(--line); border-radius: 10px; padding: 4px 12px; max-width: 520px; }
.adv-search input { border: 0; box-shadow: none; padding: 8px 0; background: none; }
.adv-search input:focus { outline: none; }
.adv-list { list-style: none; margin: 0; padding: 0; }
.adv-item { display: grid; grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr); gap: 16px; align-items: center; padding: 14px 18px; border-bottom: 1px solid var(--line-2); }
.adv-item[hidden] { display: none; }
.adv-t .muted-2 { font-size: 14px; margin: 2px 0 4px; }
.adv-in { min-width: 0; }
.adv-in input:not([type=checkbox]), .adv-in select { width: 100%; }
.how { display: inline-flex; gap: 5px; align-items: center; font-size: 13.5px; font-weight: 600; }
.how svg { width: 15px; height: 15px; }
.changed-list, .team-list, .help-topics { list-style: none; margin: 0; padding: 0; }
.changed-list li { display: grid; grid-template-columns: minmax(0, 1fr) auto auto; gap: 14px; align-items: center; padding: 12px 18px; border-bottom: 1px solid var(--line-2); }
.changed-v { font-weight: 600; overflow-wrap: anywhere; max-width: 220px; }
.team-list li { display: flex; gap: 12px; align-items: center; padding: 12px 18px; border-bottom: 1px solid var(--line-2); flex-wrap: wrap; }
.team-list .grow { flex: 1 1 200px; min-width: 0; }
.team-list .muted { overflow-wrap: anywhere; }
.help-topics li { padding: 6px 0; }
.helpbox { border-color: var(--pine); background: var(--pine-soft); }
.helpbox h2 { display: flex; gap: 8px; align-items: center; }
@media (max-width: 860px) {
  .adv-item { grid-template-columns: 1fr; gap: 8px; padding: 14px 16px; }
  .changed-list li { grid-template-columns: 1fr; gap: 6px; }
}

/* Advertising: one step open at a time */
button.ga-step-h { width: 100%; background: none; border: 0; padding: 0; font: inherit; color: inherit; text-align: left; cursor: pointer; }
.ga-step-h { position: relative; padding-right: 30px !important; }
.ga-chev { position: absolute; right: 4px; top: 8px; width: 10px; height: 10px; border-right: 2px solid var(--ink-3); border-bottom: 2px solid var(--ink-3); transform: rotate(45deg); transition: transform .15s; }
.ga-step.collapsed .ga-chev { transform: rotate(-45deg); }
.ga-step.collapsed .panel-b > :not(.ga-step-h) { display: none !important; }
.ga-step.collapsed .ga-step-h p { display: none; }
.ga-step.collapsed .ga-step-h { margin-bottom: 0; }
@media (prefers-reduced-motion: reduce) { .ga-chev { transition: none; } }

/* dark theme touches for the new pieces */
:root[data-theme="dark"] .namemenu { background: var(--surface); }
:root[data-theme="dark"] .whatsnew, :root[data-theme="dark"] .celebrate, :root[data-theme="dark"] .helpbox, :root[data-theme="dark"] .dns-rec.ok { border-color: #2f5a3d; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .whatsnew, :root:not([data-theme="light"]) .celebrate, :root:not([data-theme="light"]) .helpbox, :root:not([data-theme="light"]) .dns-rec.ok { border-color: #2f5a3d; } }
.launch-h .btn, .guide .btn, .needs .btn, .callout .btn { white-space: normal; text-align: center; }
@media (max-width: 860px) { dl.facts.home-facts { grid-template-columns: 1fr auto; } dl.facts.home-facts dt { margin-top: 0; } }
.plan-cards > .panel, .sales-top > .panel { margin: 0; }
.plan-cards, .sales-top { align-items: start; }
.adv-h { width: 100%; background: none; border: 0; font: inherit; color: inherit; cursor: pointer; text-align: left; position: relative; padding-right: 44px; justify-content: flex-start; gap: 12px; flex-wrap: wrap; }
.adv-h .ga-chev { right: 20px; top: 20px; }
.adv-group.closed .adv-list { display: none; }
.adv-group.closed .adv-h { border-bottom: 0; }
.adv-group.closed .ga-chev { transform: rotate(-45deg); }
.guide-card #sp > .panel-b { padding: 8px 0 0; }

/* Phase 4: the landlord discount on the price card and the calm "before you go" card. */
.price-deal { text-align: right; line-height: 1.2; }
.price-deal .was { display: block; font-size: 13px; color: var(--muted, #6b7570); }
.bfg-lead { font-size: 16px; margin: 0 0 8px; }
.bfg-ends { margin: 0 0 8px; }
@keyframes ez-shake-once { 0%, 100% { transform: translateX(0); } 20% { transform: translateX(-5px); } 40% { transform: translateX(4px); } 60% { transform: translateX(-3px); } 80% { transform: translateX(2px); } }
.modal.shake-once { animation: ez-shake-once 0.5s ease-in-out 0.25s 1; }
@media (prefers-reduced-motion: reduce) { .modal.shake-once { animation: none; } }

/* Phase 4: Sales page, reminders and offers. */
#sales-engine .section-h { margin: 8px 0 12px; }
#sales-engine .section-h h2 { margin: 0 0 4px; }
.engine h3.q, #karen h3.q { font-size: 17px; margin: 0 0 10px; }
.choice-row { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.choice-row.locked .choice:has(input:disabled) { opacity: .5; }
.choice { display: inline-flex; align-items: center; gap: 8px; border: 1px solid var(--line); border-radius: 10px; padding: 9px 14px; cursor: pointer; background: var(--surface); }
.choice:has(input:checked) { border-color: var(--pine); box-shadow: 0 0 0 1px var(--pine) inset; }
.choice input { margin: 0; }
.pct-in { display: inline-flex; align-items: center; gap: 6px; }
.pct-in[hidden] { display: none; }
.pct-in input { width: 72px; }
.quiet-line { display: flex; align-items: center; gap: 6px; font-weight: 600; margin: 8px 0 12px; }
.quiet-line .i { width: 18px; height: 18px; }
.field.sender { max-width: 420px; }
.example { margin: 6px 0 14px; }
.example summary { cursor: pointer; font-weight: 600; }
.ex-list { margin: 8px 0 0; padding-left: 20px; }
.ex-list li { margin: 4px 0; }
.ex-list b { margin-right: 6px; }
.phones { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 14px; margin-top: 10px; }
.phones.one { grid-template-columns: minmax(0, 340px); }
.phone-prev { margin: 0; display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.phone-prev figcaption { font-size: 12.5px; font-weight: 700; color: var(--ink-3); text-transform: uppercase; letter-spacing: .03em; }
.phone-screen { flex: 1; border: 8px solid #1d2320; border-radius: 26px; background: var(--surface-2); padding: 14px 12px 18px; min-height: 180px; }
.phone-from { font-size: 11px; color: var(--ink-3); text-align: center; margin-bottom: 10px; }
.phone-bubble { background: var(--line-2); color: var(--ink); border-radius: 16px 16px 16px 4px; padding: 10px 12px; font-size: 14px; line-height: 1.4; overflow-wrap: anywhere; }
.phone-prev .btn { align-self: flex-start; }
.pp-card { background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 14px; font-size: 14px; }
.pp-card p { margin: 6px 0; }
.pp-title { font-family: var(--display); font-size: 16px; }
.pp-btns { display: flex; justify-content: flex-end; gap: 8px; margin-top: 10px; }
.pp-btn { border: 1px solid var(--line); border-radius: 8px; padding: 6px 10px; font-weight: 600; font-size: 13px; }
.pp-btn.primary { background: var(--pine); border-color: var(--pine); color: #fff; }
.dollar-line { margin: 10px 0 6px; font-size: 15px; }
#karen .kv { grid-template-columns: 150px minmax(0, 1fr); }
#karen code.wrap { overflow-wrap: anywhere; word-break: break-all; white-space: normal; }
.need-btns { display: flex; flex-wrap: wrap; gap: 8px; flex-basis: 100%; }
.deal-line { margin: 6px 0; font-size: 13.5px; }
@media (max-width: 600px) { #karen .kv { grid-template-columns: 1fr; } .phones { grid-template-columns: 1fr; } }
.consent-fine { font-size: 12.5px; color: var(--ink-3); margin: -6px 0 12px; line-height: 1.45; }
/* Text consent card (first open of a sign-in link) and the Texts panel in Settings */
.consent-card .fine, #tf .fine { font-size: 12.5px; color: var(--ink-3); line-height: 1.45; margin: 0 0 12px; }
.consent-check { font-weight: 600; margin: 4px 0 8px; }
.consent-check input { width: 20px; height: 20px; flex: 0 0 auto; margin-top: 1px; }
/* Home: the one-time "Turn on card payments" card */
.turn-on { border-color: var(--leaf, #8fdc5c); }
.turn-on h2 { display: flex; gap: 8px; align-items: center; margin: 0 0 6px; }
.turn-on-list { margin: 8px 0 14px; padding-left: 20px; line-height: 1.5; }
.turn-on-list li { margin-bottom: 4px; }
#emailpw[hidden], #codebox[hidden] { display: none !important; }

/* Settings > Admins card (main install only) */
.admins-card .panel-h { flex-wrap: wrap; }
.admins-card .panel-h > div { min-width: 0; flex: 1 1 240px; }
.admins-list { list-style: none; margin: 0; padding: 0; }
.admins-list li { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; padding: 12px 18px; border-top: 1px solid var(--line-2); }
.admins-list li:first-child { border-top: 0; }
.admins-list .grow { flex: 1 1 200px; min-width: 0; overflow-wrap: anywhere; }
.admins-list .small { font-size: 13px; }
.admins-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.invite-link { font-size: 14px; overflow-wrap: anywhere; word-break: break-all; }

/* Settings > Optional features: reviews on your website */
.srv-list li { align-items: flex-start; }
.srv-stars { color: var(--pine); letter-spacing: 1px; }
.srv-body { margin: 4px 0; overflow-wrap: anywhere; }
.srv-acts { display: flex; gap: 6px; flex-wrap: wrap; justify-content: flex-end; }
.srv-prev h3 { margin-bottom: 10px; }
.srv-card { border: 1px solid var(--line); border-radius: 10px; padding: 12px 14px; margin-bottom: 10px; }
.srv-full { white-space: pre-wrap; overflow-wrap: anywhere; margin: 6px 0; }
@media (max-width: 640px) { .srv-list li { flex-direction: column; } .srv-acts { justify-content: flex-start; } }

/* ---------- white-label brand theme (generated) ---------- */
:root { --pine: #b45a00; --pine-2: #8c4600; --pine-soft: #f8efe6; --leaf: #443322; --leaf-soft: #e9e7e4; --paper: #f7f6f5; --surface-2: #fcfbfb; --line: #e4e0dd; --line-2: #efedeb; }
:root[data-theme="dark"] { --paper: #15120f; --surface: #1e1a15; --surface-2: #26201a; --line: #383029; --line-2: #2c2620; --pine: #ad661f; --pine-2: #c37323; --pine-soft: #3d2b17; --leaf: #b38c66; --leaf-soft: #251f17; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) { --paper: #15120f; --surface: #1e1a15; --surface-2: #26201a; --line: #383029; --line-2: #2c2620; --pine: #ad661f; --pine-2: #c37323; --pine-soft: #3d2b17; --leaf: #b38c66; --leaf-soft: #251f17; } :root:not([data-theme="light"]) a { color: #c37323; } :root:not([data-theme="light"]) a:hover { color: #b38c66; } }
:root[data-theme="dark"] a { color: #c37323; }
:root[data-theme="dark"] .chat .msg.user { background: #ad661f; }
.btn.ai { background: #b45a00; border-color: #b45a00; }
.btn.ai:hover { background: #8c4600; }
.admin-shell .side { background: #251a0e; border-right-color: #1a120a; }
.auth-art { background: #8c4600; color: #fff; }
.auth-art::after { background: linear-gradient(135deg, hsla(30, 90%, 62%, .45), transparent); }
.auth-art .steps li { color: rgba(255,255,255,.84); }
.auth-art .steps .k { border-color: #c9ad92; color: #c9ad92; }
.auth-art small { color: rgba(255,255,255,.7); }
.admin-auth .auth-art { background: #251a0e; }
.admin-shell .avatar { background: #c9ad92; color: #251a0e; }
.admin-shell .nav a { color: #d3c7bb; }
.admin-shell .nav a.active { background: hsla(30, 33%, 60%, .16); }
.admin-shell .me .who span { color: #d3c7bb; }
.admin-shell .side-foot .btn.ghost { color: #d3c7bb; }
.portal-tag { color: #8c4600; background: #f8efe6; }
:root[data-theme="dark"] .portal-tag { background: #3d2b17; color: #b38c66; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .portal-tag { background: #3d2b17; color: #b38c66; } }
.side .brand img { width: auto; max-width: 176px; max-height: 60px; object-fit: contain; object-position: left center; }
.auth-form .logo { width: auto; max-width: 250px; max-height: 96px; object-fit: contain; }
.boot img { width: auto; max-width: 260px; max-height: 110px; object-fit: contain; }
.topbar img { width: auto; max-width: 170px; object-fit: contain; }
