/* ============================================================
   VUDEV.SHOP — Premium Auth CSS (Light Blue Theme)
   Cấu trúc: auth-page > auth-wrapper > auth-container > auth-left + auth-right
   ============================================================ */

/* ===== RESET TRIỆT ĐỂ: KHÔNG CÒN KHOẢNG TRẮNG ===== */
html {
    margin: 0;
    padding: 0;
    height: 100%;
}

body.auth-page {
    margin: 0 !important;
    padding: 0 !important;
    height: 100%;
    overflow: hidden;
    font-family: 'Inter', system-ui, -apple-system, sans-serif;
    color: #1e293b;
    background: #0f172a;
    -webkit-font-smoothing: antialiased;
}

/* ===== WRAPPER: chiếm đúng 100vh, cuộn bên trong ===== */
.auth-wrapper {
    position: relative;
    height: 100vh;
    display: flex;
    align-items: stretch;
    justify-content: center;
    padding: 0;
    margin: 0;
    z-index: 1;
    overflow-y: auto;
    overflow-x: hidden;
    background: linear-gradient(160deg, #dbeafe 0%, #e0e7ff 35%, #ede9fe 60%, #dbeafe 100%);
}

/* Background glows */
.auth-bg-glow {
    position: fixed;
    border-radius: 50%;
    filter: blur(120px);
    z-index: 0;
    pointer-events: none;
}

.glow-1 {
    width: 500px;
    height: 500px;
    background: rgba(14, 165, 233, 0.25);
    top: -150px;
    left: -100px;
}

.glow-2 {
    width: 400px;
    height: 400px;
    background: rgba(139, 92, 246, 0.2);
    bottom: -100px;
    right: -80px;
}

/* ===== CONTAINER: 2 cột full chiều cao ===== */
.auth-container {
    width: 100%;
    max-width: 1200px;
    display: grid;
    grid-template-columns: 50% 50%;
    gap: 0;
    align-items: stretch;
    margin: 0 auto;
    min-height: 100vh;
    position: relative;
    z-index: 1;
}

/* ===== CỘT TRÁI: Branding & Info ===== */
.auth-left {
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 3rem 3rem 3rem 2rem;
    gap: 1.5rem;
    box-sizing: border-box;
}

/* Logo */
.auth-brand .logo-text {
    font-size: 2.25rem;
    font-weight: 800;
    background: linear-gradient(135deg, #4f46e5, #0ea5e9);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    display: inline-block;
    margin-bottom: 0.25rem;
    letter-spacing: -0.02em;
}

.auth-brand .slogan {
    font-size: 1rem;
    color: #64748b;
    font-weight: 500;
}

/* Intro */
.auth-intro h1 {
    font-size: 2.25rem;
    font-weight: 800;
    line-height: 1.2;
    margin: 0 0 0.75rem 0;
    color: #0f172a;
    letter-spacing: -0.03em;
}

.auth-intro p {
    font-size: 1.05rem;
    color: #475569;
    line-height: 1.65;
    margin: 0;
}

/* Bullets */
.auth-bullets {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 0.9rem;
}

.auth-bullets li {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 0.95rem;
    color: #334155;
    font-weight: 500;
}

.auth-bullets i, .auth-bullets svg {
    width: 24px;
    height: 24px;
    min-width: 24px;
    color: #6366f1;
    flex-shrink: 0;
    background: rgba(99, 102, 241, 0.1);
    padding: 5px;
    border-radius: 8px;
    box-sizing: content-box;
}

/* Stats */
.auth-stats {
    display: flex;
    gap: 1rem;
}

.stat-card {
    background: rgba(255, 255, 255, 0.7);
    backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.9);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.04);
    padding: 1rem 1.5rem;
    border-radius: 16px;
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
}

.stat-card .stat-value {
    font-size: 1.5rem;
    font-weight: 800;
    color: #4f46e5;
}

.stat-card .stat-label {
    font-size: 0.85rem;
    color: #64748b;
    font-weight: 500;
}

/* ===== CỘT PHẢI: Form Card ===== */
.auth-right {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 2rem;
    box-sizing: border-box;
}

.auth-card {
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.9);
    box-shadow:
        0 20px 50px -12px rgba(0, 0, 0, 0.08),
        0 0 0 1px rgba(255, 255, 255, 0.5) inset;
    border-radius: 28px;
    padding: 2.5rem 2.25rem;
    width: 100%;
    max-width: 440px;
    box-sizing: border-box;
}

/* Card header */
.card-header {
    margin-bottom: 1.75rem;
}

.card-header h2 {
    font-size: 1.6rem;
    font-weight: 800;
    margin: 0 0 0.35rem 0;
    color: #0f172a;
    letter-spacing: -0.02em;
}

.card-header p {
    color: #64748b;
    margin: 0;
    font-size: 0.95rem;
}

/* ===== FORM ELEMENTS ===== */
.form-group {
    margin-bottom: 1.25rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.4rem;
    font-size: 0.875rem;
    font-weight: 600;
    color: #374151;
}

