/* --- BIẾN CSS & RESET --- */
:root {
    --bg-main: #0f182c;       /* Nền Xanh Đen chủ đạo */
    --bg-input: #17233e;      /* Nền input sáng hơn nền chính */
    --bg-input-focus: #1b294b;
    --text-main: #ffffff;
    --text-muted: #94a3b8;
    --accent-blue: #2f81f7;
    --border-color: rgba(255, 255, 255, 0.1);
    --transition: 0.3s ease;
}

/* Giao diện Sáng (Light Mode) cơ bản */
body.light-theme {
    --bg-main: #f3f4f6;
    --bg-input: #e5e7eb;
    --bg-input-focus: #ffffff;
    --text-main: #1f2937;
    --text-muted: #6b7280;
    --border-color: rgba(0, 0, 0, 0.1);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Inter', sans-serif;
}

body {
    background-color: var(--bg-main);
    color: var(--text-main);
    overflow-x: hidden;
}

/* --- BỐ CỤC SPLIT SCREEN --- */
.split-layout {
    display: flex;
    min-height: 100vh;
    width: 100%;
}

/* CỘT TRÁI (BRANDING) */
.split-left {
    flex: 1; /* Chiếm 50% */
    display: flex;
    align-items: center;
    justify-content: center;
    background: radial-gradient(circle at 50% 50%, #15223d 0%, #0f182c 100%);
    position: relative;
    overflow: hidden;
    border-right: 1px solid var(--border-color);
}

body.light-theme .split-left { background: radial-gradient(circle at 50% 50%, #e2e8f0 0%, #cbd5e1 100%); }

.brand-content {
    text-align: center;
    z-index: 2;
    padding: 40px;
}

.brand-logo {
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, var(--accent-blue) 0%, #00e5ff 100%);
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 28px;
    color: white;
    margin: 0 auto 20px;
    box-shadow: 0 10px 25px rgba(47, 129, 247, 0.4);
}

.brand-title {
    font-size: 32px;
    font-weight: 800;
    letter-spacing: 1px;
    margin-bottom: 5px;
}

.brand-subtitle {
    font-size: 13px;
    color: var(--text-muted);
    letter-spacing: 4px;
    font-weight: 600;
}

.illustration-wrapper {
    margin-top: 50px;
    max-width: 400px;
}

.illustration-wrapper img {
    width: 100%;
    height: auto;
    filter: drop-shadow(0 20px 30px rgba(0,0,0,0.5));
}

/* Hiệu ứng trôi bồng bềnh */
.animate-float {
    animation: float 4s ease-in-out infinite;
}

@keyframes float {
    0% { transform: translateY(0px); }
    50% { transform: translateY(-20px); }
    100% { transform: translateY(0px); }
}

/* CỘT PHẢI (FORM ĐĂNG KÝ) */
.split-right {
    flex: 1; /* Chiếm 50% */
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    background-color: var(--bg-main);
    padding: 40px 0; /* Thêm padding dọc để form không bị cắt khi màn hình thấp */
    overflow-y: auto; /* Cho phép cuộn nếu form dài */
}

.theme-toggle {
    position: absolute;
    top: 30px;
    right: 40px;
    background: var(--bg-input);
    border: 1px solid var(--border-color);
    color: var(--text-muted);
    width: 45px;
    height: 45px;
    border-radius: 12px;
    cursor: pointer;
    font-size: 18px;
    transition: var(--transition);
}

.theme-toggle:hover {
    color: var(--text-main);
    border-color: var(--accent-blue);
    box-shadow: 0 0 15px rgba(47, 129, 247, 0.2);
}

.login-container {
    width: 100%;
    max-width: 420px;
    padding: 0 20px;
}

.login-header {
    margin-bottom: 25px;
    text-align: left;
}

.login-header h2 {
    font-size: 32px;
    font-weight: 800;
    margin-bottom: 5px;
}

.login-header p {
    font-size: 12px;
    color: var(--text-muted);
    letter-spacing: 1px;
    font-weight: 600;
}

/* --- THÔNG BÁO (ALERT BOX) --- */
.alert-box {
    padding: 12px 16px;
    border-radius: 12px;
    margin-bottom: 20px;
    font-size: 13px;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 10px;
    animation: fadeSlideDown 0.3s ease;
}
.alert-error {
    background: rgba(239, 68, 68, 0.1);
    border: 1px solid rgba(239, 68, 68, 0.3);
    color: #ef4444;
}
.alert-success {
    background: rgba(46, 204, 113, 0.1);
    border: 1px solid rgba(46, 204, 113, 0.3);
    color: #2ecc71;
}
@keyframes fadeSlideDown {
    from { opacity: 0; transform: translateY(-10px); }
    to { opacity: 1; transform: translateY(0); }
}

/* --- FORM ELEMENTS --- */
.input-group {
    margin-bottom: 18px;
}

.input-group label {
    display: block;
    font-size: 11px;
    color: var(--text-muted);
    font-weight: 700;
    letter-spacing: 1px;
    margin-bottom: 8px;
}

.forgot-link, .login-footer a {
    color: var(--accent-blue);
    text-decoration: none;
    font-size: 12px;
    font-weight: 600;
    transition: var(--transition);
}
.forgot-link:hover, .login-footer a:hover { color: #00e5ff; text-shadow: 0 0 8px rgba(0, 229, 255, 0.5); }

.input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.input-icon-left { position: absolute; left: 15px; color: var(--text-muted); font-size: 14px; }
.input-icon-right { position: absolute; right: 15px; color: var(--text-muted); font-size: 14px; transition: var(--transition); }
.input-icon-right:hover { color: var(--text-main); }

.input-wrapper input {
    width: 100%;
    background-color: var(--bg-input);
    border: 1px solid var(--border-color);
    color: var(--text-main);
    padding: 14px 40px 14px 45px;
    border-radius: 12px;
    font-size: 14px;
    outline: none;
    transition: var(--transition);
}

.input-wrapper input:focus {
    background-color: var(--bg-input-focus);
    border-color: var(--accent-blue);
    box-shadow: 0 0 0 4px rgba(47, 129, 247, 0.15);
}

/* Checkbox & Button */
.form-options { margin-bottom: 25px; margin-top: 5px; }
.custom-checkbox { display: flex; align-items: center; gap: 10px; cursor: pointer; }
.custom-checkbox input { accent-color: var(--accent-blue); width: 16px; height: 16px; cursor: pointer; }
.checkbox-text { font-size: 12px; color: var(--text-muted); font-weight: 600; letter-spacing: 0.5px; }

.submit-btn {
    width: 100%;
    background: linear-gradient(135deg, var(--accent-blue) 0%, #00e5ff 100%);
    color: white;
    border: none;
    padding: 15px;
    border-radius: 12px;
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
    display: flex; justify-content: center; align-items: center; gap: 10px;
    box-shadow: 0 8px 20px rgba(47, 129, 247, 0.3);
    transition: var(--transition);
}
.submit-btn:hover { transform: translateY(-3px); box-shadow: 0 12px 25px rgba(47, 129, 247, 0.6); }

.login-footer { margin-top: 25px; text-align: center; font-size: 13px; color: var(--text-muted); font-weight: 600; }

/* --- RESPONSIVE MOBILE --- */
@media (max-width: 768px) {
    .split-left { display: none; }
    .theme-toggle { top: 20px; right: 20px; }
    .login-container { max-width: 100%; padding: 0 25px; margin-top: 40px; }
}