/* ===== GOOGLE FONTS ===== */
/* Fonts loaded non-blocking via <link> in HTML for faster page load */

/* ===== RESET ===== */
*,*::before,*::after { margin:0; padding:0; box-sizing:border-box; }
html,body { height:100%; }

body {
    font-family: 'Inter', sans-serif;
    background: #e8eaf0 url('../mục gif/bgrlg.png') no-repeat center center;
    background-size: cover;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* ===== WRAPPER ===== */
.auth-shell {
    width: 100%;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

/* Hide background shapes */
.auth-bg-shape,
.auth-bg-shape--red,
.auth-bg-shape--yellow { display: none !important; }

/* ===== CARD ===== */
.auth-container {
    position: relative;
    width: 860px;
    max-width: 100%;
    min-height: 520px;
    background: #fff;
    border-radius: 16px;
    box-shadow: 0 14px 50px rgba(0,0,0,0.10), 0 3px 12px rgba(0,0,0,0.05);
    overflow: hidden;
}

/* ===== FORM SIDES ===== */
.form-container {
    position: absolute;
    top: 0;
    left: 0;
    width: 50%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.6s ease-in-out;
}

.sign-in-container { z-index: 2; }
.sign-up-container { z-index: 1; opacity: 0; pointer-events: none; }

.auth-container.right-panel-active .sign-in-container {
    transform: translateX(100%);
    opacity: 0;
    pointer-events: none;
    z-index: 1;
}
.auth-container.right-panel-active .sign-up-container {
    transform: translateX(100%);
    opacity: 1;
    pointer-events: all;
    z-index: 5;
    animation: fadeIn 0.6s;
}
@keyframes fadeIn {
    0%,49.99% { opacity:0; z-index:1; }
    50%,100%  { opacity:1; z-index:5; }
}

/* ===== FORM INNER ===== */
.form-container form {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 30px 44px;
    width: 100%;
}

/* Sign-up form tighter spacing */
.sign-up-container form { padding: 22px 44px; }
.sign-up-container .social-container { margin-bottom: 6px; }
.sign-up-container .auth-hint { margin-bottom: 10px; }
.sign-up-container .input-row { margin-bottom: 8px; }
.sign-up-container .input-row input { padding: 10px 42px 10px 40px; }
.sign-up-container h1 { margin-bottom: 10px; font-size: 24px; }

/* Brand label */
.form-brand-label {
    width: 100%;
    text-align: left;
    font-size: 11px;
    font-weight: 600;
    color: #a0a5b0;
    letter-spacing: 0.8px;
    margin-bottom: 18px;
    font-style: italic;
}

.form-container h1 {
    font-weight: 800;
    font-size: 26px;
    color: #1a1a2e;
    margin-bottom: 14px;
}

/* ===== SOCIAL ===== */
.social-container { display:flex; gap:10px; margin-bottom:10px; }

.social-container .social {
    width: 36px; height: 36px;
    border-radius: 50%;
    border: 1px solid #d1d5db;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    color: #4b5563;
    font-size: 13px;
    transition: all 0.25s;
}
.social-container .social:hover {
    border-color: #2d3748;
    color: #2d3748;
    transform: translateY(-2px);
    box-shadow: 0 3px 10px rgba(0,0,0,0.08);
}

/* ===== AUTH HINT ===== */
.auth-hint { font-size:11.5px; color:#a0a5b0; margin-bottom:14px; }

/* ===== ALERTS ===== */
.alert {
    width:100%; padding:8px 12px; border-radius:8px;
    font-size:12px; margin-bottom:8px;
    display:flex; align-items:center; gap:6px;
}
.alert-error { background:#fef2f2; color:#dc2626; border:1px solid #fecaca; }
.alert-success { background:#f0fdf4; color:#16a34a; border:1px solid #bbf7d0; }

/* ===== INPUTS ===== */
.input-row {
    width: 100%;
    position: relative;
    margin-bottom: 12px;
}
.input-row i:first-child {
    position: absolute;
    left: 14px; top: 50%;
    transform: translateY(-50%);
    color: #a0a5b0;
    font-size: 13px;
    z-index: 1;
}
.input-row input {
    width: 100%;
    padding: 12px 42px 12px 40px;
    border: 1.5px solid #e5e7eb;
    border-radius: 8px;
    font-size: 13.5px;
    font-family: 'Inter', sans-serif;
    background: #f8f9fb;
    color: #1a1a2e;
    outline: none;
    transition: all 0.25s;
}
.input-row input::placeholder { color:#b5b9c4; }
.input-row input:focus {
    border-color: #2d3748;
    background: #fff;
    box-shadow: 0 0 0 3px rgba(45,55,72,0.06);
}

/* Toggle password */
.toggle-password {
    position: absolute;
    right: 12px; top: 50%;
    transform: translateY(-50%);
    background: none; border: none;
    color: #a0a5b0; cursor: pointer;
    font-size: 13px; padding: 4px; z-index:1;
}
.toggle-password:hover { color:#2d3748; }

/* Remember me */
.remember-me {
    display:flex; align-items:center; gap:8px;
    width:100%; margin-bottom:12px;
}
.remember-me input[type="checkbox"] { width:15px; height:15px; accent-color:#2d3748; cursor:pointer; }
.remember-me label { font-size:12.5px; color:#6b7280; cursor:pointer; }

/* ===== AUTH BUTTON ===== */
.auth-btn {
    width: 190px;
    padding: 12px 0;
    border: none;
    border-radius: 28px;
    background: #1e2a3a;
    color: #fff;
    font-family: 'Inter', sans-serif;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 2px;
    cursor: pointer;
    transition: all 0.25s;
    text-transform: uppercase;
    margin-top: 4px;
}
.auth-btn:hover {
    background: #111c2b;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(30,42,58,0.3);
}

/* Auth switch link */
.auth-switch-link { margin-top:12px; font-size:12px; color:#a0a5b0; }
.auth-switch-link a { color:#1e2a3a; font-weight:600; text-decoration:none; }
.auth-switch-link a:hover { text-decoration:underline; }

/* ===========================================
   OVERLAY (DARK SLIDING PANEL)
   =========================================== */
.overlay-container {
    position: absolute;
    top: 0;
    left: 50%;
    width: 50%;
    height: 100%;
    overflow: hidden;
    z-index: 100;
    transition: transform 0.6s ease-in-out;
}
.auth-container.right-panel-active .overlay-container {
    transform: translateX(-100%);
}

.overlay {
    position: relative;
    width: 200%;
    height: 100%;
    left: -100%;
    display: flex;
    transition: transform 0.6s ease-in-out;
}
.auth-container.right-panel-active .overlay {
    transform: translateX(50%);
}

/* ===== PANELS ===== */
.overlay-panel {
    width: 50%;
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 40px 30px;
    position: relative;
    overflow: hidden;
    background: linear-gradient(155deg, #1c2233 0%, #2a3150 50%, #1e2740 100%);
}

/* Subtle mesh wave at bottom */
.overlay-panel::before {
    content:'';
    position:absolute;
    bottom:0; left:-20%;
    width:140%; height:50%;
    background:
        radial-gradient(ellipse at 30% 100%, rgba(50,60,90,0.5) 0%, transparent 55%),
        radial-gradient(ellipse at 70% 100%, rgba(40,50,75,0.4) 0%, transparent 50%);
    pointer-events:none;
}

.overlay-panel::after {
    content:'';
    position:absolute;
    bottom:0; left:0;
    width:100%; height:40%;
    background: repeating-conic-gradient(
        from 0deg at 50% 100%,
        rgba(70,80,110,0.06) 0deg 2deg,
        transparent 2deg 4deg
    );
    mask-image: linear-gradient(to top, rgba(0,0,0,0.6), transparent);
    -webkit-mask-image: linear-gradient(to top, rgba(0,0,0,0.6), transparent);
    pointer-events:none;
}

.overlay-panel > * { position:relative; z-index:1; }

/* Brand mini */
.brand-mini { display:flex; align-items:center; gap:8px; margin-bottom:10px; }
.brand-mini img { width:26px; height:26px; border-radius:5px; }
.brand-mini span { font-weight:600; font-size:12px; color:rgba(255,255,255,0.75); }

.overlay-panel h1 {
    font-family: 'Playfair Display', serif;
    font-style: italic;
    font-weight: 700;
    font-size: 32px;
    color: #fff;
    margin-bottom: 20px;
}

.overlay-panel p {
    font-size:13px;
    color:rgba(255,255,255,0.55);
    margin-bottom:20px;
    max-width:260px;
}

/* Ghost button */
.ghost {
    padding: 11px 40px;
    border: 2px solid rgba(255,255,255,0.35);
    border-radius: 28px;
    background: transparent;
    color: #fff;
    font-family: 'Inter', sans-serif;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 2px;
    cursor: pointer;
    transition: all 0.25s;
    text-transform: uppercase;
}
.ghost:hover {
    background: rgba(255,255,255,0.08);
    border-color: rgba(255,255,255,0.6);
    transform: translateY(-2px);
}

/* Panel slide positions */
.overlay-left  { transition: transform 0.6s ease-in-out; }
.overlay-right { transition: transform 0.6s ease-in-out; }

/* ===== RESPONSIVE ===== */
@media (max-width: 768px) {
    .auth-shell { padding:0; }
    .auth-container { width:100%; min-height:100vh; border-radius:0; }
    .overlay-container { display:none; }
    .form-container {
        position:relative !important;
        width:100% !important;
        height:auto !important;
        transform:none !important;
        opacity:1 !important;
        pointer-events:all !important;
    }
    .sign-up-container { display:none; }
    .auth-container.right-panel-active .sign-up-container { display:flex; }
    .auth-container.right-panel-active .sign-in-container { display:none; }
    .form-container form { padding:36px 20px; }
    .auth-btn { width:100%; }
}

::-webkit-scrollbar { width:0; }
