/**
 * 微教育登录页样式 (login-page.css)
 * 教育风格扁平化设计 - 独立样式，不依赖 bootstrap.css / common.css
 */

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

html, body {
    height: 100%;
}
 
body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", "Helvetica Neue", Arial, sans-serif;
    font-size: 14px;
    color: #1f2937;
    background: #f3f4f6;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    line-height: 1.5;
}

a { text-decoration: none; color: inherit; }
img { border: 0; vertical-align: middle; }
button, input { font-family: inherit; outline: none; }
ul { list-style: none; }

/* ============ 整体布局 ============ */
.login-wrap {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    background: linear-gradient(135deg, #4f9ffe 0%, #6a5af9 100%);
    background-size: cover;
    background-position: center;
    position: relative;
}

.login-wrap::before {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(79, 159, 254, 0.85) 0%, rgba(106, 90, 249, 0.85) 100%);
    pointer-events: none;
    z-index: 1;
}

.login-wrap > * { position: relative; z-index: 2; }

/* ============ 顶部 ============ */
.login-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 22px 40px;
}

.login-logo {
    display: flex;
    align-items: center;
    gap: 12px;
}

.login-logo img {
    height: 38px;
    width: auto;
    max-width: 220px;
    object-fit: contain;
}

.login-logo .brand-text {
    color: #fff;
    font-size: 17px;
    font-weight: 600;
    letter-spacing: 1px;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
}

.login-home-link {
    color: rgba(255, 255, 255, 0.95);
    font-size: 13px;
    padding: 7px 18px;
    border: 1px solid rgba(255, 255, 255, 0.45);
    border-radius: 999px;
    transition: all 0.2s;
}

.login-home-link:hover {
    background: rgba(255, 255, 255, 0.18);
    border-color: rgba(255, 255, 255, 0.8);
    color: #fff;
}

/* ============ 主体 ============ */
.login-main {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 10px 40px 40px;
}

.login-card {
    width: 100%;
    max-width: 940px;
    min-height: 480px;
    background: #fff;
    border-radius: 18px;
    box-shadow: 0 24px 60px rgba(15, 23, 42, 0.18);
    overflow: hidden;
    display: grid;
    grid-template-columns: 1.05fr 1fr;
}

/* ============ 左侧品牌区 ============ */
.login-banner {
    background: linear-gradient(135deg, #4f9ffe 0%, #6a5af9 100%);
    color: #fff;
    padding: 52px 44px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    position: relative;
    overflow: hidden;
}

.login-banner::before {
    content: "";
    position: absolute;
    width: 260px;
    height: 260px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.1);
    top: -90px;
    right: -90px;
}

.login-banner::after {
    content: "";
    position: absolute;
    width: 180px;
    height: 180px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.08);
    bottom: -50px;
    left: -50px;
}

.login-banner-title {
    font-size: 28px;
    font-weight: 700;
    margin-bottom: 16px;
    position: relative;
    line-height: 1.3;
}

.login-banner-subtitle {
    font-size: 14px;
    line-height: 1.75;
    opacity: 0.92;
    margin-bottom: 32px;
    position: relative;
}

.login-banner-features li {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 14px;
    font-size: 14px;
    opacity: 0.96;
    position: relative;
}

.login-banner-features li::before {
    content: "";
    width: 6px;
    height: 6px;
    background: #fff;
    border-radius: 50%;
    flex-shrink: 0;
}

