/* Marketplace CRM – system komponentów (design tokens, jasny/ciemny motyw, mobile first) */

:root {
    --font: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
    --bg: #f6f7f9;
    --surface: #ffffff;
    --surface-2: #f1f3f6;
    --border: #e3e6eb;
    --border-strong: #cfd4dc;
    --text: #151a23;
    --text-2: #5b6474;
    --text-3: #8a93a3;
    --brand: #2f5bea;
    --brand-hover: #2148c9;
    --brand-soft: #eaf0ff;
    --brand-text: #ffffff;
    --success: #13865a;
    --success-soft: #e4f6ee;
    --warning: #b25e09;
    --warning-soft: #fdf1e1;
    --danger: #c9302c;
    --danger-soft: #fdeceb;
    --info: #2563a8;
    --info-soft: #e7f0fb;
    --radius: 10px;
    --radius-sm: 7px;
    --shadow: 0 1px 2px rgba(16, 24, 40, .05), 0 1px 3px rgba(16, 24, 40, .06);
    --shadow-lg: 0 12px 32px rgba(16, 24, 40, .14);
    --sidebar: 248px;
    --topbar: 60px;
    color-scheme: light;
}

@media (prefers-color-scheme: dark) {
    :root:not([data-theme="light"]) {
        --bg: #0e1116;
        --surface: #161a21;
        --surface-2: #1d222b;
        --border: #272d38;
        --border-strong: #353d4a;
        --text: #e8ebf0;
        --text-2: #a3abb9;
        --text-3: #6f7888;
        --brand: #5b82ff;
        --brand-hover: #7798ff;
        --brand-soft: #1b2643;
        --success: #3cc68a;
        --success-soft: #12291f;
        --warning: #e9a23b;
        --warning-soft: #2d2213;
        --danger: #ff6b66;
        --danger-soft: #331a1a;
        --info: #6aa7ef;
        --info-soft: #15243a;
        --shadow: 0 1px 2px rgba(0, 0, 0, .4);
        --shadow-lg: 0 12px 32px rgba(0, 0, 0, .5);
        color-scheme: dark;
    }
}

:root[data-theme="dark"] {
    --bg: #0e1116;
    --surface: #161a21;
    --surface-2: #1d222b;
    --border: #272d38;
    --border-strong: #353d4a;
    --text: #e8ebf0;
    --text-2: #a3abb9;
    --text-3: #6f7888;
    --brand: #5b82ff;
    --brand-hover: #7798ff;
    --brand-soft: #1b2643;
    --success: #3cc68a;
    --success-soft: #12291f;
    --warning: #e9a23b;
    --warning-soft: #2d2213;
    --danger: #ff6b66;
    --danger-soft: #331a1a;
    --info: #6aa7ef;
    --info-soft: #15243a;
    --shadow: 0 1px 2px rgba(0, 0, 0, .4);
    --shadow-lg: 0 12px 32px rgba(0, 0, 0, .5);
    color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
    margin: 0;
    font-family: var(--font);
    font-size: 15px;
    line-height: 1.5;
    color: var(--text);
    background: var(--bg);
    -webkit-font-smoothing: antialiased;
}
a { color: var(--brand); text-decoration: none; }
a:hover { color: var(--brand-hover); }
h1, h2, h3, h4 { margin: 0 0 .5rem; line-height: 1.25; font-weight: 650; letter-spacing: -.01em; }
h1 { font-size: 1.6rem; }
h2 { font-size: 1.2rem; }
h3 { font-size: 1.02rem; }
p { margin: 0 0 1rem; }
small, .muted { color: var(--text-2); }
.text-3 { color: var(--text-3); }
code, .mono { font-family: ui-monospace, "SFMono-Regular", Consolas, monospace; font-size: .88em; }
hr { border: 0; border-top: 1px solid var(--border); margin: 1.25rem 0; }
:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; border-radius: 4px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

.icon { width: 18px; height: 18px; flex: none; }
.icon-sm { width: 15px; height: 15px; flex: none; }
.icon-lg { width: 22px; height: 22px; flex: none; }

