/* ============================================================
   insurance-form.css  –  U-medi 보험 정보 등록 / 회원가입 / 로그인 공통 스타일
   en-landing-v2 다크 네이비 + 퍼플-블루 액센트 톤
   ============================================================ */

/* ── 기본 ── */
:root {
    --bg:        #0d1829;
    --surface:   #131f35;
    --surface2:  #1a2844;
    --border:    rgba(255,255,255,.1);
    --border-f:  #3b82f6;
    --accent:    #6366f1;
    --accent-h:  #4f46e5;
    --text:      #f1f5f9;
    --muted:     #94a3b8;
    --danger:    #f87171;
    --success:   #4ade80;
    --gold:      #93c5fd;
}
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
    font-family: 'DM Sans', sans-serif;
    background: var(--bg);
    color: var(--text);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* ── 상단바 ── */
.topbar {
    background: var(--surface);
    border-bottom: 1px solid var(--border);
    padding: 14px 32px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}
.logo-wrap { display: flex; flex-direction: column; text-decoration: none; }
.logo-name  { font-family: 'Cormorant Garamond', serif; font-size: 18px; font-weight: 600; color: #fff; }
.logo-sub   { font-size: 9px; letter-spacing: .18em; color: #6366f1; text-transform: uppercase; margin-top: 2px; }
.back-link  { font-size: 13px; color: var(--muted); text-decoration: none; display: flex; align-items: center; gap: 6px; transition: color .2s; }
.back-link:hover { color: var(--gold); }

/* ── 메인 래퍼 ── */
.form-wrap {
    flex: 1;
    display: flex;
    align-items: flex-start;
    justify-content: center;
    padding: 48px 24px 80px;
}
.form-card {
    width: 100%;
    max-width: 600px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 16px;
    overflow: hidden;
}

/* ── 스텝 헤더 ── */
.step-header {
    background: var(--surface2);
    padding: 28px 36px 24px;
    border-bottom: 1px solid var(--border);
}
.step-progress {
    display: flex;
    align-items: center;
    gap: 0;
    margin-bottom: 20px;
}
.step-dot {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: 600;
    flex-shrink: 0;
    transition: all .3s;
    border: 2px solid var(--border);
    color: var(--muted);
    background: var(--surface);
}
.step-dot.done    { background: var(--accent); border-color: var(--accent); color: #fff; }
.step-dot.active  { background: var(--accent); border-color: var(--accent); color: #fff; box-shadow: 0 0 0 4px rgba(99,102,241,.2); }
.step-line {
    flex: 1;
    height: 2px;
    background: var(--border);
    transition: background .4s;
    margin: 0 6px;
}
.step-line.done { background: var(--accent); }
.step-header h1 {
    font-family: 'Cormorant Garamond', serif;
    font-size: 26px;
    font-weight: 500;
    color: #fff;
    margin-bottom: 6px;
}
.step-header p { font-size: 13.5px; color: var(--muted); line-height: 1.7; }
.step-label-row {
    display: flex;
    justify-content: space-between;
    margin-bottom: 12px;
}
.step-label-row span {
    font-size: 11px;
    color: var(--muted);
    letter-spacing: .04em;
}
.step-label-row span.active { color: var(--gold); font-weight: 600; }

/* ── 폼 바디 ── */
.form-body { padding: 32px 36px; }

/* 섹션 제목 */
.sec-title {
    font-size: 13px;
    font-weight: 600;
    color: var(--gold);
    letter-spacing: .1em;
    text-transform: uppercase;
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: center;
    gap: 8px;
}
.sec-title i { font-size: 13px; }

/* 필드 */
.field {
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin-bottom: 18px;
}
.field label {
    font-size: 12px;
    font-weight: 600;
    color: var(--text);
    letter-spacing: .04em;
    display: flex;
    align-items: center;
    gap: 4px;
}
.field label .req { color: var(--danger); font-size: 13px; }
.field input,
.field select,
.field textarea {
    background: var(--surface2);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 11px 14px;
    font-size: 14px;
    font-family: 'DM Sans', sans-serif;
    color: var(--text);
    outline: none;
    width: 100%;
    transition: border-color .2s, box-shadow .2s;
    appearance: none;
}
.field input:focus,
.field select:focus,
.field textarea:focus {
    border-color: var(--border-f);
    box-shadow: 0 0 0 3px rgba(59,130,246,.15);
}
.field input::placeholder,
.field textarea::placeholder { color: var(--muted); }
.field select {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6'%3E%3Cpath d='M0 0l5 6 5-6z' fill='%2394a3b8'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 14px center;
    cursor: pointer;
}
.field select option { background: #1a2844; color: #f1f5f9; }
.field-hint { font-size: 12px; color: var(--muted); margin-top: 2px; }
.field-error { font-size: 12px; color: var(--danger); display: none; margin-top: 2px; }
.field.has-error input,
.field.has-error select { border-color: var(--danger); }
.field.has-error .field-error { display: block; }

/* 2열 그리드 */
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }

/* ── 전화번호 (국가코드 + 번호) ── */
.phone-wrap { display: flex; gap: 8px; }
.phone-wrap select { width: 130px; flex-shrink: 0; }
.phone-wrap input  { flex: 1; }

/* ── 보험사 선택 ── */
.ins-note {
    background: rgba(99,102,241,.08);
    border: 1px solid rgba(99,102,241,.2);
    border-radius: 8px;
    padding: 12px 14px;
    font-size: 13px;
    color: var(--muted);
    line-height: 1.7;
    margin-bottom: 18px;
}
.ins-note strong { color: var(--gold); }

/* ── 파일 업로드 ── */
.upload-zone {
    border: 1.5px dashed rgba(255,255,255,.18);
    border-radius: 10px;
    padding: 24px 20px;
    text-align: center;
    cursor: pointer;
    transition: all .2s;
    background: var(--surface2);
    position: relative;
}
.upload-zone:hover { border-color: var(--accent); background: rgba(99,102,241,.06); }
.upload-zone.has-file { border-color: var(--success); }
.upload-zone input[type=file] {
    position: absolute; inset: 0; opacity: 0; cursor: pointer; width: 100%; height: 100%;
}
.upload-zone i { font-size: 22px; color: var(--accent); display: block; margin-bottom: 8px; }
.upload-zone .uz-title { font-size: 13px; font-weight: 500; color: var(--text); margin-bottom: 4px; }
.upload-zone .uz-sub   { font-size: 12px; color: var(--muted); }
.upload-zone .uz-name  { font-size: 12px; color: var(--success); margin-top: 6px; display: none; }
.upload-zone.has-file .uz-name { display: block; }
.upload-zone.has-file i { color: var(--success); }

/* ── 동의 체크박스 ── */
.consent-block {
    background: var(--surface2);
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 18px 18px 14px;
    margin-bottom: 14px;
    transition: border-color .2s;
}
.consent-block.checked { border-color: rgba(99,102,241,.4); }
.consent-block h4 {
    font-size: 13.5px;
    font-weight: 600;
    color: var(--text);
    margin-bottom: 6px;
    display: flex;
    align-items: center;
    gap: 6px;
}
.consent-block h4 .req { color: var(--danger); }
.consent-block p {
    font-size: 12.5px;
    color: var(--muted);
    line-height: 1.7;
    margin-bottom: 12px;
}
.consent-label {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    font-size: 13px;
    color: var(--text);
    cursor: pointer;
    line-height: 1.55;
}
.consent-label input[type=checkbox] {
    width: 17px;
    height: 17px;
    margin-top: 1px;
    accent-color: var(--accent);
    flex-shrink: 0;
    cursor: pointer;
}

/* ── 버튼 ── */
.btn-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 28px;
    gap: 12px;
}
.btn-back {
    background: transparent;
    border: 1px solid var(--border);
    color: var(--muted);
    padding: 12px 22px;
    border-radius: 8px;
    font-family: 'DM Sans', sans-serif;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 6px;
    transition: all .2s;
    text-decoration: none;
}
.btn-back:hover { border-color: var(--gold); color: var(--gold); }
.btn-next, .btn-submit-form {
    background: var(--accent);
    color: #fff;
    border: none;
    padding: 13px 32px;
    border-radius: 8px;
    font-family: 'DM Sans', sans-serif;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: all .2s;
    letter-spacing: .02em;
}
.btn-next:hover, .btn-submit-form:hover { background: var(--accent-h); transform: translateY(-1px); }
.btn-next:disabled, .btn-submit-form:disabled {
    opacity: .55; cursor: not-allowed; transform: none;
}

/* ── 성공 화면 ── */
.success-screen {
    display: none;
    padding: 60px 36px;
    text-align: center;
}
.success-icon {
    width: 72px;
    height: 72px;
    background: rgba(74,222,128,.1);
    border: 2px solid var(--success);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 24px;
}
.success-icon i { font-size: 30px; color: var(--success); }
.success-screen h2 {
    font-family: 'Cormorant Garamond', serif;
    font-size: 26px;
    font-weight: 500;
    color: #fff;
    margin-bottom: 10px;
}
.success-screen p { font-size: 14px; color: var(--muted); line-height: 1.8; margin-bottom: 28px; }
.btn-wa-success {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: #25D366;
    color: #fff;
    padding: 12px 26px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    text-decoration: none;
    transition: background .2s;
}
.btn-wa-success:hover { background: #1ebe5d; }

/* ── 반응형 ── */
@media (max-width: 640px) {
    .form-body, .step-header { padding-left: 20px; padding-right: 20px; }
    .field-row { grid-template-columns: 1fr; }
    .topbar { padding: 12px 20px; }
    .phone-wrap { flex-direction: column; }
    .phone-wrap select { width: 100%; }
}

/* ════════════════════════════════════
   로그인 / 회원가입 전용 컴포넌트
════════════════════════════════════ */

/* ── 탭 (Login / Sign up) ── */
.auth-tabs { display: flex; gap: 0; margin-bottom: 0; }
.auth-tab {
    flex: 1; padding: 13px; font-size: 14px; font-weight: 600;
    background: var(--surface2); color: var(--muted);
    border: none; border-bottom: 2px solid transparent;
    cursor: pointer; transition: all .2s; font-family: 'DM Sans',sans-serif;
}
.auth-tab.active { color: var(--gold); border-bottom-color: var(--accent); background: var(--surface); }
.auth-tab:hover:not(.active) { color: var(--text); }
.tab-panel { display: none; }
.tab-panel.active { display: block; }

/* ── ID / 이메일 중복확인 버튼 인라인 ── */
.field-with-btn { display: flex; gap: 8px; }
.field-with-btn input { flex: 1; }
.btn-check-dup {
    padding: 0 14px; border-radius: 8px; border: 1px solid var(--accent);
    background: transparent; color: var(--accent); font-size: 12px; font-weight: 600;
    cursor: pointer; white-space: nowrap; transition: all .2s; font-family: 'DM Sans',sans-serif;
}
.btn-check-dup:hover { background: var(--accent); color: #fff; }
.btn-check-dup.ok    { border-color: var(--success); color: var(--success); }

/* ── 가용 여부 메시지 ── */
.available-msg     { font-size: 12px; margin-top: 4px; }
.available-msg.ok  { color: var(--success); }
.available-msg.err { color: var(--danger); }

/* ── 비밀번호 강도 ── */
.pwd-strength-bar { display: flex; gap: 4px; margin-top: 6px; }
.pwd-seg { height: 3px; flex: 1; border-radius: 2px; background: rgba(255,255,255,.1); transition: background .3s; }
.pwd-seg.weak   { background: var(--danger); }
.pwd-seg.medium { background: #f59e0b; }
.pwd-seg.strong { background: var(--success); }
.pwd-strength-label { font-size: 11px; color: var(--muted); margin-top: 4px; }

/* ── 구분선 (OR) ── */
.divider-or { display: flex; align-items: center; gap: 12px; margin: 20px 0; }
.divider-or::before,
.divider-or::after  { content: ''; flex: 1; height: 1px; background: var(--border); }
.divider-or span    { font-size: 12px; color: var(--muted); white-space: nowrap; }

/* ── 전화번호 필드 (국가코드 + 번호) ── */
.phone-wrap        { display: flex; gap: 8px; }
.phone-wrap select { width: 120px; flex-shrink: 0; }
.phone-wrap input  { flex: 1; }