:root {
    --bg: #f5efe6;
    --card: #fffef9;
    --accent: #b8860b;
    --accent-soft: #faf5eb;
    --text: #2c1810;
    --muted: #6b5d4f;
    --header-h: 56px;
    --header-avatar: 48px;
    font-family: "Segoe UI", system-ui, -apple-system, Arial, sans-serif;
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    min-height: 100vh;
    background: var(--bg);
    color: var(--text);
    display: flex;
    flex-direction: column;
}

.site-header {
    position: sticky;
    top: 0;
    z-index: 100;
    background: var(--card);
    border-bottom: 1px solid rgba(0, 0, 0, 0.06);
    box-shadow: 0 1px 0 rgba(0, 0, 0, 0.04);
    padding-top: env(safe-area-inset-top, 0);
}

.site-header__inner {
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 max(14px, env(safe-area-inset-right, 0)) 0 max(14px, env(safe-area-inset-left, 0));
    height: var(--header-h);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.site-header--logged-in .site-header__inner {
    height: auto;
    min-height: 52px;
    align-items: center;
    padding-top: 8px;
    padding-bottom: 8px;
}

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

.site-logo {
    display: inline-flex;
    align-items: center;
    font-weight: 700;
    font-size: 1.1rem;
    color: var(--accent);
    text-decoration: none;
    letter-spacing: -0.02em;
    flex-shrink: 0;
}

.site-logo__img {
    display: block;
    height: auto;
    width: auto;
    max-height: 44px;
    max-width: min(56vw, 210px);
    object-fit: contain;
    border-radius: 12px;
}

.site-brand__user-row {
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 0;
    flex: 1;
    justify-content: flex-end;
}

.site-brand__display-name {
    font-weight: 700;
    font-size: 0.92rem;
    color: var(--text);
    line-height: 1.2;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    max-width: min(42vw, 11rem);
    letter-spacing: -0.02em;
}

.site-brand__profile {
    display: flex;
    align-items: center;
    flex-shrink: 0;
    text-decoration: none;
    border-radius: 50%;
    box-shadow:
        0 0 0 2px rgba(184, 134, 11, 0.28),
        0 2px 8px rgba(44, 24, 16, 0.12);
    transition: box-shadow 0.2s, transform 0.15s;
}

.site-brand__profile:hover {
    box-shadow: 0 0 0 2px var(--accent);
    transform: scale(1.04);
}

.site-brand__user-avatar {
    display: block;
    width: var(--header-avatar);
    height: var(--header-avatar);
    border-radius: 50%;
    object-fit: cover;
    background: var(--bg);
}

.site-brand__user-avatar--initial {
    display: flex;
    align-items: center;
    justify-content: center;
    width: var(--header-avatar);
    height: var(--header-avatar);
    border-radius: 50%;
    background: var(--accent-soft);
    color: var(--accent);
    font-size: 1.05rem;
    font-weight: 800;
}

.site-auth {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
    justify-content: flex-end;
    font-size: 0.9rem;
}

.site-auth__tabs {
    display: flex;
    align-items: center;
    gap: 8px;
}

.site-auth__tabs--pill {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px;
    justify-content: flex-end;
    width: 100%;
    margin: 0;
    padding: 0;
}

.site-auth__tab {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 7px 13px;
    font-size: 0.8rem;
    font-weight: 700;
    letter-spacing: 0.02em;
    color: var(--text);
    text-decoration: none;
    border-radius: 999px;
    background: linear-gradient(165deg, #fffef9 0%, #f3e9dc 55%, #ebe0d2 100%);
    border: 1px solid rgba(184, 134, 11, 0.42);
    box-shadow:
        0 1px 3px rgba(44, 24, 16, 0.08),
        inset 0 1px 0 rgba(255, 255, 255, 0.65);
    transition:
        background 0.15s,
        border-color 0.15s,
        transform 0.12s,
        box-shadow 0.15s;
    white-space: nowrap;
}

.site-auth__tab:hover {
    background: linear-gradient(165deg, #fffdf7 0%, #faf0dc 50%, #e8d4b4 100%);
    border-color: rgba(184, 134, 11, 0.72);
    box-shadow: 0 2px 10px rgba(184, 134, 11, 0.22);
}

.site-auth__tab:active {
    transform: scale(0.97);
}

.site-auth__tab--active {
    color: #fffef8;
    background: linear-gradient(165deg, #c9922e 0%, #a67c1a 45%, #8b6914 100%);
    border-color: rgba(139, 105, 20, 0.9);
    box-shadow:
        0 2px 12px rgba(139, 105, 20, 0.35),
        inset 0 1px 0 rgba(255, 255, 255, 0.25);
}

.site-auth__tab--active:hover {
    color: #fffef8;
    background: linear-gradient(165deg, #d4a23a 0%, #b8891f 50%, #967418 100%);
}

.site-auth__tab--muted {
    color: var(--muted);
    font-weight: 600;
    background: linear-gradient(165deg, #faf8f5 0%, #ebe6df 100%);
    border-color: rgba(107, 93, 79, 0.28);
}

.site-auth__tab:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 2px;
}

.site-auth__link:not(.site-auth__tab) {
    color: var(--text);
    text-decoration: none;
    padding: 8px 12px;
    border-radius: 8px;
    transition: background 0.15s;
}

.site-auth__link:not(.site-auth__tab):hover {
    background: rgba(0, 0, 0, 0.05);
}

.site-auth__link--primary {
    background: var(--accent);
    color: #fff;
    font-weight: 600;
}

.site-auth__link--primary:hover {
    filter: brightness(1.05);
    background: var(--accent);
}

.site-main {
    flex: 1;
    display: flex;
    justify-content: center;
    align-items: flex-start;
    width: 100%;
    max-width: 100%;
    min-width: 0;
    box-sizing: border-box;
    padding: 24px max(16px, env(safe-area-inset-right, 0)) max(48px, env(safe-area-inset-bottom, 0))
        max(16px, env(safe-area-inset-left, 0));
}

.site-footer {
    text-align: center;
    padding: 16px max(16px, env(safe-area-inset-right, 0)) max(20px, env(safe-area-inset-bottom, 0))
        max(16px, env(safe-area-inset-left, 0));
    color: var(--muted);
    font-size: 0.85rem;
}

.site-footer__help {
    margin: 0 0 8px;
    line-height: 1.45;
}

.site-footer__help a {
    color: var(--accent);
    font-weight: 600;
    text-decoration: none;
}

.site-footer__help a:hover {
    text-decoration: underline;
}

/* —— Mobile / PWA: cabeçalho compacto; utilizador: avatar maior + abas em pastilhas —— */
@media (max-width: 899px) {
    :root {
        --header-avatar: 56px;
    }

    .site-header:not(.site-header--logged-in) .site-header__inner {
        height: auto;
        min-height: var(--header-h);
        flex-wrap: wrap;
        align-items: center;
        row-gap: 8px;
        padding-top: 8px;
        padding-bottom: 8px;
    }

    .site-header--logged-in .site-header__inner {
        flex-direction: column;
        align-items: stretch;
        align-content: stretch;
        gap: 8px;
        min-height: 0;
        padding-top: 6px;
        padding-bottom: 10px;
    }

    .site-header--logged-in .site-brand {
        flex: 1 1 auto;
        width: 100%;
        min-width: 0;
        justify-content: space-between;
        align-items: center;
        gap: 8px;
    }

    .site-header--logged-in .site-logo__img {
        max-height: 36px;
        max-width: min(48vw, 180px);
    }

    .site-header--logged-in .site-brand__user-row {
        flex: 1 1 auto;
        min-width: 0;
        justify-content: flex-end;
        gap: 8px;
    }

    .site-header--logged-in .site-brand__display-name {
        max-width: min(36vw, 7.5rem);
        font-size: 0.88rem;
    }

    .site-header--logged-in .site-auth {
        flex: 1 1 100%;
        width: 100%;
        justify-content: center;
        margin: 0;
    }

    .site-header--logged-in .site-auth__tabs--pill {
        justify-content: center;
        gap: 6px;
    }

    .site-header--logged-in .site-auth__tab {
        padding: 8px 12px;
        font-size: 0.75rem;
    }

    .site-header:not(.site-header--logged-in) .site-auth {
        justify-content: center;
    }

    .site-header:not(.site-header--logged-in) .site-auth__tabs--pill {
        justify-content: center;
    }

    .site-brand {
        flex: 1 1 auto;
        min-width: 0;
    }

    .site-auth {
        flex: 1 1 100%;
        width: 100%;
        justify-content: flex-end;
        gap: 8px 10px;
    }

    .site-auth__role {
        font-size: 0.7rem;
    }

    .site-auth__link:not(.site-auth__tab) {
        padding: 8px 10px;
        font-size: 0.85rem;
    }
}

/* —— Voltar no perfil —— */
.profile-page__nav-back {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px 16px;
    max-width: min(100%, 520px);
    margin: 0 auto 12px;
    padding: 0 4px;
}

.profile-page__back-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 10px 14px;
    border-radius: 10px;
    border: 1px solid rgba(184, 134, 11, 0.35);
    background: #fffef9;
    color: #5c3d2e;
    font-weight: 700;
    font-size: 0.9rem;
    text-decoration: none;
    box-shadow: 0 2px 8px rgba(42, 26, 18, 0.08);
}

.profile-page__back-btn:hover,
.profile-page__back-btn:focus-visible {
    border-color: var(--accent, #b8860b);
    outline: none;
}

.profile-page__back-link {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--accent, #b8860b);
    text-decoration: none;
}

.profile-page__back-link:hover {
    text-decoration: underline;
}

/* —— Página de perfil: paleta dourado & marrom —— */
.container--profile.profile-page {
    width: 100%;
    min-width: 0;
    max-width: min(100%, 520px);
    padding: 0;
    overflow: hidden;
    background: #2a1a12;
    background: linear-gradient(165deg, #3d2a1f 0%, #2a1a12 42%, #1e130e 100%);
    border: 2px solid #b8923e;
    border-radius: 18px;
    box-shadow:
        0 16px 48px rgba(20, 10, 6, 0.45),
        inset 0 1px 0 rgba(232, 212, 139, 0.12);
    overflow-wrap: break-word;
    word-wrap: break-word;
}

.profile-page__hero {
    position: relative;
    padding: 22px 22px 18px;
    background: linear-gradient(180deg, rgba(184, 146, 62, 0.22) 0%, rgba(42, 26, 18, 0.4) 100%);
    border-bottom: 1px solid rgba(184, 146, 62, 0.35);
}

.profile-page__hero-accent {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, #8b6914, #d4af37, #f0d78c, #d4af37, #8b6914);
}

.profile-page__title {
    margin: 0 0 10px;
    font-size: 1.35rem;
    font-weight: 800;
    letter-spacing: -0.02em;
    color: #f5e6c8;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.35);
}

.profile-page .profile-lead {
    font-size: 0.9rem;
    color: rgba(245, 230, 200, 0.82);
    line-height: 1.55;
    margin: 0;
}

.profile-page .profile-lead strong {
    color: #e8c547;
    font-weight: 700;
}

.profile-page__body {
    padding: 18px 18px 22px;
}

.profile-page__flash {
    margin-bottom: 14px;
}

.profile-page .flash-error {
    background: rgba(120, 30, 30, 0.45);
    border: 1px solid rgba(248, 113, 113, 0.45);
    color: #fecaca;
    border-radius: 12px;
    padding: 12px 14px;
}

.profile-page .profile-flash-ok {
    background: rgba(22, 101, 52, 0.35);
    border: 1px solid rgba(74, 222, 128, 0.4);
    color: #bbf7d0;
    border-radius: 12px;
    padding: 12px 14px;
}

.profile-card {
    margin-bottom: 16px;
    padding: 16px 16px 18px;
    border-radius: 14px;
    background: rgba(62, 42, 30, 0.65);
    border: 1px solid rgba(184, 146, 62, 0.42);
    box-shadow: inset 0 1px 0 rgba(255, 248, 220, 0.06);
}

.profile-card--email .profile-card__content {
    padding-top: 2px;
}

.profile-email-value {
    margin: 0 0 10px;
    font-size: 1rem;
    font-weight: 600;
    color: var(--text);
    word-break: break-word;
}

.profile-email-value--empty {
    font-weight: 500;
    color: var(--muted);
}

.profile-email-promo {
    margin: 0;
    font-size: 0.88rem;
    line-height: 1.45;
    color: var(--muted);
}

.profile-card--photo .profile-card__content {
    padding-top: 2px;
}

.profile-card__head {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 14px;
    padding-bottom: 12px;
    border-bottom: 1px solid rgba(184, 146, 62, 0.28);
}

.profile-card__icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 10px;
    font-size: 1rem;
    color: #2a1810;
    background: linear-gradient(145deg, #e8c547 0%, #b8923e 100%);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.25);
    flex-shrink: 0;
}

.profile-card__title {
    margin: 0;
    font-size: 1.02rem;
    font-weight: 700;
    color: #f5e6c8;
    letter-spacing: -0.01em;
}

.profile-card__content {
    margin: 0;
}

.profile-card__empty {
    margin: 0 0 12px;
    font-size: 0.88rem;
    color: rgba(245, 230, 200, 0.65);
    font-style: italic;
}

.profile-form {
    display: flex;
    flex-direction: column;
    gap: 0;
}

.profile-page .profile-field {
    margin-bottom: 0;
}

.profile-page .profile-field > label,
.profile-page .profile-label {
    display: block;
    font-size: 0.82rem;
    font-weight: 600;
    margin-bottom: 8px;
    color: rgba(232, 197, 120, 0.95);
    letter-spacing: 0.02em;
}

.profile-page .profile-field input.profile-input,
.profile-page .profile-field input[type="text"],
.profile-page .profile-field input[type="email"],
.profile-page .profile-field input[type="date"] {
    width: 100%;
    box-sizing: border-box;
    padding: 12px 14px;
    border-radius: 12px;
    border: 1px solid rgba(184, 146, 62, 0.55);
    font-size: 1rem;
    font-family: inherit;
    line-height: 1.35;
    background: linear-gradient(180deg, #fffdf8 0%, #faf6ef 100%);
    color: #2a1810;
    box-shadow:
        inset 0 2px 4px rgba(42, 24, 16, 0.06),
        0 1px 0 rgba(255, 255, 255, 0.35);
    transition:
        border-color 0.15s ease,
        box-shadow 0.15s ease;
}

.profile-page .profile-field input.profile-input::placeholder,
.profile-page .profile-field input[type="text"]::placeholder,
.profile-page .profile-field input[type="email"]::placeholder {
    color: #8a7568;
}

.profile-page .profile-field input.profile-input:focus,
.profile-page .profile-field input[type="text"]:focus,
.profile-page .profile-field input[type="email"]:focus,
.profile-page .profile-field input[type="date"]:focus {
    outline: none;
    border-color: #d4af37;
    box-shadow:
        inset 0 2px 4px rgba(42, 24, 16, 0.06),
        0 0 0 3px rgba(212, 175, 55, 0.32);
}

/* Campo de data: ícone do calendário no tom dourado */
.profile-page .profile-field input[type="date"].profile-input,
.profile-page .profile-field input[type="date"] {
    min-height: 48px;
    color-scheme: light;
}

.profile-page .profile-field input[type="date"]::-webkit-calendar-picker-indicator {
    cursor: pointer;
    opacity: 0.85;
    padding: 4px;
    border-radius: 6px;
    filter: sepia(0.35) saturate(1.4) hue-rotate(5deg) brightness(0.92);
}

.profile-page .profile-field input[type="date"]::-webkit-calendar-picker-indicator:hover {
    opacity: 1;
    background: rgba(212, 175, 55, 0.2);
}

.profile-page .profile-field input[type="email"].profile-input,
.profile-page .profile-field input[type="email"] {
    min-height: 48px;
}

.profile-page .profile-field input:-webkit-autofill,
.profile-page .profile-field input:-webkit-autofill:hover,
.profile-page .profile-field input:-webkit-autofill:focus {
    -webkit-text-fill-color: #2a1810;
    -webkit-box-shadow: 0 0 0 1000px #faf6ef inset;
    box-shadow: 0 0 0 1000px #faf6ef inset;
    border-color: rgba(184, 146, 62, 0.55);
}

.profile-page .profile-hint {
    display: block;
    font-size: 0.78rem;
    color: rgba(210, 190, 160, 0.75);
    margin-top: 8px;
    line-height: 1.45;
}

.cashbeck-page {
    max-width: min(100%, 760px);
}

.cashbeck-how {
    margin: 0 0 18px;
    border: 1px solid rgba(184, 134, 11, 0.28);
    border-radius: 14px;
    background: var(--card);
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.05);
}

.cashbeck-how__summary {
    list-style: none;
    cursor: pointer;
    padding: 14px 16px;
    font-size: 1.05rem;
    font-weight: 700;
    color: var(--text);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.cashbeck-how__summary:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 2px;
    border-radius: 12px;
}

.cashbeck-how__summary::-webkit-details-marker {
    display: none;
}

.cashbeck-how__summary::after {
    content: "";
    flex-shrink: 0;
    width: 0;
    height: 0;
    border-left: 6px solid transparent;
    border-right: 6px solid transparent;
    border-top: 7px solid var(--accent);
    opacity: 0.85;
    transition: transform 0.2s ease;
}

.cashbeck-how[open] .cashbeck-how__summary::after {
    transform: rotate(180deg);
}

.cashbeck-how__body {
    padding: 0 16px 16px;
    border-top: 1px solid rgba(0, 0, 0, 0.06);
}

.cashbeck-how .cashbeck-lead--story {
    margin-bottom: 0;
    padding-top: 12px;
}

.cashbeck-lead {
    margin: 0 0 14px;
    color: var(--muted);
    line-height: 1.5;
}

.cashbeck-lead--story {
    margin-bottom: 18px;
}

.cashbeck-lead--story p {
    margin: 0 0 12px;
    line-height: 1.55;
}

.cashbeck-lead--story p:last-child {
    margin-bottom: 0;
}

.cashbeck-lead__title {
    margin: 0 0 10px !important;
    font-size: 1.05rem;
    font-weight: 700;
    color: var(--text);
}

.cashbeck-lead__finger {
    margin-right: 4px;
}

.cashbeck-wallet {
    background: linear-gradient(145deg, var(--accent-soft) 0%, #ffffff 100%);
    border: 1px solid rgba(184, 134, 11, 0.22);
    border-radius: 14px;
    padding: 16px;
    margin-bottom: 16px;
}

.cashbeck-wallet__label {
    margin: 0 0 6px;
    color: var(--muted);
    font-size: 0.86rem;
}

.cashbeck-wallet__value {
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--accent);
    line-height: 1.2;
}

.cashbeck-wallet__value span {
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--text);
}

.cashbeck-wallet__hint {
    margin: 8px 0 0;
    font-size: 0.9rem;
    color: var(--muted);
}

.cashbeck-history h3 {
    margin: 0 0 10px;
    font-size: 1rem;
}

.cashbeck-history__hint {
    margin: 0 0 14px;
    font-size: 0.86rem;
    color: var(--muted);
    line-height: 1.45;
}

.cashbeck-item__summary {
    margin: 0 0 8px;
    font-size: 0.92rem;
    font-weight: 600;
    color: var(--text);
    line-height: 1.45;
}

.cashbeck-item__delta {
    font-weight: 800;
}

.cashbeck-item--credit .cashbeck-item__delta {
    color: var(--accent);
}

.cashbeck-item--debit .cashbeck-item__delta {
    color: #a94442;
}

.cashbeck-item--debit {
    border-color: rgba(169, 68, 66, 0.22);
    background: rgba(169, 68, 66, 0.04);
}

.cashbeck-empty {
    margin: 0;
    color: var(--muted);
}

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

.cashbeck-item {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 10px;
    border: 1px solid rgba(0, 0, 0, 0.08);
    border-radius: 12px;
    padding: 12px;
    background: #fff;
}

.cashbeck-item__main {
    min-width: 0;
    flex: 1;
}

.cashbeck-item__order-date {
    display: block;
    font-size: 0.82rem;
    font-weight: 700;
    color: var(--text);
    margin-bottom: 6px;
}

.cashbeck-item__products {
    list-style: none;
    margin: 0 0 8px;
    padding: 0;
    font-size: 0.78rem;
    line-height: 1.45;
    color: var(--muted);
}

.cashbeck-item__products li {
    margin: 0;
    padding: 2px 0;
}

.cashbeck-item p,
.cashbeck-item__amount {
    margin: 4px 0 0;
    color: var(--muted);
    font-size: 0.9rem;
}

.cashbeck-item__amount {
    margin-top: 4px;
}

.cashbeck-item__right {
    text-align: right;
    flex-shrink: 0;
}

.cashbeck-item__right span {
    display: block;
    color: #15803d;
    font-weight: 700;
}

.cashbeck-item__right time {
    display: block;
    margin-top: 4px;
    font-size: 0.8rem;
    color: var(--muted);
}

.profile-page .profile-preview {
    margin: 4px 0 14px;
    display: flex;
    justify-content: center;
}

.profile-page .profile-preview__img {
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid var(--accent);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.35), 0 0 0 4px rgba(184, 146, 62, 0.2);
}

.profile-page .profile-checkbox {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 0.88rem;
    margin-bottom: 14px;
    cursor: pointer;
    color: rgba(245, 230, 200, 0.88);
}

.profile-page .profile-checkbox input {
    width: 18px;
    height: 18px;
    accent-color: var(--accent);
}

.profile-page .profile-file-wrap {
    display: inline-block;
    margin-top: 2px;
}

.profile-page .profile-file-input {
    position: absolute;
    width: 0.1px;
    height: 0.1px;
    opacity: 0;
    overflow: hidden;
    z-index: -1;
}

.profile-page .profile-file-label {
    display: inline-block;
    padding: 11px 18px;
    border-radius: 12px;
    border: 2px solid #c9a227;
    color: #f5e6c8;
    font-weight: 700;
    font-size: 0.9rem;
    cursor: pointer;
    background: rgba(42, 26, 18, 0.5);
    transition:
        background 0.2s,
        border-color 0.2s,
        transform 0.15s;
}

.profile-page .profile-file-label:hover {
    background: rgba(184, 146, 62, 0.25);
    border-color: #e8c547;
}

.profile-page .profile-file-wrap:focus-within .profile-file-label {
    outline: 2px solid #e8c547;
    outline-offset: 3px;
}

.profile-page__submit {
    margin-top: 6px;
    padding-top: 4px;
}

.profile-page .btn--profile-gold {
    margin-top: 0;
    width: 100%;
    background: linear-gradient(180deg, #e8c547 0%, #b8923e 55%, #9a7a32 100%);
    color: #1e130e;
    font-weight: 800;
    letter-spacing: 0.02em;
    border: 2px solid rgba(245, 230, 200, 0.35);
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.35);
}

.profile-page .btn--profile-gold:hover {
    filter: brightness(1.06);
    background: linear-gradient(180deg, #f0d060 0%, #c9a227 55%, #a68628 100%);
}

.profile-page .btn--profile-gold:active {
    transform: translateY(1px);
}

@media (max-width: 639px) {
    .container--profile.profile-page {
        max-width: 100%;
    }
}

@media (max-width: 440px) {
    .container--profile.profile-page {
        border-radius: 12px;
    }

    .profile-page__hero,
    .profile-page__body {
        padding-left: 14px;
        padding-right: 14px;
    }

    .profile-card {
        padding-left: 14px;
        padding-right: 14px;
    }
}

/* Classes legadas (outras páginas, se reutilizarem) */

.profile-lead {
    font-size: 0.9rem;
    color: var(--muted);
    line-height: 1.5;
    margin: 0 0 18px;
}

.profile-field {
    margin-bottom: 16px;
}

.profile-field > label,
.profile-label {
    display: block;
    font-size: 0.85rem;
    font-weight: 600;
    margin-bottom: 6px;
    color: var(--text);
}

.profile-field input[type="text"] {
    width: 100%;
    padding: 10px 12px;
    border-radius: 10px;
    border: 1px solid rgba(0, 0, 0, 0.14);
    font-size: 1rem;
    font-family: inherit;
}

.profile-hint {
    display: block;
    font-size: 0.78rem;
    color: var(--muted);
    margin-top: 6px;
}

.profile-preview {
    margin: 8px 0 12px;
}

.profile-preview__img {
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid rgba(184, 134, 11, 0.28);
}

.profile-checkbox {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.88rem;
    margin-bottom: 10px;
    cursor: pointer;
}

.profile-file-wrap {
    display: inline-block;
    margin-top: 4px;
}

.profile-file-input {
    position: absolute;
    width: 0.1px;
    height: 0.1px;
    opacity: 0;
    overflow: hidden;
    z-index: -1;
}

.profile-file-label {
    display: inline-block;
    padding: 10px 14px;
    border-radius: 10px;
    border: 2px solid var(--accent);
    color: var(--accent);
    font-weight: 600;
    font-size: 0.9rem;
    cursor: pointer;
}

.profile-file-wrap:focus-within .profile-file-label {
    outline: 2px solid var(--accent);
    outline-offset: 2px;
}

.profile-flash-ok {
    background: rgba(34, 197, 94, 0.12);
    color: #15803d;
    padding: 10px 12px;
    border-radius: 10px;
    margin-bottom: 14px;
    font-size: 0.9rem;
    font-weight: 600;
}

.container {
    width: 100%;
    min-width: 0;
    max-width: 440px;
    background: var(--card);
    border-radius: 16px;
    padding: 22px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.08);
}

.container.container--narrow {
    max-width: 560px;
}

.hidden {
    display: none !important;
}

h2 {
    margin: 0 0 14px;
    font-size: 1.25rem;
}

.seller {
    display: flex;
    align-items: center;
    padding: 12px;
    border-radius: 10px;
    margin-bottom: 10px;
    cursor: pointer;
    border: 2px solid transparent;
    transition: border-color 0.15s, background 0.15s;
}

.seller:hover {
    background: rgba(0, 0, 0, 0.02);
}

.seller.selected {
    border-color: var(--accent);
    background: var(--accent-soft);
}

.seller img {
    width: 50px;
    aspect-ratio: 3 / 4;
    height: auto;
    border-radius: 10px;
    object-fit: cover;
    margin-right: 12px;
    background: #eee;
    flex-shrink: 0;
}

.seller.unavailable {
    opacity: 0.45;
    cursor: not-allowed;
}

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

.seller__name {
    font-weight: 700;
    font-size: 1rem;
    line-height: 1.3;
    word-break: break-word;
}

.seller__meta {
    font-size: 0.85rem;
    color: var(--muted);
    line-height: 1.35;
}

.step-catalog {
    padding-bottom: calc(72px + env(safe-area-inset-bottom, 0px));
}

.catalog-total-end {
    margin-top: 8px;
}

.step-catalog .catalog-hint {
    color: var(--muted);
    font-size: 0.88rem;
    margin: 0 0 14px;
    line-height: 1.4;
}

.catalog-sticky-bar {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 80;
    padding: 10px 16px calc(12px + env(safe-area-inset-bottom, 0px));
    background: rgba(255, 255, 255, 0.96);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-top: 1px solid rgba(0, 0, 0, 0.08);
    box-shadow: 0 -6px 24px rgba(0, 0, 0, 0.07);
}

.catalog-sticky-bar__inner {
    display: flex;
    align-items: center;
    justify-content: center;
    max-width: 440px;
    margin: 0 auto;
}

.btn--sticky-cta {
    width: 100%;
    margin-top: 0;
    padding: 12px 18px;
    min-height: 44px;
}

.catalog-hint--tight {
    margin-top: 10px;
    margin-bottom: 0;
    font-size: 0.82rem;
}

.catalog-hint--magic {
    color: #6b4c9a;
    background: rgba(107, 76, 154, 0.08);
    padding: 8px 12px;
    border-radius: 8px;
}

.catalog-acc--magic {
    border-color: rgba(107, 76, 154, 0.35);
}

.catalog-acc--magic .catalog-acc-summary {
    background: linear-gradient(90deg, rgba(107, 76, 154, 0.06), transparent);
}

.catalog-magic-badge {
    display: inline-block;
    margin-left: 6px;
    padding: 2px 8px;
    font-size: 0.72rem;
    font-weight: 600;
    color: #5a3d8a;
    background: rgba(107, 76, 154, 0.12);
    border-radius: 999px;
    vertical-align: middle;
}

.step3-actions {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-top: 14px;
}

.step3-actions .btn {
    margin-top: 0;
}

.order-obs {
    margin: 14px 0 16px;
}

.order-obs__label {
    display: block;
    font-weight: 600;
    font-size: 0.9rem;
    margin-bottom: 6px;
    color: var(--text);
}

.order-obs__opt {
    font-weight: 500;
    color: var(--muted);
    font-size: 0.82rem;
}

.order-obs__textarea {
    width: 100%;
    min-height: 96px;
    padding: 10px 12px;
    border-radius: 10px;
    border: 1px solid rgba(0, 0, 0, 0.14);
    font-size: 0.95rem;
    font-family: inherit;
    line-height: 1.45;
    resize: vertical;
    box-sizing: border-box;
}

.order-obs__textarea:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 3px var(--accent-soft);
}

.catalog-empty {
    color: var(--muted);
    font-size: 0.95rem;
    margin: 0;
}

.catalog-acc {
    border: 1px solid rgba(0, 0, 0, 0.08);
    border-radius: 12px;
    margin-bottom: 10px;
    background: #fff;
    overflow: hidden;
}

.catalog-acc summary {
    list-style: none;
    cursor: pointer;
    padding: 12px 14px;
    font-weight: 600;
    font-size: 1rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    user-select: none;
    transition: background 0.15s;
}

.catalog-acc summary::-webkit-details-marker {
    display: none;
}

.catalog-acc summary::after {
    content: "";
    width: 0.5em;
    height: 0.5em;
    border-right: 2px solid var(--muted);
    border-bottom: 2px solid var(--muted);
    transform: rotate(45deg);
    transition: transform 0.2s;
    flex-shrink: 0;
}

.catalog-acc[open] summary {
    background: var(--accent-soft);
    color: var(--accent);
}

.catalog-acc[open] summary::after {
    transform: rotate(225deg);
    margin-top: 2px;
}

.catalog-acc-body {
    padding: 0 10px 12px;
    border-top: 1px solid rgba(0, 0, 0, 0.05);
}

.catalog-product {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 4px;
    border-bottom: 1px solid rgba(0, 0, 0, 0.06);
    font-size: 0.92rem;
}

.catalog-product:last-child {
    border-bottom: none;
}

.catalog-product-img {
    width: 52px;
    height: 52px;
    border-radius: 10px;
    object-fit: cover;
    background: #eee;
    flex-shrink: 0;
}

.catalog-product-main {
    flex: 1;
    min-width: 0;
}

.catalog-product-title {
    font-weight: 600;
    line-height: 1.25;
}

.catalog-product-popularity {
    font-size: 0.78rem;
    color: var(--accent);
    font-weight: 600;
    margin-top: 4px;
}

.catalog-product-meta {
    color: var(--muted);
    font-size: 0.82rem;
    margin-top: 2px;
}

.catalog-product--out {
    background: rgba(120, 120, 130, 0.09);
    border-radius: 12px;
    padding: 12px 8px;
    margin: 4px 0;
    border-bottom: none;
}

.catalog-product--out + .catalog-product:not(.catalog-product--out) {
    margin-top: 4px;
}

.catalog-product--out .catalog-product-img {
    opacity: 0.82;
    filter: grayscale(0.35);
}

.catalog-product--out .catalog-product-title {
    color: #64748b;
}

.catalog-esgotado {
    display: inline-block;
    margin-top: 6px;
    margin-bottom: 2px;
    padding: 3px 10px;
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: #64748b;
    background: rgba(100, 116, 139, 0.18);
    border-radius: 6px;
}

.catalog-ultimas-unidades {
    display: inline-block;
    margin-top: 6px;
    padding: 3px 10px;
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    color: #9a3412;
    background: rgba(251, 146, 60, 0.28);
    border-radius: 6px;
    vertical-align: middle;
}

.catalog-product-meta--out {
    margin-top: 6px;
    color: #64748b;
    font-size: 0.82rem;
}

.catalog-product-controls {
    flex-shrink: 0;
}

.product {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 8px;
    margin-bottom: 12px;
    font-size: 0.95rem;
}

.controls {
    display: flex;
    align-items: center;
    gap: 8px;
}

.controls button {
    width: 32px;
    height: 32px;
    border: 1px solid rgba(0, 0, 0, 0.12);
    border-radius: 8px;
    background: #fff;
    cursor: pointer;
    font-size: 1rem;
    line-height: 1;
}

.controls button:disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

.total-line {
    margin-top: 12px;
    font-weight: 600;
}

.total-line--final {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 16px;
    padding: 12px 14px;
    border-radius: 12px;
    background: rgba(0, 0, 0, 0.03);
    border: 1px solid rgba(0, 0, 0, 0.08);
    font-size: 1.05rem;
}

.total-line__label {
    font-weight: 700;
    color: var(--text);
}

.total-line__value {
    font-weight: 800;
    font-size: 1.15rem;
    color: var(--accent);
    letter-spacing: -0.02em;
}

.total-line--has-discount {
    border-color: rgba(34, 197, 94, 0.45);
    background: rgba(34, 197, 94, 0.08);
}

.summary-breakdown {
    margin-top: 6px;
}

.summary-breakdown:empty {
    display: none;
}

.summary-pricing {
    margin-top: 14px;
    padding-top: 12px;
    border-top: 1px solid rgba(0, 0, 0, 0.08);
}

.summary-pricing__row {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    gap: 12px;
    margin-bottom: 8px;
    font-size: 0.92rem;
}

.summary-pricing__row span:last-child {
    font-weight: 700;
    white-space: nowrap;
}

.summary-pricing__row--discount span:last-child {
    color: #15803d;
}

.summary-pricing__row--cashback span:first-child {
    color: var(--text);
}

.summary-pricing__row--cashback span:last-child {
    color: #92400e;
    font-weight: 800;
}

.summary-coupon-ok {
    margin: 12px 0 0;
    padding: 10px 12px;
    border-radius: 10px;
    background: rgba(34, 197, 94, 0.12);
    border: 1px solid rgba(34, 197, 94, 0.35);
    color: #166534;
    font-size: 0.9rem;
    line-height: 1.45;
}

.summary-coupon-ok strong {
    color: #14532d;
}

.btn {
    width: 100%;
    padding: 12px 14px;
    margin-top: 16px;
    border: none;
    border-radius: 10px;
    background: var(--accent);
    color: #fff;
    font-weight: 700;
    cursor: pointer;
    font-size: 1rem;
}

.btn:disabled {
    opacity: 0.45;
    cursor: not-allowed;
}

.btn--ghost {
    background: transparent;
    color: var(--accent);
    border: 2px solid var(--accent);
}

.pwa-install {
    margin-top: 20px;
    padding: 14px 16px;
    border-radius: 12px;
    background: var(--accent-soft);
    border: 1px solid rgba(184, 134, 11, 0.2);
}

.pwa-install--minimal {
    padding: 0;
    background: transparent;
    border: none;
}

.pwa-install--minimal .pwa-install__btn {
    margin-top: 0;
}

.pwa-install__btn[aria-busy="true"] {
    cursor: wait;
    opacity: 0.92;
}

.pwa-install__sub {
    margin: 10px 0 0;
    font-size: 0.82rem;
    line-height: 1.45;
    color: var(--muted);
    max-width: 22rem;
}

.pwa-install__inline-help {
    display: block;
    margin: 10px 0 0;
    padding: 0;
    border: none;
    background: none;
    font: inherit;
    font-size: 0.8rem;
    color: var(--accent);
    text-decoration: underline;
    text-underline-offset: 3px;
    cursor: pointer;
    text-align: left;
}

.pwa-install__inline-help:hover {
    filter: brightness(1.08);
}

.pwa-install--mode-mobile .pwa-install__sub {
    max-width: none;
}

.pwa-install--mode-desktop .pwa-install__sub {
    max-width: 28rem;
}

.stebs-device-mobile .pwa-install--minimal .pwa-install__btn {
    width: 100%;
    max-width: 100%;
}

.stebs-device-mobile .pwa-install__sub,
.stebs-device-mobile .pwa-install__inline-help {
    max-width: none;
}

.stebs-device-desktop .pwa-install--mode-desktop {
    margin-top: 16px;
}

.pwa-install--ready .pwa-install__btn {
    box-shadow: 0 0 0 2px rgba(184, 134, 11, 0.35);
    animation: stebs-pwa-ready-pulse 2s ease-in-out infinite;
}

@keyframes stebs-pwa-ready-pulse {
    0%,
    100% {
        box-shadow: 0 0 0 2px rgba(184, 134, 11, 0.35);
    }
    50% {
        box-shadow: 0 0 0 4px rgba(184, 134, 11, 0.55);
    }
}

.pwa-install__btn:disabled {
    opacity: 0.72;
    cursor: wait;
}

.stebs-mobile-entry .pwa-install--minimal .pwa-install__btn {
    box-shadow: 0 4px 16px rgba(184, 134, 11, 0.28);
}

@media (max-width: 899px) {
    #step1 > #pwa-install-box {
        margin-top: 14px;
    }

    .pwa-install--mode-mobile {
        margin-top: 12px;
    }

    .pwa-install--mode-mobile .pwa-install__btn {
        width: 100%;
    }
}

.coupon-row {
    display: flex;
    gap: 8px;
    margin-top: 14px;
    flex-wrap: wrap;
}

.coupon-row input {
    flex: 1;
    min-width: 120px;
    padding: 10px 12px;
    border-radius: 8px;
    border: 1px solid rgba(0, 0, 0, 0.15);
}

.coupon-row button {
    padding: 10px 14px;
    border-radius: 8px;
    border: none;
    background: #333;
    color: #fff;
    cursor: pointer;
    font-weight: 600;
}

.coins-redeem-box {
    margin-top: 16px;
    padding: 14px 16px;
    border-radius: 12px;
    border: 1px solid rgba(139, 90, 43, 0.25);
    background: linear-gradient(135deg, rgba(255, 248, 235, 0.95), rgba(255, 240, 220, 0.85));
}

.coins-redeem-box__toggle {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    font-weight: 600;
    cursor: pointer;
    line-height: 1.4;
}

.coins-redeem-box__toggle input {
    margin-top: 3px;
    width: 18px;
    height: 18px;
    flex-shrink: 0;
}

.coins-redeem-box__balance {
    margin: 10px 0 0;
    font-size: 0.92rem;
    color: rgba(0, 0, 0, 0.72);
}

.coins-redeem-box__rate {
    display: block;
    font-size: 0.82rem;
    color: rgba(0, 0, 0, 0.55);
    margin-top: 2px;
}

.coins-redeem-box__controls {
    margin-top: 12px;
}

.coins-redeem-box__controls.hidden {
    display: none;
}

.coins-redeem-box__row {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    align-items: flex-end;
}

.coins-redeem-box__field {
    flex: 1;
    min-width: 140px;
    display: flex;
    flex-direction: column;
    gap: 6px;
    font-size: 0.88rem;
    font-weight: 600;
}

.coins-redeem-box__field input {
    padding: 10px 12px;
    border-radius: 8px;
    border: 1px solid rgba(0, 0, 0, 0.15);
    font-size: 1rem;
}

.coins-redeem-box__max {
    padding: 10px 14px;
    font-size: 0.88rem;
}

.coins-redeem-box__range {
    width: 100%;
    margin-top: 10px;
}

.coins-redeem-box__preview {
    margin: 10px 0 0;
    font-size: 0.9rem;
    font-weight: 600;
    color: #6b4a12;
}

.summary-line {
    margin-bottom: 8px;
    line-height: 1.45;
}

.summary-line:last-child {
    margin-bottom: 0;
}

.summary-line__qty {
    color: var(--muted);
    font-weight: 600;
}

#couponMsg {
    min-height: 1.2em;
    margin-top: 6px;
    font-size: 0.9rem;
}

#couponMsg.ok {
    color: #0a7;
}

