/* ==========================================================================
   Chabin – Oferta przedsezonowa 2026
   Jeden spójny arkusz stylów dla całej aplikacji (bez Bootstrapa/JS).
   ========================================================================== */

:root {
    --bg: #f3f6fa;
    --surface: #ffffff;
    --surface-2: #f8fafc;
    --ink: #0f1f2e;
    --ink-soft: #24384c;
    --muted: #5f7183;
    --line: #e3e9f0;
    --line-strong: #cbd6e2;

    --brand: #102a43;
    --brand-2: #1b4065;
    --accent: #0e8a5f;
    --accent-2: #0a6d4b;
    --accent-soft: #e9f8f1;
    --accent-line: #b5e3d1;

    --amber: #b45309;
    --amber-soft: #fffbeb;
    --amber-line: #fde68a;
    --danger: #b42318;
    --danger-soft: #fef3f2;
    --danger-line: #fecdca;
    --info: #1d4ed8;
    --info-soft: #eff6ff;
    --info-line: #bfdbfe;

    --radius: 14px;
    --radius-sm: 10px;
    --radius-lg: 18px;
    --shadow-sm: 0 1px 2px rgba(15, 31, 46, .05);
    --shadow: 0 1px 2px rgba(15, 31, 46, .04), 0 12px 32px -20px rgba(15, 31, 46, .28);
    --ring: 0 0 0 3px rgba(29, 78, 216, .16);

    --container: 1320px;
}

*,
*::before,
*::after {
    box-sizing: border-box;
}

html {
    -webkit-text-size-adjust: 100%;
    scroll-behavior: smooth;
}

