/* account.css - 账号弹窗（欢迎 / 登录 / 注册 / 忘记密码） */

.xd-acct-mask {
    position: fixed;
    inset: 0;
    background: rgba(15, 20, 40, 0.45);
    z-index: 2147483647;
    display: none;
    align-items: center;
    justify-content: center;
    font-family: "Microsoft YaHei", "PingFang SC", sans-serif;
}
.xd-acct-mask.open { display: flex; }

.xd-acct-card {
    width: 340px;
    max-width: calc(100vw - 32px);
    background: #fff;
    border-radius: 16px;
    box-shadow: 0 12px 48px rgba(0, 0, 0, 0.22);
    padding: 26px 26px 22px;
    box-sizing: border-box;
    position: relative;
    animation: xdAcctIn 0.22s ease-out;
}
@keyframes xdAcctIn {
    from { opacity: 0; transform: translateY(14px) scale(0.97); }
    to   { opacity: 1; transform: translateY(0) scale(1); }
}

.xd-acct-close {
    position: absolute;
    top: 12px; right: 14px;
    background: none; border: none;
    color: #b6bccb;
    font-size: 22px;
    line-height: 1;
    cursor: pointer;
    padding: 2px 6px;
}
.xd-acct-close:hover { color: #5a6172; }

.xd-acct-back {
    position: absolute;
    top: 16px; left: 20px;
    font-size: 13px;
    color: #667eea;
    cursor: pointer;
    display: none;
    background: none; border: none;
    padding: 0;
    font-family: inherit;
}
.xd-acct-back:hover { text-decoration: underline; }

.xd-acct-title {
    font-size: 18px;
    font-weight: bold;
    color: #2c3150;
    margin: 0;
}
.xd-acct-sub {
    font-size: 12.5px;
    color: #7a8296;
    margin-top: 6px;
    line-height: 1.6;
}

.xd-acct-btns {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-top: 20px;
}
.xd-acct-btn {
    border: none;
    border-radius: 10px;
    padding: 11px 0;
    font-size: 14px;
    cursor: pointer;
    font-family: inherit;
    transition: opacity 0.15s, background 0.15s;
}
.xd-acct-btn.primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #fff;
}
.xd-acct-btn.primary:hover { opacity: 0.92; }
.xd-acct-btn.ghost { background: #f0f2f8; color: #5a6172; }
.xd-acct-btn.ghost:hover { background: #e8ebf5; }
.xd-acct-btn:disabled { opacity: 0.5; cursor: not-allowed; }

.xd-acct-field { margin-top: 12px; }
.xd-acct-field label {
    display: block;
    font-size: 12px;
    color: #7a8296;
    margin-bottom: 4px;
}
.xd-acct-field input {
    width: 100%;
    box-sizing: border-box;
    border: 1px solid #d9deeb;
    border-radius: 8px;
    padding: 9px 12px;
    font-size: 14px;
    outline: none;
    font-family: inherit;
    transition: border-color 0.15s;
}
.xd-acct-field input:focus { border-color: #667eea; }

.xd-acct-links {
    margin-top: 14px;
    font-size: 12px;
    color: #98a0b0;
    display: flex;
    gap: 16px;
}
.xd-acct-links a {
    color: #667eea;
    cursor: pointer;
    text-decoration: none;
}
.xd-acct-links a:hover { text-decoration: underline; }

.xd-acct-msg {
    display: none;
    margin-top: 10px;
    font-size: 12.5px;
    line-height: 1.5;
    border-radius: 8px;
    padding: 8px 10px;
}
.xd-acct-msg.err { display: block; background: #fdeeee; color: #b0453f; }
.xd-acct-msg.ok  { display: block; background: #eaf6ef; color: #2c7a4b; }

.xd-acct-foot {
    margin-top: 16px;
    font-size: 11.5px;
    color: #b0b6c4;
    text-align: center;
}

/* ── 门户常驻登录入口（右上角）── */
.xd-acct-entry {
    position: fixed;
    top: 16px;
    right: 18px;
    z-index: 2147482000;
    border: 1px solid rgba(102, 126, 234, 0.35);
    background: rgba(255, 255, 255, 0.94);
    color: #4c53a8;
    font-size: 12.5px;
    font-family: "Microsoft YaHei", "PingFang SC", sans-serif;
    padding: 6px 14px;
    border-radius: 999px;
    cursor: pointer;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.10);
    transition: background 0.15s, transform 0.15s;
}
.xd-acct-entry:hover { background: #fff; transform: translateY(-1px); }
.xd-acct-entry[data-state="in"] {
    border-color: rgba(15, 110, 86, 0.35);
    color: #0f6e56;
}
@media (max-width: 640px) {
    .xd-acct-entry { top: 10px; right: 12px; font-size: 12px; padding: 5px 12px; }
}

/* ── 学情面板（查看我的学情）── */
.xd-acct-profile {
    max-height: 56vh;
    overflow-y: auto;
    margin-top: 14px;
    padding-right: 2px;
}
.xd-acct-loading, .xd-acct-empty {
    font-size: 13px;
    color: #8a91a3;
    padding: 18px 4px;
    text-align: center;
    line-height: 1.6;
}
.xd-acct-summary {
    background: #f5f7fb;
    border-radius: 10px;
    padding: 10px 12px;
    font-size: 12.5px;
    color: #4a5168;
    line-height: 1.65;
}
.xd-acct-stats {
    display: flex;
    gap: 8px;
    margin: 14px 0;
}
.xd-acct-stat {
    flex: 1;
    min-width: 0;
    background: #f5f7fb;
    border-radius: 10px;
    padding: 9px 4px;
    text-align: center;
}
.xd-acct-stat b {
    display: block;
    font-size: 18px;
    color: #2c3150;
    line-height: 1.2;
}
.xd-acct-stat span {
    font-size: 11px;
    color: #8a91a3;
}
.xd-acct-sec {
    font-size: 13px;
    font-weight: bold;
    color: #2c3150;
    margin: 12px 0 6px;
}
.xd-acct-row {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 7px 0;
    border-bottom: 1px dashed #eef0f5;
}
.xd-acct-row:last-child { border-bottom: none; }
.xd-acct-kp {
    flex: 1;
    min-width: 0;
    font-size: 13px;
    color: #3a4055;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.xd-acct-lv {
    font-size: 11px;
    padding: 1px 7px;
    border-radius: 999px;
    flex-shrink: 0;
}
.xd-acct-bar {
    width: 84px;
    height: 6px;
    background: #eef0f5;
    border-radius: 999px;
    overflow: hidden;
    flex-shrink: 0;
}
.xd-acct-bar i { display: block; height: 100%; border-radius: 999px; }
.xd-acct-pct {
    font-size: 12px;
    color: #8a91a3;
    width: 34px;
    text-align: right;
    flex-shrink: 0;
}
.xd-acct-due {
    font-size: 12px;
    color: #8a91a3;
    flex-shrink: 0;
}
