/* reset */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html, body {
    height: 100%;
    width: 100%;
    margin: 0;
    padding: 0;
    overflow: hidden;
    font-family: 'Inter', 'Montserrat', 'Poppins', sans-serif;
}

body.auth-page {
    display: flex;
    width: 100vw;
    height: 100vh;
    background-color: #FFFFFF;
}

/* split layout */
.auth-left-panel {
    width: 45%;
    height: 100vh;
    background: linear-gradient(135deg, #7D4F2A 0%, #54341B 100%);
    padding: 48px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    position: relative;
    overflow: hidden;
    color: #FFFFFF;
}

.auth-right-panel {
    width: 55%;
    height: 100vh;
    background: #FFFFFF;
    padding: 48px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    box-sizing: border-box;
    overflow-y: auto;
}

/* animations */
@keyframes float1 {
    0% { transform: translateY(0px) rotate(2deg); }
    50% { transform: translateY(-12px) rotate(4deg); }
    100% { transform: translateY(0px) rotate(2deg); }
}
@keyframes float2 {
    0% { transform: translateY(0px) rotate(-3deg); }
    50% { transform: translateY(10px) rotate(-1deg); }
    100% { transform: translateY(0px) rotate(-3deg); }
}
@keyframes float3 {
    0% { transform: translateY(0px) rotate(0deg); }
    50% { transform: translateY(-8px) rotate(-2deg); }
    100% { transform: translateY(0px) rotate(0deg); }
}

.illustration-area {
    position: relative;
    height: 320px;
    width: 100%;
}

/* confetti */
.deco-shape {
    position: absolute;
    border-radius: 50%;
    opacity: 0.6;
}
.shape-yellow { width: 14px; height: 14px; background: #E5A323; top: 15%; left: 45%; }
.shape-red { width: 18px; height: 18px; background: #EF4444; top: 55%; left: 8%; border-radius: 40% 60% 70% 30% / 40% 50% 60% 50%; }
.shape-green { width: 16px; height: 16px; background: #10B981; top: 35%; right: 8%; }
.shape-orange { width: 15px; height: 15px; background: #F97316; bottom: 10%; left: 35%; }

.float-card {
    background: #FFFFFF;
    border-radius: 18px;
    padding: 16px;
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.15);
    color: #1E293B;
}

.float-card-1 {
    position: absolute;
    top: 15%;
    left: 10%;
    width: 210px;
    background: #F9F4EE;
    border: 1px solid rgba(125, 79, 42, 0.1);
    animation: float1 6s ease-in-out infinite;
}
.float-card-1 h4 {
    margin: 0 0 6px 0;
    font-size: 0.95rem;
    color: #7D4F2A;
    font-weight: 700;
}
.float-card-1 p {
    margin: 0;
    font-size: 0.75rem;
    color: #8C6A5C;
}
.float-card-1 .tag {
    display: inline-block;
    background: #E5A323;
    color: #FFFFFF;
    font-size: 0.65rem;
    font-weight: 700;
    padding: 2px 8px;
    border-radius: 8px;
    margin-bottom: 8px;
}

.float-card-2 {
    position: absolute;
    top: 25%;
    right: 15%;
    width: 54px;
    height: 54px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 14px;
    animation: float2 5s ease-in-out infinite;
    background: #FFFFFF;
}

.float-card-3 {
    position: absolute;
    bottom: 10%;
    left: 25%;
    width: 190px;
    animation: float3 7s ease-in-out infinite;
}
.float-card-3 .user-info {
    display: flex;
    align-items: center;
    gap: 10px;
}
.float-card-3 .avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: #7D4F2A;
    color: #FFFFFF;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-size: 0.8rem;
}
.float-card-3 .info text {
    display: block;
}
.float-card-3 strong {
    font-size: 0.8rem;
    color: #1E293B;
    display: block;
}
.float-card-3 span {
    font-size: 0.7rem;
    color: #10B981;
    font-weight: 600;
}

.banner-text h2 {
    font-family: 'Poppins', sans-serif;
    font-size: 1.6rem;
    font-weight: 700;
    margin: 0 0 10px 0;
    line-height: 1.3;
}
.banner-text p {
    font-size: 0.85rem;
    margin: 0;
    opacity: 0.85;
    line-height: 1.5;
}

/* dots */
.dots-indicator {
    display: flex;
    gap: 6px;
    margin-top: 24px;
}
.dot {
    width: 6px;
    height: 6px;
    background: rgba(255, 255, 255, 0.4);
    border-radius: 50%;
}
.dot-active {
    width: 18px;
    background: #E5A323;
    border-radius: 4px;
}

/* form */
.logo-box {
    width: 56px;
    height: 56px;
    background: #F9F4EE;
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 24px;
}

.auth-right-panel h1 {
    font-size: 1.8rem;
    font-weight: 800;
    color: #7D4F2A;
    margin: 0 0 8px 0;
}
.auth-right-panel .subtitle {
    font-size: 0.85rem;
    color: #64748B;
    margin: 0 0 32px 0;
    text-align: center;
    max-width: 280px;
    line-height: 1.5;
}

.auth-form {
    width: 100%;
    max-width: 320px;
}

.input-group {
    margin-bottom: 20px;
    position: relative;
}
.input-group input {
    width: 100%;
    background: #F9F4EE;
    border: 1.5px solid #E2E8F0;
    padding: 14px 44px 14px 16px;
    border-radius: 12px;
    font-size: 0.9rem;
    color: #7D4F2A;
    transition: all 0.2s;
    outline: none;
    box-sizing: border-box;
}
.input-group input:focus {
    border-color: #E5A323;
    background: #FFFFFF;
    box-shadow: 0 0 0 4px color-mix(in srgb, #E5A323 15%, transparent);
}
.input-group input::placeholder {
    color: #A28A76;
}

.input-icon-right {
    position: absolute;
    right: 16px;
    top: 50%;
    transform: translateY(-50%);
    color: #A28A76;
    display: flex;
    align-items: center;
    background: none;
    border: none;
    padding: 0;
    cursor: pointer;
}
.input-icon-right:hover {
    color: #7D4F2A;
}

.form-options {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
    font-size: 0.8rem;
}
.remember-label {
    display: flex;
    align-items: center;
    gap: 8px;
    color: #64748B;
    cursor: pointer;
    user-select: none;
}
.remember-label input {
    accent-color: #E5A323;
    width: 15px;
    height: 15px;
}
.forgot-link {
    color: #E5A323;
    text-decoration: none;
    font-weight: 600;
}
.forgot-link:hover {
    color: #7D4F2A;
    text-decoration: underline;
}

.btn-submit {
    width: 100%;
    background: #7D4F2A;
    color: #FFFFFF;
    padding: 14px;
    border: none;
    border-radius: 12px;
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    box-shadow: 0 4px 6px -1px rgba(125, 79, 42, 0.2);
}
.btn-submit:hover {
    background: #E5A323;
}
.btn-submit:active {
    transform: scale(0.98);
}

.divider {
    display: flex;
    align-items: center;
    gap: 12px;
    margin: 20px 0;
}
.divider::before, .divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: #E2E8F0;
}
.divider span {
    font-size: 0.75rem;
    color: #94A3B8;
    font-weight: 500;
}

.btn-google {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    width: 100%;
    background: #FFFFFF;
    color: #334155;
    border: 1px solid #E2E8F0;
    padding: 12px;
    border-radius: 12px;
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
}
.btn-google:hover {
    background: #F9F4EE;
    border-color: #7D4F2A;
}

.signup-text {
    margin-top: 36px;
    font-size: 0.85rem;
    color: #64748B;
}
.signup-text a {
    color: #E5A323;
    text-decoration: none;
    font-weight: 600;
}
.signup-text a:hover {
    color: #7D4F2A;
    text-decoration: underline;
}

/* error box */
.error-box {
    background: #FEF2F2;
    border-left: 4px solid #EF4444;
    border-radius: 8px;
    padding: 12px 16px;
    margin-bottom: 20px;
    width: 100%;
    box-sizing: border-box;
}
.error-box ul {
    margin: 0;
    padding: 0;
    list-style: none;
}
.error-box li {
    color: #B91C1C;
    font-size: 0.8rem;
    font-weight: 500;
}

.form-grid-2 {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}
.success-box {
    background: #F0FDF4;
    border-left: 4px solid #10B981;
    border-radius: 8px;
    padding: 12px 16px;
    margin-bottom: 20px;
    width: 100%;
    box-sizing: border-box;
    color: #15803D;
    font-size: 0.8rem;
    font-weight: 500;
}
@media (max-width: 600px) {
    .form-grid-2 {
        grid-template-columns: 1fr;
        gap: 0;
    }
}

/* responsive */
@media (max-width: 900px) {
    html, body {
        overflow-y: auto;
    }
    body.auth-page {
        flex-direction: column;
        height: auto;
    }
    .auth-left-panel {
        display: none;
    }
    .auth-right-panel {
        width: 100%;
        height: 100vh;
        min-height: 100vh;
        padding: 40px 24px;
        justify-content: center;
    }
}

/* form states */
.input-group input:hover {
    border-color: #CDB8A3;
}
.input-group input:focus {
    border-color: #E5A323;
    background: #FFFFFF;
    box-shadow: 0 0 0 4px color-mix(in srgb, #E5A323 15%, transparent);
}

/* shake */
@keyframes shake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-5px); }
    50% { transform: translateX(5px); }
    75% { transform: translateX(-5px); }
}
.error-box {
    animation: shake 0.4s ease-in-out;
}

/* fade-in */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}
.auth-form {
    animation: fadeInUp 0.6s ease-out;
}

/* button loading */
.btn-submit.loading {
    position: relative;
    pointer-events: none;
    opacity: 0.8;
}
.btn-submit.loading::after {
    content: '';
    width: 16px;
    height: 16px;
    border: 2px solid rgba(255,255,255,0.3);
    border-top-color: #fff;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
    position: absolute;
    right: 16px;
    top: 50%;
    margin-top: -8px;
}
@keyframes spin {
    to { transform: rotate(360deg); }
}

/* card hover */
.float-card:hover {
    transform: scale(1.02) !important;
}

/* page loader */
.page-loader {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255,255,255,0.9);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    transition: opacity 0.3s;
}
.page-loader.hidden {
    opacity: 0;
    pointer-events: none;
}
