/* EVO: dark glass UI. System fonts only (the CSP allows no outside fonts). */
:root {
    --bg: #07070f;
    --glass: rgba(255, 255, 255, .045);
    --glass-2: rgba(255, 255, 255, .07);
    --line: rgba(255, 255, 255, .09);
    --line-2: rgba(255, 255, 255, .16);
    --text: #f3f3f8;
    --muted: #9b9bb4;
    --violet: #8b5cf6;
    --pink: #ec4899;
    --cyan: #22d3ee;
    --up: #34d399;
    --down: #fb7185;
    --amber: #fbbf24;
    --grad: linear-gradient(135deg, #8b5cf6, #ec4899);
    --radius: 20px;
    --shadow: 0 20px 50px -20px rgba(0, 0, 0, .7);
}

* { box-sizing: border-box; }
html { background: var(--bg); }
body {
    margin: 0; min-height: 100vh; color: var(--text);
    font: 15px/1.45 -apple-system, BlinkMacSystemFont, "SF Pro Display", "Segoe UI Variable", "Segoe UI", Roboto, sans-serif;
    -webkit-font-smoothing: antialiased;
    background:
        radial-gradient(900px 600px at 0% -10%, rgba(139, 92, 246, .28), transparent 60%),
        radial-gradient(700px 500px at 100% 0%, rgba(236, 72, 153, .14), transparent 60%),
        radial-gradient(900px 700px at 80% 110%, rgba(34, 211, 238, .12), transparent 60%),
        var(--bg);
    background-attachment: fixed;
}

h1 { font-size: 30px; line-height: 1.15; margin: 2px 0 6px; letter-spacing: -.02em; }
h2 { font-size: 15px; font-weight: 650; margin: 0; letter-spacing: -.01em; }
p { margin: 0; }
.muted { color: var(--muted); }
.small { font-size: 13px; }
.up { color: var(--up); }
.down, .bad { color: var(--down); }
.sprite { display: none; }

.ic { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; flex-shrink: 0; }
.ic .fill, .round .ic .fill { fill: currentColor; stroke: none; }

/* ------------------------------------------------------------ shell */

.app { display: grid; grid-template-columns: 232px 1fr; min-height: 100vh; }

.side {
    position: sticky; top: 0; height: 100vh; padding: 24px 16px;
    display: flex; flex-direction: column; gap: 28px;
    border-right: 1px solid var(--line);
    background: rgba(10, 10, 20, .55); backdrop-filter: blur(18px); -webkit-backdrop-filter: blur(18px);
}
.brand { display: flex; align-items: center; gap: 10px; font-weight: 800; letter-spacing: .14em; font-size: 18px; padding: 0 8px; }
.brand-mark {
    width: 34px; height: 34px; border-radius: 11px; background: var(--grad);
    box-shadow: 0 8px 24px -6px rgba(139, 92, 246, .8), inset 0 0 0 1px rgba(255, 255, 255, .25);
    position: relative;
}
.brand-mark::after { content: ""; position: absolute; inset: 9px; border-radius: 50%; border: 3px solid rgba(255, 255, 255, .9); }

.nav { display: flex; flex-direction: column; gap: 4px; }
.nav-btn {
    display: flex; align-items: center; gap: 12px; width: 100%;
    background: none; border: 0; color: var(--muted); font: inherit; font-weight: 550;
    padding: 11px 12px; border-radius: 12px; cursor: pointer; text-align: left;
}
.nav-btn:hover { color: var(--text); background: var(--glass); }
.nav-btn.active { color: #fff; background: linear-gradient(135deg, rgba(139, 92, 246, .9), rgba(236, 72, 153, .75)); box-shadow: 0 10px 24px -10px rgba(139, 92, 246, .9); }
.side-foot { margin-top: auto; }

.main { min-width: 0; padding: 28px 32px 110px; max-width: 1320px; width: 100%; }

.hero { display: flex; justify-content: space-between; align-items: flex-end; gap: 16px; flex-wrap: wrap; margin-bottom: 22px; }
.eyebrow { color: var(--muted); font-size: 13px; text-transform: uppercase; letter-spacing: .12em; }
#greeting { background: linear-gradient(90deg, #fff, #d8c9ff 60%, #f9a8d4); -webkit-background-clip: text; background-clip: text; color: transparent; }
.chips { display: flex; gap: 8px; flex-wrap: wrap; }
.chip {
    display: inline-flex; align-items: center; gap: 7px; padding: 8px 12px; border-radius: 999px;
    background: var(--glass); border: 1px solid var(--line); color: var(--muted); font-size: 13px; white-space: nowrap;
}
.chip .ic { width: 16px; height: 16px; }
.chip.on { color: var(--text); border-color: rgba(251, 191, 36, .35); }
.chip.on .ic { color: var(--amber); }
.chip.playing { color: var(--text); border-color: rgba(52, 211, 153, .35); }
.chip.playing .ic { color: var(--up); }
.dot { width: 8px; height: 8px; border-radius: 50%; background: var(--up); box-shadow: 0 0 0 0 rgba(52, 211, 153, .7); animation: pulse 2.4s infinite; }
@keyframes pulse { 70% { box-shadow: 0 0 0 8px rgba(52, 211, 153, 0); } 100% { box-shadow: 0 0 0 0 rgba(52, 211, 153, 0); } }

/* ------------------------------------------------------------ cards */

.kpis { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; margin-bottom: 16px; }
.grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; align-items: start; grid-auto-flow: row dense; }
.span2 { grid-column: span 2; }

.card, .kpi {
    background: linear-gradient(180deg, rgba(255, 255, 255, .06), rgba(255, 255, 255, .025));
    border: 1px solid var(--line); border-radius: var(--radius);
    backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px);
    box-shadow: var(--shadow), inset 0 1px 0 rgba(255, 255, 255, .06);
    min-width: 0;
}
.card { padding: 20px; }
.kpi { padding: 18px 18px 16px; display: flex; justify-content: space-between; gap: 12px; }
.kpi-label { color: var(--muted); font-size: 13px; }
.kpi-value { font-size: 28px; font-weight: 700; letter-spacing: -.02em; margin: 6px 0 4px; white-space: nowrap; }
.kpi-sub { font-size: 13px; color: var(--muted); }

