/* TCGC shared interface: storefront, seller portal and administration. */
:root {
    --tcgc-crimson: #9b111e;
    --tcgc-crimson-dark: #7f0e18;
    --tcgc-gold: #c5a028;
    --tcgc-ink: #18181b;
    --tcgc-muted: #62626d;
    --tcgc-line: #e4e4e7;
    --tcgc-radius: 12px;
}
html { scroll-padding-top: 100px; }
body { -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility; }
button, input, select, textarea { font: inherit; }
button, a, input, select, textarea { -webkit-tap-highlight-color: transparent; }
button, .btn, .portal-btn, .head-btn { touch-action: manipulation; }
:where(a, button, input, select, textarea, summary):focus-visible {
    outline: 3px solid var(--tcgc-crimson);
    outline-offset: 3px;
}
button:disabled, input:disabled, select:disabled, .btn[aria-disabled="true"] {
    cursor: not-allowed; opacity: .55;
}
.skip-link { position: fixed; top: 12px; left: 12px; transform: translateY(-180%); z-index: 1000; padding: 12px 18px; border-radius: 8px; background: #9b111e; color: #fff; }
.skip-link:focus { transform: none; }
.fa-solid { flex-shrink: 0; }
.btn, .portal-btn, .head-btn { gap: 8px; }
.main { padding-top: 36px; }
.main .topbar { margin-bottom: 28px; gap: 20px; }
.main .page-title, .main .topbar h1 { font-size: clamp(25px, 2.4vw, 32px); font-weight: 700; letter-spacing: -.035em; }
.main .page-copy { font-size: 14px; line-height: 1.65; max-width: 68ch; }
.side { background: #fff; }
.admin-nav-toggle { display: none; }
[hidden] { display: none !important; }
.side-group { font-size: 10px; color: #71717a; letter-spacing: .1em; }
.side .nav-icon { font-size: 15px; color: #71717a; }
.side a { margin: 1px 0; min-height: 44px; }
.side a.active { background: #fdf2f3; box-shadow: inset 3px 0 #9b111e; border-color: transparent; }
.side a.active .nav-icon { color: #9b111e; }
.user-meta strong { font-size: 12px; }
.user-meta small { font-size: 10px; letter-spacing: .035em; }
.main .card, .auth-shell .card { border-radius: 12px; box-shadow: 0 2px 8px rgba(24,24,27,.035) !important; }
.btn-primary, .tab.active, .tab-link.active { background: #9b111e !important; box-shadow: none !important; }
.btn-primary:hover, .tab.active:hover, .tab-link.active:hover { background: #7f0e18 !important; }
.label { font-size: 13px; font-weight: 600; letter-spacing: 0; }
.notice { border-radius: 10px; line-height: 1.6; }
.main table { font-variant-numeric: tabular-nums; }
.main table th { font-size: 11px; letter-spacing: .035em; }
.main table td { line-height: 1.5; }
.main .spreadsheet-wrap, .main .table-wrap { overscroll-behavior-inline: contain; scrollbar-width: thin; }
.auth-shell, .login-shell { background: #f7f7f8; }
.auth-card, .login { border-top: 3px solid #9b111e !important; padding: clamp(24px, 4vw, 40px) !important; }
.auth-card h1, .login h1 { font-size: 28px !important; line-height: 1.2 !important; }
.auth-brand-logo, .login-brand-logo { max-width: 180px; max-height: 72px; object-fit: contain; margin-bottom: 24px; }
.auth-card .intro, .login > p { color: #62626d; font-size: 14px; line-height: 1.65; }
.shell-head { box-shadow: none; border-bottom: 1px solid #e4e4e7; }
.head-btn, .portal-btn { min-height: 42px; border-radius: 9px; }
.head-btn.active { background: #fdf2f3; color: #9b111e; }
.seller-home .home-kpi, .seller-home .home-card { border-radius: 12px; box-shadow: 0 2px 8px rgba(24,24,27,.035); }
.catalog-card { border-radius: 14px; transition: border-color .18s, box-shadow .18s; }
.catalog-card:hover { box-shadow: 0 6px 20px rgba(24,24,27,.06); }
#hero h1 { letter-spacing: -.045em; }
#catalogo, #ventajas, #tienda { scroll-margin-top: 96px; }
#mobile-menu a { min-height: 44px; }
body:has(#cart-panel:not(.translate-x-full)) #floating-whatsapp-btn,
body:has(#product-modal:not(.hidden)) #floating-whatsapp-btn { visibility: hidden; pointer-events: none; }
@media (max-width:1080px) {
    .main { padding-top: 76px; }
    .side { visibility: hidden; }
    .admin-nav-toggle:checked ~ .side { visibility: visible; }
    .admin-nav-toggle { display: block; top: 14px; left: 14px; width: 44px; height: 44px; z-index: 57; pointer-events: auto; cursor: pointer; }
    .admin-nav-toggle:focus-visible + .admin-nav-button { outline: 3px solid #9b111e; outline-offset: 3px; }
    .admin-nav-button { width: 44px; height: 44px; }
}
@media (max-width:640px) {
    .main { padding-right: 16px; padding-left: 16px; }
    .main .card { padding: 16px; }
    .main .topbar { margin-bottom: 20px; }
    .input, .select, .textarea, .login input { font-size: 16px; }
    .head-row { gap: 16px; flex-wrap: wrap; }
    .head-actions { gap: 6px; flex-wrap: wrap; }
    .head-btn { padding: 10px 12px; }
}
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { scroll-behavior: auto !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}

/* Dark TCGC theme: shared by the administration, seller portal and storefront. */
:root {
    color-scheme: dark;
    --tcgc-ink:#edf0f5; --tcgc-muted:#a4aebb; --tcgc-line:#303746;
    --tcgc-bg:#101217; --tcgc-panel:#191d25; --tcgc-raised:#222833;
    --tcgc-crimson-soft:#38202a; --tcgc-gold-soft:#332c1c;
    --md-sys-color-background:#101217; --md-sys-color-surface:#191d25;
    --md-sys-color-surface-container:#191d25; --md-sys-color-surface-container-high:#222833;
    --md-sys-color-surface-container-highest:#2b3340; --md-sys-color-surface-variant:#303746;
    --md-sys-color-outline:#465063; --md-sys-color-outline-variant:#303746;
    --md-sys-color-on-background:#edf0f5; --md-sys-color-on-surface:#edf0f5;
    --md-sys-color-on-surface-variant:#a4aebb; --md-sys-color-control:#12161d;
    --md-sys-color-primary:#ec8b97; --md-sys-color-primary-container:#38202a;
    --md-sys-color-on-primary-container:#ffc2cb;
}
html, html body { background:#101217 !important; color:#edf0f5 !important; }
html body :is(.side,.shell-head,.auth-shell,.login-shell) { background:#14181f !important; border-color:#303746 !important; }
html body :is(.card,.panel,.login,.portal-table-card,.home-card,.home-kpi,.kpi,.modal-content,.product-modal,.adjust-modal,.label-modal,.share-card-dialog,.order-detail-dialog,.order-dialog,.voucher-card,.voucher-modal,.cart-panel,.product-card,.catalog-card,.filter-accordion,.filters-card,.user-chip) {
    background:#191d25 !important; color:#edf0f5 !important; border-color:#303746 !important;
    box-shadow:0 8px 24px rgb(0 0 0 / .12) !important;
}
html body :is(.page-title,.section-title,.side-title,.topbar h1,.topbar h2,.product-name,.table-primary,.sheet-primary,.brand-title,.home-title,.login h1,.auth-card h1,.user-meta strong) { color:#edf0f5 !important; }
html body :is(.muted,.page-copy,.side-copy,.side-group,.table-secondary,.sheet-meta,.sheet-products,.product-kicker,.product-case,.product-price span,.product-placeholder,.user-meta small,.login p,.auth-card .intro) { color:#a4aebb !important; }
html body :is(.label,.field-label,.filter-field>span,.facet-title,.key) { color:#bbc4d2 !important; }
html body :is(.input,.select,.textarea,.portal-input,.portal-select,.sheet-input,.sheet-select,.sheet-edit,.sheet-text-edit,.product-sheet-input,.product-sheet-select,.color-input) {
    color:#edf0f5 !important; background:#12161d !important; border-color:#414b5c !important;
}
html body :is(input,textarea)::placeholder { color:#8995a7 !important; }
html body :is(input,select,textarea):focus { border-color:#d77081 !important; box-shadow:0 0 0 3px rgb(215 112 129 / .16) !important; }
html body :is(.btn-secondary,.logout,.tab,.tab-link,.mini-btn:not(.delete),.btn-link,.btn-duplicate,.portal-btn,.head-btn,.facet-button,.table-icon-btn,.filter-count,.table-tag,.status-tab,.sheet-cell-button,.pagination a) {
    color:#dce2eb !important; background:#222833 !important; border-color:#394353 !important;
}
html body :is(.btn-primary,.tab.active,.tab-link.active,.head-btn.primary,.table-icon-btn.primary) { background:#9b2438 !important; color:#fff !important; border-color:#b6374a !important; }
html body :is(.btn-primary,.table-icon-btn.primary):hover { background:#b42d44 !important; }
html body :is(.side a,.nav-icon,.user-logout) { color:#aab5c5 !important; }
html body .side a:hover { background:#222833 !important; color:#fff !important; border-color:transparent !important; }
html body :is(.side a.active,.head-btn.active,.facet-button.active) { background:#38202a !important; color:#ffc2cb !important; border-color:#68313e !important; }
html body .side a.active .nav-icon { color:#ec8b97 !important; }
html body :is(.side-eyebrow,.section-link) { color:#ddbc62 !important; }
html body :is(.spreadsheet-wrap,.table-wrap,.sheet-wrap,.portal-table-wrap,.filter-accordion form,.facet-sections,.simple-toolbar,.sheet-toolbar,.product-media,.product-thumb) { background:#191d25 !important; border-color:#303746 !important; }
html body .main table:is(.spreadsheet-table,.sheet-table,.product-sheet,.presale-table) thead tr th,
html body table.portal-table th { background:#222833 !important; color:#b8c4d6 !important; border-color:#343e4e !important; }
html body .main table:is(.spreadsheet-table,.sheet-table,.product-sheet,.presale-table) tbody tr:nth-child(n) td,
html body table.portal-table tbody tr:nth-child(n) td { background:#191d25 !important; color:#e0e6ef !important; border-color:#303746 !important; }
html body .main table:is(.spreadsheet-table,.sheet-table,.product-sheet,.presale-table) tbody tr:nth-child(even) td,
html body table.portal-table tbody tr:nth-child(even) td { background:#1c212b !important; }
html body .main table:is(.spreadsheet-table,.sheet-table,.product-sheet,.presale-table) tbody tr:hover td,
html body table.portal-table tbody tr:hover td { background:#282f3c !important; }
html body .sheet-table :is(th,td):nth-child(3) { box-shadow:2px 0 0 #343e4e !important; }
html body :is(.sheet-edit[data-field="status"],#next_status) { background:#38202a !important; color:#ffb6c1 !important; border-color:#68313e !important; }
html body :is(.sheet-edit[data-field="financial"],#financial_status) { background:#332c1c !important; color:#efce7e !important; border-color:#615133 !important; }
html body :is(.sheet-edit[data-field="delivery"],#delivery_status) { background:#1e2e45 !important; color:#9dc9ff !important; border-color:#385b86 !important; }
html body :is(.notice.success,.table-tag.stock,.product-stock,.share-feedback) { background:#193629 !important; color:#a8e4bf !important; border-color:#356649 !important; }
html body :is(.notice.error,.table-tag.warning,.btn-danger) { background:#42262b !important; color:#ffbcc4 !important; border-color:#77404a !important; }
html body :is(.notice.hero,.upload-feedback,.eyebrow,.portal-kicker) { background:#332c1c !important; color:#e7c775 !important; border-color:#615133 !important; }
html body :is(.table-tag.import,.product-stock.import) { background:#1e2e45 !important; color:#9dc9ff !important; border-color:#385b86 !important; }
html body .filter-heading { border-bottom:0; }
html body .filter-accordion form { border-top:1px solid #303746 !important; padding:18px 20px 20px; }
html body .filter-grid.simple { grid-template-columns:repeat(3,minmax(0,1fr)); gap:16px; }
html body .filter-grid :is(.input,.select) { min-height:44px; font-size:13px; }
html body .filter-actions { padding-top:16px; }
html body .filter-count { font-size:11px; white-space:nowrap; padding:5px 10px; }
html body .filter-heading small { color:#a4aebb; }
html body :is(.auth-brand-logo,.login-brand-logo,.side-logo,.portal-brand-logo,#brand-logo,footer img) { background:#f8f8f8; border-radius:8px; padding:5px; }
html body :is(.admin-nav-button,.share-card-close) { background:#222833 !important; border-color:#414b5c !important; color:#edf0f5 !important; }
/* Map existing storefront utilities without altering product photographs. */
html body :is(.bg-white,.bg-zinc-50,.bg-zinc-100,.bg-brand-darkAccent,.bg-brand-dark),
html body [class*="bg-white/"] { background-color:#191d25 !important; border-color:#303746 !important; }
html body :is(#hero,#ventajas,#tienda) { background:#14181f !important; }
html body :is(.text-zinc-900,.text-zinc-800,.text-zinc-700) { color:#edf0f5 !important; }
html body :is(.text-zinc-600,.text-zinc-500,.text-zinc-400) { color:#a4aebb !important; }
html body .text-brand-crimson { color:#f19ba7 !important; }
html body .border-brand-border { border-color:#303746 !important; }
html body :is(.bg-emerald-50,.bg-amber-50) { background-color:#25342b !important; color:#b9e3ca !important; border-color:#40594c !important; }
html body :is(.text-emerald-700,.text-amber-700) { color:#b9e3ca !important; }
html body :is(.bg-gradient-to-br,.bg-gradient-to-tr) { background-image:none; }
html body .price-help { display:inline-flex; align-items:center; gap:7px; padding:10px 0; border:0; background:transparent; color:inherit; font:inherit; letter-spacing:inherit; cursor:help; white-space:nowrap; }
.price-help i { color:#93a4bc; font-size:12px; }
.price-help-tooltip { position:fixed; z-index:10000; width:max-content; max-width:min(290px,calc(100vw - 24px)); padding:12px 14px; border:1px solid #556177; border-radius:9px; background:#2b3443; color:#f2f5fa; box-shadow:0 8px 24px #0006; font:400 13px/1.6 Inter,Arial,sans-serif; pointer-events:none; }
html body ::-webkit-scrollbar-track { background:#14181f; }
html body ::-webkit-scrollbar-thumb { background:#3b4657; }
@media(min-width:1500px) { html body .filter-grid.simple { grid-template-columns:repeat(6,minmax(0,1fr)); } }
@media(max-width:680px) { html body .filter-grid.simple { grid-template-columns:1fr; } .filter-actions-main { width:100%; } .filter-actions-main .btn { flex:1; } }
:root { --tcgc-text:#edf0f5; --tcgc-surface:#191d25; --tcgc-surface-soft:#222833; --tcgc-line-warm:#514630; --tcgc-shadow:0 8px 24px rgb(0 0 0 / .12); }
html body :is(.manager-card,.product-item,.order-card,.management-modal,.cart-modal-content,.price-card,.search-shell,.cs-dropdown,.empty,.search-empty,.invoice-evidence-card,.invoice-preview-line,.voucher-paste-zone) { background:#191d25 !important; color:#edf0f5 !important; border-color:#303746 !important; }
html body :is(.price-grid,.product-actions,.media-button,.thumbs button,.chip,.home-action,.action-btn,.qty-btn,.link) { background:#222833 !important; color:#dce2eb !important; border-color:#394353 !important; }
html body :is(.portal-textarea,.search-input) { background:#12161d !important; color:#edf0f5 !important; border-color:#414b5c !important; }
html body :is(.home-primary,.portal-btn.primary,.action-btn.primary) { background:#9b2438 !important; color:#fff !important; border-color:#b6374a !important; }
html body :is(.home-link,.back-link) { color:#ed9eac !important; }
html body .order-product-line { color:#bbc4d2 !important; }
html body .status-pill { background:#283343 !important; color:#cfdae9 !important; }
html body .status-pill.approved, html body .status-pill.financial.paid { background:#193629 !important; color:#a8e4bf !important; }
html body .status-pill.rejected { background:#42262b !important; color:#ffbcc4 !important; }
html body .cs-option:hover { background:#2b3443 !important; }
html body .admin-view-banner { background:#332c1c !important; color:#e7c775 !important; border-color:#615133 !important; }
/* Final contrast checks against production views. */
html body :is(h1,h2,h3,h4,h5,h6) { color:#edf0f5 !important; }
html body :is(.result-head span,.sheet-toolbar,.order-financial-metric span,.order-items-total span) { color:#aeb9ca !important; }
html body :is(.order-financial-metric strong,.order-items-total strong) { color:#edf0f5 !important; }
html body .admin-view-banner :is(strong,p) { color:#e7c775 !important; }
html body .admin-view-banner a { background:#29251c !important; color:#f1d78f !important; border-color:#796536 !important; }
html body [class*="bg-zinc-50/"] { background-color:#222833 !important; border-color:#303746 !important; }
html body #hero h1 .bg-clip-text { background-image:linear-gradient(110deg,#dfbc62,#eb8395) !important; }

/* Complete dialog surfaces: headers and nested sections must share the theme. */
@media screen {
    :root {
        --md-sys-color-success-container:#193629;
        --md-sys-color-on-success-container:#a8e4bf;
        --md-sys-color-error-container:#42262b;
        --md-sys-color-on-error-container:#ffbcc4;
        --md-sys-color-secondary-container:#332c1c;
        --md-sys-color-on-secondary-container:#efce7e;
        --md-sys-color-warning-container:#332c1c;
        --md-sys-color-on-warning-container:#efce7e;
        --md-sys-color-success:#a8e4bf;
        --md-sys-color-error:#ffbcc4;
        --md-sys-color-warning:#efce7e;
    }
    html body :is(dialog,.drawer,.client-modal,.import-modal,.product-image-dialog,.order-share-dialog,
        .modal-head,.modal-body,.order-detail-header,.order-detail-panel,.order-detail-section,
        .voucher-management,.order-share-head,.section-card,.alibaba-upload-card,.alibaba-doc-table-wrap,
        .status-tabs) {
        background:var(--tcgc-panel) !important; color:var(--tcgc-ink) !important;
        border-color:var(--tcgc-line) !important;
    }
    html body :is(.order-detail-body,.order-share-preview,.share-card-preview) {
        background:var(--tcgc-bg) !important; color:var(--tcgc-ink) !important;
    }
    html body :is(.order-financial-metric,.order-items-total,.product-image-preview,.history-chip,
        .products-cell-button,.mini-action,.stock-link,.sheet-share-button,.page-link,
        .modal-close,.modal-x,.drawer-close,.product-modal-close,.product-image-dialog-close,
        .order-share-close,.close-btn,.status-tab small,.order-flag,.alibaba-flow-step,.alibaba-translation-chip) {
        background:var(--tcgc-raised) !important; color:var(--tcgc-ink) !important;
        border-color:var(--tcgc-line) !important;
    }
    html body :is(.modal-close,.drawer-close,.product-modal-close,.product-image-dialog-close,
        .order-share-close,.close-btn,.stock-link,.products-cell-button,.mini-action,.page-link):hover {
        background:#303a49 !important; color:#fff !important; border-color:#58657a !important;
    }
    html body :is(.order-detail-meta-item strong,.order-detail-section>strong,.cart-item-title,
        .cart-total-row,.invoice-grand-total) { color:var(--tcgc-ink) !important; }
    html body :is(.order-detail-meta-item span,.compact-label,.subtle,.arrival-copy p,
        .alibaba-upload-card p,.alibaba-status,.muted-line,.summary-note,.settlement-total small,
        .new-item-head,.row-cost-label,.empty-state) { color:var(--tcgc-muted) !important; }
    html body :is(.order-detail-title span,.order-detail-kicker,.order-link,.tracking-link,.sheet-id) {
        color:#edb9c2 !important;
    }
    html body :is(.order-financial-metric.highlight,.order-detail-note,.item-total-bar,.calculated-field,
        .arrival-card.pending-arrival,.alibaba-rule,.settlement-bar,.warning,.presale-summary,
        .order-flag.adjusted,.voucher-analysis-warning,.badge.pending,.badge.ordered,.badge.partial) {
        background:#332c1c !important; color:#efce7e !important; border-color:#615133 !important;
    }
    html body :is(.order-detail-note strong,.order-detail-note .muted,.order-financial-metric.highlight strong,
        .item-total-bar strong,.settlement-total strong) { color:#efce7e !important; }
    html body :is(.admin-order-approved-default,.voucher-registered-state,.arrival-card,
        .badge.paid,.badge.complete,.badge.received,.badge.closed) {
        background:#193629 !important; color:#a8e4bf !important; border-color:#356649 !important;
    }
    html body :is(.badge.in_transit,.badge.at_origin,.badge.customs) {
        background:#1e2e45 !important; color:#9dc9ff !important;
    }
    html body :is(.badge.miami,.badge.lima) { background:#312742 !important; color:#d5bafa !important; }
    html body :is(.remove-row,.alibaba-doc-remove,.badge.cancelled) {
        background:#42262b !important; color:#ffbcc4 !important; border-color:#77404a !important;
    }
    html body :is(.detail-control,.alibaba-doc-control,.qty-input,.alibaba-upload-card input[type=file]) {
        background:#12161d !important; color:var(--tcgc-ink) !important; border-color:#414b5c !important;
    }
    html body input::file-selector-button {
        background:var(--tcgc-raised) !important; color:var(--tcgc-ink) !important; border-color:#414b5c !important;
    }
    html body :is(.alibaba-doc-table,.summary-product-table,.detail-table) th {
        background:var(--tcgc-raised) !important; color:#b8c4d6 !important; border-color:var(--tcgc-line) !important;
    }
    html body :is(.alibaba-doc-table,.summary-product-table,.detail-table) td {
        background:var(--tcgc-panel) !important; color:var(--tcgc-ink) !important; border-color:var(--tcgc-line) !important;
    }
    html body :is(.product-image-dialog-head,.share-card-head,.cart-modal-header,.voucher-summary,
        .cart-total-row,.order-items-summary .item) { border-color:var(--tcgc-line) !important; }
    html body :is(.mini-action.primary,.page-link.active) {
        background:#9b2438 !important; color:#fff !important; border-color:#b6374a !important;
    }
    html body :is(.status-tab.active,.status-tab.active:hover) {
        background:#38202a !important; color:#ffc2cb !important; border-color:#68313e !important;
    }
    html body dialog::backdrop { background:rgb(0 0 0 / .72); backdrop-filter:blur(3px); }
    html body :is(.status,.status.draft,.status.pending_admin,.status.financial.pending,.status.financial.partial) {
        background:#332c1c !important; color:#efce7e !important; border-color:#615133 !important;
    }
    html body :is(.status.approved,.status.financial.paid,.status.delivery.completed) {
        background:#193629 !important; color:#a8e4bf !important; border-color:#356649 !important;
    }
    html body :is(.status.rejected,.status.cancelled) {
        background:#42262b !important; color:#ffbcc4 !important; border-color:#77404a !important;
    }
    html body .status.delivery.pending {
        background:#1e2e45 !important; color:#9dc9ff !important; border-color:#385b86 !important;
    }
}
