/* =============================================================
   Typography
   ============================================================= */

@import url("https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&display=swap");
@import "variables.css";

/* ── Base ──────────────────────────────────────────────────── */
body {
    font-family: var(--font-family-base);
    font-size: var(--font-size-base);
    font-weight: var(--font-weight-regular);
    line-height: var(--line-height-normal);
    color: var(--color-text);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* ── Headings ──────────────────────────────────────────────── */
h1,
.cb-h1 {
    font-size: var(--font-size-3xl);
    font-weight: var(--font-weight-bold);
    line-height: var(--line-height-tight);
    letter-spacing: var(--letter-spacing-tight);
    color: var(--color-text);
}

h2,
.cb-h2 {
    font-size: var(--font-size-2xl);
    font-weight: var(--font-weight-semibold);
    line-height: var(--line-height-tight);
    letter-spacing: var(--letter-spacing-tight);
    color: var(--color-text);
}

h3,
.cb-h3 {
    font-size: var(--font-size-xl);
    font-weight: var(--font-weight-semibold);
    line-height: var(--line-height-tight);
    color: var(--color-text);
}

h4,
.cb-h4 {
    font-size: var(--font-size-lg);
    font-weight: var(--font-weight-medium);
    line-height: var(--line-height-tight);
    color: var(--color-text);
}

h5,
.cb-h5 {
    font-size: var(--font-size-base);
    font-weight: var(--font-weight-semibold);
    color: var(--color-text);
}

h6,
.cb-h6 {
    font-size: var(--font-size-sm);
    font-weight: var(--font-weight-semibold);
    color: var(--color-muted);
    text-transform: uppercase;
    letter-spacing: var(--letter-spacing-wider);
}

/* ── Body text helpers ─────────────────────────────────────── */
.cb-text-xs {
    font-size: var(--font-size-xs);
}
.cb-text-sm {
    font-size: var(--font-size-sm);
}
.cb-text-base {
    font-size: var(--font-size-base);
}
.cb-text-lg {
    font-size: var(--font-size-lg);
}
.cb-text-xl {
    font-size: var(--font-size-xl);
}
.cb-text-2xl {
    font-size: var(--font-size-2xl);
}
.cb-text-3xl {
    font-size: var(--font-size-3xl);
}

.cb-font-regular {
    font-weight: var(--font-weight-regular);
}
.cb-font-medium {
    font-weight: var(--font-weight-medium);
}
.cb-font-semibold {
    font-weight: var(--font-weight-semibold);
}
.cb-font-bold {
    font-weight: var(--font-weight-bold);
}

.cb-text-muted {
    color: var(--color-muted);
}
.cb-text-primary {
    color: var(--color-primary);
}
.cb-text-danger {
    color: var(--color-danger);
}
.cb-text-success {
    color: var(--color-success);
}
.cb-text-warning {
    color: var(--color-warning);
}
.cb-text-alert {
    color: var(--color-alert);
}

/* ── Page title (Dashboard header) ────────────────────────── */
.cb-page-title {
    font-size: var(--font-size-xl);
    font-weight: var(--font-weight-semibold);
    color: var(--color-text);
    margin: 0;
}

/* ── Section heading (card headers) ────────────────────────── */
.cb-section-title {
    font-size: var(--font-size-base);
    font-weight: var(--font-weight-semibold);
    color: var(--color-text);
}

/* ── Stat / metric large number ─────────────────────────────── */
.cb-stat-value {
    font-size: var(--font-size-2xl);
    font-weight: var(--font-weight-bold);
    letter-spacing: var(--letter-spacing-tight);
    color: var(--color-text);
    line-height: 1;
}

.cb-stat-label {
    font-size: var(--font-size-sm);
    font-weight: var(--font-weight-medium);
    color: var(--color-muted);
}

/* ── Table typography ───────────────────────────────────────── */
.cb-table-header {
    font-size: var(--font-size-xs);
    font-weight: var(--font-weight-semibold);
    text-transform: uppercase;
    letter-spacing: var(--letter-spacing-wide);
    color: var(--color-muted);
}

.cb-table-cell {
    font-size: var(--font-size-sm);
    font-weight: var(--font-weight-regular);
    color: var(--color-text);
}

/* ── Monospace (invoice numbers, batch IDs) ─────────────────── */
.cb-mono {
    font-family: var(--font-family-mono);
    font-size: var(--font-size-sm);
}
