:root {
    --primary: #46106c;
    --primary-strong: #2f084c;
    --accent: #f08000;
    --ink: #202428;
    --muted: #66717c;
    --surface: #ffffff;
    --soft: #f4f5f7;
    --border: #dfe3e8;
    --success: #1f7a4d;
    --danger: #b42318;
    --info: #0b6285;
    --shadow: 0 4px 18px rgba(25, 31, 38, .09);
}
* { box-sizing: border-box; }
html { color-scheme: light; }
body { margin: 0; color: var(--ink); background: var(--soft); font: 15px/1.5 Inter, system-ui, -apple-system, "Segoe UI", sans-serif; }
a { color: var(--primary); text-decoration: none; }
button, input, select, textarea { font: inherit; }
button, .button { cursor: pointer; }
.app-header { min-height: 66px; padding: 10px max(18px, calc((100vw - 1240px) / 2)); display: flex; align-items: center; gap: 24px; background: var(--surface); border-bottom: 1px solid var(--border); position: sticky; top: 0; z-index: 30; }
.brand { color: var(--ink); display: inline-flex; align-items: center; gap: 10px; font-weight: 800; line-height: 1.05; }
.brand small { display: block; color: var(--muted); margin-top: 4px; font-size: 10px; text-transform: uppercase; }
.brand-mark { width: 40px; height: 40px; display: grid; place-items: center; color: white; background: var(--primary); border-radius: 8px; }
.app-nav { margin-left: auto; display: flex; align-items: center; gap: 6px; }
.app-nav a, .link-button { min-height: 40px; padding: 8px 11px; border: 0; background: transparent; color: var(--ink); display: inline-flex; align-items: center; gap: 7px; }
.app-nav svg, button svg, .sandbox-bar svg { width: 17px; height: 17px; }
.app-nav .nav-primary { background: var(--primary); color: white; border-radius: 6px; }
.icon-button { width: 40px; height: 40px; display: inline-grid; place-items: center; border: 1px solid var(--border); background: var(--surface); border-radius: 6px; }
.nav-toggle { display: none; margin-left: auto; }
.sandbox-bar { background: var(--accent); color: #241200; min-height: 32px; padding: 6px 18px; display: flex; justify-content: center; align-items: center; gap: 8px; font-size: 12px; font-weight: 700; }
.app-shell { width: min(1240px, calc(100% - 32px)); margin: 28px auto 48px; min-height: 65vh; }
.app-footer { padding: 28px max(18px, calc((100vw - 1240px) / 2)); background: #25282d; color: #f7f7f7; display: flex; justify-content: space-between; gap: 24px; }
.app-footer small { color: #c3c8ce; }.app-footer nav { display: flex; gap: 18px; flex-wrap: wrap; }.app-footer a { color: white; }
.page-head { display: flex; align-items: end; justify-content: space-between; gap: 18px; margin-bottom: 22px; }
.page-head h1 { margin: 0 0 4px; font-size: clamp(24px, 4vw, 34px); letter-spacing: 0; }.page-head p { margin: 0; color: var(--muted); }
.toolbar { display: flex; gap: 10px; align-items: end; flex-wrap: wrap; }.toolbar .field { min-width: 180px; }
.panel, .card { background: var(--surface); border: 1px solid var(--border); border-radius: 8px; box-shadow: var(--shadow); }
.panel { padding: 20px; margin-bottom: 20px; }.panel h2, .panel h3 { margin-top: 0; }
.product-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 16px; }
.product-card { min-width: 0; overflow: hidden; display: flex; flex-direction: column; }
.product-card-media { width: 100%; aspect-ratio: 4 / 3; background: #e8e9ec; display: grid; place-items: center; overflow: hidden; }
.product-card-media img { width: 100%; height: 100%; object-fit: cover; }.product-card-media svg { width: 42px; color: var(--muted); }
.product-card-body { padding: 14px; display: flex; flex-direction: column; gap: 7px; flex: 1; }.product-card h2 { font-size: 16px; line-height: 1.3; margin: 0; }
.eyebrow { color: var(--primary); font-size: 11px; font-weight: 800; text-transform: uppercase; }.price { font-size: 20px; font-weight: 850; color: var(--ink); }.meta { color: var(--muted); font-size: 12px; }
.wallet-payment-balance { display: flex; align-items: baseline; justify-content: space-between; flex-wrap: wrap; gap: 8px 16px; margin: 14px 0 18px; padding: 11px 13px; border-left: 4px solid var(--primary); background: var(--soft); border-radius: 6px; }
.wallet-payment-balance span { color: var(--muted); font-size: 13px; font-weight: 700; }
.wallet-payment-balance strong { color: var(--ink); font-size: 24px; line-height: 1.15; }
.wallet-checkout-final { max-width: 1040px; margin-inline: auto; }
.wallet-checkout-final-head { align-items: flex-start; }
.wallet-checkout-final-layout { grid-template-columns: minmax(0, 1.55fr) minmax(250px, .65fr); }
.wallet-checkout-final-panel { border-top: 4px solid var(--primary); }
.wallet-checkout-order { display: flex; align-items: baseline; justify-content: space-between; flex-wrap: wrap; gap: 6px 16px; padding-bottom: 14px; border-bottom: 1px solid var(--border); }
.wallet-checkout-order span, .wallet-checkout-metric span, .wallet-checkout-summary .wallet-payment-balance span { color: var(--muted); font-size: 12px; font-weight: 750; }
.wallet-checkout-order strong { color: var(--ink); font-size: 16px; overflow-wrap: anywhere; }
.wallet-checkout-summary { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; margin: 18px 0; }
.wallet-checkout-metric, .wallet-checkout-summary .wallet-payment-balance { min-width: 0; min-height: 96px; margin: 0; padding: 14px; border: 1px solid var(--border); border-radius: 6px; background: var(--soft); display: flex; flex-direction: column; align-items: flex-start; justify-content: center; gap: 5px; }
.wallet-checkout-summary .wallet-payment-balance { border-left: 4px solid var(--primary); }
.wallet-checkout-metric strong, .wallet-checkout-summary .wallet-payment-balance strong { color: var(--ink); font-size: 22px; line-height: 1.15; overflow-wrap: anywhere; }
.wallet-checkout-total strong { color: var(--primary); }
.wallet-checkout-remaining strong { color: var(--success); }
.wallet-checkout-warning { margin-bottom: 16px; padding: 13px 14px; border-left: 4px solid var(--accent); border-radius: 6px; background: var(--soft); display: grid; gap: 3px; }
.wallet-checkout-warning strong { color: var(--ink); }
.wallet-checkout-warning span { color: var(--muted); font-size: 13px; }
.wallet-checkout-confirm { width: 100%; min-height: 48px; font-size: 15px; }
.wallet-checkout-back { width: 100%; min-height: 42px; margin-top: 10px; padding: 9px 14px; border: 1px solid var(--border); border-radius: 6px; background: var(--surface); color: var(--primary); display: inline-flex; align-items: center; justify-content: center; font-weight: 750; }
.wallet-checkout-back:hover { border-color: var(--primary); }
.wallet-checkout-protections { box-shadow: none; }
.button { min-height: 42px; padding: 9px 14px; border: 1px solid var(--primary); border-radius: 6px; background: var(--primary); color: white; display: inline-flex; align-items: center; justify-content: center; gap: 7px; font-weight: 750; }
.button.secondary { background: var(--surface); color: var(--primary); }.button.accent { border-color: var(--accent); background: var(--accent); color: #241200; }.button.danger { border-color: var(--danger); background: var(--danger); }
.field { display: grid; gap: 6px; }.field label { font-size: 12px; font-weight: 750; }.field input, .field select, .field textarea { width: 100%; min-height: 42px; padding: 9px 11px; border: 1px solid #bdc5ce; border-radius: 5px; background: white; color: var(--ink); }.field textarea { min-height: 120px; resize: vertical; }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 15px; }.field.full { grid-column: 1 / -1; }.check-row { display: flex; gap: 8px; align-items: flex-start; }
.alert { padding: 13px 15px; margin-bottom: 18px; border-radius: 6px; border: 1px solid; }.alert.success { color: var(--success); background: #effaf4; }.alert.error { color: var(--danger); background: #fff1f0; }
.split { display: grid; grid-template-columns: minmax(0, 1.55fr) minmax(280px, .7fr); gap: 22px; align-items: start; }
.gallery-main { aspect-ratio: 4 / 3; display: grid; place-items: center; overflow: hidden; background: #e8e9ec; border-radius: 6px; }.gallery-main img { width: 100%; height: 100%; object-fit: contain; }
.data-table { width: 100%; border-collapse: collapse; }.data-table th, .data-table td { padding: 11px 9px; border-bottom: 1px solid var(--border); text-align: left; vertical-align: top; }.data-table th { color: var(--muted); font-size: 11px; text-transform: uppercase; }.table-wrap { width: 100%; overflow-x: auto; }
.status { display: inline-flex; padding: 3px 7px; border-radius: 4px; background: #edf0f3; color: var(--ink); font-size: 11px; font-weight: 800; white-space: nowrap; }.status.pago, .status.ativo, .status.entregue { color: var(--success); background: #e8f6ee; }.status.cancelado, .status.rejeitado { color: var(--danger); background: #ffefed; }
.stat-grid { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 12px; margin-bottom: 20px; }.stat { padding: 16px; }.stat strong { display: block; font-size: 24px; }.stat small { color: var(--muted); }
.item-row { display: grid; grid-template-columns: 70px minmax(0, 1fr) auto; gap: 12px; padding: 13px 0; border-bottom: 1px solid var(--border); }.item-thumb { width: 70px; height: 60px; object-fit: cover; background: #e8e9ec; border-radius: 5px; }
.timeline { list-style: none; padding: 0; margin: 0; }.timeline li { padding: 0 0 18px 20px; border-left: 2px solid var(--border); position: relative; }.timeline li::before { content: ""; position: absolute; left: -6px; top: 4px; width: 10px; height: 10px; border-radius: 50%; background: var(--primary); }
.policy { max-width: 850px; margin-inline: auto; }.policy h2 { font-size: 20px; margin-top: 28px; }.policy p, .policy li { color: #39414a; }.legal-warning { border-left: 4px solid var(--accent); padding: 12px 14px; background: #fff8ef; }
.empty { padding: 42px 20px; text-align: center; color: var(--muted); }.auth-card { max-width: 500px; margin: 28px auto; }.actions { display: flex; gap: 9px; flex-wrap: wrap; align-items: center; }
@media (max-width: 900px) { .stat-grid { grid-template-columns: repeat(2, 1fr); }.split { grid-template-columns: 1fr; } }
@media (max-width: 720px) {
    .app-header { position: relative; }.nav-toggle { display: inline-grid; }.app-nav { display: none; position: absolute; top: 62px; left: 12px; right: 12px; padding: 10px; background: var(--surface); border: 1px solid var(--border); box-shadow: var(--shadow); flex-direction: column; align-items: stretch; }.app-nav.is-open { display: flex; }.app-nav a, .link-button { width: 100%; }.app-shell { width: min(100% - 20px, 1240px); margin-top: 18px; }.page-head { align-items: stretch; flex-direction: column; }.form-grid { grid-template-columns: 1fr; }.field.full { grid-column: auto; }.product-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }.product-card-body { padding: 10px; }.product-card h2 { font-size: 14px; }.price { font-size: 17px; }.app-footer { flex-direction: column; }.item-row { grid-template-columns: 56px minmax(0, 1fr); }.item-row > :last-child { grid-column: 2; }.item-thumb { width: 56px; height: 52px; }
}
@media (max-width: 360px) { .product-grid { grid-template-columns: 1fr; }.stat-grid { grid-template-columns: 1fr; } }
@media (max-width: 480px) { .wallet-payment-balance strong { width: 100%; } }
@media (max-width: 720px) {
    .wallet-checkout-final-layout, .wallet-checkout-summary { grid-template-columns: 1fr; }
    .wallet-checkout-metric, .wallet-checkout-summary .wallet-payment-balance { min-height: 82px; }
    .wallet-checkout-order { align-items: flex-start; flex-direction: column; }
    .wallet-checkout-confirm, .wallet-checkout-back { width: 100%; }
}

.order-back { display: inline-flex; margin-bottom: 8px; font-size: 13px; font-weight: 750; }
.order-demand { display: flex; align-items: center; justify-content: space-between; gap: 18px; border-left: 4px solid var(--accent); }
.order-demand h2 { margin-bottom: 6px; }
.order-demand p { margin: 0; color: var(--muted); }
.order-needs-action td:first-child { box-shadow: inset 3px 0 0 var(--accent); }
.seller-next-action { border-left: 4px solid var(--primary); }
.seller-next-action h2 { margin-bottom: 0; font-size: 17px; line-height: 1.35; }
.order-progress-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.order-progress-list li { position: relative; padding: 9px 12px 9px 30px; color: var(--muted); background: var(--soft); border-radius: 5px; }
.order-progress-list li::before { content: ""; position: absolute; top: 50%; left: 12px; width: 9px; height: 9px; margin-top: -5px; border: 2px solid var(--muted); border-radius: 50%; }
.order-progress-list li.is-complete { color: var(--ink); background: var(--surface); border: 1px solid var(--border); }
.order-progress-list li.is-complete::before { border-color: var(--success); background: var(--success); }
.order-progress-list li.is-current { color: var(--ink); border: 2px solid var(--primary); background: var(--surface); box-shadow: var(--shadow); }
.order-progress-list li.is-current::before { border-color: var(--primary); background: var(--primary); }
.order-progress-list li.is-future { color: var(--muted); background: var(--soft); opacity: .78; }
.delivery-code-hero { padding: 24px; border: 2px solid var(--accent); display: grid; justify-items: center; gap: 8px; text-align: center; }
.delivery-code-hero h2 { margin: 0; font-size: 21px; }
.delivery-code-digits { display: flex; justify-content: center; gap: 8px; margin: 8px 0; }
.delivery-code-digits span { width: 50px; height: 62px; border: 2px solid var(--primary); border-radius: 6px; background: var(--soft); color: var(--primary); display: grid; place-items: center; font: 850 34px/1 ui-monospace, "Cascadia Mono", Consolas, monospace; }
.delivery-code-warning { margin: 0; color: var(--ink); font-weight: 800; }
.delivery-code-guidance { margin: 0; color: var(--muted); }
@media (max-width: 720px) {
    .order-demand { align-items: stretch; flex-direction: column; }
    .order-demand .button { width: 100%; }
    .delivery-code-hero { padding: 18px 12px; }
    .delivery-code-hero h2 { font-size: 18px; }
    .delivery-code-digits { gap: 5px; }
    .delivery-code-digits span { width: 38px; height: 50px; font-size: 27px; }
}
/* Central de pedidos do vendedor */
.status.aguardando_pagamento { color: var(--muted); background: #edf0f3; }
.status.em_preparacao { color: #7a4100; background: #fff0d8; }
.status.pronto_retirada { color: var(--info); background: #e5f4fa; }
.status.enviado { color: var(--primary); background: #f1e8f7; }
.status.disputa { color: #7a4100; background: #fff0d8; }
.status.reembolsado { color: var(--muted); background: #e6e9ed; }
.orders-section-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; margin-bottom: 16px; }
.orders-section-head h2 { margin-bottom: 2px; }
.orders-section-head > strong { color: var(--primary); white-space: nowrap; }
.order-filters { display: grid; grid-template-columns: minmax(220px, 2fr) repeat(2, minmax(150px, 1fr)) repeat(2, minmax(135px, .8fr)); gap: 12px; padding: 16px; margin-bottom: 14px; background: var(--soft); border: 1px solid var(--border); border-radius: 6px; }
.order-filter-actions { grid-column: 1 / -1; display: flex; gap: 9px; flex-wrap: wrap; }
.orders-result-range { margin: 0 0 10px; color: var(--muted); font-size: 13px; }
.order-open-link { display: inline-flex; min-height: 36px; padding: 7px 10px; align-items: center; justify-content: center; border: 1px solid var(--primary); border-radius: 5px; font-weight: 750; }
.pagination { display: flex; justify-content: center; align-items: center; flex-wrap: wrap; gap: 6px; margin-top: 18px; }
.pagination a, .pagination span { min-width: 38px; min-height: 38px; padding: 7px 10px; display: inline-grid; place-items: center; border: 1px solid var(--border); border-radius: 5px; background: var(--surface); font-weight: 750; }
.pagination .is-current { border-color: var(--primary); background: var(--primary); color: white; }
@media (max-width: 980px) {
    .order-filters { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .order-filter-search { grid-column: 1 / -1; }
}
@media (max-width: 720px) {
    .orders-section-head { align-items: stretch; flex-direction: column; }
    .order-filters { grid-template-columns: 1fr; padding: 12px; }
    .order-filter-search, .order-filter-actions { grid-column: auto; }
    .order-filter-actions .button { flex: 1 1 140px; }
    .orders-table { overflow: visible; }
    .orders-table table, .orders-table tbody, .orders-table tr, .orders-table td { display: block; width: 100%; }
    .orders-table thead { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }
    .orders-table tr { margin-bottom: 14px; padding: 10px 12px; border: 1px solid var(--border); border-radius: 6px; background: var(--surface); box-shadow: var(--shadow); }
    .orders-table tr.order-needs-action { border-left: 4px solid var(--accent); }
    .orders-table td { padding: 7px 0; border: 0; display: grid; grid-template-columns: 108px minmax(0, 1fr); gap: 10px; }
    .orders-table td::before { content: attr(data-label); color: var(--muted); font-size: 11px; font-weight: 800; text-transform: uppercase; }
    .orders-table .order-open-link { width: 100%; }
}