/* =========================================================
   HOTFLIX ADMIN
   DESIGN SYSTEM
========================================================= */

:root {
    /* As cores vêm de theme.css (estilo + modo claro/escuro) */
    --panel: var(--surface);
    --panel-2: var(--surface-2);
    --panel-hover: var(--surface-3);

    --border-light: var(--border-strong);

    --red: var(--accent);
    --red-hover: var(--accent-hover);
    --red-dark: var(--accent-strong);

    --green: var(--success);
    --yellow: var(--warning);

    --sidebar-width: 250px;
    --radius: 12px;
    --transition: 0.2s ease;
}


/* =========================================================
   RESET
========================================================= */

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
}

body {
    min-height: 100vh;
    background: var(--bg);
    color: var(--text);
    font-family:
        Inter,
        -apple-system,
        BlinkMacSystemFont,
        "Segoe UI",
        Arial,
        sans-serif;
}

button,
input,
select,
textarea {
    font-family: inherit;
}

button {
    cursor: pointer;
}

a {
    color: inherit;
    text-decoration: none;
}

.hidden {
    display: none !important;
}


/* =========================================================
   LOGIN
========================================================= */

.login-container {
    min-height: 100vh;

    display: flex;
    align-items: center;
    justify-content: center;

    padding: 24px;

    background:
        radial-gradient(
            circle at 50% 0%,
            color-mix(in srgb, var(--accent) 13%, transparent),
            transparent 35%
        ),
        var(--bg);
}

.login-box {
    width: 100%;
    max-width: 430px;

    padding: 40px;

    background: var(--panel);

    border: 1px solid var(--border);

    border-radius: 16px;

    box-shadow:
        0 30px 80px rgb(var(--shadow-color) / calc(0.55 * var(--shadow-alpha)));
}

.login-box h1 {
    margin-bottom: 8px;

    font-size: 28px;
    font-weight: 800;
    letter-spacing: -0.7px;
}

.login-box h1::before {
    content: "Hotflixx";
    display: block;

    margin-bottom: 28px;

    color: var(--red);

    font-size: 24px;
    font-weight: 900;
    letter-spacing: -1px;
}

.login-box p {
    margin-bottom: 24px;

    color: var(--text-muted);

    line-height: 1.5;
}

#loginForm {
    display: flex;
    flex-direction: column;
    gap: 13px;
}

#loginForm input {
    width: 100%;

    padding: 14px 15px;

    background: var(--bg-soft);

    border: 1px solid var(--border-light);
    border-radius: 8px;

    color: var(--text);

    outline: none;

    transition:
        border-color var(--transition),
        background var(--transition);
}

#loginForm input::placeholder {
    color: var(--text-faint);
}

#loginForm input:focus {
    background: var(--surface);
    border-color: var(--red);
}

#loginForm button {
    margin-top: 4px;

    padding: 14px;

    background: var(--red);

    border: none;
    border-radius: 8px;

    color: var(--on-accent);

    font-weight: 700;

    transition:
        background var(--transition),
        transform var(--transition);
}

#loginForm button:hover {
    background: var(--red-hover);
    transform: translateY(-1px);
}

#message {
    margin-top: 15px;

    color: var(--danger);

    font-size: 13px;
    line-height: 1.4;
}


/* =========================================================
   SIDEBAR
========================================================= */

.sidebar {
    position: fixed;

    top: 0;
    left: 0;
    bottom: 0;

    z-index: 1000;

    width: var(--sidebar-width);

    display: flex;
    flex-direction: column;

    padding: 28px 18px 18px;

    background: var(--bg-soft);

    border-right: 1px solid var(--border);
}


/* BRAND */

.sidebar-brand {
    padding: 0 12px 30px;

    border-bottom: 1px solid var(--border);
}

.brand-text {
    color: var(--red);

    font-size: 27px;
    font-weight: 900;

    letter-spacing: -1.5px;
}

.sidebar-brand span {
    display: block;

    margin-top: 5px;

    color: var(--text-faint);

    font-size: 10px;
    font-weight: 600;

    text-transform: uppercase;
    letter-spacing: 1.2px;
}


/* NAV */

.sidebar-nav {
    display: flex;
    flex-direction: column;

    gap: 5px;

    margin-top: 25px;
}

.nav-item {
    position: relative;

    display: flex;
    align-items: center;

    gap: 13px;

    padding: 12px 13px;

    border-radius: 9px;

    color: var(--text-muted);

    font-size: 14px;
    font-weight: 600;

    transition:
        color var(--transition),
        background var(--transition);
}

.nav-item:hover {
    color: var(--text);
    background: var(--surface-2);
}

.nav-item.active {
    color: var(--text);
    background: color-mix(in srgb, var(--accent) 12%, transparent);
}

.nav-item.active::before {
    content: "";

    position: absolute;

    left: 0;
    top: 8px;
    bottom: 8px;

    width: 3px;

    background: var(--red);

    border-radius: 0 4px 4px 0;
}

.nav-icon {
    width: 20px;

    color: var(--text-muted);

    font-size: 17px;

    text-align: center;
}

.nav-item.active .nav-icon {
    color: var(--red);
}


/* SIDEBAR BOTTOM */

.sidebar-bottom {
    margin-top: auto;
}

.admin-mini-profile {
    display: flex;
    align-items: center;

    gap: 10px;

    padding: 13px;

    margin-bottom: 10px;

    background: var(--surface);

    border: 1px solid var(--border);
    border-radius: 10px;
}

.admin-avatar,
.topbar-avatar {
    display: flex;
    align-items: center;
    justify-content: center;

    flex-shrink: 0;

    background: var(--red);

    border-radius: 50%;

    color: var(--on-accent);

    font-weight: 800;
}

.admin-avatar {
    width: 36px;
    height: 36px;

    font-size: 12px;
}

.admin-mini-info {
    min-width: 0;
}

.admin-mini-info strong {
    display: block;

    overflow: hidden;

    color: var(--text);

    font-size: 12px;

    text-overflow: ellipsis;
    white-space: nowrap;
}

.admin-mini-info span {
    display: block;

    margin-top: 3px;

    color: var(--text-faint);

    font-size: 10px;
}

.logout-button {
    width: 100%;

    display: flex;
    align-items: center;

    gap: 10px;

    padding: 11px 13px;

    background: transparent;

    border: 1px solid transparent;
    border-radius: 8px;

    color: var(--text-muted);

    font-size: 12px;
    font-weight: 600;

    text-align: left;

    transition:
        color var(--transition),
        background var(--transition);
}

.logout-button:hover {
    background: var(--surface-2);
    color: var(--text);
}


/* =========================================================
   MAIN
========================================================= */

.main-wrapper {
    min-height: 100vh;

    margin-left: var(--sidebar-width);
}


/* =========================================================
   TOPBAR
========================================================= */

.topbar {
    position: sticky;

    top: 0;

    z-index: 100;

    min-height: 76px;

    display: flex;
    align-items: center;
    justify-content: space-between;

    padding: 15px 38px;

    background: color-mix(in srgb, var(--bg) 92%, transparent);

    border-bottom: 1px solid var(--border);

    backdrop-filter: blur(18px);
}

.mobile-brand {
    display: none;

    color: var(--red);

    font-size: 22px;
    font-weight: 900;
}

.topbar-page {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.topbar-label {
    color: var(--text-faint);

    font-size: 10px;
    font-weight: 700;

    text-transform: uppercase;
    letter-spacing: 1px;
}

.topbar-page h1 {
    font-size: 19px;
    font-weight: 700;
}

.topbar-admin {
    display: flex;
    align-items: center;

    gap: 10px;
}

.topbar-avatar {
    width: 35px;
    height: 35px;

    font-size: 11px;
}

.topbar-admin strong {
    display: block;

    font-size: 12px;
}

.topbar-admin small {
    display: block;

    margin-top: 2px;

    color: var(--text-faint);

    font-size: 10px;
}


/* =========================================================
   DASHBOARD
========================================================= */

.dashboard {
    width: min(1200px, calc(100% - 70px));

    margin: 0 auto;

    padding: 42px 0 80px;
}

.dashboard-section {
    margin-bottom: 58px;
}

.dashboard-section:last-child {
    margin-bottom: 0;
}


/* =========================================================
   WELCOME
========================================================= */

.welcome-area {
    margin-bottom: 28px;
}

.eyebrow,
.section-kicker {
    display: block;

    margin-bottom: 7px;

    color: var(--red);

    font-size: 10px;
    font-weight: 800;

    text-transform: uppercase;
    letter-spacing: 1.4px;
}

.welcome-area h2 {
    margin-bottom: 7px;

    font-size: 30px;
    font-weight: 800;

    letter-spacing: -1px;
}

.welcome-area p {
    color: var(--text-muted);

    font-size: 13px;
}


/* =========================================================
   SECTION HEADINGS
========================================================= */

.section-heading {
    margin-bottom: 22px;
}

.section-heading-row {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;

    gap: 20px;
}

.section-heading h2 {
    margin-bottom: 6px;

    font-size: 22px;
    font-weight: 750;

    letter-spacing: -0.5px;
}

.section-heading p {
    color: var(--text-faint);

    font-size: 12px;
}


/* =========================================================
   STATS
========================================================= */

.stats-grid {
    display: grid;

    grid-template-columns:
        repeat(3, minmax(0, 1fr));

    gap: 14px;
}

.stat-card {
    display: flex;
    align-items: center;

    gap: 15px;

    padding: 20px;

    background:
        linear-gradient(
            145deg,
            var(--surface-2),
            var(--surface)
        );

    border: 1px solid var(--border);

    border-radius: var(--radius);

    transition:
        border-color var(--transition),
        transform var(--transition);
}

.stat-card:hover {
    border-color: var(--border-strong);
    transform: translateY(-2px);
}

.stat-icon {
    width: 43px;
    height: 43px;

    display: flex;
    align-items: center;
    justify-content: center;

    flex-shrink: 0;

    background: color-mix(in srgb, var(--accent) 11%, transparent);

    border: 1px solid color-mix(in srgb, var(--accent) 18%, transparent);

    border-radius: 10px;

    color: var(--red);

    font-size: 18px;
}

.stat-content span {
    display: block;

    margin-bottom: 4px;

    color: var(--text-faint);

    font-size: 11px;
}

.stat-content strong {
    display: block;

    font-size: 22px;
    font-weight: 750;
}


/* =========================================================
   STORE OVERVIEW
========================================================= */

.store-overview-card {
    display: flex;
    align-items: center;
    justify-content: space-between;

    gap: 30px;

    padding: 24px;

    background:
        linear-gradient(
            135deg,
            var(--surface-2),
            var(--surface)
        );

    border: 1px solid var(--border);

    border-radius: var(--radius);
}

.store-overview-main {
    display: flex;
    align-items: center;

    gap: 13px;
}

.store-status-dot {
    width: 10px;
    height: 10px;

    flex-shrink: 0;

    background: var(--green);

    border-radius: 50%;

    box-shadow:
        0 0 0 5px color-mix(in srgb, var(--success) 8%, transparent);
}

.card-label {
    display: block;

    margin-bottom: 4px;

    color: var(--text-faint);

    font-size: 10px;

    text-transform: uppercase;
    letter-spacing: 0.8px;
}

.store-overview-main h3 {
    font-size: 19px;
    font-weight: 700;
}

.store-meta {
    display: flex;

    gap: 45px;
}

.store-meta div {
    min-width: 120px;
}

.store-meta span {
    display: block;

    margin-bottom: 5px;

    color: var(--text-faint);

    font-size: 10px;

    text-transform: uppercase;
    letter-spacing: 0.7px;
}

.store-meta strong {
    color: var(--text-soft);

    font-size: 12px;
}


/* =========================================================
   FORMS
========================================================= */

.admin-form {
    padding: 26px;

    margin-top: 16px;

    background: var(--surface);

    border: 1px solid var(--border);

    border-radius: var(--radius);

    box-shadow:
        0 15px 45px rgb(var(--shadow-color) / calc(0.18 * var(--shadow-alpha)));
}

.admin-form.hidden {
    display: none !important;
}

.form-header {
    margin-bottom: 23px;
}

.form-header h3 {
    margin-bottom: 6px;

    font-size: 18px;
    font-weight: 700;
}

.form-header p {
    max-width: 700px;
}

.form-help {
    color: var(--text-faint);

    font-size: 12px;
    line-height: 1.6;
}

.form-grid {
    display: grid;

    grid-template-columns:
        repeat(2, minmax(0, 1fr));

    gap: 0 18px;
}

.form-field {
    min-width: 0;
}

.full-width {
    grid-column: 1 / -1;
}

.small-field {
    max-width: 220px;
}

.admin-form label {
    display: block;

    margin: 15px 0 7px;

    color: var(--text-soft);

    font-size: 11px;
    font-weight: 650;
}

.admin-form input,
.admin-form select,
.admin-form textarea {
    width: 100%;

    padding: 12px 13px;

    background: var(--bg-soft);

    border: 1px solid var(--border);
    border-radius: 8px;

    color: var(--text);

    font-size: 13px;

    outline: none;

    transition:
        border-color var(--transition),
        background var(--transition);
}

.admin-form input::placeholder,
.admin-form textarea::placeholder {
    color: var(--text-faint);
}

.admin-form input:focus,
.admin-form select:focus,
.admin-form textarea:focus {
    background: var(--bg-soft);

    border-color: var(--red);
}

.admin-form textarea {
    min-height: 110px;

    resize: vertical;

    line-height: 1.5;
}

.admin-form select {
    cursor: pointer;
}

.admin-form option {
    background: var(--surface);
    color: var(--text);
}

.admin-form small {
    display: block;

    margin-top: 5px;

    color: var(--text-faint);

    font-size: 10px;
    line-height: 1.4;
}


/* =========================================================
   FORM BUTTONS
========================================================= */

.form-buttons {
    display: flex;
    flex-wrap: wrap;

    gap: 9px;

    margin-top: 22px;
}

.form-buttons button,
.primary-button,
.secondary-button {
    min-height: 40px;

    padding: 10px 16px;

    border-radius: 8px;

    font-size: 12px;
    font-weight: 700;

    transition:
        background var(--transition),
        border-color var(--transition),
        transform var(--transition),
        opacity var(--transition);
}

.primary-button {
    background: var(--red);

    border: 1px solid var(--red);

    color: var(--on-accent);
}

.primary-button:hover {
    background: var(--red-hover);
    border-color: var(--red-hover);

    transform: translateY(-1px);
}

.secondary-button {
    background: var(--surface-3) !important;

    border: 1px solid var(--border) !important;

    color: var(--text) !important;
}

.secondary-button:hover {
    background: var(--surface-3) !important;

    transform: translateY(-1px);
}

#categoryMessage,
#storeSettingsMessage,
#productMessage {
    margin-top: 13px;

    color: var(--text-muted);

    font-size: 12px;
    line-height: 1.5;
}


