:root {
    color-scheme: light dark;
    --bg: #0f1115;
    --panel: #171a21;
    --border: #2a2e37;
    --text: #ededec;
    --muted: #9a9fab;
    --accent: #f53003;
    --accent-hover: #d92a02;
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    background: var(--bg);
    color: var(--text);
    font-family: ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
}

header.site-header {
    width: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 2rem;
    max-width: 40rem;
}

header.site-header .brand {
    font-weight: 600;
    letter-spacing: 0.02em;
    color: var(--text);
    text-decoration: none;
}

header.site-header nav {
    display: flex;
    gap: 0.75rem;
    align-items: center;
}

main {
    width: 100%;
    max-width: 26rem;
    padding: 2rem;
    margin-top: 2rem;
}

.panel {
    background: var(--panel);
    border: 1px solid var(--border);
    border-radius: 0.5rem;
    padding: 2rem;
}

.panel h1 {
    margin-top: 0;
    font-size: 1.4rem;
}

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

form {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin-top: 1.5rem;
}

label {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
    font-size: 0.875rem;
}

input[type="text"],
input[type="email"],
input[type="password"] {
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: 0.35rem;
    padding: 0.55rem 0.7rem;
    color: var(--text);
    font-size: 0.95rem;
}

input:focus {
    outline: 2px solid var(--accent);
    outline-offset: 1px;
}

.btn {
    display: inline-block;
    background: var(--accent);
    color: #fff;
    border: none;
    border-radius: 0.35rem;
    padding: 0.55rem 1rem;
    font-size: 0.9rem;
    cursor: pointer;
    text-decoration: none;
    text-align: center;
}

.btn:hover {
    background: var(--accent-hover);
}

.btn-link {
    background: none;
    border: 1px solid var(--border);
    color: var(--text);
}

.btn-link:hover {
    border-color: var(--accent);
    background: none;
}

.errors {
    background: #3a1414;
    border: 1px solid #7a2020;
    color: #ffb4b4;
    border-radius: 0.35rem;
    padding: 0.75rem 1rem;
    font-size: 0.875rem;
}

.field-error {
    color: #ff8a8a;
    font-size: 0.8rem;
}

.actions {
    display: flex;
    gap: 0.75rem;
    align-items: center;
}

.logout-form {
    margin: 0;
    display: inline;
}
