/* 접수 화면 기본 모양 (2026-11-26 app.html 에서 옮김 — 내용 그대로) */
  :root {
    --bg: #f4f2ee; --card: #ffffff; --ink: #1f2428; --sub: #6a7178; --line: #e2ded6;
    --accent: #1f5f8b; --accent-ink: #ffffff; --ok: #1f7a4d; --ok-bg: #e4f3ea;
    --warn: #b35c00; --warn-bg: #fdf0dc; --bad: #b3261e; --bad-bg: #fbe6e4; --idle: #eceae5;
    --kb: #b98a00; --hy: #0b6b4f;
  }
  * { box-sizing: border-box; }
  body { margin: 0; background: var(--bg); color: var(--ink);
         font-family: "Pretendard", "Malgun Gothic", "맑은 고딕", sans-serif; font-size: 16px; line-height: 1.5; }
  header { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 18px; padding: 14px 24px;
           background: var(--card); border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 5; }
  header h1 { font-size: 20px; margin: 0; letter-spacing: -0.3px; }
  .chips { display: flex; flex-wrap: wrap; gap: 8px; margin-left: auto; }
  .chip { font: inherit; font-size: 13px; padding: 5px 11px; border-radius: 999px; background: var(--idle); color: var(--sub); white-space: nowrap; border: 0; }
  button.chip { cursor: pointer; } button.chip:hover { filter: brightness(0.95); } button.chip:disabled { opacity: 0.6; cursor: default; }
  .chip.in { background: var(--ok-bg); color: var(--ok); }
  .chip.out { background: var(--warn-bg); color: var(--warn); }
  .chip.wait { background: var(--idle); color: var(--sub); }      /* 다시 연결 중(2026-12-01) — 실패·할 일이 아님 */
  .chip.practice { background: #e7e3f6; color: #4b3b9a; font-weight: 700; }
  .banner { margin: 14px 24px 0; padding: 10px 14px; border-radius: 10px; background: var(--warn-bg); color: var(--warn); font-size: 14px; }
  main { display: grid; grid-template-columns: minmax(340px, 520px) minmax(340px, 1fr); gap: 22px; padding: 22px 24px 60px; align-items: start; }
  @media (max-width: 980px) { main { grid-template-columns: 1fr; } }
  .card { background: var(--card); border: 1px solid var(--line); border-radius: 14px; padding: 20px; }
  h2 { font-size: 17px; margin: 0 0 14px; }
  .tabs { display: flex; gap: 6px; margin-bottom: 16px; }
  .tab { flex: 1; padding: 10px 6px; font-size: 14px; border-radius: 10px; border: 1px solid var(--line); background: var(--bg);
         font: inherit; font-weight: 700; color: var(--sub); cursor: pointer; }
  .tab.on { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); }
  label.f { display: block; font-size: 14px; color: var(--sub); margin: 14px 0 6px; }
  input[type=text], input[type=password], textarea { width: 100%; padding: 12px; font: inherit; border: 1px solid #cfcac0; border-radius: 9px; background: #fff; }
  #loginBody input:not([type=radio]):not([type=checkbox]), #onbBody input:not([type=radio]):not([type=checkbox]) { width: 100%; padding: 12px; font: inherit; border: 1px solid #cfcac0; border-radius: 9px; background: #fff; }
  #loginBody p { margin: 12px 0; line-height: 1.5; }
  input[type=text]:focus, input[type=password]:focus, textarea:focus { outline: 2px solid var(--accent); outline-offset: 1px; }
  .hint { font-size: 13px; color: var(--sub); margin-top: 5px; }
  select.evf { padding: 9px 8px; font: inherit; font-size: 14px; border: 1px solid #cfcac0; border-radius: 9px; background: #fff; max-width: 100%; }
  .ev { padding: 9px 0; border-bottom: 1px solid var(--line); font-size: 14px; line-height: 1.45; overflow-wrap: anywhere; }
  .ev .lv { display: inline-block; padding: 1px 7px; border-radius: 999px; font-size: 12px; font-weight: 700; margin-right: 4px; background: var(--idle); color: var(--sub); }
  .ev.e .lv { background: var(--bad-bg); color: var(--bad); } .ev.w .lv { background: var(--warn-bg); color: var(--warn); }
  .ev .t { color: var(--sub); font-size: 12px; font-variant-numeric: tabular-nums; margin-right: 4px; } .ev .m { color: var(--sub); font-size: 12px; margin-top: 2px; }
  .stop { padding: 12px 0; border-bottom: 1px solid var(--line); font-size: 14px; line-height: 1.5; overflow-wrap: anywhere; }
  .stop .h { display: flex; flex-wrap: wrap; gap: 4px 8px; align-items: baseline; } .stop .h .t { color: var(--sub); font-size: 12px; font-variant-numeric: tabular-nums; }
  .stop .k { display: inline-block; padding: 1px 7px; border-radius: 999px; font-size: 12px; font-weight: 700; background: var(--bad-bg); color: var(--bad); }
  .stop .why { margin-top: 4px; } .stop .pop { margin-top: 6px; padding: 8px 10px; border-radius: 8px; background: var(--warn-bg); color: var(--warn); font-size: 13px; }
  .stop .gs { margin-top: 6px; font-size: 13px; color: var(--accent); } .stop .sub { color: var(--sub); font-size: 12px; margin-top: 4px; }
  .stop .shots { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 8px; }
  .stop .shots img { width: 120px; max-width: 46%; height: 84px; object-fit: cover; object-position: top; border: 1px solid var(--line); border-radius: 8px; cursor: zoom-in; background: var(--idle); }
  #stopBig img { width: 100%; height: auto; border: 1px solid var(--line); border-radius: 8px; }
  .err { font-size: 13px; color: var(--bad); margin-top: 5px; min-height: 0; }
  .pick { display: flex; align-items: center; gap: 12px; padding: 13px 14px; border: 1px solid var(--line); border-radius: 11px; margin-top: 8px; cursor: pointer; }
  .pick input { width: 22px; height: 22px; accent-color: var(--accent); }
  .pick b { font-size: 16px; }
  .pick small { display: block; color: var(--sub); font-size: 13px; }
  .pick.on { border-color: var(--accent); background: #f0f6fa; }
  .sub-opts { margin: 8px 0 0 34px; padding: 10px 12px; background: var(--bg); border-radius: 9px; font-size: 14px; }
  .sub-opts label { display: inline-flex; align-items: center; gap: 6px; margin-right: 16px; cursor: pointer; }
  .sub-opts .opt + .opt { margin-top: 8px; }
  .sub-opts .opt-lb { font-weight: 700; color: var(--sub); font-size: 13px; margin-bottom: 4px; }
  .sub-opts .opt-one .opt-lb { display: inline; margin-right: 6px; }
  button.main { width: 100%; padding: 15px; margin-top: 18px; font: inherit; font-size: 17px; font-weight: 800;
                color: var(--accent-ink); background: var(--accent); border: 0; border-radius: 11px; cursor: pointer; }
  button.main:disabled { background: #b9c4cc; cursor: default; }
  button.ghost { padding: 10px 14px; font: inherit; font-size: 14px; border: 1px solid #cfcac0; background: #fff; border-radius: 9px; cursor: pointer; }
  button.ghost.danger { color: var(--bad); border-color: #e3b6b2; }
  .row { display: flex; gap: 8px; flex-wrap: wrap; }
  .fee { margin-top: 14px; font-size: 14px; color: var(--sub); }
  .fee b { color: var(--ink); }

  .signhead { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; }
  .signhead .who { font-size: 19px; font-weight: 800; }
  .signhead .doc { font-size: 14px; font-weight: 700; padding: 3px 10px; border-radius: 999px; color: #fff; }
  .doc { background: #5a6b7a; }      /* 회사 색은 서버가 준 목록으로 입힌다 */
  canvas#pad { width: 100%; height: 220px; margin-top: 12px; border: 2px dashed #b9b3a6; border-radius: 12px; background: #fff; touch-action: none; display: block; }
  .bgline { display: flex; align-items: center; gap: 8px; height: 28px; margin-top: 4px; font-size: 13px; }      /* 높이를 고정한다 — 글이 바뀌어도 서명 칸 크기가 변하지 않게 */
  .bgline span { flex: 1 1 0; width: 0; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }      /* width: 0 — 긴 글이 카드를 화면 폭 밖으로 밀지 않게(글은 남는 자리만큼만 보인다) */
  .bgline .peek { margin-left: 0; flex: none; }
  .waitbox { padding: 26px 10px; text-align: center; color: var(--sub); }
  .spin { display: inline-block; width: 18px; height: 18px; border: 3px solid #cfd6db; border-top-color: var(--accent); border-radius: 50%; animation: sp 0.9s linear infinite; vertical-align: -3px; margin-right: 8px; }
  @keyframes sp { to { transform: rotate(360deg); } }

  .job { border: 1px solid var(--line); border-radius: 12px; padding: 14px 16px; margin-bottom: 10px; background: #fff; }
  .job .top { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
  .job .nm { font-size: 17px; font-weight: 800; }
  .tag { font-size: 12px; font-weight: 700; padding: 2px 9px; border-radius: 999px; color: #fff; }
  .tag { background: #5a6b7a; }
  .no { font-size: 12px; color: var(--sub); font-variant-numeric: tabular-nums; }
  .st { margin-left: auto; font-size: 13px; font-weight: 800; padding: 4px 11px; border-radius: 999px; }
  .st.running { background: #e3eef6; color: var(--accent); } .st.done { background: var(--ok-bg); color: var(--ok); }
  .st.ask { background: var(--warn-bg); color: var(--warn); } .st.failed, .st.orphan { background: var(--bad-bg); color: var(--bad); }
  .st.ended, .st.unregistered { background: var(--idle); color: var(--sub); }
  .job .line { margin-top: 8px; font-size: 14px; color: var(--sub); }
  .job .line b { color: var(--ink); }
  .dots { display: flex; gap: 3px; margin-top: 10px; }
  .dots i { flex: 1; height: 5px; border-radius: 3px; background: var(--idle); }
  .dots i.success { background: #6fbf93; } .dots i.running { background: var(--accent); } .dots i.failed { background: var(--bad); } .dots i.skipped { background: #d9d5cc; }
  .ask { margin-top: 12px; padding: 12px; border-radius: 10px; background: var(--warn-bg); }
  .ask p { margin: 0 0 10px; font-size: 14px; color: #5a3200; }
  .ask .detail { font-size: 12px; color: #8a6a3d; margin: -4px 0 10px; word-break: break-all; }
  .ask button { margin: 4px 6px 0 0; padding: 10px 14px; font: inherit; font-size: 14px; font-weight: 700; border-radius: 9px; border: 0; background: var(--warn); color: #fff; cursor: pointer; }
  .ask button.alt { background: #fff; color: var(--ink); border: 1px solid #d8c9ae; }
  .empty { text-align: center; color: var(--sub); padding: 30px 0; font-size: 14px; }
  details.steps { margin-top: 8px; font-size: 13px; color: var(--sub); }
  details.steps span { display: inline-block; margin: 3px 10px 0 0; }

  .modal { position: fixed; inset: 0; background: rgba(20,24,28,0.55); display: none; align-items: center; justify-content: center; z-index: 20; padding: 16px; }
  .modal.on { display: flex; }
  .sheet { background: #fff; border-radius: 16px; padding: 24px; width: 100%; max-width: 560px; max-height: 92vh; overflow: auto; }
  .sheet h2 { font-size: 20px; }
  table.sum { width: 100%; border-collapse: collapse; font-size: 15px; }
  table.sum th { text-align: left; width: 96px; color: var(--sub); font-weight: 400; padding: 8px 0; vertical-align: top; }
  table.sum td { padding: 8px 0; border-bottom: 1px solid var(--line); }
  .sigimg { height: 64px; border: 1px solid var(--line); border-radius: 8px; background: #fff; display: block; margin-top: 6px; }
  .note-ok { color: var(--ok); font-size: 13px; } .note-warn { color: var(--warn); font-size: 13px; } .note-bad { color: var(--bad); font-size: 13px; font-weight: 700; }
  .peek { font: inherit; font-size: 12px; margin-left: 8px; padding: 3px 9px; border-radius: 7px; border: 1px solid #cfcac0; background: #fff; cursor: pointer; user-select: none; }
  /* 로그인 상태 한 줄 요약 — 휴대폰에서만 보인다(누르면 회사별 표시가 펼쳐진다) */
  .chip.sum { display: none; font-weight: 700; }
  .chip.sum::after { content: " ▾"; } .chips.open .chip.sum::after { content: " ▴"; }
  #left, #jobsCard, #lookupBox { scroll-margin-top: 84px; }      /* 위 머리띠에 가려지지 않게 */
  @media (max-width: 640px) {
    /* 휴대폰(2026-11-20 사용자): 위쪽 로그인 표시가 화면 절반을 차지하던 것을 한 줄로 줄인다.
       머리띠는 위에 붙어 따라오지 않게(내리면 같이 올라간다) */
    header { position: static; padding: 10px 16px; gap: 6px 10px; }
    header h1 { font-size: 17px; }
    .chips { gap: 6px; }
    .chip.sum { display: inline-block; }
    .chips .chip:not(.sum):not(.practice) { display: none; }
    .chips.open { flex-basis: 100%; }
    .chips.open .chip:not(.sum) { display: inline-block; }
    #whoBar { margin-top: 0 !important; flex-basis: 100%; font-size: 12px !important; color: var(--sub); }
    .banner { margin: 10px 16px 0; }
    #left, #jobsCard, #lookupBox { scroll-margin-top: 8px; }
  }
  /* 휴대폰 개선(2026-11-20): 오늘 작업 탭·확인 필요 알림·큰 서명 화면·화면 안 물음 창·안내 글 접기 */
  .tab.jobs { display: none; }
  #askBar { display: none; width: 100%; border: 0; padding: 11px 16px; background: var(--warn); color: #fff; font: inherit; font-size: 14px; font-weight: 700; text-align: left; cursor: pointer; }
  .signhead { flex-wrap: wrap; } .signhead .doc { white-space: nowrap; }
  .signacts { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; align-items: center; }
  .signacts .main { flex-basis: 100%; margin-top: 8px; }
  .only-full { display: none; }
  .fold .more { display: none; }
  #askModal .main { width: auto; margin: 0; padding: 11px 22px; font-size: 15px; }
  @media (max-width: 980px) {      /* 한 줄로 쌓이는 화면: 오늘 작업이 접수 칸 아래로 내려간다 */
    .tab.jobs { display: block; }
    #askBar.on { display: block; }
  }
  @media (max-width: 640px) {
    #askBar.on { position: sticky; top: 0; z-index: 6; }
    .tab { padding: 10px 2px; font-size: 15px; }
    .signhead .who { flex-basis: 100%; }
    .acts { flex-direction: column; } .acts button { width: 100%; padding: 13px; } .acts .danger { margin-top: 14px; }
    .fold:not(.open) .rest { display: none; }
    .fold:not(.open) .more { display: inline; margin-left: 4px; color: var(--accent); text-decoration: underline; cursor: pointer; }
  }
  /* 서명할 때만 화면을 가득 채운다 — 휴대폰(세로·가로). 가로로 돌리면 더 넓다 */
  @media (max-width: 640px), (max-height: 520px) and (orientation: landscape) {
    #stepSign.full { position: fixed; inset: 0; z-index: 15; background: #fff; display: flex; flex-direction: column; overscroll-behavior: contain;
                     padding: 12px 16px calc(12px + env(safe-area-inset-bottom)); }
    #stepSign.full > .row { display: none; }
    #stepSign.full #signBody { flex: 1; min-height: 0; display: flex; flex-direction: column; }
    #stepSign.full canvas#pad { flex: 1 1 0; height: 0; min-height: 110px; margin-top: 8px; }
    #stepSign.full .signacts { flex-wrap: nowrap; }
    #stepSign.full .signacts .main { flex: 1; flex-basis: auto; width: auto; margin-top: 0; padding: 13px; }
    #stepSign.full .only-full { display: inline; } #stepSign.full button.only-full { display: inline-block; }
    body.signing #toast { bottom: auto; top: 10px; }      /* 아래 버튼을 가리지 않게 */
  }
  @media (max-height: 520px) and (orientation: landscape) {
    #stepSign.full { padding-top: 8px; } #stepSign.full .hint { display: none; } #stepSign.full .signhead .who { flex-basis: auto; margin-right: auto; } #stepSign.full canvas#pad { margin-top: 6px; }
  }
  #toast { position: fixed; left: 50%; bottom: 28px; transform: translateX(-50%); background: #1f2428; color: #fff; padding: 12px 20px; border-radius: 18px; font-size: 14px; line-height: 1.45; display: none; z-index: 60;
           width: max-content; max-width: calc(100vw - 32px); box-sizing: border-box; text-align: center; word-break: keep-all; overflow-wrap: anywhere; box-shadow: 0 6px 24px rgba(0,0,0,0.35); }   /* 모든 창(사람 관리 35·물음 45)보다 위 — 2026-11-22 검사: 창 뒤에 가려 휴대폰에서 안 보였다 */
