/* =========================================================
 * login.css
 * Custom styling for the authentication (login) page.
 * Palette follows the dark sidebar: near-black + violet accent.
 * ========================================================= */

:root {
    --auth-bg: #f5f5f9;
    --auth-surface: #ffffff;
    --auth-ink: #2f3349;
    --auth-muted: #7a8299;
    --auth-border: #e6e8f0;
    --auth-primary: #5b46d8;
    --auth-primary-light: #6d5bf5;
    --auth-primary-dark: #4f3bd3;
    --auth-dark: #0b0b13;
    --auth-dark-soft: #141426;
    --auth-danger: #b3261e;
}

body.auth-body {
    margin: 0;
    min-height: 100vh;
    min-height: 100dvh;
    font-family: "Public Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    color: var(--auth-ink);
    background-color: var(--auth-bg);
    -webkit-font-smoothing: antialiased;
}

/* ---------- Shell ---------- */
.auth-shell {
    display: flex;
    min-height: 100vh;
    min-height: 100dvh;
    width: 100%;
}

/* ---------- Left / brand panel ---------- */
.auth-aside {
    position: relative;
    display: none;
    flex: 0 0 46%;
    flex-direction: column;
    justify-content: space-between;
    max-width: 40rem;
    padding: 3rem;
    overflow: hidden;
    color: #fff;
    background-image:
        radial-gradient(38rem 30rem at -10% 0%, rgba(109, 91, 245, 0.45), transparent 62%),
        radial-gradient(26rem 26rem at 115% 105%, rgba(139, 123, 255, 0.28), transparent 62%),
        linear-gradient(160deg, var(--auth-dark-soft) 0%, var(--auth-dark) 55%, #241a5c 100%);
}

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

.auth-aside-glow--one {
    top: 12%;
    right: -6rem;
    width: 18rem;
    height: 18rem;
    background-color: rgba(109, 91, 245, 0.45);
}

.auth-aside-glow--two {
    bottom: -6rem;
    left: -4rem;
    width: 16rem;
    height: 16rem;
    background-color: rgba(255, 46, 99, 0.22);
}

.auth-aside-top,
.auth-feature-list,
.auth-aside-footer {
    position: relative;
    z-index: 1;
}

.auth-brand {
    display: inline-flex;
    align-items: center;
    gap: 0.75rem;
    text-decoration: none;
}

.auth-brand-logo {
    display: grid;
    place-items: center;
    width: 2.75rem;
    height: 2.75rem;
    border: 1px solid rgba(255, 255, 255, 0.14);
    border-radius: 0.875rem;
    background-color: rgba(255, 255, 255, 0.08);
}

.auth-brand-logo img {
    display: block;
    width: 1.5rem;
    height: auto;
}

.auth-brand-name {
    font-size: 1.125rem;
    font-weight: 700;
    letter-spacing: 0.02em;
    color: #fff;
    text-transform: capitalize;
}

.auth-brand-name:hover {
    color: #fff;
}

.auth-aside-title {
    max-width: 24rem;
    margin: 2.75rem 0 1rem;
    font-size: 2.125rem;
    font-weight: 700;
    line-height: 1.3;
    letter-spacing: -0.02em;
    color: #fff;
}

.auth-aside-text {
    max-width: 26rem;
    margin: 0;
    font-size: 0.9375rem;
    line-height: 1.75;
    color: rgba(255, 255, 255, 0.65);
}

.auth-feature-list {
    display: grid;
    gap: 1.25rem;
    margin: 2.5rem 0;
    padding: 0;
    list-style: none;
}

.auth-feature-list li {
    display: flex;
    align-items: flex-start;
    gap: 0.875rem;
}

.auth-feature-icon {
    display: grid;
    place-items: center;
    flex: 0 0 auto;
    width: 2.5rem;
    height: 2.5rem;
    font-size: 1.25rem;
    color: #cfc7ff;
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 0.75rem;
    background-color: rgba(255, 255, 255, 0.08);
}

.auth-feature-title {
    margin: 0 0 0.125rem;
    font-size: 0.9375rem;
    font-weight: 600;
    color: #fff;
}

.auth-feature-text {
    margin: 0;
    font-size: 0.8125rem;
    line-height: 1.55;
    color: rgba(255, 255, 255, 0.58);
}

.auth-aside-footer {
    margin: 0;
    font-size: 0.8125rem;
    color: rgba(255, 255, 255, 0.45);
}

/* ---------- Right / form panel ---------- */
.auth-main {
    position: relative;
    display: flex;
    flex: 1 1 auto;
    align-items: center;
    justify-content: center;
    padding: 2.5rem 1.25rem;
    overflow: hidden;
    background-image:
        radial-gradient(30rem 30rem at 110% -15%, rgba(109, 91, 245, 0.1), transparent 60%),
        radial-gradient(24rem 24rem at -10% 110%, rgba(109, 91, 245, 0.08), transparent 60%);
}

.auth-main-inner {
    width: 100%;
    max-width: 27rem;
}

.auth-brand--mobile {
    display: flex;
    justify-content: center;
    margin: 0 0 1.75rem;
}

.auth-brand--mobile .auth-brand-logo {
    border-color: var(--auth-border);
    background-color: var(--auth-surface);
    box-shadow: 0 0.25rem 0.75rem rgba(29, 33, 57, 0.06);
}

.auth-brand--mobile .auth-brand-name {
    color: var(--auth-ink);
}

/* ---------- Card ---------- */
.auth-card {
    padding: 2.5rem;
    border-radius: 1.25rem;
    background-color: var(--auth-surface);
    box-shadow: 0 1.5rem 3rem -1.5rem rgba(29, 33, 57, 0.25), 0 0 0 1px rgba(29, 33, 57, 0.04);
}

.auth-card-title {
    margin: 0 0 0.375rem;
    font-size: 1.5rem;
    font-weight: 700;
    letter-spacing: -0.01em;
    color: var(--auth-ink);
}

.auth-card-subtitle {
    margin: 0 0 1.75rem;
    font-size: 0.875rem;
    line-height: 1.6;
    color: var(--auth-muted);
}

/* ---------- Alert ---------- */
.auth-alert {
    display: flex;
    align-items: flex-start;
    gap: 0.625rem;
    margin-bottom: 1.25rem;
    padding: 0.875rem 1rem;
    font-size: 0.875rem;
    line-height: 1.5;
    color: var(--auth-danger);
    border: 1px solid #ffd5cd;
    border-radius: 0.75rem;
    background-color: #ffece8;
}

.auth-alert i {
    font-size: 1.125rem;
    line-height: 1.3;
}

.auth-alert--info {
    color: var(--auth-primary-dark);
    border-color: #ddd8fb;
    background-color: #f1eeff;
}

/* ---------- Fields ---------- */
.auth-field {
    margin-bottom: 1.125rem;
}

.auth-label {
    display: block;
    margin-bottom: 0.5rem;
    font-size: 0.8125rem;
    font-weight: 600;
    letter-spacing: 0.02em;
    text-transform: uppercase;
    color: var(--auth-muted);
}

.auth-input-group {
    position: relative;
    display: flex;
    align-items: center;
    height: 3rem;
    border: 1px solid var(--auth-border);
    border-radius: 0.75rem;
    background-color: #fbfbfd;
    transition: border-color 0.2s ease-in-out, box-shadow 0.2s ease-in-out, background-color 0.2s ease-in-out;
}

.auth-input-group:focus-within {
    border-color: var(--auth-primary-light);
    background-color: var(--auth-surface);
    box-shadow: 0 0 0 0.25rem rgba(109, 91, 245, 0.12);
}

.auth-input-group.is-invalid {
    border-color: #ff9b8b;
    background-color: var(--auth-surface);
}

.auth-input-group.is-invalid:focus-within {
    border-color: #ff7a66;
    box-shadow: 0 0 0 0.25rem rgba(255, 62, 29, 0.12);
}

.auth-input-icon {
    position: absolute;
    left: 1rem;
    font-size: 1.125rem;
    color: var(--auth-muted);
    pointer-events: none;
    transition: color 0.2s ease-in-out;
}

.auth-input-group:focus-within .auth-input-icon {
    color: var(--auth-primary);
}

.auth-input {
    width: 100%;
    height: 100%;
    padding: 0 1rem 0 2.5rem;
    font-size: 0.9375rem;
    color: var(--auth-ink);
    border: 0;
    border-radius: 0.75rem;
    outline: 0;
    background-color: transparent;
}

.auth-input-group--password .auth-input {
    padding-right: 2.75rem;
}

.auth-input::placeholder {
    color: #a8afc1;
}

.auth-input-action {
    position: absolute;
    right: 0.5rem;
    display: grid;
    place-items: center;
    width: 2rem;
    height: 2rem;
    padding: 0;
    font-size: 1.125rem;
    color: var(--auth-muted);
    border: 0;
    border-radius: 0.5rem;
    background-color: transparent;
    cursor: pointer;
    transition: color 0.2s ease-in-out, background-color 0.2s ease-in-out;
}

.auth-input-action:hover,
.auth-input-action:focus-visible {
    color: var(--auth-primary);
    background-color: rgba(109, 91, 245, 0.08);
}

/* ---------- Remember me ---------- */
.auth-row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    margin-bottom: 1.5rem;
}