/* ---------- Przyciski ---------- */
.btn {
    display: inline-flex; align-items: center; justify-content: center; gap: .45rem;
    min-height: 38px; padding: .5rem .95rem;
    border: 1px solid var(--border-strong); border-radius: var(--radius-sm);
    background: var(--surface); color: var(--text);
    font: inherit; font-weight: 550; font-size: .92rem; line-height: 1.2;
    cursor: pointer; white-space: nowrap; transition: background .15s, border-color .15s, color .15s;
}
.btn:hover { background: var(--surface-2); color: var(--text); }
.btn-primary { background: var(--brand); border-color: var(--brand); color: var(--brand-text); }
.btn-primary:hover { background: var(--brand-hover); border-color: var(--brand-hover); color: var(--brand-text); }
.btn-danger { color: var(--danger); }
.btn-danger:hover { background: var(--danger-soft); color: var(--danger); border-color: var(--danger); }
.btn-ghost { border-color: transparent; background: transparent; }
.btn-sm { min-height: 32px; padding: .3rem .65rem; font-size: .85rem; }
.btn-lg { min-height: 46px; padding: .7rem 1.3rem; font-size: 1rem; }
.btn-block { width: 100%; }
.btn-icon { width: 38px; padding: 0; }
.btn[disabled] { opacity: .55; cursor: not-allowed; }

/* ---------- Formularze ---------- */
.form-grid { display: grid; gap: 1rem; }
.form-grid-2 { display: grid; gap: 1rem; grid-template-columns: 1fr; }
.field { display: flex; flex-direction: column; gap: .35rem; }
.field > label, .label { font-size: .86rem; font-weight: 560; color: var(--text); }
.field .hint { font-size: .8rem; color: var(--text-3); }
.field .error { font-size: .82rem; color: var(--danger); }
.input, select.input, textarea.input {
    width: 100%; min-height: 40px; padding: .5rem .75rem;
    border: 1px solid var(--border-strong); border-radius: var(--radius-sm);
    background: var(--surface); color: var(--text); font: inherit; font-size: .94rem;
    transition: border-color .15s, box-shadow .15s;
}
textarea.input { min-height: 110px; resize: vertical; }
.input:focus { outline: none; border-color: var(--brand); box-shadow: 0 0 0 3px var(--brand-soft); }
.has-error .input { border-color: var(--danger); }
.check { display: flex; align-items: flex-start; gap: .55rem; font-size: .92rem; cursor: pointer; }
.check input { width: 17px; height: 17px; margin-top: .15rem; accent-color: var(--brand); }
.input-group { display: flex; }
.input-group .input { border-radius: var(--radius-sm) 0 0 var(--radius-sm); }
.input-group .btn { border-radius: 0 var(--radius-sm) var(--radius-sm) 0; margin-left: -1px; }
.search-input { position: relative; }
.search-input > svg { position: absolute; left: .7rem; top: 50%; transform: translateY(-50%); color: var(--text-3); }
.search-input .input { padding-left: 2.2rem; }

/* ---------- Karty, siatki ---------- */
.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow); }
.card-body { padding: 1.15rem; }
.card-header { display: flex; align-items: center; justify-content: space-between; gap: .75rem; padding: .95rem 1.15rem; border-bottom: 1px solid var(--border); }
.card-header h2, .card-header h3 { margin: 0; }
.card-footer { padding: .85rem 1.15rem; border-top: 1px solid var(--border); background: var(--surface-2); border-radius: 0 0 var(--radius) var(--radius); }
.grid { display: grid; gap: 1rem; }
.grid-2, .grid-3, .grid-4 { display: grid; gap: 1rem; grid-template-columns: 1fr; }
.stack { display: flex; flex-direction: column; gap: 1rem; }
.row { display: flex; align-items: center; gap: .6rem; flex-wrap: wrap; }
.row-between { display: flex; align-items: center; justify-content: space-between; gap: .75rem; flex-wrap: wrap; }
.spacer { flex: 1; }

/* ---------- Statystyki ---------- */
.stat { padding: 1rem 1.1rem; }
.stat-label { display: flex; align-items: center; gap: .4rem; font-size: .83rem; color: var(--text-2); font-weight: 520; }
.stat-value { font-size: 1.55rem; font-weight: 680; letter-spacing: -.02em; margin-top: .25rem; font-variant-numeric: tabular-nums; }
.stat-sub { font-size: .82rem; color: var(--text-3); margin-top: .15rem; }
.trend-up { color: var(--success); }
.trend-down { color: var(--danger); }

