body.app { background: var(--bg); }
.app-main { padding: 96px 0 80px; min-height: 100vh; }
.page-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 16px; flex-wrap: wrap; margin-bottom: 28px; }
.page-head p { margin: 10px 0 0; color: var(--muted); font-weight: 300; }
.kpis { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; margin-bottom: 14px; }
@media (max-width: 900px) { .kpis { grid-template-columns: repeat(2, 1fr); } }
.kpi { padding: 20px 22px; }
.kpi .v { font-size: 34px; font-weight: 200; letter-spacing: -0.02em; margin-top: 8px; font-variant-numeric: tabular-nums; }
.kpi .s { font-size: 13px; color: var(--muted); margin-top: 4px; }
.two-col { display: grid; grid-template-columns: 1.6fr 1fr; gap: 14px; align-items: start; }
@media (max-width: 980px) { .two-col { grid-template-columns: 1fr; } }
.card h4 { margin: 0; font-weight: 400; font-size: 17px; }
.card-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 18px 22px; border-bottom: 0.5px solid var(--line-2); flex-wrap: wrap; }

.sugg { display: grid; grid-template-columns: 1fr auto; gap: 16px; padding: 16px 22px; align-items: center; }
.sugg + .sugg { border-top: 0.5px solid var(--line-2); }
.sugg .what { font-size: 15px; }
.sugg .why { font-size: 13px; color: var(--muted); margin-top: 6px; font-weight: 300; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.sugg .nums { display: flex; gap: 14px; font-size: 12.5px; color: var(--ink-2); margin-top: 8px; flex-wrap: wrap; }
.sugg .nums span b { font-family: var(--mono); font-weight: 500; }
@media (max-width: 640px) { .sugg { grid-template-columns: 1fr; } }

.feed { list-style: none; margin: 0; padding: 6px 0; }
.feed li { padding: 12px 22px; font-size: 14px; display: grid; grid-template-columns: 10px 1fr; gap: 12px; }
.feed li::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--line); margin-top: 6px; }
.feed li.order::before { background: var(--ours); }
.feed li.connect::before { background: var(--go); }
.feed li time { display: block; font-size: 12px; color: var(--faint); margin-top: 2px; }

