/* ── Base elements ─────────────────────────────────────────────────────── */
body {
    font-family: var(--font-sans);
    font-size: var(--fs-base);
    color: var(--text);
    background: var(--bg);
    transition: background-color .15s ease, color .15s ease;
}

h1 { font-size: var(--fs-2xl); }
h2 { font-size: var(--fs-lg); }
h3 { font-size: var(--fs-base); }

a { color: var(--primary); }
a:hover { color: var(--primary-hover); }

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

/* ── Buttons ───────────────────────────────────────────────────────────── */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: var(--sp-2);
    padding: .55rem .95rem;
    font-size: var(--fs-sm);
    font-weight: 500;
    border-radius: var(--radius);
    border: 1px solid var(--border-strong);
    background: var(--surface);
    color: var(--text);
    transition: background-color .12s ease, border-color .12s ease, opacity .12s ease;
}
.btn:hover { background: var(--surface-2); }
.btn:disabled { opacity: .55; cursor: not-allowed; }

.btn--primary {
    background: var(--primary);
    border-color: var(--primary);
    color: var(--primary-contrast);
}
.btn--primary:hover { background: var(--primary-hover); border-color: var(--primary-hover); }

.btn--block { width: 100%; }

/* ── Alerts ────────────────────────────────────────────────────────────── */
.alert {
    padding: .7rem .9rem;
    border-radius: var(--radius);
    font-size: var(--fs-sm);
    margin-bottom: var(--sp-4);
    border: 1px solid transparent;
}
.alert--success { background: var(--success-soft); color: var(--success); border-color: color-mix(in srgb, var(--success) 25%, transparent); }
.alert--error   { background: var(--danger-soft);  color: var(--danger);  border-color: color-mix(in srgb, var(--danger) 25%, transparent); }

/* ── Badge ─────────────────────────────────────────────────────────────── */
.badge {
    display: inline-block;
    padding: .12rem .5rem;
    font-size: var(--fs-xs);
    font-weight: 500;
    border-radius: 999px;
    background: var(--primary-soft);
    color: var(--primary);
}

/* ── Forms ─────────────────────────────────────────────────────────────── */
.form { display: flex; flex-direction: column; gap: var(--sp-4); }

.field { display: flex; flex-direction: column; gap: var(--sp-2); }
.field label { font-size: var(--fs-sm); font-weight: 500; color: var(--text); }

.field input[type="text"],
.field input[type="email"],
.field input[type="password"],
.field input[type="search"],
.field textarea,
.field select {
    width: 100%;
    padding: .6rem .75rem;
    font-size: var(--fs-base);
    color: var(--text);
    background: var(--surface);
    border: 1px solid var(--border-strong);
    border-radius: var(--radius);
    transition: border-color .12s ease, box-shadow .12s ease;
}
.field input:focus,
.field textarea:focus,
.field select:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px var(--ring);
}
.field input.is-invalid { border-color: var(--danger); }
.field__error { font-size: var(--fs-xs); color: var(--danger); }

/* ── Utility ───────────────────────────────────────────────────────────── */
.detail-list { display: grid; gap: var(--sp-3); }
.detail-list > div { display: flex; justify-content: space-between; gap: var(--sp-4); font-size: var(--fs-sm); }
.detail-list dt { color: var(--text-muted); }
.detail-list dd { color: var(--text); text-align: right; }

.check-list { display: grid; gap: var(--sp-2); }
.check-list li { position: relative; padding-left: 1.4rem; font-size: var(--fs-sm); color: var(--text); }
.check-list li::before {
    content: "✓";
    position: absolute;
    left: 0;
    color: var(--success);
    font-weight: 700;
}
