/* =========================================================
   Auth pages (static SSR, no MudBlazor)
   ========================================================= */
:root {
    --auth-brand: #4f46e5;
    --auth-brand-dark: #3730a3;
    --auth-brand-2: #7c3aed;
    --auth-text: #0f172a;
    --auth-muted: #64748b;
    --auth-border: #e2e8f0;
    --auth-bg: #f8fafc;
    --auth-danger: #b91c1c;
}

.auth-page {
    min-height: 100vh;
    display: grid;
    grid-template-columns: 1fr;
    font-family: Inter, Roboto, system-ui, sans-serif;
    color: var(--auth-text);
    background: var(--auth-bg);
}

@media (min-width: 960px) {
    .auth-page { grid-template-columns: minmax(420px, 1fr) minmax(480px, 1fr); }
}

/* Brand side */
.auth-brand {
    display: none;
    position: relative;
    overflow: hidden;
    color: #fff;
    background:
        radial-gradient(circle at 15% 20%, rgba(255, 255, 255, .14), transparent 40%),
        radial-gradient(circle at 85% 80%, rgba(124, 58, 237, .55), transparent 45%),
        linear-gradient(150deg, var(--auth-brand) 0%, var(--auth-brand-dark) 100%);
}

@media (min-width: 960px) {
    .auth-brand { display: flex; }
}

