/* ============================================================
   傻逼A+ · 年级成绩汇总（弹窗样式）
   与 Faint Studio 其它弹窗保持同一套暗色玻璃风格
   ============================================================ */

/* ---------- 纯前端标识（替代原来的「启动服务」按钮） ---------- */
.ap-local-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 7px 12px;
    border-radius: 999px;
    font-size: 12px;
    letter-spacing: 0.3px;
    color: rgba(126, 227, 223, 0.95);
    background: rgba(0, 206, 201, 0.1);
    border: 1px solid rgba(0, 206, 201, 0.28);
    white-space: nowrap;
    cursor: default;
}

/* ---------- 来源切换（A+ / 五岳） ---------- */
.ap-mode-switch {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    margin-bottom: 16px;
}

.ap-mode-btn {
    display: flex;
    flex-direction: column;
    gap: 4px;
    padding: 12px 14px;
    text-align: left;
    border-radius: 10px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    background: rgba(255, 255, 255, 0.03);
    color: rgba(255, 255, 255, 0.7);
    cursor: pointer;
    transition: all 0.22s ease;
    font-family: inherit;
}

.ap-mode-btn:hover {
    border-color: rgba(79, 138, 255, 0.45);
    background: rgba(79, 138, 255, 0.07);
}

.ap-mode-btn.active {
    border-color: #4f8aff;
    background: rgba(79, 138, 255, 0.15);
    box-shadow: 0 4px 16px rgba(79, 138, 255, 0.18);
}

.ap-mode-name {
    font-size: 14px;
    font-weight: 600;
    color: #fff;
}

.ap-mode-desc {
    font-size: 11.5px;
    color: rgba(255, 255, 255, 0.45);
}

.ap-mode-btn.active .ap-mode-desc {
    color: rgba(169, 196, 255, 0.85);
}

#apSourceSection {
    margin-bottom: 16px;
}

/* ---------- 顶部说明 ---------- */
.ap-hero {
    display: flex;
    gap: 14px;
    align-items: flex-start;
    padding: 18px 20px;
    border-radius: 12px;
    background: linear-gradient(135deg, rgba(79, 138, 255, 0.12), rgba(108, 92, 231, 0.12));
    border: 1px solid rgba(79, 138, 255, 0.22);
}

.ap-hero-icon {
    font-size: 30px;
    line-height: 1;
}

.ap-hero h3 {
    margin: 0;
    font-size: 16px;
    font-weight: 600;
    color: #84a9ff;
    letter-spacing: 0.5px;
}

.ap-hero p {
    margin: 6px 0 0;
    font-size: 12.5px;
    color: rgba(255, 255, 255, 0.55);
    line-height: 1.7;
}

/* ---------- 上传区 ---------- */
.ap-grid {
    display: grid;
    grid-template-columns: 1.35fr 1fr;
    gap: 14px;
}

@media (max-width: 820px) {
    .ap-grid {
        grid-template-columns: 1fr;
    }
}

.ap-drop {
    position: relative;
    padding: 22px 18px;
    border: 2px dashed rgba(255, 255, 255, 0.16);
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.03);
    text-align: center;
    cursor: pointer;
    transition: all 0.25s ease;
}

.ap-drop:hover {
    border-color: rgba(79, 138, 255, 0.55);
    background: rgba(79, 138, 255, 0.07);
}

.ap-drop.dragover {
    border-color: #4f8aff;
    background: rgba(79, 138, 255, 0.13);
}

.ap-drop.filled {
    border-style: solid;
    border-color: rgba(0, 206, 201, 0.45);
    background: rgba(0, 206, 201, 0.07);
}

.ap-drop-icon {
    font-size: 26px;
    margin-bottom: 8px;
}

.ap-drop-text {
    font-size: 13.5px;
    color: rgba(255, 255, 255, 0.85);
    margin-bottom: 6px;
}

.ap-drop-hint {
    font-size: 12px;
    color: rgba(255, 255, 255, 0.42);
}

