/* ==========================================================================
   Josh's API — shared stylesheet
   ========================================================================== */

:root {
    --bg: #f6f7f9;
    --surface: #ffffff;
    --surface-2: #f1f3f6;
    --border: #e2e5ea;
    --border-strong: #cdd2da;
    --text: #151a23;
    --text-muted: #5b6475;
    --text-subtle: #8a92a3;

    --accent: #2563eb;
    --accent-hover: #1d4ed8;
    --accent-soft: #e8efff;
    --accent-text: #1d4ed8;
    --on-accent: #ffffff;

    --danger: #dc2626;
    --danger-hover: #b91c1c;
    --danger-soft: #fdecec;
    --success: #16a34a;
    --success-soft: #e8f7ee;
    --warning-soft: #fff6e0;

    --radius-sm: 6px;
    --radius: 10px;
    --radius-lg: 16px;
    --shadow-sm: 0 1px 2px rgb(16 24 40 / 0.06);
    --shadow: 0 1px 3px rgb(16 24 40 / 0.08), 0 4px 12px rgb(16 24 40 / 0.05);
    --shadow-lg: 0 12px 32px rgb(16 24 40 / 0.14);
    --focus-ring: 0 0 0 3px rgb(37 99 235 / 0.35);

    --font: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    --font-mono: ui-monospace, "Cascadia Code", "SF Mono", Menlo, Consolas, monospace;

    color-scheme: light;
}

@media (prefers-color-scheme: dark) {
    :root {
        --bg: #0e1117;
        --surface: #161b24;
        --surface-2: #1d2430;
        --border: #262e3b;
        --border-strong: #354052;
        --text: #e7eaf0;
        --text-muted: #a1aabb;
        --text-subtle: #737d90;

        --accent: #4f8cff;
        --accent-hover: #6b9fff;
        --accent-soft: #1a2747;
        --accent-text: #8db4ff;
        --on-accent: #0b1020;

        --danger: #f05252;
        --danger-hover: #f87171;
        --danger-soft: #3a1717;
        --success: #34d399;
        --success-soft: #11291f;
        --warning-soft: #33290f;

        --shadow-sm: 0 1px 2px rgb(0 0 0 / 0.4);
        --shadow: 0 1px 3px rgb(0 0 0 / 0.4), 0 4px 12px rgb(0 0 0 / 0.25);
        --shadow-lg: 0 12px 32px rgb(0 0 0 / 0.5);
        --focus-ring: 0 0 0 3px rgb(79 140 255 / 0.45);

        color-scheme: dark;
    }
}

/* ---------- Base ---------- */

*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
    margin: 0;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    font-family: var(--font);
    font-size: 16px;
    line-height: 1.55;
    color: var(--text);
    background: var(--bg);
    -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4 { line-height: 1.25; margin: 0; letter-spacing: -0.01em; }

a { color: var(--accent-text); text-decoration: none; }
a:hover { text-decoration: underline; }

:focus-visible { outline: none; box-shadow: var(--focus-ring); border-radius: var(--radius-sm); }

.icon { width: 1.1em; height: 1.1em; flex-shrink: 0; vertical-align: -0.15em; }

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

/* ---------- Site header ---------- */

.site-header {
    position: sticky;
    top: 0;
    z-index: 50;
    background: color-mix(in srgb, var(--surface) 88%, transparent);
    backdrop-filter: saturate(180%) blur(10px);
    border-bottom: 1px solid var(--border);
    min-height: 60px;
}

.site-header-inner {
    max-width: 1120px;
    margin: 0 auto;
    padding: 0 24px;
    height: 60px;
    display: flex;
    align-items: center;
    gap: 24px;
}

.brand {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-weight: 700;
    font-size: 1.05rem;
    color: var(--text);
    white-space: nowrap;
}
.brand:hover { text-decoration: none; }

.brand-mark {
    display: grid;
    place-items: center;
    width: 30px;
    height: 30px;
    border-radius: 8px;
    background: var(--accent);
    color: var(--on-accent);
    font-family: var(--font-mono);
    font-size: 0.8rem;
    font-weight: 700;
}

.site-nav { display: flex; gap: 4px; flex: 1; }

.site-nav a {
    padding: 6px 12px;
    border-radius: var(--radius-sm);
    color: var(--text-muted);
    font-weight: 500;
    font-size: 0.95rem;
}
.site-nav a:hover { color: var(--text); background: var(--surface-2); text-decoration: none; }
.site-nav a[aria-current="page"] { color: var(--accent-text); background: var(--accent-soft); }

