/*==========================================
  Desiwood — login page (resources/views/frontend/pages/login.blade.php;
  behaviour in public/frontend/js/dw-login.js).

  Every rule is scoped to .dw-login. The page is one rounded "app shell":
  form on the left, release artwork with a short pitch on the right. The
  artwork panel is hidden below 992px, where the form fills the shell.
==========================================*/

.dw-login {
    --dl-bg: #0b0712;
    --dl-shell: #120b1c;
    --dl-field: rgba(255, 255, 255, .04);
    --dl-line: rgba(255, 255, 255, .1);
    --dl-line-strong: rgba(255, 255, 255, .2);
    --dl-text: #fff;
    --dl-muted: #a39db1;
    --dl-accent: #ff8a00;
    --dl-accent-2: #ff006e;
    --dl-gradient: linear-gradient(90deg, var(--dl-accent) 0%, var(--dl-accent-2) 100%);
    --dl-error: #ff6b7d;
    --dl-ease: cubic-bezier(0.22, 1, 0.36, 1);
    --dl-fast: .2s;
    position: relative;
    isolation: isolate;
    /* Clears the fixed site header (88px). */
    padding: 128px 0 96px;
    font-family: "Inter", var(--default-font, "Poppins"), sans-serif;
    color: var(--dl-text);
}

/* Soft brand glow behind the shell. */
.dw-login::before {
    content: "";
    position: absolute;
    top: 80px;
    left: 50%;
    z-index: -1;
    width: min(1200px, 130vw);
    height: 720px;
    transform: translateX(-50%);
    background:
        radial-gradient(40% 50% at 30% 45%, rgba(255, 120, 0, .14), transparent 70%),
        radial-gradient(45% 55% at 72% 50%, rgba(190, 0, 150, .2), transparent 70%);
    filter: blur(30px);
    pointer-events: none;
}

/* ---------- Shell ---------- */

.dw-login__shell {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr);
    min-height: 660px;
    overflow: hidden;
    border: 1px solid var(--dl-line);
    border-radius: 28px;
    background: linear-gradient(180deg, rgba(255, 255, 255, .04), transparent 30%), var(--dl-shell);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, .06), 0 40px 100px -40px rgba(0, 0, 0, .9);
}

.dw-login__main {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 56px 64px;
}

.dw-login__form-wrap {
    width: 100%;
    max-width: 400px;
}

/* ---------- Heading ---------- */

.dw-login__title {
    margin: 0;
    font-family: inherit;
    font-size: 34px;
    font-weight: 700;
    letter-spacing: -.03em;
    line-height: 1.1;
    color: var(--dl-text);
}

.dw-login__lead {
    margin: 10px 0 0;
    font-size: 15px;
    line-height: 1.55;
    color: var(--dl-muted);
}

/* ---------- Alert ---------- */

.dw-login__alert {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    margin-top: 24px;
    padding: 12px 14px;
    border: 1px solid;
    border-radius: 12px;
    font-size: 13.5px;
    line-height: 1.5;
}

.dw-login__alert i {
    flex: 0 0 auto;
    margin-top: 1px;
    font-size: 17px;
}

.dw-login__alert--error {
    border-color: rgba(255, 107, 125, .3);
    background: rgba(255, 107, 125, .08);
    color: #ffc2ca;
}

.dw-login__alert--warning {
    border-color: rgba(255, 176, 32, .3);
    background: rgba(255, 176, 32, .08);
    color: #ffd99a;
}

.dw-login__alert--info {
    border-color: rgba(120, 160, 255, .3);
    background: rgba(120, 160, 255, .08);
    color: #c8d6ff;
}

/* ---------- Fields ---------- */

.dw-login__form {
    margin-top: 28px;
}

.dw-login .dw-field + .dw-field {
    margin-top: 18px;
}

