/* ============================================
   Login Page - Vben Admin v2 Style
   SVG curved blue-left / white-right split
   ============================================ */

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

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans SC", sans-serif;
    height: 100vh;
    overflow: hidden;
    background: #fff;
    color: #333;
}

/* --- Page Layout --- */
.login-page {
    position: relative;
    display: flex;
    height: 100vh;
    width: 100%;
    background: #fff;
    overflow: hidden;
}

/* --- Curved background image --- */
.curved-bg {
    position: absolute;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    pointer-events: none;
    object-fit: cover;
}

/* --- Left: Branding Panel --- */
.login-left {
    position: relative;
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1;
}

.branding-content {
    text-align: center;
    animation: fadeInUp 0.8s ease-out;
    padding: 0 16px;
}

.branding-logo {
    margin-bottom: 16px;
    display: flex;
    justify-content: center;
}

.branding-logo svg {
    width: 56px;
    height: 56px;
}

.branding-title {
    font-size: 26px;
    font-weight: 700;
    color: #fff;
    letter-spacing: 2px;
    margin-bottom: 8px;
}

.branding-desc {
    font-size: 14px;
    color: rgba(255, 255, 255, 0.6);
    letter-spacing: 1px;
}

.illustration {
    margin-top: 24px;
    display: flex;
    justify-content: center;
}

.illu-img {
    width: 320px;
    max-width: 100%;
    height: auto;
    opacity: 0.85;
    filter: drop-shadow(0 8px 24px rgba(0,0,0,0.1));
}

/* --- Right: Form Panel --- */
.login-right {
    position: relative;
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px;
    background: transparent;
    z-index: 1;
}

.login-card {
    width: 100%;
    max-width: 400px;
}

.card-header {
    margin-bottom: 32px;
}

.card-title {
    font-size: 24px;
    font-weight: 600;
    color: #1a1a2e;
    margin-bottom: 8px;
}

.card-subtitle {
    font-size: 14px;
    color: #999;
}

/* --- Form --- */
.login-form { width: 100%; }

.form-item { margin-bottom: 20px; }

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

.input-icon {
    position: absolute;
    left: 14px;
    z-index: 2;
    display: flex;
    align-items: center;
    color: #bfbfbf;
    pointer-events: none;
    transition: color 0.25s ease;
}

.input-icon svg { width: 18px; height: 18px; }

