:root {
    --bg-deep: #0b141a;
    --bg-sidebar: #111b21;
    --bg-card: rgba(35, 45, 54, 0.7);
    --primary: #00a884;
    --primary-light: #00d2ff;
    --danger: #ef4444;
    --text-main: #e9edef;
    --text-dim: #8696a0;
    --glass-border: 1px solid rgba(255, 255, 255, 0.08);
    --premium-gradient: linear-gradient(135deg, #00a884 0%, #00d2ff 100%);
    --transition: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Preven��o de flash de login */
html.is-logged-in #landing-wrapper {
    display: none !important;
}

html.is-logged-out #main-content {
    display: none !important;
}

html.is-logged-out body {
    overflow: auto;
    height: auto;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: 'Inter', system-ui, -apple-system, sans-serif;
    background-color: var(--bg-deep);
    color: var(--text-main);
    height: 100vh;
    overflow: hidden;
    font-size: 14px;
}

/* Scrollbar Style */
::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}

::-webkit-scrollbar-track {
    background: transparent;
}

::-webkit-scrollbar-thumb {
    background: #374045;
    border-radius: 10px;
}

::-webkit-scrollbar-thumb:hover {
    background: #4b555b;
}

.glass {
    background: var(--bg-card);
    backdrop-filter: blur(12px);
    border: 1px solid var(--glass-border);
    border-radius: 12px;
}

.mobile-top-bar {
    display: none;
}

.app-container {
    display: flex;
    height: 100vh;
    width: 100vw;
    overflow: hidden;
}


.hidden {
    display: none !important;
}

/* Estilos de Overlay removidos para dar lugar � Landing Page */

/* Sidebar Refinement */
.sidebar {
    width: 260px;
    background: var(--bg-sidebar);
    border-right: 1px solid rgba(255, 255, 255, 0.05);
    display: flex;
    flex-direction: column;
    position: sticky;
    top: 0;
    height: 100vh;
    overflow-y: auto;
    z-index: 100;
}

.sidebar-header {
    padding: 0 20px 20px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    margin-bottom: 10px;
}

.user-badge {
    margin-top: 10px;
    padding: 10px 15px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.user-badge-info {
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 0;
}

.user-badge i {
    font-size: 1.1rem;
    color: var(--primary);
    flex-shrink: 0;
}

.user-badge span {
    font-weight: 600;
    color: var(--text-main);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    font-size: 0.9rem;
}

/* LED Status Dot */
.status-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    flex-shrink: 0;
    transition: all 0.3s ease;
}

.status-dot.conectado {
    background: #25D366;
    box-shadow: 0 0 8px #25D366;
}

.status-dot.desconectado,
.status-dot.disconnected {
    background: #ef4444;
    box-shadow: 0 0 8px #ef4444;
}

.status-dot.aguardando {
    background: #ffc107;
    box-shadow: 0 0 8px #ffc107;
}

.sidebar-brand {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    margin-bottom: 15px;
    text-align: center;
}

.sidebar-logo {
    width: 80px;
    height: auto;
    margin-top: 5px;
    filter: drop-shadow(0 0 10px rgba(0, 168, 132, 0.2));
}

.sidebar-header h1 {
    font-size: 1.2rem;
    font-weight: 700;
    /* Badges de Produto - Removido por consolidacao no style.css */
    color: var(--primary);
    letter-spacing: -0.5px;
    margin: 0;
}

.sidebar-header h1 span {
    color: var(--text-main);
    font-weight: 700;
}

#sidebar-robot-status {
    flex-direction: column;
    align-items: flex-start;
    gap: 4px;
}

#sidebar-robot-status>div {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 0.88rem;
}

#sidebar-robot-status span {
    font-weight: 600;
    color: var(--text-main);
}

.sidebar nav {
    flex: 1;
    padding: 10px;
}

.sidebar nav button {
    width: 100%;
    padding: 12px 15px;
    margin-bottom: 5px;
    background: transparent;
    border: none;
    color: var(--text-dim);
    border-radius: 8px;
    cursor: pointer;
    text-align: left;
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 0.95rem;
    font-weight: 600;
    transition: var(--transition);
}

.sidebar nav button:hover {
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-main);
}

.sidebar nav button.active {
    background: rgba(0, 168, 132, 0.1);
    color: var(--primary);
}

/* Main Content area */
main {
    flex: 1;
    padding: 30px;
    overflow-y: auto;
    background-color: var(--bg-deep);
    display: flex;
    flex-direction: column;
    gap: 20px;
    z-index: 1;
    /* Abaixo da sidebar */
    position: relative;
}

.tab-content {
    display: none;
    width: 100%;
    max-width: 1400px;
    margin: 0 auto;
}

.tab-content.active {
    display: flex;
    flex-direction: column;
    gap: 25px;
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.content-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.content-header h1,
.catalog-header-premium h2 {
    font-size: 1.5rem !important;
    font-weight: 800;
    color: var(--text-main);
    display: flex;
    align-items: center;
    gap: 12px;
    letter-spacing: -0.5px;
    margin: 0;
    margin-bottom: 4px !important;
    /* Reduzido de 8px para 4px */
}

.content-header p,
.catalog-header-premium p {
    color: var(--text-dim);
    font-size: 0.95rem;
    margin: 0;
}

/* Components */
.card {
    padding: 30px;
    margin-bottom: 0;
}

.mt-30 {
    margin-top: 30px !important;
}

.mb-30 {
    margin-bottom: 30px !important;
}

.card h2,
.card h3 {
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--text-main);
    display: flex;
    align-items: center;
    gap: 10px;
    margin-top: 0;
    margin-bottom: 20px;
}

.card h2 i,
.card h3 i {
    color: var(--primary);
}

/* Buttons */
.btn-premium {
    background: var(--premium-gradient);
    color: white;
    border: none;
    padding: 12px 24px;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    box-shadow: 0 4px 15px rgba(0, 168, 132, 0.2);
}

.btn-premium:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 168, 132, 0.4);
    filter: brightness(1.1);
}

.btn-secondary {
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-main);
    border: var(--glass-border);
    padding: 10px 20px;
    border-radius: 8px;
    cursor: pointer;
    transition: var(--transition);
}

.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.1);
}

.btn-danger {
    background: rgba(239, 68, 68, 0.1);
    color: #ef4444;
    border: 1px solid rgba(239, 68, 68, 0.2);
    padding: 10px 20px;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 600;
    transition: var(--transition);
}

.btn-danger:hover {
    background: rgba(239, 68, 68, 0.2);
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(239, 68, 68, 0.2);
}

.btn-success {
    background: rgba(0, 168, 132, 0.1);
    color: var(--primary);
    border: 1px solid rgba(0, 168, 132, 0.2);
    padding: 10px 20px;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 600;
    transition: var(--transition);
}

.btn-success:hover {
    background: rgba(0, 168, 132, 0.2);
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(0, 168, 132, 0.2);
}

.btn-outline {
    background: transparent;
    color: var(--text-dim);
    border: 1px solid rgba(255, 255, 255, 0.1);
    padding: 8px 15px;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 600;
    font-size: 0.85rem;
    transition: var(--transition);
    display: flex;
    align-items: center;
    gap: 8px;
}

.btn-outline:hover {
    background: rgba(255, 255, 255, 0.05);
    color: white;
    border-color: rgba(255, 255, 255, 0.2);
}

.btn-ai-magic {
    background: linear-gradient(135deg, rgba(168, 85, 247, 0.1) 0%, rgba(236, 72, 153, 0.1) 100%);
    color: #c084fc;
    border: 1px solid rgba(168, 85, 247, 0.3) !important;
}

.btn-ai-magic:hover {
    background: linear-gradient(135deg, rgba(168, 85, 247, 0.2) 0%, rgba(236, 72, 153, 0.2) 100%);
    color: #e879f9;
    box-shadow: 0 0 15px rgba(168, 85, 247, 0.2);
    transform: scale(1.02);
}

/* Forms */
input:not([type="checkbox"]):not([type="radio"]):not([type="file"]),
select,
textarea {
    width: 100%;
    padding: 12px 18px;
    background: rgba(0, 0, 0, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    /* Ajustado para 8px para ficar igual aos botões */
    color: white;
    margin-bottom: 0;
    font-size: 0.95rem;
    outline: none;
    transition: var(--transition);
    height: 48px;
    box-sizing: border-box;
}

textarea {
    height: auto;
    /* Textarea expande */
    min-height: 100px;
}

/* Ajuste de Alinhamento para a Linha de Preços do Modal */
#offer-fields-row {
    background: rgba(255, 255, 255, 0.02);
    padding: 15px;
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.05);
    margin-bottom: 20px;
}

#offer-fields-row label {
    margin-bottom: 6px;
    font-size: 0.8rem;
    color: var(--text-dim);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

#offer-fields-row input,
#offer-fields-row select {
    height: 46px !important;
    border-radius: 8px !important;
    background: rgba(0, 0, 0, 0.3) !important;
    border: 1px solid rgba(255, 255, 255, 0.1) !important;
    transition: all 0.3s ease;
}

#offer-fields-row input:focus,
#offer-fields-row select:focus {
    border-color: var(--primary) !important;
    box-shadow: 0 0 10px rgba(0, 168, 132, 0.2);
}