#couponMsg.err {
    color: #c00;
}

.coupon-countdown {
    margin-top: 8px;
    font-size: 0.88rem;
    font-weight: 600;
    color: var(--accent);
    line-height: 1.35;
}

.reserva-success-msg {
    text-align: center;
    margin: 0 0 18px;
    padding: 0 8px;
    font-size: 1.02rem;
    line-height: 1.45;
    font-weight: 600;
    color: var(--text);
}

.reserva-customer-fields {
    margin: 0 0 16px;
    padding: 14px 12px;
    border-radius: 12px;
    border: 1px solid rgba(184, 134, 11, 0.22);
    background: rgba(255, 254, 249, 0.92);
}

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

.reserva-customer-fields__label {
    display: block;
    margin: 0 0 4px;
    font-size: 0.82rem;
    font-weight: 600;
    color: var(--muted);
}

.reserva-customer-fields__label + .reserva-customer-fields__input {
    margin-bottom: 12px;
}

.reserva-customer-fields__opt {
    font-weight: 500;
    color: var(--muted);
}

.reserva-customer-fields__input {
    display: block;
    width: 100%;
    padding: 10px 12px;
    border: 1px solid rgba(107, 93, 79, 0.25);
    border-radius: 10px;
    font: inherit;
    font-size: 0.95rem;
    color: var(--text);
    background: #fffef9;
}

