/* account.css - Shared styles for all auth/account pages (login, forgot password, reset, set password, 2FA) */

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

body, body *:not(i):not([class*="fa"]):not([class*="ki"]) {
    font-family: 'Open Sans', sans-serif !important;
}

body {
    margin: 0;
    min-height: 100vh;
    background-color: #eef0f6;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 24px;
}

/* ── Card ── */
.auth-card {
    background: #ffffff;
    border-radius: 20px;
    box-shadow: 0 4px 32px rgba(0, 0, 0, 0.08);
    padding: 4rem 3.5rem;
    width: 100%;
    max-width: 546px;
}

/* ── Logo ── */
.auth-logo {
    display: block;
    margin: 0 auto 32px;
    width: 32px;
    height: 32px;
}

/* ── Heading & subtitle ── */
.auth-heading {
    text-align: center;
    font-size: 1.5rem;
    font-weight: 700;
    color: #111827;
    margin: 0 0 6px;
}

.auth-subtitle {
    text-align: center;
    font-size: 0.9rem;
    color: rgb(75 85 99);
    margin: 0 0 24px;
}

/* ── Form wrapper ── */
.auth-form-wrapper {
    max-width: 364px;
    margin: 0 auto;
    width: 100%;
}

/* ── Floating label input ── */
.auth-input-group {
    position: relative;
    margin-bottom: 14px;
}

.auth-input-group input {
    width: 100%;
    height: 41px;
    padding: 0 16px;
    border: 1px solid #d1d5db;
    border-radius: 8px;
    background: #ffffff;
    font-size: 0.9375rem;
    color: #111827;
    outline: none;
    transition: border-color 0.2s;
    font-family: var(--brand-font);
}

.auth-input-group input:focus {
    border-color: #d1d5db;
    box-shadow: rgb(255, 255, 255) 0px 0px 0px 0px, rgba(59, 130, 246, 0.5) 0px 0px 0px 2px, rgba(0, 0, 0, 0) 0px 0px 0px 0px;
}

.auth-input-group label {
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 0.9375rem;
    color: #6b7280;
    pointer-events: none;
    transition: all 0.15s ease;
    background: transparent;
    padding: 0 4px;
}

.auth-input-group input:focus + label,
.auth-input-group input:not(:placeholder-shown) + label {
    top: 0;
    transform: translateY(-50%);
    font-size: 0.75rem;
    color: #6b7280;
    background: #ffffff;
}

.auth-input-group .required-star {
    color: #ef4444;
}

/* ── Password toggle ── */
.auth-input-group .toggle-password {
    position: absolute;
    right: 14px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    padding: 0;
    cursor: pointer;
    display: flex;
    align-items: center;
}

.auth-input-group .toggle-password i {
    color: #9ca3af !important;
    font-size: 1rem;
}

/* ── Forgot password link ── */
.auth-forgot {
    text-align: right;
    margin-bottom: 18px;
}

.auth-forgot a {
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--brand-color);
    text-decoration: none;
}

.auth-forgot a:hover {
    text-decoration: underline;
}

/* ── Primary button ── */
.auth-btn {
    display: block;
    width: 100%;
    height: 39px;
    background-color: var(--brand-color);
    color: #ffffff;
    font-size: 0.9375rem;
    font-weight: 600;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: opacity 0.2s;
    font-family: var(--brand-font);
    margin-bottom: 16px;
}

.auth-btn:hover {
    opacity: 0.92;
}

/* ── Back / cancel link ── */
.auth-back {
    text-align: center;
    margin-top: 4px;
}

.auth-back a {
    font-size: 0.875rem;
    color: #6b7280;
    text-decoration: none;
}

.auth-back a:hover {
    color: var(--brand-color);
    text-decoration: underline;
}

/* ── Terms text ── */
.auth-terms {
    text-align: center;
    font-size: 0.8125rem;
    color: #6b7280;
    margin: 0 0 20px;
}

.auth-terms a {
    color: var(--brand-color);
    font-weight: 500;
    text-decoration: none;
}

.auth-terms a:hover {
    text-decoration: underline;
}

/* ── Divider ── */
.auth-divider {
    border: none;
    border-top: 1px solid #e5e7eb;
    margin: 0 0 20px;
}

/* ── Portal section (login only) ── */
.auth-portal {
    text-align: center;
}

.auth-portal-name {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin-bottom: 6px;
}

.auth-portal-name i,
.auth-portal-name svg {
    color: #6b7280;
    stroke: #6b7280;
    flex-shrink: 0;
    width: 16px;
    height: 16px;
}

.auth-portal-name span {
    font-size: 0.9375rem;
    font-weight: 400;
    color: #374151;
}

.auth-portal a {
    font-size: 0.9375rem;
    font-weight: 500;
    color: var(--brand-color);
    text-decoration: none;
}

.auth-portal a:hover {
    text-decoration: underline;
}

/* ── "Powered by" footer ── */
.auth-powered {
    margin-top: 18px;
    font-size: 0.875rem;
    color: #9ca3af;
    text-align: center;
}

/* ── Resend row (2FA) ── */
.auth-resend {
    text-align: center;
    margin-top: 4px;
}

.auth-resend button {
    background: none;
    border: none;
    padding: 0;
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--brand-color);
    cursor: pointer;
    font-family: var(--brand-font);
}

.auth-resend button:disabled {
    color: #9ca3af;
    cursor: default;
}

/* ── Alert overrides ── */
.auth-alert {
    border-radius: 8px;
    font-size: 0.875rem;
    margin-bottom: 16px;
}

/* ── Validation error labels ── */
label.error {
    color: #ef4444 !important;
    font-size: 0.75rem;
    margin-top: 4px;
    display: block;
}

/* ── Autofill fix ── */
input:-webkit-autofill,
input:-webkit-autofill:focus {
    transition: background-color 0s 600000s, color 0s 600000s !important;
}
