/**
 * Dashboard Ejecutivo Clean Light Mode - Arte SEO Auditor Pro
 */

/* Contenedor General y Formulario */
.arte-seo-form-wrapper, 
.arte-seo-report-container {
    max-width: 960px;
    margin: 40px auto;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    color: #1e293b;
    background: #ffffff;
    padding: 40px;
    border-radius: 24px;
    box-shadow: 0 20px 40px -15px rgba(0, 0, 0, 0.08);
    border: 1px solid #e2e8f0;
}

/* Formulario de Entrada */
.arte-seo-form-wrapper form {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.arte-seo-form-wrapper label {
    font-weight: 600;
    font-size: 14px;
    color: #334155 !important;
}

.arte-seo-form-wrapper input[type="text"] {
    padding: 14px 16px;
    font-size: 15px;
    border: 2px solid #e2e8f0;
    border-radius: 12px;
    outline: none;
    transition: all 0.2s ease;
    background: #f8fafc;
    color: #0f172a;
}

.arte-seo-form-wrapper input[type="text"]:focus {
    border-color: #2563eb;
    background: #ffffff;
    box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.1);
}

.arte-seo-form-wrapper button[type="submit"] {
    background: linear-gradient(135deg, #2563eb 0%, #1d4ed8 100%);
    color: #ffffff;
    border: none;
    padding: 14px 16px;
    font-size: 15px;
    font-weight: 600;
    border-radius: 12px;
    cursor: pointer;
    transition: transform 0.1s ease, box-shadow 0.2s ease;
    box-shadow: 0 4px 15px rgba(37, 99, 235, 0.25);
}

.arte-seo-form-wrapper button[type="submit"]:hover {
    box-shadow: 0 6px 20px rgba(37, 99, 235, 0.35);
}

.arte-seo-form-wrapper button[type="submit"]:active {
    transform: scale(0.98);
}

/* Loader */
#arte-seo-loader {
    text-align: center;
    padding: 25px;
    font-weight: 500;
    color: #64748b !important;
}

/* Cabecera del Reporte */
.arte-seo-header-report {
    border-bottom: 2px solid #f1f5f9;
    padding-bottom: 20px;
    margin-bottom: 25px;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
}

.arte-seo-site-icon img {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    object-fit: contain;
    background: #f8fafc;
    padding: 6px;
    border: 1px solid #e2e8f0;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.04);
    margin-bottom: 12px;
}

.arte-seo-header-report h2 {
    margin: 0 0 6px 0;
    font-size: 26px;
    font-weight: 700;
    color: #0f172a !important;
    letter-spacing: -0.02em;
}

.arte-seo-target-url {
    margin: 0 0 4px 0;
    color: #475569 !important;
    font-size: 15px;
}

.arte-seo-target-url a {
    color: #2563eb;
    text-decoration: none;
}

.arte-seo-target-url a:hover {
    text-decoration: underline;
}

.arte-seo-time {
    margin: 0;
    color: #64748b !important;
    font-size: 13px;
}

/* Textos generales y subtítulos del reporte con alto contraste */
p, 
.arte-seo-report-container p,
.arte-seo-preview-grid h4 {
    color: #334155 !important;
}

/* Cuadrícula Bento (Preview + Métricas Principales) */
.arte-seo-preview-grid {
    display: grid;
    grid-template-columns: 1fr 2fr;
    gap: 24px;
    margin-bottom: 30px;
    align-items: stretch;
}

@media (max-width: 768px) {
    .arte-seo-preview-grid {
        grid-template-columns: 1fr;
    }
}

.arte-seo-screenshot {
    text-align: center;
    background: #f8fafc;
    padding: 16px;
    border-radius: 16px;
    border: 1px solid #e2e8f0;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.arte-seo-screenshot img {
    box-shadow: 0 4px 12px rgba(0,0,0,0.06);
    border-radius: 10px;
    width: 100%;
    height: auto;
}

.arte-seo-metrics-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
}

@media (max-width: 480px) {
    .arte-seo-metrics-grid {
        grid-template-columns: 1fr;
    }
}

/* Tarjetas Estilo Bento (Fondo blanco puro con sombra sutil) */
.arte-seo-card {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    padding: 24px 20px;
    border-radius: 16px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.02), 0 2px 4px -1px rgba(0, 0, 0, 0.02);
    transition: all 0.2s ease;
}

.arte-seo-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.05);
    border-color: #cbd5e1;
}

.arte-seo-card .metric-label {
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: #64748b;
    margin-bottom: 6px;
    font-weight: 700;
}

.arte-seo-card .metric-value {
    font-size: 2.2rem;
    font-weight: 800;
    color: #0f172a;
    letter-spacing: -0.02em;
}

/* Colores Semáforo en Modo Claro (Bordes y acentos limpios) */
.arte-seo-good {
    background: #f0fdf4 !important;
    border-color: #bbf7d0 !important;
}
.arte-seo-good .metric-value {
    color: #166534 !important;
}

