/* ========================================
   QUINTAL GASTROBAR - TEMA CLARO PROFISSIONAL
   Design moderno, limpo e elegante
   ======================================== */

/* Suporte para ambos os métodos de tema */
.light-theme,
[data-theme="light"] {
    /* Cores principais */
    --primary: #E85D04;
    --primary-dark: #D35400;
    --primary-light: #FF8C42;
    
    /* Backgrounds - branco e cinza muito claro */
    --bg-dark: #F8F9FA;
    --bg-darker: #F1F3F4;
    --bg-card: #FFFFFF;
    --bg-card-hover: #F8F9FA;
    --bg-input: #FFFFFF;
    
    /* Textos */
    --text-primary: #1F2937;
    --text-secondary: #4B5563;
    --text-muted: #9CA3AF;
    
    /* Bordas */
    --border-color: #E5E7EB;
    --border-light: #D1D5DB;
    
    /* Status */
    --success: #059669;
    --warning: #D97706;
    --danger: #DC2626;
    --info: #2563EB;
    
    /* Sombras */
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px rgba(0, 0, 0, 0.05);
    --shadow-lg: 0 10px 15px rgba(0, 0, 0, 0.08);
    --shadow-glow: 0 0 20px rgba(232, 93, 4, 0.12);
}

/* ========== BODY ========== */
.light-theme body,
[data-theme="light"] body {
    background: #F8F9FA !important;
    color: #1F2937;
}

.light-theme .main-content,
[data-theme="light"] .main-content {
    background: #F8F9FA !important;
}

/* ========== SIDEBAR - DESIGN LIMPO ========== */
/* Força máxima para sobrescrever gradiente do menu.css */
html.light-theme .sidebar,
body.light-theme .sidebar,
.light-theme .sidebar,
[data-theme="light"] .sidebar,
html[data-theme="light"] .sidebar {
    background: #FFFFFF !important;
    background-image: none !important;
    background-color: #FFFFFF !important;
    border-right: 1px solid #E5E7EB !important;
    box-shadow: 2px 0 10px rgba(0, 0, 0, 0.05) !important;
}

html.light-theme .brand,
body.light-theme .brand,
.light-theme .brand,
[data-theme="light"] .brand,
html[data-theme="light"] .brand {
    background: #E85D04 !important;
    background-image: none !important;
    background-color: #E85D04 !important;
    border-bottom: none !important;
}

.light-theme .brand-logo,
[data-theme="light"] .brand-logo {
    filter: brightness(0) invert(1) !important;
}

.light-theme .brand-name,
[data-theme="light"] .brand-name {
    color: #FFFFFF !important;
}

.light-theme .brand-sub,
[data-theme="light"] .brand-sub {
    color: rgba(255, 255, 255, 0.9) !important;
}

/* Menu items */
.light-theme .nav-item,
[data-theme="light"] .nav-item {
    color: #4B5563 !important;
    margin: 4px 12px !important;
    border-radius: 8px !important;
    background: transparent !important;
}

.light-theme .nav-item:hover,
[data-theme="light"] .nav-item:hover {
    background: #F3F4F6 !important;
    color: #E85D04 !important;
}

.light-theme .nav-item.active,
[data-theme="light"] .nav-item.active {
    background: #E85D04 !important;
    color: #FFFFFF !important;
    box-shadow: 0 2px 8px rgba(232, 93, 4, 0.3) !important;
}

.light-theme .nav-item.active i,
[data-theme="light"] .nav-item.active i {
    color: #FFFFFF !important;
}

.light-theme .nav-item i,
[data-theme="light"] .nav-item i {
    color: #6B7280 !important;
}

.light-theme .nav-item:hover i,
[data-theme="light"] .nav-item:hover i {
    color: #E85D04 !important;
}

/* Clock */
.light-theme .clock,
[data-theme="light"] .clock {
    color: #1F2937 !important;
    background: #F3F4F6 !important;
}

.light-theme .sidebar-footer,
[data-theme="light"] .sidebar-footer {
    background: #FFFFFF !important;
    border-top: 1px solid #E5E7EB !important;
}

/* ========== TOP BAR ========== */
.light-theme .top-bar,
[data-theme="light"] .top-bar {
    background: #FFFFFF !important;
    border-bottom: 1px solid #E5E7EB !important;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.03) !important;
}

