/* Back-office SAV — interface sobre et dense ; orange Recyclivre en accent uniquement. */
:root {
  --bg: #f7f7f8; --surface: #ffffff; --surface-2: #f3f3f5; --hover: #f0f0f2; --border: #e5e5e8; --border-strong: #d4d4d8;
  --text: #18181b; --text-2: #52525b; --muted: #8b8b94;
  --accent: #ff6400; --accent-hover: #ea5a00; --accent-soft: #fff3eb; --accent-text: #c2410c;
  --success: #15803d; --success-soft: #ecfdf3; --danger: #dc2626; --danger-soft: #fef2f2;
  --warn: #b45309; --warn-soft: #fffbeb; --info: #2563eb; --info-soft: #eff6ff;
  --shadow-sm: 0 1px 2px rgba(16,16,20,.05); --shadow: 0 8px 24px rgba(16,16,20,.08), 0 1px 2px rgba(16,16,20,.06);
  --radius: 8px; --radius-sm: 6px;
  --font: "Inter", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  --mono: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  color-scheme: light;
}
:root[data-theme="dark"] {
  --bg: #0e0e10; --surface: #161618; --surface-2: #1d1d20; --hover: #222226; --border: #29292e; --border-strong: #3a3a40;
  --text: #ededef; --text-2: #a1a1aa; --muted: #70707a;
  --accent-soft: #2b1a0f; --accent-text: #ff8b4d;
  --success: #4ade80; --success-soft: #0f2618; --danger: #f87171; --danger-soft: #2a1314;
  --warn: #fbbf24; --warn-soft: #2a2010; --info: #60a5fa; --info-soft: #111c2e;
  --shadow-sm: 0 1px 2px rgba(0,0,0,.4); --shadow: 0 12px 32px rgba(0,0,0,.45);
  color-scheme: dark;
}
@media (prefers-color-scheme: dark) {
  :root[data-theme="system"] {
    --bg: #0e0e10; --surface: #161618; --surface-2: #1d1d20; --hover: #222226; --border: #29292e; --border-strong: #3a3a40;
    --text: #ededef; --text-2: #a1a1aa; --muted: #70707a;
    --accent-soft: #2b1a0f; --accent-text: #ff8b4d;
    --success: #4ade80; --success-soft: #0f2618; --danger: #f87171; --danger-soft: #2a1314;
    --warn: #fbbf24; --warn-soft: #2a2010; --info: #60a5fa; --info-soft: #111c2e;
    --shadow-sm: 0 1px 2px rgba(0,0,0,.4); --shadow: 0 12px 32px rgba(0,0,0,.45);
    color-scheme: dark;
  }
}