/* =========================================================
   CATEGORY LIST
========================================================= */

#categoriesList {
    display: flex;
    flex-direction: column;

    gap: 9px;
}

#categoriesList .admin-item {
    margin: 0;
}


/* =========================================================
   GENERIC ADMIN ITEM
========================================================= */

.admin-item {
    display: flex;
    align-items: center;
    justify-content: space-between;

    gap: 20px;

    padding: 17px 18px;

    background: var(--surface);

    border: 1px solid var(--border);

    border-radius: 10px;

    transition:
        background var(--transition),
        border-color var(--transition);
}

.admin-item:hover {
    background: var(--surface-2);
    border-color: var(--border);
}

.admin-item h3 {
    margin-bottom: 5px;

    font-size: 14px;
}

.admin-item p {
    color: var(--text-faint);

    font-size: 11px;
    line-height: 1.5;
}

.admin-item span {
    color: var(--text-muted);

    font-size: 11px;
}


/* =========================================================
   PRODUCT LIST
========================================================= */

#productsList {
    display: grid;

    grid-template-columns:
        repeat(3, minmax(0, 1fr));

    gap: 15px;
}

#productsList .admin-item {
    height: 100%;

    display: flex;
    flex-direction: column;
    align-items: stretch;

    padding: 0;

    overflow: hidden;
}

#productsList .admin-item img {
    width: 100%;

    aspect-ratio: 16 / 9;

    object-fit: cover;

    background: var(--bg);

    border-radius: 0;

    margin: 0;
}

#productsList .admin-item > div {
    padding: 16px;
}


/* =========================================================
   PRODUCT FORM
========================================================= */

#productForm {
    margin-bottom: 20px;
}

.form-section {
    margin-top: 5px;
}

.form-section h3,
.form-section h4 {
    margin-bottom: 7px;

    font-size: 15px;
    font-weight: 700;
}

hr {
    height: 1px;

    margin: 25px 0;

    background: var(--surface-3);

    border: none;
}


/* =========================================================
   PREVIEWS
========================================================= */

.product-previews {
    margin-top: 4px;
}

#previewList {
    display: flex;
    flex-direction: column;

    gap: 8px;

    margin-top: 13px;
}

.preview-item {
    display: flex;
    align-items: center;
    justify-content: space-between;

    gap: 12px;

    padding: 11px 13px;

    background: var(--bg-soft);

    border: 1px solid var(--border);

    border-radius: 8px;
}

.preview-item span {
    overflow: hidden;

    color: var(--text-soft);

    font-size: 11px;

    text-overflow: ellipsis;
    white-space: nowrap;
}

.preview-add-row {
    display: flex;

    align-items: center;

    gap: 9px;

    margin-top: 12px;
}

.preview-add-row input {
    flex: 1;
}


/* =========================================================
   PAYMENT METHODS
========================================================= */

#paymentMethodsBox {
    margin-top: 23px;
    padding-top: 23px;

    border-top: 1px solid var(--border);
}

#paymentMethodsList {
    display: flex;
    flex-direction: column;

    gap: 10px;

    margin-top: 13px;
}

.payment-method-item {
    padding: 14px;

    background: var(--bg-soft);

    border: 1px solid var(--border);

    border-radius: 9px;
}

.payment-method-item strong {
    display: block;

    margin-bottom: 5px;

    font-size: 12px;
}

.payment-method-item span {
    color: var(--text-faint);

    font-size: 10px;
}

.payment-method-form {
    padding: 16px;

    margin-top: 12px;

    background: var(--surface);

    border: 1px solid var(--border);

    border-radius: 9px;
}

.payment-method-form h5 {
    margin-bottom: 8px;

    font-size: 13px;
}


/* =========================================================
   PURCHASE BOX
========================================================= */

.purchase-box {
    margin-top: 15px;
}

.payment-methods-box {
    margin-top: 20px;
}


/* =========================================================
   STATUS
========================================================= */

.status-active {
    color: var(--green) !important;
}

.status-pending {
    color: var(--yellow) !important;
}

.status-blocked {
    color: var(--danger) !important;
}


/* =========================================================
   DELETE / DANGER
========================================================= */

.delete-button,
.btn-delete {
    background: color-mix(in srgb, var(--danger) 8%, transparent) !important;

    border: 1px solid color-mix(in srgb, var(--danger) 22%, transparent) !important;

    color: var(--danger) !important;
}

.delete-button:hover,
.btn-delete:hover {
    background: color-mix(in srgb, var(--danger) 15%, transparent) !important;
}


/* =========================================================
   SCROLLBAR
========================================================= */

::-webkit-scrollbar {
    width: 7px;
    height: 7px;
}

::-webkit-scrollbar-track {
    background: var(--bg);
}

::-webkit-scrollbar-thumb {
    background: var(--surface-3);

    border-radius: 20px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--text-faint);
}


/* =========================================================
   MOBILE
========================================================= */

@media (max-width: 1000px) {

    :root {
        --sidebar-width: 215px;
    }

    .dashboard {
        width: calc(100% - 45px);
    }

    #productsList {
        grid-template-columns:
            repeat(2, minmax(0, 1fr));
    }

    .store-overview-card {
        align-items: flex-start;
        flex-direction: column;
    }

    .store-meta {
        width: 100%;
    }

}


@media (max-width: 760px) {

    :root {
        --sidebar-width: 0px;
    }

    .sidebar {
        position: relative;

        width: 100%;
        height: auto;

        min-height: auto;

        padding: 18px;

        border-right: none;
        border-bottom: 1px solid var(--border);
    }

    .sidebar-brand {
        padding: 0 4px 15px;
    }

    .sidebar-nav {
        flex-direction: row;

        overflow-x: auto;

        margin-top: 14px;

        padding-bottom: 3px;
    }

    .nav-item {
        flex-shrink: 0;

        padding: 10px 12px;
    }

    .nav-item.active::before {
        display: none;
    }

    .sidebar-bottom {
        display: none;
    }

    .main-wrapper {
        margin-left: 0;
    }

    .topbar {
        min-height: 65px;

        padding: 12px 20px;
    }

    .mobile-brand {
        display: block;
    }

    .topbar-page {
        display: none;
    }

    .topbar-admin small {
        display: none;
    }

    .dashboard {
        width: calc(100% - 32px);

        padding-top: 28px;
    }

    .stats-grid {
        grid-template-columns: 1fr;
    }

    .section-heading-row {
        align-items: flex-start;
        flex-direction: column;
    }

    .section-heading-row .primary-button {
        width: 100%;
    }

    .form-grid {
        grid-template-columns: 1fr;
    }

    .full-width {
        grid-column: auto;
    }

    .small-field {
        max-width: none;
    }

    #productsList {
        grid-template-columns: 1fr;
    }

    .store-meta {
        flex-direction: column;

        gap: 16px;
    }

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

    .preview-add-row button {
        width: 100%;
    }

}


/* =========================================================
   SMALL MOBILE
========================================================= */

@media (max-width: 430px) {

    .sidebar {
        padding: 15px 12px;
    }

    .brand-text {
        font-size: 24px;
    }

    .dashboard {
        width: calc(100% - 24px);

        padding-top: 23px;
    }

    .welcome-area h2 {
        font-size: 25px;
    }

    .admin-form {
        padding: 19px;
    }

    .store-overview-card {
        padding: 19px;
    }

    .form-buttons {
        flex-direction: column;
    }

    .form-buttons button,
    .primary-button,
    .secondary-button {
        width: 100%;
    }

    .topbar {
        padding: 11px 14px;
    }

}