body {
    margin: 0;
    min-height: 100vh;
    font-family: "Segoe UI", system-ui, -apple-system, "Helvetica Neue", Arial, sans-serif;
    font-size: 15px;
    line-height: 1.5;
    color: var(--ink);
    background: var(--bg);
    background-image: radial-gradient(1100px 380px at 50% -140px, #e7eff7 0%, rgba(231, 239, 247, 0) 72%);
    background-repeat: no-repeat;
}

h1, h2, h3, h4, h5 {
    margin: 0 0 .5em;
    line-height: 1.25;
    letter-spacing: -.015em;
    color: var(--ink);
}

h1 { font-size: 26px; font-weight: 750; }
h2 { font-size: 20px; font-weight: 700; }
h3 { font-size: 17px; font-weight: 700; }
h4 { font-size: 15px; font-weight: 700; }

p { margin: 0 0 1em; }
p:last-child { margin-bottom: 0; }

a {
    color: var(--info);
    text-decoration: none;
}

a:hover { text-decoration: underline; }

img { max-width: 100%; height: auto; }

svg { flex: none; }

.ico {
    width: 18px;
    height: 18px;
    flex: none;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.8;
    stroke-linecap: round;
    stroke-linejoin: round;
    vertical-align: -3px;
}

ul, ol { margin: 0 0 1em; padding-left: 1.25em; }

hr {
    border: 0;
    border-top: 1px solid var(--line);
    margin: 22px 0;
}

::selection { background: #cfe4ff; }

:focus-visible {
    outline: none;
    box-shadow: var(--ring);
    border-radius: 6px;
}

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.skip-link {
    position: absolute;
    left: 12px;
    top: -60px;
    z-index: 1000;
    padding: 10px 16px;
    background: var(--brand);
    color: #fff;
    border-radius: 10px;
    transition: top .15s ease;
}

.skip-link:focus { top: 12px; }

.svg-sprite {
    position: absolute;
    width: 0;
    height: 0;
    overflow: hidden;
    pointer-events: none;
}

/* --------------------------------------------------------------------------
   Górny pasek
   -------------------------------------------------------------------------- */

.topbar {
    position: sticky;
    top: 0;
    z-index: 50;
    background: rgba(255, 255, 255, .94);
    backdrop-filter: saturate(180%) blur(10px);
    border-bottom: 1px solid var(--line);
}

.topbar__inner {
    max-width: var(--container);
    margin: 0 auto;
    padding: 10px 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}

.brand {
    display: inline-flex;
    align-items: center;
    gap: 11px;
    min-width: 0;
    color: var(--ink);
    text-decoration: none;
}

.brand:hover { text-decoration: none; }

.brand__logo {
    width: 44px;
    height: 44px;
    object-fit: contain;
    border-radius: 10px;
    background: #fff;
    border: 1px solid var(--line);
    padding: 2px;
}

.brand__text {
    display: flex;
    flex-direction: column;
    min-width: 0;
    line-height: 1.15;
}

.brand__text strong {
    font-size: 15px;
    font-weight: 750;
    letter-spacing: .02em;
}

.brand__text small {
    font-size: 11px;
    font-weight: 600;
    letter-spacing: .07em;
    text-transform: uppercase;
    color: var(--muted);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.topbar__actions {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
    justify-content: flex-end;
}

.total-pill {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 6px 13px;
    border-radius: 999px;
    border: 1px solid var(--accent-line);
    background: var(--accent-soft);
    color: #064e3b;
    text-decoration: none;
    transition: transform .15s ease, box-shadow .15s ease;
}

.total-pill:hover {
    text-decoration: none;
    transform: translateY(-1px);
    box-shadow: var(--shadow-sm);
}

.total-pill__label {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 11px;
    font-weight: 600;
    letter-spacing: .04em;
    text-transform: uppercase;
    color: #16795a;
}

.total-pill__value {
    font-size: 15px;
    font-weight: 750;
    font-variant-numeric: tabular-nums;
}

.total-pill .ico { width: 16px; height: 16px; }

.user-chip {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    max-width: 220px;
    padding: 7px 11px;
    border-radius: 999px;
    border: 1px solid var(--line);
    background: var(--surface-2);
    color: var(--muted);
    font-size: 13px;
    font-weight: 600;
}

.user-chip span {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.user-chip .ico { width: 15px; height: 15px; }

/* --------------------------------------------------------------------------
   Układ strony
   -------------------------------------------------------------------------- */

.page {
    max-width: var(--container);
    margin: 0 auto;
    padding: 22px 20px 56px;
}

.page--narrow { max-width: 880px; }

.page-head {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 18px;
    margin-bottom: 18px;
    flex-wrap: wrap;
}

.page-head h1 { margin-bottom: 4px; }

.page-head__sub {
    margin: 0;
    color: var(--muted);
    font-size: 14px;
}

.back {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    margin-bottom: 8px;
    color: var(--muted);
    font-size: 12.5px;
    font-weight: 600;
}

.back:hover { color: var(--ink); }
.back .ico { width: 14px; height: 14px; }

.page-head__side {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 348px;
    gap: 20px;
    align-items: start;
}

.layout__main { min-width: 0; }

.sidebar {
    display: flex;
    flex-direction: column;
    gap: 14px;
    position: sticky;
    top: 78px;
    min-width: 0;
    max-height: calc(100vh - 94px);
    max-height: calc(100dvh - 94px);
    overflow-y: auto;
    padding-right: 4px;
    scrollbar-gutter: stable;
    scrollbar-width: thin;
    scrollbar-color: var(--line-strong) transparent;
}

.sidebar > * { flex: 0 0 auto; }

.sidebar::-webkit-scrollbar { width: 7px; }
.sidebar::-webkit-scrollbar-track { background: transparent; }
.sidebar::-webkit-scrollbar-thumb {
    background: var(--line-strong);
    border-radius: 999px;
}
.sidebar::-webkit-scrollbar-thumb:hover { background: #aebdcd; }

#prefs { scroll-margin-top: 90px; }
#confirmDate, #confirmDelivery { scroll-margin-top: 90px; }

.stack { display: flex; flex-direction: column; gap: 14px; }
.row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.row--between { justify-content: space-between; }
.row--end { justify-content: flex-end; }
.spacer { flex: 1 1 auto; }

.muted { color: var(--muted); }
.small { font-size: 13px; }
.tiny { font-size: 12px; }
.strong { font-weight: 700; }
.nowrap { white-space: nowrap; }
.text-right { text-align: right; }
.text-center { text-align: center; }
.numeric { font-variant-numeric: tabular-nums; }
.mb-0 { margin-bottom: 0; }
.mt-2 { margin-top: 8px; }
.mt-3 { margin-top: 14px; }
.mt-4 { margin-top: 20px; }
.hide { display: none !important; }

/* --------------------------------------------------------------------------
   Karty
   -------------------------------------------------------------------------- */

.card {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    overflow: hidden;
}

.card--flat { box-shadow: none; }

.card__head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 15px 18px;
    border-bottom: 1px solid var(--line);
}

.card__title {
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 0;
    font-size: 15px;
    font-weight: 700;
}

.card__title .ico { color: var(--muted); }

.card__body { padding: 18px; }
.card__body--tight { padding: 14px; }
.card__foot {
    padding: 14px 18px;
    border-top: 1px solid var(--line);
    background: var(--surface-2);
}

.card__hint {
    margin: 0;
    font-size: 12px;
    color: var(--muted);
}

.autosave-status {
    display: inline-block;
    margin-top: 6px;
    font-size: 11.5px;
    font-weight: 600;
    color: var(--accent-2);
}

.autosave-status.is-error { color: var(--danger); }
.autosave-status.is-saving { color: var(--muted); }

.kv {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    gap: 7px 14px;
    margin: 0;
    font-size: 13px;
}

.kv dt { color: var(--muted); }
.kv dd {
    margin: 0;
    text-align: right;
    font-weight: 600;
    overflow-wrap: anywhere;
}

/* --------------------------------------------------------------------------
   Przyciski
   -------------------------------------------------------------------------- */

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    padding: 9px 14px;
    border: 1px solid transparent;
    border-radius: var(--radius-sm);
    background: var(--surface);
    color: var(--ink);
    font: inherit;
    font-size: 14px;
    font-weight: 650;
    line-height: 1.2;
    text-align: center;
    text-decoration: none;
    cursor: pointer;
    transition: background .15s ease, border-color .15s ease, color .15s ease, transform .15s ease;
    -webkit-appearance: none;
    appearance: none;
}

.btn:hover { text-decoration: none; }
.btn:active { transform: translateY(1px); }

.btn--primary {
    background: var(--brand);
    border-color: var(--brand);
    color: #fff;
}
.btn--primary:hover { background: var(--brand-2); border-color: var(--brand-2); }

.btn--success {
    background: var(--accent);
    border-color: var(--accent);
    color: #fff;
}
.btn--success:hover { background: var(--accent-2); border-color: var(--accent-2); }

.btn--danger {
    background: var(--danger);
    border-color: var(--danger);
    color: #fff;
}
.btn--danger:hover { background: #96190f; border-color: #96190f; }

.btn--warning {
    background: var(--amber-soft);
    border-color: var(--amber-line);
    color: var(--amber);
}
.btn--warning:hover { background: #fef3c7; }

.btn--outline {
    background: var(--surface);
    border-color: var(--line-strong);
    color: var(--ink-soft);
}
.btn--outline:hover { background: var(--surface-2); border-color: var(--brand); color: var(--brand); }

.btn--ghost {
    background: transparent;
    border-color: transparent;
    color: var(--muted);
}
.btn--ghost:hover { background: var(--surface-2); color: var(--ink); }

.btn--sm {
    padding: 6px 10px;
    font-size: 13px;
    border-radius: 8px;
}

.btn--lg {
    padding: 12px 18px;
    font-size: 15px;
    border-radius: 12px;
}

.btn--block { width: 100%; }

.btn--icon {
    width: 36px;
    height: 36px;
    padding: 0;
    flex: none;
}

.btn:disabled,
.btn[disabled],
.btn.is-disabled {
    opacity: .55;
    cursor: not-allowed;
    pointer-events: none;
    box-shadow: none;
}

.btn .ico { width: 16px; height: 16px; }
.btn--lg .ico { width: 18px; height: 18px; }

/* --------------------------------------------------------------------------
   Znaczki i komunikaty
   -------------------------------------------------------------------------- */

.badge {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 4px 9px;
    border: 1px solid transparent;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 650;
    line-height: 1.3;
    white-space: nowrap;
}

.badge .ico { width: 13px; height: 13px; }

.badge--success { background: var(--accent-soft); border-color: var(--accent-line); color: #075e45; }
.badge--info { background: var(--info-soft); border-color: var(--info-line); color: #1e40af; }
.badge--warning { background: var(--amber-soft); border-color: var(--amber-line); color: var(--amber); }
.badge--danger { background: var(--danger-soft); border-color: var(--danger-line); color: var(--danger); }
.badge--neutral { background: var(--surface-2); border-color: var(--line); color: var(--muted); }

.alert {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 12px 14px;
    border: 1px solid var(--line);
    border-radius: 12px;
    background: var(--surface-2);
    font-size: 13.5px;
    line-height: 1.5;
}

.alert .ico { width: 17px; height: 17px; margin-top: 2px; }
.alert--success { background: var(--accent-soft); border-color: var(--accent-line); color: #064e3b; }
.alert--info { background: var(--info-soft); border-color: var(--info-line); color: #1e3a8a; }
.alert--warning { background: var(--amber-soft); border-color: var(--amber-line); color: #7c2d12; }
.alert--error { background: var(--danger-soft); border-color: var(--danger-line); color: #7a271a; }

.flash {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    margin-bottom: 16px;
    padding: 12px 15px;
    border: 1px solid var(--line);
    border-radius: 12px;
    background: var(--surface);
    font-size: 14px;
    box-shadow: var(--shadow-sm);
}

.flash--success { background: var(--accent-soft); border-color: var(--accent-line); color: #064e3b; }
.flash--error { background: var(--danger-soft); border-color: var(--danger-line); color: #7a271a; }
.flash--warning { background: var(--amber-soft); border-color: var(--amber-line); color: #7c2d12; }
.flash--info { background: var(--info-soft); border-color: var(--info-line); color: #1e3a8a; }
.flash .ico { width: 18px; height: 18px; margin-top: 1px; }

/* --------------------------------------------------------------------------
   Formularze
   -------------------------------------------------------------------------- */

.field { margin-bottom: 14px; }
.field:last-child { margin-bottom: 0; }

.fieldset {
    margin: 0 0 14px;
    padding: 0;
    border: 0;
}

.fieldset > legend {
    padding: 0;
    margin-bottom: 6px;
}

.label {
    display: block;
    margin-bottom: 6px;
    font-size: 13px;
    font-weight: 650;
    color: var(--ink-soft);
}

.input,
.select,
.textarea {
    display: block;
    width: 100%;
    padding: 9px 11px;
    border: 1px solid var(--line-strong);
    border-radius: var(--radius-sm);
    background: var(--surface);
    color: var(--ink);
    font: inherit;
    font-size: 14px;
    transition: border-color .15s ease, box-shadow .15s ease;
}

.input:focus,
.select:focus,
.textarea:focus {
    outline: none;
    border-color: var(--info);
    box-shadow: var(--ring);
}

.input:disabled,
.textarea:disabled,
.select:disabled {
    background: #eef2f6;
    color: var(--muted);
    cursor: not-allowed;
}

.textarea { min-height: 84px; resize: vertical; }

.help {
    margin-top: 5px;
    font-size: 12px;
    color: var(--muted);
}

.field-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
}

.input-group {
    display: flex;
    gap: 8px;
}
.input-group .input { flex: 1 1 auto; }

input[type="number"].input { font-variant-numeric: tabular-nums; }

/* Pola wyboru (segmenty) */

.choice-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
}

.choice { position: relative; display: block; cursor: pointer; }

.choice input {
    position: absolute;
    width: 1px;
    height: 1px;
    opacity: 0;
    margin: 0;
}

.choice__box {
    display: flex;
    align-items: center;
    gap: 8px;
    min-height: 42px;
    padding: 9px 11px;
    border: 1px solid var(--line-strong);
    border-radius: var(--radius-sm);
    background: var(--surface);
    color: var(--muted);
    font-size: 13px;
    font-weight: 650;
    transition: box-shadow .15s ease;
}

.choice__box .ico { width: 16px; height: 16px; }

.choice__box > span {
    display: flex;
    flex-direction: column;
    gap: 1px;
    min-width: 0;
}

.choice__box small {
    font-size: 10.5px;
    font-weight: 400;
    line-height: 1.3;
    color: var(--muted);
}

.choice input:checked + .choice__box small { color: #16795a; }

.choice:hover .choice__box { border-color: var(--brand); color: var(--ink); }

.choice input:checked + .choice__box {
    border-color: var(--accent);
    background: var(--accent-soft);
    color: #065f46;
    box-shadow: inset 0 0 0 1px var(--accent);
}

.choice input:focus-visible + .choice__box { box-shadow: var(--ring); }

.choice input:disabled + .choice__box {
    opacity: .65;
    cursor: not-allowed;
}

.check {
    display: flex;
    align-items: flex-start;
    gap: 9px;
    font-size: 13.5px;
    cursor: pointer;
}

.check input {
    width: 18px;
    height: 18px;
    margin: 2px 0 0;
    accent-color: var(--accent);
    flex: none;
}

/* --------------------------------------------------------------------------
   Filtry, wyszukiwarka, kategorie
   -------------------------------------------------------------------------- */

.toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
}

.toolbar__side {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.search {
    display: flex;
    gap: 8px;
    flex: 1 1 260px;
    max-width: 430px;
}

.search .input { min-width: 0; }

.chips {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.chip {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 11px;
    border: 1px solid var(--line-strong);
    border-radius: 999px;
    background: var(--surface);
    color: var(--muted);
    font: inherit;
    font-size: 13px;
    font-weight: 600;
    line-height: 1.2;
    cursor: pointer;
    transition: border-color .15s ease, background .15s ease, color .15s ease;
}

.chip:hover { border-color: var(--brand); color: var(--ink); }

.chip--active {
    background: var(--brand);
    border-color: var(--brand);
    color: #fff;
}
.chip--active:hover { color: #fff; }

.chip__count {
    font-size: 11px;
    font-weight: 700;
    opacity: .7;
    font-variant-numeric: tabular-nums;
}

.results-line {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    flex-wrap: wrap;
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px solid var(--line);
    font-size: 13px;
    color: var(--muted);
}

/* --------------------------------------------------------------------------
   Lista produktów
   -------------------------------------------------------------------------- */

.product-list { display: block; }

.product {
    position: relative;
    display: grid;
    grid-template-columns: 64px minmax(0, 1fr) 252px;
    gap: 16px;
    align-items: center;
    padding: 16px 18px;
    border-bottom: 1px solid var(--line);
    scroll-margin-top: 90px;
    transition: background .15s ease;
}

.product:last-child { border-bottom: 0; }
.product:hover { background: #fbfcff; }
.product.is-selected { background: #f7fdfa; }
.product.is-selected::before {
    content: "";
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 3px;
    background: var(--accent);
}

.product__media img {
    display: block;
    width: 64px;
    height: 64px;
    padding: 4px;
    object-fit: contain;
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 11px;
}

.product__head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 10px;
}

.product__name {
    margin: 0;
    font-size: 15px;
    font-weight: 650;
    line-height: 1.3;
    color: var(--ink);
}

.product__sku {
    display: block;
    margin-top: 2px;
    font-size: 12px;
    color: var(--muted);
    letter-spacing: .02em;
    font-variant-numeric: tabular-nums;
}

.product__meta {
    display: flex;
    flex-wrap: wrap;
    gap: 4px 14px;
    margin-top: 7px;
    font-size: 12px;
    color: var(--muted);
}

.product__meta span {
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.product__meta .ico { width: 14px; height: 14px; }

.product__prices {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-end;
    gap: 6px 18px;
    margin-top: 9px;
}

.price {
    display: flex;
    flex-direction: column;
    gap: 1px;
    min-width: 0;
}

.price__label {
    font-size: 10.5px;
    font-weight: 650;
    letter-spacing: .05em;
    text-transform: uppercase;
    color: var(--muted);
}

.price__value {
    font-size: 14px;
    font-weight: 650;
    font-variant-numeric: tabular-nums;
    color: var(--ink-soft);
}

.price--ps .price__value {
    font-size: 17px;
    font-weight: 750;
    color: var(--accent-2);
}

.discount {
    display: inline-flex;
    align-items: center;
    padding: 2px 7px;
    border: 1px solid var(--accent-line);
    border-radius: 999px;
    background: var(--accent-soft);
    color: #065f46;
    font-size: 11.5px;
    font-weight: 750;
    font-variant-numeric: tabular-nums;
}

.product__order {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 8px;
    min-width: 0;
}

.qty {
    display: flex;
    align-items: center;
    gap: 4px;
}

.qty__btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    padding: 0;
    border: 1px solid #9fb3c8;
    border-radius: 8px;
    background: #e3ebf4;
    color: var(--brand);
    font: inherit;
    font-size: 15px;
    font-weight: 700;
    cursor: pointer;
    box-shadow: 0 1px 1px rgba(15, 31, 46, .04);
    transition: background .15s ease, border-color .15s ease, color .15s ease;
}

.qty__btn:hover { background: #eaf0f6; border-color: var(--brand); color: var(--brand); }
.qty__btn:disabled { opacity: .4; cursor: not-allowed; pointer-events: none; }
.qty__btn .ico { width: 15px; height: 15px; }
.qty__btn span { font-size: 17px; line-height: 1; }

.qty__input {
    width: 78px;
    padding: 6px 4px;
    border: 1px solid #b9c7d6;
    border-radius: 8px;
    background: #fff;
    color: var(--ink);
    font: inherit;
    font-size: 14px;
    font-weight: 700;
    text-align: center;
    font-variant-numeric: tabular-nums;
    -moz-appearance: textfield;
    appearance: textfield;
}

.qty__input::-webkit-outer-spin-button,
.qty__input::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

.qty__input:focus {
    outline: none;
    border-color: var(--info);
    box-shadow: var(--ring);
}

.qty__input:disabled {
    background: #eef2f6;
    color: var(--muted);
}

.qty__tools {
    display: flex;
    align-items: center;
    gap: 5px;
    flex-wrap: wrap;
    justify-content: flex-end;
}

.qty__clear {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 3px 7px;
    border: 1px solid var(--line-strong);
    border-radius: 7px;
    background: var(--surface);
    color: var(--ink-soft);
    font: inherit;
    font-size: 11.5px;
    font-weight: 600;
    cursor: pointer;
}

.qty__clear:hover { color: var(--danger); border-color: var(--danger-line); background: var(--danger-soft); }
.qty__clear:disabled { opacity: .4; cursor: not-allowed; pointer-events: none; }
.qty__clear .ico { width: 13px; height: 13px; }

.qty__add {
    color: var(--accent-2);
    border-color: var(--accent-line);
    background: var(--accent-soft);
}

.qty__add:hover {
    color: var(--accent-2);
    border-color: var(--accent);
    background: #d9f5e8;
}

.line-total {
    font-size: 12px;
    color: var(--muted);
    text-align: right;
}

.line-total strong {
    display: block;
    font-size: 15.5px;
    font-weight: 750;
    color: var(--ink);
    font-variant-numeric: tabular-nums;
}

.suggest {
    display: inline-flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 1px;
    margin-top: 2px;
    padding: 4px 8px;
    border: 1px dashed #d97706;
    border-radius: 8px;
    background: var(--amber-soft);
    color: #92400e;
    font: inherit;
    font-size: 11.5px;
    font-weight: 650;
    text-align: left;
    cursor: pointer;
}

.suggest:hover { background: #fef3c7; }
.suggest .ico { width: 13px; height: 13px; }
.suggest small {
    font-size: 10px;
    font-weight: 400;
    color: #a16207;
    line-height: 1.25;
}

.product__suggest-row {
    grid-column: 2 / -1;
    display: flex;
    justify-content: flex-end;
    margin-top: -8px;
}

/* --------------------------------------------------------------------------
   Paginacja
   -------------------------------------------------------------------------- */

.pager {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
    padding: 14px 18px;
    border-top: 1px solid var(--line);
    background: var(--surface-2);
}

.pager__info {
    font-size: 12.5px;
    color: var(--muted);
}

.pager__pages {
    display: flex;
    align-items: center;
    gap: 4px;
    flex-wrap: wrap;
}

.pager__link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 34px;
    height: 34px;
    padding: 0 10px;
    border: 1px solid var(--line-strong);
    border-radius: 8px;
    background: var(--surface);
    color: var(--ink-soft);
    font: inherit;
    font-size: 13px;
    font-weight: 650;
    cursor: pointer;
}

.pager__link:hover { border-color: var(--brand); }
.pager__link--active {
    background: var(--brand);
    border-color: var(--brand);
    color: #fff;
}
.pager__link:disabled { opacity: .4; cursor: not-allowed; pointer-events: none; }
.pager__link .ico { width: 15px; height: 15px; }

.pager__dots {
    padding: 0 4px;
    color: var(--muted);
    font-size: 13px;
}

/* --------------------------------------------------------------------------
   Karta wartości / promocje
   -------------------------------------------------------------------------- */

.total-card {
    position: relative;
    overflow: hidden;
    border: 1px solid #d1d5db;
    background: linear-gradient(155deg, #ffffff 0%, #eef0f3 58%, #dce0e5 100%);
    color: #263238;
    border-radius: var(--radius);
    box-shadow: 0 16px 40px -24px rgba(55, 65, 81, .35);
}

.total-card::after {
    content: "";
    position: absolute;
    right: -60px;
    top: -70px;
    width: 220px;
    height: 220px;
    border-radius: 50%;
    background: radial-gradient(
        circle,
        rgba(255, 255, 255, .85),
        rgba(255, 255, 255, 0) 68%
    );
    pointer-events: none;
}

.total-card__body {
    padding: 18px;
    position: relative;
    z-index: 1;
}

.total-card__label {
    display: flex;
    align-items: center;
    gap: 7px;
    font-size: 11.5px;
    font-weight: 650;
    letter-spacing: .07em;
    text-transform: uppercase;
    color: #64748b;
}

.total-card__label .ico {
    width: 15px;
    height: 15px;
    color: #64748b;
}

.total-card__value {
    margin: 4px 0 2px;
    font-size: 32px;
    font-weight: 750;
    letter-spacing: -.02em;
    font-variant-numeric: tabular-nums;
    line-height: 1.1;
    color: #1e293b;
}

.total-card__meta {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    font-size: 12px;
    color: #64748b;
}

.total-card__meta strong {
    color: #334155;
    font-weight: 700;
}

.total-card__actions {
    display: flex;
    gap: 8px;
    margin-top: 14px;
    flex-wrap: wrap;
}

/* Przyciski obrysowane */
.total-card .btn--outline {
    background: rgba(255, 255, 255, .65);
    border-color: #cbd5e1;
    color: #334155;
}

.total-card .btn--outline:hover {
    background: #fff;
    border-color: #94a3b8;
    color: #0f172a;
}

/* Przycisk główny */
.total-card .btn--success {
    background: #334155;
    border-color: #334155;
    color: #fff;
}

.total-card .btn--success:hover {
    background: #1e293b;
    border-color: #1e293b;
    color: #fff;
}

.progress {
    height: 7px;
    margin-top: 12px;
    border-radius: 999px;
    background: rgba(255, 255, 255, .18);
    overflow: hidden;
}

.progress__bar {
    height: 100%;
    border-radius: 999px;
    background: linear-gradient(90deg, #049b11, #ecfee2);
}

.checklist {
    display: grid;
    gap: 8px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.checklist li {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    font-size: 13px;
    line-height: 1.5;
}

.checklist .ico { width: 16px; height: 16px; margin-top: 1px; flex: none; }
.check--ok { color: #065f46; }
.check--no { color: #92400e; }

.progress-caption {
    margin-top: 6px;
    font-size: 11.5px;
    color: rgba(3, 3, 3, 0.72);
}

.status-list { display: flex; flex-direction: column; }

.status-line {
    display: flex;
    align-items: flex-start;
    gap: 9px;
    padding: 9px 0;
    border-bottom: 1px dashed var(--line);
    font-size: 13px;
    line-height: 1.45;
}

.status-line:last-child { border-bottom: 0; padding-bottom: 0; }
.status-line:first-child { padding-top: 0; }
.status-line .ico { width: 16px; height: 16px; margin-top: 1px; }
.status-line strong { font-weight: 700; }
.status-line--on { color: #065f46; }
.status-line--off { color: var(--muted); }
.status-line--warn { color: #92400e; }

/* --------------------------------------------------------------------------
   Szczegóły (bez JS)
   -------------------------------------------------------------------------- */

.details {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    overflow: hidden;
}

.details > summary {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 14px 17px;
    cursor: pointer;
    font-size: 15px;
    font-weight: 700;
    list-style: none;
}

.details > summary::-webkit-details-marker { display: none; }
.details > summary::marker { content: ""; }
.details > summary:hover { background: var(--surface-2); }
.details[open] > summary { border-bottom: 1px solid var(--line); }

.details__chevron {
    margin-left: auto;
    color: var(--muted);
    transition: transform .18s ease;
}
.details[open] .details__chevron { transform: rotate(180deg); }

.details__body { padding: 16px 17px; }

/* --------------------------------------------------------------------------
   Tabele podsumowania
   -------------------------------------------------------------------------- */

.table-wrap {
    overflow-x: auto;
    border: 1px solid var(--line);
    border-radius: 12px;
    background: var(--surface);
}

.summary-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13.5px;
}

.summary-table th {
    padding: 9px 10px;
    border-bottom: 1px solid var(--line);
    background: var(--surface-2);
    color: var(--muted);
    font-size: 11px;
    font-weight: 700;
    letter-spacing: .05em;
    text-transform: uppercase;
    text-align: left;
    white-space: nowrap;
}

.summary-table td {
    padding: 10px;
    border-bottom: 1px solid var(--line);
    vertical-align: top;
}

.summary-table tr:last-child td { border-bottom: 0; }
.summary-table .num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.summary-table .name { min-width: 190px; }
.summary-table tfoot td {
    border-top: 2px solid var(--line-strong);
    background: var(--surface-2);
    font-weight: 700;
}

.summary-table .sku {
    display: block;
    font-size: 11.5px;
    color: var(--muted);
    font-variant-numeric: tabular-nums;
}

.summary-table .row-total { font-weight: 700; }

.summary-qty {
    width: 74px;
    padding: 5px 4px;
    font-size: 13px;
}

@media (max-width: 760px) {
    .summary-table-wrap {
        display: block;
        border: 0 !important;
        border-radius: 0 !important;
    }

    .summary-table {
        display: block;
        font-size: 13px;
    }

    .summary-table thead { display: none; }
    .summary-table tbody { display: block; }

    .summary-table tr {
        display: block;
        padding: 12px 14px;
        border-bottom: 1px solid var(--line);
    }

    .summary-table tr:last-child { border-bottom: 0; }

    .summary-table td {
        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: 12px;
        padding: 2px 0;
        border: 0;
        text-align: right;
    }

    .summary-table td::before {
        content: attr(data-label);
        color: var(--muted);
        font-size: 11px;
        font-weight: 650;
        letter-spacing: .04em;
        text-transform: uppercase;
    }

    .summary-table td.name {
        display: block;
        padding-bottom: 6px;
        font-size: 13.5px;
        font-weight: 650;
        line-height: 1.35;
        text-align: left;
    }

    .summary-table td.name::before { content: none; }

    .summary-table td.name .sku {
        display: block;
        margin-top: 1px;
        font-size: 11px;
        font-weight: 400;
    }

    .summary-table td .qty__input { margin-left: auto; }
    .summary-table td .qty__clear { margin-left: auto; }
    .summary-table td.row-total { color: var(--ink); font-weight: 750; }
    .summary-table tfoot { display: none; }
}

.totals-box {
    display: grid;
    gap: 6px;
    margin-top: 14px;
    padding: 14px 16px;
    border: 1px solid var(--line);
    border-radius: 12px;
    background: var(--surface-2);
}

.totals-box__line {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 12px;
    font-size: 13.5px;
    color: var(--muted);
}

.totals-box__line strong { color: var(--ink); font-variant-numeric: tabular-nums; }

.totals-box__line--grand {
    padding-top: 8px;
    margin-top: 4px;
    border-top: 1px solid var(--line-strong);
    font-size: 15px;
    color: var(--ink);
}

.totals-box__line--grand strong { font-size: 20px; }

/* --------------------------------------------------------------------------
   Lista zamówień (index)
   -------------------------------------------------------------------------- */

.orders { display: flex; flex-direction: column; gap: 10px; }

.order-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 14px;
    align-items: center;
    padding: 16px 18px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: var(--surface);
    box-shadow: var(--shadow);
    transition: border-color .15s ease, transform .15s ease;
}

.order-row:hover { border-color: var(--line-strong); transform: translateY(-1px); }
.order-row--confirmed { border-left: 4px solid var(--accent); }

.order-row__id {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
    font-size: 15px;
    font-weight: 700;
}

.order-row__meta {
    display: flex;
    flex-wrap: wrap;
    gap: 4px 16px;
    margin-top: 6px;
    font-size: 12.5px;
    color: var(--muted);
}

.order-row__meta span { display: inline-flex; align-items: center; gap: 4px; }
.order-row__meta .ico { width: 14px; height: 14px; }

.order-row__actions {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    justify-content: flex-end;
}

.new-order {
    display: grid;
    grid-template-columns: 1.15fr .85fr;
    gap: 14px;
    margin-top: 20px;
}

.cta-card {
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding: 20px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: var(--surface);
    box-shadow: var(--shadow);
}

.cta-card--primary {
    border-color: var(--accent-line);
    background: linear-gradient(150deg, #ffffff 0%, #f0fbf6 100%);
}

.cta-card__icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 42px;
    height: 42px;
    border-radius: 12px;
    background: var(--accent-soft);
    color: var(--accent-2);
}

.cta-card--primary .cta-card__icon { background: #d8f5e8; }
.cta-card__icon .ico { width: 22px; height: 22px; }
.cta-card h3 { margin: 2px 0 0; font-size: 17px; }
.cta-card p { margin: 0; color: var(--muted); font-size: 13.5px; }
.cta-card .btn { align-self: flex-start; margin-top: 6px; }

.quota {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 7px 12px;
    border: 1px solid var(--line);
    border-radius: 999px;
    background: var(--surface);
    font-size: 12.5px;
    color: var(--muted);
    font-weight: 600;
}

.quota strong { color: var(--ink); }

.notice-strip {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-top: 16px;
    padding: 12px 15px;
    border: 1px solid var(--amber-line);
    border-radius: 12px;
    background: var(--amber-soft);
    color: #7c2d12;
    font-size: 13px;
}

.notice-strip .ico { width: 17px; height: 17px; }

/* --------------------------------------------------------------------------
   Logowanie / pomoc
   -------------------------------------------------------------------------- */

.auth {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: calc(100vh - 69px);
    padding: 36px 16px 46px;
}

.auth-shell {
    display: grid;
    grid-template-columns: minmax(0, 440px) 360px;
    gap: 24px;
    align-items: stretch;
    width: 100%;
    max-width: 850px;
}

.auth-help {
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.auth-help__title {
    display: flex;
    align-items: center;
    gap: 7px;
    margin-bottom: 14px;
    font-size: 16px;
}

.auth-help .ico { width: 17px; height: 17px; }

.auth-steps {
    counter-reset: authstep;
    display: grid;
    gap: 10px;
    margin: 0 0 14px;
    padding: 0;
    list-style: none;
}

.auth-steps li {
    position: relative;
    padding-left: 31px;
    font-size: 13px;
    color: var(--muted);
    line-height: 1.5;
}

.auth-steps li::before {
    counter-increment: authstep;
    content: counter(authstep);
    position: absolute;
    left: 0;
    top: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background: var(--accent-soft);
    color: var(--accent-2);
    font-size: 11px;
    font-weight: 750;
}

@media (max-width: 980px) {
    .auth-shell {
        grid-template-columns: minmax(0, 440px);
        justify-content: center;
    }
    .auth-help { display: none; }
}

.auth-card {
    width: 100%;
    max-width: 440px;
    padding: 30px;
    border: 1px solid var(--line);
    border-radius: var(--radius-lg);
    background: var(--surface);
    box-shadow: 0 24px 60px -32px rgba(16, 42, 67, .45);
}

.auth-card__logo {
    display: block;
    width: 84px;
    margin: 0 auto 16px;

}

.auth-card h1 {
    margin-bottom: 6px;
    font-size: 21px;
    text-align: center;
}

.auth-card__sub {
    margin: 0 0 20px;
    color: var(--muted);
    font-size: 13px;
    text-align: center;
}

.auth-foot {
    margin-top: 14px;
    text-align: center;
    font-size: 12.5px;
    color: var(--muted);
}

.auth-links {
    display: flex;
    justify-content: center;
    gap: 16px;
    margin-top: 16px;
    font-size: 12.5px;
}

.reps {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
}

.rep {
    padding: 12px;
    border: 1px solid var(--line);
    border-radius: 12px;
    background: var(--surface-2);
    font-size: 12px;
    color: var(--muted);
    line-height: 1.5;
}

.rep strong { display: block; margin-bottom: 2px; color: var(--ink); font-size: 13px; }

.map-img {
    display: block;
    width: 100%;
    border: 1px solid var(--line);
    border-radius: 12px;
}

.invoice-img {
    display: block;
    width: 100%;
    border: 1px solid var(--line);
    border-radius: 12px;
}

/* --------------------------------------------------------------------------
   Panel administratora
   -------------------------------------------------------------------------- */

.stat-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    gap: 12px;
    margin-bottom: 20px;
}

.stat {
    padding: 16px 18px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: var(--surface);
    box-shadow: var(--shadow-sm);
}

.stat__label {
    font-size: 11.5px;
    font-weight: 650;
    letter-spacing: .05em;
    text-transform: uppercase;
    color: var(--muted);
}

.stat__value {
    margin-top: 4px;
    font-size: 26px;
    font-weight: 750;
    font-variant-numeric: tabular-nums;
}

.stat--warn .stat__value { color: var(--amber); }
.stat--ok .stat__value { color: var(--accent-2); }
.stat--danger .stat__value { color: var(--danger); }

.table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
}

.table th {
    position: sticky;
    top: 0;
    z-index: 1;
    padding: 9px 10px;
    border-bottom: 1px solid var(--line);
    background: var(--surface-2);
    color: var(--muted);
    font-size: 11px;
    font-weight: 700;
    letter-spacing: .04em;
    text-transform: uppercase;
    text-align: left;
    white-space: nowrap;
}

.table td {
    padding: 9px 10px;
    border-bottom: 1px solid var(--line);
    vertical-align: top;
}

.table tbody tr:hover { background: #fbfcff; }
.table tbody tr:last-child td { border-bottom: 0; }
.table .num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.table .actions { white-space: nowrap; }
.table .actions .btn { margin: 1px 2px; }

.section-title {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin: 30px 0 12px;
    flex-wrap: wrap;
}

.section-title h2 { margin: 0; font-size: 18px; }

/* Edycja komórek w panelu produktów */

.editable {
    min-width: 72px;
    padding: 4px 6px;
    border: 1px solid transparent;
    border-radius: 6px;
    background: #fffdf5;
    cursor: text;
}

.editable:focus {
    outline: none;
    border-color: var(--info);
    background: #fff;
    box-shadow: var(--ring);
}

.editable.saving { background: var(--accent-soft); }
.editable.saved { background: var(--accent-soft); }

/* --------------------------------------------------------------------------
   Dokumenty / treści
   -------------------------------------------------------------------------- */

.prose {
    max-width: 840px;
    font-size: 14.5px;
    line-height: 1.68;
    color: var(--ink-soft);
}

.prose h2 {
    margin: 28px 0 8px;
    padding-top: 6px;
    font-size: 17px;
    color: var(--ink);
}

.prose h2:first-child { margin-top: 0; }
.prose h3 { margin: 22px 0 6px; font-size: 15px; }
.prose ul, .prose ol { margin-bottom: 16px; }
.prose li { margin-bottom: 5px; }
.prose .lead {
    padding: 14px 16px;
    border: 1px solid var(--info-line);
    border-radius: 12px;
    background: var(--info-soft);
    color: #1e3a8a;
    font-size: 14px;
}
.prose .callout {
    padding: 14px 16px;
    border: 1px solid var(--amber-line);
    border-radius: 12px;
    background: var(--amber-soft);
    color: #7c2d12;
    font-size: 13.5px;
}
.prose table { width: 100%; border-collapse: collapse; font-size: 13.5px; }
.prose th, .prose td { padding: 8px 10px; border-bottom: 1px solid var(--line); text-align: left; }
.prose th { background: var(--surface-2); font-size: 12px; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); }

.steps {
    counter-reset: step;
    display: grid;
    gap: 12px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.step {
    display: grid;
    grid-template-columns: 34px minmax(0, 1fr);
    gap: 12px;
    padding: 14px 16px;
    border: 1px solid var(--line);
    border-radius: 12px;
    background: var(--surface);
}

.step::before {
    counter-increment: step;
    content: counter(step);
    display: flex;
    align-items: center;
    justify-content: center;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    background: var(--brand);
    color: #fff;
    font-size: 13px;
    font-weight: 700;
}

.step h3 { margin: 0 0 3px; font-size: 14.5px; }
.step p { margin: 0; font-size: 13.5px; color: var(--muted); }

/* --------------------------------------------------------------------------
   Stan pusty
   -------------------------------------------------------------------------- */

.empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    padding: 48px 20px;
    text-align: center;
}

.empty__icon { width: 38px; height: 38px; color: var(--line-strong); }
.empty h3 { margin: 4px 0 0; font-size: 16px; }
.empty p { margin: 0; max-width: 460px; color: var(--muted); font-size: 13.5px; }
.empty__action { margin-top: 8px; }

/* --------------------------------------------------------------------------
   Stopka
   -------------------------------------------------------------------------- */

.footer {
    margin-top: auto;
    border-top: 1px solid var(--line);
    background: var(--surface);
}

.footer__inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    flex-wrap: wrap;
    max-width: var(--container);
    margin: 0 auto;
    padding: 16px 20px;
    font-size: 12px;
    color: var(--muted);
}

.footer__links { display: flex; gap: 14px; flex-wrap: wrap; }
.footer__links a { color: var(--muted); }
.footer__links a:hover { color: var(--ink); }

/* --------------------------------------------------------------------------
   Pasek zapisu na mobile
   -------------------------------------------------------------------------- */

.mobile-save { display: none; }

/* --------------------------------------------------------------------------
   Responsywność
   -------------------------------------------------------------------------- */

@media (max-width: 1160px) {
    .layout { grid-template-columns: minmax(0, 1fr) 310px; }
    .total-card__value { font-size: 28px; }
}

@media (max-width: 980px) {
    .layout { grid-template-columns: minmax(0, 1fr); }
    .sidebar {
        position: static;
        max-height: none;
        overflow: visible;
        padding-right: 0;
    }
    .product { grid-template-columns: 56px minmax(0, 1fr) 230px; gap: 12px; }
    .product__media img { width: 56px; height: 56px; }
    .new-order { grid-template-columns: 1fr; }
}

@media (max-width: 760px) {
    body { font-size: 14.5px; }
    .page { padding: 16px 14px 28px; }
    .topbar__inner { padding: 8px 14px; gap: 8px; }
    .brand__text small { display: none; }
    .brand__logo { width: 38px; height: 38px; }
    .total-pill { padding: 5px 10px; gap: 7px; }
    .total-pill__label { font-size: 10px; }
    .total-pill__value { font-size: 14px; }
    .user-chip { max-width: 130px; }
    .total-pill ~ .user-chip { display: none; }
    .topbar__actions .btn span { display: none; }
    .hide-sm { display: none; }

    .product {
        grid-template-columns: 56px minmax(0, 1fr);
        gap: 10px 12px;
        padding: 14px;
    }

    .product__order {
        grid-column: 1 / -1;
        display: grid;
        grid-template-columns: auto minmax(0, 1fr);
        align-items: center;
        gap: 6px 10px;
        padding-top: 10px;
        border-top: 1px dashed var(--line);
    }

    .product__order .qty { grid-column: 1; }
    .product__order .line-total { grid-column: 2; }
    .product__order .qty__tools { grid-column: 1 / -1; justify-content: flex-start; }
    .product__order .suggest { grid-column: 1 / -1; justify-self: start; }

    .product__suggest-row { grid-column: 1 / -1; }

    .line-total { text-align: left; }
    .line-total strong { display: inline; font-size: 14px; }

    .order-row { grid-template-columns: 1fr; }
    .order-row__actions { justify-content: flex-start; }

    .mobile-save {
        position: fixed;
        left: 0;
        right: 0;
        bottom: 0;
        z-index: 60;
        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: 10px;
        padding: 10px 14px calc(10px + env(safe-area-inset-bottom, 0px));
        border-top: 1px solid var(--line);
        background: rgba(255, 255, 255, .97);
        box-shadow: 0 -8px 24px -14px rgba(15, 31, 46, .35);
    }

    .mobile-save__total { font-size: 12px; color: var(--muted); }
    .mobile-save__total strong { display: block; font-size: 16px; color: var(--ink); font-variant-numeric: tabular-nums; }

    .choice-grid { grid-template-columns: 1fr; }
    .reps { grid-template-columns: 1fr; }
    .field-row { grid-template-columns: 1fr; }
    .auth-card { padding: 22px; }
    .summary-table { font-size: 12.5px; }
    .summary-table th, .summary-table td { padding: 8px 6px; }
    .summary-table .name { min-width: 140px; }
}

@media (max-width: 460px) {
    .brand__text strong { font-size: 14px; }
    .topbar__actions { gap: 5px; }
    .total-pill__label span { display: none; }
    .qty__input { width: 64px; }
    .qty__btn { width: 30px; height: 30px; }
    .pager__info { width: 100%; }
}

/* --------------------------------------------------------------------------
   Druk
   -------------------------------------------------------------------------- */

@media print {
    :root { --shadow: none; --shadow-sm: none; }
    body {
        background: #fff;
        font-size: 10.5pt;
        color: #000;
    }
    .topbar, .footer, .sidebar, .mobile-save, .no-print,
    .pager, .filters, .toolbar, .qty__tools, .suggest, .skip-link, .back {
        display: none !important;
    }
    .page { max-width: 100%; padding: 0; }
    .layout { display: block; }
    .card { border: 0; box-shadow: none; border-radius: 0; }
    .card__body { padding: 0; }
    .product { grid-template-columns: 1fr auto; border-bottom: 1px solid #ddd; }
    .summary-table th { background: #eee !important; color: #000; }
    .summary-table td, .summary-table th { border-color: #bbb; }
    a { color: #000; text-decoration: none; }
    .alert, .flash { border: 1px solid #999; background: #fff !important; color: #000; }
}