* { box-sizing: border-box; }
html, body { margin: 0; background: var(--bg); color: var(--text); font: 400 13.5px/1.5 var(--font); -webkit-font-smoothing: antialiased; }
h1, h2, h3, h4 { margin: 0; font-weight: 600; letter-spacing: -.01em; color: var(--text); }
h1 { font-size: 20px; line-height: 28px; }
h2 { font-size: 14px; line-height: 20px; }
h3 { font-size: 13px; color: var(--text-2); margin: 16px 0 8px; }
a { color: var(--accent-text); text-decoration: none; }
a:hover { text-decoration: underline; }
code { font: 12px var(--mono); background: var(--surface-2); padding: 1px 5px; border-radius: 4px; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.boot { padding: 64px; text-align: center; color: var(--muted); }
svg.i { width: 16px; height: 16px; flex: none; stroke: currentColor; fill: none; stroke-width: 1.75; stroke-linecap: round; stroke-linejoin: round; vertical-align: -3px; }
.muted { color: var(--muted); } .small { font-size: 12px; } .error { color: var(--danger); }
.mono { font-family: var(--mono); font-size: 12px; }

/* Boutons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; height: 32px; padding: 0 12px; border-radius: var(--radius-sm);
  border: 1px solid var(--border); background: var(--surface); color: var(--text); font: 500 13px var(--font); cursor: pointer; white-space: nowrap;
  box-shadow: var(--shadow-sm); transition: background .12s, border-color .12s; }
.btn:hover { background: var(--hover); text-decoration: none; }
.btn.primary { background: var(--accent); border-color: var(--accent); color: #fff; }
.btn.primary:hover { background: var(--accent-hover); border-color: var(--accent-hover); }
.btn.ghost { background: transparent; border-color: transparent; box-shadow: none; color: var(--text-2); }
.btn.ghost:hover { background: var(--hover); color: var(--text); }
.btn.danger { color: var(--danger); }
.btn.small { height: 28px; padding: 0 10px; font-size: 12.5px; }
.btn.icon { width: 32px; padding: 0; }
.btn.icon.small { width: 28px; }
.btn[disabled] { opacity: .45; cursor: not-allowed; }

/* Formulaires */
label { display: block; font-size: 12.5px; font-weight: 500; color: var(--text-2); margin: 14px 0 6px; }
input, select, textarea { width: 100%; height: 34px; padding: 0 10px; border: 1px solid var(--border-strong); border-radius: var(--radius-sm);
  background: var(--surface); color: var(--text); font: 13.5px var(--font); transition: border-color .12s, box-shadow .12s; }
textarea { height: auto; min-height: 96px; padding: 8px 10px; resize: vertical; line-height: 1.5; }
textarea.code { font: 12px/1.6 var(--mono); min-height: 360px; }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
input[type="checkbox"] { width: 15px; height: 15px; accent-color: var(--accent); margin: 0; }
.checks { display: flex; flex-wrap: wrap; gap: 6px 16px; }
.checks label { display: inline-flex; align-items: center; gap: 8px; margin: 4px 0; font-weight: 400; color: var(--text); font-size: 13px; }
.row { display: flex; gap: 8px; align-items: flex-end; flex-wrap: wrap; }
.row > .grow { flex: 1 1 200px; }
.actions-bar { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 16px; }

/* Structure */
.layout { display: grid; grid-template-columns: 236px 1fr; min-height: 100vh; }
.sidebar { position: sticky; top: 0; height: 100vh; overflow-y: auto; background: var(--surface); border-right: 1px solid var(--border); padding: 12px 10px; display: flex; flex-direction: column; gap: 2px; }
.brand { display: flex; align-items: center; gap: 10px; padding: 6px 8px 14px; font-weight: 600; color: var(--text); }
.brand:hover { text-decoration: none; }
.brand .mark { width: 26px; height: 26px; border-radius: 7px; background: var(--accent); color: #fff; display: grid; place-items: center; font-size: 13px; font-weight: 700; }
.brand small { display: block; font-weight: 400; color: var(--muted); font-size: 11.5px; line-height: 1.2; }
.nav-section { font-size: 11px; font-weight: 600; color: var(--muted); text-transform: uppercase; letter-spacing: .06em; padding: 14px 8px 6px; }
.nav-item { display: flex; align-items: center; gap: 9px; height: 32px; padding: 0 8px; border-radius: var(--radius-sm); color: var(--text-2); font-weight: 500; }
.nav-item:hover { background: var(--hover); color: var(--text); text-decoration: none; }
.nav-item.active { background: var(--accent-soft); color: var(--accent-text); }
.nav-item .label { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.count { min-width: 22px; height: 20px; padding: 0 6px; border-radius: 10px; display: inline-grid; place-items: center; font-size: 11.5px; font-weight: 600; background: var(--surface-2); color: var(--text-2); }
.count.hot { background: var(--accent); color: #fff; }
.sidebar .spacer { flex: 1; }
.user-card { display: flex; align-items: center; gap: 10px; padding: 8px; border-radius: var(--radius); border-top: 1px solid var(--border); margin-top: 8px; }
.avatar { width: 30px; height: 30px; border-radius: 50%; background: var(--surface-2); border: 1px solid var(--border); display: grid; place-items: center; font-size: 12px; font-weight: 600; color: var(--text-2); flex: none; }
.user-card .who { flex: 1; min-width: 0; line-height: 1.25; }
.user-card .who strong { display: block; font-size: 13px; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.user-card .who span { font-size: 11.5px; color: var(--muted); }
.topbar { height: 52px; display: flex; align-items: center; gap: 8px; padding: 0 20px; border-bottom: 1px solid var(--border); background: color-mix(in srgb, var(--bg) 85%, transparent);
  backdrop-filter: blur(8px); position: sticky; top: 0; z-index: 5; }
.topbar .crumbs { flex: 1; color: var(--muted); font-size: 13px; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.topbar .crumbs strong { color: var(--text); font-weight: 500; }
.lang { width: auto; height: 32px; border: 1px solid transparent; background: transparent; color: var(--text-2); font-weight: 500; padding: 0 6px; cursor: pointer; }
.lang:hover { background: var(--hover); }
main { padding: 24px 28px 48px; max-width: 1440px; }
.page-head { display: flex; align-items: center; gap: 12px; margin-bottom: 20px; flex-wrap: wrap; }
.page-head h1 { flex: 1; min-width: 200px; }
.page-head .sub { color: var(--muted); font-size: 13px; font-weight: 400; margin-left: 8px; }
.burger { display: none; }
@media (max-width: 900px) {
  .layout { grid-template-columns: 1fr; }
  .sidebar { display: none; position: fixed; inset: 0 auto 0 0; width: 260px; z-index: 30; box-shadow: var(--shadow); }
  .sidebar.open { display: flex; }
  .burger { display: inline-flex; }
  main { padding: 16px; }
}

/* Surfaces */
.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 16px; margin-bottom: 16px; box-shadow: var(--shadow-sm); }
.card > h2 { margin-bottom: 12px; }
.card.flush { padding: 0; overflow: hidden; }
.card.accent { border-color: color-mix(in srgb, var(--accent) 35%, var(--border)); box-shadow: 0 0 0 3px var(--accent-soft); }
.grid2 { display: grid; grid-template-columns: minmax(0, 1fr) 400px; gap: 20px; align-items: start; }
.grid2 > aside { position: sticky; top: 72px; max-height: calc(100vh - 88px); overflow-y: auto; overscroll-behavior: contain; padding-right: 2px; }
@media (max-width: 1100px) { .grid2 { grid-template-columns: 1fr; } .grid2 > aside { position: static; } }
.stats { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 12px; margin-bottom: 16px; }
.stat { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 12px 14px; }
.stat .v { font-size: 20px; font-weight: 600; letter-spacing: -.02em; } .stat .k { color: var(--muted); font-size: 12px; }

/* Tableaux */
table { width: 100%; border-collapse: collapse; }
th { text-align: left; font-size: 11.5px; font-weight: 600; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); padding: 10px 12px; border-bottom: 1px solid var(--border); background: var(--surface-2); }
td { padding: 10px 12px; border-bottom: 1px solid var(--border); vertical-align: middle; }
tbody tr:last-child td { border-bottom: 0; }
tr.clickable { cursor: pointer; } tr.clickable:hover td { background: var(--hover); }
td .title { font-weight: 500; } td .sub { color: var(--muted); font-size: 12px; max-width: 420px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* Pastilles */
.badge { display: inline-flex; align-items: center; gap: 4px; height: 22px; padding: 0 8px; border-radius: 6px; font-size: 12px; font-weight: 500;
  background: var(--surface-2); color: var(--text-2); margin: 0 4px 4px 0; white-space: nowrap; }
.badge.orange { background: var(--accent-soft); color: var(--accent-text); }
.badge.green { background: var(--success-soft); color: var(--success); }
.badge.red { background: var(--danger-soft); color: var(--danger); }
.badge.blue { background: var(--info-soft); color: var(--info); }
.badge.yellow { background: var(--warn-soft); color: var(--warn); }
.dot { width: 8px; height: 8px; border-radius: 50%; display: inline-block; background: var(--muted); }
.prio { display: inline-flex; align-items: center; gap: 6px; font-size: 12.5px; color: var(--text-2); }
.prio-3 .dot { background: var(--danger); } .prio-3 { color: var(--danger); font-weight: 500; }
.prio-2 .dot { background: var(--warn); } .prio-1 .dot { background: var(--border-strong); }

/* Barres d'outils, onglets, pagination */
.toolbar { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; margin-bottom: 12px; }
.toolbar .search { position: relative; flex: 1 1 260px; max-width: 380px; }
.toolbar .search svg { position: absolute; left: 10px; top: 9px; color: var(--muted); }
.toolbar .search input { padding-left: 32px; }
.toolbar select { width: auto; min-width: 160px; }
.pager { display: flex; gap: 8px; justify-content: space-between; align-items: center; padding: 10px 12px; border-top: 1px solid var(--border); color: var(--muted); font-size: 12.5px; }
.empty { text-align: center; padding: 56px 16px; color: var(--muted); }
.empty svg.i { width: 32px; height: 32px; color: var(--border-strong); margin-bottom: 8px; }
pre.json { background: var(--surface-2); border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 12px; overflow: auto; font: 12px/1.6 var(--mono); max-height: 460px; margin: 12px 0 0; }
dl.kv { display: grid; grid-template-columns: 120px 1fr; gap: 8px 12px; margin: 0; font-size: 13px; }
dl.kv dt { color: var(--muted); } dl.kv dd { margin: 0; word-break: break-word; }

/* Dossier */
.thread-title { display: flex; align-items: center; gap: 8px; margin: 24px 0 10px; font-size: 12px; font-weight: 600; color: var(--muted); text-transform: uppercase; letter-spacing: .04em; }
.thread-title:first-child { margin-top: 0; }
.msg { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); margin-bottom: 10px; box-shadow: var(--shadow-sm); overflow: hidden; }
.msg header { display: flex; gap: 10px; align-items: flex-start; padding: 12px 14px; }
.msg header .meta { flex: 1; min-width: 0; }
.msg header .meta strong { font-weight: 600; } .msg header .meta .addr { color: var(--muted); font-size: 12px; margin-left: 6px; }
.msg header .meta .subject { color: var(--text-2); font-size: 12.5px; margin-top: 2px; }
.msg header time { color: var(--muted); font-size: 12px; white-space: nowrap; }
.msg .body { padding: 0 14px 14px 54px; white-space: pre-wrap; word-break: break-word; line-height: 1.6; }
.msg iframe { display: block; width: calc(100% - 40px); margin-left: 40px; min-height: 280px; border: 0; background: #fff; border-top: 1px solid var(--border); }
.msg footer { display: flex; flex-wrap: wrap; align-items: center; gap: 4px; padding: 8px 14px 8px 54px; border-top: 1px solid var(--border); background: var(--surface-2); font-size: 12px; }
.msg footer .lbl { color: var(--muted); margin-right: 4px; }
.msg.outbound { border-left: 3px solid var(--accent); }
.attachment { display: inline-flex; align-items: center; gap: 6px; height: 26px; padding: 0 8px; border: 1px solid var(--border); border-radius: 6px; background: var(--surface); font-size: 12px; color: var(--text); margin: 2px 4px 2px 0; }
.attachment:hover { border-color: var(--accent); text-decoration: none; }
.attachment.blocked { color: var(--muted); background: transparent; }
.claim { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: var(--radius); margin-bottom: 16px; font-weight: 500; }
.claim.mine { background: var(--success-soft); color: var(--success); }
.claim.other { background: var(--danger-soft); color: var(--danger); }
.claim.free { background: var(--surface); border: 1px dashed var(--border-strong); color: var(--text-2); }
.claim .grow { flex: 1; }
.preview { white-space: pre-wrap; background: var(--surface-2); border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 12px; margin-top: 12px; font-size: 13px; line-height: 1.6; }
.preview strong { display: block; margin-bottom: 8px; }
.task-line { padding: 10px 0; border-bottom: 1px solid var(--border); } .task-line:last-child { border-bottom: 0; padding-bottom: 0; } .task-line:first-of-type { padding-top: 0; }
.timeline-item { display: flex; gap: 10px; padding: 8px 0; font-size: 12.5px; border-bottom: 1px solid var(--border); } .timeline-item:last-child { border: 0; }

/* Connexion */
.auth-page { min-height: 100vh; display: grid; place-items: center; padding: 24px; background: radial-gradient(1200px 600px at 50% -10%, var(--accent-soft), transparent 70%), var(--bg); }
.auth-card { width: 100%; max-width: 380px; background: var(--surface); border: 1px solid var(--border); border-radius: 12px; padding: 32px; box-shadow: var(--shadow); }
.auth-card .brand { padding: 0 0 24px; }
.auth-card h1 { font-size: 18px; margin-bottom: 4px; }
.auth-card .btn.primary { width: 100%; height: 36px; margin-top: 20px; }

/* Notifications */
#toasts { position: fixed; right: 20px; bottom: 20px; display: flex; flex-direction: column; gap: 8px; z-index: 60; }
.toast { display: flex; align-items: center; gap: 8px; background: var(--text); color: var(--bg); padding: 10px 14px; border-radius: var(--radius); box-shadow: var(--shadow); max-width: 440px; font-weight: 500; animation: in .18s ease-out; }
.toast.error { background: var(--danger); color: #fff; }
@keyframes in { from { transform: translateY(8px); opacity: 0; } to { transform: none; opacity: 1; } }

/* Avatars (photo ou initiales) */
img.avatar { object-fit: cover; padding: 0; background: var(--surface-2); }
.avatar-none { color: var(--muted); }
.avatar-none svg { width: 14px; height: 14px; }
.me-link { display: flex; align-items: center; gap: 10px; flex: 1; min-width: 0; color: inherit; border-radius: var(--radius-sm); }
.me-link:hover { text-decoration: none; }
.me-link:hover strong { color: var(--accent-text); }
.count.mine { background: var(--accent-soft); color: var(--accent-text); }

/* Langue : drapeaux + menu déroulant */
.flag { width: 20px; height: 14px; border-radius: 2px; flex: none; box-shadow: 0 0 0 1px var(--border); }
.dropdown { position: relative; }
.lang-btn { display: inline-flex; align-items: center; gap: 6px; height: 32px; padding: 0 8px; font-weight: 500; color: var(--text-2); }
.lang-btn .i { width: 14px; height: 14px; }
.menu { position: absolute; right: 0; top: calc(100% + 4px); z-index: 40; min-width: 170px; padding: 4px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow); }
.menu[hidden] { display: none; }
.menu-item { display: flex; align-items: center; gap: 10px; width: 100%; height: 34px; padding: 0 10px; border: 0; border-radius: var(--radius-sm); background: transparent; color: var(--text); font: inherit; cursor: pointer; text-align: left; }
.menu-item:hover { background: var(--hover); }
.menu-item.active { font-weight: 600; }
.menu-item .i { margin-left: auto; width: 14px; height: 14px; color: var(--accent); }

/* Suivi d'un dossier */
.assign-bar { display: flex; align-items: center; gap: 10px; padding: 8px 12px; margin-bottom: 12px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); flex-wrap: wrap; }
.assign-bar .grow { flex: 1; min-width: 160px; }
.assign-select { width: auto; max-width: 220px; height: 30px; }
.seg { display: inline-flex; gap: 4px; }

/* Profil */
.profile-photo { display: flex; align-items: center; gap: 20px; margin-top: 8px; }
.profile-photo .row { gap: 8px; }

/* Import : mot de passe affiché une seule fois */
.password-once { margin-top: 12px; padding: 12px; border: 1px solid var(--warn); background: var(--warn-soft); border-radius: var(--radius); }
.secret { font-family: var(--mono); font-size: 16px; padding: 6px 10px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-sm); user-select: all; letter-spacing: .03em; }
.import-form h3 { margin-top: 4px; }

/* Personne : photo + nom */
.person { display: inline-flex; align-items: center; gap: 6px; vertical-align: middle; }
.person .avatar { font-size: 10px; }
.person-name { white-space: nowrap; }
.person-badge { gap: 5px; padding-left: 4px; }
.person-badge .avatar { border-color: transparent; }
.claim.other { gap: 8px; }
.claim.other .person { color: inherit; font-weight: 600; }
.user-menu { min-width: 230px; max-height: 320px; overflow-y: auto; }
.user-menu .menu-item { height: 38px; }
.menu-empty { padding: 8px 10px; }
.msg.outbound header img.avatar { flex: none; }
.reply-body { min-height: 220px; font-size: 13.5px; line-height: 1.6; }

/* Commande et client (colonne de contexte d'un dossier) */
.oblock { margin-top: 14px; padding-top: 12px; border-top: 1px solid var(--border); }
.oblock > h3, details.oblock > summary { margin: 0 0 8px; font-size: 13px; font-weight: 600; color: var(--text); }
details.oblock > summary { cursor: pointer; list-style: none; display: flex; align-items: center; gap: 4px; }
details.oblock > summary::before { content: ''; width: 6px; height: 6px; border-right: 1.75px solid var(--muted); border-bottom: 1.75px solid var(--muted); transform: rotate(-45deg); margin-right: 6px; transition: transform .12s; }
details.oblock[open] > summary::before { transform: rotate(45deg); }
details.oblock > summary::-webkit-details-marker { display: none; }
.oline { display: grid; grid-template-columns: 44px minmax(0, 1fr) auto; gap: 10px; padding: 8px 0; border-bottom: 1px solid var(--border); font-size: 12.5px; }
.oline:last-of-type { border-bottom: 0; }
.oline.off .oline-title, .oline.off .oline-price strong { text-decoration: line-through; color: var(--muted); }
.oline-img { width: 44px; height: 62px; object-fit: contain; border-radius: 4px; background: var(--surface-2); }
.oline-img.none { display: flex; align-items: center; justify-content: center; color: var(--muted); }
.oline-title { font-weight: 600; line-height: 1.35; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.oline-tags { display: flex; flex-wrap: wrap; gap: 4px; margin: 4px 0 2px; }
.oline-tags .badge { height: 20px; font-size: 11.5px; padding: 0 6px; }
.oline-ids { display: flex; flex-wrap: wrap; gap: 2px 10px; }
.oline-ids .mono { font-size: 11px; }
.oline-price { text-align: right; white-space: nowrap; }
dl.kv.totals { margin-top: 8px; grid-template-columns: 1fr auto; }
dl.kv.totals dd { text-align: right; }
.address { padding: 8px 10px; border: 1px solid var(--border); border-radius: var(--radius-sm); margin-bottom: 8px; font-size: 12.5px; line-height: 1.45; }
.address-head { display: flex; align-items: center; gap: 6px; margin-bottom: 2px; }
.address-head .btn { margin: -4px -6px -4px 0; }
.order-card dd .btn.icon.small, .customer-id .btn.icon.small { width: 22px; height: 22px; margin-left: 2px; vertical-align: middle; }
.order-card dd .btn.icon.small svg, .customer-id .btn.icon.small svg { width: 13px; height: 13px; }
details.history .timeline-item svg { color: var(--muted); margin-top: 2px; }
details.history .timeline-item.note { background: var(--accent-soft); margin: 0 -8px; padding: 8px; border-radius: var(--radius-sm); border-bottom: 0; margin-bottom: 4px; }
details.history .timeline-item.note svg { color: var(--accent-text); }
.customer-id { display: flex; gap: 10px; align-items: flex-start; margin-bottom: 12px; line-height: 1.5; }
.customer-id .i { width: 13px; height: 13px; vertical-align: -2px; }
.mini-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; margin-bottom: 10px; }
.mini-stat { background: var(--surface-2); border-radius: var(--radius-sm); padding: 6px 8px; min-width: 0; }
.mini-stat .v { font-size: 15px; font-weight: 600; letter-spacing: -.01em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mini-stat .k { font-size: 11px; color: var(--muted); }
.mini-stat.warn { background: var(--warn-soft); } .mini-stat.warn .v { color: var(--warn); }
table.mini-table { width: 100%; border-collapse: collapse; font-size: 12px; }
table.mini-table td { padding: 5px 4px; border-bottom: 1px solid var(--border); vertical-align: top; }
table.mini-table td.num { text-align: right; white-space: nowrap; }
table.mini-table tr.current td { background: var(--accent-soft); }
table.mini-table tr:last-child td { border-bottom: 0; }
a.case-link { display: flex; align-items: center; gap: 8px; padding: 5px 0; color: var(--text); font-size: 12.5px; border-bottom: 1px solid var(--border); }
a.case-link:last-child { border-bottom: 0; }
