/*
 * Jagalink - modern auth layout (login page only)
 * Scoped under .auth-modern-page / .auth-modern so no other page is affected.
 * Brand palette taken from the logo gradient: #5106FF -> #61CBF2
 */

.auth-modern-page {
    --am-violet: #5106ff;
    --am-blue: #3b82f6;
    --am-cyan: #61cbf2;
    --am-ink: #101828;
    --am-body: #475467;
    --am-muted: #667085;
    --am-faint: #98a2b3;
    --am-line: #e7eaf0;
    --am-surface: #ffffff;
    --am-bg: #f7f8fb;
    --am-radius: 24px;

    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    padding: 40px 20px;
    background: var(--am-bg);
    overflow: hidden;
    isolation: isolate;
}

/* soft brand glow in the page background */
.auth-modern-page::before,
.auth-modern-page::after {
    content: "";
    position: absolute;
    z-index: 0;
    width: 620px;
    height: 620px;
    border-radius: 50%;
    filter: blur(90px);
    opacity: .38;
    pointer-events: none;
}

.auth-modern-page::before {
    top: -240px;
    left: -180px;
    background: radial-gradient(circle at 30% 30%, rgba(81, 6, 255, .55), rgba(81, 6, 255, 0) 70%);
}

.auth-modern-page::after {
    bottom: -260px;
    right: -160px;
    background: radial-gradient(circle at 70% 70%, rgba(97, 203, 242, .65), rgba(97, 203, 242, 0) 70%);
}

/* ---------------------------------------------------------------- card */

.auth-modern {
    position: relative;
    z-index: 1;
    display: grid;
    grid-template-columns: .92fr 1.08fr;
    width: 100%;
    max-width: 1040px;
    background: var(--am-surface);
    border-radius: var(--am-radius);
    box-shadow:
        0 32px 80px -24px rgba(16, 24, 40, .22),
        0 8px 24px -14px rgba(16, 24, 40, .10);
    overflow: hidden;
}

/* ------------------------------------------------------- brand column */

