/* =========================================
   S.S.W INTELLIGENCE - CYBER/SAAS DARK THEME
   ========================================= */

/* =========================================
   1. AMBIENT GLOWS & BACKGROUND EFFECTS
   ========================================= */
.ambient-glow {
    position: fixed;
    pointer-events: none;
    z-index: 0;
}

.glow-1 {
    top: -10%;
    left: -10%;
    width: 50%;
    height: 50%;
    background: radial-gradient(circle, rgba(59, 130, 246, 0.08) 0%, transparent 70%);
    filter: blur(80px);
    animation: float 8s ease-in-out infinite;
}

.glow-2 {
    top: 40%;
    right: -5%;
    width: 40%;
    height: 40%;
    background: radial-gradient(circle, rgba(139, 92, 246, 0.06) 0%, transparent 70%);
    filter: blur(100px);
    animation: float 10s ease-in-out infinite 2s;
}

.glow-3 {
    bottom: -10%;
    left: 30%;
    width: 35%;
    height: 35%;
    background: radial-gradient(circle, rgba(6, 182, 212, 0.05) 0%, transparent 70%);
    filter: blur(90px);
    animation: float 12s ease-in-out infinite 4s;
}

@keyframes float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-20px); }
}

/* =========================================
   2. GLASSMORPHISM PANELS
   ========================================= */
.glass-panel {
    background: rgba(21, 27, 43, 0.7);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.08);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
}

.glass-panel-hover:hover {
    border-color: rgba(255, 255, 255, 0.15);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.4);
    transform: translateY(-2px);
}

/* =========================================
   3. MODERN INPUTS
   ========================================= */
.input-pro {
    background: rgba(15, 23, 42, 0.6);
    border: 1px solid rgba(255, 255, 255, 0.1);
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.input-pro:focus {
    border-color: #3B82F6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.15);
    outline: none;
    background: rgba(15, 23, 42, 0.8);
}

/* =========================================
   4. MODERN BUTTONS
   ========================================= */
.btn-primary {
    background: linear-gradient(135deg, #3B82F6 0%, #2563EB 100%);
    position: relative;
    overflow: hidden;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(59, 130, 246, 0.4);
    filter: brightness(1.1);
}

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

.btn-secondary {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    transition: all 0.2s ease;
}

.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.2);
}

/* =========================================
   5. SIDEBAR NAVIGATION WITH ACTIVE STATE
   ========================================= */
.nav-item {
    position: relative;
    transition: all 0.2s ease;
}

.nav-item::before {
    content: '';
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 3px;
    height: 0;
    background: linear-gradient(180deg, #3B82F6, #8B5CF6);
    border-radius: 0 3px 3px 0;
    transition: height 0.2s ease;
}

.nav-item:hover::before,
.nav-item.active::before {
    height: 60%;
}

.nav-item.active {
    background: rgba(59, 130, 246, 0.1);
    border-color: rgba(59, 130, 246, 0.3);
}

/* =========================================
   6. CARDS WITH HOVER EFFECTS
   ========================================= */
.card-hover {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.card-hover:hover {
    transform: translateY(-4px);
    border-color: rgba(59, 130, 246, 0.3);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
}

/* =========================================
   7. TOAST NOTIFICATIONS
   ========================================= */
#toastContainer {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 9999;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.toast {
    background: rgba(21, 27, 43, 0.95);
    backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    padding: 14px 18px;
    min-width: 300px;
    max-width: 400px;
    display: flex;
    align-items: center;
    gap: 12px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.4);
    animation: slideInRight 0.3s ease-out forwards;
    color: white;
}

.toast.hiding {
    animation: slideOutRight 0.3s ease-in forwards;
}

