:root {
    --bg: #f4f6fb;
    --card: #ffffff;
    --text: #1e2433;
    --muted: #6b7385;
    --line: #e3e7f0;
    --brand: #2f6bff;
    --brand-dark: #1f4fd8;
    --ok: #17a673;
    --warn: #d9822b;
    --err: #d64545;
}

* { box-sizing: border-box; }

body {
    margin: 0;
    background: var(--bg);
    color: var(--text);
    font: 15px/1.6 -apple-system, "Segoe UI", "Microsoft YaHei", sans-serif;
}

a { color: var(--brand); text-decoration: none; }

.topbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 14px 20px;
    background: #fff;
    border-bottom: 1px solid var(--line);
}

.brand { display: flex; align-items: center; gap: 8px; font-weight: 700; color: var(--text); }

.brand-mark {
    display: inline-flex;
    width: 26px;
    height: 26px;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    background: var(--brand);
    color: #fff;
    font-size: 14px;
}

.nav { display: flex; gap: 14px; font-size: 14px; }
.nav a { color: var(--muted); }
.nav a.active { color: var(--brand); font-weight: 600; }

.wrap { max-width: 860px; margin: 0 auto; padding: 28px 18px 60px; }
.wrap.narrow { max-width: 460px; }

.card {
    background: var(--card);
    border: 1px solid var(--line);
    border-radius: 14px;
    padding: 24px;
    box-shadow: 0 10px 30px rgba(31, 45, 61, .05);
}

.card + .card { margin-top: 18px; }

h1 { font-size: 22px; margin: 0 0 6px; }
h2 { font-size: 17px; margin: 0 0 12px; }
.subtitle { color: var(--muted); margin: 0 0 18px; }

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

/* 输入框 / 下拉框 / 文本域：三者外观完全一致 */
.field input:not([type=checkbox]):not([type=radio]),
.field select,
.field textarea {
    width: 100%;
    height: 39px;
    padding: 8px 11px;
    border: 1px solid var(--line);
    border-radius: 9px;
    font: inherit;
    font-size: 15px;
    color: inherit;
    background: #fbfcfe;
    box-sizing: border-box;
}

/* select：清除操作系统原生箭头，改用自定义 SVG，视觉与 input 完全一致 */
.field select {
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    padding-right: 34px;
    background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 20 20' fill='none'><path d='M5 7.5l5 5 5-5' stroke='%236b7385' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'/></svg>");
    background-repeat: no-repeat;
    background-position: right 12px center;
    background-size: 12px;
    cursor: pointer;
}

.field textarea { height: auto; min-height: 96px; line-height: 1.65; resize: vertical; padding: 10px 11px; }

/* checkbox / radio：不受上面 height:39px 影响，保持原生大小 */
.field input[type=checkbox],
.field input[type=radio] { width: auto; height: auto; }

.field input:not([type=checkbox]):not([type=radio]):focus,
.field select:focus,
.field textarea:focus { outline: 3px solid rgba(47, 107, 255, .15); border-color: var(--brand); }

.button {
    display: inline-block;
    padding: 11px 18px;
    border: 0;
    border-radius: 9px;
    background: var(--brand);
    color: #fff;
    font-size: 15px;
    cursor: pointer;
}

.button:hover { background: var(--brand-dark); }
.button[disabled] { opacity: .5; cursor: not-allowed; }
.button-ghost { background: transparent; color: var(--muted); border: 1px solid var(--line); }

.alert { padding: 10px 14px; border-radius: 9px; margin-bottom: 16px; font-size: 14px; }
.alert-error { background: #fdecec; color: var(--err); }
.alert-ok { background: #e9f8f2; color: var(--ok); }
.alert-info { background: #eef3ff; color: var(--brand-dark); }

.badge { display: inline-block; padding: 2px 10px; border-radius: 99px; font-size: 12px; font-weight: 600; }
.badge-ok, .badge-success { background: #e9f8f2; color: var(--ok); }
.badge-warn, .badge-warning { background: #fdf3e6; color: var(--warn); }
.badge-err, .badge-danger { background: #fdecec; color: var(--err); }
.badge-idle { background: #eef0f5; color: var(--muted); }

.alert-success { background: #e9f8f2; color: var(--ok); }

.button-secondary { background: #fff; color: var(--brand); border: 1px solid var(--line); }
.button-secondary:hover { background: #f5f8ff; }
.button-small { padding: 6px 12px; border-radius: 7px; font-size: 13px; }

.card-head { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 14px; }
.card-head h2 { margin: 0; }
.section-gap { margin-top: 18px; }
.help { margin: 5px 0 0; font-size: 12px; color: var(--muted); }

.steps { display: flex; gap: 10px; margin-bottom: 22px; flex-wrap: wrap; }
.step { flex: 1; min-width: 120px; padding: 10px 12px; border-radius: 10px; background: #f7f9fc; color: var(--muted); font-size: 13px; }
.step strong { display: block; color: var(--text); font-size: 14px; }

.photo-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
@media (max-width: 620px) { .photo-grid { grid-template-columns: 1fr; } }

.photo-box { border: 1px dashed var(--line); border-radius: 12px; padding: 14px; background: #fbfcfe; }
.photo-box img { width: 100%; border-radius: 8px; margin-top: 10px; display: block; }
.photo-status { font-size: 13px; color: var(--muted); margin-top: 8px; min-height: 20px; }

.inline { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.muted { color: var(--muted); font-size: 13px; }
.mono { font-family: "SFMono-Regular", Consolas, monospace; }