/* =========================================================
   LINK DA LOJA (Configurações)
========================================================= */

.store-link-row {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
}

.store-link-row input {
    flex: 1 1 260px;
    min-width: 0;
    margin: 0;
    cursor: text;
}

.store-link-row .primary-button,
.store-link-row .secondary-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    white-space: nowrap;
}

#settingsStoreLinkMessage {
    margin-top: 10px;
    min-height: 16px;
}

@media (max-width: 560px) {
    .store-link-row .primary-button,
    .store-link-row .secondary-button {
        flex: 1 1 100%;
    }
}

#storeLinkSettings,
#settings {
    scroll-margin-top: 110px;
}


/* =========================================================
   NOTIFICAÇÕES (painel do vendedor)
========================================================= */

.push-card-status {
    color: var(--text-soft);
    font-size: 14px;
    line-height: 1.6;
}

.push-card-status[data-kind="ok"] {
    color: var(--green);
}

.push-card-status[data-kind="warn"] {
    color: var(--yellow);
}

.push-card-steps {
    margin: 10px 0 0 20px;
    color: var(--text-soft);
    font-size: 14px;
    line-height: 1.8;
}

.push-card-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 14px;
}

.push-card-actions [hidden] {
    display: none !important;
}


#pushCard {
    scroll-margin-top: 110px;
}


/* =========================================================
   TOPO: ver loja + aparência
========================================================= */

.topbar-right {
    display: flex;
    align-items: center;
    gap: 10px;
}

.topbar-store-button {
    min-height: 38px;

    display: inline-flex;
    align-items: center;
    gap: 8px;

    padding: 0 14px;

    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 10px;

    color: var(--text-soft);

    font-size: 12px;
    font-weight: 700;

    transition: border-color var(--transition), color var(--transition);
}

.topbar-store-button:hover {
    border-color: var(--border-strong);
    color: var(--text);
}

.topbar-store-button svg {
    width: 15px;
    height: 15px;
}

.topbar-store-button[aria-disabled="true"],
.quick-action[aria-disabled="true"] {
    opacity: 0.5;
    pointer-events: none;
}

.topbar-admin {
    padding-left: 6px;
}


/* =========================================================
   VISÃO GERAL: assinatura + ações rápidas
========================================================= */

.stats-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
}

.stat-card-link {
    color: inherit;
}

.stat-card-link:hover {
    border-color: var(--accent);
}

.stat-content {
    min-width: 0;
}

.stat-detail {
    display: block;
    margin-top: 3px;

    overflow: hidden;

    color: var(--text-muted);

    font-size: 11px;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.stat-card.warn {
    border-color: color-mix(in srgb, var(--warning) 45%, var(--border));
}

.stat-card.warn .stat-detail {
    color: var(--warning);
    font-weight: 700;
}

.stat-card.bad {
    border-color: color-mix(in srgb, var(--danger) 50%, var(--border));
}

.stat-card.bad .stat-detail {
    color: var(--danger);
    font-weight: 700;
}

.quick-actions {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 10px;

    margin-top: 14px;
}

.quick-action {
    display: flex;
    align-items: center;
    gap: 12px;

    padding: 14px 15px;

    background: var(--surface);
    border: 1px dashed var(--border-strong);
    border-radius: var(--radius);

    color: var(--text);

    font: inherit;
    text-align: left;

    transition:
        border-color var(--transition),
        background var(--transition),
        transform var(--transition);
}

.quick-action:hover {
    background: var(--surface-2);
    border-color: var(--accent);
    border-style: solid;
    transform: translateY(-1px);
}

.quick-action.done {
    border-color: var(--success);
    border-style: solid;
}

.quick-icon {
    width: 34px;
    height: 34px;

    display: flex;
    align-items: center;
    justify-content: center;

    flex-shrink: 0;

    background: color-mix(in srgb, var(--accent) 12%, transparent);
    border-radius: 9px;

    color: var(--accent);

    font-size: 16px;
    font-weight: 800;
}

.quick-action strong {
    display: block;
    font-size: 13px;
    font-weight: 700;
}

.quick-action small {
    display: block;
    margin-top: 2px;
    color: var(--text-muted);
    font-size: 11px;
}


/* =========================================================
   PESQUISA DE PRODUTOS
========================================================= */

.list-search {
    position: relative;
    margin-bottom: 14px;
}

.list-search[hidden] {
    display: none;
}

.list-search input {
    width: 100%;

    padding: 12px 90px 12px 40px;

    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 10px;

    color: var(--text);

    font-size: 13px;
    outline: none;

    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23888' stroke-width='2' stroke-linecap='round'%3E%3Ccircle cx='11' cy='11' r='7'/%3E%3Cpath d='m20 20-3.5-3.5'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: 13px center;
    background-size: 16px;
}

.list-search input:focus {
    border-color: var(--accent);
}

.list-search input::placeholder {
    color: var(--text-faint);
}

.list-search-count {
    position: absolute;
    top: 50%;
    right: 14px;

    transform: translateY(-50%);

    color: var(--text-muted);

    font-size: 11px;
    font-weight: 700;
}

.search-hidden {
    display: none !important;
}

.search-empty {
    grid-column: 1 / -1;

    padding: 30px;

    border: 1px dashed var(--border-strong);
    border-radius: var(--radius);

    color: var(--text-muted);

    font-size: 13px;
    text-align: center;
}

.main-wrapper > .hd-footer {
    padding-bottom: 40px;
}

@media (max-width: 1000px) {
    .stats-grid,
    .quick-actions {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 760px) {
    .topbar-store-button span {
        display: none;
    }

    .topbar-store-button {
        width: 38px;
        padding: 0;
        justify-content: center;
    }

    .topbar-admin > div:last-child {
        display: none;
    }
}

@media (max-width: 430px) {
    .stats-grid {
        grid-template-columns: 1fr;
    }

    .quick-actions {
        grid-template-columns: 1fr 1fr;
    }

    .quick-action {
        flex-direction: column;
        align-items: flex-start;
    }
}


/* =========================================================
   APARÊNCIA DA LOJA (modelos, cores, pré-visualização)
========================================================= */

.appearance-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 420px;
    gap: 22px;
    align-items: start;
}

.appearance-controls .admin-form:first-child {
    margin-top: 0;
}

.appearance-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 14px;
}

.template-gallery {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(170px, 1fr));
    gap: 12px;
}

.tpl-card {
    display: flex;
    flex-direction: column;
    gap: 8px;

    padding: 10px;

    background: var(--bg-soft);
    border: 1px solid var(--border);
    border-radius: 14px;

    color: var(--text);
    text-align: left;

    transition: border-color var(--transition), transform var(--transition);
}

.tpl-card:hover {
    border-color: var(--border-strong);
    transform: translateY(-1px);
}

.tpl-card.active {
    border-color: var(--accent);
    box-shadow: 0 0 0 2px color-mix(in srgb, var(--accent) 30%, transparent);
}

.tpl-name {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px;

    font-size: 13px;
    font-weight: 800;
}

.tpl-badge {
    padding: 2px 7px;

    background: var(--surface-3);
    border-radius: 999px;

    color: var(--text-muted);

    font-size: 9px;
    font-style: normal;
    font-weight: 800;
    letter-spacing: 0.4px;
}

.tpl-badge.live {
    background: color-mix(in srgb, var(--success) 18%, transparent);
    color: var(--success);
}

.tpl-desc {
    color: var(--text-muted);
    font-size: 11px;
    line-height: 1.45;
}

/* Miniatura desenhada com as cores padrão do modelo */
.tpl-thumb {
    position: relative;

    display: block;
    height: 96px;

    overflow: hidden;

    background: var(--t-bg);
    border-radius: 10px;
    border: 1px solid color-mix(in srgb, var(--t-text) 12%, transparent);
}

.tpl-thumb i {
    position: absolute;
    display: block;
    border-radius: 4px;
}

.tt-head { left: 0; right: 0; top: 0; height: 16px; background: var(--t-head); border-radius: 0 !important; }
.tt-a { left: 8px; top: 24px; width: 40%; height: 46px; background: var(--t-card); }
.tt-b { right: 8px; top: 24px; width: 40%; height: 46px; background: var(--t-card); }
.tt-c { left: 8px; top: 30px; width: 30%; height: 22px; background: var(--t-frame); opacity: 0.85; }
.tt-buy { left: 8px; bottom: 10px; width: 40%; height: 10px; background: var(--t-buy); border-radius: 999px !important; }

.tpl-thumb[data-tpl="aurora"] .tt-head { left: 8px; right: 8px; top: 6px; height: 14px; border-radius: 6px !important; }
.tpl-thumb[data-tpl="aurora"] .tt-a { left: 8px; right: 8px; width: auto; top: 26px; height: 52px; border-radius: 10px; }
.tpl-thumb[data-tpl="aurora"] .tt-b { display: none; }
.tpl-thumb[data-tpl="aurora"] .tt-c { left: 14px; right: 14px; width: auto; top: 31px; height: 30px; border: 2px solid var(--t-frame); background: var(--t-accent); border-radius: 8px; }
.tpl-thumb[data-tpl="aurora"] .tt-buy { left: 25%; width: 50%; bottom: 6px; }

.tpl-thumb[data-tpl="noir"] .tt-head { height: 22px; background: radial-gradient(60% 120% at 50% 0%, color-mix(in srgb, var(--t-accent) 60%, transparent), var(--t-bg)); }
.tpl-thumb[data-tpl="noir"] .tt-a { left: 35%; width: 30%; top: 26px; height: 64px; }
.tpl-thumb[data-tpl="noir"] .tt-b { display: none; }
.tpl-thumb[data-tpl="noir"] .tt-c { left: 37%; width: 26%; top: 29px; height: 38px; background: color-mix(in srgb, var(--t-text) 30%, var(--t-card)); }
.tpl-thumb[data-tpl="noir"] .tt-buy { left: 37%; width: 26%; bottom: 10px; height: 8px; border-radius: 2px !important; }

.tpl-thumb[data-tpl="prisma"] .tt-a,
.tpl-thumb[data-tpl="prisma"] .tt-b { top: 26px; height: 40px; background: linear-gradient(135deg, var(--t-accent), var(--t-frame)); border-radius: 8px; }
.tpl-thumb[data-tpl="prisma"] .tt-c { display: none; }

.tpl-thumb[data-tpl="eclipse"] .tt-a { left: 8px; right: 8px; width: auto; height: 34px; background: color-mix(in srgb, var(--t-accent) 30%, var(--t-card)); }
.tpl-thumb[data-tpl="eclipse"] .tt-b { left: 8px; right: 8px; width: auto; top: 64px; height: 16px; }
.tpl-thumb[data-tpl="eclipse"] .tt-c { display: none; }
.tpl-thumb[data-tpl="eclipse"] .tt-buy { left: auto; right: 14px; width: 20%; bottom: 14px; height: 8px; }

