/* ==========================================================
    AUSTIVE LEARNING PORTAL
    PREMIUM MUJI STYLE AUTH CSS
    ========================================================== */


/* ==========================
    RESET
    ========================== */

*{
    margin:0;
    padding:0;
    box-sizing:border-box;
}


/* ==========================
    BASE
    ========================== */

html, body{
    width:100%;
    min-height:100%;
    margin:0;
    overflow-x:hidden;
}

body{
    font-family:"Noto Sans", sans-serif;
    background:#F5F3EE;
    color:#2B2926;
}


/* ==========================
    PAGE
    ========================== */

.page{
    min-height:100dvh;
    padding:24px 20px;
    display:flex;
    flex-direction:column;
    position:relative;
    overflow-x:hidden;
}


/* ==========================
    BACK TO COMPANY
    ========================== */

.back-to-company{
    display:inline-flex;
    align-items:center;
    gap:8px;
    font-size:13px;
    font-weight:500;
    color:#2B2926;
    text-decoration:none;
    letter-spacing:.3px;
    padding:8px 16px;
    border:1px solid #D8D1C6;
    border-radius:8px;
    background:#FFFFFF;
    box-shadow:0 2px 8px rgba(0,0,0,.04);
    transition:all .3s ease;
    align-self:flex-start;
    max-width:100%;
    overflow:hidden;
    text-overflow:ellipsis;
}

.back-to-company:hover{
    background:#2B2926;
    color:#FFFFFF;
    border-color:#2B2926;
    transform:translateY(-1px);
    box-shadow:0 6px 20px rgba(0,0,0,.12);
}

.back-icon{
    width:16px;
    height:16px;
    flex-shrink:0;
}


/* ==========================
    BRAND
    ========================== */

.brand{
    display:flex;
    align-items:center;
    gap:14px;
    padding-top:env(safe-area-inset-top);
    max-width:100%;
    overflow:hidden;
}

.logo{
    width:48px;
    height:48px;
    background:#FFFFFF;
    border-radius:50%;
    display:flex;
    align-items:center;
    justify-content:center;
    border:1px solid #E4DED4;
    box-shadow:0 10px 25px rgba(0,0,0,.04);
    transition:.35s ease;
    flex-shrink:0;
}

.logo:hover{
    transform:translateY(-3px);
    box-shadow:0 15px 35px rgba(0,0,0,.08);
}

.logo img{
    width:30px;
    height:30px;
    object-fit:contain;
}

.brand-name h2{
    font-size:20px;
    letter-spacing:2px;
    font-weight:600;
    color:#2B2926;
    overflow-wrap:break-word;
    word-break:break-word;
}

.brand-name span{
    display:block;
    margin-top:3px;
    color:#81786D;
    font-size:12px;
    letter-spacing:.5px;
    overflow-wrap:break-word;
}


/* ==========================
    MAIN CONTAINER
    ========================== */

.container{
    flex:1;
    display:flex;
    flex-direction:column;
    align-items:center;
    justify-content:center;
    gap:32px;
    padding:20px 0;
    max-width:100%;
    overflow:hidden;
}


/* ==========================
    REGISTER CARD
    ========================== */

.register-card{
    width:100%;
    max-width:430px;
    background:#FFFFFF;
    border:1px solid #E6E0D6;
    border-radius:14px;
    padding:32px 24px;
    box-shadow:0 25px 60px rgba(0,0,0,.05);
    animation:cardFade .8s ease;
    overflow-wrap:break-word;
}

.heading{
    margin-bottom:24px;
}

.heading h1{
    font-size:26px;
    line-height:1.2;
    overflow-wrap:break-word;
    word-break:break-word;
}

.heading p{
    font-size:13px;
    color:#81786D;
    margin-top:8px;
    overflow-wrap:break-word;
}


/* ==========================
    AUTH ERROR + SUCCESS
    ========================== */

.auth-error{
    width:100%;
    margin-bottom:20px;
    padding:14px 16px;
    background:#FEF2F2;
    border:1px solid #FECACA;
    border-radius:10px;
    display:flex;
    align-items:center;
    gap:10px;
    font-size:13px;
    font-weight:600;
    color:#B91C1C;
    line-height:1.5;
    animation:errorFade .4s ease;
    overflow-wrap:break-word;
}

.auth-error::before{
    content:"⚠";
    font-size:16px;
    flex-shrink:0;
}

.auth-success{
    width:100%;
    margin-bottom:20px;
    padding:14px 16px;
    background:#ECFDF5;
    border:1px solid #A7F3D0;
    border-radius:10px;
    display:flex;
    align-items:center;
    gap:10px;
    font-size:13px;
    font-weight:600;
    color:#065F46;
    line-height:1.5;
    animation:successFade .4s ease;
    overflow-wrap:break-word;
}