.reserva-customer-fields__msg {
    margin: 4px 0 0;
    font-size: 0.78rem;
    line-height: 1.35;
}

.reserva-customer-fields__msg[hidden] {
    display: none !important;
}

.reserva-customer-fields__msg--ok {
    color: #2e6b3d;
}

.reserva-customer-fields__msg--err {
    color: #b91c1c;
}

.reserva-customer-fields__register-hint {
    margin: 12px 0 0;
    font-size: 0.85rem;
    line-height: 1.4;
    color: var(--muted);
    text-align: center;
}

.reserva-customer-fields__register-hint a {
    color: var(--accent, #8b5a2b);
    font-weight: 600;
    text-decoration: none;
}

.reserva-customer-fields__register-hint a:hover {
    text-decoration: underline;
}

#reservationProceedBtn:disabled {
    opacity: 0.45;
    cursor: not-allowed;
}

.timer {
    font-size: 22px;
    color: var(--accent);
    font-weight: 700;
    margin: 12px 0;
}

.flash-error {
    background: #f5e6dc;
    color: #a00;
    padding: 10px 12px;
    border-radius: 8px;
    margin-bottom: 14px;
    font-size: 0.9rem;
}

.flash-success {
    background: #e8f5e9;
    color: #1b5e20;
    padding: 10px 12px;
    border-radius: 8px;
    margin-bottom: 14px;
    font-size: 0.9rem;
}

