/*
 * Sistema de diseno "Hagoober UI" - clases compartidas y NO aisladas (no usar CSS isolation
 * por componente para estas clases) para que cualquier pagina las pueda reutilizar tal cual.
 * Ver .claude/skills/hagoober-ui-designer/SKILL.md para la guia completa de uso.
 *
 * Colores base (deben coincidir con PaletteLight en MainLayout.razor si esta se actualiza):
 *   Primario   #2563EB
 *   Secundario #64748B
 *   Exito      #10B981
 *   Advertencia#F59E0B
 *   Peligro    #EF4444
 *   Fondo      #F8FAFC
 */

.hg-page {
    padding-bottom: 12px;
}

/* Hero / encabezado de pagina */
.hg-hero {
    padding: 24px 28px;
    border-radius: 18px;
    background:
        radial-gradient(circle at top right, rgba(37, 99, 235, 0.12), transparent 30%),
        linear-gradient(135deg, #ffffff 0%, #f8fbff 100%);
    border: 1px solid rgba(37, 99, 235, 0.08);
}

.hg-hero__content {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 18px;
    flex-wrap: wrap;
}

.hg-hero__actions {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

/* Barra de filtros */
.hg-filters {
    padding: 16px 20px;
    border-radius: 18px;
    border: 1px solid rgba(15, 23, 42, 0.06);
    background: #ffffff;
    display: flex;
    align-items: center;
}

/* Tarjetas de estadistica (KPI) con borde de color a la izquierda */
.hg-stat {
    padding: 20px 24px;
    min-height: 120px;
    border-radius: 18px;
    border: 1px solid rgba(15, 23, 42, 0.08);
    background: #ffffff;
    position: relative;
    transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.03);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.hg-stat:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 24px rgba(0, 0, 0, 0.08);
}

.hg-stat--primary { border-left: 6px solid #2563eb; }
.hg-stat--success { border-left: 6px solid #10b981; }
.hg-stat--warning { border-left: 6px solid #f59e0b; }
.hg-stat--error   { border-left: 6px solid #ef4444; }
.hg-stat--info    { border-left: 6px solid #64748b; }

/* Avatares circulares "suaves" (fondo tenue del color, icono solido) */
.hg-avatar-soft-primary { background-color: rgba(37, 99, 235, 0.1) !important; color: #2563eb !important; border: none !important; box-shadow: 0 0 0 10px rgba(37, 99, 235, 0.05); border-radius: 50%; }
.hg-avatar-soft-success { background-color: rgba(16, 185, 129, 0.1) !important; color: #10b981 !important; border: none !important; box-shadow: 0 0 0 10px rgba(16, 185, 129, 0.05); border-radius: 50%; }
.hg-avatar-soft-warning { background-color: rgba(245, 158, 11, 0.1) !important; color: #f59e0b !important; border: none !important; box-shadow: 0 0 0 10px rgba(245, 158, 11, 0.05); border-radius: 50%; }
.hg-avatar-soft-error   { background-color: rgba(239, 68, 68, 0.1) !important; color: #ef4444 !important; border: none !important; box-shadow: 0 0 0 10px rgba(239, 68, 68, 0.05); border-radius: 50%; }

/* Pastilla de estado (ej. Borrador/Enviada/Aprobada de una cotizacion) */
.hg-badge {
    display: inline-flex;
    align-items: center;
    padding: 4px 12px;
    border-radius: 999px;
    font-size: 0.78rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.03em;
}

.hg-badge--secondary { background: rgba(100, 116, 139, 0.12); color: #64748b; }
.hg-badge--info       { background: rgba(37, 99, 235, 0.12); color: #2563eb; }
.hg-badge--success    { background: rgba(16, 185, 129, 0.12); color: #10b981; }
.hg-badge--warning    { background: rgba(245, 158, 11, 0.12); color: #f59e0b; }
.hg-badge--primary    { background: rgba(37, 99, 235, 0.12); color: #2563eb; }

/* Tarjeta de formulario/contenido generica */
.hg-card {
    padding: 20px 24px;
    border-radius: 18px;
    border: 1px solid rgba(15, 23, 42, 0.06);
    background: #ffffff;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.03);
}

.hg-card__title {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 12px;
}

/* Icono cuadrado con fondo suave, para el encabezado del hero y de cada tarjeta */
.hg-icon-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    border-radius: 10px;
    background: rgba(37, 99, 235, 0.1);
    color: #2563eb;
    font-size: 1rem;
    flex-shrink: 0;
}

/* Panel lateral de resumen (sticky), para layouts de 2 columnas tipo formulario + totales */
.hg-summary {
    padding: 20px 24px;
    border-radius: 18px;
    background: #f8fafc;
    border: 1px solid rgba(15, 23, 42, 0.08);
    position: sticky;
    top: 16px;
}

.hg-summary__total {
    padding-top: 12px;
    margin-top: 8px;
    border-top: 1px dashed rgba(15, 23, 42, 0.12);
}

/* Contenedor de tabla */
.hg-table-shell {
    padding: 18px 18px 8px;
    border-radius: 20px;
}

.hg-table-shell__header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 12px;
}

.hg-table {
    border: 1px solid rgba(15, 23, 42, 0.08);
    border-radius: 16px;
    overflow: hidden;
    box-shadow: none;
}

.hg-table :deep(thead th),
.hg-table thead th {
    background: #f8fafc;
    color: #475569;
    font-size: 0.78rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.hg-table :deep(tbody tr:hover),
.hg-table tbody tr:hover {
    background: rgba(37, 99, 235, 0.03);
}

@media (max-width: 960px) {
    .hg-hero {
        padding: 20px;
    }

    .hg-filters {
        padding: 16px 16px 10px;
    }

    .hg-stat {
        min-height: 0;
    }

    .hg-summary {
        position: static;
    }
}
