/* auth.css — 2 panel desktop, header cong + stats pills trên mobile */

:root {
    --color-blue:         #002147;
    --color-red:          #BB133E;
    --color-white:        #FFFFFF;
    --color-text:         #2c3e50;
    --color-muted:        #6b7280;
    --color-bg:           #f8f9fa;
    --color-border:       #e0e0e0;
    --shadow-blue:        rgba(0, 33, 71, 0.12);
    --shadow-blue-strong: rgba(0, 33, 71, 0.30);
    --red-glow:           rgba(187, 19, 62, 0.30);
    --blue-gradient:      linear-gradient(135deg, #002147 0%, #001030 100%);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
    background: var(--color-bg);
    color: var(--color-text);
    min-height: 100vh;
}

/* ===== LAYOUT 2 PANEL (desktop) ===== */
.auth-wrapper {
    display: flex;
    min-height: 100vh;
}

/* ===== PANEL TRÁI ===== */
.auth-left {
    flex: 1;
    background: var(--blue-gradient);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 60px 48px;
    position: relative;
    overflow: hidden;
}

.auth-left::before {
    content: '';
    position: absolute;
    inset: 0;
    background: repeating-linear-gradient(
        45deg,
        rgba(255,255,255,0.02) 0px,
        rgba(255,255,255,0.02) 1px,
        transparent 1px,
        transparent 40px
    );
    pointer-events: none;
}

.auth-left::after {
    content: '';
    position: absolute;
    bottom: -120px;
    right: -120px;
    width: 360px;
    height: 360px;
    border-radius: 50%;
    border: 60px solid rgba(187, 19, 62, 0.12);
    pointer-events: none;
}

.auth-left-inner {
    position: relative;
    z-index: 1;
    max-width: 340px;
}

.auth-left-logo {
    margin-bottom: 40px;
}

.auth-left h2 {
    color: var(--color-white);
    font-size: 2rem;
    font-weight: 700;
    line-height: 1.3;
    margin-bottom: 16px;
    border: none;
    padding: 0;
    display: block;
}

.auth-left p {
    color: rgba(255, 255, 255, 0.72);
    font-size: 1rem;
    line-height: 1.7;
    margin-bottom: 40px;
}

.auth-left-stats {
    display: flex;
    gap: 24px;
    padding-top: 32px;
    border-top: 1px solid rgba(255, 255, 255, 0.15);
}

.auth-stat {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.auth-stat strong {
    color: var(--color-white);
    font-size: 1.4rem;
    font-weight: 700;
    line-height: 1;
}

.auth-stat span {
    color: rgba(255, 255, 255, 0.6);
    font-size: 0.82rem;
}

/* ===== PANEL PHẢI ===== */
.auth-right {
    width: 460px;
    flex-shrink: 0;
    background: var(--color-white);
    display: flex;
    flex-direction: column;
    box-shadow: -8px 0 40px rgba(0, 0, 0, 0.08);
}

.auth-right-accent {
    height: 4px;
    background: linear-gradient(90deg, var(--color-blue), var(--color-red));
    flex-shrink: 0;
}

.auth-right-inner {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 48px 44px;
}

/* Elements bên trong panel phải */
.auth-right h2 {
    font-size: 1.7rem;
    font-weight: 700;
    color: var(--color-blue);
    margin-bottom: 6px;
    border: none;
    padding: 0;
    display: block;
    text-align: left;
}

.auth-subtitle {
    color: var(--color-muted);
    font-size: 0.95rem;
    margin-bottom: 28px;
}

/* ===== MOBILE HEADER (ẩn trên desktop) ===== */
.auth-mobile-header { display: none; }
.auth-stats-row     { display: none; }

/* ===== GOOGLE BUTTON ===== */
.btn-google {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    width: 100%;
    padding: 11px 16px;
    border-radius: 8px;
    background: var(--color-white);
    border: 1.5px solid var(--color-border);
    font-weight: 500;
    font-size: 0.95rem;
    cursor: pointer;
    transition: all 0.2s ease;
    text-decoration: none;
    color: #333;
}

.btn-google:hover {
    background: var(--color-bg);
    border-color: #bbb;
    color: #333;
}

/* ===== DIVIDER ===== */
.auth-divider {
    display: flex;
    align-items: center;
    margin: 20px 0;
}

.auth-divider::before,
.auth-divider::after {
    content: "";
    flex: 1;
    height: 1px;
    background: #e5e5e5;
}

.auth-divider span {
    margin: 0 12px;
    color: #aaa;
    font-size: 12px;
    white-space: nowrap;
}

.btn-block { width: 100%; }

/* ===== FORM ===== */
.form-group { margin-bottom: 18px; }

label {
    display: block;
    margin-bottom: 6px;
    font-size: 13px;
    font-weight: 600;
    color: #374151;
}

input,
select {
    width: 100%;
    padding: 11px 14px;
    border: 1.5px solid var(--color-border);
    border-radius: 8px;
    font-size: 15px;
    background: var(--color-white);
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
    color: var(--color-text);
}

input:focus,
select:focus {
    border-color: var(--color-blue);
    box-shadow: 0 0 0 3px rgba(0, 33, 71, 0.1);
    outline: none;
}

select {
    padding-right: 36px;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' fill='%23002147' viewBox='0 0 16 16'%3E%3Cpath d='M7.247 11.14 2.451 5.658C1.885 5.013 2.345 4 3.204 4h9.592a1 1 0 0 1 .753 1.659l-4.796 5.48a1 1 0 0 1-1.506 0z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 14px center;
    background-size: 12px;
}

/* ===== BUTTONS ===== */
.btn {
    width: 100%;
    padding: 13px;
    font-size: 15px;
    font-weight: 600;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-top: 4px;
}

.btn-primary {
    background: var(--color-blue);
    color: var(--color-white);
}

.btn-primary:hover {
    background: #001530;
    transform: translateY(-1px);
    box-shadow: 0 8px 20px var(--shadow-blue-strong);
}

.btn-secondary {
    background: var(--color-red);
    color: var(--color-white);
}

.btn-secondary:hover {
    background: #a11235;
    transform: translateY(-1px);
    box-shadow: 0 8px 20px var(--red-glow);
}

/* ===== ALERT ===== */
.auth-alert {
    padding: 12px 16px;
    border-radius: 8px;
    margin-bottom: 20px;
    font-size: 14px;
    line-height: 1.5;
}

.auth-alert-danger {
    background: #fee2e2;
    color: #991b1b;
    border: 1px solid #fecaca;
}

/* ===== FOOTER ===== */
.auth-footer {
    text-align: center;
    margin-top: 24px;
    font-size: 14px;
    color: var(--color-muted);
}

.auth-footer a {
    color: var(--color-blue);
    text-decoration: none;
    font-weight: 600;
}

.auth-footer a:hover {
    color: var(--color-red);
    text-decoration: underline;
}

/* ===== RESPONSIVE ===== */
@media (max-width: 860px) {

    /* Chuyển sang layout dọc mobile */
    .auth-wrapper {
        flex-direction: column;
        min-height: 100vh;
    }

    /* Ẩn panel trái desktop */
    .auth-left { display: none; }

    /* Panel phải full width */
    .auth-right {
        width: 100%;
        box-shadow: none;
        flex: 1;
    }

    /* Ẩn accent strip ngang */
    .auth-right-accent { display: none; }

    /* Hiện mobile header */
    .auth-mobile-header {
        display: block;
        background: var(--blue-gradient);
        padding: 36px 24px 52px;
        text-align: center;
        position: relative;
        overflow: hidden;
    }

    /* Vòng cung trắng tạo hiệu ứng cong dưới header */
    .auth-mobile-header::after {
        content: '';
        position: absolute;
        bottom: -32px;
        left: 50%;
        transform: translateX(-50%);
        width: 140%;
        height: 64px;
        background: var(--color-white);
        border-radius: 50%;
    }

    .auth-mobile-header .logo a {
        display: inline-block;
        margin-bottom: 12px;
    }

    .auth-mobile-header h1 {
        color: var(--color-white);
        font-size: 1.25rem;
        font-weight: 700;
        margin-bottom: 4px;
    }

    .auth-mobile-header p {
        color: rgba(255, 255, 255, 0.72);
        font-size: 0.85rem;
    }

    /* Form area */
    .auth-right-inner {
        padding: 40px 24px 32px;
        justify-content: flex-start;
    }

    .auth-right h2 { font-size: 1.4rem; }

    /* Hiện stats pills cuối form */
    .auth-stats-row {
        display: flex;
        justify-content: center;
        align-items: center;
        gap: 0;
        margin-top: 28px;
        padding-top: 20px;
        border-top: 1px solid #f0f0f0;
    }

    .stat-pill {
        display: flex;
        flex-direction: column;
        align-items: center;
        gap: 2px;
        flex: 1;
    }

    .stat-pill strong {
        font-size: 1rem;
        font-weight: 700;
        color: var(--color-blue);
    }

    .stat-pill span {
        font-size: 0.7rem;
        color: #9ca3af;
    }

    .stat-divider {
        width: 1px;
        height: 32px;
        background: #e5e5e5;
        flex-shrink: 0;
    }
}

@media (max-width: 400px) {
    .auth-right-inner { padding: 32px 20px 28px; }
}