.tpl-thumb[data-tpl="brisa"] .tt-head { height: 26px; left: 6px; right: 6px; border-radius: 0 0 10px 10px !important; }
.tpl-thumb[data-tpl="brisa"] .tt-a { left: 8px; right: 8px; width: auto; top: 34px; height: 24px; }
.tpl-thumb[data-tpl="brisa"] .tt-b { left: 8px; right: 8px; width: auto; top: 62px; height: 24px; }
.tpl-thumb[data-tpl="brisa"] .tt-c { left: 12px; top: 37px; width: 22%; height: 18px; }
.tpl-thumb[data-tpl="brisa"] .tt-buy { left: auto; right: 14px; width: 26%; bottom: 40px; height: 7px; }

.tpl-thumb[data-tpl="neon"] .tt-head { display: none; }
.tpl-thumb[data-tpl="neon"] .tt-c { left: 10px; top: 8px; width: 18px; height: 18px; border-radius: 50%; background: none; border: 2px solid var(--t-frame); opacity: 1; box-shadow: 24px 0 0 -2px var(--t-accent), 48px 0 0 -2px var(--t-frame); }
.tpl-thumb[data-tpl="neon"] .tt-a,
.tpl-thumb[data-tpl="neon"] .tt-b { top: 34px; height: 48px; border: 1px solid var(--t-accent); box-shadow: 0 0 8px var(--t-accent); }
.tpl-thumb[data-tpl="neon"] .tt-buy { bottom: 18px; left: 12px; width: 32%; }

.color-fields {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 4px 18px;
}

.color-field label {
    margin-top: 10px !important;
}

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

.color-input input[type="color"] {
    width: 44px !important;
    height: 40px;
    padding: 3px !important;
    flex-shrink: 0;
    cursor: pointer;
}

.color-input input[type="text"] {
    flex: 1;
    min-width: 0;
    font-family: ui-monospace, Menlo, Consolas, monospace;
    text-transform: lowercase;
}

.color-reset {
    width: 34px;
    height: 34px;
    flex-shrink: 0;

    background: var(--surface-3);
    border: 1px solid var(--border);
    border-radius: 8px;

    color: var(--text-soft);
}

.color-field.custom label::after {
    content: " • alterada";
    color: var(--accent);
    font-weight: 700;
}

.appearance-save {
    position: sticky;
    bottom: 12px;
    z-index: 5;

    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 12px;

    margin-top: 16px;
    padding: 14px 16px;

    background: color-mix(in srgb, var(--surface) 94%, transparent);
    border: 1px solid var(--border-strong);
    border-radius: var(--radius);

    backdrop-filter: blur(10px);
}

.appearance-save .primary-button:disabled {
    opacity: 0.45;
    cursor: default;
    transform: none;
}

.appearance-status,
.inline-message {
    color: var(--text-muted);
    font-size: 12px;
    line-height: 1.5;
}

.inline-message {
    margin-top: 12px;
}

[data-kind="ok"] { color: var(--success) !important; }
[data-kind="warn"] { color: var(--warning) !important; }
[data-kind="error"] { color: var(--danger) !important; }

.appearance-preview {
    position: sticky;
    top: 92px;
}

.preview-switch {
    display: inline-flex;
    gap: 4px;

    margin-bottom: 10px;
    padding: 4px;

    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 10px;
}

.preview-switch button {
    padding: 7px 12px;

    background: transparent;
    border: 0;
    border-radius: 7px;

    color: var(--text-muted);

    font-size: 12px;
    font-weight: 700;
}

.preview-switch button[aria-pressed="true"] {
    background: var(--surface-3);
    color: var(--text);
}

.preview-frame {
    position: relative;
    overflow: hidden;

    background: #000;
    border: 8px solid var(--surface-3);
    border-radius: 34px;

    box-shadow: 0 24px 60px -30px rgb(var(--shadow-color) / calc(0.8 * var(--shadow-alpha)));
}

.preview-frame[data-size="phone"] {
    width: 390px;
    max-width: 100%;
    height: 720px;
}

.preview-frame[data-size="phone"] iframe {
    width: 100%;
    height: 100%;
    border: 0;
}

.preview-frame[data-size="desktop"] {
    width: 100%;
    aspect-ratio: 16 / 11;
    border-radius: 14px;
}

.preview-frame[data-size="desktop"] iframe {
    width: 1280px;
    height: 880px;
    border: 0;
    transform: scale(0.3125);
    transform-origin: 0 0;
}

.preview-note {
    margin-top: 10px;
    color: var(--text-muted);
    font-size: 11px;
}

@media (max-width: 1180px) {
    .appearance-layout {
        grid-template-columns: minmax(0, 1fr);
    }

    .appearance-preview {
        position: static;
        order: -1;
    }

    .preview-frame[data-size="phone"] {
        margin: 0 auto;
        height: 600px;
    }

    .preview-switch {
        display: none;
    }
}

@media (max-width: 560px) {
    .color-fields {
        grid-template-columns: 1fr;
    }

    .appearance-head {
        flex-direction: column;
    }

    .preview-frame[data-size="phone"] {
        height: 520px;
        border-width: 6px;
        border-radius: 24px;
    }
}


/* =========================================================
   PARTILHA E CÓPIA DE LOJA
========================================================= */

.share-note {
    display: block;
    margin-top: 10px !important;
    color: var(--text-muted) !important;
    font-size: 11px !important;
}

#shareToken {
    font-family: ui-monospace, Menlo, Consolas, monospace;
    letter-spacing: 0.5px;
}

.import-summary {
    margin-top: 16px;
    padding: 18px;

    background: var(--bg-soft);
    border: 1px solid var(--border);
    border-radius: 12px;
}

.import-title {
    font-size: 15px;
}

.import-facts {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;

    margin: 10px 0 14px;
    padding: 0;

    list-style: none;
}

.import-facts li {
    padding: 5px 10px;

    background: var(--surface-3);
    border-radius: 999px;

    color: var(--text-soft);

    font-size: 11px;
    font-weight: 700;
}

.import-mode {
    margin: 0 0 14px;
    padding: 0;
    border: 0;
}

.import-mode legend {
    margin-bottom: 8px;
    font-size: 12px;
    font-weight: 700;
}

.import-mode label {
    display: flex !important;
    align-items: flex-start;
    gap: 8px;

    margin: 6px 0 !important;

    color: var(--text-soft) !important;

    font-size: 12px !important;
    font-weight: 500 !important;
    line-height: 1.45;
    cursor: pointer;
}

.import-mode input {
    width: auto !important;
    margin-top: 2px;
}

.import-warning {
    margin-bottom: 14px;
    padding: 12px 14px;

    background: color-mix(in srgb, var(--warning) 12%, transparent);
    border: 1px solid color-mix(in srgb, var(--warning) 40%, transparent);
    border-radius: 10px;

    color: var(--text-soft);

    font-size: 12px;
    line-height: 1.55;
}

.review-banner {
    display: flex;
    align-items: flex-start;
    gap: 14px;

    margin-bottom: 18px;
    padding: 18px 20px;

    background: color-mix(in srgb, var(--warning) 12%, var(--surface));
    border: 1px solid color-mix(in srgb, var(--warning) 55%, transparent);
    border-radius: var(--radius);
}

.review-banner[hidden] {
    display: none;
}

.review-icon {
    color: var(--warning);
    font-size: 22px;
    line-height: 1;
}

.review-text {
    flex: 1;
    font-size: 13px;
    line-height: 1.55;
}

.review-text p {
    margin-top: 5px;
    color: var(--text-soft);
}

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

.review-actions a {
    display: inline-flex;
    align-items: center;
}

.review-badge {
    display: inline-block !important;

    margin-bottom: 8px;
    padding: 4px 9px;

    background: color-mix(in srgb, var(--warning) 16%, transparent);
    border: 1px solid color-mix(in srgb, var(--warning) 45%, transparent);
    border-radius: 999px;

    color: var(--warning) !important;

    font-size: 10px !important;
    font-weight: 800;
}

.admin-item.needs-review {
    border-color: color-mix(in srgb, var(--warning) 55%, var(--border));
}

#appearance,
#shareStore,
#importStore {
    scroll-margin-top: 100px;
}

@media (max-width: 760px) {
    .review-banner {
        flex-direction: column;
    }
}


/* =========================================================
   LOGÓTIPO
========================================================= */

.brand-text .hf-logo {
    font-size: 26px;
}

.mobile-brand .hf-logo {
    font-size: 22px;
}

.login-box h1::before {
    content: none;
    display: none;
}

.login-logo {
    margin-bottom: 26px;
    font-size: 28px;
}

/* O nome da marca escreve-se "Hotflixx" (sem maiúsculas forçadas) */
.welcome-area .eyebrow {
    text-transform: none;
    letter-spacing: 0.4px;
    font-size: 11px;
}


/* =========================================================
   CONTINUAR COM GOOGLE
========================================================= */

.google-login[hidden] {
    display: none;
}

.login-divider {
    display: flex;
    align-items: center;
    gap: 12px;

    margin: 18px 0 14px;

    color: var(--text-muted);

    font-size: 12px;
}

.login-divider::before,
.login-divider::after {
    content: "";
    flex: 1;
    height: 1px;
    background: var(--border);
}

.google-button {
    display: flex;
    justify-content: center;
    min-height: 44px;
}

#message a {
    color: var(--accent);
    font-weight: 700;
    text-decoration: underline;
}

/* O botão do Google vem dentro de um iframe: sem isto, no modo escuro
   o browser pinta um fundo branco à volta (diferença de color-scheme). */
.google-button iframe {
    color-scheme: light;
    background: transparent !important;
    margin: 0 !important;
}

.google-button > div {
    display: flex;
    justify-content: center;
    width: 100%;
}


/* =========================================================
   HOSPEDAGEM DE CAPAS E PRÉVIAS (media.hotflixx.app)
========================================================= */

.media-field-row {
    display: flex;
    gap: 8px;
    align-items: stretch;
}

.media-field-row > input {
    flex: 1;
    min-width: 0;
}

.media-host-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    flex: none;

    min-height: 40px;
    padding: 0 14px;

    background: color-mix(in srgb, var(--accent) 14%, var(--surface));
    border: 1px solid color-mix(in srgb, var(--accent) 55%, var(--border));
    border-radius: 8px;

    color: var(--text);
    font: inherit;
    font-size: 12px;
    font-weight: 700;
    white-space: nowrap;
    cursor: pointer;

    transition: background var(--transition), border-color var(--transition), transform var(--transition);
}

.media-host-button svg {
    width: 16px;
    height: 16px;
    color: var(--accent);
}

.media-host-button:hover {
    background: color-mix(in srgb, var(--accent) 24%, var(--surface));
    transform: translateY(-1px);
}

.media-host-button:disabled {
    opacity: 0.6;
    cursor: progress;
    transform: none;
}

.media-host-button.locked {
    background: var(--surface-2);
    border: 1px dashed var(--border-strong);
    color: var(--text-muted);
}

.media-host-button.locked svg {
    color: var(--text-muted);
}

.media-host-button[hidden] {
    display: none;
}

