@import url("https://cdn.jsdelivr.net/gh/orioncactus/pretendard@v1.3.9/dist/web/variable/pretendardvariable-dynamic-subset.css");

:root {
  --ink: #16211c;
  --paper: #edf0ee;
  --card: #ffffff;
  --steel: #1f5f52;
  --steel-soft: #e3efeb;
  --alert: #b5341f;
  --amber: #b8781a;
  --muted: #6b7b76;
  --line: #d6dee0;

  --page: 980px;          /* 본문 최대 폭 — 넓은 모니터에서는 아래에서 늘립니다 */
  --r: 14px;
  --safe-b: env(safe-area-inset-bottom, 0px);
  --safe-t: env(safe-area-inset-top, 0px);

  --sans: "Pretendard Variable", Pretendard, -apple-system, BlinkMacSystemFont,
    "Apple SD Gothic Neo", "Malgun Gothic", "Noto Sans KR", sans-serif;
  --mono: "SFMono-Regular", ui-monospace, "D2Coding", Consolas, monospace;
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 15px;
  line-height: 1.55;
  overscroll-behavior-y: none;
}

button, input, select, textarea { font-family: inherit; font-size: 16px; color: inherit; }
a { color: var(--steel); }

/* ─── 레이아웃 ─────────────────────────────────────────────── */
.app { min-height: 100dvh; display: flex; flex-direction: column; }

.topbar {
  position: sticky; top: 0; z-index: 30;
  padding: calc(var(--safe-t) + 12px) 16px 12px;
  background: var(--ink); color: #fff;
}
/* 머리줄 안쪽을 본문과 같은 폭으로 맞춥니다. (넓은 모니터에서 끝으로 벌어지지 않게) */
.topbar .topinner {
  display: flex; align-items: center; gap: 10px;
  max-width: var(--page); width: 100%; margin: 0 auto;
}
.topbar .brand { font-weight: 800; letter-spacing: -0.02em; font-size: 16px; }
.topbar .brand span { font-weight: 500; opacity: .62; margin-left: 6px; font-size: 13px; }
.topbar .who {
  margin-left: auto; font-family: var(--mono); font-size: 12px;
  opacity: .8; display: flex; align-items: center; gap: 8px;
}
.topbar .who button {
  background: rgba(255,255,255,.12); border: 0; color: #fff;
  padding: 5px 9px; border-radius: 8px; font-size: 12px; cursor: pointer;
}

main {
  flex: 1; padding: 14px 14px calc(96px + var(--safe-b));
  max-width: var(--page); width: 100%; margin: 0 auto;
}

.tabbar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 40;
  display: grid; grid-template-columns: repeat(4, 1fr);
  background: rgba(255,255,255,.96);
  backdrop-filter: blur(8px);
  border-top: 1px solid var(--line);
  padding-bottom: var(--safe-b);
}
.tabbar button {
  border: 0; background: none; padding: 9px 0 10px; cursor: pointer;
  display: flex; flex-direction: column; align-items: center; gap: 3px;
  font-size: 11px; font-weight: 600; color: var(--muted);
}
.tabbar button svg { width: 21px; height: 21px; stroke-width: 1.7; }
.tabbar button.on { color: var(--steel); }

/* ─── 공통 요소 ────────────────────────────────────────────── */
.section-title {
  font-size: 12px; font-weight: 700; letter-spacing: .06em;
  color: var(--muted); text-transform: uppercase; margin: 20px 2px 8px;
}
.card {
  background: var(--card); border: 1px solid var(--line);
  border-radius: var(--r); padding: 14px;
}
.btn {
  border: 0; border-radius: 11px; padding: 13px 16px; font-weight: 700;
  background: var(--steel); color: #fff; cursor: pointer; font-size: 15px;
}
.btn:active { transform: translateY(1px); }
.btn.ghost { background: #fff; color: var(--ink); border: 1px solid var(--line); }
.btn.danger { background: var(--alert); }
.btn.block { width: 100%; }
.btn:disabled { opacity: .5; }
.btn.sm { padding: 9px 12px; font-size: 13px; border-radius: 9px; }

label.f { display: block; margin-bottom: 13px; }
label.f > .lb { display: block; font-size: 12.5px; font-weight: 700; color: var(--muted); margin-bottom: 5px; }
label.f .req { color: var(--alert); }
input.i, select.i, textarea.i {
  width: 100%; padding: 12px; border: 1px solid var(--line);
  border-radius: 10px; background: #fff; outline: none;
}
input.i:focus, select.i:focus, textarea.i:focus { border-color: var(--steel); box-shadow: 0 0 0 3px var(--steel-soft); }
textarea.i { min-height: 110px; resize: vertical; line-height: 1.6; }
.row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }

/* 유형 선택 (큰 터치 타겟) */
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip {
  border: 1px solid var(--line); background: #fff; border-radius: 999px;
  padding: 9px 14px; font-size: 14px; font-weight: 600; cursor: pointer; color: var(--muted);
}
.chip.on { background: var(--ink); border-color: var(--ink); color: #fff; }
.chip.on[data-tone="alert"] { background: var(--alert); border-color: var(--alert); }
.chip.on[data-tone="amber"] { background: var(--amber); border-color: var(--amber); }
.chip.on[data-tone="steel"] { background: var(--steel); border-color: var(--steel); }

/* ─── 민원 카드: 왼쪽 상태 레일이 시그니처 ─────────────────── */
.list { display: grid; gap: 10px; }
@media (min-width: 860px) { .list { grid-template-columns: 1fr 1fr; } }
/* 넓은 모니터에서는 본문을 더 쓰고 카드도 3단으로 */
@media (min-width: 1500px) {
  :root { --page: 1440px; }
  .list { grid-template-columns: repeat(3, 1fr); }
}

.mw {
  position: relative; background: var(--card); border: 1px solid var(--line);
  border-radius: var(--r); padding: 13px 13px 13px 20px; cursor: pointer; overflow: hidden;
}
.mw::before {
  content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 6px;
  background: var(--rail, var(--muted));
}
.mw.done::before { background: repeating-linear-gradient(180deg, var(--steel) 0 4px, #fff 4px 8px); }
.mw .head { display: flex; align-items: center; gap: 8px; margin-bottom: 6px; }
.mw .tno { font-family: var(--mono); font-size: 11.5px; color: var(--muted); letter-spacing: -.02em; }
.mw .badge {
  margin-left: auto; font-size: 11px; font-weight: 800; padding: 3px 8px;
  border-radius: 6px; background: var(--steel-soft); color: var(--steel);
}
.mw .badge.open { background: #fbe9e5; color: var(--alert); }
.mw .badge.work { background: #f4eddc; color: var(--amber); }
.mw .badge.hold { background: #eceeed; color: var(--muted); }
.mw .fac { font-weight: 800; font-size: 16.5px; letter-spacing: -.02em; }
.mw .type { font-size: 12.5px; font-weight: 700; color: var(--rail, var(--muted)); }
.mw .body {
  font-size: 13.5px; color: #384843; margin-top: 5px;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.mw .foot {
  display: flex; align-items: center; gap: 10px; margin-top: 9px;
  font-family: var(--mono); font-size: 11px; color: var(--muted);
}
.mw .dplus { margin-left: auto; font-weight: 700; color: var(--alert); }

/* ─── 통계 ─────────────────────────────────────────────────── */
.kpis { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; }
@media (min-width: 620px) { .kpis { grid-template-columns: repeat(4, 1fr); } }
.kpi { background: var(--card); border: 1px solid var(--line); border-radius: var(--r); padding: 13px; }
.kpi .n { font-family: var(--mono); font-size: 27px; font-weight: 700; letter-spacing: -.03em; }
.kpi .l { font-size: 12px; color: var(--muted); font-weight: 600; }
.kpi.warn .n { color: var(--alert); }

.bar { display: flex; align-items: center; gap: 9px; margin: 9px 0; }
.bar .nm { width: 112px; font-size: 12.5px; font-weight: 600; flex: none; line-height: 1.25; }
.bar .tr { flex: 1; height: 9px; background: #e6ebe9; border-radius: 5px; overflow: hidden; display: block; }
.bar .fl { display: block; height: 100%; min-width: 4px; border-radius: 5px; }
.bar .vl { font-family: var(--mono); font-size: 12px; width: 34px; text-align: right; color: var(--muted); }

/* ─── 사진 ─────────────────────────────────────────────────── */
.thumbs { display: grid; grid-template-columns: repeat(auto-fill, minmax(84px, 1fr)); gap: 8px; }
.thumb { position: relative; aspect-ratio: 1; border-radius: 10px; overflow: hidden; border: 1px solid var(--line); background: #f4f6f5; }
.thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.thumb .x {
  position: absolute; top: 4px; right: 4px; width: 22px; height: 22px; border: 0;
  border-radius: 50%; background: rgba(0,0,0,.6); color: #fff; font-size: 13px; cursor: pointer; line-height: 1;
}
.addphoto {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px;
  aspect-ratio: 1; border: 1.5px dashed var(--line); border-radius: 10px; background: #fff;
  color: var(--muted); font-size: 11.5px; font-weight: 600; cursor: pointer;
}

/* ─── 시트(모달) ───────────────────────────────────────────── */
.sheet-bg {
  position: fixed; inset: 0; z-index: 60; background: rgba(12,20,17,.45);
  display: flex; align-items: flex-end; justify-content: center;
}
.sheet {
  background: var(--paper); width: 100%; max-width: 720px;
  max-height: 94dvh; border-radius: 18px 18px 0 0; display: flex; flex-direction: column;
  animation: up .22s ease-out;
}
@keyframes up { from { transform: translateY(22px); opacity: .6; } }
@media (prefers-reduced-motion: reduce) { .sheet { animation: none; } }
.sheet .sh {
  display: flex; align-items: center; gap: 10px; padding: 14px 16px;
  border-bottom: 1px solid var(--line); background: var(--paper);
  border-radius: 18px 18px 0 0; position: sticky; top: 0;
}
.sheet .sh h2 { margin: 0; font-size: 16.5px; font-weight: 800; letter-spacing: -.02em; }
.sheet .sh .x { margin-left: auto; background: none; border: 0; font-size: 22px; cursor: pointer; color: var(--muted); }
.sheet .sb { padding: 16px; overflow-y: auto; -webkit-overflow-scrolling: touch; }
.sheet .sf {
  padding: 12px 16px calc(14px + var(--safe-b)); border-top: 1px solid var(--line);
  background: var(--paper); display: flex; gap: 9px;
}
.sheet .sf .btn { flex: 1; }

/* ─── 기타 ─────────────────────────────────────────────────── */
.empty { text-align: center; padding: 46px 20px; color: var(--muted); }
.empty b { display: block; color: var(--ink); font-size: 15px; margin-bottom: 5px; }
.toast {
  position: fixed; left: 50%; bottom: calc(84px + var(--safe-b)); transform: translateX(-50%);
  background: var(--ink); color: #fff; padding: 11px 17px; border-radius: 11px;
  font-size: 14px; font-weight: 600; z-index: 90; max-width: 88vw;
}
.toast.err { background: var(--alert); }
.filters { display: flex; gap: 7px; overflow-x: auto; padding: 2px 0 8px; scrollbar-width: none; }
.filters::-webkit-scrollbar { display: none; }
.filters .chip { flex: none; padding: 7px 12px; font-size: 13px; }
.dl { display: grid; grid-template-columns: 82px 1fr; gap: 6px 10px; font-size: 14px; }
.dl dt { color: var(--muted); font-weight: 600; font-size: 13px; }
.dl dd { margin: 0; font-weight: 600; }
.hr { height: 1px; background: var(--line); margin: 15px 0; border: 0; }
.logline { font-size: 12.5px; color: var(--muted); padding: 5px 0; border-bottom: 1px dashed var(--line); }
.logline b { color: var(--ink); }
.login-wrap { min-height: 100dvh; display: flex; align-items: center; justify-content: center; padding: 22px; }
.login-box { width: 100%; max-width: 360px; }
.login-box h1 { font-size: 23px; font-weight: 800; letter-spacing: -.03em; margin: 0 0 3px; }
.login-box p { color: var(--muted); font-size: 13.5px; margin: 0 0 22px; }

.rangebar { display: flex; gap: 7px; margin-bottom: 12px; }
.rangebar .chip { flex: 1; text-align: center; padding: 8px 0; font-size: 13px; }
.daterow { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 8px; margin: 4px 0 12px; }
.daterow .tilde { color: var(--muted); font-size: 13px; }
.daterow .lbl { grid-column: 1 / -1; font-size: 12px; font-weight: 700; color: var(--muted); margin-bottom: -2px; }

.listhead {
  display: flex; align-items: center; gap: 10px;
  margin: 2px 2px 9px; font-size: 12px; color: var(--muted); font-weight: 600;
}
.listhead button { margin-left: auto; }

.typefilter { margin-bottom: 4px; }
.typefilter .chip { padding: 7px 12px; font-size: 13px; }
.typerow { display: flex; align-items: center; gap: 9px; padding: 7px 0; border-bottom: 1px dashed var(--line); }
.typerow .dot { width: 11px; height: 11px; border-radius: 3px; flex: none; }
.typerow .nm { font-weight: 600; font-size: 14px; }
.typerow button { margin-left: auto; }

.fold {
  width: 100%; display: flex; align-items: center; gap: 8px;
  background: #fff; border: 1px solid var(--line); border-radius: 11px;
  padding: 11px 13px; margin: 8px 0 0; cursor: pointer;
  font-size: 13.5px; font-weight: 700; color: var(--ink); text-align: left;
}
.fold.open { border-color: var(--steel); border-radius: 11px 11px 0 0; border-bottom-color: transparent; }
.fold .ar { margin-left: auto; color: var(--muted); font-size: 10px; }
.fold .tags { display: flex; gap: 5px; flex-wrap: wrap; }
.fold .tags i {
  font-style: normal; font-size: 11.5px; font-weight: 700;
  background: var(--steel-soft); color: var(--steel); padding: 2px 7px; border-radius: 6px;
}
.foldbody {
  border: 1px solid var(--steel); border-top: 0; border-radius: 0 0 11px 11px;
  background: #fff; padding: 12px 13px 13px; margin-bottom: 12px;
}
.foldbody .daterow { margin-bottom: 10px; }
.foldbody .typefilter { margin-bottom: 12px; }

.typerow .uid { font-family: var(--mono); font-size: 11.5px; color: var(--muted); font-weight: 500; }
.rolebadge {
  font-size: 11px; font-weight: 800; padding: 2px 8px; border-radius: 6px;
  background: #eceeed; color: var(--muted); margin-left: auto;
}
.rolebadge.admin { background: var(--ink); color: #fff; }
.rolebadge.agent { background: var(--steel-soft); color: var(--steel); }
.rolebadge.viewer { background: #eef1f0; color: var(--muted); }
.typerow .rolebadge + button { margin-left: 8px; }

/* ─── 사진 뷰어 ────────────────────────────────────────────── */
.photoviewer {
  position: fixed; inset: 0; z-index: 100;
  background: #0b0f0d;
  display: flex; flex-direction: column;
  animation: fadein .16s ease-out;
}
@keyframes fadein { from { opacity: 0; } }
@media (prefers-reduced-motion: reduce) { .photoviewer { animation: none; } }

.photoviewer .vbar {
  display: flex; align-items: center; gap: 10px;
  padding: calc(var(--safe-t) + 12px) 14px 12px;
  color: #fff; flex: none;
}
.photoviewer .vtitle { font-size: 14px; font-weight: 700; }
.photoviewer .vcount {
  font-family: var(--mono); font-size: 12.5px;
  color: rgba(255,255,255,.65);
}
.photoviewer .vx {
  margin-left: auto; border: 0; cursor: pointer;
  background: rgba(255,255,255,.16); color: #fff;
  font-size: 14px; font-weight: 700;
  padding: 10px 16px; border-radius: 10px;
  min-height: 44px;
}
.photoviewer .vx:active { background: rgba(255,255,255,.3); }

.photoviewer .vstage {
  flex: 1; min-height: 0;
  display: flex; align-items: center; justify-content: center;
  padding: 4px 10px;
}
.photoviewer .vstage img {
  max-width: 100%; max-height: 100%;
  object-fit: contain; border-radius: 6px;
  background: #000;
}

.photoviewer .vfoot {
  flex: none; display: flex; align-items: center; gap: 8px;
  padding: 12px 14px calc(16px + var(--safe-b));
}
.photoviewer .vnav, .photoviewer .vback {
  border: 0; cursor: pointer; border-radius: 10px;
  min-height: 44px; font-weight: 700; font-size: 13.5px;
}
.photoviewer .vnav {
  background: rgba(255,255,255,.14); color: #fff; padding: 11px 14px; flex: none;
}
.photoviewer .vback {
  flex: 1; background: #fff; color: var(--ink); padding: 11px 12px;
}
.photoviewer .vnav:active { background: rgba(255,255,255,.28); }

/* 썸네일이 눌러서 크게 볼 수 있음을 알림 */
.thumb img[data-full] { cursor: zoom-in; }

.statbtns { display: grid; gap: 9px; margin-top: 16px; }
@media (min-width: 620px) { .statbtns { grid-template-columns: 1fr 1fr; } }

/* ─── 대분류 묶음 ──────────────────────────────────────────── */
.tgroup { margin-bottom: 12px; }
.tgh {
  font-size: 11.5px; font-weight: 800; letter-spacing: .02em;
  color: var(--steel); margin: 12px 0 6px;
  display: flex; align-items: center; gap: 7px;
}
.tgh::after { content: ""; flex: 1; height: 1px; background: var(--line); }
.tgroup:first-child .tgh { margin-top: 0; }
.typefilter.sub {
  margin-top: -4px; padding-top: 10px; border-top: 1px dashed var(--line);
}
.mw .type .cat {
  display: inline-block; font-size: 10.5px; font-weight: 700;
  color: var(--muted); background: #eef1f0; border-radius: 5px;
  padding: 1px 6px; margin-right: 6px; vertical-align: 1px;
}

.editnote {
  font-size: 12.5px; color: var(--alert); font-weight: 600;
  background: #fbe9e5; border-radius: 9px; padding: 9px 11px; margin-bottom: 13px;
  line-height: 1.5;
}
#editmode.danger { background: var(--alert); color: #fff; border-color: var(--alert); }

/* ─── 새 버전 알림 ─────────────────────────────────────────── */
.updbar {
  position: fixed; left: 12px; right: 12px; z-index: 95;
  bottom: calc(78px + var(--safe-b));
  background: var(--ink); color: #fff;
  border-radius: 12px; padding: 11px 12px 11px 15px;
  display: flex; align-items: center; gap: 10px;
  font-size: 13.5px; font-weight: 600;
  box-shadow: 0 6px 20px rgba(12, 20, 17, .28);
}
.updbar button {
  margin-left: auto; border: 0; cursor: pointer;
  background: #fff; color: var(--ink);
  font-weight: 800; font-size: 13px;
  padding: 9px 14px; border-radius: 9px; min-height: 40px;
}

/* ─── 시설 자동 표시 ───────────────────────────────────────── */
.facinfo {
  background: var(--steel-soft); border: 1px solid #cfe3dc;
  border-radius: 11px; padding: 11px 12px; margin: -4px 0 13px;
  font-size: 13px; line-height: 1.5;
}
.facinfo .facreg {
  display: inline-block; font-size: 11px; font-weight: 800;
  background: var(--steel); color: #fff; border-radius: 5px;
  padding: 2px 7px; margin-bottom: 7px;
}
.facinfo .facrow { display: flex; gap: 9px; padding: 2px 0; }
.facinfo .facrow b {
  flex: none; width: 52px; font-size: 12px; font-weight: 700; color: var(--steel);
}
.facinfo .facrow span { flex: 1; color: #26372F; word-break: keep-all; }
.facinfo .facrow.driver { margin-top: 5px; padding-top: 6px; border-top: 1px dashed #b9d5cb; }
.facinfo .facrow i {
  font-style: normal; font-family: var(--mono); font-size: 11.5px;
  color: var(--muted); margin-left: 5px;
}
.facinfo a { font-weight: 700; }

/* ─── 통계 기간 · 주간 집계 ────────────────────────────────── */
.periodbar {
  display: flex; align-items: center; flex-wrap: wrap; gap: 4px 10px;
  background: var(--card); border: 1px solid var(--line);
  border-radius: var(--r); padding: 11px 13px; margin-bottom: 12px;
}
.periodbar b { font-size: 14px; font-weight: 800; }
.periodbar span { font-family: var(--mono); font-size: 12.5px; color: var(--muted); }
.periodbar i {
  font-style: normal; font-size: 11.5px; font-weight: 700;
  background: var(--steel-soft); color: var(--steel);
  border-radius: 6px; padding: 2px 8px;
}
.wkrow { display: flex; align-items: center; gap: 9px; margin: 9px 0; }
.wkrow .wk { width: 118px; flex: none; font-size: 12px; font-weight: 700; font-family: var(--mono); letter-spacing: -.3px; }
.wkrow .tr { flex: 1; height: 9px; background: #e6ebe9; border-radius: 5px; overflow: hidden; display: block; }
.wkrow .fl { display: block; height: 100%; min-width: 4px; border-radius: 5px; }
.wkrow .wv { width: 62px; text-align: right; font-size: 12.5px; font-weight: 700; font-family: var(--mono); }
.wkrow .wv em { display: block; font-style: normal; font-size: 10.5px; font-weight: 500; color: var(--muted); }

.facrow2 { padding: 8px 0; border-bottom: 1px dashed var(--line); }
.facrow2 .l1 { display: flex; align-items: center; gap: 7px; }
.facrow2 .l1 b { font-size: 14px; font-weight: 700; }
.facrow2 .rg {
  font-size: 10.5px; font-weight: 800; color: var(--steel);
  background: var(--steel-soft); border-radius: 5px; padding: 2px 6px; flex: none;
}
.facrow2 .l2 { font-size: 12px; color: var(--muted); margin-top: 2px; line-height: 1.45; }
.facrow2 .l1 .mini { margin-left: auto; }
.facrow2 .drv { color: var(--ink); font-weight: 700; }
.facrow2 .nodrv { color: var(--amber); font-weight: 600; }

/* 체크 한 줄 */
.chk {
  display: flex; align-items: center; gap: 9px; margin: 10px 2px 2px;
  font-size: 13px; color: #384843; cursor: pointer;
}
.chk input { width: 20px; height: 20px; accent-color: var(--steel); }

/* ─── 시설 식수 ────────────────────────────────────────────── */
.facinfo .facrow.meal { margin-top: 5px; padding-top: 6px; border-top: 1px dashed #b9d5cb; align-items: flex-start; }
.mealtbl { border-collapse: collapse; width: 100%; }
.mealtbl th {
  text-align: left; font-size: 11.5px; font-weight: 700; color: var(--steel);
  padding: 1px 8px 1px 0; white-space: nowrap; width: 44px;
}
.mealtbl td { font-size: 12.5px; padding: 1px 0; color: #26372F; }
.mealtbl td.tt {
  text-align: right; font-family: var(--mono); font-size: 11.5px;
  font-weight: 700; color: var(--steel); width: 34px; white-space: nowrap;
}
.facinfo .facrow.meal em {
  display: block; font-style: normal; font-size: 11px;
  color: var(--muted); margin-top: 4px;
}

.mealsum { width: 100%; border-collapse: collapse; }
.mealsum th {
  font-size: 11.5px; font-weight: 700; color: var(--muted);
  padding: 4px 3px; text-align: right; border-bottom: 1px solid var(--line);
}
.mealsum tr:first-child th { text-align: right; }
.mealsum tr th:first-child { text-align: left; color: var(--ink); }
.mealsum td {
  font-family: var(--mono); font-size: 12.5px; text-align: right;
  padding: 5px 3px; border-bottom: 1px dashed var(--line);
}
.mealsum td.tt { font-weight: 700; color: var(--steel); }
.weekbox {
  margin-top: 10px; background: var(--steel-soft); border-radius: 9px;
  padding: 9px 11px; font-size: 13px; font-weight: 600; color: var(--steel);
}
.weekbox b { font-family: var(--mono); font-size: 15px; }
.weekbox em { font-style: normal; font-size: 11px; color: var(--muted); margin-left: 6px; }

/* ─── 조치 결과 요약 ───────────────────────────────────────── */
.resultbox {
  background: #f4f7f6; border: 1px solid var(--line);
  border-radius: 10px; padding: 11px 12px;
}
.resultbox .rtag {
  display: inline-block; font-size: 12.5px; font-weight: 800;
  background: var(--steel); color: #fff; border-radius: 6px;
  padding: 3px 10px; margin-bottom: 7px;
}
.resultbox .rmethod {
  font-size: 12.5px; font-weight: 600; color: var(--steel);
  margin-bottom: 6px; line-height: 1.5;
}
.resultbox .rtext { font-size: 14px; white-space: pre-wrap; color: #26372F; }
.resultbox .dl dt { font-size: 12px; }
.resultbox .dl dd { font-size: 13px; }

/* 상세 화면 식수 */
.mealrow {
  margin-top: 11px; background: var(--steel-soft);
  border-radius: 10px; padding: 9px 11px;
}
.mealrow > b {
  display: block; font-size: 12px; font-weight: 800;
  color: var(--steel); margin-bottom: 4px;
}
.mealrow em { display: block; font-style: normal; font-size: 11px; color: var(--muted); margin-top: 3px; }

.chip.sm2 { padding: 8px 11px; font-size: 12.5px; }

/* ─── 유형 다중 선택 ───────────────────────────────────────── */
.tpspick {
  margin-top: 9px; background: #f2f5f4; border-radius: 9px;
  padding: 9px 11px; font-size: 12.5px; color: var(--muted); line-height: 1.6;
}
.tpspick b { color: var(--ink); font-weight: 700; }
.tpspick i {
  font-style: normal; font-size: 10.5px; font-weight: 800;
  background: var(--ink); color: #fff; border-radius: 4px;
  padding: 1px 5px; margin-left: 4px; vertical-align: 1px;
}
.mw .type .more {
  display: inline-block; font-size: 10.5px; font-weight: 800;
  background: #eef1f0; color: var(--muted);
  border-radius: 5px; padding: 1px 6px; margin-left: 5px; vertical-align: 1px;
}
.typelist { display: inline-flex; flex-wrap: wrap; gap: 5px; vertical-align: middle; }
.typelist .tp {
  font-size: 12px; font-weight: 700; color: #fff;
  border-radius: 6px; padding: 3px 9px;
}

/* ─── 사후관리 ─────────────────────────────────────────────── */
.fuprow {
  display: flex; gap: 9px; margin-top: 9px; padding-top: 8px;
  border-top: 1px dashed var(--line); font-size: 13px;
}
.fuprow > b { flex: none; width: 58px; font-size: 12px; font-weight: 700; color: var(--amber); }
.fuprow span { flex: 1; font-weight: 600; color: #26372F; line-height: 1.5; }
.fuprow i {
  font-style: normal; font-family: var(--mono); font-size: 11.5px;
  color: var(--muted); margin-left: 5px;
}
.fuprow em { display: block; font-style: normal; font-weight: 500; font-size: 12.5px; color: var(--muted); margin-top: 2px; }

/* ─── 엑셀 가져오기 ────────────────────────────────────────── */
.impnote {
  font-size: 12.5px; color: #384843; line-height: 1.65;
  background: var(--steel-soft); border-radius: 9px; padding: 10px 12px; margin-bottom: 12px;
}
.impnote b { color: var(--steel); }
.impcols {
  font-size: 11.5px; color: var(--muted); line-height: 1.6;
  padding: 0 3px 11px; margin-top: -6px;
}
.impcols b { color: #384843; }
.impsrc {
  margin-top: 5px; padding-top: 5px; border-top: 1px dashed var(--line);
  font-size: 11.5px; line-height: 1.6;
}
.impsrc i { font-style: normal; font-weight: 700; color: #384843; }
.impfile {
  display: flex; align-items: center; justify-content: center;
  border: 1.5px dashed var(--line); border-radius: 11px;
  padding: 18px 12px; margin-bottom: 13px; cursor: pointer;
  font-size: 13.5px; font-weight: 600; color: var(--muted); background: #fff;
  text-align: center; word-break: break-all;
}
.impfile:active { border-color: var(--steel); }
.impwait { font-size: 13px; color: var(--muted); padding: 10px 0; }
.imperr {
  font-size: 13px; color: var(--alert); background: #fbe9e5;
  border-radius: 9px; padding: 10px 12px; margin-top: 11px; line-height: 1.5;
}
.impsum {
  background: #f2f5f4; border-radius: 9px; padding: 10px 12px; margin-top: 12px;
  font-size: 12.5px; color: var(--muted); line-height: 1.6;
}
.impsum > b { display: block; font-size: 13.5px; color: var(--ink); margin-bottom: 3px; }
.impsum span { display: block; }
.impsum em { display: block; font-style: normal; color: var(--amber); margin-top: 3px; }
.impdone {
  background: var(--steel-soft); color: var(--steel); border-radius: 9px;
  padding: 11px 12px; margin-top: 10px; font-size: 13px; font-weight: 700; line-height: 1.6;
}
.impdone span { display: block; font-weight: 500; color: var(--muted); font-size: 11.5px; }
.improw { padding: 8px 0; border-bottom: 1px dashed var(--line); }
.improw .l1 { display: flex; align-items: center; gap: 7px; }
.improw .l1 b { font-size: 13.5px; }
.improw .st {
  font-size: 10.5px; font-weight: 800; border-radius: 5px; padding: 2px 6px;
  background: #eef1f0; color: var(--muted); flex: none;
}
.improw .st.new { background: var(--steel); color: #fff; }
.improw .l2 { font-size: 12px; color: var(--muted); margin-top: 3px; line-height: 1.45; }
.improw .l2.meal { color: var(--steel); font-weight: 600; }
.improw .l2.keep { color: var(--amber); font-weight: 600; }
.improw .st.keep { background: #f1ece0; color: var(--amber); }
.impsum em.impkeep {
  color: var(--amber); background: #f8f2e4; border-radius: 7px;
  padding: 7px 9px; margin-top: 6px; line-height: 1.6;
}
.impsum em.impkeep b { display: inline; font-size: inherit; color: #8a5a10; margin: 0; }

/* 식수 변경 이력 */
.loglinebox { padding: 9px 0; border-bottom: 1px dashed var(--line); }
.loglinebox .l1 { display: flex; align-items: center; gap: 7px; flex-wrap: wrap; }
.loglinebox .l1 b { font-size: 13.5px; }
.loglinebox .src {
  font-size: 10.5px; font-weight: 700; background: var(--steel-soft);
  color: var(--steel); border-radius: 5px; padding: 2px 6px;
}
.loglinebox .dt { margin-left: auto; font-family: var(--mono); font-size: 11px; color: var(--muted); }
.loglinebox .l2 { font-size: 12.5px; color: #26372F; margin-top: 3px; line-height: 1.5; }
.loglinebox .l3 { font-size: 11.5px; color: var(--muted); margin-top: 2px; }

/* ─── 주간 리포트 ──────────────────────────────────────────── */
.tabbar { grid-template-columns: repeat(5, 1fr); }
.tabbar button { font-size: 10.5px; }

.repctl { margin-bottom: 12px; }
.rephead { display: flex; align-items: center; gap: 9px; }
.rephead .btn { flex: none; }
.repweek {
  flex: 1; text-align: center; font-family: var(--mono);
  font-size: 13.5px; font-weight: 700; letter-spacing: -.3px;
}
.repsum {
  font-size: 12.5px; color: var(--muted); font-weight: 600;
  margin: 0 2px 10px;
}

.repcard {
  background: var(--card); border: 1px solid var(--line);
  border-radius: var(--r); padding: 13px; margin-bottom: 11px;
}
.rc-head { display: flex; align-items: baseline; flex-wrap: wrap; gap: 8px; }
.rc-name { font-size: 16px; font-weight: 800; letter-spacing: -.02em; }
.rc-name .rg {
  font-size: 10.5px; font-weight: 800; color: var(--steel);
  background: var(--steel-soft); border-radius: 5px; padding: 2px 6px; margin-right: 6px;
  vertical-align: 2px;
}
.rc-meta { font-size: 12.5px; color: var(--muted); }
.rc-stat {
  display: flex; gap: 12px; margin: 9px 0 4px; padding: 7px 10px;
  background: #f4f7f6; border-radius: 8px; font-size: 12px; color: var(--muted);
}
.rc-stat b { font-family: var(--mono); font-size: 13px; color: var(--ink); }
.rc-stat .good b { color: var(--steel); }
.rc-stat .bad b { color: var(--alert); }

.rc-day { display: flex; gap: 10px; padding: 8px 0; border-bottom: 1px dashed var(--line); }
.rc-day:last-child { border-bottom: 0; }
.rc-day.none { opacity: .45; padding: 4px 0; }
.rc-day .dt { flex: none; width: 54px; }
.rc-day .dt b { display: block; font-family: var(--mono); font-size: 12px; font-weight: 700; }
.rc-day .dt i { font-style: normal; font-size: 11px; color: var(--muted); }
.rc-day .dv { flex: 1; min-width: 0; }
.rc-day .no { font-size: 12px; color: var(--muted); }

.rc-item { padding: 2px 0 6px; }
.rc-item + .rc-item { border-top: 1px dotted var(--line); padding-top: 6px; }
.rc-item .ty { font-size: 12.5px; font-weight: 700; color: var(--steel); margin-bottom: 2px; }
.rc-item .ty .sat, .rc-item .ty .st {
  font-size: 10.5px; font-weight: 800; border-radius: 5px;
  padding: 1px 6px; margin-left: 5px; background: #eef1f0; color: var(--muted);
}
.rc-item .ty .sat.g { background: var(--steel-soft); color: var(--steel); }
.rc-item .ty .sat.b { background: #fbe9e5; color: var(--alert); }
.rc-item .ct { font-size: 13.5px; line-height: 1.5; }
.rc-item .ac { font-size: 12px; color: var(--muted); margin-top: 3px; line-height: 1.45; }
.rc-item .ac b { color: #384843; font-weight: 700; margin-right: 3px; }
.rc-item .ac.res b { color: var(--steel); }
.rc-item .ac.add b { color: var(--amber); }

.fuprow .satv {
  display: inline-block; font-size: 12px; font-weight: 800;
  background: #eef1f0; color: var(--muted);
  border-radius: 6px; padding: 2px 10px;
}
.fuprow .satv.g { background: var(--steel-soft); color: var(--steel); }
.fuprow .satv.b { background: #fbe9e5; color: var(--alert); }
.repweek { font-size: 12.5px; letter-spacing: -.5px; }

/* ─── 일별 기록 · 추가내용 ─────────────────────────────────── */
.rc-day.thin { padding: 4px 0; }
.rc-day.thin .dt { opacity: .5; }
.addday {
  border: 1px dashed var(--line); background: #fff; color: var(--muted);
  border-radius: 8px; padding: 5px 10px; font-size: 11.5px; font-weight: 700;
  cursor: pointer; margin-top: 3px;
}
.addday:active { border-color: var(--steel); color: var(--steel); }
.rc-item.entry { border-left: 3px solid var(--amber); padding-left: 8px; }
.rc-item .ty .st.ent { background: #f4eddc; color: var(--amber); }
.rc-item .ac i {
  font-style: normal; font-size: 10.5px; color: #9aa8a3; margin-left: 5px;
}
.rc-btns { display: flex; gap: 6px; margin-top: 5px; }
.mini {
  border: 1px solid var(--line); background: #fff; color: var(--muted);
  border-radius: 7px; padding: 4px 9px; font-size: 11px; font-weight: 700; cursor: pointer;
}
.mini:active { border-color: var(--steel); color: var(--steel); }

.adrow { padding: 8px 0; border-bottom: 1px dashed var(--line); }
.adrow .t { font-size: 13.5px; line-height: 1.5; white-space: pre-wrap; }
.adrow .m {
  display: flex; align-items: center; gap: 8px;
  font-size: 11.5px; color: var(--muted); margin-top: 3px;
}
.adrow .m .mini { margin-left: auto; }
.btn.danger-txt { color: var(--alert); }

.boardurl {
  font-family: var(--mono); font-size: 14px; font-weight: 700;
  background: var(--ink); color: #fff; border-radius: 9px;
  padding: 12px 13px; text-align: center; word-break: break-all;
}

/* ─── 노선별 묶음 ──────────────────────────────────────────── */
.routeblock { margin-bottom: 18px; }
.rb-head {
  background: var(--ink); color: #fff;
  border-radius: 12px 12px 0 0; padding: 12px 14px; margin-bottom: -1px;
}
.rb-name { font-size: 17px; font-weight: 800; letter-spacing: -.02em; }
.rb-name a { color: #8fd6c0; font-family: var(--mono); font-size: 14px; margin-left: 9px; }
.rb-meta { font-size: 12.5px; color: rgba(255,255,255,.62); margin-top: 3px; }
.rb-meta .cs {
  display: inline-block; font-size: 11px; font-weight: 800;
  background: rgba(255,255,255,.16); border-radius: 5px;
  padding: 2px 7px; margin-right: 7px;
}
.routeblock .repcard { border-radius: 0; margin-bottom: 0; border-top: 0; }
.routeblock .repcard:last-child { border-radius: 0 0 12px 12px; }
.boardsub {
  display: inline-block; font-family: var(--mono); font-size: 12px;
  background: #eef1f0; border-radius: 6px; padding: 3px 8px; word-break: break-all;
}

/* ─── 긴급 전달 ────────────────────────────────────────────── */
.btn.alertbtn { background: var(--alert); }
.listhead button + button { margin-left: 7px; }
.listhead .alertbtn { margin-left: auto; }
.listhead #prt { margin-left: 7px; }

.msgrow { padding: 9px 0; border-bottom: 1px dashed var(--line); }
.msgrow.off { opacity: .5; }
.msgrow .l1 { display: flex; align-items: center; gap: 8px; }
.msgrow .l1 b { font-size: 14px; flex: 1; }
.msgrow .lv {
  flex: none; font-size: 10.5px; font-weight: 800; border-radius: 5px;
  padding: 2px 7px; background: #eef1f0; color: var(--muted);
}
.msgrow .lv.u { background: var(--alert); color: #fff; }
.msgrow .lv.n { background: var(--steel); color: #fff; }
.msgrow .offtag { font-size: 11px; color: var(--muted); }
.msgrow .l2 { font-size: 11.5px; color: var(--muted); margin-top: 3px; line-height: 1.5; }

/* 넓은 화면에서 아래 탭도 가운데로 모읍니다 */
@media (min-width: 1100px) {
  .tabbar { left: 50%; transform: translateX(-50%); right: auto; width: 760px;
    border: 1px solid var(--line); border-bottom: 0; border-radius: 14px 14px 0 0; }
}
.msgrow .l1 b .fc {
  display: inline-block; font-size: 11.5px; font-weight: 800;
  background: var(--steel-soft); color: var(--steel);
  border-radius: 5px; padding: 2px 7px; margin-right: 5px; vertical-align: 1px;
}

/* ─── 추이 그래프 ──────────────────────────────────────────── */
.trendctl { display: flex; gap: 7px; margin-bottom: 10px; }
.trendctl .chip { flex: 1; text-align: center; padding: 9px 0; font-size: 13.5px; }

.trendcard { padding: 13px 11px; margin-bottom: 11px; }
.trendtop {
  display: flex; align-items: baseline; flex-wrap: wrap; gap: 6px 14px;
  padding: 0 3px 11px; border-bottom: 1px solid var(--line); margin-bottom: 11px;
}
.tt-period { font-size: 13.5px; font-weight: 800; letter-spacing: -.02em; }
.tt-nums { display: flex; gap: 14px; margin-left: auto; font-size: 12.5px; color: var(--muted); }
.tt-nums b { font-family: var(--mono); font-size: 18px; color: var(--ink); margin-left: 3px; }
.tt-nums .bl b { color: var(--amber); }
.tt-nums em {
  font-style: normal; font-size: 11.5px; font-weight: 700; margin-left: 4px; color: var(--muted);
}
.tt-nums em.up { color: var(--alert); }
.tt-nums em.down { color: var(--steel); }

/* 민원 유형별 건수·증감 표 — 가로로 밀어서 봅니다 */
.tthead {
  display: flex; align-items: baseline; flex-wrap: wrap; gap: 4px 10px;
  padding: 0 3px 9px; border-bottom: 1px solid var(--line); margin-bottom: 10px;
}
.tthead b { font-size: 13.5px; font-weight: 800; letter-spacing: -.02em; }
.tthead span { font-size: 11.5px; color: var(--muted); margin-left: auto; }
.ttcols { display: flex; gap: 6px; margin: 0 0 9px 3px; }
.chip.sm { padding: 5px 11px; font-size: 12px; }

.ttwrap { overflow-x: auto; -webkit-overflow-scrolling: touch; margin: 0 -3px; }
table.tttbl { border-collapse: collapse; width: 100%; font-size: 12.5px; }
.tttbl th, .tttbl td { border-bottom: 1px solid var(--line); padding: 7px 6px; text-align: center; white-space: nowrap; }
.tttbl thead th {
  font-size: 11px; font-weight: 700; color: var(--muted); background: var(--paper);
  border-bottom: 1.5px solid var(--line);
}
.tttbl thead th.now { color: var(--ink); background: var(--steel-soft); }
.tttbl thead th em {
  display: block; font-style: normal; font-size: 9.5px; font-weight: 600; color: #9aa6a2;
}
.tttbl th.ty {
  position: sticky; left: 0; z-index: 2; background: var(--card);
  text-align: left; font-weight: 600; min-width: 96px; max-width: 140px;
  white-space: normal; word-break: keep-all; line-height: 1.3;
}
.tttbl thead th.ty { background: var(--paper); }
.tttbl th.ty i {
  display: inline-block; width: 7px; height: 7px; border-radius: 2px;
  margin-right: 5px; vertical-align: 1px;
}
.tttbl td.v { font-family: var(--mono); font-size: 13px; min-width: 40px; }
.tttbl td.v i { color: #c2cbc8; font-style: normal; }
.tttbl td.v.u { color: var(--alert); font-weight: 700; background: #fbeeea; }
.tttbl td.v.d { color: var(--steel); font-weight: 700; background: #e9f2ef; }
.tttbl td.sm, .tttbl thead th.sm { font-family: var(--mono); font-weight: 700; background: #f6f8f7; }
/* 증감 칸은 오른쪽에 붙여 둡니다 — 옆으로 밀어도 늘었는지 줄었는지 늘 보입니다 */
.tttbl th.df, .tttbl td.df {
  position: sticky; right: 0; z-index: 2; min-width: 56px; background: var(--card);
  box-shadow: -7px 0 7px -7px rgba(0, 0, 0, .25);
}
.tttbl thead th.df { background: var(--paper); }
.tttbl tr.tot th, .tttbl tr.tot td {
  border-top: 1.5px solid var(--ink); border-bottom: none; font-weight: 800; padding-top: 9px;
}
.tttbl tr.tot td.df, .tttbl tr.tot td.sm { background: #f6f8f7; }
.dlt { font-size: 11.5px; font-weight: 700; }
.dlt.up { color: var(--alert); }
.dlt.down { color: var(--steel); }
.dlt.same { color: #a8b3b0; }
.ttfoot { font-size: 11px; color: var(--muted); line-height: 1.5; padding: 9px 3px 0; }

.chartbox { width: 100%; }
.chart-head {
  display: flex; align-items: center; flex-wrap: wrap; gap: 6px 12px;
  padding: 0 3px 8px; font-size: 13px;
}
.chart-head b { font-weight: 800; }
.chart-head .legend { display: flex; flex-wrap: wrap; gap: 10px; margin-left: auto; }
.chart-head .lg {
  display: inline-flex; align-items: center; gap: 5px;
  font-size: 11.5px; font-weight: 700; color: var(--muted);
}
.chart-head .lg i { width: 11px; height: 11px; border-radius: 3px; display: inline-block; }

.chart { width: 100%; height: auto; display: block; overflow: visible; }
.chart .g { stroke: var(--line); stroke-width: 1; }
.chart .ax { font-size: 10px; fill: var(--muted); font-family: var(--mono); }
.chart .val { font-size: 12px; font-weight: 800; font-family: var(--mono); }
.chart-empty { font-size: 13px; color: var(--muted); padding: 22px 0; text-align: center; }

/* ─── 일일보고 미리보기 ────────────────────────────────────── */
.dailyctl .dq { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 10px; }
.dailyctl .dq .chip { padding: 8px 12px; font-size: 13px; }
.dailyctl .daterow { display: flex; align-items: center; gap: 7px; margin-bottom: 10px; }
.dailyctl .daterow .i { flex: 1; }
.dailyctl .daterow .tilde { color: var(--muted); }

.dsum {
  display: flex; align-items: baseline; flex-wrap: wrap; gap: 4px 12px;
  padding: 2px 2px 9px; font-size: 13px;
}
.dsum b { font-family: var(--mono); font-size: 12.5px; }
.dsum span { color: var(--muted); margin-left: auto; }
.dsum em { font-style: normal; font-family: var(--mono); font-weight: 800; color: var(--ink); font-size: 15px; }
.dsum em.w { color: var(--alert); }

.dtblwrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }
.dtbl { width: 100%; border-collapse: collapse; min-width: 440px; }
.dtbl th, .dtbl td {
  border: 1px solid var(--line); padding: 7px 5px; text-align: center; font-size: 12.5px;
}
.dtbl th { background: #eef1f0; font-weight: 700; font-size: 11.5px; line-height: 1.3; word-break: keep-all; }
.dtbl td { font-family: var(--mono); color: #b3bfba; }
.dtbl td.h { color: var(--ink); font-weight: 800; font-size: 14px; }
.dtbl td.s { font-weight: 800; color: var(--ink); background: #f6f8f7; }
.dtbl td.dt { font-weight: 700; color: var(--ink); white-space: nowrap; }
.dtbl td.dt i { font-style: normal; color: var(--muted); font-weight: 500; margin-left: 4px; font-family: var(--sans); }
.dtbl tr.z td { color: #c9d1ce; }
.dtbl tr.t td { background: #eef1f0; font-weight: 800; color: var(--ink); }
.dnote { font-size: 11.5px; color: var(--muted); margin-top: 7px; line-height: 1.5; }

.dnhead {
  font-size: 12.5px; font-weight: 800; margin: 14px 0 4px;
  padding-top: 11px; border-top: 1px dashed var(--line);
}
.dnrow { padding: 7px 0; border-bottom: 1px dashed var(--line); }
.dnrow .l1 { display: flex; align-items: center; gap: 7px; flex-wrap: wrap; }
.dnrow .l1 .dd { font-family: var(--mono); font-size: 11.5px; color: var(--muted); }
.dnrow .l1 b { font-size: 13.5px; }
.dnrow .l1 .tt {
  font-size: 11px; font-weight: 700; color: var(--steel);
  background: var(--steel-soft); border-radius: 5px; padding: 2px 6px;
}
.dnrow .l2 { font-size: 13px; color: #384843; margin-top: 3px; line-height: 1.5; }
.dailyctl .daterow .i { min-width: 0; width: 100%; padding-left: 10px; padding-right: 8px; font-size: 14px; }
.dailyctl .daterow .tilde { flex: none; }

/* 용지 방향 선택 */
.orient { display: flex; align-items: center; gap: 7px; margin-top: 13px; padding-top: 12px; border-top: 1px dashed var(--line); }
.orient .lb { font-size: 12.5px; font-weight: 700; color: var(--muted); margin-right: auto; }
.orient .chip { display: inline-flex; align-items: center; gap: 7px; padding: 8px 13px; font-size: 13px; }
.orient .pg { display: inline-block; border: 1.6px solid currentColor; border-radius: 2px; opacity: .8; }
.orient .pg.portrait { width: 10px; height: 14px; }
.orient .pg.landscape { width: 14px; height: 10px; }

.impnote2 { font-size: 11.5px; color: var(--muted); line-height: 1.6; padding: 0 3px 9px; }
.impnote2 b { color: #384843; }
