:root {
    --auth-primary: #54b948;
    --auth-primary-hover: #469c3c;
    --auth-primary-ring: rgba(84, 185, 72, 0.2);
    --auth-text: #111827;
    --auth-muted: #6b7280;
    --auth-border: #d1d5db;
    --auth-danger: #dc2626;
    --auth-success-bg: #ecfdf5;
    --auth-success-text: #047857;
    --auth-error-bg: #fef2f2;
    --auth-error-text: #b91c1c;
}

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

[x-cloak] {
    display: none !important;
}

.auth-body {
    margin: 0;
    min-height: 100vh;
    font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    color: var(--auth-text);
    background: #f8fafc;
}

.auth-shell {
    display: flex;
    min-height: 100vh;
    align-items: center;
    justify-content: center;
    padding: 1.5rem;
}

.auth-card {
    width: 100%;
    max-width: 28rem;
    border-radius: 0.75rem;
    background: #ffffff;
    padding: 2rem;
    box-shadow:
        0 1px 3px rgba(15, 23, 42, 0.08),
        0 10px 25px rgba(15, 23, 42, 0.06);
}

.auth-brand {
    display: flex;
    justify-content: center;
    margin-bottom: 1.5rem;
}

.auth-brand-logo {
    height: 60px;
    width: auto;
}

.auth-heading {
    margin: 0 0 0.5rem;
    text-align: center;
    font-size: 1.5rem;
    font-weight: 700;
    line-height: 2rem;
}

.auth-subheading {
    margin: 0 0 1.5rem;
    text-align: center;
    color: var(--auth-muted);
    font-size: 0.95rem;
    line-height: 1.5rem;
}

.auth-alert {
    margin-bottom: 1rem;
    border-radius: 0.5rem;
    padding: 0.875rem 1rem;
    font-size: 0.875rem;
    line-height: 1.4;
}

.auth-alert-success {
    background: var(--auth-success-bg);
    color: var(--auth-success-text);
}

.auth-alert-error {
    background: var(--auth-error-bg);
    color: var(--auth-error-text);
}

.auth-error-list {
    margin: 0;
    padding-left: 1.1rem;
}

.auth-form {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.auth-field {
    display: flex;
    flex-direction: column;
    gap: 0.375rem;
}

.auth-label {
    font-size: 0.875rem;
    font-weight: 500;
    line-height: 1.25rem;
}

.auth-required {
    color: var(--auth-danger);
}

.auth-input {
    width: 100%;
    border: 1px solid var(--auth-border);
    border-radius: 0.5rem;
    background: #ffffff;
    padding: 0.625rem 0.75rem;
    font-size: 0.95rem;
    line-height: 1.5rem;
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.auth-input:focus {
    outline: none;
    border-color: var(--auth-primary);
    box-shadow: 0 0 0 3px var(--auth-primary-ring);
}

.auth-input-error {
    border-color: var(--auth-danger);
}

.auth-field-error {
    margin: 0;
    color: var(--auth-danger);
    font-size: 0.8125rem;
    line-height: 1.25rem;
}

.auth-password-wrap {
    position: relative;
}

.auth-input-password {
    padding-right: 2.75rem;
}

.auth-password-toggle {
    position: absolute;
    top: 50%;
    right: 0.5rem;
    display: inline-flex;
    transform: translateY(-50%);
    border: 0;
    background: transparent;
    color: var(--auth-muted);
    cursor: pointer;
    padding: 0.25rem;
}

.auth-password-toggle:hover {
    color: var(--auth-text);
}

.auth-icon {
    width: 1.25rem;
    height: 1.25rem;
}

.auth-button {
    display: inline-flex;
    width: 100%;
    align-items: center;
    justify-content: center;
    border: 0;
    border-radius: 0.5rem;
    background: var(--auth-primary);
    color: #ffffff;
    cursor: pointer;
    font-size: 0.95rem;
    font-weight: 600;
    line-height: 1.25rem;
    padding: 0.75rem 1rem;
    transition: background-color 0.15s ease, opacity 0.15s ease;
}

.auth-button:hover:not(:disabled) {
    background: var(--auth-primary-hover);
}

.auth-button:disabled,
.auth-button-loading {
    cursor: not-allowed;
    opacity: 0.75;
}

.auth-footer-links {
    margin-top: 0.25rem;
    text-align: center;
}

.auth-link {
    color: var(--auth-primary);
    font-size: 0.875rem;
    font-weight: 500;
    text-decoration: underline;
    text-underline-offset: 2px;
}

.auth-link:hover {
    color: var(--auth-primary-hover);
}

.auth-forgot-password-wrap {
    margin-top: 0;
    text-align: left;
}

.auth-forgot-password-link {
    color: var(--auth-primary);
    font-size: 0.875rem;
    font-weight: 500;
    text-decoration: underline;
    text-underline-offset: 2px;
}

.auth-forgot-password-link:hover {
    color: var(--auth-primary-hover);
}

.auth-login-status {
    margin-bottom: 1rem;
    border-radius: 0.5rem;
    padding: 0.875rem 1rem;
    background: var(--auth-success-bg);
    color: var(--auth-success-text);
    font-size: 0.875rem;
    line-height: 1.4;
}

@media (max-width: 640px) {
    .auth-card {
        padding: 1.5rem;
    }
}
