/* Stock rotation tab. Scoped to .rot; the panel's global table, input and button styles are reset here. */
.rot{--ink:#18212f;--ink-2:#465264;--muted:#6b7686;--faint:#9aa3b0;--line:#e8ebf0;--line-2:#f0f2f5;--soft:#f7f8fa;--card:#fff;
  --accent:#6b21a8;--accent-2:#7c3aed;--accent-soft:#f5f0ff;--accent-line:#e6dafb;--bar:#a78bfa;--bar-hover:#7c3aed;
  --crit:#b42318;--crit-fill:#e0453a;--crit-soft:#fdf0ef;--warn:#9a5b06;--warn-fill:#f2a51a;--warn-soft:#fff6e6;--ok:#0f6b4b;--ok-soft:#eaf7f1;
  --radius:14px;--shadow:0 1px 2px rgba(16,24,40,.04),0 4px 14px rgba(16,24,40,.05);
  color:var(--ink);font-size:14px;line-height:1.45}
.rot *,.rot *::before,.rot *::after{box-sizing:border-box}
.rot-sr{position:absolute;width:1px;height:1px;overflow:hidden;clip:rect(0 0 0 0);white-space:nowrap}
.rot [hidden]{display:none!important}
.rot :is(button,a,input,select,summary):focus-visible{outline:2px solid var(--accent-2);outline-offset:2px}