.auth-modern__brand {
    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    gap: 32px;
    padding: 44px 40px;
    color: #fff;
    background: linear-gradient(150deg, #5106ff 0%, #3b82f6 52%, #61cbf2 100%);
    overflow: hidden;
}

.auth-brand__glow {
    position: absolute;
    border-radius: 50%;
    pointer-events: none;
    filter: blur(60px);
}

.auth-brand__glow--1 {
    width: 340px;
    height: 340px;
    top: -120px;
    right: -110px;
    background: rgba(255, 255, 255, .30);
}

.auth-brand__glow--2 {
    width: 300px;
    height: 300px;
    bottom: -140px;
    left: -80px;
    background: rgba(12, 4, 60, .35);
}

.auth-brand__logo {
    position: relative;
    z-index: 1;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    align-self: flex-start;
    padding: 12px 18px;
    background: #fff;
    border-radius: 14px;
    box-shadow: 0 12px 30px -12px rgba(9, 10, 38, .45);
}

.auth-brand__logo img {
    display: block;
    width: auto;
    height: 30px;
}

.auth-brand__body {
    position: relative;
    z-index: 1;
}

.auth-brand__title {
    margin: 0 0 12px;
    font-size: 30px;
    line-height: 1.18;
    font-weight: 700;
    letter-spacing: -.025em;
    color: #fff;
}

.auth-brand__subtitle {
    margin: 0 0 26px;
    max-width: 34ch;
    font-size: 15px;
    line-height: 1.6;
    color: rgba(255, 255, 255, .84);
}

.auth-brand__features {
    margin: 0;
    padding: 0;
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.auth-brand__features li {
    display: flex;
    align-items: center;
    gap: 11px;
    font-size: 14px;
    font-weight: 500;
    color: rgba(255, 255, 255, .94);
}

.auth-brand__features i {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 26px;
    width: 26px;
    height: 26px;
    border-radius: 50%;
    font-size: 11px;
    background: rgba(255, 255, 255, .18);
    border: 1px solid rgba(255, 255, 255, .28);
}

.auth-brand__footer {
    position: relative;
    z-index: 1;
    font-size: 12px;
    color: rgba(255, 255, 255, .62);
}

/* ------------------------------------------------------- form column */

.auth-modern__panel {
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 48px 52px;
    background: var(--am-surface);
}

.auth-panel__title {
    margin: 0 0 6px;
    font-size: 26px;
    line-height: 1.25;
    font-weight: 700;
    letter-spacing: -.02em;
    color: var(--am-ink);
}

.auth-panel__subtitle {
    margin: 0 0 28px;
    font-size: 14.5px;
    line-height: 1.55;
    color: var(--am-muted);
}

/* alerts */
.auth-modern .alert {
    padding: 13px 16px;
    border: 0;
    border-radius: 12px;
    font-size: 14px;
    box-shadow: none;
}

.auth-modern .alert-success { background: #ecfdf3; color: #027a48; }
.auth-modern .alert-danger  { background: #fef3f2; color: #b42318; }
.auth-modern .alert-info    { background: #eff8ff; color: #175cd3; }
.auth-modern .alert-warning { background: #fffaeb; color: #b54708; }

/* form */
.auth-form .form-group {
    margin-bottom: 18px;
}

.auth-label {
    display: block;
    margin-bottom: 8px;
    font-size: 13px;
    font-weight: 600;
    color: #344054;
}

.auth-input-wrap {
    position: relative;
}

.auth-input-icon {
    position: absolute;
    top: 50%;
    left: 16px;
    transform: translateY(-50%);
    font-size: 14px;
    color: var(--am-faint);
    pointer-events: none;
    transition: color .15s ease;
}

.auth-modern .auth-input {
    height: 50px;
    padding: 0 16px 0 44px;
    border: 1px solid var(--am-line);
    border-radius: 12px;
    background: #fff;
    font-size: 15px;
    color: var(--am-ink);
    box-shadow: none;
    transition: border-color .15s ease, box-shadow .15s ease;
}

.auth-modern .auth-input::placeholder {
    color: var(--am-faint);
}

.auth-modern .auth-input:focus {
    border-color: var(--am-violet);
    box-shadow: 0 0 0 4px rgba(81, 6, 255, .12);
    outline: none;
}

.auth-modern .auth-input-wrap:focus-within .auth-input-icon {
    color: var(--am-violet);
}

.auth-modern .auth-input.is-invalid {
    border-color: #f04438;
}

.auth-modern .auth-input.is-invalid:focus {
    box-shadow: 0 0 0 4px rgba(240, 68, 56, .14);
}

.auth-modern .invalid-feedback {
    margin-top: 7px;
    font-size: 13px;
}

/* password reveal link injected by custom.js into the <label> */
.auth-modern .auth-label a[role="button"] {
    color: var(--am-faint);
    font-size: 13px;
    line-height: 1;
    text-decoration: none;
    cursor: pointer;
}

.auth-modern .auth-label a[role="button"]:hover,
.auth-modern .auth-label a[role="button"]:focus {
    color: var(--am-violet);
    text-decoration: none;
}

/* remember me / lost password row */
.auth-form__meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 10px;
    margin: 4px 0 24px;
    font-size: 13.5px;
}

.auth-form__meta .custom-control-label,
.auth-form__meta a {
    font-size: 13.5px;
    color: var(--am-muted);
}

.auth-form__meta a:hover {
    color: var(--am-violet);
}

/* captcha */
.auth-form .cf-turnstile {
    margin: 2px 0 18px;
}

/* submit */
.auth-modern .auth-submit {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 52px;
    border: 0;
    border-radius: 12px;
    font-size: 15.5px;
    font-weight: 600;
    color: #fff;
    background: linear-gradient(120deg, #5106ff 0%, #3b82f6 58%, #4fb8ea 100%);
    box-shadow: 0 14px 28px -14px rgba(81, 6, 255, .70);
    transition: transform .15s ease, box-shadow .15s ease, filter .15s ease;
}

.auth-modern .auth-submit:hover,
.auth-modern .auth-submit:focus {
    color: #fff;
    transform: translateY(-1px);
    filter: brightness(1.04);
    box-shadow: 0 18px 34px -14px rgba(81, 6, 255, .78);
}

.auth-modern .auth-submit:active {
    transform: translateY(0);
    box-shadow: 0 8px 18px -12px rgba(81, 6, 255, .70);
}

.auth-modern .auth-submit:disabled {
    opacity: .6;
    transform: none;
    box-shadow: none;
}

/* divider */
.auth-divider {
    display: flex;
    align-items: center;
    gap: 14px;
    margin: 26px 0 18px;
    font-size: 11.5px;
    font-weight: 600;
    letter-spacing: .09em;
    text-transform: uppercase;
    color: var(--am-faint);
}

.auth-divider::before,
.auth-divider::after {
    content: "";
    flex: 1 1 auto;
    height: 1px;
    background: var(--am-line);
}

/* social logins */
.auth-social {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
}

.auth-social .btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 9px;
    height: 48px;
    padding: 0 12px;
    border: 1px solid var(--am-line);
    border-radius: 12px;
    background: #fff;
    font-size: 14px;
    font-weight: 500;
    color: #344054;
    box-shadow: none;
    transition: border-color .15s ease, background .15s ease, transform .15s ease, box-shadow .15s ease;
}

.auth-social .btn:hover,
.auth-social .btn:focus {
    border-color: #d0d5dd;
    background: #f9fafb;
    color: #1d2939;
    transform: translateY(-1px);
    box-shadow: 0 8px 18px -12px rgba(16, 24, 40, .35);
}

.auth-social .btn img {
    width: auto;
    height: 18px;
}

/* register prompt */
.auth-register {
    margin-top: 28px;
    text-align: center;
    font-size: 14px;
    color: var(--am-muted);
}

.auth-register a {
    font-weight: 600;
    color: var(--am-violet);
    text-decoration: none;
}

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

/* --------------------------------------------------------- responsive */

@media (max-width: 991.98px) {
    .auth-modern-page {
        padding: 20px 16px;
    }

    .auth-modern {
        grid-template-columns: 1fr;
        max-width: 480px;
        border-radius: 20px;
    }

    .auth-modern__brand {
        gap: 18px;
        padding: 26px 24px;
    }

    .auth-brand__logo {
        padding: 10px 14px;
        border-radius: 12px;
    }

    .auth-brand__logo img {
        height: 24px;
    }

    .auth-brand__title {
        font-size: 22px;
        margin-bottom: 6px;
    }

    .auth-brand__subtitle {
        margin-bottom: 0;
        font-size: 13.5px;
    }

    .auth-brand__features,
    .auth-brand__footer {
        display: none;
    }

    .auth-modern__panel {
        padding: 28px 24px 32px;
    }

    .auth-panel__title {
        font-size: 22px;
    }
}

@media (max-width: 419.98px) {
    .auth-social {
        grid-template-columns: 1fr;
    }
}

/* ------------------------------------------------------ dark fallback */

[data-theme-style="dark"] .auth-modern-page {
    --am-ink: #f2f4f7;
    --am-body: #d0d5dd;
    --am-muted: #98a2b3;
    --am-faint: #858d9b;
    --am-line: #2f333b;
    --am-surface: #181a1f;
    --am-bg: #0d0e11;
}

[data-theme-style="dark"] .auth-modern .auth-input,
[data-theme-style="dark"] .auth-social .btn {
    background: #181a1f;
    color: #e4e7ec;
}

[data-theme-style="dark"] .auth-modern .auth-input:focus {
    box-shadow: 0 0 0 4px rgba(81, 6, 255, .28);
}

[data-theme-style="dark"] .auth-modern .auth-label {
    color: #d0d5dd;
}