.form-stack label {
    display: block;
    font-size: 0.85rem;
    margin-bottom: 4px;
    color: var(--muted);
}

.form-stack input {
    width: 100%;
    padding: 10px 12px;
    border-radius: 8px;
    border: 1px solid rgba(0, 0, 0, 0.15);
    margin-bottom: 12px;
}

.form-stack .form-stack__hint {
    display: block;
    font-size: 0.8rem;
    color: var(--muted);
    line-height: 1.35;
    margin: -8px 0 14px;
}

.form-stack label.form-stack__remember {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    font-size: 0.88rem;
    color: var(--muted);
    margin-bottom: 16px;
    cursor: pointer;
    line-height: 1.4;
}

.form-stack label.form-stack__remember input[type="checkbox"] {
    width: auto;
    margin: 2px 0 0;
    padding: 0;
    flex-shrink: 0;
    accent-color: var(--accent);
}

.admin-wrap {
    width: 100%;
    max-width: 900px;
}

.admin-wrap h1 {
    margin-top: 0;
}

.admin-nav {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 20px;
}

.admin-nav a {
    padding: 8px 14px;
    background: var(--card);
    border-radius: 8px;
    text-decoration: none;
    color: var(--text);
    border: 1px solid rgba(0, 0, 0, 0.08);
}

.admin-nav a:hover {
    border-color: var(--accent);
}

table.admin-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.9rem;
    background: var(--card);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.06);
}

.admin-table th,
.admin-table td {
    padding: 10px 12px;
    text-align: left;
    border-bottom: 1px solid rgba(0, 0, 0, 0.06);
}

.admin-table th {
    background: rgba(0, 0, 0, 0.03);
    font-weight: 600;
}

.admin-table input[type="text"],
.admin-table input[type="number"] {
    width: 100%;
    max-width: 120px;
    padding: 6px 8px;
    border-radius: 6px;
    border: 1px solid rgba(0, 0, 0, 0.12);
}

/* —— Dicas por etapa (tutorial) —— entrada suave —— */
body.stebs-hint-open {
    overflow: hidden;
}

.stebs-step-hint[hidden] {
    display: none !important;
}

.stebs-step-hint.stebs-step-hint--open {
    position: fixed;
    inset: 0;
    z-index: 1000;
    display: flex !important;
    align-items: center;
    justify-content: center;
    padding: 16px;
    box-sizing: border-box;
}

.stebs-step-hint__backdrop {
    position: absolute;
    inset: 0;
    background: rgba(15, 18, 28, 0.34);
    backdrop-filter: blur(1px);
    opacity: 0;
    transition: opacity 0.65s ease-out;
}

.stebs-step-hint.stebs-step-hint--open.stebs-step-hint--visible .stebs-step-hint__backdrop {
    opacity: 1;
    backdrop-filter: blur(3px);
    transition: opacity 0.75s ease-out, backdrop-filter 0.85s ease-out;
}

.stebs-step-hint__dialog {
    position: relative;
    z-index: 1;
    width: 100%;
    max-width: 380px;
    opacity: 0;
    transform: translateY(18px) scale(0.96);
    transition:
        opacity 0.55s ease-out,
        transform 0.7s cubic-bezier(0.22, 1, 0.36, 1);
}

.stebs-step-hint.stebs-step-hint--open.stebs-step-hint--visible .stebs-step-hint__dialog {
    opacity: 1;
    transform: translateY(0) scale(1);
}

.stebs-step-hint__card {
    background: var(--card);
    border-radius: 16px;
    padding: 20px 18px 16px;
    box-shadow: 0 10px 36px rgba(0, 0, 0, 0.12);
    border: 1px solid rgba(0, 0, 0, 0.06);
}

.stebs-step-hint__text {
    margin: 0 0 16px;
    font-size: 0.98rem;
    line-height: 1.55;
    color: var(--text);
}

.stebs-step-hint__text br + br {
    line-height: 2.2;
}

.stebs-step-hint__btn {
    width: 100%;
    margin-top: 4px;
}

.stebs-ios-install-guide[hidden] {
    display: none !important;
}

.stebs-ios-install-guide {
    position: fixed;
    inset: 0;
    z-index: 1100;
}

.stebs-ios-install-guide__backdrop {
    position: absolute;
    inset: 0;
    background: rgba(15, 18, 28, 0.48);
}

.stebs-ios-install-guide__spot {
    position: absolute;
    top: max(12px, env(safe-area-inset-top, 0px));
    left: 50%;
    width: 56px;
    height: 56px;
    transform: translateX(-50%);
    border-radius: 50%;
    box-shadow:
        0 0 0 3px #ffffff,
        0 0 0 10px rgba(255, 255, 255, 0.28),
        0 0 0 9999px rgba(15, 18, 28, 0.48);
    pointer-events: none;
}

.stebs-ios-install-guide__card {
    position: absolute;
    left: 50%;
    bottom: calc(22px + env(safe-area-inset-bottom, 0px));
    transform: translateX(-50%);
    width: min(92vw, 380px);
    background: var(--card);
    border-radius: 14px;
    border: 1px solid rgba(0, 0, 0, 0.08);
    box-shadow: 0 14px 36px rgba(0, 0, 0, 0.2);
    padding: 16px;
}

.stebs-ios-install-guide__card h3 {
    margin: 0 0 8px;
    font-size: 1.08rem;
}

.stebs-ios-install-guide__card p {
    margin: 0 0 8px;
    font-size: 0.92rem;
    line-height: 1.45;
    color: var(--text);
}

.stebs-ios-install-guide__card .btn {
    margin-top: 10px;
}

/* —— Modal instalação PWA (fallback): tema StebsDoces, sem alert() do navegador —— */
.stebs-pwa-install-hint[hidden] {
    display: none !important;
}

.stebs-pwa-install-hint {
    position: fixed;
    inset: 0;
    z-index: 1150;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: max(12px, env(safe-area-inset-top)) max(12px, env(safe-area-inset-right))
        max(12px, env(safe-area-inset-bottom)) max(12px, env(safe-area-inset-left));
    box-sizing: border-box;
}

.stebs-pwa-install-hint__backdrop {
    position: absolute;
    inset: 0;
    background: rgba(42, 26, 18, 0.55);
    backdrop-filter: blur(3px);
}

.stebs-pwa-install-hint__dialog {
    position: relative;
    z-index: 1;
    width: min(92vw, 400px);
    max-height: min(85vh, 520px);
    overflow: auto;
    -webkit-overflow-scrolling: touch;
}

.stebs-pwa-install-hint__card {
    background: linear-gradient(165deg, #fffef9 0%, #faf5eb 48%, #f3ebe0 100%);
    border-radius: 16px;
    border: 1px solid rgba(184, 134, 11, 0.38);
    box-shadow:
        0 16px 48px rgba(44, 24, 16, 0.28),
        inset 0 1px 0 rgba(255, 248, 220, 0.45);
    padding: 0 18px 18px;
}

.stebs-pwa-install-hint__accent {
    height: 4px;
    border-radius: 16px 16px 0 0;
    margin: 0 -18px 14px;
    background: linear-gradient(90deg, #8b6914, #d4af37, #f0d78c, #d4af37, #8b6914);
}

.stebs-pwa-install-hint__title {
    margin: 0 0 12px;
    font-size: 1.12rem;
    font-weight: 800;
    color: var(--text);
    letter-spacing: -0.02em;
}

.stebs-pwa-install-hint__body p {
    margin: 0 0 10px;
    font-size: 0.92rem;
    line-height: 1.55;
    color: var(--muted);
}

.stebs-pwa-install-hint__body p:last-child {
    margin-bottom: 0;
}

.stebs-pwa-install-hint__body strong {
    color: var(--text);
    font-weight: 700;
}

.stebs-pwa-install-hint__ok {
    width: 100%;
    margin-top: 16px;
    padding: 12px 16px;
    background: linear-gradient(180deg, #e8c547 0%, #b8923e 55%, #9a7a32 100%);
    color: #1e130e;
    font-weight: 800;
    border: 2px solid rgba(245, 230, 200, 0.4);
    border-radius: 12px;
    box-shadow: 0 4px 14px rgba(44, 24, 16, 0.2);
}

.stebs-pwa-install-hint__ok:hover {
    filter: brightness(1.04);
}

@media (prefers-reduced-motion: reduce) {
    .stebs-pwa-install-hint__backdrop {
        backdrop-filter: none;
    }

    .stebs-step-hint__backdrop,
    .stebs-step-hint__dialog {
        transition: none !important;
    }

    .stebs-step-hint.stebs-step-hint--open .stebs-step-hint__backdrop,
    .stebs-step-hint.stebs-step-hint--open .stebs-step-hint__dialog {
        opacity: 1;
        transform: none;
        backdrop-filter: none;
    }

    .stebs-step-hint__backdrop {
        background: rgba(15, 18, 28, 0.38);
    }
}

/* —— Loja: telemóvel e ecrãs estreitos (layout em coluna, toques grandes) —— */
@media (max-width: 899px) {
    .site-main {
        align-items: stretch;
        padding: 12px max(10px, env(safe-area-inset-right, 0)) 28px max(10px, env(safe-area-inset-left, 0));
    }

    .site-order-wrap {
        align-items: stretch;
    }

    .site-order-wrap .container,
    .container.container--order {
        max-width: 100%;
        width: 100%;
        border-radius: 12px;
        padding: 16px 14px 20px;
        box-shadow: 0 2px 14px rgba(0, 0, 0, 0.06);
    }

    .site-prefooter-chat {
        max-width: 100%;
        padding-left: max(10px, env(safe-area-inset-left, 0));
        padding-right: max(10px, env(safe-area-inset-right, 0));
    }

    .site-prefooter-chat .support-floating-btn {
        max-width: 100%;
    }

    /* Passo 1: vendedores em 2 colunas com foto grande (mobile) */
    #step1 {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        column-gap: 12px;
        row-gap: 12px;
        align-items: stretch;
    }

    #step1 > h2 {
        grid-column: 1 / -1;
        font-size: 1.15rem;
        margin-bottom: 4px;
    }

    #step1 > .seller {
        margin-bottom: 0;
    }

    #step1 > #btnStep1,
    #step1 > #pwa-install-box {
        grid-column: 1 / -1;
    }

    .seller {
        flex-direction: column;
        align-items: center;
        text-align: center;
        padding: 12px 10px 14px;
        margin-bottom: 0;
        min-height: 0;
        height: 100%;
        background: #fff;
        border: 2px solid rgba(0, 0, 0, 0.08);
        box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
        -webkit-tap-highlight-color: transparent;
    }

    .seller img {
        width: 100%;
        max-width: none;
        height: auto;
        aspect-ratio: 3 / 4;
        margin-right: 0;
        margin-bottom: 10px;
        border-radius: 12px;
    }

    .seller__body {
        align-items: center;
        width: 100%;
    }

    .seller__name {
        font-size: 0.95rem;
    }

    .seller__meta {
        font-size: 0.78rem;
    }

    h2 {
        font-size: 1.15rem;
        margin-bottom: 12px;
    }

    .catalog-sticky-bar__inner {
        max-width: 100%;
    }

    .catalog-product {
        flex-wrap: wrap;
        align-items: flex-start;
        padding: 12px 6px;
    }

    .catalog-product-main {
        flex: 1 1 calc(100% - 64px);
    }

    .catalog-product-controls {
        flex: 1 1 100%;
        display: flex;
        justify-content: flex-end;
        padding-top: 4px;
    }

    .catalog-product-controls .controls {
        gap: 10px;
    }

    .controls button {
        width: 44px;
        height: 44px;
        min-width: 44px;
        font-size: 1.15rem;
        border-radius: 10px;
    }

    .coupon-row {
        flex-direction: column;
        align-items: stretch;
    }

    .coupon-row input,
    .coupon-row button {
        width: 100%;
        min-width: 0;
    }

    .coupon-row button {
        min-height: 44px;
    }

    .step3-actions {
        flex-direction: column;
    }

    .step3-actions .btn,
    .btn {
        min-height: 48px;
    }

    .total-line--final {
        flex-direction: column;
        align-items: flex-start;
        gap: 6px;
    }

    #summary {
        font-size: 0.95rem;
        line-height: 1.5;
    }
}

