/* 职业适配测评系统 - 公共样式（移动端优先） */

* { box-sizing: border-box; margin: 0; padding: 0; }

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

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC",
                 "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
    background: #f5f7fa;
    color: #2b2f36;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    padding: 16px 14px calc(32px + env(safe-area-inset-bottom));
}

:root {
    --brand: #2b70d1;
    --brand-dark: #1f5fb8;
    --line: #e6ebf2;
    --text-sub: #6b7480;
    --ok: #238538;
    --warn: #c83030;
    --card-shadow: 0 2px 12px rgba(16, 38, 74, .06);
}

.wrap { max-width: 720px; margin: 0 auto; }
.wrap-wide { max-width: 1200px; margin: 0 auto; }

.center-wrap {
    min-height: calc(100vh - 32px);
    display: flex;
    align-items: center;
    justify-content: center;
}

/* ---------- 卡片 ---------- */
.card {
    background: #fff;
    border-radius: 14px;
    padding: 18px;
    margin-bottom: 14px;
    box-shadow: var(--card-shadow);
}

.box {
    width: 100%;
    max-width: 430px;
    background: #fff;
    border-radius: 16px;
    padding: 28px 24px;
    box-shadow: 0 8px 30px rgba(16, 38, 74, .1);
}

.brand {
    display: inline-block;
    font-size: 12px;
    letter-spacing: 2px;
    color: var(--brand);
    background: #eaf2ff;
    padding: 3px 10px;
    border-radius: 999px;
    margin-bottom: 12px;
}

h2 {
    font-size: 20px;
    font-weight: 600;
    color: #1d2229;
    margin-bottom: 10px;
    line-height: 1.4;
}

