﻿/* 색 구성: 남색(슬레이트) 계열 바탕 + 파랑 강조, 상태색 4가지는 모든 화면에서 동일하게 사용 */
:root {
  --bg: #eef2f7;          /* 화면 바탕 (차분한 회청색) */
  --card: #ffffff;
  --card-line: #e3e9f1;   /* 카드 테두리 */
  --text: #1e293b;
  --heading: #0f172a;
  --muted: #64748b;
  --line: #e5e9f0;
  --track: #edf1f7;       /* 그래프 빈 부분 */
  --primary: #2563eb;
  --navy: #0f172a;        /* 상단 메뉴 */
  --wait: #94a3b8;        /* 대기 */
  --doing: #3b82f6;       /* 진행중 */
  --late: #ef4444;        /* 지연 */
  --done: #10b981;        /* 완료 */
  --radius: 14px;
}
* { box-sizing: border-box; }
html, body { margin: 0; }
body {
  font-family: "Pretendard Variable", "Pretendard", -apple-system, BlinkMacSystemFont, "Apple SD Gothic Neo", "Malgun Gothic", sans-serif;
  background: var(--bg); color: var(--text); font-size: 15px; line-height: 1.5;
}
a { color: var(--primary); }
.hidden { display: none !important; }
.muted { color: var(--muted); }
.small { font-size: 12px; }
.mt { margin-top: 16px; }

