/* ============ 考试报名管理系统 · 全局样式 ============ */
:root {
    --brand: #2563eb;
    --brand-dark: #1d4ed8;
    --brand-soft: #eff4ff;
    --ink: #0f172a;
    --muted: #64748b;
    --line: #e6ebf3;
    --bg: #f4f6fb;
    --sidebar-w: 250px;
    --radius: 14px;
}

* { -webkit-tap-highlight-color: transparent; }

body {
    background: var(--bg);
    font-family: "PingFang SC", "Microsoft YaHei", "Helvetica Neue", system-ui, -apple-system, sans-serif;
    color: #1e293b;
    font-size: 14px;
}

a { text-decoration: none; }

/* ---------- 后台框架 ---------- */
.admin-sidebar {
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    width: var(--sidebar-w);
    background: linear-gradient(185deg, #0b1220 0%, #101c33 60%, #0d1830 100%);
    color: #cbd5e1;
    overflow-y: auto;
    z-index: 1041;
    transition: transform .25s ease;
    scrollbar-width: thin;
}
.admin-sidebar::-webkit-scrollbar { width: 6px; }
.admin-sidebar::-webkit-scrollbar-thumb { background: #24324a; border-radius: 3px; }

.admin-brand {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 20px 20px 16px;
    color: #fff;
    font-weight: 700;
    font-size: 16px;
    letter-spacing: .5px;
    border-bottom: 1px solid rgba(255, 255, 255, .06);
}
.admin-brand .logo {
    width: 34px;
    height: 34px;
    border-radius: 10px;
    background: linear-gradient(135deg, #3b82f6, #6366f1);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 18px;
    flex: 0 0 auto;
}
.admin-brand small {
    display: block;
    font-weight: 400;
    font-size: 11px;
    color: #7f8ea8;
    letter-spacing: .3px;
}

.nav-group-title {
    font-size: 11px;
    color: #5b6b85;
    padding: 16px 20px 6px;
    letter-spacing: .1em;
}

.side-link {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 9px 20px;
    color: #b6c2d6;
    font-size: 13.5px;
    border-left: 3px solid transparent;
    transition: all .15s;
}
.side-link i { font-size: 15px; width: 18px; text-align: center; opacity: .9; }
.side-link:hover { background: rgba(255, 255, 255, .055); color: #fff; }
.side-link.active {
    background: linear-gradient(90deg, rgba(37, 99, 235, .38), rgba(37, 99, 235, .05));
    color: #fff;
    border-left-color: #60a5fa;
}
.sidebar-foot {
    padding: 18px 20px 24px;
    font-size: 11.5px;
    color: #5b6b85;
    line-height: 1.7;
}

.admin-main {
    margin-left: var(--sidebar-w);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.admin-topbar {
    background: rgba(255, 255, 255, .92);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--line);
    padding: 11px 22px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    position: sticky;
    top: 0;
    z-index: 1030;
}
.admin-topbar .page-heading { font-weight: 600; font-size: 16px; color: var(--ink); margin: 0; }
.admin-topbar .page-sub { font-size: 12px; color: var(--muted); }

.admin-content { padding: 22px; flex: 1 1 auto; }

.sidebar-toggle {
    border: 1px solid var(--line);
    background: #fff;
    border-radius: 9px;
    width: 36px;
    height: 36px;
    display: none;
    align-items: center;
    justify-content: center;
    color: #334155;
}

.user-chip {
    display: flex;
    align-items: center;
    gap: 9px;
    padding: 5px 12px 5px 6px;
    border-radius: 999px;
    background: #f1f5f9;
    border: 1px solid #e2e8f0;
    color: #334155;
    font-size: 13px;
}
.user-chip .avatar {
    width: 28px; height: 28px; border-radius: 50%;
    background: linear-gradient(135deg, #2563eb, #6366f1);
    color: #fff; display: flex; align-items: center; justify-content: center;
    font-size: 13px;
}

/* ---------- 卡片 / 表格 ---------- */
.card { border: 1px solid var(--line); border-radius: var(--radius); box-shadow: 0 4px 20px rgba(15, 23, 42, .04); }
.card-header { background: #fff; border-bottom: 1px solid var(--line); font-weight: 600; border-radius: var(--radius) var(--radius) 0 0 !important; padding: 14px 18px; }
.card-body { padding: 18px; }

.stat-card { position: relative; overflow: hidden; }
.stat-card .stat-value { font-size: 27px; font-weight: 700; color: var(--ink); line-height: 1.25; }
.stat-card .stat-label { color: var(--muted); font-size: 12.5px; }
.stat-icon {
    width: 44px; height: 44px; border-radius: 12px;
    display: flex; align-items: center; justify-content: center;
    font-size: 21px; flex: 0 0 auto;
}

.table > :not(caption) > * > * { padding: .62rem .7rem; }
.table thead th { background: #f8fafc; color: #475569; font-weight: 600; font-size: 12.5px; white-space: nowrap; border-bottom-width: 1px; }
.table-hover tbody tr:hover { background: #f8faff; }
.table td { vertical-align: middle; }

.badge-soft { font-weight: 500; padding: .38em .62em; border-radius: 6px; font-size: 12px; }
.badge-soft.gray { background: #f1f5f9; color: #475569; }
.badge-soft.blue { background: #e8f0ff; color: #1d4ed8; }
.badge-soft.green { background: #e7f8ef; color: #15803d; }
.badge-soft.orange { background: #fff4e5; color: #b45309; }
.badge-soft.red { background: #fdecec; color: #b91c1c; }
.badge-soft.purple { background: #f1ebff; color: #6d28d9; }
.badge-soft.cyan { background: #e6f7fb; color: #0e7490; }

.form-label { font-weight: 500; font-size: 13px; color: #334155; margin-bottom: 5px; }
.form-text { font-size: 12px; }
.form-control, .form-select { border-color: #dbe3ef; border-radius: 9px; padding: .5rem .75rem; font-size: 13.5px; }
.form-control:focus, .form-select:focus { border-color: #93b4fb; box-shadow: 0 0 0 .2rem rgba(37, 99, 235, .12); }
.btn { border-radius: 9px; font-size: 13.5px; }
.btn-primary { background: var(--brand); border-color: var(--brand); }
.btn-primary:hover { background: var(--brand-dark); border-color: var(--brand-dark); }
.btn-sm { padding: .3rem .62rem; font-size: 12.5px; border-radius: 7px; }

.filter-bar { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 14px 16px; margin-bottom: 16px; }

.avatar-sm { width: 38px; height: 38px; border-radius: 9px; object-fit: cover; background: #eef2f7; }
.avatar-round { width: 42px; height: 42px; border-radius: 50%; object-fit: cover; background: #eef2f7; }

.empty-state { padding: 56px 20px; text-align: center; color: #94a3b8; }
.empty-state i { font-size: 40px; opacity: .5; display: block; margin-bottom: 10px; }

/* ---------- 登录页 ---------- */
.login-wrap { min-height: 100vh; display: flex; align-items: stretch; background: #f4f6fb; }
.login-visual {
    flex: 1 1 52%;
    background: radial-gradient(1200px 600px at 10% 10%, #1e40af 0%, #0b1220 62%);
    color: #fff;
    padding: 56px 60px;
    position: relative;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}
.login-visual::after {
    content: "";
    position: absolute;
    right: -140px; bottom: -160px;
    width: 460px; height: 460px; border-radius: 50%;
    background: radial-gradient(circle, rgba(99, 102, 241, .45), transparent 65%);
}
.login-visual h1 { font-size: 34px; font-weight: 700; letter-spacing: 1px; line-height: 1.35; }
.login-visual p { color: #a9b8d4; max-width: 440px; line-height: 1.9; }
.login-visual .feature-list { list-style: none; padding: 0; margin: 22px 0 0; display: flex; flex-wrap: wrap; gap: 10px; }
.login-visual .feature-list li {
    background: rgba(255, 255, 255, .08);
    border: 1px solid rgba(255, 255, 255, .1);
    padding: 7px 13px; border-radius: 999px; font-size: 12.5px; color: #d7e2f5;
}
.login-panel { flex: 1 1 48%; display: flex; align-items: center; justify-content: center; padding: 34px 22px; }
.login-card { width: 100%; max-width: 430px; }
.login-logo {
    width: 52px; height: 52px; border-radius: 14px;
    background: linear-gradient(135deg, #2563eb, #6366f1);
    display: flex; align-items: center; justify-content: center;
    color: #fff; font-size: 26px; margin-bottom: 16px;
}
.login-tabs .nav-link { color: #64748b; font-weight: 500; border: 0; border-bottom: 2px solid transparent; padding: 10px 4px; border-radius: 0; }
.login-tabs .nav-link.active { color: var(--brand); background: transparent; border-bottom-color: var(--brand); }
.wx-btn {
    display: flex; align-items: center; justify-content: center; gap: 10px;
    width: 100%; padding: 12px; border-radius: 11px;
    background: #07c160; color: #fff; border: 0; font-weight: 600; font-size: 15px;
    transition: .15s;
}
.wx-btn:hover { background: #06ad56; color: #fff; }
.wx-tip { color: #94a3b8; font-size: 12.5px; line-height: 1.9; }
.wx-qr {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 232px;
    height: 232px;
    padding: 14px;
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 16px;
    box-shadow: 0 6px 22px rgba(15, 23, 42, .06);
}
.wx-qr canvas, .wx-qr img { width: 200px; height: 200px; }

/* ---------- 考生端 ---------- */
.portal-body { background: linear-gradient(180deg, #eef3fd 0%, #f6f8fc 260px); min-height: 100vh; }
.portal-nav {
    background: rgba(255, 255, 255, .9);
    backdrop-filter: blur(8px);
    border-bottom: 1px solid var(--line);
    position: sticky; top: 0; z-index: 1020;
}
.portal-nav .inner { max-width: 980px; margin: 0 auto; padding: 11px 16px; display: flex; align-items: center; justify-content: space-between; }
.portal-brand { display: flex; align-items: center; gap: 9px; font-weight: 700; color: var(--ink); }
.portal-brand .dot { width: 32px; height: 32px; border-radius: 9px; background: linear-gradient(135deg, #2563eb, #6366f1); color: #fff; display: flex; align-items: center; justify-content: center; }
.portal-wrap { max-width: 980px; margin: 0 auto; padding: 18px 16px 60px; }
.portal-hero {
    background: linear-gradient(120deg, #1d4ed8, #4f46e5);
    color: #fff; border-radius: 18px; padding: 24px;
    position: relative; overflow: hidden;
    box-shadow: 0 16px 40px rgba(37, 99, 235, .22);
}
.portal-hero::after {
    content: ""; position: absolute; right: -70px; top: -80px; width: 250px; height: 250px;
    background: radial-gradient(circle, rgba(255, 255, 255, .25), transparent 62%); border-radius: 50%;
}
.portal-hero h4 { font-weight: 700; margin-bottom: 6px; }
.portal-hero .meta { color: #d7e4ff; font-size: 13px; }

.steps-nav { display: flex; gap: 10px; overflow-x: auto; padding: 4px 2px 10px; scrollbar-width: none; }
.steps-nav::-webkit-scrollbar { display: none; }
.step-item {
    flex: 1 0 auto; min-width: 128px; background: #fff; border: 1px solid var(--line);
    border-radius: 13px; padding: 12px 13px; display: flex; gap: 10px; align-items: center;
    color: #64748b; transition: .18s;
}
.step-item .num {
    width: 30px; height: 30px; border-radius: 50%; background: #eef2f7; color: #64748b;
    display: flex; align-items: center; justify-content: center; font-size: 13px; font-weight: 600; flex: 0 0 auto;
}
.step-item .t { font-size: 13px; font-weight: 500; color: #334155; white-space: nowrap; }
.step-item .s { font-size: 11px; color: #94a3b8; }
.step-item.done .num { background: #e7f8ef; color: #15803d; }
.step-item.active { border-color: #bfd4ff; background: #f5f9ff; box-shadow: 0 6px 18px rgba(37, 99, 235, .10); }
.step-item.active .num { background: var(--brand); color: #fff; }
.step-item.locked { opacity: .6; }

.step-card { background: #fff; border: 1px solid var(--line); border-radius: 16px; }
.step-head { padding: 18px 20px; border-bottom: 1px solid var(--line); display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.step-head h5 { margin: 0; font-size: 16px; font-weight: 600; }
.step-head .sub { color: #94a3b8; font-size: 12.5px; margin-top: 3px; }
.step-body { padding: 20px; }

.photo-drop {
    width: 132px; height: 168px; border-radius: 12px; border: 1px dashed #c9d5e8;
    background: #f8fafc; display: flex; flex-direction: column; align-items: center; justify-content: center;
    color: #94a3b8; overflow: hidden; position: relative;
}
.photo-drop img { width: 100%; height: 100%; object-fit: cover; }
.photo-drop input[type=file] { position: absolute; inset: 0; opacity: 0; cursor: pointer; }

.notice-list .notice-item { display: flex; gap: 12px; padding: 13px 0; border-bottom: 1px dashed var(--line); }
.notice-list .notice-item:last-child { border-bottom: 0; }
.notice-list .badge-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--brand); margin-top: 7px; flex: 0 0 auto; }

.upload-row { border: 1px solid var(--line); border-radius: 12px; padding: 14px; margin-bottom: 12px; background: #fff; }
.upload-row .file-chip { display: inline-flex; align-items: center; gap: 6px; background: #f1f5f9; border-radius: 8px; padding: 5px 10px; font-size: 12.5px; color: #475569; }

.score-box { background: linear-gradient(135deg, #f0f7ff, #f7f4ff); border: 1px solid #e0e9ff; border-radius: 16px; padding: 22px; text-align: center; }
.score-box .score { font-size: 44px; font-weight: 700; color: var(--brand); line-height: 1.1; }

/* ---------- 准考证 ---------- */
.ticket {
    background: #fff; border: 1px solid #dbe3ef; border-radius: 14px; overflow: hidden;
    max-width: 720px; margin: 0 auto;
}
.ticket-head { background: linear-gradient(120deg, #1d4ed8, #4338ca); color: #fff; padding: 20px 24px; }
.ticket-head h4 { margin: 0; font-weight: 700; letter-spacing: 2px; }
.ticket-head small { color: #cfdcff; }
.ticket-body { padding: 22px 24px; }
.ticket-photo { width: 100px; height: 130px; border: 1px solid #e2e8f0; border-radius: 8px; object-fit: cover; background: #f8fafc; }
.ticket-meta { font-size: 13px; }
.ticket-meta dt { color: #94a3b8; font-weight: 400; }
.ticket-meta dd { font-weight: 500; color: #1e293b; margin-bottom: 6px; }
.ticket-no { font-family: "Courier New", monospace; font-size: 17px; letter-spacing: 1.5px; font-weight: 700; }
.ticket-foot { border-top: 1px dashed #cbd5e1; margin: 0 24px; padding: 12px 0 18px; font-size: 12px; color: #94a3b8; }

/* ---------- 打印 ---------- */
@media print {
    .no-print { display: none !important; }
    .portal-nav, .steps-nav, .admin-sidebar, .admin-topbar, .step-head, .step-body > .border-top { display: none !important; }
    .portal-wrap, .portal-body { padding: 0 !important; background: #fff !important; max-width: none !important; }
    .admin-main { margin-left: 0 !important; }
    .admin-content { padding: 0 !important; }
    body { background: #fff !important; }
    .step-card, .card, .ticket { box-shadow: none !important; border: 0 !important; }
    .page-break { page-break-after: always; }
}

/* ---------- 门签 / 场签 ---------- */
.door-sign {
    border: 2px solid #1e293b; border-radius: 10px; padding: 22px; background: #fff;
}
.door-sign h3 { font-weight: 700; letter-spacing: 3px; }
.seat-card {
    border: 1.5px solid #94a3b8; border-radius: 8px; padding: 10px 9px; background: #fff;
    text-align: center; height: 100%;
}
.seat-card .s-no { font-size: 11px; color: #64748b; }
.seat-card .s-name { font-size: 17px; font-weight: 700; margin: 4px 0 2px; }
.seat-card .s-info { font-size: 10.5px; color: #64748b; }

/* ---------- 响应式 ---------- */
@media (max-width: 991.98px) {
    .admin-sidebar { transform: translateX(-100%); }
    .admin-sidebar.show { transform: translateX(0); }
    .admin-main { margin-left: 0; }
    .sidebar-toggle { display: inline-flex; }
    .admin-content { padding: 16px; }
    .login-visual { display: none; }
    .login-panel { flex: 1 1 100%; }
}
@media (max-width: 575.98px) {
    .admin-content { padding: 12px; }
    .card-body { padding: 14px; }
    .step-body { padding: 16px; }
}