/* UA móvel em paisagem: não usar grelha de PC mesmo com ecrã largo */
@media (min-width: 900px) {
    body.stebs-device-mobile .site-main {
        align-items: stretch;
        padding: 12px max(14px, env(safe-area-inset-right, 0)) 32px max(14px, env(safe-area-inset-left, 0));
    }

    body.stebs-device-mobile .site-order-wrap .container,
    body.stebs-device-mobile .container.container--order {
        max-width: min(100%, 520px);
        margin-left: auto;
        margin-right: auto;
    }

    body.stebs-device-mobile #step1 {
        display: grid !important;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        column-gap: 12px;
        row-gap: 12px;
    }

    body.stebs-device-mobile #step1 > h2,
    body.stebs-device-mobile #step1 > #btnStep1,
    body.stebs-device-mobile #step1 > #pwa-install-box {
        grid-column: 1 / -1;
    }

    body.stebs-device-mobile #step1 > .seller {
        margin-bottom: 0;
    }

    body.stebs-device-mobile .seller img {
        aspect-ratio: 3 / 4;
        width: 100%;
        height: auto;
    }

    body.stebs-device-mobile .site-header--logged-in .site-header__inner {
        flex-direction: column;
        align-items: stretch;
        gap: 8px;
    }

    body.stebs-device-mobile .site-header--logged-in .site-auth {
        flex: 1 1 100%;
        width: 100%;
        justify-content: center;
    }
}

@media (min-width: 640px) and (max-width: 899px) {
    body.stebs-device-mobile .site-header--logged-in .site-header__inner {
        flex-direction: column;
        flex-wrap: wrap;
        align-items: stretch;
        gap: 8px;
    }

    body.stebs-device-mobile .site-header--logged-in .site-auth {
        flex: 1 1 100%;
        width: 100%;
        justify-content: center;
    }

    body.stebs-device-mobile .site-order-wrap .container,
    body.stebs-device-mobile .container.container--order {
        max-width: 100%;
        padding: 16px 14px 20px;
    }
}

/* —— Tablet / PC: fluxo de pedido mais espaçoso e alinhado —— */
@media (min-width: 640px) {
    body.stebs-device-desktop .site-header--logged-in .site-header__inner {
        flex-wrap: nowrap;
        flex-direction: row;
        padding-top: 10px;
        padding-bottom: 10px;
        gap: 14px;
        align-items: center;
    }

    body.stebs-device-desktop .site-header--logged-in .site-brand {
        flex: 1 1 auto;
        min-width: 0;
    }

    body.stebs-device-desktop .site-header--logged-in .site-auth {
        flex: 0 1 auto;
        width: auto;
        justify-content: flex-end;
        align-items: center;
    }

    body.stebs-device-desktop .site-header--logged-in .site-auth__tabs--pill {
        width: auto;
        justify-content: flex-end;
        gap: 8px;
    }

    body.stebs-device-desktop .site-brand__display-name {
        max-width: min(260px, 40vw);
    }

    body.stebs-device-desktop .container {
        max-width: min(100%, 680px);
        padding: 28px 32px;
    }

    body.stebs-device-desktop .site-main {
        padding: 28px 24px 52px;
    }

    h2 {
        font-size: 1.35rem;
        margin-bottom: 18px;
    }

    #summary {
        padding: 16px 18px;
        border-radius: 12px;
        background: rgba(0, 0, 0, 0.025);
        border: 1px solid rgba(0, 0, 0, 0.06);
        font-size: 1rem;
        line-height: 1.65;
    }

    body.stebs-device-desktop .step3-actions {
        flex-direction: row;
        align-items: stretch;
    }

    body.stebs-device-desktop .step3-actions .btn {
        flex: 1;
        margin-top: 0;
    }

    body.stebs-device-desktop .coupon-row button {
        flex-shrink: 0;
        min-width: 110px;
    }

    #step4 > div:first-of-type {
        font-size: 1.05rem;
        margin-bottom: 8px;
    }

    body.stebs-device-desktop .controls button {
        width: 36px;
        height: 36px;
        font-size: 1.05rem;
    }

    .catalog-product {
        padding: 12px 8px;
        font-size: 0.95rem;
    }

    .catalog-acc-body {
        padding: 4px 14px 14px;
    }
}

/* Reforço mobile após regras de tablet (640px+) */
@media (max-width: 899px) {
    .site-order-wrap .container,
    .container.container--order {
        max-width: 100%;
        width: 100%;
        padding: 16px 14px 20px;
    }

    .site-main {
        align-items: stretch;
    }

    .step3-actions {
        flex-direction: column;
    }

    .step3-actions .btn {
        flex: none;
        width: 100%;
    }

    .coupon-row {
        flex-direction: column;
    }

    .coupon-row button {
        min-width: 0;
        width: 100%;
    }

    .controls button {
        width: 44px;
        height: 44px;
        min-width: 44px;
    }
}

@media (min-width: 900px) {
    .container {
        max-width: min(100%, 880px);
        padding: 32px 40px;
    }

    .container--order {
        box-shadow: 0 12px 40px rgba(0, 0, 0, 0.07);
    }

    .site-header__inner {
        padding: 0 24px;
    }

    .site-main {
        padding: 36px 28px 64px;
    }

    /* Passo 1: grelha de vendedores em duas colunas (apenas desktop) */
    body.stebs-device-desktop #step1 {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        column-gap: 16px;
        row-gap: 12px;
        align-items: stretch;
    }

    body.stebs-device-desktop #step1 > h2 {
        grid-column: 1 / -1;
    }

    body.stebs-device-desktop #step1 > .seller {
        margin-bottom: 0;
    }

    body.stebs-device-desktop #step1 > #btnStep1 {
        grid-column: 1 / -1;
    }

    body.stebs-device-desktop #step1 > #pwa-install-box {
        grid-column: 1 / -1;
    }

    .seller {
        min-height: 72px;
        padding: 14px 16px;
    }

    .seller img {
        width: 56px;
    }

    .catalog-product-img {
        width: 60px;
        height: 60px;
    }

    .catalog-acc summary {
        padding: 14px 18px;
        font-size: 1.05rem;
    }

    .order-obs__textarea {
        min-height: 120px;
    }
}

@media (min-width: 1200px) {
    .container {
        max-width: min(100%, 960px);
    }
}

/* Loja — cartão + Fale com a gente (empilhados; site-main é flex em linha) */
.site-order-wrap {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 100%;
    min-width: 0;
}

/* Loja — Fale com a gente (fora do cartão do pedido, acima do rodapé) */
.site-prefooter-chat {
    width: 100%;
    max-width: 440px;
    margin: 0 auto;
    padding: 12px max(16px, env(safe-area-inset-right, 0)) 4px max(16px, env(safe-area-inset-left, 0));
    box-sizing: border-box;
    text-align: center;
}

.support-floating-btn {
    display: block;
    width: 100%;
    max-width: 320px;
    margin: 0 auto;
    padding: 10px 14px;
    font: inherit;
    font-size: 0.92rem;
    font-weight: 600;
    color: var(--accent);
    background: var(--accent-soft);
    border: 1px solid rgba(184, 134, 11, 0.28);
    border-radius: 12px;
    cursor: pointer;
    transition: background 0.15s, transform 0.12s;
}

.support-floating-btn:hover {
    background: #f5ecd8;
}

.support-floating-wrap {
    position: relative;
    display: inline-block;
    width: 100%;
    max-width: 320px;
    margin: 0 auto;
    vertical-align: top;
}

.support-unread-badge {
    position: absolute;
    top: -6px;
    right: -4px;
    min-width: 1.35rem;
    height: 1.35rem;
    padding: 0 6px;
    border-radius: 999px;
    background: #c62828;
    color: #fff;
    font-size: 0.68rem;
    font-weight: 800;
    line-height: 1.35rem;
    text-align: center;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.2);
    pointer-events: none;
}

.support-floating-btn--has-unread {
    border-color: rgba(198, 40, 40, 0.45);
    box-shadow: 0 0 0 2px rgba(198, 40, 40, 0.12);
}

.support-post-order {
    margin: 16px 0;
    text-align: center;
}

.support-post-order--tight {
    margin-top: 14px;
}

.support-post-order__btn {
    font-size: 0.92rem;
}

/* Modal contato */
.stebs-support-modal[hidden] {
    display: none !important;
}

.stebs-support-modal {
    position: fixed;
    inset: 0;
    z-index: 300;
    display: flex;
    align-items: flex-end;
    justify-content: center;
    padding: env(safe-area-inset-top, 0) env(safe-area-inset-right, 0) env(safe-area-inset-bottom, 0)
        env(safe-area-inset-left, 0);
}

@media (min-width: 520px) {
    .stebs-support-modal {
        align-items: center;
    }
}

.stebs-support-modal__backdrop {
    position: absolute;
    inset: 0;
    background: rgba(20, 14, 10, 0.45);
}

.stebs-support-modal__dialog {
    position: relative;
    width: 100%;
    max-width: 440px;
    max-height: min(92vh, 640px);
    overflow: auto;
    z-index: 1;
}

.stebs-support-modal__card {
    margin: 12px;
    padding: 18px 18px 16px;
    background: var(--card);
    border-radius: 16px;
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.18);
}

.stebs-support-modal__title {
    margin: 0 0 14px;
    font-size: 1.1rem;
    font-weight: 700;
}

.stebs-support-unread-banner {
    margin: -6px 0 14px;
    padding: 10px 12px;
    font-size: 0.88rem;
    line-height: 1.45;
    color: var(--text);
    background: rgba(184, 134, 11, 0.12);
    border: 1px solid rgba(184, 134, 11, 0.35);
    border-radius: 10px;
}

.stebs-support-unread-banner a {
    color: var(--accent);
    font-weight: 700;
}

.stebs-support-modal__label {
    display: block;
    font-size: 0.82rem;
    font-weight: 600;
    color: var(--muted);
    margin-bottom: 6px;
}

.stebs-support-modal__opt {
    font-weight: 500;
    color: var(--muted);
}

.stebs-support-modal__control {
    width: 100%;
    box-sizing: border-box;
    margin-bottom: 12px;
    padding: 10px 12px;
    font: inherit;
    border: 1px solid rgba(0, 0, 0, 0.14);
    border-radius: 10px;
    background: #fff;
}

.stebs-support-modal__textarea {
    min-height: 120px;
    resize: vertical;
}

.stebs-support-modal__actions {
    display: flex;
    gap: 10px;
    justify-content: flex-end;
    margin-top: 6px;
    flex-wrap: wrap;
}

.stebs-support-modal__ok {
    margin: 0 0 8px;
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--text);
}

.stebs-support-modal__oktext {
    margin: 0 0 16px;
    font-size: 0.92rem;
    line-height: 1.5;
    color: var(--muted);
}

.stebs-support-modal__success {
    text-align: center;
}

.stebs-support-modal__success .btn {
    width: 100%;
    max-width: 220px;
}

/* Página Mensagens (support.php) */
.support-lead {
    color: var(--muted);
    font-size: 0.92rem;
    margin: 0 0 18px;
}

.support-thread-list {
    list-style: none;
    margin: 0;
    padding: 0;
}

.support-thread-list li {
    margin-bottom: 10px;
}

.support-thread-list__a {
    display: block;
    padding: 14px 16px;
    border-radius: 12px;
    background: var(--card);
    border: 1px solid rgba(0, 0, 0, 0.08);
    text-decoration: none;
    color: inherit;
    transition: box-shadow 0.15s, border-color 0.15s;
}

.support-thread-list__a--unread {
    border-color: rgba(184, 134, 11, 0.45);
    box-shadow: 0 2px 12px rgba(184, 134, 11, 0.12);
}