.dw-login .dw-field__label {
    display: block;
    margin: 0 0 8px;
    font-size: 13.5px;
    font-weight: 500;
    line-height: 1.2;
    color: #ddd8e6;
}

.dw-login .dw-field__control {
    position: relative;
    display: flex;
    align-items: center;
    height: 50px;
    border: 1px solid var(--dl-line);
    border-radius: 12px;
    background: var(--dl-field);
    transition: border-color var(--dl-fast) var(--dl-ease), box-shadow var(--dl-fast) var(--dl-ease), background-color var(--dl-fast) var(--dl-ease);
}

.dw-login .dw-field__control:hover {
    border-color: var(--dl-line-strong);
}

.dw-login .dw-field__control:focus-within {
    border-color: rgba(255, 138, 0, .7);
    background: rgba(255, 255, 255, .06);
    box-shadow: 0 0 0 4px rgba(255, 138, 0, .14);
}

.dw-login .dw-field__control.is-invalid {
    border-color: rgba(255, 107, 125, .65);
}

.dw-login .dw-field__control.is-invalid:focus-within {
    box-shadow: 0 0 0 4px rgba(255, 107, 125, .14);
}

.dw-login .dw-field__icon {
    position: absolute;
    left: 15px;
    font-size: 18px;
    color: #8c859c;
    pointer-events: none;
    transition: color var(--dl-fast) var(--dl-ease);
}

.dw-login .dw-field__control:focus-within .dw-field__icon {
    color: #ffb36b;
}

.dw-login .dw-field__input {
    width: 100%;
    height: 100%;
    padding: 0 16px 0 44px;
    border: 0;
    border-radius: inherit;
    outline: none;
    background: transparent;
    font-family: inherit;
    font-size: 15px;
    color: var(--dl-text);
}

.dw-login .dw-field__input::placeholder {
    color: #6f6880;
}

/* Keep browser autofill on the dark field instead of a yellow/white box. */
.dw-login .dw-field__input:-webkit-autofill {
    -webkit-text-fill-color: var(--dl-text);
    -webkit-box-shadow: 0 0 0 100px #1d1528 inset;
    caret-color: var(--dl-text);
}

.dw-login .dw-field__input[type="password"],
.dw-login .dw-field__control:has(.dw-field__toggle) .dw-field__input {
    padding-right: 48px;
}

.dw-login .dw-field__toggle {
    position: absolute;
    right: 6px;
    display: grid;
    place-items: center;
    width: 38px;
    height: 38px;
    padding: 0;
    border: 0;
    border-radius: 9px;
    background: none;
    font-size: 18px;
    color: #8c859c;
    cursor: pointer;
    transition: color var(--dl-fast) var(--dl-ease), background-color var(--dl-fast) var(--dl-ease);
}

.dw-login .dw-field__toggle:hover {
    background: rgba(255, 255, 255, .06);
    color: #fff;
}

.dw-login .dw-field__error {
    display: flex;
    align-items: center;
    gap: 6px;
    margin: 8px 0 0;
    font-size: 13px;
    line-height: 1.4;
    color: var(--dl-error);
}

.dw-login .dw-field__error[hidden] {
    display: none;
}

/* ---------- Remember / forgot ---------- */

.dw-login__row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin-top: 18px;
}

.dw-login .dw-check {
    position: relative;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    margin: 0;
    font-size: 14px;
    color: #cfc9d9;
    cursor: pointer;
    user-select: none;
}

.dw-login .dw-check input[type="checkbox"] {
    position: absolute;
    width: 1px;
    height: 1px;
    opacity: 0;
}

.dw-login .dw-check__box {
    display: grid;
    place-items: center;
    width: 18px;
    height: 18px;
    border: 1px solid var(--dl-line-strong);
    border-radius: 5px;
    background: rgba(255, 255, 255, .03);
    font-size: 13px;
    color: transparent;
    transition: background-color var(--dl-fast) var(--dl-ease), border-color var(--dl-fast) var(--dl-ease), color var(--dl-fast) var(--dl-ease);
}

