/* ============================================================================
   Holos — Refined component layer
   Eleva los componentes compartidos (cards, tablas, botones, badges, inputs)
   con pulido premium. Se carga de último → gana especificidad sobre app.css.
   Un cambio aquí sube el nivel de TODAS las páginas de módulos a la vez.
   ============================================================================ */

/* ---- Ritmo de página: más aire, jerarquía clara ---- */
.holos-module-lead {
    max-width: 62ch;
    line-height: 1.6;
}

.card + .card,
section.card + section.card {
    margin-top: 1.25rem;
}

/* ---- Cards: sombra en capas, radio suave, hover sutil ---- */
.card {
    border-radius: 14px;
    border-color: var(--holos-border);
    box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04),
                0 10px 28px -14px rgba(15, 23, 42, 0.12);
    transition: box-shadow 0.2s ease, border-color 0.2s ease, transform 0.2s ease;
}

.card > h2:first-child,
.card > h3:first-child {
    margin-top: 0;
    letter-spacing: -0.01em;
}

/* Título de sección dentro de card con acento fino a la izquierda */
.card > h3:first-child {
    font-size: 1rem;
    font-weight: 600;
}

/* ---- Métricas / stat tiles (los bloques con surface-1) ---- */
.card [style*="--surface-1"],
[style*="background:var(--surface-1)"],
[style*="background: var(--surface-1)"] {
    border-radius: 12px !important;
    transition: transform 0.15s ease, box-shadow 0.15s ease;
}

/* ---- Tablas de datos: header micro-caps, hover de fila, números tabulares ---- */
.data-table {
    font-variant-numeric: tabular-nums;
    font-size: 0.875rem;
}

.data-table thead th {
    background: var(--holos-table-header-bg);
    text-transform: uppercase;
    font-size: 0.6875rem;
    letter-spacing: 0.045em;
    font-weight: 600;
    color: var(--holos-muted);
    border-bottom: 1px solid var(--holos-border-strong);
    padding-top: 0.7rem;
    padding-bottom: 0.7rem;
    position: sticky;
    top: 0;
}

.data-table tbody tr {
    transition: background 0.12s ease;
}

.data-table tbody tr:hover td {
    background: var(--holos-table-row-hover);
}

.data-table tbody tr:last-child td {
    border-bottom: none;
}

.data-table tfoot td {
    border-top: 2px solid var(--holos-border-strong);
    border-bottom: none;
    font-weight: 600;
    padding-top: 0.7rem;
}

/* ---- Botones: peso justo, elevación sutil al hover ---- */
.btn-primary {
    font-weight: 500;
    letter-spacing: -0.005em;
    border-radius: 10px;
    transition: background 0.15s ease, box-shadow 0.15s ease, transform 0.12s ease;
}

.btn-primary:hover {
    transform: translateY(-1px);
}

.btn-primary:active {
    transform: translateY(0);
}

.btn-ghost,
.btn-secondary {
    border-radius: 10px;
    transition: background 0.15s ease, border-color 0.15s ease, transform 0.12s ease;
}

.btn-ghost:hover,
.btn-secondary:hover {
    transform: translateY(-1px);
}