.auth-success::before{
    content:"✓";
    font-size:16px;
    flex-shrink:0;
}

@keyframes errorFade{
    from{opacity:0;transform:translateY(-8px);}
    to{opacity:1;transform:translateY(0);}
}

@keyframes successFade{
    from{opacity:0;transform:translateY(-8px);}
    to{opacity:1;transform:translateY(0);}
}


/* ==========================
    FORM
    ========================== */

form{
    width:100%;
}


/* ==========================
    FIELD
    ========================== */

.field{
    margin-bottom:16px;
    animation:fieldFade .6s ease both;
}

.field:nth-child(1){animation-delay:.1s;}
.field:nth-child(2){animation-delay:.2s;}
.field:nth-child(3){animation-delay:.3s;}
.field:nth-child(4){animation-delay:.4s;}

.field label{
    display:block;
    margin-bottom:8px;
    font-size:12px;
    font-weight:500;
    color:#4A453F;
    letter-spacing:.3px;
}


/* ==========================
    INPUT
    ========================== */

.field input{
    width:100%;
    height:50px;
    padding:0 2px;
    border:none;
    border-bottom:1px solid #D8D1C6;
    background:transparent;
    font-size:16px;
    color:#2B2926;
    outline:none;
    transition:.35s ease;
    -webkit-appearance:none;
    border-radius:0;
}

.field input::placeholder{
    color:#B0A79C;
    font-weight:300;
}

.field input:hover{
    border-color:#A89E92;
}

.field input:focus{
    border-color:#2B2926;
}

.password-wrap{
    position:relative;
}

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

.password-toggle{
    position:absolute;
    right:0;
    top:0;
    width:44px;
    height:50px;
    margin:0;
    padding:0;
    border:0;
    border-radius:0;
    background:transparent;
    color:#7A7167;
    box-shadow:none;
    display:inline-flex;
    align-items:center;
    justify-content:center;
    cursor:pointer;
    transition:color .2s ease;
}

.password-toggle:hover,
.password-toggle:focus-visible{
    color:#2B2926;
    background:transparent;
}

.password-toggle:focus-visible{
    outline:2px solid rgba(43,41,38,.2);
    outline-offset:2px;
    border-radius:10px;
}

.password-toggle svg{
    width:20px;
    height:20px;
}

.password-toggle .eye-closed{
    display:none;
}

.password-toggle.is-visible .eye-open{
    display:none;
}

.password-toggle.is-visible .eye-closed{
    display:block;
}


/* ==========================
    BUTTON
    ========================== */

button[type="submit"]{
    width:100%;
    height:52px;
    margin-top:14px;
    background:#2B2926;
    color:#FFFFFF;
    border:none;
    border-radius:10px;
    font-size:14px;
    font-weight:500;
    letter-spacing:.5px;
    cursor:pointer;
    transition:.35s ease;
    -webkit-tap-highlight-color:transparent;
    touch-action:manipulation;
}

button[type="submit"]:hover{
    background:#49443E;
    transform:translateY(-2px);
    box-shadow:0 12px 30px rgba(0,0,0,.12);
}

button[type="submit"]:active{
    transform:scale(.98);
}


/* ==========================
    FORGOT PASSWORD
    ========================== */

.forgot{
    text-align:right;
    margin-top:-6px;
    margin-bottom:14px;
}

.forgot a{
    font-size:12px;
    color:#81786D;
    text-decoration:none;
    overflow-wrap:break-word;
}

.forgot a:hover{
    color:#2B2926;
}


/* ==========================
    SIGN IN LINK
    ========================== */

.signin{
    margin-top:24px;
    text-align:center;
    font-size:12px;
    color:#81786D;
    overflow-wrap:break-word;
}

.signin a{
    color:#2B2926;
    margin-left:6px;
    text-decoration:none;
    font-weight:500;
    border-bottom:1px solid #2B2926;
    padding-bottom:2px;
    transition:.3s ease;
}

.signin a:hover{
    opacity:.6;
}


/* ==========================
    RIGHT MESSAGE
    ========================== */

.message{
    max-width:420px;
    width:100%;
    animation:messageFade 1s ease;
    overflow-wrap:break-word;
}

.vertical-line{
    width:40px;
    height:1px;
    background:#B8AEA2;
    margin-bottom:28px;
    max-width:100%;
}

.message h2{
    font-size:28px;
    line-height:1.25;
    font-weight:400;
    letter-spacing:-0.5px;
    color:#2B2926;
    transition:.4s ease;
    overflow-wrap:break-word;
    word-break:break-word;
}

