/* ============================================================
   KTYJ Member Submit — 表单样式（与主题一致的蓝色科技风）
   深蓝 #0A2463 / 科技蓝 #1E6FF6 / 青蓝 #00C2FF
   ============================================================ */

.kms-wrap { --navy:#0A2463; --blue:#1E6FF6; --cyan:#00C2FF; --ink:#16233F; --ink-2:#4A5B7C; --ink-3:#8A97B5; --line:#E3EAF7;
    max-width: 760px; margin: 0 auto; font-family: "PingFang SC","Microsoft YaHei",sans-serif; }
/* hidden 属性优先于本样式表中的 display:flex/grid，确保初始隐藏生效 */
.kms-wrap [hidden] { display: none !important; }

.kms-card {
    background: #fff; border: 1px solid var(--line); border-radius: 16px;
    box-shadow: 0 8px 30px rgba(10,36,99,.08); padding: 36px 40px;
}

.kms-group { border: none; margin: 0 0 30px; padding: 0; }
.kms-group legend {
    display: flex; align-items: center; gap: 10px; font-size: 18px; font-weight: 800;
    color: var(--navy); margin-bottom: 18px; padding: 0;
}
.kms-group legend em { color: #E63946; font-style: normal; }
.kms-step {
    display: grid; place-items: center; width: 30px; height: 30px; border-radius: 50%;
    background: linear-gradient(135deg,#0A2463,#1E6FF6 55%,#00C2FF); color: #fff;
    font-size: 15px; font-weight: 800;
}

/* honeypot 隐藏字段 */
.kms-hp { position: absolute; left: -9999px; top: -9999px; height: 0; overflow: hidden; }

/* ---------- 照片选择 ---------- */
.kms-photo-row { display: flex; gap: 28px; align-items: center; flex-wrap: wrap; }
.kms-pick {
    position: relative; width: 190px; height: 190px; border-radius: 18px; cursor: pointer;
    border: 2px dashed rgba(30,111,246,.45); background: linear-gradient(135deg, rgba(30,111,246,.06), rgba(0,194,255,.06));
    transition: all .25s; flex-shrink: 0;
}
.kms-pick:hover { border-color: var(--blue); background: linear-gradient(135deg, rgba(30,111,246,.12), rgba(0,194,255,.12)); }
.kms-pick input[type="file"] { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
.kms-pick-hint {
    position: absolute; inset: 0; display: grid; place-content: center; justify-items: center;
    gap: 6px; text-align: center; color: var(--blue); pointer-events: none;
}
.kms-pick-hint strong { font-size: 15px; color: var(--navy); }
.kms-pick-hint small { font-size: 12px; color: var(--ink-3); }
.kms-pick.has-image { border-style: solid; border-color: var(--cyan); }

.kms-previews { display: flex; gap: 26px; }
.kms-preview-item { display: grid; justify-items: center; gap: 8px; }
.kms-preview-item small { color: var(--ink-3); font-size: 12px; }
.kms-preview-circle, .kms-preview-square {
    width: 108px; height: 108px; overflow: hidden; border: 3px solid #fff;
    box-shadow: 0 0 0 2px rgba(30,111,246,.35), 0 8px 22px rgba(10,36,99,.16);
    background: #F4F7FE;
}
.kms-preview-circle { border-radius: 50%; }
.kms-preview-square { border-radius: 14px; }
.kms-preview-circle img, .kms-preview-square img { width: 100%; height: 100%; object-fit: cover; }

/* ---------- 裁剪区 ---------- */
.kms-cropper-box { margin-top: 22px; }
.kms-cropper-tip { font-size: 13px; color: var(--ink-3); margin-bottom: 10px; }
.kms-cropper-stage { height: 380px; border-radius: 12px; overflow: hidden; background: #0A1738; }
.kms-cropper-stage img { display: block; max-width: 100%; }
.kms-cropper-actions { display: flex; gap: 12px; margin-top: 14px; flex-wrap: wrap; }
/* cropper 主题色微调 */
.kms-wrap .cropper-view-box { outline: 2px solid var(--cyan); outline-color: rgba(0,194,255,.85); }
.kms-wrap .cropper-point, .kms-wrap .cropper-line, .kms-wrap .cropper-bg { background-color: rgba(0,194,255,.9); }

/* ---------- 字段 ---------- */
.kms-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 18px 20px; }
.kms-field { display: grid; gap: 7px; }
.kms-field-wide { grid-column: 1 / -1; }
.kms-field > span { font-size: 14.5px; font-weight: 700; color: var(--navy); }
.kms-field > span em { color: #E63946; font-style: normal; }
.kms-field > span small { color: var(--ink-3); font-weight: 400; }
.kms-field input, .kms-field select {
    width: 100%; padding: 12px 14px; border-radius: 10px; font-size: 15px;
    border: 1.5px solid var(--line); background: #FBFCFF; color: var(--ink);
    font-family: inherit; transition: border-color .25s, box-shadow .25s;
}
.kms-field input:focus, .kms-field select:focus {
    outline: none; border-color: var(--blue); box-shadow: 0 0 0 4px rgba(30,111,246,.14);
}
.kms-field[hidden] { display: none; }

/* ---------- 按钮 / 状态 ---------- */
.kms-btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 8px;
    padding: 11px 24px; border-radius: 999px; font-size: 14.5px; font-weight: 700;
    cursor: pointer; border: none; font-family: inherit; transition: all .25s;
}
.kms-btn-line { background: transparent; color: var(--blue); border: 1.5px solid rgba(30,111,246,.45); padding: 9px 20px; }
.kms-btn-line:hover { background: var(--blue); color: #fff; }
.kms-btn-primary {
    background: linear-gradient(135deg,#0A2463,#1E6FF6 55%,#00C2FF); color: #fff;
    box-shadow: 0 8px 24px rgba(30,111,246,.35);
}
.kms-btn-primary:hover:not(:disabled) { transform: translateY(-2px); box-shadow: 0 14px 34px rgba(30,111,246,.45); }
.kms-btn-primary:disabled { opacity: .7; cursor: not-allowed; }
.kms-submit { width: 100%; padding: 15px; font-size: 16.5px; margin-top: 6px; }
.kms-spinner {
    width: 18px; height: 18px; border-radius: 50%;
    border: 2.5px solid rgba(255,255,255,.35); border-top-color: #fff;
    animation: kms-spin .8s linear infinite;
}
@keyframes kms-spin { to { transform: rotate(360deg); } }

.kms-error {
    margin-bottom: 16px; padding: 12px 18px; border-radius: 10px; font-size: 14px; font-weight: 600;
    color: #B01E28; background: rgba(230,57,70,.1); border: 1px solid rgba(230,57,70,.3);
}
.kms-note { margin-top: 14px; text-align: center; font-size: 13px; color: var(--ink-3); }

/* ---------- 成功态 ---------- */
.kms-success { text-align: center; padding: 64px 40px; }
.kms-success-icon {
    display: grid; place-items: center; width: 92px; height: 92px; margin: 0 auto 22px;
    border-radius: 50%; color: #fff;
    background: linear-gradient(135deg,#0A2463,#1E6FF6 55%,#00C2FF);
    box-shadow: 0 0 0 14px rgba(0,194,255,.12), 0 18px 44px rgba(30,111,246,.35);
}
.kms-success h2 { color: var(--navy); font-size: 24px; margin-bottom: 10px; }
.kms-success p { color: var(--ink-2); }

/* ---------- 响应式 ---------- */
@media (max-width: 767px) {
    .kms-card { padding: 26px 20px; }
    .kms-grid { grid-template-columns: 1fr; }
    .kms-photo-row { justify-content: center; }
    .kms-cropper-stage { height: 300px; }
}

/* ============================================================
   v1.1 — 独立提交页 / 照片确认机制 / 上传进度条
   ============================================================ */

/* ---------- 独立页面骨架（不加载主题头尾） ---------- */
body.kms-standalone {
    margin: 0; min-height: 100vh;
    background:
        radial-gradient(1200px 500px at 80% -10%, rgba(0,194,255,.18), transparent 60%),
        radial-gradient(900px 420px at 8% 110%, rgba(30,111,246,.14), transparent 60%),
        linear-gradient(160deg, #F2F6FF 0%, #E8EFFC 100%);
    font-family: "PingFang SC","Microsoft YaHei",sans-serif;
}
.kms-page { max-width: 800px; margin: 0 auto; padding: 42px 20px 60px; }
.kms-brand { display: flex; align-items: center; gap: 14px; margin-bottom: 26px; }
.kms-brand-badge {
    display: grid; place-items: center; width: 52px; height: 52px; border-radius: 14px;
    background: linear-gradient(135deg,#0A2463,#1E6FF6 55%,#00C2FF); color: #fff;
    font-size: 18px; font-weight: 900; letter-spacing: .5px;
    box-shadow: 0 10px 26px rgba(30,111,246,.35);
}
.kms-brand-text { display: grid; gap: 2px; }
.kms-brand-text strong { font-size: 21px; color: #0A2463; font-weight: 800; }
.kms-brand-text small { font-size: 13px; color: #8A97B5; }
.kms-footer-note { margin-top: 26px; text-align: center; font-size: 12.5px; color: #8A97B5; }

/* ---------- 基本信息区锁定态 ---------- */
.kms-group-basic { position: relative; }
.kms-lock-mask { display: none; }
.kms-group-basic.kms-locked .kms-grid { opacity: .38; filter: grayscale(.4); pointer-events: none; user-select: none; }
.kms-group-basic.kms-locked .kms-lock-mask {
    position: absolute; inset: 44px 0 0; z-index: 5;
    display: flex; align-items: center; justify-content: center; gap: 9px;
    color: #4A5B7C; font-size: 14.5px; font-weight: 600;
    background: linear-gradient(180deg, rgba(242,246,255,.4), rgba(242,246,255,.82));
    border-radius: 12px;
}
.kms-group-basic.kms-locked .kms-lock-mask svg { color: #1E6FF6; flex-shrink: 0; }

/* ---------- 照片已确认状态条 ---------- */
.kms-photo-done {
    display: flex; align-items: center; gap: 14px; margin-top: 18px;
    padding: 12px 18px; border-radius: 12px;
    background: rgba(34,197,94,.08); border: 1.5px solid rgba(34,197,94,.35);
}
.kms-done-badge {
    display: inline-flex; align-items: center; gap: 7px;
    color: #15803D; font-size: 14.5px; font-weight: 700; flex: 1;
}

/* ---------- 确认照片按钮 ---------- */
#kms-confirm-photo { margin-left: auto; padding: 10px 26px; }

/* ---------- 提交按钮进度条 ---------- */
.kms-submit { position: relative; overflow: hidden; }
.kms-submit-inner { position: relative; z-index: 2; display: inline-flex; align-items: center; gap: 8px; }
.kms-progress {
    position: absolute; left: 0; top: 0; bottom: 0; z-index: 1; width: 0;
    background: linear-gradient(90deg, rgba(0,194,255,.55), rgba(34,224,124,.75));
    transition: width .25s ease;
}

@media (max-width: 767px) {
    .kms-page { padding: 28px 14px 44px; }
    #kms-confirm-photo { margin-left: 0; width: 100%; }
    .kms-photo-done { flex-wrap: wrap; }
}