.site-header-actions { display: flex; align-items: center; gap: 8px; margin-left: auto; }

.auth-status {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 0.85rem;
    color: var(--text-muted);
}
.auth-status::before {
    content: "";
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--success);
}

@media (max-width: 720px) {
    .site-header-inner { padding: 0 16px; gap: 12px; height: auto; min-height: 56px; flex-wrap: wrap; }
    .brand-text { display: none; }
    .site-nav { order: 3; flex-basis: 100%; overflow-x: auto; padding-bottom: 8px; }
    .auth-status { display: none; }
}

/* ---------- Layout ---------- */

main {
    flex: 1;
    width: 100%;
    max-width: 1120px;
    margin: 0 auto;
    padding: 40px 24px 64px;
}

main.narrow { max-width: 720px; }

@media (max-width: 720px) {
    main { padding: 24px 16px 48px; }
}

.breadcrumbs {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px;
    margin-bottom: 12px;
    font-size: 0.875rem;
    color: var(--text-subtle);
}
.breadcrumbs a { color: var(--text-muted); }
.breadcrumbs span[aria-hidden] { color: var(--text-subtle); }

.page-header {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-end;
    justify-content: space-between;
    gap: 16px 24px;
    margin-bottom: 28px;
}

.page-title { font-size: 2rem; font-weight: 750; }
.page-subtitle { margin: 6px 0 0; color: var(--text-muted); max-width: 60ch; }

.page-actions { display: flex; flex-wrap: wrap; gap: 8px; }

@media (max-width: 720px) {
    .page-title { font-size: 1.6rem; }
}

.section + .section { margin-top: 40px; }
.section-title {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 1.15rem;
    font-weight: 650;
    margin-bottom: 14px;
}

/* ---------- Buttons ---------- */

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 38px;
    padding: 8px 16px;
    border: 1px solid transparent;
    border-radius: var(--radius-sm);
    font: inherit;
    font-size: 0.925rem;
    font-weight: 600;
    line-height: 1.2;
    white-space: nowrap;
    cursor: pointer;
    text-decoration: none;
    transition: background-color 0.15s, border-color 0.15s, color 0.15s, transform 0.05s;
}
.btn:hover { text-decoration: none; }
.btn:active:not(:disabled) { transform: translateY(1px); }
.btn:disabled { opacity: 0.55; cursor: not-allowed; }

.btn-primary { background: var(--accent); color: var(--on-accent); }
.btn-primary:hover:not(:disabled) { background: var(--accent-hover); }

.btn-secondary { background: var(--surface); color: var(--text); border-color: var(--border-strong); box-shadow: var(--shadow-sm); }
.btn-secondary:hover:not(:disabled) { background: var(--surface-2); }

.btn-ghost { background: transparent; color: var(--text-muted); }
.btn-ghost:hover:not(:disabled) { background: var(--surface-2); color: var(--text); }

.btn-danger { background: var(--danger); color: #fff; }
.btn-danger:hover:not(:disabled) { background: var(--danger-hover); }

.btn-danger-ghost { background: transparent; color: var(--danger); }
.btn-danger-ghost:hover:not(:disabled) { background: var(--danger-soft); }

.btn-sm { min-height: 32px; padding: 5px 10px; font-size: 0.85rem; }
.btn-icon { width: 32px; min-height: 32px; padding: 0; }
.btn-block { width: 100%; }

.btn .lock-badge { opacity: 0.7; }

.btn.is-busy { position: relative; color: transparent !important; pointer-events: none; }
.btn.is-busy::after {
    content: "";
    position: absolute;
    width: 16px;
    height: 16px;
    border: 2px solid currentColor;
    border-color: var(--on-accent) var(--on-accent) transparent transparent;
    border-radius: 50%;
    animation: spin 0.7s linear infinite;
}
.btn-secondary.is-busy::after { border-color: var(--text) var(--text) transparent transparent; }
.btn-danger.is-busy::after { border-color: #fff #fff transparent transparent; }

@keyframes spin { to { transform: rotate(360deg); } }

/* ---------- Cards ---------- */

.card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
}

.card-body { padding: 24px; }
.card-header { padding: 20px 24px 0; }
.card-title { font-size: 1.1rem; font-weight: 650; }
.card-subtitle { margin: 4px 0 0; color: var(--text-muted); font-size: 0.925rem; }

.card + .card { margin-top: 20px; }

@media (max-width: 720px) {
    .card-body { padding: 18px; }
    .card-header { padding: 16px 18px 0; }
}

/* ---------- Home ---------- */

.hero { padding: 24px 0 36px; }
.hero h1 { font-size: 2.6rem; font-weight: 800; letter-spacing: -0.02em; }
.hero p { margin: 10px 0 0; font-size: 1.1rem; color: var(--text-muted); max-width: 56ch; }

@media (max-width: 720px) {
    .hero { padding: 8px 0 24px; }
    .hero h1 { font-size: 2rem; }
}

.resource-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 16px;
}