/* 상단바 */
.topbar {
  position: sticky; top: 0; z-index: 2000;
  height: 56px; padding: 0 20px;
  display: flex; align-items: center; justify-content: space-between;
  background: var(--navy); color: #fff;
  box-shadow: 0 1px 0 rgba(255,255,255,.04), 0 2px 8px rgba(15,23,42,.18);
}
.brand { font-weight: 700; font-size: 17px; white-space: nowrap; }
.topbar nav { display: flex; align-items: center; gap: 16px; }
.topbar nav a { color: #cbd5e1; text-decoration: none; font-size: 14px; }
.topbar nav a.active { color: #fff; font-weight: 700; }
.nav-user { color: #fff; font-size: 13px; padding-left: 16px; border-left: 1px solid #334155; }
.nav-btn { background: none; border: 0; color: #94a3b8; font-size: 13px; cursor: pointer; padding: 0; font-family: inherit; }
.nav-btn:hover { color: #fff; }

/* 로그인 화면 */
.login-page { min-height: 100vh; display: flex; flex-direction: column; align-items: center; background: #fff; }
/* 위쪽 위치를 고정 → 오류·안내 문구가 나타나도 창이 위로 움직이지 않고 아래로만 늘어남 */
.login-page main { width: 100%; padding-top: clamp(32px, 18vh, 180px); padding-bottom: 120px; }
/* 고객사 CI (로그인 창 위) */
.login-client-ci { display: block; height: 56px; max-width: min(80%, 320px); object-fit: contain; margin: 0 auto 28px; }
/* 당사 CI (오른쪽 하단) */
.login-footer { position: fixed; right: 28px; bottom: 22px; display: flex; flex-direction: column; align-items: flex-end; gap: 6px; }
.login-company-ci { display: block; height: 34px; max-width: 220px; object-fit: contain; }
.login-copy { font-size: 11px; color: #9ca3af; letter-spacing: .2px; }
.login-copy:empty { display: none; }
.login-brand { font-size: 22px; font-weight: 800; text-align: center; letter-spacing: -0.3px; }
.login-sub { font-size: 12px; color: #9ca3af; text-align: center; letter-spacing: .4px; margin: 4px 0 24px; }
.login-card label, .dialog label { display: block; font-size: 13px; color: var(--muted); margin-bottom: 10px; }
.login-card label input, .dialog label input { display: block; width: 100%; margin-top: 4px; min-width: 0; }
.login-card input::placeholder { color: #b6bcc6; }
.form-err { color: var(--late); font-size: 13px; min-height: 18px; margin: 4px 0 10px; }
/* 비밀번호 보기 버튼 */
.pw-wrap { position: relative; display: block; }
.login-card .pw-wrap input { padding-right: 44px; }
.pw-toggle {
  position: absolute; right: 6px; top: 6px; bottom: 14px; width: 34px;
  display: flex; align-items: center; justify-content: center;
  border: 0; background: none; border-radius: 6px; color: #9ca3af; cursor: pointer;
}
.pw-toggle:hover { color: var(--text); background: #f3f4f6; }
.pw-toggle svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.pw-toggle .eye-off, .pw-toggle[aria-pressed="true"] .eye-open { display: none; }
.pw-toggle[aria-pressed="true"] .eye-off { display: block; }
.caps-warn { margin: -8px 0 12px; font-size: 12px; color: #b45309; }
.caps-warn::before { content: "⚠ "; }
.dialog .caps-warn { margin: -2px 0 10px; font-weight: 600; }
/* 아이디 기억하기 */
.login-card label.remember { display: inline-flex; align-items: center; gap: 7px; margin: -2px 0 14px; cursor: pointer; user-select: none; color: var(--text); }
.login-card label.remember input { display: inline-block; width: 16px; height: 16px; margin: 0; accent-color: var(--primary); cursor: pointer; }
/* 로그인 오류 알림 */
.login-alert {
  margin: 0 0 14px; padding: 10px 12px; border-radius: 8px;
  background: #fef2f2; border: 1px solid #fecaca; color: #b91c1c; font-size: 13px;
}
.login-submit { width: 100%; }
/* 로그인 버튼: 평소엔 기본 파랑 → 마우스 올리면 확실히 진한 남색 (차이가 분명히 보이도록) */
.btn.login-submit:not(:disabled):hover { background: #1e3a8a; }
.btn.login-submit:not(:disabled):active { background: #172554; }
/* 로그인 만료 안내 */
.login-info {
  margin: 0 0 16px; padding: 10px 12px; border-radius: 8px;
  background: #eff6ff; border: 1px solid #bfdbfe; color: #1e40af; font-size: 13px;
}

/* 비밀번호 변경 창 */
.dialog { border: 0; border-radius: var(--radius); padding: 22px; width: min(380px, calc(100% - 32px)); box-shadow: 0 10px 40px rgba(0,0,0,.25); }
.dialog::backdrop { background: rgba(0,0,0,.4); }
.dialog h2 { font-size: 17px; margin: 0 0 14px; }
.dash-win-dialog h2 { margin-bottom: 6px; }
.dash-win-dialog p { margin: 0 0 18px; }
.dash-win-dialog .btn { min-width: 84px; }
.dialog input[type=datetime-local] {
  box-sizing: border-box; border: 1px solid var(--line); border-radius: 8px; padding: 9px 10px;
  font: inherit; font-size: 15px; color: var(--text); background: #fff;
}
.dialog input[type=datetime-local]:focus { outline: 2px solid color-mix(in srgb, var(--primary) 35%, transparent); border-color: var(--primary); }

/* 사용자 관리 */
.user-form { display: grid; grid-template-columns: 1fr 1fr 1.3fr 1.2fr auto; gap: 8px; margin-bottom: 4px; }
#user-form > * { min-width: 0; }   /* 입력칸 공통 최소 220px(input[type=text])보다 우선 — 휴대폰에서 칸이 화면 밖으로 밀리지 않게 */
select { border: 1px solid var(--line); border-radius: 8px; padding: 8px 10px; font-size: 14px; background: #fff; font-family: inherit; }
.role-admin { background: #1118271a; color: #111827; }
.role-worker { background: #2563eb1a; color: #2563eb; }
.role-client { background: #0f766e1a; color: #0f766e; }

main { max-width: 1280px; margin: 0 auto; padding: 20px; }
.page-head { display: flex; align-items: center; gap: 12px; margin-bottom: 16px; flex-wrap: wrap; }
.page-head h1 { font-size: 22px; margin: 0; margin-right: auto; }

.card {
  background: var(--card); border-radius: var(--radius); padding: 18px;
  border: 1px solid var(--card-line); box-shadow: 0 1px 2px rgba(15,23,42,.04), 0 6px 16px rgba(15,23,42,.04);
}
.card h2 { font-size: 15px; margin: 0 0 12px; color: var(--heading); font-weight: 700; letter-spacing: -.2px; }
.card-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 12px; }
.card-head h2 { margin: 0; }

.notice { background: #fff7ed; border: 1px solid #fed7aa; color: #9a3412; padding: 12px 16px; border-radius: 10px; margin-bottom: 16px; }

.c-wait { color: var(--wait); } .c-doing { color: var(--doing); } .c-late { color: var(--late); } .c-done { color: var(--done); }

/* 대시보드 배치 (PC) — 세로 3칸
   ┌ 전체 진척률 ┬ 작업별 진척률 (3칸 차지) ────────────────────┐
   │  (2칸 높이) ├ 공지/최근 작업(탭) ┬ 상면 현황 ┬ 운송 현황    ┤
   ├ 날짜·시간  ┤                   │           │ (거의 정사각형) │
   └────────────┴──────────────────┴───────────┴───────────────┘
   상면·지도는 [크게 보기]가 있음 (2026-12-01 사용자 요청: 지도 칸 줄이고 가운데에 상면 현황) */
.charts {
  display: grid; gap: 16px;
  grid-template-columns: minmax(330px, 0.85fr) minmax(0, 1.1fr) minmax(0, 1.4fr) minmax(0, 1.35fr);
  grid-template-areas: "ov st st st" "ov sp fl mp" "cl sp fl mp";
}
.floor-card { grid-area: fl; }
.charts > * { min-width: 0; } /* 그래프가 카드 폭을 넘겨 화면 밖으로 밀리지 않도록 */
.overview-card { grid-area: ov; container-type: inline-size; }
.stage-card { grid-area: st; }
.clock-card { grid-area: cl; }
.map-card { grid-area: mp; }
.spare-card { grid-area: sp; min-height: 200px; }
.chart-card { display: flex; flex-direction: column; }
.chart-box { position: relative; height: 240px; }
#stage-box { height: auto; flex: 1; min-height: 260px; }
#stage-box canvas { position: absolute; inset: 0; } /* 카드 크기를 따라가도록 */

/* 현재 날짜·시간 → 버튼 → 개시·종료 일시 (글자 크기는 카드 크기에 맞춰 자동 조절) */
.clock-card {
  display: flex; flex-direction: column; justify-content: center; gap: 10px;
  padding: 18px; container-type: inline-size;
}
.clock-main { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 2px; }
.clock-date { font-size: clamp(13px, 5cqw, 17px); font-weight: 600; color: var(--muted); letter-spacing: -.2px; }
.clock-date .clock-wd { color: var(--primary); font-weight: 700; }
.clock-time {
  display: flex; align-items: baseline; justify-content: center;
  font-size: clamp(36px, 19cqw, 84px); font-weight: 800; line-height: 1; letter-spacing: -.02em;
  color: var(--heading); font-variant-numeric: tabular-nums;
}
/* 초는 작고 연하게 → 시:분이 한눈에 들어옴 */
.clock-sec { font-size: .45em; font-weight: 700; color: #94a3b8; margin-left: .08em; letter-spacing: 0; }
.clock-actions { display: flex; justify-content: center; flex-wrap: wrap; gap: 6px; }
.clock-actions select { padding: 4px 8px; font-size: 12px; }

/* 작업 개시·종료 일시 */
.op-times {
  display: flex; flex-direction: column; gap: 8px;
  padding: 14px 18px; border-radius: 10px; background: #f8fafc; border: 1px solid var(--line);
}
.op-row { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; font-size: 14px; }
.op-label { color: var(--muted); font-weight: 600; font-size: 13px; white-space: nowrap; }
.op-label::before { content: ""; display: inline-block; width: 6px; height: 6px; border-radius: 50%; margin-right: 6px; vertical-align: 2px; background: var(--primary); }
.op-row + .op-row .op-label::before { background: var(--done); }
.op-value { color: var(--heading); font-variant-numeric: tabular-nums; white-space: nowrap; }
.op-value.unset { color: #94a3b8; font-weight: 500; }
/* ---- 도움말 (사용 안내서) */
.help-page main { max-width: 1180px; }
.help-page .adm-tabs { top: 64px; }
.help-layout { display: grid; grid-template-columns: 210px 1fr; gap: 24px; align-items: start; }
.help-toc { position: sticky; top: 130px; display: flex; flex-direction: column; gap: 2px; font-size: 14px; }
.help-toc a { padding: 7px 10px; border-radius: 8px; color: var(--text); text-decoration: none; }
.help-toc a:hover { background: #fff; color: var(--primary); }
.help-body { min-width: 0; }
.guide { background: var(--card); border: 1px solid var(--card-line); border-radius: var(--radius); padding: 24px 32px 32px; }
.guide .lead { font-size: 16px; line-height: 1.7; margin: 0 0 8px; padding: 14px 16px; background: #f5f8ff; border-radius: 10px; }
.guide h2 { font-size: 21px; margin: 34px 0 12px; padding-top: 6px; color: var(--heading); scroll-margin-top: 130px; border-top: 1px solid var(--line); padding-top: 22px; }
.guide h3 { font-size: 16px; margin: 20px 0 8px; }
.guide p, .guide li { font-size: 15px; line-height: 1.75; }
.guide ol, .guide ul { padding-left: 22px; }
.guide li { margin: 3px 0; }
.guide img { display: block; max-width: 100%; margin: 12px 0 4px; border: 1px solid var(--card-line); border-radius: 10px; box-shadow: 0 2px 10px rgba(15,23,42,.08); }
.guide img.narrow { max-width: 300px; }
.guide img.mid { max-width: 520px; }
.guide .cap { font-size: 13px; color: var(--muted); margin-top: 0; }
.guide table { width: 100%; border-collapse: collapse; margin: 12px 0; font-size: 14px; }
.guide th { text-align: left; background: #f1f5f9; color: var(--muted); font-weight: 700; padding: 8px 12px; border-bottom: 1px solid var(--line); white-space: nowrap; }
/* 안내서 표: 일반 표(th, td 한 줄 고정)와 달리 긴 설명은 칸 안에서 줄바꿈. 한글은 낱말 단위로 끊음 */
.guide td { padding: 8px 12px; border-bottom: 1px solid #eef2f7; vertical-align: top; line-height: 1.6;
  white-space: normal; word-break: keep-all; overflow-wrap: anywhere; }
.guide td:first-child { width: 26%; min-width: 96px; }
.guide p, .guide li { word-break: keep-all; overflow-wrap: anywhere; }
.guide code { background: #f1f5f9; padding: 1px 6px; border-radius: 5px; font-size: .92em; overflow-wrap: anywhere; word-break: break-all; }
.guide .sw { display: inline-block; width: 12px; height: 12px; border-radius: 3px; margin-right: 6px; vertical-align: -1px; }
.sw.done { background: var(--done); } .sw.doing { background: var(--doing); } .sw.late { background: var(--late); } .sw.wait { background: var(--wait); }
.guide .dot { display: inline-block; width: 13px; height: 13px; border-radius: 50%; vertical-align: -1px; }
.guide .dot.r { background: #ef4444; } .guide .dot.g { background: #22c55e; }
.guide .tag { font-size: 12px; font-weight: 700; color: #b45309; background: #fff7ed; border: 1px solid #fed7aa; padding: 0 6px; border-radius: 5px; }
/* ---- 항목 구분: 큰 제목마다 한 칸(카드) + 번호 머리띠 (help.js가 h2 단위로 section.g-sec로 묶음) */
.guide { background: none; border: 0; padding: 0; display: flex; flex-direction: column; gap: 18px; }
.guide .lead { margin: 0; background: var(--card); border: 1px solid var(--card-line); border-left: 4px solid var(--primary); border-radius: var(--radius); padding: 16px 20px; }
.g-sec { background: var(--card); border: 1px solid var(--card-line); border-radius: var(--radius); padding: 0 28px 24px; box-shadow: 0 1px 3px rgba(15,23,42,.05); }
.guide .g-sec > h2 {
  display: flex; align-items: center; gap: 12px; margin: 0 -28px 18px; padding: 16px 28px; border: 0;
  border-bottom: 1px solid var(--line); border-radius: var(--radius) var(--radius) 0 0;
  background: linear-gradient(90deg, #f1f6ff, #fff 70%); font-size: 20px;
}
.guide .g-sec > h2::before {
  content: attr(data-no); flex: none; min-width: 34px; height: 26px; padding: 0 8px; border-radius: 7px; box-sizing: border-box;
  display: inline-flex; align-items: center; justify-content: center;
  background: var(--primary); color: #fff; font-size: 13px; font-weight: 800; letter-spacing: .5px;
}
/* 소제목: 표·목록이 무엇을 설명하는지 */
.guide h3 {
  display: flex; align-items: center; gap: 8px; margin: 26px 0 10px; padding: 0; border: 0;
  font-size: 15.5px; font-weight: 800; color: var(--heading); line-height: 1.4;
}
.guide h3::before { content: ""; flex: none; width: 4px; height: 16px; border-radius: 2px; background: var(--primary); }
.g-sec > :last-child { margin-bottom: 0; }
/* 본문 가독성: 글자색·줄 간격·글머리 기호 */
.guide p, .guide li { color: #334155; }
.guide b { color: var(--heading); }
.guide ul { list-style: none; padding-left: 4px; }
.guide ul > li { position: relative; padding-left: 18px; }
.guide ul > li::before {
  content: ""; position: absolute; left: 3px; top: .72em; width: 6px; height: 6px; border-radius: 50%;
  background: color-mix(in srgb, var(--primary) 70%, #fff);
}
.guide ol { padding-left: 24px; }
.guide ol > li::marker { color: var(--primary); font-weight: 800; }
/* 표: 둥근 테두리 상자 + 머리줄 연한 파랑 */
.guide table { border: 1px solid var(--line); border-radius: 10px; border-collapse: separate; border-spacing: 0; overflow: hidden; margin: 10px 0 14px; }
.guide th { background: #f3f7fe; color: #475569; font-size: 13px; padding: 10px 14px; border-bottom: 1px solid var(--line); }
.guide td { padding: 10px 14px; color: #334155; }
.guide tr:last-child td { border-bottom: 0; }
.guide td:first-child { font-weight: 600; color: var(--heading); }
.help-toc a { display: flex; align-items: baseline; gap: 8px; }
.toc-no { flex: none; font-size: 11px; font-weight: 800; color: var(--primary); font-variant-numeric: tabular-nums; }
/* 캡처 나란히: PC 화면 + 남은 공간에 휴대폰 화면 */
.shot-row { display: flex; align-items: flex-end; gap: 20px; margin: 14px 0 6px; }   /* 아래 맞춤 → 두 설명 글이 같은 줄 */
.shot-row figure { margin: 0; display: flex; flex-direction: column; align-items: center; gap: 8px; min-width: 0; }
.shot-row img { margin: 0; width: 100%; }
.shot-pc { flex: 1 1 auto; max-width: 560px; }
.shot-m { flex: 0 1 200px; }
.shot-row figcaption { font-size: 13.5px; font-weight: 700; color: var(--heading); }
/* ---- 관리자 안내서 01 '시스템 한눈에 보기' 구성도: 1 사용자 → (https) → 2 Cloudflare → (터널) → 3 서버 PC
   넓은 화면은 가로로, 좁은 화면(860px 이하)은 세로로 */
.sysflow { display: grid; grid-template-columns: minmax(0, .8fr) 96px minmax(0, 1.1fr) 96px minmax(0, 1.1fr); margin: 14px 0 6px; }
.sf-box { display: flex; flex-direction: column; align-items: center; gap: 10px; padding: 16px 12px; text-align: center;
  border: 2px solid #cbd5e1; border-radius: 16px; background: #f8fafc; word-break: keep-all; min-width: 0; }
.sf-head { display: flex; align-items: center; gap: 8px; font-size: 16px; font-weight: 800; color: var(--heading); }
.sf-head em { font-style: normal; display: inline-grid; place-items: center; width: 24px; height: 24px; border-radius: 50%;
  font-size: 13px; font-weight: 800; color: #ffffff; background: #475569; }
.sf-ic { font-size: 34px; line-height: 1.1; }
.sf-cf { border-color: #fdba74; background: #fff7ed; }
.sf-cf .sf-head em { background: #ea580c; }
.sf-pc { border-color: #93c5fd; background: #eff6ff; }
.sf-pc .sf-head em { background: #2563eb; }
.sf-user { justify-content: center; }
.sf-user .sf-ic { font-size: 40px; }
/* A·B 동그라미: Cloudflare 칸과 서버 PC 칸에서 같은 색 → 어디로 나뉘어 가는지 색으로 이어 보임 */
.sysflow b.sf-ab { display: inline-grid; place-items: center; width: 22px; height: 22px; border-radius: 50%; border: 1px solid;
  font-size: 12px; font-weight: 800; vertical-align: middle; }
.sysflow b.sf-ab.a { color: #1d4ed8; background: #eef4ff; border-color: #93c5fd; }
.sysflow b.sf-ab.b { color: #047857; background: #ecfdf5; border-color: #6ee7b7; }
.sysflow b.sf-ab.c { color: #5b21b6; background: #f5f3ff; border-color: #c4b5fd; }
.sf-list { display: flex; flex-direction: column; gap: 8px; width: 100%; text-align: left; font-size: 13.5px; line-height: 1.55; color: #334155; }
.sf-list > div { display: flex; gap: 8px; padding: 8px 10px; border-radius: 10px; background: #ffffff; border: 1px solid #fed7aa; }
.sf-folder { font-size: 13.5px; font-weight: 700; color: var(--heading); }
.sf-prog { width: 100%; padding: 7px 10px; border-radius: 10px; background: #ffffff; border: 1px solid #bfdbfe; font-size: 13.5px; font-weight: 700; color: var(--heading); }
.sf-prog small { font-weight: 500; color: var(--muted); }
.sf-lanes { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); gap: 6px; width: 100%; }
.sf-lane { display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 8px 4px; min-width: 0; text-align: center; line-height: 1.35; border-radius: 10px; background: #ffffff; border: 1px solid #dbe3ee; font-size: 12.5px; color: #475569; }
.sysflow .sf-lane b.sf-ab { width: 26px; height: 26px; font-size: 13px; }
/* 화살표: 라벨 + 선(끝에 삼각형) + 작은 설명 */
.sf-arrow { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; padding: 0 6px; text-align: center; }
.sf-al { padding: 3px 9px; border-radius: 999px; font-size: 13px; font-weight: 800; white-space: nowrap; border: 1px solid; }
.sf-arrow i { position: relative; display: block; width: 100%; height: 3px; border-radius: 2px; }
/* 양쪽 화살표(⇄): 요청이 가고, 화면이 같은 길로 돌아옴 */
.sf-arrow i::after, .sf-arrow i::before { content: ""; position: absolute; top: 50%; transform: translateY(-50%); border: 7px solid transparent; }
.sf-arrow i::after { right: -2px; border-left: 10px solid; border-right: 0; }
.sf-arrow i::before { left: -2px; border-right: 10px solid; border-left: 0; }
.sf-arrow small { font-size: 11.5px; color: var(--muted); line-height: 1.4; word-break: keep-all; }
.sf-arrow.lock .sf-al { color: #15803d; background: #f0fdf4; border-color: #bbf7d0; }
.sf-arrow.lock i { background: #16a34a; }
.sf-arrow.lock i::after { border-left-color: #16a34a; }
.sf-arrow.lock i::before { border-right-color: #16a34a; }
.sf-arrow.tunnel .sf-al { color: #c2410c; background: #fff7ed; border-color: #fed7aa; }
.sf-arrow.tunnel i { background: #ea580c; }
.sf-arrow.tunnel i::after { border-left-color: #ea580c; }
.sf-arrow.tunnel i::before { border-right-color: #ea580c; }
/* 좁은 화면(휴대폰 등)에서만 세로 배치 — 인쇄(A4 폭 약 680px)는 가로 배치 유지 */
@media screen and (max-width: 860px) {
  .sysflow { grid-template-columns: 1fr; max-width: 420px; }
  .sf-arrow { flex-direction: row; justify-content: flex-start; gap: 10px; padding: 6px 0 6px calc(50% - 1.5px); }
  .sf-arrow i { order: -1; width: 3px; height: 34px; }
  .sf-arrow i::after, .sf-arrow i::before { right: auto; left: 50%; transform: translateX(-50%); border: 7px solid transparent; }
  .sf-arrow i::after { top: auto; bottom: -3px; border-top: 10px solid; border-bottom: 0; }
  .sf-arrow i::before { top: -3px; border-bottom: 10px solid; border-top: 0; }
  .sf-arrow.lock i::after { border-top-color: #16a34a; }
  .sf-arrow.lock i::before { border-bottom-color: #16a34a; }
  .sf-arrow.tunnel i::after { border-top-color: #ea580c; }
  .sf-arrow.tunnel i::before { border-bottom-color: #ea580c; }
  .sf-arrow i { height: 40px; }
  .sf-arrow small { text-align: left; }
}
@media print {
  .sysflow { break-inside: avoid; grid-template-columns: minmax(0, .7fr) 62px minmax(0, 1.15fr) 62px minmax(0, 1.15fr); }
  .sf-box { padding: 10px 8px; gap: 7px; }
  .sf-head { font-size: 13px; gap: 6px; }
  .sf-head em { width: 20px; height: 20px; }
  .sf-ic { font-size: 26px; }
  .sf-user .sf-ic { font-size: 30px; }
  .sf-list, .sf-folder, .sf-prog { font-size: 11px; }
  .sf-list > div { padding: 6px 7px; gap: 5px; }
  .sf-lane { font-size: 10px; padding: 6px 2px; }
  .sysflow .sf-lane b.sf-ab { width: 22px; height: 22px; font-size: 11px; }
  .sf-arrow { padding: 0 3px; gap: 4px; }
  .sf-al { font-size: 10px; padding: 2px 6px; }
  .sf-arrow small { font-size: 9px; }
}
@media (max-width: 860px) {
  .g-sec { padding: 0 16px 18px; }
  .guide .g-sec > h2 { margin: 0 -16px 14px; padding: 13px 16px; font-size: 18px; }
  .shot-row { flex-wrap: wrap; justify-content: center; }
  .shot-pc { flex-basis: 100%; max-width: none; }
  .shot-m { flex: 0 1 220px; }
}
@media (max-width: 860px) {
  .help-layout { grid-template-columns: 1fr; }
  .help-toc { position: static; flex-direction: row; flex-wrap: wrap; gap: 4px; }
  .help-toc a { background: #fff; border: 1px solid var(--line); font-size: 13px; padding: 5px 10px; }
  .guide img.narrow { max-width: 220px; }
  .guide th, .guide td { padding: 7px 8px; }
  .guide td:first-child { width: 32%; min-width: 0; }
}
/* 도움말 인쇄·PDF: 보고서·라벨용 '여백 0' 설정과 따로, 종이 네 변에 여백을 둠 (이름 붙인 페이지) */
@page helpdoc { size: A4; margin: 16mm 15mm 18mm; }
@media print {
  .help-page main { page: helpdoc; max-width: none; padding: 0; margin: 0; }
  .help-page { background: #fff; }
  .help-page .topbar, .help-page .adm-tabs, .help-toc, .help-page .page-head .btn, .help-page #bottom-nav { display: none !important; }
  .help-page .page-head { margin: 0 0 6mm; padding-bottom: 3mm; border-bottom: 2px solid var(--heading); }
  .help-page .page-head h1 { font-size: 20pt; }
  .help-layout { display: block; }
  .guide { border: 0; padding: 0; gap: 6mm; }
  .guide .lead { border-left-width: 3px; }
  .g-sec { box-shadow: none; padding: 0 7mm 6mm; break-inside: auto; }
  .guide .g-sec > h2 { margin: 0 -7mm 5mm; padding: 4mm 7mm; font-size: 15pt; break-after: avoid; }
  .guide h2, .guide h3 { break-after: avoid; }
  .guide p, .guide li { font-size: 10.5pt; line-height: 1.7; }
  .guide table { font-size: 10pt; }
  .guide tr { break-inside: avoid; }
  .guide img { max-height: 120mm; break-inside: avoid; box-shadow: none; }
  /* 종이에서도 PC·모바일 캡처를 나란히 (위아래로 쌓이면 통째로 다음 장으로 넘어가 빈 공간이 생김) */
  .shot-row { break-inside: avoid; flex-wrap: nowrap; justify-content: flex-start; }
  .shot-pc { flex: 1 1 auto; max-width: none; }
  .shot-m { flex: 0 0 25%; }
  .guide .lead, .guide .g-sec > h2, .guide th, .guide h3::before, .guide ul > li::before, .guide .g-sec > h2::before {
    -webkit-print-color-adjust: exact; print-color-adjust: exact;
  }
}

/* ---- QR 라벨 인쇄 (A4, 3×8칸) */
.labels-page { background: #e9edf3; }
.lb-tools {
  position: sticky; top: 0; z-index: 10; display: flex; align-items: center; gap: 12px; flex-wrap: wrap;
  padding: 10px 20px; background: #fff; border-bottom: 1px solid var(--card-line); font-size: 14px;
}
.lb-title { font-size: 16px; margin-right: 8px; }
.lb-tools select { margin-left: 4px; }
.lb-chk { display: inline-flex; align-items: center; gap: 4px; }
.lb-tools .btn { margin-left: auto; }
/* 라벨 종류별 용지 설정 (랙 / 장비) */
.lb-setup { max-width: 210mm; margin: 12px auto 0; display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.lb-box { background: #fff; border: 1px solid var(--card-line); border-radius: 12px; padding: 12px 14px; display: flex; flex-direction: column; gap: 8px; font-size: 13px; }
.lb-box.off > :not(.lb-on) { opacity: .45; pointer-events: none; }
.lb-on b { font-size: 15px; }
.lb-row { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 14px; }
.lb-row select { max-width: 100%; }
.lb-start { width: 64px; margin-left: 4px; }
.lb-adv summary { cursor: pointer; color: var(--primary); font-weight: 600; }
.lb-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 6px 10px; margin-top: 8px; }
.lb-grid label { display: flex; flex-direction: column; gap: 2px; font-size: 12px; color: var(--muted); }
.lb-grid input { width: 100%; box-sizing: border-box; }
.lb-grid .lb-reset { grid-column: 1 / -1; justify-self: start; }
@media (max-width: 760px) { .lb-setup { grid-template-columns: 1fr; padding: 0 12px; } }
.lb-help { max-width: 210mm; margin: 10px auto 0; padding: 0 4px; }
.lb-help p { margin: 2px 0; }
.lb-none { text-align: center; margin: 30px 0; }
/* A4 한 쪽: 칸은 mm 좌표로 정확히 배치 (용지 규격대로) */
.lb-page {
  position: relative; width: 210mm; height: 297mm; margin: 12px auto 24px; background: #fff; overflow: hidden;
  box-shadow: 0 4px 24px rgba(15,23,42,.12); break-after: page;
}
.lb-label {
  position: absolute; width: var(--lw); height: var(--lh); box-sizing: border-box; padding: var(--pad);
  display: flex; align-items: center; gap: var(--pad); overflow: hidden;
  outline: 1px dashed #dbe3ee; outline-offset: -1px;     /* 화면 미리보기용 칸 표시 (인쇄 안 됨) */
}
.lb-page.tall .lb-label { flex-direction: column; justify-content: center; text-align: center; }
.lb-qr { flex: none; width: var(--qr); height: var(--qr); }
.lb-qr svg { width: 100%; height: 100%; display: block; }
.lb-text { display: flex; flex-direction: column; gap: .15em; min-width: 0; font-size: var(--fs2); }
.lb-page.tall .lb-text { align-items: center; }
.lb-text b { font-size: var(--fs); line-height: 1.1; word-break: break-all; color: #0f172a; }
.lb-text small { font-size: var(--fs2); color: #475569; line-height: 1.25; word-break: keep-all; }
.lb-kind { font-size: var(--fs2); font-weight: 700; color: #2563eb; }
.lb-label.rack .lb-kind { color: #0f172a; }
.lb-page.tiny .lb-kind, .lb-page.tiny small { display: none; }   /* 아주 작은 칸: ID만 */
.lb-page.bordered .lb-label { outline: none; border: 1px dashed #94a3b8; }   /* 잘라 쓰는 용지: 자를 선 */
.lb-page.bordered .lb-label.rack { border: 1.5px solid #0f172a; }
@media print {
  @page { size: A4; margin: 0; }
  .labels-page { background: #fff; }
  .lb-tools, .lb-help, .lb-setup { display: none; }
  .lb-page { margin: 0; box-shadow: none; }
  .lb-page:last-child { break-after: auto; }
  .lb-label { outline: none; }
  * { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
}

/* ---- 진행 현황 보고서 (A4 인쇄·PDF 저장) */
.report-page { background: #e9edf3; }
.rp-tools {
  position: sticky; top: 0; z-index: 10; display: flex; align-items: center; justify-content: space-between; gap: 12px;
  flex-wrap: wrap; padding: 10px 20px; background: #fff; border-bottom: 1px solid var(--card-line);
}
.rp-sheet {
  width: 210mm; min-height: 297mm; box-sizing: border-box; margin: 20px auto; padding: 14mm 14mm 10mm;
  background: #fff; box-shadow: 0 4px 24px rgba(15,23,42,.12); display: flex; flex-direction: column; gap: 14px;
}
.rp-head { display: flex; align-items: center; gap: 16px; padding-bottom: 12px; border-bottom: 2px solid var(--heading); }
.rp-logo { height: 30px; max-width: 200px; object-fit: contain; }
.rp-titles { flex: 1; min-width: 0; }
.rp-titles h1 { margin: 0; font-size: 22px; letter-spacing: -.5px; color: var(--heading); }
.rp-sub { font-size: 13px; color: var(--muted); font-weight: 600; }
.rp-when { text-align: right; font-size: 12px; color: var(--muted); display: flex; flex-direction: column; }
.rp-when b { font-size: 14px; color: var(--heading); font-variant-numeric: tabular-nums; }
.rp-sheet h2 { font-size: 14px; margin: 0 0 6px; color: var(--heading); padding-left: 8px; border-left: 3px solid var(--primary); }
.rp-kpis { display: grid; grid-template-columns: 1.3fr repeat(4, 1fr); gap: 8px; }
.rp-kpi { display: flex; flex-direction: column; padding: 10px 12px; border-radius: 10px; border: 1px solid var(--line); background: #f8fafc; }
.rp-kpi span { font-size: 12px; color: var(--muted); font-weight: 600; }
.rp-kpi b { font-size: 20px; color: var(--heading); font-variant-numeric: tabular-nums; }
.rp-kpi small { font-size: 11px; color: var(--muted); }
.rp-kpi.main { background: #eef4ff; border-color: #cfe0ff; }
.rp-kpi.main b { font-size: 26px; color: var(--primary); }
.rp-kpi.done b { color: #047857; } .rp-kpi.late b { color: #be123c; } .rp-kpi.doing b { color: #1d4ed8; }
.rp-table { width: 100%; border-collapse: collapse; font-size: 12px; }
.rp-table th { background: #f1f5f9; color: var(--muted); font-weight: 700; text-align: left; padding: 6px 8px; border-bottom: 1px solid var(--line); }
.rp-table td { padding: 5px 8px; border-bottom: 1px solid #eef2f7; vertical-align: middle; }
.rp-table .num { text-align: right; font-variant-numeric: tabular-nums; }
.rp-table .nowrap { white-space: nowrap; }
.rp-prog { display: flex; align-items: center; gap: 8px; }
.rp-bar { flex: 1; height: 8px; border-radius: 4px; background: #eef2f7; overflow: hidden; }
.rp-bar span { display: block; height: 100%; border-radius: 4px; }
.rp-pct { min-width: 44px; text-align: right; font-variant-numeric: tabular-nums; }
.small-t { font-size: 11px; }
.rp-list { margin: 0; padding-left: 18px; font-size: 12px; display: flex; flex-direction: column; gap: 4px; }
.rp-two { display: grid; grid-template-columns: 1.2fr 1fr; gap: 14px; }
.rp-foot { margin-top: auto; padding-top: 8px; border-top: 1px solid var(--line); display: flex; justify-content: space-between; font-size: 10px; color: var(--muted); }
@media print {
  @page { size: A4; margin: 0; }
  .report-page { background: #fff; }
  .rp-tools { display: none; }
  .rp-sheet { margin: 0; box-shadow: none; }
  * { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
}
@media screen and (max-width: 820px) {   /* screen만: A4 인쇄 폭(약 794px)에 걸려 인쇄 배치가 바뀌지 않게 */
  .rp-sheet { width: auto; min-height: 0; margin: 12px; padding: 16px; }
  .rp-kpis { grid-template-columns: 1fr 1fr; }
  .rp-two { grid-template-columns: 1fr; }
}

/* 작업별 진척률: '지금 진행 예정' 범례 */
.now-legend {
  margin-left: 8px; display: inline-flex; align-items: center; gap: 5px; vertical-align: 2px;
  font-size: 12px; font-weight: 600; color: var(--muted);
}
.now-legend i { display: inline-block; width: 22px; height: 12px; border-radius: 6px; background: var(--primary); }
/* 운송 현황: 지도 접기 버튼은 휴대폰에서만 */
.map-card .map-fold { display: none; }
/* 큰 화면: 상태 칸을 두 줄로 (위: ● 이름 ··· %, 아래: 큰 숫자) → 이름이 잘리지 않게 */
@media (min-width: 1500px) {
  .status-grid .kpi { grid-template-columns: 8px 1fr auto; grid-template-areas: "d l s" "v v v"; row-gap: 2px; padding: 8px 12px; }
  .status-grid .kpi-dot { grid-area: d; }
  .status-grid .kpi-label { grid-area: l; }
  .status-grid .kpi-share { grid-area: s; }
  .status-grid .kpi-value { grid-area: v; line-height: 1.15; }
}
/* 지도: 출발지·도착지가 있으면 '운송 중 차량 없음' 안내를 위쪽에 작게 */
.map-empty.compact {
  inset: 10px 10px auto auto; padding: 6px 12px; border-radius: 999px; flex-direction: row; gap: 8px;
  background: rgba(255,255,255,.92); box-shadow: 0 1px 4px rgba(15,23,42,.15);
}
.map-empty.compact b { font-size: 12px; }
.map-empty.compact span { display: none; }
/* TV 모드에서만 보이는 버튼 */
.tv-only { display: none !important; }
body.tv .tv-only { display: inline-flex !important; }
body.tv #op-edit { display: none; }   /* 전체 화면(TV)에서는 관리용 '시간 설정' 버튼 숨김 */

/* ---- 어두운 화면 (TV 모드 + 🌙 선택 시) */
body.dark {
  --bg: #0a1020; --card: #111a2d; --card-line: #1d2840; --text: #e2e8f0; --heading: #f8fafc;
  --muted: #8b9ab3; --line: #22304a; --track: #1b2539;
}
body.dark .dash-topbar { background: #0d1527; border-bottom-color: #1d2840; box-shadow: none; }
body.dark .card { box-shadow: none; }
body.dark .status-grid .kpi { background: color-mix(in srgb, var(--c) 14%, #111a2d); border-color: color-mix(in srgb, var(--c) 30%, #111a2d); }
body.dark .status-grid .kpi-value { color: color-mix(in srgb, var(--c) 60%, #fff); }
body.dark .kpi-total, body.dark .op-times, body.dark .ann-item, body.dark .ann-tabs { background: #0d1527; border-color: #1d2840; }
body.dark .ann-tab.active { background: #1b2539; color: #f8fafc; }
body.dark .ann-item.important { background: #2a1320; border-color: #4c1d2e; }
body.dark .btn.ghost, body.dark select { background: #1b2539; color: #e2e8f0; border-color: #2a3a58; }
body.dark .clock-sec { color: #64748b; }
body.dark .map-empty { background: rgba(10,16,32,.45); }
body.dark .map-empty-box { background: rgba(17,26,45,.96); border-color: #2a3a58; box-shadow: 0 8px 28px rgba(0,0,0,.4); }
body.dark .map-empty .map-empty-ic { background: #1b2539; color: #93c5fd; }
body.dark .map-empty.compact { background: rgba(17,26,45,.92); }
body.dark .leaflet-tile-pane { filter: invert(1) hue-rotate(180deg) brightness(.85) contrast(.9); }
body.dark .leaflet-control-zoom a, body.dark .leaflet-control-attribution { background: #111a2d; color: #cbd5e1; }
body.dark .act-item { border-bottom-color: #22304a; }
body.dark .ann-empty { border-color: #22304a; }
body.dark .floor-wrap { background: #0d1527; border-color: #1d2840; }
body.dark .floor-empty .map-empty-ic { background: #16233f; }
body.dark .fl-lg.s0 i { background: #16213a; border-color: #7d8ba3; }
body.dark .fl-lg.s1 i { background: color-mix(in srgb, var(--doing) 35%, #0d1527); }

/* 대시보드 상단: 흰 바탕 + 고객사 CI | 제목 */
.dash-topbar {
  height: 64px; padding: 0 24px; gap: 20px;
  background: #fff; color: var(--heading);
  border-bottom: 1px solid var(--card-line);
  box-shadow: 0 1px 2px rgba(15,23,42,.04), 0 4px 14px rgba(15,23,42,.05);
}
.dash-brand { display: flex; align-items: center; gap: 18px; min-width: 0; }
.dash-logo { display: block; height: 30px; max-width: 260px; object-fit: contain; flex-shrink: 0; }
.dash-title {
  margin: 0; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
  font-size: 22px; font-weight: 700; letter-spacing: -0.4px; color: var(--heading);
}
/* CI와 제목 사이 세로 구분선 (둘 다 있을 때만) */
.dash-logo + .dash-title:not(:empty) { padding-left: 18px; border-left: 2px solid var(--line); line-height: 1.25; }
.dash-title:empty { display: none; }
/* 제목 옆: 마지막 갱신 시각 (초록 점 = 자동 갱신 중) */
.dash-updated {
  display: inline-flex; align-items: center; gap: 6px; flex-shrink: 0; white-space: nowrap;
  padding: 4px 10px; border-radius: 999px; background: #f1f5f9; color: var(--muted);
  font-size: 12px; font-weight: 600; font-variant-numeric: tabular-nums;
}
.dash-updated:empty { display: none; }
.dash-updated .dot { width: 7px; height: 7px; border-radius: 50%; background: var(--done); box-shadow: 0 0 0 3px color-mix(in srgb, var(--done) 22%, transparent); }
body.dark .dash-updated { background: #1b2539; color: #8b9ab3; }
@media (max-width: 900px) { .dash-updated { display: none; } }
/* 상단 메뉴: [메뉴 묶음] | [내 계정 ▾] 로 구분 */
.dash-topbar nav { gap: 14px; }
.nav-menu { display: flex; align-items: center; gap: 2px; padding: 4px; border-radius: 12px; background: #f1f5f9; }
.nav-link {
  display: inline-flex; align-items: center; gap: 6px; padding: 7px 12px; border-radius: 9px;
  color: #475569 !important; font-size: 14px; font-weight: 600; text-decoration: none; white-space: nowrap;
  transition: background-color .15s, color .15s;
}
.nav-link svg { opacity: .75; }
.nav-link:hover { background: #e2e8f0; color: var(--heading) !important; }
.nav-link.active { background: #fff; color: var(--primary) !important; box-shadow: 0 1px 3px rgba(15,23,42,.12); }
.nav-link.active svg { opacity: 1; }
.nav-account { position: relative; padding-left: 14px; border-left: 1px solid var(--line); }
.nav-user-btn {
  display: inline-flex; align-items: center; gap: 8px; padding: 4px 10px 4px 4px; border-radius: 999px;
  border: 1px solid var(--line); background: #fff; cursor: pointer; font: inherit; color: var(--text);
}
.nav-user-btn:hover, .nav-user-btn[aria-expanded="true"] { border-color: #cbd5e1; background: #f8fafc; }
.nav-avatar {
  width: 28px; height: 28px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center;
  background: linear-gradient(135deg, #60a5fa, #2563eb); color: #fff; font-size: 13px; font-weight: 800;
}
.nav-uname { font-size: 14px; font-weight: 700; max-width: 120px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.nav-role { font-size: 11px; font-weight: 700; padding: 1px 7px; border-radius: 999px; }
.nav-caret { font-size: 10px; color: var(--muted); }
.nav-dd {
  position: absolute; right: 0; top: calc(100% + 8px); z-index: 2100; min-width: 200px;
  background: #fff; border: 1px solid var(--card-line); border-radius: 12px; padding: 6px;
  box-shadow: 0 12px 32px rgba(15,23,42,.16);
}
.nav-dd-head { display: flex; flex-direction: column; padding: 8px 10px 10px; margin-bottom: 4px; border-bottom: 1px solid var(--line); }
.nav-dd-head b { font-size: 14px; color: var(--heading); }
.nav-dd-head span { font-size: 12px; color: var(--muted); }
.nav-dd button {
  display: flex; align-items: center; gap: 8px; width: 100%; padding: 9px 10px; border: 0; border-radius: 8px;
  background: none; font: inherit; font-size: 14px; color: var(--text); cursor: pointer; text-align: left;
}
.nav-dd button:hover { background: #f1f5f9; }
.nav-dd button.danger { color: #b91c1c; }
.nav-dd button.danger:hover { background: #fef2f2; }
/* 전체 화면(TV) 모드: 메뉴만 숨기고 CI·제목은 그대로 */
body.tv .topbar nav { display: none; }

/* 운송 현황 지도 카드 */
.map-card { display: flex; flex-direction: column; }
.map-card .card-head { margin-bottom: 10px; }

/* 공지사항 카드: 목록이 길면 카드 안에서만 스크롤 */
.ann-card { display: flex; flex-direction: column; }
.ann-card .card-head { margin-bottom: 8px; }
.ann-card .card-head a { text-decoration: none; font-weight: 600; }
.ann-list {
  list-style: none; margin: 0; padding: 0 4px 0 0; flex: 1; min-height: 0; overflow-y: auto;
  display: flex; flex-direction: column; gap: 8px;
  scrollbar-width: thin; scrollbar-color: #cbd5e1 transparent;
}
.ann-item {
  padding: 10px 12px; border-radius: 10px;
  background: #f8fafc; border: 1px solid var(--line);
}
.ann-item.important {
  background: color-mix(in srgb, var(--late) 5%, #fff);
  border-color: color-mix(in srgb, var(--late) 22%, #fff);
  border-left: 3px solid var(--late);
}
.ann-text { font-size: 14px; line-height: 1.55; color: var(--text); white-space: pre-wrap; word-break: break-word; }
.ann-meta { margin-top: 4px; font-size: 12px; color: var(--muted); display: flex; gap: 8px; align-items: center; }
.ann-tag {
  display: inline-block; margin-right: 6px; padding: 0 7px; border-radius: 999px; vertical-align: 1px;
  font-size: 11px; font-weight: 700; line-height: 18px;
}
.ann-tag.imp { background: var(--late); color: #fff; }
.ann-tag.new { background: color-mix(in srgb, var(--primary) 12%, #fff); color: var(--primary); }
/* 관리 페이지: 대시보드 설정 */
.dash-form { display: flex; flex-direction: column; gap: 14px; }
.dash-form label { display: flex; flex-direction: column; gap: 6px; font-size: 14px; font-weight: 600; }
.dash-form input[type=text], .dash-form input[type=datetime-local] {
  border: 1px solid var(--line); border-radius: 8px; padding: 8px 10px; font: inherit; font-size: 14px; font-weight: 400;
}
.df-row { display: flex; align-items: flex-end; gap: 14px; flex-wrap: wrap; }

.df-block { display: flex; flex-direction: column; gap: 8px; font-size: 14px; font-weight: 600; }
.df-radios { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 8px; }
.dash-form .df-radio {
  flex-direction: row; align-items: flex-start; gap: 10px; cursor: pointer;
  padding: 10px 12px; border: 1px solid var(--line); border-radius: 10px; font-weight: 500;
}
.dash-form .df-radio:has(input:checked) { border-color: var(--primary); background: color-mix(in srgb, var(--primary) 6%, #fff); }
.df-radio input { margin-top: 3px; }
.df-radio span { display: flex; flex-direction: column; gap: 2px; }
.df-radio small { color: var(--muted); font-size: 12px; font-weight: 400; }
.route-row { display: flex; align-items: flex-end; gap: 10px; flex-wrap: wrap; }
.route-row label { min-width: 260px; }
.route-row .btn { margin-bottom: 2px; }
.route-pick.active { background: var(--primary); color: #fff; border-color: var(--primary); }
.route-map { height: 300px; border-radius: 10px; border: 1px solid var(--line); z-index: 0; }
.route-map.picking { outline: 3px solid color-mix(in srgb, var(--primary) 45%, transparent); cursor: crosshair; }
.route-map.picking .leaflet-container, .route-map.picking .leaflet-grab, .route-map.picking div { cursor: crosshair !important; }
/* 출발·도착 표시 (관리 페이지·대시보드 지도 공통) */
/* 📍 핀 모양: 둥근 이름표 + 아래 뾰족한 꼬리. 꼬리 끝이 정확한 위치 (표시 기준점은 [0, 0], 위치 맞춤은 transform) */
.route-pin {
  position: relative; display: inline-block; padding: 4px 10px; border-radius: 999px; color: #fff; font-size: 12px; font-weight: 800;
  white-space: nowrap; box-shadow: 0 2px 6px rgba(15,23,42,.3); border: 2px solid #fff;
  transform: translate(-50%, calc(-100% - 10px));
}
.route-pin::before, .route-pin::after { content: ""; position: absolute; left: 50%; transform: translateX(-50%); border-style: solid; border-color: transparent; border-bottom: 0; }
.route-pin::before { bottom: -12px; border-width: 12px 8px 0; border-top-color: #ffffff; }
.route-pin::after { bottom: -8px; border-width: 9px 6px 0; }
.route-pin.from { background: #2563eb; }
.route-pin.from::after { border-top-color: #2563eb; }
.route-pin.to { background: #059669; }
.route-pin.to::after { border-top-color: #059669; }
.route-pin small { font-weight: 600; opacity: .9; margin-left: 4px; }

/* ===== 관리 페이지 레이아웃 ===== */
.admin-page main { max-width: 1240px; }
.admin-page .page-head { margin-bottom: 10px; }
/* 탭 */
.adm-tabs {
  position: sticky; top: 64px; z-index: 20; display: flex; gap: 4px; overflow-x: auto; scrollbar-width: none;
  margin: 0 -4px 16px; padding: 6px 4px; background: var(--bg);
}
.adm-tab {
  flex: none; padding: 9px 16px; border-radius: 10px; border: 1px solid var(--card-line); background: #fff;
  font: inherit; font-size: 14px; font-weight: 700; color: #475569; cursor: pointer; white-space: nowrap;
}
.adm-tab:hover { border-color: #cbd5e1; color: var(--heading); }
.adm-tab.active { background: var(--navy); border-color: var(--navy); color: #fff; box-shadow: 0 2px 6px rgba(15,23,42,.18); }
/* 영역 제목: 크게 + 아이콘 */
.admin-page .card-head { align-items: center; margin-bottom: 14px; }
.admin-page .sec-title { font-size: 17px; margin: 0; display: inline-flex; align-items: center; gap: 6px; flex-wrap: wrap; letter-spacing: -.3px; }
.admin-page .sec-title .small { font-weight: 600; }
/* ⓘ 설명: 마우스를 올리거나 눌렀을 때만 */
.hint {
  position: relative; display: inline-flex; align-items: center; justify-content: center;
  width: 18px; height: 18px; border-radius: 50%; background: #e8eef7; color: #64748b;
  font-size: 12px; font-weight: 700; font-style: normal; cursor: help; vertical-align: 1px;
}
.hint:hover, .hint:focus { background: var(--primary); color: #fff; outline: none; }
/* 말풍선은 볼 때만 만듦 — 숨어 있는 동안에도 자리를 차지하면 휴대폰에서 화면이 옆으로 밀려 스크롤됨 */
.hint:hover::after, .hint:focus::after { content: attr(data-tip); }
.hint::after {
  position: absolute; left: -10px; top: calc(100% + 8px);
  width: max-content; max-width: 320px; padding: 9px 12px; border-radius: 8px; z-index: 50;
  background: #0f172a; color: #f8fafc; font-size: 12.5px; font-weight: 500; line-height: 1.55; text-align: left; white-space: normal;
  box-shadow: 0 8px 24px rgba(15,23,42,.25); opacity: 0; pointer-events: none; transition: opacity .12s;
}
.hint:hover::after, .hint:focus::after { opacity: 1; }
/* 저장하지 않은 변경 / 저장됨 */
.dirty-chip { font-size: 12px; font-weight: 700; color: #b45309; background: #fff7ed; border: 1px solid #fed7aa; padding: 3px 10px; border-radius: 999px; white-space: nowrap; }
.btn.saved { background: #059669; }
/* 단계 현황 표 */
.sheet-table .num { text-align: right; font-variant-numeric: tabular-nums; }
.sheet-table td { vertical-align: middle; }
.sheet-table .progress-cell .bar { min-width: 70px; max-width: 140px; }
.sheet-table .sched { white-space: nowrap; font-variant-numeric: tabular-nums; }
.sheet-table .file-info { display: inline-block; max-width: 210px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; vertical-align: middle; }
.act-col { width: 1%; white-space: nowrap; }
.icon-btns { display: flex; gap: 4px; justify-content: flex-end; }
.icon-btn {
  display: inline-flex; align-items: center; justify-content: center; width: 32px; height: 32px; border-radius: 8px;
  border: 1px solid var(--line); background: #fff; color: var(--text); font-size: 14px; cursor: pointer; text-decoration: none;
}
.icon-btn:hover { border-color: var(--primary); color: var(--primary); background: #f5f8ff; }
.icon-btn.danger:hover { border-color: #fecaca; background: #fef2f2; color: #b91c1c; }
#upload-card.flash { box-shadow: 0 0 0 3px color-mix(in srgb, var(--primary) 40%, transparent); transition: box-shadow .3s; }
/* 랙 묶음 기준: 입력칸은 내용 길이만큼 */
.admin-page .bundle-form { margin-top: 0; background: none; border: 0; padding: 0; }
.admin-page .bundle-form input { min-width: 0 !important; width: auto !important; }
/* 랙 묶음 제외 기준: ① → ② → ③ 흐름 + 미리보기 */
.bf-lead { margin: 0 0 14px; font-size: 14px; line-height: 1.6; color: var(--text); }
.bundle-rule { display: flex; align-items: stretch; gap: 10px; flex-wrap: wrap; }
.br-step {
  flex: 1 1 220px; display: flex; flex-direction: column; gap: 8px; padding: 12px 14px;
  border: 1px solid var(--line); border-radius: 12px; background: #f8fafc; position: relative;
}
.br-num {
  position: absolute; top: -10px; left: 12px; width: 22px; height: 22px; border-radius: 50%;
  background: var(--primary); color: #fff; font-size: 12px; font-weight: 800; display: flex; align-items: center; justify-content: center;
}
.br-q { display: flex; flex-direction: column; gap: 2px; font-size: 14px; font-weight: 700; color: var(--heading); padding-top: 4px; }
.br-q small { font-size: 12px; font-weight: 400; color: var(--muted); line-height: 1.5; }
.admin-page .br-step input { min-width: 0; width: 100%; box-sizing: border-box; }
.br-arrow { align-self: center; font-size: 20px; color: #94a3b8; }
.br-result { background: #fff7ed; border-color: #fed7aa; }
.br-result .br-num { background: #ea580c; }
@media (max-width: 760px) { .br-arrow { display: none; } }
/* 관리 페이지: 운송 차량 */
.veh-form { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 4px; }
.admin-page .veh-form input { min-width: 180px; }
.veh-form select { min-width: 260px; }
.veh-table select { min-width: 240px; }
.veh-st { font-weight: 700; }
.veh-st.on { color: #059669; }
.veh-st.weak { color: #b45309; }
.veh-st.lost { color: #b91c1c; }
.veh-mini { margin-left: 8px; padding: 3px 9px; font-size: 12px; }
/* 표 줄 끝의 실행 버튼 묶음 (차량·사용자): 오른쪽 끝에 나란히 */
.row-acts { display: flex; align-items: center; justify-content: flex-end; gap: 6px; }
.row-acts .icon-gap { width: 34px; }
/* 대시보드 설정: 기본 정보 / 그래프 색상 / 운송 경로 묶음 */
.df-group { border: 1px solid var(--line); border-radius: 12px; padding: 16px 18px; display: flex; flex-direction: column; gap: 14px; }
.df-group-title { margin: 0; font-size: 15px; font-weight: 700; color: var(--heading); display: flex; align-items: center; gap: 7px; }
.df-group-title .ic { color: var(--primary); }
.df-group-title .hint { font-weight: 400; }
/* 대시보드 운송 현황 머리글: 운송 중·도착 대수 칩 + 경로 */
.map-title { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.map-count { display: inline-flex; align-items: center; gap: 6px; flex-wrap: wrap; font-weight: 600; }
.map-chip {
  display: inline-flex; align-items: center; gap: 4px; padding: 2px 9px; border-radius: 999px;
  font-size: 12px; font-weight: 700; background: var(--track, #eef2f7); color: var(--muted); white-space: nowrap;
}
.map-chip.on { background: color-mix(in srgb, var(--primary) 12%, transparent); color: var(--primary); }
.map-chip.done { background: color-mix(in srgb, #059669 14%, transparent); color: #047857; }
.map-chip .ic { width: 13px; height: 13px; }
.map-route { font-size: 12px; font-weight: 500; color: var(--muted); white-space: nowrap; }
body.dark .map-chip.done { color: #34d399; }
/* 상태 칸: 0건이면 옅게 */
.status-grid .kpi.zero { background: none; border-color: var(--line); }
.status-grid .kpi.zero .kpi-value, .status-grid .kpi.zero .kpi-label { color: var(--muted); font-weight: 600; opacity: .7; }
.status-grid .kpi.zero .kpi-dot { box-shadow: none; opacity: .45; }
.status-grid .kpi.zero .kpi-share { opacity: .6; }
body.dark .status-grid .kpi.zero { background: none; border-color: var(--line); }
body.dark .status-grid .kpi.zero .kpi-value { color: var(--muted); }
/* 작업 체크: 단계 요약 한 줄 */
.stage-sum { padding: 10px 16px; }
.ss-line { display: flex; align-items: baseline; gap: 6px 14px; flex-wrap: wrap; }
.ss-name { font-size: 15px; }
.ss-line .ss-num b { font-size: 16px; }
.ss-late { font-size: 12px; padding: 1px 8px; border-radius: 999px; background: color-mix(in srgb, var(--late) 12%, transparent); color: var(--late); align-self: center; }
.ss-plan { margin-left: auto; }
.work-help.learned .work-help-text { display: none; }
.veh-table .nowrap { white-space: nowrap; }
/* 운송 기록 + 경로 다시 보기 */
.trip-table td { vertical-align: middle; }
.trip-table .act-col .btn { margin-right: 4px; }
.trip-dialog { width: min(860px, calc(100vw - 32px)); max-width: none; }
.trip-map { height: min(520px, 62vh); border-radius: 10px; border: 1px solid var(--line); z-index: 0; }
/* 대시보드 지도 크게 보기 */
.map-btns { gap: 6px; flex-wrap: nowrap; }
.map-card.full {
  position: fixed; inset: 0; z-index: 2500; margin: 0; border-radius: 0; padding: 14px 18px 18px;
  display: flex; flex-direction: column;
}
.map-card.full .map-wrap { flex: 1; min-height: 0; display: flex !important; flex-direction: column; }
.map-card.full #map { flex: 1; height: auto; min-height: 0; }
.map-card.full .map-fold { display: none !important; }
body.map-full { overflow: hidden; }
/* 위치 앱(Traccar Client) 연결 창 */
.veh-app-dialog { width: min(520px, calc(100% - 32px)); }
.veh-app-dialog h2 { margin-bottom: 8px; }
.va-row { display: flex; align-items: center; gap: 8px; margin-bottom: 8px; }
.va-label { flex: none; width: 76px; font-size: 13px; color: var(--muted); }
.va-row code { flex: 1; min-width: 0; padding: 8px 10px; border: 1px solid var(--border); border-radius: 8px; background: var(--bg); font-size: 13px; overflow-wrap: anywhere; user-select: all; }
#va-key { font-size: 16px; font-weight: 700; letter-spacing: .08em; }
.va-warn { margin: 0 0 8px; padding: 8px 10px; border-radius: 8px; background: #fef3c7; color: #92400e; }
.va-steps { margin: 12px 0; padding-left: 20px; line-height: 1.7; }
/* 데이터 백업 목록 */
.backup-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 4px; }
.backup-list li { display: flex; align-items: center; gap: 12px; padding: 6px 4px; border-bottom: 1px solid #eef2f7; font-size: 13px; }
.backup-list li:last-child { border-bottom: 0; }
.bk-kind { font-size: 11px; font-weight: 700; padding: 1px 8px; border-radius: 999px; background: #eef4ff; color: var(--primary); }
.bk-kind.manual { background: #f1f5f9; color: var(--muted); }
.bk-at { font-variant-numeric: tabular-nums; min-width: 130px; }
.backup-list .icon-btn { margin-left: auto; width: 28px; height: 28px; }
/* 위험 작업 */
.admin-page .danger-zone { border-color: #fecaca; background: #fffafa; }
.danger-zone .sec-title { color: #b91c1c; }
.admin-page .danger-zone .reset-box { margin-top: 0; padding: 0; border: 0; background: none; }
/* 대시보드 설정: 출발지·도착지 접기 */
.route-head { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.route-summary { font-size: 13px; font-weight: 600; color: var(--primary); background: #eef4ff; padding: 3px 10px; border-radius: 999px; }
.route-body { display: flex; flex-direction: column; gap: 8px; margin-top: 6px; }
.dash-form .df-title, .dash-form .df-row label { font-weight: 600; }
.dash-form select { min-width: 200px; padding: 9px 10px; font-weight: 400; }

/* 관리 페이지: CSV 형식 안내 */
.csv-guide { margin: 8px 0 0; padding-left: 18px; display: flex; flex-direction: column; gap: 6px; line-height: 1.6; color: var(--text); }
.csv-guide span { color: var(--muted); }
/* 엑셀 모양 예시 표 */
.csv-example { border-collapse: collapse; margin: 8px 0; font-size: 12px; width: auto; }
.csv-example tr.ex-head td.ex-note { background: none; font-weight: 600; color: #b45309; }
.csv-example th, .csv-example td { border: 1px solid #d5dbe3; padding: 3px 10px; text-align: left; white-space: nowrap; }
.csv-example tr:first-child th { background: #f1f5f9; color: var(--muted); font-weight: 600; text-align: center; }
.csv-example tr th:first-child { background: #f1f5f9; color: var(--muted); font-weight: 600; text-align: center; width: 24px; }
.csv-example tr.ex-head td { background: #fff7d6; font-weight: 700; color: var(--heading); }
/* 휴대폰: 표 오른쪽 설명은 좁아서 글자가 쪼개지므로 숨기고 표 아래 한 줄 설명으로 */
.ex-note-m { display: none; margin: 4px 0 8px; font-size: 12px; color: #b45309; line-height: 1.5; }
@media (max-width: 640px) {
  .csv-example td.ex-note { display: none; }
  .ex-note-m { display: block; }
}
.csv-example td.ex-note { border: 0; color: #b45309; font-weight: 600; white-space: normal; padding-left: 12px; vertical-align: middle; }

/* 관리 페이지: 진척률 초기화 */
.reset-box {
  display: flex; align-items: center; gap: 10px 12px; flex-wrap: wrap; margin-top: 16px;
  padding: 12px 14px; border: 1px solid #fecaca; border-radius: 10px; background: #fff7f7;
}
.reset-box .rb-text { flex: 1; min-width: 280px; display: flex; flex-direction: column; gap: 2px; }
.reset-box .rb-text b { color: #b91c1c; font-size: 14px; }
.reset-box select { min-width: 200px; }

/* 관리 페이지: 랙 묶음 제외 기준 */
.bundle-form {
  display: flex; align-items: center; flex-wrap: wrap; gap: 6px 8px; margin-top: 14px;
  padding: 12px 14px; border: 1px solid var(--line); border-radius: 10px; background: #f8fafc; font-size: 14px;
}
.bundle-form .bf-title { font-weight: 700; margin-right: 6px; }
.bundle-form input { border: 1px solid var(--line); border-radius: 8px; padding: 6px 10px; font: inherit; font-size: 14px; }
.bundle-form #bundle-col { width: 90px; }
.bundle-form #bundle-exclude { width: 160px; }
.bundle-form .bf-help { flex-basis: 100%; margin: 4px 0 0; }

/* 관리 페이지: 공지 입력·목록 */
.ann-form { display: flex; flex-direction: column; gap: 8px; }
.ann-form textarea {
  width: 100%; box-sizing: border-box; resize: vertical; min-height: 72px;
  border: 1px solid var(--line); border-radius: 8px; padding: 10px 12px; font: inherit; font-size: 14px;
}
.ann-form textarea:focus { outline: 2px solid color-mix(in srgb, var(--primary) 35%, transparent); border-color: var(--primary); }
.ann-form-row { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.ann-form-row .btn-row { margin-left: auto; }
.ann-check { display: flex; align-items: center; gap: 6px; font-size: 14px; cursor: pointer; }
.ann-admin-list { list-style: none; margin: 14px 0 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.ann-admin-list .ann-meta { justify-content: space-between; flex-wrap: wrap; }
.ann-admin-list .ann-item.editing { outline: 2px solid var(--primary); }
.ann-actions { display: flex; gap: 6px; }
/* 공지사항 / 최근 작업 탭 */
.ann-tabs { display: flex; gap: 4px; padding: 3px; border-radius: 10px; background: #f1f5f9; }
.ann-tab {
  border: 0; background: none; padding: 5px 12px; border-radius: 8px; cursor: pointer;
  font: inherit; font-size: 14px; font-weight: 700; color: var(--muted); white-space: nowrap;
}
.ann-tab.active { background: #fff; color: var(--heading); box-shadow: 0 1px 3px rgba(15,23,42,.1); }
.ann-tab #ann-count { font-size: 12px; font-weight: 600; color: var(--muted); }
.ann-pane { flex: 1; min-height: 0; display: flex; flex-direction: column; }
/* 공지사항 / 최근 작업: 항상 탭으로 전환 — 관리자 버튼은 보고 있는 탭 것만 */
.ann-panes { flex: 1; min-height: 0; display: flex; flex-direction: column; }
.ann-card .card-head { flex-wrap: nowrap; }
.ann-card[data-tab="notice"] #act-reset, .ann-card[data-tab="activity"] #ann-manage { display: none; }
.ann-card #ann-manage, .ann-card #act-reset { white-space: nowrap; flex: none; }
.ann-card .ann-tabs { min-width: 0; }
/* 칸이 좁으면(작은 PC 화면) 탭 아이콘·버튼 글자를 줄여 한 줄에 */
.ann-card { container-type: inline-size; }
@container (max-width: 300px) {
  .ann-card .ann-tab .ic, .ann-card .act-reset .ar-text, .ann-card #ann-count { display: none; }
  .ann-card .ann-tab { padding: 5px 10px; }
}

/* 상면 현황 (대시보드) · 상면도 (관리) */
.floor-card { display: flex; flex-direction: column; container-type: inline-size; }
.floor-card .card-head { margin-bottom: 10px; flex-wrap: nowrap; }
.floor-title { display: flex; align-items: center; gap: 8px; min-width: 0; white-space: nowrap; flex: none; }
.floor-card #floor-manage { text-decoration: none; font-weight: 600; white-space: nowrap; align-self: center; }
.floor-wrap {
  position: relative; flex: 1; min-height: 260px; overflow: hidden;
  display: flex; align-items: center; justify-content: center;
  border-radius: 10px; background: #f8fafc; border: 1px solid var(--line);
}
.floor-host { position: absolute; inset: 6px; }
.floor-host svg { display: block; }
/* 상면도 색 (어두운 화면은 아래 body.dark / html.ui-dark 에서 바꿈) */
.floor-svg {
  --fl-floor: #ffffff; --fl-grid: #9fb0c6; --fl-border: #64748b; --fl-perf: #eef2f7; --fl-perf-dot: #94a3b8;
  --fl-none: #e2e8f0; --fl-none-line: #cbd5e1; --fl-rack: #ffffff; --fl-rack-line: #64748b; --fl-rack-text: #334155;
  --fl-eq: #e2e8f0; --fl-eq-line: #94a3b8; --fl-eq-text: #475569; --fl-col: #94a3b8;
  font-family: inherit; user-select: none; -webkit-user-select: none;
}
.floor-svg text { text-anchor: middle; dominant-baseline: central; font-weight: 700; fill: var(--fl-eq-text); pointer-events: none; letter-spacing: -.02em; }
.fl-floor { fill: var(--fl-floor); }
/* 억세스플로어 칸 선: 축소해서 봐도 칸이 구분되게 진하고 굵게 (2026-12-01 사용자 요청) */
.fl-gridline { fill: none; stroke: var(--fl-grid); stroke-width: 1px; shape-rendering: crispEdges; }   /* 확대·축소해도 항상 1px 선명하게 */
.fl-border { fill: none; stroke: var(--fl-border); stroke-width: 2px; }
/* 방 외곽선 (대각선 벽·잘린 칸): 바깥은 바닥 없음 무늬, 외곽선은 굵은 벽 선, 원래 네모 테두리는 옅게 */
.fl-border.fl-border-ol { stroke: var(--fl-grid); stroke-width: 1px; stroke-dasharray: 4 4; }
.fl-room { fill: none; stroke: var(--fl-wall, #334155); stroke-width: 1.5px; stroke-linejoin: round; }   /* 바닥 자르기 선: 얇게 (사용자 요청 2026-12-02) */
.fl-room-draft { fill: none; stroke: var(--primary); stroke-width: 1.5px; stroke-dasharray: 6 4; pointer-events: none; }
.fl-vtx { fill: #fff; stroke: var(--primary); stroke-width: 1.5px; cursor: move; }
.fl-vtx.first { fill: color-mix(in srgb, var(--primary) 30%, #fff); cursor: pointer; }
.fl-vtx.on { fill: var(--primary); }
.fl-vmid { fill: color-mix(in srgb, var(--primary) 25%, #fff); stroke: var(--primary); stroke-width: 1px; cursor: copy; opacity: .8; }
.fl-cut-preview { fill: color-mix(in srgb, var(--fl-none-line) 55%, transparent); stroke: none; pointer-events: none; }
.fl-perf-bg { fill: var(--fl-perf); }
.fl-perf-dot { fill: var(--fl-perf-dot); }
.fl-none-bg { fill: var(--fl-none); }
.fl-none-line { fill: var(--fl-none-line); }
/* 랙: 미완료 = 흰색 / 상면배치 완료 = 연한 '진행 중' 색 / 설치(케이블링) 완료 = '완료' 색. 굵은 선 = 앞면 */
/* 랙 테두리·앞면 선 = 관리자가 고른 랙 색(--rk, 기본 회색), 안쪽 칠 = 진행 상태 */
.fl-it.rack .fl-body { fill: var(--fl-rack); stroke: var(--rk, var(--fl-rack-line)); stroke-width: 26; }
.fl-it.rack .fl-front { fill: var(--rk, var(--fl-rack-line)); }
.fl-it.rack text { fill: var(--fl-rack-text); }
.fl-it.rack.s1 .fl-body { fill: color-mix(in srgb, var(--doing) 24%, var(--fl-rack)); }
.fl-it.rack.s1 text { fill: color-mix(in srgb, var(--doing) 75%, var(--fl-rack-text)); }
.fl-it.rack.s2 .fl-body { fill: var(--done); }
.fl-it.rack.s2 text { fill: #fff; }
/* 그리는 중에는 아직 체크 안 한 랙을 랙 색으로 옅게 칠해 구분이 잘 되게 */
.floor-svg.edit .fl-it.rack.s0 .fl-body { fill: color-mix(in srgb, var(--rk) 16%, var(--fl-rack)); }
/* 설비 */
.fl-it .fl-body { fill: var(--fl-eq); stroke: var(--fl-eq-line); stroke-width: 12; }
.fl-it.ups .fl-body { fill: #fef3c7; stroke: #d97706; }
.fl-it.panel .fl-body { fill: #fee2e2; stroke: #dc2626; }
.fl-it.crac .fl-body { fill: #e0f2fe; stroke: #0284c7; }
.fl-it.column .fl-body { fill: var(--fl-col); stroke: color-mix(in srgb, var(--fl-col) 70%, #000); }
.fl-it.column .fl-x { stroke: color-mix(in srgb, var(--fl-col) 60%, #000); stroke-width: 12; }
.fl-it.arrow .fl-body, .fl-it.arrow2 .fl-body, .fl-it.line .fl-body { fill: var(--ic, #64748b); stroke: none; }
.fl-it.dash .fl-body { fill: none; stroke: var(--ic, #64748b); stroke-linecap: round; }
.fl-it.wall .fl-body { fill: #334155; stroke: none; }
/* 케이블 트레이 (색 = --ic): 굵기를 단 수만큼 나눈 칸마다 — 사다리형 = 옅은 칠 + 가로대 / 덕트 = 진한 칠(막힌 통) / 매쉬 = 그물 */
.fl-it.tray .fl-body { fill: none; stroke: var(--ic); stroke-width: 22; }
.fl-it.tray .fl-lane { fill: color-mix(in srgb, var(--ic) 10%, var(--fl-floor)); }
.fl-it.tray .fl-lane.duct { fill: color-mix(in srgb, var(--ic) 45%, var(--fl-floor)); }
.fl-it.tray .fl-rung { stroke: color-mix(in srgb, var(--ic) 65%, var(--fl-floor)); stroke-width: 16; }
.fl-it.tray .fl-mesh { stroke: color-mix(in srgb, var(--ic) 55%, var(--fl-floor)); stroke-width: 8; }
.fl-it.tray .fl-lanesep { stroke: var(--ic); stroke-width: 16; }
.floor-svg .fl-it.tray .fl-tier-t { fill: color-mix(in srgb, var(--ic) 85%, #000); font-weight: 800; paint-order: stroke; stroke: var(--fl-floor); stroke-width: 18; }
.fl-it.tray text { fill: color-mix(in srgb, var(--ic) 80%, #000); }
.fl-it.fire .fl-body { fill: #dc2626; stroke: #991b1b; stroke-width: 20; }
.floor-svg .fl-mark-t { fill: #fff; }
.fl-it.sensor .fl-body { fill: #0891b2; stroke: #0e7490; stroke-width: 20; }
.fl-it.access .fl-body { fill: #7c3aed; stroke: #5b21b6; stroke-width: 20; }
.fl-it.door2 .fl-swing { fill: rgba(148,163,184,.12); stroke: #64748b; stroke-width: 10; stroke-dasharray: 40 30; }
.fl-it.door2 .fl-frame { fill: #475569; }
.fl-it.window .fl-body { fill: #e0f2fe; stroke: #0369a1; stroke-width: 14; }
.fl-it.window .fl-win { stroke: #0369a1; stroke-width: 10; }
.fl-it.cctv .fl-cone { fill: rgba(250,204,21,.25); stroke: #ca8a04; stroke-width: 12; stroke-dasharray: 40 30; }
.fl-it.cctv .fl-body { fill: #1e293b; stroke: none; }
.fl-it.containment .fl-body { fill: color-mix(in srgb, var(--ic) 6%, transparent); stroke: var(--ic); stroke-width: 70; }
.fl-it.containment .fl-cdoor { stroke: var(--fl-floor); stroke-width: 90; }
.fl-it.containment text { fill: color-mix(in srgb, var(--ic) 80%, #000); }
.fl-it.battery .fl-body { fill: #fef9c3; stroke: #a16207; }
.fl-it.rect .fl-body { fill: color-mix(in srgb, var(--ic) 6%, transparent); stroke: var(--ic); stroke-width: 40; }
.fl-it.ellipse .fl-body { fill: color-mix(in srgb, var(--ic) 12%, transparent); stroke: var(--ic); stroke-width: 40; }
.fl-it.zone .fl-body { fill: color-mix(in srgb, var(--ic) 14%, transparent); stroke: var(--ic); stroke-width: 30; stroke-dasharray: 120 80; }
.fl-it.rect text, .fl-it.ellipse text, .fl-it.zone text { fill: color-mix(in srgb, var(--ic) 80%, #000); }
.fl-it.text text { fill: var(--ic, var(--fl-rack-text)); }
.fl-hit { fill: transparent; stroke: none; pointer-events: all; }
.fl-it.door .fl-swing { fill: rgba(148,163,184,.12); stroke: #64748b; stroke-width: 10; stroke-dasharray: 40 30; }
.fl-it.door .fl-frame { fill: #475569; }
.fl-it.text text { fill: var(--fl-rack-text); }
.fl-textbox { fill: none; stroke: #94a3b8; stroke-width: 8; stroke-dasharray: 40 30; }
.fl-selbox-halo { fill: none; stroke: #fff; stroke-width: 7px; pointer-events: none; }
.fl-selbox { fill: color-mix(in srgb, var(--primary) 12%, transparent); stroke: var(--primary); stroke-width: 3.5px; pointer-events: none; }
.fl-toast { position: fixed; bottom: 28px; left: 50%; z-index: 3000; max-width: 90vw; transform: translate(-50%, 6px);
  padding: 8px 16px; border-radius: 999px; background: #1e293b; color: #fff; font-size: 13px; font-weight: 600; opacity: 0; pointer-events: none; transition: opacity .2s, transform .2s; }
.fl-toast.show { opacity: .95; transform: translate(-50%, 0); }
/* 랙 찾기: 찾은 랙을 굵은 주황 테두리로 3번 깜빡임 */
@keyframes fl-flash { 0%, 100% { stroke-width: 0; } 50% { stroke-width: 110; } }
.fl-it.fl-flash .fl-body { stroke: #f97316 !important; animation: fl-flash .7s ease-in-out 4; }
@media (prefers-reduced-motion: reduce) { .fl-it.fl-flash .fl-body { animation: none; stroke-width: 90; } }
.fl-find { display: inline-flex; align-items: center; gap: 4px; }
.fl-find input, .fl-find input[type=search] { width: 130px; min-width: 0; height: 30px; box-sizing: border-box; padding: 4px 9px; border: 1px solid var(--line); border-radius: 8px; font: inherit; font-size: 13px; }
.fl-howto { display: inline-flex; align-items: center; gap: 4px; font-size: 12px; color: var(--muted); white-space: nowrap; }
.fl-find .fl-find-msg { font-size: 12px; color: #b91c1c; }
/* 기호 설명 (쓰인 바닥·설비만) */
.fl-syms { margin-top: 4px; gap: 4px 12px; font-size: 12px; }
.fl-sym { display: inline-flex; align-items: center; gap: 5px; white-space: nowrap; }
.fl-sym-t { font-weight: 800; color: var(--heading); }
.fl-band { fill: color-mix(in srgb, var(--primary) 10%, transparent); stroke: var(--primary); stroke-width: 1.5px; stroke-dasharray: 6 4; pointer-events: none; }
.fl-align { display: inline-flex; align-items: center; gap: 3px; flex-wrap: wrap; }
.fl-align button { border: 1px solid var(--line); background: #fff; border-radius: 6px; padding: 3px 7px; font: inherit; font-size: 12px; cursor: pointer; color: var(--text); white-space: nowrap; }
.fl-align button:hover:not(:disabled) { border-color: var(--primary); color: var(--primary); }
.fl-align button:disabled { opacity: .45; cursor: default; }
.fl-lg-sep { width: 1px; height: 14px; background: var(--line); }
.fl-lg.kind i { background: #fff; border: 3px solid var(--rk); }
/* 랙 색 고르기: 추천 색 칸 + 직접 고르기 */
.fl-rk { display: inline-flex; align-items: center; gap: 4px; flex-wrap: wrap; }
.fl-rk button { width: 20px; height: 20px; padding: 0; border-radius: 5px; border: 2px solid #fff; background: var(--rk); box-shadow: 0 0 0 1px var(--line); cursor: pointer; }
.fl-rk button.on { box-shadow: 0 0 0 2px var(--heading); }
.fl-rk input[type=color] { width: 30px; height: 24px; padding: 0 2px; border: 1px solid var(--line); border-radius: 6px; background: #fff; cursor: pointer; }
.fl-seg { display: inline-flex; align-items: center; gap: 3px; }
.fl-seg button { border: 1px solid var(--line); background: #fff; border-radius: 6px; padding: 3px 9px; font: inherit; font-size: 12px; cursor: pointer; color: var(--text); white-space: nowrap; }
.fl-tierrow { padding: 2px 6px 2px 2px; border-radius: 8px; background: #f1f5f9; }
.fl-tierrow > .fl-num { font-weight: 800; color: var(--heading); padding: 0 4px; }
.fl-seg button.on { border-color: var(--primary); color: var(--primary); font-weight: 700; box-shadow: 0 0 0 1px var(--primary); }
#fp-op { width: 90px; accent-color: var(--primary); }
#fp-op-v { min-width: 36px; font-variant-numeric: tabular-nums; }
.floor-svg.edit .fl-it { cursor: move; }
.floor-empty {
  position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 6px; padding: 20px; text-align: center; word-break: keep-all;
}
.floor-empty .map-empty-ic { display: block; box-sizing: border-box; width: 42px; height: 42px; padding: 10px; margin-bottom: 4px; border-radius: 50%; background: #eef4ff; color: var(--primary); }
.floor-empty b { font-size: 15px; color: var(--heading); }
.floor-empty span { font-size: 13px; color: var(--muted); line-height: 1.5; }
.floor-legend { display: flex; flex-wrap: wrap; justify-content: center; gap: 4px 14px; margin-top: 10px; font-size: 13px; color: var(--muted); }
.fl-lg { display: inline-flex; align-items: center; gap: 5px; white-space: nowrap; }
.fl-lg b { color: var(--heading); font-variant-numeric: tabular-nums; }
/* 진행 수·칠할 상태 이름: 칸이 좁으면 짧게 (설치(케이블링) 완료 → 설치) */
.lg-s { display: none; }
.floor-legend, .wfl-bar { container-type: inline-size; }
@container (max-width: 380px) {
  .fl-lg .lg-f { display: none; }
  .fl-lg .lg-s { display: inline; }
}
@container (max-width: 340px) {   /* 아주 작은 휴대폰: 칠할 상태 단추도 짧게 */
  .fl-pen .lg-f { display: none; }
  .fl-pen .lg-s { display: inline; }
}
.fl-lg-all { font-weight: 600; color: var(--heading); padding-right: 12px; border-right: 1px solid var(--line); }
.fl-lg i { width: 12px; height: 12px; border-radius: 3px; display: inline-block; }
.fl-lg.s2 i { background: var(--done); }
.fl-lg.s1 i { background: color-mix(in srgb, var(--doing) 22%, #fff); border: 1px solid var(--doing); }
.fl-lg.s0 i { background: #fff; border: 1px solid #64748b; }
/* 크게 보기(대시보드)·전체 화면(관리 진행 체크): 전체·설치·상면배치 수를 크게 (멀리서도 읽히게 — 2026-12-02) */
.floor-card.full #floor-legend, #fl-card.fl-full #fl-check-legend { font-size: 18px; gap: 8px 26px; margin-top: 12px; color: var(--text); }
.floor-card.full #floor-legend .fl-lg, #fl-card.fl-full #fl-check-legend .fl-lg { gap: 8px; font-weight: 600; }
.floor-card.full #floor-legend .fl-lg b, #fl-card.fl-full #fl-check-legend .fl-lg b { font-size: 26px; font-weight: 800; letter-spacing: -.02em; }
.floor-card.full #floor-legend .fl-lg i, #fl-card.fl-full #fl-check-legend .fl-lg i { width: 18px; height: 18px; border-radius: 5px; }
.floor-card.full #floor-legend .fl-lg-all, #fl-card.fl-full #fl-check-legend .fl-lg-all { padding-right: 26px; }
/* 관리 > 상면도 */
.fl-modes, .fl-pens { display: flex; gap: 4px; padding: 3px; border-radius: 10px; background: #f1f5f9; flex-wrap: wrap; }
.fl-mode, .fl-pen {
  display: inline-flex; align-items: center; gap: 6px; border: 0; background: none; padding: 6px 12px; border-radius: 8px;
  cursor: pointer; font: inherit; font-size: 13px; font-weight: 700; color: var(--muted); white-space: nowrap;
}
.fl-mode.active, .fl-pen.active { background: #fff; color: var(--heading); box-shadow: 0 1px 3px rgba(15,23,42,.12); }
.fl-pen i { width: 14px; height: 14px; border-radius: 3px; display: inline-block; }
.fl-pen.s1 i { background: color-mix(in srgb, var(--doing) 22%, #fff); border: 1px solid var(--doing); }
.fl-pen.s2 i { background: var(--done); }
.fl-pen.s0 i { background: #fff; border: 1px solid #64748b; }
.fl-pen.active.s1 { box-shadow: 0 0 0 2px var(--doing); }
.fl-pen.active.s2 { box-shadow: 0 0 0 2px var(--done); }
.fl-pen.active.s0 { box-shadow: 0 0 0 2px #94a3b8; }
.fl-bar { display: flex; align-items: center; flex-wrap: wrap; gap: 8px 10px; margin-bottom: 10px; }
.fl-bar-label { font-size: 13px; font-weight: 700; color: var(--heading); white-space: nowrap; }
.fl-num { display: inline-flex; align-items: center; gap: 5px; font-size: 13px; white-space: nowrap; }
.fl-num input { width: 72px; padding: 5px 8px; border: 1px solid var(--line); border-radius: 8px; font: inherit; font-size: 13px; }
.fl-zoom { display: inline-flex; gap: 4px; margin-left: auto; }
.fl-zoom .icon-btn { width: 30px; height: 30px; font-size: 16px; font-weight: 700; }
.fl-zoom .fl-zoom-fit { width: auto; padding: 0 10px; font-size: 12px; }
/* 도구 모음: 고르기 | 바닥 칠하기 | 놓기 */
.fl-tools { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 10px; }
/* 그리기 화면: 왼쪽 세로 도구 모음 + 오른쪽 (고치기 칸 + 그리는 칸) — 그리는 칸을 넓게 */
.fl-editor { display: grid; grid-template-columns: 216px minmax(0, 1fr); gap: 12px; align-items: start; }
/* 도구 모음: 노트북 높이에서도 한 화면에 들어가게 촘촘하게 (2026-12-02) */
.fl-editor .fl-tools { flex-direction: column; flex-wrap: nowrap; gap: 4px; margin: 0; max-height: calc(64vh + 60px); overflow-y: auto; padding-right: 2px; }
.fl-editor .fl-tgroup { flex-direction: row; align-items: flex-start; padding: 3px; gap: 0 2px; }
.fl-editor .fl-tlabel { width: 100%; align-self: auto; margin: 0 0 1px; padding: 2px 8px; border-radius: 6px; font-size: 11px; }
/* 묶음 이름이 짧은 묶음(랙)은 이름 옆에 바로 — 한 줄 아낌 */
.fl-editor .fl-tgroup.fl-tg-inline { align-items: center; }
.fl-editor .fl-tgroup.fl-tg-inline .fl-tlabel { width: auto; margin: 0 4px 0 0; align-self: stretch; display: inline-flex; align-items: center; }
.fl-editor .fl-tool { padding: 3px 6px; font-size: 12px; }
.fl-editor .fl-tgroup:first-child { flex-wrap: nowrap; }
.fl-editor .fl-tgroup:first-child .fl-tool { flex: 1; justify-content: center; padding: 6px 4px; }
.fl-canvas-col { min-width: 0; display: flex; flex-direction: column; }
@media (max-width: 900px) {
  .fl-editor { grid-template-columns: 1fr; }
  .fl-editor .fl-tools { flex-direction: row; flex-wrap: wrap; max-height: none; }
  .fl-editor .fl-tgroup { flex-direction: row; }
  .fl-editor .fl-tlabel { width: auto; margin: 0 4px 0 0; align-self: stretch; }
}
/* 묶음: 흰 상자 + 왼쪽에 진한 이름표 → 묶음 이름과 항목이 한눈에 구분되게 (2026-12-01 사용자 요청) */
.fl-tgroup { display: flex; align-items: center; flex-wrap: wrap; gap: 2px; padding: 3px 4px 3px 3px; border-radius: 10px; background: #fff; border: 1px solid #cbd5e1; box-shadow: 0 1px 2px rgba(15,23,42,.05); }
.fl-tlabel { align-self: stretch; display: inline-flex; align-items: center; font-size: 12px; font-weight: 800; color: #fff; background: #475569; padding: 0 10px; border-radius: 7px; margin-right: 4px; letter-spacing: -.01em; white-space: nowrap; }
.fl-tool {
  display: inline-flex; align-items: center; gap: 6px; border: 0; background: none; padding: 6px 10px; border-radius: 8px;
  cursor: pointer; font: inherit; font-size: 13px; font-weight: 600; color: var(--text); white-space: nowrap;
}
.fl-tool:hover { background: #f1f5f9; }
.fl-tool.active { background: #fff; color: var(--primary); font-weight: 700; box-shadow: 0 0 0 2px var(--primary); }
.fl-sw { width: 14px; height: 14px; border-radius: 3px; display: inline-block; border: 1px solid #94a3b8; background: #fff; flex: none; }
.fl-sw.perf { background: radial-gradient(#94a3b8 30%, transparent 32%) 0 0 / 4px 4px, #eef2f7; }
.fl-sw.none { background: repeating-linear-gradient(45deg, #cbd5e1 0 2px, #e2e8f0 2px 5px); }
.fl-sw.room { background: #fff; border: 2px solid #334155; clip-path: polygon(0 0, 100% 0, 100% 55%, 55% 100%, 0 100%); border-radius: 0; }
.fl-sw.rack { border-color: #64748b; box-shadow: inset 0 -3px 0 #64748b; }
.fl-sw.door { border: 0; border-bottom: 3px solid #475569; border-left: 1px dashed #64748b; border-radius: 0 12px 0 0; border-top: 1px dashed #64748b; }
.fl-sw.column { background: #94a3b8; }
.fl-sw.panel { background: #fee2e2; border-color: #dc2626; }
.fl-sw.ups { background: #fef3c7; border-color: #d97706; }
.fl-sw.crac { background: #e0f2fe; border-color: #0284c7; }
.fl-sw.text { border: 1px dashed #94a3b8; font-size: 10px; line-height: 12px; text-align: center; font-weight: 800; }
.fl-sw.line { border: 0; background: linear-gradient(#334155, #334155) 50% 50% / 100% 3px no-repeat; }
.fl-sw.dash { border: 0; background: repeating-linear-gradient(90deg, #64748b 0 4px, transparent 4px 7px) 50% 50% / 100% 3px no-repeat; }
.fl-sw.arrow2 { border: 0; background: #64748b; clip-path: polygon(0 50%, 30% 10%, 30% 35%, 70% 35%, 70% 10%, 100% 50%, 70% 90%, 70% 65%, 30% 65%, 30% 90%); }
.fl-sw.rect { border: 2px solid #2563eb; background: transparent; border-radius: 2px; }
.fl-sw.ellipse { border: 2px solid #0891b2; background: #e0f2fe; border-radius: 50%; }
.fl-sw.zone { border: 2px dashed #16a34a; background: #dcfce7; }
.fl-sw.wall { border: 0; background: linear-gradient(#334155, #334155) 50% 50% / 100% 5px no-repeat; }
.fl-sw.tray { border: 1px solid #64748b; background: repeating-linear-gradient(90deg, #f1f5f9 0 3px, #94a3b8 3px 4px); height: 8px; }
.fl-sw.fire { border: 0; background: #dc2626; border-radius: 50%; }
.fl-sw.door2 { border: 0; border-bottom: 3px solid #475569; border-left: 1px dashed #64748b; border-right: 1px dashed #64748b; border-radius: 0; width: 18px; }
.fl-sw.window { border: 1px solid #0369a1; background: linear-gradient(#0369a1, #0369a1) 50% 50% / 100% 1px no-repeat, #e0f2fe; height: 6px; }
.fl-sw.battery { background: #fef9c3; border-color: #a16207; }
.fl-sw.containment { border: 3px solid #0891b2; background: transparent; }
.fl-sw.cctv { border: 0; background: #1e293b; clip-path: polygon(0 35%, 40% 35%, 100% 0, 100% 100%, 40% 65%, 0 65%); }
.fl-sw.access { border: 0; background: #7c3aed; border-radius: 50%; }
.fl-sw.sensor { border: 0; background: #0891b2; border-radius: 50%; }
.fl-tools-row { display: flex; flex-wrap: wrap; gap: 8px; width: 100%; }
.fl-sw.arrow { border: 0; background: linear-gradient(#64748b, #64748b) 0 50% / 9px 4px no-repeat; clip-path: polygon(0 35%, 60% 35%, 60% 10%, 100% 50%, 60% 90%, 60% 65%, 0 65%); background: #64748b; }
/* 고른 도형 고치기 */
.fl-props {
  display: flex; align-items: center; flex-wrap: wrap; gap: 8px 12px; min-height: 46px; margin-bottom: 10px;
  padding: 8px 12px; border: 1px solid var(--line); border-radius: 10px; background: #f8fafc; font-size: 13px;
}
.fl-props .fl-kind-chip { font-weight: 700; color: var(--primary); background: #eef4ff; padding: 3px 10px; border-radius: 999px; white-space: nowrap; }
.fl-props .fl-rack-st { font-size: 12px; color: #b45309; background: #fef3c7; padding: 3px 8px; border-radius: 6px; }
html.ui-dark .fl-props .fl-rack-st { color: #fcd34d; background: #3b2f12; }
.fl-props .fl-acts { display: inline-flex; gap: 6px; flex-wrap: wrap; margin-left: auto; }.fl-props input[type=text] { width: 150px; padding: 6px 10px; border: 1px solid var(--line); border-radius: 8px; font: inherit; font-size: 14px; font-weight: 700; }
.fl-props .fl-presets { display: inline-flex; gap: 4px; flex-wrap: wrap; }
.fl-props .fl-presets button { border: 1px solid var(--line); background: #fff; border-radius: 6px; padding: 3px 7px; font: inherit; font-size: 12px; cursor: pointer; color: var(--text); }
.fl-props .fl-presets button.on { border-color: var(--primary); color: var(--primary); font-weight: 700; }
.fl-props .fl-hint { color: var(--muted); line-height: 1.5; }
.fl-props .btn-row { margin-left: auto; }
.fl-admin-wrap { display: block; min-height: 360px; height: 64vh; overflow: hidden; padding: 0; }
.fl-admin-wrap:focus { outline: none; border-color: color-mix(in srgb, var(--primary) 45%, var(--line)); }
/* 확대·이동은 화면 안에서 (마우스 휠·끌기·두 손가락) — 스크롤 막대 없음 */
.fl-admin-wrap .floor-host { position: absolute; inset: 6px; }
.fl-paint, #fl-edit-host, .floor-card.full .floor-host { touch-action: none; }   /* 누른 채로 끌기 (휴대폰에서도) */
.floor-host.fl-panning, .floor-host.fl-panning * { cursor: grabbing !important; }
/* 상면도 저장 기록 */
.fl-ver { margin-top: 14px; padding: 12px; border-radius: 12px; border: 1px solid var(--line); background: color-mix(in srgb, var(--primary) 4%, transparent); }
.fl-ver.hidden { display: none; }
.fl-ver-head { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 8px; }
.fl-ver-head .btn { margin-left: auto; }
.fl-ver-table { max-height: 320px; }
/* 보기 켜기·끄기: 트레이·설비 숨기기 (벽·기둥·문·창문은 방 모양이라 그대로) */
.fl-hide-tray .fl-it.tray { display: none; }
.fl-hide-eq .fl-it:not(.rack):not(.tray):not(.wall):not(.column):not(.door):not(.door2):not(.window) { display: none; }
.fl-layers { display: inline-flex; align-items: center; gap: 3px; padding: 3px; border-radius: 10px; background: #f1f5f9; }
.fl-layers-t { font-size: 12px; font-weight: 700; color: var(--muted); padding: 0 6px 0 4px; }
.fl-layer { border: 0; background: #fff; color: var(--heading); font: inherit; font-size: 12.5px; font-weight: 700; padding: 5px 10px; border-radius: 7px; cursor: pointer; box-shadow: 0 1px 2px rgba(15,23,42,.08); }
.fl-layer::before { content: "✓ "; color: var(--primary); }
.fl-layer.off { background: transparent; color: var(--muted); box-shadow: none; text-decoration: line-through; }
.fl-layer.off::before { content: ""; }
html.ui-dark .fl-layers { background: #182838; }
html.ui-dark .fl-layer { background: #111a2d; }
html.ui-dark .fl-layer.off { background: transparent; }
/* 랙 정보 띠: 랙을 누르면 아래에 '누가 언제' + [되돌리기] (휴대폰은 마우스 올리기가 없어서) */
.fl-info { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-top: 8px; padding: 8px 12px; border-radius: 10px;
  background: color-mix(in srgb, var(--primary) 8%, var(--card, #fff)); border: 1px solid color-mix(in srgb, var(--primary) 25%, transparent);
  font-size: 13.5px; color: var(--heading); }
.fl-info.hidden { display: none; }
.fl-info.warn { background: color-mix(in srgb, #f59e0b 14%, var(--card, #fff)); border-color: color-mix(in srgb, #f59e0b 55%, transparent); }   /* 상면배치가 우선 안내 */
.fl-info b { font-weight: 800; }
.fl-info .fl-info-msg { flex: 1; min-width: 0; }
.fl-info .btn { flex: none; }
/* 끌어서 화면 이동: 편집 '화면 이동' 도구 / 체크 화면의 빈 곳(랙 밖) */
.floor-host.fl-hand, .floor-host.fl-hand * { cursor: grab !important; }
#fl-check-host svg, #wfl-host svg { cursor: grab; }
#fl-check-host .fl-it.rack, #wfl-host .fl-it.rack { cursor: pointer; }
.floor-card.full .floor-host { cursor: grab; }
.fl-navhelp { font-size: 12px; color: var(--muted); }
.fl-paint .fl-it.rack { cursor: pointer; }
/* 진행 체크: 랙만 눌림 (위에 겹친 트레이·선 등은 누름을 통과시켜 아래 랙이 칠해지게) */
.fl-paint .fl-it:not(.rack) { pointer-events: none; }
/* 그리는 칸 높이 고정 (전체 화면에서는 남는 높이를 모두 씀) */
.fl-canvas-col .fl-admin-wrap { flex: none; }
#fl-card.fl-full .fl-canvas-col .fl-admin-wrap { flex: 1; }
.fl-paint .fl-it.rack:hover .fl-body { stroke: var(--primary); stroke-width: 30; }
/* 저장된 상면도 목록 · 이름/저장 줄 · 전체 화면 편집 */
.fl-list { width: 100%; border-collapse: collapse; font-size: 14px; }
.fl-list th { text-align: left; font-size: 12px; color: var(--muted); font-weight: 600; padding: 6px 8px; border-bottom: 1px solid var(--line); white-space: nowrap; }
.fl-list td { padding: 8px; border-bottom: 1px solid #eef2f7; vertical-align: middle; }
.fl-list tr.editing td { background: color-mix(in srgb, var(--primary) 6%, transparent); }
.fl-list tr.on td:nth-child(2) b { color: var(--primary); }
.fl-list .fl-act { display: inline-flex; align-items: center; gap: 6px; cursor: pointer; font-size: 13px; white-space: nowrap; }
.fl-list .fl-act input { accent-color: var(--primary); width: 16px; height: 16px; }
.fl-list .fl-tag { font-size: 11px; font-weight: 700; padding: 1px 7px; border-radius: 999px; background: #eef4ff; color: var(--primary); margin-left: 6px; }
.fl-list td:last-child { text-align: right; white-space: nowrap; }
.fl-list .fl-empty td { color: var(--muted); text-align: center; padding: 18px; }
@media (max-width: 640px) {   /* 휴대폰: 크기·저장 시각 열은 숨김 */
  .fl-list th:nth-child(3), .fl-list td:nth-child(3), .fl-list th:nth-child(5), .fl-list td:nth-child(5) { display: none; }
}
.fl-filebar #fl-name { width: 220px; padding: 6px 10px; border: 1px solid var(--line); border-radius: 8px; font: inherit; font-size: 14px; font-weight: 700; }
.fl-filebtns { display: inline-flex; gap: 6px; flex-wrap: wrap; margin-left: auto; }
.fl-active-line { margin: 0 0 8px; }
#fl-card.fl-full { position: fixed; inset: 0; z-index: 2500; margin: 0; border-radius: 0; display: flex; flex-direction: column; overflow: auto; padding: 12px 16px; }
#fl-card.fl-full > .card-head { margin-bottom: 6px; }
#fl-card.fl-full #fl-edit, #fl-card.fl-full #fl-check { flex: 1; min-height: 0; display: flex; flex-direction: column; }
#fl-card.fl-full .fl-editor { flex: 1; min-height: 0; grid-template-rows: minmax(0, 1fr); }
#fl-card.fl-full .fl-editor .fl-tools { max-height: 100%; }
#fl-card.fl-full .fl-canvas-col { height: 100%; min-height: 0; }
#fl-card.fl-full #fl-edit-wrap, #fl-card.fl-full #fl-check-wrap { flex: 1; height: auto; min-height: 240px; }
#fl-card.fl-full .fl-actions { margin-top: 8px; }
body.fl-full-on { overflow: hidden; }
.fl-actions { justify-content: flex-end; align-items: center; margin-top: 12px; }
.fl-actions .dirty-chip { margin-right: auto; }
.btn.ghost.fl-del { color: #b91c1c; }
.btn.ghost.fl-del:not(:disabled):hover { background: #fef2f2; border-color: #fecaca; }
@media (max-width: 640px) {
  .fl-admin-wrap { height: 56vh; }
  .fl-props input[type=text] { width: 120px; }
}
/* 어두운 화면: 대시보드 TV(body.dark) · 관리(html.ui-dark) */
body.dark .floor-svg, html.ui-dark .floor-svg {
  --fl-floor: #111a2d; --fl-grid: #3a4d70; --fl-border: #5b6f93; --fl-perf: #1a2540; --fl-perf-dot: #4b5d7e;
  --fl-none: #0a1020; --fl-none-line: #1b2539; --fl-rack: #16213a; --fl-rack-line: #7d8ba3; --fl-rack-text: #e2e8f0;
  --fl-eq: #1b2539; --fl-eq-line: #3b4a66; --fl-eq-text: #cbd5e1; --fl-col: #475569; --fl-wall: #94a3b8;
}
body.dark .fl-it.ups .fl-body, html.ui-dark .fl-it.ups .fl-body { fill: #3a2a0a; }
body.dark .fl-it.panel .fl-body, html.ui-dark .fl-it.panel .fl-body { fill: #3a1418; }
body.dark .fl-it.crac .fl-body, html.ui-dark .fl-it.crac .fl-body { fill: #0c2a3d; }
html.ui-dark .fl-modes, html.ui-dark .fl-pens { background: #0d1527; }
html.ui-dark .fl-tgroup { background: #111a2d; border-color: #2a3852; box-shadow: none; }
html.ui-dark .fl-tlabel { background: #2f3f5e; color: #e2e8f0; }
html.ui-dark .fl-tool:hover { background: #1b2539; }
html.ui-dark .fl-tool.active, html.ui-dark .fl-mode.active, html.ui-dark .fl-pen.active { background: #1b2539; }
html.ui-dark .fl-props, html.ui-dark .floor-wrap { background: #0d1527; border-color: #1d2840; }
/* 대시보드 상면 크게 보기 (지도 크게 보기와 같은 방식) */
.floor-card:not(.full) .fl-full-only { display: none !important; }
.floor-card:not(.full) #floor-grid { cursor: zoom-in; }
.floor-card.full .card-head { flex-wrap: wrap; gap: 8px; }
.floor-card.full .map-btns { flex-wrap: wrap; gap: 6px; }
.fl-navline { text-align: center; margin: 4px 0 0; }
/* 관리 > 상면도 > 진행 체크: 상면 체크 이력 */
.fl-log { margin-top: 12px; border: 1px solid var(--line); border-radius: 10px; padding: 8px 12px; }
.fl-log summary { cursor: pointer; font-weight: 700; display: flex; align-items: center; gap: 6px; }
.fl-log-bar { display: flex; align-items: center; justify-content: space-between; gap: 8px; flex-wrap: wrap; margin: 10px 0 6px; }
.fl-log-wrap { max-height: 360px; overflow: auto; }
.fl-log-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.fl-log-table th { position: sticky; top: 0; background: var(--card); text-align: left; font-size: 12px; color: var(--muted); font-weight: 600; padding: 6px 8px; border-bottom: 1px solid var(--line); }
.fl-log-table td { padding: 6px 8px; border-bottom: 1px solid #eef2f7; }
.fl-log-table .fl-lg { gap: 4px; }
/* 작업 체크: [상면 체크] 전체 화면 (현장 작업자가 휴대폰으로 랙 칠하기) */
.work-head-btns { display: inline-flex; gap: 8px; flex-wrap: wrap; align-items: center; margin-left: auto; }
.work-head .work-head-btns .gps-btn { margin-left: 0; }
.wfl-overlay { position: fixed; inset: 0; z-index: 2600; background: var(--bg); display: flex; flex-direction: column; gap: 8px; padding: 10px 12px; }
.wfl-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; font-size: 16px; }
.wfl-head b { display: inline-flex; align-items: center; gap: 6px; }
.wfl-bar { display: flex; align-items: center; flex-wrap: wrap; gap: 6px 10px; }
.wfl-bar .fl-zoom { margin-left: auto; }
.wfl-wrap { flex: 1; min-height: 0; background: var(--card); }
.wfl-wrap .floor-host { position: absolute; inset: 4px; }
.wfl-help { text-align: center; margin: 0; }
body.wfl-on { overflow: hidden; }
@media (max-width: 640px) {
  .wfl-bar .fl-pen { padding: 6px 8px; font-size: 12px; }
  .wfl-bar .fl-find input { width: 110px; }
  /* 휴대폰: 진행 수(전체·설치·상면배치)는 한 줄로 — 글자·간격을 조금 줄임 */
  .floor-legend { font-size: 12px; gap: 4px 9px; }
  .floor-legend .fl-lg { gap: 4px; }
  .floor-legend .fl-lg i { width: 10px; height: 10px; }
  .floor-legend .fl-lg-all { padding-right: 9px; }
  .floor-legend.fl-syms { flex-wrap: wrap; white-space: normal; }   /* 기호 설명은 여러 줄 그대로 */
  /* 휴대폰 크게 보기: 한 줄에 들어가게 조금 줄인 크기 */
  .floor-card.full #floor-legend, #fl-card.fl-full #fl-check-legend { font-size: 14px; gap: 6px 14px; }
  .floor-card.full #floor-legend .fl-lg b, #fl-card.fl-full #fl-check-legend .fl-lg b { font-size: 19px; }
  .floor-card.full #floor-legend .fl-lg i, #fl-card.fl-full #fl-check-legend .fl-lg i { width: 14px; height: 14px; }
  .floor-card.full #floor-legend .fl-lg-all, #fl-card.fl-full #fl-check-legend .fl-lg-all { padding-right: 14px; }
  .wfl-help { font-size: 11.5px; line-height: 1.45; }   /* 두 줄로 (잘리지 않게 — 2026-12-02) */
  .wfl-overlay .fl-info { margin-top: 0; font-size: 13px; }
}
.wfl-overlay .fl-info { margin-top: 0; }
/* 보고서: 상면 현황 */
.rp-floor { break-inside: avoid; page-break-inside: avoid; }
.rp-floor-img svg { width: 100%; height: auto; display: block; border: 1px solid var(--line); border-radius: 8px; background: #fff; }
.rp-floor-name { font-size: 13px; font-weight: 600; color: var(--muted); }
.rp-floor .floor-legend { justify-content: flex-start; }
.floor-card.full { position: fixed; inset: 0; z-index: 2500; margin: 0; border-radius: 0; padding: 14px 18px 18px; }
body.tv #floor-manage { display: none !important; }
.act-reset {
  border: 1px solid var(--line); background: #fff; border-radius: 8px; padding: 4px 10px; cursor: pointer;
  font: inherit; font-size: 12px; font-weight: 600; color: var(--muted);
}
.act-reset:hover { color: #b91c1c; border-color: #fecaca; background: #fef2f2; }
/* 최근 작업 목록 */
.act-list { gap: 0; }
.act-item {
  display: grid; grid-template-columns: auto 1fr auto; gap: 10px; align-items: center;
  padding: 8px 4px; border-bottom: 1px dashed var(--line); font-size: 13px;
}
.act-item:last-child { border-bottom: 0; }
.act-time { font-variant-numeric: tabular-nums; font-weight: 700; color: var(--done); font-size: 12px; min-width: 40px; }
.act-body { color: var(--text); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.act-user { color: var(--muted); font-size: 12px; white-space: nowrap; }
/* 칸이 좁으면(노트북 등) 두 줄: 위 = 시각 · 이름, 아래 = 작업 내용 전체 (… 로 잘리지 않게) */
@container (max-width: 360px) {
  .ann-card .act-item { grid-template-columns: auto 1fr; grid-template-areas: "t u" "b b"; gap: 2px 8px; padding: 7px 4px; }
  .ann-card .act-time { grid-area: t; }
  .ann-card .act-user { grid-area: u; justify-self: end; overflow: hidden; text-overflow: ellipsis; max-width: 100%; }
  .ann-card .act-body { grid-area: b; white-space: normal; overflow: visible; word-break: keep-all; overflow-wrap: anywhere; line-height: 1.4; }
}

/* 서버 연결 끊김 경고 띠 (화면 맨 위에 겹쳐 표시 → 배치는 그대로) */
.stale-bar {
  position: fixed; top: 74px; left: 50%; transform: translateX(-50%); z-index: 3000; /* 상단 CI·제목 아래 */
  max-width: calc(100% - 32px); padding: 8px 18px; border-radius: 999px;
  background: #b91c1c; color: #fff; font-size: 13px; text-align: center; white-space: nowrap;
  overflow: hidden; text-overflow: ellipsis;
  box-shadow: 0 8px 24px rgba(185,28,28,.35);
  animation: stale-pulse 2s ease-in-out infinite;
}
@keyframes stale-pulse { 50% { box-shadow: 0 8px 32px rgba(185,28,28,.6); } }


/* 목록이 없을 때 안내: 탭 바로 아래에 표시 (빈 목록이 칸을 차지하지 않게) */
.ann-list:empty { display: none; }
.ann-empty {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px;
  margin-top: 4px; padding: 18px 12px; border: 1px dashed var(--line); border-radius: 10px;
  color: var(--muted); font-size: 13px; text-align: center;
}
.map-wrap { position: relative; }
.map-empty {
  position: absolute; inset: 0; z-index: 500; /* 지도 위에 표시 */
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; text-align: center;
  padding: 20px; border-radius: 10px; background: rgba(255, 255, 255, .35); pointer-events: none;
}
/* 안내 문구는 흰 상자 안에 → 지도 글씨와 겹쳐도 또렷하게 */
.map-empty-box {
  display: flex; flex-direction: column; align-items: center; gap: 6px; max-width: min(72%, 360px);
  padding: 16px 20px;   /* 지도 칸이 좁아도 왼쪽 확대·축소 버튼을 가리지 않게 */
  word-break: keep-all;  /* 한글이 단어 중간에서 줄바꿈되지 않게 */ border-radius: 14px; background: rgba(255, 255, 255, .96);
  border: 1px solid var(--card-line); box-shadow: 0 8px 28px rgba(15, 23, 42, .14);
}
.map-empty .map-empty-ic {   /* 아이콘(svg) 자체를 동그란 배지로 */
  display: block; box-sizing: border-box; width: 42px; height: 42px; padding: 10px; margin-bottom: 4px;
  border-radius: 50%; background: #eef4ff; color: var(--primary);
}
.map-empty b { font-size: 15px; color: var(--heading); }
.map-empty span { font-size: 13px; color: var(--muted); line-height: 1.5; }
.map-empty.compact .map-empty-box { flex-direction: row; gap: 8px; padding: 0; max-width: none; background: none; border: 0; box-shadow: none; }
.map-empty.compact .map-empty-ic { display: none; }
.map-empty.compact .map-empty-box { flex-direction: row; }

/* PC: 스크롤 없이 한 화면에 2×2 배치 (화면 높이에 맞춰 카드 크기 자동 조절) */
@media (min-width: 1025px) and (min-height: 620px) {
  .dash-page main {
    height: calc(100vh - 64px); display: flex; flex-direction: column;
    max-width: 1760px; padding: 16px 24px; /* 큰 모니터에서는 넓게 사용 */
  }
  .dash-page .notice { margin-bottom: 12px; }
  /* 세로 3칸 비율: 작업별 진척률 1 : (전체 진척률 아래쪽·지도 위쪽) 0.4 : (시계·지도 아래쪽) 0.75 */
  .dash-grid { flex: 1; min-height: 0; grid-template-rows: minmax(0, 1fr) minmax(0, 0.4fr) minmax(0, 0.75fr); }
  /* 시계 글자: 카드 폭과 높이 둘 다에 맞춰 조절 */
  .dash-grid .clock-card { container-type: size; padding: clamp(12px, 6cqh, 24px) 18px; gap: clamp(8px, 5cqh, 18px); }
  .dash-grid .clock-time { font-size: clamp(30px, min(22cqw, 24cqh), 112px); }
  .dash-grid .clock-date { font-size: clamp(12px, min(5.5cqw, 8cqh), 22px); }
  /* 큰 모니터·TV: 칸 크기에 맞춰 숫자·글자도 크게 (빈 공간 줄이고 멀리서도 읽히게) */
  .dash-grid .gauge-label { font-size: clamp(16px, 19cqmin, 68px); }
  .dash-grid .gauge-sub { font-size: clamp(9px, 6cqmin, 17px); }
  .dash-grid .kpi-value { font-size: clamp(16px, 1.3vw, 28px); }
  .dash-grid .kpi-label { font-size: clamp(13px, .85vw, 17px); }
  .dash-grid .kpi-share, .dash-grid .kpi-unit { font-size: clamp(11px, .7vw, 14px); }
  .dash-grid .kpi-total .kpi-value { font-size: clamp(20px, 1.6vw, 34px); }
  .dash-grid .kpi-total .kpi-label { font-size: clamp(14px, .9vw, 18px); }
  .dash-grid .op-times { padding: clamp(8px, 4cqh, 16px) 18px; gap: clamp(4px, 2.5cqh, 10px); }
  .dash-grid .op-row { font-size: clamp(12px, min(4.6cqw, 7cqh), 18px); }
  /* 상태 목록: 낮은 화면에서도 카드 안에 들어가도록 촘촘하게, 원 그래프는 남는 높이를 모두 사용 */
  .dash-grid .status-list { gap: clamp(4px, 0.8vh, 8px); }
  .dash-grid .kpi { padding: clamp(3px, 0.6vh, 7px) 8px; }
  .dash-grid .kpi-total { padding: clamp(4px, 0.8vh, 8px) 10px; }
  .dash-grid > .card { min-height: 0; }
  .dash-grid #stage-box { min-height: 0; }
  .dash-grid .map-wrap { flex: 1; min-height: 0; display: flex; flex-direction: column; }
  .dash-grid .map-card #map { flex: 1; height: auto; min-height: 0; }
  .dash-grid .gauge-box { flex: 1; height: auto; min-height: 110px; }
  .dash-grid .spare-card { min-height: 0; }
  .dash-grid .floor-wrap { min-height: 0; }
}
/* 넓은 화면(1700px~): 카드 제목·공지·최근 작업 글자도 크게 */
@media (min-width: 1700px) {
  .dash-page .card h2 { font-size: 18px; }
  .dash-page .card h2 .small, .dash-page #map-count { font-size: 13px; }
  .dash-page .ann-tab { font-size: 15px; }
  .dash-page .ann-text { font-size: 15px; }
  .dash-page .act-item { font-size: 14px; }
}
.chart-empty { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; color: var(--muted); font-size: 13px; }

/* 전체 진척률 카드: 원 그래프(가운데, 크게) → 전체 작업 → 상태 2×2 */
.overview { flex: 1; min-height: 0; display: flex; flex-direction: column; gap: 10px; }
.gauge-box { height: 220px; min-width: 0; container-type: size; } /* 안쪽 글자 크기가 원 크기를 따라가도록 */
.status-list { display: flex; flex-direction: column; gap: 8px; }
.kpi {
  display: grid; grid-template-columns: 8px 1fr auto auto; align-items: center; gap: 5px;
  width: 100%; padding: 6px 8px; border-radius: 8px; background: #f9fafb;
  font: inherit; color: inherit; text-align: left; min-width: 0;
}
.kpi-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--c); box-shadow: 0 0 0 3px color-mix(in srgb, var(--c) 20%, transparent); }
.kpi-label { font-size: 13px; color: var(--text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
/* 숫자는 상태색을 조금 진하게 → 흰 바탕에서도 또렷하게 */
.kpi-value { font-size: 16px; font-weight: 800; color: color-mix(in srgb, var(--c, var(--text)) 82%, #0f172a); font-variant-numeric: tabular-nums; }
/* 상태 칸: 같은 색을 아주 연하게 깔아 구분 */
.status-grid .kpi {
  background: color-mix(in srgb, var(--c) 8%, #fff);
  border: 1px solid color-mix(in srgb, var(--c) 18%, #fff);
}
.kpi-share, .kpi-unit { font-size: 11px; color: var(--muted); text-align: right; font-variant-numeric: tabular-nums; }
/* '전체 작업' 줄: 한 줄 전체, 조금 크게 */
.kpi-total {
  grid-template-columns: 1fr auto auto; gap: 6px; padding: 8px 10px; background: none;
  border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); border-radius: 0;
}
.kpi-total .kpi-label { font-weight: 700; font-size: 14px; color: var(--heading); }
.kpi-total .kpi-value { font-size: 20px; color: var(--heading); }
/* 대기·진행중·지연·완료: 2×2 */
.status-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; }
.gauge-center {
  position: absolute; inset: 0; display: flex; flex-direction: column;
  align-items: center; justify-content: center; pointer-events: none;
}
.gauge-label { font-size: clamp(16px, 17cqmin, 44px); font-weight: 800; line-height: 1.1; }
.gauge-sub { font-size: clamp(9px, 6cqmin, 13px); color: var(--muted); margin-top: 2px; text-align: center; }

/* 지도 */
#map { height: 380px; border-radius: 10px; background: #e5e7eb; }
.map-notice { display: flex; align-items: center; justify-content: center; height: 100%; padding: 20px; text-align: center; color: var(--muted); }
/* 운송 차량 표시: 네모(모서리 조금 둥근) + 트럭 그림 → 둥근 알약 모양의 출발·도착 표시와 구분 */
.pin {
  min-width: 40px; height: 26px; padding: 0 8px 0 5px; border-radius: 6px; gap: 4px;
  display: inline-flex; align-items: center; justify-content: center;
  color: #fff; font-size: 12px; font-weight: 700; white-space: nowrap;
  border: 2px solid #fff; box-shadow: 0 1px 4px rgba(0,0,0,.35); cursor: pointer;
}
.pin-truck { width: 17px; height: 17px; flex: none; }
.popup { min-width: 180px; padding: 10px 12px; font-size: 13px; line-height: 1.6; }
.popup b { font-size: 14px; }
.popup-list { list-style: none; margin: 6px 0 0; padding: 0; max-height: 200px; overflow: auto; }
.popup-list li { padding: 3px 0; white-space: nowrap; }
.popup-list li b { font-size: 13px; }
/* 묶음 표시: 테두리 색 = 상태 비율 */
.cluster {
  border-radius: 50%; padding: 4px; cursor: pointer;
  box-shadow: 0 2px 6px rgba(0,0,0,.35); transition: transform .15s;
}
.cluster:hover { transform: scale(1.08); }
.cluster span {
  display: flex; align-items: center; justify-content: center; width: 100%; height: 100%;
  border-radius: 50%; background: #fff; color: #111827; font-size: 14px; font-weight: 800;
}

/* 칩 필터 */
.chips { display: flex; gap: 6px; flex-wrap: wrap; }
.chip {
  border: 1px solid var(--line); background: #fff; border-radius: 999px;
  padding: 4px 12px; font-size: 13px; cursor: pointer; color: var(--text);
}
.chip.active { background: var(--navy); color: #fff; border-color: var(--navy); }

/* 표 */
.table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }
table { width: 100%; border-collapse: collapse; font-size: 14px; }
th, td { padding: 10px 8px; border-bottom: 1px solid var(--line); text-align: left; white-space: nowrap; }
th { font-size: 12px; color: var(--muted); font-weight: 600; background: #f9fafb; }
tbody tr.clickable { cursor: pointer; }
tbody tr.clickable:hover { background: #f3f4f6; }
.progress-cell { display: flex; align-items: center; gap: 8px; }
.bar { flex: 1; min-width: 80px; height: 8px; background: var(--line); border-radius: 4px; overflow: hidden; }
.bar > span { display: block; height: 100%; }
.badge { display: inline-block; padding: 2px 8px; border-radius: 6px; font-size: 12px; font-weight: 700; }

/* 입력/버튼 */
input[type=search], input[type=password], input[type=text] {
  border: 1px solid var(--line); border-radius: 8px; padding: 8px 12px; font-size: 14px; min-width: 220px; background: #fff;
  transition: border-color .15s, box-shadow .15s;
}
/* 입력칸 포커스: 브라우저 기본 검정 테두리 대신 파란 테두리 + 은은한 빛 */
input[type=search]:focus, input[type=password]:focus, input[type=text]:focus, select:focus {
  outline: none; border-color: var(--primary); box-shadow: 0 0 0 3px rgba(37, 99, 235, .15);
}
.btn:focus-visible, .pw-toggle:focus-visible { outline: 2px solid var(--primary); outline-offset: 2px; }
.btn {
  border: 0; border-radius: 8px; padding: 8px 14px; font-size: 14px; font-weight: 600;
  background: var(--primary); color: #fff; cursor: pointer; text-decoration: none; display: inline-block;
}
.btn { transition: background-color .15s, border-color .15s; }
.btn:disabled { opacity: .5; cursor: default; }
.btn:not(:disabled):hover { background: #1d4ed8; }
.btn:not(:disabled):active { background: #1e40af; }
.btn.ghost { background: #fff; color: var(--text); border: 1px solid var(--line); }
.btn.ghost:not(:disabled):hover { background: #f3f4f6; border-color: #d1d5db; }
.btn.danger { background: var(--late); }
.btn.danger:not(:disabled):hover { background: #dc2626; }
.btn.sm { padding: 4px 10px; font-size: 12px; }
.btn-row { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }

/* 관리 페이지 */
.login-card { max-width: 480px; margin: 0 auto; padding: 32px 40px; border: 1px solid #d1d5db; box-shadow: none; }
.login-card input { width: 100%; margin: 6px 0 14px; padding-top: 11px; padding-bottom: 11px; }
.login-card .btn { padding-top: 12px; padding-bottom: 12px; margin-top: 4px; }
.dropzone {
  border: 2px dashed #cbd5e1; border-radius: 12px; padding: 28px; text-align: center;
  color: var(--muted); cursor: pointer; transition: .15s;
}
.dropzone.drag { border-color: var(--primary); background: #eff6ff; color: var(--primary); }
.radio-row { display: flex; gap: 18px; flex-wrap: wrap; margin: 14px 0; font-size: 14px; }
.result-ok { background: #ecfdf5; color: #065f46; padding: 12px; border-radius: 8px; margin-top: 12px; }
.result-err { background: #fef2f2; color: #991b1b; padding: 12px; border-radius: 8px; margin-top: 12px; }
.result-err ul { margin: 6px 0 0; padding-left: 18px; max-height: 200px; overflow: auto; }
/* 작업 단계 관리 */
.stage-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.stage-row {
  display: grid; grid-template-columns: 28px minmax(120px, 200px) auto 1fr auto; align-items: center; gap: 10px;
  padding: 6px 8px; border: 1px solid var(--line); border-radius: 10px;
}
.stage-dates { display: flex; flex-wrap: wrap; gap: 6px 14px; }
.stage-due { display: flex; align-items: center; gap: 6px; font-size: 12px; color: var(--muted); white-space: nowrap; }
.stage-due input { border: 1px solid var(--line); border-radius: 8px; padding: 6px 8px; font: inherit; font-size: 13px; color: var(--text); }
/* 단계별 작업 목록 업로드 */
.upload-row { display: grid; grid-template-columns: 220px 1fr auto; gap: 12px; align-items: stretch; }
.upload-stage { display: flex; flex-direction: column; gap: 6px; font-size: 13px; color: var(--muted); }
.upload-stage select { padding: 10px; font-size: 14px; }
.upload-row .dropzone { padding: 18px; }
.upload-row #upload { align-self: center; padding: 10px 22px; }
.stage-no {
  width: 24px; height: 24px; border-radius: 50%; background: #eff6ff; color: var(--primary);
  display: flex; align-items: center; justify-content: center; font-size: 12px; font-weight: 800;
}
.stage-row input { min-width: 0; width: 100%; }
.stage-renamed { color: #b45309; }
.stage-new { color: var(--primary); font-weight: 600; }
/* 로그인 화면 설정 */
.copy-form { display: flex; align-items: flex-end; gap: 10px; flex-wrap: wrap; margin-bottom: 18px; }
.copy-form label { flex: 1 1 360px; font-size: 13px; color: var(--muted); }
.copy-form input { display: block; width: 100%; margin-top: 4px; min-width: 0; }
.ci-heading { font-size: 14px; margin: 0 0 6px; padding-top: 16px; border-top: 1px solid var(--line); }
/* 로그인 화면 CI 관리 */
.ci-grid { display: grid; grid-template-columns: 1fr 1fr 0.7fr; gap: 16px; }
.ci-slot-icon { order: 3; }
.ci-slot-icon .ci-preview img { max-height: 64px; }
.ci-slot { border: 1px solid var(--line); border-radius: 12px; padding: 14px; display: flex; flex-direction: column; gap: 10px; }
.ci-title { font-weight: 700; font-size: 14px; }
.ci-preview {
  height: 110px; border-radius: 8px; display: flex; align-items: center; justify-content: center;
  background: #fff; border: 1px dashed #d1d5db; padding: 12px;
}
.ci-preview img { max-height: 100%; max-width: 100%; object-fit: contain; }
.ci-preview span, .ci-slot.empty .ci-preview img { display: none; }
.ci-slot.empty .ci-preview span { display: inline; }

/* 작업 체크 화면: PC는 표(한 줄 = 작업 하나), 휴대폰은 촘촘한 목록 */
.work-page main { max-width: 1400px; padding-bottom: 40px; }
.work-head { display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; margin-bottom: 12px; }
.work-head h1 { font-size: 22px; margin: 0; }
/* 연결 끊김 / 보관 중인 체크 전송 띠 (화면을 내려도 위에 붙어 있음) */
.net-bar { position: sticky; top: 8px; z-index: 30; margin: 0 0 12px; padding: 10px 14px; border-radius: 10px;
  font-size: 14px; line-height: 1.5; box-shadow: 0 2px 8px rgba(15, 23, 42, .08); }
.net-bar.down { background: #fef2f2; color: #991b1b; border: 1px solid #fecaca; }
.net-bar.sync { background: #eff6ff; color: #1e40af; border: 1px solid #bfdbfe; }
.work-tools { display: flex; align-items: center; gap: 10px; margin-bottom: 8px; flex-wrap: wrap; }
.work-tools input[type=search] { flex: 1; min-width: 220px; padding: 10px 14px; font-size: 15px; }
.work-tools .chip { padding: 6px 14px; font-size: 14px; }
.chip-n { font-weight: 700; opacity: .7; margin-left: 2px; }
.work-help { margin: 4px 0 10px; }
.work-count { font-weight: 700; color: var(--text); }
.more-wrap { display: flex; justify-content: center; padding: 14px 0 0; }

/* 작업 목록 표: 아래로 내려도 머리줄(열 이름)이 상단 메뉴 바로 밑에 붙어 있음 */
.work-table-wrap {
  background: var(--card); border: 1px solid var(--card-line); border-radius: var(--radius);
  box-shadow: 0 1px 2px rgba(15,23,42,.04);
}
.work-table { width: 100%; border-collapse: separate; border-spacing: 0; font-size: 14px; }
.work-table th {
  position: sticky; top: 64px; z-index: 5; background: #f8fafc; color: var(--muted);
  font-size: 12px; font-weight: 700; text-align: left; white-space: nowrap;
  padding: 9px 12px; border-bottom: 1px solid var(--card-line);
  box-shadow: 0 1px 0 var(--card-line);
}
.work-table th:first-child { border-top-left-radius: var(--radius); }
.work-table th:last-child { border-top-right-radius: var(--radius); }
.work-table td { padding: 5px 12px; height: 28px; border-bottom: 1px solid #eef2f7; vertical-align: middle; color: var(--text); }
.work-table tbody tr:nth-child(even) td { background: #fbfcfe; }      /* 줄무늬: 줄을 따라 읽기 쉽게 */
.work-table tbody tr:hover td { background: #f1f5fb; }
.work-table tbody tr:last-child td { border-bottom: 0; }
.work-table .c-check { width: 44px; text-align: center; padding-left: 10px; padding-right: 4px; }
.work-table .c-no { width: 1%; white-space: nowrap; font-weight: 800; font-variant-numeric: tabular-nums; color: var(--heading); }
.work-table .c-by { width: 1%; white-space: nowrap; font-size: 12px; color: #047857; font-weight: 600; }
.work-table .c-by span { color: var(--muted); font-weight: 400; margin-left: 4px; }
/* 완료한 줄은 글자를 연하게 → 남은(미완료) 작업이 눈에 띔 */
.work-table tr.is-done td { color: #94a3b8; }
.work-table tr.is-done td.c-no { color: #64748b; }
.work-table tr.is-done td.c-by { color: #059669; }
/* 단계 탭 (가로로 밀어서 선택) */
.stage-tabs {
  display: flex; gap: 6px; overflow-x: auto; padding: 2px 2px 10px; margin: 0 -2px 6px;
  scroll-snap-type: x proximity; -webkit-overflow-scrolling: touch;
}
.stage-tab {
  flex: none; scroll-snap-align: center; display: flex; flex-direction: column; align-items: flex-start; gap: 1px;
  padding: 8px 12px; border: 1px solid var(--line); border-radius: 10px; background: #fff;
  font: inherit; color: var(--text); cursor: pointer; text-align: left;
}
.stage-tab .st-name { font-size: 13px; font-weight: 700; white-space: nowrap; }
.stage-tab .st-pct { font-size: 12px; color: var(--muted); font-weight: 700; }
.stage-tab.empty .st-pct { font-weight: 400; }
.stage-tab.active { background: #111827; border-color: #111827; color: #fff; }
.stage-tab.active .st-pct { color: #cbd5e1; }
.stage-tab.active .st-pct.c-done { color: #6ee7b7; }
.stage-tab.active .st-pct.c-late { color: #fca5a5; }
/* 선택한 단계 진척 */
.stage-sum { background: var(--card); border-radius: var(--radius); box-shadow: 0 1px 3px rgba(0,0,0,.06); padding: 14px 16px; margin-bottom: 12px; display: flex; flex-direction: column; gap: 8px; }
.stage-sum:empty { display: none; }
.ss-top { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; flex-wrap: wrap; }
.ss-top > b { font-size: 16px; }
.ss-num b { font-size: 18px; }
.ss-num .muted { font-size: 12px; }
.ss-bar { height: 10px; border-radius: 5px; background: var(--line); overflow: hidden; }
.ss-bar span { display: block; height: 100%; border-radius: 5px; transition: width .3s; }
/* 📷 QR 스캔 */
.work-tools .scan-btn { padding: 7px 14px; font-size: 14px; }
.scan-overlay {
  position: fixed; inset: 0; z-index: 4000; display: flex; flex-direction: column; gap: 10px;
  padding: 12px; background: #0b1220; color: #f8fafc; overflow-y: auto;
}
/* 카메라·결과 표시는 크기 고정 → 스캔 기록이 쌓여도 카메라가 눌려 작아지지 않음 */
.scan-overlay > * { flex-shrink: 0; }
/* QR 스캔: 기록은 남은 칸 안에서만 스크롤 (최신이 맨 위) */
#scan-overlay { overflow: hidden; padding-bottom: max(12px, env(safe-area-inset-bottom)); }
#scan-overlay > .scan-log { flex: 1 1 auto; min-height: 0; overflow-y: auto; overscroll-behavior: contain; }
.scan-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; font-size: 16px; }
.scan-stage { color: #93c5fd; font-weight: 700; }
.scan-head .btn { background: #1e293b; color: #f8fafc; border-color: #334155; }
.scan-view { width: 100%; max-width: 480px; margin: 0 auto; border-radius: 14px; overflow: hidden; background: #000; }
#scan-reader { width: 100%; }
#scan-reader video { width: 100% !important; display: block; }
.scan-flash { min-height: 44px; max-width: 480px; width: 100%; margin: 0 auto; box-sizing: border-box; border-radius: 12px;
  display: flex; align-items: center; justify-content: center; padding: 10px; font-size: 17px; font-weight: 800; text-align: center; }
.scan-flash.ok { background: #059669; }
.scan-flash.warn { background: #b45309; }
.scan-flash.err { background: #b91c1c; }
.scan-help { margin: 0 auto; max-width: 480px; font-size: 12px; color: #94a3b8; text-align: center; }
.scan-log { list-style: none; margin: 0 auto; padding: 0; width: 100%; max-width: 480px; display: flex; flex-direction: column; gap: 6px; }
.scan-log li { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 10px; background: #111a2d; font-size: 14px; }
.scan-log li.ok { border-left: 4px solid #22c55e; }
.scan-log li.warn { border-left: 4px solid #f59e0b; }
.scan-log li.err { border-left: 4px solid #ef4444; }
.scan-log li.undone .sl-text { text-decoration: line-through; color: #64748b; }
.sl-time { font-variant-numeric: tabular-nums; color: #94a3b8; font-size: 12px; }
.sl-text { flex: 1; }
.scan-log .btn { background: #1e293b; color: #f8fafc; border-color: #334155; }

/* 🚚 운송 위치 보내기 */
.work-head .gps-btn { margin-left: auto; background: #0f766e; }
.work-head .gps-btn:hover { background: #115e59; }
.work-head .gps-btn.running { background: #059669; animation: gps-pulse 2s ease-in-out infinite; }
@keyframes gps-pulse { 50% { box-shadow: 0 0 0 6px rgba(5,150,105,.25); } }
.gps-card { width: 100%; max-width: 480px; margin: 0 auto; box-sizing: border-box; padding: 16px; border-radius: 14px; background: #111a2d; display: flex; flex-direction: column; gap: 12px; }
.gps-veh { display: flex; align-items: center; gap: 10px; font-size: 15px; font-weight: 700; }
.gps-veh select { flex: 1; font-size: 16px; padding: 10px; background: #0b1220; color: #f8fafc; border-color: #334155; }
.gps-state { font-size: 18px; font-weight: 800; padding: 14px; border-radius: 12px; background: #1e293b; text-align: center; }
.gps-state.on { background: #065f46; }
.gps-state.warn { background: #92400e; font-size: 15px; }
.gps-detail { font-size: 13px; color: #cbd5e1; text-align: center; line-height: 1.7; }
.gps-err { color: #fca5a5; }
.gps-actions { display: flex; gap: 8px; }
.gps-actions .btn { flex: 1; padding: 14px; font-size: 16px; }
.gps-start { background: #059669; }
.gps-tips { max-width: 480px; margin: 0 auto; padding-left: 20px; font-size: 13px; color: #94a3b8; line-height: 1.7; }

/* 랙별 묶기 버튼 */
.chip.group-toggle.active { background: #eef4ff; color: var(--primary); border-color: #bcd3ff; }
/* 랙 머리줄: 랙 이름 · 진척 · [랙 전체 완료] */
.work-table tr.grp-row td { padding: 0; background: #f4f7fc !important; border-bottom: 1px solid var(--card-line); border-top: 1px solid var(--card-line); }
.work-table tr.grp-row.done td { background: #f1faf5 !important; }
.grp { display: flex; align-items: center; gap: 10px; padding: 8px 12px; }
.grp-toggle { border: 0; background: none; cursor: pointer; font-size: 11px; color: var(--muted); width: 22px; height: 22px; border-radius: 6px; }
.grp-toggle:hover { background: #e2e8f0; }
.grp-icon { font-size: 15px; }
.grp-name { font-size: 15px; color: var(--heading); cursor: pointer; white-space: nowrap; }
.grp-count { font-size: 13px; color: var(--muted); white-space: nowrap; font-variant-numeric: tabular-nums; }
.grp-count b { color: var(--heading); }
.grp-bar { flex: 1; max-width: 240px; min-width: 60px; height: 8px; border-radius: 4px; background: #e2e8f0; overflow: hidden; cursor: pointer; }
.grp-bar span { display: block; height: 100%; border-radius: 4px; background: linear-gradient(90deg, #7cc4fa, #2f6bff); transition: width .3s; }
.grp-row.done .grp-bar span { background: linear-gradient(90deg, #6ee7b7, #0fa47a); }
.grp-bulk {
  margin-left: auto; display: inline-flex; align-items: center; gap: 6px; white-space: nowrap;
  padding: 6px 12px; border-radius: 8px; border: 1px solid #16a34a; background: #22c55e; color: #fff;
  font: inherit; font-size: 13px; font-weight: 700; cursor: pointer; box-shadow: 0 1px 2px rgba(22,163,74,.3);
}
.grp-bulk:hover { background: #16a34a; }
.grp-bulk .gb-dot { width: 10px; height: 10px; border-radius: 50%; background: #fff; opacity: .9; }
.grp-bulk.undo { background: #fff; color: var(--muted); border-color: var(--line); box-shadow: none; font-weight: 600; }
.grp-bulk.undo:hover { color: #b91c1c; border-color: #fecaca; background: #fef2f2; }
.grp-bulk:disabled { opacity: .6; cursor: default; }
/* 개별 이동 표시 */
.grp-solo { font-size: 12px; font-weight: 700; color: #b45309; background: #fff7ed; border: 1px solid #fed7aa; padding: 1px 8px; border-radius: 999px; white-space: nowrap; }
.grp-allsolo { margin-left: auto; font-size: 13px; font-weight: 600; color: #b45309; }
.solo-tag {
  display: inline-block; margin-left: 6px; padding: 0 6px; border-radius: 5px; vertical-align: 1px;
  font-size: 11px; font-weight: 700; color: #b45309; background: #fff7ed; border: 1px solid #fed7aa;
}
/* 묶음 안의 줄은 살짝 들여쓰기 */
.work-table-wrap.grouped tbody tr:not(.grp-row) td.c-check { padding-left: 28px; }

/* 🔴/🟢 체크 동그라미 */
.check-dot {
  display: inline-flex; align-items: center; justify-content: center;
  border: 0; background: none; padding: 2px; cursor: pointer; font: inherit; vertical-align: middle;
}
.check-dot span {
  width: 24px; height: 24px; border-radius: 50%; background: #ef4444;
  box-shadow: inset 0 -2px 0 rgba(0,0,0,.15); transition: background-color .15s, transform .1s;
}
.check-dot.on span { background: #22c55e; }
.check-dot.on span::after { content: "✓"; display: flex; align-items: center; justify-content: center; height: 100%; color: #fff; font-size: 15px; font-weight: 800; }
.check-dot:hover span { box-shadow: inset 0 -2px 0 rgba(0,0,0,.15), 0 0 0 4px rgba(239,68,68,.15); }
.check-dot.on:hover span { box-shadow: inset 0 -2px 0 rgba(0,0,0,.15), 0 0 0 4px rgba(34,197,94,.18); }
.check-dot:active span { transform: scale(.9); }
.check-dot:disabled { opacity: .6; cursor: default; }
.dot-red, .dot-green { display: inline-block; width: 12px; height: 12px; border-radius: 50%; vertical-align: -1px; }
.dot-red { background: #ef4444; } .dot-green { background: #22c55e; }

/* 휴대폰: 표 → 촘촘한 목록 (한 줄 = 작업 하나, 오른쪽에 큰 체크) */
@media (max-width: 760px) {
  .work-table-wrap { background: none; border: 0; box-shadow: none; }
  .work-table, .work-table tbody { display: block; }
  .work-table thead { display: none; }
  .work-table tbody { display: flex; flex-direction: column; gap: 6px; }
  .work-table tr {
    position: relative; display: flex; flex-wrap: wrap; align-items: baseline; gap: 2px 10px;
    padding: 9px 62px 9px 12px; min-height: 48px;
    background: var(--card); border: 1px solid var(--card-line); border-left: 4px solid var(--late); border-radius: 10px;
  }
  .work-table tr.is-done { border-left-color: var(--done); }
  .work-table td, .work-table tbody tr:nth-child(even) td, .work-table tbody tr:hover td { padding: 0; border: 0; background: none; }
  .work-table td { font-size: 12.5px; font-weight: 600; }
  .work-table td::before { content: attr(data-label) " "; color: var(--muted); font-weight: 400; }
  .work-table td.blank { display: none; }
  .work-table .c-no { flex-basis: 100%; width: auto; font-size: 15px; }
  .work-table .c-no::before { content: "No. "; color: inherit; font-weight: inherit; }
  .work-table .c-by { flex-basis: 100%; width: auto; font-size: 11px; }
  .work-table .c-by:empty { display: none; }
  .work-table .c-check { position: absolute; right: 8px; top: 50%; transform: translateY(-50%); width: auto; padding: 0; }
  .work-table .check-dot span { width: 40px; height: 40px; }
  .work-table .check-dot.on span::after { font-size: 20px; }
  .work-tools input[type=search] { flex-basis: 100%; }
  /* 휴대폰: 랙 머리줄은 넓은 칸, 버튼은 아래 줄에 크게 */
  .work-table tr.grp-row { padding: 0; border-left: 0; background: none; border: 0; min-height: 0; margin-top: 6px; }
  .work-table td { height: auto; }
  .work-table tr.grp-row td { display: block; width: 100%; box-sizing: border-box; border: 1px solid #bcd3ff !important; border-radius: 10px; background: #eef4ff !important; }
  .work-table tr.grp-row.done td { border-color: #bbe5cd !important; background: #effaf4 !important; }
  .work-table tr.grp-row td::before { content: none; }
  .grp { flex-wrap: wrap; gap: 6px 10px; padding: 10px 12px; }
  .grp-bar { flex-basis: 100%; max-width: none; order: 5; }
  .grp-bulk { order: 6; flex-basis: 100%; justify-content: center; padding: 10px; font-size: 14px; margin-left: 0; }
  .work-table-wrap.grouped tbody tr:not(.grp-row) { margin-left: 12px; }
  .work-table-wrap.grouped tbody tr:not(.grp-row) td.c-check { padding-left: 0; }
}
.work-empty { padding: 40px 16px; text-align: center; color: var(--muted); background: var(--card); border-radius: var(--radius); }
.toast {
  position: fixed; left: 50%; bottom: 20px; transform: translateX(-50%); z-index: 3000;
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  width: max-content; min-width: min(360px, calc(100% - 32px)); max-width: calc(100% - 32px);
  padding: 12px 14px 12px 18px; border-radius: 12px; background: #111827; color: #fff; font-size: 14px;
  box-shadow: 0 8px 24px rgba(0,0,0,.25);
}
.toast.error { background: #b91c1c; }

/* 반응형 */
@media (max-width: 1024px) {
  .charts { grid-template-columns: 1fr; grid-template-areas: none; }
  .charts > .card { grid-area: auto; }
  .ann-card { max-height: 420px; }
  .user-form { grid-template-columns: 1fr 1fr 1fr; }
  .ci-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 640px) {
  main { padding: 12px; }
  .topbar { padding: 0 14px; }
  .chart-box { height: 220px; }
  .overview .gauge-box { height: 190px; }
  #map { height: 300px; }
  .clock-time { font-size: 48px; }
  input[type=search] { min-width: 0; width: 100%; }
  .topbar { height: auto; min-height: 56px; flex-wrap: wrap; padding: 10px 14px; gap: 6px; }
  .topbar nav { gap: 12px; flex-wrap: wrap; }
  .dash-topbar nav { width: 100%; justify-content: space-between; gap: 8px; flex-wrap: nowrap; }
  .adm-tabs { position: static; }
  /* 대시보드 지도: 휴대폰에서는 접어 두고 버튼으로 펼침 */
  .map-card .map-fold { display: inline-flex; }
  .map-card:not(.open) .map-wrap { display: none; }
  .map-card:not(.open) .card-head { margin-bottom: 0; }
  .nav-menu { overflow-x: auto; scrollbar-width: none; }
  .nav-link { padding: 6px 9px; font-size: 13px; gap: 4px; }
  .nav-uname, .nav-role, .nav-caret { display: none; }
  .nav-account { padding-left: 8px; }
  .nav-user-btn { padding: 3px; }
  .dash-logo { height: 22px; max-width: 150px; }
  .dash-brand { gap: 12px; }
  .dash-title { font-size: 17px; }
  .dash-logo + .dash-title:not(:empty) { padding-left: 12px; }
  .nav-user { padding-left: 12px; }
  .user-form { grid-template-columns: 1fr 1fr; }
  .user-form button { grid-column: span 2; }
  /* ⓘ 말풍선: 휴대폰에서는 화면 아래쪽에 화면 너비에 맞춰 띄움 (오른쪽 끝의 ⓘ도 잘리지 않게) */
  .hint::after { position: fixed; left: 16px; right: 16px; top: auto; bottom: calc(84px + env(safe-area-inset-bottom));
    width: auto; max-width: none; z-index: 2000; }
  .card { padding: 14px; }
  .ci-grid { grid-template-columns: 1fr; }
  .stage-row { grid-template-columns: 24px 1fr auto; }
  .stage-row .stage-used { display: none; }
  .stage-row .stage-dates { grid-column: 2 / -1; grid-row: 2; }
  .upload-row { grid-template-columns: 1fr; }
  .upload-row #upload { width: 100%; }
  .login-card { padding: 26px 20px; }
  .login-page main { padding-top: 56px; padding-bottom: 0; }
  .login-client-ci { height: 44px; margin-bottom: 22px; }
  /* 휴대폰에서는 로그인 창과 겹치지 않도록 화면 하단 가운데로 */
  .login-footer { position: static; margin: 28px 0 20px; align-items: center; }
  .login-company-ci { height: 28px; }
}

/* ================= 디자인 정리 (2026-11-10) ================= */
/* 글자 대비: 연한 회색 글자를 한 단계 진하게 (밝은 TV·야외 휴대폰에서도 읽히게) */
:root { --muted: #56657b; }
body.dark { --muted: #95a4bd; }
.login-copy, .login-sub { color: #6b7280; }
.kpi-share, .kpi-unit { font-size: 12px; }
.file-info { color: var(--muted); font-size: 13px; }
.work-help { font-size: 13px; color: var(--muted); }

/* 선 아이콘 (이모지 대신) */
.ic { width: 1.1em; height: 1.1em; flex-shrink: 0; vertical-align: -0.18em; margin-right: .38em; }
.ic.solo { margin-right: 0; }
.admin-page .sec-title .ic { width: 19px; height: 19px; margin-right: 2px; color: var(--primary); }
.danger-zone .sec-title .ic { color: #b91c1c; }
.adm-tab .ic { color: inherit; opacity: .85; }
.icon-btn .ic { width: 16px; height: 16px; }
.grp-icon { display: inline-flex; color: #a16207; }
.grp-icon .ic { width: 17px; height: 17px; margin: 0; }
.veh-ic { color: var(--primary); }
.lb-kind .ic { margin-right: 2px; }
.scan-head .ic, .gps-overlay .scan-head .ic { color: #93c5fd; }

/* 강조색 역할 통일: 선택됨 = 남색 / 실행 버튼 = 파랑 / 완료 = 초록 */
.stage-tab.active { background: var(--navy); border-color: var(--navy); }
.work-head .gps-btn { background: #fff; color: var(--primary); border: 1px solid #bcd3ff; }
.work-head .gps-btn:not(:disabled):hover { background: #eef4ff; }
.work-head .gps-btn.running, .work-head .gps-btn.running:not(:disabled):hover { background: var(--done); color: #fff; border-color: var(--done); }

/* 작업 체크: 단계 탭 아래 미니 진척 막대 (100% 초록, 지연 빨강) */
.stage-tab { min-width: 96px; }
.st-bar { display: block; align-self: stretch; height: 4px; margin-top: 5px; border-radius: 2px; background: var(--track); overflow: hidden; }
.st-bar i { display: block; height: 100%; border-radius: 2px; background: var(--primary); transition: width .3s; }
.st-bar.done i { background: var(--done); }
.st-bar.late i { background: var(--late); }
.stage-tab.active .st-bar { background: rgba(255,255,255,.18); }
.stage-tab.active .st-bar i { background: #93c5fd; }
.stage-tab.active .st-bar.done i { background: #6ee7b7; }
.stage-tab.active .st-bar.late i { background: #fca5a5; }

/* 화면 폭 통일 (관리 · 작업 체크) */
.admin-page main, .work-page main { max-width: 1360px; }

/* 로그인 화면: 연한 브랜드색 배경 + 그림자 카드 + 사업명 */
.login-page {
  background: radial-gradient(1100px 560px at 50% -12%, #e3edff 0%, rgba(227,237,255,0) 72%),
              linear-gradient(180deg, #f7f9fd 0%, #eef2f8 100%);
}
.login-card { border: 1px solid #e3e9f1; border-radius: 18px; background: #fff;
  box-shadow: 0 18px 48px rgba(15,23,42,.08), 0 2px 6px rgba(15,23,42,.04); }
.login-project { display: block; width: fit-content; max-width: 100%; margin: 0 auto 14px; padding: 5px 14px; border-radius: 999px;
  background: #eef4ff; color: #1d4ed8; font-size: 13px; font-weight: 700; text-align: center; line-height: 1.4; }
.login-project[hidden] { display: none; }

/* TV(어두운 화면): 흰 버튼 없애기 + 화면 꽉 채우기 */
body.dark .act-reset { background: #1b2539; color: #cbd5e1; border-color: #2a3a58; }
body.tv.dash-page main { max-width: none; }


/* 휴대폰: 위쪽은 CI·제목·내 계정만, 메뉴는 화면 아래 탭 바 */
.bottom-nav { display: none; }
@media (max-width: 640px) {
  body.has-bottom-nav { padding-bottom: calc(66px + env(safe-area-inset-bottom)); }
  .dash-topbar { flex-wrap: nowrap; height: 56px; min-height: 56px; padding: 0 12px; gap: 10px; }
  .dash-topbar nav { width: auto; flex: none; }
  .dash-topbar .nav-menu { display: none; }
  .dash-topbar .nav-account { border-left: 0; padding-left: 0; }
  .dash-brand { flex: 1; min-width: 0; gap: 10px; }
  .dash-logo { height: 20px; max-width: 110px; }
  .dash-title { font-size: 14px; line-height: 1.3; white-space: normal; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
  .dash-logo + .dash-title:not(:empty) { padding-left: 10px; }
  .bottom-nav {
    display: flex; position: fixed; left: 0; right: 0; bottom: 0; z-index: 1900;
    padding: 6px 4px calc(6px + env(safe-area-inset-bottom));
    background: rgba(255,255,255,.97); border-top: 1px solid var(--card-line); box-shadow: 0 -4px 16px rgba(15,23,42,.06);
  }
  .bn-link { flex: 1; min-width: 0; display: flex; flex-direction: column; align-items: center; gap: 3px; padding: 4px 0;
    border-radius: 10px; color: #64748b; text-decoration: none; font-size: 11px; font-weight: 700; }
  .bn-link .ic { width: 22px; height: 22px; margin: 0; }
  .bn-link.active { color: var(--primary); }
  .bn-link.active .ic { stroke-width: 2.4; }
  .toast { bottom: calc(78px + env(safe-area-inset-bottom)); }
  body.tv .bottom-nav { display: none; }
  body.tv.has-bottom-nav { padding-bottom: 0; }
  .stage-tab { min-width: 84px; }
}
/* 중간 폭(노트북 등): 메뉴·계정 버튼은 줄이지 않고 제목이 대신 줄어듦 */
.dash-topbar nav, .nav-account, .nav-user-btn { flex-shrink: 0; }
.nav-role { white-space: nowrap; }
@media (max-width: 1280px) and (min-width: 641px) {
  .nav-uname, .nav-role { display: none; }
  .nav-user-btn { padding: 4px 8px 4px 4px; }
}
/* 대시보드 '전체 작업 / 남은 작업': 두 칸으로 나눠 숫자를 크게 (2026-11-10) */
.kpi-total { display: grid; grid-template-columns: 1fr 1fr; gap: 0; padding: 8px 0; }
.kt-item { display: flex; flex-direction: column; align-items: center; gap: 1px; min-width: 0; padding: 0 8px; }
.kt-item + .kt-item { border-left: 1px solid var(--line); }
.kt-label { font-size: 12px; font-weight: 600; color: var(--muted); white-space: nowrap; }
.kt-value { font-size: 22px; font-weight: 800; line-height: 1.15; color: var(--heading); font-variant-numeric: tabular-nums; white-space: nowrap; }
.kt-value small { margin-left: 2px; font-size: .55em; font-weight: 700; color: var(--muted); }
.kt-left .kt-value { color: color-mix(in srgb, var(--doing) 80%, #0f172a); }
body.dark .kt-left .kt-value { color: color-mix(in srgb, var(--doing) 55%, #fff); }
@media (min-width: 1025px) and (min-height: 620px) {
  .dash-grid .kpi-total { padding: clamp(4px, 0.7vh, 8px) 0; }
  .dash-grid .kt-value { font-size: clamp(18px, 1.5vw, 32px); }
  .dash-grid .kt-label { font-size: clamp(11px, .75vw, 15px); }
}

/* 관리 > 대시보드: 그래프 색상 */
.color-rows { display: flex; flex-direction: column; gap: 10px; margin-top: 10px; }
.color-row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.cr-name { width: 84px; white-space: nowrap; font-size: 14px; font-weight: 700; color: var(--heading); }
.color-row input[type=color] { width: 44px; height: 32px; padding: 2px; border: 1px solid var(--line); border-radius: 8px; background: #fff; cursor: pointer; }
.cr-swatches { display: flex; gap: 6px; flex-wrap: wrap; }
.cr-sw { width: 24px; height: 24px; border-radius: 50%; border: 2px solid #fff; box-shadow: 0 0 0 1px var(--line); cursor: pointer; padding: 0; }
.cr-sw.on { box-shadow: 0 0 0 2px var(--heading); }
.color-foot { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-top: 12px; }
.color-preview { display: flex; align-items: flex-end; gap: 14px; height: 74px; padding: 8px 14px 0; border-radius: 10px; background: #f8fafc; border: 1px solid var(--line); }
.cp-col { display: flex; flex-direction: column; align-items: center; gap: 4px; }
.cp-pill { font-size: 11px; font-weight: 800; padding: 1px 7px; border-radius: 999px; }
.cp-bar { width: 26px; border-radius: 5px 5px 0 0; }
/* 전체 진척률 미리보기: 작은 도넛 */
.cp-ring { position: relative; display: block; width: 44px; height: 44px; border-radius: 50%; margin-left: 10px; }
.cp-ring::after { content: ""; position: absolute; inset: 7px; border-radius: 50%; background: #f8fafc; }
.cp-ring i { position: absolute; inset: 0; z-index: 1; display: flex; align-items: center; justify-content: center; font-style: normal; font-size: 10px; font-weight: 800; color: var(--heading); }
.cp-name { font-size: 11px; color: var(--muted); padding-bottom: 4px; }.color-preview { height: auto; padding-top: 10px; }/* 보고서 숫자 색도 관리자가 고른 그래프 색을 따름 (기본 색이면 원래 색 그대로) */
.rp-kpi.done b { color: color-mix(in srgb, var(--done) 70%, #000); }
.rp-kpi.late b { color: color-mix(in srgb, var(--late) 80%, #000); }
.rp-kpi.doing b { color: color-mix(in srgb, var(--doing) 75%, #000); }
/* 작업 체크: [내 작업만] 켜짐 / 알림의 [되돌리기] 버튼 */
.chip.mine-toggle.active { background: #eef4ff; color: var(--primary); border-color: #bcd3ff; }
.toast-act { flex: none; border: 0; border-radius: 8px; padding: 6px 12px; background: rgba(255,255,255,.14);
  color: #93c5fd; font: inherit; font-size: 14px; font-weight: 800; cursor: pointer; white-space: nowrap; }
.toast-act:hover { background: rgba(255,255,255,.22); }
/* 관리 > 체크 이력 */
.log-filter { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-bottom: 12px; }
.log-filter select, .log-filter input { border: 1px solid var(--line); border-radius: 8px; padding: 7px 10px; font: inherit; font-size: 14px; background: #fff; color: var(--text); }
.log-filter input[type=search] { flex: 1 1 200px; min-width: 160px; }
.log-date { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; color: var(--muted); }
.log-table td, .log-table th { padding: 8px 10px; }
.log-table td { font-size: 14px; border-bottom: 1px solid var(--line); }
.nowrap { white-space: nowrap; }
.log-table .log-ck { width: 34px; padding-right: 0; text-align: center; }
.log-table .log-ck input { width: 17px; height: 17px; accent-color: var(--late); cursor: pointer; vertical-align: middle; }
.log-table tr:has(.log-ck input:checked) td { background: #fff5f5; }
.log-del-bar { display: flex; flex-wrap: wrap; align-items: center; justify-content: flex-end; gap: 8px; margin-bottom: 10px; }
.log-del-bar #log-sel-info { margin-right: auto; }
.log-del-bar .log-del-all { color: #b91c1c; border-color: #fecaca; }
.log-del-bar .log-del-all:not(:disabled):hover { background: #fef2f2; }
.log-del-bar .btn:disabled { opacity: .45; cursor: not-allowed; }
.log-act { display: inline-block; padding: 1px 9px; border-radius: 999px; font-size: 12px; font-weight: 700; }
.log-act.done { background: color-mix(in srgb, var(--done) 14%, #fff); color: color-mix(in srgb, var(--done) 75%, #000); }
.log-act.undo { background: #fff1f2; color: #be123c; }
/* 관리 > 사용자: 담당 단계 */
.stage-pick { display: inline-flex; align-items: center; gap: 6px; max-width: 260px; padding: 4px 10px; border: 1px dashed #cbd5e1;
  border-radius: 8px; background: #fff; font: inherit; font-size: 13px; color: var(--muted); cursor: pointer; text-align: left; }
.stage-pick.set { border-style: solid; border-color: #bcd3ff; background: #eef4ff; color: #1d4ed8; font-weight: 600; }
.stage-pick:hover { border-color: var(--primary); }
.stage-pick .ic { width: 13px; height: 13px; flex: none; }
.sd-list { display: grid; grid-template-columns: 1fr 1fr; gap: 6px 14px; max-height: 50vh; overflow: auto; }
.sd-item { display: flex; align-items: center; gap: 8px; padding: 6px 8px; border-radius: 8px; font-size: 14px; color: var(--text); cursor: pointer; margin: 0; }
.sd-item:hover { background: #f1f5f9; }
.sd-item input { width: 17px; height: 17px; margin: 0; }
#stages-dialog { width: min(440px, calc(100% - 32px)); }
/* 보고서: 단계 일정 (계획 시간 대비 실제 시간) — 인쇄해도 읽히도록 글자·막대를 크게 */
.rp-h2-sub { font-size: 11.5px; font-weight: 600; color: var(--muted); margin-left: 6px; }
.rp-gantt { margin: 4px 0 14px; border-top: 1px solid var(--line); }
.gt-row { display: grid; grid-template-columns: 96px minmax(0, 1fr) 100px 100px 118px; align-items: center; gap: 10px;
  padding: 6px 0; border-bottom: 1px solid #eef2f7; }
.gt-head { padding: 5px 0; background: #f8fafc; border-bottom: 1px solid var(--line); }
.gt-head .gt-name, .gt-head .gt-col { font-size: 10.5px; font-weight: 700; color: var(--muted); padding-left: 4px; }
.gt-name { display: flex; flex-direction: column; padding-left: 4px; font-size: 11.5px; font-weight: 700; color: var(--heading); line-height: 1.25; min-width: 0; }
.gt-name small { font-size: 10px; font-weight: 600; color: var(--muted); }
.gt-empty .gt-name { color: var(--muted); }
.gt-track { position: relative; height: 28px; }
.gt-head .gt-track { height: 16px; }
.gt-tick { position: absolute; top: 1px; transform: translateX(-50%); font-size: 9.5px; font-weight: 600; color: var(--muted); white-space: nowrap; }
.gt-tick:first-child { transform: none; }
.gt-tick:last-child { transform: translateX(-100%); }
.gt-grid { position: absolute; top: -6px; bottom: -6px; border-left: 1px dashed #e2e8f0; }
.gt-plan { position: absolute; top: 3px; height: 9px; border: 1.5px solid #94a3b8; border-radius: 5px; background: #eef2f7; box-sizing: border-box; }
.gt-plan-pt { position: absolute; top: 3px; width: 9px; height: 9px; margin-left: -4.5px; transform: rotate(45deg); border: 1.5px solid #94a3b8; background: #fff; }
.gt-act { position: absolute; top: 15px; height: 9px; border-radius: 5px; }
.gt-now { position: absolute; top: -6px; bottom: -6px; border-left: 2px solid #f59e0b; }
.gt-col { display: flex; flex-direction: column; font-size: 10.5px; line-height: 1.35; color: var(--text); font-variant-numeric: tabular-nums; white-space: nowrap; min-width: 0; }
.gt-col b { font-weight: 600; }
.gt-col small { font-size: 9.5px; color: var(--muted); }
.gt-cmp { gap: 1px; }
.gc-late { color: #be123c; font-weight: 700; }
.gc-early { color: #047857; font-weight: 700; }
.gc-ok { color: #1d4ed8; font-weight: 700; }
.gc-info { color: var(--muted); }
.gt-legend { display: flex; flex-wrap: wrap; gap: 16px; margin-top: 8px; font-size: 10.5px; color: var(--muted); }
.gt-legend span { display: inline-flex; align-items: center; gap: 6px; }
.gt-legend i { display: inline-block; width: 18px; height: 8px; border-radius: 4px; }
.gt-plan-lg { border: 1.5px solid #94a3b8; background: #eef2f7; box-sizing: border-box; }
.gt-act-lg { background: var(--primary); }
.gt-now-lg { width: 0 !important; height: 12px !important; border-left: 2px solid #f59e0b; border-radius: 0 !important; }
#stages-dialog .sd-item input { width: 17px; height: 17px; margin: 0; padding: 0; flex: none; }
#stages-dialog .sd-list { outline: none; }/* 보고서 일정: 계획·실제를 한 칸 두 줄로 → 타임라인을 넓게 */
.gt-row { grid-template-columns: 92px minmax(0, 1fr) 196px 116px; }
.gt-times { gap: 3px; white-space: normal; }
.gt-times > span { display: flex; align-items: baseline; gap: 5px; flex-wrap: wrap; }
.gt-times small { font-size: 9.5px; color: var(--muted); }
.gl { flex: none; font-style: normal; font-size: 9px; font-weight: 800; padding: 0 5px; border-radius: 4px; line-height: 15px; }
.gl-plan { background: #eef2f7; color: #475569; border: 1px solid #cbd5e1; line-height: 13px; }
.gl-act { color: #fff; }
/* 보고서: 저장 / 저장된 보고서 */
.rp-status { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; min-width: 0; }
.rp-live { font-size: 12px; font-weight: 800; color: #1d4ed8; background: #eef4ff; padding: 3px 10px; border-radius: 999px; }
.rp-saved-tag { display: inline-flex; align-items: center; font-size: 12px; font-weight: 800; color: #92400e; background: #fef3c7; padding: 3px 10px; border-radius: 999px; }
.rp-count:not(:empty) { display: inline-block; min-width: 18px; margin-left: 2px; padding: 0 6px; border-radius: 999px; background: var(--primary); color: #fff; font-size: 11px; font-weight: 800; line-height: 18px; text-align: center; }
.rp-dialog { width: min(560px, calc(100% - 32px)); }
.rp-dlg-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 10px; }
.rp-dlg-head h2 { margin: 0; font-size: 17px; }
.rp-saved { list-style: none; margin: 0; padding: 0; max-height: 60vh; overflow: auto; display: flex; flex-direction: column; gap: 6px; }
.rp-saved li { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 10px; }
.rp-saved li.current { border-color: #bcd3ff; background: #f5f8ff; }
.rs-main { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.rs-main b { font-size: 14px; color: var(--heading); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rs-main small { font-size: 12px; color: var(--muted); }
.rs-empty { justify-content: center; color: var(--muted); font-size: 13px; text-align: center; border-style: dashed !important; }
/* 체크 이력: 페이지 번호 */
.log-pager-row { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 10px; margin-top: 14px; }
.log-pager-row .log-size { justify-self: end; }
.pager { display: flex; align-items: center; gap: 4px; flex-wrap: wrap; justify-content: center; }
.pg { min-width: 34px; height: 34px; padding: 0 8px; border: 1px solid var(--line); border-radius: 8px; background: #fff;
  font: inherit; font-size: 14px; font-weight: 600; color: var(--text); cursor: pointer; font-variant-numeric: tabular-nums; }
.pg:hover:not(:disabled) { border-color: var(--primary); color: var(--primary); }
.pg.on { background: var(--navy); border-color: var(--navy); color: #fff; cursor: default; }
.pg.nav { color: var(--muted); }
.pg:disabled { opacity: .35; cursor: default; }
.pg-gap { padding: 0 2px; color: var(--muted); }
.log-size { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; color: var(--muted); margin: 0; }
.log-size select { border: 1px solid var(--line); border-radius: 8px; padding: 6px 8px; font: inherit; font-size: 13px; background: #fff; }
@media (max-width: 760px) {
  .log-pager-row { grid-template-columns: 1fr; justify-items: center; }
  .log-pager-row .log-size { justify-self: center; }
}
.admin-page .card { scroll-margin-top: 130px; }   /* 페이지를 넘길 때 위쪽 탭에 가려지지 않게 */

/* 위험 작업: 새 프로젝트 시작 / 백업 목록의 '프로젝트 보관' */
.danger-zone .np-box { margin-top: 12px; padding-top: 14px; border-top: 1px dashed #fecaca; }
.bk-kind.project { background: #fef3c7; color: #92400e; }
.admin-page .danger-zone .reset-box.np-box { margin-top: 14px; padding-top: 14px; border-top: 1px dashed #fecaca; }

/* 전체 진척률 > 완료·진행 중·지연·대기 칸: 글자 약 10% 작게 (2026-11-11) */
.status-grid .kpi-value { font-size: 15px; }
.status-grid .kpi-label { font-size: 12px; }
.status-grid .kpi-share { font-size: 11px; }
@media (min-width: 1025px) and (min-height: 620px) {
  .dash-grid .status-grid .kpi-value { font-size: clamp(15px, 1.15vw, 25px); }
  .dash-grid .status-grid .kpi-label { font-size: clamp(12px, .76vw, 15px); }
  .dash-grid .status-grid .kpi-share { font-size: clamp(10px, .63vw, 13px); }
}

/* 보고서 단계 일정: 단계마다 계획 시간 vs 실제 시간 막대 비교 (2026-11-11) */
.gt-row.gd-row { grid-template-columns: 110px minmax(0, 1fr) 132px; padding: 7px 0; }
.gd-track { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.gd-line { display: flex; align-items: center; gap: 8px; }
.gd-line .gl { width: 30px; text-align: center; box-sizing: border-box; }
.gd-wrap { flex: 1; display: flex; align-items: center; gap: 8px; min-width: 0; }
.gd-wrap b { font-size: 11.5px; font-weight: 700; color: var(--heading); white-space: nowrap; font-variant-numeric: tabular-nums; }
.gd-wrap b.gc-info { font-weight: 500; color: var(--muted); }
.gd-bar { height: 12px; border-radius: 6px; flex: none; }
.gd-plan { background: #e2e8f0; border: 1.5px solid #94a3b8; box-sizing: border-box; }
.gd-act { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
.gd-open { background-image: repeating-linear-gradient(135deg, rgba(255,255,255,.45) 0 4px, transparent 4px 8px) !important; }
.gt-cmp span { font-size: 11.5px; }

/* 보고서 글자·여백 다시 맞춤: 본문 글자를 키우고 KPI 숫자는 조금 작게 (2026-11-11) */
.rp-sheet { gap: 20px; padding: 14mm 13mm 10mm; }
.rp-titles h1 { font-size: 24px; }
.rp-sub { font-size: 13.5px; }
.rp-when { font-size: 12.5px; }
.rp-when b { font-size: 15px; }
.rp-sheet h2 { font-size: 16px; margin-bottom: 10px; }
.rp-h2-sub { font-size: 12.5px; }
.rp-kpi { padding: 10px 14px; gap: 2px; justify-content: center; }
.rp-kpi span { font-size: 12.5px; }
.rp-kpi b { font-size: 17px; }
.rp-kpi small { font-size: 11.5px; }
.rp-kpi.main b { font-size: 28px; line-height: 1.15; }
.rp-table { font-size: 13px; }
.rp-table th { font-size: 12.5px; padding: 8px; }
.rp-table td { padding: 7px 8px; }
.rp-list { font-size: 13px; }
.rp-foot { font-size: 11px; }
/* 단계 일정 */
.gt-row.gd-row { grid-template-columns: 124px minmax(0, 1fr) 150px; padding: 9px 0; gap: 12px; }
.gt-head .gt-name, .gt-head .gt-col { font-size: 12px; }
.gt-name { font-size: 13px; }
.gt-name small { font-size: 11.5px; }
.gd-track { gap: 6px; }
.gd-line .gl { width: 34px; font-size: 10.5px; line-height: 17px; }
.gd-line .gl-plan { line-height: 15px; }
.gd-bar { height: 14px; border-radius: 7px; }
.gd-wrap b { font-size: 13px; }
.gt-cmp span { font-size: 13px; }
.gt-cmp small { font-size: 11.5px; }
.gt-legend { font-size: 12px; margin-top: 10px; }

/* 보고서 소제목: 번호(01·02·03) + 제목 + 아래 얇은 선 (2026-11-11) */
.rp-sheet { counter-reset: rpsec; }
.rp-sheet section > h2 {
  counter-increment: rpsec;
  display: flex; align-items: center; gap: 10px;
  margin: 0 0 12px; padding: 0 0 9px; border-left: none;
  border-bottom: 1px solid var(--line);
  font-size: 16px; font-weight: 800; letter-spacing: -.3px; color: var(--heading);
}
.rp-sheet section > h2::before {
  content: counter(rpsec, decimal-leading-zero);
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 28px; height: 22px; padding: 0 6px; box-sizing: border-box; border-radius: 6px;
  background: var(--primary); color: #fff; font-size: 11.5px; font-weight: 800; letter-spacing: 0;
  font-variant-numeric: tabular-nums;
}
.rp-kpis + section { margin-top: 4px; }
/* 보고서 항목 고르기: 뺀 항목은 화면·인쇄 모두 숨김 → 번호(카운터)도 나온 것끼리 01부터 */
.rp-sheet section.rp-off { display: none !important; }
.rp-secs { position: relative; }
.rp-secs > summary { list-style: none; }
.rp-secs > summary::-webkit-details-marker { display: none; }
.rp-secs-pop { position: absolute; top: calc(100% + 6px); left: 0; z-index: 50; width: 290px; padding: 10px; border-radius: 12px;
  background: var(--card, #fff); border: 1px solid var(--line); box-shadow: 0 12px 32px rgba(15,23,42,.16); }
.rp-secs-head { font-size: 12px; font-weight: 800; color: var(--muted); margin: 0 4px 6px; }
.rp-sec-item { display: flex; align-items: center; gap: 8px; padding: 7px 6px; border-radius: 8px; font-size: 13.5px; font-weight: 600; color: var(--heading); cursor: pointer; }
.rp-sec-item:hover { background: color-mix(in srgb, var(--primary) 7%, transparent); }
.rp-sec-item input { width: 16px; height: 16px; margin: 0; accent-color: var(--primary); }
.rp-sec-item.off { color: var(--muted); }
.rp-sec-no { display: inline-flex; align-items: center; justify-content: center; min-width: 26px; height: 20px; border-radius: 6px; background: var(--primary); color: #fff; font-size: 11px; font-weight: 800; }
.rp-sec-item:not(:has(input:checked)) .rp-sec-no, .rp-sec-item.off .rp-sec-no { background: #cbd5e1; }
.rp-secs-foot { display: flex; align-items: center; gap: 8px; margin-top: 8px; padding-top: 8px; border-top: 1px solid var(--line); }

/* 보고서 표지 (첫 장) + 확인 서명란 (2026-11-12) */
.rp-opt { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; font-weight: 600; color: var(--text); cursor: pointer; user-select: none; margin-right: 4px; }
.rp-opt input { width: 16px; height: 16px; margin: 0; accent-color: var(--primary); cursor: pointer; }
.rp-cover { height: 297mm; min-height: 0; overflow: hidden; padding: 16mm 18mm 12mm; gap: 0; position: relative; }
.rp-cover::before {           /* 위쪽 굵은 띠 */
  content: ""; position: absolute; left: 0; right: 0; top: 0; height: 6mm;
  background: linear-gradient(90deg, var(--navy) 0 70%, var(--primary) 70% 100%);
  -webkit-print-color-adjust: exact; print-color-adjust: exact;
}
.cv-top { display: flex; align-items: center; justify-content: space-between; margin-top: 4mm; min-height: 12mm; }
.cv-logo { height: 12mm; max-width: 70mm; object-fit: contain; }
.cv-doc { margin-left: auto; font-size: 11px; font-weight: 700; color: var(--muted); letter-spacing: .3px; }
.cv-main { margin-top: 42mm; }
.cv-kicker { font-size: 12px; font-weight: 800; letter-spacing: 3px; color: var(--primary); }
.cv-title { margin: 6px 0 0; font-size: 40px; font-weight: 800; letter-spacing: -1.2px; line-height: 1.15; color: var(--heading); }
.cv-project { margin-top: 10px; font-size: 18px; font-weight: 700; color: var(--text); min-height: 1em; }
.cv-project:empty { display: none; }
.cv-info { width: 100%; margin-top: 18mm; border-collapse: collapse; font-size: 14px; border-top: 2px solid var(--heading); }
.cv-info th { width: 34mm; text-align: left; padding: 11px 12px; background: #f1f5f9; color: var(--muted); font-weight: 700; border-bottom: 1px solid var(--line); -webkit-print-color-adjust: exact; print-color-adjust: exact; }
.cv-info td { padding: 11px 14px; border-bottom: 1px solid var(--line); color: var(--heading); font-weight: 600; font-variant-numeric: tabular-nums; }
.cv-info td b { color: var(--primary); font-size: 16px; }
.cv-info td .muted { font-weight: 500; font-size: 13px; }
.cv-sign { margin-top: auto; }
.cv-sign-head { font-size: 13px; font-weight: 800; color: var(--heading); margin-bottom: 6px; }
.cv-sign-head .screen-only { font-size: 11.5px; font-weight: 500; color: var(--muted); }
.cv-sign-table { width: 100%; border-collapse: collapse; table-layout: fixed; font-size: 13px; }
.cv-sign-table th, .cv-sign-table td { border: 1px solid #94a3b8; text-align: center; }
.cv-sign-table th { padding: 7px 4px; background: #f1f5f9; color: var(--heading); font-weight: 700; -webkit-print-color-adjust: exact; print-color-adjust: exact; }
.cv-sign-table th.cv-client { background: #eef4ff; color: #1d4ed8; }
.cv-names td { height: 30px; padding: 4px 6px; font-weight: 700; color: var(--heading); outline: none; }
.cv-names td:focus { background: #fffbe6; box-shadow: inset 0 0 0 2px #fbbf24; }
@media screen { .cv-names td:empty::before { content: "이름"; color: #cbd5e1; font-weight: 500; } }
.cv-boxes td { height: 26mm; vertical-align: bottom; padding-bottom: 6px; }
.cv-boxes span { font-size: 10.5px; color: #cbd5e1; }
.cv-dates td { padding: 6px 4px; font-size: 12px; color: var(--muted); letter-spacing: 1px; }
.cv-foot { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 10mm; padding-top: 8px; border-top: 1px solid var(--line); font-size: 11px; color: var(--muted); }
.cv-company { height: 8mm; max-width: 50mm; object-fit: contain; }
@media print {
  .rp-cover { break-after: page; page-break-after: always; }
  .screen-only { display: none; }
}
@media screen and (max-width: 820px) {
  .rp-cover { height: auto; min-height: 0; padding: 20px 16px; }
  .cv-main { margin-top: 28px; }
  .cv-title { font-size: 30px; }
  .cv-info { margin-top: 20px; }
  .cv-sign { margin-top: 24px; }
  .cv-boxes td { height: 70px; }
}
/* 보고서를 휴대폰·좁은 화면에서 볼 때: 글자가 한 글자씩 세로로 쌓이지 않게 다시 배치 (인쇄·PDF는 그대로 A4) */
@media screen and (max-width: 820px) {
  .rp-tools { padding: 8px 12px; }
  .rp-sheet { margin: 10px 8px; padding: 16px 14px; gap: 18px; }
  /* 머리: 로고 → 제목 → 기준 일시 순으로 위아래 */
  .rp-head { flex-wrap: wrap; gap: 6px 12px; }
  .rp-logo { height: 26px; }
  .rp-titles { flex: 1 1 100%; order: 2; }
  .rp-titles h1 { font-size: 20px; }
  .rp-when { order: 3; flex-direction: row; align-items: baseline; gap: 6px; text-align: left; }
  .rp-kpi b { font-size: 18px; }
  .rp-kpi.main { grid-column: 1 / -1; }
  /* 표: 칸을 억지로 줄이지 않고 옆으로 밀어서 봄 */
  .rp-table { display: block; overflow-x: auto; -webkit-overflow-scrolling: touch; white-space: nowrap; }
  .rp-table td, .rp-table th { white-space: nowrap; }
  .rp-bar { min-width: 70px; }
  /* 계획 대비 실제: 단계 이름 / 막대 / 계획 대비를 위아래로 */
  .gt-row.gd-row { grid-template-columns: minmax(0, 1fr) auto; grid-template-areas: "n c" "t t"; gap: 4px 10px; padding: 10px 0; }
  .gt-row.gd-row .gt-name { grid-area: n; flex-direction: row; align-items: baseline; gap: 6px; }
  .gt-row.gd-row .gd-track { grid-area: t; }
  .gt-row.gd-row .gt-cmp { grid-area: c; align-items: flex-end; text-align: right; }
  .gt-head.gd-row { display: none; }
  .gd-wrap b { font-size: 12px; }
  .gt-legend { flex-direction: column; gap: 6px; }
  .rp-list { font-size: 12.5px; }
  .rp-foot { flex-direction: column; gap: 2px; }
  /* 표지 */
  .cv-top { flex-wrap: wrap; gap: 6px; }
  .cv-logo { height: 34px; max-width: 70%; }
  .cv-doc { flex: 1 1 100%; margin-left: 0; text-align: right; }
  .cv-info th { width: 84px; }
  .cv-info td { word-break: keep-all; overflow-wrap: anywhere; }
  .cv-sign-table { font-size: 12px; }
  .cv-dates td { font-size: 10px; letter-spacing: 0; padding: 6px 2px; }
  .cv-foot { flex-direction: column; align-items: flex-start; gap: 6px; }
}

/* 중요 공지 흐르는 띠: 화면 양옆 끝까지, 제목 줄과 카드 사이 빈 곳 위에 떠 있음 (칸을 밀지 않음, 위치는 JS가 맞춤) */
.ticker {
  position: absolute; z-index: 900; display: flex; align-items: stretch; overflow: hidden;
  height: 40px; box-sizing: border-box;
  background: linear-gradient(90deg, #111827 0%, #1e293b 100%);
  border-bottom: 2px solid #dc2626;
  box-shadow: 0 4px 12px rgba(15, 23, 42, .18);
  opacity: 0; transform: translateY(-4px); transition: opacity .5s, transform .5s;
}
.ticker.show { opacity: 1; transform: none; }
.ticker.hidden { display: none; }
/* 왼쪽 '중요 공지' 표시 — 오른쪽 끝을 비스듬히 자른 빨간 칸 */
.ticker-label {
  flex: none; display: flex; align-items: center; gap: 8px; padding: 0 34px 0 22px; margin-right: 6px;
  background: linear-gradient(135deg, #ef4444, #b91c1c); color: #fff;
  font-weight: 700; font-size: 15px; line-height: 1; letter-spacing: .03em; white-space: nowrap;
  clip-path: polygon(0 0, 100% 0, calc(100% - 16px) 100%, 0 100%);
}
.ticker-label svg { width: 17px; height: 17px; }
.ticker-view { flex: 1; min-width: 0; overflow: hidden; display: flex; align-items: center;
  mask-image: linear-gradient(90deg, transparent, #000 24px, #000 calc(100% - 24px), transparent); }
.ticker-track { display: flex; align-items: center; white-space: nowrap; will-change: transform;
  animation: ticker-move 30s linear infinite; }
.ticker:hover .ticker-track { animation-play-state: paused; }
.ticker-run { display: inline-flex; align-items: center; flex: none; }
/* line-height 1 + 1px 내림: 한글이 위로 쏠려 보이지 않게 띠 정가운데 */
.ticker-item, .ticker-label span { line-height: 1; }
.ticker-item { font-size: 16px; font-weight: 600; color: #f8fafc; letter-spacing: -.01em; transform: translateY(1px); }
.ticker-sep { margin: 0 30px; width: 6px; height: 6px; background: #f87171; font-size: 0; transform: rotate(45deg); }
@keyframes ticker-move { from { transform: translateX(0); } to { transform: translateX(var(--dist, -50%)); } }
@media (min-width: 1600px) { .ticker-item { font-size: 18px; } .ticker-label { font-size: 16px; } }
@media (max-width: 640px) {
  .ticker-item { font-size: 13.5px; }
  .ticker-label { font-size: 12px; padding: 0 20px 0 12px; gap: 6px; clip-path: polygon(0 0, 100% 0, calc(100% - 11px) 100%, 0 100%); }
  .ticker-label svg { width: 14px; height: 14px; }
}
@media (prefers-reduced-motion: reduce) {
  .ticker-track { animation: none; padding-left: 12px; }
  .ticker-run + .ticker-run { display: none; }
}
.ticker-set { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 10px; margin: 6px 0 14px; padding: 10px 12px; border-radius: 10px; background: var(--bg, #f8fafc); font-size: 14px; }
.ticker-set select { width: auto; }

/* ================= 작업 체크 다듬기 (2026-11-11) ================= */
.work-chips { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.work-count:not(:empty)::before { content: "· "; }
/* PC: 필터·검색 줄과 표 머리줄이 내려도 위에 붙어 있음 (머리줄은 필터 줄 바로 아래) */
@media (min-width: 761px) {
  .work-tools { position: sticky; top: 64px; z-index: 15; margin: 0 -6px 8px; padding: 8px 6px; background: var(--bg); }
  .work-tools.stuck { box-shadow: 0 6px 10px -8px rgba(15, 23, 42, .25); }
  .work-table th { top: calc(64px + var(--tools-h, 0px)); }
}
/* 휴대폰: 첫 화면에 작업이 더 보이게 위쪽을 압축 */
@media (max-width: 640px) {
  .work-head h1 { display: none; }
  .work-head { margin-bottom: 8px; }
  /* 위쪽 줄은 보일 단추(운송 위치 보내기·상면 체크)가 하나도 없을 때만 숨김 */
  .work-head:not(:has(.gps-btn:not(.hidden), .floor-btn:not(.hidden))) { display: none; }
  .work-head-btns { width: 100%; display: flex; gap: 8px; }
  .work-head-btns > .btn:not(.hidden) { flex: 1; margin-left: 0; justify-content: center; padding: 8px 12px; }
  .stage-tabs { padding-bottom: 6px; margin-bottom: 4px; }
  .stage-tab { padding: 6px 10px; min-width: 76px; }
  .st-bar { margin-top: 4px; height: 3px; }
  .stage-sum { padding: 10px 12px; gap: 6px; margin-bottom: 8px; }
  .ss-top > b { font-size: 15px; }
  .ss-num b { font-size: 16px; }
  .ss-bar { height: 6px; }
  .stage-sum .small { font-size: 11.5px; }
  /* 버튼은 한 줄로 (옆으로 밀어서), 검색은 그 아래 */
  .work-tools { gap: 8px; margin-bottom: 4px; }
  .work-chips { flex-wrap: nowrap; overflow-x: auto; gap: 6px; width: 100%; padding-bottom: 2px; scrollbar-width: none; -webkit-overflow-scrolling: touch; }
  .work-chips::-webkit-scrollbar { display: none; }
  .work-chips .chips { flex-wrap: nowrap; }
  .work-chips > *, .work-chips .chip { flex: none; white-space: nowrap; }
  .work-tools .chip, .work-tools .scan-btn { padding: 6px 12px; font-size: 13px; }
  .work-tools input[type=search] { padding: 9px 12px; font-size: 14px; }
  .work-help { margin: 2px 0 6px; }
  .work-help-text { display: none; }
  .work-count:not(:empty)::before { content: none; }
}

/* 관리 > 사용자: 계정 일괄 등록 */
.bulk-user { display: flex; align-items: center; justify-content: space-between; gap: 10px 16px; flex-wrap: wrap;
  margin: 4px 0 14px; padding: 12px 14px; border: 1px dashed #bcd3ff; border-radius: 10px; background: #f5f9ff; }
.bulk-user-text { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.bulk-user-text b { font-size: 14px; display: flex; align-items: center; }
.bulk-user-text .ic { color: var(--primary); }
.bulk-dialog { width: min(860px, calc(100vw - 32px)); max-width: none; }
.bulk-dialog h2 { margin: 0 0 6px; font-size: 18px; }
.bulk-table-wrap { max-height: min(50vh, 420px); overflow: auto; border: 1px solid var(--card-line); border-radius: 10px; margin: 8px 0 10px; }
.bulk-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.bulk-table th { position: sticky; top: 0; background: #f8fafc; color: var(--muted); font-size: 12px; text-align: left; padding: 8px 10px; border-bottom: 1px solid var(--card-line); white-space: nowrap; }
.bulk-table td { padding: 7px 10px; border-bottom: 1px solid #eef2f7; vertical-align: top; }
.bulk-table tr.bad td { background: #fff7f7; }
.bulk-table .c-done { color: var(--done); font-weight: 700; }
.bulk-table .c-late, #bulk-sum .c-late { color: var(--late); font-weight: 700; }
#bulk-sum .c-done { color: var(--done); }
.bulk-guide { margin: 0 0 12px; padding-left: 18px; line-height: 1.6; }

/* ================= 로그인 화면 새 디자인 (2026-11-13) =================
   PC: 왼쪽 남색 소개 영역(데이터센터 무늬) | 오른쪽 로그인 카드
   휴대폰: 위쪽 남색 띠 + 그 위에 겹쳐 올라오는 카드 */
.login-page.lg2 { display: block; min-height: 100vh; background: #f4f7fc; }
.lg-shell { display: grid; grid-template-columns: minmax(380px, 46%) 1fr; min-height: 100vh; }
.lg-hero {
  position: relative; overflow: hidden; color: #fff;
  background: radial-gradient(700px 500px at 15% 10%, rgba(59,130,246,.35), transparent 70%),
              linear-gradient(155deg, #0b1f4d 0%, #0f2f6b 48%, #0b4a7a 100%);
  display: flex; align-items: center; padding: 64px clamp(40px, 6vw, 96px);
}
.lg-pattern { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; }
/* 기능 목록 아래 그림: 출발 전산센터 → 단계 체크 → 운송 → 도착 전산센터 (크기 고정, 글자와 겹치지 않음) */
.lg-route { display: block; width: 100%; max-width: 560px; height: auto; margin: 52px 0 0 -8px; overflow: visible; }
.lg-flow { animation: lg-flow 2.4s linear infinite; }   /* 남은 경로 점선이 도착지 쪽으로 천천히 흐름 */
@keyframes lg-flow { to { stroke-dashoffset: -28; } }
.lg-hero-in { position: relative; width: 100%; max-width: 560px; animation: lg-up .7s ease-out both; }
.lg-kicker { font-size: 12px; font-weight: 700; letter-spacing: 2.4px; color: #93c5fd; margin-bottom: 14px; }
.lg-title { margin: 0; font-size: clamp(32px, 3.2vw, 46px); font-weight: 800; letter-spacing: -1px; line-height: 1.15; color: #fff; }
.lg-desc { margin: 18px 0 30px; font-size: 16px; line-height: 1.65; color: #c7d6ee; }
.lg-feats { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 12px; }
.lg-feats li { display: flex; align-items: center; gap: 12px; font-size: 15px; font-weight: 600; color: #e2ebf8; }
.lg-fi {
  width: 34px; height: 34px; border-radius: 10px; display: inline-flex; align-items: center; justify-content: center;
  background: rgba(255,255,255,.10); border: 1px solid rgba(255,255,255,.16);
}
.lg-fi svg { width: 18px; height: 18px; fill: none; stroke: #93c5fd; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }

/* 오른쪽: 은은한 그라데이션 + 점 무늬 위에 살짝 비치는 카드 */
.lg2 .lg-main {   /* .lg2 붙임: 예전 '.login-page main' 큰 위·아래 여백을 덮어씀 */
  position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center;
  padding: 40px 24px 24px; min-width: 0;
  background: radial-gradient(600px 400px at 85% 0%, #e2ecff 0%, transparent 70%),
              radial-gradient(circle at 1px 1px, rgba(15,47,107,.07) 1px, transparent 0) 0 0 / 22px 22px,
              linear-gradient(180deg, #f7f9fd 0%, #edf2f9 100%);
}
.lg2 .login-card {
  width: 100%; max-width: 440px; margin: auto 0; padding: 36px 40px 32px;
  background: rgba(255,255,255,.86); -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px);
  border: 1px solid rgba(255,255,255,.9); border-radius: 20px;
  box-shadow: 0 24px 60px rgba(15,35,80,.13), 0 2px 8px rgba(15,35,80,.05);
  animation: lg-up .6s .08s ease-out both;
}
.lg2 .login-client-ci { height: 44px; max-width: 80%; margin: 0 auto 22px; }
.lg2 .login-brand { font-size: 24px; font-weight: 800; color: var(--heading); text-align: left; letter-spacing: -.4px; }
.lg2 .login-sub { text-align: left; font-size: 14px; letter-spacing: 0; color: var(--muted); margin: 4px 0 24px; }
.lg2 .login-card label { color: #334155; font-weight: 600; margin-bottom: 4px; }

/* 입력칸: 왼쪽 아이콘 + 조금 더 크게 */
.in-wrap { position: relative; display: block; }
.lg2 { --in-h: 48px; }
.in-ic {
  position: absolute; left: 14px; top: 0; height: var(--in-h, 48px); width: 18px; pointer-events: none;   /* 입력칸 위 여백은 감싼 칸 밖으로 빠지므로 0 */
  fill: none; stroke: #94a3b8; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; transition: stroke .15s;
}
.in-wrap:focus-within .in-ic { stroke: var(--primary); }
.lg2 .login-card input:not([type=checkbox]) {
  height: var(--in-h); margin: 6px 0 14px; padding: 0 14px 0 42px; font-size: 15px;
  border-radius: 12px; border: 1px solid #d8e0ea; background: #fff; transition: border-color .15s, box-shadow .15s;
}
.lg2 .login-card .pw-wrap input { padding-right: 46px; }
.lg2 .login-card input:not([type=checkbox]):focus { border-color: var(--primary); box-shadow: 0 0 0 4px rgba(37,99,235,.14); outline: none; }
.lg2 .pw-toggle { top: calc((var(--in-h) - 34px) / 2); bottom: auto; height: 34px; right: 7px; }
.lg2 .login-card label.remember { margin: 0 0 18px; font-weight: 500; gap: 8px; }
/* 아이디 기억하기: 기본 체크 상자 대신 둥근 파란 체크 상자 */
.lg2 .login-card label.remember input {
  appearance: none; -webkit-appearance: none; flex-shrink: 0; width: 18px; height: 18px; min-height: 0; padding: 0;
  border: 1.5px solid #c3cddb; border-radius: 5px; background: #fff center / 12px 12px no-repeat;
  transition: background-color .15s, border-color .15s, box-shadow .15s;
}
.lg2 .login-card label.remember:hover input { border-color: var(--primary); }
.lg2 .login-card label.remember input:checked {
  border-color: var(--primary); background-color: var(--primary);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12'%3E%3Cpath d='M2.5 6.2l2.3 2.3 4.7-5' fill='none' stroke='%23fff' stroke-width='1.9' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
}
.lg2 .login-card label.remember input:focus-visible { outline: none; box-shadow: 0 0 0 4px rgba(37,99,235,.18); }

/* 로그인 버튼: 그라데이션 + 올리면 살짝 떠오름 + 로그인 중 빙글 표시 */
.lg2 .btn.login-submit {
  height: 50px; padding: 0; margin: 0; font-size: 16px; font-weight: 700; border-radius: 12px; border: 0;
  background: linear-gradient(135deg, #2563eb 0%, #1d4ed8 55%, #1e40af 100%);
  box-shadow: 0 8px 20px rgba(37,99,235,.28); transition: transform .15s, box-shadow .15s, filter .15s;
  display: flex; align-items: center; justify-content: center; gap: 8px;
}
.lg2 .btn.login-submit:not(:disabled):hover { background: linear-gradient(135deg, #1d4ed8 0%, #1e40af 55%, #1e3a8a 100%); transform: translateY(-1px); box-shadow: 0 12px 26px rgba(37,99,235,.34); }
.lg2 .btn.login-submit:not(:disabled):active { transform: translateY(0); box-shadow: 0 4px 12px rgba(37,99,235,.3); }
.lg2 .btn.login-submit:disabled { opacity: .85; cursor: wait; }
.btn-spin { width: 16px; height: 16px; border-radius: 50%; border: 2px solid rgba(255,255,255,.4); border-top-color: #fff; animation: lg-spin .7s linear infinite; }
.lg2 .login-alert, .lg2 .login-info { border-radius: 10px; }

/* 아래: 당사 CI·저작권 가운데 정렬 */
.lg2 .login-footer { position: static; margin: 0; padding-top: 32px; align-items: center; gap: 6px; }
.lg2 .login-company-ci { height: 28px; }
.lg2 .login-copy { font-size: 11px; color: #7b8698; }
.login-secure { display: inline-flex; align-items: center; gap: 5px; font-size: 11px; font-weight: 600; color: #047857; }
.login-secure[hidden] { display: none; }
.login-secure svg { width: 12px; height: 12px; fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }

/* 움직임: 떠오르며 나타남 · 오류 시 흔들림 · 빙글 */
@keyframes lg-up { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
@keyframes lg-spin { to { transform: rotate(360deg); } }
@keyframes lg-shake { 10%, 90% { transform: translateX(-2px); } 20%, 80% { transform: translateX(4px); } 30%, 50%, 70% { transform: translateX(-7px); } 40%, 60% { transform: translateX(7px); } }
.lg2 .login-card.shake { animation: lg-shake .45s ease-in-out; }
@media (prefers-reduced-motion: reduce) {
  .lg-hero-in, .lg2 .login-card, .lg2 .login-card.shake, .lg-flow { animation: none; }
}

/* 노트북처럼 세로가 낮은 PC 화면: 한 화면에 다 들어오도록 간격·크기를 조금씩 줄임 */
@media (min-width: 901px) and (max-height: 860px) {
  .lg2 { --in-h: 44px; }
  .lg2 .lg-main { padding: 20px 24px 14px; }
  .lg2 .login-card { padding: 26px 36px 22px; }
  .lg2 .login-client-ci { height: 36px; margin-bottom: 14px; }
  .lg2 .login-brand { font-size: 21px; }
  .lg2 .login-sub { margin: 2px 0 16px; font-size: 13px; }
  .lg2 .login-card input:not([type=checkbox]) { margin: 4px 0 10px; }
  .lg2 .login-card label.remember { margin-bottom: 14px; }
  .lg2 .btn.login-submit { height: 46px; }
  .lg2 .login-footer { padding-top: 14px; gap: 4px; }
  .lg2 .login-company-ci { height: 22px; }
  .lg-desc { margin: 14px 0 22px; }
  .lg-route { max-width: 380px; margin-top: 26px; }
}
@media (min-width: 901px) and (max-height: 640px) {
  .lg2 { --in-h: 40px; }
  .lg2 .login-card { padding: 20px 32px 18px; }
  .lg2 .login-client-ci { height: 30px; margin-bottom: 10px; }
  .lg2 .login-brand { font-size: 19px; }
  .lg2 .login-sub { margin-bottom: 12px; }
  .lg2 .login-card label { font-size: 12px; }
  .lg2 .login-card input:not([type=checkbox]) { margin: 3px 0 8px; font-size: 14px; }
  .lg2 .login-card label.remember { margin-bottom: 10px; }
  .lg2 .btn.login-submit { height: 42px; font-size: 15px; }
  .lg2 .login-footer { padding-top: 10px; }
  .lg2 .login-company-ci { height: 20px; }
  .lg-feats { gap: 8px; }
  .lg-fi { width: 30px; height: 30px; }
  .lg-route { max-width: 300px; margin-top: 14px; }
}

/* 태블릿·휴대폰: 위쪽 남색 띠 + 카드가 띠 위로 겹쳐 올라옴 */
@media (max-width: 900px) {
  .lg-shell { grid-template-columns: 1fr; grid-template-rows: auto 1fr; }
  .lg-hero { padding: 40px 24px 92px; justify-content: center; text-align: center; }
  .lg-hero-in { max-width: none; }
  .lg-kicker { font-size: 10px; letter-spacing: 2px; margin-bottom: 8px; }
  .lg-title { font-size: 28px; }
  .lg-desc { margin: 10px 0 0; font-size: 14px; }
  .lg-feats { display: none; }
  .lg-route { max-width: 260px; margin: 18px auto 0; }
  .lg2 .lg-main { justify-content: flex-start; padding: 0 16px 20px; background: #f4f7fc; }
  .lg2 .login-card { margin: -64px 0 0; padding: 26px 22px 24px; border-radius: 18px; }
  .lg2 .login-client-ci { height: 38px; margin-bottom: 16px; }
  .lg2 .login-brand { font-size: 21px; }
  .lg2 .login-sub { margin-bottom: 18px; }
  .lg2 .login-footer { padding-top: 26px; }
}
/* 휴대폰: 그림은 숨기고 로그인 칸이 먼저 보이게 */
@media (max-width: 600px) { .lg-route { display: none; } }

/* 보고서 인쇄: 내용이 여러 장으로 넘어갈 때 장마다 위·아래 여백을 두고, 한 줄(행)이 두 장에 걸쳐 잘리지 않게 (2026-11-18) */
@page rpcover { size: A4; margin: 0; }
@page rpdoc { size: A4; margin: 12mm 0 12mm; }
@media print {
  .rp-cover { page: rpcover; }
  .rp-sheet:not(.rp-cover) { page: rpdoc; min-height: 0; padding-top: 2mm; padding-bottom: 0; }
  .rp-head, .rp-kpi, .rp-table tr, .gt-row, .gt-legend, .rp-list li, .rp-foot { break-inside: avoid; page-break-inside: avoid; }
  .rp-sheet section > h2, .gt-head { break-after: avoid; page-break-after: avoid; }
  .rp-table thead { display: table-header-group; }
}
/* ===== 점검 모드 ===== */
/* 점검 중에 관리자가 보는 모든 화면: 아래 가운데 '점검 중' 표시 (누르면 끄는 곳으로) */
.maint-bar { position: fixed; left: 50%; bottom: 14px; transform: translateX(-50%); z-index: 9000;
  display: inline-flex; align-items: center; gap: 10px; max-width: calc(100vw - 32px);
  padding: 8px 16px 8px 10px; border-radius: 999px; text-decoration: none; font-size: 13px; line-height: 1.3;
  color: #fff; background: #b45309; box-shadow: 0 8px 24px rgba(15,23,42,.28); }
.maint-bar b { padding: 3px 10px; border-radius: 999px; background: rgba(255,255,255,.22); font-weight: 800; white-space: nowrap; }
.maint-bar b::before { content: ""; display: inline-block; width: 7px; height: 7px; margin-right: 6px; border-radius: 50%;
  background: #fde68a; vertical-align: 1px; animation: maint-blink 1.6s ease-in-out infinite; }
.maint-bar span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.maint-bar:hover { background: #92400e; }
@keyframes maint-blink { 50% { opacity: .25; } }
@media (prefers-reduced-motion: reduce) { .maint-bar b::before { animation: none; } }
@media print { .maint-bar { display: none !important; } }
@media (max-width: 640px) { .maint-bar { bottom: calc(78px + env(safe-area-inset-bottom)); } body.tv .maint-bar { bottom: 14px; } }
@media (max-width: 480px) { .maint-bar span { display: none; } .maint-bar { padding: 6px; } }
/* 관리 > 로그인·CI > 점검 모드 */
.maint-state { font-size: 13px; font-weight: 700; padding: 4px 12px; border-radius: 999px; color: var(--muted); background: #f1f5f9; }
.maint-card.on { border-color: #f59e0b; box-shadow: 0 0 0 3px rgba(245,158,11,.18); }
.maint-card.on .maint-state { color: #fff; background: #d97706; }
.maint-body { display: grid; grid-template-columns: minmax(0, 1fr) 220px; gap: 12px; }
.maint-body label { font-size: 13px; color: var(--muted); }
.maint-body textarea, .maint-body input { display: block; width: 100%; margin-top: 4px; min-width: 0; font: inherit; font-size: 14px; color: var(--text);
  border: 1px solid var(--line); border-radius: 8px; padding: 8px 12px; background: #fff; resize: vertical; transition: border-color .15s, box-shadow .15s; }
.maint-body textarea:focus, .maint-body input:focus { outline: none; border-color: var(--primary); box-shadow: 0 0 0 3px rgba(37, 99, 235, .15); }
.maint-active { margin-top: 12px; padding: 9px 12px; border-radius: 10px; background: #f8fafc; display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.maint-card.on .maint-active { background: #fffbeb; }
.maint-actions { margin-top: 12px; justify-content: flex-end; }
.maint-actions #maint-info { margin-right: auto; }
@media (max-width: 640px) { .maint-body { grid-template-columns: 1fr; } }
