﻿/* Tệp CSS tuân thủ Quy tắc 4: UI Isolation cho Đăng Ký */

.cb-register-body {
    background-color: var(--cf-cream, #FFF8E1);
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    margin: 0;
    font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
}

.cb-register-wrapper {
    width: 100%;
    max-width: 900px;
    padding: 20px;
}

.cb-register-container {
    display: flex;
    background-color: #fff;
    border-radius: 12px;
    box-shadow: 0 15px 35px rgba(78, 52, 46, 0.1);
    overflow: hidden;
    min-height: 520px;
}

/* ---------------- Cột Trái (Branding) ---------------- */
.cb-register-brand {
    background-color: var(--cf-brown, #6F4E37);
    width: 42%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 3rem;
    text-align: center;
}

.cb-register-logo {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    margin-bottom: 1.5rem;
    box-shadow: 0 6px 15px rgba(0,0,0,0.15);
    object-fit: cover;
    background-color: #fff;
}

.cb-brand-text {
    display: flex;
    flex-direction: column;
}

.cb-brand-title {
    color: #fff;
    font-weight: 800;
    font-size: 2.2rem;
    margin-bottom: 0.3rem;
    letter-spacing: 0.5px;
}

.cb-brand-slogan {
    color: rgba(255, 255, 255, 0.85);
    font-size: 1.05rem;
    margin: 0;
}

/* ---------------- Cột Phải (Form) ---------------- */
.cb-register-form-area {
    width: 58%;
    padding: 3.5rem 4rem;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.cb-register-title {
    color: var(--cf-dark-brown, #4E342E);
    font-weight: 800;
    font-size: 2.2rem;
    margin-bottom: 0.5rem;
}

.cb-register-subtitle {
    color: #757575;
    font-size: 0.95rem;
    margin-bottom: 2rem;
}

/* ---------------- Input Style (Floating Label Material) ---------------- */
.cb-input-group {
    position: relative;
    margin-bottom: 1.5rem;
    display: flex;
    flex-wrap: wrap;
}

.cb-input-icon {
    position: absolute;
    left: 12px;
    top: 22px;
    transform: translateY(-50%);
    color: #9E9E9E;
    font-size: 1.3rem;
    z-index: 2;
    pointer-events: none;
}

.cb-input {
    width: 100%;
    border: none;
    border-bottom: 1px solid #E0E0E0;
    padding: 1.5rem 1rem 0.5rem 2.8rem;
    font-size: 1rem;
    color: var(--cf-text, #4E342E);
    background-color: transparent;
    transition: background-color 0.2s ease, border-color 0.2s ease;
    border-radius: 4px 4px 0 0;
    outline: none;
}

.cb-label {
    position: absolute;
    left: 2.8rem;
    top: 22px;
    transform: translateY(-50%);
    color: #757575;
    font-size: 1rem;
    pointer-events: none;
    transition: all 0.2s cubic-bezier(0.25, 0.8, 0.25, 1);
    transform-origin: left top;
    margin: 0;
}

/* Floating Action */
.cb-input:focus ~ .cb-label,
.cb-input:not(:placeholder-shown) ~ .cb-label {
    top: 10px;
    transform: translateY(0) scale(0.8);
    color: var(--cf-orange, #D27D2D);
}

.cb-input:focus {
    border-bottom: 2px solid var(--cf-brown, #6F4E37);
    background-color: #F4F8FF;
}

.cb-input:-webkit-autofill {
    -webkit-box-shadow: 0 0 0 1000px #E8F0FE inset !important;
}

/* ---------------- Links & Buttons ---------------- */
.cb-btn-register {
    width: 100%;
    background-color: var(--cf-brown, #6F4E37);
    color: #fff;
    border: none;
    border-radius: 10px;
    padding: 0.9rem;
    font-weight: 700;
    font-size: 1rem;
    letter-spacing: 0.5px;
    margin-bottom: 1.5rem;
    transition: background-color 0.3s ease, transform 0.2s ease;
}

    .cb-btn-register:hover {
        background-color: var(--cf-dark-brown, #4E342E);
        transform: translateY(-2px);
    }

.cb-login-text {
    text-align: center;
    font-size: 0.95rem;
    color: #757575;
}

.cb-login-link {
    color: #1976D2;
    text-decoration: none;
    font-weight: 600;
}

    .cb-login-link:hover {
        text-decoration: underline;
    }

/* ---------------- Responsive ---------------- */
@media (max-width: 991px) {
    .cb-register-wrapper {
        max-width: 700px;
        padding: 30px 15px;
    }

    .cb-register-container {
        flex-direction: column;
        min-height: auto;
    }

    .cb-register-brand {
        width: 100%;
        padding: 2rem;
        flex-direction: row;
        justify-content: center;
        gap: 1.5rem;
    }

    .cb-register-logo {
        width: 80px;
        height: 80px;
        margin-bottom: 0;
    }

    .cb-brand-text {
        text-align: left;
        justify-content: center;
    }

    .cb-brand-title {
        font-size: 2rem;
        margin-bottom: 0;
    }

    .cb-register-form-area {
        width: 100%;
        padding: 3rem 4rem;
    }
}

@media (max-width: 575px) {
    .cb-register-wrapper {
        padding: 15px;
    }

    .cb-register-brand {
        flex-direction: column;
        padding: 1.5rem 1rem;
        gap: 0.5rem;
    }

    .cb-register-logo {
        width: 65px;
        height: 65px;
    }

    .cb-brand-text {
        text-align: center;
    }

    .cb-brand-title {
        font-size: 1.6rem;
    }

    .cb-register-form-area {
        padding: 2rem 1.5rem;
    }

    .cb-register-title {
        font-size: 1.8rem;
    }

    .cb-btn-register {
        padding: 0.8rem;
        font-size: 0.95rem;
    }
}
