/* ===== Série récurrente — page d'édition (2 colonnes live) =====
   Port fidèle du design Claude « Série Récurrente - Édition ».
   Le shell du design (.k-app/.k-side/.k-main) est remplacé par le DashboardLayout :
   tout vit dans .rs-root, en flux normal (la page scrolle avec la fenêtre).
   Tokens : recurring-edit-tokens.css (scopé .rs-root, suit html[data-theme]). */

/* Overrides d'éléments par thème clair (repris du design) */
html[data-theme="light"] .rs-root .rs-bg .blob { opacity: 0.07; }
html[data-theme="light"] .rs-root .rs-time .num { background: linear-gradient(135deg,#5B8DEF,#B968C7,#E94E8B); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; }
html[data-theme="light"] .rs-root .rs-cd.go { color: #B4276A; }
html[data-theme="light"] .rs-root .rs-cd.go.next { color: #fff; }
html[data-theme="light"] .rs-root .rs-cd.go.past { color: var(--fg-muted); }
html[data-theme="light"] .rs-root .rs-recap .next .cnt { color: #D6337A; }
html[data-theme="light"] .rs-root .rs-occ-top .meta .s.soon { color: #C2185B; }
html[data-theme="light"] .rs-root .rs-hint.warn b { color: #92400E; }

/* ===== Root (flux DashboardLayout) ===== */
.rs-root { position: relative; min-height: 100%; display: flex; flex-direction: column; }
.rs-root *, .rs-root *::before, .rs-root *::after { box-sizing: border-box; }

/* Backdrop */
.rs-bg { position: absolute; inset: 0; pointer-events: none; overflow: hidden; z-index: 0; }
.rs-bg .blob { position: absolute; border-radius: 50%; }
.rs-bg .b1 { width: 520px; height: 520px; background: radial-gradient(circle, #5B8DEF 0%, transparent 70%); top: -180px; left: 240px; opacity: 0.13; }
.rs-bg .b2 { width: 560px; height: 560px; background: radial-gradient(circle, #E94E8B 0%, transparent 70%); bottom: -280px; right: 120px; opacity: 0.11; }
.rs-bg .b3 { width: 380px; height: 380px; background: radial-gradient(circle, #B968C7 0%, transparent 70%); top: 300px; right: 480px; opacity: 0.09; }

/* ===== Header ===== */
.rs-topbar { position: relative; z-index: 2; padding: 20px 40px 14px; display: flex; align-items: flex-start; gap: 20px; border-bottom: 1px solid var(--border-soft); }
.rs-burger { display: none; width: 38px; height: 38px; flex: 0 0 auto; align-items: center; justify-content: center; border-radius: 11px; background: var(--bg-elev-1); border: 1px solid var(--border); color: var(--fg-secondary); cursor: pointer; margin-top: 2px; }
.rs-burger svg { width: 18px; height: 18px; stroke: currentColor; stroke-width: 2; fill: none; }
.rs-tb-left { flex: 1 1 auto; min-width: 0; }
.rs-crumb { display: flex; align-items: center; gap: 7px; font-size: 12px; color: var(--fg-muted); font-weight: 600; margin-bottom: 7px; }
.rs-crumb svg { width: 13px; height: 13px; stroke-width: 2; fill: none; }
.rs-crumb .sep { opacity: 0.5; }
.rs-crumb .cur { color: var(--fg-secondary); }
.rs-title-row { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.rs-title { margin: 0; font-family: var(--font-display); font-weight: 800; font-size: 26px; letter-spacing: -0.02em; line-height: 1.05; color: var(--fg); }
.rs-status { display: inline-flex; align-items: center; gap: 8px; padding: 5px 12px 5px 10px; border-radius: 9999px; font-size: 12.5px; font-weight: 700; border: 1px solid transparent; }
.rs-status .dot { width: 7px; height: 7px; border-radius: 50%; }
.rs-status.active { background: rgba(16,185,129,0.12); border-color: rgba(16,185,129,0.32); color: #34D399; }
.rs-status.active .dot { background: #34D399; box-shadow: 0 0 0 0 rgba(52,211,153,0.6); animation: rsPulse 2s ease-out infinite; }
@keyframes rsPulse { 0% { box-shadow: 0 0 0 0 rgba(52,211,153,0.55); } 70% { box-shadow: 0 0 0 7px rgba(52,211,153,0); } 100% { box-shadow: 0 0 0 0 rgba(52,211,153,0); } }
.rs-status.paused { background: rgba(245,158,11,0.12); border-color: rgba(245,158,11,0.32); color: var(--rs-tx-amber); }
.rs-status.paused .dot { background: var(--rs-tx-amber); }
.rs-tb-meta { display: flex; align-items: center; gap: 16px; margin-top: 9px; font-size: 12.5px; color: var(--fg-muted); flex-wrap: wrap; }
.rs-tb-meta .m { display: inline-flex; align-items: center; gap: 6px; }
.rs-tb-meta .m svg { width: 13px; height: 13px; stroke-width: 2; fill: none; }
.rs-tb-meta .m b { color: var(--fg-secondary); font-weight: 700; }

/* Header actions */
.rs-actions { display: flex; align-items: center; gap: 8px; flex: 0 0 auto; flex-wrap: wrap; justify-content: flex-end; }
.rs-act { display: inline-flex; align-items: center; gap: 7px; height: 38px; padding: 0 14px; border-radius: 11px; background: var(--bg-elev-1); border: 1px solid var(--border); color: var(--fg); font-size: 13px; font-weight: 600; cursor: pointer; transition: background var(--t-fast), border-color var(--t-fast), transform var(--t-fast); }
.rs-act:hover { background: var(--bg-elev-2); border-color: rgba(185,104,199,0.30); }
.rs-act:active { transform: scale(0.97); }
.rs-act svg { width: 15px; height: 15px; stroke-width: 2; fill: none; }
.rs-act.icon-only { width: 38px; padding: 0; justify-content: center; }
.rs-act.pause { border-color: rgba(245,158,11,0.30); color: var(--rs-tx-amber); }
.rs-act.pause:hover { background: rgba(245,158,11,0.08); }
.rs-act.resume { background: var(--k-gradient-h); border-color: transparent; color: #fff; box-shadow: 0 6px 16px rgba(233,78,139,0.28); }
.rs-act.danger:hover { border-color: rgba(239,68,68,0.4); color: #F87171; background: rgba(239,68,68,0.06); }
.rs-act.deploy { border-color: rgba(91,141,239,0.32); color: var(--rs-tx-blue); }
.rs-act.deploy:hover { background: rgba(91,141,239,0.08); }

/* ===== Stage (flux normal) ===== */
.rs-stage { position: relative; z-index: 1; padding: 20px 40px 28px; }
.rs-grid { display: grid; grid-template-columns: minmax(0,1fr) 404px; gap: 28px; align-items: start; max-width: 1240px; margin: 0 auto; }

/* Inner labels + dividers */
.rs-mlbl { font-size: 11px; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: var(--fg-muted); margin: 0 2px 9px; }
.rs-mlbl.mt { margin-top: 18px; }
.rs-hr { height: 1px; background: var(--border-soft); margin: 16px 0; }

/* Section label + card */
.rs-seclbl { font-size: 11px; font-weight: 700; letter-spacing: 0.09em; text-transform: uppercase; color: var(--fg-muted); margin: 0 2px 10px; display: flex; align-items: center; gap: 8px; }
.rs-seclbl .hint { margin-left: auto; text-transform: none; letter-spacing: 0; font-weight: 500; color: var(--fg-muted); font-size: 11.5px; }
.rs-card { background: var(--bg-elev-1); border: 1px solid var(--border-soft); border-radius: 18px; padding: 18px; margin-bottom: 16px; }
.rs-card + .rs-seclbl { margin-top: 22px; }

/* ===== How it works ===== */
.rs-how { position: relative; border-radius: 18px; padding: 2px; margin-bottom: 22px; background: linear-gradient(var(--bg-elev-1),var(--bg-elev-1)) padding-box, linear-gradient(120deg, rgba(91,141,239,0.35), rgba(185,104,199,0.28), rgba(233,78,139,0.35)) border-box; border: 1.5px solid transparent; }
.rs-how .inner { background: var(--bg-elev-1); border-radius: 16px; padding: 16px 18px; }
.rs-how-head { display: flex; align-items: center; gap: 10px; cursor: pointer; }
.rs-how-head .tag { font-size: 10.5px; font-weight: 800; letter-spacing: 0.04em; text-transform: uppercase; padding: 3px 9px; border-radius: 9999px; background: rgba(185,104,199,0.18); color: var(--rs-tx-violet); }
.rs-how-head .t { font-size: 14px; font-weight: 700; color: var(--fg); }
.rs-how-head .chev { margin-left: auto; color: var(--fg-muted); transition: transform var(--t-base); }
.rs-how-head .chev svg { width: 18px; height: 18px; stroke-width: 2; fill: none; }
.rs-how.collapsed .chev { transform: rotate(-90deg); }
.rs-how-body { margin-top: 14px; }
.rs-how.collapsed .rs-how-body { display: none; }
.rs-flow { display: grid; grid-template-columns: 1fr auto 1fr auto 1fr; align-items: stretch; gap: 4px; }
.rs-flow .node { display: flex; flex-direction: column; gap: 6px; padding: 12px 12px; border-radius: 13px; background: var(--rs-t2); border: 1px solid var(--border-soft); text-align: center; }
.rs-flow .node .ic { width: 34px; height: 34px; border-radius: 10px; margin: 0 auto; display: flex; align-items: center; justify-content: center; background: var(--rs-t4); }
.rs-flow .node .ic svg { width: 18px; height: 18px; stroke-width: 1.9; fill: none; }
.rs-flow .node .lbl { font-size: 12.5px; font-weight: 700; color: var(--fg); }
.rs-flow .node .sub { font-size: 11px; color: var(--fg-muted); line-height: 1.35; }
.rs-flow .node.a .ic { background: rgba(91,141,239,0.16); } .rs-flow .node.a .ic svg { stroke: #8FB4F5; }
.rs-flow .node.b .ic { background: rgba(185,104,199,0.16); } .rs-flow .node.b .ic svg { stroke: #C98FD6; }
.rs-flow .node.c .ic { background: rgba(233,78,139,0.16); } .rs-flow .node.c .ic svg { stroke: #F08CB4; }
.rs-flow .arrow { display: flex; align-items: center; justify-content: center; color: var(--fg-muted); }
.rs-flow .arrow svg { width: 18px; height: 18px; stroke-width: 2; fill: none; }
.rs-how-note { margin-top: 12px; font-size: 12.5px; color: var(--fg-secondary); line-height: 1.5; padding: 10px 12px; border-radius: 11px; background: rgba(91,141,239,0.06); border: 1px solid rgba(91,141,239,0.18); }
.rs-how-note b { color: var(--fg); font-weight: 700; }

/* ===== Template source ===== */
.rs-tpl { display: flex; align-items: center; gap: 14px; }
.rs-tpl .thumb { width: 62px; height: 62px; border-radius: 14px; flex: 0 0 auto; overflow: hidden; position: relative; background: var(--rs-cover); border: 1px solid var(--border-soft); }
.rs-tpl .thumb .ph { position: absolute; inset: 0; background-image: repeating-linear-gradient(135deg, var(--rs-t4) 0 8px, transparent 8px 16px); }
.rs-tpl .thumb img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.rs-tpl .thumb .glyph { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; font-size: 26px; }
.rs-tpl .info { flex: 1 1 auto; min-width: 0; }
.rs-tpl .info .k { font-size: 10.5px; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; color: var(--fg-muted); }
.rs-tpl .info .n { font-size: 16px; font-weight: 700; color: var(--fg); margin-top: 2px; }
.rs-tpl .info .d { font-size: 12px; color: var(--fg-secondary); margin-top: 2px; }
.rs-tpl .change { flex: 0 0 auto; }

/* ===== Text input ===== */
.rs-field { display: block; }
.rs-input { width: 100%; height: 46px; padding: 0 14px; border-radius: 12px; background: var(--bg-elev-2); border: 1px solid var(--border); color: var(--fg); font-size: 15px; font-weight: 500; outline: none; transition: border-color var(--t-fast), box-shadow var(--t-fast); }
.rs-input:focus { border-color: rgba(185,104,199,0.5); box-shadow: 0 0 0 3px rgba(185,104,199,0.12); }
.rs-input::placeholder { color: var(--fg-muted); }
.rs-fieldnote { font-size: 12px; color: var(--fg-muted); margin-top: 8px; }

/* ===== Frequency cards ===== */
.rs-freqs { display: grid; grid-template-columns: repeat(3,1fr); gap: 9px; }
.rs-freq { display: flex; flex-direction: column; align-items: flex-start; gap: 8px; padding: 13px 13px 14px; border-radius: 14px; background: var(--bg-elev-2); border: 1px solid var(--border-soft); color: var(--fg); cursor: pointer; text-align: left; position: relative; transition: transform var(--t-fast) var(--ease-out), background var(--t-fast), border-color var(--t-fast), box-shadow var(--t-fast); }
.rs-freq:hover { background: var(--bg-elev-1); border-color: rgba(185,104,199,0.30); transform: translateY(-1px); }
.rs-freq .ic { width: 38px; height: 38px; border-radius: 11px; background: var(--rs-t4); display: flex; align-items: center; justify-content: center; }
.rs-freq .ic svg { width: 19px; height: 19px; stroke: var(--fg-secondary); stroke-width: 1.9; fill: none; }
.rs-freq .ttl { font-size: 13.5px; font-weight: 700; letter-spacing: -0.01em; line-height: 1.15; }
.rs-freq .desc { font-size: 11px; color: var(--fg-muted); line-height: 1.3; }
.rs-freq.is-on { background: linear-gradient(var(--bg-elev-1),var(--bg-elev-1)) padding-box, linear-gradient(135deg, #5B8DEF, #B968C7, #E94E8B) border-box; border: 1.5px solid transparent; box-shadow: 0 0 0 4px rgba(185,104,199,0.08), 0 8px 20px rgba(185,104,199,0.16); }
.rs-freq.is-on .ic { background: rgba(185,104,199,0.20); } .rs-freq.is-on .ic svg { stroke: url(#k-grad-stroke); }
.rs-freq .check { position: absolute; top: 11px; right: 11px; width: 18px; height: 18px; border-radius: 9999px; background: var(--k-gradient-h); display: none; align-items: center; justify-content: center; }
.rs-freq .check svg { width: 11px; height: 11px; stroke: #fff; stroke-width: 3.4; fill: none; }
.rs-freq.is-on .check { display: flex; }

/* ===== Day picker ===== */
.rs-days { display: grid; grid-template-columns: repeat(7,1fr); gap: 7px; }
.rs-day { height: 48px; border-radius: 12px; background: var(--bg-elev-2); border: 1px solid var(--border-soft); color: var(--fg-secondary); font-size: 14px; font-weight: 700; cursor: pointer; display: flex; align-items: center; justify-content: center; transition: all var(--t-fast) var(--ease-out); }
.rs-day:hover { background: var(--bg-elev-1); color: var(--fg); border-color: rgba(185,104,199,0.30); }
.rs-day.is-on { background: var(--k-gradient-h); color: #fff; border-color: transparent; box-shadow: 0 6px 16px rgba(233,78,139,0.28); }

/* Day of month */
.rs-dom-grid { display: grid; grid-template-columns: repeat(7,1fr); gap: 6px; }
.rs-dom { aspect-ratio: 1/1; border-radius: 10px; background: var(--bg-elev-2); border: 1px solid var(--border-soft); color: var(--fg-secondary); font-size: 13px; font-weight: 600; cursor: pointer; display: flex; align-items: center; justify-content: center; font-variant-numeric: tabular-nums; transition: all var(--t-fast) var(--ease-out); }
.rs-dom:hover { background: var(--bg-elev-1); color: var(--fg); border-color: rgba(185,104,199,0.30); }
.rs-dom.is-on { background: var(--k-gradient-h); color: #fff; border-color: transparent; }
.rs-dom-note { margin-top: 10px; font-size: 12px; color: var(--fg-muted); }
.rs-dom-note b { color: var(--fg-secondary); font-weight: 600; }
.rs-dom-note.warn { color: var(--rs-tx-amber); }

/* ===== Time + inline row layout ===== */
.rs-row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.rs-time { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.rs-time .stepper { display: flex; align-items: center; gap: 8px; padding: 8px 10px; border-radius: 14px; background: var(--bg-elev-2); border: 1px solid var(--border-soft); }
.rs-time .num { font-family: var(--font-display); font-weight: 900; font-size: 34px; line-height: 1; letter-spacing: -0.03em; font-variant-numeric: tabular-nums; min-width: 48px; text-align: center; background: linear-gradient(135deg,#fff,#C0BFFF 70%,#E94E8B 120%); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; cursor: text; user-select: none; }
.rs-time .num-input { width: 48px; background: transparent; border: 0; outline: 0; text-align: center; font-family: var(--font-display); font-weight: 900; font-size: 34px; letter-spacing: -0.03em; color: var(--fg); -moz-appearance: textfield; }
.rs-time .num-input::-webkit-outer-spin-button, .rs-time .num-input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.rs-time .sep { font-family: var(--font-display); font-weight: 900; font-size: 28px; color: var(--fg-muted); }
.rs-time .btns { display: flex; flex-direction: column; gap: 4px; }
.rs-time .btns button { width: 26px; height: 22px; border-radius: 7px; background: var(--bg-elev-1); border: 1px solid var(--border); color: var(--fg); cursor: pointer; display: flex; align-items: center; justify-content: center; transition: background var(--t-fast), transform var(--t-fast); }
.rs-time .btns button:hover { background: var(--bg-elev-2); border-color: rgba(185,104,199,0.4); }
.rs-time .btns button:active { transform: scale(0.9); }
.rs-time .btns button svg { width: 13px; height: 13px; stroke: currentColor; stroke-width: 2.6; fill: none; }
.rs-timechips { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 12px; }
.rs-timechips .chip { height: 30px; padding: 0 12px; border-radius: 9999px; background: transparent; border: 1px solid var(--border); color: var(--fg-secondary); font-size: 12.5px; font-weight: 600; cursor: pointer; font-variant-numeric: tabular-nums; transition: all var(--t-fast) var(--ease-out); }
.rs-timechips .chip:hover { background: var(--rs-t3); color: var(--fg); }
.rs-timechips .chip.is-on { background: var(--k-gradient-h); color: #fff; border-color: transparent; }

/* ===== Segmented (mode / end) ===== */
.rs-seg { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.rs-seg-opt { display: flex; align-items: flex-start; gap: 11px; padding: 13px 13px; border-radius: 14px; background: var(--bg-elev-2); border: 1px solid var(--border-soft); color: var(--fg); cursor: pointer; text-align: left; transition: all var(--t-fast) var(--ease-out); position: relative; }
.rs-seg-opt:hover { background: var(--bg-elev-1); border-color: rgba(185,104,199,0.30); }
.rs-seg-opt .ic { width: 32px; height: 32px; border-radius: 9px; flex: 0 0 auto; background: var(--rs-t4); display: flex; align-items: center; justify-content: center; }
.rs-seg-opt .ic svg { width: 17px; height: 17px; stroke: var(--fg-secondary); stroke-width: 1.9; fill: none; }
.rs-seg-opt .ttl { font-size: 13.5px; font-weight: 700; }
.rs-seg-opt .desc { font-size: 11px; color: var(--fg-muted); margin-top: 2px; line-height: 1.3; }
.rs-seg-opt.is-on { background: linear-gradient(var(--bg-elev-1),var(--bg-elev-1)) padding-box, linear-gradient(135deg, #5B8DEF, #B968C7, #E94E8B) border-box; border: 1.5px solid transparent; box-shadow: 0 0 0 4px rgba(185,104,199,0.08); }
.rs-seg-opt.is-on .ic { background: rgba(185,104,199,0.20); } .rs-seg-opt.is-on .ic svg { stroke: url(#k-grad-stroke); }

/* Lead grid */
.rs-leads { display: grid; grid-template-columns: repeat(5,1fr); gap: 8px; }
.rs-lead { height: 60px; border-radius: 13px; background: var(--bg-elev-2); border: 1px solid var(--border-soft); color: var(--fg); cursor: pointer; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; transition: all var(--t-fast) var(--ease-out); }
.rs-lead:hover { background: var(--bg-elev-1); border-color: rgba(185,104,199,0.30); transform: translateY(-1px); }
.rs-lead .big { font-family: var(--font-display); font-weight: 900; font-size: 20px; line-height: 1; background: linear-gradient(120deg,#8FB4F5,#C98FD6,#F08CB4); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; }
.rs-lead .small { font-size: 10px; color: var(--fg-muted); font-weight: 600; }
.rs-lead.is-on { background: var(--k-gradient-h); border-color: transparent; box-shadow: 0 6px 16px rgba(233,78,139,0.28); }
.rs-lead.is-on .big { background: none; -webkit-text-fill-color: #fff; }
.rs-lead.is-on .small { color: rgba(255,255,255,0.9); }
.rs-lead-explain { display: flex; align-items: flex-start; gap: 10px; margin-top: 12px; padding: 11px 13px; border-radius: 12px; background: rgba(91,141,239,0.07); border: 1px solid rgba(91,141,239,0.20); font-size: 12.5px; color: var(--fg-secondary); line-height: 1.45; }
.rs-lead-explain svg { width: 15px; height: 15px; stroke: var(--k-blue); stroke-width: 2; fill: none; flex: 0 0 auto; margin-top: 1px; }
.rs-lead-explain b { color: var(--fg); font-weight: 700; }

/* End of series */
.rs-end-date { display: none; }
.rs-end-date.show { display: block; }

/* ===== RIGHT: visualization column (sticky) ===== */
.rs-viz { position: sticky; top: 16px; align-self: start; display: flex; flex-direction: column; gap: 14px; max-height: calc(100vh - 32px); overflow-y: auto; padding: 2px; margin: -2px; scrollbar-width: thin; }
.rs-viz::-webkit-scrollbar { width: 6px; }
.rs-viz::-webkit-scrollbar-thumb { background: var(--border); border-radius: 3px; }

/* Recap banner */
.rs-recap { border-radius: 20px; padding: 2px; flex: 0 0 auto; background: linear-gradient(var(--bg-elev-1),var(--bg-elev-1)) padding-box, linear-gradient(135deg, #5B8DEF, #B968C7, #E94E8B) border-box; border: 2px solid transparent; box-shadow: 0 0 0 4px rgba(185,104,199,0.07), 0 14px 40px rgba(185,104,199,0.14), 0 0 60px rgba(233,78,139,0.08); }
.rs-recap .inner { background: var(--bg-elev-1); border-radius: 18px; padding: 16px 17px 15px; position: relative; overflow: hidden; }
.rs-recap .inner::before { content: ''; position: absolute; inset: -30% -10% auto; height: 140px; background: radial-gradient(50% 100% at 25% 0, rgba(91,141,239,0.16), transparent 70%), radial-gradient(50% 100% at 85% 0, rgba(233,78,139,0.16), transparent 70%); pointer-events: none; }
.rs-recap .rule { position: relative; font-family: var(--font-display); font-weight: 800; font-size: 21px; line-height: 1.15; letter-spacing: -0.015em; color: var(--fg); }
.rs-recap .rule .accent { background: linear-gradient(100deg,#8FB4F5,#C98FD6,#F08CB4); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; }
.rs-recap .next { position: relative; margin-top: 13px; padding: 12px 13px; border-radius: 14px; background: var(--rs-t3); border: 1px solid var(--border-soft); display: flex; align-items: center; gap: 12px; }
.rs-recap .next .cd { width: 46px; height: 46px; border-radius: 12px; flex: 0 0 auto; background: var(--k-gradient); display: flex; flex-direction: column; align-items: center; justify-content: center; color: #fff; line-height: 1; }
.rs-recap .next .cd .d { font-family: var(--font-display); font-weight: 900; font-size: 19px; }
.rs-recap .next .cd .mo { font-size: 9.5px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.06em; margin-top: 2px; }
.rs-recap .next .info { flex: 1 1 auto; min-width: 0; }
.rs-recap .next .info .k { font-size: 10px; font-weight: 700; letter-spacing: 0.07em; text-transform: uppercase; color: var(--fg-muted); }
.rs-recap .next .info .v { font-size: 14.5px; font-weight: 700; color: var(--fg); margin-top: 1px; }
.rs-recap .next .cnt { font-family: var(--font-display); font-weight: 900; font-size: 15px; color: #F08CB4; white-space: nowrap; }
.rs-recap .stats { position: relative; margin-top: 12px; display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.rs-recap .stat { padding: 9px 11px; border-radius: 12px; background: var(--rs-t2); border: 1px solid var(--border-soft); }
.rs-recap .stat .n { font-family: var(--font-display); font-weight: 900; font-size: 20px; letter-spacing: -0.02em; }
.rs-recap .stat .l { font-size: 11px; color: var(--fg-muted); font-weight: 600; margin-top: 1px; }

/* Health hint */
.rs-hint { display: flex; align-items: flex-start; gap: 10px; padding: 11px 13px; border-radius: 13px; font-size: 12.5px; line-height: 1.45; flex: 0 0 auto; }
.rs-hint svg { width: 16px; height: 16px; stroke-width: 2; fill: none; flex: 0 0 auto; margin-top: 1px; }
.rs-hint b { font-weight: 700; }
.rs-hint.info { background: rgba(185,104,199,0.08); border: 1px solid rgba(185,104,199,0.22); color: var(--fg-secondary); } .rs-hint.info svg { stroke: var(--k-violet); } .rs-hint.info b { color: var(--fg); }
.rs-hint.warn { background: rgba(245,158,11,0.09); border: 1px solid rgba(245,158,11,0.30); color: var(--rs-tx-amber); } .rs-hint.warn svg { stroke: currentColor; } .rs-hint.warn b { color: #FDE68A; }

/* Tabbed viz panel */
.rs-vpanel { border-radius: 18px; background: var(--bg-elev-1); border: 1px solid var(--border-soft); overflow: hidden; flex: 0 0 auto; }
.rs-tabs { display: flex; gap: 2px; padding: 6px; background: var(--rs-tabbg); border-bottom: 1px solid var(--border-soft); }
.rs-tab { flex: 1 1 0; height: 34px; border-radius: 10px; border: 0; background: transparent; color: var(--fg-muted); font-size: 12px; font-weight: 700; cursor: pointer; display: flex; align-items: center; justify-content: center; gap: 6px; transition: all var(--t-fast); }
.rs-tab svg { width: 14px; height: 14px; stroke-width: 2; fill: none; }
.rs-tab:hover { color: var(--fg-secondary); }
.rs-tab.is-on { background: var(--bg-elev-2); color: var(--fg); box-shadow: 0 2px 8px rgba(0,0,0,0.3); }
.rs-tabpane { padding: 15px 16px 16px; }
.rs-tabpane[hidden] { display: none; }

/* Calendar */
.rs-calnav { display: flex; align-items: center; gap: 6px; margin-bottom: 10px; }
.rs-calnav .m { flex: 1 1 auto; text-align: center; font-size: 13.5px; font-weight: 700; color: var(--fg); text-transform: capitalize; }
.rs-calnav button { width: 28px; height: 28px; border-radius: 9999px; background: transparent; border: 1px solid var(--border-soft); color: var(--fg-secondary); cursor: pointer; display: flex; align-items: center; justify-content: center; }
.rs-calnav button:hover { color: var(--fg); background: var(--rs-t3); }
.rs-calnav button svg { width: 13px; height: 13px; stroke-width: 2; fill: none; }
.rs-dow { display: grid; grid-template-columns: repeat(7,1fr); gap: 4px; margin-bottom: 5px; }
.rs-dow span { text-align: center; font-size: 9.5px; font-weight: 700; color: var(--fg-muted); text-transform: uppercase; }
.rs-cgrid { display: grid; grid-template-columns: repeat(7,1fr); gap: 4px; }
.rs-cd { aspect-ratio: 1/1; display: flex; align-items: center; justify-content: center; font-size: 12.5px; font-weight: 600; color: var(--fg-secondary); border-radius: 10px; font-variant-numeric: tabular-nums; position: relative; }
.rs-cd.out { opacity: 0.22; }
.rs-cd.today { box-shadow: inset 0 0 0 1.5px var(--border); color: var(--fg); }
.rs-cd.prep { color: var(--fg); }
.rs-cd.prep::after { content: ''; position: absolute; bottom: 4px; left: 50%; transform: translateX(-50%); width: 5px; height: 5px; border-radius: 50%; background: var(--k-blue); box-shadow: 0 0 0 2px rgba(91,141,239,0.18); }
.rs-cd.go { background: rgba(233,78,139,0.16); color: #fff; font-weight: 800; border: 1px solid rgba(233,78,139,0.4); }
.rs-cd.go.past { background: var(--rs-t4); color: var(--fg-muted); border-color: var(--border-soft); }
.rs-cd.go.next { background: var(--k-gradient-h); color: #fff; border-color: transparent; box-shadow: 0 4px 14px rgba(233,78,139,0.4), 0 0 0 2px rgba(233,78,139,0.25); }
.rs-cd.go.excluded { background: transparent; color: var(--fg-muted); border: 1px dashed var(--border); text-decoration: line-through; text-decoration-color: var(--k-pink); }
.rs-cd.go .tick { position: absolute; top: -3px; right: -3px; width: 13px; height: 13px; border-radius: 9999px; background: #34D399; border: 2px solid var(--bg-elev-1); display: none; }
.rs-cd.go.past .tick { display: block; }
.rs-cd.endmark { box-shadow: inset 0 0 0 1.5px var(--k-violet); color: var(--rs-tx-violet); }
.rs-cd.endmark::before { content: ''; position: absolute; top: 3px; right: 3px; width: 6px; height: 6px; border-radius: 2px; background: var(--k-violet); }
.rs-callegend { margin-top: 13px; display: grid; grid-template-columns: 1fr 1fr; gap: 6px 10px; padding-top: 12px; border-top: 1px dashed var(--border-soft); }
.rs-callegend .lg { display: flex; align-items: center; gap: 8px; font-size: 11px; color: var(--fg-secondary); }
.rs-callegend .sw { width: 16px; height: 16px; border-radius: 6px; flex: 0 0 auto; position: relative; }
.rs-callegend .sw.go { background: var(--k-gradient-h); }
.rs-callegend .sw.next { background: var(--k-gradient-h); box-shadow: 0 0 0 2px rgba(233,78,139,0.25); }
.rs-callegend .sw.past { background: var(--rs-t5); border: 1px solid var(--border-soft); }
.rs-callegend .sw.prep { background: transparent; border: 1px solid var(--border-soft); } .rs-callegend .sw.prep::after { content: ''; position: absolute; inset: 0; margin: auto; width: 5px; height: 5px; border-radius: 50%; background: var(--k-blue); }
.rs-callegend .sw.excl { background: transparent; border: 1px dashed var(--border); } .rs-callegend .sw.excl::after { content: ''; position: absolute; inset: 0; margin: auto; width: 11px; height: 1.5px; background: var(--k-pink); }
.rs-callegend .sw.end { box-shadow: inset 0 0 0 1.5px var(--k-violet); }

/* Agenda */
.rs-agenda { display: flex; flex-direction: column; gap: 9px; }
.rs-occ { border-radius: 14px; background: var(--rs-t2); border: 1px solid var(--border-soft); padding: 12px 13px; }
.rs-occ.next { background: linear-gradient(var(--bg-elev-1),var(--bg-elev-1)) padding-box, linear-gradient(135deg, rgba(91,141,239,0.4), rgba(233,78,139,0.4)) border-box; border: 1.5px solid transparent; box-shadow: 0 6px 18px rgba(185,104,199,0.12); }
.rs-occ.excluded { opacity: 0.6; }
.rs-occ-top { display: flex; align-items: center; gap: 11px; }
.rs-occ-top .cd { width: 40px; height: 40px; border-radius: 11px; flex: 0 0 auto; display: flex; flex-direction: column; align-items: center; justify-content: center; line-height: 1; background: var(--rs-t4); border: 1px solid var(--border-soft); }
.rs-occ.next .cd { background: var(--k-gradient); border-color: transparent; color: #fff; }
.rs-occ-top .cd .d { font-family: var(--font-display); font-weight: 900; font-size: 16px; }
.rs-occ-top .cd .mo { font-size: 8.5px; font-weight: 700; text-transform: uppercase; margin-top: 2px; color: var(--fg-muted); }
.rs-occ.next .cd .mo { color: rgba(255,255,255,0.85); }
.rs-occ-top .meta { flex: 1 1 auto; min-width: 0; }
.rs-occ-top .meta .d { font-size: 13.5px; font-weight: 700; color: var(--fg); }
.rs-occ-top .meta .s { font-size: 11.5px; color: var(--fg-muted); margin-top: 1px; }
.rs-occ-top .meta .s.soon { color: #F08CB4; font-weight: 700; }
.rs-badge { flex: 0 0 auto; font-size: 10px; font-weight: 700; padding: 3px 8px; border-radius: 9999px; }
.rs-badge.auto { background: rgba(185,104,199,0.16); color: var(--rs-tx-violet); border: 1px solid rgba(185,104,199,0.3); }
.rs-badge.valid { background: rgba(91,141,239,0.16); color: var(--rs-tx-blue); border: 1px solid rgba(91,141,239,0.3); }
.rs-badge.draft { background: rgba(245,158,11,0.14); color: var(--rs-tx-amber); border: 1px solid rgba(245,158,11,0.32); }
.rs-badge.skip { background: var(--rs-t4); color: var(--fg-muted); border: 1px solid var(--border-soft); }
.rs-frise { display: grid; grid-template-columns: 1fr 1fr 1fr; margin-top: 11px; position: relative; }
.rs-frise::before { content: ''; position: absolute; top: 9px; left: 8%; right: 8%; height: 2px; background: linear-gradient(90deg, var(--k-blue), var(--k-pink)); opacity: 0.35; }
.rs-frise .fp { display: flex; flex-direction: column; align-items: center; gap: 4px; position: relative; z-index: 1; }
.rs-frise .fp .dot { width: 11px; height: 11px; border-radius: 50%; background: var(--bg-elev-2); border: 2px solid var(--k-blue); }
.rs-frise .fp.go .dot { border-color: var(--k-pink); background: var(--k-pink); }
.rs-frise .fp.end .dot { border-color: var(--k-violet); }
.rs-frise .fp .fl { font-size: 9px; font-weight: 700; letter-spacing: 0.04em; text-transform: uppercase; color: var(--fg-muted); }
.rs-frise .fp .fv { font-size: 10.5px; font-weight: 600; color: var(--fg-secondary); text-align: center; line-height: 1.2; }
.rs-frise .fp.go .fv { color: var(--fg); }
.rs-occ-actions { display: flex; gap: 7px; margin-top: 11px; padding-top: 11px; border-top: 1px dashed var(--border-soft); }
.rs-mini { flex: 1 1 0; height: 32px; border-radius: 9px; background: var(--bg-elev-2); border: 1px solid var(--border-soft); color: var(--fg-secondary); font-size: 11.5px; font-weight: 600; cursor: pointer; display: inline-flex; align-items: center; justify-content: center; gap: 6px; transition: all var(--t-fast); }
.rs-mini svg { width: 13px; height: 13px; stroke-width: 2; fill: none; }
.rs-mini:hover { background: var(--bg-elev-1); color: var(--fg); border-color: rgba(185,104,199,0.3); }
.rs-mini.primary { background: rgba(245,158,11,0.12); border-color: rgba(245,158,11,0.32); color: var(--rs-tx-amber); }
.rs-mini.primary:hover { background: rgba(245,158,11,0.18); }
.rs-mini.undo { color: var(--k-blue); }

/* Aperçu carte Rali */
.rs-ralicard { border-radius: 16px; overflow: hidden; background: var(--bg-elev-2); border: 1px solid var(--border-soft); }
.rs-ralicard .cover { height: 118px; position: relative; background: var(--rs-cover); overflow: hidden; }
.rs-ralicard .cover .ph { position: absolute; inset: 0; background-image: repeating-linear-gradient(135deg, var(--rs-t4) 0 10px, transparent 10px 20px); }
.rs-ralicard .cover img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.rs-ralicard .cover .glyph { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; font-size: 40px; }
.rs-ralicard .cover .vis { position: absolute; top: 10px; right: 10px; display: inline-flex; align-items: center; gap: 5px; padding: 4px 9px; border-radius: 9999px; background: rgba(10,10,10,0.6); backdrop-filter: blur(6px); font-size: 10.5px; font-weight: 700; color: #fff; }
.rs-ralicard .cover .vis svg { width: 11px; height: 11px; stroke-width: 2.2; fill: none; }
.rs-ralicard .cover .live { position: absolute; bottom: 10px; left: 10px; display: inline-flex; align-items: center; gap: 6px; padding: 4px 10px; border-radius: 9999px; background: var(--k-gradient-h); font-size: 10.5px; font-weight: 800; color: #fff; letter-spacing: 0.02em; }
.rs-ralicard .body { padding: 13px 14px 14px; }
.rs-ralicard .t { font-family: var(--font-display); font-weight: 800; font-size: 16px; letter-spacing: -0.01em; color: var(--fg); }
.rs-ralicard .prize { display: flex; align-items: center; gap: 8px; margin-top: 7px; padding: 8px 10px; border-radius: 10px; background: rgba(234,179,8,0.10); border: 1px solid rgba(234,179,8,0.28); }
.rs-ralicard .prize svg { width: 15px; height: 15px; stroke: var(--k-yellow); stroke-width: 2; fill: none; }
.rs-ralicard .prize .l { font-size: 10px; font-weight: 700; letter-spacing: 0.05em; text-transform: uppercase; color: var(--fg-muted); }
.rs-ralicard .prize .v { font-size: 13px; font-weight: 700; color: var(--fg); }
.rs-ralicard .rows { margin-top: 11px; display: flex; flex-direction: column; gap: 8px; }
.rs-ralicard .r { display: flex; align-items: center; gap: 9px; font-size: 12.5px; color: var(--fg-secondary); }
.rs-ralicard .r svg { width: 15px; height: 15px; stroke: var(--fg-muted); stroke-width: 2; fill: none; flex: 0 0 auto; }
.rs-ralicard .r b { color: var(--fg); font-weight: 700; }
.rs-aperu-note { margin-top: 11px; font-size: 11.5px; color: var(--fg-muted); line-height: 1.45; display: flex; gap: 8px; }
.rs-aperu-note svg { width: 14px; height: 14px; stroke: var(--fg-muted); stroke-width: 2; fill: none; flex: 0 0 auto; margin-top: 1px; }

/* Historique */
.rs-hist { display: flex; flex-direction: column; gap: 8px; }
.rs-hist-sum { display: flex; align-items: center; gap: 14px; padding: 11px 13px; border-radius: 13px; background: var(--rs-t2); border: 1px solid var(--border-soft); margin-bottom: 4px; }
.rs-hist-sum .b { display: flex; flex-direction: column; }
.rs-hist-sum .b .n { font-family: var(--font-display); font-weight: 900; font-size: 19px; }
.rs-hist-sum .b .l { font-size: 10.5px; color: var(--fg-muted); font-weight: 600; }
.rs-hist-sum .divider { width: 1px; align-self: stretch; background: var(--border-soft); }
.rs-hist-empty { padding: 18px 14px; text-align: center; font-size: 12.5px; color: var(--fg-muted); line-height: 1.5; }
.rs-hrow { display: flex; align-items: center; gap: 11px; padding: 10px 11px; border-radius: 12px; background: var(--rs-t1); border: 1px solid var(--border-soft); cursor: pointer; transition: all var(--t-fast); }
.rs-hrow:hover { background: var(--rs-t3); border-color: rgba(185,104,199,0.25); }
.rs-hrow .cd { width: 38px; height: 38px; border-radius: 10px; flex: 0 0 auto; display: flex; flex-direction: column; align-items: center; justify-content: center; line-height: 1; background: var(--rs-t3); border: 1px solid var(--border-soft); }
.rs-hrow .cd .d { font-family: var(--font-display); font-weight: 900; font-size: 15px; color: var(--fg-secondary); }
.rs-hrow .cd .mo { font-size: 8px; font-weight: 700; text-transform: uppercase; margin-top: 2px; color: var(--fg-muted); }
.rs-hrow .meta { flex: 1 1 auto; min-width: 0; }
.rs-hrow .meta .d { font-size: 13px; font-weight: 700; color: var(--fg); }
.rs-hrow .meta .s { font-size: 11px; color: var(--fg-muted); margin-top: 1px; display: flex; align-items: center; gap: 5px; }
.rs-hrow .meta .s .st { display: inline-flex; align-items: center; gap: 4px; font-weight: 600; }
.rs-hrow .meta .s .st.pub { color: #34D399; } .rs-hrow .meta .s .st.skip { color: var(--fg-muted); }
.rs-hrow .meta .s .st svg { width: 11px; height: 11px; stroke-width: 2.4; fill: none; }
.rs-hrow .peeps { flex: 0 0 auto; text-align: right; }
.rs-hrow .peeps .n { font-family: var(--font-display); font-weight: 900; font-size: 18px; font-variant-numeric: tabular-nums; }
.rs-hrow .peeps .n .pct { font-size: 11px; font-weight: 800; margin-left: 1px; }
.rs-hrow .peeps.hi .n { color: #34D399; } .rs-hrow .peeps.mid .n { color: var(--rs-tx-amber); } .rs-hrow .peeps.lo .n { color: #F0806E; }
.rs-hrow .peeps .l { font-size: 9.5px; color: var(--fg-muted); font-weight: 600; text-transform: uppercase; letter-spacing: 0.04em; }
.rs-hrow .go-lnk { flex: 0 0 auto; color: var(--fg-muted); }
.rs-hrow:hover .go-lnk { color: var(--k-violet); }
.rs-hrow .go-lnk svg { width: 15px; height: 15px; stroke-width: 2; fill: none; }

/* ===== Footer bar (sticky action bar) ===== */
.rs-footer { position: sticky; bottom: 0; z-index: 20; display: flex; align-items: center; gap: 12px; padding: 14px 40px; border-top: 1px solid var(--border-soft); background: var(--rs-footer-bg); backdrop-filter: blur(10px); margin-top: auto; }
.rs-footer .saved { display: flex; align-items: center; gap: 8px; font-size: 12.5px; color: var(--fg-muted); margin-right: auto; }
.rs-footer .saved svg { width: 14px; height: 14px; stroke: var(--success); stroke-width: 2.4; fill: none; }
.rs-footer .k-btn { flex: 0 0 auto; }
.rs-footer .k-btn.k-btn-primary { min-width: 190px; }

/* Boutons génériques (repris de shell.css, scopés) */
.rs-root .k-btn { padding: 13px 20px; border-radius: 14px; font-size: 14px; font-weight: 600; border: 1px solid var(--border); background: var(--bg-elev-1); color: var(--fg); cursor: pointer; display: inline-flex; align-items: center; justify-content: center; gap: 8px; transition: transform var(--t-fast) var(--ease-out), background var(--t-fast), border-color var(--t-fast); }
.rs-root .k-btn:hover { background: var(--bg-elev-2); }
.rs-root .k-btn:active { transform: scale(0.985); }
.rs-root .k-btn.k-btn-primary { background: var(--k-gradient-h); border-color: transparent; color: #fff; box-shadow: var(--shadow-button); }
.rs-root .k-btn.k-btn-primary:hover { box-shadow: 0 10px 28px rgba(233,78,139,0.45); transform: translateY(-1px); }
.rs-root .k-btn.k-btn-primary:disabled { opacity: 0.55; cursor: not-allowed; box-shadow: none; }

/* ===== Modal / overlay ===== */
.rs-overlay { position: fixed; inset: 0; z-index: 60; background: rgba(6,6,8,0.72); backdrop-filter: blur(6px); display: none; align-items: center; justify-content: center; padding: 24px; }
.rs-overlay.show { display: flex; animation: rsFade .18s ease-out; }
@keyframes rsFade { from { opacity: 0; } to { opacity: 1; } }
.rs-modal { width: 100%; max-width: 460px; background: var(--bg-elev-1); border: 1px solid var(--border); border-radius: 22px; padding: 24px; box-shadow: 0 30px 80px rgba(0,0,0,0.6); animation: rsPop .22s var(--spring); }
@keyframes rsPop { from { opacity: 0; transform: translateY(12px) scale(0.97); } to { opacity: 1; transform: none; } }
.rs-modal .mtop { display: flex; align-items: flex-start; gap: 13px; margin-bottom: 16px; }
.rs-modal .mic { width: 44px; height: 44px; border-radius: 13px; flex: 0 0 auto; display: flex; align-items: center; justify-content: center; }
.rs-modal .mic svg { width: 22px; height: 22px; stroke-width: 2; fill: none; }
.rs-modal .mic.blue { background: rgba(91,141,239,0.14); } .rs-modal .mic.blue svg { stroke: var(--k-blue); }
.rs-modal .mic.red { background: rgba(239,68,68,0.14); } .rs-modal .mic.red svg { stroke: #F87171; }
.rs-modal h3 { margin: 0; font-family: var(--font-display); font-weight: 800; font-size: 19px; letter-spacing: -0.01em; color: var(--fg); }
.rs-modal .msub { font-size: 13px; color: var(--fg-secondary); margin-top: 4px; line-height: 1.45; }
.rs-modal .msub b { color: var(--fg); }
.rs-estabs { display: flex; flex-direction: column; gap: 8px; margin: 4px 0 18px; max-height: 320px; overflow-y: auto; }
.rs-estab { display: flex; align-items: center; gap: 12px; padding: 12px 13px; border-radius: 13px; background: var(--bg-elev-2); border: 1px solid var(--border-soft); cursor: pointer; transition: all var(--t-fast); }
.rs-estab:hover { border-color: rgba(185,104,199,0.3); }
.rs-estab.on { background: linear-gradient(var(--bg-elev-2),var(--bg-elev-2)) padding-box, linear-gradient(135deg,#5B8DEF,#E94E8B) border-box; border: 1.5px solid transparent; }
.rs-estab.cur { opacity: 0.6; cursor: not-allowed; }
.rs-estab .box { width: 22px; height: 22px; border-radius: 7px; flex: 0 0 auto; border: 2px solid var(--border); display: flex; align-items: center; justify-content: center; }
.rs-estab.on .box { background: var(--k-gradient-h); border-color: transparent; }
.rs-estab .box svg { width: 13px; height: 13px; stroke: #fff; stroke-width: 3.2; fill: none; opacity: 0; }
.rs-estab.on .box svg { opacity: 1; }
.rs-estab .en { flex: 1 1 auto; min-width: 0; }
.rs-estab .en .nm { font-size: 14px; font-weight: 700; color: var(--fg); }
.rs-estab .en .ct { font-size: 11.5px; color: var(--fg-muted); margin-top: 1px; }
.rs-estab .tagcur { font-size: 10px; font-weight: 700; padding: 2px 8px; border-radius: 9999px; background: var(--rs-t5); color: var(--fg-muted); flex: 0 0 auto; }
.rs-modal .mactions { display: flex; gap: 10px; }
.rs-mbtn { flex: 1 1 0; height: 46px; border-radius: 13px; font-size: 14px; font-weight: 700; cursor: pointer; border: 1px solid var(--border); background: var(--bg-elev-2); color: var(--fg); transition: all var(--t-fast); }
.rs-mbtn:hover { background: var(--bg-elev-1); }
.rs-mbtn.primary { background: var(--k-gradient-h); border-color: transparent; color: #fff; box-shadow: var(--shadow-button); }
.rs-mbtn.primary:hover { transform: translateY(-1px); box-shadow: 0 10px 28px rgba(233,78,139,0.4); }
.rs-mbtn.primary:disabled { opacity: 0.5; cursor: not-allowed; box-shadow: none; transform: none; }
.rs-mbtn.danger { background: var(--k-gradient-error); border-color: transparent; color: #fff; }

/* Toast */
.rs-toast { position: fixed; left: 50%; bottom: 28px; transform: translateX(-50%) translateY(20px); z-index: 70; display: flex; align-items: center; gap: 10px; padding: 12px 18px; border-radius: 14px; background: var(--bg-elev-2); border: 1px solid var(--border); color: var(--fg); font-size: 13.5px; font-weight: 600; box-shadow: 0 16px 40px rgba(0,0,0,0.5); opacity: 0; pointer-events: none; transition: opacity var(--t-base), transform var(--t-base) var(--spring); }
.rs-toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }
.rs-toast svg { width: 17px; height: 17px; stroke: var(--success); stroke-width: 2.4; fill: none; }

/* Loading state */
.rs-loading { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 14px; padding: 80px 20px; color: var(--fg-muted); }
.rs-loading .spin { width: 34px; height: 34px; border-radius: 50%; border: 3px solid var(--border); border-top-color: var(--k-violet); animation: rsSpin 0.8s linear infinite; }
@keyframes rsSpin { to { transform: rotate(360deg); } }

@media (max-width: 1080px) {
  .rs-grid { grid-template-columns: 1fr; }
  .rs-viz { position: static; max-height: none; overflow: visible; }
}
@media (max-width: 1023px) {
  .rs-burger { display: inline-flex; }
  .rs-topbar { padding: 16px 18px 12px; }
  .rs-stage { padding: 16px 18px 24px; }
  .rs-footer { padding: 12px 18px; }
  .rs-footer .k-btn.k-btn-primary { min-width: 0; flex: 1 1 auto; }
}
@media (max-width: 640px) {
  .rs-freqs { grid-template-columns: 1fr; }
  .rs-leads { grid-template-columns: repeat(3,1fr); }
  .rs-seg { grid-template-columns: 1fr; }
}