/* ---- Inputs / selects: altura y radio consistentes, foco suave ---- */
.input,
input[type="text"],
input[type="email"],
input[type="number"],
input[type="date"],
input[type="password"],
select,
textarea {
    border-radius: 10px;
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

/* ---- Badges / pills de estado ---- */
.save-ok {
    color: var(--holos-success);
    font-weight: 500;
}

.error-msg {
    color: var(--holos-danger);
    font-weight: 500;
}

/* Pills redondeadas (los <span> con border-radius:20px inline) se ven mejor con peso medio */
[style*="border-radius:20px"],
[style*="border-radius: 20px"] {
    font-weight: 500;
    letter-spacing: 0.005em;
}

/* ---- Eyebrow de módulo: micro-label refinada ---- */
.holos-module-eyebrow {
    text-transform: uppercase;
    letter-spacing: 0.08em;
    font-size: 0.6875rem;
    font-weight: 600;
    color: var(--holos-accent);
}

/* ---- Encabezado de página: título con tracking apretado ---- */
.holos-page-header-main h1,
.holos-page-header h1 {
    letter-spacing: -0.02em;
}

/* ---- Enlaces de acción / "volver" ---- */
.holos-page-back {
    transition: color 0.15s ease, transform 0.15s ease;
}

.holos-page-back:hover {
    transform: translateX(-2px);
}

/* ---- Texto muted más legible ---- */
.muted {
    color: var(--holos-muted);
}

/* ============================================================================
   Flagship — Login (primera impresión premium)
   Fondo navy con gradiente de marca + tarjeta flotante + botón con gradiente.
   ============================================================================ */
.login-page {
    align-items: center;
    padding: 1.5rem;
    background:
        radial-gradient(1100px 560px at 50% -12%, rgba(99, 102, 241, 0.30), transparent 60%),
        radial-gradient(700px 420px at 88% 112%, rgba(37, 99, 235, 0.22), transparent 60%),
        linear-gradient(160deg, #0b1220 0%, #0f172a 46%, #16223b 100%);
    position: relative;
    overflow: hidden;
}

.login-panel {
    max-width: 420px;
    padding: 2.25rem 2.25rem 2rem;
    border-radius: 20px;
    border: 1px solid rgba(255, 255, 255, 0.6);
    background: rgba(255, 255, 255, 0.99);
    box-shadow: 0 28px 80px -24px rgba(2, 6, 23, 0.6),
                0 10px 28px -14px rgba(2, 6, 23, 0.45);
    position: relative;
    z-index: 1;
}

.login-logo-wrap {
    box-shadow: 0 16px 40px -12px rgba(37, 99, 235, 0.4);
}

.login-tagline {
    color: var(--holos-brand-primary);
    letter-spacing: 0.3em;
}

.login-form input {
    border-radius: 10px;
    padding: 0.65rem 0.75rem;
    background: var(--holos-surface);
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.login-submit {
    width: 100%;
    margin-top: 0.35rem;
    padding: 0.7rem 1rem;
    border: none;
    border-radius: 12px;
    color: #fff;
    font-weight: 600;
    letter-spacing: 0.01em;
    cursor: pointer;
    background: var(--holos-gradient);
    background-size: 160% 160%;
    box-shadow: 0 10px 26px -10px rgba(37, 99, 235, 0.6);
    transition: transform 0.14s ease, box-shadow 0.2s ease, background-position 0.4s ease;
}

.login-submit:hover {
    transform: translateY(-1px);
    background-position: 100% 0;
    box-shadow: 0 14px 32px -10px rgba(79, 70, 229, 0.65);
}

.login-submit:active {
    transform: translateY(0);
}

/* ============================================================================
   Consistencia global — utilidades que se ven en todos los módulos
   ============================================================================ */

/* Estado vacío (tablas/listas sin datos) — más intencional que un texto suelto */
.data-table td.muted:only-child,
.data-table tbody tr td[colspan] {
    color: var(--holos-muted);
    padding-top: 1.5rem;
    padding-bottom: 1.5rem;
    text-align: center;
    font-style: normal;
}

/* Métricas KPI: los tiles con surface-1 ganan hover sutil y alineación */
[style*="var(--surface-1)"] {
    transition: transform 0.15s ease, box-shadow 0.15s ease;
}

/* Secciones dentro de card: separador de aire consistente */
.card > section + section,
.card > .section + .section {
    margin-top: 1.25rem;
    padding-top: 1.25rem;
    border-top: 1px solid var(--holos-border);
}

/* Chips/filtros redondeados coherentes */
.chip,
.filter-chip,
[class*="chip"] {
    border-radius: 999px;
}

/* ============================================================================
   Flagship — Dashboard: KPIs con acento color-codeado + elevación al hover
   ============================================================================ */
.reception-kpi {
    border-radius: 12px;
    border-left: 3px solid var(--holos-border-strong);
    transition: transform 0.15s ease, box-shadow 0.18s ease;
}

.reception-kpi:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 24px -10px rgba(15, 23, 42, 0.18);
}

.reception-kpi-value {
    font-size: 1.7rem;
    letter-spacing: -0.02em;
}

.reception-home-kpis .reception-kpi:first-child {
    border-left-color: var(--holos-kpi-arrival);
}

.reception-home-kpis .reception-kpi:nth-child(2) {
    border-left-color: var(--holos-kpi-inhouse);
}

.reception-kpi-info {
    border-left-color: #0284c7;
}

.reception-kpi-warn {
    border-left-color: #d97706;
}

.reception-kpi-accent {
    border-left-color: #1d4ed8;
}

/* ============================================================================
   Consistencia — formularios, badges y estados (vocabulario parejo)
   ============================================================================ */

/* Labels de campo consistentes */
label {
    font-size: 0.8125rem;
    color: var(--holos-text);
}

/* Placeholder más suave */
input::placeholder,
textarea::placeholder {
    color: var(--holos-muted);
    opacity: 0.85;
}

/* Botón secundario/ghost: borde y peso coherentes con el primario */
.btn-ghost,
.btn-secondary {
    font-weight: 500;
}

/* Status pills inline (los <span> con border-radius grande): padding parejo */
[style*="border-radius:20px"],
[style*="border-radius: 20px"],
[style*="border-radius:999px"] {
    display: inline-flex;
    align-items: center;
    padding: 3px 10px;
    font-size: 12px;
    line-height: 1.4;
}

/* Encabezado de tabla sticky solo cuando el contenedor scrollea */
.data-table thead th {
    z-index: 1;
}

/* ============================================================================
   Responsive — pantallas chicas (móvil / tablet)
   ============================================================================ */
@media (max-width: 820px) {
    /* Tablas: scroll horizontal en vez de romper el layout */
    .data-table {
        display: block;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        white-space: nowrap;
    }

    .data-table thead th {
        position: static;
    }

    /* Cards con menos padding y radio en móvil */
    .card {
        padding: 1rem;
        border-radius: 12px;
    }

    /* Títulos de página más contenidos */
    .holos-page-header-main h1,
    .holos-page-header h1 {
        font-size: 1.4rem;
    }

    /* KPIs del dashboard: 2 columnas en móvil */
    .reception-home-kpis {
        grid-template-columns: repeat(2, 1fr) !important;
    }

    /* Grids de métricas inline (auto-fit) se apilan solos; forzamos gap cómodo */
    [style*="grid-template-columns:repeat(auto-fit"],
    [style*="grid-template-columns: repeat(auto-fit"] {
        gap: 10px !important;
    }

    /* Login ocupa mejor el alto en móvil */
    .login-panel {
        padding: 1.75rem 1.5rem 1.5rem;
        max-width: 100%;
    }
}

/* Muy chico (teléfono en vertical): botones full-width en barras de acción */
@media (max-width: 520px) {
    .holos-page-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.75rem;
    }

    .reception-home-kpis {
        grid-template-columns: 1fr 1fr !important;
        gap: 8px;
    }
}

/* ============================================================================
   Hub de módulos (People Ops y similares) — tarjetas de navegación premium
   Arregla el espacio muerto (grid estiraba) + afordancia de clic (hover + flecha)
   ============================================================================ */
.people-ops-hub-grid {
    align-items: start;            /* tarjetas a la altura de su contenido, sin espacio muerto */
    gap: 1rem;
}

.people-ops-hub-card {
    position: relative;
    border-radius: 12px;
    padding: 1.05rem 1.2rem 1.1rem;
    transition: transform 0.15s ease, box-shadow 0.2s ease, border-color 0.15s ease;
}

.people-ops-hub-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 14px 30px -14px rgba(15, 23, 42, 0.22);
    border-color: var(--holos-accent);
}

.people-ops-hub-card-title {
    font-weight: 600;
    letter-spacing: -0.01em;
    padding-right: 1.25rem;         /* espacio para la flecha */
}

.people-ops-hub-card-desc {
    margin-bottom: 0;
    line-height: 1.5;
    color: var(--holos-muted);
}

/* Flecha de navegación que aparece al hover (afordancia de que es clickeable) */
.people-ops-hub-card::after {
    content: "→";
    position: absolute;
    top: 1.05rem;
    right: 1.1rem;
    font-size: 1rem;
    color: var(--holos-accent);
    opacity: 0;
    transform: translateX(-4px);
    transition: opacity 0.15s ease, transform 0.15s ease;
}

.people-ops-hub-card:hover::after {
    opacity: 1;
    transform: translateX(0);
}
