/* =========================================================
   基础与设计规范（统一全站）
   ========================================================= */
:root{
    --bg:#f8f9fa;
    --card:#ffffff;
    --text:#212529;
    --muted:#6c757d;
    --line:#dee2e6;
    --line-soft:#e9ecef;

    --brand:#007bff;
    --brand-600:#0069d9;
    --success:#28a745;
    --success-600:#218838;
    --danger:#dc3545;
    --danger-600:#c82333;

    --radius:8px;
    --shadow:0 2px 10px rgba(0,0,0,0.075);
    --shadow-lg:0 4px 15px rgba(0,0,0,0.10);
}

*,
*::before,
*::after{ box-sizing: border-box; }

html,body{ height:100%; }

body{
    font-family:-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,"Helvetica Neue",Arial,sans-serif;
    background-color:var(--bg);
    color:var(--text);
    margin:0;
    padding:20px;
}

/* 容器 */
.container{
    max-width:960px;
    margin:auto;
    background-color:var(--card);
    padding:30px;
    border-radius:var(--radius);
    box-shadow:var(--shadow);
}

/* 标题与头部 */
h1{ color:var(--brand); margin:0; }

.header{
    display:flex;
    justify-content:space-between;
    align-items:center;
    border-bottom:2px solid var(--line);
    padding-bottom:15px;
    margin-bottom:24px;
}

.subheader{
    display:flex;
    justify-content:space-between;
    align-items:center;
    border-bottom:1px dashed var(--line);
    padding-bottom:10px;
    margin-bottom:20px;
}

