:root {
  --bg:#f4f5f8; --surface:#ffffff; --surface-2:#f8f9fb; --text:#0f172a; --text-2:#334155; --muted:#64748b; --line:#e6e8ee; --line-strong:#d5d9e2;
  --accent:#4338ca; --accent-hover:#3730a3; --accent-soft:#eef0ff;
  --ok:#0f766e; --ok-soft:#e6f6f3; --warn:#b45309; --warn-soft:#fef6e7; --bad:#b91c1c; --bad-soft:#fdecec; --info:#1d4ed8; --info-soft:#e8f0fe;
  --side:#0f172a; --side-text:#cbd5e1; --side-active:#1e293b;
  --shadow:0 1px 2px rgba(15,23,42,.04),0 1px 3px rgba(15,23,42,.05);
  --shadow-lg:0 20px 50px rgba(15,23,42,.22);
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg:#0b0d12; --surface:#13161d; --surface-2:#181c25; --text:#eef0f4; --text-2:#c5cad5; --muted:#8b93a3; --line:#242934; --line-strong:#323846;
    --accent:#8b93ff; --accent-hover:#a8aeff; --accent-soft:#1d2140;
    --ok:#4fd1b5; --ok-soft:#0f2622; --warn:#f5b84b; --warn-soft:#2a2110; --bad:#f58a8a; --bad-soft:#2d1717; --info:#7aa7ff; --info-soft:#14223d;
    --side:#0e1016; --side-text:#9aa3b5; --side-active:#1a1e29;
    --shadow:none; --shadow-lg:0 20px 50px rgba(0,0,0,.6);
  }
}
* { box-sizing:border-box; }
html { -webkit-text-size-adjust:100%; }
body { margin:0; font:14px/1.5 "Inter",system-ui,-apple-system,"Segoe UI",Roboto,sans-serif; background:var(--bg); color:var(--text); -webkit-font-smoothing:antialiased; font-feature-settings:"cv11","ss01"; }
[hidden] { display:none !important; }
h1,h2,h3,p { margin:0; }
svg { width:18px; height:18px; fill:none; stroke:currentColor; stroke-width:1.8; stroke-linecap:round; stroke-linejoin:round; flex:none; }
.muted { color:var(--muted); }
.spacer { flex:1; }

