@import url('https://fonts.googleapis.com/css2?family=Montserrat:wght@300;400;500;600;700;800&display=swap');

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

body {
    font-family: 'Montserrat', sans-serif;
    background: #f6f5f7;
    display: flex;
    justify-content: center;
    align-items: center;
    flex-direction: column;
    height: 100vh;
}

h1 {
    font-weight: bold;
    margin: 0;
}

h2 {
    text-align: center;
}

p {
    font-size: 14px;
    font-weight: 100;
    line-height: 20px;
    letter-spacing: 0.5px;
    margin: 20px 0 30px;
}

span {
    font-size: 12px;
}

a {
    color: #333;
    font-size: 14px;
    text-decoration: none;
    margin: 15px 0;
}

button {
    border-radius: 12px;
    border: none;
    background-color: #000;
    color: #ffffff;
    font-size: 12px;
    font-weight: bold;
    padding: 12px 45px;
    letter-spacing: 1px;
    text-transform: uppercase;
    transition: transform 80ms ease-in;
    cursor: pointer;
}

.full-width-btn {
    width: 100%;
    padding: 12px 15px;
    margin: 8px 0;
}

.forgot-password {
    font-size: 12px;
    margin: 10px 0 0 0;
    color: #333;
}

button:active {
    transform: scale(0.95);
}

button:not(.ghost):hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    transform: translateY(-2px);
}

button:focus {
    outline: none;
}

button.ghost {
    background-color: transparent;
    border: 1px solid #ffffff;
    transition: all 0.3s ease;
}

button.ghost:hover {
    background-color: #ffffff;
    color: #000;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
    transform: translateY(-2px);
}

form {
    background-color: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    padding: 0 50px;
    height: 100%;
    text-align: center;
}

input {
    background-color: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 12px 15px;
    margin: 4px 0;
    width: 100%;
    font-family: 'Montserrat', sans-serif;
    font-size: 14px;
    transition: all 0.3s ease;
    color: #1e293b;
}

input:focus {
    outline: none;
    border-color: #94a3b8;
    background-color: #ffffff;
    box-shadow: 0 0 0 3px rgba(148, 163, 184, 0.15);
}

.input-with-icon {
    position: relative;
    width: 100%;
    margin: 6px 0;
}

.input-with-icon input {
    padding-left: 45px;
}

.input-icon {
    position: absolute;
    left: 15px;
    top: 50%;
    transform: translateY(-50%);
    color: #94a3b8;
    display: flex;
    align-items: center;
    justify-content: center;
}

.input-icon svg {
    width: 18px;
    height: 18px;
}

.password-container {
    position: relative;
    width: 100%;
    margin: 6px 0;
}

.password-container input {
    width: 100%;
    padding-left: 45px;
    padding-right: 45px;
}

.eye-icon {
    position: absolute;
    right: 15px;
    top: 50%;
    transform: translateY(-50%);
    cursor: pointer;
    user-select: none;
    color: #94a3b8;
    transition: color 0.3s;
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.eye-icon svg {
    width: 20px;
    height: 20px;
    display: block;
}

.eye-icon.blocked svg {
    opacity: 0.3;
}

.eye-icon.blocked::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 24px;
    height: 2px;
    background-color: #94a3b8;
    transform: translate(-50%, -50%) rotate(-45deg);
}

.container {
    background-color: #fff;
    border-radius: 10px;
    box-shadow: 0 14px 28px rgba(0, 0, 0, 0.25),
        0 10px 10px rgba(0, 0, 0, 0.22);
    position: relative;
    overflow: hidden;
    width: 850px;
    max-width: 100%;
    min-height: 550px;
}

.form-container {
    position: absolute;
    top: 0;
    height: 100%;
    transition: all 0.6s ease-in-out;
}

.sign-in-container {
    left: 0;
    width: 50%;
    z-index: 2;
}

.sign-in-container button {
    background-color: #0D1A2E;
}

.container.right-panel-active .sign-in-container {
    transform: translateX(100%);
}

.sign-up-container {
    left: 0;
    width: 50%;
    opacity: 0;
    z-index: 1;
}