.form-item:focus-within .input-icon { color: #2c41b4; }

.login-form .form-input,
.login-form .layui-input.form-input {
    width: 100%;
    height: 42px;
    padding: 0 16px 0 40px;
    border: 1px solid #d9d9d9;
    border-radius: 4px;
    font-size: 14px;
    color: #333;
    background: #fff;
    outline: none;
    transition: all 0.25s ease;
    box-shadow: none;
}

.login-form .form-input::placeholder,
.login-form .layui-input.form-input::placeholder {
    color: #bfbfbf;
}

.login-form .form-input:hover,
.login-form .layui-input.form-input:hover {
    border-color: #2c41b4;
}

.login-form .form-input:focus,
.login-form .layui-input.form-input:focus {
    border-color: #2c41b4;
    box-shadow: 0 0 0 2px rgba(44, 65, 180, 0.12);
}

/* Password toggle */
.input-wrapper .toggle-pw {
    position: absolute; right: 6px; z-index: 2;
    background: none; border: none;
    cursor: pointer; color: #bfbfbf;
    padding: 6px; border-radius: 4px;
    transition: color 0.2s;
    display: flex; align-items: center;
}

.input-wrapper .toggle-pw:hover { color: #2c41b4; }
.input-wrapper .toggle-pw svg { width: 18px; height: 18px; pointer-events: none; }

/* Captcha */
.input-wrapper--captcha { display: flex; gap: 12px; }
.input-wrapper--captcha .captcha-input { flex: 1; position: relative; }

.captcha-img {
    width: 110px; height: 42px;
    border-radius: 4px; cursor: pointer;
    border: 1px solid #d9d9d9;
    object-fit: cover; flex-shrink: 0;
}

/* --- Extra row --- */
.form-extra {
    display: flex; align-items: center;
    justify-content: space-between;
    margin-bottom: 20px;
}

.remember-me {
    display: flex; align-items: center; gap: 6px;
    font-size: 14px; color: #666;
    cursor: pointer; user-select: none;
}

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

.forgot-link {
    font-size: 14px; color: #2c41b4;
    text-decoration: none; transition: color 0.2s;
}
.forgot-link:hover { color: #1b4fab; }

/* Demo hint */
.demo-hint {
    text-align: center; font-size: 13px; color: #666;
    margin-bottom: 16px; padding: 8px 12px;
    background: #fffbe6; border-radius: 4px;
    border: 1px solid #ffe58f;
}

/* Submit */
.submit-btn {
    width: 100%; height: 44px;
    border: none; border-radius: 4px;
    background: #2c41b4; color: #fff;
    font-size: 15px; font-weight: 500;
    cursor: pointer; letter-spacing: 2px;
    transition: all 0.25s ease;
}
.submit-btn:hover { background: #3b55d4; }
.submit-btn:active { background: #1b4fab; }

/* --- Error Modal --- */
.m-modal-layer {
    background: transparent !important;
    box-shadow: none !important;
    border: none !important;
    border-radius: 8px !important;
    padding: 0 !important;
}
.m-modal-layer .layui-layer-title {
    display: none !important;
}
.m-modal-layer .layui-layer-content {
    padding: 0 !important;
    border-radius: 8px !important;
    overflow: visible !important;
}
.m-modal-layer .layui-layer-setwin {
    display: none !important;
}

.m-modal {
    padding: 28px 28px 24px;
    background: #fff;
    border-radius: 8px;
}

.m-modal-top {
    display: flex;
    align-items: flex-start;
    gap: 14px;
    margin-bottom: 28px;
}

.m-modal-x {
    flex-shrink: 0;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: #fef2f2;
    color: #ef4444;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    font-weight: 700;
}

.m-modal-msg {
    flex: 1;
    font-size: 15px;
    color: #333;
    line-height: 1.6;
    padding-top: 8px;
    word-break: break-word;
}

.m-modal-btn {
    display: block;
    margin-left: auto;
    padding: 8px 32px;
    border: none;
    border-radius: 4px;
    background: #2c41b4;
    color: #fff;
    font-size: 14px;
    cursor: pointer;
    transition: background 0.2s;
}
.m-modal-btn:hover { background: #3b55d4; }

@keyframes toastSlideIn {
    from { opacity: 0; transform: translateY(-12px) scale(0.96); }
    to { opacity: 1; transform: translateY(0) scale(1); }
}

/* --- Footer --- */
.login-footer {
    position: fixed; left: 0; bottom: 0; width: 100%;
    text-align: center; line-height: 30px; padding-bottom: 10px;
    font-size: 13px; color: rgba(0,0,0,0.35); z-index: 10;
    pointer-events: none;
}
.login-footer a { color: rgba(0,0,0,0.35); text-decoration: none; pointer-events: auto; }
.login-footer a:hover { color: #2c41b4; }
.footer-sep { margin: 0 8px; opacity: 0.5; }

/* --- Animations --- */
@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

/* --- Responsive --- */
@media (max-width: 1024px) {
    body { height: auto; overflow: auto; }
    .login-page { flex-direction: column; height: auto; min-height: 100vh; }

    .curved-bg { width: 100%; height: 320px; }

    .login-left { flex: none; height: 300px; padding: 32px 24px 0; }
    .illustration { display: none; }
    .branding-title { font-size: 22px; }
    .branding-desc { font-size: 13px; }

    .login-right { flex: none; padding: 24px 24px 40px; }
    .login-footer { position: static; padding: 16px 0 24px; background: #fff; }
}

@media (max-width: 480px) {
    .curved-bg { height: 220px; }
    .login-left { height: 210px; padding: 24px 16px 0; }
    .branding-title { font-size: 18px; }
    .login-right { padding: 20px 20px 32px; }
    .card-title { font-size: 20px; }
    .form-input { height: 40px; }
    .submit-btn { height: 40px; font-size: 14px; }
}
