/* LandVision AI — developer dashboard */
:root {
  --brand: #047857; --brand-600: #065f46; --brand-50: #ecfdf5; --brand-100: #d1fae5;
  --ink: #0f172a; --ink-2: #334155; --muted: #64748b; --line: #e2e8f0; --soft: #f1f5f9; --bg: #f6f8fb; --surface: #fff;
  --red: #dc2626; --amber: #d97706; --radius: 12px; --shadow: 0 1px 2px rgba(15,23,42,.05), 0 1px 1px rgba(15,23,42,.03);
  --font: Inter, system-ui, -apple-system, Segoe UI, Roboto, sans-serif; --heading: 'Plus Jakarta Sans', Inter, system-ui, sans-serif;
}
* { box-sizing: border-box; }
html, body { margin: 0; background: var(--bg); color: var(--ink); font: 14px/1.5 var(--font); -webkit-font-smoothing: antialiased; }
h1, h2, h3, h4 { font-family: var(--heading); margin: 0; letter-spacing: -0.01em; }
h1 { font-size: 24px; } h3 { font-size: 15px; }
a { color: var(--brand); text-decoration: none; } a:hover { text-decoration: underline; }
code { background: var(--soft); padding: 1px 6px; border-radius: 6px; font-size: 12.5px; word-break: break-all; }
button { font-family: inherit; }
.muted { color: var(--muted); } .small { font-size: 13px; } .tiny { font-size: 11.5px; } .right { text-align: right; } .nowrap { white-space: nowrap; } .pre { white-space: pre-line; }
.stack { display: flex; flex-direction: column; gap: 14px; }
.row { display: flex; align-items: center; } .gap { gap: 10px; } .gap-sm { gap: 6px; } .wrap { flex-wrap: wrap; } .grow { flex: 1; } .spacer { flex: 1; }
.row-between { display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.row-end { display: flex; justify-content: flex-end; align-items: center; gap: 10px; }
.inline-ico { vertical-align: -2px; margin-right: 2px; } .inline-ico.ok { color: var(--brand); }
.up { color: #15803d; font-weight: 700; } .down { color: var(--red); font-weight: 700; }

/* buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 7px; border: 1px solid transparent; border-radius: 10px; padding: 8px 14px; font-weight: 600; font-size: 13.5px; cursor: pointer; line-height: 1.25; white-space: nowrap; transition: background .15s, border-color .15s, box-shadow .15s; text-decoration: none !important; }
.btn svg { width: 16px; height: 16px; }
.btn:disabled { opacity: .5; cursor: not-allowed; }
.btn-primary { background: var(--brand); color: #fff; } .btn-primary:hover:not(:disabled) { background: var(--brand-600); }
.btn-secondary { background: #fff; color: var(--ink); border-color: var(--line); box-shadow: var(--shadow); } .btn-secondary:hover:not(:disabled) { background: var(--soft); }
.btn-ghost { background: transparent; color: var(--ink-2); } .btn-ghost:hover:not(:disabled) { background: var(--soft); }
.btn-danger-ghost { background: transparent; color: var(--red); } .btn-danger-ghost:hover { background: #fef2f2; }
.btn-sm { padding: 6px 10px; font-size: 12.5px; border-radius: 8px; }
.btn.block { width: 100%; }
.file-btn { position: relative; }
.icon-btn { background: transparent; border: 0; width: 32px; height: 32px; border-radius: 8px; display: inline-grid; place-items: center; cursor: pointer; color: var(--ink-2); }
.icon-btn:hover { background: var(--soft); } .icon-btn.danger { color: var(--red); } .icon-btn svg { width: 16px; height: 16px; }
.spin { width: 14px; height: 14px; border: 2px solid currentColor; border-right-color: transparent; border-radius: 50%; display: inline-block; animation: spin .7s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* layout shell */
.shell { display: grid; grid-template-columns: 248px 1fr; min-height: 100vh; }
.sidebar { background: #0b1324; color: #cbd5e1; display: flex; flex-direction: column; padding: 18px 12px; position: sticky; top: 0; height: 100vh; overflow-y: auto; }
.logo { display: flex; gap: 10px; align-items: center; padding: 4px 8px 18px; }
.logo strong { display: block; color: #fff; font-family: var(--heading); font-size: 15px; } .logo small { color: #94a3b8; font-size: 11.5px; }
.logo-mark { width: 36px; height: 36px; border-radius: 10px; background: linear-gradient(135deg, #10b981, #047857); color: #fff; display: grid; place-items: center; font-weight: 800; font-size: 13px; flex-shrink: 0; }
.invoice .logo strong { color: var(--ink); } .invoice .logo small { color: var(--muted); }
.sidebar nav { display: flex; flex-direction: column; gap: 2px; }
.nav-item { display: flex; align-items: center; gap: 10px; padding: 9px 10px; border-radius: 9px; color: #cbd5e1; font-weight: 500; font-size: 13.5px; background: none; border: 0; cursor: pointer; width: 100%; text-align: left; text-decoration: none !important; }
.nav-item svg { width: 17px; height: 17px; flex-shrink: 0; }
.nav-item:hover { background: rgba(255,255,255,.06); color: #fff; }
.nav-item.on { background: rgba(16,185,129,.16); color: #fff; } .nav-item.on svg { color: #34d399; }
.nav-item.locked { opacity: .45; cursor: not-allowed; } .nav-item .lock { margin-left: auto; width: 13px; }
.sidebar-foot { margin-top: auto; padding-top: 14px; border-top: 1px solid rgba(255,255,255,.08); display: flex; flex-direction: column; gap: 8px; }
.plan-chip { display: flex; justify-content: space-between; align-items: center; padding: 8px 10px; background: rgba(255,255,255,.05); border-radius: 9px; font-size: 12.5px; color: #e2e8f0; }
.main { min-width: 0; display: flex; flex-direction: column; }
.topbar { height: 60px; display: flex; align-items: center; gap: 12px; padding: 0 24px; background: #fff; border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 20; }
.topbar-title { display: flex; align-items: center; gap: 10px; }
.topbar-title img { max-height: 30px; max-width: 110px; object-fit: contain; }
.topbar-title strong { display: block; font-size: 14px; } .topbar-title small { color: var(--muted); font-size: 12px; text-transform: capitalize; }
.menu-btn { display: none; }
.scrim { display: none; }
.content { padding: 24px; max-width: 1400px; width: 100%; }
.banner { display: flex; gap: 10px; padding: 12px 24px; font-size: 13.5px; }
.banner-warn { background: #fffbeb; color: #92400e; border-bottom: 1px solid #fde68a; }
.banner svg { flex-shrink: 0; margin-top: 2px; }
.center-screen { min-height: 100vh; display: grid; place-items: center; }
.print-shell { padding: 24px; }

/* page */
.page { display: flex; flex-direction: column; gap: 18px; }
.page-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 16px; flex-wrap: wrap; }
.page-head h1 { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.page-head p { margin: 4px 0 0; }
.back { display: inline-flex; gap: 6px; align-items: center; font-size: 13px; font-weight: 600; color: var(--muted); }
.section-title { font-size: 13px; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); margin: 8px 0 -4px; display: flex; gap: 8px; align-items: center; }
.section-h { font-size: 17px; display: flex; align-items: baseline; gap: 10px; margin-top: 6px; }
.filters { display: flex; gap: 8px; flex-wrap: wrap; }
.filters .input { width: auto; }

/* cards */
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); min-width: 0; }
.card-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 10px; padding: 14px 18px; border-bottom: 1px solid var(--line); }
.card-head p { margin: 2px 0 0; }
.card-actions { display: flex; gap: 6px; align-items: center; }
.card-body { padding: 18px; }
.grid-2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; align-items: start; }
.grid-2.wide-left { grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr); }
.grid-3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; align-items: start; }

/* stats */
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(165px, 1fr)); gap: 14px; }
.stat { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 14px 16px; box-shadow: var(--shadow); }
.stat-top { display: flex; justify-content: space-between; color: var(--muted); font-size: 12.5px; font-weight: 600; }
.stat-top svg { color: var(--brand); width: 18px; height: 18px; }
.stat-value { font-size: 24px; font-weight: 800; font-family: var(--heading); margin-top: 6px; letter-spacing: -0.02em; }
.stat-hint { font-size: 12px; color: var(--muted); margin-top: 2px; }
.stat-good .stat-value { color: #15803d; } .stat-bad .stat-value { color: var(--red); }

/* badges */
.badge { display: inline-flex; align-items: center; padding: 2px 9px; border-radius: 99px; font-size: 11.5px; font-weight: 700; white-space: nowrap; text-transform: capitalize; }
.badge-green { background: #dcfce7; color: #166534; } .badge-amber { background: #fef3c7; color: #92400e; } .badge-red { background: #fee2e2; color: #991b1b; }
.badge-blue { background: #dbeafe; color: #1e40af; } .badge-violet { background: #ede9fe; color: #5b21b6; } .badge-teal { background: #ccfbf1; color: #115e59; } .badge-gray { background: var(--soft); color: #475569; }

/* forms */
.field { display: flex; flex-direction: column; gap: 5px; min-width: 0; }
.field-label { font-size: 12.5px; font-weight: 600; color: var(--ink-2); }
.field-hint { font-size: 11.5px; color: var(--muted); }
.input { width: 100%; border: 1px solid #cbd5e1; border-radius: 9px; padding: 8px 11px; font: inherit; background: #fff; color: var(--ink); min-width: 0; }
.input:focus { outline: 2px solid rgba(4,120,87,.35); border-color: var(--brand); }
.input:disabled { background: var(--soft); color: var(--muted); }
.input.compact { width: auto; padding: 6px 10px; }
textarea.input { resize: vertical; }
.form-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 14px; }
.form-grid.four { grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); }
.toggle { display: inline-flex; align-items: center; gap: 9px; cursor: pointer; font-size: 13.5px; }
.toggle input { position: absolute; opacity: 0; }
.toggle-track { width: 36px; height: 20px; border-radius: 99px; background: #cbd5e1; position: relative; transition: background .15s; flex-shrink: 0; }
.toggle-track span { position: absolute; top: 2px; left: 2px; width: 16px; height: 16px; border-radius: 50%; background: #fff; transition: left .15s; box-shadow: 0 1px 2px rgba(0,0,0,.2); }
.toggle input:checked + .toggle-track { background: var(--brand); }
.toggle input:checked + .toggle-track span { left: 18px; }
.toggle input:focus-visible + .toggle-track { outline: 2px solid rgba(4,120,87,.4); }
.color-input { display: flex; gap: 6px; align-items: center; }
.color-input input[type=color] { width: 40px; height: 36px; border: 1px solid #cbd5e1; border-radius: 9px; padding: 2px; background: #fff; cursor: pointer; }
.logo-preview { max-height: 36px; max-width: 90px; object-fit: contain; border: 1px solid var(--line); border-radius: 6px; padding: 2px; background: #fff; }
.chip-select { display: flex; flex-wrap: wrap; gap: 6px; }
.chip-select button, .tag-row button { border: 1px solid var(--line); background: #fff; border-radius: 99px; padding: 5px 12px; font-size: 12.5px; cursor: pointer; font-weight: 600; color: var(--ink-2); }
.chip-select button.on { background: var(--brand); color: #fff; border-color: var(--brand); }
.tag-row { display: flex; gap: 6px; flex-wrap: wrap; margin-top: -6px; }
.tag-row button { font-family: ui-monospace, monospace; font-weight: 500; font-size: 11.5px; }
.details { border: 1px solid var(--line); border-radius: 10px; padding: 10px 14px; }
.details summary { cursor: pointer; font-weight: 600; font-size: 13px; }
.details > *:not(summary) { margin-top: 12px; }
.input-icon { position: relative; flex: 1; min-width: 200px; max-width: 320px; }
.input-icon svg { position: absolute; left: 10px; top: 50%; transform: translateY(-50%); color: var(--muted); }
.input-icon .input { padding-left: 32px; }
.status-select { border: 0; border-radius: 99px; padding: 3px 8px; font-weight: 700; font-size: 12px; cursor: pointer; }
.tone-green { background: #dcfce7; color: #166534; } .tone-amber { background: #fef3c7; color: #92400e; } .tone-gray { background: var(--soft); color: #475569; }

/* tables */
.table-wrap { overflow-x: auto; }
.table { width: 100%; border-collapse: collapse; }
.table th { text-align: left; font-size: 11.5px; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); font-weight: 700; padding: 10px 14px; background: #f8fafc; border-bottom: 1px solid var(--line); white-space: nowrap; }
.table td { padding: 11px 14px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.table th.right, .table td.right { text-align: right; }
.table tbody tr:last-child td { border-bottom: 0; }
.table tr.clickable { cursor: pointer; } .table tr.clickable:hover td { background: #f8fafc; }
.table.compact td, .table.compact th { padding: 7px 12px; }
.table tfoot td { border-bottom: 0; padding-top: 8px; padding-bottom: 8px; }
.table tfoot tr.total td { font-weight: 800; font-size: 16px; border-top: 2px solid var(--ink); }
.small-table { max-height: 360px; overflow: auto; border: 1px solid var(--line); border-radius: 10px; }
.toolbar { display: flex; gap: 8px; align-items: center; padding: 12px 14px; border-bottom: 1px solid var(--line); }
.toolbar.wrap { flex-wrap: wrap; } .toolbar .input { width: auto; }
.pager { display: flex; justify-content: space-between; align-items: center; padding: 10px 14px; border-top: 1px solid var(--line); }
.pill-row { display: flex; gap: 6px; flex-wrap: wrap; }
.pill-row button { border: 1px solid var(--line); background: #fff; border-radius: 99px; padding: 5px 12px; font-weight: 600; font-size: 12.5px; cursor: pointer; color: var(--ink-2); }
.pill-row button span { color: var(--muted); margin-left: 4px; font-weight: 500; }
.pill-row button.on { background: var(--ink); color: #fff; border-color: var(--ink); } .pill-row button.on span { color: #cbd5e1; }
.progress, .heat { width: 90px; height: 6px; background: var(--soft); border-radius: 99px; overflow: hidden; display: inline-block; }
.progress span, .heat span { display: block; height: 100%; background: var(--brand); border-radius: 99px; }
.heat { width: 100px; }

/* tabs & seg */
.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--line); overflow-x: auto; }
.tabs button { border: 0; background: none; padding: 10px 12px; font-weight: 600; font-size: 13.5px; color: var(--muted); border-bottom: 2px solid transparent; cursor: pointer; white-space: nowrap; }
.tabs button.on { color: var(--ink); border-bottom-color: var(--brand); }
.seg { display: flex; flex-wrap: wrap; gap: 4px; background: var(--soft); padding: 4px; border-radius: 10px; margin-bottom: 12px; }
.seg button { border: 0; background: none; padding: 6px 10px; border-radius: 7px; cursor: pointer; font-size: 12.5px; font-weight: 600; color: var(--muted); }
.seg button.on { background: #fff; color: var(--ink); box-shadow: var(--shadow); }

/* modal / drawer */
.modal-bg, .drawer-bg { position: fixed; inset: 0; background: rgba(15,23,42,.5); z-index: 100; }
.modal-bg { display: flex; align-items: flex-start; justify-content: center; padding: 40px 16px; overflow-y: auto; }
.modal { background: #fff; border-radius: 14px; width: 100%; max-width: 560px; box-shadow: 0 30px 70px rgba(2,6,23,.3); }
.modal-wide { max-width: 900px; }
.modal-head { display: flex; justify-content: space-between; align-items: center; padding: 14px 18px; border-bottom: 1px solid var(--line); }
.modal-body { padding: 18px; }
.modal-foot { display: flex; gap: 8px; justify-content: flex-end; align-items: center; padding: 12px 18px; border-top: 1px solid var(--line); background: #f8fafc; border-radius: 0 0 14px 14px; flex-wrap: wrap; }
.drawer { position: absolute; right: 0; top: 0; bottom: 0; width: min(640px, 100%); background: var(--bg); display: flex; flex-direction: column; box-shadow: -20px 0 50px rgba(2,6,23,.2); }
.drawer .modal-head { background: #fff; }
.drawer-body { padding: 18px; overflow-y: auto; }

/* misc components */
.empty { text-align: center; padding: 40px 20px; color: var(--muted); display: flex; flex-direction: column; align-items: center; gap: 8px; }
.empty > svg { width: 34px; height: 34px; color: var(--brand); }
.empty h4 { color: var(--ink); font-size: 16px; }
.empty p { max-width: 460px; margin: 0; }
.loading { display: flex; align-items: center; gap: 10px; color: var(--muted); padding: 30px; justify-content: center; }
.alert { display: flex; gap: 10px; padding: 11px 14px; border-radius: 10px; font-size: 13.5px; border: 1px solid; }
.alert svg { flex-shrink: 0; margin-top: 2px; }
.alert ul { margin: 6px 0 0; padding-left: 18px; }
.alert-info { background: #eff6ff; color: #1e3a8a; border-color: #bfdbfe; }
.alert-success { background: #f0fdf4; color: #166534; border-color: #bbf7d0; }
.alert-warn { background: #fffbeb; color: #92400e; border-color: #fde68a; }
.alert-error { background: #fef2f2; color: #991b1b; border-color: #fecaca; }
.copybox { position: relative; }
.copybox textarea { width: 100%; font: 12.5px/1.5 ui-monospace, SFMono-Regular, Menlo, monospace; background: #0f172a; color: #a7f3d0; border: 0; border-radius: 10px; padding: 12px 90px 12px 14px; resize: none; }
.copybox .btn { position: absolute; top: 8px; right: 8px; }
.toasts { position: fixed; bottom: 20px; right: 20px; display: flex; flex-direction: column; gap: 8px; z-index: 200; }
.toast { background: var(--ink); color: #fff; padding: 11px 16px; border-radius: 10px; font-size: 13.5px; box-shadow: 0 10px 30px rgba(2,6,23,.25); max-width: 360px; animation: toastIn .2s ease-out; }
.toast-error { background: #991b1b; }
@keyframes toastIn { from { transform: translateY(10px); opacity: 0; } }
.checklist { margin: 0; padding-left: 20px; display: flex; flex-direction: column; gap: 6px; }
.checklist li.done { color: var(--muted); text-decoration: line-through; }
.dl { display: grid; grid-template-columns: 140px 1fr; gap: 8px 12px; margin: 0; font-size: 13.5px; }
.dl dt { color: var(--muted); font-weight: 600; } .dl dd { margin: 0; min-width: 0; overflow-wrap: anywhere; }
.plain { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 8px; }
.ticks { list-style: none; padding: 0; margin: 0; display: grid; gap: 6px; }
.ticks li { display: flex; gap: 8px; } .ticks svg { color: var(--brand); flex-shrink: 0; margin-top: 3px; }
.kv-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.kv-grid div { background: var(--soft); border-radius: 9px; padding: 8px 10px; }
.kv-grid span { display: block; font-size: 11.5px; color: var(--muted); font-weight: 600; } .kv-grid strong { font-size: 14px; }
.timeline { list-style: none; margin: 0; padding: 0 0 0 14px; border-left: 2px solid var(--line); display: flex; flex-direction: column; gap: 8px; }
.timeline li { display: flex; justify-content: space-between; gap: 10px; font-size: 13px; position: relative; }
.timeline li::before { content: ''; position: absolute; left: -20px; top: 6px; width: 10px; height: 10px; border-radius: 50%; background: var(--brand); border: 2px solid #fff; }
.timeline time { color: var(--muted); font-size: 12px; white-space: nowrap; }
.contact-row { display: flex; gap: 6px; flex-wrap: wrap; }
.risk { border-bottom: 1px solid var(--line); padding-bottom: 8px; }

/* charts */
.chart { position: relative; }
.chart svg { width: 100%; height: auto; display: block; overflow: visible; }
.chart-tip { position: absolute; transform: translate(-50%, calc(-100% - 10px)); background: var(--ink); color: #fff; padding: 6px 10px; border-radius: 8px; font-size: 12px; pointer-events: none; white-space: nowrap; display: flex; flex-direction: column; box-shadow: 0 6px 18px rgba(2,6,23,.2); z-index: 5; }
.chart-tip span { color: #cbd5e1; font-size: 11px; }
.funnel { display: flex; flex-direction: column; gap: 8px; }
.funnel-row { display: grid; grid-template-columns: 140px 1fr 110px; gap: 10px; align-items: center; }
.funnel-label { font-size: 13px; font-weight: 600; color: var(--ink-2); }
.funnel-bar { background: var(--soft); border-radius: 6px; height: 26px; overflow: hidden; }
.funnel-bar div { height: 100%; border-radius: 0 4px 4px 0; }
.funnel-val { display: flex; flex-direction: column; font-size: 13px; line-height: 1.2; }
.funnel-val span { font-size: 11px; color: var(--muted); } .funnel-val span.drop { color: var(--amber); }
.drop-note { margin: 12px 0 0; }
.hbars { display: flex; flex-direction: column; gap: 7px; }
.hbar { display: grid; grid-template-columns: minmax(80px, 38%) 1fr 44px; gap: 8px; align-items: center; font-size: 12.5px; }
.hbar-label { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--ink-2); }
.hbar-track { height: 10px; background: var(--soft); border-radius: 99px; overflow: hidden; }
.hbar-track span { display: block; height: 100%; border-radius: 99px; }
.hbar-val { text-align: right; font-weight: 700; }

/* projects */
.project-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(290px, 1fr)); gap: 16px; }
.project-card { cursor: pointer; overflow: hidden; transition: box-shadow .15s, transform .15s; }
.project-card:hover { box-shadow: 0 10px 28px rgba(15,23,42,.08); transform: translateY(-2px); }
.project-card h3 { font-size: 16px; }
.project-card p { margin: 4px 0 12px; }
.project-img { height: 140px; background: var(--soft) center/cover; display: grid; place-items: center; position: relative; color: var(--muted); }
.project-img > svg { width: 30px; height: 30px; }
.project-img .badge { position: absolute; top: 10px; left: 10px; }
.mini-stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; text-align: center; }
.mini-stats div { background: var(--soft); border-radius: 8px; padding: 6px 4px; }
.mini-stats strong { display: block; font-size: 15px; } .mini-stats span { font-size: 11px; color: var(--muted); }
.map-editor { display: grid; grid-template-columns: minmax(0, 1fr) 240px; gap: 16px; align-items: start; }
.map-editor-canvas { padding: 12px; }
.map-editor-list { position: sticky; top: 76px; }
.pick-list { list-style: none; margin: 0; padding: 6px; max-height: 520px; overflow-y: auto; }
.pick-list li button { width: 100%; display: flex; justify-content: space-between; align-items: center; gap: 8px; background: none; border: 0; padding: 8px 10px; border-radius: 8px; cursor: pointer; text-align: left; font-size: 13px; color: var(--ink); }
.pick-list li button:hover { background: var(--soft); }
.pick-list li button.on { background: var(--brand-50); outline: 1px solid var(--brand); }
.pick-list span { font-size: 11.5px; color: var(--muted); } .pick-list span.ok { color: #15803d; } .pick-list span.warn { color: var(--amber); }
.lv-map svg { border-radius: 10px; border: 1px solid var(--line); }
.lv-map-hint { font-size: 12px; color: var(--muted); padding-top: 6px; }

/* shared plan drawings (lead drawer) */
.lv-siteplan { width: 100%; max-width: 420px; height: auto; display: block; margin: 0 auto; }
.lv-floorplan svg { width: 100%; height: auto; display: block; }
.lv-tabs.small { display: flex; gap: 4px; margin-bottom: 8px; }
.lv-tabs.small button { border: 1px solid var(--line); background: #fff; border-radius: 99px; padding: 4px 10px; font-size: 12px; cursor: pointer; font-weight: 600; }
.lv-tabs.small button.on { background: var(--ink); color: #fff; border-color: var(--ink); }
.lv-room-info { font-size: 12px; color: var(--muted); margin-top: 6px; }
.lv-legend { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; font-size: 11.5px; color: var(--muted); }
.lv-legend-item { display: inline-flex; gap: 5px; align-items: center; } .lv-legend-item i { width: 11px; height: 11px; border: 2px solid; border-radius: 3px; }

/* widget page */
.widget-grid { grid-template-columns: minmax(0, 1fr) minmax(0, 1.15fr); }
.preview-card { position: sticky; top: 76px; }
.preview-frame { width: 100%; height: calc(100vh - 170px); min-height: 560px; border: 0; display: block; border-radius: 0 0 var(--radius) var(--radius); background: #f8fafc; }
input[type=range] { accent-color: var(--brand); width: 100%; }

/* billing */
.invoice-due { display: grid; grid-template-columns: 1fr auto auto; gap: 14px; align-items: center; padding: 12px 14px; border: 1px solid var(--line); border-radius: 10px; }
.invoice-due.overdue { border-color: #fecaca; background: #fef2f2; }
.invoice-due-amt { font-weight: 800; font-size: 16px; }
.bank { background: var(--soft); padding: 12px; border-radius: 9px; font: 13px/1.6 var(--font); white-space: pre-wrap; margin: 8px 0; }
.pay-summary { display: flex; justify-content: space-between; gap: 10px; background: var(--soft); padding: 12px 14px; border-radius: 10px; }
.stripe-box { min-height: 40px; }
.invoice-page { max-width: 860px; margin: 0 auto; display: flex; flex-direction: column; gap: 14px; }
.invoice { background: #fff; border: 1px solid var(--line); border-radius: 14px; padding: 36px; display: flex; flex-direction: column; gap: 22px; }
.invoice-head { display: flex; justify-content: space-between; gap: 20px; }
.invoice-head .logo { padding: 0 0 8px; }
.invoice-head h1 { font-size: 28px; letter-spacing: .1em; color: var(--brand); }
.invoice-head p { margin: 4px 0; }
.invoice-meta { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; padding: 16px; background: #f8fafc; border-radius: 10px; }
.invoice-meta span { display: block; font-size: 11px; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); margin-top: 6px; }
.invoice-meta span:first-child { margin-top: 0; }
.invoice-bank { border-top: 1px dashed var(--line); padding-top: 14px; }

/* auth */
.auth { display: grid; grid-template-columns: 1fr 1fr; min-height: 100vh; }
.auth-side { background: radial-gradient(circle at 20% 20%, #065f46, #0b1324 60%); color: #e2e8f0; padding: 40px; display: flex; flex-direction: column; }
.logo.light strong { color: #fff; }
.auth-pitch { margin: auto 0; max-width: 420px; }
.auth-pitch h2 { font-size: 30px; color: #fff; margin-bottom: 16px; }
.auth-pitch ul { padding: 0; list-style: none; display: flex; flex-direction: column; gap: 10px; font-size: 16px; }
.auth-pitch li::before { content: '✓'; color: #34d399; font-weight: 800; margin-right: 10px; }
.auth-foot { color: #94a3b8; }
.auth-main { display: grid; place-items: center; padding: 24px; }
.auth-card { width: 100%; max-width: 400px; }
.auth-card h1 { font-size: 26px; margin-bottom: 4px; }
.auth-card > p { margin: 0 0 22px; }

/* responsive */
@media (max-width: 1100px) {
  .grid-3 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .widget-grid { grid-template-columns: 1fr; }
  .preview-card { position: static; }
  .preview-frame { height: 720px; }
}
@media (max-width: 900px) {
  .shell { grid-template-columns: 1fr; }
  .sidebar { position: fixed; left: 0; top: 0; bottom: 0; width: 260px; z-index: 60; transform: translateX(-100%); transition: transform .2s; }
  .nav-open .sidebar { transform: none; }
  .nav-open .scrim { display: block; position: fixed; inset: 0; background: rgba(15,23,42,.45); z-index: 55; }
  .menu-btn { display: inline-grid; }
  .grid-2, .grid-2.wide-left, .grid-3, .map-editor { grid-template-columns: 1fr; }
  .map-editor-list { position: static; }
  .auth { grid-template-columns: 1fr; }
  .auth-side { display: none; }
  .content { padding: 16px; }
  .topbar { padding: 0 16px; }
  .invoice-meta { grid-template-columns: 1fr; }
  .funnel-row { grid-template-columns: 110px 1fr 80px; }
}
@media (max-width: 560px) {
  .invoice { padding: 20px; }
  .invoice-head { flex-direction: column; }
  .invoice-due { grid-template-columns: 1fr; }
  .dl { grid-template-columns: 1fr; }
  .kv-grid { grid-template-columns: 1fr 1fr; }
}
@media print {
  body { background: #fff; }
  .no-print, .sidebar, .topbar, .banner, .toasts { display: none !important; }
  .shell { display: block; } .content, .print-shell { padding: 0; }
  .invoice { border: 0; padding: 0; }
  .card { box-shadow: none; break-inside: avoid; }
}

/* billing: change plan */
.plan-options { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 14px; }
.plan-option { border: 1px solid var(--line); border-radius: 12px; padding: 16px; display: flex; flex-direction: column; gap: 8px; }
.plan-option-head { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; flex-wrap: wrap; }
.plan-option-head h4 { font-size: 16px; }
.plan-option-price { font-weight: 800; }
.plan-option p { margin: 0; }
.plan-option .ticks { flex: 1; }
.plan-footnote { border-top: 1px dashed var(--line); margin-top: 16px; padding-top: 12px; display: flex; flex-direction: column; gap: 8px; }
.plan-footnote p { margin: 0; }

/* 360° viewer */
.pano{position:relative;width:100%;border-radius:12px;overflow:hidden;background:#0f172a;touch-action:none;user-select:none}
.pano canvas{width:100%;height:100%;cursor:grab}.pano canvas:active{cursor:grabbing}
.pano-fallback{height:100%;overflow-x:auto}.pano-fallback img{height:100%;display:block}
.pano-msg{position:absolute;inset:0;display:grid;place-items:center;color:#cbd5e1;font-size:13px}
.pano-hint{position:absolute;left:10px;bottom:10px;background:rgba(15,23,42,.7);color:#fff;font-size:11px;padding:4px 8px;border-radius:6px;pointer-events:none}
.pano-full{position:absolute;right:10px;top:10px;width:32px;height:32px;border-radius:8px;border:0;background:rgba(15,23,42,.7);color:#fff;font-size:16px;cursor:pointer}
.pano:fullscreen{border-radius:0}
.pano-modal{position:fixed;inset:0;background:rgba(2,6,23,.75);z-index:60;display:flex;align-items:center;justify-content:center;padding:16px}
.pano-modal-box{width:100%;max-width:1000px;background:#0f172a;border-radius:14px;overflow:hidden}
.pano-modal-head{display:flex;justify-content:space-between;align-items:center;color:#fff;padding:10px 14px}
.pano-modal-head button{background:rgba(255,255,255,.12);border:0;color:#fff;width:32px;height:32px;border-radius:50%;cursor:pointer}

/* map editor */
.map-editor { grid-template-columns: minmax(0, 1fr) 280px; }
.map-tools .seg.tools { margin: 0; }
.map-tools .seg.tools button { display: inline-flex; align-items: center; gap: 6px; }
.map-tools .icon-btn.on { background: var(--brand-50); color: var(--brand); }
.map-tools .icon-btn:disabled { opacity: .4; }
.map-hintbar { font-size: 12.5px; color: var(--ink-2); padding: 8px 14px; background: #f8fafc; border-bottom: 1px solid var(--line); display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }
.editor-svg { width: 100%; height: auto; display: block; border: 1px solid var(--line); border-radius: 10px; touch-action: none; user-select: none; }
.editor-svg.tool-plot, .editor-svg.tool-road, .editor-svg.tool-zone, .editor-svg.tool-rect { cursor: crosshair; }
.editor-svg.tool-select .hit { cursor: move; }
.vertex-handle { fill: #fff; stroke: #2563eb; stroke-width: 2.5; cursor: grab; }
.mid-handle { fill: #2563eb; opacity: .55; cursor: copy; }
.mid-handle:hover { opacity: 1; }
.map-bottom { border-top: 1px solid var(--line); border-bottom: 0; }
.range-inline { display: inline-flex; align-items: center; gap: 8px; font-size: 12.5px; color: var(--ink-2); }
.range-inline input { width: 120px; }
.map-side .card-body { padding: 14px; }
.export-thumb { width: 100%; border-radius: 8px; border: 1px solid var(--line); }
.pano-preview { grid-column: 1 / -1; }
@media (max-width: 1100px) { .map-editor { grid-template-columns: 1fr; } .map-tools .seg.tools span { display: none; } }
.render-strip { display: flex; gap: 8px; overflow-x: auto; } .render-strip img { height: 96px; border-radius: 8px; display: block; object-fit: cover; aspect-ratio: 16/9; }
.pay-methods { align-self: flex-start; }
.pay-methods button { display: inline-flex; gap: 6px; align-items: center; }
.paid-up { display: flex; gap: 12px; align-items: center; padding: 12px 14px; border: 1px solid var(--line); border-radius: 10px; background: var(--soft); flex-wrap: wrap; }
.paid-up > svg { color: #059669; font-size: 22px; flex: none; }
.paid-up > div { flex: 1; min-width: 200px; }
.bank-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 12px; max-width: 900px; }
.bank-card { border: 1px solid var(--line); border-radius: 10px; padding: 12px 14px; }
.bank-card-head { display: flex; gap: 6px; align-items: center; font-weight: 700; }
.bank-note { grid-column: 1 / -1; margin: 0; }
/* product logo (white artwork) */
.logo:has(.brand-logo) { flex-direction: column; align-items: flex-start; gap: 6px; }
.brand-logo { height: 34px; width: auto; max-width: 190px; object-fit: contain; display: block; }
.sidebar .brand-logo, .auth-side .brand-logo, .auth-mobile-brand .brand-logo { filter: brightness(0) invert(1); } /* white-washed on dark */
.logo.on-light .brand-logo { filter: none; }
.logo.on-light small { color: var(--muted); }
.auth-side .brand-logo { height: 42px; max-width: 240px; }
.auth-mobile-brand { display: none; background: #0b1324; border-radius: 12px; padding: 10px 14px; margin-bottom: 20px; width: max-content; }
.auth-mobile-brand .logo { padding: 0; }
@media (max-width: 1100px) { .auth-mobile-brand { display: block; } }
/* first-login tour */
.tour { position: fixed; inset: 0; z-index: 200; }
.tour-dim { position: absolute; inset: 0; background: rgba(2,6,23,.55); }
.tour-spot { position: fixed; border-radius: 10px; box-shadow: 0 0 0 9999px rgba(2,6,23,.55); outline: 2px solid #34d399; transition: all .2s ease; pointer-events: none; }
.tour-card { position: fixed; width: 320px; max-width: calc(100vw - 24px); background: #fff; border-radius: 14px; padding: 18px; box-shadow: 0 24px 60px rgba(2,6,23,.35); }
.tour-card h3 { font-size: 16px; margin: 4px 0 6px; }
.tour-card p { font-size: 13.5px; color: var(--ink-2); margin: 0 0 14px; line-height: 1.55; }
.tour-count { font-size: 11px; font-weight: 700; color: var(--brand, #047857); text-transform: uppercase; letter-spacing: .06em; }
.tour-actions { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.tour-nav { display: flex; gap: 6px; }
.tour-card.with-arrow::before { content: ''; position: absolute; left: -7px; top: 22px; width: 14px; height: 14px; background: #fff; transform: rotate(45deg); }
.tour-link { font-size: 12.5px; color: #94a3b8; background: none; border: 0; text-align: left; padding: 4px 12px; cursor: pointer; }
.tour-link:hover { color: #fff; }
