/* Panel klienta 2026 — design tokens (nadpisywane z API) */
:root {
    --pk-font: 'DM Sans', system-ui, -apple-system, 'Segoe UI', sans-serif;
    --pk-accent: #2563eb;
    --pk-nav-bg: #ffffff;
    --pk-nav-text: #0f172a;
    --pk-nav-muted: #475569;
    --pk-link: #2563eb;
    --pk-btn-primary-bg: #2563eb;
    --pk-btn-primary-text: #ffffff;
    --pk-btn-default-bg: #f1f5f9;
    --pk-btn-default-text: #0f172a;
    --pk-btn-success-bg: #16a34a;
    --pk-btn-success-text: #ffffff;
    --pk-btn-danger-bg: #dc2626;
    --pk-btn-danger-text: #ffffff;
    --pk-surface: #ffffff;
    --pk-bg: #f8fafc;
    --pk-border: #e2e8f0;
    --pk-text: #0f172a;
    --pk-text-muted: #64748b;
    --pk-radius: 12px;
    --pk-radius-lg: 16px;
    --pk-shadow: 0 1px 3px rgba(15, 23, 42, 0.06), 0 8px 24px rgba(15, 23, 42, 0.06);
    --pk-shadow-lg: 0 4px 24px rgba(15, 23, 42, 0.1);
    --pk-max-width: none;
    --pk-header-h: 52px;
    --pk-sidebar-w: 260px;
}

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

html {
    height: 100%;
}

body.pk-body {
    margin: 0;
    min-height: 100%;
    font-family: var(--pk-font);
    font-size: 16px;
    line-height: 1.5;
    color: var(--pk-text);
    background: var(--pk-bg);
    -webkit-font-smoothing: antialiased;
}

.pk-app {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    width: 100%;
}

