/* invest-assistant · interface web
   Thème clair / sombre (préférence système, ou bouton), mise en page bureau et mobile. */

:root {
  --bg: #f5f6f8;
  --surface: #ffffff;
  --surface-2: #f2f4f7;
  --surface-3: #e9ecf1;
  --border: #e3e7ed;
  --border-strong: #cfd5de;
  --text: #0f1729;
  --text-2: #344054;
  --muted: #667085;
  --accent: #4f46e5;
  --accent-2: #4338ca;
  --accent-soft: #eef0ff;
  --pea: #4f46e5;
  --pea-soft: #eef0ff;
  --cto: #e8590c;
  --cto-soft: #fff1e8;
  --ref: #98a2b3;
  --pos: #079455;
  --pos-soft: #e7f8ef;
  --neg: #d92d20;
  --neg-soft: #fdeceb;
  --warn: #b54708;
  --warn-soft: #fef4e6;
  --info: #175cd3;
  --info-soft: #eaf2ff;
  --shadow: 0 1px 2px rgba(16, 24, 40, .05), 0 1px 3px rgba(16, 24, 40, .06);
  --shadow-lg: 0 12px 32px -12px rgba(16, 24, 40, .25);
  --radius: 14px;
  --radius-sm: 9px;
  --sidebar: 248px;
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0b0f17; --surface: #121826; --surface-2: #182032; --surface-3: #1f293d;
    --border: #232d40; --border-strong: #33405a; --text: #eef1f6; --text-2: #c9d0dc; --muted: #8b95a8;
    --accent: #8b8cf8; --accent-2: #a5a6ff; --accent-soft: #1e2142;
    --pea: #8b8cf8; --pea-soft: #1e2142; --cto: #fb8c3c; --cto-soft: #2d1d12; --ref: #5d6880;
    --pos: #3ccb7f; --pos-soft: #10291d; --neg: #f97066; --neg-soft: #2f1414;
    --warn: #fdb022; --warn-soft: #2b2011; --info: #6aa4ff; --info-soft: #132239;
    --shadow: 0 1px 2px rgba(0, 0, 0, .3); --shadow-lg: 0 16px 40px -12px rgba(0, 0, 0, .6);
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #0b0f17; --surface: #121826; --surface-2: #182032; --surface-3: #1f293d;
  --border: #232d40; --border-strong: #33405a; --text: #eef1f6; --text-2: #c9d0dc; --muted: #8b95a8;
  --accent: #8b8cf8; --accent-2: #a5a6ff; --accent-soft: #1e2142;
  --pea: #8b8cf8; --pea-soft: #1e2142; --cto: #fb8c3c; --cto-soft: #2d1d12; --ref: #5d6880;
  --pos: #3ccb7f; --pos-soft: #10291d; --neg: #f97066; --neg-soft: #2f1414;
  --warn: #fdb022; --warn-soft: #2b2011; --info: #6aa4ff; --info-soft: #132239;
  --shadow: 0 1px 2px rgba(0, 0, 0, .3); --shadow-lg: 0 16px 40px -12px rgba(0, 0, 0, .6);
  color-scheme: dark;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--bg); color: var(--text);
  font: 400 14.5px/1.5 Inter, ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  font-feature-settings: "cv11", "ss01";
  -webkit-font-smoothing: antialiased;
}
a { color: var(--accent); text-decoration: none; }
a:hover { color: var(--accent-2); }
h1, h2, h3 { margin: 0; letter-spacing: -.015em; }
h1 { font-size: 24px; font-weight: 650; }
h2 { font-size: 16px; font-weight: 620; }
h3 { font-size: 14px; font-weight: 600; }
p { margin: 0; }
.num, .table td.num, .kpi-value { font-variant-numeric: tabular-nums; }
.muted { color: var(--muted); }
.small { font-size: 12.5px; }
.pos { color: var(--pos); }
.neg { color: var(--neg); }
.hidden { display: none !important; }
svg.icon { width: 18px; height: 18px; flex: none; stroke: currentColor; fill: none; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }

/* --- structure --------------------------------------------------------------- */
.app { display: grid; grid-template-columns: var(--sidebar) minmax(0, 1fr); min-height: 100vh;
  background: linear-gradient(to right, var(--surface) calc(var(--sidebar) - 1px), var(--border) calc(var(--sidebar) - 1px), var(--border) var(--sidebar), transparent var(--sidebar)); }
.sidebar {
  position: sticky; top: 0; height: 100vh; display: flex; flex-direction: column; gap: 4px;
  padding: 20px 14px; background: var(--surface); border-right: 1px solid var(--border);
}
.brand { display: flex; align-items: center; gap: 10px; padding: 4px 10px 18px; font-weight: 700; font-size: 16px; letter-spacing: -.02em; color: var(--text); }
.brand-mark {
  width: 32px; height: 32px; border-radius: 9px; display: grid; place-items: center; color: #fff;
  background: linear-gradient(135deg, var(--pea), #7c3aed 55%, var(--cto));
}
.brand-mark svg { width: 18px; height: 18px; stroke-width: 2.2; }
.brand small { display: block; font-size: 11.5px; font-weight: 500; color: var(--muted); letter-spacing: 0; }
.nav-label { padding: 14px 12px 6px; font-size: 11px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
.nav a {
  display: flex; align-items: center; gap: 11px; padding: 9px 12px; border-radius: 9px;
  color: var(--text-2); font-weight: 500; transition: background .12s, color .12s;
}
.nav a:hover { background: var(--surface-2); color: var(--text); }
.nav a.active { background: var(--accent-soft); color: var(--accent); }
.nav a.active svg { stroke: var(--accent); }
.sidebar-foot { margin-top: auto; padding: 12px; border-top: 1px solid var(--border); display: flex; flex-direction: column; gap: 10px; }
.status { display: flex; align-items: center; gap: 8px; font-size: 12px; color: var(--muted); }
.dot { width: 7px; height: 7px; border-radius: 50%; background: var(--pos); box-shadow: 0 0 0 3px var(--pos-soft); }
.foot-actions { display: flex; gap: 6px; }

.main { min-width: 0; padding: 28px 36px 64px; }
.container { max-width: 1240px; margin: 0 auto; }
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; margin-bottom: 22px; flex-wrap: wrap; }
.page-head p { color: var(--muted); margin-top: 4px; }
.topbar { display: none; }
.scrim { display: none; }

/* --- cartes ----------------------------------------------------------------------- */
.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow); }
.card-pad { padding: 20px 22px; }
.card-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 18px 22px 0; }
.card-head p { color: var(--muted); font-size: 13px; margin-top: 2px; }
.card-body { padding: 16px 22px 20px; }
.grid { display: grid; gap: 18px; }
.grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid-main { grid-template-columns: minmax(0, 1.65fr) minmax(0, 1fr); }
.stack { display: flex; flex-direction: column; gap: 18px; }
.row { display: flex; align-items: center; gap: 10px; }
.between { justify-content: space-between; }
.wrap { flex-wrap: wrap; }
.mt { margin-top: 18px; }