/* ---------- Odznaki ---------- */
.badge {
    display: inline-flex; align-items: center; gap: .3rem;
    padding: .14rem .55rem; border-radius: 999px;
    font-size: .76rem; font-weight: 600; line-height: 1.5; white-space: nowrap;
    background: var(--surface-2); color: var(--text-2);
}
.badge-success { background: var(--success-soft); color: var(--success); }
.badge-warning { background: var(--warning-soft); color: var(--warning); }
.badge-danger { background: var(--danger-soft); color: var(--danger); }
.badge-info { background: var(--info-soft); color: var(--info); }
.badge-brand { background: var(--brand-soft); color: var(--brand); }
.dot { width: 9px; height: 9px; border-radius: 50%; display: inline-block; flex: none; background: var(--text-3); }
.mp-chip { display: inline-flex; align-items: center; gap: .4rem; font-size: .86rem; font-weight: 560; }

/* Statusy zamówień i ofert */
.st-new, .st-queued, .st-pending, .st-trial { background: var(--info-soft); color: var(--info); }
.st-paid, .st-processing { background: var(--warning-soft); color: var(--warning); }
.st-shipped { background: var(--brand-soft); color: var(--brand); }
.st-delivered, .st-active, .st-connected { background: var(--success-soft); color: var(--success); }
.st-cancelled, .st-returned, .st-error, .st-blocked, .st-suspended, .st-past_due { background: var(--danger-soft); color: var(--danger); }
.st-draft, .st-archived, .st-ended, .st-disconnected { background: var(--surface-2); color: var(--text-2); }

/* ---------- Alerty ---------- */
.alert { display: flex; gap: .65rem; align-items: flex-start; padding: .75rem .95rem; border-radius: var(--radius-sm); font-size: .92rem; border: 1px solid transparent; }
.alert .icon { margin-top: .1rem; }
.alert-success { background: var(--success-soft); color: var(--success); }
.alert-error { background: var(--danger-soft); color: var(--danger); }
.alert-warning { background: var(--warning-soft); color: var(--warning); }
.alert-info { background: var(--info-soft); color: var(--info); }
.alert a { color: inherit; text-decoration: underline; font-weight: 600; }
.alert-close { margin-left: auto; background: none; border: 0; color: inherit; cursor: pointer; padding: 0; opacity: .7; }
.flash-stack { display: flex; flex-direction: column; gap: .5rem; margin-bottom: 1rem; }

/* ---------- Tabele (na telefonie zamieniają się w karty) ---------- */
.table-wrap { width: 100%; overflow-x: auto; }
.table { width: 100%; border-collapse: collapse; font-size: .9rem; }
.table th {
    text-align: left; font-size: .76rem; text-transform: uppercase; letter-spacing: .04em;
    color: var(--text-3); font-weight: 650; padding: .65rem .9rem; border-bottom: 1px solid var(--border);
    background: var(--surface-2); white-space: nowrap;
}
.table td { padding: .7rem .9rem; border-bottom: 1px solid var(--border); vertical-align: middle; }
.table tr:last-child td { border-bottom: 0; }
.table tbody tr:hover { background: var(--surface-2); }
.table .num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.table .w-check { width: 40px; }
.table .actions { text-align: right; white-space: nowrap; }
.table a.row-link { color: var(--text); font-weight: 560; }
.table a.row-link:hover { color: var(--brand); }
.cell-sub { display: block; font-size: .8rem; color: var(--text-3); }

@media (max-width: 760px) {
    .table-cards thead { display: none; }
    .table-cards, .table-cards tbody, .table-cards tr, .table-cards td { display: block; width: 100%; }
    .table-cards tr { padding: .75rem .9rem; border-bottom: 1px solid var(--border); position: relative; }
    .table-cards td { padding: .15rem 0; border: 0; display: flex; justify-content: space-between; gap: 1rem; text-align: right; }
    .table-cards td::before { content: attr(data-label); color: var(--text-3); font-size: .8rem; text-align: left; font-weight: 550; }
    .table-cards td.td-main { display: block; text-align: left; font-size: .98rem; padding-bottom: .35rem; padding-right: 2rem; }
    .table-cards td.td-main::before { content: none; }
    .table-cards td.w-check { position: absolute; right: .6rem; top: .75rem; width: auto; display: block; }
    .table-cards td.w-check::before { content: none; }
    .table-cards td.actions { justify-content: flex-end; padding-top: .4rem; }
    .table-cards td.actions::before { content: none; }
    .table-cards td .cell-sub { display: inline; margin-left: .35rem; }
    .table-cards td.td-main .cell-sub { display: block; margin-left: 0; }
}

