/* ----------------------------------------------------------------------
   AroundLink — Sign in page
   Redesigned to a single centred card focused on the staff /apis/docs
   entry point. Officein visual language:
     - Plus Jakarta Sans (falls back to system font stack if not present)
     - Indigo #130342 for headlines + primary accent
     - Soft indigo gradient background with two blurred accent blobs
     - `0 12px 40px rgba(19,3,66,0.08)` layered shadow for the card
   The .form-group / .form-input / .login-btn / .sso-btn class names still
   match those the login_form Live Component emits — the JS + component
   markup keep working with no change.
   -------------------------------------------------------------------- */

:root {
    --al-indigo:            #130342;
    --al-indigo-hover:      #1d0764;
    --al-primary-light:     #EEF2FF;
    --al-primary-tint:      #F5F3FF;
    --al-border:            #E5E7EB;
    --al-text:              #1F2937;
    --al-muted:             #6B7280;
    --al-danger-bg:         #FEF2F2;
    --al-danger-border:     #FCA5A5;
    --al-danger-text:       #B91C1C;
    --al-font:              'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

/* Page ---------------------------------------------------------------- */

.al-login-page {
    position: relative;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px 20px;
    font-family: var(--al-font);
    background: linear-gradient(135deg, #F5F3FF 0%, #EEF2FF 55%, #EDE9FE 100%);
    color: var(--al-text);
    overflow: hidden;
}

.al-login-bg {
    position: absolute;
    inset: 0;
    pointer-events: none;
    overflow: hidden;
}

.al-login-blob {
    position: absolute;
    display: block;
    border-radius: 50%;
    filter: blur(80px);
    opacity: 0.55;
}

.al-login-blob--1 {
    width: 420px;
    height: 420px;
    top: -120px;
    right: -140px;
    background: radial-gradient(circle, rgba(124, 77, 255, 0.35), transparent 70%);
}

.al-login-blob--2 {
    width: 380px;
    height: 380px;
    bottom: -140px;
    left: -100px;
    background: radial-gradient(circle, rgba(19, 3, 66, 0.28), transparent 70%);
}

/* Card ---------------------------------------------------------------- */

.al-login-card {
    position: relative;
    z-index: 1;
    width: 100%;
    max-width: 440px;
    background: #ffffff;
    border-radius: 20px;
    padding: 40px 36px 32px;
    box-shadow: 0 12px 40px rgba(19, 3, 66, 0.08), 0 2px 6px rgba(19, 3, 66, 0.04);
}

.al-login-brand {
    display: flex;
    justify-content: center;
    margin-bottom: 24px;
}

.al-login-brand img {
    width: 56px;
    height: 56px;
    object-fit: contain;
    border-radius: 12px;
}

.al-login-heading {
    text-align: center;
    margin-bottom: 28px;
}

.al-login-heading h1 {
    font-size: 22px;
    line-height: 1.25;
    font-weight: 700;
    color: var(--al-indigo);
    margin: 0 0 8px;
}

.al-login-heading p {
    font-size: 13.5px;
    line-height: 1.5;
    color: var(--al-muted);
    margin: 0;
}

.al-login-signedin {
    background: var(--al-primary-tint);
    border: 1px solid var(--al-border);
    border-radius: 10px;
    padding: 12px 14px;
    font-size: 13px;
    color: var(--al-text);
    margin-bottom: 20px;
}

.al-login-signedin a {
    color: var(--al-indigo);
    font-weight: 600;
    text-decoration: none;
    margin-left: 6px;
}

.al-login-signedin a:hover { text-decoration: underline; }

/* Alerts (SSO error, wrong password, etc.) — keep both the new class
   and the legacy Bootstrap-style classes the LoginForm component may
   still emit. ---------------------------------------------------------- */

.al-login-alert,
.al-login-form .alert {
    padding: 12px 14px;
    border-radius: 10px;
    font-size: 13px;
    margin-bottom: 18px;
}

.al-login-alert--error,
.al-login-form .alert-danger {
    background: var(--al-danger-bg);
    border: 1px solid var(--al-danger-border);
    color: var(--al-danger-text);
}

/* Form fields — kept in sync with the LoginForm component markup ------ */

.al-login-form .form-group + .form-group { margin-top: 14px; }

.al-login-form .form-label {
    display: block;
    font-size: 12.5px;
    font-weight: 600;
    color: var(--al-text);
    margin-bottom: 6px;
}

.al-login-form .input-wrapper {
    position: relative;
}

.al-login-form .form-input {
    width: 100%;
    height: 46px;
    padding: 0 44px 0 14px;
    font-family: var(--al-font);
    font-size: 14px;
    color: var(--al-text);
    background: #ffffff;
    border: 1.5px solid var(--al-border);
    border-radius: 10px;
    outline: none;
    transition: border-color 0.12s ease, box-shadow 0.12s ease;
}

.al-login-form .form-input::placeholder { color: #9CA3AF; }

.al-login-form .form-input:focus {
    border-color: var(--al-indigo);
    box-shadow: 0 0 0 3px rgba(19, 3, 66, 0.12);
}

/*
 * app.css ships a global `form button { background:#130342 !important;
 * width:100%; height:60px !important }` that paints every button inside a
 * form. We need `!important` here so the eye-toggle stays a small icon on
 * the right rather than a full-width dark bar covering the input.
 */
.al-login-card .input-icon {
    position: absolute !important;
    right: 12px !important;
    top: 50% !important;
    transform: translateY(-50%) !important;
    width: auto !important;
    height: auto !important;
    min-height: 0 !important;
    line-height: 1 !important;
    margin: 0 !important;
    padding: 0 !important;
    background: none !important;
    background-color: transparent !important;
    color: var(--al-muted) !important;
    border: none !important;
    box-shadow: none !important;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: default;
}

.al-login-card .input-icon--toggle-password {
    cursor: pointer;
}

.al-login-card .input-icon--toggle-password:hover {
    color: var(--al-indigo) !important;
}

/* Primary "Sign in" button ------------------------------------------- */

/*
 * `!important` is unfortunately mandatory: app.css defines a global
 * `[type="submit"] { background: linear-gradient(...) !important }` for the
 * legacy Twig UI, and only another `!important` can trump it. Scoped to
 * `.al-login-card` so the rest of the platform's submit buttons are
 * untouched.
 */
.al-login-card .login-btn {
    width: 100% !important;
    height: 46px !important;
    line-height: 46px !important;
    margin-top: 20px !important;
    background: var(--al-indigo) !important;
    color: #ffffff !important;
    border: none !important;
    border-radius: 10px !important;
    font-family: var(--al-font) !important;
    font-size: 14px !important;
    font-weight: 600;
    letter-spacing: 0.01em;
    cursor: pointer;
    transition: background 0.12s ease, transform 0.06s ease;
}

.al-login-card .login-btn:hover { background: var(--al-indigo-hover) !important; }
.al-login-card .login-btn:active { transform: translateY(1px); }
.al-login-form .login-btn.mb-1 { margin-bottom: 12px; }

.al-login-form .login-link {
    display: block;
    text-align: center;
    color: var(--al-indigo);
    font-size: 12.5px;
    font-weight: 500;
    text-decoration: none;
    margin: 6px 0 0;
}

.al-login-form .login-link:hover { text-decoration: underline; }

/* SSO ---------------------------------------------------------------- */

.al-login-form .sso-divider {
    position: relative;
    text-align: center;
    color: var(--al-muted);
    font-size: 12px;
    margin: 22px 0 14px;
}

.al-login-form .sso-divider::before,
.al-login-form .sso-divider::after {
    content: '';
    position: absolute;
    top: 50%;
    width: calc(50% - 100px);
    height: 1px;
    background: var(--al-border);
}

.al-login-form .sso-divider::before { left: 0; }
.al-login-form .sso-divider::after  { right: 0; }

.al-login-card .sso-btn {
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    gap: 10px;
    width: 100% !important;
    height: 44px !important;
    line-height: 44px !important;
    margin-top: 0 !important;
    background: #ffffff !important;
    color: var(--al-text) !important;
    border: 1.5px solid var(--al-border) !important;
    border-radius: 10px !important;
    font-family: var(--al-font) !important;
    font-size: 14px !important;
    font-weight: 500;
    text-decoration: none;
    cursor: pointer;
    transition: border-color 0.12s ease, background 0.12s ease;
}

.al-login-card .sso-btn:hover:not(.sso-btn--disabled) {
    border-color: var(--al-indigo) !important;
    background: var(--al-primary-tint) !important;
}

.al-login-card .sso-btn--disabled {
    color: var(--al-muted) !important;
    background: #F9FAFB !important;
    cursor: not-allowed;
}

/* Footer ------------------------------------------------------------- */

.al-login-footer {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    margin-top: 24px;
    font-size: 12px;
    color: var(--al-muted);
}

.al-login-footer a {
    color: var(--al-indigo);
    text-decoration: none;
    font-weight: 500;
}

.al-login-footer a:hover { text-decoration: underline; }

/* Small screens ------------------------------------------------------- */

@media (max-width: 480px) {
    .al-login-card {
        padding: 28px 22px 24px;
        border-radius: 16px;
    }
    .al-login-heading h1 { font-size: 20px; }
}