.form-control {
    width: 100%;
    padding: 0.75rem 1rem;
    background: #f8fafc;
    border: 1.5px solid #e2e8f0;
    border-radius: 12px;
    color: #0f172a;
    font-size: 0.95rem;
    font-family: inherit;
    transition: all 0.2s ease;
    box-sizing: border-box;
    outline: none;
}

.form-control::placeholder {
    color: #94a3b8;
}

.form-control:focus {
    border-color: #6366f1;
    background: #ffffff;
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.12);
}

/* Password Input & Toggle */
.password-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.password-wrapper .form-control {
    padding-right: 2.75rem;
}

.pwd-toggle {
    position: absolute;
    right: 0.6rem;
    background: transparent;
    border: none;
    color: #94a3b8;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 6px;
    border-radius: 50%;
    transition: all 0.2s ease;
    outline: none;
}

.pwd-toggle:hover {
    color: #4f46e5;
    background: rgba(79, 70, 229, 0.08); /* Xanh nhạt khi hover */
}

.pwd-toggle svg {
    width: 18px; /* Thu nhỏ icon lại */
    height: 18px;
    color: inherit;
    transition: color 0.2s ease;
}

/* Password Strength Meter */
.pwd-meter {
    display: flex;
    gap: 4px;
    margin-top: 0.5rem;
}

.pwd-bar {
    height: 4px;
    flex: 1;
    background: #e5e7eb;
    border-radius: 2px;
    transition: background 0.3s ease;
}

.pwd-text {
    font-size: 0.75rem;
    color: #9ca3af;
    margin-top: 0.3rem;
    font-weight: 500;
}

/* Form options row */
.form-options {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.25rem;
}

