/* G2 :: g2-styles - estilos audit page + componentes nuevos */

/* === Audit page === */
.g2-audit-shell {
    max-width: 1400px;
    margin: 0 auto;
    padding: 1.25rem;
}

.g2-audit-head {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 1rem;
    flex-wrap: wrap;
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 2px solid #e5e7eb;
}
.g2-audit-eyebrow {
    font-size: 0.7rem;
    font-weight: 800;
    color: #f59e0b;
    letter-spacing: 2px;
}
.g2-audit-head h1 {
    margin: 0.2rem 0 0.15rem;
    font-size: 1.6rem;
    color: #1f2937;
    letter-spacing: -0.5px;
}
.g2-audit-sub { color: #6b7280; font-size: 0.85rem; }

.g2-audit-refresh {
    background: #3b82f6;
    color: white;
    border: none;
    padding: 0.6rem 1.2rem;
    border-radius: 8px;
    font-weight: 700;
    cursor: pointer;
    font-size: 0.9rem;
    box-shadow: 0 2px 6px rgba(59, 130, 246, 0.3);
}
.g2-audit-refresh:hover { background: #2563eb; transform: translateY(-1px); }
.g2-audit-refresh:disabled { opacity: 0.5; cursor: not-allowed; }

.g2-audit-loading {
    text-align: center;
    padding: 3rem;
    color: #6b7280;
    font-size: 1.1rem;
}

/* Grid de stats */
.g2-audit-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 1rem;
    margin-bottom: 2rem;
}
.g2-stat {
    background: white;
    border-radius: 12px;
    padding: 1.2rem 1.3rem;
    box-shadow: 0 1px 3px rgba(0,0,0,0.05);
    border: 1px solid #e5e7eb;
    border-left: 4px solid #9ca3af;
}
.g2-stat-primary { border-left-color: #3b82f6; background: linear-gradient(135deg, #eff6ff 0%, white 60%); }
.g2-stat-novedades { border-left-color: #f59e0b; background: linear-gradient(135deg, #fffbeb 0%, white 60%); }

.g2-stat-lbl {
    font-size: 0.72rem;
    color: #6b7280;
    text-transform: uppercase;
    font-weight: 700;
    letter-spacing: 0.5px;
    margin-bottom: 0.4rem;
}
.g2-stat-val {
    font-size: 2rem;
    font-weight: 800;
    color: #1f2937;
    line-height: 1.1;
    letter-spacing: -1px;
}
.g2-stat-sub {
    font-size: 0.78rem;
    color: #6b7280;
    margin-top: 0.4rem;
}

/* Alertas */
.g2-alert {
    padding: 0.85rem 1.1rem;
    border-radius: 8px;
    margin-bottom: 1rem;
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-wrap: wrap;
}
.g2-alert-warn { background: #fef3c7; border-left: 4px solid #f59e0b; color: #78350f; }
.g2-alert-info { background: #dbeafe; border-left: 4px solid #3b82f6; color: #1e3a8a; }
.g2-alert-link {
    color: inherit;
    font-weight: 700;
    text-decoration: underline;
    margin-left: 0.5rem;
}

/* Sections */
.g2-section {
    background: white;
    border-radius: 12px;
    padding: 1.25rem;
    margin-bottom: 1.5rem;
    box-shadow: 0 1px 3px rgba(0,0,0,0.05);
}
.g2-section-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1rem;
    padding-bottom: 0.75rem;
    border-bottom: 1px solid #e5e7eb;
}
.g2-section-head h2 {
    margin: 0;
    font-size: 1.05rem;
    color: #1f2937;
    font-weight: 700;
}
.g2-section-link {
    color: #3b82f6;
    font-size: 0.85rem;
    text-decoration: none;
    font-weight: 600;
}
.g2-section-link:hover { text-decoration: underline; }

/* Tabla */
.g2-tabla {
    width: 100%;
    border-collapse: collapse;
}
.g2-tabla th {
    text-align: left;
    padding: 0.5rem 0.75rem;
    font-size: 0.72rem;
    color: #6b7280;
    text-transform: uppercase;
    font-weight: 700;
    background: #f9fafb;
    letter-spacing: 0.4px;
}
.g2-tabla td {
    padding: 0.6rem 0.75rem;
    font-size: 0.88rem;
    color: #1f2937;
    border-top: 1px solid #f3f4f6;
}
.g2-tabla tr:hover td { background: #fafbfc; }

.g2-ver {
    background: #1f2937;
    color: white;
    padding: 0.15rem 0.5rem;
    border-radius: 4px;
    font-size: 0.78rem;
    font-weight: 700;
    font-family: monospace;
}
.g2-pill {
    background: #f3f4f6;
    color: #4b5563;
    padding: 0.18rem 0.55rem;
    border-radius: 5px;
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.4px;
}
.g2-imp {
    padding: 0.18rem 0.55rem;
    border-radius: 5px;
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.4px;
}
.g2-imp-critica { background: #fef2f2; color: #991b1b; }
.g2-imp-alta { background: #fffbeb; color: #92400e; }
.g2-imp-media { background: #eff6ff; color: #1e3a8a; }
.g2-imp-baja { background: #f3f4f6; color: #4b5563; }

.g2-empty {
    text-align: center;
    padding: 2rem;
    color: #9ca3af;
}

/* Routes */
.g2-routes {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 0.75rem;
}
.g2-route {
    display: flex;
    align-items: center;
    gap: 0.7rem;
    padding: 0.85rem 1rem;
    background: #f9fafb;
    border-radius: 8px;
    text-decoration: none;
    color: #1f2937;
    transition: all 0.15s;
    border: 1px solid #e5e7eb;
}
.g2-route:hover {
    background: #eff6ff;
    border-color: #3b82f6;
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(59, 130, 246, 0.15);
}
.g2-route-emoji { font-size: 1.5rem; line-height: 1; }
.g2-route-nombre {
    font-weight: 700;
    font-size: 0.9rem;
    margin-bottom: 0.1rem;
}
.g2-route code {
    font-size: 0.75rem;
    color: #6b7280;
    font-family: monospace;
}

/* === NavMenu link nuevo === */
.g2-nav-novedades {
    position: relative;
}
.g2-nav-novedades-badge {
    background: #ef4444;
    color: white;
    font-size: 0.62rem;
    font-weight: 800;
    min-width: 16px;
    height: 16px;
    padding: 0 4px;
    border-radius: 8px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-left: 0.4rem;
    position: absolute;
    top: -2px;
    right: -10px;
}

/* Mobile */
@media (max-width: 768px) {
    .g2-audit-shell { padding: 0.75rem; }
    .g2-audit-head h1 { font-size: 1.3rem; }
    .g2-audit-grid { grid-template-columns: 1fr 1fr; }
    .g2-stat { padding: 0.85rem 1rem; }
    .g2-stat-val { font-size: 1.5rem; }
    .g2-tabla th, .g2-tabla td { padding: 0.45rem; font-size: 0.78rem; }
}