.message:hover h2{
    letter-spacing:-0.5px;
}

.message p{
    margin-top:16px;
    color:#81786D;
    font-size:14px;
    line-height:1.7;
    font-weight:300;
    overflow-wrap:break-word;
}

.small-text{
    margin-top:24px;
    font-size:12px;
    color:#8A8178;
    letter-spacing:.5px;
    overflow-wrap:break-word;
    word-break:break-word;
}

.small-text span{
    margin:0 8px;
}


/* ==========================
    FOOTER
    ========================== */

footer{
    text-align:center;
    font-size:11px;
    color:#9A9187;
    padding-top:16px;
    padding-bottom:calc(16px + env(safe-area-inset-bottom));
    letter-spacing:.3px;
    overflow-wrap:break-word;
}


/* ==========================
    ANIMATIONS
    ========================== */

@keyframes cardFade{
    from{opacity:0;transform:translateY(20px);}
    to{opacity:1;transform:translateY(0);}
}

@keyframes fieldFade{
    from{opacity:0;transform:translateY(12px);}
    to{opacity:1;transform:translateY(0);}
}

@keyframes messageFade{
    from{opacity:0;transform:translateX(30px);}
    to{opacity:1;transform:translateX(0);}
}


/* ==========================
    BACKGROUND DETAIL
    ========================== */

.page::before{
    content:"";
    position:absolute;
    width:300px;
    height:300px;
    background:#ECE5DA;
    opacity:.3;
    border-radius:50%;
    top:-150px;
    left:-120px;
    z-index:-1;
    pointer-events:none;
}

.page::after{
    content:"";
    position:absolute;
    width:240px;
    height:240px;
    background:#E7DED2;
    opacity:.25;
    border-radius:50%;
    bottom:-120px;
    right:-100px;
    z-index:-1;
    pointer-events:none;
}


/* ==========================
    DESKTOP
    ========================== */

@media(min-width:901px){
    html, body{
        width:100%;
        height:100%;
    }

    body{
        overflow:hidden;
    }

    .page{
        height:100dvh;
        min-height:100dvh;
        overflow:hidden;
        padding:calc(30px + env(safe-area-inset-top)) clamp(20px,5vw,80px) calc(30px + env(safe-area-inset-bottom));
    }

    .container{
        flex-direction:row;
        flex:1;
        min-height:0;
        gap:clamp(40px,10vw,140px);
    }

    .register-card{
        width:430px;
        padding:40px;
    }

    .message{
        order:0;
        max-width:420px;
    }

    .brand{
        gap:18px;
    }

    .logo{
        width:58px;
        height:58px;
    }

    .logo img{
        width:38px;
        height:38px;
    }

    .brand-name h2{
        font-size:24px;
    }

    .brand-name span{
        font-size:13px;
    }

    .message h2{
        font-size:48px;
    }

    .message p{
        font-size:16px;
        margin-top:25px;
    }

    .vertical-line{
        width:45px;
        margin-bottom:35px;
    }

    .small-text{
        margin-top:35px;
        font-size:13px;
    }

    .page::before{
        width:520px;
        height:520px;
        top:-260px;
        left:-220px;
    }

    .page::after{
        width:420px;
        height:420px;
        bottom:-220px;
        right:-160px;
    }
}


/* ==========================
    TABLET
    ========================== */

@media(max-width:900px) and (min-width:601px){
    .page{
        padding:32px 28px;
    }
    .container{
        gap:48px;
    }
    .message{
        display:none;
        max-width:360px;
    }
    .message h2{
        font-size:34px;
    }
    .message p{
        font-size:15px;
    }
    .register-card{
        padding:34px 28px;
    }
    .heading h1{
        font-size:28px;
    }
}


/* ==========================
    LARGE PHONES
    ========================== */

