*{
    margin:0;
    padding:0;
    box-sizing:border-box;
}
 
html, body{
    height:100%;
    margin:0;
    padding:0;
    overflow:hidden;
}

body{
    font-family: Poppins, Inter, system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
    background:#f8f8f8;
}

body.auth-login{
    overflow:hidden;
}

body.auth-register{
    overflow:hidden;
}
 
.main-layout{
    display:flex;
    height:100svh;
    height:100dvh;
    height:100vh;
    overflow:hidden;
}
 
.brand-panel-new{
    width:45%;
    background:linear-gradient(135deg,#0F172A,#1E293B);
    display:flex;
    justify-content:center;
    align-items:center;
    border-radius:0 !important;
    clip-path: polygon(0 0, 82% 0, 100% 50%, 82% 100%, 0 100%) !important;
    transform:none !important;
    position: relative;
    overflow:hidden;
}
 
.brand-panel-new::after{
    content:"";
    position:absolute;
    top:0;
    right:-22px;
    width:44px;
    height:100%;
    background:#D6B16B;
    clip-path: polygon(0 0, 100% 50%, 0 100%, 6% 100%, 100% 50%, 6% 0);
}

.brand-panel-new::before{
    display:none !important;
    content:none !important;
}

.brand-content-new{
    text-align:center;
    padding: 40px 20px;
}
 
.brand-top{
    color:white;
    letter-spacing:8px;
    font-weight: 600;
    font-size: clamp(22px, 3.2vw, 44px);
}
 
.brand-bottom{
    color:#D6B16B;
    font-weight: 700;
    letter-spacing:4px;
    font-size: clamp(26px, 3.6vw, 52px);
    margin-top: 10px;
}
 
.auth-panel-new,
.auth-v2{
    width:55%;
    height:100svh;
    height:100dvh;
    height:100vh;
    display:flex;
    justify-content:center;
    align-items:center;
    background:#f8f8f8;
    padding:20px;
    overflow:hidden;
}
 
.login-box-new{
    width:100%;
    max-width:480px;
    background:white;
    padding:40px;
    border-radius:24px;
    border: 1px solid rgba(15, 23, 42, 0.08);
    box-shadow: 0 26px 80px rgba(2, 6, 23, 0.12);
}

.card-v2{
    width:100%;
    max-width:420px;
    max-height:90vh;
    max-height:90dvh;
    max-height:90svh;
    overflow-y:auto;
    padding:28px;
    border-radius:24px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.06);
    background:white;
    overscroll-behavior: contain;
    touch-action: pan-y;
}

@media (min-width: 769px){
    body.auth-register .card-v2{
        max-height: calc(100vh - 40px);
        max-height: calc(100dvh - 40px);
        overflow-y:hidden;
        padding:24px;
    }

    body.auth-register .form-new{
        margin-top: 12px;
    }
}

@media (min-width: 769px){
    body.auth-register .login-box-new h2{
        font-size: 24px;
        line-height: 1.15;
    }
    body.auth-register .login-box-new p.sub{
        font-size: 13px;
        margin-top: 6px;
    }
    body.auth-register .form-new{
        margin-top: 10px;
    }
    body.auth-register .form-new > *{
        margin-bottom:10px;
    }
    body.auth-register .form-new input:not([type="checkbox"]){
        height:44px;
    }
    body.auth-register .btn-new,
    body.auth-register .button-login{
        height:44px;
    }
    body.auth-register .card-v2{
        padding:20px;
    }
}

@media (min-width: 769px) and (max-height: 760px){
    body.auth-register .auth-panel-new{
        padding: 12px;
    }
    body.auth-register .card-v2{
        padding:18px;
        max-height: calc(100vh - 24px);
        max-height: calc(100dvh - 24px);
    }
    body.auth-register .form-new > *{
        margin-bottom:8px;
    }
    body.auth-register .form-new input:not([type="checkbox"]){
        height:42px;
    }
    body.auth-register .btn-new,
    body.auth-register .button-login{
        height:42px;
    }
}

@media (min-width: 769px) and (max-width: 991.98px){
    .auth-panel-new{
        padding: 20px 24px;
    }
    .card-v2{
        max-width: 480px;
    }
}

@media (min-width: 992px){
    .auth-panel-new{
        padding: 24px 32px;
    }
    .card-v2{
        max-width: 480px;
    }
}

@media (min-width: 1200px){
    .card-v2{
        max-width: 520px;
    }
}