.media-progress {
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin-top: 8px;

    color: var(--text-muted);
    font-size: 12px;
}

.media-progress[hidden] {
    display: none;
}

.media-progress-bar {
    height: 5px;
    overflow: hidden;
    background: var(--surface-3);
    border-radius: 5px;
}

.media-progress-bar i {
    display: block;
    height: 100%;
    width: 0;
    background: var(--accent);
    transition: width 0.2s ease;
}

.media-progress-bar.indeterminate i {
    width: 35%;
    animation: media-indeterminate 1.1s infinite ease-in-out;
}

@keyframes media-indeterminate {
    from { transform: translateX(-100%); }
    to { transform: translateX(300%); }
}

.media-progress[data-state="done"] { color: var(--success); }
.media-progress[data-state="done"] .media-progress-bar { display: none; }
.media-progress[data-state="error"] { color: var(--danger); }
.media-progress[data-state="error"] .media-progress-bar { display: none; }

.preview-add-row {
    flex-wrap: wrap;
}

/* Cartão na Visão geral */

.hosting-card {
    display: flex;
    align-items: center;
    gap: 14px;

    margin-top: 10px;
    padding: 14px 16px;

    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
}

.hosting-card.locked {
    border-style: dashed;
    border-color: var(--border-strong);
}

.hosting-card-icon {
    display: grid;
    place-items: center;
    flex: none;

    width: 40px;
    height: 40px;

    background: color-mix(in srgb, var(--accent) 14%, transparent);
    border-radius: 10px;
    color: var(--accent);
}

.hosting-card.locked .hosting-card-icon {
    background: var(--surface-3);
    color: var(--text-muted);
}

.hosting-card-icon svg {
    width: 20px;
    height: 20px;
}

.hosting-card-body {
    display: flex;
    flex-direction: column;
    gap: 3px;
    flex: 1;
    min-width: 0;
}

.hosting-card-body strong {
    font-size: 14px;
}

.hosting-card-body small {
    color: var(--text-muted);
    font-size: 12px;
}

.hosting-meter {
    display: block;
    height: 6px;
    max-width: 320px;
    margin-top: 4px;
    overflow: hidden;
    background: var(--surface-3);
    border-radius: 6px;
}

.hosting-meter i {
    display: block;
    height: 100%;
    background: var(--accent);
}

.hosting-meter.full i {
    background: var(--danger);
}

.hosting-card .secondary-button {
    flex: none;
}

@media (max-width: 640px) {
    .hosting-card {
        flex-wrap: wrap;
    }

    .hosting-card .secondary-button {
        width: 100%;
    }

    .media-field-row {
        flex-direction: column;
    }
}

/* Janela "hospedagem bloqueada" */

.hosting-dialog {
    position: fixed;
    inset: 0;
    z-index: 2000;

    display: none;
    align-items: center;
    justify-content: center;
    padding: 16px;

    background: rgba(0, 0, 0, 0.6);
}

.hosting-dialog.open {
    display: flex;
}

.hosting-dialog-box {
    width: min(440px, 100%);
    max-height: calc(100vh - 32px);
    overflow: auto;
    padding: 26px 24px 22px;

    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 16px;
    color: var(--text);
    text-align: center;
}

.hosting-dialog-icon {
    display: grid;
    place-items: center;

    width: 52px;
    height: 52px;
    margin: 0 auto 12px;

    background: color-mix(in srgb, var(--accent) 14%, transparent);
    border-radius: 50%;
    color: var(--accent);
}

.hosting-dialog-icon svg {
    width: 24px;
    height: 24px;
}

.hosting-dialog-box h3 {
    margin-bottom: 8px;
    font-size: 19px;
}

.hosting-dialog-box p {
    color: var(--text-muted);
    font-size: 13px;
    line-height: 1.55;
}

.hosting-plan-list {
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin: 16px 0 10px;
    text-align: left;
}

.hosting-plan-row {
    display: grid;
    grid-template-columns: 1fr auto auto;
    gap: 12px;
    align-items: center;

    padding: 9px 12px;

    background: var(--surface-2);
    border: 1px solid var(--border);
    border-radius: 10px;

    font-size: 13px;
}

.hosting-plan-row span {
    color: var(--text-muted);
}

.hosting-plan-row em {
    color: var(--text);
    font-style: normal;
    font-weight: 700;
}

.hosting-dialog-note {
    margin-top: 4px;
}

.hosting-dialog-actions {
    display: flex;
    gap: 10px;
    justify-content: center;
    margin-top: 18px;
}

.hosting-dialog-actions > * {
    flex: 1;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
}


/* =========================================================
   PÁGINAS DO PAINEL (cada opção do menu mostra só o seu conteúdo)
========================================================= */

[data-page][hidden],
.catalog-tabs[hidden] {
    display: none !important;
}

.dashboard-section[data-page] {
    margin-bottom: 0;
    animation: page-in 0.22s ease;
}

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

@media (prefers-reduced-motion: reduce) {
    .dashboard-section[data-page] { animation: none; }
}

.menu-button {
    display: none;
    align-items: center;
    justify-content: center;
    flex: none;

    width: 40px;
    height: 40px;
    margin-right: 6px;

    background: var(--surface-2);
    border: 1px solid var(--border);
    border-radius: 10px;
    color: var(--text);
}

.sidebar-backdrop,
.bottom-nav {
    display: none;
}

/* Separadores Produtos | Categorias */

.catalog-tabs {
    display: inline-flex;
    gap: 4px;
    margin-bottom: 22px;
    padding: 4px;

    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 12px;
}

.catalog-tabs button {
    display: inline-flex;
    align-items: center;
    gap: 8px;

    min-height: 38px;
    padding: 0 16px;

    background: transparent;
    border: 0;
    border-radius: 9px;
    color: var(--text-muted);
    font: inherit;
    font-size: 13px;
    font-weight: 700;
}

.catalog-tabs button b {
    min-width: 22px;
    padding: 2px 7px;
    background: var(--surface-3);
    border-radius: 999px;
    color: var(--text-soft);
    font-size: 11px;
}

.catalog-tabs button.active {
    background: color-mix(in srgb, var(--accent) 14%, var(--surface-2));
    color: var(--text);
}

.catalog-tabs button.active b {
    background: var(--accent);
    color: var(--on-accent);
}

/* Configurações: conta */

.account-info {
    display: grid;
    gap: 10px;
    margin: 0 0 18px;
}

.account-info div {
    display: flex;
    justify-content: space-between;
    gap: 14px;
    padding: 12px 14px;
    background: var(--surface-2);
    border: 1px solid var(--border);
    border-radius: 10px;
}

.account-info dt {
    color: var(--text-muted);
    font-size: 12px;
}

.account-info dd {
    margin: 0;
    overflow: hidden;
    font-size: 13px;
    font-weight: 700;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.account-card .form-buttons a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
}


/* =========================================================
   PRODUTOS: destaques, prévias ordenáveis, ativar/desativar
========================================================= */

.chips-editor {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px;

    min-height: 46px;
    padding: 6px;

    background: var(--surface-2);
    border: 1px solid var(--border);
    border-radius: 10px;
    cursor: text;
}

.chips-editor:focus-within {
    border-color: var(--accent);
}

.chips-list {
    display: contents;
    list-style: none;
}

.chip {
    display: inline-flex;
    align-items: center;
    gap: 6px;

    padding: 5px 4px 5px 10px;

    background: var(--surface-3);
    border: 1px solid var(--border-strong);
    border-radius: 8px;

    font-size: 12px;
    font-weight: 700;
}

.chip-dot,
.admin-chips i {
    display: inline-block;
    width: 7px;
    height: 7px;
    background: var(--accent);
    border-radius: 50%;
}

.chip button {
    display: grid;
    place-items: center;

    width: 22px;
    height: 22px;

    background: transparent;
    border: 0;
    border-radius: 6px;
    color: var(--text-muted);
    font-size: 15px;
    line-height: 1;
}

.chip button:hover:not(:disabled) {
    background: var(--surface);
    color: var(--text);
}

.chip button:disabled {
    opacity: 0.3;
}

.chips-editor input {
    flex: 1 1 160px;
    min-width: 120px;
    min-height: 32px;
    margin: 0 !important;
    padding: 4px 6px !important;
    background: transparent !important;
    border: 0 !important;
    box-shadow: none !important;
}

.admin-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
    margin: 8px 0 6px;
    list-style: none;
}

.admin-chips li {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 3px 9px;
    background: var(--surface-2);
    border: 1px solid var(--border);
    border-radius: 7px;
    color: var(--text-soft);
    font-size: 11px;
    font-weight: 700;
}

/* Prévias ordenáveis */

.preview-order {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin: 0 0 12px;
    padding: 0;
    list-style: none;
}

.preview-item {
    display: grid;
    grid-template-columns: auto auto 76px minmax(0, 1fr) auto auto;
    align-items: center;
    gap: 10px;

    padding: 9px 10px;

    background: var(--surface-2);
    border: 1px solid var(--border);
    border-radius: 12px;

    transition: border-color 0.15s ease, opacity 0.15s ease;
}

.preview-item.dragging {
    opacity: 0.45;
}

.preview-item.drop-before {
    box-shadow: inset 0 3px 0 var(--accent);
}

.preview-item.drop-after {
    box-shadow: inset 0 -3px 0 var(--accent);
}

.preview-handle {
    color: var(--text-faint);
    font-size: 18px;
    cursor: grab;
    user-select: none;
}

.preview-number {
    display: grid;
    place-items: center;

    width: 26px;
    height: 26px;

    background: color-mix(in srgb, var(--accent) 16%, transparent);
    border-radius: 50%;
    color: var(--accent);
    font-size: 12px;
    font-weight: 800;
}

.preview-thumb {
    width: 76px;
    height: 44px;
    object-fit: cover;
    background: #000;
    border-radius: 7px;
}

.preview-info {
    min-width: 0;
}

.preview-info strong {
    font-size: 13px;
}

