:root {
    --bg: #f8fafc;
    --surface: #ffffff;
    --text: #1f2937;
    --text-muted: #6b7280;
    --border: #e5e7eb;
    --accent: #111827;
    --accent-hover: #000000;
    --accent-text: #ffffff;
    --error: #b91c1c;
    --radius: 8px;
}

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

html,
body {
    margin: 0;
    padding: 0;
}

body {
    min-height: 100vh;
    min-height: 100dvh;
    display: flex;
    flex-direction: column;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    font-size: 16px;
    line-height: 1.5;
    color: var(--text);
    background: var(--bg);
    -webkit-font-smoothing: antialiased;
}

.page {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 24px 16px;
}

.logo {
    display: block;
    max-width: 180px;
    height: auto;
    margin: 8px auto 24px;
}

.card {
    width: 100%;
    max-width: 420px;
}

h1 {
    margin: 0 0 16px;
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--text);
}

p {
    margin: 0 0 16px;
    color: var(--text-muted);
}

form {
    display: flex;
    flex-direction: column;
    gap: 16px;
    margin: 0;
}

label {
    display: flex;
    flex-direction: column;
    gap: 6px;
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--text);
}

label > span {
    display: block;
}

input[type="password"],
input[type="text"],
input[type="email"] {
    width: 100%;
    min-height: 44px;
    padding: 12px 14px;
    font-family: inherit;
    font-size: 16px;
    line-height: 1.5;
    color: var(--text);
    background: #ffffff;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    -webkit-appearance: none;
    appearance: none;
}

input:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(17, 24, 39, 0.12);
}

input[type="submit"],
button[type="submit"] {
    width: 100%;
    min-height: 48px;
    padding: 12px 20px;
    margin-top: 8px;
    font-family: inherit;
    font-size: 1rem;
    font-weight: 600;
    color: var(--accent-text);
    background: var(--accent);
    border: 0;
    border-radius: var(--radius);
    cursor: pointer;
    -webkit-appearance: none;
    appearance: none;
}

input[type="submit"]:hover,
button[type="submit"]:hover {
    background: var(--accent-hover);
}

input[type="submit"]:focus-visible,
button[type="submit"]:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 2px;
}

.actions {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-top: 8px;
}

.button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    min-height: 48px;
    padding: 12px 20px;
    font-family: inherit;
    font-size: 1rem;
    font-weight: 600;
    color: var(--accent-text);
    background: var(--accent);
    border: 1px solid var(--accent);
    border-radius: var(--radius);
    text-decoration: none;
    cursor: pointer;
}

.button:hover {
    background: var(--accent-hover);
    border-color: var(--accent-hover);
}

.button:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 2px;
}

.button-secondary {
    color: var(--text);
    background: transparent;
    border-color: var(--border);
}

.button-secondary:hover {
    background: var(--bg);
    border-color: var(--text-muted);
}

form ul {
    list-style: none;
    padding: 0;
    margin: 4px 0 0;
}

form ul li {
    font-size: 0.875rem;
    color: var(--error);
}

.footer {
    width: 100%;
    padding: 16px;
    text-align: center;
    font-size: 0.75rem;
    color: var(--text-muted);
}

@media (min-width: 640px) {
    .page {
        justify-content: center;
        padding: 48px 16px;
    }

    .card {
        padding: 32px;
        background: var(--surface);
        border: 1px solid var(--border);
        border-radius: var(--radius);
        box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04), 0 4px 16px rgba(0, 0, 0, 0.05);
    }
}
