/* ═══════════════════════════════════════════
   PAINÉIS INTERNOS — Admin & Caixa
   ═══════════════════════════════════════════ */

.admin-body,
.caixa-body {
    font-family: 'Plus Jakarta Sans', system-ui, sans-serif;
    -webkit-font-smoothing: antialiased;
}

/* ── Admin layout ── */
.admin-layout {
    display: flex;
    min-height: 100vh;
    background: #f1f5f9;
}

.admin-sidebar {
    width: 260px;
    min-height: 100vh;
    background: linear-gradient(180deg, #1e1b4b 0%, #312e81 50%, #3730a3 100%);
    color: #fff;
    display: flex;
    flex-direction: column;
    flex-shrink: 0;
    position: sticky;
    top: 0;
    height: 100vh;
    overflow-y: auto;
}

.admin-sidebar-brand {
    padding: 1.5rem 1.25rem;
    border-bottom: 1px solid rgba(255,255,255,.1);
    position: relative;
}

.admin-sidebar-brand a {
    color: #fff;
    text-decoration: none;
    font-weight: 800;
    font-size: 1.1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.admin-sidebar-brand a i {
    color: #fbbf24;
    font-size: 1.35rem;
}

.admin-sidebar-brand small {
    display: block;
    color: rgba(255,255,255,.5);
    font-size: 0.72rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    margin-top: 0.25rem;
    margin-left: 2rem;
}

.admin-nav {
    padding: 1rem 0.75rem;
    flex: 1;
    overflow-y: auto;
}

.admin-nav-group {
    margin-bottom: 0.15rem;
}

.admin-nav-group-btn {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
    padding: 0.65rem 1rem;
    color: rgba(255, 255, 255, 0.82);
    border-radius: 10px;
    font-weight: 600;
    font-size: 0.9rem;
    cursor: pointer;
    list-style: none;
    user-select: none;
    transition: background 0.2s, color 0.2s;
}

.admin-nav-group-btn::-webkit-details-marker {
    display: none;
}

.admin-nav-group-btn:hover {
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
}

.admin-nav-group-btn.active {
    color: #fff;
    background: rgba(255, 255, 255, 0.08);
}

.admin-nav-group-label {
    display: inline-flex;
    align-items: center;
    gap: 0.65rem;
    min-width: 0;
}

.admin-nav-group-label i {
    font-size: 1.1rem;
    width: 22px;
    text-align: center;
    opacity: 0.85;
}

.admin-nav-chevron {
    font-size: 0.75rem;
    opacity: 0.55;
    transition: transform 0.2s;
    flex-shrink: 0;
}

.admin-nav-group[open] > .admin-nav-group-btn .admin-nav-chevron {
    transform: rotate(180deg);
}

.admin-nav-submenu {
    padding: 0.2rem 0 0.35rem 2.35rem;
}

.admin-nav-sublink {
    font-size: 0.86rem;
    padding: 0.5rem 0.85rem;
    margin-bottom: 0.15rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
}

.admin-nav-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 1.25rem;
    height: 1.25rem;
    padding: 0 0.35rem;
    border-radius: 999px;
    background: #f59e0b;
    color: #1c1917;
    font-size: 0.7rem;
    font-weight: 800;
    line-height: 1;
}

.admin-nav-sublink.active {
    box-shadow: inset 3px 0 0 #fbbf24;
}

.admin-nav-group-muted .admin-nav-group-btn,
.admin-nav-group-muted .admin-nav-sublink {
    color: rgba(255, 255, 255, 0.5);
    font-size: 0.85rem;
}

.admin-nav-group-muted .admin-nav-group-btn:hover,
.admin-nav-group-muted .admin-nav-sublink:hover {
    color: rgba(255, 255, 255, 0.85);
}

.admin-nav-link {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    padding: 0.65rem 1rem;
    color: rgba(255,255,255,.75);
    text-decoration: none;
    border-radius: 10px;
    font-weight: 600;
    font-size: 0.9rem;
    margin-bottom: 0.25rem;
    transition: all 0.2s;
}

.admin-nav-link i {
    font-size: 1.1rem;
    width: 22px;
    text-align: center;
    opacity: 0.85;
}

.admin-nav-link:hover {
    background: rgba(255,255,255,.12);
    color: #fff;
}

.admin-nav-link.active {
    background: rgba(255,255,255,.18);
    color: #fff;
    box-shadow: inset 3px 0 0 #fbbf24;
}

.admin-nav-divider {
    height: 1px;
    background: rgba(255,255,255,.1);
    margin: 0.75rem 0;
}

.admin-nav-link.muted {
    color: rgba(255,255,255,.45);
    font-size: 0.85rem;
}

.admin-main {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
}

.admin-topbar {
    background: #fff;
    border-bottom: 1px solid #e2e8f0;
    padding: 0.85rem 1.75rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: 0 1px 8px rgba(15,23,42,.04);
}

.admin-topbar-start {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    min-width: 0;
}

.admin-topbar-label {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.admin-menu-toggle {
    display: none;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    padding: 0;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    background: #fff;
    color: #334155;
    font-size: 1.35rem;
    line-height: 1;
    flex-shrink: 0;
    transition: background 0.2s, border-color 0.2s, color 0.2s;
}

.admin-menu-toggle:hover {
    background: #f8fafc;
    border-color: #cbd5e1;
    color: #0f172a;
}

.admin-sidebar-close {
    display: none;
    align-items: center;
    justify-content: center;
    position: absolute;
    top: 1.15rem;
    right: 0.85rem;
    width: 36px;
    height: 36px;
    padding: 0;
    border: none;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.12);
    color: #fff;
    font-size: 1.1rem;
    line-height: 1;
    transition: background 0.2s;
}

.admin-sidebar-close:hover {
    background: rgba(255, 255, 255, 0.2);
}

.admin-sidebar-overlay {
    display: none;
}

.admin-topbar-user {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    color: inherit;
}

a.admin-topbar-user:hover {
    color: inherit;
}

a.admin-topbar-user:hover .admin-topbar-name {
    color: var(--brand, #7c3aed);
}

.admin-avatar {
    width: 38px;
    height: 38px;
    border-radius: 10px;
    background: linear-gradient(135deg, #7c3aed, #9333ea);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    font-size: 0.85rem;
}

.admin-topbar-name {
    font-weight: 700;
    font-size: 0.9rem;
    color: #0f172a;
    line-height: 1.2;
}

.admin-topbar-role {
    font-size: 0.75rem;
    color: #64748b;
}

.admin-content {
    padding: 1.75rem;
    flex: 1;
}

.admin-stock-alert-banner {
    display: flex;
    align-items: center;
    gap: 0.85rem;
    flex-wrap: wrap;
    margin: -0.5rem 0 1.25rem;
    padding: 0.85rem 1rem;
    border-radius: 12px;
    border: 1px solid #fcd34d;
    background: linear-gradient(180deg, #fffbeb, #fef3c7);
    color: #78350f;
}

.admin-stock-alert-banner-icon {
    font-size: 1.35rem;
    color: #d97706;
    flex-shrink: 0;
}

.admin-stock-alert-banner-body {
    flex: 1;
    min-width: 12rem;
}

.admin-stock-alert-panel .admin-panel-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
}

.admin-stock-alert-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    gap: 0.45rem;
}

.admin-stock-alert-list li {
    padding: 0.55rem 0.75rem;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
}

/* ── Admin page components ── */
.admin-page-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    flex-wrap: wrap;
    gap: 1rem;
    margin-bottom: 1.75rem;
}

.admin-page-title {
    font-size: 1.65rem;
    font-weight: 800;
    color: #0f172a;
    margin: 0;
    letter-spacing: -0.02em;
}

.admin-page-subtitle {
    color: #64748b;
    margin: 0.25rem 0 0;
    font-size: 0.95rem;
}

.admin-stat-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 1.25rem;
    margin-bottom: 1.75rem;
}