/* ============ 右侧表单区 ============ */
.login-form-side {
    padding: 52px 56px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.login-title {
    font-size: 22px;
    font-weight: 600;
    color: #111827;
    margin-bottom: 6px;
}

.login-subtitle {
    font-size: 13px;
    color: #6b7280;
    margin-bottom: 28px;
}

/* ============ 表单元素 ============ */
.login-form .field {
    margin-bottom: 18px;
}

.login-form .field-label {
    display: block;
    font-size: 13px;
    color: #374151;
    margin-bottom: 8px;
    font-weight: 500;
}

.login-input {
    width: 100%;
    height: 44px;
    padding: 0 16px;
    font-size: 14px;
    color: #111827;
    background: #f9fafb;
    border: 1px solid #e5e7eb;
    border-radius: 10px;
    transition: all 0.2s;
}

.login-input::placeholder { color: #9ca3af; }
.login-input:hover { border-color: #d1d5db; }
.login-input:focus {
    border-color: #6a5af9;
    background: #fff;
    box-shadow: 0 0 0 3px rgba(106, 90, 249, 0.12);
}

.caps-tip {
    display: none;
    color: #ef4444;
    font-size: 12px;
    margin-top: 6px;
}

/* 验证码 */
.captcha-wrap {
    display: flex;
    gap: 10px;
    align-items: center;
}

.captcha-wrap .login-input {
    flex: 1;
}

.captcha-img-link {
    display: inline-flex;
    flex-shrink: 0;
}

.captcha-img {
    height: 44px;
    width: 110px;
    border-radius: 10px;
    cursor: pointer;
    border: 1px solid #e5e7eb;
    background: #f9fafb;
    display: block;
}

/* 选项行 */
.login-options {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    margin-bottom: 22px;
}

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

.remember-label input[type="checkbox"] {
    width: 15px;
    height: 15px;
    accent-color: #6a5af9;
    cursor: pointer;
}

/* 提交按钮 */
.login-btn {
    width: 100%;
    height: 46px;
    background: linear-gradient(135deg, #4f9ffe 0%, #6a5af9 100%);
    color: #fff;
    border: none;
    border-radius: 10px;
    font-size: 15px;
    font-weight: 500;
    letter-spacing: 4px;
    cursor: pointer;
    transition: all 0.2s;
    box-shadow: 0 6px 16px rgba(106, 90, 249, 0.28);
}

.login-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 8px 20px rgba(106, 90, 249, 0.38);
}

.login-btn:active {
    transform: translateY(0);
}

/* ============ 第三方登录 ============ */
.third-login {
    margin-top: 26px;
    text-align: center;
}

.third-login-divider {
    display: flex;
    align-items: center;
    margin-bottom: 16px;
}

.third-login-divider::before,
.third-login-divider::after {
    content: "";
    flex: 1;
    height: 1px;
    background: #e5e7eb;
}

.third-login-divider span {
    padding: 0 14px;
    font-size: 12px;
    color: #9ca3af;
}

.third-login-list {
    display: flex;
    justify-content: center;
    gap: 20px;
}

.third-login-list a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: #f3f4f6;
    transition: all 0.2s;
}

.third-login-list a:hover {
    background: #e5e7eb;
    transform: translateY(-2px);
}

.third-login-list img {
    width: 22px;
    height: 22px;
}

/* ============ Modal 自定义样式（替代 bootstrap.css 的 modal 部分） ============ */
.modal-backdrop {
    display: none !important;
}

.modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(17, 24, 39, 0.55);
    display: none;
    z-index: 1050;
    overflow: auto;
    -webkit-overflow-scrolling: touch;
}

.modal-dialog {
    width: 100%;
    max-width: 420px;
    margin: 80px auto;
    background: #fff;
    border-radius: 14px;
    box-shadow: 0 24px 60px rgba(0, 0, 0, 0.25);
    overflow: hidden;
    position: relative;
}

.modal-content {
    background: #fff;
    border: none;
    border-radius: 14px;
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 18px 22px;
    border-bottom: 1px solid #f3f4f6;
}

.modal-title {
    font-size: 16px;
    font-weight: 600;
    color: #111827;
}

.modal .close {
    background: none;
    border: none;
    font-size: 24px;
    line-height: 1;
    color: #9ca3af;
    cursor: pointer;
    padding: 4px 8px;
    transition: color 0.2s;
}

.modal .close:hover { color: #111827; }

.modal-body {
    padding: 22px;
}

.modal-tip-alert {
    padding: 12px 14px;
    background: #fef3c7;
    color: #92400e;
    border-radius: 8px;
    font-size: 13px;
    line-height: 1.6;
    margin-bottom: 18px;
}

.modal-form-group {
    margin-bottom: 16px;
}

.modal-form-group label {
    display: block;
    font-size: 13px;
    color: #4b5563;
    margin-bottom: 8px;
    font-weight: 500;
}

.modal-form-group .modal-static {
    padding: 10px 12px;
    background: #f9fafb;
    border-radius: 8px;
    font-size: 13px;
    color: #111827;
    min-height: 38px;
}

.modal-captcha-wrap {
    display: flex;
    gap: 8px;
}

.modal-captcha-wrap input {
    flex: 1;
    height: 38px;
    padding: 0 12px;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    font-size: 13px;
    color: #111827;
    background: #f9fafb;
    transition: all 0.2s;
}

.modal-captcha-wrap input:focus {
    border-color: #6a5af9;
    background: #fff;
    box-shadow: 0 0 0 3px rgba(106, 90, 249, 0.1);
}

.modal-captcha-wrap .js-send-code {
    white-space: nowrap;
    height: 38px;
    padding: 0 16px;
    background: #6a5af9;
    color: #fff;
    border: none;
    border-radius: 8px;
    font-size: 13px;
    cursor: pointer;
    transition: background 0.2s;
}

.modal-captcha-wrap .js-send-code:hover { background: #5849c4; }
.modal-captcha-wrap .js-send-code:disabled {
    background: #c4b5fd;
    cursor: not-allowed;
}

.modal-footer {
    padding: 14px 22px;
    border-top: 1px solid #f3f4f6;
    display: flex;
    justify-content: flex-end;
    gap: 10px;
}

.modal-footer .btn {
    padding: 8px 20px;
    border-radius: 8px;
    font-size: 13px;
    cursor: pointer;
    border: none;
    transition: all 0.2s;
    line-height: 1.4;
}

.modal-footer .btn-primary {
    background: #6a5af9;
    color: #fff;
}

.modal-footer .btn-primary:hover { background: #5849c4; }

.modal-footer .btn-default {
    background: #f3f4f6;
    color: #4b5563;
}

.modal-footer .btn-default:hover { background: #e5e7eb; }

/* 到期提示 modal */
.modal-tip .modal-body {
    text-align: center;
    padding: 32px 22px;
}

.modal-tip .text-info {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: #fef3c7;
    color: #d97706;
    font-size: 22px;
    font-weight: 700;
    font-style: italic;
    margin-bottom: 14px;
}

.modal-tip .title {
    font-size: 16px;
    font-weight: 600;
    color: #111827;
    margin-bottom: 6px;
}

.modal-tip .content {
    font-size: 13px;
    color: #6b7280;
    line-height: 1.6;
}

/* ============ 底部版权区 ============ */
.login-footer {
    width: 100%;
    padding: 20px 24px 24px;
    color: rgba(255, 255, 255, 0.85);
    font-size: 12px;
    line-height: 1.8;
    background: transparent;
    margin-top: auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
}

.login-footer-row {
    margin: 2px 0;
    width: 100%;
    text-align: center;
}

.login-footer a {
    color: rgba(255, 255, 255, 0.9);
    transition: color 0.2s;
}

.login-footer a:hover {
    color: #fff;
}

.login-footer b {
    font-weight: 600;
    color: #fff;
}

.login-footer-icp {
    margin-top: 4px;
    display: flex;
    justify-content: center;
    align-items: center;
    flex-wrap: wrap;
    gap: 16px;
    width: 100%;
}

.login-footer-icp .icp-item {
    display: inline-flex;
    align-items: center;
}

.login-footer-icp img {
    width: 14px;
    height: 14px;
    margin-right: 4px;
    opacity: 0.9;
}

.login-footer-icp a {
    display: inline-flex;
    align-items: center;
}

/* ============ 响应式 ============ */
@media (max-width: 768px) {
    .login-header {
        padding: 16px 20px;
    }

    .login-logo .brand-text {
        font-size: 15px;
    }

    .login-main {
        padding: 0 16px 24px;
    }

    .login-card {
        grid-template-columns: 1fr;
        max-width: 420px;
        min-height: auto;
    }

    .login-banner {
        padding: 32px 28px;
    }

    .login-banner-title {
        font-size: 21px;
        margin-bottom: 10px;
    }

    .login-banner-subtitle {
        font-size: 13px;
        margin-bottom: 18px;
    }

    .login-banner-features {
        display: none;
    }

    .login-form-side {
        padding: 32px 24px;
    }

    .login-title {
        font-size: 20px;
    }
}

@media (max-width: 480px) {
    .login-header {
        padding: 14px 16px;
    }

    .login-logo img {
        height: 32px;
    }

    .login-form-side {
        padding: 28px 20px;
    }

    .login-banner {
        padding: 28px 24px;
    }

    .modal-dialog {
        margin: 30px 14px;
    }
}