.toast-success { border-left: 3px solid #10B981; }
.toast-error { border-left: 3px solid #EF4444; }
.toast-warning { border-left: 3px solid #F59E0B; }
.toast-info { border-left: 3px solid #3B82F6; }

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

@keyframes slideOutRight {
    from { transform: translateX(0); opacity: 1; }
    to { transform: translateX(100%); opacity: 0; }
}

/* =========================================
   8. VIEW TRANSITIONS
   ========================================= */
.view-section {
    opacity: 0;
    transform: translateY(10px);
    transition: opacity 0.3s ease, transform 0.3s ease;
}

.view-section.active {
    opacity: 1;
    transform: translateY(0);
}

.view-transition {
    transition: opacity 0.3s ease, transform 0.3s ease;
}

.view-hidden {
    opacity: 0;
    transform: translateY(10px);
    pointer-events: none;
}

.view-visible {
    opacity: 1;
    transform: translateY(0);
}

/* Nav indicator for active state in sidebar */
.nav-indicator {
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 3px;
    height: 24px;
    background: linear-gradient(to bottom, #3B82F6, #8B5CF6);
    border-radius: 0 4px 4px 0;
    box-shadow: 0 0 10px rgba(59, 130, 246, 0.5);
    animation: nav-indicator-glow 2s ease-in-out infinite;
}

@keyframes nav-indicator-glow {
    0%, 100% { box-shadow: 0 0 10px rgba(59, 130, 246, 0.5); }
    50% { box-shadow: 0 0 20px rgba(59, 130, 246, 0.8); }
}

/* Active state for sidebar buttons */
nav button.active {
    position: relative;
    background: rgba(59, 130, 246, 0.1) !important;
    border-color: rgba(59, 130, 246, 0.3) !important;
}

nav button.active i {
    color: #3B82F6 !important;
}

/* =========================================
   9. FAT FOOTER
   ========================================= */
.fat-footer {
    background: linear-gradient(180deg, #0B0F19 0%, #09090B 100%);
    border-top: 1px solid rgba(255, 255, 255, 0.05);
}

/* =========================================
   10. COMMAND CENTER HERO SECTION
   ========================================= */
.hero-section {
    position: relative;
    overflow: hidden;
}

.hero-section::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle at center, rgba(59, 130, 246, 0.03) 0%, transparent 50%);
    animation: rotate 30s linear infinite;
    pointer-events: none;
}

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

.search-bar-integrated {
    background: rgba(15, 23, 42, 0.8);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 16px;
    padding: 6px;
    display: flex;
    align-items: center;
    gap: 8px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

.search-bar-integrated:focus-within {
    border-color: rgba(59, 130, 246, 0.5);
    box-shadow: 0 4px 30px rgba(59, 130, 246, 0.2);
}

/* Empty State Cards */
.empty-state-card {
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.05) 0%, rgba(139, 92, 246, 0.05) 100%);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 16px;
    padding: 24px;
    transition: all 0.3s ease;
}

.empty-state-card:hover {
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.1) 0%, rgba(139, 92, 246, 0.1) 100%);
    border-color: rgba(59, 130, 246, 0.2);
    transform: translateY(-2px);
}

/* Stats Grid */
.stat-card {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 12px;
    padding: 16px;
    text-align: center;
    transition: all 0.2s ease;
}

.stat-card:hover {
    background: rgba(255, 255, 255, 0.05);
    border-color: rgba(59, 130, 246, 0.3);
}

/* Pulse animation for live indicators */
.pulse-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #10B981;
    animation: pulse-dot 2s ease-in-out infinite;
}

@keyframes pulse-dot {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.5; transform: scale(1.2); }
}

/* =========================================
   11. COMMAND CENTER HERO SECTION
   ========================================= */
.command-center {
    position: relative;
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: 2rem;
    background: transparent !important;
}

.hero-section {
    position: relative;
    padding: 2rem 0 1rem;
    text-align: center;
    width: 100%;
}

.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    background: rgba(59, 130, 246, 0.1);
    border: 1px solid rgba(59, 130, 246, 0.2);
    border-radius: 9999px;
    margin-bottom: 1.5rem;
}

.hero-title {
    font-size: clamp(2rem, 5vw, 3.5rem);
    font-weight: 800;
    letter-spacing: -0.02em;
    line-height: 1.1;
    margin-bottom: 1rem;
}

.hero-subtitle {
    font-size: 1.125rem;
    color: rgba(255, 255, 255, 0.5);
    max-width: 600px;
    margin: 0 auto 2rem;
    line-height: 1.6;
}

/* Search Bar Integrated */
.search-container {
    max-width: 800px;
    margin: 0 auto 3rem;
}

.search-bar-hero {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    background: rgba(15, 23, 42, 0.8);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 16px;
    padding: 6px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3), 0 0 0 1px rgba(59, 130, 246, 0.1);
    transition: all 0.3s ease;
}

.search-bar-hero:focus-within {
    border-color: rgba(59, 130, 246, 0.5);
    box-shadow: 0 4px 30px rgba(59, 130, 246, 0.2), 0 0 0 1px rgba(59, 130, 246, 0.3);
}