.admin-stat-card {
    background: #fff;
    border-radius: 14px;
    padding: 1.35rem;
    border: 1px solid #e2e8f0;
    box-shadow: 0 2px 12px rgba(15,23,42,.04);
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    transition: transform 0.2s, box-shadow 0.2s;
}

.admin-stat-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(15,23,42,.08);
}

.admin-stat-icon {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.35rem;
    flex-shrink: 0;
}

.admin-stat-icon.purple { background: #ede9fe; color: #7c3aed; }
.admin-stat-icon.green  { background: #d1fae5; color: #059669; }
.admin-stat-icon.amber  { background: #fef3c7; color: #d97706; }
.admin-stat-icon.blue   { background: #dbeafe; color: #2563eb; }
.admin-stat-icon.rose   { background: #ffe4e6; color: #e11d48; }

.admin-stat-label {
    font-size: 0.78rem;
    font-weight: 600;
    color: #64748b;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    margin-bottom: 0.25rem;
}

.admin-stat-value {
    font-size: 1.5rem;
    font-weight: 800;
    color: #0f172a;
    line-height: 1.2;
}

.admin-stat-value.success { color: #059669; }
.admin-stat-value.warning { color: #d97706; }
.admin-stat-value.primary { color: #7c3aed; }

.admin-panel {
    background: #fff;
    border-radius: 14px;
    border: 1px solid #e2e8f0;
    box-shadow: 0 2px 12px rgba(15,23,42,.04);
}

.admin-panel-header {
    padding: 1.15rem 1.5rem;
    border-bottom: 1px solid #e2e8f0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.75rem;
    background: linear-gradient(180deg, #fafafa, #fff);
}

.admin-panel-header h2 {
    font-size: 1rem;
    font-weight: 700;
    margin: 0;
    color: #0f172a;
}

.admin-panel-body {
    padding: 0;
}

.admin-panel-body.padded {
    padding: 1.5rem;
}

.produto-rel-field-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    margin-bottom: 0.4rem;
}

.produto-rel-toggle {
    border: 0;
    background: transparent;
    color: #6366f1;
    font-size: 0.8125rem;
    font-weight: 600;
    padding: 0.15rem 0.35rem;
    border-radius: 6px;
    line-height: 1.2;
    white-space: nowrap;
}

.produto-rel-toggle:hover,
.produto-rel-toggle.is-open {
    background: #eef2ff;
    color: #4338ca;
}

.produto-rel-create {
    margin-top: 0.65rem;
    padding: 0.75rem;
    border-radius: 12px;
    border: 1px solid #e2e8f0;
    background: #f8fafc;
    display: grid;
    gap: 0.55rem;
}

.produto-rel-create-actions {
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

.produto-rel-create .btn-link {
    text-decoration: none;
    padding-left: 0.5rem;
}

.admin-filter-pills {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    padding: 1rem 1.5rem;
    border-bottom: 1px solid #f1f5f9;
    background: #fafbfc;
}

.admin-filter-pills .btn {
    border-radius: 50px;
    font-weight: 600;
    font-size: 0.82rem;
    padding: 0.35rem 1rem;
}

.admin-table {
    margin: 0;
}

.admin-table thead th {
    background: #f8fafc;
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: #64748b;
    border-bottom: 1px solid #e2e8f0;
    padding: 0.85rem 1.25rem;
    white-space: nowrap;
}

.admin-table tbody td {
    padding: 0.9rem 1.25rem;
    vertical-align: middle;
    border-bottom: 1px solid #f1f5f9;
    font-size: 0.9rem;
}

.admin-table tbody tr:hover {
    background: #f8fafc;
}

.admin-table tbody tr:last-child td {
    border-bottom: none;
}

.order-status-form .form-select {
    min-width: 115px;
    font-size: 0.82rem;
    font-weight: 600;
}

/* ── Pedidos: status e ações ── */
.order-number-badge {
    display: inline-flex;
    align-items: center;
    padding: 0.35rem 0.7rem;
    background: #f1f5f9;
    border-radius: 8px;
    font-weight: 800;
    font-size: 0.88rem;
    color: #334155;
}

.order-value {
    font-weight: 800;
    color: #7c3aed;
}

.admin-order-pedido {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.4rem;
}

.admin-order-tipo {
    font-size: 0.78rem;
    color: #64748b;
    font-weight: 600;
}

.admin-order-pagamento {
    margin-top: 0.15rem;
    line-height: 1.35;
}

/* Tabela de pedidos — cards abaixo de 1400px para evitar scroll horizontal */
@media (max-width: 1399.98px) {
    .admin-orders-table-wrap {
        overflow-x: visible;
    }

    .admin-orders-table thead {
        display: none;
    }

    .admin-orders-table tbody tr {
        display: block;
        padding: 1rem 1.25rem;
        border-bottom: 1px solid #f1f5f9;
    }

    .admin-orders-table tbody tr:hover {
        background: #f8fafc;
    }

    .admin-orders-table tbody tr:last-child {
        border-bottom: none;
    }

    .admin-orders-table tbody td {
        display: grid;
        grid-template-columns: minmax(7.5rem, 34%) minmax(0, 1fr);
        gap: 0.35rem 1rem;
        align-items: start;
        padding: 0.45rem 0;
        border: none;
    }

    .admin-orders-table tbody td::before {
        content: attr(data-label);
        font-size: 0.7rem;
        font-weight: 700;
        text-transform: uppercase;
        letter-spacing: 0.05em;
        color: #64748b;
        padding-top: 0.1rem;
    }

    .admin-orders-table tbody td.admin-order-cell-pedido {
        display: flex;
        flex-wrap: wrap;
        align-items: center;
        justify-content: space-between;
        gap: 0.5rem;
        padding-top: 0;
        padding-bottom: 0.75rem;
        margin-bottom: 0.25rem;
        border-bottom: 1px dashed #e2e8f0;
    }

    .admin-orders-table tbody td.admin-order-cell-pedido::before {
        display: none;
    }

    .admin-orders-table tbody td.admin-order-cell-data {
        color: #64748b !important;
        font-size: 0.82rem !important;
    }

    .admin-orders-table tbody td.admin-order-cell-acoes {
        display: flex;
        justify-content: flex-end;
        padding-top: 0.65rem;
        margin-top: 0.35rem;
        border-top: 1px dashed #e2e8f0;
    }

    .admin-orders-table tbody td.admin-order-cell-acoes::before {
        display: none;
    }

    .admin-orders-table tbody td.admin-order-cell-status .status-editor {
        width: 100%;
        max-width: 280px;
    }

    .admin-orders-table tbody td.admin-orders-empty {
        display: block;
        grid-template-columns: none;
    }

    .admin-orders-table tbody td.admin-orders-empty::before {
        display: none;
    }
}

@media (min-width: 1400px) {
    .admin-orders-table-wrap {
        overflow-x: visible;
    }

    .admin-orders-table {
        table-layout: fixed;
        width: 100%;
    }

    .admin-orders-table thead th,
    .admin-orders-table tbody td {
        padding-left: 0.85rem;
        padding-right: 0.85rem;
    }

    .admin-orders-table thead th {
        white-space: normal;
        line-height: 1.25;
    }

    .admin-orders-table .admin-order-cell-pedido { width: 9%; }
    .admin-orders-table .admin-order-cell-cliente { width: 22%; }
    .admin-orders-table .admin-order-cell-valor { width: 16%; }
    .admin-orders-table .admin-order-cell-status { width: 18%; }
    .admin-orders-table .admin-order-cell-entrega { width: 11%; }
    .admin-orders-table .admin-order-cell-data { width: 14%; }
    .admin-orders-table .admin-order-cell-acoes { width: 10%; }

    .admin-orders-table .admin-order-cell-cliente .text-break {
        word-break: break-word;
    }

    .admin-orders-table .status-editor {
        width: 100%;
        max-width: 100%;
    }

    .admin-orders-table .status-editor-select {
        min-width: 0;
        padding-left: 0.35rem;
        padding-right: 1.5rem;
        font-size: 0.78rem;
    }
}

.status-editor {
    display: inline-flex;
    align-items: stretch;
    max-width: 100%;
    border-radius: 12px;
    overflow: hidden;
    border: 2px solid transparent;
    box-shadow: 0 2px 8px rgba(15, 23, 42, 0.06);
    transition: box-shadow 0.2s, border-color 0.2s;
}

.status-editor:hover {
    box-shadow: 0 4px 14px rgba(15, 23, 42, 0.1);
}

.status-editor-pendente {
    background: #fffbeb;
    border-color: #fde68a;
}

.status-editor-pago {
    background: #ecfdf5;
    border-color: #a7f3d0;
}

.status-editor-cancelado {
    background: #f8fafc;
    border-color: #e2e8f0;
}

.status-editor-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 38px;
    flex-shrink: 0;
    font-size: 1rem;
}

.status-editor-pendente .status-editor-icon { color: #d97706; }
.status-editor-pago .status-editor-icon { color: #059669; }
.status-editor-cancelado .status-editor-icon { color: #64748b; }

.status-editor-select {
    border: none;
    background: transparent;
    font-weight: 700;
    font-size: 0.82rem;
    padding: 0.55rem 0.35rem 0.55rem 0;
    min-width: 108px;
    cursor: pointer;
    color: #0f172a;
    outline: none;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' fill='%2364748b' viewBox='0 0 16 16'%3E%3Cpath d='M7.247 11.14 2.451 5.658C1.885 5.013 2.345 4 3.204 4h9.592a1 1 0 0 1 .753 1.659l-4.796 5.48a1 1 0 0 1-1.506 0z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 0.15rem center;
    padding-right: 1.25rem;
}

.status-editor-pendente .status-editor-select { color: #92400e; }
.status-editor-pago .status-editor-select { color: #065f46; }
.status-editor-cancelado .status-editor-select { color: #475569; }

.status-editor-save {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    border: none;
    background: linear-gradient(135deg, #7c3aed, #9333ea);
    color: #fff;
    cursor: pointer;
    transition: filter 0.2s, transform 0.15s;
    flex-shrink: 0;
}

.status-editor-save:hover {
    filter: brightness(1.08);
}

.status-editor-save:active {
    transform: scale(0.96);
}

.status-editor-save i {
    font-size: 1.1rem;
    font-weight: bold;
}

.stock-editor-save i {
    font-size: 1.1rem;
    font-weight: bold;
}

.stock-editor {
    display: inline-flex;
    align-items: stretch;
    border-radius: 12px;
    overflow: hidden;
    border: 2px solid transparent;
    box-shadow: 0 2px 8px rgba(15, 23, 42, 0.06);
    transition: box-shadow 0.2s, border-color 0.2s;
}

.stock-editor:hover {
    box-shadow: 0 4px 14px rgba(15, 23, 42, 0.1);
}

.stock-editor-ok {
    background: #ecfdf5;
    border-color: #a7f3d0;
}

.stock-editor-low {
    background: #fffbeb;
    border-color: #fde68a;
}

.stock-editor-empty {
    background: #fef2f2;
    border-color: #fecaca;
}

.stock-editor-input {
    border: none;
    background: transparent;
    font-weight: 800;
    font-size: 0.9rem;
    width: 72px;
    padding: 0.5rem 0.35rem 0.5rem 0.65rem;
    text-align: center;
    color: #0f172a;
    outline: none;
    -moz-appearance: textfield;
}

.stock-editor-input::-webkit-outer-spin-button,
.stock-editor-input::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

.stock-editor-ok .stock-editor-input { color: #065f46; }
.stock-editor-low .stock-editor-input { color: #92400e; }
.stock-editor-empty .stock-editor-input { color: #b91c1c; }

.stock-editor-save {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 38px;
    border: none;
    background: linear-gradient(135deg, #7c3aed, #9333ea);
    color: #fff;
    cursor: pointer;
    transition: filter 0.2s, transform 0.15s;
    flex-shrink: 0;
}

.stock-editor-save:hover {
    filter: brightness(1.08);
}

.stock-editor-save:active {
    transform: scale(0.96);
}

.product-image-upload {
    padding: 1rem;
    background: #f8fafc;
    border: 1px dashed #cbd5e1;
    border-radius: 14px;
}

.product-image-preview-wrap {
    position: relative;
    display: inline-block;
    margin-bottom: 1rem;
}

.product-image-preview {
    display: block;
    width: 160px;
    height: 160px;
    object-fit: cover;
    border-radius: 14px;
    border: 2px solid #e2e8f0;
    background: #fff;
}

.product-image-clear {
    position: absolute;
    top: 0.5rem;
    right: 0.5rem;
    width: 32px;
    height: 32px;
    padding: 0;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.product-image-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.65rem;
}

.product-image-actions .btn {
    flex: 1 1 140px;
    min-height: 48px;
    font-weight: 600;
}

@media (max-width: 575px) {
    .product-image-actions .btn {
        flex: 1 1 100%;
    }

    .product-image-preview {
        width: 100%;
        max-width: 280px;
        height: auto;
        aspect-ratio: 1;
    }
}

.product-image-presets {
    margin-bottom: 1rem;
}

.product-image-presets-label {
    font-size: 0.85rem;
    font-weight: 600;
    color: #475569;
    margin-bottom: 0.65rem;
}

.product-image-presets-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(88px, 1fr));
    gap: 0.65rem;
}

.product-preset-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.35rem;
    padding: 0.5rem;
    border: 2px solid #e2e8f0;
    border-radius: 12px;
    background: #fff;
    cursor: pointer;
    transition: border-color 0.15s, box-shadow 0.15s, transform 0.15s;
}

.product-preset-btn img {
    width: 64px;
    height: 64px;
    object-fit: contain;
    border-radius: 8px;
}

.product-preset-btn span {
    font-size: 0.7rem;
    font-weight: 600;
    color: #64748b;
    line-height: 1.2;
    text-align: center;
}

.product-preset-btn:hover {
    border-color: #94a3b8;
    transform: translateY(-1px);
}

.product-preset-btn.is-selected {
    border-color: var(--bs-primary, #0d6efd);
    box-shadow: 0 0 0 3px rgba(13, 110, 253, 0.15);
}

.product-preset-btn.is-selected span {
    color: var(--bs-primary, #0d6efd);
}

.admin-actions {
    display: flex;
    align-items: center;
    gap: 0.45rem;
}

.admin-action-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 38px;
    border-radius: 10px;
    border: none;
    text-decoration: none;
    cursor: pointer;
    transition: transform 0.15s, box-shadow 0.2s, background 0.2s;
    font-size: 1rem;
}

.admin-action-btn:hover {
    transform: translateY(-1px);
}

.admin-action-view {
    background: #eff6ff;
    color: #2563eb;
    box-shadow: inset 0 0 0 1px #bfdbfe;
}

.admin-action-view:hover {
    background: #dbeafe;
    color: #1d4ed8;
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.2);
}

.admin-action-edit {
    background: #f5f3ff;
    color: #7c3aed;
    box-shadow: inset 0 0 0 1px #ddd6fe;
}

.admin-action-edit:hover {
    background: #ede9fe;
    color: #6d28d9;
    box-shadow: 0 4px 12px rgba(124, 58, 237, 0.2);
}

.admin-action-delete {
    background: #fef2f2;
    color: #dc2626;
    box-shadow: inset 0 0 0 1px #fecaca;
}

.admin-action-delete:hover {
    background: #fee2e2;
    color: #b91c1c;
    box-shadow: 0 4px 12px rgba(220, 38, 38, 0.2);
}

.admin-action-revert {
    background: #fff7ed;
    color: #ea580c;
    box-shadow: inset 0 0 0 1px #fed7aa;
}

.admin-action-revert:hover {
    background: #ffedd5;
    color: #c2410c;
    box-shadow: 0 4px 12px rgba(234, 88, 12, 0.2);
}

.admin-table .admin-actions form {
    margin: 0;
    line-height: 0;
}

@media (max-width: 991px) {
    .status-editor {
        width: 100%;
    }

    .status-editor-select {
        flex: 1;
        min-width: 0;
    }
}

.admin-product-thumb {
    width: 48px;
    height: 48px;
    border-radius: 10px;
    object-fit: cover;
    border: 1px solid #e2e8f0;
}

.admin-badge {
    font-weight: 600;
    font-size: 0.75rem;
    padding: 0.35em 0.75em;
    border-radius: 50px;
}

/* ── Admin login ── */
.admin-login-body {
    min-height: 100vh;
    background: linear-gradient(135deg, #1e1b4b 0%, #3730a3 50%, #5b21b6 100%);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 2rem;
}

.admin-login-card {
    background: #fff;
    border-radius: 20px;
    padding: 2.5rem;
    width: 100%;
    max-width: 420px;
    box-shadow: 0 24px 64px rgba(0,0,0,.25);
}

.admin-login-logo {
    text-align: center;
    margin-bottom: 2rem;
}

.admin-login-logo i {
    font-size: 2.5rem;
    color: #7c3aed;
}

.admin-login-logo h1 {
    font-size: 1.35rem;
    font-weight: 800;
    margin: 0.75rem 0 0.25rem;
    color: #0f172a;
}

.admin-login-logo p {
    color: #64748b;
    font-size: 0.9rem;
    margin: 0;
}

/* ── Caixa layout ── */
.caixa-body {
    min-height: 100vh;
    background: #0f172a;
    color: #e2e8f0;
}

.caixa-navbar {
    background: linear-gradient(90deg, #0f172a, #1e293b);
    border-bottom: 1px solid rgba(255,255,255,.08);
    padding: 0.85rem 1.5rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.caixa-navbar-brand {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    font-weight: 800;
    font-size: 1.05rem;
    color: #fff;
    text-decoration: none;
}

.caixa-navbar-brand i {
    color: #22c55e;
    font-size: 1.3rem;
}

.caixa-navbar-brand span {
    color: rgba(255,255,255,.5);
    font-weight: 600;
    font-size: 0.85rem;
}

.caixa-main {
    padding: 1.5rem;
    max-width: 720px;
    margin: 0 auto;
}

.caixa-panel {
    background: #1e293b;
    border: 1px solid rgba(255,255,255,.08);
    border-radius: 16px;
    padding: 1.75rem;
    box-shadow: 0 8px 32px rgba(0,0,0,.3);
}

.caixa-panel-title {
    text-align: center;
    font-size: 1.25rem;
    font-weight: 800;
    margin-bottom: 1.5rem;
    color: #fff;
}

.caixa-panel-title i {
    color: #22c55e;
    margin-right: 0.5rem;
}

.scanner-idle-icon {
    width: 88px;
    height: 88px;
    margin: 0 auto;
    border-radius: 50%;
    background: rgba(34, 197, 94, 0.15);
    color: #22c55e;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2.5rem;
}

.scanner-idle-text {
    color: rgba(255,255,255,.7);
    font-size: 1rem;
    line-height: 1.5;
}

.scanner-start-btn {
    max-width: 320px;
    margin: 0 auto;
    display: block;
    font-weight: 800;
    padding: 0.9rem 1.5rem;
    border-radius: 12px;
}

.scanner-viewport {
    max-width: 100%;
    min-height: 280px;
    border-radius: 12px;
    overflow: hidden;
    border: 2px solid rgba(34, 197, 94, 0.4);
    background: #0f172a;
}

.scanner-manual {
    border-top: 1px solid rgba(255, 255, 255, 0.12);
    max-width: 360px;
    margin-left: auto;
    margin-right: auto;
}

.scanner-manual-label {
    color: rgba(255, 255, 255, 0.65);
}

.scanner-manual-input .form-control {
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
    letter-spacing: 0.1em;
    font-size: 1.1rem;
}

.ficha-codigo-inline {
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
    letter-spacing: 0.08em;
    font-weight: 800;
}

#qr-reader video {
    border-radius: 12px;
}

#qr-reader {
    border-radius: 12px;
    overflow: hidden;
}

.caixa-manual-label {
    text-align: center;
    color: rgba(255,255,255,.5);
    font-size: 0.9rem;
    margin: 1.25rem 0 0.75rem;
}

.caixa-body .form-control {
    background: #0f172a;
    border-color: rgba(255,255,255,.15);
    color: #fff;
}

.caixa-body .form-control:focus {
    background: #0f172a;
    border-color: #22c55e;
    color: #fff;
    box-shadow: 0 0 0 3px rgba(34,197,94,.2);
}

.caixa-body .btn-success {
    background: linear-gradient(135deg, #16a34a, #22c55e);
    border: none;
    font-weight: 700;
}

.result-green {
    background: linear-gradient(135deg, #059669, #10b981);
    color: #fff;
    border-radius: 16px;
    box-shadow: 0 12px 40px rgba(16,185,129,.35);
    animation: fadeInUp 0.35s ease;
}

.result-red {
    background: linear-gradient(135deg, #dc2626, #ef4444);
    color: #fff;
    border-radius: 16px;
    box-shadow: 0 12px 40px rgba(239,68,68,.35);
    animation: fadeInUp 0.35s ease;
}

@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(12px); }
    to   { opacity: 1; transform: translateY(0); }
}

/* Caixa login */
.caixa-login-body {
    min-height: 100vh;
    background: linear-gradient(160deg, #0f172a 0%, #1e293b 50%, #0f172a 100%);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 2rem;
}

.caixa-login-card {
    background: #1e293b;
    border: 1px solid rgba(255,255,255,.1);
    border-radius: 20px;
    padding: 2.5rem;
    width: 100%;
    max-width: 420px;
    box-shadow: 0 24px 64px rgba(0,0,0,.4);
}

.caixa-login-logo {
    text-align: center;
    margin-bottom: 2rem;
}

.caixa-login-logo i {
    font-size: 2.5rem;
    color: #22c55e;
}

.caixa-login-logo h1 {
    font-size: 1.35rem;
    font-weight: 800;
    margin: 0.75rem 0 0.25rem;
    color: #fff;
}

.caixa-login-logo p {
    color: rgba(255,255,255,.5);
    font-size: 0.9rem;
    margin: 0;
}

.caixa-login-card .form-label {
    color: rgba(255,255,255,.7);
    font-weight: 600;
    font-size: 0.85rem;
}

/* ── Admin buttons & forms ── */
.admin-body .btn-primary {
    background: linear-gradient(135deg, #7c3aed, #9333ea);
    border: none;
    font-weight: 600;
}

.admin-body .btn-primary:hover {
    background: linear-gradient(135deg, #6d28d9, #7e22ce);
}

.admin-body .form-control:focus,
.admin-body .form-select:focus {
    border-color: #7c3aed;
    box-shadow: 0 0 0 3px rgba(124,58,237,.15);
}

.admin-login-card > .flash-messages,
.caixa-login-card > .flash-messages {
    padding: 0 0 1rem;
}

.admin-login-body > .flash-messages,
.caixa-login-body > .flash-messages,
.barraca-login-body > .flash-messages {
    width: 100%;
    max-width: 420px;
    padding: 0;
    margin: 0 0 0.75rem;
}

.admin-login-body .alert,
.caixa-login-body .alert,
.barraca-login-body .alert {
    max-width: 420px;
    margin: 0 auto 0;
}

/* ── Configurações / identidade ── */
.settings-sticky-sidebar {
    position: sticky;
    top: 1.5rem;
    z-index: 5;
}

.settings-color-field {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.settings-color-field .form-control-color {
    width: 52px;
    height: 44px;
    padding: 0.2rem;
    border-radius: 10px;
    cursor: pointer;
}

.settings-color-hex {
    font-family: ui-monospace, monospace;
    font-size: 0.9rem;
    background: #f8fafc;
}

.settings-asset-preview {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
    background: #f8fafc;
    border: 1px dashed #cbd5e1;
    border-radius: 12px;
    min-height: 80px;
}

.settings-asset-preview img {
    max-height: 56px;
    max-width: 180px;
    object-fit: contain;
}

.settings-asset-preview-sm img {
    max-height: 40px;
    max-width: 40px;
}

.settings-preview-navbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.85rem 1rem;
    border-radius: 12px;
    color: #fff;
    margin-bottom: 0.75rem;
}

.settings-preview-brand {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: 700;
    font-size: 0.9rem;
}

.settings-preview-logo {
    height: 24px;
    width: auto;
    max-width: 80px;
    object-fit: contain;
}

.settings-preview-cart {
    background: var(--accent);
    color: #1e1b4b;
    font-size: 0.75rem;
    font-weight: 700;
    padding: 0.35rem 0.65rem;
    border-radius: 8px;
}

.settings-preview-hero {
    border-radius: 12px;
    padding: 1.25rem;
    color: #fff;
}

.settings-preview-hero h3 {
    font-size: 1.1rem;
    font-weight: 800;
    margin-bottom: 0.5rem;
}

.settings-preview-hero p {
    font-size: 0.82rem;
    opacity: 0.9;
    margin-bottom: 0.75rem;
}

.settings-preview-btn {
    display: inline-block;
    background: #fff;
    padding: 0.4rem 0.85rem;
    border-radius: 8px;
    font-size: 0.78rem;
    font-weight: 700;
}

.settings-preview-swatches {
    display: flex;
    gap: 0.5rem;
}

.settings-swatch {
    width: 36px;
    height: 36px;
    border-radius: 10px;
    border: 2px solid #fff;
    box-shadow: 0 2px 8px rgba(15, 23, 42, 0.12);
}

.password-toggle-btn {
    border-color: #e2e8f0;
    color: #64748b;
    padding-inline: 0.75rem;
}

.password-toggle-btn:hover {
    color: #7c3aed;
    background: #f5f3ff;
    border-color: #ddd6fe;
}

.input-group .form-control.font-monospace {
    border-right: 0;
}

.input-group .password-toggle-btn {
    border-left: 0;
}

/* ── Responsive admin ── */
@media (max-width: 991.98px) {
    .admin-menu-toggle,
    .admin-sidebar-close {
        display: inline-flex;
    }

    .admin-sidebar {
        position: fixed;
        top: 0;
        left: 0;
        width: min(280px, 88vw);
        height: 100vh;
        height: 100dvh;
        min-height: 0;
        z-index: 1040;
        transform: translateX(-100%);
        transition: transform 0.25s ease;
        box-shadow: none;
    }

    .admin-nav-open .admin-sidebar {
        transform: translateX(0);
        box-shadow: 8px 0 32px rgba(15, 23, 42, 0.25);
    }

    .admin-sidebar-overlay {
        display: block;
        position: fixed;
        inset: 0;
        z-index: 1035;
        background: rgba(15, 23, 42, 0.45);
        opacity: 0;
        visibility: hidden;
        pointer-events: none;
        transition: opacity 0.25s ease, visibility 0.25s ease;
    }

    .admin-nav-open .admin-sidebar-overlay {
        opacity: 1;
        visibility: visible;
        pointer-events: auto;
    }

    .admin-nav-open {
        overflow: hidden;
    }

    .admin-sidebar-brand {
        padding-right: 3rem;
    }

    .admin-topbar {
        padding: 0.75rem 1rem;
    }

    .admin-content {
        padding: 1.25rem 1rem;
    }

    .admin-page-header {
        margin-bottom: 1.25rem;
    }

    .admin-page-title {
        font-size: 1.35rem;
    }
}

@media (min-width: 992px) {
    .admin-sidebar-overlay {
        display: none !important;
    }
}

/* Checkout — opções de entrega */
.checkout-entrega-options {
    margin: 0;
    padding: 0;
}

.checkout-entrega-option {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    padding: 1rem 1.1rem;
    border: 2px solid #e2e8f0;
    border-radius: 14px;
    cursor: pointer;
    transition: border-color 0.2s, background 0.2s;
}

.checkout-entrega-option:has(input:checked) {
    border-color: #7c3aed;
    background: #f5f3ff;
}

.checkout-entrega-option input {
    margin-top: 0.2rem;
    flex-shrink: 0;
}

.checkout-retire-agora {
    padding: 1rem 1.1rem;
    background: #fffbeb;
    border: 2px solid #fcd34d;
    border-radius: 14px;
}

.checkout-retire-check .form-check-input {
    width: 1.25rem;
    height: 1.25rem;
    margin-top: 0.15rem;
}

.checkout-retire-check .form-check-label {
    padding-left: 0.35rem;
}

/* Painel barraca */
.barraca-login-body {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: linear-gradient(145deg, #78350f 0%, #451a03 100%);
    padding: 1.5rem;
}

.barraca-login-card .caixa-login-logo i {
    color: #fbbf24;
}

.barraca-body {
    min-height: 100vh;
    background: linear-gradient(160deg, #1c1917 0%, #292524 100%);
}

.barraca-navbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    padding: 0.75rem 1rem;
    background: rgba(0, 0, 0, 0.35);
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    flex-wrap: wrap;
}

.barraca-navbar-brand {
    color: #fff;
    font-weight: 700;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    min-width: 0;
}

.barraca-navbar-name {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 140px;
}

.staff-nav-tabs {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.25rem;
    background: rgba(0, 0, 0, 0.25);
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.08);
}

.staff-nav-tab {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.45rem 0.85rem;
    border-radius: 9px;
    color: rgba(255, 255, 255, 0.72);
    text-decoration: none;
    font-size: 0.85rem;
    font-weight: 700;
    transition: background 0.2s, color 0.2s;
}

.staff-nav-tab:hover {
    color: #fff;
    background: rgba(255, 255, 255, 0.08);
}

.staff-nav-tab.active {
    color: #1c1917;
    background: #f59e0b;
}

.staff-nav-tab i {
    font-size: 1rem;
}

.staff-nav-logout {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.45rem 0.75rem;
    border-radius: 10px;
    color: rgba(255, 255, 255, 0.55);
    text-decoration: none;
    font-size: 0.85rem;
    font-weight: 600;
    border: 1px solid rgba(255, 255, 255, 0.1);
    transition: color 0.2s, border-color 0.2s;
}

.staff-nav-logout:hover {
    color: #fff;
    border-color: rgba(255, 255, 255, 0.25);
}

.barraca-main {
    max-width: 720px;
    margin: 0 auto;
    padding: 1.25rem;
    width: 100%;
    box-sizing: border-box;
}

.barraca-main:has(.barraca-leilao-index) {
    max-width: min(1080px, 100%);
}

.barraca-leilao-layout {
    width: 100%;
    min-width: 0;
}

.barraca-leilao-header {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-start;
    justify-content: space-between;
    gap: 0.75rem 1rem;
    margin-bottom: 1.25rem;
}

.barraca-leilao-header--page {
    margin-bottom: 1.5rem;
}

.barraca-leilao-header-main {
    flex: 1 1 12rem;
    min-width: 0;
}

.barraca-leilao-header .barraca-page-title {
    word-break: break-word;
    overflow-wrap: anywhere;
    line-height: 1.25;
}

.barraca-leilao-status {
    flex-shrink: 0;
    font-size: 0.85rem;
    padding: 0.45em 0.75em;
    align-self: flex-start;
}

.barraca-leilao-back {
    display: inline-flex;
    align-items: center;
    color: rgba(255, 255, 255, 0.55);
    font-size: 0.85rem;
    text-decoration: none;
    font-weight: 600;
}

.barraca-leilao-back:hover {
    color: #fff;
}

.barraca-leilao-panel {
    background: #fff;
    border-radius: 16px;
    border: 1px solid rgba(255, 255, 255, 0.12);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.2);
    overflow: hidden;
    height: 100%;
}

.barraca-leilao-panel-header {
    padding: 1rem 1.25rem;
    border-bottom: 1px solid var(--border, #e7e5e4);
    background: linear-gradient(180deg, #fafafa, #fff);
}

.barraca-leilao-panel-body {
    padding: 1.25rem;
}

.barraca-leilao-qr-card {
    background: #fff;
    border-radius: 16px;
    padding: 1.25rem 1rem 1.5rem;
    text-align: center;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.2);
    width: 100%;
    max-width: 420px;
    margin: 0 auto 1.25rem;
    box-sizing: border-box;
}

.barraca-leilao-qr-hint {
    color: #57534e;
    font-size: 0.9rem;
    margin-bottom: 1rem;
}

.barraca-leilao-qr-wrap {
    width: min(100%, 300px);
    margin: 0 auto;
}

.barraca-leilao-qr-img {
    display: block;
    width: 100%;
    height: auto;
    border: 1px solid #e7e5e4;
    border-radius: 12px;
}

.barraca-leilao-link {
    width: 100%;
    min-width: 0;
}

.barraca-leilao-link .input-group {
    width: 100%;
}

.barraca-leilao-link .form-control {
    min-width: 0;
    font-size: clamp(0.7rem, 2.5vw, 0.85rem);
}

.barraca-leilao-expires {
    margin: 1rem 0 0;
    font-size: 0.85rem;
    color: #57534e;
}

.barraca-leilao-cancel-form {
    text-align: center;
    max-width: 420px;
    margin: 0 auto;
}

.barraca-leilao-show {
    display: flex;
    flex-direction: column;
    align-items: stretch;
}

.barraca-leilao-table-wrap {
    -webkit-overflow-scrolling: touch;
}

.barraca-leilao-table th,
.barraca-leilao-table td {
    white-space: nowrap;
}

.barraca-leilao-table td:first-child {
    white-space: normal;
    min-width: 8rem;
}

.barraca-producao-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 1.25rem;
}

.barraca-page-title {
    color: #fff;
    font-size: 1.5rem;
    font-weight: 800;
    margin-bottom: 0.25rem;
}

.barraca-page-subtitle {
    color: rgba(255, 255, 255, 0.65);
    font-size: 0.9rem;
}

.barraca-queue-badge {
    background: #f59e0b;
    color: #1c1917;
    font-weight: 700;
    padding: 0.45rem 0.85rem;
    border-radius: 999px;
    white-space: nowrap;
}

.barraca-empty-state {
    padding: 3rem 1.5rem;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 16px;
    border: 1px dashed rgba(255, 255, 255, 0.15);
}

.barraca-order-card {
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 16px;
    margin-bottom: 1rem;
    overflow: hidden;
}

.barraca-order-header {
    padding: 1rem 1.1rem;
    background: rgba(0, 0, 0, 0.2);
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.barraca-order-number {
    display: inline-block;
    background: #f59e0b;
    color: #1c1917;
    font-weight: 800;
    font-size: 0.75rem;
    padding: 0.2rem 0.5rem;
    border-radius: 6px;
    margin-bottom: 0.35rem;
}

.barraca-order-header strong {
    color: #fff;
}

.barraca-order-items {
    padding: 0.5rem;
}

.barraca-item-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    padding: 0.85rem;
    border-radius: 12px;
    margin-bottom: 0.35rem;
    background: rgba(255, 255, 255, 0.04);
}

.barraca-item-row:last-child {
    margin-bottom: 0;
}

.barraca-item-info {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
    color: #fff;
}

.barraca-status-badge {
    align-self: flex-start;
}

.barraca-item-pendente {
    border-left: 3px solid #f59e0b;
}

.barraca-item-em_preparo {
    border-left: 3px solid #38bdf8;
}

.barraca-item-pronto {
    border-left: 3px solid #4ade80;
}

@media (max-width: 575px) {
    .barraca-navbar {
        justify-content: center;
    }

    .barraca-navbar-brand {
        flex: 1 1 100%;
        justify-content: center;
    }

    .barraca-navbar-name {
        max-width: none;
    }

    .staff-nav-tabs {
        flex: 1 1 auto;
        justify-content: center;
    }

    .staff-nav-tab span {
        display: none;
    }

    .staff-nav-tab {
        padding: 0.5rem 0.75rem;
    }

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

    .barraca-item-actions .btn {
        width: 100%;
    }

    .barraca-main {
        padding: 1rem 0.75rem;
    }

    .barraca-leilao-header {
        flex-direction: column;
        align-items: stretch;
    }

    .barraca-leilao-status {
        align-self: flex-start;
    }

    .barraca-leilao-qr-card {
        max-width: none;
        padding: 1rem 0.85rem 1.25rem;
    }

    .barraca-leilao-table thead {
        display: none;
    }

    .barraca-leilao-table tbody tr {
        display: block;
        padding: 0.85rem 1rem;
        border-bottom: 1px solid #e7e5e4;
    }

    .barraca-leilao-table tbody tr:last-child {
        border-bottom: none;
    }

    .barraca-leilao-table td {
        display: flex;
        justify-content: space-between;
        align-items: center;
        gap: 0.75rem;
        padding: 0.35rem 0;
        border: none;
        white-space: normal;
    }

    .barraca-leilao-table td::before {
        content: attr(data-label);
        font-size: 0.75rem;
        font-weight: 700;
        color: #78716c;
        text-transform: uppercase;
        letter-spacing: 0.02em;
        flex-shrink: 0;
    }

    .barraca-leilao-table td:last-child {
        justify-content: stretch;
        padding-top: 0.65rem;
    }

    .barraca-leilao-table td:last-child::before {
        display: none;
    }

    .barraca-leilao-table td:last-child .btn {
        width: 100%;
    }
}

.barraca-local-foto-preview-img {
    display: block;
    max-width: 280px;
    max-height: 200px;
    object-fit: cover;
    border-radius: 8px;
    border: 1px solid rgba(0, 0, 0, 0.1);
}

.barraca-deliver-modal-content {
    background: #0f172a;
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: #f8fafc;
}

.barraca-deliver-modal .barraca-scanner-panel {
    background: transparent;
    border: 0;
    padding: 0;
    box-shadow: none;
}

.barraca-deliver-modal .scanner-viewport {
    max-height: 50vh;
}

/* Panfleto editor */
.panfleto-preview-panel {
    position: sticky;
    top: 1rem;
}

.panfleto-preview-body {
    padding: 1rem;
    background: #f1f5f9;
    min-height: 520px;
}

.panfleto-preview-frame {
    width: 100%;
    min-height: 720px;
    height: calc(100vh - 220px);
    max-height: 900px;
    border: 0;
    border-radius: 12px;
    background: #e2e8f0;
    box-shadow: 0 8px 24px rgba(15, 23, 42, 0.08);
}

.panfleto-preview-frame--a4 {
    min-height: 820px;
    max-height: 960px;
}

@media (max-width: 991px) {
    .panfleto-preview-panel {
        position: static;
    }

    .panfleto-preview-frame {
        min-height: 560px;
        height: 70vh;
        max-height: none;
    }
}

/* Auditoria — filtros */
.admin-audit-filters .admin-panel-header h2 {
    display: flex;
    align-items: center;
}

.admin-audit-filters-badge {
    font-size: 0.75rem;
    font-weight: 700;
    color: #7c3aed;
    background: #ede9fe;
    border: 1px solid #ddd6fe;
    padding: 0.25rem 0.65rem;
    border-radius: 999px;
}

.admin-audit-filters-form {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
}

.admin-audit-search .form-control {
    border-radius: 10px;
    padding: 0.65rem 1rem 0.65rem 2.75rem;
    border-color: #e2e8f0;
    background: #f8fafc url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='%2394a3b8' viewBox='0 0 16 16'%3E%3Cpath d='M11.742 10.344a6.5 6.5 0 1 0-1.397 1.398h-.001l3.85 3.85a1 1 0 0 0 1.415-1.414l-3.85-3.85zm-5.242 1.156a5 5 0 1 1 0-10 5 5 0 0 1 0 10z'/%3E%3C/svg%3E") no-repeat 1rem center;
    font-size: 0.92rem;
    transition: border-color 0.15s, box-shadow 0.15s, background-color 0.15s;
}

.admin-audit-search .form-control:focus {
    background-color: #fff;
    border-color: var(--bs-primary, #7c3aed);
    box-shadow: 0 0 0 3px rgba(124, 58, 237, 0.12);
}

.admin-audit-search .admin-audit-field-label {
    margin-bottom: 0.45rem;
}

.admin-audit-filters-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1rem;
}

.admin-audit-field-label {
    display: flex;
    align-items: center;
    gap: 0.35rem;
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: #64748b;
    margin-bottom: 0.4rem;
}

.admin-audit-field-label i {
    font-size: 0.85rem;
    color: #94a3b8;
}

.admin-audit-field .form-select,
.admin-audit-field .form-control {
    border-radius: 10px;
    border-color: #e2e8f0;
    font-size: 0.88rem;
    padding: 0.5rem 0.85rem;
    background-color: #fff;
    transition: border-color 0.15s, box-shadow 0.15s;
}

.admin-audit-field .form-select:focus,
.admin-audit-field .form-control:focus {
    border-color: var(--bs-primary, #7c3aed);
    box-shadow: 0 0 0 3px rgba(124, 58, 237, 0.1);
}

.admin-audit-filters-footer {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 1.25rem;
    flex-wrap: wrap;
    padding-top: 1.15rem;
    border-top: 1px solid #f1f5f9;
}

.admin-audit-period {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.admin-audit-period-label {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: #64748b;
}

.admin-audit-period-fields {
    display: flex;
    align-items: flex-end;
    gap: 0.65rem;
    flex-wrap: wrap;
}

.admin-audit-field--date {
    min-width: 150px;
}

.admin-audit-period-sep {
    font-size: 0.82rem;
    color: #94a3b8;
    padding-bottom: 0.55rem;
    font-weight: 500;
}

.admin-audit-filters-actions {
    display: flex;
    gap: 0.6rem;
    flex-wrap: wrap;
}

.admin-audit-filters-actions .btn {
    border-radius: 10px;
    font-weight: 600;
    font-size: 0.88rem;
    padding: 0.5rem 1.15rem;
}

@media (max-width: 1199px) {
    .admin-audit-filters-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 575px) {
    .admin-audit-filters-grid {
        grid-template-columns: 1fr;
    }

    .admin-audit-filters-footer {
        flex-direction: column;
        align-items: stretch;
    }

    .admin-audit-filters-actions {
        width: 100%;
    }

    .admin-audit-filters-actions .btn {
        flex: 1;
        justify-content: center;
    }

    .admin-audit-period-fields {
        flex-direction: column;
        align-items: stretch;
    }

    .admin-audit-period-sep {
        display: none;
    }

    .admin-audit-field--date {
        min-width: 0;
    }
}

/* Auditoria — filtros */
.admin-audit-filters .admin-panel-header h2 {
    display: flex;
    align-items: center;
}

.admin-audit-filters-badge {
    font-size: 0.75rem;
    font-weight: 700;
    color: #7c3aed;
    background: #ede9fe;
    border: 1px solid #ddd6fe;
    padding: 0.25rem 0.65rem;
    border-radius: 999px;
}

.admin-audit-filters-form {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
}

.admin-audit-search .form-control {
    border-radius: 10px;
    padding: 0.65rem 1rem 0.65rem 2.75rem;
    border-color: #e2e8f0;
    background: #f8fafc url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='%2394a3b8' viewBox='0 0 16 16'%3E%3Cpath d='M11.742 10.344a6.5 6.5 0 1 0-1.397 1.398h-.001l3.85 3.85a1 1 0 0 0 1.415-1.414l-3.85-3.85zm-5.242 1.156a5 5 0 1 1 0-10 5 5 0 0 1 0 10z'/%3E%3C/svg%3E") no-repeat 1rem center;
    font-size: 0.92rem;
    transition: border-color 0.15s, box-shadow 0.15s, background-color 0.15s;
}

.admin-audit-search .form-control:focus {
    background-color: #fff;
    border-color: var(--bs-primary, #7c3aed);
    box-shadow: 0 0 0 3px rgba(124, 58, 237, 0.12);
}

.admin-audit-search .admin-audit-field-label {
    margin-bottom: 0.45rem;
}

.admin-audit-filters-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1rem;
}

.admin-audit-field-label {
    display: flex;
    align-items: center;
    gap: 0.35rem;
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: #64748b;
    margin-bottom: 0.4rem;
}

.admin-audit-field-label i {
    font-size: 0.85rem;
    color: #94a3b8;
}

.admin-audit-field .form-select,
.admin-audit-field .form-control {
    border-radius: 10px;
    border-color: #e2e8f0;
    font-size: 0.88rem;
    padding: 0.5rem 0.85rem;
    background-color: #fff;
    transition: border-color 0.15s, box-shadow 0.15s;
}

.admin-audit-field .form-select:focus,
.admin-audit-field .form-control:focus {
    border-color: var(--bs-primary, #7c3aed);
    box-shadow: 0 0 0 3px rgba(124, 58, 237, 0.1);
}

.admin-audit-filters-footer {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 1.25rem;
    flex-wrap: wrap;
    padding-top: 1.15rem;
    border-top: 1px solid #f1f5f9;
}

.admin-audit-period {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.admin-audit-period-label {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: #64748b;
}

.admin-audit-period-fields {
    display: flex;
    align-items: flex-end;
    gap: 0.65rem;
    flex-wrap: wrap;
}

.admin-audit-field--date {
    min-width: 150px;
}

.admin-audit-period-sep {
    font-size: 0.82rem;
    color: #94a3b8;
    padding-bottom: 0.55rem;
    font-weight: 500;
}

.admin-audit-filters-actions {
    display: flex;
    gap: 0.6rem;
    flex-wrap: wrap;
}

.admin-audit-filters-actions .btn {
    border-radius: 10px;
    font-weight: 600;
    font-size: 0.88rem;
    padding: 0.5rem 1.15rem;
}

@media (max-width: 1199px) {
    .admin-audit-filters-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 575px) {
    .admin-audit-filters-grid {
        grid-template-columns: 1fr;
    }

    .admin-audit-filters-footer {
        flex-direction: column;
        align-items: stretch;
    }

    .admin-audit-filters-actions {
        width: 100%;
    }

    .admin-audit-filters-actions .btn {
        flex: 1;
        justify-content: center;
    }

    .admin-audit-period-fields {
        flex-direction: column;
        align-items: stretch;
    }

    .admin-audit-period-sep {
        display: none;
    }

    .admin-audit-field--date {
        min-width: 0;
    }
}

/* Vendas por vendedor */
.admin-vendas-rank {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    font-weight: 800;
    font-size: 0.85rem;
    color: #64748b;
    min-width: 2.5rem;
}

.admin-vendas-rank--gold { color: #d97706; }
.admin-vendas-rank--silver { color: #64748b; }
.admin-vendas-rank--bronze { color: #b45309; }

.admin-vendas-rank-bar {
    height: 4px;
    background: #f1f5f9;
    border-radius: 999px;
    overflow: hidden;
    max-width: 180px;
}

.admin-vendas-rank-bar span {
    display: block;
    height: 100%;
    background: linear-gradient(90deg, var(--bs-primary, #7c3aed), #10b981);
    border-radius: 999px;
}

.admin-vendas-ranking-table tbody tr:first-child td {
    background: linear-gradient(90deg, rgba(251, 191, 36, 0.06), transparent);
}

/* ── Painel unificado da equipe ── */
.staff-body {
    min-height: 100vh;
    background: #0f172a;
    color: #e2e8f0;
}

.staff-navbar {
    background: linear-gradient(90deg, #0f172a, #1e293b);
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    padding: 0.75rem 1rem;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.75rem 1rem;
}

.staff-navbar-brand-wrap {
    flex: 0 0 auto;
}

.staff-navbar-brand {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    color: #fff;
    text-decoration: none;
    font-weight: 700;
}

.staff-navbar-brand:hover {
    color: #fff;
}

.staff-navbar-logo {
    height: 36px;
    width: auto;
    border-radius: 8px;
}

.staff-navbar-subtitle {
    color: rgba(255, 255, 255, 0.55);
    font-weight: 500;
}

.staff-navbar-actions {
    margin-left: auto;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.staff-admin-link {
    border-color: rgba(255, 255, 255, 0.25);
}

.staff-main {
    padding: 1.25rem 1rem 2rem;
    max-width: 960px;
    margin: 0 auto;
}

.staff-main--scanner {
    max-width: 720px;
}

@media (max-width: 767.98px) {
    .staff-navbar {
        flex-direction: column;
        align-items: stretch;
    }

    .staff-nav-tabs {
        order: 3;
        width: 100%;
        justify-content: flex-start;
        overflow-x: auto;
    }

    .staff-navbar-actions {
        margin-left: 0;
        justify-content: space-between;
    }
}

/* ── Painel unificado da equipe ── */
.staff-body {
    min-height: 100vh;
    background: #0f172a;
    color: #e2e8f0;
}

.staff-navbar {
    background: linear-gradient(90deg, #0f172a, #1e293b);
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    padding: 0.75rem 1rem;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.75rem 1rem;
}

.staff-navbar-brand-wrap {
    flex: 0 0 auto;
}

.staff-navbar-brand {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    color: #fff;
    text-decoration: none;
    font-weight: 700;
}

.staff-navbar-brand:hover {
    color: #fff;
}

.staff-navbar-logo {
    height: 36px;
    width: auto;
    border-radius: 8px;
}

.staff-navbar-subtitle {
    color: rgba(255, 255, 255, 0.55);
    font-weight: 500;
}

.staff-navbar-actions {
    margin-left: auto;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.staff-admin-link {
    border-color: rgba(255, 255, 255, 0.25);
}

.staff-main {
    padding: 1.25rem 1rem 2rem;
    max-width: 960px;
    margin: 0 auto;
}

.staff-main--scanner {
    max-width: 720px;
}

@media (max-width: 767.98px) {
    .staff-navbar {
        flex-direction: column;
        align-items: stretch;
    }

    .staff-nav-tabs {
        order: 3;
        width: 100%;
        justify-content: flex-start;
        overflow-x: auto;
    }

    .staff-navbar-actions {
        margin-left: 0;
        justify-content: space-between;
    }
}
