/* ============================================================
   utilities.css — Helper classes
   ============================================================ */

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

.text-muted { color: var(--color-text-muted); }
.text-secondary { color: var(--color-text-secondary); }
.text-success { color: var(--color-success); }
.text-error { color: var(--color-error); }
.text-warning { color: var(--color-warning); }

.text-center { text-align: center; }
.text-right { text-align: right; }
.text-left { text-align: left; }

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

.truncate {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* ─── Spacing ──────────────────────────────────────────────── */
.mt-0 { margin-top: 0; }
.mt-2 { margin-top: var(--space-2); }
.mt-4 { margin-top: var(--space-4); }
.mt-6 { margin-top: var(--space-6); }
.mt-8 { margin-top: var(--space-8); }

.mb-0 { margin-bottom: 0; }
.mb-2 { margin-bottom: var(--space-2); }
.mb-4 { margin-bottom: var(--space-4); }
.mb-6 { margin-bottom: var(--space-6); }
.mb-8 { margin-bottom: var(--space-8); }

.mr-2 { margin-right: var(--space-2); }
.mr-4 { margin-right: var(--space-4); }
.ml-2 { margin-left: var(--space-2); }
.ml-auto { margin-left: auto; }

.p-0 { padding: 0; }
.p-4 { padding: var(--space-4); }
.p-6 { padding: var(--space-6); }

/* ─── Display ──────────────────────────────────────────────── */
.d-none { display: none; }
.d-block { display: block; }
.d-flex { display: flex; }
.d-inline { display: inline; }

.flex-between {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.flex-center {
    display: flex;
    align-items: center;
    justify-content: center;
}

.flex-start {
    display: flex;
    align-items: center;
    justify-content: flex-start;
}

.gap-2 { gap: var(--space-2); }
.gap-3 { gap: var(--space-3); }
.gap-4 { gap: var(--space-4); }

.flex-wrap { flex-wrap: wrap; }
.flex-1 { flex: 1; }
.flex-shrink-0 { flex-shrink: 0; }

/* ─── Width ────────────────────────────────────────────────── */
.w-full { width: 100%; }
.w-auto { width: auto; }
.max-w-sm { max-width: 480px; }
.max-w-md { max-width: 640px; }
.max-w-lg { max-width: 800px; }

/* ─── Borders ──────────────────────────────────────────────── */
.border { border: 1px solid var(--color-border); }
.border-top { border-top: 1px solid var(--color-border); }
.border-bottom { border-bottom: 1px solid var(--color-border); }
.rounded { border-radius: var(--radius-md); }
.rounded-lg { border-radius: var(--radius-lg); }

/* ─── Backgrounds ──────────────────────────────────────────── */
.bg-card { background-color: var(--color-bg-card); }
.bg-alt { background-color: var(--color-bg-alt); }

/* ─── Visibility ───────────────────────────────────────────── */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border-width: 0;
}

/* ─── Print ────────────────────────────────────────────────── */
@media print {
    .no-print { display: none !important; }
    .print-only { display: block !important; }
    body {
        background: #fff;
        color: #000;
        font-size: 12pt;
    }
    .sidebar, .app-header, .btn, form {
        display: none !important;
    }
    .main-content {
        padding: 0;
        max-width: 100%;
    }
}

.print-only { display: none; }
