* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family:
        -apple-system,
        BlinkMacSystemFont,
        "Segoe UI",
        Roboto,
        sans-serif;
}

header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 2rem;
    background: #f8f9fa;
    border-bottom: 1px solid #e0e0e0;
}

h1 {
    margin: 0;
    font-size: 1.5rem;
}

#auth-controls {
    display: flex;
    gap: 1rem;
    align-items: center;
}

/*
 * Button colors intentionally live in theme.css.
 * Keeping fixed colors out of this base stylesheet allows every button
 * to follow the active DashAway accent.
 */
.btn {
    display: inline-block;
    padding: 0.5rem 1rem;
    border-radius: 4px;
    cursor: pointer;
    text-decoration: none;
}

main {
    max-width: 800px;
    margin: 2rem auto;
    padding: 0 2rem;
}

section {
    padding: 1.5rem;
    background: #f5f5f5;
    border-radius: 4px;
}

section p {
    margin: 0.75rem 0;
}

code {
    padding: 0.2rem 0.5rem;
    background: #e9ecef;
    border-radius: 3px;
    font-size: 0.85rem;
}

@media (max-width: 600px) {
    header {
        flex-direction: column !important;
        align-items: flex-start !important;
        gap: 1rem !important;
    }

    #auth-controls {
        flex-direction: column !important;
        width: 100%;
    }

    /*
     * Do not make every page button full-width. That previously widened
     * navigation and theme controls. Only authentication-card actions fill
     * their container.
     */
    .auth-card .btn {
        width: 100%;
    }
}

/* Register / Sign-in forms (auth/register.html, auth/login.html) */
.auth-page {
    max-width: 420px;
    margin: 3rem auto;
    padding: 0 1.5rem;
}

.auth-card {
    padding: 2rem;
    background: #f5f5f5;
    border-radius: 8px;
}

.auth-card p {
    margin: 0 0 1rem;
}

.auth-card .form-label {
    display: block;
    margin-bottom: 0.25rem;
    font-weight: 600;
    font-size: 0.9rem;
}

.auth-card .form-control {
    display: block;
    width: 100%;
    margin-bottom: 1rem;
    padding: 0.6rem 0.75rem;
    border: 1px solid #ccc;
    border-radius: 4px;
    font-size: 1rem;
}

.auth-card .ceg-auth-code {
    letter-spacing: 0.25rem;
    text-align: center;
    font-size: 1.25rem;
}

.auth-card .form-check {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 1rem;
    font-size: 0.9rem;
}

.auth-card .btn {
    width: 100%;
    padding: 0.75rem;
    font-size: 1rem;
}

.btn-mock {
    margin-top: 0.75rem;
    border-style: dashed;
}

.auth-links {
    display: flex;
    justify-content: space-between;
    margin-top: 1rem;
}

.link-btn {
    padding: 0;
    border: 0;
    background: none;
    cursor: pointer;
    font-size: 0.9rem;
}

.link-btn:hover {
    text-decoration: underline;
}

.auth-help {
    margin-top: 1.5rem;
    text-align: center;
    font-size: 0.9rem;
}

.alert {
    margin-bottom: 1rem;
    padding: 0.75rem 1rem;
    border-radius: 4px;
    font-size: 0.9rem;
}

.alert-info {
    background: #d4edda;
    color: #155724;
}

.alert-error {
    background: #f8d7da;
    color: #721c24;
}
