/* P15 Marketing — encre marine, orange P15, et les trois couleurs du drapeau
   réservées aux états : vert = réussi, jaune = en attente, rouge = échec. */
@font-face { font-family: Inter; font-weight: 400; src: url(/fonts/Inter-Regular.ttf); font-display: swap; }
@font-face { font-family: Inter; font-weight: 500; src: url(/fonts/Inter-Medium.ttf); font-display: swap; }
@font-face { font-family: Inter; font-weight: 600; src: url(/fonts/Inter-SemiBold.ttf); font-display: swap; }
@font-face { font-family: Inter; font-weight: 700; src: url(/fonts/Inter-Bold.ttf); font-display: swap; }
@font-face { font-family: Inter; font-weight: 800; src: url(/fonts/Inter-ExtraBold.ttf); font-display: swap; }

:root {
  --ink: #0e1a33; --ink-2: #1c2b4b; --paper: #f2f4f8; --surface: #fff; --line: #e1e6ee; --line-2: #eef1f6;
  --text: #131c2e; --muted: #5b667d; --orange: #f97316; --orange-ink: #b4480a; --orange-soft: #fff1e6;
  --green: #0f8a4b; --green-soft: #e3f6ea; --yellow: #8a6500; --yellow-soft: #fff4cc; --red: #c5332b; --red-soft: #fde8e6;
  --fb: #2f6fed; --ig: #d6336c; --tt: #0fa39a; --yt: #e8590c; --li: #6a4ce2;
  --r-s: 7px; --r-m: 12px; --r-l: 18px; --ease: cubic-bezier(.2,.8,.2,1);
  --shadow: 0 1px 2px rgba(14,26,51,.06), 0 8px 24px -12px rgba(14,26,51,.18);
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; font: 15px/1.5 Inter, system-ui, "Segoe UI", sans-serif; color: var(--text); background: var(--paper); display: grid; grid-template-columns: 232px 1fr; min-height: 100vh; -webkit-font-smoothing: antialiased; }
h1 { font-size: 30px; line-height: 1.1; font-weight: 800; letter-spacing: -.03em; margin: 0; }
h2 { font-size: 17px; font-weight: 700; letter-spacing: -.01em; margin: 0; }
h3 { font-size: 15px; font-weight: 600; margin: 0; }
p { margin: 0; } a { color: var(--orange-ink); }
.muted { color: var(--muted); } .small { font-size: 13px; } .num { font-variant-numeric: tabular-nums; }
svg { fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.skip { position: absolute; left: -999px; } .skip:focus { left: 12px; top: 12px; z-index: 50; background: #fff; padding: 8px 12px; border-radius: var(--r-s); }
:focus-visible { outline: 2px solid var(--orange); outline-offset: 2px; border-radius: 4px; }
[hidden] { display: none !important; }

/* ---------- Rail ---------- */
.rail { background: var(--ink); color: #c9d2e3; padding: 20px 14px 0; display: flex; flex-direction: column; gap: 18px; position: sticky; top: 0; height: 100vh; overflow: hidden; }
.rail-brand { display: flex; align-items: center; gap: 9px; text-decoration: none; color: #fff; font-weight: 600; padding: 0 6px; }
.rail-brand img { height: 30px; } .rail-brand b { font-size: 26px; font-weight: 800; color: var(--orange); letter-spacing: -.04em; }
.rail-new { justify-content: center; }
.rail nav { display: grid; gap: 2px; }
.rail nav a { display: flex; align-items: center; gap: 11px; padding: 9px 10px; border-radius: var(--r-s); color: #c9d2e3; text-decoration: none; font-weight: 500; transition: background .15s, color .15s; }
.rail nav a svg { width: 18px; height: 18px; flex: none; }
.rail nav a:hover { background: rgba(255,255,255,.07); color: #fff; }
.rail nav a.active { background: #fff; color: var(--ink); font-weight: 600; }
.count { margin-left: auto; background: var(--orange); color: #fff; font-size: 12px; font-weight: 700; padding: 0 7px; border-radius: 99px; line-height: 19px; }
.rail-nets { margin-top: auto; display: grid; gap: 7px; padding: 14px 10px; border-top: 1px solid rgba(255,255,255,.1); font-size: 13px; }
.rail-nets div { display: flex; justify-content: space-between; gap: 8px; } .rail-nets em { font-style: normal; color: #8f9bb4; } .rail-nets em.live { color: #6fdc9f; }
.flag { display: grid; grid-template-columns: repeat(3, 1fr); height: 4px; margin: 0 -14px; }
.flag i:nth-child(1) { background: #12a150; } .flag i:nth-child(2) { background: #f5c400; } .flag i:nth-child(3) { background: #d93a32; }

/* ---------- Page ---------- */
main { padding: 34px 40px 60px; max-width: 1280px; width: 100%; outline: none; }
.head { display: flex; justify-content: space-between; align-items: flex-end; gap: 20px; margin-bottom: 26px; flex-wrap: wrap; }
.head p { margin-top: 8px; color: var(--muted); max-width: 62ch; }
.section { margin-top: 34px; } .section > h2 { margin-bottom: 12px; }
.row { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; } .spread { justify-content: space-between; }
.panel { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-m); }
.panel.pad { padding: 20px; }
.cols-2 { display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr); gap: 20px; align-items: start; }
.note { display: flex; gap: 10px; align-items: flex-start; padding: 11px 14px; border-radius: var(--r-s); background: var(--yellow-soft); color: #5c4400; font-size: 14px; }
.note.info { background: #e8effd; color: #1d3f8f; } .note.bad { background: var(--red-soft); color: #7d1d17; }
.empty { padding: 34px 20px; text-align: center; color: var(--muted); } .empty .btn { margin-top: 12px; }

.btn { font: inherit; font-weight: 600; display: inline-flex; align-items: center; gap: 7px; border: 1px solid var(--line); background: var(--surface); color: var(--text); padding: 8px 14px; border-radius: var(--r-s); cursor: pointer; text-decoration: none; transition: transform .12s var(--ease), background .15s, border-color .15s, box-shadow .15s; }
.btn svg { width: 16px; height: 16px; }
.btn:hover { border-color: #b9c2d3; } .btn:active { transform: scale(.97); }
.btn:disabled { opacity: .45; cursor: not-allowed; }
.btn.primary { background: var(--orange); border-color: var(--orange); color: #fff; box-shadow: 0 6px 16px -8px var(--orange); }
.btn.primary:hover { background: #ea660c; }
.btn.dark { background: var(--ink); border-color: var(--ink); color: #fff; } .btn.dark:hover { background: var(--ink-2); }
.btn.ghost { border-color: transparent; background: transparent; } .btn.ghost:hover { background: var(--line-2); }
.btn.danger { color: var(--red); } .btn.sm { padding: 5px 10px; font-size: 13px; }

.pill { display: inline-flex; align-items: center; gap: 5px; padding: 2px 9px; border-radius: 99px; font-size: 12.5px; font-weight: 600; background: var(--line-2); color: #3b465c; white-space: nowrap; }
.pill::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.pill.ok { background: var(--green-soft); color: var(--green); } .pill.wait { background: var(--yellow-soft); color: var(--yellow); }
.pill.bad { background: var(--red-soft); color: var(--red); } .pill.info { background: #e8effd; color: #1d3f8f; }
.pill.sim { background: transparent; border: 1px dashed #b08a1e; color: var(--yellow); } .pill.sim::before, .pill.plain::before { display: none; }
.dots { display: inline-flex; gap: 4px; align-items: center; }
.dot { width: 9px; height: 9px; border-radius: 50%; display: inline-block; flex: none; }
.dot.facebook { background: var(--fb); } .dot.instagram { background: var(--ig); } .dot.tiktok { background: var(--tt); } .dot.youtube { background: var(--yt); } .dot.linkedin { background: var(--li); }

label, .label { display: block; font-weight: 600; font-size: 13px; margin: 0 0 6px; }
input[type=text], input[type=password], input[type=number], input[type=datetime-local], input[type=search], select, textarea { width: 100%; font: inherit; color: inherit; padding: 9px 11px; border: 1px solid #cfd6e2; border-radius: var(--r-s); background: #fff; transition: border-color .15s, box-shadow .15s; }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--orange); box-shadow: 0 0 0 3px rgba(249,115,22,.18); }
textarea { min-height: 150px; resize: vertical; line-height: 1.45; }
.field { margin-top: 18px; } .hint { font-size: 12.5px; color: var(--muted); margin-top: 5px; }
.two { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.seg { display: inline-flex; background: var(--line-2); border-radius: var(--r-s); padding: 3px; gap: 2px; }
.seg button { font: inherit; font-weight: 600; font-size: 13.5px; border: 0; background: transparent; color: var(--muted); padding: 5px 12px; border-radius: 5px; cursor: pointer; }
.seg button[aria-pressed=true] { background: #fff; color: var(--text); box-shadow: 0 1px 2px rgba(14,26,51,.15); }
.chip { font: inherit; font-size: 13px; font-weight: 500; border: 1px solid var(--line); background: #fff; color: var(--text); padding: 4px 10px; border-radius: 99px; cursor: pointer; display: inline-flex; gap: 6px; align-items: center; }
.chip:hover { border-color: #b9c2d3; } .chip[aria-pressed=true] { background: var(--ink); border-color: var(--ink); color: #fff; }
.chip b { font-weight: 700; opacity: .6; }

/* ---------- Listes de posts ---------- */
.list { display: grid; }
.item { display: grid; grid-template-columns: 64px minmax(0, 1fr) auto; gap: 16px; align-items: center; padding: 14px 18px; border-bottom: 1px solid var(--line-2); text-decoration: none; color: inherit; transition: background .15s; }
.item:last-child { border-bottom: 0; } a.item:hover, .item.link:hover { background: #f8f9fc; }
.thumb { width: 64px; height: 64px; border-radius: 9px; background: var(--line-2); overflow: hidden; display: grid; place-items: center; color: var(--muted); font-size: 11px; text-align: center; flex: none; }
.thumb video, .thumb img { width: 100%; height: 100%; object-fit: cover; }
.item-text { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; overflow-wrap: anywhere; font-weight: 500; }
.item-meta { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; margin-top: 5px; font-size: 13px; color: var(--muted); }
.item-err { color: var(--red); font-size: 13px; margin-top: 3px; }

/* ---------- Semaine ---------- */
.week { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); }
.day { padding: 12px 10px 14px; border-right: 1px solid var(--line-2); min-height: 150px; display: flex; flex-direction: column; gap: 6px; }
.day:last-child { border-right: 0; } .day.today { background: var(--orange-soft); }
.day-name { font-size: 12.5px; color: var(--muted); font-weight: 600; } .day-num { font-size: 20px; font-weight: 800; letter-spacing: -.02em; line-height: 1; }
.slot { display: block; text-decoration: none; color: inherit; background: #fff; border: 1px solid var(--line); border-left: 3px solid var(--ink); border-radius: 6px; padding: 5px 7px; font-size: 12.5px; line-height: 1.3; }
.slot:hover { border-color: #b9c2d3; border-left-color: var(--orange); } .slot.done { border-left-color: var(--green); } .slot.wait { border-left-color: #f5c400; } .slot.fail { border-left-color: var(--red); }
.slot span { display: block; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.day-add { margin-top: auto; align-self: flex-start; color: var(--muted); text-decoration: none; font-size: 12.5px; opacity: 0; transition: opacity .15s; } .day:hover .day-add, .day-add:focus { opacity: 1; }

/* ---------- Composer ---------- */
.composer { display: grid; grid-template-columns: minmax(0, 1fr) 380px; gap: 28px; align-items: start; }
.composer-form { padding: 24px; } .composer-form > .field:first-child { margin-top: 0; }
.nets { display: flex; gap: 8px; flex-wrap: wrap; }
.net { font: inherit; font-weight: 600; display: inline-flex; align-items: center; gap: 8px; padding: 8px 13px; border: 1px solid var(--line); border-radius: var(--r-s); background: #fff; cursor: pointer; color: var(--muted); transition: all .15s; }
.net[aria-pressed=true] { border-color: var(--ink); color: var(--text); box-shadow: inset 0 0 0 1px var(--ink); } .net[aria-pressed=false] .dot { opacity: .35; }
.media-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 8px; max-height: 208px; overflow: auto; padding: 2px; }
.media { font: inherit; text-align: left; border: 1px solid var(--line); background: #fff; border-radius: var(--r-s); padding: 8px 10px; cursor: pointer; display: grid; gap: 2px; }
.media:hover { border-color: #b9c2d3; } .media[aria-pressed=true] { border-color: var(--orange); box-shadow: inset 0 0 0 1px var(--orange); background: var(--orange-soft); }
.media strong { font-size: 13px; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; } .media span { font-size: 12px; color: var(--muted); }
.actions { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; padding: 18px 24px; border-top: 1px solid var(--line); background: #fafbfd; border-radius: 0 0 var(--r-m) var(--r-m); }
.actions .when { display: flex; gap: 8px; align-items: center; margin-right: auto; } .actions input { width: 196px; }
.counter { float: right; font-size: 12.5px; color: var(--muted); font-weight: 500; } .counter.over { color: var(--red); font-weight: 700; }

.preview { position: sticky; top: 24px; display: grid; gap: 14px; justify-items: center; }
.preview-tabs { display: flex; gap: 6px; flex-wrap: wrap; justify-content: center; }
.ptab { font: inherit; font-size: 13px; font-weight: 600; border: 1px solid var(--line); background: #fff; padding: 6px 11px; border-radius: 99px; cursor: pointer; display: inline-flex; align-items: center; gap: 7px; color: var(--muted); }
.ptab[aria-selected=true] { background: var(--ink); border-color: var(--ink); color: #fff; }
.ptab i { font-style: normal; font-weight: 800; } .ptab i.warn { color: #ff8f86; } .ptab[aria-selected=false] i.warn { color: var(--red); }
.checks { width: 100%; display: grid; gap: 6px; font-size: 13.5px; }
.check { display: flex; gap: 8px; align-items: flex-start; } .check b { flex: none; width: 18px; text-align: center; }
.check.bad { color: var(--red); font-weight: 600; } .check.advice { color: #5c4400; } .check.ok { color: var(--green); }

/* Le téléphone d'aperçu : une maquette neutre, pas une copie des applications. */
.phone { width: 292px; height: 584px; border-radius: 40px; background: #0b0f18; padding: 9px; box-shadow: 0 30px 60px -30px rgba(14,26,51,.55), 0 0 0 1px rgba(14,26,51,.2); }
.screen { width: 100%; height: 100%; border-radius: 32px; overflow: hidden; background: #fff; position: relative; display: flex; flex-direction: column; font-size: 13px; line-height: 1.38; color: #111; animation: swap .32s var(--ease); }
@keyframes swap { from { opacity: 0; transform: translateY(8px) scale(.985); } }
.screen.dark { background: #000; color: #fff; }
.pv-bar { display: flex; justify-content: space-between; align-items: center; padding: 12px 16px 8px; font-weight: 700; font-size: 15px; flex: none; }
.pv-bar small { font-weight: 500; font-size: 11.5px; opacity: .6; }
.pv-scroll { overflow: auto; flex: 1; scrollbar-width: none; } .pv-scroll::-webkit-scrollbar { display: none; }
.pv-head { display: flex; gap: 9px; align-items: center; padding: 10px 12px; }
.pv-avatar { width: 34px; height: 34px; border-radius: 50%; background: #fff url(/brand/logo-p15.png) center/72% no-repeat; border: 1px solid #e3e3e3; flex: none; }
.pv-name { font-weight: 700; } .pv-sub { font-size: 11.5px; opacity: .6; }
.pv-text { padding: 0 12px 10px; white-space: pre-wrap; overflow-wrap: anywhere; }
.pv-text .hl { color: #1c5fd6; } .dark .pv-text .hl { color: #fff; font-weight: 700; }
.pv-more { font: inherit; border: 0; background: none; padding: 0; color: inherit; opacity: .6; cursor: pointer; font-weight: 600; }
.pv-media { background: #0b0f18; display: grid; place-items: center; } .pv-media img, .pv-media video { width: 100%; display: block; }
.pv-media.square img, .pv-media.square video { aspect-ratio: 1; object-fit: cover; }
.pv-actions { display: flex; justify-content: space-around; padding: 9px 8px; border-top: 1px solid #ececec; color: #555; font-weight: 600; font-size: 12.5px; }
.pv-actions span, .pv-icons span { display: inline-flex; align-items: center; gap: 5px; } .pv-actions svg, .pv-icons svg { width: 19px; height: 19px; }
.pv-icons { display: flex; gap: 14px; padding: 9px 12px 6px; } .pv-icons .end { margin-left: auto; }
.pv-full { position: absolute; inset: 0; } .pv-full video, .pv-full img { width: 100%; height: 100%; object-fit: cover; }
.pv-shade { position: absolute; inset: auto 0 0 0; height: 55%; background: linear-gradient(transparent, rgba(0,0,0,.78)); pointer-events: none; }
.pv-top { position: absolute; top: 0; left: 0; right: 0; padding: 14px 16px; display: flex; justify-content: space-between; font-weight: 700; font-size: 15px; text-shadow: 0 1px 6px rgba(0,0,0,.5); }
.pv-side { position: absolute; right: 8px; bottom: 92px; display: grid; gap: 16px; justify-items: center; font-size: 11px; font-weight: 600; text-shadow: 0 1px 4px rgba(0,0,0,.6); }
.pv-side svg { width: 27px; height: 27px; display: block; filter: drop-shadow(0 1px 3px rgba(0,0,0,.5)); }
.pv-bottom { position: absolute; left: 0; right: 56px; bottom: 0; padding: 14px; text-shadow: 0 1px 4px rgba(0,0,0,.6); }
.pv-bottom .pv-text { padding: 0; margin-top: 6px; max-height: 210px; overflow: auto; scrollbar-width: none; }
.pv-follow { font-size: 11.5px; font-weight: 700; padding: 3px 10px; border-radius: 99px; border: 1px solid rgba(255,255,255,.85); margin-left: 4px; }
.pv-follow.fill { background: #fff; color: #000; border-color: #fff; }
.pv-sound { display: flex; gap: 6px; align-items: center; margin-top: 8px; font-size: 12px; } .pv-sound svg { width: 14px; height: 14px; }
.pv-none { position: absolute; inset: 0; display: grid; place-items: center; text-align: center; padding: 30px; color: #c9cfdb; background: #141a26; font-weight: 600; }
.pv-none.light { position: static; background: #f1f3f7; color: var(--muted); aspect-ratio: 1; }
.pv-title { font-weight: 700; font-size: 14px; margin-top: 8px; }

/* ---------- Statistiques ---------- */
.kpis { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); }
.kpis.four { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.kpi { padding: 20px 20px 18px; border-right: 1px solid var(--line-2); min-width: 0; } .kpi:last-child { border-right: 0; }
.kpi-label { font-size: 13px; color: var(--muted); font-weight: 600; }
.kpi-value { font-size: 34px; font-weight: 800; letter-spacing: -.035em; line-height: 1.15; margin-top: 6px; }
.kpi-value small { font-size: 17px; font-weight: 700; letter-spacing: 0; margin-left: 2px; color: var(--muted); }
.kpi-sub { font-size: 12.5px; color: var(--muted); margin-top: 6px; min-height: 1.5em; }
.delta { font-weight: 700; white-space: nowrap; } .delta.up { color: var(--green); } .delta.down { color: var(--red); }
.chart-head { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; flex-wrap: wrap; margin-bottom: 4px; }
.legend { display: flex; gap: 14px; flex-wrap: wrap; font-size: 13px; color: var(--muted); } .legend span { display: inline-flex; gap: 6px; align-items: center; }
.chart { position: relative; } .chart svg { display: block; width: 100%; height: auto; overflow: visible; stroke-width: 1; }
.chart text { fill: var(--muted); stroke: none; font-size: 11.5px; font-family: inherit; font-variant-numeric: tabular-nums; }
.chart .grid { stroke: var(--line-2); } .chart .axis { stroke: var(--line); }
.chart .line { stroke-width: 2; stroke-dasharray: 1; stroke-dashoffset: 1; animation: draw 1.1s var(--ease) forwards; }
@keyframes draw { to { stroke-dashoffset: 0; } }
.chart .bar { stroke: none; transform-box: fill-box; transform-origin: bottom; animation: grow .7s var(--ease) backwards; }
@keyframes grow { from { transform: scaleY(0); } }
.chart .cross { stroke: #9aa5b8; stroke-dasharray: 3 3; } .chart .pt { stroke: #fff; stroke-width: 2; }
.tip { position: absolute; pointer-events: none; background: var(--ink); color: #fff; border-radius: 8px; padding: 8px 10px; font-size: 12.5px; line-height: 1.5; white-space: nowrap; z-index: 3; transform: translate(-50%, -100%); margin-top: -10px; box-shadow: var(--shadow); }
.tip b { display: block; font-weight: 600; opacity: .7; } .tip span { display: flex; justify-content: space-between; gap: 14px; } .tip i { display: inline-flex; align-items: center; gap: 6px; font-style: normal; }
table { width: 100%; border-collapse: collapse; } th, td { text-align: left; padding: 11px 14px; border-bottom: 1px solid var(--line-2); vertical-align: middle; }
tr:last-child td { border-bottom: 0; } th { font-size: 12.5px; color: var(--muted); font-weight: 600; white-space: nowrap; } td.num, th.num { text-align: right; }
.spark { width: 84px; height: 26px; display: block; } .spark path { stroke-width: 1.8; }
.net-name { display: inline-flex; gap: 8px; align-items: center; font-weight: 600; }
.insight { display: flex; gap: 12px; align-items: center; padding: 14px 18px; background: var(--ink); color: #fff; border-radius: var(--r-m); } .insight strong { color: #ffb37a; }
details.table-view summary { cursor: pointer; font-size: 13px; color: var(--muted); font-weight: 600; margin-top: 8px; } details.table-view[open] summary { margin-bottom: 8px; }

.listing { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 16px; }
.ad { overflow: hidden; } .ad img, .ad .noimg { width: 100%; aspect-ratio: 4/3; object-fit: cover; background: var(--line-2); display: grid; place-items: center; color: var(--muted); font-size: 13px; }
.ad-body { padding: 12px 14px 14px; display: grid; gap: 4px; } .ad-price { font-weight: 800; font-size: 17px; letter-spacing: -.02em; }
.steps { margin: 8px 0 0; padding-left: 20px; display: grid; gap: 5px; font-size: 14px; }
code { background: var(--line-2); padding: 1px 6px; border-radius: 5px; font-size: 13px; font-family: ui-monospace, Consolas, monospace; }
pre { background: var(--ink); color: #dfe6f3; padding: 14px; border-radius: var(--r-s); overflow-x: auto; font-size: 13px; margin: 8px 0 0; }
details.set { border-bottom: 1px solid var(--line-2); } details.set:last-child { border-bottom: 0; }
details.set summary { display: flex; align-items: center; gap: 12px; padding: 15px 18px; cursor: pointer; list-style: none; font-weight: 600; } details.set summary::-webkit-details-marker { display: none; }
details.set summary .pill { margin-left: auto; } details.set > div { padding: 0 18px 18px 39px; }

.modal { position: fixed; inset: 0; background: rgba(14,26,51,.5); backdrop-filter: blur(3px); display: grid; place-items: center; padding: 20px; z-index: 20; animation: fade .18s; }
.modal-box { background: #fff; border-radius: var(--r-l); padding: 26px; width: min(560px, 100%); max-height: 92vh; overflow: auto; box-shadow: var(--shadow); animation: pop .26s var(--ease); }
.modal-box h2 { font-size: 21px; font-weight: 800; letter-spacing: -.02em; margin-bottom: 12px; }
.modal-actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 22px; }
@keyframes fade { from { opacity: 0; } } @keyframes pop { from { opacity: 0; transform: translateY(10px) scale(.97); } }
.toast { position: fixed; bottom: 24px; left: 50%; translate: -50% 0; background: var(--ink); color: #fff; padding: 11px 18px; border-radius: 10px; z-index: 30; max-width: 90vw; font-weight: 500; box-shadow: var(--shadow); animation: pop .26s var(--ease); }
.toast.bad { background: var(--red); }
.skel { background: linear-gradient(90deg, var(--line-2), #f8f9fc, var(--line-2)); background-size: 200% 100%; animation: shimmer 1.2s linear infinite; border-radius: var(--r-m); }
@keyframes shimmer { to { background-position: -200% 0; } }
::view-transition-old(root) { animation: fade .14s reverse both; } ::view-transition-new(root) { animation: fade .2s both; }

@media (max-width: 1180px) { .kpis:not(.four) { grid-template-columns: repeat(3, 1fr); } .kpi:nth-child(3) { border-right: 0; } .kpi:nth-child(-n+3) { border-bottom: 1px solid var(--line-2); } .composer { grid-template-columns: 1fr; } .preview { position: static; } .cols-2 { grid-template-columns: 1fr; } }
@media (max-width: 860px) {
  body { grid-template-columns: 1fr; } .rail { position: static; height: auto; flex-direction: row; flex-wrap: wrap; align-items: center; padding: 10px 12px 0; gap: 10px; }
  .rail nav { display: flex; overflow-x: auto; width: 100%; order: 3; } .rail nav a { white-space: nowrap; } .rail-new { margin-left: auto; } .rail-nets { display: none; } .flag { width: calc(100% + 24px); margin: 0 -12px; order: 4; }
  main { padding: 22px 16px 50px; } h1 { font-size: 25px; } .week { grid-template-columns: 1fr; } .day { min-height: 0; border-right: 0; border-bottom: 1px solid var(--line-2); flex-direction: row; flex-wrap: wrap; align-items: center; } .day-add { opacity: 1; margin: 0 0 0 auto; }
  .kpis, .kpis.four { grid-template-columns: repeat(2, 1fr); } .kpi { border-right: 0; border-bottom: 1px solid var(--line-2); } .kpi:nth-child(odd) { border-right: 1px solid var(--line-2); }
  .item { grid-template-columns: 48px minmax(0, 1fr); } .item > :last-child { grid-column: 2; } .thumb { width: 48px; height: 48px; } .two { grid-template-columns: 1fr; } .actions .when { width: 100%; }
  .table-scroll { overflow-x: auto; }
}
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation-duration: .001s !important; transition-duration: .001s !important; } .chart .line { stroke-dashoffset: 0; } html { scroll-behavior: auto; } }
