/* Reset e Configurações Globais */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary-color: #2563eb;
    --primary-dark: #1e40af;
    --secondary-color: #64748b;
    --success-color: #10b981;
    --danger-color: #ef4444;
    --warning-color: #f59e0b;
    --info-color: #3b82f6;
    --bg-color: #f8fafc;
    --card-bg: #ffffff;
    --text-primary: #1e293b;
    --text-secondary: #64748b;
    --border-color: #e2e8f0;
    --shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px 0 rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: #f8fafc;
    color: var(--text-primary);
    line-height: 1.6;
    min-height: 100vh;
    padding: 0;
    margin: 0;
}

/* Navbar */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: 70px;
    background: linear-gradient(135deg, #1e293b 0%, #0f172a 100%);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    z-index: 1000;
}

.navbar-container {
    max-width: 100%;
    height: 100%;
    padding: 0 30px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 30px;
}

.navbar-brand {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 1.5rem;
    font-weight: 700;
    color: white;
    min-width: 200px;
}

.navbar-brand i {
    font-size: 1.8rem;
    background: linear-gradient(135deg, var(--primary-color), #8b5cf6);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.navbar-menu {
    display: flex;
    align-items: center;
    gap: 8px;
    flex: 1;
}

.nav-link {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    color: rgba(255, 255, 255, 0.7);
    text-decoration: none;
    border-radius: 8px;
    transition: all 0.3s ease;
    font-weight: 500;
    font-size: 0.95rem;
}

.nav-link:hover {
    background: rgba(255, 255, 255, 0.1);
    color: white;
}

.nav-link.active {
    background: linear-gradient(135deg, var(--primary-color), #8b5cf6);
    color: white;
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.3);
}

.nav-link i {
    font-size: 1.1rem;
}

.navbar-info {
    display: flex;
    align-items: center;
    gap: 12px;
}

.navbar-brand-text {
    color: white;
    font-size: 0.9rem;
    font-weight: 600;
    letter-spacing: 0.5px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.navbar-brand-text i {
    color: white;
    font-size: 1rem;
}

.info-badge {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 8px 14px;
    background: transparent;
    border-radius: 20px;
    color: white;
    font-size: 0.85rem;
    font-weight: 500;
    transition: all 0.3s ease;
}

.info-badge:hover {
    background: rgba(255, 255, 255, 0.1);
}

.info-badge i {
    font-size: 0.9rem;
    color: white;
}

.status-badge {
    background: rgba(16, 185, 129, 0.2);
    color: var(--success-color);
    border: 1px solid rgba(16, 185, 129, 0.3);
}

.status-badge i {
    font-size: 0.5rem;
    animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

/* Main Content */
.main-content {
    margin-top: 70px;
    width: 100%;
    min-height: calc(100vh - 70px);
    padding: 30px;
    display: flex;
    flex-direction: column;
}

.container {
    max-width: 100%;
    width: 100%;
    margin: 0;
    flex: 1;
    display: flex;
    flex-direction: column;
}

/* Header */
.header {
    background: var(--card-bg);
    border-radius: 12px;
    padding: 30px;
    margin-bottom: 30px;
    box-shadow: var(--shadow-lg);
    text-align: center;
}

.header-content h1 {
    font-size: 2.5rem;
    color: var(--primary-color);
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 15px;
}

.header-content h1 i {
    font-size: 2.2rem;
}

.header-content p {
    color: var(--text-secondary);
    font-size: 1.1rem;
}

/* Estatísticas */
.stats-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.stat-card {
    background: var(--card-bg);
    border-radius: 12px;
    padding: 25px;
    display: flex;
    align-items: center;
    gap: 20px;
    box-shadow: var(--shadow-lg);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.stat-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
}

.stat-icon {
    width: 60px;
    height: 60px;
    border-radius: 12px;
    background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.8rem;
}

.stat-info h3 {
    font-size: 1.8rem;
    color: var(--text-primary);
    margin-bottom: 5px;
}

.stat-info p {
    color: var(--text-secondary);
    font-size: 0.9rem;
}

/* Dashboard Header */
.dashboard-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 16px;
    padding: clamp(25px, 4vw, 40px);
    margin-bottom: 30px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 10px 30px rgba(102, 126, 234, 0.3);
    color: white;
    flex-wrap: wrap;
    gap: 20px;
}

.dashboard-header h1 {
    font-size: clamp(1.6rem, 3vw, 2.2rem);
    margin-bottom: 8px;
    display: flex;
    align-items: center;
    gap: 15px;
}

.dashboard-header p {
    font-size: clamp(0.9rem, 1.5vw, 1rem);
    opacity: 0.9;
}

.dashboard-actions {
    display: flex;
    gap: 12px;
}

/* Highlight Stats Cards */
.highlight-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.highlight-card {
    background: white;
    border-radius: 16px;
    padding: 30px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    display: flex;
    align-items: center;
    gap: 25px;
    transition: all 0.3s ease;
    border: 2px solid transparent;
    position: relative;
    overflow: hidden;
}

.highlight-card::before {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    width: 100px;
    height: 100px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    transform: translate(30%, -30%);
}

.highlight-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 12px 35px rgba(0, 0, 0, 0.15);
}

.highlight-icon {
    width: 80px;
    height: 80px;
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2.5rem;
    color: white;
    flex-shrink: 0;
}

.primary-card .highlight-icon {
    background: linear-gradient(135deg, #667eea, #764ba2);
}

.warning-card .highlight-icon {
    background: linear-gradient(135deg, #f59e0b, #d97706);
}

.danger-card .highlight-icon {
    background: linear-gradient(135deg, #ef4444, #dc2626);
}

.highlight-info {
    flex: 1;
}

.highlight-label {
    display: block;
    font-size: 0.9rem;
    color: var(--text-secondary);
    margin-bottom: 8px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.highlight-value {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--text-primary);
    margin: 0 0 8px 0;
    line-height: 1;
}

.highlight-trend {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 0.85rem;
    color: var(--text-secondary);
    padding: 4px 12px;
    background: #f1f5f9;
    border-radius: 20px;
}

/* MELHORIA 1: Alertas Críticos */
.alerts-section {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
    margin-bottom: 30px;
}

.alert-card {
    background: white;
    border-radius: 12px;
    padding: 20px;
    display: flex;
    align-items: center;
    gap: 15px;
    box-shadow: var(--shadow-lg);
    border-left: 4px solid;
    transition: all 0.3s ease;
}

.alert-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 12px 28px rgba(0, 0, 0, 0.15);
}

.critical-alert {
    border-color: #dc2626;
    animation: pulse-critical 2s ease-in-out infinite;
}

.critical-alert .alert-icon {
    background: linear-gradient(135deg, rgba(220, 38, 38, 0.1), rgba(220, 38, 38, 0.2));
    color: #dc2626;
}

@keyframes pulse-critical {
    0%, 100% { box-shadow: 0 4px 12px rgba(220, 38, 38, 0.2); }
    50% { box-shadow: 0 4px 20px rgba(220, 38, 38, 0.4); }
}

.high-alert {
    border-color: #f59e0b;
}

.high-alert .alert-icon {
    background: linear-gradient(135deg, rgba(245, 158, 11, 0.1), rgba(245, 158, 11, 0.2));
    color: #f59e0b;
}

.medium-alert {
    border-color: #3b82f6;
}

.medium-alert .alert-icon {
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.1), rgba(59, 130, 246, 0.2));
    color: #3b82f6;
}

.status-alert {
    border-color: #10b981;
}

.status-alert .alert-icon {
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.1), rgba(16, 185, 129, 0.2));
    color: #10b981;
}