.login-box-new h2{
    font-size: 28px;
    letter-spacing: -0.02em;
    font-weight: 800;
    color: #0B1220;
    text-align: center;
}

.login-box-new p.sub{
    margin-top: 8px;
    text-align: center;
    font-size: 14px;
    color: rgba(15, 23, 42, 0.66);
}

.alert-new{
    margin-top: 14px;
    border-radius: 16px;
    padding: 12px 14px;
    font-size: 13px;
}

.alert-new.info{
    background: rgba(37, 99, 235, 0.08);
    border: 1px solid rgba(37, 99, 235, 0.16);
    color: #1E3A8A;
}

.alert-new.danger{
    background: rgba(239, 68, 68, 0.10);
    border: 1px solid rgba(239, 68, 68, 0.20);
    color: #7F1D1D;
}

.form-new{
    margin-top: 18px;
    display: block;
}

.form-new > *{
    margin-bottom:12px;
}

.form-new > *:last-child{
    margin-bottom:0;
}

.form-new input:not([type="checkbox"]){
    width:100%;
    height:48px;
    border:1.5px solid #E5E7EB;
    background:#FAFAFA;
    border-radius:16px;
    padding:0 20px;
    outline:none;
    box-shadow:none;
    -webkit-appearance: none;
    appearance: none;
}

.form-new input:not([type="checkbox"]):focus{
    border-color:#D6B16B;
    background:white;
    outline:none;
    box-shadow:none;
}

.form-new input:not([type="checkbox"]):focus-visible{
    outline:none;
    box-shadow:none;
}

.form-new input:not([type="checkbox"]):-webkit-autofill,
.form-new input:not([type="checkbox"]):-webkit-autofill:hover,
.form-new input:not([type="checkbox"]):-webkit-autofill:focus{
    -webkit-text-fill-color: #111827 !important;
    -webkit-box-shadow: 0 0 0px 1000px #FFFFFF inset !important;
    box-shadow: 0 0 0px 1000px #FFFFFF inset !important;
    caret-color: #111827 !important;
}

.field-new label{
    display: block;
    font-size: 13px;
    font-weight: 700;
    color: rgba(15, 23, 42, 0.76);
    margin-bottom: 8px;
}

.password-wrap-new{
    position: relative;
}

.password-wrap-new input{
    padding-right: 96px;
}

.password-toggle{
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    background:none;
    border:none;
    cursor: pointer;
    color:#6B7280;
    font-size:20px;
    padding: 6px;
}

.password-toggle:focus{
    outline:none;
    box-shadow:none;
}

.password-toggle:hover{
    color:#111827;
}

.row-new{
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-top: 2px;
}

.remember-new{
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    color: rgba(15, 23, 42, 0.66);
    user-select: none;
}

.remember-new input{
    width: 16px;
    height: 16px;
    min-width: 16px;
    accent-color: #D6B16B;
}

.link-new{
    font-size: 13px;
    font-weight: 800;
    color: rgba(214, 177, 107, 0.95);
    text-decoration: none;
}

.link-new:hover{
    color: rgba(187, 146, 78, 1);
}

.btn-new{
    height: 48px;
    border-radius: 18px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    text-decoration: none;
    cursor: pointer;
    border: 0;
    transition: transform 160ms ease, box-shadow 160ms ease, filter 160ms ease, background-color 160ms ease, border-color 160ms ease;
    width: 100%;
}

.button-login{
    height:48px;
    font-weight:700;
    border-radius:18px;
}

.button-login:hover{
    filter: brightness(0.92);
}

.button-register{
    border:1.5px solid rgba(214, 177, 107, 1);
    background:#FFFFFF;
}

.button-register:hover{
    background: rgba(214, 177, 107, 0.06);
}

.btn-primary-new{
    background: #D6B16B;
    color: #111827;
    box-shadow: 0 18px 44px rgba(214, 177, 107, 0.34);
}

.btn-primary-new:hover{
    filter: brightness(0.92);
    transform: translateY(-1px);
    box-shadow: 0 22px 54px rgba(214, 177, 107, 0.40);
}

.btn-secondary-new{
    background: transparent;
    border: 1.5px solid rgba(214, 177, 107, 1);
    color: rgba(214, 177, 107, 1);
}

.btn-secondary-new:hover{
    transform: translateY(-1px);
    border-color: rgba(214, 177, 107, 0.80);
    box-shadow: 0 18px 44px rgba(214, 177, 107, 0.18);
}