.ap-drop-hint a {
    color: #4f8aff;
    text-decoration: none;
    border-bottom: 1px dashed rgba(79, 138, 255, 0.5);
}

.ap-hint {
    margin-top: 8px;
    font-size: 12px;
    color: rgba(255, 255, 255, 0.4);
}

.ap-hint.ok {
    color: #00cec9;
}

/* ---------- 选项区 ---------- */
.ap-options {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 16px;
    padding: 14px 16px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 10px;
}

.ap-options label {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    color: rgba(255, 255, 255, 0.72);
    cursor: pointer;
}

.ap-options input[type="checkbox"] {
    width: 15px;
    height: 15px;
    accent-color: #4f8aff;
    cursor: pointer;
}

.ap-options input[type="checkbox"]:disabled+span {
    opacity: 0.5;
}

.ap-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 10px 20px;
    border: none;
    border-radius: 8px;
    font-size: 13.5px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    white-space: nowrap;
}

.ap-btn:disabled {
    opacity: 0.55;
    cursor: not-allowed;
}

.ap-btn-primary {
    margin-left: auto;
    color: #fff;
    background: linear-gradient(135deg, #4f8aff, #6c5ce7);
    box-shadow: 0 6px 18px rgba(79, 138, 255, 0.28);
}

.ap-btn-primary:hover:not(:disabled) {
    transform: translateY(-1px);
    box-shadow: 0 8px 22px rgba(79, 138, 255, 0.4);
}

.ap-btn-ghost {
    color: rgba(255, 255, 255, 0.8);
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.14);
}

.ap-btn-ghost:hover:not(:disabled) {
    background: rgba(255, 255, 255, 0.14);
}

/* ---------- 状态提示 ---------- */
.ap-status {
    padding: 12px 14px;
    border-radius: 10px;
    font-size: 13px;
    line-height: 1.6;
    background: rgba(79, 138, 255, 0.12);
    border: 1px solid rgba(79, 138, 255, 0.28);
    color: #a9c4ff;
}

.ap-status.ok {
    background: rgba(0, 206, 201, 0.1);
    border-color: rgba(0, 206, 201, 0.3);
    color: #7ee3df;
}

.ap-status.err {
    background: rgba(255, 100, 100, 0.1);
    border-color: rgba(255, 100, 100, 0.3);
    color: #ff9b9b;
}

/* ---------- 结果卡片 ---------- */
.ap-card {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 14px 16px;
    margin-top: 10px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.09);
    border-radius: 10px;
}

.ap-card-main {
    flex: 1;
    min-width: 0;
}

.ap-card-title {
    font-size: 14px;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.9);
    margin-bottom: 6px;
}

.ap-card-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 14px;
    font-size: 12.5px;
    color: rgba(255, 255, 255, 0.5);
}

.ap-card-meta .ap-ok {
    color: #00cec9;
}

.ap-warn {
    margin-top: 8px;
    font-size: 12px;
    color: #ffbe76;
    line-height: 1.6;
}

/* ---------- 预览表 ---------- */
.ap-preview-title {
    font-size: 13px;
    color: rgba(255, 255, 255, 0.6);
    margin: 16px 0 10px;
}

.ap-table-wrap {
    overflow: auto;
    max-height: 320px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 10px;
}

.ap-table {
    border-collapse: collapse;
    font-size: 12px;
    white-space: nowrap;
    min-width: 100%;
}

.ap-table th,
.ap-table td {
    padding: 6px 10px;
    text-align: center;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
    color: rgba(255, 255, 255, 0.78);
}

.ap-table thead th {
    position: sticky;
    top: 0;
    background: rgba(30, 34, 48, 0.98);
    color: #a9c4ff;
    font-weight: 600;
}

.ap-table thead .ap-sub {
    top: 29px;
    font-weight: 400;
    color: rgba(255, 255, 255, 0.5);
    font-size: 11px;
}

.ap-table tbody tr:hover td {
    background: rgba(79, 138, 255, 0.08);
}
