/* 登录页 - 参考 system.pecledu.cn 设计语言 */
* { margin: 0; padding: 0; box-sizing: border-box; }

body.login-page {
    font-family: 'Roboto', 'Noto Sans SC', -apple-system, sans-serif;
    background: #f0f2f5;
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    padding: 20px;
}

.login-container {
    width: 90%;
    max-width: 420px;
    background: #fff;
    border-radius: 20px;
    overflow: hidden;
}

.card-header {
    background: transparent;
    color: #1a365d;
    border: none;
    padding: 1.5rem;
    text-align: center;
    font-size: 1.8rem;
    font-weight: 600;
}

.card-header .me-2 { margin-right: 0.5rem; }

.card-body {
    padding: 20px;
}

.input-group {
    position: relative;
    margin-bottom: 20px;
}

.input-group i {
    position: absolute;
    left: 15px;
    top: 50%;
    transform: translateY(-50%);
    color: #666;
    z-index: 1;
    font-size: 1rem;
}

.input-group .form-control {
    width: 100%;
    border: 2px solid #eee;
    padding: 12px 15px 12px 45px;
    border-radius: 10px;
    font-size: 1rem;
    font-family: inherit;
    transition: all 0.3s ease;
}

.input-group .form-control:focus {
    outline: none;
    border-color: #1a365d;
    box-shadow: 0 0 0 0.2rem rgba(26, 54, 93, 0.25);
}

.btn {
    display: inline-block;
    font-weight: 600;
    text-align: center;
    text-decoration: none;
    cursor: pointer;
    border: none;
    font-family: inherit;
}

.btn-primary {
    background: #1a365d;
    color: #fff;
    padding: 12px 20px;
    border-radius: 10px;
    letter-spacing: 0.5px;
    margin-bottom: 0;
}

.btn-primary:hover {
    background: #2c5282;
}

.w-100 { width: 100%; }
.btn .me-2 { margin-right: 0.5rem; }

.notes {
    margin-top: 24px;
    padding-top: 20px;
    border-top: 1px solid #e2e8f0;
}

.notes-title {
    font-size: 0.9rem;
    font-weight: 600;
    color: #4a5568;
    margin-bottom: 12px;
}

.notes-title i {
    color: #1a365d;
    margin-right: 6px;
}

.notes-list {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

.note-item {
    font-size: 0.85rem;
    color: #718096;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.note-item i {
    color: #1a365d;
    font-size: 0.8em;
}

/* Toast */
.toast-container {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 1000;
    pointer-events: none;
}

.toast {
    background: #fff;
    border-radius: 8px;
    padding: 15px 25px;
    margin-bottom: 10px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    display: flex;
    align-items: center;
    gap: 10px;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.toast.show { opacity: 1; }

.toast.error { border-left: 4px solid #dc3545; }

.toast.error i { color: #dc3545; }

.toast.success { border-left: 4px solid #28a745; }

.toast.success i { color: #28a745; }

/* 电脑端 - 无边框、无周围背景 */
@media (min-width: 768px) {
    body.login-page {
        background: #fff;
        padding: 40px;
    }

    .login-container {
        max-width: 460px;
        background: transparent;
        border-radius: 0;
        box-shadow: none;
    }

    .card-header {
        padding: 2rem 2.5rem;
        font-size: 2rem;
    }

    .card-body { padding: 36px 40px; }

    .input-group { margin-bottom: 28px; }

    .input-group .form-control {
        padding: 14px 18px 14px 50px;
    }

    .btn-primary { padding: 14px 24px; }

    .notes {
        margin-top: 32px;
        padding-top: 28px;
    }

    .notes-title {
        font-size: 1rem;
        margin-bottom: 16px;
    }

    .notes-list { gap: 16px; }

    .note-item { font-size: 0.9rem; }
}

/* 响应式 - 手机端 与电脑端一致无边框 */
@media (max-width: 767px) {
    html { overflow: hidden; }

    body.login-page {
        background: #fff;
        padding: 17vh 24px 40px;
        min-height: 100vh;
        min-height: 100dvh;
        overflow: hidden;
        align-items: flex-start;
    }
    @supports (height: 100dvh) {
        body.login-page { padding: 17dvh 24px 40px; }
    }

    .login-container {
        width: 100%;
        max-width: 460px;
        margin: 0 auto;
        max-height: calc(100vh - 17vh - 40px);
        max-height: calc(100dvh - 17dvh - 40px);
        display: flex;
        flex-direction: column;
        overflow: hidden;
        background: transparent;
        border: none;
        border-radius: 0;
        box-shadow: none;
    }

    .login-container .card-body {
        overflow-y: auto;
        -webkit-overflow-scrolling: touch;
        overscroll-behavior: contain;
    }

    .card-header {
        font-size: 1.75rem;
        padding: 1.4rem 1.2rem;
    }

    .card-body { padding: 28px 24px; }

    .input-group { margin-bottom: 24px; }

    .input-group i {
        left: 18px;
        font-size: 1.1rem;
    }

    .input-group .form-control {
        padding: 16px 18px 16px 50px;
        font-size: 16px; /* 16px 避免 iOS 点击输入框自动放大 */
    }

    .btn-primary {
        padding: 16px 24px;
        font-size: 1.05rem;
    }

    .notes {
        margin-top: 28px;
        padding-top: 24px;
    }

    .notes-title {
        font-size: 1rem;
        margin-bottom: 14px;
    }

    .notes-list { gap: 14px; }

    .note-item { font-size: 0.95rem; }
}

/* 小屏手机 - 往上一点，左右留白适配 */
@media (max-width: 400px) {
    body.login-page {
        padding-top: 12vh;
        padding-bottom: 40px;
        padding-left: 20px;
        padding-right: 20px;
    }
    body.login-page.wx-miniprogram {
        padding-top: 7vh;
        padding-top: 7dvh;
    }
    .login-container {
        max-height: calc(100vh - 12vh - 40px);
        max-height: calc(100dvh - 12dvh - 40px);
    }
    @supports (height: 100dvh) {
        body.login-page { padding-top: 12dvh; }
    }
}

/* 苹果 Pro 尺寸 (约 393–450px) - 往上一点 */
@media (min-width: 401px) and (max-width: 450px) {
    body.login-page {
        padding: 14vh 24px 40px;
    }
    @supports (height: 100dvh) {
        body.login-page { padding: 14dvh 24px 40px; }
    }
    body.login-page.wx-miniprogram {
        padding-top: 12vh;
        padding-top: 12dvh;
    }
}

/* 微信小程序 webview - 手机端登录内容 */
@media (max-width: 767px) {
    body.login-page.wx-miniprogram {
        padding-top: 15vh;
        padding-top: 15dvh;
    }
}

.login-site-footer {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    padding: 14px 16px 18px;
    text-align: center;
    background: transparent;
}
.login-site-footer-line {
    margin: 0;
    font-size: 12px;
    line-height: 1.6;
    color: #718096;
}
.login-site-footer-line + .login-site-footer-line { margin-top: 4px; }
.login-site-footer-beian {
    color: #4a5568;
    text-decoration: none;
}
.login-site-footer-beian:hover { color: #1a365d; text-decoration: underline; }
