/* Le dashboard du café, dans la langue de Mesa : encre, une seule taille héros (54 px), tout
   le reste à 19 px ou 13 px, chiffres en mono, l'accent violet réservé aux jauges. */
body { background: var(--ink); color: var(--paper); font-size: 13px; }
.proto { background: #3d63c9; color: #ffffff; font: 500 11px/1.4 var(--mono); letter-spacing: .1em; text-transform: uppercase; text-align: center; padding: 8px 16px; }
.proto a { color: #ffffff; }
.label { color: var(--muted-dk); font-size: 10px; }
.shell { max-width: 74rem; margin: 0 auto; padding: 1rem max(16px, env(safe-area-inset-right, 0px)) 4rem max(16px, env(safe-area-inset-left, 0px)); }
.bar { display: flex; justify-content: space-between; align-items: center; gap: 1rem; flex-wrap: wrap; padding-bottom: 1rem; border-bottom: 1px solid var(--ink-line); }
.bar .logo { color: var(--paper); font-size: 1.15rem; }
.bar .logo svg { color: var(--carimbo-dk); width: 28px; height: 28px; }
.tabs { display: flex; gap: .2rem; flex-wrap: wrap; }
.tabs a { min-height: var(--tap); display: inline-flex; align-items: center; padding: 0 .85rem; border-radius: 999px; text-decoration: none; color: var(--muted-dk); font-size: 13px; }
.tabs a:hover { color: var(--paper); }
.tabs a[aria-current] { background: var(--ink-2); color: var(--paper); box-shadow: inset 0 0 0 1px var(--ink-line); }
.side { font: 400 11px/1 var(--mono); color: var(--muted-dk); }
.head { display: flex; justify-content: space-between; align-items: flex-end; gap: 1rem; flex-wrap: wrap; margin: 1.4rem 0 1rem; }
.head h1 { font: 500 19px/1.2 var(--mono); margin: .35rem 0 0; }
.card { background: var(--ink-2); border: 1px solid var(--ink-line); border-radius: 12px; padding: 1.2rem 1.3rem; min-width: 0; }
.card h2 { font: 500 19px/1.2 var(--mono); margin: .4rem 0 .8rem; }
.hero-n { font: 500 54px/1 var(--mono); letter-spacing: -0.03em; margin: .6rem 0 .4rem; }
.v19 { font: 500 19px/1.1 var(--mono); margin: .5rem 0 .3rem; }
.delta { font: 500 12px/1.3 var(--mono); }
.up { color: var(--verde-dk); }
.down { color: var(--red-dk); }
.note { color: var(--muted-dk); font: 400 11.5px/1.5 var(--mono); margin: .5rem 0 0; }
.grid-4 { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 1rem; }
.grid-2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1rem; }
.grid-21 { display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr); gap: 1rem; align-items: start; }
@media (max-width: 960px) { .grid-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); } .grid-21 { grid-template-columns: minmax(0, 1fr); } }
@media (max-width: 560px) { .grid-2 { grid-template-columns: minmax(0, 1fr); } }
.stack { display: grid; gap: 1rem; }
.btn-p { min-height: var(--tap); padding: 0 1rem; border-radius: 999px; border: 0; background: var(--paper); color: var(--ink); font: 600 13px/1 var(--sans); cursor: pointer; display: inline-flex; align-items: center; gap: .4rem; text-decoration: none; }
.btn-g { min-height: var(--tap); padding: 0 1rem; border-radius: 999px; border: 1px solid var(--ink-line); background: transparent; color: var(--paper); font: 500 13px/1 var(--sans); cursor: pointer; display: inline-flex; align-items: center; gap: .4rem; text-decoration: none; }
.btn-g:hover { border-color: var(--muted-dk); }
.btn-r { min-height: var(--tap); padding: 0 1rem; border-radius: 999px; border: 1px solid rgba(217,122,112,.5); background: transparent; color: var(--red-dk); font: 500 13px/1 var(--sans); cursor: pointer; }
.chips { display: flex; gap: .4rem; flex-wrap: wrap; }
.chips button { min-height: 36px; padding: 0 .8rem; border-radius: 999px; border: 1px solid var(--ink-line); background: transparent; color: var(--muted-dk); font: 500 12px/1 var(--sans); cursor: pointer; display: inline-flex; gap: .45rem; align-items: center; }
.chips button b { font: 500 11px/1 var(--mono); color: var(--paper); }
.chips button[aria-pressed="true"] { background: var(--paper); color: var(--ink); border-color: var(--paper); }
.chips button[aria-pressed="true"] b { color: var(--ink); }
.scroll { overflow-x: auto; }
table.t { width: 100%; border-collapse: collapse; min-width: 640px; }
.t th { text-align: left; font: 500 10px/1 var(--mono); letter-spacing: .12em; text-transform: uppercase; color: var(--muted-dk); padding: .6rem .5rem; border-bottom: 1px solid var(--ink-line); white-space: nowrap; }
.t td { padding: .55rem .5rem; border-bottom: 1px solid var(--ink-line); height: 30px; }
.t tbody tr { cursor: pointer; }
.t tbody tr:hover td { background: rgba(242,238,228,.03); }
.t td.n, .t th.n { text-align: right; font-family: var(--mono); font-variant-numeric: tabular-nums; }
.t td.m { font-family: var(--mono); color: var(--muted-dk); white-space: nowrap; }
.st { display: inline-flex; align-items: center; gap: .35rem; font: 500 11px/1 var(--mono); white-space: nowrap; }
.st::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.st.ok { color: var(--verde-dk); }
.st.risk { color: var(--crema); }
.st.lost { color: var(--red-dk); }
.st.near { color: var(--carimbo-dk); }
.st.new { color: var(--paper); }
.st.off { color: var(--muted-dk); }
.track { height: 6px; border-radius: 999px; background: var(--ink-line); overflow: hidden; }
.track i { display: block; height: 100%; border-radius: inherit; background: var(--carimbo-dk); }
.field { display: grid; gap: .35rem; }
.field input, .field select, .field textarea { min-height: var(--tap); border-radius: 9px; border: 1px solid var(--ink-line); background: var(--ink); color: var(--paper); padding: .55rem .7rem; font: 400 14px/1.4 var(--sans); width: 100%; }
.field textarea { min-height: 90px; resize: vertical; }
.switch { position: relative; width: 44px; height: 26px; flex: none; }
.switch input { position: absolute; inset: 0; opacity: 0; margin: 0; cursor: pointer; }
.switch span { position: absolute; inset: 0; border-radius: 999px; background: var(--ink-line); transition: background .12s; pointer-events: none; }
.switch span::after { content: ""; position: absolute; top: 3px; left: 3px; width: 20px; height: 20px; border-radius: 50%; background: var(--muted-dk); transition: transform .12s, background .12s; }
.switch input:checked + span { background: var(--verde-dk); }
.switch input:checked + span::after { transform: translateX(18px); background: var(--ink); }
.switch input:focus-visible + span { outline: 2px solid var(--carimbo-dk); outline-offset: 2px; }
.drawer { position: fixed; inset: 0; z-index: 20; display: flex; justify-content: flex-end; background: rgba(8,7,5,.66); }
.drawer .panel { width: min(100%, 28rem); height: 100%; overflow-y: auto; background: var(--ink-2); border-left: 1px solid var(--ink-line); padding: calc(1.2rem + env(safe-area-inset-top, 0px)) max(1.3rem, env(safe-area-inset-right, 0px)) calc(2rem + env(safe-area-inset-bottom, 0px)) 1.3rem; }
.kv { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: .45rem 1rem; margin: 1rem 0; }
.kv dt { color: var(--muted-dk); }
.kv dd { margin: 0; text-align: right; font-family: var(--mono); }
.empty { color: var(--muted-dk); padding: 1.5rem 0; text-align: center; }