.search-input-wrapper {
    flex: 1;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0 0.75rem;
}

.search-icon {
    color: rgba(255, 255, 255, 0.4);
    flex-shrink: 0;
}

.search-bar-hero:focus-within .search-icon {
    color: #3B82F6;
}

.search-input {
    flex: 1;
    background: transparent;
    border: none;
    outline: none;
    color: white;
    font-size: 1rem;
    padding: 0.75rem 0;
}

.search-input::placeholder {
    color: rgba(255, 255, 255, 0.3);
}

.search-button {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.875rem 1.5rem;
    background: linear-gradient(135deg, #3B82F6 0%, #2563EB 100%);
    color: white;
    border: none;
    border-radius: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    white-space: nowrap;
}

.search-button:hover {
    transform: translateY(-1px);
    box-shadow: 0 8px 20px rgba(59, 130, 246, 0.4);
}

/* Empty State Cards */
.empty-state-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 1rem;
    width: 100%;
}

.empty-state-card {
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.05) 0%, rgba(139, 92, 246, 0.05) 100%);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 16px;
    padding: 1.5rem;
    transition: all 0.3s ease;
    cursor: pointer;
    width: 100%;
}

.empty-state-card:hover {
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.1) 0%, rgba(139, 92, 246, 0.1) 100%);
    border-color: rgba(59, 130, 246, 0.2);
    transform: translateY(-2px);
}

.empty-state-icon {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.05);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1rem;
    color: rgba(255, 255, 255, 0.6);
    position: relative;
}

.empty-state-card:hover .empty-state-icon {
    background: rgba(59, 130, 246, 0.2);
    color: #3B82F6;
}

.empty-state-title {
    font-weight: 600;
    color: white;
    margin-bottom: 0.5rem;
    font-size: 1rem;
}

.empty-state-desc {
    font-size: 0.875rem;
    color: rgba(255, 255, 255, 0.4);
    line-height: 1.5;
}

/* Force visibility for cards */
.empty-state-grid {
    display: grid !important;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)) !important;
    gap: 1rem !important;
    width: 100% !important;
    visibility: visible !important;
    opacity: 1 !important;
}

/* Hide empty state cards when needed */
.empty-state-grid.hidden {
    display: none !important;
    visibility: hidden !important;
    opacity: 0 !important;
}

.empty-state-card {
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.05) 0%, rgba(139, 92, 246, 0.05) 100%);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 16px;
    padding: 1.5rem;
    transition: all 0.3s ease;
    cursor: pointer;
    width: 100%;
    visibility: visible !important;
    opacity: 1 !important;
    display: block !important;
}

/* Quick Stats */
.quick-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: 1rem;
    margin-bottom: 2rem;
}

.stat-card {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 12px;
    padding: 1rem;
    text-align: center;
    transition: all 0.2s ease;
}

.stat-card:hover {
    background: rgba(255, 255, 255, 0.05);
    border-color: rgba(59, 130, 246, 0.3);
}

.stat-value {
    font-size: 1.5rem;
    font-weight: 700;
    color: white;
    margin-bottom: 0.25rem;
}

/* =========================================
   12. HERO SECTION PREMIUM - LOVABLE/BASE44 STYLE
   ========================================= */
.hero-section-premium {
    position: relative;
    padding: 4rem 0 2rem;
    text-align: center;
    margin-bottom: 3rem;
    overflow: hidden;
    background: transparent !important;
}

.hero-section-premium::before {
    display: none;
}

/* Título Premium */
.hero-title-container {
    position: relative;
    margin-bottom: 3rem;
    background: transparent !important;
}

.hero-title-premium {
    font-size: clamp(2.5rem, 8vw, 5rem);
    font-weight: 900;
    line-height: 1.1;
    letter-spacing: -0.01em;
    margin: 0;
    position: relative;
    z-index: 2;
}

.title-line {
    display: block;
    color: rgba(255, 255, 255, 0.95);
    margin-bottom: 0.25rem;
    padding-top: 0.1rem;
}