/* Botão Premium Refinado */
.btn-premium {
    background: linear-gradient(135deg, #00a884 0%, #00d2ff 100%);
    border: none;
    color: #000;
    padding: 12px 30px;
    border-radius: 8px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 4px 15px rgba(0, 168, 132, 0.3);
}

.btn-premium:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0, 168, 132, 0.5);
    filter: brightness(1.1);
}

/* Utilitários de Margem */
.mt-10 {
    margin-top: 10px !important;
}

/* Ajuste do Modal de Categorias */
#new-category-days {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 10px;
}

.actions-group {
    display: flex;
    gap: 10px;
    align-items: center;
    width: 100%;
}

.actions-group input {
    flex: 1;
    /* Faz o input ocupar o espaço restante */
}

/* Estilo para a Seção de Categorias Existentes */
.mt-20 label {
    display: block;
    margin-bottom: 10px;
}

#categories-list {
    padding: 15px;
    background: rgba(0, 0, 0, 0.2);
    border-radius: 10px;
    min-height: 100px;
    max-height: 250px;
    overflow-y: auto;
}

/* Itens dentro da lista de categorias - Versão Premium */
.category-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 16px;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 12px;
    margin-bottom: 10px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.category-item:hover {
    background: rgba(255, 255, 255, 0.05);
    border-color: rgba(0, 168, 132, 0.3);
    transform: translateX(5px);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.category-info {
    display: flex;
    align-items: center;
    gap: 12px;
}

.category-info i {
    color: var(--primary);
    font-size: 1.1rem;
}

.category-name {
    font-weight: 700;
    color: #fff;
    font-size: 0.95rem;
}

.category-schedule {
    font-size: 0.75rem;
    color: var(--text-dim);
    margin-left: 5px;
    font-weight: 400;
}

.category-actions {
    display: flex;
    align-items: center;
    gap: 12px;
}

.btn-cat-action {
    background: transparent;
    border: none;
    cursor: pointer;
    font-size: 1rem;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
}

.btn-edit-cat {
    color: var(--text-dim);
}

.btn-edit-cat:hover {
    color: #fff;
    transform: scale(1.1);
}

.btn-delete-cat {
    color: rgba(239, 68, 68, 0.6);
}

.btn-delete-cat:hover {
    color: var(--danger);
    transform: scale(1.1);
}

.btn-groups-cat {
    background: rgba(0, 210, 255, 0.1);
    color: #00d2ff;
    border: 1px solid rgba(0, 210, 255, 0.2);
    padding: 6px 12px;
    border-radius: 8px;
    font-size: 0.75rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 6px;
    transition: all 0.3s;
}

/* Botões de Ação Premium */
.btn-icon-premium {
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    color: var(--text-dim);
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-icon-premium:hover {
    background: rgba(255, 255, 255, 0.1);
    color: white;
    border-color: rgba(255, 255, 255, 0.3);
    transform: translateY(-2px);
}

.btn-icon-premium.danger:hover {
    background: rgba(239, 68, 68, 0.2);
    color: var(--danger);
    border-color: var(--danger);
}

.btn-premium-v2 {
    height: 44px;
    padding: 0 20px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    color: white;
    font-weight: 600;
    font-size: 0.85rem;
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-premium-v2:hover {
    background: var(--primary);
    color: black;
    border-color: var(--primary);
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(0, 168, 132, 0.3);
}

.flex-center-gap-10 {
    display: flex;
    align-items: center;
    gap: 10px;
}

select option {
    background-color: #0d1117;
    color: #e2e8f0;
}

input:not([type="checkbox"]):not([type="radio"]):not([type="file"]):focus,
select:focus,
textarea:focus {
    border-color: #00a884;
    background: rgba(0, 0, 0, 0.3);
    box-shadow: 0 0 0 3px rgba(0, 168, 132, 0.1);
}

.form-group {
    margin-bottom: 22px;
    /* Espaço entre grupos */
    display: flex;
    flex-direction: column;
    gap: 8px;
    /* Espaço entre label e input */
}

label {
    display: block;
    margin: 0;
    color: #94a3b8;
    font-size: 0.85rem;
    font-weight: 600;
    letter-spacing: 0.3px;
}

small {
    display: block;
    margin-top: 5px;
    color: var(--text-dim);
    font-size: 0.75rem;
}

/* Grid System for Forms */
.grid-2,
.grid-3 {
    display: grid;
    gap: 20px;
    align-items: flex-start;
}

.grid-2 {
    grid-template-columns: repeat(2, 1fr);
}

.grid-3 {
    grid-template-columns: repeat(3, 1fr);
}

@media (max-width: 768px) {

    .grid-2,
    .grid-3 {
        grid-template-columns: 1fr;
        gap: 15px;
    }
}

.flex-between {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 10px;
}

/* Overlays & Modals */
.overlay,
.modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.9);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 10000;
    backdrop-filter: blur(8px);
}

.overlay.hidden,
.modal.hidden {
    display: none !important;
}

/* License Box Block */
.license-box {
    width: 450px;
    padding: 40px;
    text-align: center;
    background: linear-gradient(135deg, rgba(20, 20, 20, 0.9), rgba(40, 40, 40, 0.9));
    border: 1px solid rgba(255, 68, 68, 0.2);
    box-shadow: 0 0 40px rgba(239, 68, 68, 0.15);
}

.license-box h1 {
    margin-bottom: 20px;
    font-weight: 800;
    letter-spacing: -1px;
}

/* Product Grid Compacto */
.offers-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 12px;

}

.offer-card {
    padding: 8px;
    position: relative;
    transition: var(--transition);
    height: 100%;
}

.offer-card:hover {
    transform: translateY(-3px);
}

.media-container {
    position: relative;
    overflow: visible;
    border-radius: 6px;
    margin-bottom: 8px;
    width: 100%;
}

.media-container:hover .media-overlay-info {
    opacity: 1;
}

.media-overlay-info {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(15, 23, 42, 0.90);
    backdrop-filter: blur(2px);
    color: #e2e8f0;
    padding: 10px;
    opacity: 0;
    transition: opacity 0.3s ease;
    z-index: 5;
    display: flex;
    flex-direction: column;
    overflow-y: auto;
    font-size: 0.75rem;
    pointer-events: auto;
}

.media-overlay-info h4 {
    color: var(--primary);
    font-size: 0.8rem;
    margin-bottom: 5px;
    line-height: 1.2;
}

.media-overlay-info p {
    white-space: pre-wrap;
    line-height: 1.3;
}

.media-overlay-info::-webkit-scrollbar {
    width: 4px;
}

.media-overlay-info::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.2);
    border-radius: 4px;
}

