/* utilities.css — single source of truth for utility classes
 * Loaded by manage/index.html via <link rel="stylesheet" href="utilities.css">
 * Brand color tokens (--black, --gold, --gray, --green, --red) are defined
 * in :root inside manage/index.html and inherit here automatically.
 */

/* ===== LAYOUT ===== */
.flex { display: flex; }
.flex-col { flex-direction: column; }
.flex-wrap { flex-wrap: wrap; }
.items-center { align-items: center; }
.justify-between { justify-content: space-between; }
.justify-center { justify-content: center; }
.gap-1 { gap: 0.5rem; }
.gap-2 { gap: 1rem; }
.gap-3 { gap: 1.5rem; }

/* Composed row primitives — replace common flex patterns */
.row { display: flex; gap: 0.5rem; }
.row-wrap { display: flex; flex-wrap: wrap; gap: 0.5rem; }
.row-split { display: flex; justify-content: space-between; }
.row-between { display: flex; justify-content: space-between; align-items: center; }
.row-between-top { display: flex; justify-content: space-between; align-items: start; }
.col { display: flex; flex-direction: column; }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 0.5rem; }

/* ===== SPACING ===== */
.p-1 { padding: 0.5rem; }
.p-2 { padding: 1rem; }
.p-3 { padding: 1.5rem; }
.m-0 { margin: 0; }
.mb-1 { margin-bottom: 0.5rem; }
.mb-2 { margin-bottom: 1rem; }
.mb-3 { margin-bottom: 1.5rem; }
.mt-1 { margin-top: 0.5rem; }
.mt-2 { margin-top: 1rem; }

/* ===== TYPOGRAPHY ===== */
.text-sm { font-size: 0.875rem; }
.text-xs { font-size: 0.75rem; }
.text-lg { font-size: 1.125rem; }
.text-2xl { font-size: 1.5rem; }
.text-xl { font-size: 1.25rem; }
.text-xs-muted { font-size: 0.75rem; color: #64748b; }
.text-sm-muted { font-size: 0.8rem; color: #64748b; }
.text-body-muted { font-size: 0.85rem; color: #64748b; }
.text-xxs-dim { font-size: 0.65rem; opacity: 0.8; }
.font-bold { font-weight: 700; }
.font-semibold { font-weight: 600; }
.text-center { text-align: center; }
.text-right { text-align: right; }
.text-muted { color: #64748b; }
.text-success { color: var(--green); }
.text-danger { color: var(--red); }
.text-gold { color: var(--gold); }

/* ===== BACKGROUND ===== */
.bg-light { background: var(--gray-light); }
.bg-white { background: white; }

/* ===== BORDER & RADIUS ===== */
.rounded { border-radius: 8px; }
.rounded-sm { border-radius: 4px; }
.shadow-sm { box-shadow: 0 1px 3px rgba(0,0,0,0.1); }
.shadow { box-shadow: 0 2px 8px rgba(0,0,0,0.15); }
.border { border: 1px solid var(--gray); }
.border-gold { border-left: 4px solid var(--gold); }

/* ===== SIZING & DISPLAY ===== */
.w-full { width: 100%; }
.flex-grow { flex: 1; }
.hidden { display: none; }
.overflow-auto { overflow: auto; }
.truncate { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* ===== INTERACTION ===== */
.cursor-pointer { cursor: pointer; }
.no-events { pointer-events: none; }
.transition { transition: all 0.2s ease; }

/* ===== ALERTS ===== */
.alert { padding: 1rem; border-radius: 8px; margin-bottom: 1rem; }
.alert-info { background: #dbeafe; border-left: 4px solid #3b82f6; color: #1e40af; }
.alert-success { background: #dcfce7; border-left: 4px solid var(--green); color: #166534; }
.alert-warning { background: #fef3c7; border-left: 4px solid #f59e0b; color: #92400e; }
.alert-danger { background: #fee2e2; border-left: 4px solid var(--red); color: #991b1b; }

/* ===== CARDS (semantic backgrounds + default md size) ===== */
.card-neutral { background: #f8fafc; border-radius: 6px; padding: 0.75rem; }
.card-info    { background: #f0f9ff; border-radius: 6px; padding: 0.75rem; }
.card-success { background: #f0fdf4; border-radius: 6px; padding: 0.75rem; }
.card-warning { background: #fef3c7; border-radius: 6px; padding: 0.75rem; }
.card-danger  { background: #fef2f2; border-radius: 6px; padding: 0.75rem; }
.card-mint    { background: #ecfdf5; border-radius: 6px; padding: 0.75rem; }
.card-violet  { background: #faf5ff; border-radius: 6px; padding: 0.75rem; }
.card-slate   { background: #f1f5f9; border-radius: 6px; padding: 0.75rem; }
.card-dark    { background: #1e293b; border-radius: 8px; padding: 1rem; color: #e2e8f0; }
.card-darker  { background: #0a0f1a; border-radius: 8px; padding: 1rem; }
/* Size modifiers — must come AFTER color classes so cascade source-order wins */
.card-sm { border-radius: 4px; padding: 0.5rem; }
.card-lg { border-radius: 8px; padding: 1rem; }

/* ===== INPUT-LIKE ===== */
.input-base { padding: 0.5rem; border: 1px solid #ddd; border-radius: 4px; }

/* ===== TEXT COLORS (gaps not in commit 1) ===== */
.text-info     { color: #0369a1; }
.text-warning  { color: #92400e; }
.text-green    { color: #22c55e; }
.text-success-2 { color: #166534; }
.text-muted-2  { color: #94a3b8; }
.text-666      { color: #666; }
.text-888      { color: #888; }
.text-slate    { color: #475569; }
.text-white    { color: white; }
.text-blue     { color: #3b82f6; }
.text-amber    { color: #f59e0b; }
.text-purple   { color: #7c3aed; }
.text-emerald  { color: #059669; }

/* ===== FONT SIZES (gaps; existing covers .text-xs=0.75, .text-sm=0.875, .text-lg=1.125, .text-xl=1.25, .text-2xl=1.5) ===== */
.fs-60  { font-size: 0.6rem; }
.fs-65  { font-size: 0.65rem; }
.fs-70  { font-size: 0.7rem; }
.fs-80  { font-size: 0.8rem; }
.fs-85  { font-size: 0.85rem; }
.fs-90  { font-size: 0.9rem; }
.fs-95  { font-size: 0.95rem; }
.fs-100 { font-size: 1rem; }
.fs-110 { font-size: 1.1rem; }
.fs-120 { font-size: 1.2rem; }
.fs-130 { font-size: 1.3rem; }

/* ===== FONT WEIGHTS (numeric; alongside existing .font-bold and .font-semibold) ===== */
.fw-600 { font-weight: 600; }
.fw-700 { font-weight: 700; }

/* ===== MISC ===== */
.opacity-80 { opacity: 0.8; }
.opacity-50 { opacity: 0.5; }
.whitespace-nowrap { white-space: nowrap; }
.maxw-400 { max-width: 400px; }
.maxw-450 { max-width: 450px; }
.maxw-500 { max-width: 500px; }
.maxw-550 { max-width: 550px; }
.maxw-600 { max-width: 600px; }
.maxw-700 { max-width: 700px; }
