* { box-sizing: border-box; }
body {
    margin: 0;
    font-family: "Microsoft YaHei", Arial, sans-serif;
    background: #f5f7fb;
    color: #1f2937;
}
a { color: #2563eb; text-decoration: none; }
.layout {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}
.topbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 14px 20px;
    background: #1d4ed8;
    color: #fff;
}
.brand {
    font-size: 20px;
    font-weight: 700;
}
.top-actions {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}
.top-actions form { margin: 0; }
.shell {
    width: min(1180px, calc(100% - 24px));
    margin: 20px auto;
}
.nav {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 16px;
}
.nav a {
    padding: 10px 14px;
    background: #fff;
    border-radius: 10px;
    border: 1px solid #dbe3f0;
    color: #111827;
}
.card {
    background: #fff;
    border-radius: 14px;
    padding: 16px;
    box-shadow: 0 8px 24px rgba(15, 23, 42, 0.06);
    margin-bottom: 16px;
}
.grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 14px;
}
.stats {
    font-size: 28px;
    font-weight: 700;
    margin-top: 10px;
    color: #1d4ed8;
}
.muted { color: #6b7280; }
.flash {
    padding: 12px 14px;
    border-radius: 10px;
    margin-bottom: 12px;
}
.flash-success { background: #ecfdf5; color: #047857; }
.flash-error { background: #fef2f2; color: #b91c1c; }
.flash-info { background: #eff6ff; color: #1d4ed8; }
.form-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 12px;
}
label {
    display: block;
    font-size: 14px;
    margin-bottom: 6px;
    color: #374151;
    font-weight: 600;
}
input[type="text"],
input[type="password"],
input[type="number"],
input[type="file"],
select,
textarea {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid #cbd5e1;
    border-radius: 10px;
    background: #fff;
    font-size: 14px;
}
textarea { min-height: 120px; resize: vertical; }
.actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 12px;
}
.btn {
    border: none;
    border-radius: 10px;
    padding: 10px 16px;
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
}
.btn-primary { background: #2563eb; color: #fff; }
.btn-secondary { background: #e5e7eb; color: #111827; }
.btn-danger { background: #dc2626; color: #fff; }
.table-wrap {
    overflow-x: auto;
}
table {
    width: 100%;
    border-collapse: collapse;
}
th, td {
    padding: 10px 8px;
    border-bottom: 1px solid #e5e7eb;
    text-align: left;
    font-size: 14px;
    vertical-align: top;
}
.tag {
    display: inline-block;
    padding: 4px 8px;
    border-radius: 999px;
    font-size: 12px;
    background: #eff6ff;
    color: #1d4ed8;
}
.login-box {
    width: min(460px, calc(100% - 24px));
    margin: 60px auto;
}
.question-card {
    text-align: center;
    padding: 28px 16px;
}
.question-title {
    font-size: 36px;
    font-weight: 700;
    margin: 20px 0;
    line-height: 1.5;
}
.countdown {
    font-size: 16px;
    font-weight: 700;
    color: #dc2626;
}
.progress {
    height: 10px;
    background: #e5e7eb;
    border-radius: 999px;
    overflow: hidden;
    margin-bottom: 14px;
}
.progress > span {
    display: block;
    height: 100%;
    background: #2563eb;
}
.inline-checks {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 8px;
}
.inline-checks label {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin: 0;
    font-weight: 500;
}
.small { font-size: 12px; }
.form-inline {
    display: flex;
    gap: 10px;
    align-items: center;
    flex-wrap: wrap;
}
.panel-title {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}
@media (max-width: 720px) {
    .topbar { padding: 12px; }
    .brand { font-size: 18px; }
    .shell { width: min(100%, calc(100% - 16px)); margin: 12px auto; }
    .question-title { font-size: 30px; }
}
