/**
 * Auth pages (login, password reset) — visual language aligned with installer-modern
 */

@import url("https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&display=swap");

:root {
    --auth-bg: #0f172a;
    --auth-surface: #ffffff;
    --auth-border: #e2e8f0;
    --auth-text: #0f172a;
    --auth-muted: #64748b;
    --auth-primary: #2563eb;
    --auth-primary-hover: #1d4ed8;
    --auth-error: #dc2626;
    --auth-error-bg: #fef2f2;
    --auth-radius: 16px;
    --auth-radius-sm: 10px;
    --auth-shadow: 0 1px 3px rgba(15, 23, 42, 0.06), 0 12px 32px rgba(15, 23, 42, 0.12);
}

.auth-modern-app {
    margin: 0;
    min-height: 100vh;
    font-family: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
    font-size: 15px;
    line-height: 1.5;
    color: var(--auth-text);
    background: linear-gradient(145deg, #0f172a 0%, #1e3a5f 45%, #0f172a 100%);
    -webkit-font-smoothing: antialiased;
}

.auth-modern-bg {
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: 0;
    background:
        radial-gradient(ellipse 80% 50% at 20% -10%, rgba(37, 99, 235, 0.35), transparent 55%),
        radial-gradient(ellipse 60% 40% at 100% 20%, rgba(16, 185, 129, 0.2), transparent 50%),
        radial-gradient(ellipse 50% 30% at 50% 100%, rgba(99, 102, 241, 0.15), transparent 45%);
}

.auth-modern-shell {
    position: relative;
    z-index: 1;
    max-width: 440px;
    margin: 0 auto;
    padding: 40px 20px 48px;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.auth-modern-shell--login {
    max-width: 480px;
    padding-top: clamp(2.75rem, 7vh, 4.75rem);
    padding-right: 20px;
    /* Extra space below the login card */
    padding-bottom: clamp(4.5rem, 14vh, 8.5rem);
    padding-left: 20px;
}

/* Login: slightly smaller header + form for better balance */
.auth-modern-shell--login .auth-modern-login-head .auth-modern-hero__badge {
    padding: 5px 12px;
    font-size: 11px;
    letter-spacing: 0.035em;
    margin-bottom: 10px;
}

.auth-modern-shell--login .auth-modern-brand {
    font-size: clamp(1.2rem, 3.2vw, 1.45rem);
    margin: 0 0 14px;
}

.auth-modern-shell--login .auth-modern-card {
    padding: 24px 20px 28px;
    border-radius: 14px;
}

.auth-modern-shell--login .auth-modern-card__heading {
    font-size: 1.15rem;
}

.auth-modern-shell--login .auth-modern-card__lead {
    font-size: 13px;
    margin-bottom: 18px;
}

.auth-modern-shell--login .auth-modern-label {
    font-size: 12px;
    margin-bottom: 4px;
}

.auth-modern-shell--login .auth-modern-field {
    margin-bottom: 12px;
    border-radius: 8px;
}

.auth-modern-shell--login .auth-modern-field__icon {
    width: 38px;
    font-size: 14px;
}

.auth-modern-shell--login .auth-modern-field__input {
    padding: 11px 12px 11px 0;
    font-size: 14px;
}

.auth-modern-shell--login .auth-modern-field--has-toggle .auth-modern-field__input {
    padding-right: 38px;
}

.auth-modern-shell--login .auth-modern-field__toggle {
    width: 34px;
    height: 34px;
    right: 4px;
}

.auth-modern-shell--login .auth-modern-row {
    margin-bottom: 4px;
}

.auth-modern-shell--login .auth-modern-check,
.auth-modern-shell--login .auth-modern-link {
    font-size: 13px;
}

.auth-modern-shell--login .auth-modern-submit {
    margin-top: 16px;
    padding: 11px 16px;
    font-size: 14px;
    border-radius: 8px;
}

.auth-modern-login-head {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

.auth-modern-brand {
    margin: 0 0 20px;
    font-size: clamp(1.5rem, 4vw, 1.85rem);
    font-weight: 700;
    color: #f8fafc;
    text-align: center;
    letter-spacing: -0.02em;
    line-height: 1.25;
    text-shadow: 0 1px 2px rgba(15, 23, 42, 0.35);
}

.auth-modern-hero {
    text-align: center;
    margin-bottom: 28px;
}

.auth-modern-hero__badge {
    display: inline-flex;
    align-items: center;
    padding: 6px 14px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.12);
    border: 1px solid rgba(255, 255, 255, 0.18);
    color: #e2e8f0;
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    margin-bottom: 14px;
}

.auth-modern-hero__title {
    margin: 0 0 8px;
    font-size: clamp(1.5rem, 4vw, 1.85rem);
    font-weight: 700;
    color: #f8fafc;
    letter-spacing: -0.02em;
}

.auth-modern-hero__sub {
    margin: 0;
    font-size: 15px;
    color: #94a3b8;
}

.auth-modern-card {
    background: var(--auth-surface);
    border-radius: var(--auth-radius);
    box-shadow: var(--auth-shadow);
    border: 1px solid rgba(255, 255, 255, 0.08);
    padding: 32px 28px 36px;
}

.auth-modern-card__heading {
    margin: 0 0 8px;
    font-size: 1.35rem;
    font-weight: 700;
    color: var(--auth-text);
    text-align: center;
    letter-spacing: -0.02em;
}

.auth-modern-card__lead {
    margin: 0 0 24px;
    font-size: 14px;
    color: var(--auth-muted);
    text-align: center;
    line-height: 1.5;
}

.auth-modern-alert {
    margin-bottom: 20px;
    padding: 12px 14px;
    border-radius: var(--auth-radius-sm);
    background: var(--auth-error-bg);
    border: 1px solid #fecaca;
    color: #991b1b;
    font-size: 13px;
}

.auth-modern-alert ul {
    margin: 0;
    padding-left: 18px;
}

.auth-modern-alert--success {
    background: #ecfdf5;
    border-color: #a7f3d0;
    color: #065f46;
}

.auth-modern-form {
    margin: 0;
}

.auth-modern-label {
    display: block;
    margin-bottom: 6px;
    font-size: 13px;
    font-weight: 600;
    color: var(--auth-text);
}

.auth-modern-field {
    position: relative;
    display: flex;
    align-items: center;
    margin-bottom: 18px;
    border: 1px solid var(--auth-border);
    border-radius: var(--auth-radius-sm);
    background: #f8fafc;
    transition: border-color 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
}

.auth-modern-field:focus-within {
    border-color: var(--auth-primary);
    background: #fff;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.15);
}

.auth-modern-field__icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    flex-shrink: 0;
    color: var(--auth-muted);
    font-size: 15px;
}

.auth-modern-field__input {
    flex: 1;
    min-width: 0;
    border: none;
    background: transparent;
    padding: 14px 16px 14px 0;
    font-size: 15px;
    font-family: inherit;
    color: var(--auth-text);
    outline: none;
}

.auth-modern-field--has-toggle .auth-modern-field__input {
    padding-right: 44px;
}

.auth-modern-field__input::placeholder {
    color: #94a3b8;
}

.auth-modern-field__toggle {
    position: absolute;
    top: 50%;
    right: 6px;
    transform: translateY(-50%);
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    padding: 0;
    border: none;
    background: transparent;
    color: var(--auth-muted);
    cursor: pointer;
    border-radius: 8px;
    transition: color 0.15s ease, background 0.15s ease;
}

.auth-modern-field__toggle:hover {
    color: var(--auth-text);
    background: rgba(15, 23, 42, 0.06);
}

.auth-modern-field__toggle .fa-eye-slash {
    display: none;
}

.auth-modern-field__toggle.hide-pass.show-pass .fa-eye {
    display: none;
}

.auth-modern-field__toggle.hide-pass.show-pass .fa-eye-slash {
    display: inline-block;
}

.auth-modern-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
    margin-bottom: 8px;
}