.alert-icon {
    width: 50px;
    height: 50px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    flex-shrink: 0;
}

.alert-content {
    flex: 1;
}

.alert-label {
    display: block;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--text-secondary);
    margin-bottom: 4px;
}

.alert-value {
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--text-primary);
    margin: 0 0 4px 0;
    line-height: 1;
}

.alert-desc {
    font-size: 0.8rem;
    color: var(--text-secondary);
}

/* MELHORIA 2 e 3: Insights (Taxa de Bloqueio + Comparação) */
.insights-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.insight-card {
    background: white;
    border-radius: 12px;
    padding: 25px;
    box-shadow: var(--shadow-lg);
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
    min-height: 400px;
}

.insight-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 12px 28px rgba(0, 0, 0, 0.12);
}

.insight-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 2px solid #f1f5f9;
}

.insight-header h3 {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 0;
}

.insight-header i {
    color: var(--primary-color);
}

.insight-badge {
    background: linear-gradient(135deg, var(--primary-color), #5b21b6);
    color: white;
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 0.9rem;
    font-weight: 700;
}

.insight-body {
    display: flex;
    flex-direction: column;
    gap: 15px;
    flex: 1;
}

.protection-description {
    padding: 15px;
    background: linear-gradient(135deg, #f0f9ff, #e0f2fe);
    border-radius: 10px;
    border-left: 4px solid var(--primary-color);
}

.protection-description p {
    margin: 0;
    color: var(--text-primary);
    font-size: 0.95rem;
    line-height: 1.5;
}

.protection-description strong {
    color: var(--primary-color);
    font-size: 1.2rem;
}

.protection-stats {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
}

.protection-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 15px;
    border-radius: 10px;
    transition: all 0.3s ease;
}

.protection-item:hover {
    transform: translateX(5px);
}

.protection-item.blocked {
    background: linear-gradient(135deg, rgba(220, 38, 38, 0.05), rgba(220, 38, 38, 0.1));
}

.protection-item.blocked i {
    color: #dc2626;
    font-size: 1.5rem;
}

.protection-item.allowed {
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.05), rgba(16, 185, 129, 0.1));
}

.protection-item.allowed i {
    color: #10b981;
    font-size: 1.5rem;
}

.protection-item strong {
    display: block;
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-primary);
}

.protection-item span {
    font-size: 0.85rem;
    color: var(--text-secondary);
}

.traffic-bars {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.traffic-bar-item {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.traffic-bar-label {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.9rem;
}

.traffic-bar-label span {
    color: var(--text-primary);
    font-weight: 600;
}

.traffic-bar-label strong {
    color: var(--primary-color);
    font-size: 1rem;
}

.progress-label {
    text-align: center;
    color: var(--text-secondary);
    font-size: 0.9rem;
    font-weight: 600;
}

.comparison-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px;
    background: #f8fafc;
    border-radius: 10px;
    transition: all 0.3s ease;
}

.comparison-item:hover {
    background: #e2e8f0;
}

.comparison-label {
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 600;
    color: var(--text-primary);
}

.comparison-label i {
    color: var(--primary-color);
}

.comparison-value {
    font-weight: 700;
    font-size: 1.1rem;
}

.trend-up {
    color: #dc2626;
    display: flex;
    align-items: center;
    gap: 5px;
}

.trend-down {
    color: #10b981;
    display: flex;
    align-items: center;
    gap: 5px;
}

.trend-neutral {
    color: #64748b;
    display: flex;
    align-items: center;
    gap: 5px;
}

.comparison-summary {
    margin-top: auto;
    text-align: center;
    color: var(--text-secondary);
    font-size: 0.85rem;
    background: #f8fafc;
    padding: 12px 15px;
    border-radius: 8px;
    font-weight: 500;
    border-top: 2px solid #e2e8f0;
}

/* MELHORIA 4: Últimos Ataques */
.latest-attacks-section {
    margin-bottom: 30px;
    width: 100%;
    max-width: 100%;
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.section-header h2 {
    font-size: 1.4rem;
    font-weight: 700;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    gap: 12px;
    margin: 0;
}

.section-header h2 i {
    color: var(--primary-color);
}

.view-all-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    background: linear-gradient(135deg, var(--primary-color), #5b21b6);
    color: white;
    text-decoration: none;
    border-radius: 8px;
    font-weight: 600;
    font-size: 0.9rem;
    transition: all 0.3s ease;
}

.view-all-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.3);
}

.attacks-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 15px;
}

@media (max-width: 1600px) {
    .attacks-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 1200px) {
    .attacks-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .attacks-grid {
        grid-template-columns: 1fr;
    }
}

.attack-card {
    background: white;
    border-radius: 12px;
    padding: 18px;
    box-shadow: var(--shadow-lg);
    border-left: 4px solid var(--primary-color);
    transition: all 0.3s ease;
    min-width: 0;
}

.attack-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 12px 28px rgba(0, 0, 0, 0.12);
}

.attack-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
    padding-bottom: 12px;
    border-bottom: 1px solid #f1f5f9;
}