.resource-card {
    position: relative;
    display: flex;
    flex-direction: column;
    gap: 14px;
    padding: 22px;
    color: var(--text);
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    transition: border-color 0.15s, box-shadow 0.15s, transform 0.15s;
}
.resource-card:hover {
    text-decoration: none;
    border-color: var(--accent);
    box-shadow: var(--shadow);
    transform: translateY(-2px);
}

.resource-icon {
    display: grid;
    place-items: center;
    width: 44px;
    height: 44px;
    border-radius: 12px;
    background: var(--accent-soft);
    color: var(--accent-text);
}
.resource-icon .icon { width: 22px; height: 22px; }

.resource-card h2 { font-size: 1.15rem; font-weight: 650; }
.resource-card p { margin: 4px 0 0; color: var(--text-muted); font-size: 0.925rem; }

.resource-meta {
    margin-top: auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 0.85rem;
    color: var(--text-subtle);
}
.resource-meta .arrow { color: var(--accent-text); transition: transform 0.15s; }
.resource-card:hover .arrow { transform: translateX(3px); }

/* ---------- Toolbar / search ---------- */

.toolbar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 18px;
}

.search {
    position: relative;
    flex: 1;
    max-width: 360px;
    min-width: 200px;
}
.search .icon {
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-subtle);
    pointer-events: none;
}
.search input[type="search"] { padding-left: 38px; }

.count-label { font-size: 0.875rem; color: var(--text-subtle); }

/* ---------- Item lists (projects / skills) ---------- */

.item-list { display: grid; gap: 14px; }

.item-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 16px;
}

.item {
    display: flex;
    flex-direction: column;
    gap: 12px;
    padding: 20px 22px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    transition: border-color 0.15s, box-shadow 0.15s;
}
.item:hover { border-color: var(--border-strong); box-shadow: var(--shadow); }

.item-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
}

.item-order {
    font-family: var(--font-mono);
    font-size: 0.8rem;
    color: var(--text-subtle);
    margin-right: 8px;
}

.item-title { font-size: 1.15rem; font-weight: 650; }
.item-title a { color: var(--text); display: inline-flex; align-items: center; gap: 6px; }
.item-title a:hover { color: var(--accent-text); text-decoration: none; }
.item-title a .icon { width: 0.85em; height: 0.85em; color: var(--text-subtle); }

.item-desc { margin: 0; color: var(--text-muted); }
.item-desc a { text-decoration: underline; text-underline-offset: 2px; }

.item-foot {
    margin-top: auto;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding-top: 12px;
    border-top: 1px solid var(--border);
}

.item-actions { display: flex; flex-wrap: wrap; gap: 4px; }
.item-actions .divider { width: 1px; align-self: stretch; margin: 4px 4px; background: var(--border); }

.chips { display: flex; flex-wrap: wrap; gap: 6px; margin: 0; padding: 0; list-style: none; }

.chip {
    display: inline-flex;
    align-items: center;
    padding: 2px 10px;
    font-size: 0.8rem;
    font-weight: 500;
    color: var(--text-muted);
    background: var(--surface-2);
    border: 1px solid var(--border);
    border-radius: 999px;
}
.chip-accent { color: var(--accent-text); background: var(--accent-soft); border-color: transparent; }

/* ---------- Empty / loading states ---------- */

.empty {
    padding: 48px 24px;
    text-align: center;
    color: var(--text-muted);
    background: var(--surface);
    border: 1px dashed var(--border-strong);
    border-radius: var(--radius-lg);
}
.empty .icon { width: 32px; height: 32px; color: var(--text-subtle); margin-bottom: 8px; }
.empty h3 { color: var(--text); font-size: 1.05rem; margin-bottom: 4px; }
.empty p { margin: 0 0 16px; }

.skeleton {
    border-radius: var(--radius-lg);
    background: linear-gradient(90deg, var(--surface) 0%, var(--surface-2) 50%, var(--surface) 100%);
    background-size: 200% 100%;
    border: 1px solid var(--border);
    animation: shimmer 1.2s ease-in-out infinite;
    min-height: 140px;
}
@keyframes shimmer { from { background-position: 100% 0; } to { background-position: -100% 0; } }