.offer-image {
    width: 100%;
    aspect-ratio: 1/1;
    object-fit: cover;
    border-radius: 6px;
    margin-bottom: 8px;
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.offer-info h3 {
    font-size: 0.8rem;
    font-weight: 600;
    margin-bottom: 4px;
    color: var(--text-main);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.offer-info .price {
    font-size: 0.72rem;
    font-weight: 700;
    color: var(--primary);
    margin-bottom: 6px;
}

.offer-actions {
    display: flex;
    gap: 8px;
    margin-top: 8px;
}

.category-badge-inline {
    display: inline-block;
    padding: 3px 10px;
    border-radius: 4px;
    font-size: 0.65rem;
    font-weight: 700;
    color: white;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
}

/* Status Badges no Card */
.offer-badge {
    position: absolute;
    top: 15px;
    right: 15px;
    padding: 4px 10px;
    border-radius: 6px;
    font-size: 0.65rem;
    font-weight: 800;
    text-transform: uppercase;
    z-index: 10;
    letter-spacing: 0.5px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
}

.status-active {
    background: var(--primary);
    color: white;
}

.status-paused {
    background: var(--danger);
    color: white;
}

.offer-card.paused {
    opacity: 0.7;
    filter: grayscale(0.5);
}

.pagination-controls {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 15px;
    margin-top: 25px;
    margin-bottom: 15px;
}

.pagination-controls button {
    padding: 8px 15px;
    border-radius: 6px;
    font-size: 0.85rem;
}

.btn-edit,
.btn-delete,
.btn-mark-sale {
    flex: 1;
    height: 28px;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: var(--transition);
    font-size: 0.75rem;
}

.btn-edit,
.btn-mark-sale {
    background: rgba(0, 168, 132, 0.1);
    color: var(--primary);
    border: 1px solid rgba(0, 168, 132, 0.2);
}

.btn-edit:hover,
.btn-mark-sale:hover {
    background: var(--primary);
    color: white;
}

.btn-delete {
    background: rgba(239, 68, 68, 0.1);
    color: var(--danger);
    border: 1px solid rgba(239, 68, 68, 0.2);
}

.btn-delete:hover {
    background: var(--danger);
    color: white;
}

/* Poll Indicator Button */
.btn-poll-indicator {
    flex: 1;
    height: 28px;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: help;
    transition: var(--transition);
    font-size: 0.75rem;
    background: rgba(245, 158, 11, 0.1);
    color: #f59e0b;
    border: 1px solid rgba(245, 158, 11, 0.2);
}

.btn-poll-indicator:hover {
    background: #f59e0b;
    color: white;
}

/* Utils */
.flex-between {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.mt-20 {
    margin-top: 20px;
}

.text-center {
    text-align: center;
}

.premium-text {
    background: var(--premium-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    font-weight: 800;
}

.code-box {
    background: rgba(0, 0, 0, 0.5);
    padding: 12px;
    border-radius: 8px;
    font-family: 'JetBrains Mono', monospace;
    color: var(--primary);
    margin: 15px 0;
    font-size: 1.1rem;
    letter-spacing: 1px;
}


/* Status Badge Refinement */
.status-badge {
    padding: 5px 12px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.status-badge.conectado {
    background: rgba(0, 168, 132, 0.2);
    color: var(--primary);
}

.status-badge.desconectado {
    background: rgba(239, 68, 68, 0.2);
    color: var(--danger);
}

.status-badge.aguardando {
    background: rgba(255, 193, 7, 0.2);
    color: #ffc107;
}

/* Modal Content Refinement */
.modal-content {
    width: 650px;
    max-width: 95vw;
    max-height: 85vh;
    overflow-y: auto;
    overflow-x: hidden;
    /* For�a apenas scroll vertical */
    padding: 25px;
    position: relative;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.6);
}

.modal-actions {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    gap: 10px;
    margin-top: 20px;
}

.btn-cancel {
    background: transparent;
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: var(--text-dim);
    padding: 12px 24px;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 600;
    transition: var(--transition);
}

.btn-cancel:hover {
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-main);
}

/* Switches */
.switch {
    position: relative;
    display: inline-block;
    width: 50px;
    height: 24px;
}

.switch input {
    display: none;
}

.slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #333;
    transition: .4s;
    border-radius: 34px;
}

.slider:before {
    position: absolute;
    content: "";
    height: 16px;
    width: 16px;
    left: 4px;
    bottom: 4px;
    background-color: white;
    transition: .4s;
    border-radius: 50%;
}

input:checked+.slider {
    background-color: var(--primary);
}

input:checked+.slider:before {
    transform: translateX(26px);
}

/* Group Lists */
.sidebar-groups {
    padding: 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    flex-shrink: 0;
    max-height: 300px;
}

.sidebar-footer {
    margin-top: auto;
    padding: 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.btn-sidebar-footer {
    width: 100%;
    padding: 12px;
    background: rgba(239, 68, 68, 0.1);
    color: #ef4444;
    border: 1px solid rgba(239, 68, 68, 0.2);
    border-radius: 8px;
    cursor: pointer;
    font-weight: 600;
    transition: var(--transition);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.btn-sidebar-footer:hover {
    background: rgba(239, 68, 68, 0.2);
    transform: translateY(-2px);
}

.sidebar-groups h3 {
    font-size: 0.75rem;
    text-transform: uppercase;
    color: var(--text-dim);
    margin-bottom: 12px;
    letter-spacing: 1px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.mini-group-list {
    overflow-y: auto;
    max-height: 180px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.mini-group-item {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 0.85rem;
    color: var(--text-main);
    padding: 6px 8px;
    border-radius: 6px;
    background: rgba(255, 255, 255, 0.02);
}

.search-box-mini {
    position: relative;
    margin-bottom: 12px;
}

.search-box-mini i {
    position: absolute;
    left: 10px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-dim);
    font-size: 0.8rem;
    pointer-events: none;
}

.search-box-mini input {
    padding: 8px 10px 8px 30px;
    margin-bottom: 0;
    font-size: 0.8rem;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.search-box-mini input:focus {
    border-color: var(--primary);
    background: rgba(0, 168, 132, 0.05);
}

.mb-10 {
    margin-bottom: 10px;
}

.card-inner {
    background: rgba(0, 0, 0, 0.2);
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.modal-image-preview {
    width: 100%;
    height: 200px;
    object-fit: cover;
    border-radius: 8px;
    margin-bottom: 10px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
}

.group-selection-list {
    max-height: 200px;
    overflow-y: auto;
    padding: 15px;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
}

.group-selection-item {
    display: flex;
    align-items: center;
    gap: 10px;
    background: rgba(0, 0, 0, 0.2);
    padding: 10px;
    border-radius: 8px;
    cursor: pointer;
    transition: var(--transition);
}

.group-selection-item:hover {
    background: rgba(0, 168, 132, 0.1);
}

.group-selection-item input[type="checkbox"] {
    width: 18px;
    height: 18px;
    margin: 0;
    cursor: pointer;
}

.group-selection-item span {
    font-size: 0.85rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.empty-msg {
    color: var(--text-dim);
    font-size: 0.8rem;
    font-style: italic;
}

/* Layout Helpers */
.actions-group {
    display: flex;
    gap: 10px;
    align-items: center;
    flex-wrap: wrap;
}

.grid-2 {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;

}

.grid-3 {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 15px;
}

/* Promo��o e V�deo */
.price-promotion {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.old-price {
    color: var(--text-dim);
    text-decoration: line-through;
    font-size: 0.85rem;
}

.current-price {
    color: var(--premium);
    font-weight: bold;
    font-size: 1.1rem;
}

/* Media Badge Context */

.video-badge {
    position: absolute;
    top: 10px;
    right: 10px;
    background: rgba(234, 180, 0, 0.9);
    color: #000;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 0.7rem;
    font-weight: bold;
    z-index: 2;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
}

/* Category Filters (Pills) */
.category-filters-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 15px;
    margin-bottom: 25px;
    position: sticky;
    top: -30px;
    background: var(--bg-deep);
    padding: 10px 0;
    z-index: 90;
}

.category-pills {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    padding: 5px 2px;
    transition: all 0.3s ease;
}

/* Mobile: Volta para o carrossel horizontal */
@media (max-width: 768px) {
    .category-pills {
        flex-wrap: nowrap;
        overflow-x: auto;
        scrollbar-width: none;
        -ms-overflow-style: none;
        padding-bottom: 10px;
    }

    .category-pills::-webkit-scrollbar {
        display: none;
    }
}

/* Chrome/Safari */


.category-pill {
    padding: 6px 16px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 6px;
    font-size: 0.8rem;
    color: var(--text-dim);
    cursor: pointer;
    transition: var(--transition);
    white-space: nowrap;
}

.category-pill:hover {
    background: rgba(255, 255, 255, 0.1);
    color: var(--text-main);
}

.category-pill.active {
    background: var(--primary);
    color: white;
    border-color: var(--primary);
}

.btn-manage-categories {
    background: transparent;
    color: var(--text-dim);
    border: 1px dashed rgba(255, 255, 255, 0.2);
    padding: 6px 12px;
    border-radius: 6px;
    font-size: 0.8rem;
    cursor: pointer;
    transition: var(--transition);
}

/* Catalog Header Premium */
.catalog-header-premium {
    background: rgba(255, 255, 255, 0.03);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.05);
    padding: 15px 20px;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
    margin-bottom: 10px;
}

.search-input-premium-v2 {
    background: rgba(0, 0, 0, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    padding: 8px 15px;
    color: white;
    font-size: 0.9rem;
    min-width: 200px;
    transition: var(--transition);
}

.search-input-premium-v2:focus {
    border-color: var(--primary);
    background: rgba(0, 0, 0, 0.4);
    outline: none;
}

.btn-new-gradient-v2 {
    background: var(--premium-gradient);
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 8px;
    font-weight: 700;
    cursor: pointer;
    transition: var(--transition);
    display: flex;
    align-items: center;
    gap: 8px;
}

.btn-new-gradient-v2:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(0, 168, 132, 0.3);
}

.btn-manage-categories:hover {
    color: var(--primary);
    border-color: var(--primary);
}

/* Checkbox estilo P�lula (Dias da Semana) */
.day-checkbox {
    display: inline-block;
    cursor: pointer;
}

.day-checkbox input[type="checkbox"] {
    display: none;
}

.day-pill {
    display: inline-block;
    padding: 6px 12px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 6px;
    font-size: 0.8rem;
    transition: all 0.2s ease;
    color: var(--text-dim);
    user-select: none;
}

.day-checkbox input[type="checkbox"]:checked+.day-pill {
    background: rgba(0, 168, 132, 0.2);
    border-color: var(--primary);
    color: var(--primary);
    font-weight: 600;
}

#offer-days-selection {
    margin-top: 10px;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.form-group>p {
    margin-bottom: 10px;
    color: var(--text-dim);
    font-size: 0.85rem;

}

.category-badge {
    position: absolute;
    top: 10px;
    padding: 4px 12px;
    border-radius: 4px;
    font-size: 0.7rem;
    font-weight: 800;
    z-index: 20;
    backdrop-filter: blur(4px);
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.5);
    pointer-events: none;
    text-transform: uppercase;
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: white;
}

.category-badge {
    left: 10px;
    background: rgba(0, 168, 132, 0.9);
}

.category-badge-extra {
    right: 10px;
    background: rgba(139, 92, 246, 0.9);
}

/* --- FullCalendar Premium Styling --- */
.fc {
    --fc-border-color: rgba(255, 255, 255, 0.05);
    --fc-button-bg-color: rgba(255, 255, 255, 0.05);
    --fc-button-border-color: rgba(255, 255, 255, 0.1);
    --fc-button-hover-bg-color: rgba(255, 255, 255, 0.1);
    --fc-button-active-bg-color: var(--primary);
    --fc-page-bg-color: transparent;
    --fc-event-bg-color: var(--primary);
    --fc-event-border-color: transparent;
    font-size: 0.9rem;
}

.fc-theme-standard td,
.fc-theme-standard th {
    border: 1px solid rgba(255, 255, 255, 0.03);
}

.fc .fc-toolbar-title {
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--text-main);
}

.fc .fc-button-primary {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.08);
    transition: var(--transition);
}

.fc .fc-button-primary:not(:disabled):active,
.fc .fc-button-primary:not(:disabled).fc-button-active {
    background: var(--primary);
    border-color: var(--primary);
}

.fc .fc-daygrid-day.fc-day-today {
    background: rgba(0, 168, 132, 0.05);
}

.fc-event {
    cursor: pointer;
    padding: 2px 5px;
    border-radius: 4px;
    font-weight: 500;
    transition: var(--transition);
}

.fc-event:hover {
    filter: brightness(1.2);
    transform: scale(1.02);
}

/* Mobile adjustments for calendar */
@media (max-width: 768px) {
    .fc .fc-toolbar {
        flex-direction: column;
        gap: 10px;
    }
}

.btn-map-groups {
    background: rgba(0, 210, 255, 0.1);
    color: var(--primary-light);
    border: 1px solid rgba(0, 210, 255, 0.2);
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 0.7rem;
    cursor: pointer;
    transition: var(--transition);
}

.btn-map-groups:hover {
    background: var(--primary-light);
    color: white;
}

/* --- Custom Selection Lists (Premium Batch Schedule) --- */
.custom-selection-list {
    overflow-y: auto;
    padding: 10px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    background: rgba(0, 0, 0, 0.3);
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.05);
    transition: var(--transition);
}

.selection-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 15px;
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.03);
    transition: all 0.2s ease;
    cursor: pointer;
    border: 1px solid rgba(255, 255, 255, 0.02);
}

.selection-item:hover {
    background: rgba(255, 255, 255, 0.07);
    transform: translateX(4px);
}

.selection-item.selected {
    background: rgba(0, 168, 132, 0.12);
    border-color: var(--primary);
}

.selection-item input[type="checkbox"] {
    width: 18px;
    height: 18px;
    accent-color: var(--primary);
    cursor: pointer;
}

.selection-item .item-info {
    flex: 1;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.selection-item .item-name {
    font-size: 0.9rem;
    font-weight: 600;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    color: var(--text-main);
}

.selection-item .item-sub {
    font-size: 0.75rem;
    color: var(--text-dim);
    font-weight: 400;
}

.selection-item .btn-preview-eye {
    color: var(--text-dim);
    font-size: 0.9rem;
    padding: 6px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.05);
    transition: var(--transition);
}

.selection-item .btn-preview-eye:hover {
    color: white;
    background: var(--primary);
    transform: scale(1.1);
}

/* --- Premium Floating Preview (Lightbox Style) --- */
.schedule-preview-container {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 320px;
    padding: 20px;
    background: var(--bg-sidebar);
    border: 2px solid var(--primary);
    border-radius: 20px;
    box-shadow: 0 0 100px rgba(0, 0, 0, 0.9), 0 0 30px rgba(0, 168, 132, 0.2);
    z-index: 20000;
    text-align: center;
    backdrop-filter: blur(20px);
}

.schedule-preview-container img {
    width: 100%;
    aspect-ratio: 1/1;
    object-fit: cover;
    border-radius: 12px;
    margin-bottom: 15px;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.schedule-preview-container .preview-title {
    font-size: 1rem;
    font-weight: 700;
    color: var(--text-main);
    margin-bottom: 15px;
}

.pagination-bar {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 15px;
    margin: 20px 0;
}

.btn-close-preview {
    background: var(--primary);
    color: white;
    border: none;
    padding: 8px 20px;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    width: 100%;
    transition: var(--transition);
}

.btn-close-preview:hover {
    filter: brightness(1.1);
    transform: scale(1.02);
}

/* ===================================================
   ABA RELAT�RIOS � Dashboard de M�tricas
   =================================================== */

.stats-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
}

@media (max-width: 1100px) {
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 600px) {
    .stats-grid {
        grid-template-columns: 1fr;
    }
}

.stat-card {
    padding: 20px 16px;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    transition: var(--transition);
}

.stat-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 32px rgba(0, 168, 132, 0.12);
}