.auth-check {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    margin: 0;
    font-size: 0.875rem;
    font-weight: 400;
    text-transform: none;
    letter-spacing: 0;
    color: var(--auth-muted);
    cursor: pointer;
    user-select: none;
}

.auth-check input {
    width: 1rem;
    height: 1rem;
    margin: 0;
    accent-color: var(--auth-primary);
    cursor: pointer;
}

/* ---------- Submit ---------- */
.auth-submit {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    width: 100%;
    height: 3rem;
    font-size: 0.9375rem;
    font-weight: 600;
    color: #fff;
    border: 0;
    border-radius: 0.75rem;
    background-color: var(--auth-primary);
    background-image: linear-gradient(135deg, var(--auth-primary-light) 0%, var(--auth-primary-dark) 100%);
    box-shadow: 0 0.75rem 1.5rem -0.75rem rgba(91, 70, 216, 0.9);
    cursor: pointer;
    transition: transform 0.15s ease-in-out, filter 0.2s ease-in-out, box-shadow 0.2s ease-in-out;
}

.auth-submit:hover {
    filter: brightness(1.06);
    transform: translateY(-1px);
}

.auth-submit:active {
    transform: translateY(0);
}

.auth-submit:focus-visible {
    outline: 0;
    box-shadow: 0 0 0 0.25rem rgba(109, 91, 245, 0.35);
}