.auth-brand::after {
    content: "";
    position: absolute;
    inset: 0;
    background-image: radial-gradient(rgba(255, 255, 255, .12) 1px, transparent 1px);
    background-size: 22px 22px;
    mask-image: linear-gradient(180deg, transparent, #000 60%);
    pointer-events: none;
}

.auth-brand-inner {
    position: relative;
    z-index: 1;
    display: flex;
    flex-direction: column;
    gap: 36px;
    padding: 48px 56px;
    max-width: 560px;
    margin: auto;
}

.auth-logo { font-size: 1.35rem; text-decoration: none; color: inherit; letter-spacing: -.01em; }
.auth-logo strong { font-weight: 800; }
.auth-brand .auth-logo strong { color: #c7d2fe; }

.auth-brand-copy h2 { font-size: 2.1rem; line-height: 1.15; margin: 0 0 12px; letter-spacing: -.02em; }
.auth-brand-copy p { margin: 0; font-size: 1.05rem; color: rgba(255, 255, 255, .82); line-height: 1.6; }

.auth-features { list-style: none; padding: 0; margin: 0; display: grid; gap: 12px; }
.auth-features li { display: flex; align-items: center; gap: 12px; font-weight: 500; }
.auth-feature-icon {
    width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; flex: none;
    background: rgba(255, 255, 255, .18); font-size: .8rem;
}

.auth-preview {
    background: rgba(255, 255, 255, .1);
    border: 1px solid rgba(255, 255, 255, .2);
    border-radius: 16px;
    padding: 8px 18px;
    backdrop-filter: blur(6px);
    box-shadow: 0 20px 40px rgba(15, 23, 42, .25);
}

.auth-preview-row { display: flex; justify-content: space-between; align-items: center; padding: 12px 0; font-size: .95rem; }
.auth-preview-row + .auth-preview-row { border-top: 1px solid rgba(255, 255, 255, .15); }
.pill { font-size: .75rem; font-weight: 600; padding: 3px 10px; border-radius: 999px; }
.pill-success { background: #dcfce7; color: #166534; }
.pill-warning { background: #fef3c7; color: #92400e; }

/* Form side */
.auth-panel {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 24px;
    padding: 32px 16px;
}

.auth-card {
    width: 100%;
    max-width: 420px;
    background: #fff;
    border: 1px solid var(--auth-border);
    border-radius: 18px;
    padding: 36px 32px;
    box-shadow: 0 1px 2px rgba(15, 23, 42, .04), 0 12px 32px rgba(15, 23, 42, .06);
}

.auth-logo-mobile { display: inline-block; margin-bottom: 20px; color: var(--auth-text); }
.auth-logo-mobile strong { color: var(--auth-brand); }
@media (min-width: 960px) { .auth-logo-mobile { display: none; } }

.auth-card h1 { margin: 0 0 6px; font-size: 1.6rem; letter-spacing: -.02em; }
.auth-subtitle { margin: 0 0 24px; color: var(--auth-muted); line-height: 1.5; }

.auth-alert {
    display: flex; gap: 10px; align-items: flex-start;
    background: #fef2f2; color: var(--auth-danger); border: 1px solid #fecaca;
    padding: 12px 14px; border-radius: 10px; margin-bottom: 18px; font-weight: 500;
}
.auth-alert svg { flex: none; margin-top: 1px; }

.auth-form { display: grid; gap: 18px; }
.auth-field { display: grid; gap: 6px; }
.auth-field label { font-weight: 600; font-size: .9rem; }

.auth-field input {
    font: inherit;
    width: 100%;
    padding: 12px 14px;
    border: 1px solid #cbd5e1;
    border-radius: 10px;
    background: #fff;
    color: var(--auth-text);
    transition: border-color .15s, box-shadow .15s;
}
.auth-field input::placeholder { color: #94a3b8; }
.auth-field input:focus { outline: none; border-color: var(--auth-brand); box-shadow: 0 0 0 4px rgba(79, 70, 229, .15); }

.auth-password { position: relative; }
.auth-password input { padding-right: 84px; }
.auth-toggle {
    position: absolute; right: 6px; top: 50%; transform: translateY(-50%);
    border: 0; background: transparent; color: var(--auth-brand); font: inherit; font-size: .85rem; font-weight: 600;
    padding: 6px 10px; border-radius: 8px; cursor: pointer;
}
.auth-toggle:hover { background: rgba(79, 70, 229, .08); }

.auth-check { display: flex; align-items: center; gap: 10px; font-size: .92rem; color: #334155; cursor: pointer; }
.auth-check input { width: 18px; height: 18px; accent-color: var(--auth-brand); }

.auth-submit {
    font: inherit; font-weight: 700; font-size: 1rem;
    padding: 13px; border: 0; border-radius: 10px; cursor: pointer; color: #fff;
    background: linear-gradient(135deg, var(--auth-brand), var(--auth-brand-2));
    box-shadow: 0 8px 20px rgba(79, 70, 229, .3);
    transition: transform .1s, box-shadow .15s, opacity .15s;
}
.auth-submit:hover { box-shadow: 0 10px 24px rgba(79, 70, 229, .4); }
.auth-submit:active { transform: translateY(1px); }
.auth-submit.is-loading { opacity: .75; cursor: progress; }

.auth-footer-text { margin: 22px 0 0; text-align: center; color: var(--auth-muted); font-size: .92rem; }
.auth-footer-text a { color: var(--auth-brand); font-weight: 600; text-decoration: none; }
.auth-footer-text a:hover { text-decoration: underline; }

.auth-legal { margin: 0; color: #94a3b8; font-size: .8rem; }
.auth-legal a { color: inherit; }
.auth-terms { display: flex; gap: 10px; align-items: flex-start; margin: 4px 0 14px; font-size: .85rem; line-height: 1.45; color: #475569; }
.auth-terms input { width: 18px; height: 18px; margin: 2px 0 0; flex: none; }
.auth-terms a { color: inherit; text-decoration: underline; }

/* =========================================================
   Painel (MudBlazor) helpers
   ========================================================= */

.file-button { display: inline-flex; align-items: center; gap: 6px; padding: 6px 14px; border: 1px solid #4f46e5; color: #4f46e5; border-radius: 6px; cursor: pointer; font-weight: 500; font-size: .875rem; text-transform: uppercase; }
.file-button input[type=file] { display: none; }
.file-button:hover { background: rgba(79, 70, 229, .06); }

/* Shell */
.drawer-brand { padding: 20px 20px 12px; }
.drawer-brand .logo { font-size: 1.15rem; color: #0f172a; text-decoration: none; letter-spacing: -.01em; }
.drawer-brand .logo strong { color: #4f46e5; font-weight: 800; }
.drawer-store { margin: 12px 12px 4px; padding: 12px; border-radius: 12px; background: #f1f5f9; display: flex; gap: 10px; align-items: center; }
.drawer-store .initial { width: 36px; height: 36px; border-radius: 10px; background: linear-gradient(135deg, #4f46e5, #7c3aed); color: #fff; display: grid; place-items: center; font-weight: 700; flex: none; }
.drawer-store .name { font-weight: 600; font-size: .92rem; color: #0f172a; line-height: 1.2; }
.drawer-store .slug { font-size: .78rem; color: #64748b; }
.appbar-border { border-bottom: 1px solid #e2e8f0; }
.user-menu-header { padding: 12px 16px; border-bottom: 1px solid #e2e8f0; min-width: 220px; }
.user-menu-header .name { font-weight: 600; }
.user-menu-header .email { font-size: .82rem; color: #64748b; }
.logout-form button { all: unset; display: flex; align-items: center; gap: 12px; width: 100%; padding: 10px 16px; cursor: pointer; color: #b91c1c; font-size: .92rem; box-sizing: border-box; }
.logout-form button:hover { background: #fef2f2; }

.avatar-button { all: unset; cursor: pointer; border-radius: 50%; display: inline-flex; }
.avatar-button:focus-visible { outline: 3px solid rgba(99, 102, 241, .5); outline-offset: 2px; }

/* ---------- Payment methods (checkout) ---------- */
.pay-method {
    display: flex; align-items: flex-start; gap: 12px; padding: 14px 12px; margin-top: 10px;
    border: 1px solid var(--mud-palette-lines-default); border-radius: 12px; background: #fff; transition: border-color .15s, background .15s;
}
.pay-method.enabled { border-color: color-mix(in srgb, var(--mud-palette-primary) 40%, transparent); background: color-mix(in srgb, var(--mud-palette-primary) 3%, #fff); }
.pay-method-order { display: grid; margin-top: -4px; }
.pay-method-icon { margin-top: 4px; color: var(--mud-palette-primary); }
.pay-method-main { flex: 1; min-width: 0; }
.pay-method-fields { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 10px; margin-top: 10px; }
.pay-method-fields .wide { grid-column: 1 / -1; }
@media (max-width: 600px) { .pay-method { flex-wrap: wrap; } .pay-method-order { display: flex; } }

/* ---------- Installable app (PWA) ---------- */
.install-banner {
    position: fixed; z-index: 1600; left: 10px; right: 10px; bottom: calc(10px + env(safe-area-inset-bottom));
    display: grid; grid-template-columns: 44px 1fr auto auto; align-items: center; gap: 10px; padding: 10px 8px 10px 12px;
    background: #fff; color: #0f172a; border-radius: 16px; font-family: Inter, system-ui, sans-serif;
    box-shadow: 0 14px 34px -10px rgba(15, 23, 42, .4), 0 0 0 1px rgba(15, 23, 42, .08);
}
.install-banner[hidden] { display: none; }
.install-banner img { width: 44px; height: 44px; border-radius: 11px; }
.install-text { display: grid; gap: 2px; font-size: .82rem; line-height: 1.3; min-width: 0; }
.install-text strong { font-size: .9rem; }
.install-text span { color: #475569; }
.install-button { border: 0; border-radius: 999px; padding: 9px 16px; font: inherit; font-weight: 700; font-size: .85rem; color: #fff;
    background: linear-gradient(135deg, #4f46e5, #7c3aed); cursor: pointer; }
.install-button[hidden] { display: none; }
.install-close { border: 0; background: transparent; font-size: 1.5rem; line-height: 1; color: #64748b; width: 36px; height: 36px; cursor: pointer; border-radius: 50%; }
/* Inside the installed app: keep the app bar below the notch. */
.is-app .mud-appbar { padding-top: env(safe-area-inset-top); }

/* ---------- Phones and tablets: app-like layout ---------- */
.mobile-tabbar { display: none; }
.appbar-store { align-items: center; gap: 10px; text-decoration: none; color: #0f172a; min-width: 0; }
.appbar-store .initial { width: 32px; height: 32px; border-radius: 9px; flex: none; display: grid; place-items: center; font-weight: 800; color: #fff;
    background: linear-gradient(135deg, #4f46e5, #7c3aed); }
.appbar-store .name { font-weight: 700; font-size: 1rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 52vw; }

@media (max-width: 959.98px) {
    .mobile-tabbar {
        position: fixed; left: 0; right: 0; bottom: 0; z-index: 1150; display: grid; grid-template-columns: repeat(5, 1fr);
        padding: 6px 4px calc(6px + env(safe-area-inset-bottom)); background: rgba(255, 255, 255, .97); backdrop-filter: blur(10px);
        border-top: 1px solid #e2e8f0; box-shadow: 0 -6px 18px -12px rgba(15, 23, 42, .25);
    }
    .mobile-tabbar .tab {
        display: grid; justify-items: center; gap: 2px; padding: 6px 2px; border: 0; background: transparent; border-radius: 12px;
        color: #64748b; text-decoration: none; font: inherit; font-size: .7rem; font-weight: 600; cursor: pointer;
    }
    .mobile-tabbar .tab.active { color: #4f46e5; background: #eef2ff; }
    .mobile-tabbar .tab-icon { position: relative; display: inline-grid; }
    .tab-badge { position: absolute; top: -5px; right: -12px; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 9px; background: #dc2626;
        color: #fff; font-size: .66rem; font-weight: 800; display: grid; place-items: center; border: 2px solid #fff; }
    .mud-main-content { padding-bottom: calc(76px + env(safe-area-inset-bottom)) !important; }
    .page-container.mud-container { padding: 16px 12px 24px !important; }
    .mud-typography-h4 { font-size: 1.55rem !important; line-height: 1.25 !important; }
    .page-head, .page-header { margin-bottom: 14px; }
    .page-head .mud-text-secondary, .page-header .mud-text-secondary { font-size: .88rem; }
    .install-banner { bottom: calc(80px + env(safe-area-inset-bottom)); }
    .mud-paper.pa-4 { padding: 12px !important; }
}

/* Compact lists (orders, products) */
.m-list { list-style: none; margin: 0 -4px; padding: 0; }
.m-list li { display: flex; align-items: flex-start; gap: 2px; border-bottom: 1px solid #eef2f7; }
.m-list li.selected { background: #f5f3ff; border-radius: 12px; }
.m-list .m-check { margin-top: 6px; flex: none; }
.m-item { flex: 1; min-width: 0; display: grid; gap: 4px; padding: 12px 6px; color: #0f172a; text-decoration: none; }
.m-item:active { background: #f8fafc; }
.m-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; font-size: .92rem; }
.m-row .mud-chip { margin: 0; }
.m-name { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.m-meta { font-size: .78rem; color: #64748b; }
.m-out { color: #dc2626; font-weight: 600; }
.m-item-photo { grid-template-columns: 56px 1fr; align-items: center; gap: 12px; }
.m-photo { width: 56px; height: 56px; border-radius: 12px; overflow: hidden; background: #f1f5f9; }
.m-photo img { width: 100%; height: 100%; object-fit: cover; }
.m-body { display: grid; gap: 3px; min-width: 0; }
.m-item-photo .m-row > span:first-child:not(.m-name) { white-space: nowrap; font-weight: 600; }

/* ---------- Tables on phones and tablets (MudTable Breakpoint.Sm = card mode up to 960px) ---------- */
@media (max-width: 960px) {
    .mud-sm-table .mud-table-container { overflow: visible; }
    .mud-sm-table .mud-table-body { border-top: 0 !important; }
    .mud-sm-table .mud-table-root { border-collapse: separate; border-spacing: 0; }
    .mud-sm-table .mud-table-body .mud-table-row {
        display: block; margin: 0 0 10px; padding: 6px 14px; border: 1px solid #e2e8f0; border-radius: 14px; background: #fff;
        box-shadow: 0 1px 2px rgba(15, 23, 42, .04);
    }
    .mud-sm-table .mud-table-body .mud-table-row:hover { background: #fff; }
    .mud-sm-table .mud-table-row .mud-table-cell,
    .mud-sm-table.mud-table-dense .mud-table-cell {
        padding: 7px 0 !important; border: 0 !important; gap: 12px; font-size: .9rem; min-height: 0; text-align: end !important;
    }
    .mud-sm-table .mud-table-row .mud-table-cell + .mud-table-cell { border-top: 1px dashed #eef2f7 !important; }
    .mud-sm-table .mud-table-cell:before {
        flex: none; padding-right: 0 !important; color: #64748b; font-size: .74rem; font-weight: 600; text-transform: uppercase; letter-spacing: .03em;
        text-align: start;
    }
    /* First column = what the row is about: bigger, no label. */
    .mud-sm-table .mud-table-row .mud-table-cell:first-child { font-weight: 600; font-size: .98rem; justify-content: flex-start; text-align: start !important; }
    .mud-sm-table .mud-table-row .mud-table-cell:first-child:before { display: none; }
    /* Cells with fields (editable tables): label above, field full width. */
    .mud-sm-table .mud-table-cell:has(.mud-input-control),
    .mud-sm-table .mud-table-cell:has(.mud-select) { flex-direction: column; align-items: stretch; gap: 4px; text-align: start !important; }
    .mud-sm-table .mud-table-cell .mud-input-control { width: 100% !important; max-width: none !important; }
    .mud-sm-table .mud-table-cell .mud-input-control[style*="width"] { width: 100% !important; }
    .mud-sm-table .mud-table-cell:has(.mud-switch) { flex-direction: row; align-items: center; }
    /* Action cells (buttons): full row, buttons to the end. */
    .mud-sm-table .mud-table-cell:has(.mud-button-root):not(:has(.mud-input-control)) { justify-content: flex-end; }
    .mud-sm-table .mud-table-cell:has(.mud-button-root):not(:has(.mud-input-control)):before { margin-right: auto; }
    .mud-sm-table .mud-table-smalldevices-sortselect { padding: 0 0 10px !important; }
    .mud-sm-table .mud-table-pagination { border: 0; }

    /* Simple tables (no card mode): scroll inside their own box instead of squeezing columns or the page. */
    .mud-simple-table { overflow-x: auto; -webkit-overflow-scrolling: touch; }
    .mud-simple-table table { min-width: 560px; }
    .mud-simple-table th, .mud-simple-table td { white-space: nowrap; font-size: .86rem; }
}
@media (max-width: 960px) {
    /* Fields inside table cards: full width even when the column set a fixed width (Style="width:150px"). */
    .mud-sm-table .mud-table-cell:has(.mud-input-control) [style*="width"],
    .mud-sm-table .mud-table-cell:has(.mud-input-control) .mud-input-control,
    .mud-sm-table .mud-table-cell:has(.mud-input-control) .mud-input { width: 100% !important; max-width: none !important; min-width: 0 !important; }
}

/* ---------- Image upload (ImageUpload, ImageField, ProductPhotos) ---------- */
.image-upload { position: relative; display: inline-flex; align-items: center; justify-content: center; gap: 8px; cursor: pointer; user-select: none; }
/* The file input covers the whole area: click/tap opens the picker and files can be dropped on it. */
.image-upload input[type=file] { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; cursor: pointer; }
.image-upload.busy input[type=file], .image-upload.disabled input[type=file] { cursor: default; }
.image-upload.disabled { opacity: .5; }
.image-upload.drop {
    flex-direction: column; min-height: 132px; padding: 16px; border: 2px dashed #cbd5e1; border-radius: 14px; background: #f8fafc;
    color: #475569; text-align: center; transition: border-color .15s, background .15s;
}
.image-upload.drop:hover, .image-upload.drop:focus-within { border-color: var(--mud-palette-primary); background: #f1f5f9; }
.image-upload.drop strong { color: #0f172a; font-size: .92rem; }
.image-upload.drop small { font-size: .76rem; }
.image-upload.compact {
    align-self: flex-start; padding: 6px 12px; border-radius: 999px; border: 1px solid var(--mud-palette-primary);
    color: var(--mud-palette-primary); font-size: .85rem; font-weight: 600;
}
.image-upload.compact:hover { background: color-mix(in srgb, var(--mud-palette-primary) 8%, transparent); }

.image-field { display: flex; gap: 12px; align-items: flex-start; }
.image-field-preview {
    flex: none; width: 72px; height: 72px; border-radius: 12px; overflow: hidden; display: grid; place-items: center;
    background: #f1f5f9; border: 1px solid #e2e8f0; color: #94a3b8;
}
.image-field-preview img { width: 100%; height: 100%; object-fit: cover; }
.image-field-preview.contain img { object-fit: contain; padding: 6px; background: repeating-conic-gradient(#f1f5f9 0 25%, #fff 0 50%) 0 0 / 14px 14px; }
.image-field-body { flex: 1; min-width: 0; display: grid; gap: 8px; }

.photo-grid { display: grid; gap: 10px; grid-template-columns: repeat(auto-fill, minmax(132px, 1fr)); }
.photo { position: relative; margin: 0; aspect-ratio: 1; border-radius: 14px; overflow: hidden; border: 1px solid #e2e8f0; background: #f8fafc; }
.photo.main { border: 2px solid var(--mud-palette-primary); }
.photo img { width: 100%; height: 100%; object-fit: cover; display: block; }
.photo-badge {
    position: absolute; top: 6px; left: 6px; padding: 2px 8px; border-radius: 999px; font-size: .7rem; font-weight: 700;
    background: var(--mud-palette-primary); color: #fff;
}
.photo-badge .mud-icon-root, .photo-make-main .mud-icon-root { font-size: .9rem; vertical-align: -2px; }
.photo-make-main {
    position: absolute; top: 6px; left: 6px; padding: 3px 9px; border-radius: 999px; font-size: .7rem; font-weight: 700; cursor: pointer;
    border: 0; background: rgba(255, 255, 255, .92); color: #0f172a; box-shadow: 0 1px 3px rgba(15, 23, 42, .25);
}
.photo-make-main:hover, .photo-make-main:focus-visible { background: var(--mud-palette-primary); color: #fff; }
.photo-actions {
    position: absolute; left: 0; right: 0; bottom: 0; display: flex; justify-content: space-between; padding: 2px;
    background: linear-gradient(transparent, rgba(15, 23, 42, .55));
}
.photo-actions .mud-icon-button { color: #fff; }
.photo-actions .mud-icon-button.mud-disabled { color: rgba(255, 255, 255, .35) !important; }
.photo-grid .image-upload.drop { min-height: 0; aspect-ratio: 1; }
.photo-link { display: flex; gap: 8px; align-items: center; margin-top: 12px; }
.photo-link .mud-input-control { flex: 1; }
@media (max-width: 600px) {
    .photo-grid { grid-template-columns: repeat(2, 1fr); }
    .photo-link { flex-direction: column; align-items: stretch; }
}

/* ---------- Own domain (Domains.razor) ---------- */
.domain-main { display: flex; align-items: center; gap: 8px; font-size: 1.1rem; font-weight: 600; word-break: break-all; }
.domain-main a { color: inherit; }
.domain-add { display: flex; gap: 8px; align-items: center; }
.domain-add .mud-input-control { flex: 1; }
.domain-head { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.domain-host { font-size: 1.05rem; word-break: break-all; margin-right: 4px; }
.dns-records { display: grid; gap: 6px; margin: 12px 0 8px; padding: 12px; border-radius: 12px; background: #f8fafc; border: 1px solid #e2e8f0; }
.dns-record { display: flex; align-items: center; gap: 10px; min-height: 32px; }
.dns-label { flex: none; width: 52px; font-size: .74rem; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; color: #64748b; }
.dns-value { flex: 1; min-width: 0; font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: .92rem; word-break: break-all; }
.domain-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 14px; }
.domain-steps, .domain-tips { margin: 0; padding-left: 20px; display: grid; gap: 6px; font-size: .92rem; color: #334155; }
@media (max-width: 600px) {
    .domain-add { flex-direction: column; align-items: stretch; }
}

/* ---------- Notifications (Notifications.razor) ---------- */
.push-on { display: flex; align-items: center; gap: 12px; }
.push-on div { display: grid; }
.push-on span, .push-devices span { font-size: .85rem; color: #64748b; }
.push-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; }
.push-enable { width: 100%; max-width: 420px; }
.push-devices { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; }
.push-devices li { display: flex; align-items: center; gap: 12px; padding: 8px 0; border-bottom: 1px solid #eef2f7; }
.push-devices li:last-child { border-bottom: 0; }
.push-devices li > div { flex: 1; min-width: 0; display: grid; }

/* ---------- Personalization typed by the shopper (order detail) ---------- */
.order-personalization {
    display: inline-block; margin-top: 4px; padding: 2px 8px; border-radius: 6px; font-size: .82rem; font-weight: 600;
    background: #fef3c7; color: #92400e; overflow-wrap: anywhere;
}
.gift-preview { display: flex; gap: 10px; align-items: center; padding: 12px; border: 1px dashed #c7d2fe; border-radius: 12px; font-weight: 600; }
.gift-preview-check { font-size: 1.2rem; }

/* ---------- Reviews moderation (Reviews.razor) ---------- */
.review-filters { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 14px; }
.review-card-head { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 12px; }
.review-stars { color: #f5a524; letter-spacing: 1px; font-size: 1.05rem; }
.review-stars span { color: #d1d5db; }
.review-card-meta { font-size: .85rem; margin-top: 2px; }
.review-card-meta a { color: var(--mud-palette-primary); }
.review-card-body { margin: 10px 0 0; white-space: pre-line; overflow-wrap: anywhere; }
.review-card-photos { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.review-card-photos img { width: 84px; height: 84px; object-fit: cover; border-radius: 10px; display: block; }
.review-card-reply { margin-top: 12px; display: grid; gap: 4px; justify-items: start; }
.review-card-reply .mud-input-control { width: 100%; }
.review-card-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 12px; }

/* ---------- Login: Google button, two-step verification ---------- */
.auth-divider { display: flex; align-items: center; gap: 12px; margin: 18px 0; color: #94a3b8; font-size: .85rem; }
.auth-divider::before, .auth-divider::after { content: ""; flex: 1; height: 1px; background: #e2e8f0; }
.auth-google {
    display: flex; align-items: center; justify-content: center; gap: 10px; width: 100%; padding: 12px 16px; border-radius: 12px;
    border: 1px solid #cbd5e1; background: #fff; color: #0f172a; font-weight: 600; text-decoration: none; transition: background .15s;
}
.auth-google:hover { background: #f8fafc; }
.auth-page-single { grid-template-columns: 1fr; }
.auth-page-single .auth-panel { min-height: 100vh; }
.auth-code { letter-spacing: .3em; font-size: 1.3rem !important; text-align: center; }
.auth-help { margin-top: 16px; font-size: .9rem; color: #475569; }
.auth-help summary { cursor: pointer; font-weight: 600; color: #4f46e5; }

/* ---------- Security page ---------- */
.security-head { display: flex; align-items: center; gap: 8px; margin-bottom: 4px; }
.security-steps { margin: 0 0 10px; padding-left: 20px; display: grid; gap: 6px; }
.security-qr { display: flex; flex-wrap: wrap; align-items: center; gap: 16px; margin: 0 0 14px 20px; }
.security-qr img { border: 1px solid #e2e8f0; border-radius: 12px; padding: 6px; background: #fff; image-rendering: pixelated; }
.security-secret { display: block; margin-top: 4px; font-size: 1rem; letter-spacing: .08em; word-break: break-all; }
.security-confirm { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.security-confirm .mud-input-control { max-width: 200px; }
.recovery-codes { list-style: none; margin: 0; padding: 12px; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px 16px;
    font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 1rem; background: #f8fafc; border: 1px dashed #cbd5e1; border-radius: 12px; }
.feed-url { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; padding: 10px 12px; background: #f8fafc; border: 1px solid #e2e8f0; border-radius: 10px; }
.feed-url code { flex: 1; min-width: 0; word-break: break-all; font-size: .9rem; }

/* ---------- Abandoned carts (KPIs) ---------- */
.kpi-row { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.kpi { display: grid; gap: 2px; }
.kpi span { font-size: .85rem; color: #64748b; }
.kpi strong { font-size: 1.6rem; color: #0f172a; }
.kpi small { font-size: .78rem; color: #94a3b8; }
@media (max-width: 700px) { .kpi-row { grid-template-columns: 1fr; } }

/* ---------- Melhor Envio ---------- */
.carrier-card { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; }
.carrier-services { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 0 8px; }
.carrier-label { display: grid; gap: 6px; justify-items: start; padding: 12px; margin-bottom: 12px; border-radius: 12px; background: #eef2ff; border: 1px solid #c7d2fe; }

/* ---------- Welcome pop-up preview ---------- */
.welcome-preview { display: grid; gap: 8px; justify-items: center; text-align: center; padding: 20px; border-radius: 14px; background: #fff; border: 1px solid #e2e8f0; box-shadow: 0 10px 30px rgba(15, 23, 42, .08); }
.welcome-preview strong { font-size: 1.15rem; }
.welcome-preview span { color: #475569; font-size: .9rem; }
.welcome-preview-input { width: 100%; padding: 8px 12px; border: 1px solid #cbd5e1; border-radius: 8px; text-align: left; color: #94a3b8 !important; }
.welcome-preview-button { width: 100%; padding: 9px 12px; border-radius: 8px; background: #4f46e5; color: #fff !important; font-weight: 600; }

/* ---------- Custom header menu editor ---------- */
.menu-link-row { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.4fr) auto auto auto; gap: 6px; align-items: center; margin-bottom: 6px; }
@media (max-width: 600px) { .menu-link-row { grid-template-columns: 1fr auto auto auto; } .menu-link-row > :nth-child(2) { grid-column: 1 / -1; grid-row: 2; } }

/* ---------- Size guide editor ---------- */
.size-grid-scroll { overflow-x: auto; }
.size-grid { border-collapse: collapse; min-width: 100%; }
.size-grid th, .size-grid td { border: 1px solid #e2e8f0; padding: 0; }
.size-grid thead th { background: #f8fafc; }
.size-grid input { width: 100%; min-width: 90px; border: 0; padding: 8px 10px; font: inherit; background: transparent; text-align: center; }
.size-grid input:focus { outline: 2px solid #4f46e5; outline-offset: -2px; }
.size-grid thead input { font-weight: 600; }
.size-grid-head { display: flex; align-items: center; }
.size-grid-action { width: 40px; text-align: center; border: 0 !important; background: transparent !important; }

/* ---------- Cashback ---------- */
.kpi-row.kpi-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
@media (max-width: 1100px) { .kpi-row.kpi-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 600px) { .kpi-row.kpi-4 { grid-template-columns: 1fr; } }
.push-devices .text-right { display: grid; justify-items: end; text-align: right; }

/* ---------- Integrations (API) ---------- */
.api-url { font-size: .95rem; padding: 2px 6px; background: #f1f5f9; border-radius: 6px; }
.api-key-row { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 8px 0; }
.api-key { font-size: .9rem; padding: 6px 10px; background: #fff; border: 1px dashed #f59e0b; border-radius: 6px; word-break: break-all; }
.integration-card.selected { outline: 2px solid #4f46e5; }
.integration-stats { display: flex; flex-wrap: wrap; gap: 14px; margin: 10px 0; font-size: .9rem; color: #475569; }
.integration-stats .bad { color: #b91c1c; }
.integration-stats .good { color: #15803d; font-weight: 600; }
.integration-events { list-style: none; margin: 0; padding: 0; }
.integration-events li { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 10px 0; border-bottom: 1px solid #e2e8f0; }
.integration-events li > div { display: grid; gap: 2px; min-width: 0; }
.integration-events .error { color: #b91c1c; font-size: .9rem; }
.integration-events .ok { color: #15803d; font-size: .9rem; }
.integration-events small { color: #64748b; }

/* Photos and color dot per option value (product edit) */
.value-photos { padding: 14px; margin-bottom: 12px; border: 1px solid var(--mud-palette-lines-default); border-radius: 12px; }
.value-photos-head { display: flex; align-items: center; flex-wrap: wrap; gap: 10px; margin-bottom: 10px; }
.value-swatch { width: 26px; height: 26px; border-radius: 50%; flex: none; box-shadow: inset 0 0 0 1px rgba(0, 0, 0, .15); }
.value-swatch.empty { background: repeating-linear-gradient(45deg, #eee 0 4px, #fff 4px 8px); }
.swatch-picker { position: relative; display: inline-flex; align-items: center; gap: 6px; margin-left: auto; cursor: pointer; font-size: .85rem; font-weight: 600; color: var(--mud-palette-primary); }
.swatch-picker input { width: 28px; height: 28px; padding: 0; border: 0; background: none; cursor: pointer; }

/* Support tickets: conversation between the store and the platform. */
.support-thread { display: flex; flex-direction: column; gap: 12px; }
.support-message { max-width: 85%; padding: 10px 14px; border-radius: 12px; background: #f1f5f9; }
.support-message.from-store { align-self: flex-end; background: #eef2ff; }
.support-message.from-platform { align-self: flex-start; background: #f0fdf4; border: 1px solid #bbf7d0; }
.support-meta { font-size: .78rem; color: #64748b; margin-bottom: 4px; }
.support-body { white-space: pre-line; font-size: .95rem; line-height: 1.5; }
.m-list .m-toggle { flex: none; align-self: center; }

/* Categorias: on phones the open form goes above the tree (no scrolling to the end of a long list). */
@media (max-width: 959.98px) { .category-form-item { order: -1; } }

/* "Primeiros passos" (Início and /primeiros-passos). */
.setup-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; }
.setup-steps { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; }
.setup-steps li { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 10px; }
.setup-steps li.next { background: color-mix(in srgb, var(--mud-palette-primary) 7%, transparent); }
.setup-steps li.done .setup-text strong { color: var(--mud-palette-text-secondary); text-decoration: line-through; font-weight: 500; }
.setup-text { display: grid; gap: 2px; min-width: 0; }
.setup-text span { font-size: .86rem; color: var(--mud-palette-text-secondary); }
.setup-more { margin: 0; padding-left: 18px; display: grid; gap: 6px; font-size: .92rem; }
@media (max-width: 600px) {
    .setup-steps li { grid-template-columns: auto 1fr; }
    .setup-button { grid-column: 2; justify-self: start; }
}

/* ABFCommerce mark (Aqui Bem Fácil hand) beside the name in the header and the login pages. */
.brand-mark { display: inline-block; vertical-align: middle; width: 28px; height: 28px; margin-right: 8px; border-radius: 7px; background: #fff; padding: 2px; box-sizing: border-box; }