.light-theme .page-title h1,
[data-theme="light"] .page-title h1 {
    color: #1F2937 !important;
}

.light-theme .page-title p,
[data-theme="light"] .page-title p {
    color: #6B7280 !important;
}

/* ========== CARDS ========== */
.light-theme .stat-card,
.light-theme .quick-action,
.light-theme .config-section,
.light-theme .section-card,
.light-theme .chart-card,
[data-theme="light"] .stat-card,
[data-theme="light"] .quick-action,
[data-theme="light"] .config-section,
[data-theme="light"] .section-card,
[data-theme="light"] .chart-card {
    background: #FFFFFF !important;
    border: 1px solid #E5E7EB !important;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04) !important;
}

.light-theme .stat-card:hover,
.light-theme .quick-action:hover,
[data-theme="light"] .stat-card:hover,
[data-theme="light"] .quick-action:hover {
    border-color: #E85D04 !important;
    box-shadow: 0 4px 12px rgba(232, 93, 4, 0.08) !important;
}

.light-theme .stat-card-fin,
[data-theme="light"] .stat-card-fin {
    background: #FFFFFF !important;
}

/* ========== DATE FILTER ========== */
.light-theme .date-filter-container,
[data-theme="light"] .date-filter-container {
    background: #FFFFFF !important;
    border: 1px solid #E5E7EB !important;
}

.light-theme .date-shortcut,
[data-theme="light"] .date-shortcut {
    background: #FFFFFF !important;
    border: 1px solid #E5E7EB !important;
    color: #4B5563 !important;
}

.light-theme .date-shortcut:hover,
[data-theme="light"] .date-shortcut:hover {
    background: #FFF7ED !important;
    border-color: #E85D04 !important;
    color: #E85D04 !important;
}

.light-theme .date-shortcut.active,
[data-theme="light"] .date-shortcut.active {
    background: #E85D04 !important;
    border-color: #E85D04 !important;
    color: #FFFFFF !important;
}

/* ========== TABS ========== */
.light-theme .report-tab,
.light-theme .financeiro-tab,
[data-theme="light"] .report-tab,
[data-theme="light"] .financeiro-tab {
    background: #FFFFFF !important;
    border: 1px solid #E5E7EB !important;
    color: #4B5563 !important;
}

.light-theme .report-tab:hover,
.light-theme .financeiro-tab:hover,
[data-theme="light"] .report-tab:hover,
[data-theme="light"] .financeiro-tab:hover {
    background: #FFF7ED !important;
    border-color: #E85D04 !important;
    color: #E85D04 !important;
}

.light-theme .report-tab.active,
.light-theme .financeiro-tab.active,
[data-theme="light"] .report-tab.active,
[data-theme="light"] .financeiro-tab.active {
    background: #E85D04 !important;
    border-color: #E85D04 !important;
    color: #FFFFFF !important;
}

/* ========== INPUTS ========== */
.light-theme input,
.light-theme select,
.light-theme textarea,
[data-theme="light"] input,
[data-theme="light"] select,
[data-theme="light"] textarea {
    background: #FFFFFF !important;
    border: 1px solid #D1D5DB !important;
    color: #1F2937 !important;
}

.light-theme input:focus,
.light-theme select:focus,
.light-theme textarea:focus,
[data-theme="light"] input:focus,
[data-theme="light"] select:focus,
[data-theme="light"] textarea:focus {
    border-color: #E85D04 !important;
    box-shadow: 0 0 0 3px rgba(232, 93, 4, 0.1) !important;
    outline: none !important;
}

.light-theme input::placeholder,
.light-theme textarea::placeholder,
[data-theme="light"] input::placeholder,
[data-theme="light"] textarea::placeholder {
    color: #9CA3AF !important;
}

/* ========== CHECKBOX ========== */
.light-theme input[type="checkbox"],
[data-theme="light"] input[type="checkbox"] {
    background: #FFFFFF !important;
    border: 2px solid #D1D5DB !important;
}

.light-theme input[type="checkbox"]:hover,
[data-theme="light"] input[type="checkbox"]:hover {
    border-color: #E85D04 !important;
}

.light-theme input[type="checkbox"]:checked,
[data-theme="light"] input[type="checkbox"]:checked {
    background: #E85D04 !important;
    border-color: #E85D04 !important;
}