.auth-submit:disabled {
    cursor: progress;
    opacity: 0.85;
    transform: none;
}

.auth-submit i {
    font-size: 1.25rem;
}

.auth-submit.is-loading i {
    -webkit-animation: authSpin 0.9s linear infinite;
    animation: authSpin 0.9s linear infinite;
}

@-webkit-keyframes authSpin {
    to {
        -webkit-transform: rotate(360deg);
    }
}

@keyframes authSpin {
    to {
        transform: rotate(360deg);
    }
}

/* ---------- Help & footer ---------- */
.auth-help {
    margin: 1.5rem 0 0;
    padding-top: 1.25rem;
    font-size: 0.8125rem;
    line-height: 1.6;
    text-align: center;
    color: var(--auth-muted);
    border-top: 1px solid var(--auth-border);
}

.auth-copyright {
    margin: 1.75rem 0 0;
    font-size: 0.75rem;
    line-height: 1.6;
    text-align: center;
    color: #a1a9bd;
}

/* ---------- Responsive ---------- */
@media (min-width: 992px) {
    .auth-aside {
        display: flex;
    }

    .auth-brand--mobile {
        display: none;
    }
}

@media (max-width: 575.98px) {
    .auth-main {
        padding: 1.75rem 1rem;
    }

    .auth-card {
        padding: 1.75rem 1.5rem;
        border-radius: 1rem;
    }

    .auth-card-title {
        font-size: 1.375rem;
    }
}




