h1:focus {
    outline: none;
}

.valid.modified:not([type=checkbox]) {
    outline: 1px solid #26b050;
}

.invalid {
    outline: 1px solid #e50000;
}

.validation-message {
    color: #e50000;
}

.blazor-error-boundary {
    background: #b32121;
    padding: 1rem 1rem 1rem 1.5rem;
    color: white;
}

    .blazor-error-boundary::after {
        content: "Ocurrió un error."
    }

* {
    box-sizing: border-box;
}

:root {
    --navy: #1b2a41;
    --navy-light: #2a3d5c;
    --ink: #1c2530;
    --muted: #64748b;
    --border: #dde2ea;
    --surface: #ffffff;
    --surface-alt: #f6f8fb;
    --bg: #f1f4f8;
    --ok-bg: #d9f2e3;
    --ok-fg: #16703a;
    --warn-bg: #fff3cd;
    --warn-fg: #8a6d00;
    --bad-bg: #fde2e2;
    --bad-fg: #a3241e;
    --radius: 8px;
    --shadow: 0 1px 2px rgba(20, 30, 50, .04), 0 4px 14px -6px rgba(20, 30, 50, .1);
}

body {
    font-family: -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
    margin: 0;
    background: var(--bg);
    color: var(--ink);
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
}

.top-nav {
    background: var(--navy);
    padding: 0.85rem 1.75rem;
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.35rem 1.5rem;
}

.top-nav a {
    color: rgba(255, 255, 255, .88);
    text-decoration: none;
    font-weight: 600;
    font-size: 0.92rem;
    padding: 0.25rem 0;
    border-bottom: 2px solid transparent;
    transition: color .12s ease, border-color .12s ease;
}

.top-nav a:hover {
    color: #fff;
    border-bottom-color: rgba(255, 255, 255, .5);
}

.top-nav a:first-child {
    margin-right: auto;
    font-weight: 700;
    color: #fff;
}

.top-nav .muted {
    color: rgba(255, 255, 255, .6);
    font-size: 0.85rem;
}

main {
    max-width: 1180px;
    margin: 0 auto;
    padding: 2rem 1.75rem 4rem;
}

main > p.muted:first-of-type,
h1 + p.muted {
    margin-top: -0.4rem;
    margin-bottom: 1.75rem;
    font-size: 0.98rem;
}

h1 {
    font-size: 1.65rem;
    font-weight: 750;
    letter-spacing: -0.01em;
    margin: 0 0 0.4rem;
    color: var(--navy);
}

h2 {
    font-size: 1.15rem;
    font-weight: 700;
    margin: 0 0 0.75rem;
}

fieldset.section {
    border: 1px solid var(--border);
    background: var(--surface);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    margin: 0 0 1.5rem;
    padding: 1.1rem 1.35rem 1.35rem;
}

fieldset.section legend {
    padding: 0 0.5rem;
    font-weight: 700;
    font-size: 0.95rem;
    color: var(--navy);
}

fieldset.section + fieldset.section {
    margin-top: 1.5rem;
}

.field {
    margin-bottom: 0.9rem;
    display: flex;
    flex-direction: column;
    gap: 0.3rem;
    max-width: 480px;
}

.field label {
    font-weight: 600;
    font-size: 0.85rem;
    color: var(--muted);
}

.field input, .field select, .field textarea,
select {
    padding: 0.5rem 0.6rem;
    border: 1px solid var(--border);
    border-radius: 6px;
    font-size: 0.92rem;
    font-family: inherit;
    background: var(--surface);
    color: var(--ink);
}

.field input:focus, .field select:focus, .field textarea:focus,
input:focus, select:focus, textarea:focus {
    outline: 2px solid var(--navy-light);
    outline-offset: 1px;
}

.actions {
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap;
}

.btn-primary {
    display: inline-block;
    background: var(--navy);
    color: white;
    border: none;
    padding: 0.55rem 1.1rem;
    border-radius: 6px;
    font-weight: 600;
    font-size: 0.9rem;
    text-decoration: none;
    cursor: pointer;
    transition: background .12s ease;
}

.btn-primary:hover {
    background: var(--navy-light);
}

button {
    padding: 0.5rem 0.9rem;
    border-radius: 6px;
    border: 1px solid var(--border);
    cursor: pointer;
    background: var(--surface);
    font-family: inherit;
    font-size: 0.9rem;
    color: var(--ink);
}

button:hover {
    background: var(--surface-alt);
}

.btn-link {
    background: none;
    border: none;
    padding: 0;
    color: var(--navy);
    text-decoration: underline;
    cursor: pointer;
    font-size: 0.88rem;
}

.ok {
    color: var(--ok-fg);
}

.error {
    color: var(--bad-fg);
}

.muted {
    color: var(--muted);
}

p.ok, p.error {
    padding: 0.65rem 1rem;
    border-radius: 6px;
    font-size: 0.9rem;
    font-weight: 600;
    margin: 0 0 1.25rem;
}

p.ok {
    background: var(--ok-bg);
}

p.error {
    background: var(--bad-bg);
}

table {
    border-collapse: collapse;
    width: 100%;
    margin-bottom: 0.5rem;
    font-size: 0.88rem;
}

.data-table {
    display: block;
    overflow-x: auto;
}

th, td {
    padding: 0.55rem 0.7rem;
    text-align: left;
    vertical-align: middle;
    white-space: nowrap;
}

thead th {
    border-bottom: 2px solid var(--border);
    font-size: 0.75rem;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: var(--muted);
    font-weight: 700;
}

tbody td {
    border-bottom: 1px solid var(--border);
}

tbody tr:last-child td {
    border-bottom: none;
}

tbody tr:hover {
    background: var(--surface-alt);
}

.data-pre {
    white-space: pre-wrap;
    word-break: break-word;
    background: var(--surface-alt);
    border: 1px solid var(--border);
    border-radius: 6px;
    padding: 0.9rem;
    font-size: 0.9rem;
}

.field-row {
    display: flex;
    gap: 0.6rem;
    align-items: center;
    max-width: 480px;
}

.field-row input {
    flex: 1;
    padding: 0.5rem 0.6rem;
    border: 1px solid var(--border);
    border-radius: 6px;
    font-size: 0.92rem;
}

.grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1rem;
}

.badge, .chip {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.2rem 0.6rem;
    border-radius: 20px;
    font-size: 0.76rem;
    font-weight: 700;
    letter-spacing: 0.01em;
    white-space: nowrap;
}

.badge-active, .chip-ok {
    background: var(--ok-bg);
    color: var(--ok-fg);
}

.badge-onboarding, .badge-curation, .chip-warn {
    background: var(--warn-bg);
    color: var(--warn-fg);
}

.badge-suspended, .chip-bad {
    background: var(--bad-bg);
    color: var(--bad-fg);
}

.badge-curated {
    background: var(--ok-bg);
    color: var(--ok-fg);
}

.chip-neutral {
    background: var(--surface-alt);
    color: var(--muted);
}

code {
    background: var(--surface-alt);
    border-radius: 4px;
    padding: 0.1rem 0.35rem;
    font-size: 0.85em;
}
