/* ==========================================================
   Solicitors Portal - Client Portal Authentication Styles
   Mirrors SolicitorsPortal.APP AuthenticationLayout look:
   full-bleed background, top-center full logo,
   translucent avatar + minimalist underline-style form.
   ========================================================== */

:root {
    --sp-font: 'Inter', system-ui, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html, body {
    height: 100%;
    font-family: var(--sp-font);
    font-size: .875rem;
    -webkit-font-smoothing: antialiased;
}

/* -- Full-screen blurred background -------------------------------- */
.auth-bg {
    position: relative;
    min-height: 100vh;
    width: 100%;
    background: url('/images/lockscreen.png') center center / cover no-repeat fixed;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.auth-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.35);
}

/* -- Company full logo, top-center ---------------------------------- */
.auth-company-logo {
    position: absolute;
    top: 40px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 2;
    max-width: 320px;
    height: 64px;
    display: flex;
    align-items: center;
    justify-content: center;
}
.auth-company-logo img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

/* -- Centered auth card (no chrome, transparent) -------------------- */
.auth-card {
    position: relative;
    z-index: 2;
    width: 100%;
    max-width: 300px;
    display: flex;
    flex-direction: column;
    align-items: center;
    animation: fadeUp .45s cubic-bezier(.22,.68,0,1.2);
}

@keyframes fadeUp {
    from { opacity: 0; transform: translateY(30px); }
    to   { opacity: 1; transform: translateY(0); }
}

/* -- Avatar --------------------------------------------------------- */
.auth-avatar {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background: rgba(128, 128, 128, 0.35);
    border: 2px solid rgba(255, 255, 255, 0.25);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 20px;
}
.auth-avatar i {
    font-size: 2.25rem;
    color: #fff;
}

.auth-title {
    font-size: 1.5rem;
    font-weight: 600;
    color: #fff;
    text-align: center;
    margin-bottom: 4px;
}
.auth-subtitle {
    font-size: .8125rem;
    color: rgba(170, 187, 204, 0.60);
    text-align: center;
    margin-bottom: 24px;
}

/* -- Form ------------------------------------------------------------ */
.auth-form {
    width: 100%;
}

.auth-field { margin-bottom: 10px; }

.auth-input {
    width: 100%;
    padding: .75rem .9rem;
    background: rgba(128, 128, 128, 0.30);
    border: 1px solid rgba(255, 255, 255, 0.18);
    border-radius: .5rem;
    font-family: var(--sp-font);
    font-size: .875rem;
    color: #fff;
    outline: none;
    transition: border-color .15s, box-shadow .15s, background .15s;
}
.auth-input::placeholder { color: rgba(220, 220, 220, 0.65); }
.auth-input:focus {
    border-color: rgba(255, 255, 255, 0.45);
    background: rgba(128, 128, 128, 0.42);
    box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.08);
}

/* -- Password row with reveal toggle + circular submit --------------- */
.password-row {
    position: relative;
    display: flex;
    align-items: center;
    gap: 8px;
}
.password-row .auth-input {
    flex: 1 1 auto;
    padding-right: 2.75rem;
}
.pw-toggle {
    position: absolute;
    right: 62px;
    background: none;
    border: none;
    padding: 0;
    color: rgba(255, 255, 255, 0.55);
    cursor: pointer;
    font-size: .95rem;
    line-height: 1;
    transition: color .15s;
}
.pw-toggle:hover { color: #fff; }

.circle-submit {
    flex: 0 0 auto;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.16);
    border: 1px solid rgba(255, 255, 255, 0.25);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all .18s;
}
.circle-submit:hover {
    background: rgba(255, 255, 255, 0.28);
    transform: translateY(-1px);
}
.circle-submit:disabled { opacity: .6; cursor: not-allowed; transform: none; }
.circle-submit i { font-size: 1rem; }

/* -- Error alert ------------------------------------------- */
.auth-error {
    display: flex;
    align-items: flex-start;
    gap: .5rem;
    background: rgba(220, 38, 38, 0.25);
    border: 1px solid rgba(252, 165, 165, 0.45);
    border-radius: .625rem;
    padding: .65rem .875rem;
    margin-bottom: 1rem;
    font-size: .8125rem;
    color: #fca5a5;
    line-height: 1.4;
    width: 100%;
}
.auth-error i { margin-top: 1px; flex-shrink: 0; font-size: .9rem; }

/* -- Field error ------------------------------------------- */
.field-err {
    font-size: .73rem;
    color: #fca5a5;
    margin-top: .3rem;
    display: block;
}

/* -- Auth animations --------------------------------------- */
@keyframes spin { to { transform: rotate(360deg); } }

.auth-spinner {
    display: inline-block;
    width: 16px;
    height: 16px;
    border: 2px solid rgba(255, 255, 255, .35);
    border-top-color: #fff;
    border-radius: 50%;
    animation: spin .7s linear infinite;
    vertical-align: middle;
}

/* -- Auth responsive --------------------------------------- */
@media (max-width: 440px) {
    .auth-company-logo { top: 24px; max-width: 220px; height: 48px; }
    .auth-card { max-width: 260px; }
}

