/*
 * 이츠자비스 계정 화면(시안 `이츠자비스 패밀리 계정` v2) — 로그인 · 가입 · 카카오 · 비밀번호 찾기 · 다시 동의 · 계정.
 * 공공입찰 화면(app.css 등)과 따로 쓰는 독립 스타일이다. 값은 시안 그대로(본문 17px · 입력 54px · 버튼 56px · 카카오 #FEE500).
 * 휴대폰(시안 360)은 같은 템플릿을 @media (max-width: 600px) 로 맞춘다. 인라인 style 없음(CSP).
 */
:root {
  --c-navy: #1a2d5a; --c-navy-700: #24407a; --c-navy-100: #dde4f1; --c-navy-50: #eef2f8;
  --c-ink: #141a24; --c-slate-700: #3a4555; --c-slate-600: #4d5868; --c-slate-500: #647082; --c-slate-300: #aab2be;
  --c-line: #e1e5eb; --c-line-strong: #c5ccd6; --c-bg: #f4f5f7; --c-surface: #ffffff; --c-surface-2: #f9fafb; --c-muted-bg: #eceef1;
  --c-ok: #1d7347; --c-ok-bg: #e5f2eb; --c-warn: #a8530a; --c-warn-bg: #fcf0e1; --c-risk: #b42318; --c-risk-bg: #fbe9e7;
  --c-permit: #0b7fa6; --c-permit-bg: #e3f6fc; --c-permit-line: #9fdcef;
  --k-yellow: #FEE500; --k-ink: rgba(0, 0, 0, .85);
  --font-sans: 'Pretendard Variable', Pretendard, -apple-system, 'Apple SD Gothic Neo', 'Malgun Gothic', sans-serif;
  --r-md: 8px; --r-lg: 12px;
  --h-field: 54px; --h-btn: 56px;
}
* { box-sizing: border-box; }
body.fa {
  margin: 0; min-height: 100vh; display: flex; flex-direction: column; background: var(--c-bg); color: var(--c-ink);
  font-family: var(--font-sans); font-size: 17px; line-height: 1.55; -webkit-font-smoothing: antialiased; word-break: keep-all;
}
body.fa a { color: var(--c-navy); text-decoration: none; }
body.fa a:hover { color: var(--c-navy-700); }
body.fa button, body.fa input { font: inherit; }
[hidden] { display: none !important; }
.fa-sym { position: absolute; width: 0; height: 0; overflow: hidden; }
.mark { width: 26px; height: 26px; flex: none; display: block; }

