/* ── 内页样式（成绩查询 / 管理后台）────────────────────────────────── */
/* 登录页样式由 login.html 内联 style 块控制，与此文件无关 */

body.inner-page {
    width: auto;
    height: auto;
    overflow: auto;
    margin: 0;
    background-repeat: no-repeat;
    background-color: rgba(240,240,240,.5);
    font-family: "Verdana","Tahoma","微软雅黑";
    font-size: 12px;
}

/* ── 顶部导航栏 ────────────────────────────────────────────────────── */

.top-bar {
    background: #1766CC;
    height: 62px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 80px;
    color: #fff;
    font-size: 14px;
}

.top-bar .top-title { font-size: 16px; font-weight: 700; letter-spacing: 1px; }
.top-bar .top-welcome { color: rgba(255,255,255,0.85); margin-right: 8px; }
.top-bar .top-right { display: flex; align-items: center; gap: 16px; }

.top-bar .fake-btn {
    display: flex;
    align-items: center;
    gap: 5px;
    color: #fff;
    text-decoration: none;
    font-size: 12px;
    cursor: pointer;
    padding: 4px 8px;
    border-radius: 4px;
}
.top-bar .fake-btn:hover { background: rgba(255,255,255,0.15); }

/* ── 容器 + 卡片 ──────────────────────────────────────────────────── */

.container {
    max-width: 960px;
    margin: 12px auto 40px;
    padding: 0 16px;
}

.card {
    background: #fff;
    padding: 16px;
    margin-bottom: 14px;
}
.card h2 { font-size: 14px; margin-bottom: 10px; }

/* ── 数据表格 ──────────────────────────────────────────────────────── */

.data-table {
    border-collapse: collapse;
    border-spacing: 0;
    line-height: 20px;
    width: 100%;
}

.data-table th,
.data-table td {
    border: 1px solid #ddd;
    padding: 4px 6px;
    text-align: center;
    font-size: 12px;
}

