/* ===========================================================================
   Travisa ERP · Primitivo: texto

   Las clases de texto que se repiten en todas las vistas. Si una vista
   necesita un tamaño o un peso distinto, primero se busca aquí.
   =========================================================================== */

@layer primitives {

    /* ── Títulos ───────────────────────────────────────────────────────── */

    .page-title {
        color: var(--color-text-strong);
        font-size: var(--text-xl);
        font-weight: var(--weight-semibold);
        line-height: var(--leading-tight);
    }

    .page-subtitle {
        margin-top: var(--space-1);
        color: var(--color-text-muted);
        font-size: var(--text-base);
    }

    .section-title {
        color: var(--color-text-strong);
        font-size: var(--text-md);
        font-weight: var(--weight-semibold);
        line-height: var(--leading-tight);
    }

    /* ── Texto de apoyo ────────────────────────────────────────────────── */

    .text-muted {
        color: var(--color-text-muted);
    }

    .text-subtle {
        color: var(--color-text-subtle);
    }

    .text-sm {
        font-size: var(--text-sm);
    }

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

    /* Etiqueta pequeña en mayúsculas, para encabezar un grupo. */
    .label-caps {
        color: var(--color-text-muted);
        font-size: var(--text-xs);
        font-weight: var(--weight-semibold);
        letter-spacing: var(--tracking-wide);
        text-transform: uppercase;
    }

    /* Ayuda debajo de un control o junto a una acción. */
    .hint {
        color: var(--color-text-muted);
        font-size: var(--text-xs);
        line-height: var(--leading-snug);
    }

    /* ── Cifras ────────────────────────────────────────────────────────────
       Inter con cifras tabulares: se alinean por columna igual que una
       monoespaciada, y se leen mejor en tablas largas. Todo monto y toda
       cantidad usa esta clase. */

    .num {
        font-variant-numeric: tabular-nums;
        text-align: right;
        white-space: nowrap;
    }

    .num--strong {
        font-weight: var(--weight-semibold);
        color: var(--color-text-strong);
    }

    /* Un saldo en cero se muestra apagado, nunca vacío. */
    .num--zero {
        color: var(--color-text-subtle);
    }

    .num--negative {
        color: var(--color-danger-fg);
    }

    /* ── Identificadores ───────────────────────────────────────────────────
       JetBrains Mono solo aquí: RFC, UUID, folios, referencias bancarias y
       CLABE, donde distinguir 0/O y 1/l importa. */

    .mono {
        font-family: var(--font-mono);
        font-size: var(--text-sm);
        letter-spacing: var(--tracking-wide);
        /* Un identificador no se parte en dos renglones: se lee carácter por
           carácter. El UUID es la excepción y tiene su propia clase. */
        white-space: nowrap;
    }

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

    /* UUID: largo y rara vez se lee completo. */
    .mono--uuid {
        font-family: var(--font-mono);
        font-size: var(--text-xs);
        color: var(--color-text-muted);
        word-break: break-all;
    }
}