/* ========== BUTTONS ========== */
.light-theme .btn-secondary,
[data-theme="light"] .btn-secondary {
    background: #F3F4F6 !important;
    color: #4B5563 !important;
    border: 1px solid #D1D5DB !important;
}

.light-theme .btn-secondary:hover,
[data-theme="light"] .btn-secondary:hover {
    background: #E5E7EB !important;
}

.light-theme .btn-primary,
[data-theme="light"] .btn-primary {
    background: #E85D04 !important;
    box-shadow: 0 2px 8px rgba(232, 93, 4, 0.25) !important;
}

/* ========== PRODUCT CARDS ========== */
.light-theme .product-card,
[data-theme="light"] .product-card {
    background: #FFFFFF !important;
    border: 1px solid #E5E7EB !important;
}

.light-theme .product-card:hover,
[data-theme="light"] .product-card:hover {
    border-color: #E85D04 !important;
}

.light-theme .product-card.selected,
[data-theme="light"] .product-card.selected {
    border-color: #E85D04 !important;
    background: #FFF7ED !important;
}

.light-theme .product-name,
[data-theme="light"] .product-name {
    color: #1F2937 !important;
}

.light-theme .product-price,
[data-theme="light"] .product-price {
    color: #E85D04 !important;
}

/* ========== ORDER PANEL ========== */
.light-theme .order-panel,
[data-theme="light"] .order-panel {
    background: #FFFFFF !important;
    border-left: 1px solid #E5E7EB !important;
}

.light-theme .order-item,
[data-theme="light"] .order-item {
    background: #F9FAFB !important;
    border: 1px solid #E5E7EB !important;
}

.light-theme .order-footer,
[data-theme="light"] .order-footer {
    background: #F3F4F6 !important;
    border-top: 1px solid #E5E7EB !important;
}

/* ========== COMANDA CARDS ========== */
.light-theme .comanda-card,
[data-theme="light"] .comanda-card {
    background: #FFFFFF !important;
    border: 1px solid #E5E7EB !important;
}

.light-theme .comanda-card:hover,
[data-theme="light"] .comanda-card:hover {
    border-color: #E85D04 !important;
}

/* ========== MODALS ========== */
.light-theme .modal,
[data-theme="light"] .modal {
    background: #FFFFFF !important;
    border: 1px solid #E5E7EB !important;
}

.light-theme .modal-header,
[data-theme="light"] .modal-header {
    background: #F9FAFB !important;
    border-bottom: 1px solid #E5E7EB !important;
}

.light-theme .modal-header h2,
.light-theme .modal-header h3,
[data-theme="light"] .modal-header h2,
[data-theme="light"] .modal-header h3 {
    color: #1F2937 !important;
}

.light-theme .modal-footer,
[data-theme="light"] .modal-footer {
    background: #F9FAFB !important;
    border-top: 1px solid #E5E7EB !important;
}

/* ========== TABLES ========== */
.light-theme table th,
[data-theme="light"] table th {
    background: #F3F4F6 !important;
    color: #1F2937 !important;
}

.light-theme table td,
.light-theme .dre-table tr,
[data-theme="light"] table td,
[data-theme="light"] .dre-table tr {
    border-bottom: 1px solid #E5E7EB !important;
}

.light-theme .dre-table .highlight,
[data-theme="light"] .dre-table .highlight {
    background: #FFF7ED !important;
}

/* ========== LISTS ========== */
.light-theme .item-row,
.light-theme .top-item,
.light-theme .movimento-item,
[data-theme="light"] .item-row,
[data-theme="light"] .top-item,
[data-theme="light"] .movimento-item {
    background: #F9FAFB !important;
    border: 1px solid #E5E7EB !important;
}

.light-theme .item-row:hover,
.light-theme .top-item:hover,
[data-theme="light"] .item-row:hover,
[data-theme="light"] .top-item:hover {
    background: #F3F4F6 !important;
}

/* ========== LUCRO CARD ========== */
.light-theme .lucro-card,
[data-theme="light"] .lucro-card {
    background: #F9FAFB !important;
    border: 1px solid #E5E7EB !important;
}

/* ========== BADGES ========== */
.light-theme .badge-pago,
[data-theme="light"] .badge-pago {
    background: rgba(5, 150, 105, 0.1) !important;
    color: #059669 !important;
}

.light-theme .badge-pendente,
[data-theme="light"] .badge-pendente {
    background: rgba(217, 119, 6, 0.1) !important;
    color: #D97706 !important;
}