/* ---------- logowanie ---------- */
.login { min-height:100vh; display:grid; place-items:center; padding:20px; background:radial-gradient(1000px 500px at 50% -10%, var(--accent-soft), transparent), var(--bg); }
.login-card { width:100%; max-width:380px; background:var(--surface); border:1px solid var(--line); border-radius:16px; padding:32px; box-shadow:var(--shadow-lg); display:flex; flex-direction:column; gap:16px; }
.login-card h1 { font-size:1.4rem; font-weight:650; letter-spacing:-.02em; margin-top:8px; }
.login-card .muted { margin-top:-10px; }
.brand { display:flex; align-items:center; gap:10px; font-weight:650; letter-spacing:-.01em; }
.logo { width:26px; height:26px; border-radius:8px; background:linear-gradient(135deg,var(--brand-a,#6366f1),var(--brand-b,#a78bfa)); box-shadow:inset 0 0 0 1px rgba(255,255,255,.2); }

/* ---------- układ aplikacji ---------- */
.app { display:grid; grid-template-columns:240px 1fr; min-height:100vh; }
.side { position:sticky; top:0; height:100vh; background:var(--side); color:var(--side-text); display:flex; flex-direction:column; padding:20px 14px; gap:24px; }
.side .brand { color:#fff; padding:0 8px; }
.side nav { display:flex; flex-direction:column; gap:2px; flex:1; }
.nav-item { text-decoration:none; display:flex; align-items:center; gap:12px; width:100%; height:40px; padding:0 12px; border:0; border-radius:8px; background:none; color:var(--side-text); font:inherit; font-weight:500; cursor:pointer; text-align:left; justify-content:flex-start; transition:background .15s,color .15s; }
.nav-item:hover { background:var(--side-active); color:#fff; }
.nav-item.active { background:var(--side-active); color:#fff; box-shadow:inset 3px 0 0 #818cf8; }
.content { min-width:0; }
.page-head { display:flex; justify-content:space-between; align-items:flex-end; gap:16px; flex-wrap:wrap; padding:32px 36px 20px; max-width:1240px; margin:0 auto; }
.page-head h1 { font-size:1.55rem; font-weight:700; letter-spacing:-.025em; }
.page-head p { margin-top:2px; }
main { max-width:1240px; margin:0 auto; padding:0 36px 56px; }

/* ---------- karty / formularze ---------- */
.card { background:var(--surface); border:1px solid var(--line); border-radius:14px; padding:22px; margin-bottom:20px; box-shadow:var(--shadow); }
.card.flush { padding:0; overflow:hidden; }
label { display:flex; flex-direction:column; gap:6px; font-size:.78rem; font-weight:550; color:var(--text-2); }
label.check { flex-direction:row; align-items:center; gap:8px; font-size:.88rem; font-weight:450; color:var(--text-2); cursor:pointer; white-space:nowrap; }
input,select,button { font:inherit; }
input:not([type=checkbox]),select { height:38px; padding:0 12px; border:1px solid var(--line-strong); border-radius:9px; background:var(--surface); color:var(--text); min-width:0; transition:border-color .15s,box-shadow .15s; }
input[type=date] { padding-right:8px; }
input::placeholder { color:var(--muted); opacity:.8; }
input:focus-visible,select:focus-visible { outline:none; border-color:var(--accent); box-shadow:0 0 0 3px color-mix(in srgb,var(--accent) 20%,transparent); }
input[type=checkbox] { width:16px; height:16px; accent-color:var(--accent); margin:0; }
button { height:38px; padding:0 16px; border-radius:9px; border:1px solid var(--line-strong); background:var(--surface); color:var(--text); cursor:pointer; font-weight:550; display:inline-flex; align-items:center; justify-content:center; gap:8px; white-space:nowrap; transition:background .15s,border-color .15s,box-shadow .15s; }
button:hover { background:var(--surface-2); }
button:focus-visible { outline:none; box-shadow:0 0 0 3px color-mix(in srgb,var(--accent) 28%,transparent); }
button.primary { background:var(--accent); border-color:var(--accent); color:#fff; }
button.primary:hover { background:var(--accent-hover); border-color:var(--accent-hover); }
button.ghost { border-color:transparent; background:none; color:var(--muted); }
button.ghost:hover { background:var(--surface-2); color:var(--text); }
button.danger { color:var(--bad); border-color:color-mix(in srgb,var(--bad) 40%,var(--line)); }
button.danger:hover { background:var(--bad-soft); }
button.block { width:100%; }
button:disabled { opacity:.5; cursor:default; }
.sm { height:30px; padding:0 11px; font-size:.82rem; border-radius:7px; }
.error { color:var(--bad); min-height:1.2em; font-size:.86rem; }

/* ---------- statystyki ---------- */
.stats { display:grid; grid-template-columns:repeat(auto-fit,minmax(170px,1fr)); gap:16px; margin-bottom:20px; }
.stat { background:var(--surface); border:1px solid var(--line); border-radius:14px; padding:18px 20px; box-shadow:var(--shadow); }
.stat .label { font-size:.78rem; font-weight:550; color:var(--muted); display:flex; align-items:center; gap:8px; }
.stat .value { font-size:1.75rem; font-weight:700; letter-spacing:-.03em; margin-top:6px; line-height:1.15; font-variant-numeric:tabular-nums; }
.stat .hint { font-size:.8rem; color:var(--muted); margin-top:4px; }
.stat.warn .value { color:var(--warn); } .stat.bad .value { color:var(--bad); }

/* ---------- pasek filtrów ---------- */
.toolbar { padding:16px 20px; border-bottom:1px solid var(--line); display:flex; flex-direction:column; gap:14px; }
.toolbar-row { display:flex; gap:10px; flex-wrap:wrap; align-items:center; }
.chips { display:flex; gap:6px; flex-wrap:wrap; }
.chip { height:30px; padding:0 13px; border-radius:99px; border:1px solid var(--line-strong); background:var(--surface); font-size:.82rem; font-weight:550; color:var(--text-2); }
.chip:hover { background:var(--surface-2); }
.chip.on { background:var(--text); border-color:var(--text); color:var(--bg); }
.search { position:relative; flex:1 1 280px; min-width:200px; }
.search svg { position:absolute; left:12px; top:10px; width:17px; height:17px; color:var(--muted); pointer-events:none; }
.search input { width:100%; padding-left:38px !important; }

/* ---------- tabele ---------- */
.table-wrap { overflow-x:auto; }
table { width:100%; border-collapse:collapse; }
th,td { text-align:left; padding:14px 12px; border-bottom:1px solid var(--line); white-space:nowrap; vertical-align:middle; }
th { font-size:.72rem; color:var(--muted); font-weight:600; text-transform:uppercase; letter-spacing:.05em; background:var(--surface-2); padding-top:10px; padding-bottom:10px; }
th:first-child,td:first-child { padding-left:20px; } th:last-child,td:last-child { padding-right:20px; }
tbody tr:last-child td { border-bottom:0; }
.num { text-align:right !important; font-variant-numeric:tabular-nums; }
.ctr { text-align:center !important; }
td.strong { font-weight:650; }
tbody tr.clickable { cursor:pointer; transition:background .12s; }
tbody tr.clickable:hover { background:var(--surface-2); }
.cell-title { font-weight:650; color:var(--text); }
.cell-sub { font-size:.8rem; color:var(--muted); }
.empty { text-align:center; padding:56px 20px !important; color:var(--muted); }
.empty strong { display:block; color:var(--text); font-size:1rem; margin-bottom:4px; }
.tenant { display:inline-flex; align-items:center; gap:6px; font-size:.78rem; color:var(--text-2); margin-top:2px; }
.tenant i { width:7px; height:7px; border-radius:50%; display:inline-block; }
.dot-ok { color:var(--ok); } .dot-bad { color:var(--warn); }
.pager { display:flex; justify-content:space-between; align-items:center; padding:12px 20px; border-top:1px solid var(--line); }
.pager-btns { display:flex; gap:6px; }
.pager button { height:32px; font-size:.84rem; }

/* ---------- statusy ---------- */
.badge { display:inline-flex; align-items:center; gap:6px; padding:3px 10px; border-radius:99px; font-size:.76rem; font-weight:600; background:var(--surface-2); color:var(--muted); line-height:1.5; }
.badge::before { content:""; width:6px; height:6px; border-radius:50%; background:currentColor; }
.badge.PAID { color:var(--info); background:var(--info-soft); }
.badge.FULFILLED { color:var(--warn); background:var(--warn-soft); }
.badge.SHIPPED { color:var(--ok); background:var(--ok-soft); }
.badge.CANCELED,.badge.REFUNDED { color:var(--bad); background:var(--bad-soft); }
.badge.on { color:var(--ok); background:var(--ok-soft); } .badge.off { color:var(--muted); }

/* ---------- baner ---------- */
.banner { display:flex; flex-wrap:wrap; align-items:center; gap:10px 14px; padding:12px 16px; border-radius:12px; margin-bottom:16px; background:var(--warn-soft); color:var(--warn); border:1px solid color-mix(in srgb,var(--warn) 28%,transparent); font-weight:550; }
.banner.EXCEEDED { background:var(--bad-soft); color:var(--bad); border-color:color-mix(in srgb,var(--bad) 28%,transparent); }
.banner button { height:30px; font-size:.82rem; margin-left:auto; background:var(--surface); }

/* ---------- panel boczny ze szczegółami ---------- */
dialog.drawer { margin:0 0 0 auto; width:min(560px,100vw); max-width:100vw; height:100vh; max-height:100vh; border:0; border-left:1px solid var(--line); border-radius:0; padding:0; background:var(--surface); color:var(--text); box-shadow:var(--shadow-lg); overflow:hidden; }
dialog.drawer[open] { display:flex; flex-direction:column; animation:slide .22s cubic-bezier(.2,.8,.2,1); }
dialog.drawer::backdrop { background:rgba(15,23,42,.45); backdrop-filter:blur(2px); }
@keyframes slide { from { transform:translateX(40px); opacity:0; } to { transform:none; opacity:1; } }
.d-head { padding:22px 24px 18px; border-bottom:1px solid var(--line); display:flex; justify-content:space-between; gap:12px; align-items:flex-start; }
.d-head h2 { font-size:1.25rem; font-weight:700; letter-spacing:-.02em; display:flex; align-items:center; gap:10px; flex-wrap:wrap; }
.d-head .muted { margin-top:2px; }
.x { width:34px; height:34px; padding:0; border-radius:8px; }
.d-body { flex:1; overflow-y:auto; padding:22px 24px; display:flex; flex-direction:column; gap:22px; }
.d-foot { padding:14px 24px; border-top:1px solid var(--line); display:flex; gap:8px; flex-wrap:wrap; align-items:center; background:var(--surface-2); }
.d-foot:empty { display:none; }
.sec h3 { font-size:.72rem; font-weight:650; text-transform:uppercase; letter-spacing:.06em; color:var(--muted); margin-bottom:10px; }
dl { display:grid; grid-template-columns:130px 1fr; gap:8px 16px; margin:0; }
dt { color:var(--muted); } dd { margin:0; word-break:break-word; color:var(--text); }
.box { background:var(--surface-2); border:1px solid var(--line); border-radius:12px; padding:14px 16px; }
.box.table-wrap { padding:0; overflow:hidden; }
.box table th { background:transparent; } .box th:first-child,.box td:first-child { padding-left:14px; }
.amount { font-size:1.9rem; font-weight:700; letter-spacing:-.03em; font-variant-numeric:tabular-nums; }
.ship-form { display:grid; grid-template-columns:1fr 1fr; gap:12px; }
.ship-form .full { grid-column:1/-1; }

/* oś statusu */
.steps { display:grid; grid-template-columns:repeat(3,1fr); gap:0; }
.step { position:relative; text-align:center; font-size:.8rem; color:var(--muted); }
.step::before { content:""; position:absolute; top:11px; left:-50%; right:50%; height:2px; background:var(--line-strong); }
.step:first-child::before { display:none; }
.step.done::before { background:var(--ok); }
.step .pt { position:relative; z-index:1; width:24px; height:24px; margin:0 auto 6px; border-radius:50%; background:var(--surface); border:2px solid var(--line-strong); display:grid; place-items:center; }
.step.done .pt { background:var(--ok); border-color:var(--ok); color:#fff; }
.step.done .pt svg { width:13px; height:13px; stroke-width:3; }
.step.cur .pt { border-color:var(--accent); box-shadow:0 0 0 4px color-mix(in srgb,var(--accent) 18%,transparent); }
.step b { display:block; color:var(--text); font-weight:600; }

/* ---------- produkty ---------- */
.form-grid { display:grid; grid-template-columns:repeat(auto-fit,minmax(200px,1fr)); gap:16px; align-items:end; }
.form-grid h3 { grid-column:1/-1; font-size:1rem; font-weight:650; }
.form-grid .wide { grid-column:span 2; } .form-grid .actions { grid-column:1/-1; display:flex; gap:8px; }
.actions-cell { display:flex; gap:6px; justify-content:flex-end; }

/* ---------- obrót ---------- */
.big { font-size:2.8rem; font-weight:700; letter-spacing:-.035em; line-height:1.1; font-variant-numeric:tabular-nums; }
.bar { height:12px; border-radius:99px; background:var(--surface-2); border:1px solid var(--line); overflow:hidden; margin:22px 0 10px; position:relative; }
.bar > span { display:block; height:100%; border-radius:99px; background:linear-gradient(90deg,#14b8a6,#0f766e); transition:width .5s; }
.bar.WARNING > span { background:linear-gradient(90deg,#f59e0b,#d97706); } .bar.EXCEEDED > span { background:linear-gradient(90deg,#ef4444,#b91c1c); }
.bar-labels { display:flex; justify-content:space-between; gap:12px; flex-wrap:wrap; font-size:.84rem; color:var(--muted); margin-bottom:24px; }
.year { display:flex; align-items:center; gap:8px; }
.year input { width:96px; }

#toast { position:fixed; bottom:24px; left:50%; transform:translate(-50%,12px); background:var(--text); color:var(--bg); padding:11px 18px; border-radius:10px; opacity:0; pointer-events:none; transition:opacity .2s,transform .2s; max-width:90vw; box-shadow:0 10px 30px rgba(0,0,0,.3); font-weight:550; z-index:100; }
#toast.show { opacity:1; transform:translate(-50%,0); }

/* ---------- mobile ---------- */
@media (max-width:900px) {
  .app { grid-template-columns:1fr; }
  .side { position:sticky; z-index:20; height:auto; flex-direction:row; align-items:center; padding:8px 12px; gap:8px; overflow-x:auto; }
  .side .brand span:last-child { display:none; }
  .side nav { overflow-x:auto; }
  .side nav { flex-direction:row; flex:1; }
  .nav-item { width:auto; height:36px; padding:0 12px; } .nav-item.active { box-shadow:none; }
  .page-head { padding:20px 16px 14px; } main { padding:0 16px 40px; }
  .card { padding:16px; }
  .stat .value { font-size:1.5rem; }
  th:first-child,td:first-child { padding-left:14px; } th:last-child,td:last-child { padding-right:14px; }
  dl { grid-template-columns:1fr; gap:0; } dt { margin-top:10px; font-size:.8rem; }
  .form-grid .wide { grid-column:auto; }
  .big { font-size:2.1rem; }
  .head-tools { width:100%; justify-content:space-between; }
  .user-text { display:none; }
  .two-col { grid-template-columns:1fr; }
  .modal-card { padding:20px; }
  dialog.modal { max-width:calc(100vw - 24px); }
}
@media (max-width:520px) {
  .login-card { padding:24px 20px; }
  .tenant-switch select { max-width:150px; }
  .toolbar-row > * { flex:1 1 100%; }
  .toolbar-row .chip, .chips .chip { flex:0 0 auto; }
  .ship-form { grid-template-columns:1fr; }
  .d-foot button { flex:1 1 auto; }
}

/* ---------- dostepnosc / wspolne ---------- */
.sr { position:absolute !important; width:1px; height:1px; overflow:hidden; clip:rect(0 0 0 0); white-space:nowrap; border:0; padding:0; margin:-1px; }
.skip { position:absolute; left:8px; top:-48px; z-index:200; background:var(--accent); color:#fff; padding:8px 14px; border-radius:8px; text-decoration:none; }
.skip:focus { top:8px; }
a:focus-visible, tr:focus-visible, .nav-item:focus-visible { outline:2px solid var(--accent); outline-offset:-2px; border-radius:6px; }
.nav-item:focus-visible { outline-color:#a5b4fc; }
main:focus { outline:none; }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation-duration:.01ms !important; transition-duration:.01ms !important; scroll-behavior:auto !important; } }

.spinner { width:16px; height:16px; border:2px solid var(--line-strong); border-top-color:var(--accent); border-radius:50%; display:inline-block; animation:spin .7s linear infinite; vertical-align:-3px; margin-right:8px; }
.spinner.big { width:28px; height:28px; border-width:3px; margin:0; }
@keyframes spin { to { transform:rotate(360deg); } }
button.loading { position:relative; color:transparent !important; pointer-events:none; }
button.loading::after { content:""; position:absolute; width:16px; height:16px; border:2px solid rgba(255,255,255,.45); border-top-color:#fff; border-radius:50%; animation:spin .7s linear infinite; }
button:not(.primary).loading::after { border-color:var(--line-strong); border-top-color:var(--accent); }
.boot { min-height:100vh; display:flex; flex-direction:column; align-items:center; justify-content:center; gap:12px; }

/* ---------- logowanie ---------- */
.login-card .lead { margin-top:-8px; }
.login-card input:not([type=checkbox]) { height:42px; }
.notice { padding:10px 14px; border-radius:10px; background:var(--info-soft); color:var(--info); font-size:.88rem; font-weight:500; border:1px solid color-mix(in srgb,var(--info) 25%,transparent); }
.notice.bad { background:var(--bad-soft); color:var(--bad); border-color:color-mix(in srgb,var(--bad) 28%,transparent); }
.pw { position:relative; display:flex; }
.pw input { flex:1; padding-right:70px !important; width:100%; }
.pw-toggle { position:absolute; right:4px; top:4px; height:30px !important; padding:0 10px; font-size:.8rem; }
.error:empty { display:none; }
.modal-error:empty { display:none; }
.login-card .error { min-height:0; }

/* ---------- naglowek: sklep + uzytkownik ---------- */
.titles { min-width:0; }
.head-tools { display:flex; align-items:center; gap:10px; flex-wrap:wrap; }
.tenant-switch { flex-direction:row; }
.tenant-switch select { min-width:160px; }
.user { position:relative; }
.user-btn { height:42px; padding:0 10px 0 6px; gap:10px; border-radius:99px; }
.avatar { width:30px; height:30px; border-radius:50%; background:linear-gradient(135deg,var(--brand-a,#6366f1),var(--brand-b,#a78bfa)); color:#fff; display:grid; place-items:center; font-weight:700; font-size:.85rem; }
.user-text { display:flex; flex-direction:column; align-items:flex-start; line-height:1.2; text-align:left; }
.user-text small { color:var(--muted); font-weight:500; font-size:.72rem; }
.menu { position:absolute; right:0; top:calc(100% + 8px); min-width:230px; background:var(--surface); border:1px solid var(--line); border-radius:12px; box-shadow:var(--shadow-lg); padding:6px; z-index:30; display:flex; flex-direction:column; }
.menu button { justify-content:flex-start; border:0; background:none; height:38px; border-radius:8px; width:100%; font-weight:500; }
.menu button:hover { background:var(--surface-2); }
.menu-head { padding:8px 10px 10px; display:flex; flex-direction:column; border-bottom:1px solid var(--line); margin-bottom:6px; word-break:break-all; }

/* ---------- modal ---------- */
dialog.modal { border:1px solid var(--line); border-radius:16px; padding:0; background:var(--surface); color:var(--text); box-shadow:var(--shadow-lg); width:min(460px,100vw - 24px); }
dialog.modal::backdrop { background:rgba(15,23,42,.5); backdrop-filter:blur(2px); }
.modal-card { padding:26px; display:flex; flex-direction:column; gap:14px; }
.modal-card h2 { font-size:1.2rem; font-weight:700; letter-spacing:-.02em; }
.modal-body { display:flex; flex-direction:column; gap:14px; }
.modal-actions { display:flex; gap:8px; justify-content:flex-end; flex-wrap:wrap; }
.modal-card .error { min-height:0; }
small.muted { font-weight:400; font-size:.76rem; line-height:1.4; }

/* ---------- przeglad ---------- */
.stat.link { text-decoration:none; color:inherit; display:block; transition:border-color .15s, transform .15s; }
.stat.link:hover { border-color:var(--accent); transform:translateY(-1px); }
.stat.accent .value { color:var(--accent); }
.two-col { display:grid; grid-template-columns:minmax(0,1.15fr) minmax(0,1fr); gap:20px; align-items:start; }
.two-col .card { margin-bottom:0; }
.card-head { display:flex; justify-content:space-between; align-items:center; gap:12px; padding:16px 20px; border-bottom:1px solid var(--line); }
.card-head h3 { font-size:.95rem; font-weight:650; display:flex; align-items:center; gap:8px; }
.count { background:var(--warn-soft); color:var(--warn); border-radius:99px; font-size:.75rem; padding:1px 9px; font-weight:700; }
.muted-link { color:var(--muted); text-decoration:none; font-size:.84rem; font-weight:550; } .muted-link:hover { color:var(--accent); }
.rows { list-style:none; margin:0; padding:0; }
.rows li { display:flex; align-items:center; justify-content:space-between; gap:12px; padding:10px 20px; border-bottom:1px solid var(--line); }
.rows li:last-child { border-bottom:0; }
.row-main { display:flex; flex-direction:column; align-items:flex-start; height:auto; padding:4px 0; border:0; background:none; text-align:left; white-space:normal; min-width:0; font-weight:500; }
.row-main:hover { background:none; color:var(--accent); }
.row-main .cell-sub { word-break:break-all; }
.ok-note { display:flex; align-items:center; gap:10px; padding:22px 20px; color:var(--text-2); }
.pad { padding:0 20px 14px; }
.limit { display:flex; flex-direction:column; gap:10px; }
.limit-head { display:flex; justify-content:space-between; gap:12px; }
.limit-head h3 { font-size:.95rem; font-weight:650; }
.limit-row { display:flex; align-items:baseline; gap:12px; flex-wrap:wrap; }
.sm-big { font-size:1.9rem; }
.limit .bar { margin:4px 0 0; }
.limit .banner { margin-bottom:0; }
.empty-block { text-align:center; padding:40px 20px; color:var(--muted); }
.empty-block strong { display:block; color:var(--text); margin-bottom:4px; }
.empty .spinner { margin-right:10px; }
.empty .sm { margin-top:12px; }

/* ---------- uzytkownicy / historia ---------- */
.badge.role-ADMIN { color:var(--accent); background:var(--accent-soft); }
.you { margin-left:8px; font-size:.7rem; font-weight:600; color:var(--accent); background:var(--accent-soft); padding:1px 8px; border-radius:99px; }
.history { list-style:none; margin:0; padding:0 0 0 14px; border-left:2px solid var(--line-strong); display:flex; flex-direction:column; gap:12px; }
.history li { position:relative; }
.history li::before { content:""; position:absolute; left:-20px; top:7px; width:8px; height:8px; border-radius:50%; background:var(--accent); }
.banner.WARNING { }
.toolbar .muted { max-width:70ch; }
#toast.error { background:var(--bad); color:#fff; }
tr.clickable:focus-visible td { background:var(--surface-2); }
@media (max-width:900px) { .two-col { grid-template-columns:1fr; } .row-main { flex:1; } }

/* ---------- sklepy, zaznaczanie, ostrzezenia ---------- */
.sel-col { width:36px; padding-right:0 !important; }
.sel-col input { cursor:pointer; }
.warn-box { background:var(--warn-soft); border-color:color-mix(in srgb,var(--warn) 30%,transparent); color:var(--text); }
.warn-box b { color:var(--warn); display:block; margin-bottom:4px; }
.warn-box p { color:var(--text-2); }
.tenant-list { display:flex; gap:10px; flex-wrap:wrap; }
.tenant-checks { border:1px solid var(--line-strong); border-radius:10px; padding:10px 14px; display:flex; flex-direction:column; gap:8px; margin:0; min-width:0; }
.tenant-checks legend { font-size:.78rem; font-weight:550; color:var(--text-2); padding:0 6px; }
.tenant-checks:disabled { opacity:.5; }
tr.total td { font-weight:650; border-top:2px solid var(--line-strong); background:var(--surface-2); }
.pad-y { margin:18px 0; }
.toolbar-row #csv-btn { margin-left:auto; }

/* ---------- odswiezanie ---------- */
.refresh-bar { display:flex; align-items:center; gap:12px; flex-wrap:wrap; }
.refresh-btn svg { width:15px; height:15px; }
.refresh-btn.busy svg { animation:spin .8s linear infinite; }
.last-refresh { font-size:.8rem; font-variant-numeric:tabular-nums; }
.last-refresh.err { color:var(--bad); }
.refresh-bar .auto { font-size:.8rem; color:var(--muted); }
.live { display:inline-flex; }
.new-badge { height:26px; padding:0 11px; font-size:.78rem; border-radius:99px; background:var(--accent-soft); color:var(--accent); border-color:color-mix(in srgb,var(--accent) 30%,transparent); }
tr.is-new td { background:color-mix(in srgb,var(--accent) 7%,transparent); }
@media (max-width:900px) { .refresh-bar { width:100%; } }
#page-actions { flex-basis:100%; } #page-actions:empty { display:none; }