.arte-seo-warning {
    background: #fffbeb !important;
    border-color: #fde68a !important;
}
.arte-seo-warning .metric-value {
    color: #92400e !important;
}

.arte-seo-bad {
    background: #fef2f2 !important;
    border-color: #fecaca !important;
}
.arte-seo-bad .metric-value {
    color: #991b1b !important;
}

/* Sección de Diagnóstico IA (Ahora con esquinas redondeadas uniformes) */
.arte-seo-ai-section {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-left: 4px solid #2563eb;
    padding: 26px;
    border-radius: 16px; /* <-- Cambiado para que sea redondeada en todas sus esquinas */
    margin-bottom: 25px;
}

.arte-seo-ai-section h3 {
    margin-top: 0;
    color: #1e40af !important;
    font-size: 17px;
    font-weight: 700;
    margin-bottom: 12px;
}

.arte-seo-ai-content p {
    line-height: 1.7;
    margin-bottom: 10px;
    color: #334155 !important;
    font-size: 14px;
}

/* Secciones Técnicas */
.arte-seo-technical-section {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    padding: 26px;
    border-radius: 16px;
    margin-bottom: 22px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.02);
}

.arte-seo-technical-section h3 {
    margin-top: 0;
    font-size: 16px;
    color: #0f172a !important;
    font-weight: 700;
    margin-bottom: 16px;
    border-bottom: 1px solid #f1f5f9;
    padding-bottom: 10px;
}

.arte-seo-tech-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 12px;
}

.tech-item {
    background: #f8fafc;
    padding: 12px 16px;
    border-radius: 10px;
    border: 1px solid #f1f5f9;
    font-size: 13px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.tech-item span {
    color: #64748b !important;
    font-weight: 500;
}

.tech-item strong {
    color: #1e293b;
    font-weight: 600;
    text-align: right;
    max-width: 60%;
}

/* Lista de Oportunidades */
.arte-seo-opp-list li {
    background: #fff5f5 !important;
    border: 1px solid #fed7d7 !important;
    padding: 10px 14px;
    border-radius: 8px;
    margin-bottom: 8px;
    font-size: 13px;
    color: #9b2c2c !important;
    font-weight: 500;
}

/* Pie del Reporte y Botón Volver */
.arte-seo-footer-report {
    text-align: center;
    margin-top: 30px;
}

.arte-seo-back-btn {
    display: inline-block;
    background: #f1f5f9;
    color: #334155;
    text-decoration: none;
    font-weight: 600;
    font-size: 13px;
    padding: 12px 24px;
    border-radius: 10px;
    transition: background 0.2s ease;
    border: 1px solid #cbd5e1;
}

.arte-seo-back-btn:hover {
    background: #e2e8f0;
    color: #0f172a;
}

/* Badges de Estado Visual */
.tech-item strong.status-ok {
    color: #166534;
    background: #f0fdf4;
    padding: 3px 8px;
    border-radius: 6px;
    font-size: 12px;
    border: 1px solid #bbf7d0;
}

.tech-item strong.status-warning {
    color: #92400e;
    background: #fffbeb;
    padding: 3px 8px;
    border-radius: 6px;
    font-size: 12px;
    border: 1px solid #fde68a;
}

.tech-item strong.status-bad {
    color: #991b1b;
    background: #fef2f2;
    padding: 3px 8px;
    border-radius: 6px;
    font-size: 12px;
    border: 1px solid #fecaca;
}

/* Estado de Carga del Botón */
.arte-seo-form-wrapper button[type="submit"].is-loading {
    background: #1d4ed8 !important;
    cursor: wait !important;
    opacity: 0.85;
    position: relative;
    color: transparent !important;
}

.arte-seo-form-wrapper button[type="submit"].is-loading::after {
    content: "";
    position: absolute;
    width: 18px;
    height: 18px;
    top: 50%;
    left: 50%;
    margin-left: -9px;
    margin-top: -9px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top-color: #ffffff;
    animation: arte-seo-spin 0.8s ease-in-out infinite;
}

@keyframes arte-seo-spin {
    to { transform: rotate(360deg); }
}

/* Sección E-commerce con fondo blanco y acento sutil verde pálido elegante */
.arte-seo-technical-section.ecommerce-section {
    background: #ffffff;
    border: 1px solid #bbf7d0; /* Borde sutil verde claro */
    border-left: 4px solid #10b981;
}

.arte-seo-technical-section.ecommerce-section h3 {
    color: #047857 !important;
}

/* Elementos internos de E-commerce con fondo verde suave y limpio */
.ecommerce-section .tech-item {
    background: #f0fdf4 !important;
    border: 1px solid #dcfce7 !important;
}

.ecommerce-section .tech-item span {
    color: #166534 !important;
}