h3 { font-size: 17px; margin-bottom: 12px; color: #1d2229; }
h4 { font-size: 16px; margin-bottom: 10px; color: #1d2229; }

p { font-size: 15px; color: #3f4753; }

.tip, .sub { font-size: 14px; color: var(--text-sub); margin-bottom: 18px; }

/* ---------- 提示条 ---------- */
.alert {
    background: #ffecec;
    color: var(--warn);
    border-radius: 10px;
    padding: 11px 14px;
    font-size: 14px;
    margin-bottom: 16px;
}
.alert-ok { background: #e9f7ee; color: var(--ok); }

.notice {
    background: #eaf2ff;
    color: var(--brand);
    border-radius: 10px;
    padding: 11px 14px;
    font-size: 14px;
    text-align: center;
    margin-bottom: 16px;
    font-weight: 500;
}

.tip-box {
    background: #fffaf0;
    border: 1px solid #ffe6b3;
    border-radius: 12px;
    padding: 14px;
    font-size: 14px;
    line-height: 1.7;
    color: #6a5320;
}
.tip-box strong { color: #4d3b13; }

/* ---------- 表单控件 ---------- */
input[type=text], input[type=password], input[type=number], select {
    width: 100%;
    padding: 13px 15px;
    border: 1px solid var(--line);
    border-radius: 10px;
    font-size: 16px;
    background: #fff;
    color: #2b2f36;
    outline: none;
    transition: border-color .2s;
}
input:focus, select:focus { border-color: var(--brand); }

.btn-primary {
    width: 100%;
    padding: 15px;
    border: none;
    border-radius: 10px;
    background: var(--brand);
    color: #fff;
    font-size: 16px;
    font-weight: 500;
    cursor: pointer;
    transition: background .2s;
}
.btn-primary:active { background: var(--brand-dark); }

.btn-sm {
    padding: 4px 9px;
    border: 1px solid var(--line);
    border-radius: 6px;
    background: #fff;
    color: var(--brand);
    font-size: 12px;
    cursor: pointer;
}
.btn-sm:active { background: #f0f6ff; }

/* ---------- 进度条 ---------- */
.progress-bar {
    height: 8px;
    background: #e8edf4;
    border-radius: 999px;
    overflow: hidden;
    margin-top: 12px;
}
.progress-inner {
    height: 100%;
    width: 0;
    background: linear-gradient(90deg, #2b70d1, #4a8ee8);
    transition: width .3s ease;
}

/* ---------- 选项（整块可点击，适合手机） ---------- */
.opt {
    display: flex;
    align-items: flex-start;
    gap: 11px;
    border: 1px solid var(--line);
    border-radius: 12px;
    padding: 14px;
    margin-bottom: 10px;
    cursor: pointer;
    transition: border-color .15s, background .15s;
    -webkit-tap-highlight-color: transparent;
}
.opt:active { background: #f4f9ff; border-color: #9fc2ee; }
.opt input[type=radio] {
    flex: none;
    width: 18px;
    height: 18px;
    margin-top: 2px;
    accent-color: var(--brand);
}
.opt label {
    flex: 1;
    font-size: 15px;
    line-height: 1.55;
    cursor: pointer;
    color: #3f4753;
}
.opt:has(input:checked) {
    border-color: var(--brand);
    background: #f0f6ff;
}

.q-title {
    font-size: 16px;
    font-weight: 600;
    color: #1d2229;
    margin-bottom: 14px;
    line-height: 1.55;
}

.warn {
    display: none;
    background: #ffecec;
    color: var(--warn);
    border-radius: 10px;
    padding: 11px 14px;
    font-size: 14px;
    text-align: center;
    margin-bottom: 12px;
}

/* ---------- 报告 ---------- */
.tag {
    display: inline-block;
    background: var(--brand);
    color: #fff;
    padding: 7px 14px;
    border-radius: 999px;
    font-size: 13px;
    font-weight: 500;
    margin: 0 6px 12px 0;
}
.tag-light { background: #eaf2ff; color: var(--brand); }

.job-text { color: var(--brand); font-weight: 500; line-height: 1.75; }

.score-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 9px 0;
    border-bottom: 1px solid #f2f5f9;
    font-size: 14px;
}
.score-row:last-child { border-bottom: none; }

.bar-mini {
    flex: 1;
    height: 6px;
    background: #eef2f8;
    border-radius: 999px;
    margin: 0 10px;
    overflow: hidden;
}
.bar-mini span {
    display: block;
    height: 100%;
    background: #9fc2ee;
    border-radius: 999px;
}

.btns a, .btns button {
    display: block;
    text-align: center;
    padding: 14px;
    border-radius: 12px;
    text-decoration: none;
    font-size: 16px;
    margin-top: 10px;
    border: 1px solid var(--brand);
    color: var(--brand);
    background: #fff;
}
.btns a.primary { background: var(--brand); color: #fff; }

.foot-note {
    margin-top: 18px;
    text-align: center;
    font-size: 12px;
    color: #9aa2ad;
}

/* ---------- 表格（后台） ---------- */
table { width: 100%; border-collapse: collapse; font-size: 13px; }
th, td { border: 1px solid #e6ebf2; padding: 8px 7px; text-align: left; vertical-align: middle; }
th { background: #f5f8fc; font-weight: 600; color: #414b58; white-space: nowrap; }
tbody tr:nth-child(even) { background: #fbfcfe; }
.table-scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; }

.tag-status { font-size: 12px; padding: 2px 8px; border-radius: 999px; }
.tag-status.on { background: #e9f7ee; color: var(--ok); }
.tag-status.off { background: #f0f2f5; color: #7a828d; }
.tag-status.dead { background: #ffecec; color: var(--warn); }

.form-row { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.form-row input, .form-row select { flex: 1 1 150px; width: auto; }

/* ---------- 小屏适配 ---------- */
@media (max-width: 700px) {
    body { padding: 12px 10px calc(28px + env(safe-area-inset-bottom)); }
    .card, .box { border-radius: 12px; padding: 16px; }
    h2 { font-size: 18px; }
    table { font-size: 11px; }
    th, td { padding: 6px 4px; }
    .form-row input, .form-row select { flex: 1 1 100%; }
    .btn-sm {
        padding: 5px 7px;
        margin: 1px 0;
        display: inline-block;
    }
}
