/* ERGO Serwis — portal QR · jasny motyw (propozycja UI) */

.esp_portal {
    --esp-bg: #f5f5f3;
    --esp-surface: #ffffff;
    --esp-ink: #1a1a1a;
    --esp-muted: #6b6b6f;
    --esp-dim: #9a9a9f;
    --esp-border: #e8e8e4;
    --esp-orange: #d97757;
    --esp-orange-soft: #fbebe4;
    --esp-orange-hover: #c96848;
    --esp-ticket: #1a1a1a;
    --esp-font: "Manrope", system-ui, sans-serif;
    --esp-display: "Bricolage Grotesque", var(--esp-font);
    --esp-mono: "IBM Plex Mono", ui-monospace, Menlo, monospace;
    --esp-radius: 16px;
    --esp-radius-sm: 12px;
    --esp-nav-h: 56px;
    --esp-side-w: 260px;
    --esp-shell-max: 920px;
    --esp-read-max: 640px;
    --esp-shadow: 0 8px 30px rgba(26, 26, 26, 0.06);
}

.esp_portal {
    margin: 0;
    min-height: 100dvh;
    font-family: var(--esp-font);
    font-size: 15px;
    line-height: 1.5;
    color: var(--esp-ink);
    background: var(--esp-bg);
    -webkit-font-smoothing: antialiased;
}

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

.esp_viewport {
    min-height: 100dvh;
    display: flex;
    flex-direction: column;
    max-width: 520px;
    margin: 0 auto;
    background: var(--esp-bg);
}

.esp_masthead {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: calc(12px + env(safe-area-inset-top, 0px)) 18px 12px;
    background: var(--esp-bg);
    position: sticky;
    top: 0;
    z-index: 30;
}

.esp_masthead_brand {
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 0;
}

.esp_logo {
    flex: none;
    width: 34px;
    height: 34px;
    display: block;
}

.esp_product {
    margin: 0;
    font-family: var(--esp-display);
    font-size: 17px;
    font-weight: 700;
    letter-spacing: -0.02em;
}

.esp_module { display: none; }

.esp_status_badge {
    flex: none;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 10px;
    border-radius: 999px;
    background: var(--esp-surface);
    border: 1px solid var(--esp-border);
    font-size: 11px;
    font-weight: 600;
    color: var(--esp-muted);
    white-space: nowrap;
}

.esp_status_badge::before {
    content: "";
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: #22c55e;
}

.esp_layout { flex: 1; }

.esp_main_column {
    display: flex;
    flex-direction: column;
    min-width: 0;
    flex: 1;
}

.esp_root {
    padding: 4px 18px 20px;
    width: 100%;
}

@keyframes esp_screen_in {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes esp_screen_out {
    from {
        opacity: 1;
        transform: translateY(0);
    }
    to {
        opacity: 0;
        transform: translateY(-6px);
    }
}

.esp-motion .esp_screen {
    animation: esp_screen_in 0.32s cubic-bezier(0.22, 1, 0.36, 1) both;
}

.esp-motion.esp-leaving .esp_screen {
    animation: esp_screen_out 0.18s ease-in both;
}

@view-transition {
    navigation: auto;
}

::view-transition-old(root),
::view-transition-new(root) {
    animation-duration: 0.28s;
}

.esp_portal.esp-has-bottom-nav .esp_root {
    padding-bottom: calc(var(--esp-nav-h) + 28px + env(safe-area-inset-bottom, 0px));
}

.esp_portal.esp-has-bottom-nav.esp-hub-screen .esp_root {
    padding-bottom: calc(var(--esp-nav-h) + 24px + env(safe-area-inset-bottom, 0px));
}

.esp_hp {
    position: absolute;
    left: -10000px;
    width: 1px;
    height: 1px;
    overflow: hidden;
}

/* ── Hub ── */
.esp_place {
    margin: 0 0 14px;
}

.esp_hub_kicker {
    margin: 0 0 4px;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: var(--esp-orange);
}

.esp_hub_title {
    margin: 0;
    font-family: var(--esp-display);
    font-size: clamp(1.7rem, 6vw, 2.05rem);
    font-weight: 700;
    letter-spacing: -0.03em;
    line-height: 1.1;
    word-break: break-word;
}

.esp_hub_store {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    margin: 10px 0 0;
    font-size: 14px;
    color: var(--esp-muted);
    line-height: 1.4;
}

.esp_hub_store svg {
    flex: none;
    width: 16px;
    height: 16px;
    margin-top: 2px;
    color: var(--esp-dim);
}

/* Ticket */
.esp_hub_stack {
    display: flex;
    flex-direction: column;
    gap: 0;
    max-width: var(--esp-read-max);
    width: 100%;
}

.esp_hub_actions {
    margin-top: 16px;
}

.esp_hub_docs {
    margin-top: 20px;
}

.esp_hub_docs_title {
    margin: 0 0 10px;
    font-family: var(--esp-display);
    font-size: 15px;
    font-weight: 700;
    letter-spacing: -0.02em;
    color: var(--esp-ink);
}

.esp_hub_docs_empty {
    margin: 0;
    padding: 14px 16px;
    border-radius: var(--esp-radius-sm);
    border: 1px dashed var(--esp-border);
    font-size: 13px;
    color: var(--esp-muted);
    background: var(--esp-surface);
}

.esp_ticket {
    position: relative;
    margin: 18px 0 0;
    width: 100%;
    background: var(--esp-ticket);
    color: #fff;
    border-radius: 20px;
    border-left: 4px solid var(--esp-orange);
    overflow: visible;
    box-shadow: var(--esp-shadow);
}

.esp_ticket::before,
.esp_ticket::after {
    content: "";
    position: absolute;
    bottom: 28px;
    width: 18px;
    height: 18px;
    background: var(--esp-bg);
    border-radius: 50%;
    z-index: 2;
    box-shadow: inset 0 0 0 1px rgba(26, 26, 26, 0.04);
}

.esp_ticket::before { left: -13px; }
.esp_ticket::after { right: -9px; }

.esp_ticket_top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    padding: 22px 22px 18px;
}