.stat-icon {
    font-size: 1.8rem;
    line-height: 1;
    margin-bottom: 2px;
}

.stat-value {
    font-size: 2rem;
    font-weight: 800;
    background: var(--premium-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    line-height: 1.1;
}

.stat-label {
    font-size: 0.75rem;
    color: var(--text-dim);
    text-transform: uppercase;
    letter-spacing: 0.8px;
    font-weight: 600;
}

.premium-table {
    border-collapse: separate;
    border-spacing: 0 8px;
    width: 100%;
}

.premium-table thead th {
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    color: var(--text-dim);
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    padding: 12px 15px;
    background: transparent;
}

.premium-table tbody tr {
    background: rgba(35, 45, 54, 0.6);
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
    border-radius: 8px;
}

.premium-table tbody tr:hover {
    background: rgba(45, 55, 64, 0.9);
    transform: scale(1.01);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.2);
}

.premium-table td:first-child {
    border-top-left-radius: 8px;
    border-bottom-left-radius: 8px;
}

.premium-table td:last-child {
    border-top-right-radius: 8px;
    border-bottom-right-radius: 8px;
}

.sales-grid {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

@media (max-width: 900px) {
    .sales-grid {
        flex-direction: column;
    }
}

@media (max-width: 768px) {
    .hide-on-mobile {
        display: none !important;
    }
}

@media (max-width: 500px) {
    .hide-on-mobile-sm {
        display: none !important;
    }
}

/* --- CATALOG HEADER PREMIUM --- */
.catalog-header-premium {
    background: rgba(255, 255, 255, 0.03);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.05);
    padding: 15px 20px;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
}

.catalog-header-premium .flex-between {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 20px;
}

.catalog-header-premium .flex-between>div:last-child {
    display: flex;
    align-items: center;
    gap: 15px;
    flex-wrap: wrap;
}

.catalog-header-premium .flex-between>div:last-child>div {
    position: relative;
    display: flex;
    align-items: center;
}

.catalog-header-premium .flex-between>div:last-child>div>.fa-magnifying-glass {
    position: absolute;
    left: 15px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-dim);
}

.search-input-premium-v2 {
    padding-left: 42px !important;
    /* Aumentado para não sobrepor a lupa */
    padding-right: 35px !important;
    /* Espaço para o botão de limpar (X) */
    height: 44px;
    margin: 0;
    border-radius: 8px;
    background: rgba(0, 0, 0, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: #fff;
    width: 250px;
    outline: none;
    transition: all 0.3s;
    box-sizing: border-box;
}

.search-input-premium-v2:focus {
    border-color: var(--primary);
    box-shadow: 0 0 10px rgba(0, 168, 132, 0.2);
}

#btn-clear-catalog-search {
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    background: transparent;
    border: none;
    color: var(--text-dim);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}

.btn-new-gradient-v2 {
    background: var(--premium-gradient);
    border: none;
    color: #000;
    padding: 0 24px;
    height: 44px;
    border-radius: 8px;
    font-weight: 700;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: 0.3s;
    box-shadow: 0 4px 15px rgba(0, 168, 132, 0.3);
    text-transform: uppercase;
    box-sizing: border-box;
}

.btn-new-gradient-v2:hover {
    filter: brightness(1.2);
    box-shadow: 0 6px 20px rgba(0, 168, 132, 0.5);
    transform: translateY(-2px);
}

.catalog-header-premium .btn-secondary {
    height: 44px;
    padding: 0 20px;
    box-sizing: border-box;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

/* Ranking Table Styles - Layout Proporcional */
.ranking-table {
    width: 100%;
    table-layout: fixed;
}

.ranking-table .col-rank {
    width: 8%;
    text-align: center;
    white-space: nowrap;
}

.ranking-table .col-product {
    width: 50%;
    text-align: left;
    overflow: hidden;
    text-overflow: ellipsis;
}

.ranking-table .col-metrics {
    width: 10.5%;
    text-align: center;
    white-space: nowrap;
}

.table-wrapper {
    overflow-x: auto;
    width: 100%;
}

/* --- CUSTOM CALENDAR PREMIUM (Ultra Specific) --- */
#calendar-container .fc {
    font-family: 'Inter', sans-serif !important;
    color: white !important;
}

/* Interatividade: Mãozinha em tudo que é clicável */
#calendar-container .fc-daygrid-day,
#calendar-container .fc-event,
#calendar-container .fc-button {
    cursor: pointer !important;
    pointer-events: auto !important;
}

/* Botões e Toolbar */
#calendar-container .fc .fc-button {
    background: rgba(255, 255, 255, 0.05) !important;
    border: 1px solid rgba(255, 255, 255, 0.1) !important;
    color: var(--text-dim) !important;
    font-weight: 600 !important;
    border-radius: 8px !important;
    transition: all 0.3s ease !important;
}

#calendar-container .fc .fc-button-active {
    background: var(--primary) !important;
    color: black !important;
}

/* ESTILO PÍLULA DOS EVENTOS (Reforçado e Flexível) */
#calendar-container .fc-event, 
#calendar-container .fc-daygrid-event, 
#calendar-container .fc-daygrid-dot-event,
#calendar-container .fc-daygrid-block-event {
    background: rgba(0, 168, 132, 0.15) !important;
    border: 1px solid rgba(0, 168, 132, 0.3) !important;
    border-radius: 6px !important;
    padding: 4px 8px !important;
    margin: 2px 4px !important;
    display: flex !important; /* Mudado de block para flex para evitar esticamento */
    align-items: center;
    box-shadow: 0 4px 10px rgba(0,0,0,0.2) !important;
    height: auto !important; /* Garante que não estique verticalmente */
    min-height: 24px;
}

