/* Reset e Base */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Arial', sans-serif;
    background: #000000;
    color: #FFFFFF;
    min-height: 100vh;
}

.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Container Full Width para Header */
.container-full {
    max-width: 100%;
    margin: 0 auto;
    padding: 0 40px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

/* Layout Dashboard com Sidebar */
.dashboard-layout {
    display: flex;
    gap: 20px;
    padding: 20px 40px;
    max-width: 100%;
}

.dashboard-main {
    flex: 1;
    min-width: 0;
}

/* Login Page */
.login-page {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
}

.login-container {
    background: #1a1a1a;
    border: 2px solid #333;
    border-radius: 12px;
    padding: 40px;
    width: 100%;
    max-width: 450px;
    text-align: center;
}

.login-container .logo {
    width: 280px;
    margin-bottom: 20px;
}

.login-container h1 {
    font-size: 24px;
    margin-bottom: 10px;
}

.subtitle {
    color: #999;
    font-size: 14px;
    margin-bottom: 30px;
}

.form-group {
    margin-bottom: 20px;
    text-align: left;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-size: 14px;
    color: #ccc;
}

.form-group input {
    width: 100%;
    padding: 12px;
    background: #000;
    border: 1px solid #333;
    border-radius: 6px;
    color: #fff;
    font-size: 16px;
}

.form-group input:focus {
    outline: none;
    border-color: #FF6600;
}

.btn-primary {
    width: 100%;
    padding: 14px;
    background: #FF6600;
    border: none;
    border-radius: 6px;
    color: #fff;
    font-size: 16px;
    font-weight: bold;
    cursor: pointer;
    transition: background 0.3s;
}

.btn-primary:hover {
    background: #ff7700;
}

.error-message {
    margin-top: 15px;
    padding: 12px;
    background: #ff000020;
    border: 1px solid #ff0000;
    border-radius: 6px;
    color: #ff6666;
    font-size: 14px;
}

/* Header */
header {
    background: #1a1a1a;
    border-bottom: 2px solid #FF6600;
    padding: 15px 0;
}

.header-left {
    display: flex;
    align-items: center;
    gap: 15px;
}

.logo-small {
    height: 40px;
}

header h1 {
    font-size: 20px;
    margin: 0;
}

header .subtitle {
    font-size: 12px;
    color: #999;
    margin: 0;
}

.header-right {
    display: flex;
    align-items: center;
    gap: 15px;
}

.update-time {
    font-size: 14px;
    color: #999;
}

.btn-icon {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #333;
    border: none;
    border-radius: 6px;
    text-decoration: none;
    font-size: 20px;
    cursor: pointer;
    transition: background 0.3s;
    color: #fff;
}

.btn-icon:hover {
    background: #FF6600;
    transform: scale(1.05);
}

.btn-icon:active {
    transform: scale(0.95);
}

/* Menu Hamburger */
.hamburger-menu {
    position: relative;
}

.dropdown-menu {
    display: none;
    position: absolute;
    top: 50px;
    right: 0;
    background: #1a1a1a;
    border: 2px solid #333;
    border-radius: 8px;
    min-width: 220px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.5);
    z-index: 1000;
    overflow: hidden;
}

.dropdown-menu.show {
    display: block;
    animation: slideDown 0.2s ease-out;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Menu Items */
.menu-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.875rem 1.25rem;
    color: #fff;
    text-decoration: none;
    transition: all 0.2s ease;
    border-left: 3px solid transparent;
}

.menu-item:hover {
    background: #2a2a2a;
    border-left-color: #FF6600;
}

.menu-item.active {
    background: #2a2a2a;
    border-left-color: #FF6600;
    color: #FF6600;
}

.menu-item.active .menu-icon {
    filter: brightness(1.2);
}

.menu-icon {
    font-size: 1.25rem;
    width: 1.5rem;
    text-align: center;
}

.menu-text {
    font-size: 0.95rem;
    font-weight: 500;
}

/* Menu Divider */
.menu-divider {
    border: none;
    border-top: 1px solid #333;
    margin: 0.5rem 0;
}

/* Logout Item */
.menu-item-logout {
    color: #ff4444;
}

.menu-item-logout:hover {
    background: #2a2a2a;
    border-left-color: #ff4444;
}

/* Botão Logout Fixo */
.btn-logout {
    color: #ff4444 !important;
}

.btn-logout:hover {
    color: #ff6666 !important;
    background: #ff444420 !important;
}

/* Compatibilidade com links antigos no dropdown */
.dropdown-menu a:not(.menu-item) {
    display: block;
    padding: 12px 20px;
    color: #fff;
    text-decoration: none;
    font-size: 14px;
    transition: background 0.2s;
}

.dropdown-menu a:not(.menu-item):hover {
    background: #FF6600;
}

.dropdown-menu hr:not(.menu-divider) {
    border: none;
    border-top: 1px solid #333;
    margin: 5px 0;
}

/* Hero Value */
.hero-value {
    text-align: center;
    margin-bottom: 30px;
}

