* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', 'PingFang SC', 'Microsoft YaHei', sans-serif;
    height: 100vh;
    overflow: hidden;
}

/* ========== Left-Right Split Layout ========== */
.auth-container {
    display: flex;
    height: 100vh;
    width: 100%;
}

/* ========== Left Brand Area ========== */
.auth-left {
    width: 60%;
    background: url('../img/login-bg.jpg') no-repeat center center;
    background-size: cover;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 60px 48px;
    position: relative;
    overflow: hidden;
}

.auth-left::before {
    content: '';
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.45);
}

.brand-logo {
    font-size: 70px;
    font-weight: 800;
    color: #fff;
    letter-spacing: 8px;
    margin-bottom: 8px;
    text-shadow: 0 2px 20px rgba(0, 0, 0, 0.4);
    position: relative;
    z-index: 1;
    text-align: center;
}

.brand-sub {
    font-size: 30px;
    font-weight: 500;
    color: rgba(255, 255, 255, 0.9);
    letter-spacing: 6px;
    margin-bottom: 24px;
    position: relative;
    z-index: 1;
    text-align: center;
}

.brand-slogan {
    font-size: 26px;
    color: rgba(255, 255, 255, 0.65);
    letter-spacing: 3px;
    position: relative;
    z-index: 1;
    padding-top: 24px;
    border-top: 1px solid rgba(255, 255, 255, 0.2);
}

/* ========== Right Form Area ========== */
.auth-right {
    width: 40%;
    display: flex;
    justify-content: center;
    align-items: center;
    background: #f8faf9;
}

.auth-card {
    width: 420px;
    padding: 0;
    background: none;
}

.auth-title {
    font-size: 26px;
    font-weight: 700;
    color: #1a1a2e;
    margin-bottom: 8px;
}

.auth-subtitle {
    font-size: 14px;
    color: #999;
    margin-bottom: 32px;
}

/* ========== Form Styles ========== */
.form-group {
    margin-bottom: 20px;
}

.form-label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: #444;
    margin-bottom: 7px;
}

.input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.input-icon {
    position: absolute;
    left: 14px;
    color: #a0a7b0;
    font-size: 18px;
    display: flex;
    align-items: center;
    pointer-events: none;
    transition: color 0.25s;
}

.input-wrapper input {
    width: 100%;
    padding: 13px 16px 13px 46px;
    border: 1.5px solid #dde1e7;
    border-radius: 10px;
    font-size: 14px;
    color: #333;
    background: #fff;
    transition: all 0.25s ease;
    outline: none;
}

.input-wrapper input:focus {
    border-color: #40916c;
    box-shadow: 0 0 0 3px rgba(64, 145, 108, 0.12);
}

.input-wrapper input:focus ~ .input-icon,
.input-wrapper input:focus + .input-icon {
    color: #40916c;
}

.input-wrapper input::placeholder {
    color: #b0b8c1;
}

/* ========== Password Toggle ========== */
.password-toggle {
    position: absolute;
    right: 14px;
    background: none;
    border: none;
    cursor: pointer;
    color: #a0a7b0;
    display: flex;
    align-items: center;
    padding: 4px;
    transition: color 0.2s;
}

.password-toggle:hover {
    color: #40916c;
}

.password-toggle svg {
    width: 18px;
    height: 18px;
}

/* ========== Checkbox & Links ========== */
.form-options {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
    font-size: 13px;
}

.remember-me {
    display: flex;
    align-items: center;
    gap: 6px;
    cursor: pointer;
    color: #555;
}

.remember-me input[type="checkbox"] {
    width: 15px;
    height: 15px;
    accent-color: #40916c;
    cursor: pointer;
}

/* ========== Buttons ========== */
.btn-primary {
    width: 100%;
    padding: 14px;
    background: linear-gradient(135deg, #40916c, #2d6a4f);
    color: #fff;
    border: none;
    border-radius: 10px;
    font-size: 15px;
    font-weight: 600;
    letter-spacing: 2px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(45, 106, 79, 0.3);
    position: relative;
    overflow: hidden;
}

.btn-primary:hover {
    background: linear-gradient(135deg, #2d6a4f, #1b4332);
    box-shadow: 0 6px 20px rgba(45, 106, 79, 0.4);
    transform: translateY(-1px);
}

.btn-primary:active {
    transform: translateY(0);
    box-shadow: 0 2px 8px rgba(45, 106, 79, 0.3);
}

.btn-primary.loading {
    pointer-events: none;
    opacity: 0.8;
}

.btn-primary.loading::after {
    content: '';
    display: inline-block;
    width: 16px;
    height: 16px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-top-color: #fff;
    border-radius: 50%;
    animation: spin 0.6s linear infinite;
    margin-left: 10px;
    vertical-align: middle;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* ========== Footer Link ========== */
.auth-footer {
    text-align: center;
    margin-top: 28px;
    font-size: 13px;
    color: #999;
}

.auth-footer a {
    color: #40916c;
    text-decoration: none;
    font-weight: 600;
    margin-left: 4px;
    transition: color 0.2s;
}

.auth-footer a:hover {
    color: #2d6a4f;
    text-decoration: underline;
}

/* ========== Flash Messages ========== */
.flash-messages {
    margin-bottom: 20px;
}

.flash-msg {
    padding: 11px 14px;
    border-radius: 8px;
    font-size: 13px;
    display: flex;
    align-items: center;
    gap: 8px;
    animation: fadeIn 0.3s ease;
}

.flash-msg.error {
    background: #ffeaea;
    color: #c0392b;
    border: 1px solid #f5c6cb;
}

.flash-msg.success {
    background: #e8f5e9;
    color: #2d6a4f;
    border: 1px solid #c8e6c9;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(-8px); }
    to { opacity: 1; transform: translateY(0); }
}

/* ========== Responsive ========== */
@media (max-width: 768px) {
    .auth-left {
        display: none;
    }
    .auth-right {
        width: 100%;
    }
    .auth-card {
        width: 92%;
        max-width: 420px;
        padding: 0 16px;
    }
}