.preview-info p {
    overflow: hidden;
    margin-top: 2px;
    color: var(--text-faint);
    font-size: 11px;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.preview-move {
    display: flex;
    gap: 4px;
}

.preview-move button,
.preview-remove {
    min-width: 34px;
    min-height: 34px;
    padding: 0 9px;

    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 8px;
    color: var(--text);
    font-size: 13px;
    font-weight: 700;
}

.preview-move button:disabled {
    opacity: 0.3;
}

.preview-move button:hover:not(:disabled),
.preview-remove:hover {
    border-color: var(--accent);
}

.preview-remove {
    color: var(--danger);
}

/* Ativar / desativar produto */

.product-toggle {
    display: inline-flex !important;
    align-items: center;
    gap: 9px;
    margin-top: 8px;
    cursor: pointer;
}

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

.product-toggle-track {
    position: relative;
    flex: none;

    width: 38px;
    height: 22px;

    background: var(--surface-3);
    border: 1px solid var(--border-strong);
    border-radius: 999px;

    transition: background 0.2s ease;
}

.product-toggle-track::after {
    content: "";
    position: absolute;
    top: 2px;
    left: 2px;

    width: 16px;
    height: 16px;

    background: var(--text-muted);
    border-radius: 50%;

    transition: transform 0.2s ease, background 0.2s ease;
}

.product-toggle input:checked + .product-toggle-track {
    background: color-mix(in srgb, var(--success) 35%, var(--surface-3));
    border-color: var(--success);
}

.product-toggle input:checked + .product-toggle-track::after {
    transform: translateX(16px);
    background: var(--success);
}

.product-toggle input:focus-visible + .product-toggle-track {
    outline: 2px solid var(--accent);
    outline-offset: 2px;
}

.product-toggle-text {
    font-size: 12px;
    font-weight: 700;
}

.admin-item.is-hidden > img,
.admin-item.is-hidden > .product-video-thumb {
    opacity: 0.4;
    filter: grayscale(1);
}

.product-video-thumb {
    position: relative;
    width: 100%;
    aspect-ratio: 16 / 9;
    margin-bottom: 12px;
    overflow: hidden;
    background: #000;
    border-radius: 8px;
}

.product-video-thumb video {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.product-video-thumb span {
    position: absolute;
    top: 50%;
    left: 50%;
    display: grid;
    place-items: center;
    width: 42px;
    height: 42px;
    margin: -21px 0 0 -21px;
    background: rgba(255, 255, 255, 0.9);
    border-radius: 50%;
    color: #111;
    font-size: 15px;
}

.telegram-purchase-box {
    padding: 14px 16px;
    background: color-mix(in srgb, #229ed9 10%, var(--surface-2));
    border: 1px solid color-mix(in srgb, #229ed9 40%, var(--border));
    border-radius: 10px;
}

.telegram-purchase-box.warning {
    background: color-mix(in srgb, var(--warning) 10%, var(--surface-2));
    border-color: color-mix(in srgb, var(--warning) 45%, var(--border));
}

.telegram-purchase-box p {
    margin: 0;
}

.telegram-purchase-box a {
    color: var(--accent);
    font-weight: 700;
}

.apply-all-row {
    margin-top: 16px;
}


/* =========================================================
   MÉTRICAS
========================================================= */

.metrics-range {
    display: inline-flex;
    gap: 4px;
    padding: 4px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 12px;
}

.metrics-range button,
.m-tabs button {
    min-height: 34px;
    padding: 0 13px;
    background: transparent;
    border: 0;
    border-radius: 8px;
    color: var(--text-muted);
    font: inherit;
    font-size: 12px;
    font-weight: 700;
}

.metrics-range button[aria-pressed="true"],
.m-tabs button[aria-selected="true"] {
    background: var(--surface-3);
    color: var(--text);
}

.metrics-loading {
    padding: 30px 0;
    color: var(--text-muted);
}

.m-tiles {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 12px;
}

.m-tile {
    position: relative;
    display: flex;
    flex-direction: column;
    gap: 6px;

    padding: 18px;

    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
}

.m-tile-label,
.m-card-label {
    color: var(--text-muted);
    font-size: 12px;
    font-weight: 700;
}

.m-tile-value {
    font-size: 26px;
    font-weight: 800;
    letter-spacing: -0.5px;
    font-variant-numeric: tabular-nums;
}

.m-tile-hint {
    color: var(--text-faint);
    font-size: 11px;
}

.m-change {
    position: absolute;
    top: 16px;
    right: 16px;

    padding: 2px 8px;

    border-radius: 999px;

    font-size: 11px;
    font-weight: 800;
    font-variant-numeric: tabular-nums;
}

.m-change.up {
    background: color-mix(in srgb, var(--success) 16%, transparent);
    color: var(--success);
}

.m-change.down {
    background: color-mix(in srgb, var(--danger) 14%, transparent);
    color: var(--danger);
}

.m-change.flat {
    background: var(--surface-2);
    color: var(--text-muted);
}

.m-card {
    margin-top: 14px;
    padding: 20px;

    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
}

.m-card-head {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-start;
    justify-content: space-between;
    gap: 14px;
    margin-bottom: 14px;
}

.m-card-head > div:first-child {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.m-card-total {
    font-size: 30px;
    font-weight: 800;
    letter-spacing: -0.6px;
    font-variant-numeric: tabular-nums;
}

.m-card-sub {
    color: var(--text-faint);
    font-size: 12px;
}

.m-tabs {
    display: inline-flex;
    flex-wrap: wrap;
    gap: 2px;
    padding: 3px;
    background: var(--surface-2);
    border-radius: 10px;
}

.m-chart {
    position: relative;
}

.m-svg {
    display: block;
    width: 100%;
    height: 240px;
    overflow: visible;
    touch-action: pan-y;
}

.m-grid {
    stroke: var(--border);
    stroke-width: 1;
    vector-effect: non-scaling-stroke;
}

.m-axis {
    fill: var(--text-faint);
    font-size: 11px;
    font-family: inherit;
}

.m-line {
    fill: none;
    stroke: var(--accent);
    stroke-width: 2;
    stroke-linejoin: round;
    stroke-linecap: round;
    vector-effect: non-scaling-stroke;
}

.m-last,
.m-dot {
    fill: var(--accent);
    stroke: var(--surface);
    stroke-width: 2;
    vector-effect: non-scaling-stroke;
}

.m-cross {
    stroke: var(--text-faint);
    stroke-width: 1;
    stroke-dasharray: 3 3;
    vector-effect: non-scaling-stroke;
}

.m-tip {
    position: absolute;
    top: -6px;
    z-index: 2;

    display: flex;
    flex-direction: column;
    gap: 2px;

    min-width: 150px;
    padding: 9px 12px;

    background: var(--surface-3);
    border: 1px solid var(--border-strong);
    border-radius: 10px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);

    pointer-events: none;
}

.m-tip span,
.m-tip small {
    color: var(--text-muted);
    font-size: 11px;
}

.m-tip strong {
    font-size: 16px;
    font-variant-numeric: tabular-nums;
}

.m-empty-text {
    margin-top: 10px;
    color: var(--text-muted);
    font-size: 13px;
}

.m-grid2 {
    display: grid;
    grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr);
    gap: 14px;
}

.m-top {
    display: flex;
    flex-direction: column;
    margin: 0;
    padding: 0;
    list-style: none;
}

.m-top li {
    display: grid;
    grid-template-columns: 26px minmax(0, 1fr) auto auto auto;
    align-items: center;
    gap: 12px;
    padding: 10px 0;
    border-top: 1px solid var(--border);
    font-size: 13px;
}

.m-top li:first-child {
    border-top: 0;
}

.m-rank {
    display: grid;
    place-items: center;
    width: 24px;
    height: 24px;
    background: var(--surface-2);
    border-radius: 50%;
    color: var(--text-muted);
    font-size: 11px;
    font-weight: 800;
}

.m-top-name {
    overflow: hidden;
    font-weight: 700;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.m-top-num {
    color: var(--text-soft);
    font-variant-numeric: tabular-nums;
}

.m-top-num small {
    color: var(--text-faint);
}

.m-top-money {
    font-variant-numeric: tabular-nums;
}

.m-today {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
    margin: 0;
}

.m-today div {
    padding: 12px;
    background: var(--surface-2);
    border-radius: 10px;
}

.m-today dt {
    color: var(--text-muted);
    font-size: 11px;
}

.m-today dd {
    margin: 4px 0 0;
    font-size: 19px;
    font-weight: 800;
    font-variant-numeric: tabular-nums;
}

.m-note {
    margin-top: 12px;
    color: var(--text-faint);
    font-size: 11px;
    line-height: 1.5;
}

.m-table-card summary {
    color: var(--text-soft);
    font-size: 13px;
    font-weight: 700;
    cursor: pointer;
}

.m-table-wrap {
    max-height: 360px;
    margin-top: 12px;
    overflow: auto;
}

.m-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 12px;
    font-variant-numeric: tabular-nums;
}

.m-table th,
.m-table td {
    padding: 8px 10px;
    border-bottom: 1px solid var(--border);
    text-align: right;
    white-space: nowrap;
}

.m-table th:first-child,
.m-table td:first-child {
    text-align: left;
}

.m-table th {
    position: sticky;
    top: 0;
    background: var(--surface);
    color: var(--text-muted);
}

@media (max-width: 1000px) {
    .m-tiles {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .m-grid2 {
        grid-template-columns: 1fr;
    }
}


/* =========================================================
   TELEMÓVEL: menu lateral por cima + menu em baixo
========================================================= */

@media (max-width: 760px) {

    body {
        padding-bottom: calc(68px + env(safe-area-inset-bottom));
    }

    /* Menu lateral escondido, abre por cima */
    .sidebar {
        position: fixed;
        top: 0;
        bottom: 0;
        left: 0;
        z-index: 1200;

        width: min(300px, 86vw);
        height: 100%;
        padding: 22px 16px calc(18px + env(safe-area-inset-bottom));

        overflow-y: auto;

        border-right: 1px solid var(--border);
        border-bottom: 0;

        transform: translateX(-104%);
        transition: transform 0.25s ease;
    }

    body.menu-open .sidebar {
        transform: none;
        box-shadow: 20px 0 60px rgba(0, 0, 0, 0.45);
    }

    .sidebar-brand {
        padding: 0 8px 18px;
    }

    .sidebar-nav {
        flex-direction: column;
        overflow: visible;
        margin-top: 16px;
    }

    .nav-item {
        padding: 13px 12px;
        font-size: 15px;
    }

    .nav-item.active::before {
        display: block;
    }

    /* Perfil e "Terminar sessão" bem visíveis no fim do menu */
    .sidebar-bottom {
        display: block;
        padding-top: 16px;
    }

    .logout-button {
        justify-content: center;
        padding: 13px;
        border-color: var(--border-strong);
        color: var(--danger);
        font-size: 14px;
    }

    .sidebar-backdrop {
        position: fixed;
        inset: 0;
        z-index: 1100;
        display: block;
        background: rgba(0, 0, 0, 0.55);
        backdrop-filter: blur(2px);
    }

    .sidebar-backdrop[hidden] {
        display: none;
    }

    /* Topo compacto */
    .topbar {
        min-height: 60px;
        padding: 10px 14px;
        gap: 8px;
    }

    .menu-button {
        display: inline-flex;
    }

    .mobile-brand {
        display: none !important;
    }

    .topbar-page {
        display: flex;
        flex: 1;
        min-width: 0;
    }

    .topbar-label {
        display: none;
    }

    .topbar-page h1 {
        overflow: hidden;
        font-size: 17px;
        text-overflow: ellipsis;
        white-space: nowrap;
    }

    .topbar-right {
        gap: 6px;
    }

    .topbar-store-button span,
    .topbar-admin > div:last-child {
        display: none;
    }

    .topbar-store-button {
        width: 38px;
        padding: 0;
        justify-content: center;
    }

    /* Menu em baixo */
    .bottom-nav {
        position: fixed;
        right: 0;
        bottom: 0;
        left: 0;
        z-index: 1000;

        display: grid;
        grid-template-columns: repeat(5, 1fr);

        padding: 6px 6px calc(6px + env(safe-area-inset-bottom));

        background: color-mix(in srgb, var(--bg-soft) 94%, transparent);
        border-top: 1px solid var(--border);
        backdrop-filter: blur(16px);
    }

    .bottom-nav a,
    .bottom-nav button {
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        gap: 3px;

        min-height: 52px;

        background: transparent;
        border: 0;
        border-radius: 10px;
        color: var(--text-muted);
        font: inherit;
        font-size: 11px;
        font-weight: 700;
        text-decoration: none;
    }

    .bottom-nav span {
        font-size: 18px;
        line-height: 1;
    }

    .bottom-nav .active {
        color: var(--text);
        background: color-mix(in srgb, var(--accent) 12%, transparent);
    }

    .bottom-nav .active span {
        color: var(--accent);
    }

    .hd-watermark {
        bottom: calc(76px + env(safe-area-inset-bottom)) !important;
    }

    /* Conteúdo mais compacto */
    .dashboard {
        width: calc(100% - 24px);
        padding: 18px 0 40px;
    }

    .welcome-area h2 {
        font-size: 24px;
    }

    .stats-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 10px;
    }

    .stat-card {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
        min-height: 0;
        padding: 14px;
    }

    .stat-icon {
        width: 34px;
        height: 34px;
        font-size: 15px;
    }

    .stat-content strong {
        font-size: 20px;
    }

    .quick-actions {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 8px;
    }

    .quick-action {
        padding: 12px;
        gap: 10px;
    }

    .quick-action small {
        display: none;
    }

    .section-heading h2 {
        font-size: 22px;
    }

    .catalog-tabs {
        display: flex;
        width: 100%;
    }

    .catalog-tabs button {
        flex: 1;
        justify-content: center;
    }

    .metrics-range {
        width: 100%;
    }

    .metrics-range button {
        flex: 1;
    }

    .m-tile {
        padding: 14px;
    }

    .m-tile-value {
        font-size: 21px;
    }

    .m-change {
        position: static;
        align-self: flex-start;
    }

    .m-card {
        padding: 14px;
    }

    .m-card-total {
        font-size: 24px;
    }

    .m-svg {
        height: 190px;
    }

    .m-top li {
        grid-template-columns: 24px minmax(0, 1fr) auto;
    }

    .m-top li .m-top-num {
        display: none;
    }

    .preview-item {
        grid-template-columns: auto 64px minmax(0, 1fr);
        grid-template-areas:
            "num thumb info"
            "move move remove";
    }

    .preview-handle {
        display: none;
    }

    .preview-number { grid-area: num; }
    .preview-thumb { grid-area: thumb; width: 64px; height: 38px; }
    .preview-info { grid-area: info; }
    .preview-move { grid-area: move; }
    .preview-remove { grid-area: remove; justify-self: end; }

    .preview-move button {
        min-width: 42px;
        min-height: 40px;
    }

    .admin-form .form-buttons .delete-button {
        width: 100%;
    }
}

.m-tip[hidden] {
    display: none;
}

.nav-icon svg,
.bottom-nav svg {
    display: block;
    width: 18px;
    height: 18px;
    margin: 0 auto;
}

/* Cartões dos produtos: informação arrumada em linhas */
#productsList .admin-item > div > span {
    display: block;
    margin-top: 5px;
    color: var(--text-muted);
    font-size: 12px;
}

#productsList .admin-item > div > span strong {
    color: var(--text);
}

#productsList .admin-item .product-toggle {
    display: flex !important;
    margin-top: 12px;
}

