/* =========================================================
   Dong Phuong shared authentication UI
   Reuse for Login, Register, OTP, Forgot Password, etc.
   ========================================================= */

:root {
    --auth-primary: #075f90;
    --auth-primary-dark: #043969;
    --auth-primary-soft: #e7f4f9;
    --auth-text: #102a3d;
    --auth-muted: #647687;
    --auth-border: #bed2dc;
    --auth-card: #ffffff;
    --auth-shadow: 0 28px 70px rgba(1, 26, 51, 0.34);
    --auth-radius-xl: 36px;
    --auth-radius-lg: 18px;
    --auth-radius-md: 14px;
    --auth-transition: 180ms ease;
}

.auth-shell,
.auth-shell *,
.auth-shell *::before,
.auth-shell *::after {
    box-sizing: border-box;
}

.auth-shell {
    min-height: 100vh;
    display: grid;
    grid-template-columns: minmax(0, 57%) minmax(520px, 43%);
    overflow: hidden;
    background-color: #075f90;
    background-image:
        radial-gradient(circle at 88% 8%, rgba(38, 176, 231, 0.28), transparent 32%),
        linear-gradient(120deg, rgba(2, 27, 65, 0.22), rgba(7, 95, 144, 0.16)),
        url('/assets/img/backgrounds/dp-network-bg.svg'),
        linear-gradient(135deg, #021b41 0%, #043969 48%, #075f90 100%);
    background-position: center, center, 70% center, center;
    background-repeat: no-repeat;
    background-size: cover;
    color: var(--auth-text);
    font-family: "Roboto", "Segoe UI", Arial, sans-serif;
}

/* Left-side showcase. Change --auth-hero-image per page. */
.auth-showcase {
    position: relative;
    min-height: 100vh;
    overflow: hidden;
    isolation: isolate;
    background-image:
        linear-gradient(135deg, rgba(2, 27, 65, 0.20), rgba(7, 95, 144, 0.54)),
        var(--auth-hero-image);
    background-repeat: no-repeat;
    background-position: center center;
    background-size: cover;
}

.auth-showcase::after {
    content: "";
    position: absolute;
    inset: 0;
    pointer-events: none;
    background: linear-gradient(90deg, transparent 60%, rgba(3, 57, 91, 0.72) 100%);
}

.auth-showcase__overlay {
    position: absolute;
    inset: 0;
    pointer-events: none;
    box-shadow: inset -20px 0 48px rgba(2, 27, 65, 0.26);
}

/* Right-side content area. */
.auth-content {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: clamp(24px, 3.5vw, 62px);
    position: relative;
}

.auth-content::before,
.auth-content::after {
    content: "";
    position: absolute;
    border-radius: 999px;
    pointer-events: none;
    filter: blur(1px);
}

.auth-content::before {
    width: 300px;
    height: 300px;
    right: -150px;
    top: -100px;
    background: rgba(37, 179, 226, 0.18);
}

.auth-content::after {
    width: 220px;
    height: 220px;
    left: -90px;
    bottom: -110px;
    background: rgba(255, 255, 255, 0.52);
}

.auth-card {
    position: relative;
    z-index: 1;
    width: min(100%, 660px);
    padding: clamp(30px, 4.2vh, 54px) clamp(26px, 3.4vw, 58px) clamp(26px, 3.4vh, 42px);
    border: 1px solid rgba(255, 255, 255, 0.90);
    border-radius: var(--auth-radius-xl);
    background: rgba(255, 255, 255, 0.96);
    box-shadow: var(--auth-shadow);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
}

.auth-brand {
    text-align: center;
}

.auth-brand__link {
    display: inline-flex;
    max-width: 100%;
    text-decoration: none;
}

.auth-brand__logo {
    display: block;
    width: min(100%, 500px);
    max-height: 104px;
    object-fit: contain;
}

.auth-brand__contact {
    display: inline-block;
    margin-top: 6px;
    color: var(--auth-primary);
    font-size: clamp(14px, 1vw, 18px);
    text-decoration: none;
    transition: color var(--auth-transition);
}

.auth-brand__contact:hover {
    color: var(--auth-primary-dark);
}

.auth-heading {
    margin: clamp(32px, 4vh, 48px) 0 clamp(28px, 3.5vh, 42px);
    text-align: center;
}

.auth-heading h1 {
    margin: 0 0 10px;
    color: var(--auth-text);
    font-size: clamp(24px, 2vw, 34px);
    font-weight: 800;
    line-height: 1.2;
}

.auth-heading p {
    margin: 0;
    color: var(--auth-muted);
    font-size: clamp(14px, 1.05vw, 17px);
    line-height: 1.55;
}

.auth-form {
    display: grid;
    gap: 22px;
}

/* Shared floating-label field. */
.auth-field {
    position: relative;
    min-height: 72px;
}

.auth-field__input {
    width: 100%;
    height: 52px;
    padding: 12px 22px 12px 58px;
    border: 1.5px solid var(--auth-border);
    border-radius: var(--auth-radius-lg);
    outline: 0;
    background: #ffffff;
    color: var(--auth-text);
    font: inherit;
    font-size: 17px;
    box-shadow: 0 8px 24px rgba(43, 94, 166, 0.04);
    transition:
        border-color var(--auth-transition),
        box-shadow var(--auth-transition),
        background var(--auth-transition);
}

.auth-field--has-action .auth-field__input {
    padding-right: 62px;
}

.auth-field__input:hover:not(:disabled) {
    border-color: #76a9c4;
}

.auth-field__input:focus {
    border-color: var(--auth-primary);
    box-shadow: 0 0 0 4px rgba(7, 95, 144, 0.13), 0 10px 28px rgba(3, 67, 103, 0.10);
}

.auth-field__input:disabled {
    cursor: not-allowed;
    opacity: 0.66;
    background: #f5f7fb;
}

.auth-field__icon {
    position: absolute;
    z-index: 2;
    left: 20px;
    top: 35%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #6d7c96;
    transform: translateY(-50%);
    pointer-events: none;
    transition: color var(--auth-transition);
}

.auth-field__label {
    position: absolute;
    z-index: 3;
    left: 52px;
    top: 35%;
    padding: 0 8px;
    color: #75839a;
    background: #ffffff;
    font-size: 16px;
    line-height: 1;
    transform: translateY(-50%);
    transform-origin: left center;
    pointer-events: none;
    transition:
        top var(--auth-transition),
        left var(--auth-transition),
        color var(--auth-transition),
        font-size var(--auth-transition),
        transform var(--auth-transition);
}

.auth-field__input:focus ~ .auth-field__label,
.auth-field__input:not(:placeholder-shown) ~ .auth-field__label {
    top: 0;
    left: 24px;
    color: var(--auth-primary);
    font-size: 13px;
    font-weight: 600;
    transform: translateY(-50%);
}

.auth-field:focus-within .auth-field__icon {
    color: var(--auth-primary);
}

.auth-field__action {
    position: absolute;
    z-index: 4;
    right: 14px;
    top: 35%;
    width: 44px;
    height: 44px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    border: 0;
    border-radius: 12px;
    background: transparent;
    color: #667691;
    cursor: pointer;
    transform: translateY(-50%);
    transition: color var(--auth-transition), background var(--auth-transition);
}

.auth-field__action:hover:not(:disabled),
.auth-field__action:focus-visible {
    color: var(--auth-primary);
    background: var(--auth-primary-soft);
    outline: 0;
}

.auth-field__action:disabled {
    cursor: not-allowed;
    opacity: 0.5;
}

.auth-submit {
    width: 100%;
    height: 50px!important;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    margin-top: 4px;
    padding: 14px 24px;
    border: 0;
    border-radius: 999px;
    background: linear-gradient(135deg, var(--auth-primary-dark) 0%, var(--auth-primary) 62%, #0b789f 100%);
    color: #ffffff;
    font: inherit;
    font-size: 18px;
    font-weight: 700;
    letter-spacing: 0.01em;
    box-shadow: 0 14px 30px rgba(3, 67, 103, 0.30);
    cursor: pointer;
    transition: transform var(--auth-transition), box-shadow var(--auth-transition), filter var(--auth-transition);
}

.auth-submit:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 18px 34px rgba(3, 67, 103, 0.38);
    filter: saturate(1.08);
}

.auth-submit:active:not(:disabled) {
    transform: translateY(0);
}

.auth-submit:focus-visible {
    outline: 4px solid rgba(7, 95, 144, 0.20);
    outline-offset: 3px;
}

.auth-submit:disabled {
    cursor: wait;
    opacity: 0.72;
}

.auth-submit__spinner {
    width: 21px;
    height: 21px;
    border: 2px solid rgba(255, 255, 255, 0.45);
    border-top-color: #ffffff;
    border-radius: 50%;
    animation: auth-spin 0.75s linear infinite;
}

@keyframes auth-spin {
    to { transform: rotate(360deg); }
}

.auth-footer {
    position: relative;
    display: grid;
    justify-items: center;
    gap: 16px;
    margin-top: clamp(34px, 4vh, 48px);
    padding-top: 28px;
    color: var(--auth-muted);
    text-align: center;
}

.auth-footer::before {
    content: "";
    position: absolute;
    top: 0;
    left: 8%;
    right: 8%;
    height: 1px;
    background: linear-gradient(90deg, transparent, #d8e0ef 18%, #d8e0ef 82%, transparent);
}

.auth-footer__copyright {
    font-size: 14px;
}

.auth-footer__copyright a {
    color: var(--auth-primary);
    font-weight: 700;
    text-decoration: none;
}

.auth-footer__copyright a:hover {
    text-decoration: underline;
}

.auth-footer__ip {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    min-height: 38px;
    padding: 7px 14px;
    border-radius: 999px;
    background: #f5f8fd;
    color: #68758c;
    font-size: 14px;
}

.auth-footer__ip strong {
    color: var(--auth-primary);
    font-weight: 700;
}

/* Tablet */
@media (max-width: 1180px) {
    .auth-shell {
        grid-template-columns: minmax(0, 48%) minmax(500px, 52%);
    }

    .auth-showcase {
        background-position: 45% center;
    }

    .auth-content {
        padding: 28px;
    }

    .auth-card {
        border-radius: 28px;
    }
}

/* Mobile and small tablet */
@media (max-width: 900px) {
    .auth-shell {
        display: block;
        min-height: 100svh;
        overflow: auto;
        background-color: #075f90;
        background-image:
            radial-gradient(circle at 50% -10%, rgba(46, 190, 235, 0.34), transparent 44%),
            url('/assets/img/backgrounds/dp-network-bg.svg'),
            linear-gradient(180deg, #021b41 0%, #043969 52%, #075f90 100%);
        background-position: center;
        background-repeat: no-repeat;
        background-size: cover;
    }

    .auth-showcase {
        display: none;
    }

    .auth-content {
        min-height: 100svh;
        padding: 22px 16px;
    }

    .auth-card {
        width: min(100%, 600px);
        padding: 30px 24px;
        border-radius: 26px;
    }

    .auth-brand__logo {
        max-height: 82px;
    }

    .auth-heading {
        margin: 28px 0;
    }
}

@media (max-width: 480px) {
    .auth-content {
        padding: 12px;
    }

    .auth-card {
        padding: 24px 18px;
        border-radius: 22px;
    }

    .auth-field,
    .auth-field__input {
        min-height: 52px;
        height: 62px;
    }

    .auth-field__input {
        padding-left: 52px;
        font-size: 16px;
    }

    .auth-field__icon {
        left: 17px;
    }

    .auth-submit {
        min-height: 58px;
        font-size: 17px;
    }

    .auth-footer__ip {
        flex-wrap: wrap;
    }
}

@media (prefers-reduced-motion: reduce) {
    .auth-shell *,
    .auth-shell *::before,
    .auth-shell *::after {
        scroll-behavior: auto !important;
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}
