/* 현장 모드(Worker Mode) — 글자 최소, 큰 아이콘·숫자·버튼. © 2026 Designovel Inc. */
:root { --f-pad: 16px; --f-radius: 22px; --f-btn: 84px; }
body.field-mode .header, body.field-mode .sidebar, body.field-mode .tabbar { display: none !important; }
body.field-mode .app { grid-template-columns: minmax(0, 1fr) !important; grid-template-areas: none !important; grid-template-rows: auto 1fr !important; }
body.field-mode .main { grid-area: auto !important; padding: 0 !important; max-width: none !important; padding-bottom: 24px !important; }
body.field-mode { font-size: 20px; }

.fshell { position: sticky; top: 0; z-index: 25; display: flex; align-items: center; gap: 12px; padding: 10px var(--f-pad); background: var(--surface); border-bottom: 1px solid var(--line); min-height: 76px; }
.fshell .fname { flex: 1; min-width: 0; font-size: 22px; font-weight: 800; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.fshell .fname small { display: block; font-size: 14px; font-weight: 500; color: var(--text-3); }
.fshell .fflag { font-size: 30px; line-height: 1; background: none; border: 0; padding: 6px; }
.fshell .fexit { width: 56px; height: 56px; border-radius: 16px; border: 1px solid var(--line); background: var(--surface-2); display: grid; place-items: center; color: var(--text-2); }
.fshell .fcloud { display: inline-flex; align-items: center; gap: 4px; color: var(--warn); font-weight: 800; font-size: 18px; }
.favatar { display: inline-grid; place-items: center; border-radius: 50%; color: #fff; font-weight: 800; object-fit: cover; flex: 0 0 auto; }
.fi { display: inline-grid; place-items: center; }
.fi svg { width: 1em; height: 1em; }

.fpage { padding: var(--f-pad); display: flex; flex-direction: column; gap: 14px; }
.fbig-row { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.fbtn { min-height: var(--f-btn); border-radius: var(--f-radius); border: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; font-size: 20px; font-weight: 800; color: var(--text); background: var(--surface); box-shadow: var(--shadow); cursor: pointer; -webkit-tap-highlight-color: transparent; }
.fbtn .fi { font-size: 36px; }
.fbtn.primary { background: var(--brand); color: #fff; }
.fbtn.ok { background: var(--ok); color: #fff; }
.fbtn.warn { background: var(--warn); color: #fff; }
.fbtn.danger { background: var(--danger); color: #fff; }
.fbtn.ghost { background: var(--surface-2); box-shadow: none; }
.fbtn:active { transform: scale(.97); }
.fbtn:disabled { opacity: .35; }
.fbtn.xl { min-height: 110px; font-size: 26px; }
.fbtn.xl .fi { font-size: 48px; }

/* 작업 카드 */
.fcard { display: grid; grid-template-columns: 96px minmax(0, 1fr) auto; gap: 12px; align-items: center; padding: 12px; border-radius: var(--f-radius); background: var(--surface); box-shadow: var(--shadow); border: 2px solid transparent; text-align: left; width: 100%; color: inherit; }
.fcard.mine { border-color: var(--brand); }
.fcard .fimg { width: 96px; height: 96px; border-radius: 16px; object-fit: cover; background: var(--surface-2); display: grid; place-items: center; color: var(--text-3); font-size: 40px; }
.fcard .fop { display: inline-grid; place-items: center; width: 44px; height: 44px; border-radius: 12px; color: #fff; font-size: 26px; }
.fcard .fmeta { display: flex; align-items: center; gap: 8px; margin-top: 6px; font-size: 18px; font-weight: 700; }
.fcard .fnum { font-size: 44px; font-weight: 900; line-height: 1; }
.fcard .fsub { font-size: 14px; color: var(--text-3); margin-top: 2px; }
.fcard .fright { text-align: right; display: flex; flex-direction: column; align-items: flex-end; gap: 2px; }
.fcard .fdue { font-size: 14px; font-weight: 800; padding: 2px 8px; border-radius: 999px; background: var(--warn-soft); color: var(--warn); }
.fcard .fdue.late { background: var(--danger-soft); color: var(--danger); }
.fcolor { width: 26px; height: 26px; border-radius: 50%; border: 2px solid var(--line); display: inline-grid; place-items: center; font-size: 12px; font-weight: 800; }
.fcolor.txt { background: var(--surface-2); color: var(--text-2); }
.fsize { font-size: 20px; font-weight: 900; background: var(--surface-2); padding: 2px 10px; border-radius: 10px; white-space: nowrap; }
.fempty { text-align: center; padding: 40px 20px; color: var(--text-3); font-size: 20px; }
.fempty .fi { font-size: 64px; display: block; margin-bottom: 10px; }

/* 작업 화면 */
.ftask-head { display: flex; gap: 12px; align-items: center; }
.ftask-head .fimg { width: 72px; height: 72px; border-radius: 14px; object-fit: cover; background: var(--surface-2); flex: 0 0 auto; display: grid; place-items: center; font-size: 44px; color: var(--text-3); }
.ftask-head .ftitle { font-size: 18px; font-weight: 800; line-height: 1.2; }
.ftask-head .fop-line { display: flex; align-items: center; gap: 8px; margin-top: 4px; font-size: 18px; font-weight: 800; }
.ftask-head .fop { display: inline-grid; place-items: center; width: 36px; height: 36px; border-radius: 10px; color: #fff; font-size: 22px; }
.fask { font-size: 17px; font-weight: 800; text-align: center; margin: 0; line-height: 1.2; }
.fqty { text-align: center; font-size: 56px; font-weight: 900; line-height: 1; letter-spacing: -.03em; display: flex; align-items: baseline; justify-content: center; gap: 8px; }
.fqty small { font-size: 20px; font-weight: 700; color: var(--text-3); }
.fqty.over { color: var(--danger); }
.fchips { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.fchips button { min-height: 46px; border-radius: 16px; border: 2px solid var(--line); background: var(--surface); font-size: 22px; font-weight: 800; color: var(--text); }
.fpad { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.fpad button { min-height: 50px; border-radius: 14px; border: 0; background: var(--surface); box-shadow: var(--shadow); font-size: 28px; font-weight: 800; color: var(--text); }
.fpad button.fn { background: var(--surface-2); box-shadow: none; font-size: 26px; color: var(--text-2); }
.fpad button:active { transform: scale(.96); }
.fissue { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.fissue button { min-height: 68px; border-radius: 16px; border: 3px solid var(--line); background: var(--surface); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; font-size: 17px; font-weight: 800; color: var(--text); }
.fissue button .fi { font-size: 26px; }
.fissue button.on-ok { border-color: var(--ok); background: var(--ok-soft); color: var(--ok); }
.fissue button.on-warn { border-color: var(--warn); background: var(--warn-soft); color: var(--warn); }
.fissue button.on-danger { border-color: var(--danger); background: var(--danger-soft); color: var(--danger); }
.fissue button .fn-badge { font-size: 22px; font-weight: 900; }
.ftask { padding: 10px 12px 108px; gap: 8px; }
.fsave-bar { position: fixed; left: 0; right: 0; bottom: 0; z-index: 30; padding: 6px 12px calc(6px + env(safe-area-inset-bottom)); background: var(--bg); }
.fsave { min-height: 88px; font-size: 26px; flex-direction: row; gap: 12px; width: 100%; }
.fsave .fi { font-size: 40px; }
.fsave.off { background: var(--warn); }

/* 결과 화면 */
.fdone { min-height: calc(100dvh - 76px); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 18px; color: #fff; background: var(--ok); text-align: center; padding: 24px; }
.fdone.queued { background: var(--warn); }
.fdone > .fi { font-size: 140px; }
.fdone .fsub .fi { font-size: 28px; vertical-align: middle; }
.fdone .fnum { font-size: 96px; font-weight: 900; line-height: 1; }
.fdone .fmsg { font-size: 26px; font-weight: 800; }
.fdone .fsub { font-size: 18px; opacity: .9; }
.fdone .fbtn { width: 100%; max-width: 420px; background: rgba(255,255,255,.18); color: #fff; box-shadow: none; }
@keyframes fpop { 0% { transform: scale(.4); opacity: 0 } 70% { transform: scale(1.1) } 100% { transform: scale(1); opacity: 1 } }
.fdone > .fi { animation: fpop .5s ease-out; }

/* 공용 기기 작업자 선택 */
.fworkers { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.fworkers button { min-height: 132px; border-radius: 20px; border: 2px solid var(--line); background: var(--surface); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px; font-size: 20px; font-weight: 800; color: var(--text); padding: 10px 6px; }
.fworkers button:active { background: var(--surface-2); }
.fworkers .fname { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%; }
.fpin { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.fpin button { min-height: 78px; border-radius: 18px; border: 0; background: var(--surface-2); font-size: 34px; font-weight: 800; color: var(--text); }
.fpin button.fn { font-size: 20px; color: var(--text-2); }
.fpin-dots { display: flex; gap: 14px; justify-content: center; padding: 12px; }
.fpin-dots span { width: 18px; height: 18px; border-radius: 50%; background: var(--line); }
.fpin-dots span.on { background: var(--brand); }

/* 첫 사용 안내 */
.fwalk { position: fixed; inset: 0; z-index: 60; background: color-mix(in srgb, var(--brand) 92%, #000); color: #fff; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 20px; padding: 24px; text-align: center; }
.fwalk .steps { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; width: 100%; max-width: 480px; }
.fwalk .step { background: rgba(255,255,255,.12); border-radius: 20px; padding: 18px 8px; display: flex; flex-direction: column; align-items: center; gap: 8px; font-size: 16px; font-weight: 800; }
.fwalk .step .fi { font-size: 48px; }
.fwalk .step .n { width: 30px; height: 30px; border-radius: 50%; background: #fff; color: var(--brand); display: grid; place-items: center; font-weight: 900; }
.fwalk .fbtn { width: 100%; max-width: 480px; background: #fff; color: var(--brand); }

/* 설정 시트(아바타 길게 누르기) */
.flangs { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.flangs button { min-height: 72px; border-radius: 18px; border: 2px solid var(--line); background: var(--surface); font-size: 20px; font-weight: 800; color: var(--text); display: flex; align-items: center; justify-content: center; gap: 10px; }
.flangs button.active { border-color: var(--brand); background: var(--accent-soft); }
.flangs .fl { font-size: 30px; }

@media (min-width: 720px) { .fpage { max-width: 560px; margin: 0 auto; } .fshell > * { max-width: none; } }
