/* ===== 基础重置 ===== */
* { margin: 0; padding: 0; box-sizing: border-box; }
body { font-family: -apple-system, "Microsoft YaHei", "PingFang SC", sans-serif; background: #eef2f9; color: #2c3e50; }
a { color: #2b6cb0; text-decoration: none; }
a:hover { text-decoration: underline; }

/* ===== 顶栏 ===== */
.topbar {
    display: flex; justify-content: space-between; align-items: center;
    padding: 12px 24px; background: linear-gradient(135deg, #1a56db, #2b6cb0); color: #fff;
    box-shadow: 0 2px 8px rgba(26,86,219,.3);
    position: sticky; top: 0; z-index: 100;
}
.topbar span { font-size: 14px; color: #e0eaff; }
.topbar a { color: #bee3f8; font-size: 14px; }
.topbar a:hover { color: #fff; text-decoration: none; }

/* ===== 登录 ===== */
.login-body {
    display: flex; justify-content: center; align-items: center; min-height: 100vh;
    background: linear-gradient(160deg, #1a56db 0%, #2b6cb0 40%, #eef2f9 100%);
}
.login-box {
    background: #fff; padding: 48px 40px; border-radius: 16px;
    box-shadow: 0 12px 40px rgba(26,86,219,.18); width: 380px; text-align: center;
}
.login-box h2 { margin-bottom: 28px; font-size: 20px; font-weight: 700; color: #1a56db; }
.login-box input {
    width: 100%; padding: 12px 14px; margin-bottom: 16px;
    border: 1.5px solid #cbd5e1; border-radius: 8px; font-size: 14px; outline: none;
    transition: border .2s, box-shadow .2s;
}
.login-box input:focus { border-color: #1a56db; box-shadow: 0 0 0 3px rgba(26,86,219,.12); }
.login-box button {
    width: 100%; padding: 12px; background: linear-gradient(135deg, #1a56db, #2b6cb0);
    color: #fff; border: none; border-radius: 8px; font-size: 15px; cursor: pointer;
    transition: opacity .2s;
}
.login-box button:hover { opacity: .9; }
.err { color: #dc2626; font-size: 13px; margin-bottom: 12px; }
.ok-msg { color: #16a34a; font-size: 14px; margin-bottom: 12px; padding: 8px 16px; background: #ecfdf5; border-radius: 6px; }

/* ===== 容器 ===== */
.container { max-width: 1100px; margin: 24px auto; padding: 0 20px; }
.container h2 { margin: 24px 0 12px; font-size: 18px; color: #1a56db; font-weight: 700; }

/* ===== 表格 ===== */
table {
    width: 100%; border-collapse: collapse; background: #fff;
    border-radius: 10px; overflow: hidden;
    box-shadow: 0 2px 12px rgba(26,86,219,.06); margin-bottom: 28px;
}
th, td { padding: 12px 16px; text-align: center; font-size: 14px; }
th { background: #dbeafe; color: #1e40af; font-weight: 600; }
tr:not(:last-child) td { border-bottom: 1px solid #eef2f9; }
tr:hover td { background: #f0f6ff; }
.scored { color: #16a34a; font-weight: 600; }
.unscored { color: #94a3b8; }
.num-input { width: 80px; padding: 6px 8px; border: 1.5px solid #cbd5e1; border-radius: 6px; text-align: center; font-size: 14px; }
.num-input:focus { border-color: #1a56db; outline: none; box-shadow: 0 0 0 2px rgba(26,86,219,.1); }

.btn-sm {
    display: inline-block; padding: 6px 18px; background: #1a56db; color: #fff;
    border: none; border-radius: 6px; font-size: 13px; cursor: pointer;
    transition: background .2s;
}
.btn-sm:hover { background: #1e40af; text-decoration: none; }

/* ===== 评阅区域 ===== */
.review-area {
    max-width: 1200px; margin: 20px auto; padding: 0 20px;
    display: flex; flex-direction: column; align-items: center;
}

.tab-bar { display: flex; gap: 0; margin-bottom: 16px; }
.tab {
    padding: 10px 32px; border: 1.5px solid #1a56db; background: #fff;
    color: #1a56db; font-size: 14px; cursor: pointer; transition: all .2s;
    font-weight: 500;
}
.tab:first-child { border-radius: 8px 0 0 8px; }
.tab:last-child { border-radius: 0 8px 8px 0; }
.tab.active { background: #1a56db; color: #fff; }
.tab:hover:not(.active) { background: #dbeafe; }

.img-wrap {
    width: 100%; max-height: calc(100vh - 180px); overflow: auto;
    background: #fff; border-radius: 10px;
    box-shadow: 0 4px 20px rgba(26,86,219,.08);
    display: flex; justify-content: center; padding: 12px;
}
.img-wrap img {
    max-width: 100%; height: auto; cursor: zoom-in;
    border-radius: 4px;
}

/* ===== 打分浮窗 ===== */
.score-panel {
    position: fixed; right: 24px; top: 50%; transform: translateY(-50%);
    background: #fff; border-radius: 14px; padding: 20px 22px;
    box-shadow: 0 8px 32px rgba(26,86,219,.16);
    border: 1.5px solid #bfdbfe; z-index: 200; min-width: 180px;
}
.sp-title { font-size: 15px; font-weight: 700; color: #1a56db; margin-bottom: 8px; text-align: center; }
.sp-info { font-size: 13px; color: #64748b; text-align: center; margin-bottom: 14px; }
.sp-row { display: flex; gap: 8px; margin-bottom: 12px; }
.sp-row input {
    flex: 1; width: 80px; padding: 10px 10px; border: 1.5px solid #cbd5e1;
    border-radius: 8px; font-size: 16px; text-align: center; outline: none;
    transition: border .2s, box-shadow .2s;
}
.sp-row input:focus { border-color: #1a56db; box-shadow: 0 0 0 3px rgba(26,86,219,.12); }
.sp-row button {
    padding: 10px 16px; background: linear-gradient(135deg, #1a56db, #2b6cb0);
    color: #fff; border: none; border-radius: 8px; font-size: 14px;
    cursor: pointer; white-space: nowrap; transition: opacity .2s;
}
.sp-row button:hover { opacity: .88; }
.sp-nav { display: flex; gap: 8px; }
.sp-nav button {
    flex: 1; padding: 9px 0; background: #eef2f9; color: #1a56db;
    border: 1.5px solid #bfdbfe; border-radius: 8px; font-size: 13px;
    cursor: pointer; font-weight: 500; transition: all .2s;
}
.sp-nav button:hover:not(:disabled) { background: #dbeafe; }
.sp-nav button:disabled { opacity: .4; cursor: not-allowed; }
.sp-msg { font-size: 12px; text-align: center; margin-top: 10px; min-height: 18px; }
.sp-msg.ok { color: #16a34a; }
.sp-msg.err { color: #dc2626; }

/* ===== 图片弹窗 ===== */
.modal {
    position: fixed; inset: 0; background: rgba(15,23,42,.75);
    z-index: 1000; display: flex; flex-direction: column;
    align-items: center; justify-content: center;
}
.modal-toolbar {
    display: flex; gap: 10px; padding: 12px 0; z-index: 1001;
}
.modal-toolbar button,
.modal-toolbar a {
    padding: 8px 18px; background: rgba(255,255,255,.95); color: #1a56db;
    border: none; border-radius: 8px; font-size: 14px; cursor: pointer;
    font-weight: 500; text-decoration: none; transition: background .2s;
}
.modal-toolbar button:hover,
.modal-toolbar a:hover { background: #dbeafe; }
.modal-body {
    flex: 1; overflow: auto; display: flex; align-items: center;
    justify-content: center; width: 100%; padding: 10px;
}
.modal-body img {
    max-width: 95vw; max-height: 85vh; transition: transform .15s ease;
    user-select: none; -webkit-user-drag: none;
}

/* ===== 响应式 ===== */
@media (max-width: 900px) {
    .score-panel {
        position: fixed; right: 10px; left: 10px; top: auto; bottom: 10px;
        transform: none; display: flex; flex-wrap: wrap; gap: 8px;
        align-items: center; justify-content: center; min-width: auto;
        padding: 14px 16px; border-radius: 12px;
    }
    .sp-title { display: none; }
    .sp-info { margin: 0 8px 0 0; font-size: 13px; }
    .sp-row { margin-bottom: 0; }
    .sp-nav { margin: 0; }
    .sp-msg { width: 100%; margin-top: 4px; }
    .img-wrap { max-height: calc(100vh - 220px); }
}

@media (max-width: 600px) {
    .topbar { padding: 10px 14px; font-size: 13px; flex-wrap: wrap; gap: 6px; }
    .container { padding: 0 12px; }
    th, td { padding: 8px 6px; font-size: 12px; }
    .tab { padding: 8px 20px; font-size: 13px; }
    .login-box { width: 92vw; padding: 36px 24px; }
}