.auth-modern-check {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    color: var(--auth-muted);
    cursor: pointer;
    user-select: none;
}

.auth-modern-check input {
    width: 16px;
    height: 16px;
    accent-color: var(--auth-primary);
}

.auth-modern-link {
    font-size: 14px;
    font-weight: 500;
    color: var(--auth-primary);
    text-decoration: none;
}

.auth-modern-link:hover {
    color: var(--auth-primary-hover);
    text-decoration: underline;
}

.auth-modern-submit {
    display: block;
    width: 100%;
    margin-top: 22px;
    padding: 14px 20px;
    border: none;
    border-radius: var(--auth-radius-sm);
    font-size: 15px;
    font-weight: 600;
    font-family: inherit;
    color: #fff !important;
    background: var(--auth-primary) !important;
    cursor: pointer;
    transition: background 0.15s ease, transform 0.05s ease;
}

.auth-modern-submit:hover,
.auth-modern-submit:focus {
    background: var(--auth-primary-hover) !important;
    color: #fff !important;
}

.auth-modern-submit:active {
    transform: translateY(1px);
}

.auth-modern-back {
    margin-top: 24px;
    text-align: center;
}

.auth-modern-back a {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    font-weight: 500;
    color: var(--auth-muted);
    text-decoration: none;
}

.auth-modern-back a:hover {
    color: var(--auth-primary);
}

.auth-modern-back .fas {
    font-size: 12px;
}

@media (max-width: 400px) {
    .auth-modern-card {
        padding: 24px 20px 28px;
    }
}