/* ---------- Pasek postępu (limity) ---------- */
.meter { height: 7px; background: var(--surface-2); border-radius: 99px; overflow: hidden; }
.meter > span { display: block; height: 100%; background: var(--brand); border-radius: 99px; }
.meter.warn > span { background: var(--warning); }
.meter.full > span { background: var(--danger); }

/* ---------- Wykres słupkowy (CSS) ---------- */
.bars { display: flex; align-items: flex-end; gap: 3px; height: 160px; padding-top: .5rem; }
.bars .bar { flex: 1; background: var(--brand); opacity: .85; border-radius: 3px 3px 0 0; min-height: 2px; position: relative; }
.bars .bar:hover { opacity: 1; }
.bars .bar:hover::after {
    content: attr(data-tip); position: absolute; bottom: calc(100% + 6px); left: 50%; transform: translateX(-50%);
    background: var(--text); color: var(--bg); font-size: .75rem; padding: .25rem .5rem; border-radius: 6px; white-space: nowrap; z-index: 5;
}
.bars-axis { display: flex; justify-content: space-between; font-size: .75rem; color: var(--text-3); margin-top: .4rem; }
.share-row { display: grid; grid-template-columns: 110px 1fr 90px; gap: .75rem; align-items: center; font-size: .88rem; }
.share-row + .share-row { margin-top: .7rem; }
.share-row .num { text-align: right; font-variant-numeric: tabular-nums; }

/* ---------- Puste stany ---------- */
.empty { text-align: center; padding: 2.5rem 1rem; color: var(--text-2); }
.empty .icon-lg { width: 40px; height: 40px; color: var(--text-3); margin-bottom: .6rem; }
.empty h3 { color: var(--text); }

/* ---------- Paginacja ---------- */
.pager { display: flex; align-items: center; justify-content: space-between; gap: .75rem; padding: .75rem 1.15rem; border-top: 1px solid var(--border); font-size: .88rem; color: var(--text-2); }

/* ---------- Pasek akcji masowych ---------- */
.bulkbar { display: none; align-items: center; gap: .6rem; flex-wrap: wrap; padding: .6rem 1.15rem; background: var(--brand-soft); border-bottom: 1px solid var(--border); font-size: .9rem; }
.bulkbar.is-visible { display: flex; }

/* ---------- Filtry / zakładki ---------- */
.tabs { display: flex; gap: .25rem; overflow-x: auto; scrollbar-width: none; padding: 0 1.15rem; border-bottom: 1px solid var(--border); }
.tabs::-webkit-scrollbar { display: none; }
.tabs a { display: inline-flex; align-items: center; gap: .4rem; padding: .7rem .7rem; color: var(--text-2); font-size: .88rem; font-weight: 560; border-bottom: 2px solid transparent; white-space: nowrap; }
.tabs a:hover { color: var(--text); }
.tabs a.is-active { color: var(--brand); border-bottom-color: var(--brand); }
.tabs .count { font-size: .74rem; background: var(--surface-2); color: var(--text-2); padding: 0 .45rem; border-radius: 99px; }
.toolbar { display: flex; gap: .6rem; flex-wrap: wrap; padding: .85rem 1.15rem; align-items: center; }
.toolbar .search-input { flex: 1 1 220px; }

