/* ============================================================
   login.css — Login Page (pixel-matched to Figma node 14389:19408)
   ============================================================ */

/* ---- Page background: TWO overlapping radial gradients (Figma) ---- */
.login-body {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: #f9f6ff;
    background-image:
        radial-gradient(ellipse at 50% -10%, rgba(111,54,255,0.18) 0%, rgba(56,27,128,0.09) 30%, transparent 60%),
        radial-gradient(ellipse at 85% 110%, rgba(58,16,191,0.12) 0%, transparent 55%);
}

/* ---- Centered container: 448px wide, 22px gap between logo/card/footer ---- */
.login-container {
    width: 100%;
    max-width: 448px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 22px;
}

.login-logo-img {
    height: 37px;
    margin: 0 auto;
    display: block;
}

/* ---- Card: translucent white, purple border + shadow (Figma) ---- */
.login-card {
    background: rgba(255, 255, 255, 0.8);
    border: 1.18px solid #d9cdff;
    border-radius: 14px;
    box-shadow: 0 24px 53px rgba(58, 16, 191, 0.12);
    padding: 32px;
    width: 100%;
    text-align: left;
}

/* ---- Title: Inter Medium 20px #1a0b47 ---- */
.login-title {
    font-size: 20px;
    font-weight: 500;
    line-height: 30px;
    color: #1a0b47;
    margin-bottom: 4px;
}

/* ---- Subtitle: Inter Regular 14px #6b5d99 (muted purple, NOT grey) ---- */
.login-subtitle {
    font-size: 14px;
    font-weight: 400;
    line-height: 20px;
    color: #6b5d99;
    margin-bottom: 24px;
}

/* ---- Form layout ---- */
.login-form {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

/* ---- Login-specific input overrides:
   Figma inputs: white bg, borderless (transparent), monospace, 36px tall.
   The white fill distinguishes the input row from the translucent card bg. ---- */
/* Figma: label ABOVE input, stacked vertically with 8px gap between them. */
.login-form .form-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-bottom: 0; /* parent flex gap handles inter-group spacing; no doubling */
}

.login-form .form-input {
    border: 1.18px solid rgba(108, 99, 255, 0.15);
    background: #ffffff;
    font-family: 'Consolas', 'SF Mono', 'Fira Code', monospace;
    font-size: 14px;
    color: #1a0b47;
    height: 36px;
    padding: 4px 16px;
    transition: border-color 150ms ease, box-shadow 150ms ease;
}

.login-form .form-input:hover {
    border-color: rgba(108, 99, 255, 0.4);
}

.login-form .form-input:focus {
    border-color: #6C63FF;
    box-shadow: 0 0 0 3px rgba(108, 99, 255, 0.12);
    outline: none;
}

.login-form .form-input::placeholder {
    font-family: 'Consolas', 'SF Mono', 'Fira Code', monospace;
    color: #6b5d99;
    opacity: 1;
}

/* ---- Login-specific labels: #1a0b47 (deep navy, not the --text grey) ---- */
.login-form .form-label {
    display: block;
    width: 100%;
    font-size: 14px;
    font-weight: 500;
    color: #1a0b47;
    margin-bottom: 0; /* flex gap on .form-group handles spacing */
}

/* Password row: label left, "Forgot password?" right — single line, never wrap. */
.login-form .label-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    gap: 12px;
}

/* "Forgot password?" link: purple, single-line, hover underlines + darkens */
.login-form .forgot-link {
    font-size: 13px;
    font-weight: 500;
    color: #6C63FF;
    white-space: nowrap;
    flex-shrink: 0;
    text-decoration: none;
    transition: color 150ms ease;
}

.login-form .forgot-link:hover {
    color: #5a52e0;
    text-decoration: underline;
}

/* ---- Sign-in button: #6f36ff, 36px height (Figma) ---- */
.login-btn {
    width: 100%;
    height: 36px;
    background: #6f36ff;
    color: #FFFFFF;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    cursor: pointer;
    transition: background var(--transition);
}

.login-btn:hover {
    background: #5e22e6;
    box-shadow: 0 4px 12px rgba(111, 54, 255, 0.3);
    transform: translateY(-1px);
}

.login-btn:active {
    transform: translateY(0);
    box-shadow: none;
}

.login-btn .material-symbols-outlined {
    font-size: 14px;
}