/* --- indicateurs -------------------------------------------------------------------- */
.kpis { display: grid; grid-template-columns: 1.25fr 1fr 1fr 1fr; gap: 18px; margin-bottom: 18px; }
.kpi { padding: 18px 20px; position: relative; overflow: hidden; }
.kpi-label { display: flex; align-items: center; gap: 8px; font-size: 12.5px; font-weight: 550; color: var(--muted); }
.kpi-value { font-size: 26px; font-weight: 680; letter-spacing: -.025em; margin: 6px 0 4px; }
.kpi-hero { background: linear-gradient(140deg, #312e81, #4f46e5 55%, #7c3aed); color: #fff; border: 0; }
.kpi-hero .kpi-label, .kpi-hero .kpi-sub { color: rgba(255, 255, 255, .78); }
.kpi-hero .kpi-value { font-size: 30px; }
.kpi-hero::after { content: ""; position: absolute; right: -40px; top: -40px; width: 160px; height: 160px; border-radius: 50%; background: rgba(255, 255, 255, .08); }
.kpi-sub { font-size: 12.5px; color: var(--muted); display: flex; flex-wrap: wrap; gap: 4px 10px; }
.kpi-bar { position: absolute; left: 0; top: 0; bottom: 0; width: 3px; }
.kpi-bar.pea { background: var(--pea); } .kpi-bar.cto { background: var(--cto); }

/* --- badges ------------------------------------------------------------------------------ */
.badge { display: inline-flex; align-items: center; gap: 5px; padding: 2px 8px; border-radius: 999px; font-size: 11.5px; font-weight: 600; line-height: 18px; white-space: nowrap; }
.badge.pea { background: var(--pea-soft); color: var(--pea); }
.badge.cto { background: var(--cto-soft); color: var(--cto); }
.badge.good, .badge.pos { background: var(--pos-soft); color: var(--pos); }
.badge.bad, .badge.neg { background: var(--neg-soft); color: var(--neg); }
.badge.warn { background: var(--warn-soft); color: var(--warn); }
.badge.info { background: var(--info-soft); color: var(--info); }
.badge.neutral { background: var(--surface-2); color: var(--text-2); }
.delta { display: inline-flex; align-items: center; gap: 3px; font-weight: 600; font-size: 12.5px; padding: 1px 7px; border-radius: 6px; }
.delta.pos { background: var(--pos-soft); }
.delta.neg { background: var(--neg-soft); }
.kpi-hero .delta { background: rgba(255, 255, 255, .16); color: #fff; }

/* --- tableaux -------------------------------------------------------------------------------- */
.table-wrap { overflow-x: auto; }
.table { width: 100%; border-collapse: collapse; }
.table th { text-align: left; font-size: 11.5px; font-weight: 600; letter-spacing: .04em; text-transform: uppercase; color: var(--muted); padding: 10px 12px; border-bottom: 1px solid var(--border); white-space: nowrap; }
.table td { padding: 12px; border-bottom: 1px solid var(--border); vertical-align: middle; }
.table tr:last-child td { border-bottom: 0; }
.table tbody tr { transition: background .1s; }
.table tbody tr:hover { background: var(--surface-2); }
.table .num, .table th.num { text-align: right; white-space: nowrap; }
.asset { display: flex; align-items: center; gap: 11px; min-width: 0; }
.avatar { width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center; flex: none; font-size: 12px; font-weight: 700; background: var(--surface-2); color: var(--text-2); border: 1px solid var(--border); }
.avatar.pea { background: var(--pea-soft); color: var(--pea); border-color: transparent; }
.avatar.cto { background: var(--cto-soft); color: var(--cto); border-color: transparent; }
.asset-name { font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.asset-sub { font-size: 12px; color: var(--muted); }

/* --- listes ----------------------------------------------------------------------------------- */
.list { display: flex; flex-direction: column; }
.list-item { display: flex; align-items: center; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--border); }
.list-item:last-child { border-bottom: 0; }
.grow { flex: 1; min-width: 0; }
.empty { padding: 28px 12px; text-align: center; color: var(--muted); }
.icon-bubble { width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; flex: none; background: var(--surface-2); color: var(--text-2); }
.icon-bubble.pos { background: var(--pos-soft); color: var(--pos); }
.icon-bubble.neg { background: var(--neg-soft); color: var(--neg); }
.icon-bubble.info { background: var(--info-soft); color: var(--info); }
.icon-bubble.warn { background: var(--warn-soft); color: var(--warn); }

/* --- graphiques -------------------------------------------------------------------------------- */
.chart-box { position: relative; height: 290px; }
.chart-box.sm { height: 220px; }
.legend { display: flex; gap: 14px; flex-wrap: wrap; font-size: 12.5px; color: var(--muted); }
.legend i { display: inline-block; width: 10px; height: 3px; border-radius: 2px; margin-right: 6px; vertical-align: middle; }

/* --- répartition ---------------------------------------------------------------------------------- */
.alloc { display: flex; flex-direction: column; gap: 14px; }
.alloc-row .row { font-size: 13px; }
.bar { position: relative; height: 9px; border-radius: 99px; background: var(--surface-3); margin-top: 7px; overflow: visible; }
.bar > span { position: absolute; inset: 0 auto 0 0; border-radius: 99px; background: var(--pea); }
.bar > span.etf { background: var(--pea); } .bar > span.action { background: #a855f7; }
.bar > em { position: absolute; top: -4px; bottom: -4px; width: 2px; background: var(--text); border-radius: 2px; opacity: .55; }

/* --- onglets et filtres ------------------------------------------------------------------------------ */
.segmented { display: inline-flex; flex: none; padding: 3px; gap: 2px; background: var(--surface-2); border: 1px solid var(--border); border-radius: 11px; }
.segmented a, .segmented button {
  border: 0; background: none; cursor: pointer; font: inherit; font-size: 13px; font-weight: 550; color: var(--muted);
  padding: 6px 12px; border-radius: 8px; display: inline-flex; align-items: center; gap: 6px; white-space: nowrap;
}
.segmented a:hover, .segmented button:hover { color: var(--text); }
.segmented .active { background: var(--surface); color: var(--text); box-shadow: var(--shadow); }
.tabs-scroll { overflow-x: auto; max-width: 100%; }

/* --- formulaires ------------------------------------------------------------------------------------- */
.form { display: grid; gap: 14px; }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.form-grid .full { grid-column: 1 / -1; }
.field { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.field label { font-size: 12.5px; font-weight: 600; color: var(--text-2); }
.field .hint { font-size: 12px; color: var(--muted); }
.input, select.input, textarea.input {
  width: 100%; font: inherit; color: var(--text); background: var(--surface); border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm); padding: 9px 12px; outline: none; transition: border-color .12s, box-shadow .12s;
}
.input:focus { border-color: var(--accent); box-shadow: 0 0 0 4px var(--accent-soft); }
.input-group { position: relative; }
.input-group .input { padding-right: 34px; }
.input-group .suffix { position: absolute; right: 12px; top: 50%; transform: translateY(-50%); color: var(--muted); font-size: 13px; pointer-events: none; }
.check { display: flex; align-items: center; gap: 9px; font-size: 13.5px; color: var(--text-2); cursor: pointer; }
.check input { width: 16px; height: 16px; accent-color: var(--accent); }
.radio-cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.radio-cards label { cursor: pointer; }
.radio-cards input { position: absolute; opacity: 0; }
.radio-cards span { display: block; text-align: center; padding: 8px; border: 1px solid var(--border-strong); border-radius: var(--radius-sm); font-weight: 600; font-size: 13px; color: var(--text-2); }
.radio-cards input:checked + span { border-color: var(--accent); background: var(--accent-soft); color: var(--accent); }
.radio-cards input:focus-visible + span { box-shadow: 0 0 0 4px var(--accent-soft); }
input[type=range] { width: 100%; accent-color: var(--accent); }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; font: inherit; font-weight: 600; font-size: 13.5px;
  padding: 9px 16px; border-radius: var(--radius-sm); border: 1px solid transparent; cursor: pointer; white-space: nowrap;
  transition: background .12s, border-color .12s, transform .05s;
}
.btn:active { transform: translateY(1px); }
.btn-primary { background: var(--accent); color: #fff; }
.btn-primary:hover { background: var(--accent-2); color: #fff; }
.btn-ghost { background: var(--surface); color: var(--text-2); border-color: var(--border-strong); }
.btn-ghost:hover { background: var(--surface-2); color: var(--text); }
.btn-danger { background: none; color: var(--neg); border-color: transparent; }
.btn-danger:hover { background: var(--neg-soft); }
.btn-icon { padding: 8px; }
.btn-block { width: 100%; }
.btn[disabled], .htmx-request .btn-submit { opacity: .65; pointer-events: none; }
.spinner { width: 15px; height: 15px; border-radius: 50%; border: 2px solid currentColor; border-right-color: transparent; animation: spin .7s linear infinite; display: none; }
.htmx-request .spinner, .htmx-request.spinner { display: inline-block; }
@keyframes spin { to { transform: rotate(360deg); } }

/* --- messages ----------------------------------------------------------------------------------------- */
.toasts { position: fixed; right: 22px; bottom: 22px; z-index: 50; display: flex; flex-direction: column; gap: 10px; max-width: min(420px, calc(100vw - 32px)); }
.toast { display: flex; gap: 10px; align-items: flex-start; padding: 12px 14px; border-radius: 12px; background: var(--surface); border: 1px solid var(--border); box-shadow: var(--shadow-lg); animation: rise .25s ease-out; }
.toast.ok svg { color: var(--pos); } .toast.error svg { color: var(--neg); }
.toast button { margin-left: auto; background: none; border: 0; color: var(--muted); cursor: pointer; padding: 0; }
@keyframes rise { from { opacity: 0; transform: translateY(8px); } }
.callout { display: flex; gap: 12px; padding: 13px 15px; border-radius: 12px; font-size: 13.5px; line-height: 1.5; }
.callout svg { margin-top: 1px; }
.callout.info { background: var(--info-soft); color: var(--text-2); } .callout.info svg { color: var(--info); }
.callout.warn { background: var(--warn-soft); color: var(--text-2); } .callout.warn svg { color: var(--warn); }
.callout.bad { background: var(--neg-soft); color: var(--text-2); } .callout.bad svg { color: var(--neg); }
.callout.good { background: var(--pos-soft); color: var(--text-2); } .callout.good svg { color: var(--pos); }

/* --- vérification --------------------------------------------------------------------------------------- */
.verdict { border-radius: var(--radius); border: 1px solid var(--border); overflow: hidden; }
.verdict-head { display: flex; align-items: center; gap: 14px; padding: 16px 18px; }
.verdict-head.good { background: var(--pos-soft); } .verdict-head.warn { background: var(--warn-soft); } .verdict-head.bad { background: var(--neg-soft); }
.verdict-icon { width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center; background: var(--surface); flex: none; }
.verdict-head.good .verdict-icon { color: var(--pos); } .verdict-head.warn .verdict-icon { color: var(--warn); } .verdict-head.bad .verdict-icon { color: var(--neg); }
.verdict-body { padding: 16px 18px; display: flex; flex-direction: column; gap: 10px; background: var(--surface); }
.point { display: flex; gap: 10px; font-size: 13.5px; line-height: 1.5; }
.point svg { margin-top: 2px; width: 16px; height: 16px; }
.point.bad svg { color: var(--neg); } .point.warn svg { color: var(--warn); } .point.info svg { color: var(--info); }
.figures { display: grid; grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)); background: var(--surface); border-top: 1px solid var(--border); overflow: hidden; }
.figure { background: var(--surface); padding: 12px 16px; box-shadow: 1px 0 0 var(--border), 0 1px 0 var(--border); }
.figure .label { font-size: 11.5px; color: var(--muted); font-weight: 550; }
.figure .value { font-size: 16px; font-weight: 650; font-variant-numeric: tabular-nums; margin-top: 2px; }
.ai { border-radius: var(--radius); padding: 16px 18px; background: linear-gradient(135deg, var(--accent-soft), var(--surface) 70%); border: 1px solid var(--border); }
.ai-head { display: flex; align-items: center; gap: 10px; font-weight: 600; margin-bottom: 8px; }
.ai-mark { width: 28px; height: 28px; border-radius: 8px; display: grid; place-items: center; color: #fff; background: linear-gradient(135deg, #d97757, #b5502f); }
.ai-text { white-space: pre-line; font-size: 13.5px; line-height: 1.65; color: var(--text-2); }
.skeleton { border-radius: 6px; height: 12px; margin: 8px 0; background: linear-gradient(90deg, var(--surface-2), var(--surface-3), var(--surface-2)); background-size: 200% 100%; animation: shimmer 1.3s infinite; }
@keyframes shimmer { to { background-position: -200% 0; } }

details.history { border-top: 1px solid var(--border); }
details.history summary { list-style: none; cursor: pointer; display: flex; align-items: center; gap: 12px; padding: 13px 0; }
details.history summary::-webkit-details-marker { display: none; }
details.history .content { padding: 0 0 16px 46px; display: flex; flex-direction: column; gap: 10px; }
details.history summary .chev { margin-left: auto; transition: transform .15s; color: var(--muted); }
details.history[open] summary .chev { transform: rotate(90deg); }

/* --- actualités ----------------------------------------------------------------------------------------- */
.news-group { padding: 18px 22px; border-bottom: 1px solid var(--border); }
.news-group:last-child { border-bottom: 0; }
.news-item { display: block; padding: 9px 0; color: var(--text); border-bottom: 1px dashed var(--border); }
.news-item:last-child { border-bottom: 0; }
.news-item:hover .news-title { color: var(--accent); }
.news-title { font-weight: 550; line-height: 1.4; }
.news-meta { font-size: 12px; color: var(--muted); margin-top: 3px; }
.message { white-space: pre-line; font-size: 13.5px; line-height: 1.6; color: var(--text-2); background: var(--surface-2); border-radius: 10px; padding: 14px 16px; }

/* --- règles ------------------------------------------------------------------------------------------------ */
.rule { display: grid; grid-template-columns: 34px minmax(0, 1fr); gap: 12px; padding: 14px 0; border-bottom: 1px solid var(--border); }
.rule:last-child { border-bottom: 0; }
.rule-title { font-weight: 600; }
.rule-why { color: var(--muted); font-size: 13.5px; margin-top: 3px; line-height: 1.55; }

/* --- connexion --------------------------------------------------------------------------------------------- */
.login { min-height: 100vh; display: grid; place-items: center; padding: 24px;
  background: radial-gradient(1200px 600px at 10% -10%, rgba(79, 70, 229, .18), transparent 60%), radial-gradient(900px 500px at 110% 110%, rgba(232, 89, 12, .14), transparent 60%), var(--bg); }
.login-card { width: 100%; max-width: 380px; padding: 32px; }
.login-card .brand { padding: 0 0 22px; }

/* --- responsive ---------------------------------------------------------------------------------------------- */
@media (max-width: 1180px) {
  .kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .grid-main { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 960px) {
  .app { grid-template-columns: minmax(0, 1fr); }
  .sidebar { position: fixed; left: 0; top: 0; bottom: 0; width: 272px; z-index: 40; transform: translateX(-100%); transition: transform .2s ease; box-shadow: var(--shadow-lg); }
  .nav-open .sidebar { transform: none; }
  .nav-open .scrim { display: block; position: fixed; inset: 0; background: rgba(15, 23, 41, .45); z-index: 30; }
  .topbar { display: flex; align-items: center; justify-content: space-between; position: sticky; top: 0; z-index: 20; padding: 12px 16px; background: color-mix(in srgb, var(--bg) 88%, transparent); backdrop-filter: blur(10px); border-bottom: 1px solid var(--border); }
  .topbar .brand { padding: 0; }
  .main { padding: 18px 16px 48px; }
  .app { background: none; }
  .grid-2, .grid-3 { grid-template-columns: minmax(0, 1fr); }
  .card-head { flex-wrap: wrap; }
  .card-head { padding: 16px 16px 0; } .card-body { padding: 14px 16px 16px; } .card-pad { padding: 16px; }
  .news-group { padding: 16px; }
  .hide-sm { display: none; }
}
@media (max-width: 560px) {
  .kpis { grid-template-columns: minmax(0, 1fr); gap: 12px; }
  .kpi-value { font-size: 24px; }
  .form-grid { grid-template-columns: minmax(0, 1fr); }
  h1 { font-size: 21px; }
  .table td, .table th { padding: 10px 8px; }
  .hide-xs { display: none; }
  .asset-name { white-space: normal; }
  .asset .avatar { display: none; }
}