/* ================================================================ Panel (sidebar + topbar) */
.app { min-height: 100vh; }
.sidebar {
    position: fixed; inset: 0 auto 0 0; width: var(--sidebar); z-index: 40;
    display: flex; flex-direction: column; background: var(--surface); border-right: 1px solid var(--border);
    transform: translateX(-100%); transition: transform .2s ease;
}
.sidebar.is-open { transform: none; box-shadow: var(--shadow-lg); }
.sidebar-brand { display: flex; align-items: center; gap: .6rem; height: var(--topbar); padding: 0 1.1rem; border-bottom: 1px solid var(--border); font-weight: 700; color: var(--text); }
.logo-mark { width: 30px; height: 30px; border-radius: 8px; background: var(--brand); color: #fff; display: grid; place-items: center; font-weight: 800; font-size: .95rem; flex: none; }
.sidebar-nav { flex: 1; overflow-y: auto; padding: .75rem .6rem; }
.nav-section { font-size: .7rem; text-transform: uppercase; letter-spacing: .07em; color: var(--text-3); font-weight: 650; padding: .9rem .65rem .35rem; }
.nav-link {
    display: flex; align-items: center; gap: .7rem; padding: .55rem .65rem; border-radius: var(--radius-sm);
    color: var(--text-2); font-weight: 540; font-size: .92rem;
}
.nav-link:hover { background: var(--surface-2); color: var(--text); }
.nav-link.is-active { background: var(--brand-soft); color: var(--brand); }
.nav-link .badge { margin-left: auto; }
.sidebar-foot { padding: .8rem; border-top: 1px solid var(--border); }
.plan-box { padding: .8rem; border-radius: var(--radius-sm); background: var(--surface-2); font-size: .84rem; }
.plan-box strong { display: block; margin-bottom: .45rem; }
.overlay { position: fixed; inset: 0; background: rgba(10, 14, 20, .45); z-index: 35; display: none; }
.overlay.is-visible { display: block; }

.main { min-width: 0; padding-bottom: 72px; }
.topbar {
    position: sticky; top: 0; z-index: 30; height: var(--topbar);
    display: flex; align-items: center; gap: .6rem; padding: 0 1rem;
    background: color-mix(in srgb, var(--bg) 88%, transparent); backdrop-filter: blur(8px);
    border-bottom: 1px solid var(--border);
}
.topbar .page-name { font-weight: 650; font-size: 1rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.topbar-search { display: none; }
.avatar { width: 34px; height: 34px; border-radius: 50%; background: var(--brand-soft); color: var(--brand); display: grid; place-items: center; font-weight: 700; font-size: .82rem; flex: none; }
.content { padding: 1rem; max-width: 1320px; margin: 0 auto; }
.page-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 1rem; flex-wrap: wrap; margin-bottom: 1.1rem; }
.page-head h1 { margin: 0; }
.page-head p { margin: .2rem 0 0; color: var(--text-2); }
.breadcrumb { font-size: .84rem; color: var(--text-3); margin-bottom: .3rem; display: flex; align-items: center; gap: .3rem; }
.breadcrumb a { color: var(--text-2); }

/* Dolna belka na telefonie */
.bottom-nav {
    position: fixed; left: 0; right: 0; bottom: 0; z-index: 30; height: 64px;
    display: grid; grid-template-columns: repeat(5, 1fr);
    background: var(--surface); border-top: 1px solid var(--border);
    padding-bottom: env(safe-area-inset-bottom);
}
.bottom-nav a { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: .2rem; font-size: .7rem; color: var(--text-3); font-weight: 560; position: relative; }
.bottom-nav a.is-active { color: var(--brand); }
.bottom-nav .bn-badge { position: absolute; top: 8px; left: calc(50% + 6px); background: var(--danger); color: #fff; font-size: .62rem; border-radius: 99px; padding: 0 .35rem; line-height: 1.4; }

.banner { padding: .55rem 1rem; font-size: .88rem; text-align: center; background: var(--warning-soft); color: var(--warning); }
.banner a { color: inherit; font-weight: 650; text-decoration: underline; }
.banner-danger { background: var(--danger-soft); color: var(--danger); }

/* Menu użytkownika */
.dropdown { position: relative; }
.dropdown-menu {
    position: absolute; right: 0; top: calc(100% + 6px); min-width: 220px; z-index: 50;
    background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow-lg);
    padding: .4rem; display: none;
}
.dropdown.is-open .dropdown-menu { display: block; }
.dropdown-menu a, .dropdown-menu button { display: flex; align-items: center; gap: .55rem; width: 100%; padding: .5rem .6rem; border-radius: 6px; color: var(--text); font: inherit; font-size: .9rem; background: none; border: 0; cursor: pointer; text-align: left; }
.dropdown-menu a:hover, .dropdown-menu button:hover { background: var(--surface-2); }
.dropdown-head { padding: .5rem .6rem .6rem; border-bottom: 1px solid var(--border); margin-bottom: .3rem; font-size: .85rem; }

/* Paleta poleceń (Ctrl+K) */
.palette { position: fixed; inset: 0; z-index: 60; display: none; align-items: flex-start; justify-content: center; padding: 12vh 1rem 1rem; background: rgba(10, 14, 20, .45); }
.palette.is-open { display: flex; }
.palette-box { width: 100%; max-width: 560px; background: var(--surface); border: 1px solid var(--border); border-radius: 14px; box-shadow: var(--shadow-lg); overflow: hidden; }
.palette-box .input { border: 0; border-bottom: 1px solid var(--border); border-radius: 0; min-height: 52px; font-size: 1rem; padding-left: 1rem; box-shadow: none; }
.palette-list { max-height: 320px; overflow-y: auto; padding: .4rem; }
.palette-list a { display: flex; align-items: center; gap: .6rem; padding: .6rem .7rem; border-radius: 8px; color: var(--text); font-size: .93rem; }
.palette-list a.is-selected, .palette-list a:hover { background: var(--brand-soft); color: var(--brand); }
.kbd { font-family: inherit; font-size: .72rem; border: 1px solid var(--border-strong); border-bottom-width: 2px; border-radius: 5px; padding: 0 .35rem; color: var(--text-3); }

/* Karty portali */
.mp-card { display: flex; flex-direction: column; }
.mp-head { display: flex; align-items: center; gap: .8rem; }
.mp-logo { width: 44px; height: 44px; border-radius: 10px; display: grid; place-items: center; color: #fff; font-weight: 800; font-size: 1.1rem; flex: none; }
.mp-account { display: flex; align-items: center; gap: .6rem; padding: .6rem 0; border-top: 1px solid var(--border); font-size: .9rem; }

/* Szczegóły (dl) */
.details { display: grid; grid-template-columns: 140px 1fr; gap: .5rem 1rem; margin: 0; font-size: .92rem; }
.details dt { color: var(--text-3); }
.details dd { margin: 0; }
.timeline { list-style: none; margin: 0; padding: 0; }
.timeline li { position: relative; padding: 0 0 1rem 1.3rem; font-size: .9rem; }
.timeline li::before { content: ""; position: absolute; left: 0; top: .45rem; width: 9px; height: 9px; border-radius: 50%; background: var(--brand); }
.timeline li::after { content: ""; position: absolute; left: 4px; top: 1.1rem; bottom: 0; width: 1px; background: var(--border); }
.timeline li:last-child::after { display: none; }

/* ================================================================ Strona publiczna */
.site-header { position: sticky; top: 0; z-index: 30; background: color-mix(in srgb, var(--bg) 90%, transparent); backdrop-filter: blur(8px); border-bottom: 1px solid var(--border); }
.site-header .inner { max-width: 1180px; margin: 0 auto; height: 64px; display: flex; align-items: center; gap: 1rem; padding: 0 1rem; }
.brand { display: flex; align-items: center; gap: .6rem; font-weight: 750; color: var(--text); font-size: 1.05rem; }
.site-nav { display: none; gap: 1.4rem; margin-left: 1.5rem; }
.site-nav a { color: var(--text-2); font-weight: 540; font-size: .94rem; }
.site-nav a:hover { color: var(--text); }
.container { max-width: 1180px; margin: 0 auto; padding: 0 1rem; }
.hero { padding: 3.5rem 0 2.5rem; text-align: center; }
.hero h1 { font-size: clamp(1.9rem, 5vw, 3.2rem); letter-spacing: -.03em; line-height: 1.1; margin-bottom: 1rem; }
.hero p.lead { font-size: clamp(1rem, 2.2vw, 1.2rem); color: var(--text-2); max-width: 640px; margin: 0 auto 1.6rem; }
.hero .row { justify-content: center; }
.mp-strip { display: flex; flex-wrap: wrap; justify-content: center; gap: .6rem; margin-top: 2rem; }
.mp-pill { display: inline-flex; align-items: center; gap: .5rem; padding: .45rem .85rem; border: 1px solid var(--border); border-radius: 99px; background: var(--surface); font-weight: 600; font-size: .9rem; }
.section { padding: 3rem 0; }
.section-title { text-align: center; margin-bottom: 2rem; }
.section-title p { color: var(--text-2); max-width: 600px; margin: .4rem auto 0; }
.feature { padding: 1.3rem; }
.feature .fi { width: 40px; height: 40px; border-radius: 10px; background: var(--brand-soft); color: var(--brand); display: grid; place-items: center; margin-bottom: .8rem; }
.feature p { color: var(--text-2); font-size: .93rem; margin: 0; }
.pricing { display: grid; gap: 1rem; grid-template-columns: 1fr; }
.price-card { padding: 1.4rem; display: flex; flex-direction: column; position: relative; }
.price-card.is-featured { border-color: var(--brand); box-shadow: 0 0 0 1px var(--brand), var(--shadow-lg); }
.price-card .ribbon { position: absolute; top: -11px; left: 1.4rem; }
.price { font-size: 2rem; font-weight: 750; letter-spacing: -.03em; margin: .5rem 0 .1rem; }
.price small { font-size: .9rem; font-weight: 500; }
.price-card ul { list-style: none; padding: 0; margin: 1rem 0 1.4rem; display: grid; gap: .5rem; font-size: .92rem; flex: 1; }
.price-card li { display: flex; gap: .5rem; align-items: flex-start; }
.price-card li .icon-sm { color: var(--success); margin-top: .2rem; }
.site-footer { border-top: 1px solid var(--border); padding: 2rem 0; color: var(--text-3); font-size: .88rem; margin-top: 2rem; }

/* Strony logowania */
.auth-wrap { min-height: 100vh; display: grid; place-items: center; padding: 2rem 1rem; }
.auth-card { width: 100%; max-width: 420px; }
.auth-card .card-body { padding: 1.6rem; }
.auth-head { text-align: center; margin-bottom: 1.3rem; }
.auth-head .brand { justify-content: center; margin-bottom: 1.2rem; }
.auth-foot { text-align: center; margin-top: 1rem; font-size: .92rem; color: var(--text-2); }
.demo-hint { margin-top: 1rem; font-size: .85rem; }

/* ================================================================ Breakpointy */
@media (min-width: 640px) {
    .grid-2 { grid-template-columns: repeat(2, 1fr); }
    .grid-4 { grid-template-columns: repeat(2, 1fr); }
    .form-grid-2 { grid-template-columns: repeat(2, 1fr); }
    .pricing { grid-template-columns: repeat(2, 1fr); }
    .content { padding: 1.25rem; }
}
@media (min-width: 900px) {
    .grid-3 { grid-template-columns: repeat(3, 1fr); }
    .site-nav { display: flex; }
}
@media (min-width: 1024px) {
    .sidebar { transform: none; }
    .sidebar.is-open { box-shadow: none; }
    .overlay { display: none !important; }
    .main { margin-left: var(--sidebar); padding-bottom: 0; }
    .bottom-nav, .menu-toggle { display: none; }
    .topbar { padding: 0 1.5rem; }
    .topbar-search { display: flex; }
    .content { padding: 1.6rem 1.75rem 2.5rem; }
    .grid-4 { grid-template-columns: repeat(4, 1fr); }
    .pricing { grid-template-columns: repeat(var(--plans, 4), 1fr); }
    .split { display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); gap: 1rem; align-items: start; }
}
@media (min-width: 1280px) {
    .pricing { grid-template-columns: repeat(var(--plans, 5), 1fr); }
}
@media (max-width: 1023px) {
    .split { display: flex; flex-direction: column; gap: 1rem; }
    .hide-mobile { display: none !important; }
}
@media (max-width: 520px) {
    .details { grid-template-columns: 1fr; gap: .1rem; }
    .details dd { margin-bottom: .6rem; }
    .share-row { grid-template-columns: 90px 1fr 80px; }
    .page-head .btn { flex: 1; }
}
@media (prefers-reduced-motion: reduce) {
    * { transition: none !important; }
}

/* ---------- Logowanie dwuetapowe ---------- */
.input-code { font-size: 1.4rem; letter-spacing: .3em; text-align: center; font-variant-numeric: tabular-nums; font-family: var(--font-mono, ui-monospace, monospace); }
.link-button { background: none; border: 0; padding: 0; color: var(--brand); font: inherit; cursor: pointer; text-decoration: underline; }
.qr-box { background: #fff; padding: .6rem; border-radius: var(--radius); border: 1px solid var(--border); width: 200px; max-width: 100%; }
.qr-box svg { display: block; width: 100%; height: auto; }
.setup-2fa { display: grid; gap: 1.25rem; grid-template-columns: 1fr; align-items: start; }
@media (min-width: 720px) { .setup-2fa { grid-template-columns: 220px 1fr; } }
.recovery-codes { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .4rem 1rem; padding: .9rem 1rem; background: var(--surface-2); border-radius: var(--radius); font-family: ui-monospace, monospace; font-size: .95rem; margin: 0; list-style: none; }
.secret-key { font-family: ui-monospace, monospace; font-size: .95rem; word-break: break-all; background: var(--surface-2); padding: .4rem .6rem; border-radius: 6px; display: inline-block; }