/* Top bar — pełna szerokość okna (poza kontenerem panelu) */
.pk-topbar--viewport {
    position: sticky;
    top: 0;
    z-index: 110;
    width: 100%;
    max-width: none;
    margin: 0;
    align-self: stretch;
    background: var(--pk-nav-bg, var(--pk-surface));
    color: var(--pk-nav-text, var(--pk-text));
    box-shadow: 0 1px 0 color-mix(in srgb, var(--pk-nav-text, #0f172a) 12%, transparent),
        0 6px 16px rgba(15, 23, 42, 0.06);
    border-bottom: 1px solid color-mix(in srgb, var(--pk-nav-text, #0f172a) 14%, transparent);
    flex-shrink: 0;
}

.pk-topbar__inner {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 12px;
    min-height: var(--pk-header-h);
    padding: 6px max(16px, env(safe-area-inset-right)) 6px max(16px, env(safe-area-inset-left));
    width: 100%;
    max-width: none;
    box-sizing: border-box;
}

.pk-topbar__inner--no-contact .pk-topbar__secondary {
    margin-left: auto;
}

.pk-topbar__secondary {
    display: flex;
    align-items: center;
    flex-shrink: 0;
}

.pk-topbar__title {
    font-weight: 600;
    font-size: 0.9375rem;
    line-height: 1.25;
    white-space: normal;
    overflow: visible;
    text-overflow: unset;
    word-break: break-word;
    overflow-wrap: anywhere;
}

.pk-topbar__brand {
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 600;
    font-size: 0.9375rem;
    text-decoration: none;
    color: inherit;
    min-width: 0;
    flex: 1 1 auto;
    max-width: none;
    flex-wrap: wrap;
    overflow: visible;
}

.pk-topbar__logo {
    height: 36px;
    width: auto;
    max-width: min(200px, 42vw);
    object-fit: contain;
    flex-shrink: 0;
    display: block;
}

.pk-topbar__contact {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px 14px;
    margin-left: auto;
    opacity: 1;
}

.pk-topbar__contact-item {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    min-width: 0;
    max-width: 100%;
}

.pk-icon--contact {
    width: 18px;
    height: 18px;
    flex-shrink: 0;
    color: var(--pk-accent);
}

.pk-topbar__contact-text {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-weight: 700;
    font-size: 0.9375rem;
    line-height: 1.25;
    letter-spacing: 0.01em;
}

.pk-topbar__inner--no-contact .pk-topbar__contact {
    display: none;
}

.pk-topbar__contact-link {
    color: inherit;
    text-decoration: none;
}

.pk-topbar__contact-link:hover {
    text-decoration: underline;
}

.pk-topbar__contact-link:hover .pk-topbar__contact-text {
    text-decoration: underline;
}

.pk-topbar__actions {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
}

.pk-topbar__inner:not(.pk-topbar__inner--no-contact) .pk-topbar__actions {
    margin-left: 0;
}

.pk-topbar__inner--multi:not(.pk-topbar__inner--no-contact) .pk-topbar__brand {
    flex: 0 1 auto;
}

.pk-topbar__inner--no-contact .pk-topbar__brand {
    flex: 1 1 auto;
    min-width: 0;
}

/* Desktop — pionowy separator po kontakcie (telefon, mail) przed kolorystyką */
@media (min-width: 901px) {
    .pk-topbar__inner--multi .pk-topbar__secondary {
        border-left: 1px solid var(--pk-border);
        padding-left: 14px;
        margin-left: 10px;
        align-self: stretch;
        display: flex;
        align-items: center;
    }

    .pk-topbar__inner--multi .pk-topbar__contact {
        padding-right: 2px;
    }
}

.pk-shell {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: stretch;
    width: 100%;
    max-width: var(--pk-max-width);
    margin: 0 auto;
    min-height: 0;
    background: var(--pk-bg);
}

/* Pasek RCS na dole — zawsze ciemny (niezależny od koloru nawigacji w RCS) */
.pk-credit-bar--viewport {
    flex-shrink: 0;
    width: 100%;
    max-width: none;
    background: #0f172a;
    color: #e2e8f0;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.pk-credit-bar__inner {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 8px 12px;
    min-height: 40px;
    padding: 8px max(16px, env(safe-area-inset-right)) 8px max(16px, env(safe-area-inset-left));
    font-size: 0.75rem;
    line-height: 1.4;
    text-align: center;
    box-sizing: border-box;
}

.pk-credit-bar__link {
    color: #fff;
    font-weight: 600;
    text-decoration: underline;
    text-underline-offset: 2px;
}

.pk-credit-bar__link:hover {
    color: #93c5fd;
}

.pk-credit-bar__sep {
    opacity: 0.45;
    user-select: none;
}

.pk-auth-layout {
    flex: 1;
    display: flex;
    flex-direction: column;
    min-height: calc(100vh - var(--pk-header-h, 0px));
    min-height: 100vh;
}

.pk-auth-layout .pk-auth {
    flex: 1;
    min-height: auto;
}

@media (max-width: 560px) {
    .pk-credit-bar__sep {
        display: none;
    }

    .pk-credit-bar__inner {
        flex-direction: column;
        gap: 4px;
    }
}

/* Boot */
.pk-boot {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 16px;
    color: var(--pk-text-muted);
}

.pk-boot__spinner {
    width: 40px;
    height: 40px;
    border: 3px solid var(--pk-border);
    border-top-color: var(--pk-accent);
    border-radius: 50%;
    animation: pk-spin 0.7s linear infinite;
}

@keyframes pk-spin {
    to { transform: rotate(360deg); }
}

/* Walidacja formularzy */
.pk-field--error .pk-field__input,
.pk-field--error .pk-sensitive-input,
.pk-field--error input:not([type='checkbox']):not([type='radio']),
.pk-field--error textarea,
.pk-field--error select,
.pk-field__input.pk-field__input--error {
    border-color: #dc2626 !important;
    box-shadow: 0 0 0 1px rgba(220, 38, 38, 0.25);
}

.pk-field--error .pk-field__input:focus,
.pk-field--error .pk-sensitive-input:focus,
.pk-field--error input:not([type='checkbox']):not([type='radio']):focus,
.pk-field--error textarea:focus,
.pk-field--error select:focus,
.pk-field__input.pk-field__input--error:focus {
    outline-color: #dc2626;
}

.pk-field-error {
    position: relative;
    margin-top: 8px;
    padding: 8px 12px;
    font-size: 0.8125rem;
    line-height: 1.4;
    color: #991b1b;
    background: #fef2f2;
    border: 1px solid #fecaca;
    border-radius: var(--pk-radius, 10px);
}

.pk-field-error::before {
    content: '';
    position: absolute;
    top: -6px;
    left: 18px;
    width: 10px;
    height: 10px;
    background: #fef2f2;
    border-left: 1px solid #fecaca;
    border-top: 1px solid #fecaca;
    transform: rotate(45deg);
}

html[data-pk-theme='dark'] .pk-field-error {
    color: #fecaca;
    background: #450a0a;
    border-color: #991b1b;
}

html[data-pk-theme='dark'] .pk-field-error::before {
    background: #450a0a;
    border-color: #991b1b;
}

.pk-main[aria-busy='true'] {
    min-height: 280px;
}

.pk-view-loader {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 14px;
    min-height: min(48vh, 420px);
    padding: 32px 16px;
    color: var(--pk-text-muted);
}

.pk-view-loader__spinner {
    width: 36px;
    height: 36px;
    border: 3px solid var(--pk-border);
    border-top-color: var(--pk-accent);
    border-radius: 50%;
    animation: pk-spin 0.7s linear infinite;
}

.pk-view-loader__text {
    margin: 0;
    font-size: 0.875rem;
    font-weight: 500;
}

.pk-menu-toggle {
    display: none;
    background: transparent;
    border: 0;
    color: inherit;
    padding: 8px;
    cursor: pointer;
    border-radius: 8px;
    align-items: center;
    justify-content: center;
}

.pk-menu-toggle:hover {
    background: color-mix(in srgb, var(--pk-nav-text, var(--pk-text)) 10%, transparent);
}

/* Layout */
.pk-layout {
    flex: 1;
    display: grid;
    grid-template-columns: var(--pk-sidebar-w) 1fr;
    gap: 0;
    align-items: start;
    width: 100%;
    max-width: 100%;
}

.pk-sidebar {
    position: sticky;
    top: var(--pk-header-h);
    height: calc(100vh - var(--pk-header-h));
    overflow-y: auto;
    padding: 20px 12px;
    background: var(--pk-surface);
    border-right: 1px solid var(--pk-border);
}

.pk-nav {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.pk-nav__link {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 14px;
    border-radius: var(--pk-radius);
    text-decoration: none;
    color: var(--pk-text);
    font-weight: 500;
    font-size: 0.9375rem;
    transition: background 0.15s, color 0.15s;
}

.pk-nav__link:hover {
    background: var(--pk-bg);
    color: var(--pk-link);
}

.pk-nav__link.is-active {
    background: color-mix(in srgb, var(--pk-accent) 12%, transparent);
    color: var(--pk-accent);
}

.pk-nav__icon {
    width: 30px;
    height: 30px;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--pk-text-muted);
}

.pk-nav__link:hover .pk-nav__icon,
.pk-nav__link.is-active .pk-nav__icon {
    color: var(--pk-accent);
}

/* Ikony SVG — outline, max 2 kolory (obrys + akcent z motywu) */
.pk-icon {
    display: block;
    flex-shrink: 0;
}

.pk-icon--nav {
    width: 30px;
    height: 30px;
}

.pk-icon--card {
    width: 26px;
    height: 26px;
}

.pk-icon--menu {
    width: 22px;
    height: 22px;
}

.pk-card__icon {
    width: 44px;
    height: 44px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: color-mix(in srgb, var(--pk-accent) 14%, transparent);
    color: var(--pk-accent);
    margin-bottom: 14px;
}

.pk-card__icon .pk-icon {
    color: var(--pk-accent);
}

.pk-main {
    padding: 28px 24px 48px;
    min-width: 0;
}

.pk-main a:not(.pk-btn):not(.pk-card):not(.pk-nav__link):not(.pk-recent__item) {
    color: var(--pk-link);
}

.pk-auth a:not(.pk-btn) {
    color: var(--pk-link);
}

.pk-topbar--viewport a,
.pk-topbar--viewport .pk-topbar__user-link {
    color: inherit;
}

.pk-topbar--viewport .pk-topbar__user-link:hover {
    background: color-mix(in srgb, var(--pk-nav-text, #fff) 10%, transparent);
}

/* Buttons */
.pk-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px 18px;
    font-family: inherit;
    font-size: 0.9375rem;
    font-weight: 600;
    border-radius: var(--pk-radius);
    border: none;
    cursor: pointer;
    text-decoration: none;
    transition: transform 0.12s, box-shadow 0.12s, opacity 0.12s;
}

.pk-btn:active {
    transform: scale(0.98);
}

.pk-btn--primary {
    background: var(--pk-btn-primary-bg);
    color: var(--pk-btn-primary-text);
    box-shadow: 0 2px 8px color-mix(in srgb, var(--pk-btn-primary-bg) 35%, transparent);
}

.pk-btn--primary:hover {
    filter: brightness(1.05);
}

.pk-btn--ghost {
    background: transparent;
    color: var(--pk-text);
    border: 1px solid var(--pk-border);
}

.pk-btn--ghost:hover {
    background: var(--pk-btn-default-bg);
    color: var(--pk-btn-default-text);
}

.pk-btn--default {
    background: var(--pk-btn-default-bg);
    color: var(--pk-btn-default-text);
}

.pk-btn--danger {
    background: var(--pk-btn-danger-bg, #dc2626);
    color: var(--pk-btn-danger-text, #fff);
}

.pk-btn--danger:hover {
    filter: brightness(0.92);
}

.pk-btn--success {
    background: var(--pk-btn-success-bg, #16a34a);
    color: var(--pk-btn-success-text, #fff);
}

.pk-btn--success:hover {
    filter: brightness(0.92);
}

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

/* Cards */
.pk-page-title {
    margin: 0 0 8px;
    font-size: 1.75rem;
    font-weight: 700;
    letter-spacing: -0.02em;
}

.pk-page-lead {
    margin: 0 0 28px;
    color: var(--pk-text-muted);
    max-width: 52ch;
}

.pk-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 16px;
}

.pk-card {
    background: var(--pk-surface);
    border: 1px solid var(--pk-border);
    border-radius: var(--pk-radius-lg);
    padding: 20px;
    box-shadow: var(--pk-shadow);
    transition: box-shadow 0.2s, border-color 0.2s;
}

.pk-card--clickable {
    cursor: pointer;
    text-decoration: none;
    color: inherit;
    display: block;
}

.pk-card--clickable:hover {
    border-color: color-mix(in srgb, var(--pk-accent) 40%, var(--pk-border));
    box-shadow: var(--pk-shadow-lg);
}

.pk-card--booking {
    background: var(--pk-accent, #2563eb);
    border-color: var(--pk-accent, #2563eb);
    color: #fff;
}

.pk-card--booking .pk-card__title,
.pk-card--booking .pk-card__text {
    color: #fff;
}

.pk-card--booking .pk-icon {
    color: #fff;
}

.pk-card--booking:hover {
    border-color: color-mix(in srgb, #fff 35%, var(--pk-accent, #2563eb));
    filter: brightness(1.06);
}

.pk-card__title {
    margin: 0 0 6px;
    font-size: 1.05rem;
    font-weight: 600;
}

.pk-card__text {
    margin: 0;
    font-size: 0.875rem;
    color: var(--pk-text-muted);
}

/* Login */
.pk-auth {
    min-height: 100vh;
    display: grid;
    place-items: center;
    padding: 24px;
    background:
        radial-gradient(ellipse 80% 60% at 50% -20%, color-mix(in srgb, var(--pk-accent) 25%, transparent), transparent),
        var(--pk-bg);
}

.pk-auth__panel {
    width: 100%;
    max-width: 420px;
    background: var(--pk-surface);
    border-radius: var(--pk-radius-lg);
    padding: 36px 32px;
    box-shadow: var(--pk-shadow-lg);
    border: 1px solid var(--pk-border);
}

.pk-auth__brand {
    text-align: center;
    margin-bottom: 28px;
}

.pk-auth__brand img {
    max-height: 48px;
    margin-bottom: 12px;
}

.pk-auth__brand h1 {
    margin: 0;
    font-size: 1.35rem;
    font-weight: 700;
}

.pk-auth__hint {
    margin: 0 0 24px;
    font-size: 0.875rem;
    color: var(--pk-text-muted);
    text-align: center;
}

.pk-auth__subheading {
    margin: 0 0 8px;
    font-size: 1.1rem;
    font-weight: 600;
    text-align: center;
}

.pk-auth__forgot {
    margin: 14px 0 0;
    text-align: center;
    font-size: 0.875rem;
}

.pk-auth__forgot a,
.pk-auth__forgot .pk-link-btn {
    color: var(--pk-accent);
    text-decoration: none;
}

.pk-auth__forgot a:hover,
.pk-auth__forgot .pk-link-btn:hover {
    text-decoration: underline;
}

.pk-field {
    margin-bottom: 18px;
}

.pk-field label {
    display: block;
    margin-bottom: 6px;
    font-size: 0.875rem;
    font-weight: 500;
}

.pk-field input {
    width: 100%;
    padding: 12px 14px;
    font-family: inherit;
    font-size: 1rem;
    border: 1px solid var(--pk-border);
    border-radius: var(--pk-radius);
    background: var(--pk-bg);
    transition: border-color 0.15s, box-shadow 0.15s;
}

.pk-field input:focus {
    outline: none;
    border-color: var(--pk-accent);
    box-shadow: 0 0 0 3px color-mix(in srgb, var(--pk-accent) 20%, transparent);
}

/* Baner / stopka RCS — pełna szerokość kontenera panelu (jak pasek nawigacji) */
.pk-custom-header,
.pk-custom-footer {
    flex: 0 0 auto;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    font-size: 0.875rem;
    align-self: stretch;
}

.pk-custom-header {
    border-bottom: 1px solid var(--pk-border);
}

.pk-custom-footer {
    border-top: 1px solid var(--pk-border);
    margin-top: auto;
}

.pk-custom-header img,
.pk-custom-footer img {
    max-width: 100%;
    height: auto;
}

.pk-alert {
    padding: 14px 16px;
    border-radius: var(--pk-radius);
    font-size: 0.875rem;
    margin-bottom: 20px;
}

.pk-alert--error {
    background: #fef2f2;
    color: #991b1b;
    border: 1px solid #fecaca;
}

.pk-alert--info {
    background: #eff6ff;
    color: #1e40af;
    border: 1px solid #bfdbfe;
}

.pk-alert--success {
    background: #ecfdf5;
    color: #065f46;
    border: 1px solid #a7f3d0;
}

.pk-alert--warning {
    background: #fffbeb;
    color: #92400e;
    border: 1px solid #fde68a;
}

.pk-alert--question {
    background: #f0f9ff;
    color: #0c4a6e;
    border: 1px solid #bae6fd;
}

.pk-alert__title {
    display: block;
    margin-bottom: 4px;
}

html[data-pk-theme='dark'] .pk-alert--success {
    background: #052e16;
    color: #a7f3d0;
    border-color: #166534;
}

html[data-pk-theme='dark'] .pk-alert--warning {
    background: #451a03;
    color: #fde68a;
    border-color: #92400e;
}

html[data-pk-theme='dark'] .pk-alert--question {
    background: #0c4a6e;
    color: #e0f2fe;
    border-color: #0369a1;
}

/* Dialogi modalne (sukces / błąd / potwierdzenie) */
body.pk-dialog-open {
    overflow: hidden;
}

.pk-dialog-root {
    position: fixed;
    inset: 0;
    z-index: 12000;
    pointer-events: none;
}

.pk-dialog-overlay {
    position: fixed;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    background: rgba(15, 23, 42, 0.58);
    backdrop-filter: blur(2px);
    pointer-events: auto;
    animation: pk-dialog-fade 0.2s ease;
}

.pk-dialog-overlay.is-leaving {
    animation: pk-dialog-fade-out 0.18s ease forwards;
}

@keyframes pk-dialog-fade {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes pk-dialog-fade-out {
    from { opacity: 1; }
    to { opacity: 0; }
}

.pk-dialog {
    width: min(440px, 100%);
    padding: 24px 22px 18px;
    border-radius: var(--pk-radius-lg);
    background: var(--pk-surface);
    border: 1px solid var(--pk-border);
    box-shadow: var(--pk-shadow-lg);
    text-align: center;
    animation: pk-dialog-pop 0.22s ease;
    pointer-events: auto;
}

.pk-dialog-overlay.is-leaving .pk-dialog {
    animation: none;
}

@keyframes pk-dialog-pop {
    from {
        opacity: 0;
        transform: translateY(10px) scale(0.97);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.pk-dialog__icon {
    display: flex;
    justify-content: center;
    margin-bottom: 12px;
}

.pk-dialog__icon--success { color: #059669; }
.pk-dialog__icon--error { color: #dc2626; }
.pk-dialog__icon--info { color: #0284c7; }
.pk-dialog__icon--question { color: #0284c7; }
.pk-dialog__icon--warning { color: #d97706; }

.pk-icon--dialog {
    width: 42px;
    height: 42px;
}

.pk-dialog__title {
    margin: 0 0 8px;
    font-size: 1.125rem;
    font-weight: 700;
    color: var(--pk-text);
}

.pk-dialog__message {
    margin: 0 0 20px;
    font-size: 0.9375rem;
    line-height: 1.5;
    color: var(--pk-text-muted);
    white-space: pre-wrap;
    word-break: break-word;
}

.pk-dialog__actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    justify-content: center;
}

.pk-dialog--wide {
    max-width: 520px;
    width: calc(100% - 32px);
}

.pk-dialog--attachments {
    max-width: 640px;
    text-align: left;
}

.pk-dialog--attachments .pk-dialog__title,
.pk-dialog--attachments .pk-dialog__message {
    text-align: left;
}

.pk-attach {
    margin: 8px 0 4px;
}

.pk-attach__list {
    list-style: none;
    margin: 0 0 16px;
    padding: 0;
    display: grid;
    gap: 10px;
}

.pk-attach__item {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    align-items: center;
    justify-content: space-between;
    padding: 10px 12px;
    border: 1px solid var(--pk-border, #e2e8f0);
    border-radius: 10px;
    background: var(--pk-surface, #fff);
}

.pk-attach__meta {
    display: grid;
    gap: 2px;
    min-width: 0;
}

.pk-attach__meta span {
    color: var(--pk-text-muted, #64748b);
    font-size: 0.875rem;
}

.pk-attach__actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.pk-attach__upload {
    border-top: 1px solid var(--pk-border, #e2e8f0);
    padding-top: 14px;
}

.pk-attach__upload-title {
    margin: 0 0 10px;
    font-size: 1rem;
}

.pk-attach__upload-actions {
    margin-top: 12px;
}

.pk-pay-methods {
    display: grid;
    gap: 10px;
    margin-top: 8px;
}

.pk-rental-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin: 0 0 16px;
}

.pk-act-price {
    margin-top: 12px;
    padding: 10px 12px;
    border-radius: 10px;
    background: color-mix(in srgb, var(--pk-accent) 10%, transparent);
    text-align: left;
    font-size: 0.9375rem;
    line-height: 1.45;
}

.pk-act-error {
    margin: 10px 0 0;
    color: #b91c1c;
    text-align: left;
    font-size: 0.875rem;
}

.pk-muted {
    color: var(--pk-text-muted);
    font-size: 0.9375rem;
    line-height: 1.45;
}

.pk-badge {
    display: inline-block;
    padding: 4px 10px;
    font-size: 0.75rem;
    font-weight: 600;
    border-radius: 999px;
    background: color-mix(in srgb, var(--pk-accent) 15%, transparent);
    color: var(--pk-accent);
}

.pk-empty-state {
    text-align: center;
    padding: 48px 24px;
    color: var(--pk-text-muted);
}

.pk-topbar__actions--essential {
    flex-shrink: 0;
}

.pk-topbar__logout {
    flex-shrink: 0;
    white-space: nowrap;
    background: var(--pk-btn-default-bg);
    color: var(--pk-btn-default-text);
    border: 1px solid color-mix(in srgb, var(--pk-nav-text, var(--pk-text)) 18%, transparent);
}

.pk-topbar__logout:hover {
    filter: brightness(0.96);
}

/* Mobile — 3 wiersze: logo | kontakt | kolorystyka i języki */
@media (max-width: 900px) {
    :root {
        --pk-header-h: 100px;
    }

    .pk-layout {
        grid-template-columns: 1fr;
    }

    .pk-sidebar {
        position: fixed;
        inset: var(--pk-header-h) 0 0 0;
        z-index: 90;
        transform: translateX(-100%);
        transition: transform 0.25s ease;
        height: auto;
        box-shadow: var(--pk-shadow-lg);
    }

    .pk-sidebar.is-open {
        transform: translateX(0);
    }

    .pk-menu-toggle {
        display: flex;
    }

    /* Bez kontaktu: 2 wiersze (logo + narzędzia) */
    .pk-topbar__inner--no-contact {
        display: grid;
        grid-template-columns: 1fr;
        grid-template-rows: auto auto;
        gap: 10px;
        padding-top: 10px;
        padding-bottom: 10px;
        min-height: 0;
        position: relative;
        padding-left: max(16px, env(safe-area-inset-left));
        padding-right: max(16px, env(safe-area-inset-right));
    }

    .pk-topbar__inner--no-contact .pk-menu-toggle {
        position: absolute;
        left: max(16px, env(safe-area-inset-left));
        top: 10px;
        z-index: 2;
    }

    .pk-topbar__inner--no-contact .pk-topbar__brand {
        grid-row: 1;
        justify-self: center;
        max-width: calc(100% - 52px);
        margin: 0 auto;
    }

    .pk-topbar__inner--no-contact .pk-topbar__secondary {
        grid-row: 2;
        justify-self: center;
        width: 100%;
        margin-left: 0;
    }

    .pk-topbar__inner--no-contact .pk-topbar__actions--essential {
        justify-content: center;
        width: 100%;
    }

    /* Z kontaktem: 3 wyśrodkowane wiersze */
    .pk-topbar__inner--multi {
        display: grid;
        grid-template-columns: 1fr;
        grid-template-rows: auto auto auto;
        gap: 8px;
        padding-top: 10px;
        padding-bottom: 10px;
        min-height: 0;
        position: relative;
        --pk-header-h: 138px;
    }

    .pk-topbar__inner--multi .pk-menu-toggle {
        position: absolute;
        left: max(16px, env(safe-area-inset-left));
        top: 10px;
        z-index: 2;
    }

    .pk-topbar__inner--multi .pk-topbar__brand {
        grid-row: 1;
        justify-self: center;
        align-self: center;
        max-width: calc(100% - 52px);
        margin: 0;
    }

    .pk-topbar__inner--multi .pk-topbar__contact {
        grid-row: 2;
        justify-self: center;
        margin-left: 0;
        justify-content: center;
        gap: 8px 16px;
        width: 100%;
        max-width: 100%;
        padding: 0 8px 10px;
        box-sizing: border-box;
        border-bottom: 1px solid var(--pk-border);
    }

    .pk-topbar__inner--multi .pk-topbar__contact-text {
        font-size: 0.875rem;
    }

    .pk-topbar__inner--multi .pk-topbar__secondary {
        grid-row: 3;
        justify-self: center;
        width: 100%;
        margin-left: 0;
        padding-top: 2px;
    }

    .pk-topbar__title.pk-topbar__text {
        display: inline;
        text-align: center;
    }

    .pk-topbar__user-link.pk-topbar__text {
        display: none !important;
    }

    .pk-topbar--has-logo .pk-topbar__logo {
        height: 38px;
        max-width: 100%;
    }

    .pk-topbar__actions--essential {
        width: 100%;
        margin-left: 0;
        flex-wrap: wrap;
        justify-content: center;
        gap: 6px 8px;
    }

    .pk-topbar__prefs {
        flex-shrink: 0;
        flex-wrap: wrap;
        justify-content: center;
    }

    .pk-topbar__pref {
        flex-shrink: 0;
    }

    .pk-topbar__contact-item {
        max-width: 100%;
    }

    @media (max-width: 420px) {
        .pk-topbar__inner--multi .pk-topbar__contact {
            flex-direction: column;
            align-items: center;
            gap: 4px;
        }

        .pk-topbar__inner--multi {
            --pk-header-h: 152px;
        }
    }

    .pk-main {
        padding: 20px 16px 32px;
    }
}

body.pk-layout-preview::before {
    content: 'Podgląd layoutu';
    position: fixed;
    bottom: 12px;
    right: 12px;
    z-index: 9999;
    font-size: 0.6875rem;
    font-weight: 600;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    padding: 6px 10px;
    border-radius: 999px;
    background: #0f172a;
    color: #f8fafc;
    opacity: 0.85;
    pointer-events: none;
}

/* Lightbox — podgląd zdjęć */
body.pk-lightbox-open {
    overflow: hidden;
}

.pk-lightbox {
    position: fixed;
    inset: 0;
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px;
}

.pk-lightbox[hidden] {
    display: none !important;
}

.pk-lightbox__backdrop {
    position: absolute;
    inset: 0;
    background: rgba(15, 23, 42, 0.82);
    cursor: zoom-out;
}

.pk-lightbox__panel {
    position: relative;
    z-index: 1;
    width: min(960px, 100%);
    max-height: calc(100vh - 32px);
    display: flex;
    align-items: center;
    justify-content: center;
    pointer-events: none;
}

.pk-lightbox__figure {
    margin: 0;
    pointer-events: auto;
    max-width: 100%;
    max-height: calc(100vh - 80px);
    display: flex;
    flex-direction: column;
    align-items: center;
}

.pk-lightbox__img {
    display: block;
    max-width: 100%;
    max-height: calc(100vh - 120px);
    width: auto;
    height: auto;
    object-fit: contain;
    border-radius: var(--pk-radius);
    box-shadow: var(--pk-shadow-lg);
    background: #0f172a;
}

.pk-lightbox__caption {
    margin-top: 12px;
    font-size: 0.875rem;
    color: #f1f5f9;
    text-align: center;
    max-width: 36rem;
    line-height: 1.4;
}

.pk-lightbox__close,
.pk-lightbox__nav {
    position: absolute;
    pointer-events: auto;
    border: none;
    cursor: pointer;
    font-family: inherit;
    line-height: 1;
    color: #f8fafc;
    background: rgba(15, 23, 42, 0.55);
    backdrop-filter: blur(4px);
}

.pk-lightbox__close {
    top: -8px;
    right: 0;
    width: 40px;
    height: 40px;
    border-radius: 999px;
    font-size: 1.75rem;
}

.pk-lightbox__nav {
    top: 50%;
    transform: translateY(-50%);
    width: 44px;
    height: 44px;
    border-radius: 999px;
    font-size: 2rem;
    font-weight: 300;
}

.pk-lightbox__nav--prev {
    left: -52px;
}

.pk-lightbox__nav--next {
    right: -52px;
}

.pk-lightbox__close:hover,
.pk-lightbox__nav:hover {
    background: rgba(15, 23, 42, 0.85);
}

.pk-lightbox__close:focus-visible,
.pk-lightbox__nav:focus-visible {
    outline: 2px solid #fff;
    outline-offset: 2px;
}

.pk-lightbox__nav[hidden] {
    display: none;
}

@media (max-width: 720px) {
    .pk-lightbox__nav--prev {
        left: 4px;
    }

    .pk-lightbox__nav--next {
        right: 4px;
    }

    .pk-lightbox__close {
        top: 4px;
        right: 4px;
    }
}

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        transition-duration: 0.01ms !important;
    }
}
