﻿@import url('https://fonts.googleapis.com/css2?family=Fraunces:ital,opsz,wght@0,9..144,300;0,9..144,600;0,9..144,700;1,9..144,400&family=Plus+Jakarta+Sans:wght@400;500;600&display=swap');

/* ============================================
   ACCOUNT PAGES — Mộc Cảnh · Wooden Toy
   Full-page immersive layout
   ============================================ */

/* ── Ngăn thanh cuộn ngang toàn cục ── */
body, html {
    overflow-x: hidden !important;
    max-width: 100vw !important;
}

/* ── LOGIN PAGE — Full Screen Split ── */
.login-page {
    min-height: calc(100vh - 95px); /* account for topbar + navbar */
    height: calc(100vh - 95px);
    display: grid;
    grid-template-columns: 1fr 1fr;
    font-family: 'Plus Jakarta Sans', sans-serif;
    overflow: hidden;
    overflow-x: hidden;
    max-width: 100vw;
    position: relative;
}

    /* ── LEFT HALF — Brand / Visual ── */
    .login-page .login-container {
        all: unset;
        display: contents;
    }

/* We repurpose login-left as full left half */
.login-left {
    background: linear-gradient(170deg, #7b4f2e 0%, #5c3317 55%, #3e2009 100%);
    color: white;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: flex-start;
    padding: 5rem 5rem 5rem 6rem;
    position: relative;
    overflow: hidden;
    height: calc(100vh - 95px);
}

    /* Wood grain lines */
    .login-left::before {
        content: '';
        position: absolute;
        inset: 0;
        background-image: repeating-linear-gradient( 89deg, transparent 0px, transparent 22px, rgba(255,255,255,0.022) 22px, rgba(255,255,255,0.022) 23px ), repeating-linear-gradient( 91deg, transparent 0px, transparent 36px, rgba(0,0,0,0.035) 36px, rgba(0,0,0,0.035) 37px );
        pointer-events: none;
    }

    /* Big decorative arc */
    .login-left::after {
        content: '';
        position: absolute;
        bottom: -160px;
        right: -160px;
        width: 460px;
        height: 460px;
        border-radius: 50%;
        border: 60px solid rgba(255,255,255,0.04);
        pointer-events: none;
    }

    /* Second decorative circle top-left */
    .login-left .login-brand::before {
        content: '';
        position: absolute;
        top: -80px;
        left: -80px;
        width: 260px;
        height: 260px;
        border-radius: 50%;
        border: 30px solid rgba(201,168,76,0.07);
        pointer-events: none;
    }

    /* Brand */
    .login-left .login-brand {
        position: relative;
        z-index: 1;
        margin-bottom: 3.5rem;
    }

        .login-left .login-brand h1 {
            font-family: 'Fraunces', serif;
            font-size: 2.5rem;
            font-weight: 700;
            color: #f5ede0;
            margin: 0 0 0.5rem;
            letter-spacing: -0.5px;
            line-height: 1.1;
        }

        .login-left .login-brand p {
            font-size: 1rem;
            color: rgba(245,237,224,0.6);
            margin: 0;
            font-weight: 400;
            letter-spacing: 0.4px;
        }

/* Big italic headline */
.login-left-headline {
    position: relative;
    z-index: 1;
    margin-bottom: 3rem;
}

    .login-left-headline h2 {
        font-family: 'Fraunces', serif;
        font-size: clamp(2rem, 3.5vw, 3rem);
        font-weight: 600;
        font-style: italic;
        line-height: 1.25;
        color: #f5ede0;
        margin: 0 0 1rem;
        letter-spacing: -0.5px;
    }

        .login-left-headline h2 em {
            font-style: normal;
            color: #e8c66a;
        }

    .login-left-headline p {
        font-size: 1rem;
        color: rgba(245,237,224,0.65);
        line-height: 1.65;
        margin: 0;
        max-width: 360px;
    }

/* Features */
.login-features {
    position: relative;
    z-index: 1;
    display: flex;
    flex-direction: column;
    width: 100%;
    max-width: 380px;
}

.feature-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 0.9rem 0;
    border-bottom: 1px solid rgba(255,255,255,0.07);
    color: rgba(245,237,224,0.85);
    font-size: 0.9375rem;
    font-weight: 500;
    transition: color 0.2s;
}

    .feature-item:last-child {
        border-bottom: none;
    }

    .feature-item i {
        width: 38px;
        height: 38px;
        background: rgba(201,168,76,0.15);
        border: 1px solid rgba(201,168,76,0.28);
        border-radius: 10px;
        display: inline-flex;
        align-items: center;
        justify-content: center;
        color: #e8c66a;
        font-size: 0.9rem;
        flex-shrink: 0;
    }