.attack-time {
    font-size: 0.75rem;
    color: var(--text-secondary);
    display: flex;
    align-items: center;
    gap: 5px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.attack-status {
    padding: 4px 12px;
    border-radius: 15px;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    display: flex;
    align-items: center;
    gap: 5px;
}

.attack-status.blocked {
    background: linear-gradient(135deg, #dc2626, #991b1b);
    color: white;
}

.attack-status.allowed {
    background: linear-gradient(135deg, #10b981, #059669);
    color: white;
}

.attack-details {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
}

.attack-ip {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.9rem;
    color: var(--text-primary);
    overflow: hidden;
}

.attack-ip i {
    color: var(--primary-color);
    flex-shrink: 0;
}

.attack-ip strong {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.attack-metrics {
    display: flex;
    gap: 10px;
    margin-top: 10px;
    flex-wrap: wrap;
}

.metric-small {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 6px 10px;
    background: #f8fafc;
    border-radius: 8px;
    font-size: 0.8rem;
    color: var(--text-secondary);
    flex: 1;
    min-width: 0;
}

.metric-small i {
    color: var(--primary-color);
    flex-shrink: 0;
}

.metric-small span {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Metrics Grid */
.metrics-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 16px;
    margin-bottom: 30px;
}

.metric-card {
    background: white;
    border-radius: 12px;
    padding: 25px;
    box-shadow: var(--shadow-lg);
    transition: all 0.3s ease;
    border-left: 4px solid var(--primary-color);
}

.metric-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 28px rgba(0, 0, 0, 0.12);
}

.metric-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 15px;
    color: var(--primary-color);
    font-weight: 700;
    font-size: 1rem;
}

.metric-header i {
    font-size: 1.3rem;
}

.metric-value {
    font-size: 2rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 8px;
}

.metric-label {
    font-size: 0.85rem;
    color: var(--text-secondary);
}

/* Analysis Grid */
.analysis-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.analysis-card {
    background: white;
    border-radius: 16px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    overflow: hidden;
    transition: all 0.3s ease;
}

.analysis-card:hover {
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.12);
}

.analysis-header {
    background: linear-gradient(135deg, #f8fafc, #e2e8f0);
    padding: 20px 25px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 2px solid #e2e8f0;
}

.analysis-header h3 {
    margin: 0;
    font-size: 1.2rem;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    gap: 10px;
}

.analysis-badge {
    background: var(--primary-color);
    color: white;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
}

.analysis-content {
    padding: 25px;
}

/* Traffic Distribution */
.traffic-item {
    margin-bottom: 20px;
}

.traffic-item:last-child {
    margin-bottom: 0;
}

.traffic-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
}

.traffic-stats {
    display: flex;
    align-items: baseline;
    gap: 8px;
}

.traffic-stats strong {
    font-size: 1.3rem;
    color: var(--text-primary);
}

.traffic-stats span {
    font-size: 0.9rem;
    color: var(--text-secondary);
}

.progress-bar {
    height: 12px;
    background: #e2e8f0;
    border-radius: 10px;
    overflow: hidden;
    position: relative;
}

.progress-fill {
    height: 100%;
    border-radius: 10px;
    transition: width 0.6s ease;
    position: relative;
}

.progress-fill::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    bottom: 0;
    right: 0;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
    animation: shimmer 2s infinite;
}

@keyframes shimmer {
    0% { transform: translateX(-100%); }
    100% { transform: translateX(100%); }
}

