/* 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: #ffffff;
    color: var(--text-primary);
    line-height: 1.6;
    min-height: 100vh;
    padding: 0;
    margin: 0;
    display: flex;
}

/* Sidebar */
.sidebar {
    width: 280px;
    min-width: 280px;
    height: 100vh;
    position: fixed;
    left: 0;
    top: 0;
    background: linear-gradient(180deg, #1e293b 0%, #0f172a 100%);
    color: white;
    overflow-y: auto;
    z-index: 1000;
    box-shadow: 4px 0 12px rgba(0, 0, 0, 0.2);
    display: flex;
    flex-direction: column;
}

.sidebar-header {
    padding: 30px 25px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.sidebar .logo {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 1.5rem;
    font-weight: 700;
}

.sidebar .logo i {
    font-size: 2rem;
    background: linear-gradient(135deg, var(--primary-color), #8b5cf6);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.sidebar-nav {
    padding: 20px 15px;
    flex-grow: 1;
}

.nav-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 18px;
    color: rgba(255, 255, 255, 0.7);
    text-decoration: none;
    border-radius: 10px;
    margin-bottom: 8px;
    transition: all 0.3s ease;
    font-weight: 500;
}

.nav-item:hover {
    background: rgba(255, 255, 255, 0.1);
    color: white;
    transform: translateX(5px);
}

.nav-item.active {
    background: linear-gradient(135deg, var(--primary-color), #8b5cf6);
    color: white;
}

.nav-item i {
    font-size: 1.2rem;
    width: 24px;
    text-align: center;
}

.sidebar-info {
    padding: 20px 25px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.sidebar-info h4 {
    margin-bottom: 15px;
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.5);
    text-transform: uppercase;
    letter-spacing: 1px;
}

.info-item {
    display: flex;
    justify-content: space-between;
    padding: 8px 0;
    font-size: 0.9rem;
}

.info-label {
    color: rgba(255, 255, 255, 0.5);
}

.info-value {
    color: white;
    font-weight: 600;
}

.status-online {
    color: var(--success-color);
    font-weight: 600;
}

.status-online i {
    font-size: 0.6rem;
    animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

.sidebar-actions {
    padding: 20px 25px;
    display: flex;
    gap: 10px;
}

.sidebar-btn {
    flex: 1;
    padding: 10px;
    background: rgba(255, 255, 255, 0.1);
    color: white;
    text-decoration: none;
    text-align: center;
    border-radius: 8px;
    font-size: 0.85rem;
    font-weight: 600;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
}

.sidebar-btn:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: translateY(-2px);
}

.sidebar-footer {
    padding: 20px 25px;
    text-align: center;
    font-size: 0.85rem;
    color: rgba(255, 255, 255, 0.5);
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.sidebar-footer p {
    margin: 5px 0;
}

/* Main Content */
.main-content {
    margin-left: 280px;
    width: calc(100% - 280px);
    min-height: 100vh;
    padding: 20px;
    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;
}

/* 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%;
    transition: width 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 {
    background: linear-gradient(135deg, #10b981, #059669);
    color: white;
}

.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: 25px;
    max-height: 400px;
    overflow-y: auto;
    line-height: 1.8;
}

/* 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;
    }
}

@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;
    }
}

/* 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);
}