#calendar-container .fc-event:hover {
    background: rgba(0, 168, 132, 0.4) !important;
    transform: translateY(-1px) !important;
}

#calendar-container .fc-event-main,
#calendar-container .fc-event-title,
#calendar-container .fc-event-time {
    color: #fff !important;
    font-weight: 600 !important;
    font-size: 0.75rem !important;
    white-space: normal !important; /* Permite que o título quebre linha se for grande */
}

/* Ajuste das Células */
#calendar-container .fc-day-today {
    background: rgba(0, 168, 132, 0.05) !important;
}

#calendar-container .fc-daygrid-day-number {
    color: var(--text-dim) !important;
    font-weight: 600 !important;
    padding: 10px !important;
}

#calendar-container .fc-day-today .fc-daygrid-day-number {
    color: var(--primary) !important;
    font-weight: 800 !important;
    background: rgba(0, 168, 132, 0.1);
    border-radius: 4px;
}

#calendar-container .fc-col-header-cell-cushion {
    color: var(--text-dim) !important;
    font-weight: 700 !important;
    text-transform: uppercase !important;
    font-size: 0.75rem !important;
}
.fc-theme-standard td, .fc-theme-standard th {
    border: 1px solid rgba(255, 255, 255, 0.05) !important;
}

/* Estilo Premium para Seleção nos Modais */
.selection-item {
    display: flex !important;
    align-items: center !important;
    gap: 15px !important;
    padding: 12px 15px !important;
    background: rgba(255, 255, 255, 0.03) !important;
    border: 1px solid rgba(255, 255, 255, 0.08) !important;
    border-radius: 12px !important;
    margin-bottom: 8px !important;
    transition: all 0.3s ease !important;
    cursor: pointer;
}

.selection-item:hover {
    background: rgba(255, 255, 255, 0.06) !important;
    border-color: rgba(0, 168, 132, 0.3) !important;
}

.selection-item.selected {
    background: rgba(0, 168, 132, 0.1) !important;
    border-color: var(--primary) !important;
}

/* Custom Checkbox Premium */
.premium-check {
    appearance: none;
    -webkit-appearance: none;
    width: 22px !important;
    height: 22px !important;
    border: 2px solid rgba(255, 255, 255, 0.2);
    border-radius: 6px;
    background: rgba(0, 0, 0, 0.3) !important;
    cursor: pointer;
    position: relative;
    transition: all 0.3s;
    flex-shrink: 0;
}

.premium-check:checked {
    background: var(--primary) !important;
    border-color: var(--primary) !important;
}

.premium-check:checked::after {
    content: '\f00c';
    font-family: 'Font Awesome 6 Free';
    font-weight: 900;
    color: black;
    font-size: 12px;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

.item-info {
    flex: 1;
    display: flex;
    flex-direction: column;
}

.item-name {
    font-weight: 600;
    color: white;
    font-size: 0.9rem;
}

.item-sub {
    font-size: 0.75rem;
    color: var(--text-dim);
}
/* Filtros do Modal de Agendamento */
.modal-filters-row {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 15px;
    margin-bottom: 20px;
    background: rgba(255, 255, 255, 0.02);
    padding: 15px;
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.modal-filters-row .form-group {
    margin-bottom: 0 !important;
}

.modal-filters-row input, 
.modal-filters-row select {
    background: rgba(0, 0, 0, 0.2) !important;
    border: 1px solid rgba(255, 255, 255, 0.1) !important;
    color: white !important;
    border-radius: 8px !important;
    height: 42px !important;
    padding: 0 15px !important;
}

.modal-filters-row label {
    font-size: 0.75rem !important;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--text-dim);
    margin-bottom: 6px !important;
    display: block;
}

.selection-header-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
}

.selection-actions {
    display: flex;
    gap: 12px;
    font-size: 0.8rem;
}

.btn-action-link {
    background: transparent;
    border: none;
    color: var(--primary);
    cursor: pointer;
    font-weight: 600;
    transition: all 0.3s;
}

/* Barra Inferior Compacta do Modal */
.modal-footer-bar {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    gap: 20px;
    margin-top: 25px;
    padding-top: 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.footer-settings {
    display: flex;
    gap: 20px;
    flex-grow: 1;
}

.footer-settings .form-group {
    margin-bottom: 0 !important;
}

.footer-settings input[type="number"] {
    width: 80px !important;
    text-align: center;
}

.random-mode-toggle {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.random-mode-toggle span {
    font-size: 0.7rem;
    color: var(--text-dim);
    text-transform: uppercase;
}

.footer-actions {
    display: flex;
    gap: 10px;
}

@media (min-width: 1101px) {
    #tab-relatorios .stats-grid {
        grid-template-columns: repeat(5, 1fr);
    }
}

/* End of Relat�rios Section */
.admin-table-container {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 12px;
    margin-bottom: 0;
    overflow: hidden;
}

.code-input {
    font-size: 1.5rem !important;
    letter-spacing: 5px;
}

/* --- ESTILO DO BOT�O ADMIN / GESTOR --- */
#btn-admin-panel {
    background: linear-gradient(135deg, #f97316 0%, #ea580c 100%) !important;
    color: white !important;
    border: none;
    box-shadow: 0 4px 15px rgba(234, 88, 12, 0.2);
    font-weight: 600;
    transition: var(--transition);
}

#btn-admin-panel:hover {
    background: linear-gradient(135deg, #ea580c 0%, #c2410c 100%) !important;
    box-shadow: 0 6px 20px rgba(234, 88, 12, 0.4);
    transform: translateY(-2px);
    color: white !important;
}

#btn-admin-panel i {
    color: white !important;
}

/* ==========================================================================
   27. PRODUCT MODAL (UI FIXES)
   ========================================================================== */
.modal-header-stack {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
    margin-bottom: 20px;
}

.modal-header-stack h2 {
    margin: 0;
}

.modal-header-stack button {
    width: 100%;
}

.import-panel {
    background: rgba(255, 255, 255, 0.02);
    padding: 15px;
    border-radius: 8px;
    border: 1px dashed rgba(255, 255, 255, 0.1);
    margin-bottom: 20px;
}

.import-panel-label {
    color: var(--primary);
    display: block;
    margin-bottom: 8px;
}

.import-panel-input-group {
    display: flex;
    gap: 10px;
    align-items: stretch;
}

.import-panel-input-group input {
    flex: 1;
    margin: 0;
}

.import-panel-input-group button {
    white-space: nowrap;
    padding-top: 0;
    padding-bottom: 0;
}

.import-status-text {
    margin-top: 10px;
    font-size: 0.85rem;
    color: var(--text-dim);
}

.btn-ai-magic {
    padding: 4px 10px !important;
    font-size: 0.8rem !important;
    background: linear-gradient(45deg, rgba(139, 92, 246, 0.1), rgba(236, 72, 153, 0.1)) !important;
    border-color: rgba(236, 72, 153, 0.3) !important;
    color: #f472b6 !important;
}

.btn-ai-magic:hover {
    background: linear-gradient(45deg, rgba(139, 92, 246, 0.2), rgba(236, 72, 153, 0.2)) !important;
    border-color: rgba(236, 72, 153, 0.5) !important;
    color: #fff !important;
}

.label-no-margin {
    margin: 0 !important;
}

.mb-8 {
    margin-bottom: 8px !important;
}

/* Bot�es Modernos Faltantes */
.btn-outline {
    background: transparent;
    border: 1px solid rgba(255, 255, 255, 0.15);
    color: var(--text-main);
    padding: 10px 20px;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.btn-outline:hover {
    background: rgba(255, 255, 255, 0.05);
    border-color: rgba(255, 255, 255, 0.3);
    color: #fff;
    transform: translateY(-2px);
}

/* Estilo para Inputs de Arquivo */
input[type="file"] {
    background: rgba(255, 255, 255, 0.02);
    border: 1px dashed rgba(255, 255, 255, 0.15);
    padding: 12px;
    border-radius: 8px;
    width: 100%;
    color: var(--text-dim);
    cursor: pointer;
    transition: var(--transition);
}

input[type="file"]::file-selector-button {
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.05) 0%, rgba(255, 255, 255, 0.02) 100%);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: var(--text-main);
    padding: 8px 16px;
    border-radius: 6px;
    margin-right: 15px;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.3s ease;
}

input[type="file"]::file-selector-button:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.3);
}

input[type="file"]:hover {
    border-color: rgba(255, 255, 255, 0.3);
    background: rgba(255, 255, 255, 0.04);
}

/* Divisor de Se��es */
.section-separator {
    border-top: 1px dashed rgba(255, 255, 255, 0.1);
    padding-top: 20px;
}

/* Bot�es de a��o de grupos */
.group-action-btns {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
    margin-top: 10px;
}