/* Botão "Apagar" com o mesmo tamanho dos outros */
.delete-button,
.btn-delete {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 40px;
    padding: 10px 16px;
    border-radius: 8px;
    font: inherit;
    font-size: 12px;
    font-weight: 700;
    text-decoration: none;
    cursor: pointer;
}

#productsList .item-actions > button {
    flex: 1 1 0;
}


/* =========================================================
   TELEGRAM: abrir pelo @ ou por link encurtado
========================================================= */

.tg-mode {
    margin: 16px 0 0;
    padding: 14px 16px 16px;
    border: 1px solid var(--border);
    border-radius: 11px;
    background: var(--bg-soft);
    min-width: 0;
}

.tg-mode legend {
    padding: 0 6px;
    color: var(--text);
    font-size: 13px;
    font-weight: 700;
}

.tg-mode-option {
    display: flex !important;
    align-items: flex-start;
    gap: 10px;
    margin: 8px 0 0 !important;
    padding: 10px 12px;
    border: 1px solid var(--border);
    border-radius: 10px;
    cursor: pointer;
}

.tg-mode-option:has(input:checked) {
    border-color: var(--accent);
}

.tg-mode-option input {
    width: auto !important;
    margin: 3px 0 0 !important;
    accent-color: var(--accent);
    flex: 0 0 auto;
}

.tg-mode-option strong {
    display: block;
    color: var(--text);
    font-size: 13px;
}

.tg-mode-option small {
    display: block;
    margin-top: 3px;
    color: var(--text-muted);
    font-size: 11px;
    line-height: 1.5;
}

.tg-mode .form-field {
    margin-top: 12px;
}

.tg-mode .form-field[hidden] {
    display: none !important;
}


/* =========================================================
   SUPORTE TÉCNICO (painel do vendedor)
========================================================= */

.support-contacts {
    display: grid;
    gap: 12px;
}

.support-loading {
    margin: 0;
    color: var(--text-muted);
    font-size: 14px;
}

.support-contact {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 16px 18px;
    background: var(--bg-soft);
    border: 1px solid var(--border);
    border-radius: 14px;
    color: var(--text);
    text-decoration: none;
    transition: border-color .2s ease, transform .2s ease;
}

.support-contact:hover {
    border-color: var(--border-strong);
    transform: translateY(-1px);
}

.support-contact.primary {
    border-color: color-mix(in srgb, var(--accent) 55%, var(--border));
}

.support-icon {
    display: grid;
    place-items: center;
    width: 44px;
    height: 44px;
    flex: 0 0 auto;
    border-radius: 12px;
    background: var(--surface-3);
    color: var(--text);
}