.light-theme .badge-vencido,
[data-theme="light"] .badge-vencido {
    background: rgba(220, 38, 38, 0.1) !important;
    color: #DC2626 !important;
}

/* ========== INDICADORES ========== */
.light-theme .indicador-card,
[data-theme="light"] .indicador-card {
    background: #FFFFFF !important;
    border: 1px solid #E5E7EB !important;
    border-left: 4px solid #E85D04 !important;
}

/* ========== PREVISAO ========== */
.light-theme .previsao-item,
[data-theme="light"] .previsao-item {
    background: #FFFFFF !important;
    border: 1px solid #E5E7EB !important;
}

/* ========== UPLOAD AREA ========== */
.light-theme .upload-area,
[data-theme="light"] .upload-area {
    background: #F9FAFB !important;
    border-color: #D1D5DB !important;
}

.light-theme .upload-area:hover,
[data-theme="light"] .upload-area:hover {
    background: #FFF7ED !important;
    border-color: #E85D04 !important;
}

/* ========== CATEGORY ITEMS ========== */
.light-theme .cat-item,
[data-theme="light"] .cat-item {
    background: #F9FAFB !important;
    border: 1px solid #E5E7EB !important;
}

/* ========== COLOR PICKER ========== */
.light-theme .color-option,
[data-theme="light"] .color-option {
    border: 2px solid #E5E7EB !important;
}

.light-theme .color-option.active,
[data-theme="light"] .color-option.active {
    border-color: #1F2937 !important;
}

/* ========== SCROLLBAR ========== */
.light-theme ::-webkit-scrollbar,
[data-theme="light"] ::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

.light-theme ::-webkit-scrollbar-track,
[data-theme="light"] ::-webkit-scrollbar-track {
    background: #F3F4F6;
}

.light-theme ::-webkit-scrollbar-thumb,
[data-theme="light"] ::-webkit-scrollbar-thumb {
    background: #D1D5DB;
    border-radius: 4px;
}

.light-theme ::-webkit-scrollbar-thumb:hover,
[data-theme="light"] ::-webkit-scrollbar-thumb:hover {
    background: #9CA3AF;
}

/* ========== MENU MOBILE ========== */
.light-theme .mobile-bottom-nav,
[data-theme="light"] .mobile-bottom-nav {
    background: #FFFFFF !important;
    border-top: 1px solid #E5E7EB !important;
}

.light-theme .mobile-bottom-nav a,
[data-theme="light"] .mobile-bottom-nav a {
    color: #6B7280 !important;
}

.light-theme .mobile-bottom-nav a.active,
[data-theme="light"] .mobile-bottom-nav a.active {
    color: #E85D04 !important;
}

/* ========== HEADINGS ========== */
.light-theme h1, .light-theme h2, .light-theme h3, .light-theme h4, .light-theme h5,
[data-theme="light"] h1, [data-theme="light"] h2, [data-theme="light"] h3, [data-theme="light"] h4, [data-theme="light"] h5 {
    color: #1F2937 !important;
}

/* ========== SELECT OPTIONS ========== */
.light-theme select option,
[data-theme="light"] select option {
    background: #FFFFFF !important;
    color: #1F2937 !important;
}

/* ========== THEME TOGGLE ========== */
.theme-toggle {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 14px;
    background: var(--bg-input);
    border: 1px solid var(--border-color);
    border-radius: 20px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 0.85rem;
    color: var(--text-primary);
}

.theme-toggle:hover {
    border-color: var(--primary);
}

/* ========== FORÇAR SIDEBAR - MÁXIMA PRIORIDADE ========== */
html.light-theme .sidebar,
html[data-theme="light"] .sidebar {
    background: #FFFFFF !important;
    background-image: none !important;
    background-color: #FFFFFF !important;
}

html.light-theme .brand,
html[data-theme="light"] .brand {
    background: #E85D04 !important;
    background-image: none !important;
    background-color: #E85D04 !important;
}

/* Forçar texto dos menus */
.light-theme .nav-item span,
[data-theme="light"] .nav-item span {
    color: inherit !important;
}

/* Footer da sidebar */
html.light-theme .sidebar-footer,
html[data-theme="light"] .sidebar-footer {
    background: #FFFFFF !important;
    border-top: 1px solid #E5E7EB !important;
}