/* IP Ranking */
.ip-rank-item {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 15px;
    background: linear-gradient(135deg, #f8fafc, #ffffff);
    border-radius: 12px;
    margin-bottom: 12px;
    transition: all 0.3s ease;
    border: 2px solid transparent;
}

.ip-rank-item:hover {
    border-color: var(--primary-color);
    transform: translateX(5px);
    box-shadow: 0 4px 15px rgba(37, 99, 235, 0.1);
}

.rank-badge {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 1.2rem;
    color: white;
    flex-shrink: 0;
}

.rank-1 {
    background: linear-gradient(135deg, #fbbf24, #f59e0b);
    box-shadow: 0 4px 15px rgba(251, 191, 36, 0.4);
}

.rank-2 {
    background: linear-gradient(135deg, #94a3b8, #64748b);
    box-shadow: 0 4px 15px rgba(148, 163, 184, 0.4);
}

.rank-3 {
    background: linear-gradient(135deg, #fb923c, #f97316);
    box-shadow: 0 4px 15px rgba(251, 146, 60, 0.4);
}

.rank-4, .rank-5 {
    background: linear-gradient(135deg, #667eea, #764ba2);
}

.ip-info {
    flex: 1;
}

.ip-address {
    font-weight: 600;
    font-size: 1rem;
    color: var(--text-primary);
    margin-bottom: 4px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.ip-attacks {
    font-size: 0.85rem;
    color: var(--text-secondary);
}

.ip-indicator {
    font-size: 1.5rem;
    color: var(--danger-color);
    opacity: 0.3;
}

.no-data-simple {
    text-align: center;
    padding: 30px;
    color: var(--text-secondary);
}

.no-data-simple i {
    font-size: 2.5rem;
    margin-bottom: 10px;
    opacity: 0.5;
}

.no-data-simple p {
    margin: 0;
}

/* Recent Activity Timeline */
.recent-activity {
    background: white;
    border-radius: 16px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    overflow: hidden;
    margin-bottom: 30px;
}

.activity-header {
    background: linear-gradient(135deg, #f8fafc, #e2e8f0);
    padding: 25px 30px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 2px solid #e2e8f0;
}

.activity-header h2 {
    margin: 0;
    font-size: 1.5rem;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    gap: 12px;
}

.view-all-link {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: all 0.3s ease;
}

.view-all-link:hover {
    gap: 12px;
    color: var(--primary-dark);
}

.activity-list {
    padding: 30px;
}

.activity-item {
    display: flex;
    gap: 20px;
    position: relative;
}

.activity-timeline {
    display: flex;
    flex-direction: column;
    align-items: center;
    position: relative;
}

.timeline-dot {
    width: 16px;
    height: 16px;
    background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
    border-radius: 50%;
    border: 3px solid white;
    box-shadow: 0 0 0 3px #e2e8f0;
    z-index: 2;
    flex-shrink: 0;
}

.timeline-line {
    width: 2px;
    flex: 1;
    background: linear-gradient(180deg, #e2e8f0, transparent);
    margin-top: 8px;
    min-height: 50px;
}

.activity-content {
    flex: 1;
    padding-bottom: 30px;
}

.activity-main {
    margin-bottom: 15px;
}

.activity-title {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
    margin-bottom: 8px;
}

.activity-time {
    font-size: 0.9rem;
    color: var(--text-secondary);
    display: flex;
    align-items: center;
    gap: 6px;
}

.activity-details {
    display: flex;
    gap: 20px;
    flex-wrap: wrap;
    padding: 15px;
    background: #f8fafc;
    border-radius: 10px;
    border-left: 3px solid var(--primary-color);
    margin-bottom: 12px;
}

.detail-item {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 0.9rem;
    color: var(--text-primary);
}

.detail-item i {
    color: var(--primary-color);
}

.detail-item strong {
    margin-left: 4px;
    margin-right: 4px;
}

.activity-description {
    font-size: 0.9rem;
    color: var(--text-secondary);
    line-height: 1.6;
    padding: 12px;
    background: white;
    border-radius: 8px;
    border: 1px solid #e2e8f0;
    display: flex;
    gap: 8px;
}

.activity-description i {
    color: var(--info-color);
    margin-top: 2px;
    flex-shrink: 0;
}

.activity-footer {
    padding: 20px 30px;
    background: #f8fafc;
    text-align: center;
    border-top: 1px solid #e2e8f0;
}

/* Logs Page Professional Layout */
.logs-page-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 30px 0;
    margin-bottom: 30px;
    border-bottom: 2px solid #e2e8f0;
}

.page-title h1 {
    font-size: 2rem;
    font-weight: 700;
    color: var(--text-primary);
    margin: 0 0 8px 0;
}

.page-title p {
    font-size: 1rem;
    color: var(--text-secondary);
    margin: 0;
}

.page-info {
    display: flex;
    gap: 15px;
}

.info-badge {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 18px;
    background: white;
    border-radius: 10px;
    border: 2px solid #e2e8f0;
    font-weight: 600;
    color: var(--text-primary);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
}

.info-badge i {
    color: var(--primary-color);
    font-size: 1.1rem;
}

/* Search & Filter Bar */
.search-filter-bar {
    background: white;
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 25px;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.06);
    border: 1px solid #e2e8f0;
}

.compact-filter-form {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    align-items: center;
}

.search-group {
    flex: 1;
    min-width: 250px;
    position: relative;
    display: flex;
    align-items: center;
}

.search-group i {
    position: absolute;
    left: 15px;
    color: var(--text-secondary);
    font-size: 1rem;
}

.search-group input {
    width: 100%;
    padding: 12px 15px 12px 45px;
    border: 2px solid #e2e8f0;
    border-radius: 10px;
    font-size: 0.95rem;
    transition: all 0.3s ease;
    background: #f8fafc;
}

.search-group input:focus {
    outline: none;
    border-color: var(--primary-color);
    background: white;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.filter-group-compact {
    min-width: 140px;
}

.filter-group-compact input,
.filter-group-compact select {
    width: 100%;
    padding: 12px 15px;
    border: 2px solid #e2e8f0;
    border-radius: 10px;
    font-size: 0.9rem;
    transition: all 0.3s ease;
    background: #f8fafc;
}

.filter-group-compact input:focus,
.filter-group-compact select:focus {
    outline: none;
    border-color: var(--primary-color);
    background: white;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.action-buttons {
    display: flex;
    gap: 8px;
}

.btn-filter {
    padding: 12px 24px;
    background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
    color: white;
    border: none;
    border-radius: 10px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 8px;
}

.btn-filter:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(37, 99, 235, 0.3);
}

.btn-clear {
    padding: 12px 16px;
    background: #f1f5f9;
    color: var(--text-secondary);
    border: none;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
}

.btn-clear:hover {
    background: #e2e8f0;
    color: var(--text-primary);
}

/* Quick Stats Grid */
.quick-stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 16px;
    margin-bottom: 25px;
    animation: fadeInUp 0.5s ease;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.quick-stat-card {
    background: white;
    border-radius: 12px;
    padding: 20px;
    display: flex;
    align-items: center;
    gap: 16px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
    border: 2px solid transparent;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    animation: fadeInUp 0.6s ease backwards;
}

.quick-stat-card:nth-child(1) { animation-delay: 0.1s; }
.quick-stat-card:nth-child(2) { animation-delay: 0.15s; }
.quick-stat-card:nth-child(3) { animation-delay: 0.2s; }
.quick-stat-card:nth-child(4) { animation-delay: 0.25s; }
.quick-stat-card:nth-child(5) { animation-delay: 0.3s; }
.quick-stat-card:nth-child(6) { animation-delay: 0.35s; }

.quick-stat-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 4px;
    height: 100%;
    opacity: 1;
    transition: all 0.3s ease;
}

.quick-stat-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.1);
}

.quick-stat-card:hover::before {
    width: 100%;
    opacity: 0.05;
}

.stat-icon-wrapper {
    width: 50px;
    height: 50px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.4rem;
    flex-shrink: 0;
}

.stat-content {
    flex: 1;
}

.stat-label {
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--text-secondary);
    margin-bottom: 4px;
}

.stat-value {
    font-size: 1.6rem;
    font-weight: 700;
    color: var(--text-primary);
    line-height: 1;
}

/* Stat Color Variants */
.stat-primary::before {
    background: var(--primary-color);
}

.stat-primary .stat-icon-wrapper {
    background: linear-gradient(135deg, rgba(37, 99, 235, 0.1), rgba(37, 99, 235, 0.2));
    color: var(--primary-color);
}

.stat-danger::before {
    background: #ef4444;
}

.stat-danger .stat-icon-wrapper {
    background: linear-gradient(135deg, rgba(239, 68, 68, 0.1), rgba(239, 68, 68, 0.2));
    color: #ef4444;
}

.stat-success::before {
    background: #10b981;
}

.stat-success .stat-icon-wrapper {
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.1), rgba(16, 185, 129, 0.2));
    color: #10b981;
}

.stat-info::before {
    background: var(--info-color);
}

.stat-info .stat-icon-wrapper {
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.1), rgba(59, 130, 246, 0.2));
    color: var(--info-color);
}

.stat-warning::before {
    background: #f59e0b;
}

.stat-warning .stat-icon-wrapper {
    background: linear-gradient(135deg, rgba(245, 158, 11, 0.1), rgba(245, 158, 11, 0.2));
    color: #f59e0b;
}

.stat-purple::before {
    background: #8b5cf6;
}

.stat-purple .stat-icon-wrapper {
    background: linear-gradient(135deg, rgba(139, 92, 246, 0.1), rgba(139, 92, 246, 0.2));
    color: #8b5cf6;
}

/* Logs Table Wrapper */
.logs-table-wrapper {
    background: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.06);
    border: 1px solid #e2e8f0;
}

.table-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 25px;
    background: linear-gradient(135deg, #f8fafc, #ffffff);
    border-bottom: 2px solid #e2e8f0;
}

.table-header-content h3 {
    margin: 0 0 6px 0;
    font-size: 1.2rem;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    gap: 10px;
}

.table-header-content h3 i {
    color: var(--primary-color);
}

.result-count {
    font-size: 0.85rem;
    color: var(--text-secondary);
    font-weight: 500;
}

.table-actions {
    display: flex;
    gap: 8px;
}

.btn-table-action {
    width: 40px;
    height: 40px;
    border: 2px solid #e2e8f0;
    background: white;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-secondary);
    font-size: 1rem;
}

.btn-table-action:hover {
    background: var(--primary-color);
    border-color: var(--primary-color);
    color: white;
    transform: scale(1.05);
}

/* Filtros */
.filters-container {
    background: var(--card-bg);
    border-radius: 12px;
    padding: 25px;
    margin-bottom: 30px;
    box-shadow: var(--shadow-lg);
}

.filters-container h2 {
    color: var(--text-primary);
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 1.5rem;
}

.filters-form {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.filter-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
}

.filter-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.filter-group label {
    font-weight: 600;
    color: var(--text-primary);
    font-size: 0.9rem;
}

.filter-group input,
.filter-group select {
    padding: 10px 15px;
    border: 2px solid var(--border-color);
    border-radius: 8px;
    font-size: 0.95rem;
    transition: border-color 0.3s ease;
    background: white;
}