.dw-login .dw-check input:checked + .dw-check__box {
    border-color: transparent;
    background: var(--dl-gradient);
    color: #fff;
}

.dw-login .dw-check input:focus-visible + .dw-check__box {
    box-shadow: 0 0 0 3px rgba(255, 138, 0, .4);
}

.dw-login__link {
    border-radius: 4px;
    font-size: 14px;
    font-weight: 500;
    color: #ffaa5c;
    text-decoration: none;
    transition: color var(--dl-fast) var(--dl-ease);
}

.dw-login__link:hover {
    color: #fff;
}

/* ---------- Buttons ---------- */

.dw-login__submit {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    height: 52px;
    margin-top: 28px;
    border: 0;
    border-radius: 12px;
    background: var(--dl-gradient);
    box-shadow: 0 12px 30px -12px rgba(255, 40, 100, .6);
    font-family: inherit;
    font-size: 15.5px;
    font-weight: 600;
    letter-spacing: .01em;
    color: #fff;
    cursor: pointer;
    transition: transform var(--dl-fast) var(--dl-ease), box-shadow var(--dl-fast) var(--dl-ease), filter var(--dl-fast) var(--dl-ease);
}

.dw-login__submit:hover {
    filter: brightness(1.08);
    box-shadow: 0 16px 36px -12px rgba(255, 40, 100, .75);
}

.dw-login__submit:active {
    transform: translateY(1px);
}

.dw-login__submit i {
    font-size: 18px;
    transition: transform var(--dl-fast) var(--dl-ease);
}

.dw-login__submit:hover i {
    transform: translateX(3px);
}

.dw-login__spinner {
    display: none;
    width: 18px;
    height: 18px;
    border: 2px solid rgba(255, 255, 255, .4);
    border-top-color: #fff;
    border-radius: 50%;
    animation: dw-login-spin .7s linear infinite;
}

.dw-login__submit.is-loading {
    cursor: progress;
    filter: saturate(.85);
}

.dw-login__submit.is-loading .dw-login__spinner {
    display: block;
}

.dw-login__submit.is-loading i {
    display: none;
}

@keyframes dw-login-spin {
    to {
        transform: rotate(360deg);
    }
}

.dw-login__divider {
    display: flex;
    align-items: center;
    gap: 14px;
    margin: 30px 0 18px;
    font-size: 13px;
    color: #7f7890;
}

.dw-login__divider::before,
.dw-login__divider::after {
    content: "";
    flex: 1 1 auto;
    height: 1px;
    background: var(--dl-line);
}

.dw-login__secondary {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 50px;
    border: 1px solid var(--dl-line-strong);
    border-radius: 12px;
    background: rgba(255, 255, 255, .02);
    font-size: 15px;
    font-weight: 600;
    color: #fff;
    text-decoration: none;
    transition: border-color var(--dl-fast) var(--dl-ease), background-color var(--dl-fast) var(--dl-ease);
}

.dw-login__secondary:hover {
    border-color: rgba(255, 255, 255, .35);
    background: rgba(255, 255, 255, .06);
    color: #fff;
}

.dw-login__note {
    margin: 22px 0 0;
    font-size: 13.5px;
    line-height: 1.5;
    text-align: center;
    color: var(--dl-muted);
}

.dw-login__note .dw-login__link {
    font-size: inherit;
}

/* ---------- Focus ---------- */

.dw-login a:focus-visible,
.dw-login button:focus-visible {
    outline: none;
    box-shadow: 0 0 0 2px var(--dl-shell), 0 0 0 4px rgba(255, 138, 0, .9);
}

/* ---------- Visual panel ---------- */

.dw-login__visual {
    position: relative;
    overflow: hidden;
    margin: 10px;
    border-radius: 20px;
    background: #0a0610;
}

