:root {
    --primary: #1f4f8a;
    --primary-600: #1b4577;
    --primary-700: #143761;
    --primary-light: #e9f1fb;
    --accent: #c8a24a;
    --ink: #152238;
    --text: #273449;
    --muted: #6b7a90;
    --line: #dfe6f0;
    --bg: #f4f7fb;
    --danger: #b03a2e;
    --success: #176b52;
    --warning: #8a6210;
    --shadow-sm: 0 1px 2px rgba(16, 38, 73, 0.04), 0 6px 20px rgba(16, 38, 73, 0.05);
    --shadow-md: 0 12px 32px rgba(16, 38, 73, 0.1);
}

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

html {
    -webkit-text-size-adjust: 100%;
}

body {
    margin: 0;
    font-family: "Microsoft YaHei", "PingFang SC", "Hiragino Sans GB", "Noto Sans SC", sans-serif;
    color: var(--text);
    background: var(--bg);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

a {
    color: inherit;
    text-decoration: none;
}

button,
input {
    font: inherit;
}

img {
    max-width: 100%;
}

.icon {
    width: 20px;
    height: 20px;
    flex: none;
    display: inline-block;
}

/* ---------------------------------- 公共 ---------------------------------- */

.brand {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    min-width: 0;
}

.brand-mark {
    width: 48px;
    height: 48px;
    border-radius: 14px;
    background: linear-gradient(145deg, #2a64a8, #173e6d);
    display: grid;
    place-items: center;
    color: #fff;
    box-shadow: 0 8px 18px rgba(23, 62, 109, 0.25);
    flex: none;
}

.brand-mark svg {
    width: 26px;
    height: 26px;
}

.brand-text {
    display: flex;
    flex-direction: column;
    line-height: 1.35;
    min-width: 0;
}

.brand-text strong {
    font-size: 17px;
    color: var(--ink);
    letter-spacing: 0.2px;
}

.brand-text small {
    font-size: 12px;
    color: var(--muted);
    letter-spacing: 0.3px;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    height: 46px;
    padding: 0 20px;
    border: 1px solid transparent;
    border-radius: 12px;
    font-size: 14.5px;
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.12s ease, box-shadow 0.15s ease, background 0.15s ease,
        color 0.15s ease, border-color 0.15s ease;
    white-space: nowrap;
}

.btn svg {
    width: 18px;
    height: 18px;
}

.btn:active {
    transform: translateY(1px) scale(0.995);
}

.btn-primary {
    background: linear-gradient(180deg, #265c9b, #1c4a82);
    color: #fff;
    box-shadow: 0 8px 18px rgba(28, 74, 130, 0.22);
}

.btn-primary:hover {
    background: linear-gradient(180deg, #2c66a9, #20518d);
    box-shadow: 0 10px 22px rgba(28, 74, 130, 0.28);
    transform: translateY(-1px);
}

.btn-primary:active {
    box-shadow: 0 4px 10px rgba(28, 74, 130, 0.24);
}

.btn-ghost {
    background: #fff;
    border-color: #d4dfec;
    color: var(--text);
    box-shadow: 0 2px 6px rgba(16, 38, 73, 0.04);
}

.btn-ghost:hover {
    border-color: #b9cae0;
    background: #f7faff;
    transform: translateY(-1px);
}

.btn-block {
    width: 100%;
    margin-top: 14px;
}

.btn-sm {
    height: 34px;
    padding: 0 12px;
    border-radius: 9px;
    font-size: 13px;
    gap: 5px;
}

.btn-sm svg {
    width: 15px;
    height: 15px;
}

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

.btn-danger:hover {
    background: #fdf3f2;
    border-color: #e3a8a0;
}

.icon-tile {
    width: 50px;
    height: 50px;
    border-radius: 14px;
    background: var(--primary-light);
    color: var(--primary);
    display: grid;
    place-items: center;
    flex: none;
}

.icon-tile svg {
    width: 26px;
    height: 26px;
}

/* ---------------------------------- 提示信息 ---------------------------------- */

.flash-stack {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin: 18px 0;
}

.flash {
    display: flex;
    gap: 10px;
    align-items: flex-start;
    padding: 13px 16px;
    border-radius: 12px;
    font-size: 13.5px;
    line-height: 1.65;
    border: 1px solid;
    animation: flashIn 0.25s ease;
}

@keyframes flashIn {
    from {
        opacity: 0;
        transform: translateY(-4px);
    }
    to {
        opacity: 1;
        transform: none;
    }
}

.flash svg {
    width: 18px;
    height: 18px;
    flex: none;
    margin-top: 2px;
}

.flash-error {
    background: #fdf2f1;
    border-color: #f3cdc8;
    color: #a33327;
}

.flash-success {
    background: #eef9f4;
    border-color: #c3e8d8;
    color: var(--success);
}

.flash-warning {
    background: #fdf8ea;
    border-color: #f0dfb2;
    color: var(--warning);
}

.flash-info {
    background: #eef5fd;
    border-color: #cfe0f5;
    color: #24578f;
}

/* ---------------------------------- 考生端 ---------------------------------- */

.public-page {
    min-height: 100vh;
    background: radial-gradient(900px 420px at 12% -8%, rgba(31, 79, 138, 0.14), transparent 65%),
        radial-gradient(760px 380px at 92% 2%, rgba(200, 162, 74, 0.13), transparent 62%),
        linear-gradient(180deg, #f8fbff 0%, #f2f6fc 55%, #eef4fb 100%);
}

.public-shell {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.site-header {
    width: 100%;
    max-width: 1080px;
    margin: 0 auto;
    padding: 26px 24px 0;
    display: flex;
    align-items: center;
}

.public-main {
    width: 100%;
    max-width: 1080px;
    margin: 0 auto;
    padding: 22px 24px 40px;
}

.entry-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 18px;
    max-width: 760px;
    margin: 0 auto;
}

.entry-btn {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 14px;
    min-height: 190px;
    padding: 30px 22px;
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 20px;
    box-shadow: var(--shadow-sm);
    color: var(--ink);
    overflow: hidden;
    transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
    animation: riseIn 0.45s ease both;
}

.entry-btn:nth-child(2) {
    animation-delay: 0.08s;
}

.entry-btn::before {
    content: "";
    position: absolute;
    inset: 0 0 auto 0;
    height: 4px;
    background: linear-gradient(90deg, var(--primary), #4a8bd0);
}

.entry-btn-gold::before {
    background: linear-gradient(90deg, #8a6a1f, var(--accent));
}

.entry-btn:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-md);
    border-color: #cfe0f5;
}

.entry-btn:active {
    transform: translateY(-1px) scale(0.985);
    box-shadow: var(--shadow-sm);
}

.entry-icon {
    width: 62px;
    height: 62px;
    border-radius: 18px;
    background: var(--primary-light);
    color: var(--primary);
    display: grid;
    place-items: center;
}

.entry-icon svg {
    width: 30px;
    height: 30px;
}

.entry-btn-gold .entry-icon {
    background: #fdf6e7;
    color: #8a6a1f;
}

.entry-label {
    font-size: 18px;
    font-weight: 700;
    letter-spacing: 0.5px;
}

.entry-arrow {
    position: absolute;
    right: 18px;
    bottom: 18px;
    color: #b8c7da;
    transition: transform 0.18s ease, color 0.18s ease;
}

.entry-arrow svg {
    width: 18px;
    height: 18px;
}

.entry-btn:hover .entry-arrow {
    transform: translateX(3px);
    color: var(--primary);
}

.query-page {
    max-width: 560px;
    margin: 0 auto;
}

.back-home {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    margin-bottom: 14px;
    font-size: 13.5px;
    color: var(--muted);
    transition: color 0.15s ease;
}

.back-home:hover {
    color: var(--primary);
}

.back-home svg {
    width: 16px;
    height: 16px;
}

.query-card {
    position: relative;
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 20px;
    padding: 26px;
    box-shadow: var(--shadow-sm);
    overflow: hidden;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    animation: riseIn 0.45s ease both;
}

.query-card:nth-child(2) {
    animation-delay: 0.08s;
}

.query-card::before {
    content: "";
    position: absolute;
    inset: 0 0 auto 0;
    height: 4px;
    background: linear-gradient(90deg, var(--primary), #4a8bd0);
}

.query-card-gold::before {
    background: linear-gradient(90deg, #8a6a1f, var(--accent));
}

.query-card-gold .icon-tile {
    background: #fdf6e7;
    color: #8a6a1f;
}

.query-card:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-md);
}

@keyframes riseIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: none;
    }
}

.card-head {
    display: flex;
    gap: 14px;
    align-items: center;
}

#score .icon-tile {
    background: #fbf4e3;
    color: #9a7620;
}

.card-head h2 {
    margin: 0;
    font-size: 20px;
    color: var(--ink);
    letter-spacing: 0.2px;
}

.query-form {
    margin-top: 22px;
}

.query-form label {
    display: block;
    margin-bottom: 8px;
    font-size: 13px;
    font-weight: 600;
    color: var(--text);
}

.input-wrap {
    position: relative;
}

.input-wrap .icon {
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    width: 19px;
    height: 19px;
    color: #8a9ab2;
    pointer-events: none;
}

.input-wrap input {
    width: 100%;
    height: 50px;
    padding: 0 14px 0 42px;
    border: 1.5px solid var(--line);
    border-radius: 12px;
    background: #fbfcfe;
    color: var(--ink);
    font-size: 15px;
    letter-spacing: 0.5px;
    transition: border-color 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
    outline: none;
}

.input-wrap input:focus {
    border-color: var(--primary);
    background: #fff;
    box-shadow: 0 0 0 4px rgba(31, 79, 138, 0.1);
}

.input-wrap input::placeholder {
    color: #a4b1c4;
    letter-spacing: 0;
}

.query-error {
    margin: 10px 2px 0;
    padding: 10px 13px;
    border-radius: 9px;
    background: #fdf0ef;
    border: 1px solid #f3d3d1;
    color: #c0392b;
    font-size: 13px;
    line-height: 1.5;
}

.query-form.shake {
    animation: form-shake 0.4s ease;
}

@keyframes form-shake {
    0%, 100% { transform: translateX(0); }
    20% { transform: translateX(-7px); }
    40% { transform: translateX(7px); }
    60% { transform: translateX(-4px); }
    80% { transform: translateX(4px); }
}

/* ---------------------------------- 登录 ---------------------------------- */

.login-page {
    background: radial-gradient(720px 480px at 85% -10%, rgba(200, 162, 74, 0.22), transparent 60%),
        linear-gradient(135deg, #0f2f57, #1d5188 58%, #2a6aa8);
}

.login-shell {
    min-height: 100vh;
    display: grid;
    place-items: center;
    padding: 28px 18px;
    position: relative;
    overflow: hidden;
}

.login-shell::before {
    content: "";
    position: absolute;
    width: 540px;
    height: 540px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.06);
    top: -190px;
    right: -160px;
}

.login-shell::after {
    content: "";
    position: absolute;
    width: 360px;
    height: 360px;
    border-radius: 50%;
    border: 1px solid rgba(255, 255, 255, 0.1);
    bottom: -150px;
    left: -110px;
}

.login-card {
    position: relative;
    width: min(420px, 100%);
    background: #fff;
    border-radius: 22px;
    padding: 36px 34px 30px;
    box-shadow: 0 24px 60px rgba(6, 24, 48, 0.35);
}

.login-logo {
    width: 58px;
    height: 58px;
    border-radius: 17px;
    margin: 0 auto 16px;
    background: linear-gradient(145deg, #2a64a8, #173e6d);
    display: grid;
    place-items: center;
    color: #fff;
    box-shadow: 0 10px 22px rgba(23, 62, 109, 0.3);
}

.login-logo svg {
    width: 30px;
    height: 30px;
}

.login-card h1 {
    margin: 0;
    text-align: center;
    font-size: 23px;
    color: var(--ink);
}

.login-form {
    margin-top: 26px;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.field label {
    display: block;
    margin-bottom: 7px;
    font-size: 13px;
    font-weight: 600;
    color: var(--text);
}

.field input,
.field .select-input {
    width: 100%;
    height: 46px;
    padding: 0 13px;
    border: 1.5px solid var(--line);
    border-radius: 10px;
    background: #fbfcfe;
    color: var(--ink);
    font-size: 14px;
    outline: none;
    transition: border-color 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
}

.field .select-input {
    appearance: none;
    -webkit-appearance: none;
    padding-right: 34px;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%236b7a90' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 11px center;
    background-size: 16px 16px;
    cursor: pointer;
}

.field input:focus,
.field .select-input:focus {
    border-color: var(--primary);
    background-color: #fff;
    box-shadow: 0 0 0 4px rgba(31, 79, 138, 0.09);
}

.field .hint {
    margin-top: 6px;
    font-size: 12px;
    color: var(--muted);
}

/* ---------------------------------- 管理后台 ---------------------------------- */

.admin-page {
    min-height: 100vh;
    background: var(--bg);
}

.admin-topbar {
    background: linear-gradient(115deg, #11345c 0%, #1b4c81 60%, #245c97 100%);
    color: #fff;
    box-shadow: 0 6px 18px rgba(12, 38, 72, 0.18);
    position: sticky;
    top: 0;
    z-index: 30;
}

.admin-topbar-inner {
    max-width: 1240px;
    margin: 0 auto;
    padding: 13px 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
}

.brand-light .brand-mark {
    width: 42px;
    height: 42px;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.14);
    box-shadow: none;
    border: 1px solid rgba(255, 255, 255, 0.18);
}

.brand-light .brand-mark svg {
    width: 23px;
    height: 23px;
}

.brand-light .brand-text strong {
    color: #fff;
    font-size: 15.5px;
}

.brand-light .brand-text small {
    color: rgba(255, 255, 255, 0.62);
}

.admin-user {
    display: flex;
    align-items: center;
    gap: 14px;
}

.admin-nav {
    display: flex;
    gap: 6px;
    margin-right: 6px;
}

.nav-tab {
    padding: 7px 14px;
    border-radius: 9px;
    font-size: 13px;
    color: rgba(255, 255, 255, 0.75);
    transition: all 0.15s ease;
}

.nav-tab:hover {
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
}

.nav-tab.active {
    background: rgba(255, 255, 255, 0.16);
    color: #fff;
    font-weight: 600;
}

.user-chip {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 6px 12px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.13);
    font-size: 12.5px;
    color: rgba(255, 255, 255, 0.92);
}

.user-chip svg {
    width: 15px;
    height: 15px;
}

.logout-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 7px 12px;
    border-radius: 9px;
    font-size: 13px;
    color: rgba(255, 255, 255, 0.82);
    border: 1px solid rgba(255, 255, 255, 0.22);
    transition: all 0.15s ease;
}

.logout-link:hover {
    background: rgba(255, 255, 255, 0.12);
    color: #fff;
}

.logout-link svg {
    width: 15px;
    height: 15px;
}

.admin-main {
    max-width: 1240px;
    margin: 0 auto;
    padding: 26px 24px 60px;
}

.admin-main .flash-stack {
    margin: 0 0 18px;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 18px;
    margin-bottom: 22px;
}

.stat-card {
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 16px;
    padding: 19px 20px;
    display: flex;
    align-items: center;
    gap: 15px;
    box-shadow: var(--shadow-sm);
}

.stat-card .icon-tile {
    width: 46px;
    height: 46px;
    border-radius: 13px;
}

.stat-card .icon-tile svg {
    width: 23px;
    height: 23px;
}

.stat-card:nth-child(2) .icon-tile {
    background: #eef9f4;
    color: var(--success);
}

.stat-card:nth-child(3) .icon-tile {
    background: #fbf4e3;
    color: #9a7620;
}

.stat-meta {
    display: flex;
    flex-direction: column;
    line-height: 1.3;
}

.stat-meta strong {
    font-size: 28px;
    font-weight: 800;
    color: var(--ink);
    letter-spacing: -0.5px;
}

.stat-meta span {
    font-size: 12.5px;
    color: var(--muted);
    margin-top: 3px;
}

.panel {
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 18px;
    padding: 24px;
    box-shadow: var(--shadow-sm);
    margin-bottom: 22px;
}

.panel-head {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 18px;
    flex-wrap: wrap;
}

.panel-head h2 {
    margin: 0;
    font-size: 18px;
    color: var(--ink);
    display: flex;
    align-items: center;
    gap: 9px;
}

.panel-head h2 svg {
    width: 19px;
    height: 19px;
    color: var(--primary);
}

.panel-head p {
    margin: 5px 0 0;
    font-size: 12.5px;
    color: var(--muted);
}

.import-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 16px;
}

.import-card {
    border: 1px solid #e2e9f3;
    border-radius: 14px;
    padding: 18px;
    background: linear-gradient(180deg, #fbfdff, #f7faff);
    display: flex;
    flex-direction: column;
}

.import-card h3 {
    margin: 0 0 4px;
    font-size: 14.5px;
    color: var(--ink);
    display: flex;
    align-items: center;
    gap: 7px;
}

.import-card h3 svg {
    width: 17px;
    height: 17px;
    color: var(--primary);
    flex: none;
}

.import-card p {
    margin: 0 0 12px;
    font-size: 12px;
    color: var(--muted);
    line-height: 1.65;
}

.import-card form {
    margin-top: 14px;
}

.import-card .btn {
    width: 100%;
    margin-top: 10px;
}

.upload-box {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 2px;
    padding: 18px 14px 16px;
    border: 1.6px dashed #c4d5ea;
    border-radius: 12px;
    background: linear-gradient(180deg, #fbfdff, #f5f9ff);
    cursor: pointer;
    text-align: center;
    transition: border-color 0.15s ease, background 0.15s ease, transform 0.12s ease;
}

.upload-box:hover {
    border-color: var(--primary);
    background: #f0f6ff;
}

.upload-box:active {
    transform: scale(0.985);
}

.upload-box input[type="file"] {
    position: absolute;
    width: 1px;
    height: 1px;
    opacity: 0;
    overflow: hidden;
    clip: rect(0 0 0 0);
}

.upload-icon {
    width: 42px;
    height: 42px;
    border-radius: 12px;
    background: var(--primary-light);
    color: var(--primary);
    display: grid;
    place-items: center;
    margin-bottom: 4px;
    transition: background 0.15s ease, color 0.15s ease;
}

.upload-box:hover .upload-icon {
    background: #dbeafb;
}

.upload-icon svg {
    width: 22px;
    height: 22px;
}

.upload-text {
    font-size: 13px;
    font-weight: 600;
    color: var(--text);
}

.upload-hint {
    font-size: 11.5px;
    color: var(--muted);
}

.upload-box.has-file {
    border-color: #7fb593;
    background: #f2faf6;
}

.upload-box.has-file .upload-icon {
    background: #e2f4ea;
    color: #176b52;
}

.upload-box.has-file .upload-text {
    color: var(--success);
}

.upload-progress {
    margin-top: 14px;
}

.progress-head {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    font-size: 12.5px;
    color: var(--text);
    margin-bottom: 7px;
}

.progress-head b {
    color: var(--primary);
    font-weight: 700;
}

.progress-pct {
    font-variant-numeric: tabular-nums;
    font-weight: 700;
    color: var(--primary);
}

.progress-track {
    height: 8px;
    border-radius: 99px;
    background: #e8eef7;
    overflow: hidden;
}

.progress-bar {
    height: 100%;
    width: 0%;
    border-radius: 99px;
    background: linear-gradient(90deg, #3d7bed, #5a9bfb);
    transition: width 0.15s ease;
}

.progress-file {
    margin: 7px 1px 0;
    font-size: 11.5px;
    color: var(--muted);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.progress-result {
    margin-top: 12px;
    padding: 11px 13px;
    border-radius: 10px;
    font-size: 12.5px;
    line-height: 1.7;
}

.progress-result p {
    margin: 0;
    font-weight: 600;
}

.progress-result ul {
    margin: 6px 0 0;
    padding-left: 18px;
    color: var(--muted);
    max-height: 132px;
    overflow-y: auto;
}

.progress-success {
    background: #eefaf2;
    border: 1px solid #cdeeda;
    color: #176b52;
}

.progress-warning {
    background: #fdf7ec;
    border: 1px solid #f1e0bd;
    color: #8a6116;
}

.progress-warning ul {
    color: #8a6116;
}

.progress-error {
    background: #fdf0ef;
    border: 1px solid #f3d3d1;
    color: #c0392b;
}

.template-link {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    margin-top: auto;
    padding-top: 12px;
    font-size: 12px;
    color: var(--primary);
}

.template-link:hover {
    text-decoration: underline;
}

.template-link svg {
    width: 14px;
    height: 14px;
}

.table-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    flex-wrap: wrap;
    margin-bottom: 16px;
}

.table-toolbar .title-group h2 {
    margin: 0;
    font-size: 18px;
    color: var(--ink);
}

.table-toolbar .title-group p {
    margin: 4px 0 0;
    font-size: 12.5px;
    color: var(--muted);
}

.search-form {
    display: flex;
    gap: 8px;
}

.search-form .btn {
    height: 40px;
}

.search-box {
    position: relative;
}

.search-box svg {
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    width: 17px;
    height: 17px;
    color: #8a9ab2;
    pointer-events: none;
}

.search-box input {
    width: 260px;
    height: 40px;
    padding: 0 12px 0 36px;
    border: 1.5px solid var(--line);
    border-radius: 10px;
    background: #fbfcfe;
    font-size: 13px;
    outline: none;
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.search-box input:focus {
    border-color: var(--primary);
    background: #fff;
    box-shadow: 0 0 0 3px rgba(31, 79, 138, 0.09);
}

.table-wrap {
    overflow-x: auto;
    border: 1px solid #e8edf5;
    border-radius: 12px;
}

.data-table {
    width: 100%;
    min-width: 1080px;
    border-collapse: collapse;
    font-size: 13px;
}

.data-table thead th {
    background: #f6f9fd;
    color: #54657c;
    font-weight: 600;
    text-align: left;
    padding: 11px 12px;
    border-bottom: 1px solid #e4eaf3;
    white-space: nowrap;
}

.data-table tbody td {
    padding: 12px;
    border-bottom: 1px solid #eef2f8;
    vertical-align: middle;
    color: #33425a;
}

.data-table tbody tr:last-child td {
    border-bottom: 0;
}

.data-table tbody tr {
    transition: background 0.12s ease;
}

.data-table tbody tr:hover {
    background: #f8fbff;
}

.cell-id {
    font-family: Consolas, "Courier New", monospace;
    font-size: 12.5px;
    letter-spacing: 0.2px;
}

.cell-muted {
    color: var(--muted);
}

.tag {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 3px 8px;
    border-radius: 6px;
    font-size: 11.5px;
    font-weight: 600;
    line-height: 1.5;
    white-space: nowrap;
}

.tag-success {
    background: #eaf8f1;
    color: var(--success);
}

.tag-muted {
    background: #f1f4f8;
    color: #7b8899;
}

.tag-info {
    background: var(--primary-light);
    color: var(--primary);
}

.row-actions {
    display: flex;
    gap: 6px;
    white-space: nowrap;
}

.empty-state {
    text-align: center;
    padding: 46px 20px;
    color: var(--muted);
}

.empty-state svg {
    width: 40px;
    height: 40px;
    color: #b6c4d6;
    margin-bottom: 10px;
}

.empty-state p {
    margin: 0;
    font-size: 13px;
}

.pagination {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    margin-top: 18px;
    flex-wrap: wrap;
}

.page-link {
    min-width: 34px;
    height: 34px;
    padding: 0 9px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 1px solid #dbe4ef;
    border-radius: 8px;
    background: #fff;
    color: #52657e;
    font-size: 13px;
    transition: all 0.15s ease;
}

.page-link:hover {
    border-color: #b9cee6;
    color: var(--primary);
}

.page-link.active {
    background: var(--primary);
    border-color: var(--primary);
    color: #fff;
    font-weight: 600;
}

.page-link.disabled {
    color: #b7c3d3;
    background: #f8fafc;
    pointer-events: none;
}

.list-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-top: 14px;
    flex-wrap: wrap;
}

.list-footer .pagination {
    margin-top: 0;
}

.list-count {
    font-size: 12.5px;
    color: var(--muted);
}

/* ---------------------------------- 编辑抽屉 ---------------------------------- */

.form-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 18px 22px;
}

.field.full {
    grid-column: 1 / -1;
}

.field .req {
    color: #d9534f;
}

.drawer-overlay {
    position: fixed;
    inset: 0;
    background: rgba(15, 30, 55, 0.45);
    backdrop-filter: blur(2px);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.25s ease;
    z-index: 90;
}

.drawer-overlay.show {
    opacity: 1;
    pointer-events: auto;
}

body.drawer-locked {
    overflow: hidden;
}

.drawer {
    position: fixed;
    top: 0;
    right: 0;
    height: 100%;
    width: 520px;
    max-width: 100%;
    background: #fff;
    box-shadow: -18px 0 46px rgba(15, 35, 70, 0.18);
    transform: translateX(100%);
    transition: transform 0.28s cubic-bezier(0.32, 0.72, 0.35, 1);
    z-index: 100;
    display: flex;
    flex-direction: column;
}

.drawer.show {
    transform: translateX(0);
}

.drawer-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 18px 24px;
    border-bottom: 1px solid #edf1f7;
    flex: none;
}

.drawer-head h2 {
    margin: 0;
    font-size: 17px;
    color: var(--ink);
}

.drawer-close {
    width: 34px;
    height: 34px;
    border: 0;
    border-radius: 9px;
    background: #f2f5fa;
    color: #5a6b83;
    display: grid;
    place-items: center;
    cursor: pointer;
    transition: background 0.15s ease, color 0.15s ease, transform 0.12s ease;
}

.drawer-close:hover {
    background: #e8edf5;
    color: var(--ink);
}

.drawer-close:active {
    transform: scale(0.92);
}

.drawer-close svg {
    width: 17px;
    height: 17px;
}

.drawer-body {
    padding: 20px 24px 26px;
    overflow-y: auto;
    flex: 1;
}

.drawer-alert {
    padding: 11px 14px;
    border-radius: 10px;
    background: #fdf0ef;
    border: 1px solid #f3d3d1;
    color: #c0392b;
    font-size: 13px;
    line-height: 1.6;
    margin-bottom: 16px;
}

.drawer-grid {
    align-content: start;
}

.photo-pick {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 13px 14px;
    border: 1.6px dashed #c4d5ea;
    border-radius: 12px;
    background: linear-gradient(180deg, #fbfdff, #f5f9ff);
    cursor: pointer;
    transition: border-color 0.15s ease, background 0.15s ease;
    width: 100%;
    margin-top: 4px;
}

.photo-pick:hover {
    border-color: var(--primary);
    background: #f0f6ff;
}

.photo-pick input[type="file"] {
    position: absolute;
    width: 1px;
    height: 1px;
    opacity: 0;
    overflow: hidden;
    clip: rect(0 0 0 0);
}

.photo-thumb {
    width: 62px;
    height: 82px;
    border-radius: 8px;
    border: 1px solid #e2eaf5;
    background: #fff;
    display: grid;
    place-items: center;
    color: #a9b8ca;
    overflow: hidden;
    flex: none;
}

.photo-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.photo-thumb svg {
    width: 24px;
    height: 24px;
}

.photo-pick-text {
    display: flex;
    flex-direction: column;
    gap: 3px;
    min-width: 0;
}

.photo-pick-text strong {
    font-size: 13px;
    color: var(--text);
}

.photo-pick-text small {
    font-size: 11.5px;
    color: var(--muted);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.drawer-actions {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    margin-top: 26px;
    padding-top: 20px;
    border-top: 1px solid #edf1f7;
}

.btn.saving {
    opacity: 0.6;
    pointer-events: none;
}

/* ---------------------------------- 成绩结果 ---------------------------------- */

.result-page {
    min-height: 100vh;
    background: radial-gradient(800px 400px at 50% -10%, rgba(31, 79, 138, 0.14), transparent 70%),
        linear-gradient(180deg, #f7faff, #eef4fb);
}

.result-topbar {
    max-width: 1080px;
    margin: 0 auto;
    padding: 22px 24px 0;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
}

.result-shell {
    max-width: 660px;
    margin: 0 auto;
    padding: 28px 20px 60px;
}

.result-card {
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 22px;
    overflow: hidden;
    box-shadow: 0 18px 50px rgba(16, 38, 73, 0.12);
    animation: riseIn 0.4s ease both;
}

.result-head {
    background: linear-gradient(130deg, #173e6d, #245c97);
    color: #fff;
    padding: 26px 24px;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.result-head::after {
    content: "";
    position: absolute;
    width: 180px;
    height: 180px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.07);
    top: -100px;
    right: -50px;
}

.result-head .icon {
    width: 34px;
    height: 34px;
    opacity: 0.9;
    margin-bottom: 6px;
}

.result-head h1 {
    margin: 0;
    font-size: 20px;
    letter-spacing: 0.5px;
}

.result-head p {
    margin: 6px 0 0;
    font-size: 12.5px;
    color: rgba(255, 255, 255, 0.68);
}

.score-hero {
    text-align: center;
    padding: 30px 24px 22px;
}

.score-label {
    display: block;
    font-size: 12.5px;
    color: var(--muted);
    letter-spacing: 3px;
}

.score-value {
    margin: 5px 0 10px;
    font-size: 62px;
    line-height: 1.1;
    font-weight: 800;
    color: var(--primary);
    letter-spacing: -1px;
    font-family: "DIN Alternate", "Microsoft YaHei", sans-serif;
}

.score-value small {
    font-size: 18px;
    font-weight: 600;
    color: var(--muted);
    margin-left: 4px;
    letter-spacing: 0;
}

.rank-chip {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 7px 14px;
    border-radius: 999px;
    background: #fbf5e5;
    border: 1px solid #efdfb4;
    color: #8a6a1f;
    font-size: 12.5px;
    font-weight: 600;
}

.rank-chip svg {
    width: 15px;
    height: 15px;
}

.interview-chip {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 7px 14px;
    border-radius: 999px;
    font-size: 12.5px;
    font-weight: 600;
}

.interview-chip svg {
    width: 15px;
    height: 15px;
}

.interview-chip.is-yes {
    background: #eaf8f0;
    border: 1px solid #c6ead8;
    color: #176b52;
}

.interview-chip.is-no {
    background: #f4f6fa;
    border: 1px solid #e0e6ef;
    color: var(--muted);
}

.interview-text {
    color: var(--muted);
}

.interview-text.is-yes {
    color: var(--success);
    font-weight: 700;
}

.interview-text.is-no {
    color: var(--muted);
}

.query-time {
    margin: 0;
    padding: 0 24px 22px;
    text-align: right;
    font-size: 12px;
    color: #8a97ab;
}

.score-pending {
    text-align: center;
    padding: 38px 24px 30px;
    color: var(--muted);
}

.score-pending .pending-icon {
    width: 62px;
    height: 62px;
    border-radius: 50%;
    background: #f2f6fb;
    display: grid;
    place-items: center;
    margin: 0 auto 14px;
    color: #8fa3bc;
}

.score-pending .pending-icon svg {
    width: 28px;
    height: 28px;
}

.score-pending h2 {
    margin: 0 0 6px;
    font-size: 19px;
    color: var(--ink);
}

.score-pending p {
    margin: 0;
    font-size: 13px;
}

.candidate-info {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1px;
    background: #e9eef6;
    border-top: 1px solid #e9eef6;
    border-bottom: 1px solid #e9eef6;
    margin: 0;
}

.candidate-info > div {
    background: #fbfcfe;
    padding: 12px 20px;
}

.candidate-info dt {
    font-size: 11.5px;
    color: var(--muted);
    letter-spacing: 0.5px;
}

.candidate-info dd {
    margin: 3px 0 0;
    font-size: 14px;
    font-weight: 600;
    color: var(--ink);
    word-break: break-all;
}

.result-actions {
    display: flex;
    gap: 10px;
    padding: 22px 24px 26px;
}

.result-actions .btn {
    flex: 1;
}

.result-actions form {
    flex: 1;
    display: flex;
}

.result-actions form .btn {
    width: 100%;
}

/* ---------------------------------- 响应式 ---------------------------------- */

@media (max-width: 980px) {
    .stats-grid {
        grid-template-columns: 1fr;
    }

    .import-grid {
        grid-template-columns: 1fr;
    }

    .import-card {
        padding: 16px;
    }
}

@media (max-width: 820px) {
    .entry-grid {
        grid-template-columns: 1fr;
        max-width: 420px;
    }

    .entry-btn {
        min-height: 120px;
        flex-direction: row;
        justify-content: flex-start;
        gap: 16px;
        padding: 20px 24px;
    }

    .entry-icon {
        width: 52px;
        height: 52px;
        border-radius: 15px;
    }

    .entry-icon svg {
        width: 26px;
        height: 26px;
    }

    .entry-label {
        font-size: 17px;
    }

    .form-grid {
        grid-template-columns: 1fr;
    }

    .field.full {
        grid-column: auto;
    }

    .admin-topbar-inner {
        flex-wrap: wrap;
        row-gap: 10px;
    }
}

@media (max-width: 640px) {
    .site-header {
        padding: 18px 16px 6px;
    }

    .brand-text strong {
        font-size: 14.5px;
    }

    .brand-text small {
        display: none;
    }

    .brand-mark {
        width: 42px;
        height: 42px;
        border-radius: 12px;
    }

    .brand-mark svg {
        width: 23px;
        height: 23px;
    }

    .public-main {
        padding: 10px 16px 40px;
    }

    .query-card {
        padding: 20px;
        border-radius: 16px;
    }

    .query-card h2 {
        font-size: 18px;
    }

    .query-form .btn {
        height: 48px;
        font-size: 15px;
    }

    .admin-topbar-inner {
        padding: 11px 16px;
    }

    .admin-nav {
        order: 5;
        width: 100%;
    }

    .nav-tab {
        flex: 1;
        text-align: center;
        padding: 8px 10px;
    }

    .logout-link span {
        display: none;
    }

    .admin-main {
        padding: 18px 16px 44px;
    }

    .panel {
        padding: 18px;
        border-radius: 14px;
    }

    .stat-card {
        padding: 15px 16px;
    }

    .search-form {
        width: 100%;
    }

    .search-box {
        flex: 1;
    }

    .user-chip {
        display: none;
    }

    .table-toolbar {
        flex-direction: column;
        align-items: stretch;
    }

    .table-toolbar .title-group {
        margin-bottom: 12px;
    }

    .drawer {
        width: 100%;
    }

    .drawer-head,
    .drawer-body {
        padding-left: 18px;
        padding-right: 18px;
    }

    .drawer-actions .btn {
        flex: 1;
        height: 46px;
    }

    .list-footer {
        justify-content: center;
    }

    .result-topbar {
        padding: 16px 16px 0;
    }

    .result-shell {
        padding: 18px 14px 40px;
    }

    .candidate-info {
        grid-template-columns: 1fr;
    }

    .result-actions {
        padding: 18px;
    }

    .result-actions .btn {
        flex: 1;
        height: 48px;
    }

    .score-value {
        font-size: 50px;
    }

    .ticket-toolbar-inner {
        flex-wrap: wrap;
        gap: 8px;
    }
}

/* ---------------------------------- 打印 ---------------------------------- */

@media print {
    .no-print {
        display: none !important;
    }
}
