:root {
  --navy: #0b1f3a;
  --blue: #1265e8;
  --blue-2: #0b57ca;
  --green: #129447;
  --orange: #ef7c15;
  --red: #d92d20;
  --bg: #f5f7fb;
  --card: #ffffff;
  --text: #122033;
  --muted: #6d7787;
  --line: #e3e8ef;
  --shadow: 0 10px 30px rgba(11,31,58,.08);
  --radius: 18px;
}
* { box-sizing: border-box; }
html, body { margin: 0; min-height: 100%; background: var(--bg); color: var(--text); font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; }
body { padding-bottom: env(safe-area-inset-bottom); }
button, input, select { font: inherit; }
button { cursor: pointer; }
.app-shell { width: min(100%, 560px); min-height: 100dvh; margin: 0 auto; background: var(--bg); padding-bottom: 86px; }
.topbar { position: sticky; top: 0; z-index: 10; display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 18px 18px 12px; background: rgba(245,247,251,.95); backdrop-filter: blur(14px); }
.brand { font-weight: 900; letter-spacing: -.03em; font-size: 1.35rem; color: var(--navy); }
.brand span { color: var(--blue); }
.topbar-actions { display: flex; gap: 8px; }
.icon-btn { border: 0; background: var(--card); width: 42px; height: 42px; border-radius: 14px; box-shadow: var(--shadow); color: var(--navy); font-weight: 800; }
main { padding: 4px 18px 20px; }
.eyebrow { text-transform: uppercase; font-size: .72rem; letter-spacing: .09em; font-weight: 800; color: var(--muted); }
h1 { font-size: 1.55rem; line-height: 1.15; margin: 6px 0 4px; letter-spacing: -.03em; }
h2 { font-size: 1.05rem; margin: 0; }
p { line-height: 1.45; }
.muted { color: var(--muted); }
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); padding: 16px; }
.card + .card { margin-top: 12px; }
.next-card { border-color: #f3d9aa; background: linear-gradient(180deg,#fffaf0,#fff); }
.next-row { display: grid; grid-template-columns: 46px 1fr; gap: 12px; align-items: start; }
.next-icon { width: 46px; height: 46px; border-radius: 14px; display:grid; place-items:center; background:#fff1d4; font-size:1.3rem; }
.primary, .secondary, .danger, .success, .ghost { min-height: 48px; border-radius: 14px; padding: 12px 16px; font-weight: 800; border: 1px solid transparent; }
.primary { background: var(--blue); color: white; }
.primary:hover { background: var(--blue-2); }
.secondary { background: white; color: var(--blue); border-color: #bfd4f5; }
.success { background: var(--green); color: white; }
.danger { background: var(--red); color: white; }
.ghost { background: #f3f6fa; color: var(--navy); border-color: var(--line); }
.full { width: 100%; }
.quick-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin: 14px 0; }
.quick { min-height: 62px; border: 0; border-radius: 16px; color: white; font-weight: 850; box-shadow: var(--shadow); }
.quick.quote { background: var(--green); }
.quick.job { background: var(--blue); }
.quick.collect { background: var(--orange); }
.metric-grid { display:grid; grid-template-columns: repeat(2,1fr); gap:10px; margin-top:12px; }
.metric { background:var(--card); border:1px solid var(--line); border-radius:16px; padding:14px; }
.metric strong { display:block; margin-top:6px; font-size:1.2rem; }
.metric.profit { grid-column: 1 / -1; }
.list { display:flex; flex-direction:column; gap:10px; margin-top:12px; }
.list-item { border:1px solid var(--line); background:var(--card); border-radius:16px; padding:14px; display:grid; grid-template-columns:1fr auto; gap:10px; align-items:center; }
.list-item button { border:0; background:transparent; text-align:left; padding:0; color:inherit; }
.item-title { font-weight:850; margin-bottom:4px; }
.item-meta { color:var(--muted); font-size:.9rem; line-height:1.35; }
.badge { display:inline-flex; align-items:center; border-radius:999px; padding:5px 9px; font-size:.72rem; font-weight:800; white-space:nowrap; }
.badge.blue { color:#0b57ca; background:#eaf2ff; }
.badge.green { color:#0b7b39; background:#e5f7ec; }
.badge.orange { color:#a84c00; background:#fff0df; }
.badge.gray { color:#596273; background:#eff2f6; }
.badge.red { color:#a51b12; background:#fde9e7; }
.tabs { display:flex; gap:8px; overflow:auto; padding:4px 0 2px; scrollbar-width:none; }
.tabs::-webkit-scrollbar { display:none; }
.tab { border:1px solid var(--line); background:white; border-radius:999px; padding:8px 12px; white-space:nowrap; font-weight:750; color:var(--muted); }
.tab.active { background:var(--navy); color:white; border-color:var(--navy); }
.money-row { display:flex; justify-content:space-between; align-items:center; padding:14px 0; border-bottom:1px solid var(--line); }
.money-row:last-child { border-bottom:0; }
.money-row strong { font-size:1.1rem; }
.money-green { color:var(--green); }
.money-orange { color:var(--orange); }
.money-blue { color:var(--blue); }
.more-list .list-item { grid-template-columns:44px 1fr auto; }
.more-icon { width:40px; height:40px; border-radius:12px; background:#eff4fb; display:grid; place-items:center; }
.bottom-nav { position:fixed; z-index:20; left:50%; transform:translateX(-50%); bottom:0; width:min(100%,560px); display:grid; grid-template-columns:repeat(4,1fr); background:rgba(255,255,255,.97); border-top:1px solid var(--line); padding:8px 10px calc(8px + env(safe-area-inset-bottom)); backdrop-filter:blur(18px); }
.nav-btn { border:0; background:transparent; color:#7b8492; min-height:54px; display:flex; flex-direction:column; justify-content:center; align-items:center; gap:4px; font-size:.72rem; font-weight:800; }
.nav-btn .nav-icon { font-size:1.15rem; }
.nav-btn.active { color:var(--blue); }
.empty { text-align:center; padding:34px 18px; color:var(--muted); }
.modal-backdrop { position:fixed; inset:0; z-index:50; background:rgba(4,14,28,.52); display:flex; align-items:flex-end; justify-content:center; }
.modal { width:min(100%,560px); max-height:92dvh; overflow:auto; background:white; border-radius:24px 24px 0 0; padding:18px 18px calc(22px + env(safe-area-inset-bottom)); box-shadow:0 -20px 60px rgba(0,0,0,.15); }
.modal-header { display:flex; justify-content:space-between; align-items:center; gap:12px; margin-bottom:18px; }
.close { border:0; background:#f2f4f7; width:40px; height:40px; border-radius:12px; font-size:1.1rem; }
.field { margin-bottom:14px; }
label { display:block; font-size:.84rem; font-weight:800; margin-bottom:7px; }
input, select { width:100%; min-height:50px; border:1.5px solid #d9e0e8; border-radius:14px; padding:12px 14px; background:white; color:var(--text); outline:none; }
input:focus, select:focus { border-color:var(--blue); box-shadow:0 0 0 3px rgba(18,101,232,.10); }
.form-actions { display:grid; gap:10px; margin-top:18px; }
.two-actions { grid-template-columns:1fr 1fr; }
.detail-grid { display:grid; gap:10px; margin-top:12px; }
.detail-row { display:flex; justify-content:space-between; gap:16px; padding:12px 0; border-bottom:1px solid var(--line); }
.detail-row:last-child { border-bottom:0; }
.alert { padding:14px; border-radius:14px; margin:12px 0; font-size:.92rem; }
.alert.warn { background:#fff5e8; border:1px solid #ffd5a5; }
.alert.success { background:#eaf8ef; border:1px solid #b9e5c8; }
.segmented { display:grid; grid-template-columns:1fr 1fr; gap:8px; }
.segmented button { min-height:48px; border:1.5px solid var(--line); background:white; border-radius:14px; font-weight:800; }
.segmented button.active { border-color:var(--green); background:#eaf8ef; color:#0a7133; }
.splash { min-height:100dvh; display:flex; flex-direction:column; justify-content:center; padding:28px; background:white; }
.splash .logo { font-size:2rem; font-weight:950; color:var(--navy); letter-spacing:-.04em; }
.splash .logo span { color:var(--blue); }
.splash h1 { font-size:1.8rem; }
.lang-grid { display:grid; grid-template-columns:1fr 1fr; gap:10px; margin:18px 0; }
.lang-grid button { min-height:54px; border:1.5px solid var(--line); border-radius:14px; background:white; font-weight:800; }
.lang-grid button.active { border-color:var(--blue); background:#eef5ff; color:var(--blue); }
.small { font-size:.82rem; }
@media (min-width: 700px) {
  .app-shell { min-height: calc(100dvh - 40px); margin-top:20px; border-radius:28px 28px 0 0; box-shadow:0 18px 60px rgba(11,31,58,.11); }
}