.value-display {
    font-size: 40px;
    font-weight: bold;
    color: #FF6600;
    line-height: 1;
    margin-bottom: 10px;
    margin-top: 20px;
}

.value-label {
    font-size: 18px;
    color: #999;
    letter-spacing: 2px;
}

/* Progress */
.progress-section {
    margin-bottom: 40px;
}

.progress-bar {
    width: 100%;
    height: 40px;
    background: #1a1a1a;
    border: 2px solid #333;
    border-radius: 20px;
    overflow: visible;
    position: relative;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #FF6600, #ff8800);
    transition: width 0.5s ease;
    width: 0%;
}

.progress-label {
    text-align: center;
    font-size: 110px;
    font-weight: bold;
    color: #FF6600;
    margin-top: 15px;
}

.progress-marker {
    position: absolute;
    top: -10px;
    transform: translateX(-50%);
    z-index: 10;
}

.marker-line {
    width: 2px;
    height: 60px;
    background: #FFD700;
    margin: 0 auto;
}

.marker-label {
    font-size: 21px;
    color: #FFD700;
    margin-top: 5px;
    white-space: nowrap;
    text-align: center;
}

/* Info Cards */
.info-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
    margin-bottom: 40px;
}

.info-card {
    background: #1a1a1a;
    border: 2px solid #333;
    border-radius: 12px;
    padding: 30px;
}

.card-label {
    font-size: 14px;
    color: #999;
    margin-bottom: 10px;
    letter-spacing: 1px;
}

.card-value {
    font-size: 36px;
    font-weight: bold;
    color: #FFFFFF;
}

/* Metas */
.metas-section {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
    margin-bottom: 40px;
}

.meta-card {
    background: #1a1a1a;
    border: 2px solid #333;
    border-radius: 12px;
    padding: 25px;
    display: flex;
    align-items: center;
    gap: 20px;
}

.meta-card.atingida {
    border-color: #00ff00;
}

.meta-icon {
    font-size: 40px;
    width: 60px;
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #333;
    border-radius: 50%;
}

.meta-card.atingida .meta-icon {
    background: #00ff00;
    color: #000;
}

.meta-title {
    font-size: 14px;
    color: #999;
    margin-bottom: 5px;
}

.meta-value {
    font-size: 24px;
    font-weight: bold;
    color: #FFFFFF;
}

.meta-bonus {
    font-size: 14px;
    color: #FF6600;
    margin-top: 5px;
}

/* Chart */
.chart-section {
    background: #1a1a1a;
    border: 2px solid #333;
    border-radius: 12px;
    padding: 30px;
}

.chart-section h2 {
    font-size: 18px;
    margin-bottom: 20px;
    color: #999;
    letter-spacing: 1px;
}

#chart {
    width: 100%;
    height: 300px;
}

/* Sidebar de Alertas */
.alertas-sidebar {
    width: 350px;
    background: #1a1a1a;
    border: 2px solid #333;
    border-radius: 12px;
    padding: 20px;
    height: fit-content;
    max-height: calc(100vh - 120px);
    display: flex;
    flex-direction: column;
    position: sticky;
    top: 20px;
}

.sidebar-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 2px solid #333;
}

.sidebar-header h3 {
    font-size: 16px;
    color: #FF6600;
    letter-spacing: 1px;
    margin: 0;
}

.alertas-count {
    background: #FF6600;
    color: #000;
    padding: 4px 12px;
    border-radius: 12px;
    font-size: 14px;
    font-weight: bold;
}

.alertas-list {
    flex: 1;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.alertas-list::-webkit-scrollbar {
    width: 6px;
}

.alertas-list::-webkit-scrollbar-track {
    background: #000;
    border-radius: 3px;
}

.alertas-list::-webkit-scrollbar-thumb {
    background: #FF6600;
    border-radius: 3px;
}

.alertas-empty {
    text-align: center;
    padding: 40px 20px;
    color: #666;
    font-size: 14px;
}

.alerta-item {
    background: #000;
    border: 1px solid #333;
    border-left: 4px solid #FF6600;
    border-radius: 8px;
    padding: 12px;
    transition: all 0.3s;
    animation: slideInRight 0.3s ease-out;
}

.alerta-item:hover {
    border-left-color: #ff8800;
    background: #111;
    transform: translateX(-3px);
}

.alerta-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
}

.alerta-canal {
    font-size: 12px;
    font-weight: bold;
    color: #FF6600;
    text-transform: uppercase;
}

.alerta-horario {
    font-size: 11px;
    color: #666;
}

.alerta-valor {
    font-size: 20px;
    font-weight: bold;
    color: #FFFFFF;
    margin-bottom: 4px;
}

.alerta-usuario {
    font-size: 10px;
    color: #666;
    text-overflow: ellipsis;
    overflow: hidden;
    white-space: nowrap;
}

@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(20px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* Trigger Overlay */
.trigger-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.9);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    animation: fadeIn 0.3s;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.trigger-content {
    text-align: center;
    animation: bounce 0.5s;
}

@keyframes bounce {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.1); }
}