.data-table thead { background-color: #e0e0e0; line-height: 28px; }
.data-table thead th { border: 1px solid #d0d0d0; vertical-align: middle; text-align: center; }
.data-table tbody tr:hover { background-color: #fff0c7; }

/* ── 操作按钮 ──────────────────────────────────────────────────────── */

.btn {
    color: #000;
    font-size: 12px;
    vertical-align: middle;
    line-height: 18px;
    margin: 1px;
    padding: 2px 10px;
    letter-spacing: 2px;
    display: inline-block;
    border: 1px solid #808080;
    border-radius: 5px;
    background: #fff;
    cursor: pointer;
    text-decoration: none;
}
.btn:hover { background: #d3d3d3; }
.btn-primary { background: #1766CC; color: #fff; border-color: #1766CC; }
.btn-primary:hover { background: #2070d8; color: #fff; }
.btn-sm { padding: 1px 8px; font-size: 12px; letter-spacing: 0; }

/* ── 成绩页信息区 ──────────────────────────────────────────────────── */

.info-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px 0;
    margin-bottom: 16px;
}

.info-item { display: flex; align-items: center; }

.info-item label {
    width: 85px;
    text-align: right;
    padding-right: 10px;
    color: #333;
    font-size: 12px;
    flex-shrink: 0;
}

.info-item .field {
    flex: 1;
    border: 1px solid #d3d3d3;
    background: #fbfeff;
    padding: 4px 10px;
    min-height: 28px;
    border-radius: 2px;
    font-size: 12px;
}

.info-item.total label { color: #1766CC; font-weight: bolder; }
.info-item.total .field {
    font-weight: bolder;
    font-size: 16px;
    color: #1766CC;
    border-color: #1766CC;
    background: #f0f5ff;
}

/* ── 成绩表格 ──────────────────────────────────────────────────────── */

.table-wrapper {
    position: relative;
    background: #fff;
    padding: 16px;
}

.score-table {
    width: 100%;
    border-collapse: collapse;
    border-spacing: 0;
    line-height: 22px;
}

.score-table th,
.score-table td {
    border: 1px solid #ddd;
    padding: 6px 10px;
    text-align: center;
    font-size: 12px;
}

.score-table thead { background-color: #e0e0e0; line-height: 28px; }
.score-table thead th { border: 1px solid #d0d0d0; vertical-align: middle; text-align: center; }
.score-table tbody tr:hover { background-color: #fff0c7; }

.anti-fake { position: absolute; right: 20px; top: 6px; font-size: 10px; color: #ccc; letter-spacing: 2px; }
.qr-placeholder {
    position: absolute; right: 18px; top: 30px;
    width: 70px; height: 70px;
    background: #fafafa; border: 1px dashed #d0d0d0;
    display: flex; align-items: center; justify-content: center;
    font-size: 10px; color: #bbb;
}

/* ── 打印按钮 ──────────────────────────────────────────────────────── */

.action-bar { text-align: center; margin-top: 16px; }

.btn-print {
    color: #fff;
    font-size: 12px;
    padding: 6px 24px;
    letter-spacing: 2px;
    background: #1766CC;
    border: 1px solid #1766CC;
    border-radius: 5px;
    cursor: pointer;
}
.btn-print:hover { background: #2070d8; }

/* ── 弹窗 ──────────────────────────────────────────────────────────── */

.modal {
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    z-index: 200;
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-overlay {
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(0,0,0,0.4);
}

.modal-content {
    position: relative;
    background: #fff;
    border-radius: 6px;
    max-width: 700px;
    width: 90%;
    max-height: 85vh;
    overflow-y: auto;
    padding: 20px;
    box-shadow: 0 20px 60px rgba(0,0,0,0.2);
}

.modal-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 14px; }
.modal-close { background: none; border: none; font-size: 22px; cursor: pointer; color: #999; }
.modal-close:hover { color: #333; }

/* ── 加载动画 ──────────────────────────────────────────────────────── */

@keyframes spin { to { transform: rotate(360deg); } }
.spinner {
    width: 22px; height: 22px;
    border: 2px solid #e0e0e0;
    border-top-color: #1766CC;
    border-radius: 50%;
    animation: spin 0.6s linear infinite;
    margin: 16px auto;
}

/* ========================================================================
   打印 / 响应式
   ======================================================================== */

@media print {
    body { background: #fff; }
    body::after { display: none; }
    .top-bar, .action-bar { display: none; }
    .container { margin: 0; max-width: none; padding: 0; }
    .info-grid, .table-wrapper { box-shadow: none; border: 1px solid #ddd; }
}

/* ========================================================================
   平板适配
   ======================================================================== */

@media (max-width: 900px) {
    /* 登录页 */
    #divBack { overflow-y: auto; }
    #lblProduct { font-size: 20px; margin-left: 40px; margin-top: 16px; }
    #divBack #divRadio { float: none; padding: 0; margin: 8px 0 0 40px; }
    #divRadio label { font-size: 14px; margin-right: 8px; padding: 0 8px; }
    #divLogin {
        width: 90% !important; left: 50% !important; transform: translateX(-50%) !important;
        margin-left: 0 !important; margin-top: 0 !important;
        top: auto !important; position: relative !important; float: none !important;
        height: auto !important; padding-bottom: 20px; margin-bottom: 20px;
    }
    .info { width: 90% !important; left: 5% !important; position: relative !important;
           top: auto !important; margin-bottom: 12px; height: auto !important; max-height: 180px; }
    #divLogin input[type="text"], #divLogin input[type="password"],
    #divLogin input[type="button"] { width: 260px; }
    .icon { margin-left: -134px; }
    .eye { margin-left: 105px; }
    #divCopyRight { position: relative; right: auto; bottom: auto; text-align: center; padding: 12px 0; }

    /* 导航栏 */
    .top-bar { height: auto; padding: 10px 16px; flex-wrap: wrap; gap: 6px; }
    .top-bar .top-right { flex-wrap: wrap; gap: 8px; }

    /* 内容区 */
    .container { padding: 0 10px; }
    .score-wrap { max-width: 100%; }
}

/* ========================================================================
   手机适配
   ======================================================================== */

@media (max-width: 600px) {
    /* 登录页 */
    body { overflow-y: auto; }
    #lblProduct { font-size: 18px; margin-left: 16px; }
    #divBack #divRadio { margin-left: 16px; }
    #divRadio label { font-size: 13px; padding: 0 6px; line-height: 26px; }
    #divLogin {
        width: 96% !important; padding: 24px 16px;
    }
    #divLogin input[type="text"], #divLogin input[type="password"],
    #divLogin input[type="button"] { width: 220px; }
    #divLogin1 { font-size: 14px; margin-top: 20px; }
    .icon { margin-left: -114px; }
    .eye { margin-left: 90px; }
    .info { width: 96% !important; left: 2% !important; font-size: 11px; max-height: 140px; }

    /* 导航栏 */
    .top-bar { padding: 8px 10px; }
    .top-bar .top-title { font-size: 14px; }

    /* 成绩页信息表 */
    .info-table td, .info-table .lbl { font-size: 12px; padding: 6px 8px !important; }
    .info-table .lbl { width: 60px; }
    .info-table .total-val { font-size: 15px; }

    /* 成绩表格可横滑 */
    .score-table { min-width: 480px; }
    .score-wrap { overflow-x: auto; }

    /* 管理后台 */
    .data-table { min-width: 500px; }
    .card { overflow-x: auto; }
    .toolbar { flex-direction: column; gap: 8px; align-items: flex-start; }
    .modal-content { width: 96%; max-height: 90vh; padding: 14px; }
    .form-row { flex-direction: column; gap: 4px; }
    .form-row label { width: auto; text-align: left; }
    .score-grid { grid-template-columns: 1fr; }

    /* 按钮 */
    .action-bar .BTN { width: 100% !important; padding: 8px !important; }
}
