/* NIVWORKS 입사자용 휴대폰 화면 — 큰 글씨·큰 버튼. 입력칸 16px 이상(아이폰 확대 방지) */
:root {
  --brand: #20409a; --brand-dark: #19337d; --brand-weak: #e9edf8; --navy: #121b3b;
  --bg: #eef1f7; --card: #fff; --ink: #172036; --muted: #5e6884; --line: #d5dae6;
  --red: #b4281c; --red-weak: #fce9e6; --green: #177a52;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 16px/1.6 "Malgun Gothic", "Apple SD Gothic Neo", "Noto Sans KR", sans-serif; }
body.no-scroll { overflow: hidden; }
.bar { background: var(--navy); color: #c2cae0; display: flex; align-items: center; gap: 10px;
  padding: calc(12px + env(safe-area-inset-top, 0px)) 18px 12px; }
.bar img { height: 30px; }
.bar span { font-size: 13px; letter-spacing: .14em; }
.wrap { max-width: 640px; margin: 0 auto; padding: 16px 14px 24px; display: grid; gap: 14px; }
.foot { max-width: 640px; margin: 0 auto; padding: 0 18px calc(28px + env(safe-area-inset-bottom, 0px)); font-size: 12px; color: var(--muted); }
.card { background: var(--card); border-radius: 14px; padding: 18px 16px; box-shadow: 0 1px 2px rgba(18,27,59,.07); min-width: 0; }
h1 { font-size: 21px; line-height: 1.35; margin: 0 0 8px; text-wrap: balance; }
h2 { font-size: 17px; margin: 0 0 10px; display: flex; align-items: center; gap: 8px; }
.num { display: inline-grid; place-items: center; width: 26px; height: 26px; border-radius: 50%; background: var(--brand); color: #fff; font-size: 14px; }
.eyebrow { margin: 0 0 4px; color: var(--brand); font-size: 13px; font-weight: 700; letter-spacing: .04em; }
.muted { color: var(--muted); }
.small { font-size: 13.5px; }
.center { text-align: center; }
.opt { color: var(--muted); font-weight: 400; font-size: 13px; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }

label { display: block; margin: 12px 0 4px; font-weight: 600; font-size: 15px; }
input, select, textarea { font: inherit; font-size: 17px; width: 100%; min-height: 52px; padding: 10px 12px; border: 1.5px solid var(--line);
  border-radius: 10px; background: #fff; color: var(--ink); }
/* 아이폰 날짜칸은 기본 폭이 커서 카드 밖으로 넘친다 → 기본 모양을 끄고 폭을 칸에 맞춤 */
input[type=date] { -webkit-appearance: none; appearance: none; display: block; min-width: 0; max-width: 100%; text-align: left; }
input[type=date]::-webkit-date-and-time-value { text-align: left; }
input:focus, select:focus { outline: 3px solid var(--brand-weak); border-color: var(--brand); }
.big-input { font-size: 30px; letter-spacing: .35em; text-align: center; font-variant-numeric: tabular-nums; }
fieldset { border: 0; margin: 14px 0 0; padding: 0; }
legend { font-weight: 600; font-size: 15px; margin-bottom: 6px; padding: 0; }
.choice { display: flex; align-items: center; gap: 12px; margin: 6px 0; padding: 12px 14px; min-height: 52px;
  border: 1.5px solid var(--line); border-radius: 10px; font-weight: 500; cursor: pointer; }
.choice input { width: 24px; height: 24px; min-height: 0; flex: none; accent-color: var(--brand); }
.choice:has(input:checked) { border-color: var(--brand); background: var(--brand-weak); }
.big-check { align-items: flex-start; }
.stack { display: grid; grid-template-columns: minmax(0, 1fr); gap: 12px; margin-top: 12px; }
.stack > * { min-width: 0; }
.reason-fixed { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 14px;
  border: 1.5px solid var(--brand); background: var(--brand-weak); border-radius: 10px; font-weight: 700; font-size: 17px; }
.reason-fixed[hidden] { display: none; }
.reason-fixed .btn { width: auto; padding: 8px 12px; font-size: 14px; font-weight: 600; }
#info-form, #sign-form:not(.card) { display: grid; gap: 14px; }

.btn { display: block; width: 100%; text-align: center; text-decoration: none; font: inherit; font-weight: 700; border-radius: 12px;
  border: 1.5px solid var(--line); background: #fff; color: var(--ink); cursor: pointer; }
.btn.big { min-height: 56px; padding: 14px; font-size: 18px; }
.btn.primary { background: var(--brand); border-color: var(--brand); color: #fff; }
.btn.primary:active { background: var(--brand-dark); }
.btn:disabled { opacity: .45; cursor: default; }
form > .btn, .card > .btn { margin-top: 14px; }
.alert { background: var(--red-weak); color: var(--red); padding: 10px 12px; border-radius: 10px; font-weight: 600; }
.alert-card { background: var(--red-weak); color: var(--red); font-weight: 600; }
.alert-card p { margin: 4px 0; }

.photo { margin-top: 12px; }
.photo input[type=file] { position: absolute; width: 1px; height: 1px; opacity: 0; }
.photo-btn { display: grid; gap: 2px; margin: 0; padding: 18px; border: 2px dashed #b8c1d6; border-radius: 12px; text-align: center; cursor: pointer; background: #f8f9fc; }
.photo-btn b { font-size: 18px; } .photo-btn span { font-weight: 400; color: var(--muted); font-size: 14px; }
.photo-btn::before { content: "📷 눌러서 사진 찍기 · 고르기"; font-size: 13px; color: var(--brand); font-weight: 700; }
.photo-btn.has { border-style: solid; border-color: var(--green); background: #eaf6f0; }
.photo-btn.has::before { content: "✓ 올릴 사진 (다시 누르면 바꾸기)"; color: var(--green); }
.thumbs { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 8px; }
.thumb { width: 96px; height: 72px; border-radius: 8px; overflow: hidden; background: #eef0f5; font-size: 12px; display: grid; place-items: center; }
.thumb img { width: 100%; height: 100%; object-fit: cover; }

.docs-card { overflow-x: auto; padding: 14px 10px; }
.done { text-align: center; display: grid; gap: 12px; }
.done .check { width: 64px; height: 64px; border-radius: 50%; background: var(--green); color: #fff; font-size: 34px; display: grid; place-items: center; margin: 4px auto; }
details.card summary { font-weight: 700; cursor: pointer; }

/* 직원 연차 조회 */
.notice { margin: 10px 0 0; background: #fff6e0; color: #6b4a00; padding: 10px 12px; border-radius: 10px; font-size: 14px; line-height: 1.55; }
.first-banner { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 16px; border-radius: 14px;
  background: var(--brand); color: #fff; text-decoration: none; font-size: 15px; line-height: 1.45; box-shadow: 0 2px 6px rgba(32,64,154,.25); }
.first-banner b { font-size: 18px; }
.first-go { flex: none; background: #fff; color: var(--brand); font-weight: 700; padding: 10px 12px; border-radius: 10px; font-size: 15px; white-space: nowrap; }
.me-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; }
.me-head h1 { margin: 0; } .me-head p { margin: 2px 0 0; }
.btn.ghost-sm { white-space: nowrap; width: auto; padding: 8px 12px; font-size: 14px; font-weight: 600; min-height: 40px; }
.ok-note { margin: 0; background: #eaf6f0; color: var(--green); padding: 10px 14px; border-radius: 10px; font-weight: 600; }
.neg { color: var(--red); }
.kpi-main { text-align: center; padding: 6px 0 12px; display: grid; gap: 2px; }
.kpi-main span { color: var(--muted); font-size: 14px; font-weight: 600; }
.kpi-main b { font-size: 44px; line-height: 1.1; color: var(--brand); font-variant-numeric: tabular-nums; }
.kpi-main b small { font-size: 18px; margin-left: 4px; }
.kpi-main em { font-style: normal; color: var(--muted); font-size: 15px; }
.kpi-main.neg b { color: var(--red); }
.kpi-row { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; border-top: 1px solid var(--line); padding-top: 12px; }
.kpi-row div, .sum-grid div { display: grid; gap: 2px; text-align: center; min-width: 0; }
.kpi-row span, .sum-grid span { font-size: 12px; color: var(--muted); line-height: 1.3; }
.kpi-row b, .sum-grid b { font-size: 16px; font-variant-numeric: tabular-nums; }
.month-nav { display: grid; grid-template-columns: 52px 1fr 52px; gap: 8px; align-items: center; margin-bottom: 12px; }
.month-nav .btn { min-height: 52px; font-size: 26px; line-height: 48px; padding: 0; }
.month-nav select { font-weight: 700; text-align: center; }
.sum-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px 6px; background: #f6f8fc; border-radius: 10px; padding: 12px 6px; }
.sum-grid .hl b { color: var(--red); }
.rec-list, .req-list { list-style: none; margin: 12px 0 0; padding: 0; display: grid; gap: 8px; }
.rec { display: grid; grid-template-columns: 56px 1fr; gap: 10px; align-items: center; padding: 10px 12px; border: 1px solid var(--line); border-radius: 10px; }
.rec.pending { border-style: dashed; background: #fffbf0; }
.rec.acc { background: #eef6ff; border-color: #cfe0f5; }
.rec-date { font-weight: 700; font-size: 17px; text-align: center; line-height: 1.2; font-variant-numeric: tabular-nums; }
.rec-date small { display: block; font-size: 12px; color: var(--muted); font-weight: 500; }
.rec-body { display: grid; gap: 2px; min-width: 0; }
.empty { padding: 14px; text-align: center; }
.pill { display: inline-block; font-size: 12px; font-weight: 700; padding: 2px 8px; border-radius: 99px; background: #eceff5; color: var(--muted); vertical-align: 2px; }
.pill.amber { background: #fff1d6; color: #8a5a00; } .pill.green { background: #e2f4ea; color: var(--green); } .pill.red { background: var(--red-weak); color: var(--red); }
.req-list li { border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; display: grid; gap: 3px; }
.req-top { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.req-list form .btn { margin-top: 6px; }
.hour-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0 8px; }
.hour-grid .wide { grid-column: span 3; }
.choice.hour { justify-content: center; padding: 10px 6px; }
.choice.hour.wide { justify-content: flex-start; padding: 12px 14px; }
details.card form { margin-top: 10px; }
@media (max-width: 360px) { .kpi-row { grid-template-columns: repeat(2, 1fr); row-gap: 10px; } .sum-grid { grid-template-columns: repeat(2, 1fr); } }

/* 서명 */
.sig-field { display: grid; gap: 10px; margin: 12px 0; }
.sig-preview { min-height: 110px; border: 2px dashed #b8c1d6; border-radius: 12px; display: grid; place-items: center; color: var(--muted); background: #fafbfd; }
.sig-preview.has { border-style: solid; border-color: var(--green); background: #fff; }
.sig-preview img { max-height: 100px; max-width: 90%; }
.sigpad { position: fixed; inset: 0; z-index: 50; background: #fff; display: grid; grid-template-rows: auto 1fr auto auto;
  padding: env(safe-area-inset-top, 0px) env(safe-area-inset-right, 0px) env(safe-area-inset-bottom, 0px) env(safe-area-inset-left, 0px); }
.sigpad[hidden] { display: none; }
.sigpad-top { padding: 12px 16px; display: grid; gap: 2px; background: var(--navy); color: #fff; }
.sigpad-top b { font-size: 19px; } .sigpad-top .muted { color: #b9c2dc; font-size: 13px; }
.sigpad-area { position: relative; margin: 10px; border: 2px solid var(--line); border-radius: 12px; background: #fff; min-height: 0; overflow: hidden; }
.sigpad-area canvas { position: absolute; inset: 0; touch-action: none; z-index: 2; }
.sig-guide { position: absolute; left: 6%; right: 6%; bottom: 22%; border-bottom: 2px dashed #cfd5e3; color: #c5cbd9; font-size: 15px; letter-spacing: .5em; padding-bottom: 4px; z-index: 1; pointer-events: none; }
.sigpad-bottom { display: grid; grid-template-columns: 1fr 1fr 1.6fr; gap: 10px; padding: 0 10px 12px; }
.sigpad-bottom .btn { min-height: 64px; font-size: 19px; }
.sig-warn { margin: 0 10px 10px; color: var(--red); font-weight: 700; text-align: center; }
@media (orientation: landscape) and (max-height: 500px) {
  .sigpad-top { padding: 6px 14px; } .sigpad-top .muted { display: none; }
  .sigpad-bottom .btn { min-height: 52px; }
}

[hidden] { display: none !important; }
.kakao-out { margin-bottom: 14px; }
.kakao-out .btn { margin-top: 10px; }


/* 출퇴근 */
.punch-now { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; text-align: center; }
.today-big { grid-column: 1 / -1; margin: 0 0 4px; font-size: 26px; font-weight: 800; color: var(--ink); }
.today-big span { display: inline !important; font-size: 20px !important; color: var(--brand) !important; margin-left: 4px; }
.punch-now span { display: block; color: var(--muted); font-size: 14px; font-weight: 600; }
.punch-now b { font-size: 34px; color: var(--brand); font-variant-numeric: tabular-nums; }
.punch-btns { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.punch-btns .btn { min-height: 76px; font-size: 22px; margin: 0; }
.done-card { text-align: center; }
.done-mark { width: 64px; height: 64px; margin: 0 auto 8px; border-radius: 50%; background: #e2f4ea; color: var(--green);
  font-size: 36px; line-height: 64px; font-weight: 700; }
.app-tabs { position: sticky; top: 0; z-index: 20; padding: 8px 0; margin-top: -8px; background: var(--bg, #eef1f7); display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; gap: 6px; margin-bottom: 12px; }
.app-tabs a { display: block; text-align: center; padding: 11px 0; border-radius: 12px; background: #fff; color: var(--muted);
  font-weight: 700; text-decoration: none; border: 1px solid #dfe4ee; }
.app-tabs a.on { background: var(--brand); color: #fff; border-color: var(--brand); }
.day-list { list-style: none; margin: 0; padding: 0; }
.day-list li { display: grid; grid-template-columns: 52px 1fr auto; gap: 10px; align-items: center; padding: 10px 0; border-top: 1px solid #eef0f5; }
.day-list li:first-child { border-top: 0; }
.day-list .d { font-weight: 700; text-align: center; line-height: 1.2; }
.day-list .d small { display: block; color: var(--muted); font-weight: 600; }
.day-list .d.off { color: var(--red); }
.day-list .t { font-variant-numeric: tabular-nums; font-weight: 600; }
.day-list .lbl { display: block; font-size: 14px; color: var(--muted); font-weight: 500; }
.day-list .lbl.warn { color: #8a5a00; font-weight: 700; }
.day-list .lbl.bad { color: var(--red); font-weight: 700; }
.day-list .fix { font-size: 13px; padding: 6px 10px; min-height: 0; width: auto; }
.wifi-note { background: #eef3ff; color: var(--brand); padding: 10px 12px; border-radius: 10px; font-size: 14px; font-weight: 600; }
/* 도시락 */
.lunch-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.lunch-list li { border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; display: grid; gap: 8px; }
.lunch-list li.hl { border-color: var(--brand); background: var(--brand-weak); }
.lunch-list li.closed { opacity: .7; }
.lunch-day { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.lunch-day b { font-size: 17px; }
.lunch-n { font-size: 22px; font-weight: 700; margin-left: auto; }
.lunch-btns { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.lunch-btns .btn { margin: 0; min-height: 48px; }
.lunch-btns .btn:disabled { opacity: 1; }
/* 사용법 */
.help-q { display: inline-block; margin-left: 6px; padding: 3px 10px; border-radius: 999px; background: var(--brand-weak);
  color: var(--brand) !important; font-size: 13px; font-weight: 700; text-decoration: none; vertical-align: middle; line-height: 1.5; letter-spacing: 0; }
h1 .help-q { font-size: 14px; }
.help-toc { display: flex; flex-wrap: wrap; gap: 6px; margin: 12px 0; }
.help-toc a { padding: 7px 11px; border-radius: 999px; background: var(--brand-weak); color: var(--brand); font-size: 14px; font-weight: 700; text-decoration: none; }
.help { scroll-margin-top: 12px; }
.help h2 { margin-top: 0; } .help h3 { font-size: 16px; margin: 16px 0 6px; }
.help ol, .help ul { padding-left: 22px; } .help li { margin: 6px 0; line-height: 1.55; }
.help .hl-li { background: #fff6e0; border-radius: 8px; padding: 6px 8px; margin-left: -8px; list-style: none; }
.help-table { width: 100%; border-collapse: collapse; font-size: 15px; }
.help-table th { text-align: left; white-space: nowrap; padding: 8px 10px 8px 0; color: var(--muted); vertical-align: top; }
.help-table td { padding: 8px 0; border-top: 1px solid #eef0f5; } .help-table tr:first-child td { border-top: 0; }
.flow { list-style: none; padding: 0 !important; counter-reset: f; }
.flow li { counter-increment: f; position: relative; padding: 0 0 12px 40px !important; margin: 0 !important; }
.flow li::before { content: counter(f); position: absolute; left: 0; top: 0; width: 28px; height: 28px; border-radius: 50%;
  background: var(--brand); color: #fff; text-align: center; line-height: 28px; font-weight: 700; }
.flow li span { display: block; color: var(--muted); font-size: 15px; }
.help details { border-top: 1px solid #eef0f5; padding: 10px 0; } .help details summary { font-weight: 700; cursor: pointer; }
.help details p { margin: 8px 0 0; }
.part-grid { grid-template-columns: 1fr 1fr; gap: 0 8px; }
.part-grid .wide { grid-column: auto; }
#part-time { font-weight: 700; color: var(--brand); font-size: 16px; }