/* Bot�o Laranja (Warning) */
.btn-warning {
    background: linear-gradient(135deg, #f97316 0%, #ea580c 100%);
    color: white;
    border: none;
    padding: 8px 14px;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 0.85rem;
}

.btn-warning:hover {
    filter: brightness(1.1);
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(249, 115, 22, 0.4);
}

/* Toggle Group (Switch + Label) */
.toggle-group {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 16px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 10px;
    gap: 12px;
}

.toggle-group span {
    font-size: 0.9rem;
    color: var(--text-main);
    font-weight: 500;
}

.toggle-group .switch span:not(.slider) {
    display: none;
}

/* Campo de senha com �cone de olho embutido */
.password-toggle-group {
    display: grid;
    align-items: center;
    width: 100%;
}

.password-toggle-group input {
    grid-area: 1/1;
    width: 100%;
    padding-right: 45px;
    box-sizing: border-box;
    margin-bottom: 0 !important;
}

.password-toggle-group .btn-toggle-pass {
    grid-area: 1/1;
    justify-self: end;
    margin-right: 15px;
    cursor: pointer;
    color: var(--text-dim);
    font-size: 1rem;
    z-index: 10;
    padding: 10px;
    transition: color 0.2s;
}

.password-toggle-group .btn-toggle-pass:hover {
    color: var(--text-main);
}

/* Modal Registrar Venda � Cabe�alho */
.modal-sale-header {
    margin-bottom: 20px;
    padding-bottom: 16px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.modal-sale-header h2 {
    margin: 0 0 12px 0;
}

.modal-info-bar {
    display: flex;
    gap: 12px;
    align-items: stretch;
}

.modal-info-item {
    display: flex;
    flex-direction: column;
    gap: 2px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.07);
    border-radius: 8px;
    padding: 8px 14px;
    min-width: 0;
}

.modal-info-item:first-child {
    flex: 1;
}

.modal-info-item:last-child {
    flex-shrink: 0;
    white-space: nowrap;
}

.modal-info-label {
    font-size: 0.72rem;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    color: var(--text-dim);
    font-weight: 600;
}

.modal-info-item strong {
    font-size: 0.92rem;
    color: var(--text-main);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    width: 100%;
    display: block;
}

.modal-info-price {
    color: var(--primary) !important;
    font-size: 1rem !important;
}

/* Mapa de Vendas */
#sales-map {
    width: 100%;
    height: 420px;
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    margin-bottom: 10px;
    background: #1a1f2c;
}

/* Tabela de Vendas � c�lulas */
.sale-client-name {
    font-weight: 700;
    color: var(--text-main);
}

.sale-client-phone {
    font-size: 0.75rem;
    color: var(--text-dim);
    margin-top: 2px;
}

.sale-value {
    color: var(--success);
    font-weight: 600;
}

.btn-delete-sale {
    color: var(--danger);
    background: none;
    border: none;
    cursor: pointer;
    padding: 6px;
    border-radius: 6px;
    transition: background 0.2s;
}

.btn-delete-sale:hover {
    background: rgba(239, 68, 68, 0.1);
}

/* Tabela de Vendas � propor��es de colunas */
/* Unified System Table Style � Dashboard Standard */
.data-table {
    width: 100%;
    border-collapse: collapse;
    table-layout: fixed;
}

.data-table thead {
    background: rgba(255, 255, 255, 0.02);
    border-bottom: 2px solid rgba(255, 255, 255, 0.08);
}

.data-table th {
    padding: 14px 15px;
    text-align: left;
    font-size: 0.78rem;
    text-transform: uppercase;
    letter-spacing: 1.2px;
    color: #fff;
    font-weight: 700;
}

.data-table td {
    padding: 16px 15px;
    font-size: 0.9rem;
    color: var(--text-main);
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    vertical-align: middle;
}

.data-table tr:hover {
    background: rgba(0, 168, 132, 0.03);
}

.data-table tr:last-child td {
    border-bottom: none;
}

.data-table .text-center {
    text-align: center;
}

/* Dashboard Card Containers for Tables (Standardized Glassmorphism) */
.table-wrapper {
    background: rgba(255, 255, 255, 0.03);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 12px;
    overflow-x: auto;
    margin-bottom: 0;
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.1);
}

/* Unified System Badges & Tags */
.system-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 4px 10px;
    border-radius: 6px;
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.5px;
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-main);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.system-badge.success {
    background: rgba(37, 211, 102, 0.1);
    color: #25D366;
    border-color: rgba(37, 211, 102, 0.2);
}

.system-badge.info {
    background: rgba(0, 210, 255, 0.1);
    color: var(--primary-light);
    border-color: rgba(0, 210, 255, 0.2);
}

.system-badge.money {
    background: rgba(0, 168, 132, 0.1);
    color: var(--primary);
    border-color: rgba(0, 168, 132, 0.2);
    font-family: 'JetBrains Mono', monospace;
}

/* Unified Pagination System */
.pagination-bar {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 20px;
    margin-top: 30px;
    /* Margem aumentada como solicitado */
    padding-top: 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    width: 100%;
}

.pagination-info {
    font-size: 0.85rem;
    color: var(--text-dim);
    font-weight: 600;
    min-width: 100px;
    text-align: center;
}

/* Table Column Definitions */
.col-client-name {
    width: 25%;
}

.col-client-phone {
    width: 15%;
}

.col-client-address {
    width: 25%;
}

.col-client-compras {
    width: 10%;
}

.col-client-total {
    width: 15%;
}

.col-client-actions {
    width: 10%;
}

.col-partner-name {
    width: 25%;
}

.col-partner-phone {
    width: 18%;
}

.col-partner-products {
    width: 12%;
}

.col-partner-sales {
    width: 10%;
}

.col-partner-revenue {
    width: 20%;
}

.col-partner-actions {
    width: 15%;
}

/* Carteira de Clientes � componentes internos */
.client-profile {
    display: flex;
    align-items: center;
    gap: 12px;
}

.client-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: var(--premium-gradient);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 0.85rem;
    color: #fff;
}

.client-name {
    font-size: 1rem;
    color: var(--text-main);
}

.client-crown {
    color: #fbbf24;
    margin-right: 5px;
}

.client-wa-link,
.wa-link-admin {
    color: #fff !important;
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: color 0.2s;
}

.client-wa-link:hover,
.wa-link-admin:hover {
    color: var(--primary-light) !important;
}

.client-wa-link i,
.wa-link-admin i {
    color: #25D366;
    font-size: 1.1rem;
}

.client-address {
    color: var(--text-dim);
    font-size: 0.85rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.client-compras {
    font-weight: 700;
    color: var(--text-main);
}

.client-total {
    font-weight: 700;
    color: var(--primary);
    font-size: 1rem;
}

/* Leaflet popup � tema escuro */
.leaflet-popup-content-wrapper {
    background: rgba(18, 24, 38, 0.97) !important;
    border: 1px solid rgba(255, 255, 255, 0.1) !important;
    border-radius: 12px !important;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.5) !important;
    color: #e2e8f0 !important;
}

.leaflet-popup-tip {
    background: rgba(18, 24, 38, 0.97) !important;
}

.leaflet-popup-content {
    margin: 12px 16px !important;
    font-family: 'Inter', sans-serif !important;
    font-size: 0.88rem !important;
    line-height: 1.7 !important;
    color: #e2e8f0 !important;
}

.leaflet-popup-close-button {
    color: var(--text-dim) !important;
}

.leaflet-popup-close-button:hover {
    color: #fff !important;
}

/* Insights do Rob� � Dashboard de Relat�rios */
#ai-insights-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-top: 10px;
}

.insight-item {
    background: rgba(255, 255, 255, 0.03);
    padding: 18px 20px;
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.05);
    transition: var(--transition);
}

.insight-item:hover {
    background: rgba(255, 255, 255, 0.05);
    transform: translateY(-2px);
    border-color: rgba(255, 255, 255, 0.1);
}

.insight-item span {
    font-size: 1.6rem;
    filter: drop-shadow(0 0 8px rgba(0, 168, 132, 0.2));
}

.insight-text {
    font-size: 0.9rem;
    color: var(--text-main);
    margin-bottom: 6px;
    line-height: 1.5;
}

.insight-action {
    font-size: 0.8rem;
    color: var(--primary);
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.6px;
}

/* Anima��o de Sa�da para Insights */
@keyframes dismissInsight {
    0% {
        opacity: 1;
        transform: translateY(0);
    }

    30% {
        opacity: 0;
        transform: translateY(-10px);
    }

    100% {
        opacity: 0;
        transform: translateY(-10px);
        max-height: 0;
        margin-top: 0;
        padding-top: 0;
        padding-bottom: 0;
        border: 0;
        overflow: hidden;
    }
}

.insight-item.dismissing {
    animation: dismissInsight 0.6s forwards ease-in-out;
}

.btn-read-insight {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: var(--text-dim);
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s;
    margin-left: 10px;
}

.btn-read-insight:hover {
    background: var(--primary);
    color: #fff;
    border-color: var(--primary);
    transform: scale(1.1);
}

/* --- ESTILOS DO M?DULO DE ESTOQUE --- */
.inventory-table td {
    vertical-align: middle !important;
}

.inventory-product-cell {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 8px 0;
}

.inventory-product-img {
    width: 32px;
    height: 32px;
    border-radius: 6px;
    object-fit: cover;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
}

.inventory-product-name {
    color: #fff;
    font-size: 0.88rem;
    font-weight: 500;
}

.inventory-profit-cell {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 38px;
    font-weight: bold;
    font-size: 0.85rem;
    white-space: nowrap;
}