.esp_ticket_label {
    display: block;
    font-size: 12px;
    color: rgba(255, 255, 255, 0.55);
    margin-bottom: 6px;
}

.esp_ticket_code {
    display: block;
    font-family: var(--esp-display);
    font-size: clamp(1.5rem, 6vw, 1.85rem);
    font-weight: 700;
    letter-spacing: 0.06em;
    line-height: 1.1;
}

.esp_copy_btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin-top: 12px;
    padding: 7px 12px;
    border-radius: 999px;
    border: 1px solid rgba(255, 255, 255, 0.18);
    background: rgba(255, 255, 255, 0.06);
    color: #fff;
    font-family: var(--esp-font);
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
}

.esp_copy_btn:active { background: rgba(255, 255, 255, 0.12); }

.esp_ticket_qr {
    flex: none;
    width: 96px;
    height: 96px;
    padding: 6px;
    border-radius: 12px;
    background: #fff;
    overflow: hidden;
}

.esp_ticket_qr img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.esp_ticket_stub {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 12px;
    margin: 0 18px;
    padding: 14px 0 16px;
    border-top: 1px dashed rgba(255, 255, 255, 0.28);
}

.esp_ticket_stub .esp_ticket_label {
    margin: 0;
}

.esp_ticket_stub strong {
    font-family: var(--esp-mono);
    font-size: 13px;
    font-weight: 500;
    letter-spacing: 0.02em;
    text-align: right;
}

/* Akcje hub */
.esp_action_orange,
.esp_action_white {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 16px;
    margin-bottom: 12px;
    border-radius: var(--esp-radius);
    text-decoration: none;
    color: inherit;
    -webkit-tap-highlight-color: transparent;
}

.esp_action_orange {
    background: var(--esp-orange);
    color: #fff;
    box-shadow: 0 10px 28px rgba(217, 119, 87, 0.35);
}

.esp_action_orange:active { background: var(--esp-orange-hover); }

.esp_action_orange.is-disabled {
    opacity: 0.45;
    pointer-events: none;
    box-shadow: none;
}

.esp_action_white {
    background: var(--esp-surface);
    border: 1px solid var(--esp-border);
    box-shadow: var(--esp-shadow);
}

.esp_action_white.is-disabled {
    opacity: 0.45;
    pointer-events: none;
}