.support-icon svg { width: 22px; height: 22px; }
.support-contact.whatsapp .support-icon { background: #15803d; color: #fff; }
.support-contact.telegram .support-icon { background: #229ed9; color: #fff; }
.support-contact.email .support-icon { background: var(--accent); color: #fff; }

.support-text {
    display: flex;
    flex-direction: column;
    gap: 3px;
    min-width: 0;
    flex: 1;
}

.support-text strong {
    font-size: 15px;
}

.support-text em {
    margin-left: 6px;
    padding: 2px 7px;
    border-radius: 999px;
    background: color-mix(in srgb, var(--accent) 16%, transparent);
    color: var(--accent);
    font-size: 10px;
    font-style: normal;
    font-weight: 800;
    vertical-align: 2px;
}

.support-text small {
    color: var(--text-muted);
    font-size: 13px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.support-action {
    flex: 0 0 auto;
    padding: 9px 14px;
    border-radius: 10px;
    background: var(--accent);
    color: #fff;
    font-size: 13px;
    font-weight: 700;
}

.support-hours,
.support-note {
    margin: 14px 0 0;
    color: var(--text-soft);
    font-size: 14px;
    line-height: 1.5;
}

.support-note {
    color: var(--text-muted);
}

.support-tip-list {
    margin: 0;
    padding-left: 20px;
    color: var(--text-soft);
    font-size: 14px;
    line-height: 1.8;
}

.support-legal {
    margin: 16px 0 0;
    font-size: 13px;
}

.support-legal a {
    color: var(--text-muted);
    text-decoration: underline;
}

@media (max-width: 520px) {
    .support-contact { flex-wrap: wrap; padding: 14px; }
    .support-action { width: 100%; text-align: center; }
}


/* =========================================================
   CARTÃO DA HOSPEDAGEM: dois botões
========================================================= */

.hosting-card-actions {
    display: inline-flex;
    flex-wrap: wrap;
    gap: 8px;
    justify-content: flex-end;
}

@media (max-width: 760px) {
    .hosting-card-actions {
        width: 100%;
        flex-direction: column;
    }
}

/* =========================================================
   MINHA NUVEM
========================================================= */

.cloud-usage-row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
}

.cloud-usage-row strong {
    font-size: 15px;
}

.cloud-usage-row .form-help {
    margin: 4px 0 0;
}

.cloud-usage-text {
    flex: 1;
    min-width: 220px;
}

.cloud-usage-text .hosting-meter {
    margin-top: 10px;
    max-width: 420px;
}

/* =========================================================
   NOVIDADES
========================================================= */

.nav-badge-count {
    margin-left: auto;
    min-width: 20px;
    padding: 2px 6px;
    border-radius: 999px;
    background: var(--accent);
    color: #fff;
    font-size: 11px;
    font-weight: 800;
    text-align: center;
}

.nav-badge-count[hidden] {
    display: none;
}

body.has-news #menuButton {
    position: relative;
}

body.has-news #menuButton::after {
    content: "";
    position: absolute;
    top: 6px;
    right: 6px;
    width: 9px;
    height: 9px;
    border-radius: 50%;
    background: var(--accent);
    box-shadow: 0 0 0 2px var(--bg, #000);
}

.news-list {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.news-item {
    padding: 18px 20px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
}

.news-item.unread {
    border-color: color-mix(in srgb, var(--accent) 55%, var(--border));
}

.news-meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
    margin-bottom: 8px;
}

.news-meta time {
    color: var(--text-muted);
    font-size: 12px;
}

.news-tag {
    padding: 3px 9px;
    border-radius: 999px;
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 0.3px;
    text-transform: uppercase;
    background: var(--surface-3);
    color: var(--text-soft);
}

.news-tag.novo { background: color-mix(in srgb, var(--success) 18%, transparent); color: var(--success); }
.news-tag.melhoria { background: color-mix(in srgb, #3b82f6 20%, transparent); color: #60a5fa; }
.news-tag.correcao { background: var(--surface-3); color: var(--text-soft); }
.news-tag.aviso { background: color-mix(in srgb, var(--warning) 20%, transparent); color: var(--warning); }

.news-new {
    color: var(--accent);
    font-size: 11px;
    font-weight: 800;
}

.news-item h3 {
    margin: 0 0 6px;
    font-size: 17px;
}

.news-item p {
    margin: 0;
    color: var(--text-soft);
    font-size: 14px;
    line-height: 1.6;
}

.news-link {
    display: inline-block;
    margin-top: 10px;
    color: var(--accent);
    font-size: 14px;
    font-weight: 700;
    text-decoration: none;
}

/* =========================================================
   ENDEREÇO DA LOJA
========================================================= */

.slug-label {
    display: block;
    margin-bottom: 8px;
    color: var(--text-soft);
    font-size: 13px;
    font-weight: 700;
}

.slug-field {
    display: flex;
    align-items: stretch;
    max-width: 560px;
    border: 1px solid var(--border-strong);
    border-radius: 10px;
    overflow: hidden;
    background: var(--surface);
}

.slug-field:focus-within {
    border-color: var(--accent);
}

.slug-prefix {
    display: flex;
    align-items: center;
    padding: 0 10px;
    background: var(--surface-3);
    color: var(--text-muted);
    font-size: 13px;
    white-space: nowrap;
}

.slug-field input {
    flex: 1;
    min-width: 0;
    margin: 0 !important;
    border: 0 !important;
    border-radius: 0 !important;
    background: transparent !important;
    box-shadow: none !important;
}

#slugMessage[data-kind="ok"] { color: var(--success); }
#slugMessage[data-kind="error"] { color: var(--danger); }

.store-link-change {
    margin-top: 6px;
}

.store-link-change a {
    color: var(--accent);
    font-weight: 700;
}

.switch-extra {
    margin-top: 2px !important;
}

@media (max-width: 520px) {
    .slug-field {
        flex-direction: column;
    }

    .slug-prefix {
        padding: 8px 10px;
    }
}

/* =========================================================
   AVISO DAS MÉTRICAS
========================================================= */

.notice-overlay {
    position: fixed;
    inset: 0;
    z-index: 3000;
    display: grid;
    place-items: center;
    padding: 16px;
    background: rgba(0, 0, 0, 0.7);
    opacity: 0;
    transition: opacity 0.18s ease;
}

.notice-overlay.open {
    opacity: 1;
}

.notice-box {
    width: min(460px, 100%);
    padding: 26px 24px 22px;
    border: 1px solid color-mix(in srgb, var(--warning) 45%, var(--border));
    border-radius: 18px;
    background: var(--surface);
    color: var(--text);
    text-align: center;
    box-shadow: 0 24px 60px rgba(0, 0, 0, 0.45);
}

.notice-icon {
    font-size: 34px;
    line-height: 1;
}

.notice-box h3 {
    margin: 10px 0 10px;
    color: var(--warning);
    font-size: 21px;
}

.notice-box p {
    margin: 0 0 10px;
    color: var(--text-soft);
    font-size: 15px;
    line-height: 1.6;
}

.notice-box .primary-button {
    margin-top: 8px;
    min-width: 160px;
}

/* Botão "Hospedar imagem" nos métodos de pagamento */
.media-host-button.media-host-small {
    font-size: 13px;
    opacity: 1;
}


/* =========================================================
   CONFIGURAÇÃO DA COMPRA: modo do botão + métodos de pagamento
========================================================= */

.purchase-mode-select {
    position: absolute !important;
    width: 1px !important;
    height: 1px !important;
    opacity: 0 !important;
    pointer-events: none;
}

.purchase-mode-cards {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 10px;
    margin-top: 6px;
}

.pmode {
    position: relative;
    display: flex !important;
    align-items: flex-start;
    gap: 12px;
    margin: 0 !important;
    padding: 14px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 12px;
    cursor: pointer;
    transition: border-color .15s ease, background .15s ease;
}

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

.pmode:hover {
    border-color: var(--border-strong);
}

.pmode.active,
.pmode:has(input:checked) {
    border-color: var(--accent);
    background: color-mix(in srgb, var(--accent) 8%, var(--surface));
    box-shadow: inset 0 0 0 1px var(--accent);
}

.pmode:has(input:focus-visible) {
    outline: 2px solid var(--accent);
    outline-offset: 2px;
}

.pmode-icon {
    display: grid;
    place-items: center;
    width: 38px;
    height: 38px;
    flex: 0 0 auto;
    border-radius: 10px;
    background: var(--surface-3);
    color: var(--text);
}

.pmode.active .pmode-icon,
.pmode:has(input:checked) .pmode-icon {
    background: var(--accent);
    color: #fff;
}

.pmode-icon svg {
    width: 20px;
    height: 20px;
}

.pmode-text strong {
    display: block;
    color: var(--text);
    font-size: 14px;
}

.pmode-text small {
    display: block;
    margin-top: 3px;
    color: var(--text-muted);
    font-size: 12px;
    line-height: 1.4;
}

/* Métodos prontos */

.preset-picker {
    margin: 14px 0 18px;
}

.preset-title {
    margin: 0 0 10px !important;
    color: var(--text);
    font-size: 14px;
    font-weight: 700;
}

.preset-title small {
    margin-left: 6px;
    color: var(--text-muted);
    font-weight: 500;
}

.preset-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 8px;
}

.preset-tile {
    position: relative;
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 0;
    padding: 9px 34px 9px 9px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 11px;
    color: var(--text);
    font: inherit;
    font-size: 13px;
    font-weight: 700;
    text-align: left;
    cursor: pointer;
}

.preset-tile:hover {
    border-color: var(--border-strong);
}

.preset-tile img {
    width: 30px;
    height: 30px;
    flex: 0 0 auto;
    border-radius: 8px;
    object-fit: contain;
}

.preset-tile span {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.preset-tile b {
    position: absolute;
    right: 10px;
    top: 50%;
    display: grid;
    place-items: center;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: var(--surface-3);
    color: var(--text-soft);
    font-size: 13px;
    transform: translateY(-50%);
}

.preset-tile.added {
    border-color: color-mix(in srgb, var(--success) 60%, var(--border));
}

.preset-tile.added b {
    background: var(--success);
    color: #fff;
}

.pm-list-head {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    margin: 4px 0 10px;
    font-size: 14px;
}

.pm-list-head span {
    color: var(--text-muted);
    font-size: 12px;
}

.pm-empty {
    margin: 0 0 12px;
    padding: 18px;
    border: 1px dashed var(--border-strong);
    border-radius: 12px;
    color: var(--text-muted);
    font-size: 13px;
    text-align: center;
}

#paymentMethodsList {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-bottom: 12px;
}

.pm-card {
    padding: 14px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 12px;
}

.pm-card.flash {
    animation: pm-flash 1.2s ease;
}

@keyframes pm-flash {
    0%, 40% { border-color: var(--accent); box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 30%, transparent); }
    100% { border-color: var(--border); box-shadow: none; }
}

.pm-head {
    display: flex;
    align-items: center;
    gap: 12px;
}

.pm-logo {
    width: 40px;
    height: 40px;
    flex: 0 0 auto;
    border-radius: 10px;
    object-fit: contain;
}

.pm-logo.empty {
    display: block;
}

.pm-title {
    flex: 1;
    min-width: 0;
}

.pm-title strong {
    display: block;
    overflow: hidden;
    color: var(--text);
    font-size: 15px;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.pm-title small {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: var(--text-muted);
    font-size: 12px;
}

.pm-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.25);
}

.pm-tools {
    display: inline-flex;
    gap: 4px;
}

.pm-tools button {
    width: 32px;
    height: 32px;
    border: 1px solid var(--border);
    border-radius: 8px;
    background: transparent;
    color: var(--text-soft);
    font-size: 14px;
    cursor: pointer;
}

.pm-tools button:disabled {
    opacity: 0.3;
    cursor: default;
}

.pm-tools button.danger:hover {
    border-color: var(--danger);
    color: var(--danger);
}

.pm-grid {
    display: grid;
    grid-template-columns: 1fr 120px;
    gap: 10px;
    margin-top: 12px;
}

.pm-field {
    display: flex !important;
    flex-direction: column;
    gap: 6px;
    margin: 10px 0 0 !important;
    min-width: 0;
}

.pm-grid .pm-field {
    margin-top: 0 !important;
}

.pm-field > span,
.pm-label {
    color: var(--text-soft);
    font-size: 12px;
    font-weight: 700;
}

.pm-color-field input {
    height: 44px;
    padding: 4px !important;
}

.pm-dest {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px dashed var(--border);
}

.pm-seg {
    display: inline-flex;
    flex-wrap: wrap;
    gap: 4px;
    padding: 3px;
    background: var(--bg-soft, var(--surface-2));
    border: 1px solid var(--border);
    border-radius: 10px;
    align-self: flex-start;
}

.pm-seg label {
    position: relative;
    margin: 0 !important;
    padding: 7px 12px;
    border-radius: 7px;
    color: var(--text-muted);
    font-size: 12px;
    font-weight: 700;
    cursor: pointer;
}

.pm-seg label input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.pm-seg label.on {
    background: var(--accent);
    color: #fff;
}

.pm-seg label.off {
    opacity: 0.4;
    cursor: not-allowed;
}

.pm-dest input[data-field="redirect_url"] {
    margin: 0 !important;
}

.pm-note {
    margin: 0 !important;
    color: var(--text-muted);
    font-size: 12px;
    line-height: 1.5;
}

.pm-note.muted {
    color: var(--text-faint, var(--text-muted));
}

/* Pergunta: usar o link do Stripe nos outros botões */

.stripe-ask {
    margin-top: 12px;
    padding: 14px;
    border: 1px solid color-mix(in srgb, #635bff 55%, var(--border));
    border-radius: 12px;
    background: color-mix(in srgb, #635bff 10%, transparent);
}

.stripe-ask strong {
    display: block;
    color: var(--text);
    font-size: 14px;
}

.stripe-ask p {
    margin: 4px 0 10px !important;
    color: var(--text-muted);
    font-size: 12px;
}

.stripe-ask-list {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 6px;
}

.stripe-ask-list label {
    display: flex !important;
    align-items: center;
    gap: 8px;
    margin: 0 !important;
    padding: 7px 9px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 9px;
    color: var(--text);
    font-size: 13px;
    cursor: pointer;
}

.stripe-ask-list label.done {
    opacity: 0.6;
}

.stripe-ask-list input {
    width: auto !important;
    margin: 0 !important;
    accent-color: #635bff;
}

.stripe-ask-list img {
    width: 22px;
    height: 22px;
    border-radius: 6px;
}

.stripe-ask-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 12px;
}

@media (max-width: 760px) {
    .purchase-mode-cards {
        grid-template-columns: 1fr;
    }

    .preset-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .pm-grid {
        grid-template-columns: 1fr 90px;
    }

    .stripe-ask-list {
        grid-template-columns: 1fr;
    }

    .stripe-ask-actions button {
        flex: 1;
    }
}

.tg-default-logo {
    width: 18px;
    height: 18px;
    margin-left: 4px;
    border-radius: 50%;
    vertical-align: -4px;
}

/* Métricas: período + repor */
.metrics-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.metrics-actions[hidden] { display: none; }
.metrics-reset {
    display: inline-flex; align-items: center; gap: 6px; height: 38px; padding: 0 14px;
    border-radius: 10px; border: 1px solid var(--border); background: var(--surface-2);
    color: var(--text); font: inherit; font-size: 13px; font-weight: 700; cursor: pointer;
}
.metrics-reset:hover:not(:disabled) { border-color: var(--danger); color: var(--danger); }
.metrics-reset:disabled { opacity: .6; cursor: default; }
.m-reset-note {
    margin: 0 0 14px; padding: 10px 14px; border-radius: 10px; font-size: 13px;
    background: var(--surface-2); border: 1px solid var(--border); color: var(--text-muted);
}

/* Métricas em pausa (temporário) */
.metrics-paused {
    display: flex; flex-direction: column; align-items: center; gap: 10px; text-align: center;
    padding: 42px 20px; border-radius: 14px; border: 1px dashed var(--border); background: var(--surface-2);
}
.metrics-paused-icon { font-size: 30px; line-height: 1; }
.metrics-paused p { margin: 0; max-width: 460px; font-size: 15px; font-weight: 600; color: var(--text); line-height: 1.5; }