.filters { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; padding: 14px 22px; border-bottom: 0.5px solid var(--line-2); }
.pill-btn { border: 0.5px solid var(--line); background: var(--paper); border-radius: 999px; padding: 5px 12px; font-size: 13px; cursor: pointer; color: var(--ink-2); }
.pill-btn.on { background: var(--ink-2); color: var(--bg); border-color: var(--ink-2); }
.search { flex: 1; min-width: 180px; border: 0.5px solid var(--line); border-radius: 999px; padding: 6px 14px; background: var(--paper); outline: none; }
.search:focus { border-color: #9db4d6; }

table.t { width: 100%; border-collapse: collapse; font-size: 14px; }
table.t th { text-align: left; font-weight: 400; color: var(--muted); font-size: 12px; letter-spacing: .04em; text-transform: uppercase; padding: 10px 22px; border-bottom: 0.5px solid var(--line-2); }
table.t td { padding: 12px 22px; border-bottom: 0.5px solid var(--line-2); font-variant-numeric: tabular-nums; }
table.t tr:last-child td { border-bottom: 0; }
.empty { padding: 36px 22px; text-align: center; color: var(--muted); font-weight: 300; }

/* modal + drawer */
.scrim { position: fixed; inset: 0; background: rgba(26, 23, 24, .28); backdrop-filter: blur(3px); -webkit-backdrop-filter: blur(3px); z-index: 80; display: none; }
.scrim.open { display: block; }
.modal { position: fixed; z-index: 90; left: 50%; top: 50%; transform: translate(-50%, -50%); width: min(560px, calc(100% - 24px)); max-height: calc(100vh - 32px); overflow: auto; background: var(--paper); border-radius: 16px; border: 0.5px solid var(--line); box-shadow: 0 30px 80px rgba(20, 30, 60, .18); display: none; }
.modal.open { display: block; }
.modal .mh { padding: 22px 24px 0; display: flex; justify-content: space-between; gap: 12px; }
.modal .mb { padding: 18px 24px 24px; }
.x { border: 0; background: transparent; font-size: 22px; line-height: 1; color: var(--muted); cursor: pointer; }
.drawer { position: fixed; z-index: 90; top: 0; right: 0; bottom: 0; width: min(520px, 100%); background: var(--paper); border-left: 0.5px solid var(--line); box-shadow: -20px 0 60px rgba(20, 30, 60, .12); transform: translateX(105%); transition: transform .3s ease; overflow: auto; }
.drawer.open { transform: none; }
.drawer .dh { padding: 22px 24px; border-bottom: 0.5px solid var(--line-2); display: flex; justify-content: space-between; gap: 12px; position: sticky; top: 0; background: var(--paper); }
.drawer .db { padding: 22px 24px; display: grid; gap: 18px; }
.kv { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.kv div { background: #f6f8fb; border-radius: 10px; padding: 12px 14px; }
.kv small { display: block; color: var(--muted); font-size: 12px; }
.kv b { font-weight: 300; font-size: 24px; font-variant-numeric: tabular-nums; }

/* forms */
.field { display: grid; gap: 6px; margin-bottom: 14px; }
.field label { font-size: 13px; color: var(--ink-2); }
.field .hint { font-size: 12px; color: var(--muted); font-weight: 300; }
.input { width: 100%; border: 0.5px solid #c9d3e1; border-radius: 10px; padding: 10px 12px; background: #fff; outline: none; }
.input:focus { border-color: #7d9cc9; box-shadow: 0 0 0 3px rgba(75, 91, 214, .1); }
textarea.input { font-family: var(--mono); font-size: 12px; min-height: 110px; resize: vertical; }
.err { color: var(--stop); font-size: 13px; min-height: 18px; margin: 4px 0 0; }
.ok { color: #1d7c4a; font-size: 14px; }
.seg { display: inline-grid; grid-auto-flow: column; background: #eef2f7; border-radius: 999px; padding: 3px; gap: 2px; }
.seg button { border: 0; background: transparent; border-radius: 999px; padding: 6px 16px; cursor: pointer; font-size: 14px; color: var(--ink-2); }
.seg button.on { background: #fff; box-shadow: 0 1px 4px rgba(0,0,0,.08); }
.seg button[disabled] { color: var(--faint); cursor: not-allowed; }
.choice { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.choice button { text-align: left; border: 0.5px solid var(--line); background: #fff; border-radius: 12px; padding: 14px; cursor: pointer; }
.choice button.on { border-color: var(--ours); box-shadow: 0 0 0 3px rgba(75, 91, 214, .12); }
.choice button b { display: block; font-weight: 500; margin-bottom: 4px; }
.choice button span { font-size: 13px; color: var(--muted); font-weight: 300; }
.drop { border: 1px dashed #b6c4d8; border-radius: 12px; padding: 22px; text-align: center; color: var(--muted); cursor: pointer; transition: background .2s, border-color .2s; }
.drop.over { background: var(--sky-2); border-color: var(--ours); }
.drop.have { border-style: solid; border-color: var(--go); color: #1d7c4a; background: #f2fbf6; }
.steps { display: flex; gap: 6px; margin: 4px 0 18px; }
.steps i { flex: 1; height: 3px; border-radius: 3px; background: #e3e9f2; }
.steps i.on { background: var(--ink-2); }
ol.howto { margin: 0; padding-left: 20px; display: grid; gap: 8px; font-weight: 300; }
ol.howto b { font-weight: 500; }
.toggle-row { display: flex; justify-content: space-between; align-items: center; padding: 10px 0; border-bottom: 0.5px solid var(--line-2); }
.switch { position: relative; width: 40px; height: 24px; flex: none; }
.switch input { opacity: 0; width: 0; height: 0; }
.switch span { position: absolute; inset: 0; background: #dfe5ee; border-radius: 999px; transition: .2s; cursor: pointer; }
.switch span::after { content: ""; position: absolute; left: 3px; top: 3px; width: 18px; height: 18px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(0,0,0,.2); transition: .2s; }
.switch input:checked + span { background: var(--ink-2); }
.switch input:checked + span::after { transform: translateX(16px); }
input[type=range] { width: 100%; accent-color: var(--ink-2); }
.auth { max-width: 420px; margin: 0 auto; }
.toast { position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%) translateY(20px); opacity: 0; background: var(--ink-2); color: #fff; padding: 10px 18px; border-radius: 999px; font-size: 14px; transition: .25s; z-index: 100; pointer-events: none; }
.toast.show { opacity: 1; transform: translateX(-50%); }
.banner { display: flex; gap: 14px; align-items: center; justify-content: space-between; flex-wrap: wrap; padding: 18px 22px; border-radius: var(--radius); background: linear-gradient(120deg, #e3f0fb, #f1e9fb); border: 0.5px solid var(--line); margin-bottom: 14px; }
@media (max-width: 560px) {
  body.app .nav > .group:first-child, body.app #acct { display: none; }
  body.app .nav a.item { padding: 6px 8px; }
  .app-main { padding-top: 76px; }
}