/* Checkbox */
.checkbox-group {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.checkbox-group input[type="checkbox"] {
    appearance: none;
    -webkit-appearance: none;
    width: 18px;
    height: 18px;
    border: 2px solid #d1d5db;
    border-radius: 5px;
    background: #ffffff;
    cursor: pointer;
    position: relative;
    transition: all 0.15s ease;
    flex-shrink: 0;
}

.checkbox-group input[type="checkbox"]:checked {
    background: #6366f1;
    border-color: #6366f1;
}

.checkbox-group input[type="checkbox"]:checked::after {
    content: '';
    position: absolute;
    left: 5px;
    top: 2px;
    width: 4px;
    height: 8px;
    border: solid white;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
}

.checkbox-group label {
    margin: 0;
    color: #6b7280;
    font-size: 0.875rem;
    cursor: pointer;
    font-weight: 500;
}

/* Links */
.link-muted {
    color: #6366f1;
    font-size: 0.875rem;
    text-decoration: none;
    font-weight: 600;
    transition: color 0.2s;
}

.link-muted:hover {
    color: #4f46e5;
    text-decoration: underline;
}

/* Primary Button */
.btn-primary {
    width: 100%;
    padding: 0.85rem;
    background: linear-gradient(135deg, #6366f1, #4f46e5);
    color: white;
    border: none;
    border-radius: 12px;
    font-size: 0.95rem;
    font-weight: 700;
    font-family: inherit;
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: 0 4px 14px rgba(99, 102, 241, 0.35);
}

.btn-primary:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 20px rgba(99, 102, 241, 0.5);
    background: linear-gradient(135deg, #818cf8, #6366f1);
}

.btn-primary:active {
    transform: translateY(0);
}

/* Divider */
.social-divider {
    display: flex;
    align-items: center;
    margin: 1.5rem 0;
    color: #9ca3af;
    font-size: 0.8rem;
    font-weight: 500;
}

.social-divider::before,
.social-divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: #e5e7eb;
}

.social-divider span {
    padding: 0 1rem;
}

/* Google Button */
.btn-google {
    width: 100%;
    padding: 0.75rem;
    background: #ffffff;
    color: #374151;
    border: 1.5px solid #e5e7eb;
    border-radius: 12px;
    font-size: 0.9rem;
    font-weight: 600;
    font-family: inherit;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.6rem;
}

.btn-google:hover {
    background: #f9fafb;
    border-color: #d1d5db;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
}

.btn-google svg {
    width: 20px;
    height: 20px;
}

/* Footer */
.auth-footer {
    margin-top: 1.25rem;
    text-align: center;
    font-size: 0.9rem;
    color: #6b7280;
    font-weight: 500;
}

/* Form Row (2 cột cạnh nhau) */
.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

/* Password wrapper (chứa input + icon mắt) */
.password-wrapper {
    position: relative;
}

.password-wrapper .form-control {
    padding-right: 2.75rem;
}

.pwd-toggle {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    cursor: pointer;
    padding: 4px;
    color: #94a3b8;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: color 0.2s;
    outline: none;
    z-index: 2;
}

.pwd-toggle:hover {
    color: #6366f1;
}

.pwd-toggle svg {
    width: 20px;
    height: 20px;
    pointer-events: none;
}

/* Password Meter */
.pwd-meter {
    display: flex;
    gap: 4px;
    margin-top: 6px;
}

.pwd-bar {
    height: 4px;
    flex: 1;
    background: #e5e7eb;
    border-radius: 4px;
    transition: background 0.3s ease;
}

.pwd-text {
    font-size: 0.8rem;
    color: #9ca3af;
    margin-top: 4px;
    text-align: right;
    font-weight: 500;
}

/* ===== RESPONSIVE ===== */

/* --- Tablet (≤992px): 1 cột, hiển thị cả 2 phần --- */
@media (max-width: 992px) {
    html, body.auth-page {
        height: auto;
        min-height: 100%;
        overflow: auto;
    }

    .auth-wrapper {
        height: auto;
        min-height: 100vh;
        overflow: visible;
    }

    .auth-container {
        grid-template-columns: 1fr;
        max-width: 520px;
        padding: 2rem 1.5rem;
        min-height: auto;
        gap: 1.5rem;
    }

    .auth-left {
        text-align: center;
        padding: 0;
        gap: 1rem;
    }

    .auth-intro h1 {
        font-size: 1.75rem;
    }

    .auth-intro p {
        font-size: 0.95rem;
    }

    .auth-bullets {
        align-items: center;
    }

    .auth-bullets li {
        font-size: 0.875rem;
    }

    .auth-stats {
        justify-content: center;
    }

    .auth-right {
        padding: 0;
    }

    .auth-card {
        padding: 2rem 1.75rem;
        max-width: 100%;
    }

    .glow-1 { width: 300px; height: 300px; }
    .glow-2 { width: 250px; height: 250px; }
}

/* --- Mobile (≤640px): ẨN cột trái, chỉ giữ form --- */
@media (max-width: 640px) {
    .auth-wrapper {
        align-items: flex-start;
        padding: 0;
        background: linear-gradient(180deg, #dbeafe 0%, #e0e7ff 40%, #ede9fe 100%);
    }

    .auth-container {
        padding: 0;
        gap: 0;
        max-width: 100%;
    }

    /* Ẩn toàn bộ cột trái trên mobile */
    .auth-left {
        display: none;
    }

    .auth-right {
        padding: 1.25rem 1rem;
        min-height: 100vh;
        justify-content: flex-start;
        padding-top: 2rem;
    }

    .auth-card {
        padding: 2rem 1.5rem;
        border-radius: 24px;
        max-width: 100%;
        box-shadow:
            0 10px 30px -8px rgba(0, 0, 0, 0.06),
            0 0 0 1px rgba(255, 255, 255, 0.5) inset;
    }

    /* Thêm logo nhỏ trên form khi ẩn cột trái */
    .card-header::before {
        content: 'VUDEV.SHOP';
        display: block;
        font-size: 1.5rem;
        font-weight: 800;
        background: linear-gradient(135deg, #4f46e5, #0ea5e9);
        -webkit-background-clip: text;
        background-clip: text;
        -webkit-text-fill-color: transparent;
        margin-bottom: 1rem;
        letter-spacing: -0.02em;
    }

    .card-header {
        margin-bottom: 1.5rem;
    }

    .card-header h2 {
        font-size: 1.4rem;
    }

    .card-header p {
        font-size: 0.875rem;
    }

    /* Form spacing gọn hơn */
    .form-group {
        margin-bottom: 1rem;
    }

    .form-control {
        padding: 0.7rem 0.875rem;
        font-size: 0.9rem;
        border-radius: 10px;
    }

    .form-group label {
        font-size: 0.8rem;
        margin-bottom: 0.3rem;
    }

    .form-row {
        grid-template-columns: 1fr;
        gap: 0;
    }

    .form-options {
        margin-bottom: 1rem;
    }

    .checkbox-group label {
        font-size: 0.8rem;
    }

    .link-muted {
        font-size: 0.8rem;
    }

    /* Buttons */
    .btn-primary {
        padding: 0.75rem;
        font-size: 0.9rem;
        border-radius: 10px;
    }

    .social-divider {
        margin: 1.25rem 0;
        font-size: 0.75rem;
    }

    .btn-google {
        padding: 0.65rem;
        font-size: 0.85rem;
        border-radius: 10px;
    }

    .auth-footer {
        margin-top: 1rem;
        font-size: 0.85rem;
    }

    /* Password meter */
    .pwd-text {
        font-size: 0.75rem;
    }

    /* Glow nhỏ hơn */
    .glow-1 { width: 200px; height: 200px; top: -80px; left: -50px; }
    .glow-2 { width: 180px; height: 180px; bottom: -50px; right: -40px; }
}

/* --- Small Mobile (≤380px): compact tối đa --- */
@media (max-width: 380px) {
    .auth-right {
        padding: 0.75rem;
        padding-top: 1.25rem;
    }

    .auth-card {
        padding: 1.5rem 1.15rem;
        border-radius: 20px;
    }

    .card-header::before {
        font-size: 1.25rem;
        margin-bottom: 0.75rem;
    }

    .card-header h2 {
        font-size: 1.25rem;
    }

    .form-control {
        padding: 0.65rem 0.75rem;
        font-size: 0.85rem;
    }

    .btn-primary,
    .btn-google {
        padding: 0.65rem;
        font-size: 0.85rem;
    }
}