.filter-group input:focus,
.filter-group select:focus {
    outline: none;
    border-color: var(--primary-color);
}

.filter-buttons {
    display: flex;
    align-items: flex-end;
    gap: 10px;
}

/* Botões */
.btn {
    padding: 10px 20px;
    border: none;
    border-radius: 8px;
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    text-decoration: none;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
    color: white;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.4);
}

.btn-secondary {
    background: var(--secondary-color);
    color: white;
}

.btn-secondary:hover {
    background: #475569;
    transform: translateY(-2px);
}

.btn-details {
    padding: 8px 16px;
    background: linear-gradient(135deg, var(--info-color), #2563eb);
    color: white;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-size: 0.85rem;
    font-weight: 600;
    transition: all 0.2s ease;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    box-shadow: 0 2px 6px rgba(59, 130, 246, 0.2);
}

.btn-details:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.3);
}

/* Tabela */
.table-container {
    background: var(--card-bg);
    border-radius: 12px;
    padding: 25px;
    margin-bottom: 30px;
    box-shadow: var(--shadow-lg);
}

.table-container h2 {
    color: var(--text-primary);
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 1.5rem;
}

.table-responsive {
    overflow-x: auto;
}

.logs-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    font-size: 0.9rem;
}

.logs-table thead {
    background: #f8fafc;
}

.logs-table th {
    padding: 16px 14px;
    text-align: left;
    font-weight: 700;
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--text-secondary);
    border-bottom: 2px solid #e2e8f0;
    white-space: nowrap;
}

.logs-table th i {
    color: var(--primary-color);
    font-size: 0.9rem;
    margin-right: 6px;
    opacity: 0.7;
}

.logs-table tbody tr {
    border-bottom: 1px solid #f1f5f9;
    transition: all 0.2s ease;
}

.logs-table tbody tr:hover {
    background-color: #fafbfc;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
}

.logs-table tbody tr:last-child {
    border-bottom: none;
}

.logs-table td {
    padding: 16px 14px;
    color: var(--text-primary);
    font-size: 0.9rem;
}

.logs-table td:first-child {
    font-weight: 700;
    color: var(--text-secondary);
    font-family: 'Courier New', monospace;
}

.logs-table .nowrap {
    white-space: nowrap;
}

.logs-table .number {
    text-align: right;
    font-weight: 700;
    color: var(--primary-color);
    font-family: 'Courier New', monospace;
    font-size: 0.95rem;
}

.logs-table code {
    background: linear-gradient(135deg, #f1f5f9, #e2e8f0);
    padding: 6px 12px;
    border-radius: 8px;
    font-size: 0.8rem;
    color: #6d28d9;
    font-weight: 600;
    border: 1px solid #e2e8f0;
    font-family: 'Courier New', monospace;
    letter-spacing: 0.5px;
}

.ips-column {
    max-width: 200px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-family: 'Courier New', monospace;
    font-size: 0.85rem;
    color: var(--text-secondary);
}

.details-column {
    text-align: center;
}

/* IP Icon Styling */
.logs-table td i.fa-network-wired {
    color: var(--primary-color);
    margin-right: 6px;
    font-size: 0.9rem;
}

/* Badges */
.badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 600;
    white-space: nowrap;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
    transition: all 0.2s ease;
}

.badge:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.15);
}