.dw-login__art {
    position: absolute;
    inset: -40px -20px;
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
    transform: rotate(-6deg) scale(1.08);
    opacity: .75;
}

.dw-login__art-col {
    overflow: hidden;
}

.dw-login__art-track {
    display: flex;
    flex-direction: column;
    gap: 12px;
    animation: dw-login-scroll 46s linear infinite;
}

.dw-login__art-col--2 .dw-login__art-track {
    animation-direction: reverse;
    animation-duration: 52s;
}

.dw-login__art-col--3 .dw-login__art-track {
    animation-duration: 40s;
}

.dw-login__art-track img {
    display: block;
    width: 100%;
    aspect-ratio: 1;
    object-fit: cover;
    border-radius: 14px;
}

/* Each column holds its images twice; moving it up by half loops seamlessly. */
@keyframes dw-login-scroll {
    to {
        transform: translateY(calc(-50% - 6px));
    }
}

/* Dark wash so the pitch reads on top of the artwork. */
.dw-login__visual::after {
    content: "";
    position: absolute;
    inset: 0;
    background:
        linear-gradient(180deg, rgba(10, 6, 16, .55) 0%, rgba(10, 6, 16, .1) 30%, rgba(10, 6, 16, .55) 60%, rgba(10, 6, 16, .96) 100%),
        radial-gradient(80% 60% at 100% 100%, rgba(255, 0, 110, .25), transparent 70%);
    pointer-events: none;
}

.dw-login__pitch {
    position: absolute;
    left: 40px;
    right: 40px;
    bottom: 40px;
    z-index: 1;
}

.dw-login__eyebrow {
    margin: 0 0 14px;
    font-size: 12px;
    font-weight: 600;
    letter-spacing: .2em;
    line-height: 1;
    text-transform: uppercase;
    color: #ff9d3d;
}

.dw-login__pitch-title {
    margin: 0;
    font-family: inherit;
    font-size: clamp(30px, 3vw, 40px);
    font-weight: 700;
    letter-spacing: -.035em;
    line-height: 1.05;
    color: #fff;
}

.dw-login__points {
    display: grid;
    gap: 10px;
    margin: 22px 0 0;
    padding: 0;
    list-style: none;
}

.dw-login__points li {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 14.5px;
    line-height: 1.4;
    color: #ded9e7;
}

.dw-login__points i {
    flex: 0 0 auto;
    display: grid;
    place-items: center;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background: rgba(255, 138, 0, .16);
    font-size: 14px;
    color: #ffb36b;
}

/* ---------- Responsive ---------- */

@media (max-width: 1199.98px) {
    .dw-login__main {
        padding: 48px 44px;
    }
}

@media (max-width: 991.98px) {
    .dw-login {
        padding: 108px 0 72px;
    }

    /* The shell keeps the header's container edges; only the form inside is narrowed. */
    .dw-login__shell {
        grid-template-columns: minmax(0, 1fr);
        min-height: 0;
    }

    .dw-login__visual {
        display: none;
    }

    .dw-login__main {
        padding: 44px 40px;
    }

    .dw-login__form-wrap {
        max-width: 460px;
    }
}

@media (max-width: 575.98px) {
    .dw-login {
        padding: 96px 0 56px;
    }

    .dw-login__shell {
        border-radius: 22px;
    }

    .dw-login__main {
        padding: 32px 22px;
    }

    .dw-login__title {
        font-size: 28px;
    }

    .dw-login .dw-field__input {
        font-size: 16px; /* stops iOS zooming into the field */
    }

    .dw-login__row {
        flex-wrap: wrap;
    }
}

/* ---------- Reduced motion ---------- */

@media (prefers-reduced-motion: reduce) {
    .dw-login__art-track {
        animation: none;
    }

    .dw-login *,
    .dw-login *::before,
    .dw-login *::after {
        transition-duration: 0s !important;
    }

    .dw-login__spinner {
        animation-duration: 1.6s;
    }
}