.trigger-icon {
    font-size: 120px;
    margin-bottom: 20px;
}

.trigger-message {
    font-size: 48px;
    font-weight: bold;
    color: #FF6600;
}

/* Responsive */
@media (max-width: 1400px) {
    .dashboard-layout {
        flex-direction: column;
    }
    
    .alertas-sidebar {
        width: 100%;
        max-height: 400px;
        position: relative;
        top: 0;
    }
}

@media (max-width: 768px) {
    .container-full {
        padding: 0 20px;
    }
    
    .dashboard-layout {
        padding: 20px;
    }
    
    .value-display {
        font-size: 60px;
    }
    
    .progress-label {
        font-size: 24px;
    }
    
    .card-value {
        font-size: 28px;
    }
    
    .meta-value {
        font-size: 20px;
    }
    
    .alertas-sidebar {
        width: 100%;
    }
    
    /* Menu responsivo */
    .dropdown-menu {
        right: 0;
        left: 0;
        min-width: 100%;
        border-radius: 0 0 8px 8px;
        margin-top: 0;
    }
    
    .btn-logout {
        display: none; /* Já está no menu */
    }
    
    .hamburger-menu {
        font-size: 1.75rem;
    }
    
    .update-time {
        display: none; /* Oculta em mobile para economizar espaço */
    }
}


/* ========================================
   FILTRO DE DATAS
   ======================================== */

.filtro-datas-container {
    background: #1a1a1a;
    border-bottom: 1px solid #333;
    padding: 1rem 40px;
    position: sticky;
    top: 0;
    z-index: 100;
}

.filtro-datas-content {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    flex-wrap: wrap;
}

.filtro-label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: #999;
    font-weight: 500;
    font-size: 0.95rem;
}

.filtro-icon {
    font-size: 1.25rem;
}

.filtro-inputs {
    display: flex;
    align-items: center;
    gap: 1rem;
    flex-wrap: wrap;
}

.filtro-input-group {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.filtro-input-group label {
    color: #999;
    font-size: 0.9rem;
    min-width: 30px;
}

.filtro-date-input {
    padding: 0.5rem 0.75rem;
    background: #000;
    border: 1px solid #333;
    border-radius: 6px;
    color: #fff;
    font-size: 0.9rem;
    font-family: 'Arial', sans-serif;
    transition: all 0.2s ease;
}

.filtro-date-input:focus {
    outline: none;
    border-color: #FF6600;
    background: #0a0a0a;
}

.filtro-date-input:hover {
    border-color: #444;
}

/* Estilo do calendário (webkit) */
.filtro-date-input::-webkit-calendar-picker-indicator {
    filter: invert(1);
    cursor: pointer;
}

.filtro-separator {
    color: #666;
    font-size: 0.9rem;
    margin: 0 0.25rem;
}

.filtro-actions {
    display: flex;
    gap: 0.5rem;
    margin-left: auto;
    flex-wrap: wrap;
}

.btn-filtro {
    padding: 0.5rem 1rem;
    border: none;
    border-radius: 6px;
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    white-space: nowrap;
}

.btn-filtro:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.3);
}

.btn-filtro:active {
    transform: translateY(0);
}

.btn-filtro:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

.btn-filtro-primary {
    background: #FF6600;
    color: #fff;
}

.btn-filtro-primary:hover:not(:disabled) {
    background: #ff7700;
}

.btn-filtro-secondary {
    background: #333;
    color: #fff;
}

.btn-filtro-secondary:hover:not(:disabled) {
    background: #444;
}

.btn-filtro-black-friday {
    background: linear-gradient(135deg, #FF6600 0%, #ff8800 100%);
    color: #fff;
    font-weight: 600;
}

.btn-filtro-black-friday:hover:not(:disabled) {
    background: linear-gradient(135deg, #ff7700 0%, #ff9900 100%);
}

/* Responsive */
@media (max-width: 1024px) {
    .filtro-datas-container {
        padding: 1rem 20px;
    }
    
    .filtro-datas-content {
        gap: 1rem;
    }
    
    .filtro-actions {
        margin-left: 0;
        width: 100%;
    }
}

@media (max-width: 768px) {
    .filtro-datas-content {
        flex-direction: column;
        align-items: stretch;
        gap: 1rem;
    }
    
    .filtro-inputs {
        flex-direction: column;
        align-items: stretch;
        gap: 0.75rem;
    }
    
    .filtro-input-group {
        width: 100%;
    }
    
    .filtro-date-input {
        flex: 1;
        width: 100%;
    }
    
    .filtro-actions {
        flex-direction: column;
        gap: 0.5rem;
    }
    
    .btn-filtro {
        width: 100%;
        text-align: center;
    }
}

@media (max-width: 480px) {
    .filtro-datas-container {
        padding: 0.75rem 15px;
    }
    
    .filtro-label {
        font-size: 0.85rem;
    }
    
    .filtro-icon {
        font-size: 1.1rem;
    }
    
    .btn-filtro {
        font-size: 0.85rem;
        padding: 0.6rem 0.8rem;
    }
}