.card-head { display: flex; align-items: center; gap: 12px; margin-bottom: 16px; }
.card-head > div { flex: 1; min-width: 0; }

.badge {
    width: 46px; height: 46px; border-radius: 14px; display: grid; place-items: center; color: #fff; flex-shrink: 0;
    box-shadow: 0 10px 22px -10px currentColor, inset 0 0 0 1px rgba(255, 255, 255, .22);
}
.badge.sm { width: 38px; height: 38px; border-radius: 12px; }
.badge.sm .ic { width: 18px; height: 18px; }
.badge.violet { background: linear-gradient(135deg, #a78bfa, #7c3aed); box-shadow: 0 10px 24px -10px #7c3aed, inset 0 0 0 1px rgba(255,255,255,.22); }
.badge.pink   { background: linear-gradient(135deg, #f472b6, #db2777); box-shadow: 0 10px 24px -10px #db2777, inset 0 0 0 1px rgba(255,255,255,.22); }
.badge.green  { background: linear-gradient(135deg, #34d399, #059669); box-shadow: 0 10px 24px -10px #059669, inset 0 0 0 1px rgba(255,255,255,.22); }
.badge.amber  { background: linear-gradient(135deg, #fbbf24, #f97316); box-shadow: 0 10px 24px -10px #f97316, inset 0 0 0 1px rgba(255,255,255,.22); }
.badge.blue   { background: linear-gradient(135deg, #60a5fa, #2563eb); box-shadow: 0 10px 24px -10px #2563eb, inset 0 0 0 1px rgba(255,255,255,.22); }

.pill { padding: 5px 10px; border-radius: 999px; font-size: 13px; font-weight: 600; background: var(--glass-2); border: 1px solid var(--line); white-space: nowrap; }
.pill.up { background: rgba(52, 211, 153, .12); border-color: rgba(52, 211, 153, .3); }
.pill.down { background: rgba(251, 113, 133, .12); border-color: rgba(251, 113, 133, .3); }

/* lights */
.switch { width: 52px; height: 30px; border-radius: 999px; border: 1px solid var(--line-2); background: rgba(255, 255, 255, .08); position: relative; cursor: pointer; padding: 0; flex-shrink: 0; transition: .2s; }
.switch span { position: absolute; top: 3px; left: 3px; width: 22px; height: 22px; border-radius: 50%; background: #cfcfe0; transition: .2s; }
.switch[aria-checked="true"] { background: var(--grad); border-color: transparent; box-shadow: 0 6px 18px -6px var(--pink); }
.switch[aria-checked="true"] span { left: 25px; background: #fff; }

.gauge-wrap { position: relative; width: 170px; height: 170px; margin: 4px auto 12px; }
.gauge, .donut { width: 100%; height: 100%; transform: rotate(-90deg); }
.gauge-track { fill: none; stroke: rgba(255, 255, 255, .08); stroke-width: 10; }
.gauge-fill, .donut-fill { fill: none; stroke: var(--violet); stroke-width: 10; stroke-linecap: round; transition: stroke-dashoffset .6s, stroke .4s; filter: drop-shadow(0 0 6px currentColor); }
.gauge-label { position: absolute; inset: 0; display: grid; place-content: center; text-align: center; }
.gauge-label strong { font-size: 32px; letter-spacing: -.02em; }

input[type=range] { width: 100%; accent-color: var(--pink); margin: 4px 0 14px; }
.swatches { display: flex; gap: 10px; flex-wrap: wrap; justify-content: center; }
.swatch { width: 32px; height: 32px; border-radius: 50%; border: 2px solid rgba(255, 255, 255, .15); cursor: pointer; padding: 0; transition: transform .15s; }
.swatch:hover { transform: scale(1.12); }
.swatch.warm { background: #ffc982; } .swatch.cool { background: #e9f1ff; }
.swatch.red { background: #ff3b5c; } .swatch.orange { background: #ff8a1f; } .swatch.green { background: #22d47e; }
.swatch.blue { background: #3d6bff; } .swatch.purple { background: #9b4dff; } .swatch.pink { background: #ff5fbf; }

/* spotify */
.player { display: flex; gap: 14px; align-items: center; }
.cover {
    width: 84px; height: 84px; border-radius: 16px; flex-shrink: 0; display: grid; place-items: center; overflow: hidden;
    background: linear-gradient(135deg, rgba(52, 211, 153, .35), rgba(34, 211, 238, .25)); color: rgba(255, 255, 255, .8);
    box-shadow: 0 14px 30px -14px rgba(52, 211, 153, .8);
}
.cover img { width: 100%; height: 100%; object-fit: cover; display: block; }
.cover .ic { width: 30px; height: 30px; }
.track { min-width: 0; }
.track-title { font-size: 17px; font-weight: 650; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.track p { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.progress { height: 5px; border-radius: 999px; background: rgba(255, 255, 255, .08); margin: 18px 0 16px; overflow: hidden; }
.progress span { display: block; height: 100%; width: 0; background: linear-gradient(90deg, #34d399, #22d3ee); border-radius: inherit; transition: width .6s; }
.transport { display: flex; justify-content: center; align-items: center; gap: 14px; }

.round {
    width: 42px; height: 42px; border-radius: 50%; display: grid; place-items: center; cursor: pointer;
    background: var(--glass-2); border: 1px solid var(--line); color: var(--text); padding: 0; flex-shrink: 0;
}
.round:hover { border-color: var(--line-2); }
.round.big { width: 56px; height: 56px; background: var(--grad); border: 0; box-shadow: 0 12px 26px -10px var(--pink); }
.round.primary { background: var(--grad); border: 0; }
.round .ic { width: 18px; height: 18px; }

/* gold chart */
.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; margin-bottom: 14px; }
.stat { background: rgba(255, 255, 255, .035); border: 1px solid var(--line); border-radius: 14px; padding: 10px 12px; display: flex; flex-direction: column; gap: 2px; }
.stat strong { font-size: 16px; }
.tabs { display: inline-flex; background: rgba(255, 255, 255, .04); border: 1px solid var(--line); border-radius: 12px; padding: 3px; margin-bottom: 8px; }
.tab { background: none; border: 0; color: var(--muted); font: inherit; font-size: 13px; font-weight: 600; padding: 6px 14px; border-radius: 9px; cursor: pointer; }
.tab.active { background: var(--grad); color: #fff; }
.chart-box { position: relative; }
.chart { width: 100%; height: 230px; display: block; overflow: visible; }
.chart .grid-line { stroke: rgba(255, 255, 255, .06); stroke-width: 1; vector-effect: non-scaling-stroke; }
.chart .axis { fill: var(--muted); font-size: 11px; }
.chart .line { fill: none; stroke: url(#lineGrad); stroke-width: 2.6; vector-effect: non-scaling-stroke; filter: drop-shadow(0 0 6px rgba(167, 139, 250, .7)); }
.chart .area { fill: url(#areaGrad); }
.chart .cursor { stroke: rgba(255, 255, 255, .25); stroke-width: 1; stroke-dasharray: 3 4; vector-effect: non-scaling-stroke; }
.chart .marker { fill: #fff; stroke: var(--pink); stroke-width: 3; vector-effect: non-scaling-stroke; }
.tip {
    position: absolute; top: 0; transform: translateX(-50%); pointer-events: none; white-space: nowrap;
    background: rgba(20, 18, 34, .92); border: 1px solid var(--line-2); border-radius: 10px; padding: 6px 10px; font-size: 13px;
}

/* gold bot */
.donut-row { display: flex; align-items: center; gap: 18px; margin-bottom: 12px; }
.donut { width: 116px; height: 116px; flex-shrink: 0; }
.donut-fill { stroke: var(--amber); color: var(--amber); }
.legend { display: flex; align-items: center; gap: 6px; color: var(--muted); margin-top: 6px; }
.key { width: 9px; height: 9px; border-radius: 3px; display: inline-block; }
.key.gold { background: var(--amber); } .key.cash { background: rgba(255, 255, 255, .18); margin-left: 8px; }

/* weather */
.weather-now { display: flex; align-items: center; gap: 16px; margin-bottom: 14px; }
.weather-now strong { font-size: 44px; font-weight: 700; letter-spacing: -.03em; line-height: 1; background: linear-gradient(135deg, #e0f2fe, #7dd3fc); -webkit-background-clip: text; background-clip: text; color: transparent; }
.weather-now p:first-child { font-size: 16px; font-weight: 600; text-transform: capitalize; }
.hours { display: grid; grid-template-columns: repeat(6, 1fr); gap: 6px; margin-bottom: 12px; }
.hour { display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 8px 2px; border-radius: 12px; background: rgba(255, 255, 255, .035); border: 1px solid var(--line); font-size: 12px; }
.hour .bar { width: 6px; height: 34px; border-radius: 3px; background: rgba(255, 255, 255, .08); position: relative; overflow: hidden; }
.hour .bar span { position: absolute; left: 0; right: 0; bottom: 0; background: linear-gradient(0deg, #3b82f6, #22d3ee); border-radius: 3px; }
.hour .t { font-weight: 650; font-size: 13px; }

/* lists */
.list { list-style: none; margin: 0; padding: 0; }
.list li { padding: 10px 0; border-top: 1px solid var(--line); }
.list li:first-child { border-top: 0; padding-top: 2px; }
.kv { display: flex; justify-content: space-between; gap: 12px; align-items: center; }
.kv > span:first-child { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
.kv > :last-child { flex-shrink: 0; text-align: right; }
.status-dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; margin-right: 8px; background: var(--up); box-shadow: 0 0 8px var(--up); }
.status-dot.off { background: var(--down); box-shadow: 0 0 8px var(--down); }

.timeline { list-style: none; margin: 0; padding: 0 0 0 14px; border-left: 1px dashed var(--line-2); }
.timeline li { position: relative; padding: 0 0 14px 10px; }
.timeline li::before { content: ""; position: absolute; left: -20px; top: 5px; width: 9px; height: 9px; border-radius: 50%; background: var(--pink); box-shadow: 0 0 10px var(--pink); }
.timeline .when { color: var(--muted); font-size: 12px; }

.toggle {
    border: 1px solid var(--line); background: rgba(255, 255, 255, .06); color: var(--muted);
    border-radius: 999px; padding: 5px 14px; font: inherit; font-size: 13px; font-weight: 600; cursor: pointer; min-width: 56px;
}
.toggle.on { background: rgba(52, 211, 153, .14); color: var(--up); border-color: rgba(52, 211, 153, .4); }
.add-device { display: inline-flex; margin-top: 12px; text-decoration: none; }
.row-btns { display: flex; gap: 8px; flex-wrap: wrap; }
.scope { font-size: 11px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; padding: 2px 7px; border-radius: 6px; margin-left: 8px; background: rgba(255, 255, 255, .08); color: var(--muted); }
.scope.assistant { background: rgba(236, 72, 153, .15); color: #f9a8d4; }
.key-box { margin-top: 14px; padding: 14px; border-radius: 14px; border: 1px solid rgba(139, 92, 246, .45); background: rgba(139, 92, 246, .1); display: grid; gap: 10px; }
.key-box code, #key-url { font: 13px/1.4 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; word-break: break-all; user-select: all; }
.key-box > code { padding: 10px; border-radius: 10px; background: rgba(0, 0, 0, .35); }

/* group views: Overview shows its cards; other tabs show their own */
body[data-view] .card, body[data-view] .kpis { display: none; }
body[data-view="overview"] [data-group~="overview"],
body[data-view="home"] [data-group~="home"],
body[data-view="markets"] [data-group~="markets"],
body[data-view="life"] [data-group~="life"],
body[data-view="devices"] [data-group~="devices"] { display: block; }
body[data-view="overview"] .kpis { display: grid; }

/* chat */
.fab {
    position: fixed; right: 26px; bottom: 26px; width: 60px; height: 60px; border-radius: 50%; border: 0; cursor: pointer;
    background: var(--grad); color: #fff; display: grid; place-items: center; z-index: 5;
    box-shadow: 0 16px 36px -10px rgba(236, 72, 153, .9), inset 0 0 0 1px rgba(255, 255, 255, .25);
}
.fab .ic { width: 24px; height: 24px; }
.sheet { position: fixed; inset: 0; z-index: 10; background: rgba(4, 4, 10, .55); backdrop-filter: blur(4px); -webkit-backdrop-filter: blur(4px); display: flex; justify-content: flex-end; align-items: flex-end; padding: 24px; }
.sheet-panel {
    width: 100%; max-width: 420px; height: min(620px, 100%); display: flex; flex-direction: column;
    background: rgba(18, 16, 32, .96); border: 1px solid var(--line-2); border-radius: 24px; box-shadow: var(--shadow); padding: 18px;
}
.sheet-head { display: flex; align-items: center; gap: 12px; padding-bottom: 14px; border-bottom: 1px solid var(--line); }
.sheet-head > div { flex: 1; }
.messages { flex: 1; overflow-y: auto; display: flex; flex-direction: column; gap: 10px; padding: 14px 2px; }
.msg-bot, .msg-me { max-width: 85%; padding: 10px 13px; border-radius: 16px; white-space: pre-wrap; word-wrap: break-word; }
.msg-bot { background: var(--glass-2); border: 1px solid var(--line); border-bottom-left-radius: 6px; align-self: flex-start; }
.msg-me { background: var(--grad); border-bottom-right-radius: 6px; align-self: flex-end; }
.msg-bot.typing { color: var(--muted); }
.composer { display: flex; gap: 8px; }

/* voice */
.round.mic { width: 46px; height: 46px; touch-action: none; user-select: none; -webkit-user-select: none; -webkit-touch-callout: none; }
.round.mic.live { background: linear-gradient(135deg, #fb7185, #ec4899); border: 0; color: #fff; transform: scale(1.12); box-shadow: 0 0 0 6px rgba(236, 72, 153, .2), 0 0 0 14px rgba(236, 72, 153, .08); }
.round.mic.busy { opacity: .55; pointer-events: none; }
#speak-toggle[aria-pressed="false"] { opacity: .45; }
.recording { display: flex; align-items: center; gap: 10px; padding: 8px 12px; margin-bottom: 8px; border-radius: 12px; background: rgba(251, 113, 133, .1); border: 1px solid rgba(251, 113, 133, .3); }
.recording.cancel { background: rgba(255, 255, 255, .05); border-color: var(--line); }
.rec-dot { width: 10px; height: 10px; border-radius: 50%; background: var(--down); animation: blink 1s infinite; }
@keyframes blink { 50% { opacity: .25; } }
.msg-me.voice::before { content: "\1F3A4  "; }

/* ------------------------------------------------------------ shared controls (also sign-in pages) */

.btn {
    appearance: none; display: inline-flex; align-items: center; justify-content: center; gap: 8px;
    border: 1px solid var(--line); background: var(--glass-2); color: var(--text);
    border-radius: 14px; padding: 12px 16px; font: inherit; font-weight: 600; cursor: pointer; min-height: 46px;
}
.btn:hover { border-color: var(--line-2); }
.btn.primary { background: var(--grad); border: 0; box-shadow: 0 14px 30px -12px rgba(236, 72, 153, .8); }
.btn.ghost { background: transparent; }
.btn.small { padding: 8px 12px; min-height: 36px; font-size: 13px; border-radius: 11px; }
.btn.wide { width: 100%; margin-top: 18px; }

input:not([type=range]) {
    width: 100%; padding: 13px 14px; border-radius: 14px; border: 1px solid var(--line);
    background: rgba(255, 255, 255, .04); color: var(--text); font: inherit; min-height: 46px;
}
input::placeholder { color: #6f6f88; }
input:focus { outline: 2px solid rgba(139, 92, 246, .7); outline-offset: 1px; }

.center { min-height: 100vh; display: grid; place-items: center; padding: 16px; }
.card.narrow { width: 100%; max-width: 400px; text-align: center; padding: 32px 26px; display: block; }
.card.narrow h1 { font-size: 22px; margin-top: 14px; }
.card.narrow label { display: block; text-align: left; margin: 14px 0 6px; color: var(--muted); font-size: 13px; }
.logo { font-weight: 800; letter-spacing: .16em; font-size: 30px; background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.link { display: inline-block; margin-top: 18px; color: #c4b5fd; text-decoration: none; font-size: 14px; }
.msg { min-height: 22px; margin: 14px 0 0; font-size: 14px; }

.toast {
    position: fixed; left: 50%; bottom: 100px; transform: translate(-50%, 20px); z-index: 20;
    background: rgba(20, 18, 34, .95); border: 1px solid var(--line-2); border-radius: 14px; padding: 11px 16px;
    opacity: 0; pointer-events: none; transition: .25s; max-width: calc(100% - 32px);
}
.toast.show { opacity: 1; transform: translate(-50%, 0); }
.toast.bad { border-color: var(--down); }

[hidden] { display: none !important; }

/* ------------------------------------------------------------ smaller screens */

@media (max-width: 1180px) {
    .grid { grid-template-columns: repeat(2, 1fr); }
    .kpis { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 760px) {
    .app { grid-template-columns: 1fr; }
    /* sidebar becomes a bottom tab bar */
    .side {
        position: fixed; top: auto; bottom: 0; left: 0; right: 0; height: auto; z-index: 6;
        flex-direction: row; padding: 8px 8px calc(8px + env(safe-area-inset-bottom)); gap: 0;
        border-right: 0; border-top: 1px solid var(--line); background: rgba(10, 10, 20, .88);
    }
    .brand, .side-foot { display: none; }
    .nav { flex-direction: row; width: 100%; justify-content: space-around; }
    .nav-btn { flex-direction: column; gap: 3px; font-size: 11px; padding: 7px 4px; align-items: center; text-align: center; }
    .nav-btn.active { background: none; box-shadow: none; color: #f0abfc; }
    .main { padding: calc(18px + env(safe-area-inset-top)) 16px 120px; }
    h1 { font-size: 26px; }
    .grid, .kpis { grid-template-columns: 1fr; gap: 12px; }
    .kpis { grid-template-columns: repeat(2, 1fr); }
    .kpi { padding: 14px; }
    .kpi .badge { width: 34px; height: 34px; border-radius: 11px; }
    .kpi .badge .ic { width: 16px; height: 16px; }
    .kpi-value { font-size: 22px; }
    .span2 { grid-column: auto; }
    .stats { grid-template-columns: repeat(2, 1fr); }
    .chart { height: 190px; }
    .swatches { gap: 8px; }
    .swatch { width: 30px; height: 30px; }
    .fab { bottom: calc(86px + env(safe-area-inset-bottom)); right: 18px; width: 54px; height: 54px; }
    .sheet { padding: 0; }
    .sheet-panel { max-width: none; height: 88vh; border-radius: 24px 24px 0 0; padding-bottom: calc(18px + env(safe-area-inset-bottom)); }
    .toast { bottom: calc(150px + env(safe-area-inset-bottom)); }
}