@media(max-width:600px){
    .page{
        padding:calc(20px + env(safe-area-inset-top)) 18px calc(20px + env(safe-area-inset-bottom));
    }
    .container{
        gap:28px;
    }
    .message{
        display:none;
        max-width:100%;
    }
    .message h2{
        font-size:26px;
    }
    .message p{
        font-size:14px;
        margin-top:14px;
    }
    .vertical-line{
        width:36px;
        margin-bottom:24px;
    }
    .register-card{
        padding:28px 20px;
    }
    .heading{
        margin-bottom:20px;
    }
    .heading h1{
        font-size:24px;
    }
    .heading p{
        font-size:13px;
    }
    .field{
        margin-bottom:14px;
    }
    .field label{
        font-size:12px;
        margin-bottom:6px;
    }
    .field input{
        height:48px;
        font-size:15px;
    }
    .password-wrap input{
        padding-right:44px;
    }
    .password-toggle{
        width:44px;
        height:48px;
    }
    .password-toggle svg{
        width:20px;
        height:20px;
    }
    .forgot{
        margin-top:-6px;
        margin-bottom:14px;
    }
    .forgot a{
        font-size:12px;
    }
    button[type="submit"]{
        height:50px;
        font-size:13px;
        margin-top:12px;
    }
    .signin{
        margin-top:20px;
    }
    footer{
        font-size:11px;
    }
    .small-text{
        font-size:12px;
    }
    .auth-error, .auth-success{
        padding:12px 14px;
        font-size:12px;
    }
}


/* ==========================
    SMALL PHONES
    ========================== */

@media(max-width:375px){
    .page{
        padding:calc(16px + env(safe-area-inset-top)) 14px calc(16px + env(safe-area-inset-bottom));
    }
    .container{
        gap:22px;
    }
    .message{
        display:none;
    }
    .brand{
        gap:10px;
    }
    .logo{
        width:42px;
        height:42px;
    }
    .logo img{
        width:26px;
        height:26px;
    }
    .brand-name h2{
        font-size:18px;
    }
    .brand-name span{
        font-size:11px;
    }
    .message h2{
        font-size:24px;
    }
    .message p{
        font-size:13px;
        margin-top:12px;
    }
    .vertical-line{
        width:32px;
        margin-bottom:20px;
    }
    .register-card{
        padding:24px 16px;
    }
    .heading{
        margin-bottom:18px;
    }
    .heading h1{
        font-size:22px;
    }
    .heading p{
        font-size:12px;
    }
    .field{
        margin-bottom:12px;
    }
    .field label{
        font-size:11px;
        margin-bottom:6px;
    }
    .field input{
        height:46px;
        font-size:15px;
    }
    .password-wrap input{
        padding-right:42px;
    }
    .password-toggle{
        width:42px;
        height:46px;
    }
    .password-toggle svg{
        width:18px;
        height:18px;
    }
    .forgot{
        margin-top:-6px;
        margin-bottom:12px;
    }
    .forgot a{
        font-size:11px;
    }
    button[type="submit"]{
        height:48px;
        font-size:13px;
        margin-top:10px;
    }
    .signin{
        margin-top:18px;
        font-size:11px;
    }
    footer{
        font-size:10px;
    }
    .small-text{
        font-size:11px;
    }
    .auth-error, .auth-success{
        padding:10px 12px;
        font-size:11px;
        gap:8px;
    }
}


/* ==========================
    TINY PHONES
    ========================== */

@media(max-width:320px){
    .page{
        padding:calc(12px + env(safe-area-inset-top)) 10px calc(12px + env(safe-area-inset-bottom));
    }
    .container{
        gap:18px;
    }
    .message{
        display:none;
    }
    .brand{
        gap:8px;
    }
    .logo{
        width:38px;
        height:38px;
    }
    .logo img{
        width:22px;
        height:22px;
    }
    .brand-name h2{
        font-size:16px;
        letter-spacing:1px;
    }
    .brand-name span{
        font-size:10px;
    }
    .message h2{
        font-size:20px;
    }
    .message p{
        font-size:12px;
        margin-top:10px;
        line-height:1.5;
    }
    .vertical-line{
        width:28px;
        margin-bottom:16px;
    }
    .register-card{
        padding:20px 14px;
    }
    .heading{
        margin-bottom:16px;
    }
    .heading h1{
        font-size:20px;
    }
    .heading p{
        font-size:11px;
    }
    .field{
        margin-bottom:10px;
    }
    .field label{
        font-size:10px;
        margin-bottom:4px;
    }
    .field input{
        height:44px;
        font-size:14px;
    }
    .password-wrap input{
        padding-right:40px;
    }
    .password-toggle{
        width:40px;
        height:44px;
    }
    .password-toggle svg{
        width:18px;
        height:18px;
    }
    .forgot{
        margin-top:-4px;
        margin-bottom:10px;
    }
    .forgot a{
        font-size:10px;
    }
    button[type="submit"]{
        height:46px;
        font-size:12px;
        margin-top:8px;
    }
    .signin{
        margin-top:16px;
        font-size:10px;
    }
    footer{
        font-size:9px;
    }
    .small-text{
        font-size:10px;
    }
    .auth-error, .auth-success{
        padding:10px 12px;
        font-size:11px;
    }
    .back-to-company{
        font-size:11px;
        padding:6px 12px;
    }
}