.divider-new{
    display: flex;
    align-items: center;
    gap: 16px;
    margin: 0;
}

.divider-new::before,
.divider-new::after{
    content: "";
    height: 1px;
    flex: 1 1 auto;
    background: rgba(15, 23, 42, 0.10);
}

.divider-new span{
    font-size: 13px;
    color: rgba(15, 23, 42, 0.50);
}

.foot-new{
    margin-top: 14px;
    text-align: center;
    font-size: 12px;
    color: rgba(15, 23, 42, 0.42);
}

@media (max-width: 768px){
    .main-layout{
        flex-direction: column;
    }
    .brand-panel-new,
    .auth-panel-new{
        width: 100%;
    }
    .brand-panel-new{
        height: 160px;
        flex: 0 0 160px;
        clip-path:none !important;
    }
    .brand-panel-new::after{
        display:none !important;
        content:none !important;
    }
    .auth-panel-new{
        flex: 1 1 auto;
        height: auto;
        min-height: 0;
        padding: 12px 16px 16px;
        align-items: flex-start;
    }
    .login-box-new{
        padding: 24px;
        margin-top: 0;
    }
    .card-v2{
        padding: 28px;
        max-height: 100%;
        overflow-y:auto;
        -webkit-overflow-scrolling: touch;
    }
    body.auth-register .card-v2{
        max-height: calc(100svh - 160px - 32px);
        max-height: calc(100dvh - 160px - 32px);
        padding: 24px;
    }
    .btn-new{
        height: 48px;
    }
    .form-new input{
        height: 48px;
        font-size: 16px;
    }
    .button-login{
        height: 48px;
    }
}

@media (max-width: 768px) and (orientation: landscape){
    body.auth-register .card-v2{
        max-height: calc(100svh - 96px - 28px);
        max-height: calc(100dvh - 96px - 28px);
        padding: 20px;
    }
}

@media (orientation: landscape) and (max-height: 520px){
    .auth-panel-new{
        padding: 12px;
    }

    body.auth-register .card-v2,
    body.auth-login .card-v2{
        max-height: none;
        overflow: visible;
    }
}

@media (max-width: 991.98px) and (orientation: landscape){
    html, body{
        height:auto !important;
        overflow-x:hidden !important;
        overflow-y:auto !important;
        -webkit-overflow-scrolling: touch;
    }

    body.auth-login,
    body.auth-register{
        overflow-x:hidden !important;
        overflow-y:auto !important;
    }

    body.auth-login,
    body.auth-register,
    body.auth-login .auth-panel-new,
    body.auth-register .auth-panel-new{
        background: #0F172A !important;
    }

    .main-layout{
        flex-direction: column !important;
        height: auto !important;
        min-height: 100svh;
        min-height: 100dvh;
        min-height: 100vh;
        overflow: visible !important;
    }

    .brand-panel-new{
        width:100% !important;
        height: 84px !important;
        flex: 0 0 84px !important;
        clip-path:none !important;
    }

    .brand-panel-new::after{
        display:none !important;
        content:none !important;
    }

    .auth-panel-new{
        width:100% !important;
        height: auto !important;
        flex: 1 1 auto !important;
        padding: 12px 14px 20px !important;
        align-items: center !important;
        justify-content: flex-start !important;
        overflow: visible !important;
    }

    .card-v2{
        width: min(500px, 100%);
        max-width: 500px;
        margin: 0 auto;
        max-height: none !important;
        overflow: visible !important;
        padding: 18px;
    }

    .brand-content-new{
        padding: 14px 10px;
    }

    .brand-top{
        letter-spacing: 6px;
    }

    .brand-bottom{
        letter-spacing: 3px;
        margin-top: 6px;
    }
}

@media (max-width: 991.98px) and (orientation: landscape) and (max-height: 460px){
    .brand-panel-new{
        display:none !important;
    }

    .auth-panel-new{
        padding-top: 14px !important;
    }

    .login-box-new h2{
        font-size: 22px;
    }

    .login-box-new p.sub{
        margin-top: 6px;
        font-size: 12px;
    }

    .form-new{
        margin-top: 12px;
    }

    .form-new > *{
        margin-bottom: 10px;
    }

    .field-new label{
        margin-bottom: 6px;
        font-size: 12px;
    }

    .form-new input:not([type="checkbox"]),
    .btn-new,
    .button-login{
        height: 44px;
        border-radius: 14px;
    }

    .password-wrap-new input{
        padding-right: 76px;
    }
}
