html.app-theme-enabled .guest-theme-body,
html.app-theme-enabled .guest-theme-page {
    background: var(--app-bg) !important;
    color: var(--app-text);
}

html.app-theme-enabled .guest-theme-page {
    position: relative;
    transition: background-color 0.2s ease, color 0.2s ease;
}

html.app-theme-enabled .guest-theme-toolbar {
    position: fixed;
    top: 1rem;
    right: 1rem;
    z-index: 20;
}

html.app-theme-enabled .guest-auth-card {
    border: 1px solid var(--app-border);
    background: var(--app-surface) !important;
    color: var(--app-text);
    box-shadow: 0 16px 40px var(--app-shadow);
    transition: background-color 0.2s ease, border-color 0.2s ease, color 0.2s ease;
}

html.app-theme-enabled .guest-auth-card .login-logo {
    display: flex;
    min-height: 72px;
    align-items: center;
    justify-content: center;
    margin: 0 auto;
}

html.app-theme-enabled .guest-auth-card .login-logo img {
    display: block;
    width: auto;
    max-width: min(100%, 280px);
    max-height: 72px;
}

html.app-theme-enabled .guest-auth-card label {
    color: var(--app-text) !important;
}

html.app-theme-enabled .guest-auth-card input[type="text"],
html.app-theme-enabled .guest-auth-card input[type="email"],
html.app-theme-enabled .guest-auth-card input[type="password"] {
    border-color: var(--app-border-strong) !important;
    background: var(--app-control-bg) !important;
    color: var(--app-text) !important;
}

html.app-theme-enabled .guest-auth-card input:focus {
    border-color: var(--app-focus-ring) !important;
    box-shadow: 0 0 0 3px var(--app-focus-soft) !important;
    outline: none;
}

html.app-theme-enabled .guest-auth-card a {
    color: var(--app-link) !important;
}

html.app-theme-enabled .guest-auth-card a:hover {
    color: var(--app-primary-hover) !important;
}

html.app-theme-enabled .guest-auth-card button[type="submit"] {
    border-color: var(--app-primary) !important;
    background: var(--app-primary) !important;
    color: var(--app-on-primary) !important;
}

html.app-theme-enabled .guest-auth-card button[type="submit"]:hover,
html.app-theme-enabled .guest-auth-card button[type="submit"]:focus {
    border-color: var(--app-primary-hover) !important;
    background: var(--app-primary-hover) !important;
}

html.app-theme-enabled .guest-auth-card .text-red-600 {
    color: var(--app-danger-text) !important;
}

@media screen and (max-width: 640px) {
    html.app-theme-enabled .guest-theme-page {
        padding: 4.5rem 1rem 1rem;
        justify-content: flex-start;
    }

    html.app-theme-enabled .guest-theme-toolbar {
        top: 0.75rem;
        right: 0.75rem;
    }

    html.app-theme-enabled .guest-auth-card {
        margin-top: 0;
    }
}