/* ---------- Notices ---------- */

.notice {
    display: flex;
    gap: 10px;
    align-items: flex-start;
    padding: 12px 14px;
    border-radius: var(--radius);
    font-size: 0.9rem;
    color: var(--text);
    background: var(--accent-soft);
}
.notice .icon { margin-top: 2px; color: var(--accent-text); }
.notice-warning { background: var(--warning-soft); }
.notice-warning .icon { color: #b45309; }
.notice-danger { background: var(--danger-soft); }
.notice-danger .icon { color: var(--danger); }
.notice code { font-family: var(--font-mono); font-size: 0.85em; }

/* ---------- Forms ---------- */

.form { display: grid; gap: 20px; }
.form fieldset { border: 0; margin: 0; padding: 0; min-width: 0; display: grid; gap: 20px; }
.form fieldset:disabled { opacity: 0.55; }

.field { display: grid; gap: 6px; }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
@media (max-width: 600px) { .field-row { grid-template-columns: 1fr; } }

.field label, .label {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text);
}
.field label .req { color: var(--danger); margin-left: 2px; }
.field label .opt { color: var(--text-subtle); font-weight: 400; margin-left: 4px; }

.hint { font-size: 0.825rem; color: var(--text-subtle); margin: 0; }
.hint code {
    font-family: var(--font-mono);
    font-size: 0.95em;
    padding: 1px 5px;
    border-radius: 4px;
    background: var(--surface-2);
    color: var(--text-muted);
}

.field-meta { display: flex; justify-content: space-between; gap: 12px; }
.char-count { font-size: 0.8rem; color: var(--text-subtle); white-space: nowrap; font-variant-numeric: tabular-nums; }

input[type="text"], input[type="url"], input[type="password"], input[type="search"],
textarea, select {
    width: 100%;
    padding: 9px 12px;
    font: inherit;
    font-size: 0.95rem;
    color: var(--text);
    background: var(--surface);
    border: 1px solid var(--border-strong);
    border-radius: var(--radius-sm);
    transition: border-color 0.15s, box-shadow 0.15s;
}
input::placeholder, textarea::placeholder { color: var(--text-subtle); }
input:focus, textarea:focus, select:focus { outline: none; border-color: var(--accent); box-shadow: var(--focus-ring); }
textarea { min-height: 96px; resize: vertical; }
select {
    appearance: none;
    padding-right: 36px;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%238a92a3' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 10px center;
    background-size: 18px;
    cursor: pointer;
}
select:disabled, input:disabled, textarea:disabled { cursor: not-allowed; background-color: var(--surface-2); }

.input-group { position: relative; }
.input-group input { padding-right: 44px; }
.input-group .btn { position: absolute; right: 4px; top: 50%; transform: translateY(-50%); }

.chip-preview { min-height: 24px; }
.chip-preview:empty { display: none; }

.rich-preview {
    padding: 12px 14px;
    border-radius: var(--radius-sm);
    background: var(--surface-2);
    color: var(--text-muted);
    font-size: 0.925rem;
}
.rich-preview:empty { display: none; }
.rich-preview::before {
    content: "Preview";
    display: block;
    margin-bottom: 4px;
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--text-subtle);
}
.rich-preview a { text-decoration: underline; }

.form-actions {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 8px;
    padding-top: 4px;
}

.form-error { display: none; }
.form-error.is-visible { display: flex; }