.inventory-profit-pct {
    opacity: 0.7;
    font-size: 0.75rem;
    margin-left: 6px;
    font-weight: normal;
}

/* Bot?o Editar Estoque Premium */
.btn-edit-inventory {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: var(--text-main);
    width: 36px;
    height: 36px;
    border-radius: 8px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-edit-inventory:hover {
    background: var(--primary);
    color: #fff;
    border-color: var(--primary);
    transform: translateY(-2px);
    box-shadow: 0 4px 10px rgba(0, 168, 132, 0.3);
}

.btn-edit-inventory i {
    font-size: 1rem;
}

/* Colunas fixas */
.col-product {
    width: 25%;
}

.col-cost {
    width: 10%;
}

.col-price {
    width: 10%;
}

.col-profit {
    width: 15%;
}

.col-stock {
    width: 8%;
}

.col-supplier {
    width: 15%;
}

.col-location {
    width: 10%;
}

.col-actions {
    width: 10%;
    text-align: center;
}

.profit-positive {
    color: #00a884 !important;
}

.profit-negative {
    color: #ef4444 !important;
}

.input-inventory-mini {
    height: 36px !important;
    padding: 4px 8px !important;
    font-size: 0.85rem !important;
    border-radius: 6px !important;
    background: rgba(255, 255, 255, 0.05) !important;
    border: 1px solid rgba(255, 255, 255, 0.1) !important;
    color: #fff !important;
    text-align: center;
}

.inventory-profit-cell {
    height: 36px !important;
    /* Mesma altura do input */
    display: flex;
    align-items: center;
    justify-content: center;
}



.inventory-table td {
    height: 50px !important;
    vertical-align: middle !important;
    padding: 0 8px !important;
}

.inventory-table input {
    margin: 0 !important;
    vertical-align: middle !important;
}

.currency-input-wrapper {
    display: flex;
    align-items: center;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 6px;
    padding-left: 8px;
    height: 36px;
}

.currency-symbol {
    color: var(--primary);
    font-size: 0.75rem;
    font-weight: bold;
    margin-right: 4px;
}

.currency-input-wrapper .input-inventory-mini {
    background: transparent !important;
    border: none !important;
    padding-left: 0 !important;
    text-align: left !important;
    width: 100% !important;
}

.inventory-product-cell {
    display: flex;
    align-items: center;
    gap: 10px;
}

.inventory-product-img {
    width: 35px;
    height: 35px;
    border-radius: 4px;
    object-fit: cover;
}

.inventory-product-name {
    font-size: 0.85rem;
    color: #e9edef;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 250px;
}

/* --- AJUSTE DO GRFICO DE ENVIOS --- */
#chart-scroll-container {
    width: 100%;
    overflow-x: auto;
    /* Permite rolar para o lado se o grfico for grande */
    padding-bottom: 10px;
    cursor: grab;
}

#chart-scroll-container::-webkit-scrollbar {
    height: 6px;
}

#chart-scroll-container::-webkit-scrollbar-thumb {
    background: rgba(0, 168, 132, 0.3);
    border-radius: 10px;
}

#chart-scroll-container:active {
    cursor: grabbing;
}

/* --- PREMIUM RANKING COMPONENT --- */
.ranking-table {

    width: 100%;
    border-collapse: separate;
    border-spacing: 0 10px;
    /* Espaço entre as cápsulas */
    padding: 0;
}

.ranking-table thead th {
    padding: 12px 15px;
    font-size: 0.75rem;
    color: var(--text-dim);
    text-transform: uppercase;
    letter-spacing: 1px;
    font-weight: 600;
    border: none;
    background: transparent;
}

.ranking-row {
    background: rgba(35, 45, 54, 0.4);
    /* Levemente mais transparente como a referência */
    transition: all 0.2s ease;
    border: none;
}

.ranking-row:hover {
    background: rgba(0, 168, 132, 0.1);
    /* Brilho sutil ao passar o mouse */
    transform: translateX(5px);
    /* Efeito lateral suave */
}


.ranking-cell {
    padding: 15px;
    border: none;
}

.ranking-cell:first-child {
    border-radius: 10px 0 0 10px;
}

.ranking-cell:last-child {
    border-radius: 0 10px 10px 0;
}


.ranking-pos-wrapper {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    font-weight: 800;
    font-size: 0.85rem;
    color: var(--text-dim);
    background: rgba(255, 255, 255, 0.03);
}

/* Medalhas Premium */
.pos-1 .ranking-pos-wrapper {
    background: linear-gradient(135deg, #FFD700 0%, #B8860B 100%);
    color: #000;
    box-shadow: 0 0 15px rgba(255, 215, 0, 0.3);
}

.pos-2 .ranking-pos-wrapper {
    background: linear-gradient(135deg, #C0C0C0 0%, #808080 100%);
    color: #000;
}

.pos-3 .ranking-pos-wrapper {
    background: linear-gradient(135deg, #CD7F32 0%, #8B4513 100%);
    color: #000;
}

.ranking-product-info {
    display: flex;
    align-items: center;
    gap: 15px;
}

.ranking-img-wrapper {
    position: relative;
    width: 44px;
    height: 44px;
}

.ranking-img {
    width: 100%;
    height: 100%;
    border-radius: 10px;
    object-fit: cover;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.ranking-title {
    font-weight: 500;
    color: var(--text-main);
    font-size: 0.95rem;
}

.ranking-metric {
    font-family: 'Inter', sans-serif;
    font-weight: 500;
    color: var(--text-main);
    font-size: 0.9rem;
}


.ranking-score-badge {
    background: rgba(0, 168, 132, 0.1);
    color: var(--primary);
    padding: 6px 12px;
    border-radius: 20px;
    font-weight: 800;
    font-size: 0.9rem;
    border: 1px solid rgba(0, 168, 132, 0.2);
    display: inline-block;
    min-width: 50px;
    text-align: center;
}

.ranking-row:hover .ranking-score-badge {
    background: var(--primary);
    color: #fff;
    box-shadow: 0 0 15px rgba(0, 168, 132, 0.4);
}

/* --- CALENDAR VISIBILITY FIX & PREMIUM STYLE --- */
#calendar-container {
    min-height: 500px;
}

/* Força cores visíveis no calendário */
.fc .fc-col-header-cell-cushion,
.fc .fc-daygrid-day-number,
.fc .fc-list-day-text,
.fc .fc-list-day-side-text {
    color: var(--text-main) !important;
    text-decoration: none !important;
    font-weight: 600;
    font-size: 0.9rem;
}

/* Bordas da grade mais nítidas */
.fc-theme-standard td,
.fc-theme-standard th,
.fc-theme-standard .fc-scrollgrid {
    border-color: rgba(255, 255, 255, 0.08) !important;
}

/* Ajuste do cabeçalho do calendário */
.fc .fc-toolbar-title {
    color: #fff !important;
    font-weight: 700 !important;
    text-transform: capitalize;
}

/* Estilo dos botões do calendário para padrão Premium */
.fc .fc-button-primary {
    background: rgba(255, 255, 255, 0.05) !important;
    border: 1px solid rgba(255, 255, 255, 0.1) !important;
    color: #fff !important;
    text-transform: capitalize !important;
    transition: all 0.3s ease;
}

.fc .fc-button-primary:hover {
    background: rgba(255, 255, 255, 0.1) !important;
}

.fc .fc-button-active {
    background: var(--primary) !important;
    border-color: var(--primary) !important;
    box-shadow: 0 0 10px rgba(0, 168, 132, 0.3);
}

/* Melhoria nos eventos do calendário */
.fc-event {
    border-radius: 4px !important;
    padding: 2px 4px !important;
    font-size: 0.75rem !important;
    border: none !important;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}




/* --- UTILITY CLASSES --- */
.mb-20 {
    margin-bottom: 20px !important;
}

.text-primary {
    color: var(--primary) !important;
}

.text-xs {
    font-size: 0.75rem !important;
}

.text-dim {
    color: var(--text-dim) !important;
}

.opacity-80 {
    opacity: 0.8 !important;
}


.flex-center-gap-10 {
    display: flex !important;
    align-items: center !important;
    gap: 10px !important;
}

.no-margin {
    margin: 0 !important;
}

.nowrap {
    white-space: nowrap !important;
}

.flex-end {
    justify-content: flex-end !important;
}

.flex-1 {
    flex: 1 !important;
}

.relative {
    position: relative !important;
}

.max-w-400 {
    max-width: 400px !important;
}

.h-36 {
    height: 36px !important;
}


/* --- RESPONSIVE TABLES --- */
.table-wrapper {
    width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    padding-bottom: 5px;
}

.table-wrapper::-webkit-scrollbar {
    height: 4px;
}

.table-wrapper::-webkit-scrollbar-thumb {
    background: rgba(0, 168, 132, 0.3);
    border-radius: 10px;
}

@media (max-width: 768px) {
    .ranking-title {
        max-width: 150px;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }
}



/* --- CATALOG UI IMPROVEMENTS --- */

/* Custom Checkbox for Product Cards */
.offer-selection-check {
    appearance: none;
    -webkit-appearance: none;
    width: 14px !important;
    height: 14px !important;
    position: absolute !important;
    top: 12px !important;
    left: 12px !important;
    z-index: 100 !important;
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 6px;
    background: rgba(0, 0, 0, 0.5) !important;
    cursor: pointer;
    margin: 0 !important;
    transition: all 0.3s;
    backdrop-filter: blur(4px);
}

.offer-selection-check:checked {
    background: #00a884 !important;
    border-color: #00d2ad !important;
    box-shadow: 0 0 8px rgba(0, 168, 132, 0.5);
}

.offer-selection-check:checked::after {
    content: '\f00c';
    font-family: 'Font Awesome 6 Free';
    font-weight: 900;
    color: white;
    font-size: 13px;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

.offer-selection-check:hover {
    border-color: #00a884;
    transform: scale(1.1);
}

/* Versao para formulários (Modais) */
.offer-selection-check-form {
    appearance: none;
    -webkit-appearance: none;
    width: 18px !important;
    height: 18px !important;
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 6px;
    background: rgba(0, 0, 0, 0.5) !important;
    cursor: pointer;
    position: relative;
    display: inline-block;
    vertical-align: middle;
    margin: 0 10px 0 0 !important;
    transition: all 0.3s;
}

.offer-selection-check-form:checked {
    background: #00a884 !important;
    border-color: #00d2ad !important;
}

.offer-selection-check-form:checked::after {
    content: '\f00c';
    font-family: 'Font Awesome 6 Free';
    font-weight: 900;
    color: white;
    font-size: 11px;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}


/* Filter Row & Icon Alignment - Absolute Overlay Strategy */
.mobile-category-select-wrapper {
    width: fit-content !important;
    min-width: 185px;
    position: relative !important;
    display: inline-block !important;
    background: rgba(255, 255, 255, 0.04) !important;
    border: 1px solid rgba(255, 255, 255, 0.1) !important;
    border-radius: 12px;
    height: 42px;
    transition: all 0.3s;
    cursor: pointer;
    overflow: hidden;
    vertical-align: middle;
}

.mobile-category-select-wrapper:hover {
    background: rgba(255, 255, 255, 0.07) !important;
    border-color: rgba(255, 255, 255, 0.2) !important;
}

.mobile-category-select-wrapper i {
    position: absolute;
    left: 15px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--primary) !important;
    font-size: 1rem !important;
    z-index: 1;
    pointer-events: none !important;
}

.mobile-category-select-wrapper select {
    position: relative;
    z-index: 2;
    width: 100% !important;
    height: 100% !important;
    background: transparent !important;
    border: none !important;
    color: #fff !important;
    outline: none !important;
    font-family: 'Inter', sans-serif !important;
    font-size: 0.85rem !important;
    font-weight: 500 !important;
    color: #cbd5e1 !important;
    cursor: pointer;
    padding: 0 35px 0 40px !important;
    /* Espaço para ícone (esq) e seta (dir) */
    appearance: none;
    -webkit-appearance: none;
    display: block;
    line-height: 42px;
}

/* Seta customizada por baixo do select */
.mobile-category-select-wrapper::after {
    content: '\f0d7';
    font-family: 'Font Awesome 6 Free';
    font-weight: 900;
    color: rgba(255, 255, 255, 0.5);
    font-size: 0.8rem;
    position: absolute;
    right: 15px;
    top: 50%;
    transform: translateY(-50%);
    z-index: 1;
    pointer-events: none !important;
}

@media (max-width: 992px) {
    /* Controle de Categorias - Removido por duplicata consolidada no style.css */

    .category-actions-mobile-row {
        display: flex;
        gap: 10px;
    }

    .category-actions-mobile-row button {
        flex: 1;
    }
}

/* Bulk Action Bar (Glassmorphism) */
.bulk-action-bar {
    position: fixed;
    bottom: 100px;
    left: 50%;
    transform: translateX(-50%) translateY(100px);
    background: rgba(17, 27, 33, 0.85);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    padding: 15px 30px;
    border-radius: 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 40px;
    z-index: 2000;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.6);
    transition: all 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    min-width: 400px;
}

.bulk-action-bar:not(.hidden) {
    transform: translateX(-50%) translateY(0);
}

.bulk-info {
    display: flex;
    align-items: center;
    gap: 12px;
    color: #fff;
    font-weight: 600;
}

.bulk-info i {
    color: #00a884;
    font-size: 1.2rem;
}

#catalog-bulk-count {
    background: #00a884;
    color: white;
    padding: 2px 10px;
    border-radius: 10px;
    font-size: 0.9rem;
    margin-right: 5px;
}

.bulk-actions {
    display: flex;
    align-items: center;
    gap: 12px;
}

.btn-bulk {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 20px;
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    background: rgba(255, 255, 255, 0.05);
    color: #fff;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.btn-bulk:hover {
    transform: translateY(-3px);
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.2);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.3);
}

