/* AirFlow prototype — layout: fixed sidebar + top bar + one view. Components follow the design system (af-*). */
:root { --ease: cubic-bezier(.2, .8, .2, 1); --blur: none; --brand: linear-gradient(120deg, var(--flow-deep), var(--flow)); --signature: linear-gradient(90deg, var(--ink), var(--flow), var(--sky), var(--copper)); --side: 236px; }
:root[data-mode="dark"] { --blur: blur(18px); --brand: linear-gradient(120deg, var(--flow-deep), color-mix(in srgb, var(--flow) 25%, var(--flow-deep))); }
* { box-sizing: border-box; }
html, body { height: 100%; }
body { margin: 0; font-family: var(--font-text); font-size: 14px; line-height: 20px; color: var(--ink); -webkit-font-smoothing: antialiased; background: radial-gradient(820px 380px at 12% -10%, rgba(0, 165, 254, .22), transparent 62%), radial-gradient(760px 360px at 55% -18%, rgba(7, 42, 82, .12), transparent 60%), radial-gradient(620px 340px at 96% -8%, rgba(240, 163, 107, .24), transparent 60%), var(--surface); background-attachment: fixed; }
:root[data-mode="dark"] body { background: radial-gradient(1200px 600px at 70% -10%, rgba(0, 101, 197, .35), transparent 60%), radial-gradient(900px 500px at -10% 110%, rgba(0, 165, 254, .12), transparent 60%), var(--surface); background-attachment: fixed; }
button, input, select, textarea { font: inherit; color: inherit; }
a { color: var(--flow); }
:focus-visible { outline: 2px solid var(--flow); outline-offset: 2px; }
.num { font-variant-numeric: tabular-nums; }
.mono { font-family: var(--font-mono); }
.muted { color: var(--ink-muted); }
.label { font-family: var(--font-mono); font-size: 11px; line-height: 16px; font-weight: 600; letter-spacing: .1em; text-transform: uppercase; color: var(--ink-muted); }
.hidden-sm { }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }

/* Shell */
.app { display: grid; grid-template-columns: var(--side) minmax(0, 1fr); min-height: 100%; }
.side { position: sticky; top: 0; height: 100vh; display: flex; flex-direction: column; gap: 4px; padding: 18px 12px 16px; padding-left: max(12px, env(safe-area-inset-left, 0px)); border-right: 1px solid var(--hairline); overflow-y: auto; }
.logo { display: flex; align-items: center; gap: 10px; padding: 0 8px 14px; flex: none; }
.logo-mark { width: 44px; height: 30px; flex: none; }
.logo-word { display: flex; flex-wrap: wrap; white-space: nowrap; min-width: 92px; align-items: baseline; font-family: var(--font-display); font-weight: 700; font-size: 19px; line-height: 20px; letter-spacing: -0.02em; }
.logo-word b { font-weight: 700; color: var(--ink); }
.logo-word i { font-style: italic; color: var(--flow); }
.logo-word small { flex-basis: 100%; font-family: var(--font-text); font-size: 11.5px; line-height: 14px; font-weight: 500; letter-spacing: 0; color: var(--ink-muted); }
.nav-group { margin: 12px 8px 4px; }
.nav a { display: flex; align-items: center; gap: 10px; height: 34px; padding: 0 10px; border-radius: 10px; color: var(--ink-muted); text-decoration: none; font-weight: 500; font-size: 13.5px; transition: background-color .2s var(--ease), color .2s var(--ease); }
.nav a:hover { background: var(--surface-sunken); color: var(--ink); }
.nav a[aria-current="page"] { background: var(--surface-raised); color: var(--ink); box-shadow: 0 0 0 1px var(--hairline), var(--shadow-rest); -webkit-backdrop-filter: var(--blur); backdrop-filter: var(--blur); }
.nav a[aria-current="page"] svg { color: var(--flow); }
.nav svg { width: 17px; height: 17px; flex: none; }
.nav .cnt { margin-left: auto; min-width: 22px; height: 20px; padding: 0 6px; border-radius: 999px; display: grid; place-items: center; font-family: var(--font-mono); font-size: 11px; font-weight: 600; background: var(--flow-soft); color: var(--flow); }
.nav .cnt.bad { background: var(--danger-soft); color: var(--danger); }
.side-foot { margin-top: auto; display: flex; align-items: center; gap: 10px; padding: 10px 8px 0; border-top: 1px solid var(--hairline); }
.avatar { width: 32px; height: 32px; border-radius: 50%; display: grid; place-items: center; font-size: 11px; font-weight: 700; color: #fff; background: var(--rc, var(--brand)); flex: none; }
.avatar.sm { width: 26px; height: 26px; font-size: 10px; }
.avatar.lg { width: 40px; height: 40px; font-size: 13px; }
.side-foot div { display: flex; flex-direction: column; line-height: 16px; font-size: 13px; min-width: 0; }
.side-foot small { color: var(--ink-muted); font-size: 12px; }

.main { min-width: 0; display: flex; flex-direction: column; }
.top { position: sticky; top: 0; z-index: 20; display: flex; align-items: center; gap: 12px; padding-block: 12px; padding-left: 20px; padding-right: max(20px, env(safe-area-inset-right, 0px)); }
.top::before { content: ""; position: absolute; inset: 0; background: color-mix(in srgb, var(--surface) 72%, transparent); -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px); z-index: -1; border-bottom: 1px solid var(--hairline); }
.crumbs { display: flex; align-items: center; gap: 8px; min-width: 0; font-size: 13px; color: var(--ink-muted); }
.crumbs button { border: 0; background: none; padding: 0; color: var(--ink-muted); cursor: pointer; }
.crumbs button:hover { color: var(--ink); }
.crumbs b { color: var(--ink); font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.search { position: relative; margin-left: auto; flex: 0 1 420px; }
.search-box { display: flex; align-items: center; gap: 10px; height: 38px; padding: 0 8px 0 14px; border-radius: 999px; background: var(--surface-raised); box-shadow: 0 0 0 1px var(--hairline), var(--shadow-rest); -webkit-backdrop-filter: var(--blur); backdrop-filter: var(--blur); }
.search-box:focus-within { box-shadow: 0 0 0 1.5px var(--flow), 0 0 0 5px var(--flow-glow); }
.search-box svg { width: 17px; height: 17px; color: var(--flow); flex: none; }
.search-box input { flex: 1; min-width: 0; border: 0; outline: none; background: transparent; font-size: 13.5px; }
.search-box input::placeholder { color: var(--ink-muted); }
.kbd { font-family: var(--font-mono); font-size: 11px; line-height: 20px; padding: 0 6px; border-radius: 5px; background: var(--surface-sunken); color: var(--ink-muted); white-space: nowrap; }
.results { position: absolute; top: 46px; left: 0; right: 0; max-height: 420px; overflow: auto; padding: 6px; border-radius: 14px; background: var(--surface-solid); box-shadow: 0 0 0 1px var(--hairline), var(--shadow-hover); z-index: 30; }
.results button { width: 100%; display: grid; grid-template-columns: 76px 1fr; gap: 10px; align-items: center; padding: 8px 10px; border: 0; border-radius: 10px; background: none; text-align: left; cursor: pointer; }
.results button:hover, .results button.on { background: var(--surface-sunken); }
.results small { display: block; color: var(--ink-muted); font-size: 12px; }
.results .empty { padding: 12px; color: var(--ink-muted); }
.mode { height: 34px; padding: 0 12px 0 6px; display: inline-flex; align-items: center; gap: 8px; border: 0; border-radius: 999px; background: var(--surface-raised); box-shadow: 0 0 0 1px var(--hairline), var(--shadow-rest); -webkit-backdrop-filter: var(--blur); backdrop-filter: var(--blur); cursor: pointer; font-weight: 500; font-size: 13px; white-space: nowrap; }
.mode-track { position: relative; width: 44px; height: 24px; border-radius: 999px; background: var(--surface-sunken); box-shadow: inset 0 0 0 1px var(--hairline); flex: none; }
.mode-knob { position: absolute; top: 2px; left: 2px; width: 20px; height: 20px; border-radius: 50%; display: grid; place-items: center; background: #fff; color: var(--copper); box-shadow: 0 1px 3px rgba(7, 42, 82, .3); transition: transform .3s var(--ease); }
.mode-knob svg { width: 13px; height: 13px; }
.mode[aria-pressed="true"] .mode-knob { transform: translateX(20px); background: var(--brand); color: #fff; }

.view { padding: 8px 20px 40px; padding-right: max(20px, env(safe-area-inset-right, 0px)); display: flex; flex-direction: column; gap: 16px; min-width: 0; }
.vhead { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.vhead h1 { margin: 2px 0 0; font-family: var(--font-display); font-size: 30px; line-height: 36px; font-weight: 600; letter-spacing: -0.03em; text-wrap: balance; }
.vhead p { margin: 4px 0 0; color: var(--ink-muted); max-width: 70ch; }
.tools { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }

/* Panels and generic bits */
.panel { background: var(--surface-raised); -webkit-backdrop-filter: var(--blur); backdrop-filter: var(--blur); border-radius: var(--radius-lg); box-shadow: 0 0 0 1px var(--hairline), var(--shadow-rest); min-width: 0; }
.p-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 14px 16px 10px; flex-wrap: wrap; }
.p-head h2 { margin: 0; font-family: var(--font-display); font-size: 15px; line-height: 20px; font-weight: 600; letter-spacing: -0.01em; }
.p-body { padding: 0 16px 16px; }
.count { font-family: var(--font-mono); font-size: 12px; padding: 0 8px; line-height: 22px; border-radius: 999px; background: var(--flow-soft); color: var(--flow); font-weight: 600; }
.btn { height: 38px; padding: 0 16px; border: 0; border-radius: 999px; display: inline-flex; align-items: center; justify-content: center; gap: 8px; font-weight: 600; cursor: pointer; background: transparent; color: var(--ink); box-shadow: inset 0 0 0 1px var(--line); transition: transform .2s var(--ease), box-shadow .2s var(--ease), background-color .2s; white-space: nowrap; text-decoration: none; }
.btn:hover { background: var(--surface-sunken); }
.btn-primary { background: var(--flow); color: var(--on-flow); box-shadow: 0 8px 20px -8px var(--flow-glow), inset 0 1px 0 rgba(255, 255, 255, .2); }
:root[data-mode="dark"] .btn-primary { background: var(--brand); color: #fff; }
.btn-primary:hover { background: var(--flow); transform: translateY(-1px); }
:root[data-mode="dark"] .btn-primary:hover { background: var(--brand); }
.btn-sm { height: 32px; padding: 0 12px; font-size: 13px; font-weight: 500; }
.btn-chip { height: 34px; padding: 0 12px; font-weight: 500; background: var(--surface-raised); box-shadow: 0 0 0 1px var(--hairline), var(--shadow-rest); }
.btn-chip:hover { background: var(--surface-raised); box-shadow: 0 0 0 1px var(--line), var(--shadow-hover); }
.btn-danger { color: var(--danger); }
.btn .k { font-family: var(--font-mono); font-size: 11px; opacity: .7; font-weight: 500; }
.btn[disabled] { opacity: .45; cursor: not-allowed; transform: none; }
.link { border: 0; background: none; padding: 0; color: var(--flow); font-weight: 500; cursor: pointer; text-align: left; }
.link:hover { text-decoration: underline; }
.seg { display: inline-flex; padding: 3px; border-radius: 999px; background: var(--surface-sunken); box-shadow: inset 0 0 0 1px var(--hairline); }
.seg button { height: 28px; padding: 0 12px; border: 0; border-radius: 999px; background: transparent; font-size: 13px; font-weight: 500; color: var(--ink-muted); cursor: pointer; white-space: nowrap; }
.seg button[aria-pressed="true"] { background: var(--surface-solid); color: var(--ink); box-shadow: 0 0 0 1px var(--hairline), var(--shadow-rest); }
.filters { display: flex; gap: 6px; flex-wrap: wrap; }
.filter { height: 28px; padding: 0 10px; border: 0; border-radius: 999px; background: transparent; box-shadow: inset 0 0 0 1px var(--line); color: var(--ink-muted); font-size: 12px; font-weight: 500; cursor: pointer; }
.filter[aria-pressed="true"] { background: var(--ink); color: var(--surface); box-shadow: none; }
.tag { display: inline-flex; align-items: center; gap: 6px; height: 22px; padding: 0 8px; border-radius: 6px; font-size: 11px; line-height: 16px; font-weight: 500; white-space: nowrap; background: var(--surface-sunken); color: var(--ink-muted); }
.tag i { width: 6px; height: 6px; border-radius: 50%; background: currentColor; flex: none; }
.t-neutral i { background: transparent; box-shadow: inset 0 0 0 1.5px currentColor; }
.t-plan, .t-info { background: var(--flow-soft); color: var(--flow); }
.t-live i { animation: pulse-dot 1.8s var(--ease) infinite; }
.t-attention, .t-window { background: var(--warning-soft); color: var(--warning); }
.t-attention i { border-radius: 1px; transform: rotate(45deg); }
.t-done { background: var(--success-soft); color: var(--success); }
.t-late, .t-urgent, .t-blocked { background: var(--danger-soft); color: var(--danger); }
.t-late i { border-radius: 1px; }
.t-billed { background: var(--copper-soft); color: var(--copper); }
@keyframes pulse-dot { 0% { box-shadow: 0 0 0 0 var(--flow-glow); } 70% { box-shadow: 0 0 0 5px transparent; } 100% { box-shadow: 0 0 0 0 transparent; } }
.dot { width: 8px; height: 8px; border-radius: 50%; background: var(--tc); flex: none; box-shadow: 0 0 0 3px color-mix(in srgb, var(--tc) 22%, transparent); display: inline-block; }
.typel { display: inline-flex; align-items: center; gap: 6px; }

/* Queue cards */
.queue { display: flex; flex-direction: column; gap: 8px; padding: 0 12px 12px; overflow: auto; }
.q { position: relative; display: grid; grid-template-columns: 1fr auto; gap: 4px 8px; width: 100%; padding: 12px 12px 12px 14px; border: 0; border-radius: var(--radius-md); background: var(--surface-raised); box-shadow: 0 0 0 1px var(--hairline); text-align: left; cursor: grab; transition: box-shadow .2s var(--ease), transform .2s var(--ease), opacity .3s; }
:root[data-mode="dark"] .q { background: rgba(255, 255, 255, .04); }
.q:hover { box-shadow: 0 0 0 1px var(--line), var(--shadow-hover); transform: translateY(-1px); }
.q[aria-selected="true"] { box-shadow: 0 0 0 1.5px var(--flow), 0 0 0 5px var(--flow-glow); }
.q.dragging { opacity: .4; }
.q-dur { font-family: var(--font-mono); font-size: 12px; color: var(--ink-muted); }
.q-title { grid-column: 1 / -1; font-weight: 600; font-size: 14px; line-height: 20px; }
.q-sub { grid-column: 1 / -1; color: var(--ink-muted); font-size: 12px; line-height: 16px; }
.q-tags { grid-column: 1 / -1; display: flex; gap: 6px; flex-wrap: wrap; margin-top: 4px; }
.q.compact { padding: 8px 10px; gap: 2px 8px; }
.q.compact .q-title { font-size: 13px; line-height: 18px; }

/* Day lanes and blocks */
.lanes { position: relative; min-width: 760px; padding: 4px 16px 14px; }
.lanes { --who: 160px; }
.dispatch .lanes { --who: 128px; min-width: 520px; padding-left: 12px; padding-right: 12px; }
.dispatch .who .avatar { width: 28px; height: 28px; }
.hours, .lane { display: grid; grid-template-columns: var(--who) 1fr; }
.scale { position: relative; height: 22px; }
.scale span { position: absolute; transform: translateX(-50%); font-family: var(--font-mono); font-size: 10px; line-height: 22px; color: var(--ink-muted); white-space: nowrap; }
.scale span:last-child { transform: translateX(-100%); }
.lane { min-height: 62px; border-top: 1px solid var(--hairline); transition: background-color .2s; }
.lane.hover { background: var(--flow-soft); }
.lane.refuse { background: var(--danger-soft); }
.who { display: flex; align-items: center; gap: 10px; padding-right: 10px; min-width: 0; cursor: pointer; }
.who div { display: flex; flex-direction: column; min-width: 0; line-height: 16px; }
.who b { font-size: 13px; font-weight: 600; white-space: nowrap; }
.who small { font-size: 11px; color: var(--ink-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.track { position: relative; background-image: linear-gradient(to right, var(--hairline) 1px, transparent 1px); background-size: calc(100% / 12) 100%; }
.blk { position: absolute; top: 7px; bottom: 7px; padding: 5px 8px; border: 0; border-radius: var(--radius-sm); background: var(--surface-raised); box-shadow: 0 0 0 1px var(--hairline), 0 4px 10px -6px rgba(7, 42, 82, .25); overflow: hidden; isolation: isolate; display: flex; flex-direction: column; justify-content: center; text-align: left; cursor: pointer; transition: box-shadow .2s, transform .2s; color: var(--ink); }
:root[data-mode="dark"] .blk { background: rgba(255, 255, 255, .04); box-shadow: 0 0 0 1px var(--hairline); }
.blk::before { content: ""; position: absolute; inset: 0; background: var(--tc); opacity: .14; z-index: -1; }
:root[data-mode="dark"] .blk::before { opacity: .16; }
:root[data-mode="dark"] .blk::after { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 3px; background: var(--tc); }
.blk:hover { transform: translateY(-1px); z-index: 2; }
.blk b { font-size: 11px; line-height: 14px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.blk small { font-size: 10px; line-height: 13px; color: var(--ink-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-family: var(--font-mono); }
.blk.done { opacity: .55; }
.blk.live { box-shadow: 0 0 0 1.5px var(--flow), 0 0 18px -4px var(--flow-glow); }
.blk.new { animation: pop .5s cubic-bezier(.2, .8, .2, 1.2); box-shadow: 0 0 0 1.5px var(--success), 0 0 20px -4px var(--success); }
.blk.warn { box-shadow: 0 0 0 1.5px var(--warning), 0 4px 10px -6px rgba(7, 42, 82, .25); }
.blk.absence { background: repeating-linear-gradient(135deg, transparent 0 6px, var(--hairline) 6px 7px); box-shadow: inset 0 0 0 1px var(--line); cursor: default; }
.blk.absence::before, .blk.absence::after { display: none; }
.blk.absence:hover { transform: none; }
@keyframes pop { from { transform: scale(.7); opacity: 0; } to { transform: scale(1); opacity: 1; } }
.ghost { position: absolute; top: 5px; bottom: 5px; border-radius: var(--radius-sm); border: 1.5px dashed var(--flow); background: var(--flow-soft); display: flex; flex-direction: column; justify-content: center; padding: 4px 8px; overflow: hidden; z-index: 2; animation: breathe 2s ease-in-out infinite; pointer-events: none; }
.ghost b { font-size: 11px; line-height: 14px; color: var(--flow); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ghost small { font-size: 10px; line-height: 13px; color: var(--flow); font-family: var(--font-mono); white-space: nowrap; }
.ghost.bad { border-color: var(--danger); background: var(--danger-soft); animation: none; }
.ghost.bad b, .ghost.bad small { color: var(--danger); }
@keyframes breathe { 50% { box-shadow: 0 0 0 4px var(--flow-glow); } }
.nowline { position: absolute; top: 22px; bottom: 14px; width: 0; border-left: 1.5px solid var(--flow); z-index: 3; pointer-events: none; }
.nowline span { position: absolute; top: -20px; transform: translateX(-50%); padding: 0 6px; border-radius: 999px; background: var(--flow); color: var(--on-flow); font-family: var(--font-mono); font-size: 10px; line-height: 16px; font-weight: 600; white-space: nowrap; }

/* Dispatch layout */
.dispatch { display: grid; grid-template-columns: 290px minmax(0, 1fr) 320px; grid-template-areas: "q m s" "q l s"; grid-template-rows: auto 1fr; gap: 12px; align-items: start; }
.dispatch.nomap { grid-template-areas: "q l s"; grid-template-rows: auto; }
.d-queue { grid-area: q; } .d-map { grid-area: m; } .d-lanes { grid-area: l; } .d-sug { grid-area: s; }
.col { display: flex; flex-direction: column; gap: 12px; min-width: 0; }
.map { position: relative; overflow: hidden; height: 290px; }
.map svg { position: absolute; inset: 0; width: 100%; height: 100%; }
.map .ground { fill: var(--map-ground); }
:root[data-mode="dark"] .map .ground { fill: transparent; }
.map .grid-l { stroke: var(--hairline); stroke-width: 1; opacity: .5; }
.map .water { fill: none; stroke: var(--map-water); stroke-width: 14; stroke-linecap: round; }
.map .road { fill: none; stroke: var(--map-road); stroke-width: 2; stroke-linecap: round; }
.map .place { fill: var(--ink-muted); font-size: 11px; font-family: var(--font-text); }
.map .pdot { fill: var(--ink-muted); opacity: .6; }
.map .depot { fill: var(--ink); }
.map .route { fill: none; stroke: var(--rc); stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; opacity: .28; transition: opacity .25s, stroke-width .25s; }
.map .route.on { opacity: 1; stroke-width: 3; }
:root[data-mode="dark"] .map .route.on { filter: drop-shadow(0 0 6px var(--rc)); }
.map .sroute { fill: none; stroke: var(--flow); stroke-width: 2.5; stroke-dasharray: 6 6; animation: dash 1s linear infinite; }
@keyframes dash { to { stroke-dashoffset: -12; } }
.map .pin .halo { fill: var(--rc); opacity: .18; }
.map .pin .core { fill: var(--rc); stroke: var(--surface-solid); stroke-width: 2; }
.map .pin text { fill: #fff; font-size: 9px; font-weight: 700; font-family: var(--font-text); text-anchor: middle; dominant-baseline: central; }
.map .pin.live .halo { animation: ping 2s ease-out infinite; transform-box: fill-box; transform-origin: center; }
@keyframes ping { 0% { transform: scale(.6); opacity: .5; } 100% { transform: scale(1.8); opacity: 0; } }
.map .target circle { fill: var(--flow); }
.map .target .ring { fill: none; stroke: var(--flow); stroke-width: 2; animation: ping 1.6s ease-out infinite; transform-box: fill-box; transform-origin: center; }
.map-legend { position: absolute; left: 14px; bottom: 12px; display: flex; flex-direction: column; gap: 2px; pointer-events: none; }
.map-legend b { font-family: var(--font-display); font-size: 15px; font-weight: 600; }
.map-note { position: absolute; right: 12px; top: 10px; font-size: 11px; color: var(--ink-muted); }
.scroll-x { overflow-x: auto; }

/* Suggestion */
.sug { position: relative; display: flex; flex-direction: column; gap: 14px; padding: 16px; overflow: hidden; }
.sug::before { content: ""; position: absolute; inset: 0 0 auto 0; height: 6px; background: var(--signature); pointer-events: none; }
:root[data-mode="dark"] .sug::before { inset: -1px; height: auto; border-radius: inherit; padding: 1px; background: linear-gradient(140deg, var(--flow), transparent 40%, transparent 70%, var(--copper)); -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0); -webkit-mask-composite: xor; mask-composite: exclude; }
.sug-head { display: flex; align-items: center; gap: 8px; }
.spark { width: 22px; height: 22px; border-radius: 7px; display: grid; place-items: center; background: var(--brand); color: #fff; flex: none; }
.spark svg { width: 13px; height: 13px; }
.sug h3 { margin: 0; font-family: var(--font-display); font-size: 19px; line-height: 25px; font-weight: 600; letter-spacing: -0.02em; text-wrap: balance; }
.slot { display: flex; align-items: center; gap: 12px; padding: 12px; border-radius: var(--radius-md); background: var(--flow-soft); }
.slot > div { display: flex; flex-direction: column; min-width: 0; line-height: 18px; }
.slot b { font-size: 15px; font-weight: 600; }
.slot > div > span { font-size: 12px; color: var(--ink-muted); }
.slot.bad { background: var(--danger-soft); }
.slot.bad b { color: var(--danger); }
.reasons { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.reasons li { display: grid; grid-template-columns: 18px 1fr; gap: 8px; font-size: 13px; line-height: 18px; }
.reasons svg { width: 18px; height: 18px; }
.r-ok svg { color: var(--success); }
.r-no svg { color: var(--danger); }
.r-info svg { color: var(--flow); }
.alts { display: flex; flex-direction: column; gap: 6px; }
.alt { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 8px 10px; border: 0; border-radius: var(--radius-sm); background: transparent; box-shadow: inset 0 0 0 1px var(--hairline); cursor: pointer; text-align: left; font-size: 13px; }
.alt:hover { background: var(--surface-sunken); }
.alt span { font-family: var(--font-mono); font-size: 12px; color: var(--ink-muted); white-space: nowrap; }
.daysum { padding: 14px 16px; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.daysum div { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.daysum .label { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.figure { font-family: var(--font-display); font-size: 22px; line-height: 26px; font-weight: 600; letter-spacing: -0.02em; }
.meter { height: 4px; border-radius: 4px; background: var(--surface-sunken); overflow: hidden; margin-top: 4px; }
.meter i { display: block; height: 100%; background: var(--flow); transition: width .6s var(--ease); }

/* Week */
.week { display: grid; grid-template-columns: 250px minmax(0, 1fr); gap: 12px; align-items: start; }
.wgrid { display: grid; grid-template-columns: 150px repeat(5, minmax(150px, 1fr)); min-width: 900px; }
.wgrid .wh { padding: 10px 10px 8px; border-bottom: 1px solid var(--hairline); }
.wgrid .wh b { display: block; font-family: var(--font-display); font-size: 14px; font-weight: 600; }
.wgrid .wh.today b { color: var(--flow); }
.wgrid .wh small { font-size: 11px; color: var(--ink-muted); font-family: var(--font-mono); }
.wcell { min-height: 120px; padding: 6px; border-bottom: 1px solid var(--hairline); border-left: 1px solid var(--hairline); display: flex; flex-direction: column; gap: 4px; transition: background-color .2s; }
.wcell.today { background: color-mix(in srgb, var(--flow-soft) 45%, transparent); }
.wcell.hover { background: var(--flow-soft); }
.wcell.refuse { background: var(--danger-soft); }
.wwho { display: flex; align-items: center; gap: 8px; padding: 8px 10px; border-bottom: 1px solid var(--hairline); }
.wwho div { display: flex; flex-direction: column; line-height: 15px; min-width: 0; }
.wwho b { font-size: 13px; }
.wwho small { font-size: 11px; color: var(--ink-muted); }
.wwho .load { height: 3px; border-radius: 3px; background: var(--surface-sunken); margin-top: 4px; overflow: hidden; width: 90px; }
.wwho .load i { display: block; height: 100%; background: var(--rc); }
.wb { position: relative; display: block; width: 100%; padding: 5px 8px 5px 10px; border: 0; border-radius: 8px; background: var(--surface-raised); box-shadow: 0 0 0 1px var(--hairline); text-align: left; cursor: grab; isolation: isolate; overflow: hidden; color: var(--ink); }
:root[data-mode="dark"] .wb { background: rgba(255, 255, 255, .05); }
.wb::before { content: ""; position: absolute; inset: 0; background: var(--tc); opacity: .14; z-index: -1; }
.wb::after { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 3px; background: var(--tc); }
.wb b { display: block; font-size: 11.5px; line-height: 15px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.wb small { display: block; font-size: 10.5px; line-height: 14px; color: var(--ink-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.wb .t { font-family: var(--font-mono); }
.wb.done { opacity: .55; }
.wb.live { box-shadow: 0 0 0 1.5px var(--flow); }
.wb.new { box-shadow: 0 0 0 1.5px var(--success); animation: pop .45s cubic-bezier(.2, .8, .2, 1.2); }
.wb.abs { background: repeating-linear-gradient(135deg, transparent 0 6px, var(--hairline) 6px 7px); box-shadow: inset 0 0 0 1px var(--line); cursor: default; }
.wb.abs::before, .wb.abs::after { display: none; }
.wb:hover { box-shadow: 0 0 0 1px var(--line), var(--shadow-rest); }

/* Kanban */
.kanban { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(232px, 1fr); gap: 10px; overflow-x: auto; padding-bottom: 8px; }
.kcol { display: flex; flex-direction: column; gap: 8px; padding: 10px; border-radius: var(--radius-lg); background: color-mix(in srgb, var(--surface-sunken) 70%, transparent); box-shadow: inset 0 0 0 1px var(--hairline); min-height: 420px; transition: background-color .2s; }
.kcol.hover { background: var(--flow-soft); }
.kcol h3 { margin: 0; display: flex; align-items: center; justify-content: space-between; gap: 8px; font-size: 13px; font-weight: 600; padding: 2px 4px 4px; }
.kcard { display: flex; flex-direction: column; gap: 4px; padding: 10px 12px; border: 0; border-radius: var(--radius-md); background: var(--surface-raised); box-shadow: 0 0 0 1px var(--hairline), var(--shadow-rest); text-align: left; cursor: grab; color: var(--ink); }
:root[data-mode="dark"] .kcard { background: rgba(16, 27, 48, .9); }
.kcard:hover { box-shadow: 0 0 0 1px var(--line), var(--shadow-hover); }
.kcard .top-line { display: flex; justify-content: space-between; gap: 8px; align-items: center; }
.kcard b { font-size: 13px; line-height: 18px; }
.kcard small { font-size: 12px; color: var(--ink-muted); }
.kcard .foot { display: flex; align-items: center; justify-content: space-between; gap: 6px; margin-top: 4px; flex-wrap: wrap; }

/* Tables */
.table-wrap { overflow-x: auto; }
table.tbl { width: 100%; border-collapse: collapse; font-size: 13px; }
.tbl th { text-align: left; font-family: var(--font-mono); font-size: 10.5px; letter-spacing: .08em; text-transform: uppercase; color: var(--ink-muted); font-weight: 600; padding: 10px 12px; border-bottom: 1px solid var(--hairline); white-space: nowrap; }
.tbl td { padding: 11px 12px; border-bottom: 1px solid var(--hairline); vertical-align: middle; }
.tbl tbody tr { cursor: pointer; transition: background-color .15s; }
.tbl tbody tr:hover { background: var(--surface-sunken); }
.tbl td b { font-weight: 600; }
.tbl td small { display: block; color: var(--ink-muted); font-size: 12px; }
.tbl .r { text-align: right; }

/* Detail pages */
.detail { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 12px; align-items: start; }
.hero { padding: 18px 20px; display: flex; gap: 16px; align-items: center; flex-wrap: wrap; }
.hero h2 { margin: 0; font-family: var(--font-display); font-size: 24px; line-height: 30px; letter-spacing: -0.02em; font-weight: 600; }
.hero .meta { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 6px; }
.tabs { display: flex; gap: 4px; padding: 0 12px; border-bottom: 1px solid var(--hairline); overflow-x: auto; }
.tabs button { height: 40px; padding: 0 12px; border: 0; background: none; color: var(--ink-muted); font-weight: 500; cursor: pointer; border-bottom: 2px solid transparent; white-space: nowrap; }
.tabs button[aria-selected="true"] { color: var(--ink); border-bottom-color: var(--flow); }
.kv { display: grid; grid-template-columns: 150px 1fr; gap: 8px 12px; font-size: 13px; }
.kv dt { color: var(--ink-muted); }
.kv dd { margin: 0; }
.list { display: flex; flex-direction: column; }
.row { display: flex; align-items: center; gap: 12px; padding: 10px 16px; border-top: 1px solid var(--hairline); }
.row:first-child { border-top: 0; }
.row.click { cursor: pointer; }
.row.click:hover { background: var(--surface-sunken); }
.row .grow { flex: 1; min-width: 0; }
.row b { font-weight: 600; }
.row small { display: block; color: var(--ink-muted); font-size: 12px; }
.cons { display: flex; flex-direction: column; gap: 10px; padding: 0 16px 16px; }
.con { display: grid; grid-template-columns: 32px 1fr; gap: 10px; align-items: start; }
.con .tile { width: 32px; height: 32px; border-radius: 10px; display: grid; place-items: center; background: var(--flow-soft); color: var(--flow); }
.con .tile.bad { background: var(--danger-soft); color: var(--danger); }
.con .tile.warn { background: var(--warning-soft); color: var(--warning); }
.con .tile svg { width: 16px; height: 16px; }
.con b { display: block; font-size: 13px; }
.con span { font-size: 13px; color: var(--ink-muted); }
.slots-grid { display: grid; grid-template-columns: 34px repeat(5, 1fr); gap: 3px; font-size: 10px; font-family: var(--font-mono); color: var(--ink-muted); margin-top: 6px; }
.slots-grid .hrow { display: contents; }
.slots-grid i { display: block; height: 12px; border-radius: 3px; background: var(--surface-sunken); }
.slots-grid i.on { background: var(--success); opacity: .7; }
.timeline { display: flex; flex-direction: column; gap: 0; padding: 0 16px 16px; }
.tl-item { display: grid; grid-template-columns: 18px 1fr; gap: 10px; position: relative; padding-bottom: 14px; }
.tl-item::before { content: ""; position: absolute; left: 8px; top: 18px; bottom: 0; width: 1.5px; background: var(--hairline); }
.tl-item:last-child::before { display: none; }
.tl-item i { width: 12px; height: 12px; margin: 4px 0 0 3px; border-radius: 50%; background: var(--surface-sunken); box-shadow: inset 0 0 0 2px var(--line); }
.tl-item i.ok { background: var(--success); box-shadow: none; }
.tl-item i.plan { background: var(--flow); box-shadow: 0 0 0 4px var(--flow-glow); }
.tl-item i.todo { background: transparent; box-shadow: inset 0 0 0 2px var(--warning); }
.tl-item b { font-size: 13px; }
.tl-item small { display: block; font-size: 12px; color: var(--ink-muted); }
.notes { padding: 0 16px 16px; display: flex; flex-direction: column; gap: 10px; }
.note { padding: 10px 12px; border-radius: 10px; background: var(--surface-sunken); font-size: 13px; }
.note small { display: block; color: var(--ink-muted); font-size: 11px; margin-top: 2px; }

/* Requests */
.req { display: grid; grid-template-columns: 330px minmax(0, 1fr); gap: 12px; align-items: start; }
.tk { display: flex; flex-direction: column; gap: 4px; width: 100%; padding: 12px 14px; border: 0; border-top: 1px solid var(--hairline); background: none; text-align: left; cursor: pointer; color: var(--ink); }
.tk:first-child { border-top: 0; }
.tk:hover { background: var(--surface-sunken); }
.tk[aria-selected="true"] { background: var(--flow-soft); box-shadow: inset 3px 0 0 var(--flow); }
.tk .l1 { display: flex; justify-content: space-between; gap: 8px; align-items: center; }
.tk b { font-size: 13px; line-height: 18px; }
.tk small { font-size: 12px; color: var(--ink-muted); }
.mail { padding: 16px 20px; border-radius: 12px; background: var(--surface-sunken); white-space: pre-wrap; font-size: 13.5px; line-height: 21px; }
.mail-head { display: flex; flex-direction: column; gap: 2px; margin-bottom: 10px; font-size: 12px; color: var(--ink-muted); }
.extract { display: grid; grid-template-columns: 170px minmax(0, 1fr) auto; gap: 0; }
.extract > div { padding: 9px 0; border-top: 1px solid var(--hairline); font-size: 13px; display: flex; align-items: center; gap: 8px; min-width: 0; }
.extract > div:nth-child(-n+3) { border-top: 0; }
.extract .k { color: var(--ink-muted); }
.extract .match { justify-content: flex-end; }
.cta-bar { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; padding: 14px 16px; border-top: 1px solid var(--hairline); }

/* Bons */
.bons { display: grid; grid-template-columns: 320px minmax(0, 1fr) 300px; gap: 12px; align-items: start; }
.paper-wrap { padding: 20px; background: var(--surface-sunken); border-radius: var(--radius-lg); box-shadow: inset 0 0 0 1px var(--hairline); overflow: auto; }
.paper { width: 100%; max-width: 640px; margin: 0 auto; background: #ffffff; color: #1a2433; border-radius: 4px; box-shadow: 0 20px 50px -20px rgba(0, 0, 0, .35), 0 0 0 1px rgba(0, 0, 0, .06); font-family: var(--font-text); font-size: 11.5px; line-height: 16px; color-scheme: light; }
.paper-head { display: flex; justify-content: space-between; gap: 16px; padding: 22px 26px 16px; border-bottom: 3px solid var(--mc); }
.paper-logo { width: 46px; height: 46px; border-radius: 8px; display: grid; place-items: center; background: var(--mc); color: #fff; font-weight: 700; font-size: 15px; letter-spacing: -.02em; flex: none; }
.paper-org { display: flex; gap: 12px; align-items: flex-start; }
.paper-org div { white-space: pre-line; color: #4a5566; font-size: 10.5px; line-height: 15px; }
.paper-org b { display: block; color: #1a2433; font-size: 12px; }
.paper-title { text-align: right; }
.paper-title h4 { margin: 0; font-size: 16px; line-height: 20px; color: var(--mc); font-family: var(--font-display); }
.paper-title span { display: block; font-family: var(--font-mono); font-size: 10.5px; color: #4a5566; }
.paper-sec { padding: 12px 26px; border-bottom: 1px solid #e6e9ee; }
.paper-sec h5 { margin: 0 0 6px; font-size: 9.5px; letter-spacing: .1em; text-transform: uppercase; color: var(--mc); font-family: var(--font-mono); }
.paper-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 4px 20px; }
.paper-grid span { color: #4a5566; }
.paper table { width: 100%; border-collapse: collapse; }
.paper td, .paper th { padding: 4px 6px; border-bottom: 1px solid #eef1f4; text-align: left; font-size: 11px; }
.paper th { color: #4a5566; font-weight: 600; font-size: 10px; }
.paper .ph { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.paper .ph div { height: 70px; border-radius: 4px; display: flex; align-items: flex-end; padding: 4px 6px; color: #fff; font-size: 9.5px; font-weight: 600; background: linear-gradient(135deg, #5d6b7c, #a9b4c2); }
.paper .ph div:nth-child(2) { background: linear-gradient(135deg, #3f5c74, #8fb0c9); }
.paper .ph div:nth-child(3) { background: linear-gradient(135deg, #4b5a3f, #a8b98f); }
.paper .sigs { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.paper .sig { height: 60px; border: 1px dashed #c8cfd8; border-radius: 4px; position: relative; }
.paper .sig svg { position: absolute; inset: 6px 10px; width: calc(100% - 20px); height: calc(100% - 12px); }
.paper .sig svg path { fill: none; stroke: #1d3557; stroke-width: 1.6; stroke-linecap: round; }
.paper-foot { padding: 10px 26px 16px; font-size: 9.5px; color: #6b7685; }
.paper .subk { margin: 0 26px; padding: 6px 10px; border-radius: 4px; background: #f4f6f8; font-size: 10px; color: #4a5566; }
.check { display: flex; gap: 8px; align-items: flex-start; font-size: 13px; padding: 6px 0; }
.check svg { width: 18px; height: 18px; flex: none; }
.cmp { display: flex; flex-direction: column; gap: 6px; }
.bar2 { display: grid; grid-template-columns: 70px 1fr 54px; gap: 8px; align-items: center; font-size: 12px; }
.bar2 .tr { height: 8px; border-radius: 8px; background: var(--surface-sunken); overflow: hidden; }
.bar2 .tr i { display: block; height: 100%; border-radius: 8px; background: var(--flow); }
.bar2 .tr i.over { background: var(--warning); }

/* Model editor */
.editor { display: grid; grid-template-columns: 240px 340px minmax(0, 1fr); gap: 12px; align-items: start; }
.field { display: flex; flex-direction: column; gap: 6px; }
.field label { font-size: 12px; font-weight: 500; color: var(--ink-muted); }
.input, .field textarea, .field select { width: 100%; min-height: 36px; padding: 7px 12px; border: 0; border-radius: 10px; background: var(--surface-solid); box-shadow: inset 0 0 0 1px var(--line-strong); font-size: 13px; outline: none; }
.field textarea { min-height: 64px; resize: vertical; line-height: 18px; }
.input:focus, .field textarea:focus, .field select:focus { box-shadow: inset 0 0 0 1.5px var(--flow), 0 0 0 4px var(--flow-glow); }
.swatches { display: flex; gap: 8px; flex-wrap: wrap; }
.swatches button { width: 28px; height: 28px; border-radius: 50%; border: 0; cursor: pointer; box-shadow: inset 0 0 0 1px rgba(0, 0, 0, .1); }
.swatches button[aria-pressed="true"] { box-shadow: 0 0 0 2px var(--surface-solid), 0 0 0 4px var(--flow); }
.blocks { display: flex; flex-direction: column; gap: 6px; }
.blockrow { display: flex; align-items: center; gap: 8px; padding: 6px 8px; border-radius: 10px; box-shadow: inset 0 0 0 1px var(--hairline); background: var(--surface-raised); }
.blockrow.off { opacity: .5; }
.blockrow .grip { color: var(--ink-muted); cursor: grab; font-family: var(--font-mono); }
.blockrow span.n { flex: 1; font-size: 13px; }
.iconbtn { width: 28px; height: 28px; border: 0; border-radius: 8px; background: transparent; display: grid; place-items: center; cursor: pointer; color: var(--ink-muted); }
.iconbtn:hover { background: var(--surface-sunken); color: var(--ink); }
.iconbtn svg { width: 15px; height: 15px; }
.switch { position: relative; width: 36px; height: 20px; border-radius: 999px; border: 0; background: var(--surface-sunken); box-shadow: inset 0 0 0 1px var(--line); cursor: pointer; flex: none; transition: background-color .2s; }
.switch::after { content: ""; position: absolute; top: 2px; left: 2px; width: 16px; height: 16px; border-radius: 50%; background: #fff; box-shadow: 0 1px 2px rgba(0, 0, 0, .3); transition: transform .2s var(--ease); }
.switch[aria-checked="true"] { background: var(--flow); box-shadow: none; }
.switch[aria-checked="true"]::after { transform: translateX(16px); }
.mlist button { width: 100%; display: flex; align-items: center; gap: 10px; padding: 10px 12px; border: 0; background: none; text-align: left; cursor: pointer; border-top: 1px solid var(--hairline); color: var(--ink); }
.mlist button:first-child { border-top: 0; }
.mlist button[aria-selected="true"] { background: var(--flow-soft); box-shadow: inset 3px 0 0 var(--flow); }
.mlogo { width: 30px; height: 30px; border-radius: 7px; display: grid; place-items: center; color: #fff; font-weight: 700; font-size: 11px; flex: none; }

/* Drawer, toast */
.scrim { position: fixed; inset: 0; background: rgba(5, 10, 20, .35); z-index: 40; animation: fade .2s; }
@keyframes fade { from { opacity: 0; } }
.drawer { position: fixed; top: 0; right: 0; bottom: 0; width: min(480px, 100%); z-index: 41; background: var(--surface-solid); box-shadow: -20px 0 60px -20px rgba(0, 0, 0, .5), 0 0 0 1px var(--hairline); overflow-y: auto; animation: slide .3s var(--ease); padding-top: env(safe-area-inset-top, 0px); padding-right: env(safe-area-inset-right, 0px); }
@keyframes slide { from { transform: translateX(40px); opacity: 0; } }
.drawer-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; padding: 18px 20px 12px; }
.drawer-head h3 { margin: 4px 0 0; font-family: var(--font-display); font-size: 20px; line-height: 26px; font-weight: 600; letter-spacing: -0.02em; }
.drawer-sec { padding: 12px 20px; border-top: 1px solid var(--hairline); display: flex; flex-direction: column; gap: 10px; }
.toast { position: fixed; left: 50%; bottom: calc(24px + env(safe-area-inset-bottom, 0px)); transform: translateX(-50%); z-index: 50; display: flex; align-items: center; gap: 12px; padding: 10px 10px 10px 16px; border-radius: 999px; background: var(--ink); color: var(--surface); box-shadow: 0 20px 40px -12px rgba(0, 0, 0, .4); animation: up .25s var(--ease); max-width: calc(100% - 32px); }
.toast button { height: 30px; padding: 0 12px; border: 0; border-radius: 999px; background: rgba(127, 127, 127, .3); color: inherit; font-weight: 600; cursor: pointer; }
@keyframes up { from { transform: translate(-50%, 16px); opacity: 0; } }
.empty-state { padding: 28px 16px; text-align: center; color: var(--ink-muted); }
.grid2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.stat-row { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
.stat { padding: 14px 16px; display: flex; flex-direction: column; gap: 2px; }


/* Planning model: readiness, appointment modes, shared places, urgent lane */
.cons .seg { flex-wrap: wrap; border-radius: 14px; }
.cons .seg button { border-radius: 11px; }
.btn-urgent { background: var(--danger-soft); color: var(--danger); box-shadow: inset 0 0 0 1px var(--danger); }
.btn-urgent:hover { background: var(--danger-soft); transform: translateY(-1px); }
.nav .cnt.warn { background: var(--warning-soft); color: var(--warning); }
.blk.option, .wb.option { box-shadow: none; outline: 1.5px dashed var(--flow); outline-offset: -1.5px; }
:root[data-mode="dark"] .blk.option { box-shadow: none; }
.blk.urgent, .wb.urgent { box-shadow: 0 0 0 1.5px var(--danger), 0 0 18px -6px var(--danger); }
:root[data-mode="dark"] .blk.urgent { box-shadow: 0 0 0 1.5px var(--danger), 0 0 18px -6px var(--danger); }
.q.lieu-card { cursor: pointer; background: var(--flow-soft); box-shadow: 0 0 0 1px var(--flow); }
:root[data-mode="dark"] .q.lieu-card { background: var(--flow-soft); }
.kanban.prep { grid-auto-columns: minmax(250px, 1fr); }
.kcol.ready { background: color-mix(in srgb, var(--success-soft) 60%, transparent); }
.kcol h3 > span:first-child { font-family: var(--font-display); font-size: 14px; }
.colhelp { padding: 0 4px 4px; font-size: 12px; line-height: 16px; display: block; }
.prep-card { cursor: default; }
.prep-card .cause { margin: 4px 0 0; padding: 6px 8px; border-radius: 8px; background: var(--surface-sunken); font-size: 12px; line-height: 17px; color: var(--ink); }
.prep-card .follow { display: inline-flex; align-items: center; gap: 5px; margin-top: 4px; font-size: 11.5px; color: var(--ink-muted); }
.prep-actions { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 8px; align-items: center; }
.parts { display: flex; flex-direction: column; gap: 6px; width: 100%; }
.part { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 6px 8px; border-radius: 8px; box-shadow: inset 0 0 0 1px var(--hairline); }
.part b { display: block; font-size: 12.5px; line-height: 17px; }
.part small { display: block; font-size: 11.5px; color: var(--ink-muted); }
.lieux { display: grid; grid-template-columns: 300px minmax(0, 1fr); gap: 12px; align-items: start; }
.lieu { display: flex; flex-direction: column; gap: 4px; align-items: flex-start; padding: 14px 16px; border: 0; text-align: left; cursor: pointer; color: var(--ink); }
.lieu b { font-family: var(--font-display); font-size: 17px; letter-spacing: -0.01em; }
.lieu span.muted { font-size: 12.5px; }
.lieu.on { box-shadow: 0 0 0 1.5px var(--flow), 0 0 0 5px var(--flow-glow); }
.refrow { display: flex; align-items: center; justify-content: space-between; gap: 8px; font-size: 13px; }
.refrow span { display: inline-flex; align-items: center; gap: 6px; color: var(--ink-muted); }
.refrow input { width: 72px; min-height: 32px; padding: 4px 8px; text-align: right; }
.gday { display: flex; flex-direction: column; }
.grow2 { display: grid; grid-template-columns: 132px 26px minmax(0, 1fr) auto; gap: 12px; align-items: center; padding: 10px 16px; border-top: 1px solid var(--hairline); }
.grow2 b { font-weight: 600; }
.grow2 small { display: block; color: var(--ink-muted); font-size: 12px; }
.grow2 .gtime { font-size: 12.5px; }
.grow2 .gwhat { display: flex; gap: 4px; flex-wrap: wrap; justify-content: flex-end; }
.grow2.miss { background: var(--danger-soft); }
.grow2.miss small { color: var(--danger); }
.uopt { display: flex; gap: 12px; align-items: flex-start; width: 100%; padding: 12px; border: 0; border-radius: var(--radius-md); background: transparent; box-shadow: inset 0 0 0 1px var(--hairline); text-align: left; cursor: pointer; color: var(--ink); }
.uopt .grow { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.uopt small { font-size: 12px; color: var(--ink-muted); }
.uopt .shift { color: var(--warning); }
.uopt .shift.drop { color: var(--danger); }
.uopt .shift.none { color: var(--success); }
.uopt.on { box-shadow: inset 0 0 0 1.5px var(--flow), 0 0 0 4px var(--flow-glow); background: var(--flow-soft); }
.uopt.no { opacity: .6; cursor: not-allowed; }

@media (max-width: 1280px) {
  .bons { grid-template-columns: 280px minmax(0, 1fr); }
  .bons > .col:last-child { grid-column: 1 / -1; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .editor { grid-template-columns: 220px minmax(0, 1fr); }
  .editor > :last-child { grid-column: 1 / -1; }
}
@media (max-width: 980px) {
  .app { grid-template-columns: minmax(0, 1fr); }
  .side { position: static; height: auto; flex-direction: row; flex-wrap: nowrap; overflow-x: auto; align-items: center; padding: 10px 16px; border-right: 0; border-bottom: 1px solid var(--hairline); gap: 2px; }
  .logo { padding: 0 12px 0 0; }
  .nav-group, .side-foot { display: none; }
  .nav { display: contents; }
  .nav a { flex: none; }
  .week, .req, .bons, .editor, .detail, .lieux { grid-template-columns: minmax(0, 1fr); }
  .grow2 { grid-template-columns: 110px 26px minmax(0, 1fr); }
  .grow2 .gwhat { grid-column: 1 / -1; justify-content: flex-start; }
  .bons > .col:last-child { grid-template-columns: minmax(0, 1fr); }
  .stat-row { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .top { flex-wrap: wrap; padding-left: 16px; }
  .view { padding-left: max(16px, env(safe-area-inset-left, 0px)); padding-right: max(16px, env(safe-area-inset-right, 0px)); }
  .mode-label { display: none; }
  .search { order: 3; flex: 1 1 100%; margin-left: 0; }
  .extract { grid-template-columns: 120px minmax(0, 1fr); }
  .extract .match { display: none !important; }
}
/* Editable records, journal, versions, quotes, keyboard move */
.btn-chip[aria-pressed="true"] { box-shadow: 0 0 0 1px var(--flow), var(--shadow-rest); color: var(--flow); }
.p-head h2 .count { margin-left: 6px; color: var(--ink-muted); font-weight: 500; }
.drawer.wide { width: min(620px, 100%); }
.form { display: flex; flex-direction: column; min-height: 100%; }
.drawer-foot { position: sticky; bottom: 0; margin-top: auto; display: flex; gap: 8px; align-items: center; flex-wrap: wrap; padding: 12px 20px calc(12px + env(safe-area-inset-bottom, 0px)); background: var(--surface-solid); border-top: 1px solid var(--hairline); z-index: 2; }
.drawer-foot .muted { font-size: 12px; margin-left: auto; text-align: right; }
.field small.hint, small.hint { font-size: 12px; line-height: 16px; color: var(--ink-muted); }
.field small.err, small.err { font-size: 12px; line-height: 16px; color: var(--danger); font-weight: 500; }
.field small.warn { font-size: 12px; line-height: 16px; color: var(--warning); font-weight: 500; }
.input[aria-invalid="true"] { box-shadow: inset 0 0 0 1.5px var(--danger); }
.input.num { text-align: right; font-family: var(--font-mono); }
.input.inline { width: auto; min-height: 30px; padding: 3px 8px; }
.link.danger { color: var(--danger); font-size: 12px; }
.grid3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.contact-edit { display: flex; flex-direction: column; gap: 8px; padding: 12px; border-radius: var(--radius-md); box-shadow: inset 0 0 0 1px var(--hairline); }
.contact-edit .link { align-self: flex-start; }
.sec-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.sw-line { display: inline-flex; align-items: center; gap: 10px; font-size: 13px; }
.slots-edit { display: grid; grid-template-columns: 44px repeat(5, minmax(0, 1fr)); gap: 3px; }
.slots-edit button { border: 0; cursor: pointer; font-family: var(--font-mono); font-size: 10.5px; color: var(--ink-muted); background: none; height: 22px; border-radius: 5px; padding: 0; }
.slots-edit .hd:hover { background: var(--surface-sunken); color: var(--ink); }
.slots-edit .cell { background: var(--surface-sunken); box-shadow: inset 0 0 0 1px var(--hairline); }
.slots-edit .cell[aria-pressed="true"] { background: var(--success); box-shadow: none; opacity: .8; }
.slots-edit .cell:hover { box-shadow: inset 0 0 0 1.5px var(--flow); }
.doc-edit { display: flex; align-items: center; gap: 8px; font-size: 13px; }
.doc-edit .grow { flex: 1; min-width: 0; }
.doc-edit button.tag { border: 0; cursor: pointer; }
.addline { display: flex; gap: 8px; align-items: center; }
.addline .input { flex: 1; }
.checks { display: flex; flex-wrap: wrap; gap: 6px 16px; }
.checks.col { flex-direction: column; flex-wrap: nowrap; }
.checks.scroll { max-height: 190px; overflow-y: auto; padding-right: 4px; }
.chk { display: inline-flex; align-items: center; gap: 8px; font-size: 13px; cursor: pointer; }
.chk input { width: 16px; height: 16px; accent-color: var(--flow); flex: none; }
.chk small { margin-left: auto; font-size: 11.5px; }
.calc { display: flex; align-items: center; gap: 14px; padding: 12px 14px; border-radius: var(--radius-md); background: var(--flow-soft); }
.calc.warn { background: var(--warning-soft); }
.calc .figure { font-family: var(--font-display); font-size: 26px; line-height: 30px; font-weight: 600; letter-spacing: -0.02em; white-space: nowrap; }
.calc b { display: block; font-size: 13px; }
.calc span { font-size: 12.5px; line-height: 17px; color: var(--ink-muted); }
.calc .figure.num { color: var(--ink); }
.drawer-sec.impact { background: var(--warning-soft); }
.qlines { display: grid; grid-template-columns: minmax(0, 1fr) 62px 92px 92px 28px; gap: 6px 8px; align-items: center; }
.qlines .hd { font-family: var(--font-mono); font-size: 10.5px; letter-spacing: .06em; text-transform: uppercase; color: var(--ink-muted); }
.qlines .r { text-align: right; }
.qlines .tot { text-align: right; font-size: 12.5px; color: var(--copper); white-space: nowrap; }
.totals { display: grid; grid-template-columns: 1fr auto; gap: 6px 16px; align-items: center; font-size: 13px; }
.totals b { text-align: right; color: var(--copper); }
.totals .big { font-family: var(--font-display); font-size: 18px; font-weight: 600; padding-top: 6px; border-top: 1px solid var(--hairline); }
.fixform { display: flex; flex-direction: column; gap: 12px; }
.log { display: flex; flex-direction: column; }
.log-item { display: grid; grid-template-columns: 14px minmax(0, 1fr); gap: 10px; padding: 9px 0; border-top: 1px solid var(--hairline); font-size: 13px; }
.log-item:first-child { border-top: 0; }
.log-dot { width: 8px; height: 8px; margin-top: 6px; border-radius: 50%; background: var(--flow); box-shadow: 0 0 0 3px var(--flow-soft); }
.log-item small { display: block; margin-top: 2px; font-size: 11.5px; color: var(--ink-muted); font-family: var(--font-mono); }
.log-change { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; margin-top: 3px; color: var(--ink-muted); }
.log-change .was, td.was { text-decoration: line-through; color: var(--ink-muted); }
.log-change .now { color: var(--ink); font-weight: 500; }
.tbl.journal td { vertical-align: top; }
.verbar { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.verbar .seg { flex-wrap: wrap; border-radius: 14px; }
.verbar .seg button { border-radius: 11px; }
.verold { display: flex; gap: 8px; align-items: flex-start; padding: 10px 12px; border-radius: var(--radius-md); background: var(--warning-soft); color: var(--warning); font-size: 13px; }
.paper-wrap.old .paper { opacity: .7; }
.subk.ver { border-left: 3px solid var(--mc); }
.partline { display: grid; grid-template-columns: minmax(0, 1fr) 56px 28px; gap: 6px; align-items: center; }
.kbbar { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; padding: 10px 14px; border-radius: var(--radius-lg); background: var(--flow-soft); box-shadow: inset 0 0 0 1.5px var(--flow); font-size: 13px; }
.kbbar.bad { background: var(--danger-soft); box-shadow: inset 0 0 0 1.5px var(--danger); }
.kbbar b, .kbbar span, .kbbar small { display: block; }
.kbbar small { margin-top: 3px; font-size: 12px; color: var(--ink-muted); }
kbd { display: inline-block; min-width: 20px; padding: 0 5px; margin-right: 2px; border-radius: 5px; background: var(--surface-solid); box-shadow: inset 0 0 0 1px var(--line); font-family: var(--font-mono); font-size: 11px; line-height: 18px; text-align: center; color: var(--ink); }
.ghost.kb { animation: none; border-style: solid; z-index: 3; }
.lane.hover .track, .lane.refuse .track { transition: background-color .15s; }
@media (max-width: 1699px) {
  /* Narrower screens: the queue stays on the left, the suggestion becomes a band above the technicians' days. */
  .dispatch { grid-template-columns: 290px minmax(0, 1fr); grid-template-areas: "q s" "q l" "q m"; grid-template-rows: auto auto 1fr; }
  .dispatch.nomap { grid-template-areas: "q s" "q l"; grid-template-rows: auto 1fr; }
  .d-sug .sug { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.15fr); column-gap: 24px; row-gap: 10px; align-items: start; }
  .d-sug .sug > .reasons { grid-column: 2; grid-row: 1 / span 3; margin: 0; }
  .d-sug .sug > .alts { grid-column: 2; grid-row: 4; }
  .d-sug .sug > .tools { grid-column: 1; grid-row: 4; align-self: end; }
  .d-sug .sug > p { grid-column: 1 / -1; }
}
@media (max-width: 980px) {
  .d-sug .sug { display: flex; align-items: stretch; }
  .d-sug .sug > .tools { align-self: auto; }
  .dispatch { grid-template-columns: minmax(0, 1fr); grid-template-areas: "s" "q" "l" "m"; }
  .dispatch.nomap { grid-template-areas: "s" "q" "l"; grid-template-rows: auto; }
  .grid3 { grid-template-columns: minmax(0, 1fr); }
  .qlines { grid-template-columns: minmax(0, 1fr) 52px 76px 28px; }
  .qlines .tot, .qlines .hd:nth-child(4) { display: none; }
}
.wfoot { margin-top: auto; display: flex; align-items: center; gap: 6px; padding-top: 2px; }
.wfoot small { font-size: 10.5px; color: var(--ink-muted); white-space: nowrap; font-family: var(--font-mono); }
.wload { flex: 1; height: 4px; border-radius: 4px; background: var(--surface-sunken); overflow: hidden; min-width: 20px; }
.wload i { display: block; height: 100%; border-radius: 4px; background: var(--flow); opacity: .7; }
.wload.over i { background: var(--danger); opacity: 1; }
.wadd { width: 20px; height: 20px; border: 0; border-radius: 6px; background: var(--flow-soft); color: var(--flow); font-weight: 700; line-height: 18px; cursor: pointer; padding: 0; flex: none; }
.wadd:hover { background: var(--flow); color: var(--on-flow); }
.wb.dim { opacity: .28; }
.kcol h3 .ksum { font-family: var(--font-mono); font-size: 11px; color: var(--ink-muted); font-weight: 500; }
.kpis.flat { border-radius: 0; box-shadow: none; border-top: 1px solid var(--hairline); border-bottom: 1px solid var(--hairline); }
.kpis.flat .kpi b { font-size: 20px; line-height: 26px; }
.dayfit { margin-left: 6px; font-family: var(--font-mono); font-size: 10.5px; opacity: .7; }
.dayfit.best { color: var(--success); opacity: 1; font-weight: 600; }
.dayfit.part { color: var(--warning); opacity: 1; }
.mdot { display: inline-block; width: 7px; height: 7px; margin-left: 6px; border-radius: 50%; background: var(--warning); vertical-align: middle; }
.numvars { display: flex; flex-direction: column; gap: 6px; }
.numvars span { display: flex; gap: 6px; flex-wrap: wrap; }
.numvars .filter[disabled] { opacity: .4; cursor: default; }
/* Productivity layer: grids, key figures, next actions, mail, palette */
.cu { color: var(--copper); }
.bad { color: var(--danger) !important; font-weight: 500; }
.good { color: var(--success) !important; }
.nowrap { white-space: nowrap; }
td.sm, .sm { font-size: 12px; }
.kpis { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 1px; border-radius: var(--radius-lg); overflow: hidden; background: var(--hairline); box-shadow: 0 0 0 1px var(--hairline), var(--shadow-rest); }
.kpi { display: flex; flex-direction: column; gap: 2px; padding: 14px 18px; background: var(--surface-raised); min-width: 0; }
.kpi b { font-family: var(--font-display); font-size: 24px; line-height: 30px; font-weight: 600; letter-spacing: -0.02em; white-space: nowrap; font-variant-numeric: tabular-nums; }
.kpi small { font-size: 12px; color: var(--ink-muted); }
.grid-panel { overflow: hidden; }
.grid-bar { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; padding: 12px 14px; border-bottom: 1px solid var(--hairline); }
.grid-bar .filter .n, .grp .n { margin-left: 6px; font-family: var(--font-mono); font-size: 11px; opacity: .7; }
.grid-tools { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.grid-search { display: flex; align-items: center; gap: 8px; height: 32px; padding: 0 6px 0 10px; border-radius: 999px; background: var(--surface-solid); box-shadow: inset 0 0 0 1px var(--line); }
.grid-search:focus-within { box-shadow: inset 0 0 0 1.5px var(--flow), 0 0 0 4px var(--flow-glow); }
.grid-search svg { width: 15px; height: 15px; color: var(--ink-muted); flex: none; }
.grid-search input { width: 150px; border: 0; outline: none; background: transparent; font-size: 13px; }
.grid-group { display: inline-flex; align-items: center; gap: 8px; font-size: 12px; color: var(--ink-muted); white-space: nowrap; }
.bulkbar { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; padding: 8px 14px; background: var(--flow-soft); border-bottom: 1px solid var(--hairline); font-size: 13px; }
.grid-wrap { outline: none; }
.grid-wrap:focus-visible { box-shadow: inset 0 0 0 2px var(--flow); }
.tbl.grid { width: 100%; border-collapse: collapse; }
.tbl.grid th { padding: 0; }
.tbl.grid th.ck, .tbl.grid td.ck { width: 36px; padding: 0 0 0 14px; }
.tbl.grid td.ck input, .tbl.grid th.ck input { width: 15px; height: 15px; accent-color: var(--flow); cursor: pointer; }
.tbl.grid .sort { display: flex; align-items: center; gap: 4px; width: 100%; padding: 10px 12px; border: 0; background: none; cursor: pointer; font: inherit; letter-spacing: inherit; text-transform: inherit; color: var(--ink-muted); white-space: nowrap; }
.tbl.grid th.r .sort { justify-content: flex-end; }
.tbl.grid .sort i { font-style: normal; opacity: .35; font-size: 11px; }
.tbl.grid .sort:hover, .tbl.grid .sort.on { color: var(--ink); }
.tbl.grid .sort.on i { opacity: 1; color: var(--flow); }
.tbl.grid td { white-space: nowrap; }
.tbl.grid td, .tbl.grid .sort { padding-left: 10px; padding-right: 10px; }
.tbl.grid td.main { max-width: 262px; }
.tbl.grid td.main small, .tbl.grid td.main b { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.grp-in .sum { white-space: nowrap; }
.tbl.grid td:first-child b, .tbl.grid td.ck + td b { white-space: normal; }
.tbl.grid tr.active { background: var(--flow-soft); box-shadow: inset 3px 0 0 var(--flow); }
.tbl.grid tr.picked { background: color-mix(in srgb, var(--flow-soft) 60%, transparent); }
.tbl.grid tr.grp { cursor: pointer; background: var(--surface-sunken); }
.tbl.grid tr.grp:hover { background: var(--surface-sunken); }
.tbl.grid tr.grp td { padding: 7px 14px; }
.grp-in { display: flex; align-items: center; gap: 8px; position: sticky; left: 14px; width: fit-content; max-width: calc(100vw - 320px); }
.grp-in b { font-family: var(--font-display); font-size: 13.5px; }
.grp-in .sum { margin-left: 12px; font-size: 12px; color: var(--ink-muted); font-family: var(--font-mono); }
.caret { font-style: normal; display: inline-block; transition: transform .15s; color: var(--ink-muted); }
.caret.off { transform: rotate(-90deg); }
.tbl.grid td.acts { width: 1%; padding-left: 0; }
.tbl.grid td.acts span { display: flex; gap: 2px; justify-content: flex-end; opacity: .35; transition: opacity .15s; }
.tbl.grid tr:hover td.acts span, .tbl.grid tr.active td.acts span, .tbl.grid td.acts span:focus-within { opacity: 1; }
.tbl.grid td.acts .iconbtn:hover { background: var(--flow-soft); color: var(--flow); }
.tbl.grid tfoot td { padding: 10px 12px; border-top: 1px solid var(--line); border-bottom: 0; font-weight: 600; font-size: 12.5px; background: var(--surface-sunken); white-space: nowrap; }
.grid-foot { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; padding: 8px 14px; border-top: 1px solid var(--hairline); font-size: 12px; color: var(--ink-muted); }
.tbl.grid td b.plain { font-weight: 500; white-space: nowrap; }
.ca-cell { display: inline-flex; align-items: center; gap: 10px; justify-content: flex-end; }
.spark-bars rect { fill: var(--flow); opacity: .55; }
.spark-bars rect.last { opacity: 1; }
.spark-bars rect.zero { fill: var(--line); opacity: 1; }
.todo-chip { display: inline-flex; align-items: center; gap: 6px; }
.todo-chip button.tag { border: 0; cursor: pointer; }
.todo-chip button.tag:hover { filter: brightness(.96); box-shadow: 0 0 0 1px currentColor; }
.todo-chip .more { font-family: var(--font-mono); font-size: 11px; color: var(--ink-muted); }
.prog { display: inline-flex; gap: 3px; vertical-align: middle; }
.prog i { width: 14px; height: 6px; border-radius: 3px; background: var(--surface-sunken); box-shadow: inset 0 0 0 1px var(--line); }
.prog i.on { background: var(--success); box-shadow: none; }
.contact-line { display: inline-flex; align-items: center; gap: 10px; flex-wrap: wrap; font-size: 13px; }
.contact-line a { color: var(--ink); text-decoration: none; font-size: 12.5px; }
.contact-line a:hover { color: var(--flow); }
.hero .actions .btn .k { margin-left: 2px; padding: 0 5px; border-radius: 4px; background: rgba(127, 127, 127, .18); line-height: 17px; }
.tiles { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
.tile { display: flex; flex-direction: column; gap: 8px; padding: 14px 16px; min-width: 0; }
.tile.bad { box-shadow: 0 0 0 1px var(--danger), var(--shadow-rest); }
.tile-main { display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; }
.tile-main b { font-family: var(--font-display); font-size: 28px; line-height: 32px; font-weight: 600; letter-spacing: -0.03em; font-variant-numeric: tabular-nums; white-space: nowrap; }
.delta { font-size: 12px; color: var(--ink-muted); }
.delta.up { color: var(--success); font-weight: 500; }
.delta.down { color: var(--danger); font-weight: 500; }
.tile .spark-bars { width: 100%; height: 44px; }
.axis { display: flex; justify-content: space-between; font-family: var(--font-mono); font-size: 10px; color: var(--ink-muted); margin-top: -4px; }
.split { display: flex; height: 8px; border-radius: 8px; overflow: hidden; background: var(--surface-sunken); }
.split i { display: block; height: 100%; }
.split i.ok { background: var(--flow); opacity: .6; }
.split i.late { background: var(--danger); }
.tile-foot { margin-top: auto; display: flex; align-items: center; justify-content: space-between; gap: 8px; font-size: 12.5px; color: var(--ink-muted); min-height: 32px; }
.row.todo .dotx { width: 8px; height: 8px; border-radius: 50%; flex: none; background: currentColor; }
.dotx.t-late, .dotx.t-blocked { color: var(--danger); } .dotx.t-window, .dotx.t-attention { color: var(--warning); } .dotx.t-plan, .dotx.t-info { color: var(--flow); }
.fill-row { display: flex; align-items: center; gap: 10px; padding: 9px 10px; border-radius: var(--radius-md); box-shadow: inset 0 0 0 1px var(--hairline); cursor: pointer; }
.fill-row.off { opacity: .5; }
.fill-row input { width: 16px; height: 16px; accent-color: var(--flow); flex: none; }
.fill-row .grow { flex: 1; min-width: 0; }
.fill-row b { display: block; font-size: 13px; }
.fill-row small { display: block; font-size: 12px; color: var(--ink-muted); }
.kcol h3 .relance { margin-left: auto; height: 26px; padding: 0 10px; font-size: 12px; }
.tbl.grid td.acts { padding-right: 12px; }
.drawer-sec.exist { background: var(--flow-soft); }
.plan-site { display: flex; gap: 8px; align-items: center; font-size: 13px; }
.slot-opt { display: flex; align-items: center; gap: 12px; width: 100%; padding: 10px 12px; border: 0; border-radius: var(--radius-md); background: transparent; box-shadow: inset 0 0 0 1px var(--hairline); cursor: pointer; text-align: left; color: var(--ink); transition: box-shadow .15s, background-color .15s; }
.slot-opt .grow { flex: 1; min-width: 0; }
.slot-opt b { display: block; font-size: 13.5px; }
.slot-opt small { display: block; font-size: 12px; color: var(--ink-muted); }
.slot-opt .go { font-weight: 600; font-size: 13px; color: var(--flow); white-space: nowrap; }
.slot-opt:hover, .slot-opt:focus-visible { background: var(--flow-soft); box-shadow: inset 0 0 0 1.5px var(--flow); }
.slot-opt.best { box-shadow: inset 0 0 0 1.5px var(--flow), 0 0 0 4px var(--flow-glow); }
.sec-head .seg button { padding: 0 9px; }
.mailbody { min-height: 260px !important; line-height: 20px !important; font-size: 13.5px !important; }
.mail-ai { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; }
.mail-ai .src { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; color: var(--ink-muted); }
.mail-ai .src.ia { color: var(--flow); font-weight: 500; }
.attach { display: flex; gap: 6px; flex-wrap: wrap; }
.attach .tag { display: inline-flex; align-items: center; gap: 5px; }
.drawer-sec.facts { background: var(--surface-sunken); gap: 3px; }
.drawer-sec.facts small { font-size: 12px; color: var(--ink-muted); }
.results button.child { padding-left: 34px; }
.results button.child .label { color: var(--flow); }
.results button[aria-selected="true"] { background: var(--flow-soft); }
.res-foot { display: flex; justify-content: space-between; align-items: center; gap: 8px; padding: 8px 10px 4px; border-top: 1px solid var(--hairline); margin-top: 4px; font-size: 12px; color: var(--ink-muted); }
.help { position: fixed; z-index: 45; left: 50%; top: 10vh; transform: translateX(-50%); width: min(860px, calc(100% - 32px)); max-height: 80vh; overflow: auto; border-radius: var(--radius-lg); background: var(--surface-solid); box-shadow: 0 30px 80px -20px rgba(0, 0, 0, .5), 0 0 0 1px var(--hairline); }
.help-cols { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px 24px; padding: 4px 16px 18px; }
.help-cols .label { display: block; margin: 10px 0 4px; }
.help-cols p { margin: 4px 0; font-size: 13px; }
@media (max-width: 1280px) { .tiles, .kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 720px) { .tiles, .kpis, .help-cols { grid-template-columns: minmax(0, 1fr); } .grid-search input { width: 110px; } .grid-foot span:last-child { display: none; } }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; transition: none !important; } }