.sign-up-container button {
    background-color: #EC5C0E;
}

.container.right-panel-active .sign-up-container {
    transform: translateX(100%);
    opacity: 1;
    z-index: 5;
    animation: show 0.6s;
}

@keyframes show {

    0%,
    49.99% {
        opacity: 0;
        z-index: 1;
    }

    50%,
    100% {
        opacity: 1;
        z-index: 5;
    }
}

.overlay-container {
    position: absolute;
    top: 0;
    left: 50%;
    width: 50%;
    height: 100%;
    overflow: hidden;
    transition: transform 0.6s ease-in-out;
    z-index: 100;
}

.container.right-panel-active .overlay-container {
    transform: translateX(-100%);
}

.overlay {
    background: url('img/pegawai(1).jpeg');
    background-repeat: no-repeat;
    background-size: contain;
    background-position: 100% center;
    background-color: #000;
    color: #ffffff;
    position: relative;
    left: -100%;
    height: 100%;
    width: 200%;
    transform: translateX(0);
    transition: transform 0.6s ease-in-out, background-image 0.6s ease-in-out;
}

.container.right-panel-active .overlay {
    background: url('img/mitra.png');
    background-repeat: no-repeat;
    background-size: 85%;
    background-position: -120% center;
    background-color: #000;
    transform: translateX(50%);
}

.overlay-panel {
    position: absolute;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    padding: 0 40px;
    text-align: center;
    top: 0;
    height: 100%;
    width: 50%;
    transform: translateX(0);
    transition: transform 0.6s ease-in-out;
}

.copyright {
    position: absolute;
    bottom: 20px;
    font-size: 10px;
    color: rgba(255, 255, 255, 0.8);
    margin: 0;
}

.overlay-left {
    transform: translateX(-20%);
}

.container.right-panel-active .overlay-left {
    transform: translateX(0);
}

.overlay-right {
    right: 0;
    transform: translateX(0);
}

.container.right-panel-active .overlay-right {
    transform: translateX(20%);
}

.logo-container {
    margin: 5px 0;
    display: flex;
    justify-content: center;
    align-items: center;
}

.talas-logo {
    max-width: 250px;
    height: auto;
}

/* Tablet Responsive Design */
@media (min-width: 768px) and (max-width: 1024px) {
    .container {
        width: 850px;
        max-width: none;
        transform: scale(0.88);
        transform-origin: center center;
    }
}

