/* ============================================
   GLOBAL STYLES & RESET
   ============================================ */
:root {
    --primary-color: #6366f1;
    --primary-dark: #4f46e5;
    --secondary-color: #8b5cf6;
    --accent-color: #ec4899;
    --success-color: #10b981;
    --warning-color: #f59e0b;
    --danger-color: #ef4444;
    --dark-bg: #0f172a;
    --dark-card: #1e293b;
    --dark-card-light: #334155;
    --text-primary: #f8fafc;
    --text-secondary: #cbd5e1;
    --border-color: rgba(148, 163, 184, 0.1);
    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.3);
    --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.4);
    --shadow-lg: 0 8px 32px rgba(0, 0, 0, 0.5);
    --gradient-primary: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    --gradient-secondary: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    --gradient-success: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
}

/* Theme: Blue */
[data-theme="blue"] {
    --primary-color: #0ea5e9;
    --primary-dark: #0284c7;
    --secondary-color: #06b6d4;
    --dark-bg: #0c1821;
    --dark-card: #1a2332;
    --dark-card-light: #2d3e50;
    --gradient-primary: linear-gradient(135deg, #0ea5e9 0%, #06b6d4 100%);
}

/* Theme: Purple */
[data-theme="purple"] {
    --primary-color: #a855f7;
    --primary-dark: #9333ea;
    --secondary-color: #c026d3;
    --dark-bg: #1a0b2e;
    --dark-card: #2d1b4e;
    --dark-card-light: #3f2d5e;
    --gradient-primary: linear-gradient(135deg, #a855f7 0%, #c026d3 100%);
}

/* Theme: Green */
[data-theme="green"] {
    --primary-color: #10b981;
    --primary-dark: #059669;
    --secondary-color: #14b8a6;
    --dark-bg: #0a1612;
    --dark-card: #16231e;
    --dark-card-light: #1f3a2e;
    --gradient-primary: linear-gradient(135deg, #10b981 0%, #14b8a6 100%);
}

/* Theme: Red */
[data-theme="red"] {
    --primary-color: #ef4444;
    --primary-dark: #dc2626;
    --secondary-color: #f97316;
    --dark-bg: #1a0a0a;
    --dark-card: #2d1515;
    --dark-card-light: #3f2020;
    --gradient-primary: linear-gradient(135deg, #ef4444 0%, #f97316 100%);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: var(--dark-bg);
    color: var(--text-primary);
    line-height: 1.6;
    overflow-x: hidden;
    transition: background 0.3s ease;
}

/* ============================================
   NEW LOGIN PAGE STYLES
   ============================================ */
.login-page {
    min-height: 100vh;
    height: auto;
    display: flex;
    align-items: flex-start;
    justify-content: center;
    position: relative;
    overflow-y: auto;
    overflow-x: hidden;
}

.animated-bg {
    position: absolute;
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
    background: linear-gradient(135deg, #1a0b2e 0%, #0f172a 50%, #1e293b 100%);
    z-index: 0;
}

.gradient-orb {
    position: absolute;
    border-radius: 50%;
    filter: blur(80px);
    opacity: 0.4;
    animation: float 20s infinite ease-in-out;
}

.orb-1 {
    width: 500px;
    height: 500px;
    background: radial-gradient(circle, #667eea 0%, transparent 70%);
    top: -10%;
    left: -10%;
    animation-delay: 0s;
}

.orb-2 {
    width: 400px;
    height: 400px;
    background: radial-gradient(circle, #ec4899 0%, transparent 70%);
    bottom: -10%;
    right: -10%;
    animation-delay: 7s;
}

.orb-3 {
    width: 350px;
    height: 350px;
    background: radial-gradient(circle, #8b5cf6 0%, transparent 70%);
    top: 50%;
    left: 50%;
    animation-delay: 14s;
}

@keyframes float {
    0%, 100% { transform: translate(0, 0) scale(1); }
    33% { transform: translate(30px, -30px) scale(1.1); }
    66% { transform: translate(-30px, 30px) scale(0.9); }
}

.login-container {
    position: relative;
    z-index: 10;
    display: flex;
    align-items: flex-start;
    justify-content: center;
    width: 100%;
    min-height: 100vh;
    padding: 20px 20px 160px 20px;
    overflow-y: auto;
}

/* Login Panel Centralizado */
.login-panel-center {
    width: 100%;
    max-width: 420px;
    padding: 10px;
    margin: 20px auto;
}

.login-card-simple {
    background: rgba(30, 41, 59, 0.85);
    backdrop-filter: blur(20px);
    border-radius: 18px;
    padding: 25px 22px;
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.5),
                0 0 100px rgba(102, 126, 234, 0.15);
    border: 1px solid rgba(148, 163, 184, 0.1);
    margin-bottom: 15px;
}

.brand-logo-center {
    text-align: center;
    margin-bottom: 15px;
}

.brand-logo-center .logo-circle {
    width: 50px;
    height: 50px;
    background: var(--gradient-primary);
    border-radius: 14px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    color: white;
    box-shadow: 0 10px 40px rgba(102, 126, 234, 0.4);
    margin-bottom: 8px;
}

.brand-logo-center h2 {
    font-size: 22px;
    color: var(--text-primary);
    font-weight: 700;
    margin: 0;
}

.card-header {
    text-align: center;
    margin-bottom: 18px;
}

.card-header h3 {
    font-size: 18px;
    color: var(--text-primary);
    margin-bottom: 5px;
    font-weight: 600;
}

.card-header p {
    font-size: 12px;
    color: var(--text-secondary);
}

/* Demo Credentials Visível */
.demo-credentials-visible {
    margin-top: 15px;
    padding: 12px;
    background: rgba(102, 126, 234, 0.1);
    border-radius: 12px;
    border: 1px solid rgba(102, 126, 234, 0.2);
}

.demo-header {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 12px;
    color: var(--primary-color);
    font-size: 14px;
}

.demo-header i {
    font-size: 16px;
}

.credentials-grid {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.credential-item {
    display: flex;
    align-items: center;
    gap: 8px;
}

.credential-item label {
    min-width: 65px;
    font-size: 13px;
    color: var(--text-secondary);
    font-weight: 500;
}

.credential-input {
    flex: 1;
    padding: 8px 12px;
    background: rgba(51, 65, 85, 0.6);
    border: 1px solid rgba(148, 163, 184, 0.2);
    border-radius: 8px;
    color: var(--text-primary);
    font-size: 13px;
    font-family: 'Courier New', monospace;
    font-weight: 600;
}

.copy-btn {
    padding: 8px 10px;
    background: var(--primary-color);
    border: none;
    border-radius: 8px;
    color: white;
    cursor: pointer;
    transition: all 0.3s ease;
}

.copy-btn:hover {
    background: #5a67d8;
    transform: scale(1.05);
}

.copy-btn i {
    font-size: 13px;
}

/* Welcome Panel (Left Side) */
.welcome-panel {
    flex: 1;
    background: var(--gradient-primary);
    padding: 60px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    position: relative;
    overflow: hidden;
}

.welcome-panel::before {
    content: '';
    position: absolute;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(255,255,255,0.1) 0%, transparent 70%);
    top: -50%;
    left: -50%;
    animation: rotate 30s linear infinite;
}

@keyframes rotate {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

.welcome-content {
    position: relative;
    z-index: 2;
}

.brand-logo {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 40px;
}

.logo-circle {
    width: 60px;
    height: 60px;
    background: rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(10px);
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 28px;
    color: white;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
}

.brand-logo h2 {
    font-size: 32px;
    color: white;
    font-weight: 700;
}

.welcome-panel h1 {
    font-size: 42px;
    color: white;
    margin-bottom: 20px;
    font-weight: 700;
    line-height: 1.2;
}

.welcome-panel p {
    font-size: 18px;
    color: rgba(255, 255, 255, 0.9);
    margin-bottom: 40px;
    line-height: 1.6;
}

.features-list {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
    margin-bottom: 40px;
}

.feature-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 15px;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border-radius: 12px;
    color: white;
    transition: all 0.3s ease;
}

.feature-item:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: translateX(5px);
}

.feature-item i {
    font-size: 20px;
}

.stats-preview {
    display: flex;
    gap: 30px;
    padding: 30px 0;
}

.stat-item {
    flex: 1;
}

.stat-value {
    font-size: 32px;
    font-weight: 700;
    color: white;
    margin-bottom: 5px;
}

.stat-label {
    font-size: 14px;
    color: rgba(255, 255, 255, 0.8);
}

/* Login Panel (Right Side) */
.login-panel {
    flex: 1;
    padding: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.login-card-new {
    width: 100%;
    max-width: 450px;
}

.card-header {
    margin-bottom: 40px;
}

.card-header h3 {
    font-size: 28px;
    color: var(--text-primary);
    margin-bottom: 8px;
    font-weight: 700;
}

.card-header p {
    color: var(--text-secondary);
    font-size: 15px;
}

.login-form-new {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.form-group-new label {
    display: block;
    color: var(--text-primary);
    font-size: 12px;
    font-weight: 600;
    margin-bottom: 6px;
}

.input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.input-wrapper i {
    position: absolute;
    left: 18px;
    color: var(--text-secondary);
    font-size: 16px;
    z-index: 1;
    transition: all 0.3s ease;
    pointer-events: none;
}

.input-wrapper input {
    width: 100%;
    padding: 11px 40px;
    background: rgba(51, 65, 85, 0.5);
    border: 2px solid transparent;
    border-radius: 10px;
    color: var(--text-primary);
    font-size: 13px;
    transition: all 0.3s ease;
    position: relative;
    z-index: 2;
}

.input-wrapper input:focus {
    outline: none;
    background: rgba(51, 65, 85, 0.8);
    border-color: var(--primary-color);
    box-shadow: 0 0 0 4px rgba(99, 102, 241, 0.1);
}

.input-wrapper input:focus ~ i {
    color: var(--primary-color);
}

.toggle-password {
    position: absolute;
    right: 18px;
    cursor: pointer;
    z-index: 3;
    padding: 8px;
    transition: all 0.3s ease;
}

.toggle-password:hover {
    color: var(--primary-color);
    transform: scale(1.1);
}

.form-options {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 14px;
}

.remember-me {
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--text-secondary);
    cursor: pointer;
}

.remember-me input[type="checkbox"] {
    width: 18px;
    height: 18px;
    cursor: pointer;
}

.forgot-password {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s ease;
}

.forgot-password:hover {
    color: var(--primary-dark);
    text-decoration: underline;
}

.login-btn-new {
    width: 100%;
    padding: 12px;
    background: var(--gradient-primary);
    border: none;
    border-radius: 10px;
    color: white;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    box-shadow: 0 10px 30px rgba(99, 102, 241, 0.3);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.login-btn-new::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
    transition: left 0.5s ease;
}

.login-btn-new:hover {
    transform: translateY(-2px);
    box-shadow: 0 15px 40px rgba(99, 102, 241, 0.4);
}

.login-btn-new:hover::before {
    left: 100%;
}

.divider {
    display: flex;
    align-items: center;
    text-align: center;
    margin: 30px 0;
}

.divider::before,
.divider::after {
    content: '';
    flex: 1;
    border-bottom: 1px solid var(--border-color);
}

.divider span {
    padding: 0 15px;
    color: var(--text-secondary);
    font-size: 14px;
}

.social-login {
    display: flex;
    gap: 15px;
}

.social-btn {
    flex: 1;
    padding: 14px;
    background: rgba(51, 65, 85, 0.5);
    border: 2px solid var(--border-color);
    border-radius: 12px;
    color: var(--text-primary);
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    transition: all 0.3s ease;
}

.social-btn:hover {
    background: rgba(51, 65, 85, 0.8);
    border-color: var(--primary-color);
    transform: translateY(-2px);
}

.demo-credentials {
    margin-top: 30px;
    padding: 20px;
    background: rgba(99, 102, 241, 0.05);
    border: 2px solid rgba(99, 102, 241, 0.2);
    border-radius: 12px;
}

.demo-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    background: var(--primary-color);
    color: white;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 600;
    margin-bottom: 12px;
}

.demo-info p {
    color: var(--text-secondary);
    font-size: 14px;
    margin: 8px 0;
}

.demo-info code {
    background: rgba(99, 102, 241, 0.1);
    padding: 4px 8px;
    border-radius: 4px;
    color: var(--primary-color);
    font-family: 'Courier New', monospace;
    font-weight: 600;
}

.login-footer {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 15px 20px;
    text-align: center;
    color: var(--text-secondary);
    font-size: 12px;
    background: rgba(15, 23, 42, 0.95);
    backdrop-filter: blur(10px);
    border-top: 1px solid var(--border-color);
    z-index: 1000;
    line-height: 1.6;
}

.login-footer a {
    color: var(--primary-color);
    text-decoration: none;
    margin: 0 10px;
    transition: color 0.3s ease;
}

.login-footer a:hover {
    color: var(--primary-dark);
    text-decoration: underline;
}

.login-footer strong {
    color: var(--text-primary);
    font-weight: 600;
}

/* Responsive Login */
@media (max-width: 968px) {
    .login-container {
        flex-direction: column;
        max-width: 500px;
        padding: 30px 20px 150px 20px;
        min-height: 100vh;
    }
    
    .login-panel-center {
        padding: 15px;
    }
    
    .login-card-simple {
        padding: 35px 25px;
    }
    
    .welcome-panel {
        padding: 40px 30px;
    }
    
    .welcome-panel h1 {
        font-size: 32px;
    }
    
    .features-list {
        grid-template-columns: 1fr;
    }
    
    .stats-preview {
        flex-direction: column;
        gap: 20px;
    }
    
    .login-panel {
        padding: 40px 30px;
    }
}

@media (max-width: 480px) {
    .login-container {
        padding: 20px 15px 140px 15px;
    }
    
    .login-card-simple {
        padding: 30px 20px;
    }
    
    .brand-logo-center .logo-circle {
        width: 55px;
        height: 55px;
        font-size: 26px;
    }
    
    .brand-logo-center h2 {
        font-size: 24px;
    }
    
    .card-header h3 {
        font-size: 20px;
    }
    
    .login-footer {
        font-size: 11px;
        padding: 12px 15px;
    }
}

/* ============================================
   DASHBOARD PAGE STYLES
   ============================================ */
.dashboard-page {
    display: flex;
    min-height: 100vh;
    background: var(--dark-bg);
}

/* Sidebar */
.sidebar {
    width: 280px;
    background: var(--dark-card);
    border-right: 1px solid var(--border-color);
    display: flex;
    flex-direction: column;
    position: fixed;
    left: 0;
    top: 0;
    height: 100vh;
    z-index: 1000;
    transition: transform 0.3s ease;
    box-shadow: var(--shadow-lg);
}

.sidebar-header {
    padding: 30px 25px;
    border-bottom: 1px solid var(--border-color);
}

.logo {
    display: flex;
    align-items: center;
    gap: 15px;
    font-size: 24px;
    font-weight: 700;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.logo i {
    font-size: 32px;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.sidebar-nav {
    flex: 1;
    padding: 20px 0;
    overflow-y: auto;
}

.nav-item {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 16px 25px;
    color: var(--text-secondary);
    text-decoration: none;
    transition: all 0.3s ease;
    position: relative;
    margin: 5px 15px;
    border-radius: 12px;
}

.nav-item::before {
    content: '';
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 4px;
    height: 0;
    background: var(--gradient-primary);
    border-radius: 2px;
    transition: height 0.3s ease;
}

.nav-item:hover,
.nav-item.active {
    background: rgba(99, 102, 241, 0.1);
    color: var(--primary-color);
}

.nav-item.active::before {
    height: 100%;
}

.nav-item i {
    font-size: 20px;
}

.sidebar-footer {
    padding: 20px 25px;
    border-top: 1px solid var(--border-color);
}

.logout-btn {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 16px 25px;
    color: var(--text-secondary);
    text-decoration: none;
    transition: all 0.3s ease;
    border-radius: 12px;
    background: rgba(239, 68, 68, 0.1);
}

.logout-btn:hover {
    background: rgba(239, 68, 68, 0.2);
    color: var(--danger-color);
}

/* Main Content */
.main-content {
    flex: 1;
    margin-left: 280px;
    padding: 30px;
    min-height: 100vh;
}

/* Dashboard Header */
.dashboard-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    padding: 20px 30px;
    background: var(--dark-card);
    border-radius: 16px;
    box-shadow: var(--shadow-md);
    border: 1px solid var(--border-color);
    flex-wrap: wrap;
    gap: 20px;
}

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

.menu-toggle {
    display: none;
    background: none;
    border: none;
    color: var(--text-primary);
    font-size: 24px;
    cursor: pointer;
    padding: 8px;
    border-radius: 8px;
    transition: all 0.3s ease;
}

.menu-toggle:hover {
    background: rgba(99, 102, 241, 0.1);
    color: var(--primary-color);
}

.dashboard-header h1 {
    font-size: 28px;
    font-weight: 700;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

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

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

/* Date Filter Styles */
.date-filter {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 15px;
    background: rgba(99, 102, 241, 0.1);
    border-radius: 10px;
    border: 1px solid var(--border-color);
}

.date-filter i {
    color: var(--primary-color);
}

.date-select,
.stock-select {
    background: transparent;
    border: none;
    color: var(--text-primary);
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    outline: none;
    padding: 5px 10px;
}

.date-select option,
.stock-select option {
    background: var(--dark-card);
    color: var(--text-primary);
}

.custom-date-picker {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 15px;
    background: rgba(99, 102, 241, 0.1);
    border-radius: 10px;
    border: 1px solid var(--border-color);
    animation: slideIn 0.3s ease;
}

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

.date-input {
    background: rgba(51, 65, 85, 0.5);
    border: 1px solid var(--border-color);
    border-radius: 6px;
    padding: 8px 12px;
    color: var(--text-primary);
    font-size: 13px;
    cursor: pointer;
}

.date-input::-webkit-calendar-picker-indicator {
    filter: invert(1);
    cursor: pointer;
}

.apply-date-btn {
    background: var(--primary-color);
    border: none;
    color: white;
    width: 32px;
    height: 32px;
    border-radius: 6px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.apply-date-btn:hover {
    background: var(--primary-dark);
    transform: scale(1.1);
}

/* Theme Selector Styles */
.theme-selector {
    position: relative;
}

.theme-btn {
    background: rgba(99, 102, 241, 0.1);
    border: 1px solid var(--border-color);
    color: var(--primary-color);
    width: 44px;
    height: 44px;
    border-radius: 10px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    transition: all 0.3s ease;
}

.theme-btn:hover {
    background: rgba(99, 102, 241, 0.2);
    transform: scale(1.05);
}

.theme-dropdown {
    position: absolute;
    top: 55px;
    right: 0;
    background: var(--dark-card);
    border-radius: 12px;
    padding: 15px;
    box-shadow: var(--shadow-lg);
    border: 1px solid var(--border-color);
    min-width: 200px;
    z-index: 1000;
    display: none;
    animation: slideDown 0.3s ease;
}

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

.theme-dropdown.show {
    display: block;
}

.theme-option {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-bottom: 8px;
}

.theme-option:last-child {
    margin-bottom: 0;
}

.theme-option:hover {
    background: rgba(99, 102, 241, 0.1);
}

.theme-option.active {
    background: rgba(99, 102, 241, 0.2);
    border: 2px solid var(--primary-color);
}

.theme-preview {
    width: 40px;
    height: 40px;
    border-radius: 8px;
    border: 2px solid var(--border-color);
}

.dark-preview {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.blue-preview {
    background: linear-gradient(135deg, #0ea5e9 0%, #06b6d4 100%);
}

.purple-preview {
    background: linear-gradient(135deg, #a855f7 0%, #c026d3 100%);
}

.green-preview {
    background: linear-gradient(135deg, #10b981 0%, #14b8a6 100%);
}

.red-preview {
    background: linear-gradient(135deg, #ef4444 0%, #f97316 100%);
}

/* Notification Button */
.notification-btn {
    position: relative;
    background: rgba(99, 102, 241, 0.1);
    border: 1px solid var(--border-color);
    color: var(--text-primary);
    width: 44px;
    height: 44px;
    border-radius: 10px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    transition: all 0.3s ease;
}

.notification-btn:hover {
    background: rgba(99, 102, 241, 0.2);
    transform: scale(1.05);
}

.notification-badge {
    position: absolute;
    top: -5px;
    right: -5px;
    background: var(--danger-color);
    color: white;
    font-size: 11px;
    font-weight: 700;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0%, 100% {
        transform: scale(1);
        box-shadow: 0 0 0 0 rgba(239, 68, 68, 0.7);
    }
    50% {
        transform: scale(1.1);
        box-shadow: 0 0 0 10px rgba(239, 68, 68, 0);
    }
}

.date-time {
    display: flex;
    align-items: center;
    gap: 10px;
    color: var(--text-secondary);
    padding: 10px 20px;
    background: rgba(99, 102, 241, 0.1);
    border-radius: 10px;
}

.user-profile {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 8px 15px;
    background: rgba(99, 102, 241, 0.1);
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.user-profile:hover {
    background: rgba(99, 102, 241, 0.2);
}

.user-profile img {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: 2px solid var(--primary-color);
}

/* KPI Section */
.kpi-section {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.kpi-card {
    background: var(--dark-card);
    padding: 25px;
    border-radius: 16px;
    box-shadow: var(--shadow-md);
    border: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    gap: 20px;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.kpi-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: var(--gradient-primary);
}

.kpi-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
}

.kpi-revenue::before {
    background: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
}

.kpi-profit::before {
    background: linear-gradient(135deg, #43e97b 0%, #38f9d7 100%);
}

.kpi-expenses::before {
    background: linear-gradient(135deg, #fa709a 0%, #fee140 100%);
}

.kpi-growth::before {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.kpi-icon {
    width: 60px;
    height: 60px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 28px;
    background: rgba(99, 102, 241, 0.1);
    color: var(--primary-color);
}

.kpi-revenue .kpi-icon {
    background: rgba(79, 172, 254, 0.1);
    color: #4facfe;
}

.kpi-profit .kpi-icon {
    background: rgba(67, 233, 123, 0.1);
    color: #43e97b;
}

.kpi-expenses .kpi-icon {
    background: rgba(250, 112, 154, 0.1);
    color: #fa709a;
}

.kpi-growth .kpi-icon {
    background: rgba(102, 126, 234, 0.1);
    color: #667eea;
}

.kpi-content {
    flex: 1;
}

.kpi-content h3 {
    font-size: 14px;
    color: var(--text-secondary);
    margin-bottom: 8px;
    font-weight: 500;
}

.kpi-value {
    font-size: 26px;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 8px;
}

.kpi-change {
    font-size: 13px;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 4px 10px;
    border-radius: 6px;
}

.kpi-change.positive {
    background: rgba(16, 185, 129, 0.1);
    color: var(--success-color);
}

.kpi-change.negative {
    background: rgba(239, 68, 68, 0.1);
    color: var(--danger-color);
}

/* Charts Section */
.charts-section {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.chart-large {
    grid-column: 1 / -1;
}

.chart-card {
    background: var(--dark-card);
    padding: 25px;
    border-radius: 16px;
    box-shadow: var(--shadow-md);
    border: 1px solid var(--border-color);
    transition: all 0.3s ease;
}

.chart-card:hover {
    box-shadow: var(--shadow-lg);
}

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

.chart-header h3 {
    font-size: 18px;
    font-weight: 600;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    gap: 10px;
}

.chart-header i {
    color: var(--primary-color);
}

.chart-actions {
    display: flex;
    gap: 10px;
}

.chart-btn {
    background: rgba(99, 102, 241, 0.1);
    border: none;
    color: var(--primary-color);
    width: 36px;
    height: 36px;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.chart-btn:hover {
    background: rgba(99, 102, 241, 0.2);
    transform: scale(1.1);
}

.chart-container {
    position: relative;
    height: 350px;
}

/* Map Section */
.map-section {
    margin-bottom: 30px;
}

.map-card {
    background: var(--dark-card);
    padding: 25px;
    border-radius: 16px;
    box-shadow: var(--shadow-md);
    border: 1px solid var(--border-color);
}

.map-container {
    height: 500px;
    border-radius: 12px;
    overflow: hidden;
    margin-bottom: 20px;
}

.map-legend {
    display: flex;
    gap: 30px;
    flex-wrap: wrap;
    padding: 15px;
    background: rgba(99, 102, 241, 0.05);
    border-radius: 10px;
}

.legend-item {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 14px;
    color: var(--text-secondary);
}

.legend-color {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

.legend-color.high {
    background: linear-gradient(135deg, #43e97b 0%, #38f9d7 100%);
}

.legend-color.medium {
    background: linear-gradient(135deg, #fa709a 0%, #fee140 100%);
}

.legend-color.low {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

/* Footer */
.dashboard-footer {
    margin-top: 40px;
    padding: 25px;
    text-align: center;
    background: var(--dark-card);
    border-radius: 16px;
    border: 1px solid var(--border-color);
}

.dashboard-footer p {
    color: var(--text-secondary);
    font-size: 14px;
}

.dashboard-footer strong {
    color: var(--text-primary);
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* ============================================
   STOCK MARKET SECTION (API Integration)
   ============================================ */
.stock-section {
    margin-bottom: 30px;
}

.stock-card {
    background: var(--dark-card);
    padding: 25px;
    border-radius: 16px;
    box-shadow: var(--shadow-md);
    border: 1px solid var(--border-color);
}

.stock-info {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding: 20px;
    background: rgba(99, 102, 241, 0.05);
    border-radius: 12px;
}

.stock-details {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.stock-price {
    font-size: 42px;
    font-weight: 700;
    color: var(--text-primary);
}

.stock-change {
    font-size: 18px;
    font-weight: 600;
    padding: 8px 16px;
    border-radius: 8px;
    display: inline-block;
}

.stock-change.positive {
    background: rgba(16, 185, 129, 0.1);
    color: var(--success-color);
}

.stock-change.negative {
    background: rgba(239, 68, 68, 0.1);
    color: var(--danger-color);
}

.stock-meta {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
}

.meta-item {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.meta-label {
    font-size: 13px;
    color: var(--text-secondary);
    font-weight: 500;
}

.meta-value {
    font-size: 16px;
    color: var(--text-primary);
    font-weight: 600;
}

.loader {
    text-align: center;
    padding: 40px;
    color: var(--primary-color);
    font-size: 16px;
}

.loader i {
    font-size: 24px;
    margin-bottom: 10px;
}

/* ============================================
   TABLE SECTION
   ============================================ */
.table-section {
    margin-bottom: 30px;
}

.table-card {
    background: var(--dark-card);
    padding: 25px;
    border-radius: 16px;
    box-shadow: var(--shadow-md);
    border: 1px solid var(--border-color);
}

.table-responsive {
    overflow-x: auto;
    margin-top: 20px;
}

.data-table {
    width: 100%;
    border-collapse: collapse;
}

.data-table thead {
    background: rgba(99, 102, 241, 0.1);
}

.data-table th {
    padding: 15px;
    text-align: left;
    font-size: 13px;
    font-weight: 600;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.data-table tbody tr {
    border-bottom: 1px solid var(--border-color);
    transition: all 0.3s ease;
}

.data-table tbody tr:hover {
    background: rgba(99, 102, 241, 0.05);
}

.data-table td {
    padding: 15px;
    color: var(--text-primary);
    font-size: 14px;
}

.transaction-id {
    font-family: 'Courier New', monospace;
    color: var(--text-secondary);
    font-size: 13px;
}

.transaction-category {
    padding: 6px 12px;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 600;
    display: inline-block;
}

.category-salary {
    background: rgba(16, 185, 129, 0.1);
    color: var(--success-color);
}

.category-marketing {
    background: rgba(236, 72, 153, 0.1);
    color: var(--accent-color);
}

.category-tech {
    background: rgba(99, 102, 241, 0.1);
    color: var(--primary-color);
}

.category-ops {
    background: rgba(245, 158, 11, 0.1);
    color: var(--warning-color);
}

.transaction-value {
    font-weight: 600;
}

.value-positive {
    color: var(--success-color);
}

.value-negative {
    color: var(--danger-color);
}

.transaction-status {
    padding: 6px 12px;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.status-completed {
    background: rgba(16, 185, 129, 0.1);
    color: var(--success-color);
}

.status-pending {
    background: rgba(245, 158, 11, 0.1);
    color: var(--warning-color);
}

.status-cancelled {
    background: rgba(239, 68, 68, 0.1);
    color: var(--danger-color);
}

/* ============================================
   ALERTS SECTION
   ============================================ */
.alerts-section {
    margin-bottom: 30px;
}

.alerts-card {
    background: var(--dark-card);
    padding: 25px;
    border-radius: 16px;
    box-shadow: var(--shadow-md);
    border: 1px solid var(--border-color);
}

.alerts-list {
    display: flex;
    flex-direction: column;
    gap: 15px;
    margin-top: 20px;
}

.alert-item {
    padding: 18px;
    border-radius: 12px;
    border-left: 4px solid;
    display: flex;
    align-items: flex-start;
    gap: 15px;
    transition: all 0.3s ease;
}

.alert-item:hover {
    transform: translateX(5px);
    box-shadow: var(--shadow-sm);
}

.alert-icon {
    font-size: 20px;
    margin-top: 2px;
}

.alert-content {
    flex: 1;
}

.alert-title {
    font-size: 15px;
    font-weight: 600;
    margin-bottom: 5px;
    color: var(--text-primary);
}

.alert-message {
    font-size: 14px;
    color: var(--text-secondary);
    line-height: 1.5;
}

.alert-time {
    font-size: 12px;
    color: var(--text-secondary);
    margin-top: 8px;
    display: flex;
    align-items: center;
    gap: 5px;
}

.alert-warning {
    background: rgba(245, 158, 11, 0.05);
    border-color: var(--warning-color);
}

.alert-warning .alert-icon {
    color: var(--warning-color);
}

.alert-success {
    background: rgba(16, 185, 129, 0.05);
    border-color: var(--success-color);
}

.alert-success .alert-icon {
    color: var(--success-color);
}

.alert-danger {
    background: rgba(239, 68, 68, 0.05);
    border-color: var(--danger-color);
}

.alert-danger .alert-icon {
    color: var(--danger-color);
}

.alert-info {
    background: rgba(99, 102, 241, 0.05);
    border-color: var(--primary-color);
}

.alert-info .alert-icon {
    color: var(--primary-color);
}

/* ============================================
   FLOATING NOTIFICATIONS
   ============================================ */
.floating-notification {
    position: fixed;
    top: 100px;
    right: 30px;
    background: var(--dark-card);
    color: var(--text-primary);
    padding: 18px 24px;
    border-radius: 12px;
    box-shadow: var(--shadow-lg);
    border: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    gap: 12px;
    z-index: 10000;
    transform: translateX(400px);
    opacity: 0;
    transition: all 0.3s ease;
    max-width: 400px;
}

.floating-notification.show {
    transform: translateX(0);
    opacity: 1;
}

.floating-notification i {
    font-size: 20px;
}

.notification-success {
    border-left: 4px solid var(--success-color);
}

.notification-success i {
    color: var(--success-color);
}

.notification-error {
    border-left: 4px solid var(--danger-color);
}

.notification-error i {
    color: var(--danger-color);
}

.notification-info {
    border-left: 4px solid var(--primary-color);
}

.notification-info i {
    color: var(--primary-color);
}

@media (max-width: 768px) {
    .floating-notification {
        right: 15px;
        left: 15px;
        max-width: none;
    }
}

/* ============================================
   RESPONSIVE STYLES
   ============================================ */
@media (max-width: 1024px) {
    .charts-section {
        grid-template-columns: 1fr;
    }
    
    .chart-large {
        grid-column: 1;
    }
}

@media (max-width: 768px) {
    /* Sidebar mobile com overlay */
    .sidebar {
        transform: translateX(-100%);
        position: fixed;
        z-index: 1000;
        box-shadow: 2px 0 15px rgba(0, 0, 0, 0.3);
    }
    
    .sidebar.active {
        transform: translateX(0);
    }
    
    /* Main content ajustado */
    .main-content {
        margin-left: 0;
        padding: 15px;
        width: 100%;
    }
    
    /* Menu toggle sempre visível */
    .menu-toggle {
        display: flex !important;
        align-items: center;
        justify-content: center;
        width: 40px;
        height: 40px;
        background: var(--card-bg);
        border: none;
        border-radius: 8px;
        color: var(--text-primary);
        cursor: pointer;
        transition: all 0.3s ease;
    }
    
    .menu-toggle:hover {
        background: var(--primary-color);
        color: white;
        transform: scale(1.05);
    }
    
    /* Header compacto */
    .dashboard-header {
        flex-direction: column;
        gap: 15px;
        padding: 15px;
    }
    
    .header-left,
    .header-right {
        width: 100%;
    }
    
    .header-right {
        flex-direction: column;
        gap: 10px;
    }
    
    .header-controls {
        flex-wrap: wrap;
        gap: 8px;
    }
    
    .dashboard-header h1 {
        font-size: 1.3rem;
    }
    
    .date-time {
        font-size: 0.8rem;
        padding: 8px 10px;
    }
    
    /* User profile compacto */
    .user-profile {
        padding: 8px 12px;
    }
    
    .user-profile img {
        width: 32px;
        height: 32px;
    }
    
    /* Date filter */
    .date-filter {
        width: 100%;
    }
    
    .date-select {
        width: 100%;
        font-size: 0.9rem;
    }
    
    .custom-date-picker {
        flex-direction: column;
        gap: 8px;
    }
    
    .date-input {
        width: 100%;
    }
    
    /* KPI cards */
    .kpi-section {
        grid-template-columns: 1fr;
        gap: 15px;
        padding: 15px;
    }
    
    .kpi-card {
        padding: 20px 15px;
    }
    
    .kpi-value {
        font-size: 1.8rem;
    }
    
    /* Charts */
    .charts-section {
        grid-template-columns: 1fr;
        gap: 20px;
        padding: 15px;
    }
    
    .chart-container {
        height: 280px;
    }
    
    /* Mapa */
    .map-container {
        height: 350px;
    }
    
    /* Tabela responsiva */
    .table-responsive {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }
    
    .data-table {
        min-width: 650px;
        font-size: 0.85rem;
    }
    
    .data-table th,
    .data-table td {
        padding: 10px 8px;
    }
    
    /* Alertas */
    .alerts-section {
        padding: 15px;
    }
    
    .alert-item {
        padding: 12px;
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }
    
    /* Footer */
    .dashboard-footer {
        padding: 15px;
        font-size: 0.8rem;
    }
    
    /* Theme dropdown */
    .theme-dropdown {
        right: 0;
        width: 200px;
    }
    
    /* Login */
    .login-card {
        padding: 40px 30px;
    }
    
    .map-legend {
        flex-direction: column;
        gap: 15px;
    }
}

@media (max-width: 480px) {
    .dashboard-header h1 {
        font-size: 1.1rem;
    }
    
    .kpi-value {
        font-size: 1.5rem;
    }
    
    .kpi-icon {
        width: 45px;
        height: 45px;
        font-size: 1rem;
    }
    
    .chart-container {
        height: 250px;
    }
    
    .map-container {
        height: 300px;
    }
    
    .user-profile span {
        display: none;
    }
    
    .login-card {
        padding: 30px 20px;
    }
    
    .logo-container {
        width: 60px;
        height: 60px;
    }
    
    .logo-container i {
        font-size: 28px;
    }
    
    .login-header h1 {
        font-size: 24px;
    }
    
    .kpi-card {
        padding: 20px;
    }
    
    .kpi-icon {
        width: 50px;
        height: 50px;
        font-size: 24px;
    }
    
    .kpi-value {
        font-size: 22px;
    }
    
    .chart-card {
        padding: 20px;
    }
    
    .chart-container {
        height: 250px;
    }
    
    .map-container {
        height: 300px;
    }
    
    .user-profile span {
        display: none;
    }
}

/* Landscape mobile */
@media (max-width: 768px) and (orientation: landscape) {
    .kpi-section {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .charts-section {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .map-container {
        height: 280px;
    }
}

/* Scrollbar Styles */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: var(--dark-bg);
}

::-webkit-scrollbar-thumb {
    background: var(--dark-card-light);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--primary-color);
}

/* Leaflet Map Custom Styles */
.leaflet-popup-content-wrapper {
    background: var(--dark-card);
    color: var(--text-primary);
    border-radius: 12px;
    box-shadow: var(--shadow-lg);
}

.leaflet-popup-tip {
    background: var(--dark-card);
}

.leaflet-control-zoom a {
    background: var(--dark-card) !important;
    color: var(--text-primary) !important;
    border: 1px solid var(--border-color) !important;
}

.leaflet-control-zoom a:hover {
    background: var(--primary-color) !important;
    color: white !important;
}
