/**
 * ============================================================
 * REPORTE DE INCIDENCIAS v2.0 — Estilos de Gráficos y Stats
 * ============================================================
 */

/* ======================== CHART CONTAINERS ======================== */
.chart-card {
    background: var(--glass-bg);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-lg);
    padding: var(--space-4);
    box-shadow: var(--shadow-card);
}

.chart-card .chart-title {
    font-size: var(--text-xs);
    font-weight: 600;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: var(--space-3);
    display: flex;
    align-items: center;
    gap: var(--space-2);
}

.chart-card .chart-title svg {
    width: 14px;
    height: 14px;
    color: var(--accent-blue);
}

.chart-canvas-wrapper {
    position: relative;
    width: 100%;
    min-height: 180px;
    max-height: 280px;
}

.chart-canvas-wrapper canvas {
    width: 100% !important;
    max-height: 100% !important;
}

/* Pie chart specific - needs more height */
.chart-pie-wrapper {
    min-height: 260px;
    max-height: 340px;
}

/* ======================== LOGIN PAGE ======================== */
.login-page {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg-primary);
    position: relative;
    overflow: hidden;
}

/* Animated background */
.login-bg {
    position: fixed;
    inset: 0;
    z-index: 0;
}

.login-bg::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: 
        radial-gradient(circle at 20% 50%, rgba(59, 130, 246, 0.08) 0%, transparent 50%),
        radial-gradient(circle at 80% 20%, rgba(6, 182, 212, 0.06) 0%, transparent 50%),
        radial-gradient(circle at 50% 80%, rgba(139, 92, 246, 0.05) 0%, transparent 50%);
    animation: bgFloat 20s ease-in-out infinite;
}

@keyframes bgFloat {
    0%, 100% { transform: translate(0, 0) rotate(0deg); }
    33% { transform: translate(30px, -30px) rotate(1deg); }
    66% { transform: translate(-20px, 20px) rotate(-1deg); }
}

.login-card {
    position: relative;
    z-index: 1;
    width: 100%;
    max-width: 420px;
    padding: var(--space-10);
    background: var(--glass-bg-strong);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid var(--border-strong);
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-xl), var(--shadow-glow);
    animation: fadeInScale 0.6s ease;
}

.login-logo {
    text-align: center;
    margin-bottom: var(--space-8);
}

.login-logo-icon {
    width: 64px;
    height: 64px;
    background: var(--gradient-primary);
    border-radius: var(--radius-lg);
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto var(--space-4);
    box-shadow: 0 8px 32px rgba(59, 130, 246, 0.3);
}

.login-logo-icon svg {
    width: 36px;
    height: 36px;
    color: white;
}

.login-title {
    font-size: var(--text-2xl);
    font-weight: 700;
    margin-bottom: var(--space-1);
}

.login-subtitle {
    font-size: var(--text-sm);
    color: var(--text-muted);
}

.login-form {
    display: flex;
    flex-direction: column;
    gap: var(--space-5);
}

.login-form .form-group {
    gap: var(--space-2);
}

.login-form .form-input {
    padding: var(--space-3) var(--space-4);
    font-size: var(--text-sm);
}

.login-form .btn {
    padding: var(--space-3);
    font-size: var(--text-md);
    font-weight: 600;
}

.login-error {
    background: rgba(239, 68, 68, 0.1);
    border: 1px solid rgba(239, 68, 68, 0.2);
    border-radius: var(--radius-sm);
    padding: var(--space-3);
    text-align: center;
    font-size: var(--text-sm);
    color: var(--accent-red);
    animation: fadeIn 0.3s ease;
    display: none;
}

.login-error.visible {
    display: block;
}

.password-wrapper {
    position: relative;
}

.password-toggle {
    position: absolute;
    right: var(--space-3);
    top: 50%;
    transform: translateY(-50%);
    cursor: pointer;
    color: var(--text-muted);
    transition: color var(--transition-fast);
    background: none;
    border: none;
    padding: var(--space-1);
    display: flex;
    align-items: center;
}

.password-toggle:hover {
    color: var(--accent-blue);
}

.password-toggle svg {
    width: 18px;
    height: 18px;
}

.login-footer {
    margin-top: var(--space-8);
    text-align: center;
    font-size: var(--text-xs);
    color: var(--text-muted);
}

/* ======================== PRINT STYLES ======================== */
@media print {
    .chart-card {
        background: white;
        border: 1px solid #ddd;
        box-shadow: none;
        page-break-inside: avoid;
    }

    .chart-card .chart-title {
        color: #333;
    }

    .kpi-card {
        background: white;
        border: 1px solid #ddd;
        box-shadow: none;
    }

    .kpi-card .kpi-value {
        color: #333 !important;
    }

    .kpi-card .kpi-label {
        color: #666;
    }
}

/* ======================== RESPONSIVE — CHARTS & LOGIN ======================== */

@media screen and (max-width: 768px) {
    .chart-card {
        padding: var(--space-3);
    }

    .chart-card .chart-title {
        font-size: 11px;
        margin-bottom: var(--space-2);
    }

    .chart-canvas-wrapper {
        min-height: 150px;
        max-height: 220px;
    }

    .chart-pie-wrapper {
        min-height: 200px;
        max-height: 280px;
    }

    /* Login page responsive */
    .login-card {
        padding: var(--space-6);
        margin: var(--space-3);
        max-width: 100%;
    }

    .login-logo-icon {
        width: 52px;
        height: 52px;
    }

    .login-logo-icon svg {
        width: 28px;
        height: 28px;
    }

    .login-title {
        font-size: var(--text-xl);
    }

    .login-subtitle {
        font-size: var(--text-xs);
    }
}

@media screen and (max-width: 480px) {
    .login-card {
        padding: var(--space-5);
        border-radius: var(--radius-lg);
    }

    .login-title {
        font-size: var(--text-lg);
    }

    .login-form .btn {
        padding: var(--space-3);
        font-size: var(--text-sm);
    }

    .chart-canvas-wrapper {
        min-height: 130px;
        max-height: 180px;
    }

    .chart-pie-wrapper {
        min-height: 180px;
        max-height: 240px;
    }
}