.esp_action_icon {
    flex: none;
    width: 44px;
    height: 44px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.esp_action_orange .esp_action_icon {
    background: rgba(26, 26, 26, 0.22);
    color: #fff;
}

.esp_action_white .esp_action_icon {
    background: var(--esp-orange-soft);
    color: var(--esp-orange);
}

.esp_action_body { flex: 1; min-width: 0; }

.esp_action_title {
    display: block;
    font-family: var(--esp-display);
    font-size: 17px;
    font-weight: 700;
    letter-spacing: -0.02em;
}

.esp_action_sub {
    display: block;
    margin-top: 2px;
    font-size: 13px;
    opacity: 0.88;
}

.esp_action_white .esp_action_sub { color: var(--esp-muted); opacity: 1; }

.esp_action_chev {
    flex: none;
    font-size: 22px;
    opacity: 0.85;
}

.esp_hub_footnote {
    margin: 18px 0 0;
    text-align: center;
    font-size: 12px;
    color: var(--esp-dim);
    line-height: 1.45;
}

/* ── Podstrony ── */
.esp_back {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin: 0 0 14px;
    padding: 8px 12px 8px 8px;
    border-radius: 999px;
    border: 1px solid var(--esp-border);
    background: var(--esp-surface);
    font-size: 13px;
    font-weight: 600;
    color: var(--esp-muted);
    text-decoration: none;
}

.esp_screen_title {
    margin: 0;
    font-family: var(--esp-display);
    font-size: clamp(1.65rem, 6vw, 2rem);
    font-weight: 700;
    letter-spacing: -0.03em;
    line-height: 1.12;
}

.esp_screen_meta {
    margin: 8px 0 18px;
    font-size: 14px;
    color: var(--esp-muted);
}

.esp_lead {
    margin: 0 0 18px;
    font-size: 14px;
    color: var(--esp-muted);
    line-height: 1.55;
}

/* Dokumenty */
.esp_doc_card {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 16px;
    margin-bottom: 10px;
    background: var(--esp-surface);
    border: 1px solid var(--esp-border);
    border-radius: var(--esp-radius);
    box-shadow: var(--esp-shadow);
    text-decoration: none;
    color: inherit;
    -webkit-tap-highlight-color: transparent;
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.esp_doc_card_icon {
    flex: none;
    width: 44px;
    height: 44px;
    border-radius: 12px;
    background: var(--esp-orange-soft);
    color: var(--esp-orange);
    display: flex;
    align-items: center;
    justify-content: center;
}

.esp_doc_card_body { flex: 1; min-width: 0; }

.esp_doc_card_title {
    font-family: var(--esp-display);
    font-size: 16px;
    font-weight: 700;
    line-height: 1.3;
    word-break: break-word;
}

.esp_tag {
    display: inline-block;
    margin-top: 8px;
    padding: 4px 8px;
    border-radius: 6px;
    background: var(--esp-ink);
    color: #fff;
    font-size: 11px;
    font-weight: 700;
}

.esp_doc_card_validity {
    display: block;
    margin-top: 6px;
    font-size: 13px;
    color: var(--esp-muted);
}

.esp_doc_card_dl {
    flex: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 36px;
    padding: 8px 12px;
    border-radius: 999px;
    background: var(--esp-ink);
    color: #fff;
    font-size: 12px;
    font-weight: 700;
    white-space: nowrap;
    pointer-events: none;
}

.esp_doc_card--hub {
    margin-bottom: 8px;
}

.esp_doc_card > * {
    pointer-events: none;
}

.esp_doc_card:active {
    border-color: rgba(217, 119, 87, 0.35);
    box-shadow: 0 4px 16px rgba(217, 119, 87, 0.12);
}

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

.esp_info_box {
    margin-top: 16px;
    padding: 14px 16px;
    border-radius: var(--esp-radius-sm);
    background: var(--esp-orange-soft);
    border: 1px solid rgba(217, 119, 87, 0.2);
    font-size: 13px;
    color: var(--esp-muted);
    line-height: 1.45;
}

/* QR kontekst (formularz) */
.esp_qr_context {
    display: flex;
    gap: 12px;
    align-items: flex-start;
    padding: 14px 16px;
    margin-bottom: 20px;
    border-radius: var(--esp-radius);
    background: var(--esp-ticket);
    color: #fff;
}

.esp_qr_context_icon {
    flex: none;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: var(--esp-orange);
    color: var(--esp-ink);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
}

.esp_qr_context_text {
    font-size: 13px;
    line-height: 1.45;
    color: rgba(255, 255, 255, 0.88);
}

.esp_qr_context_text strong {
    display: block;
    margin-bottom: 4px;
    font-size: 14px;
    color: #fff;
}

.esp_qr_context_text .esp_mono {
    font-family: var(--esp-mono);
    font-size: 12px;
    color: rgba(255, 255, 255, 0.65);
}

/* Formularz */
.esp_form_v2 { display: grid; gap: 22px; }

.esp_field > label:not(.esp_photo_slot--add),
.esp_field_legend {
    display: block;
    margin-bottom: 8px;
    font-size: 14px;
    font-weight: 700;
    color: var(--esp-ink);
}

.esp_field label span.esp_opt {
    font-weight: 500;
    color: var(--esp-dim);
}

.esp_req { color: var(--esp-orange); }

.esp_field input,
.esp_field select,
.esp_field textarea {
    width: 100%;
    border: 1px solid var(--esp-border);
    border-radius: var(--esp-radius-sm);
    background: var(--esp-surface);
    padding: 14px 14px;
    font-family: var(--esp-font);
    font-size: 16px;
    min-height: 48px;
    color: var(--esp-ink);
}

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

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

.esp_pill { position: relative; cursor: pointer; }

.esp_pill input { position: absolute; opacity: 0; pointer-events: none; }

.esp_pill span {
    display: inline-block;
    padding: 10px 14px;
    border-radius: var(--esp-radius-sm);
    border: 1px solid var(--esp-border);
    background: var(--esp-surface);
    font-size: 13px;
    font-weight: 600;
    color: var(--esp-muted);
}

.esp_pill input:checked + span {
    border-color: var(--esp-orange);
    color: var(--esp-orange);
    background: var(--esp-orange-soft);
}

.esp_photos_head {
    display: flex;
    align-items: baseline;
    gap: 8px;
    margin-bottom: 12px;
}

.esp_photos_title {
    font-size: 14px;
    font-weight: 700;
    color: var(--esp-ink);
}

.esp_photo_slots {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 10px;
    width: 100%;
}

.esp_photo_slots:not(:has(.esp_photo_slot--preview)) .esp_photo_slot--add {
    grid-column: 1 / -1;
    aspect-ratio: auto;
    min-height: 120px;
}

.esp_photo_slot {
    position: relative;
    aspect-ratio: 1;
    border-radius: 14px;
    border: 1.5px dashed var(--esp-border);
    background: var(--esp-surface);
}

.esp_photos_field label.esp_photo_slot--add {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 6px;
    margin: 0;
    cursor: pointer;
    border-color: rgba(217, 119, 87, 0.45);
    background: var(--esp-orange-soft);
    color: var(--esp-orange);
    -webkit-tap-highlight-color: transparent;
}

.esp_photo_slot--add:active {
    background: #f5ddd3;
}

.esp_photos_field input[type="file"] {
    display: none !important;
}

.esp_photo_slot--add.is-hidden {
    display: none;
}

.esp_photo_slot--preview {
    overflow: hidden;
    border-style: solid;
    border-color: var(--esp-border);
    background: var(--esp-bg);
}

.esp_photo_slot--preview img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.esp_photo_file_name {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100%;
    padding: 8px;
    font-size: 11px;
    font-weight: 600;
    color: var(--esp-muted);
    text-align: center;
    word-break: break-word;
    line-height: 1.25;
}

.esp_photo_plus {
    font-size: 28px;
    font-weight: 300;
    line-height: 1;
}

.esp_photo_add_label {
    font-size: 13px;
    font-weight: 700;
}

.esp_photo_slot--empty {
    pointer-events: none;
}

.esp_photo_slot--filled {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 8px;
    border-style: solid;
    border-color: var(--esp-border);
    background: var(--esp-bg);
    font-size: 11px;
    font-weight: 600;
    color: var(--esp-muted);
    text-align: center;
    word-break: break-word;
    line-height: 1.25;
}

.esp_photo_hint {
    margin: 10px 0 0;
    font-size: 12px;
    color: var(--esp-dim);
}

.esp_section_divider {
    margin: 0;
    padding-top: 4px;
    font-size: 14px;
    font-weight: 700;
}

.esp_check_v2 {
    display: flex;
    gap: 10px;
    align-items: flex-start;
    font-size: 12px;
    color: var(--esp-muted);
    line-height: 1.45;
}

.esp_check_v2 input {
    width: 18px;
    height: 18px;
    margin-top: 2px;
    accent-color: var(--esp-orange);
    flex: none;
}

.esp_btn_submit {
    width: 100%;
    min-height: 52px;
    border: none;
    border-radius: var(--esp-radius);
    background: var(--esp-ink);
    color: #fff;
    font-family: var(--esp-display);
    font-size: 16px;
    font-weight: 700;
    cursor: pointer;
}

.esp_btn_submit--orange {
    background: var(--esp-orange);
    color: #fff;
}

.esp_btn_submit:disabled,
.esp_btn_submit.is-disabled {
    background: #e5e5e2;
    color: var(--esp-dim);
    cursor: not-allowed;
    box-shadow: none;
}

.esp_form_v2--readonly fieldset[disabled] .esp_pill {
    opacity: 0.85;
    pointer-events: none;
}

.esp_btn_secondary {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    min-height: 48px;
    margin-top: 10px;
    border-radius: var(--esp-radius-sm);
    border: 1px solid var(--esp-border);
    background: var(--esp-surface);
    color: var(--esp-ink);
    font-weight: 600;
    text-decoration: none;
}

.esp_success_card {
    text-align: center;
    padding: 28px 16px 8px;
}

.esp_success_icon {
    width: 56px;
    height: 56px;
    margin: 0 auto 16px;
    border-radius: 50%;
    background: var(--esp-orange);
    color: var(--esp-ink);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    font-weight: 800;
}

.esp_ticket_no_card {
    margin: 20px auto;
    max-width: 280px;
    padding: 16px;
    border-radius: var(--esp-radius);
    background: var(--esp-surface);
    border: 1px solid var(--esp-border);
    box-shadow: var(--esp-shadow);
}

.esp_ticket_no_card span {
    display: block;
    font-size: 12px;
    color: var(--esp-muted);
    margin-bottom: 6px;
}

.esp_ticket_no_card strong {
    font-family: var(--esp-mono);
    font-size: 18px;
}

.esp_notice, .esp_alert, .esp_success {
    padding: 14px 16px;
    border-radius: var(--esp-radius-sm);
    margin-bottom: 14px;
    font-size: 14px;
}

.esp_notice {
    background: var(--esp-orange-soft);
    border: 1px solid rgba(217, 119, 87, 0.25);
    color: var(--esp-muted);
}

.esp_alert {
    background: #fef2f2;
    border: 1px solid #fecaca;
    color: #991b1b;
}

.esp_success {
    background: #ecfdf5;
    border: 1px solid #bbf7d0;
    color: #166534;
}

.esp_empty { padding: 24px 0; text-align: center; color: var(--esp-muted); }

.esp_meta { font-size: 14px; color: var(--esp-muted); margin-bottom: 8px; }

.esp_mono { font-family: var(--esp-mono); }

.esp_hp { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }

.esp_site_footer {
    margin-top: 28px;
    padding: 20px 18px calc(28px + env(safe-area-inset-bottom, 0px));
    text-align: center;
    border-top: 1px solid var(--esp-border);
    background: var(--esp-bg);
}

.esp_footer_brand {
    display: block;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--esp-muted);
}

.esp_footer_sub {
    display: block;
    margin-top: 4px;
    font-size: 11px;
    color: var(--esp-dim);
}

.esp_portal.esp-has-bottom-nav .esp_site_footer {
    padding-bottom: calc(var(--esp-nav-h) + 40px + env(safe-area-inset-bottom, 0px));
}

/* Side + desktop */
.esp_desktop_only { display: none !important; }

.esp_side_nav {
    padding: 20px 18px 24px;
    border-bottom: 1px solid var(--esp-border);
    background: var(--esp-surface);
}

.esp_side_links {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.esp_side_link {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 11px 12px;
    border-radius: 12px;
    font-size: 14px;
    font-weight: 600;
    color: var(--esp-muted);
    text-decoration: none;
}

.esp_side_link_icon {
    flex: none;
    display: flex;
    width: 22px;
    height: 22px;
    color: var(--esp-dim);
}

.esp_side_link_icon svg {
    width: 22px;
    height: 22px;
}

.esp_side_link.is-active {
    background: var(--esp-orange-soft);
    color: var(--esp-orange);
}

.esp_side_link.is-active .esp_side_link_icon {
    color: var(--esp-orange);
}

.esp_table_wrap { display: none; }

/* Bottom nav — pełna szerokość, bez „kapsuły” */
.esp_bottom_nav {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 1080;
    display: grid;
    gap: 0;
    min-height: calc(var(--esp-nav-h) + env(safe-area-inset-bottom, 0px));
    padding:
        4px 0
        env(safe-area-inset-bottom, 0px);
    background: var(--esp-surface);
    border-top: 1px solid var(--esp-border);
    box-shadow: 0 -1px 0 rgba(26, 26, 26, 0.04);
    -webkit-tap-highlight-color: transparent;
}

.esp_portal a.esp_bottom_nav_item {
    text-decoration: none;
}

.esp_bottom_nav_item {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 2px;
    min-height: var(--esp-nav-h);
    padding: 6px 8px 4px;
    color: var(--esp-dim);
    font-size: 11px;
    font-weight: 600;
    line-height: 1.2;
    text-align: center;
    border-top: 2px solid transparent;
    margin-top: -1px;
}

.esp_bottom_nav_item:active {
    background: var(--esp-bg);
}

.esp_bottom_nav_item.is-active {
    color: var(--esp-orange);
    border-top-color: var(--esp-orange);
    background: transparent;
}

.esp_bottom_nav_icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 26px;
    height: 26px;
}

.esp_bottom_nav_icon svg {
    width: 23px;
    height: 23px;
}

.esp_bottom_nav_label {
    max-width: 100%;
    padding: 0 2px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

#esp_activate_form #esp_redirect_wrap { display: none; }
#esp_activate_form.esp_kind_link #esp_hub_options { display: none !important; }
#esp_activate_form.esp_kind_link #esp_redirect_wrap { display: block !important; }
#esp_activate_form.esp_kind_hub #esp_redirect_wrap { display: none !important; }

.esp_activate_docs {
    padding: 14px;
    border: 1px dashed var(--esp-border);
    border-radius: var(--esp-radius-sm);
    display: grid;
    gap: 10px;
}

@media (min-width: 900px) {
    .esp_portal {
        background: #ececea;
        padding: 24px 20px;
    }

    .esp_viewport {
        max-width: var(--esp-shell-max);
        min-height: calc(100dvh - 48px);
        margin-left: auto;
        margin-right: auto;
        border-radius: 20px;
        border: 1px solid var(--esp-border);
        box-shadow: 0 20px 60px rgba(26, 26, 26, 0.07);
        overflow: hidden;
        background: var(--esp-bg);
    }

    .esp_masthead {
        padding: 16px 24px;
        background: var(--esp-surface);
        border-bottom: 1px solid var(--esp-border);
        position: static;
    }

    .esp_masthead_brand .esp_logo {
        width: 36px;
        height: 36px;
    }

    .esp_layout {
        display: grid;
        grid-template-columns: var(--esp-side-w) minmax(0, 1fr);
        align-items: stretch;
    }

    .esp_side_nav {
        border-bottom: 0;
        border-right: 1px solid var(--esp-border);
        align-self: stretch;
    }

    .esp_root {
        max-width: none;
        padding: 24px 32px 28px;
    }

    .esp_root main {
        max-width: none;
        width: 100%;
    }

    .esp_form_v2,
    .esp_qr_context,
    .esp_success_card {
        max-width: var(--esp-read-max);
    }

    .esp_desktop_only { display: block !important; }

    .esp_mobile_only { display: none !important; }

    .esp_bottom_nav { display: none !important; }

    .esp_portal.esp-has-bottom-nav .esp_root,
    .esp_portal.esp-has-bottom-nav .esp_site_footer {
        padding-bottom: inherit;
    }

    .esp_main_column {
        background: var(--esp-bg);
        display: flex;
        flex-direction: column;
        min-width: 0;
    }

    .esp_site_footer {
        margin-top: auto;
        border-top: 1px solid var(--esp-border);
        background: var(--esp-bg);
        text-align: left;
        padding: 16px 32px 32px;
    }

    .esp_hub_title { font-size: 1.85rem; }

    .esp_hub_stack {
        max-width: 680px;
    }

    .esp_ticket_top { padding: 26px 26px 20px; }

    .esp_ticket_qr { width: 112px; height: 112px; }

    .esp_action_orange,
    .esp_action_white {
        max-width: none;
        margin-bottom: 0;
    }

    .esp_doc_list_mobile {
        display: grid;
        gap: 10px;
    }

}

@media (prefers-reduced-motion: reduce) {
    .esp-motion .esp_screen,
    .esp-motion.esp-leaving .esp_screen {
        animation: none;
    }
}

@media (min-width: 1400px) {
    .esp_portal {
        padding: 32px;
    }

    .esp_viewport {
        max-width: 960px;
    }
}

.esp_doc_list_mobile { display: block; }
