/**
 * Security Dashboard Styles
 *
 * Estilos para el panel de monitoreo de seguridad del Superadmin
 * Integra monitoreo de seguridad, auditoría y (futuro) mapas de amenazas
 */

/* ============================================================================
   SECURITY CENTER CONTAINER & HEADER
   ============================================================================ */

.security-center {
    max-width: 1400px;
    margin: 0 auto;
    padding: 20px;
    background: #fff;
    min-height: 80vh;
}

.security-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 20px;
    border-bottom: 1px solid #eee;
}

.security-title h3 {
    margin: 0;
    font-size: 24px;
    color: #2c3e50;
    display: flex;
    align-items: center;
    gap: 10px;
}

.security-subtitle {
    display: block;
    font-size: 14px;
    color: #7f8c8d;
    margin-top: 5px;
}

.security-actions {
    display: flex;
    align-items: center;
    gap: 15px;
}

/* ============================================================================
   TABS NAVIGATION
   ============================================================================ */

.security-tabs {
    display: flex;
    gap: 5px;
    border-bottom: 2px solid #eee;
    margin-bottom: 25px;
    overflow-x: auto;
    padding-bottom: 1px;
}

.security-tab {
    background: none;
    border: none;
    padding: 12px 20px;
    font-size: 15px;
    color: #7f8c8d;
    cursor: pointer;
    border-bottom: 3px solid transparent;
    transition: all 0.2s;
    font-weight: 500;
    white-space: nowrap;
    display: flex;
    align-items: center;
    gap: 8px;
}

.security-tab:hover {
    color: #3498db;
    background: #f8f9fa;
}

.security-tab.active {
    color: #3498db;
    border-bottom-color: #3498db;
    font-weight: 600;
}

.security-tab .badge {
    font-size: 10px;
    padding: 2px 6px;
    border-radius: 4px;
    vertical-align: middle;
}

/* ============================================================================
   PLACEHOLDERS (MAPS & BEHAVIOR)
   ============================================================================ */

.placeholder-feature {
    text-align: center;
    padding: 60px 20px;
    background: #f8f9fa;
    border-radius: 12px;
    border: 2px dashed #e0e0e0;
    color: #7f8c8d;
}

.placeholder-icon {
    font-size: 64px;
    margin-bottom: 20px;
    opacity: 0.5;
}

.placeholder-feature h3 {
    font-size: 24px;
    margin-bottom: 10px;
    color: #2c3e50;
}

.placeholder-feature p {
    font-size: 16px;
    max-width: 500px;
    margin: 0 auto;
}

/* ============================================================================
   DASHBOARD CONTENT (Legacy Styles Adapted)
   ============================================================================ */

.stats-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.stat-card {
    background: white;
    border-radius: 12px;
    padding: 20px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
    border: 1px solid #eee;
    display: flex;
    align-items: center;
    gap: 15px;
    transition: transform 0.2s, box-shadow 0.2s;
}

.stat-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.stat-card.warning { border-left: 4px solid #f39c12; }
.stat-card.danger { border-left: 4px solid #e74c3c; }

.stat-icon {
    font-size: 32px;
    padding: 10px;
    background: #f8f9fa;
    border-radius: 50%;
    width: 60px;
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.stat-content { flex: 1; }

.stat-value {
    font-size: 28px;
    font-weight: bold;
    color: #2c3e50;
    line-height: 1.2;
}

.stat-label {
    font-size: 13px;
    color: #7f8c8d;
}

/* Status Indicators */
.status-indicators {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
    margin-bottom: 30px;
}

.status-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 15px;
    background: #fff;
    border: 1px solid #eee;
    border-radius: 8px;
    border-left: 4px solid #95a5a6;
}

.status-item.ok { border-left-color: #27ae60; background: #f0fdf4; }
.status-item.warning { border-left-color: #f39c12; background: #fefce8; }
.status-item.error { border-left-color: #e74c3c; background: #fef2f2; }

.status-label { font-weight: 600; font-size: 14px; color: #2c3e50; flex: 1; }
.status-detail { font-size: 12px; color: #666; }

/* Charts & Tables Containers */
.chart-section,
.blocked-ips-section,
.recent-logins-section,
.system-stats-section {
    background: white;
    border-radius: 12px;
    padding: 25px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
    border: 1px solid #eee;
    margin-bottom: 30px;
}

.chart-section h4,
.blocked-ips-section h4,
.recent-logins-section h4,
.system-stats-section h4 {
    margin: 0 0 20px 0;
    color: #2c3e50;
    font-size: 16px;
    font-weight: 600;
    border-bottom: 1px solid #eee;
    padding-bottom: 10px;
}

/* Login Chart */
.login-chart {
    display: flex;
    justify-content: space-around;
    align-items: flex-end;
    height: 200px;
    gap: 10px;
    padding: 10px 0;
}

.chart-bar-container {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    height: 100%;
    justify-content: flex-end;
}

.chart-bar {
    width: 100%;
    max-width: 40px;
    background: linear-gradient(180deg, #3498db 0%, #2980b9 100%);
    border-radius: 4px 4px 0 0;
    transition: height 0.5s ease;
    min-height: 2px;
    display: flex;
    align-items: flex-start;
    justify-content: center;
    color: white;
    font-size: 11px;
    padding-top: 5px;
}

.chart-label {
    margin-top: 8px;
    font-size: 11px;
    color: #95a5a6;
}

/* Tables */
.table-responsive { overflow-x: auto; }
.security-table { width: 100%; border-collapse: collapse; font-size: 14px; }
.security-table th { text-align: left; padding: 12px; background: #f8f9fa; color: #2c3e50; font-weight: 600; }
.security-table td { padding: 12px; border-bottom: 1px solid #eee; color: #34495e; }
.security-table code { background: #f1f2f6; padding: 2px 6px; border-radius: 4px; font-family: monospace; font-size: 13px; color: #c0392b; }

/* System Stats Grid */
.system-stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 20px;
}

.stat-box {
    background: #f8f9fa;
    padding: 20px;
    border-radius: 8px;
    text-align: center;
    border: 1px solid #eee;
}

.stat-box-label { font-size: 12px; color: #7f8c8d; margin-bottom: 5px; text-transform: uppercase; letter-spacing: 0.5px; }
.stat-box-value { font-size: 24px; font-weight: bold; color: #2c3e50; }

/* Common Utilities */
.btn-refresh {
    background: #fff;
    border: 1px solid #ddd;
    color: #555;
    padding: 6px 12px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 13px;
    display: flex;
    align-items: center;
    gap: 5px;
}
.btn-refresh:hover { background: #f5f5f5; color: #333; }
.last-update { font-size: 12px; color: #999; }

/* Responsive */
@media (max-width: 768px) {
    .security-header { flex-direction: column; align-items: flex-start; gap: 10px; }
    .security-actions { width: 100%; justify-content: space-between; }
    .security-tabs { overflow-x: auto; padding-bottom: 10px; }
    .stat-card { flex-direction: column; text-align: center; }
    .stat-icon { margin-bottom: 10px; }
}