.support-thread-list__head {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px 10px;
    margin-bottom: 4px;
}

.support-thread-list__head .support-thread-list__title {
    margin-bottom: 0;
}

.support-thread-list__title {
    display: block;
    font-weight: 700;
    margin-bottom: 4px;
}

.support-thread-list__meta {
    font-size: 0.72rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--muted);
    margin-right: 8px;
}

.support-thread-list__preview {
    display: block;
    font-size: 0.88rem;
    color: var(--muted);
    margin-top: 4px;
    line-height: 1.35;
}

.support-thread-list__time {
    display: block;
    font-size: 0.78rem;
    color: var(--muted);
    margin-top: 6px;
}

.support-back {
    margin: 0 0 12px;
}

.support-back a {
    color: var(--accent);
    font-weight: 600;
    text-decoration: none;
}

.support-thread-meta {
    font-size: 0.88rem;
    color: var(--muted);
    margin: 0 0 18px;
}

.support-status-pill {
    display: inline-block;
    padding: 2px 10px;
    border-radius: 999px;
    font-size: 0.78rem;
    font-weight: 600;
}

.support-status-pill--novo {
    background: rgba(220, 38, 38, 0.12);
    color: #b91c1c;
}

.support-status-pill--em_analise {
    background: rgba(234, 179, 8, 0.15);
    color: #a16207;
}

.stebs-dock-status {
    font-size: 0.78rem;
    font-weight: 600;
    margin-bottom: 10px;
    padding: 6px 10px;
    border-radius: 8px;
    background: rgba(15, 23, 42, 0.06);
    color: var(--muted, #64748b);
}

.support-status-pill--respondido {
    background: rgba(34, 197, 94, 0.12);
    color: #15803d;
}

.support-status-pill--resolvido {
    background: rgba(100, 116, 139, 0.16);
    color: #334155;
}

.support-chat {
    margin-bottom: 18px;
}

.support-bubble {
    margin-bottom: 12px;
    padding: 12px 14px;
    border-radius: 14px;
    max-width: 95%;
}

.support-bubble--user {
    margin-right: auto;
    background: rgba(0, 0, 0, 0.05);
    border-bottom-left-radius: 4px;
}

.support-bubble--staff {
    margin-left: auto;
    background: var(--accent-soft);
    border: 1px solid rgba(184, 134, 11, 0.22);
    border-bottom-right-radius: 4px;
}

.support-bubble__label {
    font-size: 0.72rem;
    font-weight: 600;
    color: var(--muted);
    margin-bottom: 6px;
}

.support-bubble__text {
    font-size: 0.92rem;
    line-height: 1.45;
    word-break: break-word;
}

.support-reply-form textarea {
    width: 100%;
    box-sizing: border-box;
    margin: 8px 0 12px;
    padding: 10px 12px;
    font: inherit;
    border-radius: 10px;
    border: 1px solid rgba(0, 0, 0, 0.14);
    min-height: 88px;
}

.support-form-msg {
    font-size: 0.88rem;
    color: var(--muted);
    min-height: 1.2em;
}

.support-msg-attachments {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 10px;
}

.support-msg-attachments:first-child {
    margin-top: 0;
}

.support-msg-attachments__link {
    display: block;
    border-radius: 10px;
    overflow: hidden;
    border: 1px solid rgba(0, 0, 0, 0.1);
    max-width: min(200px, 56vw);
}

.support-msg-attachments__img {
    display: block;
    width: 100%;
    height: auto;
    vertical-align: middle;
}

.support-reply-attach {
    margin: 10px 0 14px;
}

.support-reply-attach__label {
    display: block;
    font-size: 0.82rem;
    font-weight: 600;
    color: var(--muted);
    margin-bottom: 6px;
}

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

.support-reply-attach__actions .btn {
    padding: 7px 12px;
    font-size: 0.88rem;
}

.stebs-support-attach {
    margin-top: 12px;
}

.stebs-support-attach__actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 6px;
}

.stebs-support-attach-btn {
    padding: 8px 12px !important;
    font-size: 0.88rem !important;
}

.stebs-support-attach-preview {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 10px;
}

.stebs-support-attach-thumb {
    position: relative;
    width: 72px;
    height: 72px;
    border-radius: 10px;
    overflow: hidden;
    border: 1px solid rgba(0, 0, 0, 0.1);
    flex-shrink: 0;
}

.stebs-support-attach-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.stebs-support-attach-remove {
    position: absolute;
    top: 2px;
    right: 2px;
    width: 26px;
    height: 26px;
    padding: 0;
    border: none;
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.55);
    color: #fff;
    font-size: 1.1rem;
    line-height: 1;
    cursor: pointer;
}

/* —— SoftList (softlist.php) —— */
body.stebs-softlist-page {
    background: var(--bg);
}

body.stebs-softlist-page .site-main {
    padding: 12px max(10px, env(safe-area-inset-right, 0)) max(12px, env(safe-area-inset-bottom, 0))
        max(10px, env(safe-area-inset-left, 0));
    align-items: stretch;
    justify-content: center;
}

body.stebs-softlist-page .site-footer {
    display: none;
}

.softlist-app {
    --sl-top: #5c3d2e;
    --sl-top-dark: #3d281c;
    --sl-foot: #ebe4d6;
    --sl-foot-border: rgba(184, 134, 11, 0.28);
    --sl-fab: #c9922e;
    --sl-fab-shadow: rgba(139, 105, 20, 0.45);
    --sl-surface: #fffef9;
    width: 100%;
    max-width: 430px;
    margin: 0 auto;
    min-height: min(720px, calc(100dvh - var(--header-h) - 24px));
    display: flex;
    flex-direction: column;
    background: var(--sl-surface);
    border-radius: 20px;
    overflow: hidden;
    box-shadow:
        0 4px 24px rgba(44, 24, 16, 0.12),
        0 0 0 1px rgba(184, 134, 11, 0.15);
    position: relative;
}

@media (max-width: 480px) {
    .softlist-app {
        max-width: none;
        min-height: calc(100dvh - var(--header-h) - 8px);
        border-radius: 16px 16px 0 0;
    }
}

.softlist-topbar {
    display: flex;
    align-items: center;
    gap: 8px;
    min-height: 52px;
    padding: 8px 10px 8px 6px;
    background: linear-gradient(180deg, var(--sl-top) 0%, var(--sl-top-dark) 100%);
    color: #fffef8;
    flex-shrink: 0;
}

.softlist-topbar__menu,
.softlist-topbar__action {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    padding: 0;
    border: none;
    border-radius: 50%;
    background: transparent;
    color: inherit;
    cursor: pointer;
    flex-shrink: 0;
    -webkit-tap-highlight-color: transparent;
}

.softlist-topbar__menu:hover,
.softlist-topbar__action:hover {
    background: rgba(255, 255, 255, 0.12);
}

.softlist-topbar__menu svg,
.softlist-topbar__action svg {
    width: 24px;
    height: 24px;
    fill: currentColor;
}

.softlist-topbar__title-wrap {
    flex: 1;
    min-width: 0;
    display: flex;
    justify-content: center;
}