.badge-action {
    background: linear-gradient(135deg, #8b5cf6, #6d28d9);
    color: white;
}

.badge-incoming {
    background: linear-gradient(135deg, #ef4444, #dc2626);
    color: white;
}

.badge-outcoming,
.badge-outgoing {
    background: linear-gradient(135deg, #f97316, #ea580c);
    color: white;
    box-shadow: 0 2px 8px rgba(249, 115, 22, 0.3);
}

.badge i {
    font-size: 0.9rem;
}

/* Paginação */
.pagination {
    display: flex;
    justify-content: center;
    gap: 6px;
    flex-wrap: wrap;
    padding: 25px 20px;
    background: #f8fafc;
    border-top: 1px solid #e2e8f0;
}

.page-link {
    min-width: 40px;
    height: 40px;
    padding: 0 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px solid #e2e8f0;
    border-radius: 10px;
    color: var(--text-primary);
    text-decoration: none;
    transition: all 0.2s ease;
    font-weight: 600;
    font-size: 0.9rem;
    background: white;
}

.page-link:hover {
    background: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
    transform: scale(1.05);
}

.page-link.active {
    background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
    color: white;
    border-color: var(--primary-color);
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.3);
}

/* No Data */
.no-data {
    text-align: center;
    padding: 80px 20px;
    color: var(--text-secondary);
    background: linear-gradient(135deg, #f8fafc, #ffffff);
}

.no-data i {
    font-size: 5rem;
    margin-bottom: 20px;
    opacity: 0.3;
    color: var(--primary-color);
}

.no-data p {
    font-size: 1.1rem;
    font-weight: 500;
    margin: 0;
}

/* Modal */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(5px);
}

.modal-content {
    background-color: var(--card-bg);
    margin: 5% auto;
    padding: 0;
    border-radius: 12px;
    width: 90%;
    max-width: 600px;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
    animation: slideIn 0.3s ease;
}

@keyframes slideIn {
    from {
        transform: translateY(-50px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.modal-header {
    padding: 20px 25px;
    border-bottom: 2px solid var(--border-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
    border-radius: 12px 12px 0 0;
    color: white;
}

.modal-header h3 {
    margin: 0;
    display: flex;
    align-items: center;
    gap: 10px;
}

.close {
    color: white;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
    transition: transform 0.3s ease;
}

.close:hover {
    transform: rotate(90deg);
}

.modal-body {
    padding: 30px;
    max-height: 70vh;
    overflow-y: auto;
    line-height: 1.8;
}

/* Scrollbar customizado para modal */
.modal-body::-webkit-scrollbar {
    width: 12px;
}

.modal-body::-webkit-scrollbar-track {
    background: #f1f5f9;
    border-radius: 10px;
}

.modal-body::-webkit-scrollbar-thumb {
    background: linear-gradient(135deg, #8b5cf6, #6d28d9);
    border-radius: 10px;
    border: 2px solid #f1f5f9;
}

.modal-body::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(135deg, #7c3aed, #5b21b6);
}

/* AI Analysis Button */
.btn-ai-analyze {
    background: linear-gradient(135deg, #8b5cf6, #6d28d9);
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 0.85rem;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(139, 92, 246, 0.3);
}

.btn-ai-analyze:hover {
    background: linear-gradient(135deg, #7c3aed, #5b21b6);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(139, 92, 246, 0.4);
}

.btn-ai-analyze i {
    font-size: 1rem;
}

.ai-column {
    text-align: center;
}

/* AI Modal Styles */
.ai-modal {
    max-width: 1200px;
    width: 95%;
    max-height: 90vh;
}

.ai-modal-header {
    background: linear-gradient(135deg, #8b5cf6, #6d28d9);
}

.ai-modal-header h3 {
    font-size: 1.3rem;
}

.ai-loading {
    text-align: center;
    padding: 60px 30px;
}

.loading-spinner {
    border: 4px solid #f3f4f6;
    border-top: 4px solid #8b5cf6;
    border-radius: 50%;
    width: 60px;
    height: 60px;
    animation: spin 1s linear infinite;
    margin: 0 auto 20px;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.ai-loading p {
    font-size: 1.1rem;
    color: var(--text-primary);
    font-weight: 600;
    margin: 10px 0;
}

.loading-subtext {
    font-size: 0.9rem !important;
    color: var(--text-secondary) !important;
    font-weight: 400 !important;
}

/* AI Result Styles */
.ai-result {
    padding: 10px 0;
}

.ai-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    padding: 20px;
    background: linear-gradient(135deg, #f8fafc, #e2e8f0);
    border-radius: 12px;
    border: 1px solid #e2e8f0;
}

.ai-badge {
    padding: 12px 24px;
    border-radius: 30px;
    font-weight: 700;
    font-size: 1.05rem;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    text-transform: uppercase;
    letter-spacing: 1px;
    animation: pulse-badge 2s ease-in-out infinite;
}

@keyframes pulse-badge {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.05);
    }
}

.severity-critical {
    background: linear-gradient(135deg, #dc2626, #991b1b);
    color: white;
    box-shadow: 0 4px 12px rgba(220, 38, 38, 0.3);
}

.severity-high {
    background: linear-gradient(135deg, #f59e0b, #d97706);
    color: white;
    box-shadow: 0 4px 12px rgba(245, 158, 11, 0.3);
}

.severity-medium {
    background: linear-gradient(135deg, #3b82f6, #2563eb);
    color: white;
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.3);
}

.severity-low {
    background: linear-gradient(135deg, #10b981, #059669);
    color: white;
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.3);
}

.ai-timestamp {
    color: var(--text-secondary);
    font-size: 1rem;
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 600;
    background: white;
    padding: 8px 16px;
    border-radius: 20px;
    border: 1px solid #e2e8f0;
}

.ai-timestamp i {
    color: var(--primary-color);
}

.ai-analysis,
.ai-recommendations {
    background: #f8fafc;
    border-radius: 12px;
    padding: 25px 30px;
    margin-bottom: 25px;
    border-left: 4px solid #8b5cf6;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.ai-analysis h4,
.ai-recommendations h4 {
    color: var(--text-primary);
    font-size: 1.2rem;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 12px;
    font-weight: 700;
}

.ai-analysis h4 i {
    color: #8b5cf6;
    font-size: 1.2rem;
}

.ai-recommendations h4 i {
    color: #f59e0b;
    font-size: 1.2rem;
}

.ai-content {
    color: var(--text-primary);
    line-height: 1.9;
    font-size: 1rem;
}

.ai-content p {
    margin-bottom: 12px;
}

.ai-footer {
    text-align: center;
    padding: 15px;
    color: var(--text-secondary);
    font-size: 0.85rem;
    font-style: italic;
    border-top: 1px solid #e2e8f0;
    margin-top: 20px;
}

.ai-footer i {
    color: #8b5cf6;
}

/* Modal Info Top */
.modal-info-top {
    background: linear-gradient(135deg, #f8fafc, #e2e8f0);
    padding: 25px;
    border-radius: 12px;
    margin-bottom: 20px;
    border: 1px solid #e2e8f0;
}

.modal-info-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
    margin-bottom: 20px;
}

.modal-info-box {
    background: white;
    padding: 15px;
    border-radius: 8px;
    box-shadow: 0 2px 6px rgba(0,0,0,0.05);
}

.modal-info-box label {
    display: block;
    color: #64748b;
    font-size: 0.85rem;
    font-weight: 600;
    margin-bottom: 8px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.modal-info-box label i {
    color: #8b5cf6;
    margin-right: 5px;
}

.modal-info-value {
    font-size: 1.1rem;
    font-weight: 700;
    color: #1e293b;
}

.modal-problema-principal {
    background: linear-gradient(135deg, #dc2626, #991b1b);
    color: white;
    padding: 18px 20px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    gap: 15px;
    font-size: 1.1rem;
    animation: pulse 2s ease-in-out infinite;
}

.modal-problema-principal i {
    font-size: 1.5rem;
}

.modal-problema-principal strong {
    display: block;
    font-size: 1.2rem;
}

.problema-desc {
    font-size: 0.95rem;
    opacity: 0.9;
    display: block;
    margin-top: 5px;
}

/* Modal Explicação */
.modal-explicacao {
    background: #fffbeb;
    border-left: 4px solid #f59e0b;
    padding: 20px 25px;
    margin-bottom: 20px;
    border-radius: 8px;
    font-size: 1rem;
    line-height: 1.8;
    color: #78350f;
}

.modal-explicacao strong {
    color: #92400e;
}

/* Modal Ocorrências */
.modal-ocorrencias {
    background: #f8fafc;
    padding: 20px 25px;
    border-radius: 12px;
    margin-top: 20px;
    border: 1px solid #e2e8f0;
}

.modal-ocorrencias h4 {
    color: #1e293b;
    font-size: 1.1rem;
    margin-bottom: 15px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.modal-ocorrencias h4 i {
    color: #8b5cf6;
}

.ocorrencia-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.ocorrencia-row {
    background: white;
    padding: 12px 15px;
    border-radius: 8px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-left: 3px solid #8b5cf6;
    transition: all 0.3s;
}

.ocorrencia-row:hover {
    background: #e2e8f0;
    transform: translateX(5px);
}

.ocorrencia-label {
    font-weight: 600;
    color: #475569;
    min-width: 150px;
}

.ocorrencia-value {
    color: #1e293b;
    font-weight: 500;
    text-align: right;
    flex: 1;
}

.ocorrencia-value code {
    background: #e2e8f0;
    padding: 4px 10px;
    border-radius: 6px;
    font-size: 0.9rem;
}

.mini-badge {
    padding: 4px 12px;
    border-radius: 15px;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
}

.mini-badge.badge-block,
.mini-badge.badge-ban {
    background: #dc2626;
    color: white;
}

.mini-badge.badge-allow,
.mini-badge.badge-unban {
    background: #10b981;
    color: white;
}

/* Modal IPs do Ataque */
.modal-ips-ataque {
    background: #f0f9ff;
    padding: 20px 25px;
    border-radius: 12px;
    margin-top: 20px;
    border: 1px solid #bae6fd;
    border-left: 4px solid #0284c7;
}

.modal-ips-ataque h4 {
    color: #0c4a6e;
    font-size: 1.1rem;
    margin-bottom: 15px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.modal-ips-ataque h4 i {
    color: #0284c7;
}

.ips-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 10px;
}

.ip-item {
    background: white;
    padding: 12px 15px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    gap: 10px;
    border: 1px solid #e0f2fe;
    transition: all 0.3s;
}

.ip-item:hover {
    background: #e0f2fe;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(2, 132, 199, 0.15);
}

.ip-item i {
    font-size: 0.5rem;
}

.ip-address {
    flex: 1;
    font-family: 'Courier New', monospace;
    font-weight: 600;
    color: #0c4a6e;
    font-size: 0.95rem;
}

.ip-index {
    background: #0284c7;
    color: white;
    padding: 2px 8px;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 700;
}

.ip-item-empty {
    color: #64748b;
    font-style: italic;
    padding: 20px;
    text-align: center;
}

/* Modal Detalhes Técnicos */
.modal-detalhes-tecnicos {
    background: #f5f3ff;
    padding: 20px 25px;
    border-radius: 12px;
    margin-top: 20px;
    border: 1px solid #e9d5ff;
    border-left: 4px solid #8b5cf6;
}

.modal-detalhes-tecnicos h4 {
    color: #5b21b6;
    font-size: 1.1rem;
    margin-bottom: 15px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.modal-detalhes-tecnicos h4 i {
    color: #8b5cf6;
}

.detalhes-content {
    background: white;
    padding: 15px 20px;
    border-radius: 8px;
    color: #3730a3;
    line-height: 1.8;
    font-size: 0.95rem;
    border: 1px solid #e9d5ff;
    max-height: 300px;
    overflow-y: auto;
}

.detalhes-content::-webkit-scrollbar {
    width: 8px;
}

.detalhes-content::-webkit-scrollbar-track {
    background: #f5f3ff;
    border-radius: 4px;
}

.detalhes-content::-webkit-scrollbar-thumb {
    background: #8b5cf6;
    border-radius: 4px;
}

.detalhes-content::-webkit-scrollbar-thumb:hover {
    background: #7c3aed;
}

/* Modal Traffic Dump */
.modal-traffic-dump {
    background: linear-gradient(135deg, #fef3c7, #fde68a);
    padding: 25px;
    border-radius: 12px;
    margin-top: 20px;
    border: 1px solid #fcd34d;
    border-left: 4px solid #f59e0b;
}

.modal-traffic-dump h4 {
    color: #78350f;
    font-size: 1.2rem;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 700;
}

.modal-traffic-dump h4 i {
    color: #f59e0b;
}

.traffic-dump-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 15px;
}

.dump-item {
    background: white;
    padding: 18px 20px;
    border-radius: 10px;
    border: 1px solid #fcd34d;
    box-shadow: 0 2px 6px rgba(245, 158, 11, 0.1);
    transition: all 0.3s;
    position: relative;
    overflow: hidden;
}

.dump-item:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 16px rgba(245, 158, 11, 0.2);
}

.dump-item-full {
    grid-column: 1 / -1;
}

.dump-label {
    color: #92400e;
    font-size: 0.85rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 8px;
}

.dump-value {
    color: #1e293b;
    font-size: 1.3rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 8px;
}

.dump-value i {
    color: #f59e0b;
}

.dump-value-list {
    color: #475569;
    font-size: 0.95rem;
    font-family: 'Courier New', monospace;
    line-height: 1.6;
    padding: 10px;
    background: #fef3c7;
    border-radius: 6px;
    margin-top: 8px;
}

.dump-bar {
    height: 6px;
    background: linear-gradient(90deg, #f59e0b, #d97706);
    border-radius: 3px;
    margin-top: 10px;
    transition: width 0.8s ease-out;
    box-shadow: 0 2px 4px rgba(245, 158, 11, 0.3);
}

/* AI Error Styles */
.ai-error {
    text-align: center;
    padding: 40px 30px;
}

.ai-error i {
    font-size: 4rem;
    color: #ef4444;
    margin-bottom: 20px;
}

.ai-error h4 {
    color: var(--text-primary);
    font-size: 1.3rem;
    margin-bottom: 15px;
}

.ai-error p {
    color: var(--text-secondary);
    font-size: 1rem;
    margin-bottom: 25px;
}

.btn-retry {
    background: linear-gradient(135deg, #ef4444, #dc2626);
    color: white;
    border: none;
    padding: 12px 24px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 0.95rem;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    transition: all 0.3s ease;
}

.btn-retry:hover {
    background: linear-gradient(135deg, #dc2626, #b91c1c);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(239, 68, 68, 0.3);
}

/* Footer */
.footer {
    background: var(--card-bg);
    border-radius: 12px;
    padding: 20px;
    text-align: center;
    box-shadow: var(--shadow-lg);
    color: var(--text-secondary);
    margin-top: auto;
}

.footer p {
    margin: 0;
}

.text-muted {
    color: var(--text-secondary);
}

/* Responsividade */
@media (min-width: 1600px) {
    .highlight-stats {
        grid-template-columns: repeat(3, 1fr);
    }

    .metrics-grid {
        grid-template-columns: repeat(6, 1fr);
    }

    .analysis-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 1400px) {
    .highlight-stats {
        grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    }

    .metrics-grid {
        grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    }
}

@media (max-width: 1200px) {
    .sidebar {
        width: 260px;
        min-width: 260px;
    }

    .main-content {
        margin-left: 260px;
        width: calc(100% - 260px);
        padding: 15px;
    }

    .metrics-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 1024px) {
    .sidebar {
        width: 240px;
        min-width: 240px;
    }

    .main-content {
        margin-left: 240px;
        width: calc(100% - 240px);
    }

    .highlight-stats {
        grid-template-columns: repeat(2, 1fr);
    }

    .metrics-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .analysis-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 900px) {
    .highlight-stats {
        grid-template-columns: 1fr;
    }

    .metrics-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 820px) {
    .main-content {
        padding: 12px;
    }

    .highlight-card {
        padding: 20px;
    }

    .metric-card {
        padding: 18px;
    }

    .analysis-card {
        padding: 20px;
    }
}

@media (max-width: 768px) {
    body {
        flex-direction: column;
    }

    .sidebar {
        width: 100%;
        min-width: 100%;
        height: auto;
        position: relative;
    }

    .main-content {
        margin-left: 0;
        width: 100%;
        padding: 10px;
    }

    .sidebar-nav {
        display: flex;
        overflow-x: auto;
        padding: 10px;
    }

    .nav-item {
        min-width: auto;
        white-space: nowrap;
    }

    .sidebar-info,
    .sidebar-actions,
    .sidebar-footer {
        display: none;
    }

    /* Dashboard responsivo */
    .dashboard-header {
        flex-direction: column;
        gap: 20px;
        padding: 25px;
        text-align: center;
    }

    .dashboard-header h1 {
        font-size: 1.6rem;
    }

    .dashboard-actions {
        width: 100%;
    }

    .dashboard-actions .btn {
        width: 100%;
    }

    .highlight-stats {
        grid-template-columns: 1fr;
    }

    .highlight-card {
        padding: 20px;
    }

    .highlight-icon {
        width: 60px;
        height: 60px;
        font-size: 2rem;
    }

    .highlight-value {
        font-size: 2rem;
    }

    .metrics-grid {
        grid-template-columns: 1fr;
    }

    .analysis-grid {
        grid-template-columns: 1fr;
    }

    /* Activity timeline mobile */
    .activity-list {
        padding: 20px 15px;
    }

    .activity-item {
        gap: 15px;
    }

    .activity-details {
        flex-direction: column;
        gap: 10px;
    }

    .activity-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 15px;
    }

    /* Logs page responsive */
    .logs-page-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 20px;
        padding: 20px 0;
    }

    .page-info {
        width: 100%;
        flex-direction: column;
        gap: 10px;
    }

    .info-badge {
        justify-content: space-between;
        width: 100%;
    }

    .search-filter-bar {
        padding: 15px;
    }

    .compact-filter-form {
        flex-direction: column;
        gap: 12px;
    }

    .search-group,
    .filter-group-compact,
    .action-buttons {
        width: 100%;
        min-width: 100%;
    }

    .action-buttons {
        flex-direction: row;
    }

    .btn-filter {
        flex: 1;
    }

    .quick-stats-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 12px;
    }

    .quick-stat-card {
        padding: 16px;
        gap: 12px;
    }

    .stat-icon-wrapper {
        width: 45px;
        height: 45px;
        font-size: 1.2rem;
    }

    .stat-value {
        font-size: 1.3rem;
    }

    .table-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 15px;
        padding: 15px 20px;
    }

    .table-actions {
        width: 100%;
        justify-content: flex-end;
    }

    .header-content h1 {
        font-size: 1.8rem;
    }

    .header-content h1 i {
        font-size: 1.6rem;
    }

    .stats-container {
        grid-template-columns: 1fr;
    }

    .filter-row {
        grid-template-columns: 1fr;
    }

    .filter-buttons {
        flex-direction: column;
    }

    .filter-buttons .btn {
        width: 100%;
        justify-content: center;
    }

    .table-responsive {
        font-size: 0.8rem;
    }

    .logs-table th,
    .logs-table td {
        padding: 8px 6px;
    }

    .modal-content {
        width: 95%;
        margin: 10% auto;
    }

    .ai-modal {
        width: 98%;
        max-width: 98%;
        max-height: 85vh;
    }

    .modal-body {
        padding: 20px;
        max-height: 65vh;
    }

    .ai-header {
        flex-direction: column;
        gap: 15px;
        align-items: flex-start;
        padding: 15px;
    }

    .ai-badge {
        font-size: 0.9rem;
        padding: 10px 20px;
    }

    .ai-timestamp {
        font-size: 0.9rem;
        padding: 6px 12px;
    }

    .ai-analysis,
    .ai-recommendations {
        padding: 20px;
    }

    .ai-analysis h4,
    .ai-recommendations h4 {
        font-size: 1.1rem;
    }

    .ai-content {
        font-size: 0.95rem;
        line-height: 1.8;
    }

    .btn-ai-analyze {
        padding: 6px 12px;
        font-size: 0.8rem;
    }
}

@media (max-width: 480px) {
    .main-content {
        padding: 8px;
    }

    .dashboard-header h1 {
        font-size: 1.4rem;
    }

    .highlight-card {
        padding: 16px;
        flex-direction: column;
        text-align: center;
    }

    .highlight-icon {
        width: 50px;
        height: 50px;
        font-size: 1.6rem;
    }

    .highlight-value {
        font-size: 1.8rem;
    }

    .metric-card {
        padding: 15px;
    }

    .metric-value {
        font-size: 1.4rem;
    }

    .quick-stats-grid {
        grid-template-columns: 1fr;
    }

    .activity-details {
        flex-direction: column;
        gap: 8px;
    }

    .page-title h1 {
        font-size: 1.4rem;
    }

    .info-badge {
        font-size: 0.85rem;
        padding: 8px 12px;
    }

    .ai-modal {
        width: 100%;
        max-width: 100%;
        margin: 2% auto;
        max-height: 95vh;
    }

    .ai-modal-header h3 {
        font-size: 1rem;
    }

    .modal-body {
        padding: 15px;
        max-height: 75vh;
    }

    .ai-loading {
        padding: 30px 15px;
    }

    .loading-spinner {
        width: 45px;
        height: 45px;
    }

    .ai-loading p {
        font-size: 0.95rem;
    }

    .ai-header {
        padding: 12px;
        margin-bottom: 20px;
    }

    .ai-result {
        padding: 5px 0;
    }

    .ai-analysis,
    .ai-recommendations {
        padding: 15px 18px;
        margin-bottom: 15px;
    }

    .ai-analysis h4,
    .ai-recommendations h4 {
        font-size: 1rem;
        margin-bottom: 12px;
    }

    .ai-content {
        font-size: 0.9rem;
        line-height: 1.7;
    }

    .btn-ai-analyze {
        padding: 5px 10px;
        font-size: 0.75rem;
    }

    .btn-ai-analyze i {
        font-size: 0.85rem;
    }

    .ai-badge {
        font-size: 0.8rem;
        padding: 8px 14px;
    }

    .ai-timestamp {
        font-size: 0.8rem;
        padding: 6px 10px;
    }

    .ai-error i {
        font-size: 3rem;
    }

    .ai-footer {
        padding: 12px;
        font-size: 0.8rem;
    }
}

/* Scrollbar personalizada */
::-webkit-scrollbar {
    width: 10px;
    height: 10px;
}

::-webkit-scrollbar-track {
    background: var(--bg-color);
    border-radius: 10px;
}

::-webkit-scrollbar-thumb {
    background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
    border-radius: 10px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--primary-dark);
}

/* Responsividade do Navbar */
@media (max-width: 1200px) {
    .navbar-info {
        gap: 8px;
    }
    
    .info-badge span {
        display: none;
    }
    
    .info-badge {
        padding: 8px 10px;
    }
}

@media (max-width: 768px) {
    .navbar-container {
        padding: 0 15px;
        gap: 15px;
    }
    
    .navbar-brand {
        min-width: auto;
        font-size: 1.2rem;
    }
    
    .navbar-brand i {
        font-size: 1.5rem;
    }
    
    .navbar-menu {
        gap: 4px;
    }
    
    .nav-link span {
        display: none;
    }
    
    .nav-link {
        padding: 10px 12px;
    }
    
    .navbar-info .info-badge:not(.status-badge) {
        display: none;
    }
    
    .main-content {
        padding: 20px 15px;
    }
}

@media (max-width: 480px) {
    .navbar-brand span {
        display: none;
    }
    
    .navbar-menu {
        gap: 2px;
    }
    
    .nav-link {
        padding: 8px 10px;
    }
}