/* 머리글 — 이츠자비스 계정 */
.ah { background: #fff; border-bottom: 1px solid var(--c-line); height: 64px; display: flex; align-items: center; gap: 10px; padding: 0 24px; }
.brand { display: flex; align-items: center; gap: 8px; color: var(--c-ink); }
body.fa .brand { color: var(--c-ink); }
.brand img { width: 26px; height: 26px; }
.brand b { font-size: 20px; font-weight: 800; letter-spacing: -0.02em; color: var(--c-navy); }
.brand span { font-size: 17px; font-weight: 700; color: var(--c-slate-600); }
.ah-r { margin-left: auto; display: flex; align-items: center; gap: 14px; font-size: 15px; font-weight: 600; }
.ah-r form { margin: 0; }
body.fa .back { display: inline-flex; align-items: center; gap: 5px; color: var(--c-permit); font-weight: 700; font-size: 15px; min-height: 44px; }
.back .m-only { display: none; }
.linkbtn { padding: 0; border: 0; background: none; cursor: pointer; font-size: 15px; font-weight: 600; color: var(--c-slate-600); min-height: 44px; }
.linkbtn:hover { color: var(--c-ink); }
body.fa .ah-r .ah-out { color: var(--c-slate-600); }

/* 본문 */
.am { flex: 1; padding: 40px 24px 48px; display: flex; flex-direction: column; align-items: center; gap: 16px; }
.col { width: 100%; max-width: 460px; display: flex; flex-direction: column; gap: 16px; }
.col.wide { max-width: 720px; }
.card { background: #fff; border: 1px solid var(--c-line); border-radius: 16px; padding: 32px 32px 28px; display: flex; flex-direction: column; gap: 18px; }
.card.tight { gap: 6px; }
.card form { margin: 0; display: flex; flex-direction: column; gap: 18px; }
h1 { margin: 0; font-size: 30px; font-weight: 800; letter-spacing: -0.03em; line-height: 1.3; }
.lead { margin: -8px 0 0; font-size: 17px; color: var(--c-slate-600); text-wrap: pretty; }
h2 { margin: 0; font-size: 20px; font-weight: 800; letter-spacing: -0.02em; }
.card.tight h2 { margin-bottom: 8px; }

/* 서비스에서 왔을 때 띠 */
.from { display: flex; align-items: center; gap: 12px; padding: 16px 18px; border-radius: 14px; background: linear-gradient(135deg, #e9f9fe, #f1ecff); border: 1px solid var(--c-permit-line); }
.from .mark { width: 40px; height: 40px; }
.from .tx { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.from .tx b { font-size: 19px; font-weight: 800; letter-spacing: -0.02em; }
.from .tx span { font-size: 15px; color: var(--c-slate-600); }

/* 카카오 */
.kakao { display: flex; align-items: center; justify-content: center; gap: 10px; width: 100%; height: var(--h-btn); border: 0; border-radius: 12px; background: var(--k-yellow); color: var(--k-ink); font-size: 19px; font-weight: 800; cursor: pointer; }
body.fa a.kakao, body.fa a.kakao:hover { color: var(--k-ink); }
.kakao svg { width: 24px; height: 24px; flex: none; }
.kakao.sm { width: auto; height: 46px; padding: 0 16px; font-size: 16px; border-radius: 10px; }
.kakao.sm svg { width: 20px; height: 20px; }
.or { display: flex; align-items: center; gap: 12px; font-size: 15px; color: var(--c-slate-500); }
.or::before, .or::after { content: ""; flex: 1; height: 1px; background: var(--c-line); }

/* 입력 */
.fld { display: flex; flex-direction: column; gap: 8px; }
.fld > span:first-child { font-size: 16px; font-weight: 700; color: var(--c-slate-700); }
.inp { width: 100%; height: var(--h-field); padding: 0 16px; border: 1.5px solid var(--c-line-strong); border-radius: 10px; outline: 0; background: #fff; font-size: 18px; color: var(--c-ink); }
.inp:focus { border-color: var(--c-navy); }
.inp.bad { border-color: var(--c-risk); }
.rule { font-size: 14.5px; color: var(--c-slate-600); }
.rule.is-ok { color: var(--c-ok); }
.ferr { font-size: 14.5px; font-weight: 600; color: var(--c-risk); }
.pwbox { display: flex; align-items: center; width: 100%; height: var(--h-field); border: 1.5px solid var(--c-line-strong); border-radius: 10px; background: #fff; }
.pwbox:focus-within { border-color: var(--c-navy); }
.pwbox.bad { border-color: var(--c-risk); }
.pwbox input { flex: 1; min-width: 0; height: 100%; padding: 0 16px; border: 0; border-radius: 10px; outline: 0; background: transparent; font-size: 18px; color: var(--c-ink); }
.eye { flex: none; width: 48px; height: 100%; border: 0; background: none; color: var(--c-slate-600); cursor: pointer; display: grid; place-items: center; }
.eye .pw-eye-off { display: none; }
.eye.is-shown .pw-eye-on { display: none; }
.eye.is-shown .pw-eye-off { display: block; }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: var(--h-btn); padding: 0 22px; border-radius: 12px; border: 1.5px solid var(--c-line-strong); background: #fff; font-size: 18px; font-weight: 800; color: var(--c-ink); cursor: pointer; }
body.fa a.btn { color: var(--c-ink); }
.btn:hover { background: var(--c-surface-2); }
.btn.primary, body.fa a.btn.primary { background: var(--c-navy); border-color: var(--c-navy); color: #fff; }
.btn.primary:hover { background: var(--c-navy-700); }
.btn.block { width: 100%; }
.btn.md { height: 46px; padding: 0 16px; font-size: 16px; border-radius: 10px; }
.btn:disabled { background: var(--c-muted-bg); border-color: var(--c-muted-bg); color: var(--c-slate-500); cursor: default; }
.links { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; font-size: 16px; }
.links.center { justify-content: center; }
.links > span { color: var(--c-slate-600); }
.links a { font-weight: 700; min-height: 44px; display: inline-flex; align-items: center; }
.links .linkbtn { font-size: 16px; font-weight: 600; }
.fine { margin: 0; font-size: 14.5px; color: var(--c-slate-600); text-wrap: pretty; }
.fine.center { text-align: center; }
.fine.l { font-size: 16px; }

/* 안내 상자 */
.alert { display: flex; align-items: flex-start; gap: 10px; padding: 14px 16px; border-radius: 10px; font-size: 16px; font-weight: 600; text-wrap: pretty; }
.alert .ic { flex: none; width: 22px; height: 22px; margin-top: 1px; border-radius: 50%; color: #fff; font-size: 13px; font-weight: 800; display: flex; align-items: center; justify-content: center; }
.alert.risk { background: var(--c-risk-bg); border: 1px solid #f0b8b0; color: #7a1a12; }
.alert.risk .ic { background: var(--c-risk); }
.alert.warn { background: var(--c-warn-bg); border: 1px solid #efc995; color: #6b3606; }
.alert.warn .ic { background: var(--c-warn); }
.alert.ok { background: var(--c-ok-bg); border: 1px solid #b9dcc8; color: #14553a; }
.alert.ok .ic { background: var(--c-ok); }
body.fa .alert a { color: inherit; text-decoration: underline; }

/* 동의 */
.agree { border: 1.5px solid var(--c-line-strong); border-radius: 12px; overflow: hidden; }
.ag { display: flex; align-items: center; gap: 12px; padding: 0 16px; font-size: 17px; min-height: 56px; }
.ag + .ag { border-top: 1px solid var(--c-line); }
.ag.all { background: var(--c-surface-2); font-weight: 800; }
.ag label { flex: 1; min-width: 0; display: flex; align-items: center; gap: 12px; align-self: stretch; cursor: pointer; padding: 14px 0; }
.ag .req { color: var(--c-navy); font-weight: 700; font-size: 15px; flex: none; }
.ag .nm { flex: 1; min-width: 0; }
.ag .view { flex: none; padding: 0; border: 0; background: none; cursor: pointer; font-size: 15px; font-weight: 700; color: var(--c-slate-600); text-decoration: underline; min-height: 44px; min-width: 44px; display: inline-flex; align-items: center; justify-content: center; }
body.fa .ag a.view { color: var(--c-slate-600); text-decoration: underline; }
.cb { appearance: none; -webkit-appearance: none; flex: none; width: 26px; height: 26px; margin: 0; border-radius: 6px; border: 2px solid var(--c-line-strong); background: #fff; color: #fff; font-size: 16px; font-weight: 800; display: flex; align-items: center; justify-content: center; cursor: pointer; }
.cb:checked { background: var(--c-navy); border-color: var(--c-navy); }
.cb:checked::after { content: "✓"; }
.cb:focus-visible { outline: 2px solid var(--c-navy); outline-offset: 2px; }
.agnote { padding: 12px 16px 14px; border-top: 1px solid var(--c-line); font-size: 14.5px; color: var(--c-slate-600); display: flex; flex-direction: column; gap: 4px; background: #fff; }
.agnote b { color: var(--c-ink); }
.newtag { display: inline-flex; align-items: center; height: 22px; padding: 0 8px; border-radius: 999px; background: var(--c-permit-bg); color: var(--c-permit); font-size: 12.5px; font-weight: 800; margin-right: 4px; }

/* 카카오에서 받은 정보 · 바뀐 점 */
.got { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 8px 16px; padding: 16px 18px; border-radius: 12px; background: var(--c-surface-2); border: 1px solid var(--c-line); font-size: 17px; }
.got > span { color: var(--c-slate-600); }
.got > b { font-weight: 700; overflow-wrap: anywhere; }
.got.one { grid-template-columns: 1fr; }
.got.one > b { font-size: 16px; color: var(--c-slate-700); }
.got.one > span { color: var(--c-ink); }
.vbadge { display: inline-flex; align-items: center; gap: 4px; margin-left: 6px; font-size: 13.5px; font-weight: 800; color: var(--c-ok); }
.side { display: flex; flex-direction: column; gap: 12px; padding: 18px; border-radius: 14px; background: #fff; border: 1px dashed var(--c-line-strong); }
.side > b { font-size: 17px; }
.side .fine { font-size: 15.5px; }

/* 이 계정으로 쓰는 서비스 */
.svcs { display: flex; flex-direction: column; gap: 10px; align-items: center; }
.svcs .h { font-size: 14.5px; color: var(--c-slate-600); }
.svcs .row { display: flex; gap: 8px; flex-wrap: wrap; justify-content: center; }
.chip { display: inline-flex; align-items: center; gap: 8px; height: 40px; padding: 0 14px 0 8px; border-radius: 999px; background: #fff; border: 1px solid var(--c-line); font-size: 15.5px; font-weight: 800; }
.chip .mark, .chip img { width: 24px; height: 24px; }

/* 계정 화면 */
.acc-h { display: flex; align-items: center; gap: 16px; }
.avatar { width: 56px; height: 56px; border-radius: 50%; background: var(--c-navy); color: #fff; font-weight: 800; font-size: 22px; display: grid; place-items: center; flex: none; }
.acc-h .tx { display: flex; flex-direction: column; min-width: 0; }
.acc-h .tx h1 { font-size: 24px; letter-spacing: -0.02em; line-height: 1.55; }
.acc-h .tx span { font-size: 16px; color: var(--c-slate-600); overflow-wrap: anywhere; }
.sv { display: flex; align-items: center; gap: 14px; padding: 16px 0; border-top: 1px solid var(--c-line); }
.sv:first-of-type { border-top: 0; padding-top: 4px; }
.sv .ico { width: 44px; height: 44px; border-radius: 12px; display: grid; place-items: center; flex: none; background: var(--c-navy-50); }
.sv .ico img, .sv .ico .mark { width: 28px; height: 28px; }
.sv .ico.pm { background: var(--c-permit-bg); }
.sv .ico.vl { background: #fff4e3; }
.sv .ico.kk { background: var(--k-yellow); }
.sv .ico.kk svg { width: 26px; height: 26px; }
.sv .ico.em { background: var(--c-muted-bg); color: var(--c-slate-700); font-weight: 800; font-size: 20px; }
.sv .mid { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.sv .mid b { font-size: 18px; font-weight: 800; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.sv .mid span { font-size: 15px; color: var(--c-slate-600); text-wrap: pretty; }
.sv .act form { margin: 0; display: block; }
.badge { display: inline-flex; align-items: center; height: 24px; padding: 0 9px; border-radius: 6px; font-size: 13.5px; font-weight: 800; }
.badge.ok { background: var(--c-ok-bg); color: var(--c-ok); }
.badge.mut { background: var(--c-muted-bg); color: var(--c-slate-600); }
.badge.warn { background: var(--c-warn-bg); color: var(--c-warn); }
.acct-rows { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 12px 24px; font-size: 16px; }
.acct-rows > span { color: var(--c-slate-600); }
.acct-rows b { font-weight: 700; overflow-wrap: anywhere; }
.acct-rows .fine { display: block; margin-top: 2px; }
.acct-rows .fine a { text-decoration: underline; }
.inline { display: flex; gap: 8px; }
.inline .inp { flex: 1; min-width: 0; }
.inline .btn { flex: none; }
.toast { position: fixed; bottom: 24px; left: 50%; transform: translateX(-50%); padding: 10px 16px; border-radius: 8px; background: var(--c-ink); color: #fff; font-size: 15px; font-weight: 600; z-index: 50; }

/* 바닥글 */
.foot { border-top: 1px solid var(--c-line); padding: 18px 24px; font-size: 12.5px; color: var(--c-slate-600); display: flex; flex-direction: column; gap: 4px; background: var(--c-bg); }
body.fa .foot a { color: var(--c-slate-600); }
body.fa .foot a:hover { color: var(--c-ink); text-decoration: underline; }

/* 약관 보기 창 — 가입 화면의 「보기」(본문은 서버가 숨겨 둔 영역에 이미 그려 둠, auth.js 가 열고 닫음) */
.modal-overlay { position: fixed; inset: 0; z-index: 100; display: flex; align-items: center; justify-content: center; padding: 24px; background: rgba(20, 26, 36, .5); }
.modal { width: 100%; max-width: 640px; max-height: 80vh; display: flex; flex-direction: column; background: #fff; border-radius: 16px; box-shadow: 0 12px 32px rgba(15, 23, 42, .24); overflow: hidden; }
.modal-head { flex: none; display: flex; flex-direction: column; gap: 2px; padding: 16px 20px 12px 24px; border-bottom: 1px solid var(--c-line); }
.modal-head-row { display: flex; align-items: center; gap: 12px; }
.modal-title { margin: 0; font-size: 20px; font-weight: 800; }
.modal-close { margin-left: auto; width: 44px; height: 44px; border: 0; border-radius: var(--r-md); background: transparent; font-size: 18px; color: var(--c-slate-600); cursor: pointer; }
.modal-close:hover { background: var(--c-surface-2); }
.modal-meta { font-size: 14.5px; color: var(--c-slate-600); }
.modal-body { flex: 1; min-height: 0; overflow-y: auto; padding: 16px 24px 20px; display: flex; flex-direction: column; gap: 16px; font-size: 16px; line-height: 1.7; }
.modal-article { display: flex; flex-direction: column; gap: 4px; }
.modal-heading { margin: 0; font-size: 16px; font-weight: 800; }
.modal-article p { margin: 0; text-wrap: pretty; }
.modal-foot { flex: none; display: flex; justify-content: flex-end; padding: 12px 20px; border-top: 1px solid var(--c-line); }
.modal-ok { height: 46px; padding: 0 22px; border: 1.5px solid var(--c-navy); border-radius: 10px; background: var(--c-navy); color: #fff; font-size: 16px; font-weight: 800; cursor: pointer; }

/* 휴대폰(시안 360) */
@media (max-width: 600px) {
  .ah { height: 56px; padding: 0 16px; gap: 6px; }
  .brand { white-space: nowrap; }
  .brand b { font-size: 18px; }
  .brand span { font-size: 15px; }
  .ah-r { gap: 10px; font-size: 14px; }
  body.fa .back, .linkbtn { font-size: 14px; }
  .hide-m { display: none !important; }
  .back .m-only { display: inline; }
  .am { padding: 24px 16px 32px; }
  .card { padding: 22px 18px 22px; border-radius: 14px; }
  h1 { font-size: 26px; }
  .sv { flex-wrap: wrap; }
  .sv .act { width: 100%; }
  .sv .act .btn, .sv .act .kakao { width: 100%; }
  .foot { padding: 16px; }
  .acct-rows { grid-template-columns: 1fr; gap: 2px; }
  .acct-rows > span { margin-top: 10px; }
  .modal-overlay { align-items: flex-end; padding: 0; }
  .modal { max-width: none; max-height: 86vh; max-height: 86dvh; border-radius: 16px 16px 0 0; padding-bottom: env(safe-area-inset-bottom, 0px); }
  .modal-head { padding: 14px 8px 10px 16px; }
  .modal-body { padding: 14px 16px 18px; }
  .modal-foot { padding: 10px 16px 12px; }
  .modal-ok { width: 100%; }
}