/* ── RIGHT HALF — Form ── */
.login-right {
    background-color: #f5ede0;
    background-image: url("data:image/svg+xml,%3Csvg width='52' height='52' viewBox='0 0 52 52' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23c4956a' fill-opacity='0.06'%3E%3Cpath d='M28 28v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-26V0h-2v2h-4v2h4v4h2V4h4V2h-4zM2 28v-4H0v4h-4v2h4v4h2v-4h4v-2H2zM2 2V0H0v2h-4v2h4v4h2V4h4V2H2z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 3rem 5rem 3rem 4rem;
    height: calc(100vh - 95px);
    overflow-y: auto;
    position: relative;
}

    /* Subtle warm blob */
    .login-right::before {
        content: '';
        position: absolute;
        top: -120px;
        right: -120px;
        width: 380px;
        height: 380px;
        border-radius: 50%;
        background: radial-gradient(circle, rgba(195,134,84,0.12) 0%, transparent 70%);
        pointer-events: none;
        z-index: 0;
    }

    .login-right::after {
        content: '';
        position: absolute;
        bottom: -100px;
        left: -80px;
        width: 320px;
        height: 320px;
        border-radius: 50%;
        background: radial-gradient(circle, rgba(109,76,65,0.07) 0%, transparent 70%);
        pointer-events: none;
        z-index: 0;
    }

/* Form wrapper — constrain width */
.login-form-wrapper {
    width: 100%;
    max-width: 420px;
    position: relative;
    z-index: 1;
}

/* Login header */
.login-page .login-header {
    text-align: left;
    margin-bottom: 2.25rem;
}

    .login-page .login-header h2 {
        font-family: 'Fraunces', serif;
        font-size: 2.5rem;
        font-weight: 700;
        color: #3e2009;
        margin-bottom: 0.4rem;
        letter-spacing: -0.75px;
        line-height: 1.1;
    }

    .login-page .login-header p {
        color: #9a7358;
        font-size: 1rem;
        margin: 0;
    }

    .login-page .login-header::after {
        content: '';
        display: block;
        width: 52px;
        height: 3px;
        background: linear-gradient(90deg, #c4956a, #e8c66a);
        border-radius: 2px;
        margin-top: 1.1rem;
    }

/* Form groups */
.login-page .form-group {
    margin-bottom: 1.375rem;
}

.login-page label,
.login-page .form-label {
    display: block;
    font-weight: 600;
    color: #4e342e;
    font-size: 0.875rem;
    margin-bottom: 0.5rem;
    letter-spacing: 0.1px;
}

/* Input with icon */
.login-page .input-group {
    position: relative;
    display: flex;
    align-items: center;
}

.login-page .input-icon {
    position: absolute;
    left: 1.1rem;
    color: #b08060;
    font-size: 0.9rem;
    z-index: 2;
    pointer-events: none;
    line-height: 1;
}

.login-page .form-control {
    width: 100%;
    padding: 1rem 1.1rem 1rem 2.9rem;
    border: 2px solid #e0c8a8;
    border-radius: 14px;
    font-size: 0.9375rem;
    font-family: 'Plus Jakarta Sans', sans-serif;
    transition: all 0.25s ease;
    background: rgba(255,253,249,0.9);
    color: #3e2009;
    box-shadow: inset 0 2px 5px rgba(109,76,65,0.06), 0 1px 0 rgba(255,255,255,0.8);
}

    .login-page .form-control::placeholder {
        color: #c4a88a;
        font-weight: 400;
    }

    .login-page .form-control:focus {
        outline: none;
        border-color: #b07848;
        background: #ffffff;
        box-shadow: 0 0 0 4px rgba(176,120,72,0.1), inset 0 2px 4px rgba(109,76,65,0.04);
    }

/* Checkbox row */
.login-page .form-options {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1.75rem;
    margin-top: -0.5rem;
}

.login-page .form-check {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.login-page .form-check-input {
    width: 18px;
    height: 18px;
    border: 2px solid #d4a870;
    border-radius: 5px;
    cursor: pointer;
    accent-color: #7b4f2e;
    flex-shrink: 0;
}

.login-page .form-check-label {
    font-size: 0.875rem;
    color: #7a5c48;
    cursor: pointer;
    font-weight: 500;
    margin-bottom: 0;
}

/* Primary button */
.login-page .btn-primary,
.login-page .btn-login {
    width: 100%;
    padding: 1.0625rem 1.5rem;
    background: linear-gradient(145deg, #8b5e3c 0%, #5c3317 100%);
    color: #f5ede0;
    border: none;
    border-radius: 14px;
    font-size: 1rem;
    font-weight: 600;
    font-family: 'Plus Jakarta Sans', sans-serif;
    cursor: pointer;
    transition: all 0.25s ease;
    box-shadow: 0 2px 0 rgba(0,0,0,0.22), 0 8px 24px rgba(91,50,23,0.28);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.65rem;
    letter-spacing: 0.2px;
    position: relative;
    overflow: hidden;
}

    .login-page .btn-primary::before,
    .login-page .btn-login::before {
        content: '';
        position: absolute;
        top: 0;
        left: 0;
        right: 0;
        height: 50%;
        background: rgba(255,255,255,0.08);
        pointer-events: none;
    }

    .login-page .btn-primary:hover,
    .login-page .btn-login:hover {
        transform: translateY(-2px);
        box-shadow: 0 2px 0 rgba(0,0,0,0.22), 0 12px 32px rgba(91,50,23,0.36);
    }

    .login-page .btn-primary:active,
    .login-page .btn-login:active {
        transform: translateY(0);
        box-shadow: 0 2px 0 rgba(0,0,0,0.22), 0 4px 12px rgba(91,50,23,0.2);
    }

/* Divider */
.login-page .divider {
    text-align: center;
    margin: 1.5rem 0;
    position: relative;
}

    .login-page .divider::before {
        content: '';
        position: absolute;
        top: 50%;
        left: 0;
        right: 0;
        height: 1px;
        background: linear-gradient(90deg, transparent, #d8bfa0, transparent);
    }

    .login-page .divider span {
        background: #f5ede0;
        padding: 0 1rem;
        color: #a08060;
        font-size: 0.8125rem;
        font-weight: 500;
        letter-spacing: 0.5px;
        position: relative;
    }

/* Google button */
.login-page .btn-google {
    width: 100%;
    padding: 0.9375rem 1.5rem;
    background: rgba(255,253,249,0.9);
    color: #4e342e;
    border: 2px solid #e0c8a8;
    border-radius: 14px;
    font-size: 0.9375rem;
    font-weight: 600;
    font-family: 'Plus Jakarta Sans', sans-serif;
    cursor: pointer;
    transition: all 0.25s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    box-shadow: 0 2px 8px rgba(109,76,65,0.07), 0 1px 0 rgba(255,255,255,0.8);
}

    .login-page .btn-google:hover {
        border-color: #b07848;
        background: #ffffff;
        transform: translateY(-1px);
        box-shadow: 0 5px 16px rgba(109,76,65,0.13);
    }

/* Footer */
.login-page .login-footer {
    text-align: center;
    margin-top: 2rem;
    padding-top: 2rem;
    border-top: 1px dashed #d8bfa0;
}

    .login-page .login-footer p {
        color: #9a7358;
        margin: 0;
        font-size: 0.9rem;
    }

    .login-page .login-footer a {
        color: #6b3f1e;
        font-weight: 700;
        text-decoration: none;
        border-bottom: 1.5px solid rgba(107,63,30,0.3);
        padding-bottom: 1px;
        transition: all 0.2s;
    }

        .login-page .login-footer a:hover {
            color: #5c3317;
            border-color: #5c3317;
        }

/* Alert */
.login-page .alert {
    border-radius: 12px;
    margin-bottom: 1.5rem;
    padding: 1rem 1.25rem;
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    font-size: 0.9rem;
}

.login-page .alert-danger {
    background: linear-gradient(135deg, #fff5f5 0%, #ffe8e8 100%);
    color: #c53030;
    border: 1px solid rgba(229,62,62,0.2);
    border-left: 4px solid #e53e3e;
}

    .login-page .alert-danger::before {
        content: '\f33a';
        font-family: 'bootstrap-icons';
        font-size: 1.1rem;
        flex-shrink: 0;
        color: #e53e3e;
        margin-top: 1px;
    }

/* ================================================
   REGISTER PAGE
   ================================================ */
.register-container {
    min-height: calc(100vh - 95px);
    display: flex;
    align-items: flex-start;
    justify-content: center;
    padding: 2rem 1rem 3rem;
    background-color: #f5ede0;
    background-image: url("data:image/svg+xml,%3Csvg width='52' height='52' viewBox='0 0 52 52' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23c4956a' fill-opacity='0.06'%3E%3Cpath d='M28 28v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-26V0h-2v2h-4v2h4v4h2V4h4V2h-4zM2 28v-4H0v4h-4v2h4v4h2v-4h4v-2H2zM2 2V0H0v2h-4v2h4v4h2V4h4V2H2z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
    overflow-y: auto;
    font-family: 'Plus Jakarta Sans', sans-serif;
}

.register-card {
    background: #fff8f0;
    border-radius: 24px;
    box-shadow: 0 2px 0 #c4956a, 0 6px 0 rgba(109,76,65,0.1), 0 20px 50px rgba(109,76,65,0.16);
    overflow: visible;
    max-width: 520px;
    width: 100%;
    border: 1.5px solid rgba(195,134,84,0.2);
}

.register-content {
    padding: 2rem 2.25rem 2.5rem;
}

.register-header {
    text-align: center;
    margin-bottom: 1.5rem;
}

    .register-header h2 {
        font-family: 'Fraunces', serif;
        font-size: 1.625rem;
        font-weight: 700;
        color: #3e2009;
        margin-bottom: 0.375rem;
        letter-spacing: -0.3px;
    }

    .register-header p {
        color: #8a6a52;
        font-size: 0.875rem;
        margin: 0;
    }

    .register-header::after {
        content: '';
        display: block;
        width: 36px;
        height: 3px;
        background: linear-gradient(90deg, #c4956a, #e8c66a);
        border-radius: 2px;
        margin: 0.875rem auto 0;
    }

.form-group-register {
    margin-bottom: 1rem;
}

.form-label-register {
    display: flex;
    align-items: center;
    gap: 0.25rem;
    margin-bottom: 0.375rem;
    font-weight: 600;
    color: #4e342e;
    font-size: 0.8125rem;
    letter-spacing: 0.1px;
}

    .form-label-register .text-danger {
        font-weight: bold;
        margin-left: 2px;
        color: #e53e3e;
    }

.form-control-register {
    width: 100%;
    padding: 0.75rem 0.875rem;
    border: 2px solid #e8d5c0;
    border-radius: 10px;
    font-size: 0.875rem;
    font-family: 'Plus Jakarta Sans', sans-serif;
    transition: all 0.25s ease;
    background: #fffdf9;
    color: #3e2009;
    box-shadow: inset 0 2px 3px rgba(109,76,65,0.04);
}

    .form-control-register::placeholder {
        color: #c4a88a;
        font-weight: 400;
    }

    .form-control-register:focus {
        outline: none;
        border-color: #c4956a;
        background: #ffffff;
        box-shadow: 0 0 0 4px rgba(196,149,106,0.1), inset 0 2px 3px rgba(109,76,65,0.03);
    }

.btn-register-primary {
    width: 100%;
    padding: 0.8125rem 1.25rem;
    background: linear-gradient(145deg, #8b5e3c 0%, #5c3317 100%);
    color: #f5ede0;
    border: none;
    border-radius: 10px;
    font-size: 0.9375rem;
    font-weight: 600;
    font-family: 'Plus Jakarta Sans', sans-serif;
    cursor: pointer;
    transition: all 0.25s ease;
    box-shadow: 0 2px 0 rgba(0,0,0,0.2), 0 5px 16px rgba(91,50,23,0.25);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    position: relative;
    overflow: hidden;
}

    .btn-register-primary::before {
        content: '';
        position: absolute;
        top: 0;
        left: 0;
        right: 0;
        height: 50%;
        background: rgba(255,255,255,0.08);
        pointer-events: none;
    }

    .btn-register-primary:hover {
        transform: translateY(-2px);
        box-shadow: 0 2px 0 rgba(0,0,0,0.2), 0 8px 24px rgba(91,50,23,0.32);
    }

    .btn-register-primary:active {
        transform: translateY(0);
    }

.register-footer {
    text-align: center;
    margin-top: 1.25rem;
    padding-top: 1.25rem;
    border-top: 1px dashed #e0c8b0;
}

    .register-footer p {
        color: #8a6a52;
        margin: 0;
        font-size: 0.875rem;
    }

    .register-footer a {
        color: #7b4f2e;
        font-weight: 700;
        text-decoration: none;
        border-bottom: 1.5px solid rgba(123,79,46,0.3);
        padding-bottom: 1px;
        transition: all 0.2s;
    }

        .register-footer a:hover {
            color: #5c3317;
            border-color: #5c3317;
        }

/* ── Password Strength ── */
.password-input-wrapper {
    position: relative;
}

.password-toggle-btn {
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: #b08060;
    cursor: pointer;
    padding: 0.25rem;
    font-size: 1rem;
    transition: color 0.2s;
    z-index: 10;
}

    .password-toggle-btn:hover {
        color: #7b4f2e;
    }

.password-strength-meter {
    margin-top: 0.5rem;
}

.progress {
    height: 5px;
    background-color: #e8d5c0;
    border-radius: 3px;
    overflow: hidden;
}

.progress-bar {
    height: 100%;
    transition: width 0.3s ease, background-color 0.3s ease;
    border-radius: 3px;
}

.password-requirements {
    margin-top: 0.5rem;
    padding: 0.75rem;
    background: #fdf6ee;
    border: 1px solid #ecdcc8;
    border-radius: 8px;
    font-size: 0.75rem;
}

.requirements-title {
    font-weight: 600;
    color: #5c3d2a;
    margin-bottom: 0.5rem;
    font-size: 0.8125rem;
}

.requirement {
    display: flex;
    align-items: center;
    gap: 0.375rem;
    color: #9a7a62;
    margin-bottom: 0.25rem;
    transition: all 0.25s ease;
    font-size: 0.8rem;
}

    .requirement:last-child {
        margin-bottom: 0;
    }

    .requirement i {
        font-size: 0.875rem;
        color: #c4a88a;
        transition: all 0.25s ease;
    }

    .requirement.met {
        color: #10b981;
        font-weight: 600;
    }

        .requirement.met i {
            color: #10b981;
        }

/* ── Responsive ── */
@media (max-width: 992px) {
    .login-page {
        grid-template-columns: 1fr;
        height: auto;
        min-height: 100vh;
    }

    .login-left {
        display: none;
    }

    .login-right {
        height: auto;
        min-height: 100vh;
        padding: 4rem 2.5rem;
        align-items: center;
    }

    .login-form-wrapper {
        max-width: 440px;
    }

    /* Restore background on right panel when left is hidden */
    .login-right::before,
    .login-right::after {
        display: block;
    }
}

@media (max-width: 576px) {
    .login-right {
        padding: 3rem 1.5rem;
    }

    .login-page .login-header h2 {
        font-size: 2rem;
    }

    .register-container {
        padding: 0.5rem 0.75rem;
        align-items: flex-start;
    }

    .register-card {
        border-radius: 18px;
        max-height: calc(100vh - 80px);
    }

    .register-content {
        padding: 1.5rem 1.25rem;
        max-height: calc(100vh - 80px);
    }

    .register-header h2 {
        font-size: 1.375rem;
    }
}
