/* oat.css v0.9.0 — minimal semantic CSS. No dependencies. */
/* See: https://oat.ink */

/* --- Tokens --- */
:root {
    --color-fg: #1a1a1a;
    --color-bg: #fff;
    --color-border: #e0e0e0;
    --color-primary: #0066cc;
    --color-bg-hover: #f5f5f5;
    --color-success: #28a745;
    --color-warning: #ffc107;
    --color-error: #dc3545;
    --radius: 4px;
    --shadow: 0 1px 3px rgba(0,0,0,0.1);
}

/* --- Reset (minimal) --- */
*, *::before, *::after { box-sizing: border-box; }
html { font-size: 16px; }
body {
    margin: 0;
    font-family: system-ui, -apple-system, sans-serif;
    color: var(--color-fg);
    background: var(--color-bg);
    line-height: 1.5;
}

/* --- Typography --- */
h1 { font-size: 1.5rem; font-weight: 600; margin: 0.5em 0; }
h2 { font-size: 1.25rem; font-weight: 600; margin: 0.5em 0; }
h3 { font-size: 1.125rem; font-weight: 600; margin: 0.5em 0; }
p { margin: 0.5em 0; }
small { font-size: 0.875rem; }

/* --- Links --- */
a { color: var(--color-primary); text-decoration: none; }
a:hover { text-decoration: underline; }

/* --- Buttons --- */
button, .btn {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    padding: 0.375rem 0.75rem;
    border: 1px solid var(--color-border);
    border-radius: var(--radius);
    background: var(--color-bg);
    color: var(--color-fg);
    cursor: pointer;
    font-size: 0.875rem;
    font-family: inherit;
    transition: background 0.15s;
}
button:hover, .btn:hover {
    background: var(--color-bg-hover);
}
button.primary, .btn.primary {
    background: var(--color-primary);
    color: white;
    border-color: var(--color-primary);
}
button.primary:hover, .btn.primary:hover {
    opacity: 0.9;
}
button:disabled, .btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* --- Inputs --- */
input, select, textarea {
    padding: 0.375rem 0.75rem;
    border: 1px solid var(--color-border);
    border-radius: var(--radius);
    font-size: 0.875rem;
    font-family: inherit;
    background: var(--color-bg);
    color: var(--color-fg);
    width: 100%;
}
input:focus, select:focus, textarea:focus {
    outline: none;
    border-color: var(--color-primary);
    box-shadow: 0 0 0 2px rgba(0,102,204,0.2);
}

/* --- Tables --- */
table {
    width: 100%;
    border-collapse: collapse;
}
th, td {
    padding: 0.5rem 0.75rem;
    text-align: left;
    border-bottom: 1px solid var(--color-border);
}
th {
    font-weight: 600;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

/* --- Dialogs --- */
dialog {
    border: 1px solid var(--color-border);
    border-radius: 8px;
    padding: 1.5rem;
    max-width: 480px;
    width: 90%;
    background: var(--color-bg);
    box-shadow: var(--shadow);
}
dialog::backdrop {
    background: rgba(0,0,0,0.4);
}

/* --- Badges --- */
.badge {
    display: inline-block;
    padding: 0.125rem 0.375rem;
    border-radius: 3px;
    font-size: 0.75rem;
    font-weight: 500;
    text-transform: uppercase;
}
.badge.success { background: #d4edda; color: #155724; }
.badge.warning { background: #fff3cd; color: #856404; }
.badge.error { background: #f8d7da; color: #721c24; }
.badge.info { background: #cce5ff; color: #004085; }

/* --- Utilities --- */
.hidden { display: none !important; }
.flex { display: flex; }
.flex-wrap { flex-wrap: wrap; }
.gap-1 { gap: 0.5rem; }
.gap-2 { gap: 1rem; }
.text-center { text-align: center; }
.text-right { text-align: right; }