/* Mobile Responsive Design */
@media (max-width: 767px) {
    body {
        height: 100vh;
        height: 100dvh;
        overflow: hidden;
        background-color: #f1f5f9;
    }

    .container {
        width: 100%;
        height: 100vh;
        height: 100dvh;
        max-width: 100%;
        border-radius: 0;
        box-shadow: none;
        position: relative;
        overflow: hidden;
        display: block;
    }

    .overlay-container {
        position: absolute;
        top: 0;
        left: 0;
        width: 100%;
        height: 55%;
        z-index: 2;
        transform: none !important;
        transition: none;
    }

    .overlay {
        left: 0;
        width: 100%;
        height: 100%;
        transform: none !important;
        background: linear-gradient(180deg, rgba(0, 0, 0, 0.3) 0%, rgba(0, 0, 0, 0.75) 100%), url('img/pegawai(1).jpeg') no-repeat center center !important;
        background-size: cover !important;
        transition: background-image 0.6s ease-in-out;
    }

    .container.right-panel-active .overlay {
        background: linear-gradient(180deg, rgba(0, 0, 0, 0.3) 0%, rgba(0, 0, 0, 0.75) 100%), url('img/mitra.png') no-repeat center center !important;
        background-size: cover !important;
    }

    .overlay-panel {
        position: absolute;
        width: 100%;
        height: 100%;
        left: 0;
        top: 0;
        padding: 20px 24px;
        display: flex;
        flex-direction: column;
        justify-content: center;
        align-items: center;
        text-align: center;
        transform: none !important;
        transition: opacity 0.6s ease-in-out, transform 0.6s cubic-bezier(0.25, 1, 0.5, 1);
    }

    .overlay-left {
        opacity: 0;
        pointer-events: none;
        transform: translateY(-20px) !important;
    }

    .overlay-right {
        opacity: 1;
        pointer-events: auto;
        transform: translateY(0) !important;
    }

    .container.right-panel-active .overlay-left {
        opacity: 1;
        pointer-events: auto;
        transform: translateY(0) !important;
    }

    .container.right-panel-active .overlay-right {
        opacity: 0;
        pointer-events: none;
        transform: translateY(-20px) !important;
    }

    .overlay-panel h1 {
        font-size: 26px;
        font-weight: 700;
        margin-bottom: 8px;
        color: #ffffff;
    }

    .overlay-panel p {
        font-size: 12px;
        line-height: 1.6;
        margin: 0 0 16px 0;
        color: rgba(255, 255, 255, 0.9);
        max-width: 85%;
    }

    .overlay-panel button.ghost {
        font-size: 11px;
        font-weight: 700;
        letter-spacing: 1px;
        text-transform: uppercase;
        padding: 10px 35px;
        border-radius: 30px;
        border: 2px solid #ffffff;
        background-color: transparent;
        color: #ffffff;
        cursor: pointer;
        transition: all 0.3s ease;
    }

    .overlay-panel button.ghost:hover {
        background-color: #ffffff;
        color: #000000;
        box-shadow: 0 4px 12px rgba(255, 255, 255, 0.2);
    }

    .overlay-panel .copyright {
        display: block;
        position: absolute;
        bottom: 55px;
        left: 0;
        right: 0;
        font-size: 9px;
        color: rgba(255, 255, 255, 0.7);
        text-align: center;
        margin: 0 auto;
        line-height: 1.4;
        pointer-events: none;
    }

    .form-container {
        position: absolute;
        top: 52%;
        height: 48%;
        width: 100%;
        padding: 24px 24px;
        background-color: #ffffff;
        border-radius: 30px 30px 0 0;
        box-shadow: 0 -10px 25px rgba(0, 0, 0, 0.05);
        z-index: 5;
        transition: transform 0.6s cubic-bezier(0.25, 1, 0.5, 1), opacity 0.6s ease-in-out;
    }

    /* Small white rounded notch pointing upwards in the center of top border */
    .form-container::before {
        content: '';
        position: absolute;
        top: -8px;
        left: 50%;
        transform: translateX(-50%);
        width: 32px;
        height: 16px;
        background-color: #ffffff;
        border-radius: 16px 16px 0 0;
        z-index: 10;
        box-shadow: 0 -2px 5px rgba(0, 0, 0, 0.02);
    }

    .sign-in-container {
        transform: translateX(0);
        opacity: 1;
        z-index: 5;
    }

    .sign-up-container {
        transform: translateX(100%);
        opacity: 0;
        z-index: 1;
    }

    .container.right-panel-active .sign-in-container {
        transform: translateX(-100%);
        opacity: 0;
        z-index: 1;
    }

    .container.right-panel-active .sign-up-container {
        transform: translateX(0);
        opacity: 1;
        z-index: 5;
    }

    form {
        padding: 0 10px;
        height: 100%;
        justify-content: center;
    }

    .logo-container {
        margin: 0 0 10px 0;
    }

    .talas-logo {
        max-width: 110px;
        height: auto;
    }

    .input-with-icon,
    .password-container {
        margin: 6px 0;
    }

    .form-container input {
        height: 44px;
        padding: 10px 15px 10px 45px;
        margin: 0;
        font-size: 13px;
        border-radius: 12px;
    }

    .form-container .password-container input {
        padding-right: 45px;
    }

    .form-container button.full-width-btn {
        height: 44px;
        font-size: 13px;
        font-weight: 700;
        letter-spacing: 0.5px;
        text-transform: uppercase;
        border-radius: 12px;
        margin: 10px 0 8px 0;
        display: flex;
        align-items: center;
        justify-content: center;
    }

    .forgot-password {
        font-size: 12px;
        margin: 2px 0 0 0;
        color: #64748b;
        font-weight: 500;
    }
}