/* File drop zone */
.dropzone {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 28px 20px;
    text-align: center;
    border: 2px dashed var(--border-strong);
    border-radius: var(--radius);
    background: var(--surface-2);
    color: var(--text-muted);
    cursor: pointer;
    transition: border-color 0.15s, background-color 0.15s;
}
.dropzone:hover, .dropzone.is-dragover { border-color: var(--accent); background: var(--accent-soft); }
.dropzone:focus-within { border-color: var(--accent); box-shadow: var(--focus-ring); }
.dropzone input[type="file"] { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
.dropzone .icon { width: 28px; height: 28px; color: var(--accent-text); }
.dropzone strong { color: var(--text); }
.dropzone .file-name { font-family: var(--font-mono); font-size: 0.85rem; color: var(--accent-text); word-break: break-all; }
.dropzone.has-file { border-style: solid; border-color: var(--accent); }

.progress {
    height: 8px;
    border-radius: 999px;
    background: var(--surface-2);
    overflow: hidden;
    display: none;
}
.progress.is-visible { display: block; }
.progress-bar { height: 100%; width: 0; background: var(--accent); transition: width 0.15s; }

.or-divider {
    display: flex;
    align-items: center;
    gap: 14px;
    margin: 28px 0;
    color: var(--text-subtle);
    font-size: 0.8rem;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}
.or-divider::before, .or-divider::after { content: ""; flex: 1; height: 1px; background: var(--border); }

/* ---------- Auth pages ---------- */

.auth-page {
    flex: 1;
    display: grid;
    place-items: center;
    padding: 40px 16px;
}
.auth-card { width: 100%; max-width: 400px; }
.auth-card .card-body { padding: 32px; }
.auth-card h1 { font-size: 1.5rem; font-weight: 750; }
.auth-card .card-subtitle { margin-bottom: 24px; }
@media (max-width: 480px) { .auth-card .card-body { padding: 24px; } }

/* ---------- Apps page ---------- */

.app-list { display: grid; gap: 12px; }

.app-row {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
}

.app-row-head {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 12px 16px;
    padding: 16px 20px;
}

.app-name { font-weight: 650; font-size: 1.05rem; text-transform: capitalize; }
.app-row-head .chips { flex: 1; }

.app-row details { border-top: 1px solid var(--border); }
.app-row summary {
    padding: 10px 20px;
    font-size: 0.875rem;
    color: var(--text-muted);
    cursor: pointer;
    list-style: none;
    display: flex;
    align-items: center;
    gap: 6px;
}
.app-row summary::-webkit-details-marker { display: none; }
.app-row summary .icon { transition: transform 0.15s; }
.app-row details[open] summary .icon { transform: rotate(180deg); }
.app-row summary:hover { color: var(--text); }

.version-table { width: 100%; border-collapse: collapse; font-size: 0.9rem; }
.version-table th, .version-table td { padding: 10px 20px; text-align: left; border-top: 1px solid var(--border); }
.version-table th { font-size: 0.75rem; text-transform: uppercase; letter-spacing: 0.05em; color: var(--text-subtle); font-weight: 600; }
.version-table td:last-child, .version-table th:last-child { text-align: right; }
.version-table code { font-family: var(--font-mono); font-size: 0.85rem; }

/* ---------- Toasts ---------- */

.toast-region {
    position: fixed;
    right: 20px;
    bottom: 20px;
    z-index: 100;
    display: flex;
    flex-direction: column;
    gap: 10px;
    width: min(380px, calc(100vw - 32px));
}
@media (max-width: 480px) { .toast-region { right: 16px; bottom: 16px; } }

.toast {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 12px 14px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-left: 4px solid var(--accent);
    border-radius: var(--radius);
    box-shadow: var(--shadow-lg);
    font-size: 0.925rem;
    animation: toast-in 0.2s ease-out;
}
.toast.is-leaving { animation: toast-out 0.18s ease-in forwards; }
.toast .icon { margin-top: 2px; color: var(--accent-text); }
.toast-success { border-left-color: var(--success); }
.toast-success .icon { color: var(--success); }
.toast-error { border-left-color: var(--danger); }
.toast-error .icon { color: var(--danger); }
.toast-msg { flex: 1; }
.toast-msg a { font-weight: 600; margin-left: 4px; }
.toast-close {
    border: 0; background: none; padding: 2px; color: var(--text-subtle); cursor: pointer; border-radius: 4px;
}
.toast-close:hover { color: var(--text); }

@keyframes toast-in { from { opacity: 0; transform: translateY(8px); } }
@keyframes toast-out { to { opacity: 0; transform: translateY(8px); } }

/* ---------- Dialog ---------- */

.dialog {
    width: min(420px, calc(100vw - 32px));
    padding: 0;
    color: var(--text);
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
}
.dialog::backdrop { background: rgb(10 14 22 / 0.5); backdrop-filter: blur(2px); }
.dialog-body { padding: 24px; }
.dialog-body h2 { font-size: 1.15rem; margin-bottom: 8px; }
.dialog-body p { margin: 0; color: var(--text-muted); }
.dialog-actions {
    display: flex;
    justify-content: flex-end;
    gap: 8px;
    padding: 14px 24px;
    background: var(--surface-2);
    border-top: 1px solid var(--border);
    border-radius: 0 0 var(--radius-lg) var(--radius-lg);
}

/* ---------- Small fixes ---------- */

.form > .card + .card { margin-top: 0; }
.toolbar .section-title { margin-bottom: 0; }
.item-desc code, .card code {
    font-family: var(--font-mono);
    font-size: 0.85em;
    padding: 1px 5px;
    border-radius: 4px;
    background: var(--surface-2);
}

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; }
}
