/* ====================================================
   WellGen — Login Page Styles
   ==================================================== */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&display=swap');

*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

:root {
    --login-bg1: #0d0d1a;
    --login-bg2: #130d2e;
    --card-bg: rgba(18, 16, 38, 0.82);
    --card-border: rgba(120, 80, 220, 0.28);
    --brand: #7435c1;
    --brand-light: #a66cf0;
    --brand-grad: linear-gradient(135deg, #7435c1 0%, #b44fd4 100%);
    --text: #e8e5f4;
    --text-muted: #8b87aa;
    --input-bg: rgba(255, 255, 255, 0.05);
    --input-border: rgba(255, 255, 255, 0.1);
    --input-focus: rgba(116, 53, 193, 0.55);
    --error: #f06a6a;
    --radius: 14px;
    --radius-sm: 8px;
}

html,
body {
    height: 100%;
    font-family: 'Inter', system-ui, sans-serif;
    background: var(--login-bg1);
    color: var(--text);
    -webkit-font-smoothing: antialiased;
}

.login-bg {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: radial-gradient(ellipse at 20% 50%, rgba(116, 53, 193, 0.22) 0%, transparent 60%),
        radial-gradient(ellipse at 80% 20%, rgba(180, 79, 212, 0.15) 0%, transparent 55%),
        linear-gradient(160deg, var(--login-bg1) 0%, var(--login-bg2) 100%);
    padding: 1.5rem;
    position: relative;
    overflow: hidden;
}

/* Decorative orbs */
.login-bg::before,
.login-bg::after {
    content: '';
    position: absolute;
    border-radius: 50%;
    filter: blur(80px);
    pointer-events: none;
}

.login-bg::before {
    width: 480px;
    height: 480px;
    background: rgba(116, 53, 193, 0.15);
    top: -120px;
    left: -120px;
}

.login-bg::after {
    width: 360px;
    height: 360px;
    background: rgba(180, 79, 212, 0.12);
    bottom: -100px;
    right: -80px;
}

.login-card {
    width: 100%;
    max-width: 420px;
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    border-radius: var(--radius);
    padding: 2.5rem 2.25rem;
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    box-shadow: 0 24px 80px rgba(0, 0, 0, 0.55), 0 0 0 1px rgba(255, 255, 255, 0.04) inset;
    position: relative;
    z-index: 1;
    animation: cardFadeIn 0.45s ease both;
}

@keyframes cardFadeIn {
    from {
        opacity: 0;
        transform: translateY(24px) scale(0.97);
    }

    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.login-logo {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    margin-bottom: 2rem;
}

.login-logo img {
    height: 36px;
    filter: drop-shadow(0 0 8px rgba(116, 53, 193, 0.5));
}

.login-logo-text {
    font-size: 1.2rem;
    font-weight: 700;
    background: var(--brand-grad);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    letter-spacing: -0.02em;
}

.login-title {
    font-size: 1.5rem;
    font-weight: 700;
    letter-spacing: -0.03em;
    color: var(--text);
    margin-bottom: 0.35rem;
}

.login-subtitle {
    font-size: 0.845rem;
    color: var(--text-muted);
    margin-bottom: 2rem;
}

.login-form {
    display: flex;
    flex-direction: column;
    gap: 1.1rem;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 0.45rem;
}

.form-label {
    font-size: 0.78rem;
    font-weight: 500;
    color: var(--text-muted);
    letter-spacing: 0.03em;
    text-transform: uppercase;
}

.form-input {
    background: var(--input-bg);
    border: 1px solid var(--input-border);
    border-radius: var(--radius-sm);
    padding: 0.7rem 1rem;
    font-size: 0.93rem;
    color: var(--text);
    font-family: inherit;
    outline: none;
    transition: border-color 0.2s, box-shadow 0.2s, background 0.2s;
    width: 100%;
}

.form-input:focus {
    border-color: var(--brand-light);
    box-shadow: 0 0 0 3px var(--input-focus);
    background: rgba(255, 255, 255, 0.07);
}

.form-input::placeholder {
    color: var(--text-muted);
    opacity: 0.6;
}

.btn-login {
    width: 100%;
    background: var(--brand-grad);
    color: #fff;
    border: none;
    border-radius: var(--radius-sm);
    padding: 0.82rem 1.5rem;
    font-size: 0.95rem;
    font-weight: 600;
    font-family: inherit;
    cursor: pointer;
    margin-top: 0.5rem;
    letter-spacing: 0.01em;
    transition: opacity 0.2s, transform 0.15s, box-shadow 0.2s;
    box-shadow: 0 4px 20px rgba(116, 53, 193, 0.45);
    position: relative;
    overflow: hidden;
}

.btn-login:hover {
    opacity: 0.92;
    box-shadow: 0 6px 28px rgba(116, 53, 193, 0.55);
}

.btn-login:active {
    transform: scale(0.98);
}

.btn-login:disabled {
    opacity: 0.55;
    cursor: not-allowed;
}

.btn-login .spinner-inline {
    display: inline-block;
    width: 14px;
    height: 14px;
    border: 2px solid rgba(255, 255, 255, 0.35);
    border-top-color: #fff;
    border-radius: 50%;
    animation: spin 0.6s linear infinite;
    vertical-align: middle;
    margin-right: 6px;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

.login-error {
    background: rgba(240, 106, 106, 0.12);
    border: 1px solid rgba(240, 106, 106, 0.4);
    border-radius: var(--radius-sm);
    color: var(--error);
    font-size: 0.85rem;
    padding: 0.6rem 0.9rem;
    display: none;
    animation: fadeIn 0.2s ease;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(-4px);
    }

    to {
        opacity: 1;
    }
}

.login-error.visible {
    display: block;
}

.login-footer {
    margin-top: 1.75rem;
    text-align: center;
    font-size: 0.78rem;
    color: var(--text-muted);
}