/* ---- Error / success banners ---- */
.login-error {
    background: #FEF2F2;
    color: var(--critical);
    padding: 10px 16px;
    border-radius: 8px;
    font-size: 13px;
    margin-bottom: 8px;
}

.login-success {
    background: #F0FDF4;
    color: var(--success);
    padding: 10px 16px;
    border-radius: 8px;
    font-size: 13px;
    margin-bottom: 8px;
}

/* ---- "Continue as" role selector ---- */
.login-role-selector {
    margin-bottom: 0;
}

.login-role-label {
    display: block;
    font-size: 14px;
    font-weight: 500;
    color: #1a0b47;
    margin-bottom: 8px;
}

/* Figma toggle: TWO SEPARATE rounded buttons with an 8px gap between them —
   NOT a joined segmented control on a shared track. Each has its own border-radius
   and independent border/background. */
.login-role-toggle {
    display: flex;
    gap: 8px;
}

.role-btn {
    flex: 1;
    padding: 8px 16px;
    height: 38px;
    font-size: 14px;
    font-weight: 500;
    text-align: center;
    color: #6b5d99;
    background: transparent;
    border: 1.18px solid rgba(108, 99, 255, 0.2);
    border-radius: 8px;
    cursor: pointer;
    transition: all 150ms ease;
}

.role-btn:hover {
    border-color: rgba(108, 99, 255, 0.5);
    background: rgba(108, 99, 255, 0.04);
    color: #1a0b47;
}

/* Selected state: purple border + faint purple tint */
.role-btn:has(input:checked) {
    background: rgba(108, 99, 255, 0.06);
    border-color: #6C63FF;
    color: #1a0b47;
}

.role-btn:has(input:checked):hover {
    background: rgba(108, 99, 255, 0.1);
    border-color: #5a52e0;
}

/* ---- Alternative actions ("Back to sign in", "Try again") ---- */
.login-alt-action {
    margin-top: 16px;
    text-align: center;
    font-size: 13px;
    color: #6b5d99;
}

/* Purple link used throughout login/forgot/reset pages */
.login-link {
    color: #6C63FF;
    font-weight: 500;
    text-decoration: none;
    transition: color 150ms ease;
}

.login-link:hover {
    color: #5a52e0;
    text-decoration: underline;
}

/* ---- Password eye toggle ---- */
.password-field-wrapper {
    position: relative;
    width: 100%;
}

.password-field-wrapper .form-input {
    width: 100%;
    padding-right: 40px; /* room for the eye icon */
}

.pw-eye-toggle {
    position: absolute;
    right: 8px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    cursor: pointer;
    color: #6b5d99;
    padding: 4px;
    line-height: 1;
    transition: color 150ms ease;
}

.pw-eye-toggle:hover {
    color: #6C63FF;
}

.pw-eye-toggle .material-symbols-outlined {
    font-size: 20px;
}

/* ---- Password strength meter ---- */
.pw-strength-container {
    margin-top: 8px;
    margin-bottom: 8px;
}

.pw-meter {
    display: flex;
    gap: 4px;
    margin-bottom: 4px;
}

.pw-meter-bar {
    flex: 1;
    height: 4px;
    border-radius: 2px;
    background: #E5E7EB;
    transition: background 200ms ease;
}

.pw-meter-label {
    font-size: 12px;
    font-weight: 600;
    transition: color 200ms ease;
}

.pw-checklist {
    list-style: none;
    padding: 0;
    margin: 8px 0 0 0;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4px 12px;
}

.pw-checklist li {
    font-size: 12px;
    color: var(--text-secondary); /* #6B7280 — passes WCAG AA on white; #9CA3AF (~2.5:1) did not */
    display: flex;
    align-items: center;
    gap: 4px;
    transition: color 200ms ease;
}

.pw-checklist li .material-symbols-outlined {
    font-size: 14px;
}

.pw-checklist li.pw-check-pass {
    color: #16A34A;
}

.pw-checklist li.pw-check-fail {
    color: var(--text-secondary); /* #6B7280 — passes WCAG AA on white; #9CA3AF (~2.5:1) did not */
}

/* ---- Footer: 12px Inter Regular #6b5d99 ---- */
.login-footer {
    font-size: 12px;
    color: #6b5d99;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    /* gap is already handled by the container's 22px flex gap */
    margin: 0;
}

.footer-icon {
    font-size: 14px;
}