.title-highlight {
    display: block;
    background: linear-gradient(135deg, #3B82F6 0%, #8B5CF6 50%, #10B981 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    filter: drop-shadow(0 0 20px rgba(59, 130, 246, 0.3));
}

.title-glow {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 120%;
    height: 120%;
    background: radial-gradient(ellipse at center, rgba(59, 130, 246, 0.15) 0%, transparent 70%);
    filter: blur(40px);
    z-index: 1;
    animation: pulse-glow 4s ease-in-out infinite;
}

@keyframes pulse-glow {
    0%, 100% { opacity: 0.5; transform: translate(-50%, -50%) scale(1); }
    50% { opacity: 0.8; transform: translate(-50%, -50%) scale(1.1); }
}

/* Subtítulo Premium */
.hero-subtitle-container {
    max-width: 700px;
    margin: 0 auto 3rem;
    position: relative;
    z-index: 2;
    background: transparent !important;
}

.hero-subtitle-premium {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    font-size: 1.125rem;
    color: rgba(255, 255, 255, 0.7);
    line-height: 1.6;
    margin-bottom: 1rem;
    transition: all 0.3s ease;
}

.hero-subtitle-premium:hover {
    color: rgba(255, 255, 255, 0.9);
    transform: translateX(4px);
}

.subtitle-icon {
    font-size: 1.25rem;
    opacity: 0.8;
    transition: all 0.3s ease;
    flex-shrink: 0;
}

.hero-subtitle-premium:hover .subtitle-icon {
    opacity: 1;
    transform: scale(1.1);
}

/* Stats Container Premium */
.stats-container-premium {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1rem;
    max-width: 800px;
    margin: 0 auto 3rem;
    position: relative;
    z-index: 2;
}

.stat-card-premium {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 1rem;
    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.08);
    border-radius: 16px;
    backdrop-filter: blur(10px);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

.stat-card-premium::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(59, 130, 246, 0.1), transparent);
    transition: left 0.6s ease;
}

.stat-card-premium:hover::before {
    left: 100%;
}

.stat-card-premium:hover {
    transform: translateY(-4px) scale(1.02);
    border-color: rgba(59, 130, 246, 0.3);
    box-shadow: 0 12px 32px rgba(59, 130, 246, 0.15);
}

.stat-icon-premium {
    width: 40px;
    height: 40px;
    border-radius: 12px;
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.15) 0%, rgba(139, 92, 246, 0.15) 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #3B82F6;
    flex-shrink: 0;
    transition: all 0.3s ease;
}

.stat-card-premium:hover .stat-icon-premium {
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.25) 0%, rgba(139, 92, 246, 0.25) 100%);
    transform: rotate(5deg) scale(1.1);
}

.stat-content {
    flex: 1;
    text-align: left;
}

.stat-value-premium {
    font-size: 1.5rem;
    font-weight: 800;
    color: white;
    margin-bottom: 0.25rem;
    line-height: 1;
}

.stat-label-premium {
    font-size: 0.75rem;
    color: rgba(255, 255, 255, 0.5);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    font-weight: 600;
}

/* Responsive Design */
@media (max-width: 768px) {
    .hero-section-premium {
        padding: 2rem 1rem 1rem;
        margin-bottom: 2rem;
        border-radius: 16px;
    }
    
    .hero-title-premium {
        font-size: clamp(2rem, 6vw, 3rem);
    }
    
    .hero-subtitle-premium {
        font-size: 1rem;
        flex-direction: column;
        text-align: center;
        gap: 0.5rem;
    }
    
    .stats-container-premium {
        grid-template-columns: repeat(2, 1fr);
        gap: 0.75rem;
        max-width: 400px;
    }
    
    .stat-card-premium {
        padding: 0.75rem;
    }
    
    .stat-icon-premium {
        width: 32px;
        height: 32px;
    }
    
    .stat-value-premium {
        font-size: 1.25rem;
    }
}

/* Animações adicionais */
@keyframes float {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-10px); }
}

.hero-section-premium > * {
    animation: fadeInUp 0.8s ease-out forwards;
    opacity: 0;
}

.hero-section-premium > *:nth-child(1) { animation-delay: 0.1s; }
.hero-section-premium > *:nth-child(2) { animation-delay: 0.2s; }
.hero-section-premium > *:nth-child(3) { animation-delay: 0.3s; }

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

/* Audit Loading - Top of Content */
#auditLoading {
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    justify-content: center !important;
    padding: 2rem !important;
    margin-top: 0 !important;
    margin-bottom: 2rem !important;
}

#auditLoading.hidden {
    display: none !important;
}