/* Buttons */
.rot-btn{display:inline-flex;align-items:center;gap:7px;height:34px;padding:0 13px;border:1px solid #d9dee6;border-radius:9px;background:#fff;color:var(--ink-2);font-size:13px;font-weight:600;cursor:pointer;text-decoration:none;white-space:nowrap;transition:background .12s,border-color .12s}
.rot-btn:hover{background:var(--soft);border-color:#cdd3dc}
.rot-btn svg{width:16px;height:16px;flex:none}
.rot-btn:disabled{opacity:.55;cursor:default}
.rot-btn-primary{background:var(--accent);border-color:var(--accent);color:#fff}
.rot-btn-primary:hover{background:#5b1a90;border-color:#5b1a90}
.rot-btn-sm{height:30px;padding:0 11px;font-size:12.5px}
.rot-icon-btn{display:inline-grid;place-items:center;width:34px;height:34px;border:0;border-radius:9px;background:transparent;color:var(--muted);cursor:pointer}
.rot-icon-btn:hover{background:var(--soft);color:var(--ink)}
.rot-icon-btn svg{width:18px;height:18px}
.rot-link{all:unset;color:var(--accent);font-weight:600;cursor:pointer;text-decoration:underline;text-decoration-color:var(--accent-line);text-underline-offset:3px}
.rot-link:hover{text-decoration-color:currentColor}

/* Header */
.rot-head{display:flex;justify-content:space-between;align-items:flex-start;gap:20px}
.rot-head h2{margin:0;font-size:22px;line-height:1.25;font-weight:700;letter-spacing:-.2px;color:var(--ink)}
.rot-head p{margin:4px 0 0;max-width:620px;color:var(--muted);font-size:13.5px}
.rot-head-actions{display:flex;align-items:center;gap:8px;flex:none}
.rot-mode{display:inline-flex;align-items:center;gap:7px;height:30px;padding:0 11px;border-radius:999px;background:var(--accent-soft);color:var(--accent);font-size:12.5px;font-weight:600;white-space:nowrap}
.rot-mode-dot{width:7px;height:7px;border-radius:50%;background:var(--accent-2);box-shadow:0 0 0 3px rgba(124,58,237,.18)}
.rot-asof{margin:10px 0 16px;color:var(--faint);font-size:12px}
.rot-alert{margin:-6px 0 14px;padding:9px 13px;border-radius:10px;background:var(--warn-soft);color:#6b3f04;font-size:13px}
.rot-alert.rot-ok{background:var(--ok-soft);color:var(--ok)}

/* Cards */
.rot-card{background:var(--card);border:1px solid #edf0f4;border-radius:var(--radius);box-shadow:var(--shadow)}
.rot-eyebrow{margin:0;color:var(--muted);font-size:12.5px;font-weight:600}
.rot-top{display:grid;grid-template-columns:minmax(0,1fr) 340px;gap:16px;margin-bottom:16px}

/* Risk card: one hero figure, its effect, and when the deadlines fall */
.rot-risk{padding:20px 22px 18px;display:flex;flex-direction:column;gap:18px}
.rot-risk-head{display:flex;justify-content:space-between;align-items:flex-end;gap:16px;flex-wrap:wrap}
.rot-hero{margin:4px 0 2px;font-size:44px;line-height:1.05;font-weight:750;letter-spacing:-1px;color:var(--ink);font-variant-numeric:tabular-nums}
.rot-hero small{font-size:20px;font-weight:650;letter-spacing:0;color:var(--ink-2);margin-left:4px}
.rot-hero-sub{margin:0;color:var(--muted);font-size:13px}
.rot-effect{display:flex;gap:8px;flex-wrap:wrap}
.rot-stat{min-width:104px;padding:9px 12px;border-radius:10px;background:var(--soft)}
.rot-stat b{display:block;font-size:17px;font-weight:700;color:var(--ink);font-variant-numeric:tabular-nums}
.rot-stat span{display:block;margin-top:1px;color:var(--muted);font-size:11.5px}
.rot-chart-head{display:flex;justify-content:space-between;align-items:baseline;gap:10px;margin-bottom:8px}
.rot-chart-head h4{margin:0;font-size:13px;font-weight:650;color:var(--ink-2)}
.rot-chart-head span{color:var(--faint);font-size:11.5px}
.rot-bars{display:grid;grid-template-columns:repeat(13,minmax(0,1fr));gap:6px;align-items:end;height:128px;padding-top:18px;border-bottom:1px solid var(--line)}
.rot-bar{all:unset;position:relative;display:flex;flex-direction:column;justify-content:flex-end;align-items:center;height:100%;cursor:pointer;border-radius:6px 6px 0 0}
.rot-bar i{display:block;width:100%;max-width:34px;min-height:2px;border-radius:5px 5px 0 0;background:var(--bar);transition:background .12s}
.rot-bar:hover i,.rot-bar:focus-visible i,.rot-bar[aria-pressed=true] i{background:var(--bar-hover)}
.rot-bar.rot-bar-late i{background:var(--crit-fill)}
.rot-bar.rot-bar-late:hover i,.rot-bar.rot-bar-late[aria-pressed=true] i{background:var(--crit)}
.rot-bar.rot-bar-zero{cursor:default}.rot-bar.rot-bar-zero i{background:var(--line)}
.rot-bar b{position:absolute;top:-17px;left:50%;transform:translateX(-50%);font-size:11px;font-weight:650;color:var(--ink-2);white-space:nowrap;font-variant-numeric:tabular-nums}
.rot-bar:focus-visible{outline-offset:3px}
.rot-axis{display:grid;grid-template-columns:repeat(13,minmax(0,1fr));gap:6px;margin-top:6px}
.rot-axis span{text-align:center;font-size:11px;color:var(--faint);white-space:nowrap}
.rot-axis span.rot-axis-late{color:var(--crit);font-weight:650}
.rot-axis em{display:block;font-style:normal;font-size:10px;color:var(--faint)}
.rot-tip{position:fixed;z-index:1200;max-width:240px;padding:8px 10px;border-radius:8px;background:#18212f;color:#fff;font-size:12px;line-height:1.4;pointer-events:none;box-shadow:0 6px 18px rgba(16,24,40,.22)}
.rot-tip b{font-weight:700}
.rot-tip::after{content:"";position:absolute;left:var(--arrow,50%);bottom:-5px;width:10px;height:10px;margin-left:-5px;background:#18212f;transform:rotate(45deg)}
.rot-tip.rot-tip-price{max-width:340px;padding:10px 13px 11px}
.rot-tip-price .rot-tip-title{display:block;font-size:14px;color:#86efac}
.rot-tip-grid{display:grid;grid-template-columns:auto auto auto;gap:4px 16px;margin-top:8px;font-variant-numeric:tabular-nums;white-space:nowrap}
.rot-tip-grid>span{text-align:right}
.rot-tip-grid>span:nth-child(3n+1){text-align:left}
.rot-tip-grid .rot-tip-head{color:#aab4c3;font-size:11px;font-weight:500}
.rot-tip-grid .rot-tip-channel{color:#d5dbe5;font-weight:600}
.rot-tip-grid .rot-tip-was{color:#c9d1dc}
.rot-tip-grid .rot-tip-now{color:#fff;font-weight:700}
.rot-tip-price .rot-tip-note{margin:7px 0 0;color:#aab4c3;font-size:11.5px}
.rot-tip-price .rot-tip-loss{color:#fca5a5;font-weight:600}

/* To do */
.rot-todo{padding:18px 18px 8px}
.rot-tasks{margin-top:10px}
.rot-task{display:grid;grid-template-columns:34px minmax(0,1fr);gap:12px;padding:12px 0;border-top:1px solid var(--line-2)}
.rot-task:first-child{border-top:0;padding-top:4px}
.rot-task-icon{display:grid;place-items:center;width:34px;height:34px;border-radius:10px}
.rot-task-icon svg{width:18px;height:18px}
.rot-tone-warn{background:var(--warn-soft);color:var(--warn)}.rot-tone-crit{background:var(--crit-soft);color:var(--crit)}
.rot-tone-accent{background:var(--accent-soft);color:var(--accent)}.rot-tone-ok{background:var(--ok-soft);color:var(--ok)}
.rot-task-title{margin:0;display:flex;align-items:center;gap:8px;font-size:14px;font-weight:650;color:var(--ink)}
.rot-count{display:inline-flex;align-items:center;justify-content:center;min-width:24px;height:20px;padding:0 7px;border-radius:999px;background:var(--soft);color:var(--ink-2);font-size:12px;font-weight:700;font-variant-numeric:tabular-nums}
.rot-task-text{margin:3px 0 9px;color:var(--muted);font-size:12.5px;line-height:1.45}
.rot-task-actions{display:flex;gap:6px;flex-wrap:wrap}
.rot-task-more{margin:9px 0 0;color:var(--muted);font-size:12.5px;line-height:1.5}
.rot-bulk-scope{display:flex;gap:6px;flex-wrap:wrap;margin-bottom:12px}
.rot-task-note{margin:0;padding:10px 0 6px;border-top:1px solid var(--line-2);color:var(--muted);font-size:12px}
.rot-done{display:flex;align-items:center;gap:10px;padding:16px 0;color:var(--ok);font-weight:600;font-size:13.5px}

/* Products */
.rot-products{padding:6px 0 0;overflow:hidden}
.rot-products-head{display:flex;align-items:flex-end;gap:22px;padding:12px 20px 0;border-bottom:1px solid var(--line);flex-wrap:wrap}
.rot-products-head h3{margin:0 0 11px;font-size:16px;font-weight:700;color:var(--ink)}
.rot-tabs{display:flex;gap:2px;overflow-x:auto;scrollbar-width:none;margin-bottom:-1px}
.rot-tabs::-webkit-scrollbar{display:none}
.rot-tab{all:unset;display:inline-flex;align-items:center;gap:7px;padding:9px 11px 10px;border-bottom:2px solid transparent;color:var(--muted);font-size:13px;font-weight:600;cursor:pointer;white-space:nowrap}
.rot-tab:hover{color:var(--ink)}
.rot-tab[aria-selected=true]{color:var(--accent);border-bottom-color:var(--accent)}
.rot-tab span{display:inline-flex;align-items:center;justify-content:center;min-width:22px;height:19px;padding:0 6px;border-radius:999px;background:var(--soft);color:var(--ink-2);font-size:11.5px;font-weight:700;font-variant-numeric:tabular-nums}
.rot-tab[aria-selected=true] span{background:var(--accent-soft);color:var(--accent)}
.rot-tab:focus-visible{outline:2px solid var(--accent-2);outline-offset:-2px;border-radius:6px}
.rot-toolbar{display:flex;align-items:center;gap:10px;padding:14px 20px;flex-wrap:wrap}
.rot-search{position:relative;flex:1 1 240px;max-width:340px}
.rot-search svg{position:absolute;left:11px;top:50%;width:16px;height:16px;transform:translateY(-50%);color:var(--faint)}
.rot .rot-search input{width:100%;height:36px;padding:0 12px 0 34px;border:1px solid #d9dee6;border-radius:9px;background:#fff;font-size:13.5px;color:var(--ink);box-shadow:none}
.rot .rot-search input:focus{border-color:var(--accent-2);box-shadow:0 0 0 3px rgba(124,58,237,.14)}
.rot-chips{display:flex;gap:6px;flex-wrap:wrap}
.rot-chip{all:unset;display:inline-flex;align-items:center;gap:6px;height:30px;padding:0 11px;border:1px solid #dfe3ea;border-radius:999px;background:#fff;color:var(--ink-2);font-size:12.5px;font-weight:600;cursor:pointer;white-space:nowrap}
.rot-chip:hover{background:var(--soft)}
.rot-chip[aria-pressed=true]{background:var(--accent-soft);border-color:#cdb5f5;color:var(--accent)}
.rot-chip b{font-variant-numeric:tabular-nums}
.rot-chip svg{width:12px;height:12px}
.rot-sort{display:flex;align-items:center;gap:7px;margin-left:auto;color:var(--muted);font-size:12.5px}
.rot .rot-sort select{height:34px;padding:0 28px 0 10px;border:1px solid #d9dee6;border-radius:9px;background:#fff;color:var(--ink);font-size:13px}

.rot-table-wrap{border-top:1px solid var(--line)}
.rot .rot-table{width:100%;border-collapse:collapse;border-radius:0;box-shadow:none;background:transparent;font-size:13.5px;table-layout:fixed}
.rot .rot-table th{padding:9px 14px;background:var(--soft);color:var(--muted);font-size:12px;font-weight:600;text-transform:none;letter-spacing:0;text-align:left;border-bottom:1px solid var(--line);white-space:nowrap}
.rot .rot-table th:first-child,.rot .rot-table td:first-child{padding-left:20px}
.rot .rot-table th:last-child,.rot .rot-table td:last-child{padding-right:20px}
.rot .rot-table th:nth-child(2){width:180px}.rot .rot-table th:nth-child(3){width:118px}.rot .rot-table th:nth-child(4){width:128px}.rot .rot-table th:nth-child(5){width:280px}
.rot .rot-table td{padding:12px 14px;border-bottom:1px solid var(--line-2);vertical-align:middle;background:transparent}
.rot .rot-table tr:last-child td{border-bottom:0}
.rot .rot-table tbody tr{cursor:pointer}
.rot .rot-table tbody tr:hover td{background:#fbf9ff}
.rot .rot-table .rot-r{text-align:right}
/* Product picture left of the SKU and name: the panel's .offer-thumbnail-frame (42 px fixed box, contain on white, placeholder until loaded) */
.rot-prod{display:flex;align-items:center;gap:12px;min-width:0}
.rot-prod-text{flex:1 1 auto;min-width:0}
.rot-prod-top{display:flex;flex-wrap:wrap;align-items:center;gap:4px 6px;min-width:0}
.rot-rowlink{all:unset;font-weight:700;font-size:14px;color:var(--ink);cursor:pointer;white-space:nowrap}
.rot-rowlink:hover{color:var(--accent)}
.rot-rowlink:focus-visible{outline:2px solid var(--accent-2);outline-offset:2px;border-radius:4px}
.rot-name{display:block;margin-top:2px;color:var(--muted);font-size:12.5px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.rot-tag{display:inline-flex;align-items:center;height:19px;padding:0 7px;border-radius:5px;font-size:11px;font-weight:650;white-space:nowrap}
.rot-tag-crit{background:var(--crit-soft);color:var(--crit)}.rot-tag-warn{background:var(--warn-soft);color:var(--warn)}
.rot-tag-accent{background:var(--accent-soft);color:var(--accent)}.rot-tag-ok{background:var(--ok-soft);color:var(--ok)}.rot-tag-mute{background:#eef1f5;color:var(--ink-2)}
.rot-due b{display:block;font-size:13.5px;font-weight:650;font-variant-numeric:tabular-nums}
.rot-due small{display:block;margin-top:1px;color:var(--muted);font-size:12px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.rot-due .rot-t-crit{color:var(--crit)}.rot-due .rot-t-warn{color:var(--warn)}
.rot-track{display:block;height:4px;margin-top:6px;border-radius:2px;background:var(--line-2);overflow:hidden}
.rot-track i{display:block;height:100%;border-radius:2px;background:var(--bar)}
.rot-track.rot-t-warn i{background:var(--warn-fill)}.rot-track.rot-t-crit i{background:var(--crit-fill)}
.rot-num b{display:block;font-size:14px;font-weight:650;font-variant-numeric:tabular-nums}
.rot-num small{display:block;margin-top:1px;color:var(--muted);font-size:12px;white-space:nowrap;font-variant-numeric:tabular-nums}
.rot-price b{font-size:16px;color:var(--accent)}
.rot-price b.rot-cut-big{font-size:23px;line-height:1.15;font-weight:750;color:var(--ok);cursor:help;text-decoration:underline dotted 1.5px;text-underline-offset:4px;border-radius:4px;outline-offset:3px}
.rot-price b.rot-quiet{font-size:13px;font-weight:600;color:var(--faint)}
.rot-price small.rot-loss{color:var(--crit);font-weight:600}
.rot-empty{margin:0;padding:36px 20px;text-align:center;color:var(--muted);font-size:13.5px}
.rot-more{display:flex;justify-content:space-between;align-items:center;gap:12px;padding:12px 20px 14px;border-top:1px solid var(--line);color:var(--faint);font-size:12.5px}
.rot-skel{border-radius:10px;background:linear-gradient(90deg,#f1f3f6 0,#f8f9fb 50%,#f1f3f6 100%);background-size:200% 100%;animation:rot-shimmer 1.2s infinite linear}
.rot-skel-hero{height:250px}.rot-skel-todo{height:180px;margin-top:10px}
.rot-skel-row td{padding:16px 20px!important}.rot-skel-row td div{height:16px}
@keyframes rot-shimmer{to{background-position:-200% 0}}

/* Help */
.rot-help{margin-top:16px;padding:0 20px}
.rot-help summary{padding:14px 0;cursor:pointer;font-size:13.5px;font-weight:650;color:var(--ink-2);list-style:none}
.rot-help summary::-webkit-details-marker{display:none}
.rot-help summary::before{content:"";display:inline-block;width:7px;height:7px;margin-right:10px;border-right:2px solid var(--faint);border-bottom:2px solid var(--faint);transform:rotate(-45deg) translateY(-2px);transition:transform .15s}
.rot-help[open] summary::before{transform:rotate(45deg) translateY(-3px)}
.rot-help-grid{display:grid;grid-template-columns:1fr 1fr;gap:4px 28px;padding-bottom:12px}
.rot-help p{margin:6px 0;color:var(--ink-2);font-size:13px;line-height:1.6}

/* Drawer */
.rot-backdrop{position:fixed;inset:0;z-index:1000;background:rgba(16,24,40,.32);animation:rot-fade .15s ease-out}
.rot-drawer{position:fixed;top:0;right:0;bottom:0;z-index:1001;display:flex;flex-direction:column;width:min(480px,100vw);background:#fff;box-shadow:-12px 0 40px rgba(16,24,40,.16);animation:rot-slide .2s ease-out}
.rot-drawer.rot-wide{width:min(760px,100vw)}
.rot-drawer-head{display:flex;justify-content:space-between;align-items:flex-start;gap:12px;padding:18px 20px 14px;border-bottom:1px solid var(--line)}
.rot-drawer-titles{min-width:0}
.rot-drawer-head h3{margin:0;font-size:18px;font-weight:700;color:var(--ink)}
.rot-drawer-head p{margin:3px 0 0;color:var(--muted);font-size:13px}
/* Larger product picture at the top of the product drawer */
.rot .offer-thumbnail-frame.rot-thumb-lg{width:112px;height:112px;border-radius:12px}
.rot .rot-thumb-lg .offer-thumbnail{padding:6px}
.rot .rot-thumb-lg .offer-thumbnail-placeholder svg{width:34px;height:34px}
.rot-drawer-head>.offer-thumbnail-frame+.rot-drawer-titles{flex:1 1 auto;align-self:center}
.rot-drawer-body{flex:1;overflow-y:auto;padding:18px 20px 24px;overscroll-behavior:contain}
.rot-drawer-foot{display:flex;justify-content:space-between;align-items:center;gap:12px;padding:12px 20px;border-top:1px solid var(--line);background:#fff}
@keyframes rot-slide{from{transform:translateX(24px);opacity:0}}
@keyframes rot-fade{from{opacity:0}}
html.rot-locked{overflow:hidden}

.rot-tags{display:flex;gap:6px;flex-wrap:wrap;margin-top:8px}
.rot-offer{padding:14px 16px;border-radius:12px;background:var(--accent-soft);margin-bottom:18px}
.rot-offer-label{margin:0;color:var(--accent);font-size:12.5px;font-weight:650}
.rot-offer-price{margin:3px 0 0;font-size:28px;font-weight:750;letter-spacing:-.4px;color:var(--ink);font-variant-numeric:tabular-nums}
.rot-offer-price s{margin-left:8px;font-size:15px;font-weight:600;color:var(--faint)}
.rot-offer-price span{margin-left:8px;font-size:15px;font-weight:700;color:var(--accent)}
.rot-offer-note{margin:4px 0 0;color:var(--ink-2);font-size:12.5px}
.rot-offer.rot-offer-quiet{background:var(--soft)}.rot-offer.rot-offer-quiet .rot-offer-label{color:var(--ink-2)}
.rot-callout{display:flex;gap:10px;padding:12px 14px;border-radius:11px;margin-bottom:16px;font-size:13px;line-height:1.5}
.rot-callout svg{width:18px;height:18px;flex:none;margin-top:1px}
.rot-callout b{display:block;margin-bottom:1px}
.rot-callout.rot-tone-crit{background:var(--crit-soft);color:#7a1a12}.rot-callout.rot-tone-warn{background:var(--warn-soft);color:#6b3f04}
.rot-section{margin-top:20px}
.rot-section h4{margin:0 0 8px;font-size:13px;font-weight:700;color:var(--ink-2)}
.rot-facts{display:grid;grid-template-columns:1fr 1fr;gap:8px}
.rot-fact{padding:10px 12px;border:1px solid var(--line);border-radius:10px}
.rot-fact span{display:block;color:var(--muted);font-size:11.5px}
.rot-fact b{display:block;margin-top:2px;font-size:15px;font-weight:700;font-variant-numeric:tabular-nums}
.rot-why{margin:0;padding:0;list-style:none}
.rot-why li{position:relative;margin:0 0 7px;padding-left:16px;color:var(--ink-2);font-size:13px;line-height:1.55}
.rot-why li::before{content:"";position:absolute;left:2px;top:8px;width:5px;height:5px;border-radius:50%;background:var(--bar)}
.rot-why b{color:var(--ink)}
.rot .rot-lots{width:100%;border-collapse:collapse;border:1px solid var(--line);border-radius:10px;overflow:hidden;box-shadow:none;background:#fff;font-size:12.5px}
.rot .rot-lots th{padding:7px 10px;background:var(--soft);color:var(--muted);font-size:11.5px;font-weight:600;text-transform:none;letter-spacing:0}
.rot .rot-lots td{padding:7px 10px;border-bottom:1px solid var(--line-2);font-variant-numeric:tabular-nums;vertical-align:top}
.rot .rot-lots tr:last-child td{border-bottom:0}
.rot .rot-lots tr:hover td{background:transparent}
.rot .rot-lots .rot-r{text-align:right}.rot .rot-lots .rot-bad{color:var(--crit);font-weight:700}
.rot-shelf{padding:14px;border:1px solid var(--accent-line);border-radius:12px}
.rot-shelf-row{display:flex;gap:8px;align-items:center;flex-wrap:wrap;margin-top:8px}
.rot .rot-date{width:150px;height:36px;padding:0 10px;border:1px solid #cfd6e0;border-radius:9px;font-size:14px;font-variant-numeric:tabular-nums;color:var(--ink);background:#fff;box-shadow:none}
.rot .rot-date:focus{border-color:var(--accent-2);box-shadow:0 0 0 3px rgba(124,58,237,.14)}
.rot-hint{font-size:12px;color:var(--muted)}
.rot-hint.rot-good{color:var(--ok)}.rot-hint.rot-bad{color:var(--crit);font-weight:600}.rot-hint.rot-miss{color:var(--warn);font-weight:600}
.rot-shelf p{margin:8px 0 0;color:var(--muted);font-size:12px;line-height:1.5}

/* Settings */
.rot-setting{display:grid;grid-template-columns:44px minmax(0,1fr);gap:12px;padding:14px 0;border-top:1px solid var(--line-2);cursor:pointer;position:relative}
.rot-setting:first-child{border-top:0;padding-top:4px}
.rot-setting input{position:absolute;opacity:0;width:44px;height:24px;margin:0;cursor:pointer}
.rot-switch{position:relative;width:44px;height:24px;border-radius:12px;background:#cfd5de;transition:background .15s}
.rot-switch::after{content:"";position:absolute;top:3px;left:3px;width:18px;height:18px;border-radius:50%;background:#fff;box-shadow:0 1px 2px rgba(0,0,0,.25);transition:transform .15s}
.rot-setting input:checked+.rot-switch{background:var(--accent-2)}
.rot-setting input:checked+.rot-switch::after{transform:translateX(20px)}
.rot-setting input:focus-visible+.rot-switch{outline:2px solid var(--accent-2);outline-offset:2px}
.rot-setting input:disabled+.rot-switch{opacity:.55}
.rot-setting strong{display:block;font-size:14px;color:var(--ink)}
.rot-setting small{display:block;margin-top:3px;color:var(--muted);font-size:12.5px;line-height:1.5}
.rot-percent{display:flex;align-items:center;gap:8px;margin:2px 0 6px 56px;color:var(--ink-2);font-size:13px}
.rot .rot-percent input{width:72px;height:34px;padding:0 8px;border:1px solid #cfd6e0;border-radius:9px;text-align:right;font-size:14px;box-shadow:none}
.rot .rot-percent input:disabled{background:var(--soft);color:var(--faint)}
.rot-meta{margin:14px 0 0;color:var(--faint);font-size:12px}

/* Entering dates from the warehouse sheet */
.rot-bulk-intro{margin:0 0 12px;color:var(--muted);font-size:13px}
.rot-bulk-brand{margin:14px -20px 0;padding:5px 20px;background:var(--soft);color:var(--ink-2);font-size:12px;font-weight:700;letter-spacing:.2px}
.rot-bulk-row{display:grid;grid-template-columns:minmax(0,1fr) 56px 140px 150px 70px;gap:12px;align-items:center;padding:8px 0;border-bottom:1px solid var(--line-2)}
.rot-bulk-prod{display:flex;gap:10px;align-items:baseline;min-width:0;cursor:pointer}
.rot-bulk-prod b{flex:0 0 78px;font-size:13.5px}
.rot-bulk-prod span{color:var(--muted);font-size:12.5px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.rot-bulk-stock{text-align:right;color:var(--ink-2);font-size:12.5px;font-variant-numeric:tabular-nums}
.rot .rot-bulk-row .rot-date{width:100%}
.rot .rot-bulk-row .rot-date:disabled{background:var(--soft);border-color:var(--line)}
.rot-bulk-none{display:flex;align-items:center;gap:6px;justify-self:end;color:var(--ink-2);font-size:12.5px;cursor:pointer}
.rot-bulk-none input{width:16px;height:16px;margin:0;accent-color:var(--accent-2)}
.rot-bulk-info{color:var(--muted);font-size:12.5px}.rot-bulk-info.rot-bad{color:var(--crit);font-weight:600}
.rot-bulk-scope{align-items:center}
.rot-bulk-pdf{margin-left:auto;font-size:12.5px}
.rot-bulk-day{display:flex;align-items:center;gap:6px 10px;flex-wrap:wrap;margin:0 0 12px;padding:10px 12px;border-radius:10px;background:var(--soft);color:var(--ink-2);font-size:13px;font-weight:600}
.rot .rot-bulk-day .rot-day{width:160px}
.rot-bulk-day .rot-hint{flex-basis:100%;font-weight:400}

/* Live rotation: price mode badge (a button opening the settings) */
.rot-mode{border:0;margin:0;cursor:pointer;font-family:inherit}
.rot-mode:hover{box-shadow:inset 0 0 0 1px currentColor}
.rot-mode.rot-mode-unknown{background:#eef1f5;color:var(--ink-2)}
.rot-mode-unknown .rot-mode-dot{background:var(--faint);box-shadow:0 0 0 3px rgba(154,163,176,.22)}
.rot-mode.rot-mode-observe{background:var(--warn-soft);color:var(--warn)}
.rot-mode-observe .rot-mode-dot{background:var(--warn-fill);box-shadow:0 0 0 3px rgba(242,165,26,.22)}
.rot-mode.rot-mode-live{background:var(--ok-soft);color:var(--ok)}
.rot-mode-live .rot-mode-dot{background:#12a170;box-shadow:0 0 0 3px rgba(18,161,112,.22)}

/* "Z datą" tab: group chips, state and discount cells */
.rot-chip-ok::before,.rot-chip-warn::before,.rot-chip-crit::before,.rot-chip-accent::before,.rot-chip-mute::before{content:"";width:7px;height:7px;border-radius:50%}
.rot-chip-ok::before{background:#12a170}.rot-chip-warn::before{background:var(--warn-fill)}.rot-chip-crit::before{background:var(--crit-fill)}
.rot-chip-accent::before{background:var(--accent-2)}.rot-chip-mute::before{background:var(--faint)}
.rot .rot-table.rot-table-live th:nth-child(2){width:170px}.rot .rot-table.rot-table-live th:nth-child(3){width:180px}
.rot .rot-table.rot-table-live th:nth-child(4){width:280px}.rot .rot-table.rot-table-live th:nth-child(5){width:120px}
.rot .rot-table-live .rot-num small{overflow:hidden;text-overflow:ellipsis}
.rot-state{min-width:0}
.rot-state b{display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden;font-size:13px;font-weight:650;line-height:1.35}
.rot-state small{display:block;margin-top:2px;color:var(--muted);font-size:12px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.rot-state.rot-t-ok b{color:var(--ok)}.rot-state.rot-t-warn b{color:var(--warn)}.rot-state.rot-t-crit b{color:var(--crit)}
.rot-state.rot-t-accent b{color:var(--accent)}.rot-state.rot-t-mute b{color:var(--ink-2)}
.rot-price small.rot-live-now{color:var(--ok);font-weight:650}
.rot-price b.rot-live-now{color:var(--ok)}

/* Live rotation in the product drawer: facts, offers (account, offer, base -> rotation price, state, since) and events */
.rot-live{padding:14px;border:1px solid var(--line);border-radius:12px}
.rot-live-status{display:flex;align-items:center;gap:8px;flex-wrap:wrap;margin:0 0 10px;color:var(--ink);font-size:13px;font-weight:600;line-height:1.4}
.rot-fact small{display:block;margin-top:1px;color:var(--muted);font-size:11.5px}
.rot-live-note{margin:10px 0 0;color:var(--muted);font-size:12.5px;line-height:1.5}
.rot-section h4.rot-live-sub{margin:16px 0 6px}
.rot-live .rot-callout{margin:12px 0 0}
.rot-callout-meta{display:block;margin-top:4px;font-size:11.5px;opacity:.8}
.rot-olist{border:1px solid var(--line);border-radius:10px;overflow:hidden}
.rot-orow{display:grid;grid-template-columns:minmax(0,1fr) auto;grid-template-areas:"main state" "price state" "reason reason";gap:2px 10px;padding:8px 11px;border-top:1px solid var(--line-2);font-size:12.5px}
.rot-orow:first-child{border-top:0}
.rot-orow-main{grid-area:main;min-width:0;color:var(--muted);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.rot-orow-main b{margin-right:6px;color:var(--ink);font-weight:650}
.rot-orow-price{grid-area:price;color:var(--ink-2);font-variant-numeric:tabular-nums}
.rot-oprice b{color:var(--ink);font-weight:700}
.rot-oprice small{margin-left:6px;color:var(--muted);font-size:11.5px}
.rot-orow-state{grid-area:state;display:flex;flex-direction:column;align-items:flex-end;justify-content:center;gap:3px}
.rot-orow-state small{color:var(--faint);font-size:11px;white-space:nowrap}
.rot-orow-reason{grid-area:reason;margin:2px 0 0;color:var(--muted);font-size:11.5px;line-height:1.45}
.rot-events{margin:0;padding:0;list-style:none}
.rot-events li{display:flex;flex-wrap:wrap;gap:2px 8px;padding:6px 0;border-top:1px solid var(--line-2);color:var(--ink-2);font-size:12px}
.rot-events li:first-child{border-top:0}
.rot-ev-at{color:var(--faint);font-variant-numeric:tabular-nums}
.rot-ev-offer{color:var(--muted)}
.rot-ev-text{flex-basis:100%;color:var(--muted);line-height:1.45}

/* Cut on the offers over time: the "Wykres" button in every row and the chart in the drawer */
.rot-chart-btn{all:unset;flex:none;display:inline-flex;align-items:center;height:20px;padding:0 8px;border:1px solid var(--accent-line);border-radius:999px;background:#fff;color:var(--accent);font-size:11.5px;font-weight:600;line-height:1;cursor:pointer}
.rot-chart-btn:hover{background:var(--accent-soft);border-color:var(--bar)}
.rot-cutchart svg{display:block;width:100%;height:auto;margin:4px 0 8px;overflow:visible}
.rot-cc-now{margin:0 0 2px;color:var(--ink);font-size:13px;font-weight:600}
.rot-cc-grid{stroke:var(--line);stroke-width:1}
.rot-cc-axis{fill:var(--faint);font-size:11px;font-variant-numeric:tabular-nums}
.rot-cc-area{fill:var(--accent-soft)}
.rot-cc-line{fill:none;stroke:var(--accent-2);stroke-width:2;stroke-linejoin:round}
.rot-cc-dot{fill:var(--accent-2);stroke:#fff;stroke-width:2}
.rot-cc-guide{stroke:var(--accent-2);stroke-width:1;stroke-dasharray:3 3;opacity:.6}
.rot-cc-axis.rot-cc-axis-now{fill:var(--accent-2);font-weight:700}
.rot-cc-hit{fill:transparent}
.rot-cc-hit:hover{fill:rgba(124,58,237,.07)}
.rot-cc-list{margin:0;padding:0;list-style:none}
.rot-cc-list li{display:flex;justify-content:space-between;gap:12px;padding:5px 0;border-top:1px solid var(--line-2);color:var(--ink-2);font-size:12.5px;font-variant-numeric:tabular-nums}
.rot-cc-list li:first-child{border-top:0}
.rot-cc-list span{color:var(--muted)}
.rot-stockchart{margin-top:6px}
.rot-sh-head{display:flex;justify-content:space-between;align-items:flex-start;gap:12px}
.rot-section .rot-sh-head h4{margin:2px 0 8px}
.rot-sh-current{text-align:right;flex-shrink:0}
.rot-sh-current>span{display:block;color:#77827b;font-size:11px}
.rot-sh-current>strong{display:block;margin-top:3px;font-size:29px;line-height:1.2;font-weight:650;color:#216a30;font-variant-numeric:tabular-nums}
.rot-sh-current small{font-size:12px;font-weight:400;color:#6f8174}
.rot-sh-toolbar{display:flex;align-items:center;justify-content:space-between;gap:12px;flex-wrap:wrap}
.rot-sh-toolbar>span{font-size:12px;color:#6d7c71;font-variant-numeric:tabular-nums}
.rot-sh-ranges{display:flex;gap:2px;border:1px solid #e1e7e2;border-radius:6px;background:#f7f9f7;padding:3px}
.rot-sh-range{all:unset;font-size:12px;color:#77827b;padding:5px 13px;border-radius:4px;cursor:pointer}
.rot-sh-range:hover{color:#216a30}
.rot-sh-range[aria-pressed="true"]{background:#fff;color:#216a30;box-shadow:0 1px 3px #213c211c;font-weight:600}
.rot-sh-range:focus-visible{outline:2px solid #216a30;outline-offset:1px}
.rot-sh-plot-label{font-size:10px;color:#8b968e;margin:13px 0 0}
.rot-sh-plot{position:relative}
.rot-stockchart .rot-sh-plot svg{margin:0;touch-action:pan-y}
.rot-sh-grid{stroke:#e8ede9;stroke-width:1;stroke-dasharray:3 4}
.rot-sh-tick{fill:#7b877f;font-size:11px;font-variant-numeric:tabular-nums}
.rot-sh-band{fill:#fff4df}
.rot-sh-buffer{fill:#fff0f0}
.rot-sh-area{stroke:none;fill-opacity:.6}
.rot-sh-line{fill:none;stroke:#216a30;stroke-width:2;stroke-linejoin:round;stroke-linecap:round}
.rot-sh-today{stroke:#aabca6;stroke-width:1}
.rot-sh-expiry{stroke:#c53030;stroke-width:1}
.rot-sh-label{fill:#4d5c4d;font-size:10px;font-weight:600}
.rot-sh-label-today{font-weight:700}
.rot-sh-label-expiry{fill:#c53030}
.rot-sh-now{fill:#216a30;font-size:10px;font-weight:700}
.rot-sh-now-line{opacity:.7;stroke:#216a30;stroke-dasharray:2 3;stroke-width:1}
.rot-sh-now-dot{fill:#216a30}
.rot-sh-forecast{fill:none;stroke-linecap:round;stroke-linejoin:round;stroke-width:2}
.rot-sh-regular{stroke:#b45309;stroke-dasharray:6 4}
.rot-sh-recent{stroke:#2b6cb0;stroke-dasharray:1 4}
.rot-sh-nocut{opacity:.85;stroke-dasharray:2 5;stroke-width:1.5}
.rot-sh-regular-end{fill:#b45309}
.rot-sh-recent-end{fill:#2b6cb0}
.rot-sh-tag{fill:#101910;font-size:11px;font-weight:600;paint-order:stroke;stroke:rgba(255,255,255,.72);stroke-linejoin:round;stroke-width:4px}
.rot-sh-bandtext{fill:#b45309;font-size:10px;font-weight:600;paint-order:stroke;stroke:#fff4df;stroke-linejoin:round;stroke-width:3px}
.rot-sh-bandtext.rot-sh-beside{stroke:rgba(255,255,255,.72);stroke-width:4px}
.rot-sh-span{fill:none;stroke:#b45309;stroke-width:1.5}
.rot-sh-guide{stroke:#96b29c;stroke-width:1;stroke-dasharray:3 3}
.rot-sh-active{fill:#216a30;stroke:#fff;stroke-width:2}
.rot-sh-hit{fill:transparent}
.rot-sh-tip{position:absolute;top:0;z-index:2;border:1px solid #dce6df;background:#fff;border-radius:6px;box-shadow:0 4px 18px #173f2014;padding:11px 14px;font-size:11px;line-height:1.45;color:#7b877f;pointer-events:none;white-space:nowrap}
.rot-sh-tip[hidden]{display:none}
.rot-sh-tip>span{display:block}
.rot-sh-tip>strong{display:block;font-size:23px;line-height:1.2;font-weight:650;color:#216a30;margin:6px 0;font-variant-numeric:tabular-nums}
.rot-sh-tip>strong small{font-size:12px;font-weight:400}
.rot-sh-tip .rot-sh-tip-change{color:#62766a}
.rot-sh-key{display:grid;gap:2px;margin:6px 0 0;padding:0;list-style:none;font-size:12px;line-height:16px;color:#101910}
.rot-sh-key li{display:flex;align-items:center;gap:7px}
.rot-sh-key li i{flex:0 0 18px;height:0;border-top:2px solid #216a30}
.rot-sh-key li.is-regular i{border-top:2px dashed #b45309}
.rot-sh-key li.is-recent i{border-top:2px dotted #2b6cb0}
.rot-sh-key li.is-no-cut i{border-top-width:1px;border-top-style:dotted}
.rot-sh-key li.is-band i{height:10px;border-top:0;outline:1px solid #cbd8c8;background:#fff4df}
.rot-sh-key li span{flex:1 1 auto;min-width:0}
.rot-sh-key li b{margin-left:auto;font-weight:600;white-space:nowrap;text-align:right}
.rot-sh-summary{display:grid;grid-template-columns:1fr 1fr 1.2fr;gap:14px;margin-top:15px;padding:15px 0;border-block:1px solid #e3e8e5}
.rot-sh-summary>div{padding-left:20px;border-left:1px solid #e3e8e5;min-width:0}
.rot-sh-summary>div:first-child{padding-left:0;border-left:0}
.rot-sh-summary span{display:block;font-size:11px;color:#7d8981;margin-bottom:6px}
.rot-sh-summary strong{font-size:17px;font-weight:600;color:#26332d;font-variant-numeric:tabular-nums}
.rot-sh-summary small{font-size:11px;font-weight:400;color:#7d8981}
.rot-sh-changes{padding:17px 0 14px}
.rot-section .rot-sh-changes h4{font-size:12px;font-weight:600;margin:0 0 10px;color:#26332d}
.rot-sh-change{display:grid;grid-template-columns:1fr 100px 120px;align-items:center;gap:12px;min-height:30px;border-top:1px solid #f0f3f0;font-size:12px;color:#6b796f}
.rot-sh-change>:not(:first-child){text-align:right;font-variant-numeric:tabular-nums}
.rot-sh-change strong{font-weight:550;color:#354e3d}
.rot-sh-change .rot-sh-increase{color:#216a30}
.rot-sh-change.rot-sh-change-head{min-height:0;padding-bottom:7px;border-top:0;font-size:10px;color:#859189}
.rot-sh-note{margin:12px 0;font-size:11px;line-height:1.5;color:#77827b}
.rot-sh-state{display:grid;place-content:center;justify-items:center;gap:6px;min-height:224px;text-align:center;font-size:13px;color:#6d7c71}
.rot-sh-state p{margin:0}
.rot-sh-retry{all:unset;padding:7px 14px;border:1px solid #dce4de;border-radius:5px;background:#fff;font-size:12px;color:#3c5543;cursor:pointer}
@media (max-width:600px){
  .rot-sh-current>strong{font-size:25px}
  .rot-sh-toolbar{gap:8px}
  .rot-sh-toolbar>span{font-size:10px}
  .rot-sh-range{padding:5px 8px;font-size:11px}
  .rot-sh-summary{gap:7px;padding:12px 0}
  .rot-sh-summary>div{padding-left:8px}
  .rot-sh-summary span{font-size:9px;line-height:1.4}
  .rot-sh-summary strong{font-size:15px}
  .rot-sh-summary small{font-size:9px}
  .rot-sh-key li{align-items:flex-start}
  .rot-sh-key li i{margin-top:7px}
  .rot-sh-key li.is-band i{margin-top:3px}
  .rot-sh-key li b{max-width:48%;white-space:normal}
  .rot-sh-change{grid-template-columns:1fr 65px 87px;gap:5px;font-size:11px}
  .rot-sh-change.rot-sh-change-head{font-size:9px}
}

/* Settings: price mode (OFF / OBSERVE / LIVE) and the daily limit */
.rot-set-h{margin:20px 0 10px;color:var(--faint);font-size:11.5px;font-weight:700;letter-spacing:.4px;text-transform:uppercase}
.rot-set-h:first-child{margin-top:0}
.rot-set-h+.rot-setting{border-top:0;padding-top:4px}
.rot-live-set{padding-bottom:16px;border-bottom:1px solid var(--line)}
.rot-live-set>.rot-callout{margin-bottom:12px}
.rot-seg{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:4px;padding:4px;border:1px solid var(--line);border-radius:12px;background:var(--soft)}
.rot-seg-btn{all:unset;display:flex;flex-direction:column;align-items:center;gap:1px;padding:8px 6px;border-radius:9px;color:var(--ink-2);text-align:center;cursor:pointer}
.rot-seg-btn b{font-size:13.5px;font-weight:700}
.rot-seg-btn small{color:var(--faint);font-size:10.5px;font-weight:650;letter-spacing:.3px}
.rot-seg-btn:hover{background:#fff}
.rot-seg-btn[aria-checked=true]{background:#fff;color:var(--accent);box-shadow:0 1px 2px rgba(16,24,40,.08),0 0 0 1px var(--accent-line)}
.rot-seg-btn.rot-seg-observe[aria-checked=true]{color:var(--warn);box-shadow:0 1px 2px rgba(16,24,40,.08),0 0 0 1px #f3d9a6}
.rot-seg-btn.rot-seg-live[aria-checked=true]{color:var(--ok);box-shadow:0 1px 2px rgba(16,24,40,.08),0 0 0 1px #bfe5d4}
.rot-seg-btn:disabled{opacity:.55;cursor:default}
.rot-seg-btn:focus-visible{outline:2px solid var(--accent-2);outline-offset:1px}
.rot-mode-note{margin:10px 0 0;color:var(--ink-2);font-size:12.5px;line-height:1.55}
.rot-confirm{margin-top:12px;padding:12px 14px;border-radius:11px;background:var(--warn-soft);color:#6b3f04;font-size:13px;line-height:1.5}
.rot-confirm p{margin:0 0 10px}
.rot-confirm-actions{display:flex;gap:6px;flex-wrap:wrap}
.rot-limit{display:flex;align-items:center;gap:8px;margin:16px 0 0;color:var(--ink-2);font-size:13px;font-weight:600}
.rot .rot-limit input{width:72px;height:34px;padding:0 8px;border:1px solid #cfd6e0;border-radius:9px;background:#fff;text-align:right;font-size:14px;box-shadow:none}
.rot .rot-limit input:focus{border-color:var(--accent-2);box-shadow:0 0 0 3px rgba(124,58,237,.14)}
.rot .rot-limit input:disabled{background:var(--soft);color:var(--faint)}
.rot-limit-note{margin:6px 0 0;color:var(--muted);font-size:12px;line-height:1.5}

@media (max-width:900px){
  .rot .rot-table th:nth-child(2){width:130px}.rot .rot-table th:nth-child(3){width:90px}.rot .rot-table th:nth-child(4){width:90px}.rot .rot-table th:nth-child(5){width:210px}
  .rot .rot-table.rot-table-live th:nth-child(2){width:120px}.rot .rot-table.rot-table-live th:nth-child(3){width:120px}.rot .rot-table.rot-table-live th:nth-child(4){width:210px}.rot .rot-table.rot-table-live th:nth-child(5){width:90px}
  .rot .rot-price small{white-space:normal}
  .rot-top{grid-template-columns:1fr}
  .rot-help-grid{grid-template-columns:1fr}
}
@media (max-width:720px){
  .rot-head{flex-direction:column;gap:12px}
  .rot-head-actions{width:100%;flex-wrap:wrap}
  .rot-mode{order:3;width:100%;justify-content:center}
  .rot-hero{font-size:36px}
  .rot-chart-head{flex-direction:column;gap:1px}
  .rot-bars{gap:3px;height:110px}.rot-axis{gap:3px}.rot-bar b{display:none}.rot-axis span{font-size:9.5px}
  .rot-products-head{padding:10px 14px 0;gap:4px}
  .rot-toolbar{padding:12px 14px}.rot-sort{margin-left:0}
  .rot .rot-table,.rot .rot-table tbody{display:block}
  .rot .rot-table thead{display:none}
  .rot .rot-table tr{display:grid;grid-template-columns:1fr 1fr;gap:8px 14px;padding:14px;border-bottom:1px solid var(--line-2)}
  .rot .rot-table td{display:block;padding:0!important;border:0}
  .rot .rot-table td:first-child{grid-column:1/-1}
  .rot .rot-table td.rot-r{text-align:left}
  .rot .rot-table td[data-label]::before{content:attr(data-label);display:block;margin-bottom:2px;color:var(--faint);font-size:11px;font-weight:600}
  .rot-more{padding:12px 14px}
  .rot-facts{grid-template-columns:1fr}
  .rot-bulk-row{grid-template-columns:minmax(0,1fr) 92px;grid-template-areas:"prod prod" "date none" "hint stock";row-gap:5px}
  .rot-bulk-prod{grid-area:prod}.rot-bulk-row .rot-date{grid-area:date}.rot-bulk-none{grid-area:none}.rot-bulk-row .rot-hint{grid-area:hint}.rot-bulk-stock{grid-area:stock}
  .rot .rot-table.rot-table-live td:nth-child(3){grid-column:1/-1;grid-row:2}
  .rot-seg-btn{padding:8px 3px}.rot-seg-btn b{font-size:13px}
  .rot-live{padding:12px}.rot-live .rot-facts{grid-template-columns:1fr 1fr}
  .rot .offer-thumbnail-frame.rot-thumb-lg{width:96px;height:96px}
}
@media (prefers-reduced-motion:reduce){.rot *{animation:none!important;transition:none!important}}