.softlist-topbar__title {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    max-width: 100%;
    padding: 8px 12px;
    border: none;
    border-radius: 8px;
    background: transparent;
    color: inherit;
    font: inherit;
    font-size: 1.05rem;
    font-weight: 600;
    letter-spacing: 0.01em;
    cursor: pointer;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.softlist-topbar__title:hover {
    background: rgba(255, 255, 255, 0.1);
}

.softlist-topbar__chevron {
    width: 14px;
    height: 14px;
    flex-shrink: 0;
    opacity: 0.9;
}

.softlist-topbar__actions {
    display: flex;
    align-items: center;
    flex-shrink: 0;
}

.softlist-body {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 32px 24px 88px;
    background: var(--sl-surface);
    position: relative;
    min-height: 280px;
}

.softlist-empty {
    text-align: center;
    max-width: 260px;
    position: relative;
}

.softlist-empty__arrow {
    position: absolute;
    top: -72px;
    right: -8px;
    width: 72px;
    height: 72px;
    color: var(--muted);
    opacity: 0.55;
    pointer-events: none;
}

.softlist-empty__text {
    margin: 0;
    font-family: Georgia, "Times New Roman", serif;
    font-style: italic;
    font-size: 1.15rem;
    line-height: 1.45;
    color: var(--muted);
}

.softlist-footer {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    flex-shrink: 0;
    background: var(--sl-foot);
    border-top: 1px solid var(--sl-foot-border);
}

.softlist-footer__cell {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 14px;
    min-height: 56px;
    text-decoration: none;
    color: var(--text);
    border: none;
    background: transparent;
    cursor: pointer;
    font: inherit;
    text-align: left;
    -webkit-tap-highlight-color: transparent;
}

.softlist-footer__cell:first-child {
    border-right: 1px solid var(--sl-foot-border);
}

.softlist-footer__cell:hover {
    background: rgba(184, 134, 11, 0.08);
}

.softlist-footer__cell--active {
    background: rgba(184, 134, 11, 0.12);
}

.softlist-footer__cell--active .softlist-footer__value {
    color: var(--accent);
}

.softlist-toast {
    flex-shrink: 0;
    margin: 0 12px 8px;
    padding: 10px 12px;
    border-radius: 10px;
    font-size: 0.84rem;
    font-weight: 600;
    line-height: 1.35;
    text-align: center;
}

.softlist-toast[hidden] {
    display: none !important;
}

.softlist-toast--ok {
    background: #e8f5e9;
    color: #2e6b3d;
}

.softlist-toast--err {
    background: #fde8e8;
    color: #8b2e2e;
}

.stebs-push-banner {
    flex-shrink: 0;
    margin: 0 12px 10px;
    padding: 12px 14px;
    border-radius: 12px;
    background: linear-gradient(135deg, #fff8e7 0%, #f5ecd4 100%);
    border: 1px solid rgba(184, 134, 11, 0.25);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
}

.stebs-push-banner[hidden] {
    display: none !important;
}

.stebs-push-banner__text {
    margin: 0 0 10px;
    font-size: 0.88rem;
    line-height: 1.4;
    color: var(--text);
}

.stebs-push-banner__actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.stebs-seller-toast-stack {
    position: fixed;
    top: 72px;
    right: 12px;
    z-index: 1200;
    display: flex;
    flex-direction: column;
    gap: 10px;
    max-width: min(360px, calc(100vw - 24px));
    pointer-events: none;
}

.stebs-seller-toast {
    pointer-events: auto;
    padding: 14px 36px 14px 14px;
    border-radius: 12px;
    background: #fff;
    border: 1px solid rgba(184, 134, 11, 0.35);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
    cursor: pointer;
    animation: stebsSellerToastIn 0.35s ease;
    position: relative;
}

.stebs-seller-toast--out {
    opacity: 0;
    transform: translateX(12px);
    transition: opacity 0.35s ease, transform 0.35s ease;
}

.stebs-seller-toast strong {
    display: block;
    font-size: 0.95rem;
    margin-bottom: 4px;
    color: var(--text);
}

.stebs-seller-toast span {
    display: block;
    font-size: 0.82rem;
    color: var(--muted);
    line-height: 1.35;
}

.stebs-seller-toast__close {
    position: absolute;
    top: 6px;
    right: 8px;
    border: none;
    background: transparent;
    font-size: 1.25rem;
    line-height: 1;
    cursor: pointer;
    color: var(--muted);
    padding: 4px;
}

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

.softlist-footer__icon {
    width: 28px;
    height: 28px;
    flex-shrink: 0;
    color: var(--text);
}

.softlist-footer__icon svg {
    width: 100%;
    height: 100%;
    fill: currentColor;
}

.softlist-footer__meta {
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 0;
}

.softlist-footer__label {
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--text);
}

.softlist-footer__value {
    font-size: 0.95rem;
    font-weight: 700;
    color: var(--accent);
}

.softlist-fab {
    position: fixed;
    right: max(18px, calc((100vw - min(430px, 100vw - 20px)) / 2 + 18px));
    bottom: calc(72px + env(safe-area-inset-bottom, 0px));
    width: 56px;
    height: 56px;
    border: none;
    border-radius: 50%;
    background: linear-gradient(165deg, #d4a23a 0%, var(--sl-fab) 50%, #8b6914 100%);
    color: #fffef8;
    box-shadow: 0 4px 14px var(--sl-fab-shadow);
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    z-index: 40;
    -webkit-tap-highlight-color: transparent;
    transition: transform 0.15s, box-shadow 0.15s;
}

@media (max-width: 480px) {
    .softlist-fab {
        right: max(16px, env(safe-area-inset-right, 0px) + 12px);
        bottom: calc(68px + env(safe-area-inset-bottom, 0px));
    }
}

.softlist-fab svg {
    width: 28px;
    height: 28px;
    fill: currentColor;
}

.softlist-fab:hover {
    transform: scale(1.04);
    box-shadow: 0 6px 18px var(--sl-fab-shadow);
}

.softlist-fab:active {
    transform: scale(0.96);
}

.softlist-body--seller {
    justify-content: flex-start;
    align-items: stretch;
    padding: 12px 0 96px;
    width: 100%;
}

.softlist-body--has-items {
    padding-top: 12px;
    padding-bottom: 96px;
}

.softlist-stock {
    flex-shrink: 0;
    width: 100%;
    margin-bottom: 8px;
    border-bottom: 1px solid rgba(184, 134, 11, 0.18);
    background: linear-gradient(180deg, #fffef9 0%, #faf5eb 100%);
}

.softlist-stock__toggle {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    width: 100%;
    padding: 12px 16px;
    border: none;
    background: transparent;
    font: inherit;
    text-align: left;
    cursor: pointer;
    color: var(--text);
    -webkit-tap-highlight-color: transparent;
}

.softlist-stock__toggle-main {
    display: flex;
    flex-direction: column;
    gap: 3px;
    min-width: 0;
}

.softlist-stock__title {
    font-size: 0.95rem;
    font-weight: 700;
    color: var(--text);
}

.softlist-stock__summary {
    font-size: 0.78rem;
    font-weight: 500;
    color: var(--muted);
}

.softlist-stock__chevron {
    width: 22px;
    height: 22px;
    flex-shrink: 0;
    fill: var(--muted);
    transition: transform 0.2s ease;
}

.softlist-stock--collapsed .softlist-stock__chevron {
    transform: rotate(-90deg);
}

.softlist-stock__body {
    padding: 0 12px 12px;
    max-height: min(42vh, 320px);
    overflow-y: auto;
}

.softlist-stock--collapsed .softlist-stock__body {
    display: none;
}

.softlist-stock__grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(148px, 1fr));
    gap: 10px;
}

.softlist-stock__cat {
    margin: 0;
    padding: 10px 10px 8px;
    border-radius: 10px;
    border: 1px solid rgba(184, 134, 11, 0.22);
    background: var(--sl-surface, #fffef9);
    box-shadow: 0 1px 4px rgba(92, 64, 8, 0.06);
}

.softlist-stock__cat-name {
    margin: 0 0 8px;
    font-size: 0.82rem;
    font-weight: 700;
    letter-spacing: 0.02em;
    text-transform: uppercase;
    color: var(--accent);
}

.softlist-stock__items {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.softlist-stock__item {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 8px;
    font-size: 0.82rem;
    line-height: 1.3;
}

.softlist-stock__item-name {
    flex: 1;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    color: var(--text);
}

.softlist-stock__item-qty {
    flex-shrink: 0;
    font-weight: 700;
    font-variant-numeric: tabular-nums;
    color: var(--accent);
}

.softlist-stock__item--low .softlist-stock__item-qty {
    color: #b45309;
}

.softlist-stock__item--zero .softlist-stock__item-qty {
    color: #b91c1c;
}

.softlist-stock__item--zero .softlist-stock__item-name {
    opacity: 0.75;
}

.softlist-stock__empty {
    margin: 0;
    padding: 8px 4px 4px;
    font-size: 0.88rem;
    color: var(--muted);
    text-align: center;
}

.softlist-stock__actions {
    padding: 12px 12px 4px;
}

.softlist-stock__share {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    padding: 12px 14px;
    border: none;
    border-radius: 12px;
    background: linear-gradient(165deg, #25d366 0%, #128c7e 100%);
    color: #fff;
    font: inherit;
    font-size: 0.9rem;
    font-weight: 700;
    cursor: pointer;
    box-shadow: 0 3px 12px rgba(18, 140, 126, 0.35);
    -webkit-tap-highlight-color: transparent;
    transition: transform 0.15s, opacity 0.15s, box-shadow 0.15s;
}

.softlist-stock__share svg {
    width: 20px;
    height: 20px;
    fill: currentColor;
    flex-shrink: 0;
}

.softlist-stock__share:hover:not(:disabled) {
    transform: translateY(-1px);
    box-shadow: 0 5px 16px rgba(18, 140, 126, 0.4);
}

.softlist-stock__share:active:not(:disabled) {
    transform: scale(0.98);
}

.softlist-stock__share:disabled {
    opacity: 0.45;
    cursor: not-allowed;
    box-shadow: none;
}

.softlist-empty[hidden] {
    display: none !important;
}

.softlist-list {
    list-style: none;
    margin: 0;
    padding: 0;
    width: 100%;
    max-height: 100%;
    overflow-y: auto;
}

.softlist-tabs {
    display: flex;
    flex-shrink: 0;
    border-bottom: 1px solid rgba(184, 134, 11, 0.2);
    background: #faf5eb;
}

.softlist-tabs__btn {
    flex: 1;
    padding: 10px 4px;
    border: none;
    background: transparent;
    font: inherit;
    font-size: 0.78rem;
    font-weight: 600;
    color: var(--muted);
    cursor: pointer;
    border-bottom: 3px solid transparent;
    line-height: 1.2;
}

.softlist-tabs__btn--active {
    color: var(--text);
    border-bottom-color: var(--accent);
    background: var(--sl-surface, #fffef9);
}

.softlist-tabs__badge {
    display: inline-block;
    min-width: 1.2em;
    margin-left: 4px;
    padding: 1px 6px;
    border-radius: 999px;
    font-size: 0.75rem;
    background: rgba(184, 134, 11, 0.2);
}

.softlist-panel {
    display: none;
    flex: 1;
    flex-direction: column;
    min-height: 0;
    overflow: hidden;
}

.softlist-panel--active {
    display: flex;
}

.softlist-panel-empty {
    padding: 32px 20px;
}

.softlist-list__item {
    display: flex;
    gap: 10px;
    align-items: center;
    padding: 12px 14px;
    border-bottom: 1px solid rgba(184, 134, 11, 0.15);
    background: #fffef9;
}

.softlist-list__item:first-child {
    border-top: 1px solid rgba(184, 134, 11, 0.12);
}

.softlist-list__main {
    flex: 1;
    min-width: 0;
}

.softlist-list__customer {
    display: flex;
    flex-direction: column;
    gap: 3px;
    font-weight: 700;
    font-size: 0.95rem;
    color: var(--text);
    line-height: 1.35;
}

.softlist-list__customer-name {
    display: block;
    font-weight: 700;
    font-size: 0.95rem;
    color: var(--text);
}

.softlist-list__dept {
    display: block;
    font-size: 0.82rem;
    font-weight: 600;
    color: var(--accent);
    line-height: 1.3;
}

.softlist-list__badges {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 4px;
    margin-top: 2px;
}

.softlist-badge-app,
.softlist-badge-code {
    display: inline-block;
    vertical-align: middle;
    margin-left: 4px;
    padding: 1px 6px;
    border-radius: 999px;
    font-size: 0.68rem;
    font-weight: 700;
    letter-spacing: 0.02em;
    text-transform: uppercase;
}

.softlist-badge-app {
    background: rgba(37, 99, 235, 0.14);
    color: #1d4ed8;
}

.softlist-badge-code {
    background: rgba(107, 93, 79, 0.12);
    color: var(--muted);
    text-transform: none;
    font-variant-numeric: tabular-nums;
}

.softlist-list__detail {
    font-size: 0.82rem;
    color: var(--muted);
    margin-top: 2px;
}

.softlist-list__reg-date {
    font-size: 0.78rem;
    color: var(--text, #2a1f3d);
    margin-top: 6px;
    font-variant-numeric: tabular-nums;
    line-height: 1.35;
}

.softlist-list__reg-date--badge {
    display: inline-flex;
    flex-wrap: wrap;
    align-items: baseline;
    gap: 4px;
    padding: 4px 10px;
    border-radius: 8px;
    background: rgba(139, 90, 43, 0.1);
    border: 1px solid rgba(139, 90, 43, 0.22);
}

.softlist-list__reg-date-label {
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    color: var(--muted);
}

.softlist-list__reg-date time {
    font-weight: 700;
    color: var(--accent, #8b5a2b);
}

.softlist-list__meta {
    text-align: right;
    flex-shrink: 0;
}

.softlist-list__total {
    font-weight: 700;
    color: var(--accent);
    font-size: 0.95rem;
}

.softlist-list__time {
    font-size: 0.75rem;
    color: var(--muted);
}

.softlist-list__actions {
    display: flex;
    gap: 4px;
    justify-content: flex-end;
    margin-top: 6px;
}

.softlist-list__edit,
.softlist-list__delete,
.softlist-list__close {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 4px;
    border: none;
    border-radius: 8px;
    background: transparent;
    color: var(--muted);
    cursor: pointer;
}

.softlist-list__edit svg,
.softlist-list__delete svg,
.softlist-list__close svg {
    width: 18px;
    height: 18px;
    fill: currentColor;
}

.softlist-list__edit:hover,
.softlist-list__edit:focus-visible {
    color: var(--accent);
    background: rgba(184, 134, 11, 0.1);
}

.softlist-list__delete:hover,
.softlist-list__delete:focus-visible {
    color: #b91c1c;
    background: rgba(185, 28, 28, 0.08);
}

.softlist-list__close:hover,
.softlist-list__close:focus-visible {
    color: #166534;
    background: rgba(22, 101, 52, 0.1);
}

.softlist-list__edit:disabled,
.softlist-list__delete:disabled,
.softlist-list__close:disabled {
    opacity: 0.45;
    cursor: wait;
}

.softlist-setup {
    padding: 20px;
    text-align: center;
    color: var(--muted);
    font-size: 0.9rem;
    line-height: 1.5;
}

.softlist-setup code {
    font-size: 0.82rem;
}

.softlist-modal {
    position: fixed;
    inset: 0;
    z-index: 500;
    display: flex;
    align-items: flex-end;
    justify-content: center;
    padding: 0;
    background: rgba(44, 24, 16, 0.45);
}

.softlist-modal[hidden] {
    display: none !important;
}

.softlist-modal__sheet {
    width: 100%;
    max-width: 430px;
    max-height: 92vh;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    background: var(--card);
    border-radius: 18px 18px 0 0;
    padding: 0;
    box-shadow: 0 -8px 32px rgba(44, 24, 16, 0.2);
}

.softlist-form--modal {
    display: flex;
    flex-direction: column;
    flex: 1;
    min-height: 0;
}

.softlist-form__scroll {
    flex: 1;
    min-height: 0;
    overflow-y: auto;
    padding: 18px 16px 12px;
    -webkit-overflow-scrolling: touch;
}

.softlist-modal__title {
    margin: 0 0 14px;
    font-size: 1.15rem;
    font-weight: 700;
    color: var(--text);
}

.softlist-form label {
    display: block;
    margin-bottom: 12px;
    font-size: 0.82rem;
    font-weight: 600;
    color: var(--muted);
}

.softlist-form label span {
    display: block;
    margin-bottom: 4px;
}

.softlist-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;
}

.softlist-form__hint {
    display: block;
    margin-top: 6px;
    font-size: 0.75rem;
    color: var(--muted);
    line-height: 1.35;
}

.softlist-customer-search {
    position: relative;
    z-index: 5;
}

.softlist-customer-suggestions {
    position: absolute;
    z-index: 30;
    left: 0;
    right: 0;
    top: calc(100% + 4px);
    margin: 0;
    padding: 4px 0;
    list-style: none;
    max-height: 220px;
    overflow-y: auto;
    background: #fffef9;
    border: 1px solid rgba(184, 134, 11, 0.28);
    border-radius: 10px;
    box-shadow: 0 10px 28px rgba(42, 26, 18, 0.12);
}

.softlist-customer-suggestions[hidden] {
    display: none !important;
}

.softlist-customer-suggestions__item {
    padding: 8px 10px;
    cursor: pointer;
    border-bottom: 1px solid rgba(184, 134, 11, 0.1);
}

.softlist-customer-suggestions__row {
    display: flex;
    align-items: center;
    gap: 10px;
}

.softlist-customer-suggestions__body {
    min-width: 0;
    flex: 1;
}

.softlist-customer-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    object-fit: cover;
    flex-shrink: 0;
    background: rgba(184, 134, 11, 0.12);
}

.softlist-customer-avatar--initial {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 0.95rem;
    color: #5c3d2e;
}

.softlist-customer-avatar--linked {
    width: 44px;
    height: 44px;
}

.softlist-customer-avatar--list {
    width: 32px;
    height: 32px;
    font-size: 0.8rem;
}

.softlist-customer-suggestions__item:last-child {
    border-bottom: none;
}

.softlist-customer-suggestions__item:hover,
.softlist-customer-suggestions__item:focus {
    background: rgba(184, 134, 11, 0.08);
}

.softlist-customer-suggestions__name {
    display: block;
    font-weight: 600;
    font-size: 0.9rem;
    color: var(--text);
}

.softlist-customer-suggestions__meta {
    display: block;
    margin-top: 2px;
    font-size: 0.75rem;
    color: var(--muted);
}

.softlist-customer-linked {
    margin: 8px 0 0;
    padding: 10px 12px;
    border-radius: 10px;
    background: rgba(184, 134, 11, 0.1);
    color: #5c3d2e;
    font-size: 0.78rem;
    line-height: 1.35;
}

.softlist-customer-linked__row {
    display: flex;
    align-items: center;
    gap: 10px;
}

.softlist-customer-linked__text {
    min-width: 0;
    flex: 1;
}

.softlist-customer-linked__name {
    display: block;
    font-size: 0.88rem;
    color: var(--text);
}

.softlist-customer-linked__meta {
    display: block;
    margin-top: 2px;
    font-size: 0.75rem;
    color: var(--muted);
}

.softlist-customer-linked__badge {
    display: block;
    margin-top: 4px;
    font-size: 0.72rem;
    color: #5c3d2e;
}

.softlist-list__customer-row {
    display: flex;
    align-items: center;
    gap: 8px;
}

.softlist-list__customer-text {
    min-width: 0;
    flex: 1;
}

.softlist-customer-linked[hidden] {
    display: none !important;
}

.softlist-form input,
.softlist-form select {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid rgba(184, 134, 11, 0.35);
    border-radius: 10px;
    font: inherit;
    font-size: 1rem;
    background: #fffef9;
    color: var(--text);
}

.softlist-form__price-hint {
    font-size: 0.85rem;
    color: var(--accent);
    font-weight: 600;
    margin: -4px 0 12px;
}

.softlist-form__actions {
    display: flex;
    gap: 10px;
    margin-top: 8px;
}

.softlist-form__actions--sticky {
    flex-shrink: 0;
    margin-top: 0;
    padding: 12px 16px max(16px, env(safe-area-inset-bottom));
    background: var(--card);
    border-top: 1px solid rgba(184, 134, 11, 0.2);
    box-shadow: 0 -6px 20px rgba(44, 24, 16, 0.08);
    z-index: 3;
}

.softlist-form__actions .btn {
    flex: 1;
}

.softlist-form__actions .btn--ghost {
    background: transparent;
    border: 1px solid rgba(107, 93, 79, 0.35);
    color: var(--muted);
}

.softlist-cart {
    margin-bottom: 4px;
    padding: 10px 12px;
    border-radius: 12px;
    border: 1px solid rgba(184, 134, 11, 0.22);
    background: rgba(255, 254, 249, 0.9);
}

.softlist-cart__head {
    margin-bottom: 8px;
}

.softlist-cart__title {
    font-size: 0.82rem;
    font-weight: 700;
    color: var(--text);
}

.softlist-cart__empty {
    margin: 0;
    font-size: 0.82rem;
    color: var(--muted);
}

.softlist-cart__empty[hidden],
.softlist-cart__list[hidden] {
    display: none !important;
}

.softlist-cart__list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.softlist-cart__item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 10px;
    border-radius: 10px;
    background: var(--card);
    border: 1px solid rgba(184, 134, 11, 0.15);
}

.softlist-cart__item-main {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.softlist-cart__item-name {
    font-size: 0.88rem;
    font-weight: 600;
    color: var(--text);
}

.softlist-cart__item-meta {
    font-size: 0.78rem;
    color: var(--muted);
}

.softlist-cart__item-added {
    display: block;
    margin-top: 4px;
    font-size: 0.72rem;
    font-weight: 600;
    color: var(--accent, #8b5a2b);
    font-variant-numeric: tabular-nums;
}

.softlist-cart__remove {
    flex-shrink: 0;
    width: 32px;
    height: 32px;
    border: none;
    border-radius: 8px;
    background: rgba(185, 28, 28, 0.08);
    color: #b91c1c;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.softlist-cart__remove svg {
    width: 18px;
    height: 18px;
    fill: currentColor;
}

.softlist-picker {
    margin: 0 0 12px;
    padding: 12px 12px 10px;
    border: 1px dashed rgba(184, 134, 11, 0.35);
    border-radius: 12px;
    background: rgba(250, 245, 235, 0.55);
}

.softlist-picker__legend {
    padding: 0 6px;
    font-size: 0.82rem;
    font-weight: 700;
    color: var(--muted);
}

.softlist-picker__add {
    width: 100%;
    margin-top: 4px;
}

.softlist-list__preview {
    list-style: none;
    margin: 6px 0 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.softlist-list__preview li {
    font-size: 0.8rem;
    line-height: 1.35;
    color: var(--text, #2a1f3d);
}

.softlist-list__preview-item {
    font-weight: 600;
}

.softlist-list__preview-when {
    display: block;
    font-size: 0.7rem;
    font-weight: 500;
    color: var(--muted);
    font-variant-numeric: tabular-nums;
}

.softlist-list__preview-empty {
    font-size: 0.8rem;
    color: var(--muted);
}

.softlist-list__lines {
    list-style: none;
    margin: 4px 0 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 3px;
}

.softlist-list__lines li {
    font-size: 0.82rem;
    line-height: 1.35;
    color: var(--muted);
}

.softlist-flash {
    margin: 0 0 10px;
    padding: 10px 12px;
    border-radius: 10px;
    font-size: 0.88rem;
}

.softlist-flash--err {
    background: #fde8e8;
    color: #8b2e2e;
}

.softlist-flash--ok {
    background: #e8f5e9;
    color: #2e6b3d;
}

.softlist-pay-check {
    display: flex;
    align-items: center;
    flex-shrink: 0;
    cursor: pointer;
    margin: 0;
}

.softlist-pay-check__input {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
}

.softlist-pay-check__box {
    display: block;
    width: 28px;
    height: 28px;
    border: 2px solid rgba(184, 134, 11, 0.55);
    border-radius: 8px;
    background: #fffef9;
    position: relative;
}

.softlist-pay-check__input:focus-visible + .softlist-pay-check__box {
    outline: 2px solid var(--accent);
    outline-offset: 2px;
}

.softlist-pay-check__input:checked + .softlist-pay-check__box {
    background: linear-gradient(165deg, #d4a23a 0%, #c9922e 50%, #8b6914 100%);
    border-color: #8b6914;
}

.softlist-pay-check__input:checked + .softlist-pay-check__box::after {
    content: '';
    position: absolute;
    left: 9px;
    top: 4px;
    width: 6px;
    height: 12px;
    border: solid #fffef8;
    border-width: 0 3px 3px 0;
    transform: rotate(45deg);
}

.softlist-paid-icon {
    flex-shrink: 0;
    width: 28px;
    height: 28px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: #e8f0e4;
    color: #2e6b3d;
    font-weight: 700;
    font-size: 1rem;
}

/* Bolha flutuante — mensagens do admin */
.stebs-admin-msg-float[hidden] {
    display: none !important;
}

.stebs-admin-msg-float {
    position: fixed;
    right: max(16px, env(safe-area-inset-right, 0px));
    bottom: max(20px, env(safe-area-inset-bottom, 0px));
    z-index: 340;
    width: 72px;
    height: 72px;
    padding: 0;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    background: linear-gradient(145deg, #c9a227 0%, #a67c00 100%);
    color: #fff;
    box-shadow: 0 4px 18px rgba(0, 0, 0, 0.22);
    transition: transform 0.15s ease, box-shadow 0.15s ease;
}

body.stebs-softlist-page .stebs-admin-msg-float {
    bottom: calc(88px + env(safe-area-inset-bottom, 0px));
}

.stebs-admin-msg-float:hover {
    transform: scale(1.05);
    box-shadow: 0 6px 22px rgba(0, 0, 0, 0.28);
}

.stebs-admin-msg-float--active {
    animation: stebs-admin-msg-float-pulse 2.2s ease-in-out infinite;
}

@keyframes stebs-admin-msg-float-pulse {
    0%,
    100% {
        box-shadow: 0 4px 18px rgba(0, 0, 0, 0.22);
    }
    50% {
        box-shadow: 0 4px 18px rgba(0, 0, 0, 0.22), 0 0 0 6px rgba(201, 162, 39, 0.35);
    }
}

.stebs-admin-msg-float__icon {
    font-size: 1.85rem;
    line-height: 1;
}

.stebs-admin-msg-float__badge {
    position: absolute;
    top: 0;
    right: 0;
    min-width: 1.5rem;
    height: 1.5rem;
    padding: 0 6px;
    border-radius: 999px;
    background: #c62828;
    color: #fff;
    font-size: 0.78rem;
    font-weight: 800;
    line-height: 1.5rem;
    text-align: center;
    border: 2px solid #fff;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.2);
}

.stebs-admin-msg-float__badge[hidden] {
    display: none !important;
}

/* Modal mensagem do admin (cliente) */
.stebs-admin-msg-modal[hidden] {
    display: none !important;
}

.stebs-admin-msg-modal {
    position: fixed;
    inset: 0;
    z-index: 350;
    display: flex;
    align-items: flex-end;
    justify-content: center;
    padding: env(safe-area-inset-top, 0) env(safe-area-inset-right, 0) env(safe-area-inset-bottom, 0)
        env(safe-area-inset-left, 0);
}

@media (min-width: 520px) {
    .stebs-admin-msg-modal {
        align-items: center;
    }
}

.stebs-admin-msg-modal__backdrop {
    position: absolute;
    inset: 0;
    background: rgba(28, 18, 12, 0.55);
    backdrop-filter: blur(3px);
}

.stebs-admin-msg-modal__dialog {
    position: relative;
    width: 100%;
    max-width: min(540px, calc(100vw - 20px));
    max-height: min(92vh, 720px);
    overflow: auto;
    z-index: 1;
}

.stebs-admin-msg-modal__card {
    position: relative;
    display: flex;
    flex-direction: column;
    margin: 10px;
    min-height: min(320px, 58vh);
    overflow: hidden;
    background: var(--card);
    border-radius: 22px;
    box-shadow:
        0 20px 50px rgba(44, 24, 16, 0.22),
        0 0 0 1px rgba(184, 134, 11, 0.12);
}

.stebs-admin-msg-modal__head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 16px 18px 14px;
    background: linear-gradient(135deg, #faf5eb 0%, #f3e8d4 55%, #ebe0c8 100%);
    border-bottom: 1px solid rgba(184, 134, 11, 0.2);
}

.stebs-admin-msg-modal__brand {
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 0;
}

.stebs-admin-msg-modal__brand-icon {
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    font-size: 1.25rem;
    line-height: 1;
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(184, 134, 11, 0.2);
}

.stebs-admin-msg-modal__brand-text {
    font-size: 0.8rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: #8b6914;
}

.stebs-admin-msg-modal__close {
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    padding: 0;
    border: none;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.65);
    color: #6b5d4f;
    font-size: 1.5rem;
    line-height: 1;
    cursor: pointer;
    transition: background 0.15s, color 0.15s, transform 0.12s;
}

.stebs-admin-msg-modal__close:hover {
    background: #fff;
    color: var(--text);
    transform: scale(1.04);
}

.stebs-admin-msg-modal__content {
    flex: 1;
    display: flex;
    flex-direction: column;
    padding: 20px 22px 0;
    min-height: 0;
}

.stebs-admin-msg-modal__title {
    margin: 0 0 6px;
    font-size: 1.32rem;
    font-weight: 800;
    line-height: 1.3;
    letter-spacing: -0.02em;
    color: var(--text);
}

.stebs-admin-msg-modal__date {
    margin: 0;
    font-size: 0.84rem;
    font-weight: 500;
    color: var(--muted);
    letter-spacing: 0.01em;
}

.stebs-admin-msg-modal__date[hidden] {
    display: none;
}

.stebs-admin-msg-modal__divider {
    height: 1px;
    margin: 16px 0;
    background: linear-gradient(
        90deg,
        transparent 0%,
        rgba(184, 134, 11, 0.35) 20%,
        rgba(184, 134, 11, 0.35) 80%,
        transparent 100%
    );
}

.stebs-admin-msg-modal__body {
    flex: 1;
    margin: 0;
    padding: 16px 18px;
    max-height: min(40vh, 340px);
    overflow-y: auto;
    overflow-x: hidden;
    font-size: 1.02rem;
    line-height: 1.65;
    color: var(--text);
    word-break: break-word;
    background: linear-gradient(180deg, #fffef9 0%, #faf8f2 100%);
    border: 1px solid rgba(184, 134, 11, 0.14);
    border-radius: 14px;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.9);
}

.stebs-admin-msg-modal__body::-webkit-scrollbar {
    width: 6px;
}

.stebs-admin-msg-modal__body::-webkit-scrollbar-thumb {
    background: rgba(184, 134, 11, 0.35);
    border-radius: 999px;
}

.stebs-admin-msg-modal__para {
    margin: 0 0 0.9em;
}

.stebs-admin-msg-modal__para:last-child {
    margin-bottom: 0;
}

.stebs-admin-msg-modal__para--empty {
    color: var(--muted);
    font-style: italic;
}

.stebs-admin-msg-modal__counter {
    margin: 0;
    padding: 10px 22px 0;
    font-size: 0.88rem;
    font-weight: 600;
    text-align: center;
    color: var(--muted);
}

.stebs-admin-msg-modal__counter[hidden] {
    display: none;
}

.stebs-admin-msg-modal__foot {
    padding: 18px 22px 22px;
    margin-top: auto;
    border-top: 1px solid rgba(184, 134, 11, 0.12);
    background: linear-gradient(180deg, transparent 0%, rgba(250, 245, 235, 0.5) 100%);
}

.stebs-admin-msg-modal__btn {
    display: block;
    width: 100%;
    padding: 15px 20px;
    font: inherit;
    font-size: 1.05rem;
    font-weight: 700;
    letter-spacing: 0.02em;
    color: #fff;
    cursor: pointer;
    border: none;
    border-radius: 14px;
    background: linear-gradient(145deg, #c9a227 0%, #a67c00 48%, #8f6b00 100%);
    box-shadow:
        0 4px 14px rgba(166, 124, 0, 0.35),
        inset 0 1px 0 rgba(255, 255, 255, 0.25);
    transition: transform 0.12s ease, box-shadow 0.15s ease, filter 0.15s ease;
}

.stebs-admin-msg-modal__btn:hover {
    filter: brightness(1.05);
    box-shadow:
        0 6px 18px rgba(166, 124, 0, 0.4),
        inset 0 1px 0 rgba(255, 255, 255, 0.3);
}

.stebs-admin-msg-modal__btn:active {
    transform: scale(0.98);
}
