/* =====================================================================
   Panele: superadministrator platformy i panel firmy. Układ z boczną
   nawigacją, pasek tytułu, karty, tabele, formularze w sekcjach.
   Komponenty wspólne (przyciski, pola, okna): base.css.
   ===================================================================== */

/* ───────────── Układ ───────────── */
.shell { display: grid; grid-template-columns: var(--side-w) minmax(0, 1fr); min-height: 100dvh; }
.side {
  position: sticky; top: 0; height: 100dvh; display: grid; grid-template-rows: auto auto minmax(0, 1fr) auto;
  background: var(--surface); border-right: 1px solid var(--line); z-index: 30;
}
.side-brand { display: flex; align-items: center; gap: 10px; padding: 18px 18px 14px; text-decoration: none; color: var(--ink); }
.wordmark { font: 700 19px/1 var(--display); font-stretch: 116%; letter-spacing: .01em; }
.wordmark .dot { display: inline-block; width: 7px; height: 7px; border-radius: 2px; background: var(--accent); margin-left: 3px; transform: translateY(-1px); }
.side-brand .scope { font: 500 11.5px/1.2 var(--text); color: var(--muted); display: block; margin-top: 4px; }
.side-company { margin: 0 12px 6px; padding: 10px 12px; border-radius: var(--r-md); background: var(--rail); border: 1px solid var(--line); display: grid; gap: 5px; }
.side-company .nm { font-weight: 600; font-size: 13.5px; line-height: 1.25; overflow-wrap: anywhere; }
.side-company .meta { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; font-size: 12px; color: var(--muted); }
.side-nav { overflow-y: auto; padding: 6px 10px 16px; display: grid; align-content: start; gap: 14px; overscroll-behavior: contain; }
.nav-group { display: grid; gap: 2px; }
.nav-group > .nav-label { font: 600 11.5px/1.2 var(--text); color: var(--faint); padding: 6px 10px 4px; }
.nav-link {
  display: flex; align-items: center; gap: 10px; height: 36px; padding: 0 10px; border-radius: var(--r-md);
  color: var(--ink-2); text-decoration: none; font-size: 13.5px; font-weight: 500;
}
.nav-link svg.i { width: 17px; height: 17px; color: var(--muted); }
.nav-link:hover { background: var(--rail); color: var(--ink); }
.nav-link[aria-current="page"] { background: var(--ink); color: var(--on-ink); }
.nav-link[aria-current="page"] svg.i { color: inherit; }
.nav-link .count { margin-left: auto; font: 600 11px/1 var(--text); padding: 3px 6px; border-radius: 99px; background: var(--accent-soft); color: var(--accent); }
.nav-link[aria-current="page"] .count { background: color-mix(in srgb, var(--on-ink) 18%, transparent); color: inherit; }
.side-user { border-top: 1px solid var(--line); padding: 12px; display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 10px; align-items: center; }
.avatar { width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; background: var(--accent-soft); color: var(--accent); font: 700 12.5px/1 var(--display); font-stretch: 110%; flex: none; }
.avatar.lg { width: 46px; height: 46px; font-size: 16px; }
.side-user .who { min-width: 0; }
.side-user .who b { display: block; font-size: 13px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.side-user .who span { display: block; font-size: 12px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.side-user form { margin: 0; }

.main { min-width: 0; display: grid; grid-template-rows: auto auto minmax(0, 1fr); }
.top {
  position: sticky; top: 0; z-index: 20; display: flex; align-items: center; gap: 12px; min-height: 56px;
  padding: 8px 28px; background: color-mix(in srgb, var(--canvas) 92%, transparent); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
  border-bottom: 1px solid color-mix(in srgb, var(--line) 70%, transparent);
}
.crumbs { display: flex; align-items: center; gap: 6px; font-size: 13px; color: var(--muted); min-width: 0; flex-wrap: wrap; }
.crumbs a { color: var(--muted); text-decoration: none; }
.crumbs a:hover { color: var(--ink); text-decoration: underline; }
.crumbs svg.i { width: 13px; height: 13px; color: var(--faint); }
.crumbs .cur { color: var(--ink); font-weight: 500; }
.top-actions { margin-left: auto; display: flex; align-items: center; gap: 6px; }
.menu-btn { display: none; }
.content { padding: 24px 28px 64px; width: 100%; max-width: 1360px; display: grid; gap: 20px; align-content: start; }
.content.wide { max-width: none; }

/* Pasek trybu wsparcia / zalogowania jako inny użytkownik */
.banner { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; padding: 9px 28px; font-size: 13px; }
.banner svg.i { width: 17px; height: 17px; }
.banner form { margin: 0 0 0 auto; }
.banner.support { background: #1E2A38; color: #fff; }
.banner.support .btn { height: 30px; background: #fff; color: #111418; border-color: #fff; }
.banner.license { background: var(--warn-soft); color: var(--warn); }
.banner.license a { color: inherit; font-weight: 600; }
.banner.demo { background: var(--accent-soft); color: var(--accent); }

/* ───────────── Nagłówek strony ───────────── */
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.page-head h1 { margin: 0; font: 700 25px/1.1 var(--display); font-stretch: 112%; letter-spacing: .005em; text-wrap: balance; }
.page-head .lead { margin: 6px 0 0; color: var(--muted); font-size: 13.5px; max-width: 72ch; }
.page-head .actions { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.page-head .title-row { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }

/* ───────────── Karty i siatki ───────────── */
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); min-width: 0; }
.card-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 14px 18px; border-bottom: 1px solid var(--line); flex-wrap: wrap; }
.card-head h2, .card-head h3 { margin: 0; font: 600 15.5px/1.25 var(--display); font-stretch: 106%; }
.card-head .sub { font-size: 12.5px; color: var(--muted); }
.card-body { padding: 16px 18px; display: grid; gap: 14px; align-content: start; }
.card-body.flush { padding: 0; }
.card-foot { padding: 12px 18px; border-top: 1px solid var(--line); background: var(--rail); border-radius: 0 0 var(--r-lg) var(--r-lg); display: flex; gap: 8px; justify-content: flex-end; flex-wrap: wrap; }
.grid { display: grid; gap: 20px; align-items: start; }
.grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid-main { grid-template-columns: minmax(0, 1fr) 340px; }
.stack { display: grid; gap: 20px; align-content: start; }

/* Kafle statystyk */
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 12px; }
.stat { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 14px 16px; display: grid; gap: 4px; text-decoration: none; color: inherit; }
a.stat:hover { border-color: var(--line-strong); }
.stat .k { font-size: 12.5px; color: var(--muted); display: flex; align-items: center; gap: 7px; }
.stat .k svg.i { width: 16px; height: 16px; }
.stat .v { font: 700 26px/1.1 var(--display); font-stretch: 106%; font-variant-numeric: tabular-nums; }
.stat .s { font-size: 12px; color: var(--muted); }

/* Lista opisowa */
.kv { display: grid; grid-template-columns: minmax(120px, 34%) minmax(0, 1fr); gap: 8px 16px; margin: 0; font-size: 13.5px; }
.kv dt { color: var(--muted); }
.kv dd { margin: 0; overflow-wrap: anywhere; }

/* ───────────── Tabele ───────────── */
.table-wrap { overflow-x: auto; border-radius: inherit; }
.table { width: 100%; border-collapse: collapse; font-size: 13.5px; }
.table th { text-align: left; font: 600 12px/1.2 var(--text); color: var(--muted); padding: 11px 14px; border-bottom: 1px solid var(--line); white-space: nowrap; background: var(--surface); }
.table td { padding: 11px 14px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.table tr:last-child td { border-bottom: 0; }
.table tbody tr:hover td { background: var(--row-hover); }
.table .num, .table th.num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.table .act { text-align: right; white-space: nowrap; width: 1%; }
.table .act .btn { height: 30px; }
.table .t-main { font-weight: 600; color: var(--ink); text-decoration: none; }
.table a.t-main:hover { text-decoration: underline; }
.table .t-sub { display: block; font-size: 12px; color: var(--muted); margin-top: 1px; }
.table .t-cell { display: flex; align-items: center; gap: 10px; min-width: 0; }
.table.compact td, .table.compact th { padding: 8px 12px; }
.table input.input, .table select.select { height: 32px; font-size: 13px; }
.row-actions { display: inline-flex; gap: 4px; align-items: center; }

/* Pasek filtrów */
.toolbar { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; padding: 12px 14px; border-bottom: 1px solid var(--line); }
.toolbar .input, .toolbar .select { height: 34px; font-size: 13px; width: auto; }
.toolbar .input-icon { flex: 1 1 240px; max-width: 360px; }
.toolbar .input-icon .input { width: 100%; }
.toolbar .spacer { flex: 1; }
.toolbar .btn { height: 34px; }
.result-info { font-size: 12.5px; color: var(--muted); }

/* Paginacja */
.pager { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 12px 14px; border-top: 1px solid var(--line); flex-wrap: wrap; }
.pager .pages { display: flex; gap: 4px; flex-wrap: wrap; }
.pager a, .pager span.pg { min-width: 32px; height: 32px; display: inline-grid; place-items: center; padding: 0 8px; border-radius: var(--r-md); border: 1px solid var(--line); text-decoration: none; color: var(--ink); font-size: 13px; background: var(--surface); }
.pager a:hover { border-color: var(--line-strong); }
.pager span.pg.cur { background: var(--ink); color: var(--on-ink); border-color: var(--ink); font-weight: 600; }
.pager span.pg.dis { color: var(--faint); }

/* ───────────── Formularze w sekcjach ───────────── */
.form-section { display: grid; grid-template-columns: 280px minmax(0, 1fr); gap: 24px; padding: 20px 0; border-top: 1px solid var(--line); }
.form-section:first-child { border-top: 0; padding-top: 4px; }
.form-section > .fs-info h2 { margin: 0 0 6px; font: 600 15px/1.3 var(--display); font-stretch: 106%; }
.form-section > .fs-info p { margin: 0; font-size: 12.5px; color: var(--muted); line-height: 1.5; }
.form-section > .fs-body { display: grid; gap: 14px; min-width: 0; }
.form-actions {
  position: sticky; bottom: 0; z-index: 10; display: flex; gap: 8px; justify-content: flex-end; align-items: center; flex-wrap: wrap;
  padding: 12px 18px; margin: 4px -18px -16px; background: color-mix(in srgb, var(--surface) 94%, transparent); border-top: 1px solid var(--line);
  border-radius: 0 0 var(--r-lg) var(--r-lg); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px);
}
.form-actions .left { margin-right: auto; font-size: 12.5px; color: var(--muted); }
.perm-group { display: grid; gap: 8px; padding: 12px 14px; border: 1px solid var(--line); border-radius: var(--r-md); background: var(--rail); }
.perm-group > .pg-head { display: flex; justify-content: space-between; gap: 10px; align-items: center; }
.perm-group > .pg-head b { font-size: 13.5px; }
.perm-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px 16px; }
.brand-checks { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 8px; }
.brand-check { display: flex; gap: 10px; align-items: center; padding: 10px 12px; border: 1px solid var(--line); border-radius: var(--r-md); background: var(--surface); cursor: pointer; }
.brand-check:has(input:checked) { border-color: var(--ink); box-shadow: inset 0 0 0 1px var(--ink); }
.brand-check input { accent-color: var(--ink); }
.logo-field { display: flex; gap: 14px; align-items: center; flex-wrap: wrap; }
.logo-box { width: 180px; height: 64px; border: 1px dashed var(--line-strong); border-radius: var(--r-md); display: grid; place-items: center; background: #fff; color: #5A646F; font-size: 12px; overflow: hidden; padding: 6px; }
.logo-box.dark { background: #171B20; color: #A5AEB8; }
.logo-box img { width: 100%; height: 100%; object-fit: contain; display: block; }

/* ───────────── Komunikaty w treści ───────────── */
.alert { display: flex; gap: 10px; align-items: flex-start; padding: 12px 14px; border-radius: var(--r-md); font-size: 13.5px; border: 1px solid transparent; }
.alert svg.i { margin-top: 1px; }
.alert.success { background: var(--ok-soft); color: var(--ok); }
.alert.warning { background: var(--warn-soft); color: var(--warn); }
.alert.error { background: var(--danger-soft); color: var(--danger); }
.alert.info { background: var(--accent-soft); color: var(--accent); }
.alert ul { margin: 4px 0 0; padding-left: 18px; }
.alert .alert-body { display: grid; gap: 2px; }
.secret { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; padding: 10px 12px; border-radius: var(--r-md); background: var(--surface); border: 1px dashed var(--line-strong); color: var(--ink); font-family: ui-monospace, Menlo, Consolas, monospace; font-size: 15px; letter-spacing: .03em; }

/* ───────────── Zakładki ───────────── */
.tabs { display: flex; gap: 2px; border-bottom: 1px solid var(--line); overflow-x: auto; scrollbar-width: none; }
.tabs a, .tabs button { display: inline-flex; align-items: center; gap: 7px; height: 40px; padding: 0 14px; border: 0; background: none; color: var(--muted); text-decoration: none; font-size: 13.5px; font-weight: 500; border-bottom: 2px solid transparent; margin-bottom: -1px; white-space: nowrap; cursor: pointer; }
.tabs a:hover, .tabs button:hover { color: var(--ink); }
.tabs [aria-current="page"], .tabs [aria-selected="true"] { color: var(--ink); border-bottom-color: var(--ink); font-weight: 600; }
.tabs svg.i { width: 16px; height: 16px; }

/* Menu rozwijane (details) */
.dropdown { position: relative; }
.dropdown > summary { list-style: none; }
.dropdown > summary::-webkit-details-marker { display: none; }
.dropdown-menu { position: absolute; right: 0; top: calc(100% + 6px); z-index: 40; min-width: 220px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-md); box-shadow: var(--shadow-pop); padding: 6px; display: grid; gap: 2px; }
.dropdown-menu a, .dropdown-menu button { display: flex; align-items: center; gap: 9px; width: 100%; padding: 8px 10px; border: 0; background: none; border-radius: 6px; font-size: 13.5px; color: var(--ink); text-decoration: none; cursor: pointer; text-align: left; }
.dropdown-menu a:hover, .dropdown-menu button:hover { background: var(--rail); }
.dropdown-menu .danger { color: var(--danger); }
.dropdown-menu hr { border: 0; border-top: 1px solid var(--line); margin: 4px 0; }
.dropdown-menu form { margin: 0; }

/* Oś czasu (dziennik, wiadomości) */
.timeline { display: grid; gap: 0; }
.tl-item { display: grid; grid-template-columns: 34px minmax(0, 1fr); gap: 12px; padding: 12px 18px; border-bottom: 1px solid var(--line); }
.tl-item:last-child { border-bottom: 0; }
.tl-item .tl-ico { width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; background: var(--rail); color: var(--muted); }
.tl-item .tl-ico svg.i { width: 16px; height: 16px; }
.tl-item .tl-t { font-size: 13.5px; }
.tl-item .tl-t b { font-weight: 600; }
.tl-item .tl-s { font-size: 12px; color: var(--muted); margin-top: 2px; }
.msg { display: grid; gap: 4px; padding: 12px 14px; border-radius: var(--r-md); background: var(--rail); border: 1px solid var(--line); max-width: 82%; }
.msg.staff { background: var(--accent-soft); border-color: transparent; justify-self: end; }
.msg .msg-h { font-size: 12px; color: var(--muted); }
.msg .msg-b { white-space: pre-line; font-size: 13.5px; overflow-wrap: anywhere; }
.msgs { display: grid; gap: 10px; }

/* Kafle marek (wybór marki do oferty, lista marek) */
.brand-tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 14px; }
.brand-tile {
  position: relative; display: grid; grid-template-rows: 92px auto; border: 1px solid var(--line); border-radius: var(--r-lg);
  background: var(--surface); text-decoration: none; color: inherit; overflow: hidden; transition: border-color .15s ease, box-shadow .15s ease;
}
a.brand-tile:hover { border-color: var(--ink); box-shadow: inset 0 0 0 1px var(--ink); }
.brand-tile .bt-logo { display: grid; place-items: center; background: #fff; border-bottom: 1px solid var(--line); padding: 14px; }
.brand-tile .bt-logo img { max-height: 58px; max-width: 70%; object-fit: contain; }
.brand-tile .bt-logo .bt-word { font: 700 24px/1 var(--display); font-stretch: 120%; letter-spacing: .04em; color: #111418; }
.brand-tile .bt-body { padding: 12px 14px 14px; display: grid; gap: 4px; }
.brand-tile .bt-name { font: 700 16px/1.2 var(--display); font-stretch: 110%; }
.brand-tile .bt-meta { font-size: 12.5px; color: var(--muted); }
.brand-tile .bt-badge { position: absolute; top: 10px; right: 10px; }
.brand-tile.is-off { cursor: not-allowed; }
.brand-tile.is-off .bt-logo { filter: grayscale(1); opacity: .55; }

/* ───────────── Strona logowania i błędów ───────────── */
.auth { min-height: 100dvh; display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr); background: var(--surface); }
.auth-side { position: relative; background: #12161A; color: #E9EDF1; padding: 40px 48px; display: grid; grid-template-rows: auto 1fr auto; overflow: hidden; }
.auth-side .wordmark { color: #fff; font-size: 22px; }
.auth-side .pitch { align-self: center; max-width: 30ch; display: grid; gap: 14px; }
.auth-side .pitch h2 { margin: 0; font: 700 34px/1.05 var(--display); font-stretch: 116%; text-wrap: balance; }
.auth-side .pitch p { margin: 0; color: #A9B3BD; font-size: 14.5px; line-height: 1.55; }
.auth-side .sheet-art { position: absolute; right: -60px; bottom: -40px; width: 340px; height: 440px; border-radius: 6px; background: #fff; opacity: .07; transform: rotate(-8deg); }
.auth-side .sheet-art.b { right: 40px; bottom: -90px; opacity: .05; transform: rotate(6deg); }
.auth-side .foot { font-size: 12px; color: #7D8691; }
.auth-main { display: grid; place-items: center; padding: 40px max(16px, env(safe-area-inset-right, 0px)) 40px max(16px, env(safe-area-inset-left, 0px)); }
.auth-card { width: min(400px, 100%); display: grid; gap: 18px; }
.auth-card h1 { margin: 0; font: 700 26px/1.1 var(--display); font-stretch: 112%; }
.auth-card .lead { margin: 0; color: var(--muted); font-size: 13.5px; }
.auth-card form { display: grid; gap: 14px; }
.auth-card .btn-primary { height: 42px; }
.auth-card .links { display: flex; justify-content: space-between; gap: 10px; font-size: 13px; flex-wrap: wrap; }
.err-page { min-height: 100dvh; display: grid; place-items: center; padding: 32px max(16px, env(safe-area-inset-right, 0px)) 32px max(16px, env(safe-area-inset-left, 0px)); }
.err-card { width: min(560px, 100%); background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 28px; display: grid; gap: 14px; }
.err-card .code { font: 700 13px/1 var(--display); color: var(--muted); letter-spacing: .08em; }
.err-card h1 { margin: 0; font: 700 26px/1.15 var(--display); font-stretch: 112%; text-wrap: balance; }
.err-card p { margin: 0; color: var(--muted); }
.err-card .actions { display: flex; gap: 8px; flex-wrap: wrap; }

/* ───────────── Responsywność ───────────── */
@media (max-width: 1180px) {
  .grid-3 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .grid-main { grid-template-columns: minmax(0, 1fr); }
  .form-section { grid-template-columns: minmax(0, 1fr); gap: 12px; }
}
@media (max-width: 960px) {
  .shell { grid-template-columns: minmax(0, 1fr); }
  .side { position: fixed; inset: 0 auto 0 0; width: min(300px, 86vw); transform: translateX(-102%); transition: transform .2s ease; box-shadow: var(--shadow-pop); }
  .shell.nav-open .side { transform: none; }
  .shell.nav-open::after { content: ""; position: fixed; inset: 0; background: rgba(10, 13, 17, .45); z-index: 25; }
  .menu-btn { display: inline-flex; }
  .top { padding-left: max(16px, env(safe-area-inset-left, 0px)); padding-right: max(16px, env(safe-area-inset-right, 0px)); }
  .content { padding: 18px max(16px, env(safe-area-inset-right, 0px)) 56px max(16px, env(safe-area-inset-left, 0px)); }
  .banner { padding-left: max(16px, env(safe-area-inset-left, 0px)); padding-right: max(16px, env(safe-area-inset-right, 0px)); }
  .grid-2, .grid-3 { grid-template-columns: minmax(0, 1fr); }
  .auth { grid-template-columns: minmax(0, 1fr); }
  .auth-side { display: none; }
}
@media (max-width: 640px) {
  .perm-list { grid-template-columns: minmax(0, 1fr); }
  .kv { grid-template-columns: minmax(0, 1fr); gap: 2px 0; }
  .kv dd { margin-bottom: 8px; }
  .page-head h1 { font-size: 22px; }
  .toolbar .input-icon { max-width: none; }
}

/* ───────────── Marki, cenniki, zdjęcia, szablony ───────────── */
.tab-panels { display: grid; gap: 0; }
.tab-panel { padding-top: 4px; }
.brand-list { display: grid; gap: 12px; }
.brand-row {
  display: grid; grid-template-columns: 148px minmax(0, 1fr) auto; gap: 18px; align-items: center;
  padding: 14px 16px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg);
}
.brand-row .br-logo { height: 64px; border-radius: var(--r-md); background: #fff; border: 1px solid var(--line); display: grid; place-items: center; padding: 8px; overflow: hidden; }
.brand-row .br-logo img { max-height: 46px; max-width: 100%; object-fit: contain; }
.brand-row .br-logo .bt-word { font: 700 18px/1 var(--display); font-stretch: 120%; letter-spacing: .04em; color: #111418; }
.brand-row .br-main { min-width: 0; display: grid; gap: 4px; }
.brand-row .br-name { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; font: 700 17px/1.2 var(--display); font-stretch: 110%; }
.brand-row .br-desc { font-size: 13px; color: var(--muted); }
.brand-row .br-stats { display: flex; gap: 14px; flex-wrap: wrap; font-size: 12.5px; color: var(--muted); }
.brand-row .br-stats b { color: var(--ink); font-variant-numeric: tabular-nums; font-weight: 600; }
.brand-row .br-actions { display: flex; gap: 6px; flex-wrap: wrap; justify-content: flex-end; }
.brand-row.is-off .br-logo { filter: grayscale(1); opacity: .6; }

.rep { display: grid; gap: 8px; }
.rep-list { display: grid; gap: 8px; }
.rep-row { display: grid; grid-template-columns: 24px minmax(0, 1fr) auto; gap: 10px; align-items: start; padding: 10px 12px; border: 1px solid var(--line); border-radius: var(--r-md); background: var(--rail); }
.rep-row .rep-n { font: 600 12px/1 var(--display); color: var(--faint); padding-top: 12px; text-align: right; font-variant-numeric: tabular-nums; }
.rep-row .rep-body { display: grid; gap: 8px; min-width: 0; }
.rep-row .rep-tools { display: flex; gap: 2px; padding-top: 3px; }
.rep-row.inline .rep-body { grid-template-columns: minmax(0, 1fr) auto; align-items: center; }
.fuel-checks { display: flex; gap: 6px 12px; flex-wrap: wrap; font-size: 12.5px; }
.fuel-checks .check { font-size: 12.5px; }
.fuel-checks .lbl { color: var(--muted); }
.token-list { display: flex; flex-wrap: wrap; gap: 6px; }
.token-list code { font-size: 12px; padding: 3px 6px; border-radius: 6px; background: var(--rail); border: 1px solid var(--line); }
.preview-chip { display: inline-flex; align-items: center; gap: 8px; padding: 7px 10px; border-radius: var(--r-md); background: var(--accent-soft); color: var(--accent); font-size: 13px; }
.danger-zone { border: 1px solid color-mix(in srgb, var(--danger) 35%, var(--line)); border-radius: var(--r-lg); padding: 16px 18px; display: grid; gap: 10px; }
.danger-zone h2 { margin: 0; font: 600 15px/1.3 var(--display); color: var(--danger); }

.model-table td .t-cell { gap: 12px; }
.model-thumb { width: 64px; height: 40px; border-radius: 6px; background: var(--rail); border: 1px solid var(--line); overflow: hidden; display: grid; place-items: center; flex: none; }
.model-thumb img { width: 100%; height: 100%; object-fit: contain; }
.model-badges { display: inline-flex; gap: 4px; flex-wrap: wrap; align-self: center; }
.table .t-sub svg.i { width: 13px; height: 13px; vertical-align: -2px; }
.table tbody.grp-head th { background: var(--rail); text-align: left; font: 600 12.5px/1.2 var(--text); color: var(--ink); padding: 9px 12px; border-bottom: 1px solid var(--line); }
.table tbody.grp-head th svg.i { width: 16px; height: 16px; vertical-align: -3px; margin-right: 6px; }
.counts { display: flex; gap: 10px; flex-wrap: wrap; font-size: 12.5px; color: var(--muted); }
.counts b { color: var(--ink); font-weight: 600; font-variant-numeric: tabular-nums; }
.val-badges { display: flex; gap: 4px; flex-wrap: wrap; }
.mover { display: inline-flex; gap: 0; }
.mover .btn { width: 26px; height: 26px; }
.mover svg.i { width: 14px; height: 14px; }
.drop-file { display: grid; gap: 8px; place-items: center; text-align: center; padding: 22px 16px; border: 1.5px dashed var(--line-strong); border-radius: var(--r-lg); background: var(--rail); color: var(--muted); font-size: 13px; cursor: pointer; }
.drop-file:hover, .drop-file.is-over { border-color: var(--accent); background: var(--accent-soft); color: var(--accent); }
.drop-file svg.i { width: 28px; height: 28px; }
.drop-file input[type="file"] { max-width: 100%; }
.drop-file .picked { color: var(--ink); font-weight: 500; overflow-wrap: anywhere; }

.diff-list { margin: 0; padding-left: 18px; font-size: 12.5px; color: var(--muted); }
.issue-list { margin: 0; padding-left: 18px; font-size: 12.5px; display: grid; gap: 2px; }
.issue-list.err li { color: var(--danger); }
.issue-list.warn li { color: var(--warn); }
details.more > summary { cursor: pointer; font-size: 12.5px; color: var(--accent); list-style: none; }
details.more > summary::-webkit-details-marker { display: none; }
details.more[open] > summary { margin-bottom: 6px; }

/* Biblioteka zdjęć */
.media-layout { display: grid; grid-template-columns: 230px minmax(0, 1fr); gap: 20px; align-items: start; }
.folder-nav { display: grid; gap: 2px; position: sticky; top: 76px; }
.folder-nav a { display: flex; align-items: center; gap: 8px; padding: 7px 10px; border-radius: var(--r-md); font-size: 13px; color: var(--ink-2); text-decoration: none; overflow-wrap: anywhere; }
.folder-nav a:hover { background: var(--surface); }
.folder-nav a[aria-current="page"] { background: var(--ink); color: var(--on-ink); }
.folder-nav a svg.i { width: 16px; height: 16px; color: var(--faint); }
.folder-nav a[aria-current="page"] svg.i { color: inherit; }
.folder-nav .depth-1 { padding-left: 26px; }
.folder-nav .depth-2 { padding-left: 42px; }
.media-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(168px, 1fr)); gap: 12px; }
.media-item { display: grid; grid-template-rows: 124px auto; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-md); overflow: hidden; min-width: 0; }
.media-item .mi-img { background: repeating-conic-gradient(var(--rail) 0 25%, var(--surface) 0 50%) 50% / 16px 16px; display: grid; place-items: center; overflow: hidden; }
.media-item .mi-img img { max-width: 100%; max-height: 124px; object-fit: contain; }
.media-item .mi-body { padding: 8px 10px; display: grid; gap: 3px; font-size: 12px; min-width: 0; }
.media-item .mi-name { font-weight: 600; font-size: 12.5px; overflow-wrap: anywhere; color: var(--ink); }
.media-item .mi-meta { color: var(--muted); display: flex; gap: 6px; flex-wrap: wrap; align-items: center; }
.media-item .mi-actions { display: flex; gap: 4px; justify-content: flex-end; margin-top: 2px; }
.media-item .mi-used { color: var(--ok); }
.media-item .mi-unused { color: var(--faint); }

/* Szablony */
.tpl-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 14px; }
.tpl-card { display: grid; grid-template-rows: auto 1fr auto; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); overflow: hidden; min-width: 0; }
.tpl-card .tc-sheet { height: 150px; background: var(--rail); border-bottom: 1px solid var(--line); display: grid; place-items: center; }
.tpl-card .tc-sheet .mini { width: 92px; height: 130px; background: #fff; border-radius: 3px; box-shadow: var(--shadow-sheet); position: relative; overflow: hidden; }
.tpl-card .tc-sheet .mini i { position: absolute; display: block; background: #DCE1E6; border-radius: 1px; }
.tpl-card .tc-sheet .mini i.k { background: #111418; }
.tpl-card .tc-sheet .mini i.z { background: none; border: 1px dashed #9AA5B1; }
.tpl-card .tc-body { padding: 12px 14px; display: grid; gap: 6px; align-content: start; }
.tpl-card .tc-name { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; font: 700 15px/1.25 var(--display); font-stretch: 108%; }
.tpl-card .tc-meta { font-size: 12.5px; color: var(--muted); }
.tpl-card .tc-foot { padding: 10px 12px; border-top: 1px solid var(--line); display: flex; gap: 6px; flex-wrap: wrap; justify-content: space-between; align-items: center; background: var(--rail); }

@media (max-width: 960px) {
  .brand-row { grid-template-columns: 96px minmax(0, 1fr); }
  .brand-row .br-actions { grid-column: 1 / -1; justify-content: flex-start; }
  .media-layout { grid-template-columns: minmax(0, 1fr); }
  .folder-nav { position: static; display: flex; flex-wrap: wrap; gap: 6px; }
  .folder-nav .depth-1, .folder-nav .depth-2 { padding-left: 10px; }
}
@media (max-width: 640px) {
  .rep-row { grid-template-columns: minmax(0, 1fr) auto; }
  .rep-row .rep-n { display: none; }
}
.fields.fuel-row { grid-template-columns: 110px minmax(0, 1.4fr) minmax(0, 1fr) 130px auto; align-items: center; }
.fields.cat-row { grid-template-columns: 120px minmax(0, 1fr) 150px; }
@media (max-width: 760px) {
  .fields.fuel-row, .fields.cat-row { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
}

/* ─────────── Paczki aktualizacji ─────────── */
.issue-list.info li { color: var(--accent); }
.warn-text { color: var(--warn); }
.warn-text svg.i { width: 14px; height: 14px; vertical-align: -2px; }
.pkg-meta { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 18px 28px; }
.pkg-notes { font-size: 13.5px; }
.pkg-notes p { margin: 4px 0 0; color: var(--muted); max-width: 70ch; }
.pkg-brand { display: flex; align-items: flex-end; gap: 10px; flex-wrap: wrap; }
.card-head h2 svg.i { width: 18px; height: 18px; vertical-align: -3px; margin-right: 6px; }
.pkg-table td.chk, .pkg-table th.chk { width: 36px; padding-right: 0; }
.pkg-table td.chk input { width: 18px; height: 18px; margin: 2px 0 0; }
.pkg-table tr.is-off td:not(:last-child):not(:nth-last-child(2)) { opacity: .62; }
.pkg-ver { min-width: 150px; font-size: 13px; }
.pkg-ver > span { display: block; }
.pkg-build-models { display: grid; gap: 6px; }
@media (max-width: 760px) { .pkg-meta { grid-template-columns: minmax(0, 1fr); } }

/* Marża i transport (ustawienia marki): tabela marż modeli */
.margin-table td.num, .margin-table th.num { text-align: right; }
.margin-table .input-group.sm { grid-template-columns: minmax(0, 1fr) auto; gap: 6px; width: 112px; margin-left: auto; }
.margin-table .input-group.sm .input { height: 34px; padding: 0 8px; text-align: right; }
.margin-table .input-group.sm .unit { min-width: 16px; }
.margin-table td { vertical-align: middle; }
.t-neg, .table .t-sub.t-neg { color: var(--danger); }

/* ─────────── Powiadomienia ─────────── */
.bell { position: relative; }
.bell-n { position: absolute; top: -3px; right: -3px; min-width: 17px; height: 17px; padding: 0 4px; border-radius: 99px; background: var(--danger); color: #fff; font: 700 10.5px/17px var(--text); text-align: center; font-variant-numeric: tabular-nums; }
a.tl-item { text-decoration: none; color: inherit; }
a.tl-item:hover { background: var(--row-hover); }
.tl-item.notif.unread .tl-ico { background: var(--accent-soft); color: var(--accent); }

/* ─────────── Oferta: online, wiadomości, archiwum ─────────── */
.link-box { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 6px; align-items: center; }
.link-box .input { font-size: 12.5px; font-family: ui-monospace, Menlo, Consolas, monospace; }
.online-stats { display: grid; gap: 4px; font-size: 13px; }
.online-stats .ok { color: var(--ok); font-weight: 600; }
.online-stats svg.i { width: 15px; height: 15px; vertical-align: -3px; margin-right: 4px; color: var(--muted); }
.btn-row { display: flex; gap: 6px; flex-wrap: wrap; }
.ver-list { display: grid; }
.ver-row { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 10px; align-items: center; padding: 10px 18px; border-bottom: 1px solid var(--line); font-size: 13px; }
.ver-row:last-child { border-bottom: 0; }
.ver-row .no { font: 700 13px/1 var(--display); color: var(--muted); font-variant-numeric: tabular-nums; }
.ver-row .t-sub { display: block; font-size: 12px; color: var(--muted); }

/* Zgody na rabat */
.appr-form { display: grid; gap: 6px; justify-items: end; min-width: 230px; }
.appr-form .input { height: 32px; font-size: 13px; }
.appr-state { display: flex; gap: 8px; align-items: flex-start; font-size: 13px; }
.appr-state svg.i { flex: none; margin-top: 1px; }

/* ─────────── Klienci: etapy, lejek, zgody ─────────── */
.stage-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.stage-chips a { display: inline-flex; align-items: center; gap: 7px; height: 32px; padding: 0 12px; border-radius: 99px; border: 1px solid var(--line); background: var(--surface); color: var(--ink-2); text-decoration: none; font-size: 13px; }
.stage-chips a b { font-weight: 600; font-variant-numeric: tabular-nums; color: var(--muted); }
.stage-chips a:hover { border-color: var(--line-strong); }
.stage-chips a[aria-current="true"] { background: var(--ink); border-color: var(--ink); color: var(--on-ink); }
.stage-chips a[aria-current="true"] b { color: inherit; opacity: .8; }
.funnel { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(232px, 1fr); gap: 12px; overflow-x: auto; padding-bottom: 6px; align-items: start; }
.fcol { background: var(--rail); border: 1px solid var(--line); border-radius: var(--r-lg); display: grid; min-width: 0; }
.fcol header { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 10px 12px; border-bottom: 1px solid var(--line); }
.fcol header h2 { margin: 0; font: 600 13.5px/1.2 var(--display); font-stretch: 106%; }
.fcol header .n { font: 600 12px/1 var(--text); color: var(--muted); font-variant-numeric: tabular-nums; }
.fcol-body { display: grid; gap: 8px; padding: 10px; max-height: 70vh; overflow-y: auto; }
.fcard { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-md); padding: 10px 12px; display: grid; gap: 3px; }
.fcard .t-main { font-weight: 600; color: var(--ink); text-decoration: none; font-size: 13.5px; }
.fcard .t-main:hover { text-decoration: underline; }
.fcard .t-sub { font-size: 12px; color: var(--muted); }
.fcard form { margin: 4px 0 0; }
.fcard .btn { height: 28px; padding: 0 8px; font-size: 12px; }
.seg-radio { display: flex; align-items: center; justify-content: center; height: 32px; border-radius: 6px; cursor: pointer; font-size: 13px; color: var(--muted); }
.seg-radio input { position: absolute; opacity: 0; pointer-events: none; }
.seg-radio:has(input:checked) { background: var(--surface); color: var(--ink); font-weight: 600; box-shadow: 0 1px 2px rgba(0,0,0,.12); }
.seg-radio:has(input:focus-visible) { outline: 2px solid var(--accent); outline-offset: 1px; }
.consent-row { display: flex; justify-content: space-between; gap: 10px; align-items: flex-start; font-size: 13px; }
.consent-row > span { display: grid; grid-template-columns: auto minmax(0, 1fr); column-gap: 8px; }
.consent-row svg.i { width: 16px; height: 16px; color: var(--ok); grid-row: span 2; margin-top: 1px; }
.consent-row.off svg.i { color: var(--faint); }
.consent-row.off b { color: var(--muted); font-weight: 500; text-decoration: line-through; }
.consent-row .t-sub { font-size: 12px; color: var(--muted); }
.consent-add { display: grid; grid-template-columns: minmax(0, 1fr); gap: 6px; padding-top: 10px; border-top: 1px dashed var(--line); }
.consent-add .select { height: 34px; font-size: 13px; }

/* ─────────── Zadania ─────────── */
.task-row { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 10px; align-items: start; padding: 8px 0; border-bottom: 1px solid var(--line); }
.task-row:last-of-type { border-bottom: 0; }
.task-row form { margin: 0; }
.task-check { width: 30px; height: 30px; display: grid; place-items: center; border: 0; background: none; border-radius: 6px; cursor: pointer; color: var(--muted); }
.task-check:hover { background: var(--rail); color: var(--ink); }
.task-check svg.i { width: 20px; height: 20px; }
.task-row.done .task-check { color: var(--ok); }
.task-row.done .task-t { text-decoration: line-through; color: var(--muted); }
.task-main { display: grid; gap: 2px; min-width: 0; padding-top: 5px; }
.task-t { display: flex; gap: 7px; align-items: center; font-size: 13.5px; font-weight: 500; overflow-wrap: anywhere; }
.task-t svg.i { width: 15px; height: 15px; color: var(--muted); flex: none; }
.task-main .t-sub { display: flex; gap: 10px; flex-wrap: wrap; font-size: 12px; color: var(--muted); }
.task-row.over .task-t svg.i { color: var(--danger); }
.task-row .row-actions .btn { height: 28px; padding: 0 8px; font-size: 12px; }
.task-quick { display: grid; gap: 8px; min-width: 0; container-type: inline-size; }
.tq-row { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 140px); gap: 8px; }
.tq-when { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.tq-date { display: flex; gap: 6px; align-items: center; margin-left: auto; min-width: 0; }
.tq-date .input { height: 32px; width: auto; min-width: 0; font-size: 13px; }
@container (max-width: 520px) {
  .tq-row { grid-template-columns: minmax(0, 1fr) minmax(0, 110px); }
  .tq-date { margin-left: 0; flex: 1 1 100%; }
  .tq-date .input { flex: 1 1 0; }
}
@media (max-width: 640px) { .tq-row { grid-template-columns: minmax(0, 1fr); } }
.card-body > .task-row:first-child { padding-top: 0; }

/* Lejek na pulpicie: liczba klientów na etapach */
.mini-funnel { display: grid; gap: 4px; }
.mf-row { display: grid; grid-template-columns: 128px minmax(0, 1fr) 34px; gap: 10px; align-items: center; text-decoration: none; color: var(--ink-2); font-size: 12.5px; padding: 3px 0; border-radius: 6px; }
.mf-row:hover { background: var(--row-hover); }
.mf-row .bar { height: 8px; border-radius: 0 4px 4px 0; background: var(--accent); width: max(2px, var(--w)); opacity: .85; }
.mf-row .v { text-align: right; font-weight: 600; font-variant-numeric: tabular-nums; color: var(--ink); }

/* ─────────── Jazdy próbne: tydzień ─────────── */
.td-cal th, .td-cal td { min-width: 128px; vertical-align: top; }
.td-cal tbody th { min-width: 190px; font-weight: 400; }
.td-cal tbody th b { display: block; font-size: 13px; }
.td-cal .today { background: color-mix(in srgb, var(--accent-soft) 55%, transparent); }
.td-cal tbody tr:hover td { background: inherit; }
.td-slot { display: grid; gap: 1px; padding: 6px 8px; margin-bottom: 6px; border-radius: 6px; border-left: 3px solid var(--accent); background: var(--surface); box-shadow: inset 0 0 0 1px var(--line); font-size: 12px; }
.td-slot .tm { font-weight: 700; font-variant-numeric: tabular-nums; }
.td-slot .st { color: var(--muted); }
.td-slot .acts { display: flex; flex-wrap: wrap; gap: 2px 8px; margin-top: 2px; }
.td-slot .acts form { margin: 0; }
.td-slot.done { border-left-color: var(--ok); }
.td-slot.cancelled, .td-slot.no_show { border-left-color: var(--faint); opacity: .7; }
.linkish { border: 0; background: none; padding: 0; color: var(--accent); font: inherit; font-size: 12px; cursor: pointer; text-decoration: underline; text-underline-offset: 2px; }

/* ---------- Raporty sprzedaży ---------- */
.rep-filters { border-bottom: 0; }
.rep-custom { display: inline-flex; align-items: center; gap: 6px; color: var(--muted); }
.rep-custom[hidden] { display: none; }
.rep-custom .input { width: 150px; }
.rep-kpis { grid-template-columns: repeat(auto-fit, minmax(158px, 1fr)); }
.rep-kpis .stat .v { font-variant-numeric: normal; }
.stat .delta { display: flex; align-items: center; gap: 5px; font-size: 12px; color: var(--muted); }
.stat .delta svg.i { width: 14px; height: 14px; flex: none; }
.stat .delta b { font-weight: 600; }
.stat .delta.good b, .stat .delta.good svg.i { color: var(--ok); }
.stat .delta.bad b, .stat .delta.bad svg.i { color: var(--danger); }
.card-head h2 .sub { font: 400 12.5px/1.2 var(--text); color: var(--muted); margin-left: 6px; }

.vz-legend { display: flex; gap: 16px; font-size: 12.5px; color: var(--muted); flex-wrap: wrap; }
.vz-legend span { display: inline-flex; align-items: center; gap: 7px; }
.vz-legend .sw { width: 10px; height: 10px; border-radius: 2px; display: inline-block; }
.sw.acc, .vz-tip .key.acc { background: var(--viz-1); }
.sw.rest, .vz-tip .key.rest { background: var(--viz-rest); }

.vz { position: relative; display: grid; grid-template-columns: auto minmax(0, 1fr); grid-template-rows: 220px auto; column-gap: 10px; padding-top: 8px; }
.vz-y { grid-row: 1; grid-column: 1; position: relative; min-width: 22px; font-size: 11.5px; color: var(--faint); font-variant-numeric: tabular-nums; }
.vz-y span { position: absolute; right: 0; transform: translateY(50%); line-height: 1; }
.vz-plot { grid-row: 1; grid-column: 2; position: relative; border-bottom: 1px solid var(--line-strong); }
.vz-grid i { position: absolute; left: 0; right: 0; border-top: 1px solid var(--line); }
.vz-cols { position: absolute; inset: 0; display: grid; grid-template-columns: repeat(var(--n), minmax(0, 1fr)); }
.vz-col { position: relative; display: flex; justify-content: center; align-items: flex-end; border-radius: 4px 4px 0 0; outline: none; }
.vz-col::before { content: ''; position: absolute; inset: 0; border-radius: inherit; background: var(--ink); opacity: 0; transition: opacity .12s; pointer-events: none; }
.vz-col.on::before, .vz-col:hover::before { opacity: .045; }
.vz-col:focus-visible { box-shadow: inset 0 0 0 2px var(--accent); }
.vz-col .bar { position: relative; width: min(24px, 64%); height: 100%; display: flex; flex-direction: column; justify-content: flex-end; gap: 2px; }
.vz-seg { display: block; flex: none; min-height: 2px; }
.vz-seg.acc { background: var(--viz-1); }
.vz-seg.rest { background: var(--viz-rest); }
.vz-seg.is-top { border-radius: 4px 4px 0 0; }
.vz-col.on .vz-seg { filter: brightness(1.08) saturate(1.05); }
.vz-x { grid-row: 2; grid-column: 2; display: grid; grid-template-columns: repeat(var(--n), minmax(0, 1fr)); padding-top: 7px; font-size: 11.5px; color: var(--faint); font-variant-numeric: tabular-nums; }
.vz-x span { text-align: center; white-space: nowrap; overflow: visible; display: flex; justify-content: center; }
.vz-tip { position: absolute; z-index: 5; min-width: 150px; max-width: 240px; background: var(--surface); color: var(--ink); border: 1px solid var(--line); border-radius: var(--r-md); box-shadow: var(--shadow-pop); padding: 9px 11px; font-size: 12.5px; pointer-events: none; }
.vz-tip-t { font-size: 12px; color: var(--muted); margin-bottom: 5px; }
.vz-tip-r { display: grid; grid-template-columns: 12px auto 1fr; align-items: center; gap: 7px; line-height: 1.55; }
.vz-tip-r b { font-weight: 650; font-variant-numeric: tabular-nums; }
.vz-tip-r span { color: var(--muted); }
.vz-tip .key { width: 12px; height: 3px; border-radius: 2px; }
.vz-tip .key.none { background: transparent; }
.vz-table { margin-top: 14px; }
.vz-table summary { cursor: pointer; font-size: 12.5px; color: var(--muted); width: max-content; }
.vz-table summary:hover { color: var(--ink); }
.vz-table .table-wrap { margin-top: 8px; border: 1px solid var(--line); border-radius: var(--r-md); max-height: 320px; overflow: auto; }

.rep-table th, .rep-table td { padding-left: 10px; padding-right: 10px; }
.rep-table th:first-child, .rep-table td:first-child { padding-left: 14px; min-width: 150px; }
.rep-table th:last-child, .rep-table td:last-child { padding-right: 14px; }
.rep-table td.conv, .rep-table th.conv { min-width: 150px; }
.rep-table td.conv { white-space: nowrap; }
.rep-table .ibar { display: inline-block; vertical-align: middle; width: 80px; height: 8px; margin-right: 10px; }
.rep-table .ibar i { display: block; height: 100%; min-width: 2px; background: var(--viz-1); border-radius: 0 4px 4px 0; }
.rep-table .iv { font-variant-numeric: tabular-nums; }
.rep-table tfoot td { font-weight: 600; border-top: 1px solid var(--line-strong); background: var(--rail); padding-top: 10px; padding-bottom: 10px; }
.rep-notes h3 { margin: 0 0 6px; font: 600 14px/1.3 var(--display); }
.rep-notes ul { margin: 0; padding-left: 18px; font-size: 12.5px; color: var(--muted); display: grid; gap: 4px; }
@media (max-width: 720px) {
  .vz { grid-template-rows: 180px auto; }
  .rep-custom .input { width: 138px; }
}
@media print {
  .rep-filters, .vz-table summary { display: none; }
}
.rep-table .linkish { font-size: inherit; }

/* ---------- Logowanie dwuetapowe ---------- */
.auth-card .links span { color: var(--muted); font-size: 12.5px; }
.auth-card .links form { display: inline; }
.twofa-steps { margin: 0; padding-left: 20px; display: grid; gap: 12px; font-size: 13.5px; }
.twofa-steps li::marker { font-weight: 700; }
.twofa-qr { margin: 10px 0 8px; width: max-content; padding: 6px; background: #fff; border: 1px solid var(--line); border-radius: var(--r-md); min-height: 60px; display: grid; place-items: center; }
.twofa-qr img { display: block; image-rendering: pixelated; }
.twofa-key { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; font-size: 12.5px; color: var(--muted); }
.twofa-key code { font: 600 13px/1.4 ui-monospace, Menlo, Consolas, monospace; letter-spacing: .04em; color: var(--ink); background: var(--rail); border: 1px solid var(--line); border-radius: var(--r-sm); padding: 3px 7px; user-select: all; }
.twofa-codes { border: 1px solid var(--warn); background: var(--warn-soft); border-radius: var(--r-lg); padding: 14px 16px; display: grid; gap: 8px; }
.twofa-codes ol { margin: 0; padding-left: 22px; columns: 2; column-gap: 24px; font: 600 14px/1.8 ui-monospace, Menlo, Consolas, monospace; letter-spacing: .05em; }
.row-btns { display: flex; gap: 8px; flex-wrap: wrap; }
.twofa-manage { display: grid; gap: 12px; font-size: 13.5px; }
.twofa-manage p { margin: 0; }
.twofa-admin { margin-top: 14px; padding-top: 14px; border-top: 1px solid var(--line); display: grid; gap: 8px; font-size: 13.5px; }
.twofa-admin p { margin: 0; }
.twofa-admin form { justify-self: start; }
.twofa-state { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
@media print { .twofa-codes .row-btns { display: none; } }
.auth-main { align-content: center; gap: 18px; }
.auth-legal { font-size: 12.5px; color: var(--muted); text-align: center; }
.auth-legal a { color: var(--muted); }
.sys-card { margin-bottom: 0; }
.sys-rows { display: grid; gap: 12px; }
.sys-row { display: grid; grid-template-columns: 112px 1fr; gap: 12px; align-items: start; font-size: 13.5px; }
.sys-row .badge { justify-self: start; }
.sys-row code { font-size: 12px; background: var(--rail); border: 1px solid var(--line); border-radius: var(--r-sm); padding: 1px 5px; word-break: break-all; }
@media (max-width: 560px) { .sys-row { grid-template-columns: 1fr; gap: 4px; } }
.auth-card .links a { display: inline-flex; align-items: center; gap: 6px; }
.auth-card .links a svg.i { width: 15px; height: 15px; }
.auth-side.dealer-side { background: linear-gradient(160deg, color-mix(in srgb, var(--dealer, #0B6C9C) 55%, #12161A) 0%, #12161A 70%); }
.auth-side .dealer-logo { max-height: 46px; max-width: 220px; object-fit: contain; }
.auth-side.dealer-side .foot { font-size: 12px; line-height: 1.5; max-width: 46ch; }

/* ---------- Hosting salonu ---------- */
.install-card { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.install-card.expired { opacity: .6; border-color: var(--line); box-shadow: none; }
.copy-row { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.copy-row code { flex: 1 1 320px; min-width: 0; font: 500 12.5px/1.5 ui-monospace, Menlo, Consolas, monospace; background: var(--rail); border: 1px solid var(--line); border-radius: var(--r-md); padding: 8px 10px; overflow-wrap: anywhere; user-select: all; }
.seg-pick { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 10px; }
.seg-opt { display: flex; gap: 10px; align-items: flex-start; border: 1px solid var(--line); border-radius: var(--r-lg); padding: 12px 14px; cursor: pointer; }
.seg-opt:has(input:checked) { border-color: var(--ink); box-shadow: inset 0 0 0 1px var(--ink); }
.seg-opt input { margin-top: 3px; accent-color: var(--ink); }
.seg-opt span { display: grid; gap: 3px; }
.seg-opt small { color: var(--muted); font-size: 12.5px; line-height: 1.45; }
.hosting-form { display: grid; gap: 12px; }
.hosting-row { display: flex; gap: 12px; align-items: flex-end; flex-wrap: wrap; }
.hosting-row .field { flex: 0 1 340px; }
.sub-h { margin: 0 0 6px; font: 600 14.5px/1.3 var(--display); }
.domain-add { padding: 10px 0 0; border-bottom: 0; }
.domain-add .err { width: 100%; }
.kv-wide { display: grid; grid-template-columns: minmax(96px, 34%) 1fr; gap: 6px 14px; font-size: 13.5px; margin: 0; }
.kv-wide dt { color: var(--muted); }
.kv-wide dd { margin: 0; overflow-wrap: anywhere; }
.mono { font-family: ui-monospace, Menlo, Consolas, monospace; font-size: 12.5px; }
.cmd-row { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; font-size: 13.5px; }
.cmd-row .t-sub { width: 100%; font-size: 12px; color: var(--muted); }
.inst-body { background: var(--canvas); min-height: 100vh; }
.inst { width: min(760px, calc(100% - 32px)); margin: 48px auto; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 28px 30px; display: grid; gap: 16px; }
.inst h1 { margin: 0; font: 700 26px/1.15 var(--display); font-stretch: 110%; }
.inst .lead { margin: 0; color: var(--muted); }
.inst-steps { margin: 0; padding-left: 20px; display: grid; gap: 12px; font-size: 14px; line-height: 1.55; }
.inst-steps .copy-row { margin: 8px 0; }
.inst code { font-size: 12.5px; }
.domain-line { margin: 0 0 6px; display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.color-row { display: flex; gap: 10px; align-items: flex-end; }
.color-row .field { flex: 0 1 200px; }
.color-pick { width: 44px; height: 38px; padding: 2px; border: 1px solid var(--line); border-radius: var(--r-md); background: var(--surface); cursor: pointer; }
.hero-thumb { max-width: 320px; border-radius: var(--r-md); border: 1px solid var(--line); }
.log-table td { padding-top: 6px; padding-bottom: 6px; }
.log-table .nowrap { white-space: nowrap; }
.log-table .log-path { max-width: 360px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