.breadcrumb{ font-size:0.95rem; color:var(--muted); }
.crumb{ color:var(--muted); }
.crumb-name{ font-weight:600; color:#343a40; }

/* 头部右侧链接 */
.user-nav a{
    color:var(--brand);
    text-decoration:none;
    margin-left:15px;
}
.user-nav a:hover{ text-decoration:underline; }
.user-nav span{ color:var(--muted); }

/* =========================================================
   科目网格 & 卡片
   ========================================================= */
.subject-grid{
    display:grid;
    grid-template-columns:repeat(auto-fill, minmax(250px,1fr));
    gap:20px;
}

.subject-card{
    border:1px solid var(--line-soft);
    border-radius:6px;
    padding:20px;
    text-align:center;
    transition:transform .2s, box-shadow .2s;
    display:flex;
    flex-direction:column;
    justify-content:space-between;
    background:#fff;
}
.subject-card:hover{ transform:translateY(-5px); box-shadow:var(--shadow-lg); }

.subject-card a{ text-decoration:none; color:inherit; }

.subject-name{
    font-size:1.5em;
    font-weight:600;
    color:#343a40;
    margin-bottom:10px;
    overflow-wrap:break-word;
    word-break:break-word;
}

.question-count{ font-size:1em; color:var(--muted); }

.unannotated-count{
    font-size:0.9em;
    color:var(--danger);
    font-weight:bold;
}

.edit-link{ margin-top:15px; }
.edit-link a{ font-size:0.9em; color:var(--success); text-decoration:none; }
.edit-link a:hover{ text-decoration:underline; }

/* =========================================================
   问题卡片与列表
   ========================================================= */
.question-card{
    border:1px solid var(--line-soft);
    border-radius:6px;
    margin-bottom:20px;
    padding:20px;
    background:#fff;
}

.question-header{
    display:flex;
    justify-content:space-between;
    align-items:center;
    margin-bottom:15px;
}

.question-text{
    display:flex;
    align-items:baseline;
    font-size:1.2em;
    font-weight:600;
    margin:0;
    padding-right:15px;
}

.question-number{ font-weight:bold; color:var(--brand); white-space:nowrap; }

.question-content{ white-space:pre-wrap; margin:0; }

/* =========================================================
   列表工具条 / 搜索过滤
   ========================================================= */
.controls{
    display:flex;
    gap:16px;
    align-items:center;
    padding:12px 0;
    border-bottom:2px solid var(--line);
    margin-bottom:20px;
    flex-wrap:wrap;
}

.search-form{ display:flex; }
.search-input{
    padding:8px 12px;
    font-size:1rem;
    border:1px solid #ced4da;
    border-right:none;
    border-radius:4px 0 0 4px;
    outline:none;
}
.search-input:focus{ border-color:var(--brand); }

.search-button{
    padding:8px 15px;
    font-size:1rem;
    border:1px solid var(--brand);
    background-color:var(--brand);
    color:#fff;
    cursor:pointer;
    border-radius:0 4px 4px 0;
}

.filter-form label{
    font-weight:600;
    cursor:pointer;
    display:flex;
    align-items:center;
}
.filter-form input{ margin-right:8px; }

/* 标注状态按钮（列表页） */
.annotate-btn{
    color:#fff;
    text-decoration:none;
    padding:6px 10px;
    border-radius:4px;
    font-size:0.9rem;
    white-space:nowrap;
}
.btn-green{ background-color:var(--success); }
.btn-red{ background-color:var(--danger); }

/* =========================================================
   通用按钮体系
   ========================================================= */
.btn{
    display:inline-flex;
    align-items:center;
    justify-content:center;
    gap:.5rem;
    padding:.6rem 1rem;
    font-size:1rem;
    border-radius:6px;
    border:1px solid transparent;
    cursor:pointer;
    text-decoration:none;
    transition:background-color .15s, border-color .15s, color .15s, box-shadow .15s;
}
.btn:focus{ outline:2px solid rgba(0,123,255,.3); outline-offset:2px; }

.btn-primary{
    background:var(--brand);
    border-color:var(--brand);
    color:#fff;
}
.btn-primary:hover{ background:var(--brand-600); border-color:var(--brand-600); }

.btn-success{ background:var(--success); border-color:var(--success); color:#fff; }
.btn-success:hover{ background:var(--success-600); border-color:var(--success-600); }

.btn-danger{ background:var(--danger); border-color:var(--danger); color:#fff; }
.btn-danger:hover{ background:var(--danger-600); border-color:var(--danger-600); }

.btn-ghost{
    background:transparent;
    color:var(--brand);
    border-color:var(--line);
}
.btn-ghost:hover{ background:#f1f3f5; }

/* 表单动作区（底部按钮） */
.form-actions{
    display:flex;
    gap:12px;
    margin-top:20px;
}

/* =========================================================
   列表项（只读模式）
   ========================================================= */
.options-list{
    list-style:none;
    padding-left:20px;
    margin:0;
}
.options-list li{
    background-color:#f8f9fa;
    border:1px solid var(--line-soft);
    padding:10px 15px;
    margin-bottom:8px;
    border-radius:4px;
}

/* 审核中心：高亮源题的正确选项 */
.options-list li.correct-answer{
    background-color:#d4edda;
    border-left:4px solid #155724;
    border-color:#c3e6cb;
}

/* 分页 */
.pagination{
    display:flex;
    justify-content:center;
    list-style:none;
    padding:0;
    margin-top:32px;
}
.pagination li a{
    color:var(--brand);
    padding:8px 16px;
    text-decoration:none;
    border:1px solid var(--line);
    margin:0 4px;
    border-radius:4px;
    transition:background-color .3s;
}
.pagination li a:hover{ background-color:#e9ecef; }
.pagination li.active a{ background-color:var(--brand); color:#fff; border-color:var(--brand); }
.pagination li.disabled a{ color:var(--muted); pointer-events:none; }

/* =========================================================
   消息提示
   ========================================================= */
.alert{
    padding:15px;
    margin-bottom:20px;
    border:1px solid transparent;
    border-radius:4px;
}
.alert-success{ color:#155724; background-color:#d4edda; border-color:#c3e6cb; }
.alert-danger{ color:#721c24; background-color:#f8d7da; border-color:#f5c6cb; }
.alert-info{ color:#0c5460; background-color:#d1ecf1; border-color:#bee5eb; }

/* =========================================================
   登录/表单通用
   ========================================================= */
.form-container-wrapper{
    display:flex;
    justify-content:center;
    align-items:center;
    min-height:100vh;
}
.form-container{ width:100%; max-width:450px; }
.form-group{ margin-bottom:20px; }
.form-group label{ display:block; margin-bottom:5px; font-weight:600; }
.form-group input,
.form-group textarea{
    width:100%;
    padding:10px;
    border:1px solid #ced4da;
    border-radius:4px;
    background:#fff;
    outline:none;
}
.form-group input:focus,
.form-group textarea:focus{ border-color:var(--brand); }

/* 返回链接 */
.back-link{
    display:block;
    text-align:center;
    margin-top:20px;
    color:var(--brand);
    text-decoration:none;
}

/* =========================================================
   退款审核
   ========================================================= */
.ticket-card{
    border:1px solid #ddd;
    border-radius:8px;
    padding:20px;
    margin-bottom:20px;
    background:#fff;
    box-shadow:0 1px 3px rgba(0,0,0,0.05);
}
.ticket-header{
    display:flex;
    justify-content:space-between;
    align-items:center;
    margin-bottom:15px;
    padding-bottom:10px;
    border-bottom:1px solid #eee;
}
.ticket-header strong{ font-size:1.1em; color:#333; }
.ticket-header span{ font-size:0.9em; color:var(--muted); }
.ticket-body p{ margin:8px 0; }
.reason-box{
    background:#f1f3f5;
    padding:10px;
    border-radius:5px;
    margin-top:10px;
    white-space:pre-wrap;
}
.ticket-actions{
    display:flex;
    gap:15px;
    margin-top:20px;
    align-items:flex-start;
}
.ticket-actions form{ margin:0; }
.reject-form{
    display:flex;
    flex-direction:column;
    gap:10px;
    flex-grow:1;
}
.reject-form textarea{
    width:100%;
    padding:8px;
    border-radius:4px;
    border:1px solid #ccc;
    font-family:inherit;
    box-sizing:border-box;
}
.no-requests{
    text-align:center;
    color:var(--muted);
    padding:40px;
    border:2px dashed var(--line-soft);
    border-radius:8px;
}

/* =========================================================
   标注页面（交互增强）
   ========================================================= */
.section-title{ margin:10px 0 12px; }

.options-list-annotate{
    list-style:none;
    padding:0;
    margin:12px 0 10px;
}

.options-list-annotate li{ margin-bottom:10px; }

.option-tile{
    display:flex;
    align-items:flex-start;
    gap:12px;
    background:#f8f9fa;
    border:1px solid var(--line);
    padding:14px 16px;
    border-radius:6px;
    cursor:pointer;
    transition:background .2s, border-color .2s, box-shadow .2s;
}
.option-tile:hover{ background:#f1f3f5; border-color:#ced4da; }

.options-list-annotate input[type="checkbox"]{
    margin-top:2px;
    transform:scale(1.25);
    accent-color:var(--brand);
}

/* 勾选高亮：通过结构“input + .option-text”实现 */
.option-text{ display:block; color:#212529; }
.options-list-annotate input[type="checkbox"]:checked + .option-text{
    font-weight:700;
    color:var(--success);
}

/* 表单底部适配窄屏 */
@media (max-width:600px){
    .form-actions{ flex-direction:column; align-items:stretch; }
    .btn{ width:100%; }
}

        .page-wrap {min-height: 100vh; display: grid; place-items: center; padding: 32px 16px; background: #f7f9fc;}
        .card {
            width: 100%; max-width: 640px; background: #fff; border-radius: 16px;
            box-shadow: 0 10px 30px rgba(18,38,63,0.08); padding: 28px 24px;
            border: 1px solid #e9edf5;
        }
        .card h1 {
            margin: 0 0 20px; font-size: 28px; line-height: 1.2; color: #0b5ed7;
            letter-spacing: .3px;
        }
        .subtle {color:#6b7280; font-size:14px; margin-top:-6px; margin-bottom:18px;}
        .form-grid {display:grid; grid-template-columns: 140px 1fr; gap:14px 16px; align-items:center;}
        .form-grid .full {grid-column: 1 / -1;}
        .form-label {font-weight:600; color:#374151;}
        .input, .button {
            height:44px; border-radius:10px; border:1px solid #dfe6ee; padding:0 12px; font-size:16px;
        }
        .input:focus {outline:none; border-color:#84aef0; box-shadow:0 0 0 3px rgba(59,130,246,.15)}
        .actions {display:flex; gap:12px; margin-top:8px;}
        .button {cursor:pointer; display:inline-flex; align-items:center; justify-content:center;}
        .button.primary {background:#16a34a; color:#fff; border-color:#16a34a;}
        .button.secondary {background:#f3f4f6; color:#374151;}
        .back {display:inline-flex; margin-top:20px; color:#2563eb; text-decoration:none;}
        .back:hover {text-decoration:underline;}
        /* switch 样式（替代原生复选框） */
        .switch {position:relative; width:44px; height:24px;}
        .switch input{display:none;}
        .slider{
            position:absolute; inset:0; background:#e5e7eb; border-radius:999px; transition:.2s;
            border:1px solid #d1d5db;
        }
        .slider:before{
            content:""; position:absolute; height:18px; width:18px; left:3px; top:50%; transform:translateY(-50%);
            background:white; border-radius:999px; transition:.2s; box-shadow:0 1px 2px rgba(0,0,0,.1);
        }
        .switch input:checked + .slider{background:#22c55e; border-color:#22c55e;}
        .switch input:checked + .slider:before{left:calc(100% - 21px);}
        .switch-row{display:flex; align-items:center; gap:12px;}
        .hint{color:#6b7280; font-size:13px;}
        @media (max-width: 640px){
            .form-grid{grid-template-columns: 1fr; }
        }
        /* 消息条 */
        .alert{padding:12px 14px; border-radius:10px; margin-bottom:14px; font-size:14px;}
        .alert-success{background:#ecfdf5; color:#047857; border:1px solid #a7f3d0;}
        .alert-danger{background:#fef2f2; color:#b91c1c; border:1px solid #fecaca;}