.btn-bulk i {
    font-size: 1rem;
}

/* Destaque para o botão de PDF */
#btn-generate-pdf {
    background: linear-gradient(135deg, #00a884 0%, #00d2ad 100%) !important;
    color: #000 !important;
    border: none !important;
    font-weight: 700 !important;
}

#btn-generate-pdf:hover {
    filter: brightness(1.1);
    box-shadow: 0 10px 25px rgba(0, 168, 132, 0.4);
}

.btn-bulk-clear {
    width: 42px;
    height: 42px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    background: rgba(255, 68, 68, 0.1);
    color: #ff4444;
    cursor: pointer;
    transition: all 0.3s;
}

.btn-bulk-clear:hover {
    background: rgba(255, 68, 68, 0.25);
    transform: rotate(90deg);
    color: #ff6666;
}

/* Mobile Adjustments for Bulk Bar */
@media (max-width: 768px) {
    .offers-grid {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 8px !important;
        padding: 5px !important;
        display: grid !important;
    }

    .offer-card {
        padding: 5px !important;
        border-radius: 10px !important;
        min-width: 0 !important;
        width: 100% !important;
    }

    .offer-card img {
        height: 100px !important;
        object-fit: cover !important;
        border-radius: 6px !important;
    }

    .offer-card h3 {
        font-size: 0.75rem !important;
        margin-top: 5px !important;
        margin-bottom: 2px !important;
        height: 32px;
        overflow: hidden;
        display: -webkit-box;
        -webkit-line-clamp: 2;
        -webkit-box-orient: vertical;
    }

    .offer-card .price-val {
        font-size: 0.9rem !important;
    }

    /* Ajuste do topo (Filtros e Botões) */
    .catalog-header-premium .flex-between {
        flex-direction: column !important;
        gap: 10px !important;
        align-items: stretch !important;
    }

    .mobile-category-select-wrapper {
        width: 100% !important;
    }

    .catalog-header-premium .flex-center-gap-10 {
        justify-content: space-between !important;
    }

    .catalog-header-premium .btn-secondary {
        flex: 1;
        font-size: 0.75rem !important;
        padding: 8px !important;
    }

    .bulk-action-bar {
        bottom: 20px;
        width: 90%;
        min-width: unset;
        flex-direction: column;
        gap: 15px;
        padding: 20px;
        left: 50% !important;
        transform: translateX(-50%) !important;
    }

    .bulk-actions {
        width: 100%;
    }

    .btn-bulk {
        width: 100%;
        justify-content: center;
    }
}

/* --- MOBILE STATUS BAR (TOP) --- */
.mobile-user-status-bar {
    display: none;
    /* Escondido no Desktop */
    background: rgba(17, 27, 33, 0.95);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    padding: 12px 20px;
    justify-content: space-between;
    align-items: center;
    position: sticky;
    top: 0;
    z-index: 1001;
}

@media (max-width: 992px) {
    .mobile-user-status-bar {
        display: flex;
    }
}

.mobile-user-info {
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 600;
    color: #fff;
    font-size: 0.9rem;
}

.mobile-avatar-circle {
    width: 32px;
    height: 32px;
    background: var(--primary);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
}

.mobile-robot-status {
    background: rgba(255, 255, 255, 0.05);
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 0.8rem;
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--text-dim);
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.mobile-robot-status i {
    color: var(--primary);
}

/* --- PRODUCT BADGES (BANNER, SOLD OUT, PARTNER, STOCK) --- */
.banner-badge,
.sold-out-badge,
.low-stock-badge,
.partner-badge {
    position: absolute !important;
    z-index: 150 !important;
    padding: 2px 8px;
    /* Slim */
    border-radius: 6px;
    font-size: 0.6rem;
    /* Mais sutil */
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.4);
    display: flex !important;
    flex-direction: row !important;
    align-items: center !important;
    gap: 4px;
    pointer-events: none;
    height: fit-content !important;
    width: fit-content !important;
    white-space: nowrap;
}

/* Superior Direito: Vendedor (Parceiro) */
.partner-badge {
    top: 10px;
    right: 10px;
    color: #fff;
    border: 1px solid rgba(255, 255, 255, 0.1);
    font-weight: 700;
}

/* Inferior Esquerdo: Aviso (Banner ou Esgotado) */
.banner-badge {
    bottom: 10px;
    left: 10px;
    background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
    color: #000;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.sold-out-badge {
    bottom: 10px;
    left: 10px;
    background: rgba(239, 68, 68, 0.95);
    color: #fff;
}

/* Inferior Direito: Estoque */
.low-stock-badge {
    bottom: 10px;
    right: 10px;
    background: rgba(249, 115, 22, 0.95);
    color: #fff;
    border: 1px solid rgba(255, 255, 255, 0.1);
}
/* Fix para rolagem horizontal na tabela de estoque no mobile */
.inventory-table { min-width: 1000px; }

