/* Company web, Toss-style (D-B27). Users are 50-60: big bold type (18px body, 28px titles),
   56px controls, strong contrast, one filled button per block, icons always with words. */
@font-face {
  font-family: "Pretendard";
  src: url("/fonts/PretendardVariable.woff2") format("woff2-variations");
  font-weight: 45 920;
  font-display: swap;
}
:root {
  --bg: #f2f4f6;
  --card: #ffffff;
  --ink: #191f28;
  --ink2: #333d4b;
  --sub: #4e5968;
  --muted: #6b7684;
  --line: #e5e8eb;
  --line2: #d1d6db;
  --brand: #3182f6;
  --brand-d: #1b64da;
  --brand-ink: #ffffff;
  --soft: #e8f3ff;
  --ok: #0b8a4f;
  --ok-l: #e3f6ec;
  --warn: #b25a00;
  --warn-l: #fff2df;
  --bad: #e42939;
  --bad-l: #ffebee;
  --radius: 20px;
  --rc: 14px;
  --h: 56px;
  --hs: 48px;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
html, body { margin: 0; background: var(--bg); color: var(--ink); font: 18px/1.55 "Pretendard", -apple-system, "Apple SD Gothic Neo", "Malgun Gothic", system-ui, sans-serif; -webkit-font-smoothing: antialiased; word-break: keep-all; }
button, input, select, textarea { font: inherit; color: inherit; }
input[type="checkbox"], input[type="radio"] { accent-color: var(--brand); }
.boot { padding: 40px; text-align: center; color: var(--sub); }
h1, h2, h3, h4 { letter-spacing: -0.01em; }

/* ---- layout ---- */
.shell { display: grid; grid-template-columns: 264px minmax(0, 1fr); min-height: 100vh; }
.side { background: var(--card); border-right: 1px solid var(--line); padding: 18px 14px; display: flex; flex-direction: column; gap: 4px; position: sticky; top: 0; height: 100vh; overflow-y: auto; }
.side .logo { font-weight: 800; font-size: 24px; letter-spacing: -0.02em; padding: 2px 14px 18px; color: var(--ink); }
.brandmark { display: inline-flex; align-items: center; gap: 0.32em; vertical-align: middle; }
.brandmark img { display: block; height: 0.74em; width: auto; }
.brandmark .tag { font-weight: 800; font-size: 0.86em; line-height: 1; letter-spacing: -0.01em; color: #231815; }
.side .logo small { display: block; font-weight: 600; font-size: 15px; color: var(--muted); letter-spacing: 0; margin-top: 2px; }
.side button { all: unset; box-sizing: border-box; cursor: pointer; display: flex; align-items: center; gap: 12px; min-height: 56px; padding: 0 14px; border-radius: var(--rc); color: var(--sub); font-size: 19px; font-weight: 700; }
.side button .ic { width: 26px; height: 26px; flex: none; }
.side button .lb { flex: 1; }
.side button:hover { background: var(--bg); color: var(--ink); }
.side button[aria-current="page"] { background: var(--soft); color: var(--brand-d); }
.side button:focus-visible { outline: 3px solid #9cc3fb; outline-offset: 1px; }
.side .grow { flex: 1; min-height: 12px; }
.side .sub { font-size: 17px; min-height: 50px; }
.side .who { margin: 8px 0 4px; padding: 14px; border-radius: var(--rc); background: var(--bg); font-size: 15px; color: var(--sub); }
.side .who b, .side .who .role { display: block; }
.side .who b { font-size: 18px; color: var(--ink); }
.side .live { display: inline-flex; align-items: center; gap: 6px; margin-top: 4px; font-weight: 600; }
.side .live::before { content: ""; width: 9px; height: 9px; border-radius: 50%; background: var(--muted); }
.side .live.on { color: var(--ok); }
.side .live.on::before { background: #16b364; }
main { padding: 32px 40px 48px; min-width: 0; }
.topbar { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 22px; min-height: 56px; }
.topbar h1 { margin: 0; font-size: 30px; font-weight: 800; letter-spacing: -0.02em; }
.sitechip { display: inline-flex; align-items: center; gap: 8px; min-height: 48px; padding: 0 18px; border-radius: 999px; background: var(--card); font-weight: 700; color: var(--ink2); font-size: 17px; }
.sitechip select { min-height: 44px; border: 0; background-color: transparent; padding-left: 4px; font-weight: 700; }

.card { background: var(--card); border-radius: var(--radius); padding: 26px 28px; margin-bottom: 20px; }
.card h2 { margin: 0 0 16px; font-size: 23px; font-weight: 800; }
.card h3 { margin: 22px 0 12px; font-size: 19px; font-weight: 700; }
.card > :last-child { margin-bottom: 0; }
.row { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.head { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 16px; }
.head h2 { margin: 0; }
.muted { color: var(--sub); }
.small { font-size: 16px; }
.hint { color: var(--muted); font-size: 16px; margin: 12px 0 0; }

/* ---- controls ---- */
.btn { white-space: nowrap; display: inline-flex; align-items: center; justify-content: center; gap: 8px; text-decoration: none; min-height: var(--h); padding: 0 24px; border-radius: var(--rc); border: 0; background: var(--bg); color: var(--ink2); cursor: pointer; font-weight: 700; font-size: 18px; transition: background .12s; }
.btn:hover { background: var(--line); }
.btn.primary { background: var(--brand); color: var(--brand-ink); }
.btn.primary:hover { background: var(--brand-d); }
.btn.soft { background: var(--soft); color: var(--brand-d); }
.btn.soft:hover { background: #d4e7ff; }
.btn.danger { background: var(--bad-l); color: var(--bad); }
.btn.danger:hover { background: #ffd9de; }
.btn.slim { min-height: var(--hs); padding: 0 18px; font-size: 17px; border-radius: 12px; }
.btn:disabled { opacity: .4; cursor: default; }
.btn:focus-visible { outline: 3px solid #9cc3fb; outline-offset: 2px; }
.fld { display: flex; flex-direction: column; gap: 8px; min-width: 160px; }
.fld > span { font-size: 16px; color: var(--ink2); font-weight: 700; }
input, select, textarea { min-height: var(--h); border: 1.5px solid var(--line2); border-radius: var(--rc); padding: 0 16px; background: #fff; font-size: 18px; }
select { appearance: none; -webkit-appearance: none; padding-right: 46px; cursor: pointer; background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='20' height='20' viewBox='0 0 24 24' fill='none' stroke='%234e5968' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E") no-repeat right 16px center; }
textarea { padding: 14px 16px; min-height: 110px; resize: vertical; line-height: 1.5; }
input::placeholder, textarea::placeholder { color: #8b95a1; }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--brand); box-shadow: 0 0 0 3px rgba(49, 130, 246, .2); }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { min-height: var(--hs); padding: 0 18px; border-radius: 999px; border: 0; background: var(--bg); color: var(--ink2); cursor: pointer; font-weight: 700; font-size: 17px; }
.chip:hover { background: var(--line); }
.chip[aria-pressed="true"] { background: var(--brand); color: #fff; }

/* ---- board ---- */
.counts { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
.count { background: var(--bg); border-radius: 16px; padding: 16px 20px; font-size: 17px; font-weight: 700; color: var(--sub); }
.count b { display: block; font-size: 40px; line-height: 1.15; font-weight: 800; color: var(--ink); margin-top: 4px; }
.count:nth-child(1) b { color: var(--brand-d); }
.count:nth-child(2) b { color: var(--warn); }
.count:nth-child(3) b { color: var(--ok); }
.badge { display: inline-flex; align-items: center; min-height: 30px; padding: 0 10px; border-radius: 8px; font-size: 15px; font-weight: 700; background: var(--bg); color: var(--sub); white-space: nowrap; }
.badge.ok { background: var(--ok-l); color: var(--ok); }
.badge.warn { background: var(--warn-l); color: var(--warn); }
.badge.bad { background: var(--bad-l); color: var(--bad); }
.badge.blue { background: var(--soft); color: var(--brand-d); }
.badge.red { background: var(--bad); color: #fff; min-width: 26px; justify-content: center; border-radius: 999px; padding: 0 8px; min-height: 26px; font-size: 14px; }

/* ---- tables ---- */
table { width: 100%; border-collapse: collapse; }
th, td { text-align: left; padding: 14px 12px; border-bottom: 1px solid var(--line); vertical-align: middle; }
th { font-size: 15px; color: var(--muted); font-weight: 700; padding-top: 10px; padding-bottom: 10px; }
td { font-size: 17px; }
tbody tr:last-child td { border-bottom: 0; }
td.num, th.num { text-align: right; font-variant-numeric: tabular-nums; }
td.num .btn + .btn, td.num .btn + a.btn, td.num a.btn + .btn { margin-left: 6px; }
td.num { white-space: nowrap; }
td.nw { white-space: nowrap; }
.code { font-size: 20px; letter-spacing: .12em; font-family: ui-monospace, "SF Mono", Menlo, monospace; }
table.info th { width: 150px; color: var(--muted); font-size: 16px; font-weight: 600; }
table.info td { font-weight: 600; }
.menu { display: flex; flex-direction: column; gap: 10px; }
.menu .btn { justify-content: flex-start; min-height: 60px; font-size: 19px; }
.tablewrap { overflow-x: auto; }
.mark { font-size: 13px; font-weight: 700; padding: 2px 8px; border-radius: 6px; margin-left: 6px; }
.mark.manual { background: var(--warn-l); color: var(--warn); }

/* ---- chat (KakaoTalk-like, which users know) ---- */
.chat { display: grid; grid-template-columns: 320px minmax(0, 1fr); gap: 20px; min-height: 70vh; }
.rooms { display: flex; flex-direction: column; gap: 8px; }
.room { all: unset; box-sizing: border-box; cursor: pointer; display: grid; grid-template-columns: 1fr auto; align-items: center; gap: 4px 8px; padding: 16px 18px; border-radius: 16px; background: #fff; border: 2px solid transparent; }
.room:hover { border-color: var(--line); }
.room[aria-current="true"] { border-color: var(--brand); background: var(--soft); }
.room .t { font-weight: 800; font-size: 18px; }
.room .p { grid-column: 1 / -1; color: var(--sub); font-size: 16px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.thread { display: flex; flex-direction: column; background: #bacee0; border-radius: var(--radius); overflow: hidden; }
.msgs { flex: 1; overflow-y: auto; padding: 18px; display: flex; flex-direction: column; gap: 12px; max-height: 62vh; }
.msg { max-width: 72%; display: flex; flex-direction: column; gap: 4px; }
.msg .who { font-size: 15px; color: #253246; font-weight: 600; }
.msg .line { display: flex; align-items: flex-end; gap: 6px; }
.msg .bub { background: #fff; padding: 11px 15px; border-radius: 16px; white-space: pre-wrap; word-break: break-word; font-size: 18px; }
.msg.mine { align-self: flex-end; align-items: flex-end; }
.msg.mine .line { flex-direction: row-reverse; }
.msg.mine .bub { background: #fee500; }
.msg.notice .bub { background: #fff8d6; border: 2px solid #e0a800; }
.msg .meta { font-size: 13px; color: #34405a; display: flex; flex-direction: column; align-items: flex-end; }
.msg.mine .meta { align-items: flex-start; }
.msg .unread { color: #b07d00; font-weight: 800; }
.composer { display: flex; gap: 8px; padding: 12px; background: #fff; }
.composer input { flex: 1; min-width: 0; }

/* ---- login ---- */
.login { max-width: 480px; margin: 10vh auto; padding: 0 16px; }
.login .card { padding: 36px 32px; }
.login h1 { margin: 0 0 6px; font-size: 30px; font-weight: 800; }
.stack { display: flex; flex-direction: column; gap: 16px; }
.check { display: flex; gap: 12px; align-items: center; min-height: 56px; padding: 0 16px; border: 1.5px solid var(--line2); border-radius: var(--rc); cursor: pointer; font-weight: 600; }
.check input { width: 26px; height: 26px; min-height: 0; margin: 0; flex: none; }
/* sign-up (D-B28): two-choice buttons, links under the form */
.seg { display: grid; grid-template-columns: repeat(auto-fit, minmax(0, 1fr)); gap: 8px; }
.seg label { display: flex; align-items: center; justify-content: center; min-height: var(--h); border-radius: var(--rc); background: var(--bg); color: var(--ink2); font-weight: 700; cursor: pointer; text-align: center; padding: 0 10px; line-height: 1.25; }
.seg input { position: absolute; opacity: 0; pointer-events: none; }
.seg label:has(input:checked) { background: var(--soft); color: var(--brand-d); box-shadow: inset 0 0 0 2px var(--brand); }
.seg label:has(input:focus-visible) { outline: 3px solid #9cc3fb; outline-offset: 2px; }
.seg small { display: block; font-size: 14px; font-weight: 600; color: var(--muted); }
.links { display: flex; justify-content: center; gap: 6px; flex-wrap: wrap; margin-top: 4px; }
.links button { all: unset; box-sizing: border-box; cursor: pointer; display: inline-flex; align-items: center; min-height: 48px; padding: 0 14px; border-radius: 10px; color: var(--sub); font-weight: 700; font-size: 17px; }
.links button:hover { background: var(--bg); color: var(--ink); }
.links .dot { color: var(--line2); align-self: center; }
.err { color: var(--bad); margin: 0; font-weight: 600; }
.err:empty { display: none; }
.consent small { display: block; font-weight: 500; color: var(--muted); font-size: 15px; line-height: 1.4; }
.consent { padding: 12px 16px; align-items: flex-start; }
.consent input { margin-top: 2px; }

/* ---- dialog, toast ---- */
.dialog-back { position: fixed; inset: 0; background: rgba(0, 0, 0, .4); display: grid; place-items: center; z-index: 20; padding: 16px; }
.dialog { background: #fff; border-radius: 24px; padding: 30px 28px 24px; width: min(560px, 100%); max-height: 90vh; overflow: auto; }
.dialog h2 { margin: 0 0 18px; font-size: 24px; font-weight: 800; }
.dialog .row:last-child { margin-top: 24px !important; }
.dialog .row:last-child .btn { min-width: 110px; }
#toast { position: fixed; left: 50%; bottom: 32px; transform: translateX(-50%); background: rgba(25, 31, 40, .94); color: #fff; padding: 16px 24px; border-radius: 16px; font-size: 17px; font-weight: 600; opacity: 0; transition: opacity .2s; pointer-events: none; z-index: 40; max-width: 90vw; }
#toast.on { opacity: 1; }

/* ---- 운행일지 ledger: the demo's form (F-B12), Toss-style chrome ---- */
.ltool { display: flex; flex-wrap: wrap; gap: 18px 16px; align-items: flex-end; }
.ltool .period { flex-basis: 100%; }
.ltool .period input[type="date"] { min-width: 190px; }
.ltool select.big { min-width: 340px; max-width: 100%; font-size: 20px; font-weight: 700; }
.ltool .fld { max-width: 100%; }
.ltool .pdays { font-size: 18px; color: var(--sub); font-weight: 600; padding: 0 4px; }
.who-s { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 6px; }
.who-s .av { width: 44px; height: 44px; border-radius: 50%; background: var(--soft); color: var(--brand-d); display: grid; place-items: center; font-weight: 800; font-size: 19px; }
.who-s b { font-size: 21px; }
.who-s .muted { font-size: 17px; }
.lhead { display: flex; justify-content: space-between; align-items: center; gap: 12px 20px; flex-wrap: wrap; margin-bottom: 16px; }
.lhead .lsum, .lhead .who-s { margin: 0; }
.lhead .who-s { margin-left: auto; }
.lsum { margin: 0 0 16px; font-size: 18px; color: var(--sub); }
.lsum b { color: var(--ink); }
.lacts { gap: 8px; margin-bottom: 18px; }
.subbox { background: #f9fafb; border-radius: 16px; padding: 18px 20px; margin-bottom: 18px; }
.subbox h3 { margin: 0 0 12px; font-size: 19px; }
.ledger-h { text-align: center; font-weight: 800; font-size: 21px; padding: 14px 0; border-top: 2px solid var(--ink); border-bottom: 1px solid var(--line2); margin: 0 0 10px; }
table.lg { border-collapse: collapse; font-size: 15px; min-width: 1120px; }
table.lg th, table.lg td { border: 1px solid var(--line); padding: 8px 6px; text-align: center; white-space: nowrap; font-size: 15px; }
table.lg thead th { background: var(--bg); color: var(--ink2); font-weight: 700; }
table.lg tbody tr:last-child td { border-bottom: 1px solid var(--line); }
table.lg td.d { background: #fff; position: sticky; left: 0; z-index: 1; font-weight: 700; text-align: left; padding-left: 12px; }
table.lg tr.sub td { background: var(--ok-l); font-weight: 800; }
table.lg tr.today td { background: var(--soft); }
table.lg .has { cursor: pointer; }
table.lg tr.has:hover td { background: #f9fafb; }
table.lg tr.sel td, table.lg th.sel { box-shadow: inset 0 2px 0 var(--brand), inset 0 -2px 0 var(--brand); }
table.lg tr.sel td.d { box-shadow: inset 2px 2px 0 var(--brand), inset 0 -2px 0 var(--brand); }
table.lg td.na { color: #b0b8c1; }
table.lg td.src { text-align: left; white-space: normal; min-width: 130px; }
table.lg .badge { min-height: 24px; font-size: 13px; padding: 0 7px; border-radius: 6px; }
table.lg td.ed { cursor: text; }
table.lg td.ed:hover { background: #fff7db !important; box-shadow: inset 0 0 0 2px #f5b301; }
table.lg td.editing { padding: 2px; }
table.lg td.ed { height: 48px; min-width: 64px; }
table.lg .cellin { width: 72px; min-height: 44px; padding: 0 4px; font-size: 17px; text-align: center; border-radius: 8px; border: 2px solid var(--brand); }
table.lg tr.edrow td { background: #fffbe8; text-align: left; white-space: normal; position: static; padding: 12px 14px; }
table.lg tr.edrow .chip { min-height: 44px; padding: 0 14px; font-size: 16px; background: #fff; }
table.lg tr.edrow input { min-height: 44px; font-size: 16px; }
table.lg tr.edrow .btn.slim { min-height: 44px; }
.mono { font-variant-numeric: tabular-nums; }
.detail { background: #f9fafb; border-radius: 18px; padding: 20px 22px; margin: 18px 0; box-shadow: inset 0 0 0 2px var(--brand); }
.detail h3 { margin: 0; font-size: 20px; }
.detail table { background: #fff; border-radius: 12px; margin-top: 12px; }
.addbox { background: #fff; border-radius: 14px; padding: 16px 18px; }
.addbox h4 { font-size: 18px; }
.nx { display: block; font-size: 12px; color: var(--warn); font-weight: 800; line-height: 1.1; }

/* ---- 의견 남기기 (D-B24) ---- */
body.nfpick main, body.nfpick main * { cursor: crosshair !important; }
.nfhl { outline: 3px dashed #f5b301 !important; outline-offset: -2px; }
.side .nfbtn[aria-pressed="true"] { background: #ffe58a; color: #5c4400; }
.nfbar { position: fixed; left: 50%; top: 14px; transform: translateX(-50%); z-index: 30; background: #ffd43b; color: #191f28; border-radius: 999px; padding: 8px 8px 8px 24px; font-weight: 800; font-size: 18px; box-shadow: 0 8px 24px rgba(0, 0, 0, .16); display: flex; gap: 14px; align-items: center; max-width: calc(100% - 24px); }
.nfbar .btn { background: rgba(255, 255, 255, .7); min-height: 44px; }
.anc { font-size: 16px; color: var(--sub); background: var(--bg); border-radius: 12px; padding: 10px 14px; margin: 0; overflow-wrap: anywhere; }
.nflist { display: flex; flex-direction: column; gap: 10px; }
.nfitem { background: #f9fafb; border-radius: 16px; padding: 14px 16px; display: flex; flex-direction: column; gap: 6px; }
.nfreply { background: var(--ok-l); border-radius: 10px; padding: 10px 12px; font-size: 16px; }

/* ---- foldable sidebar: a rail of icons with short words ---- */
.side .sfold { align-self: flex-end; min-height: 48px; padding: 0 14px; font-size: 15px; font-weight: 700; color: var(--muted); gap: 4px; }
.side .sfold .ic { width: 20px; height: 20px; }
@media (min-width: 901px) {
  .shell.folded { grid-template-columns: 96px minmax(0, 1fr); }
  .shell.folded .side { padding: 14px 8px; }
  .shell.folded .side .logo, .shell.folded .side .who, .shell.folded .side .sub { display: none; }
  .shell.folded .side button { flex-direction: column; justify-content: center; gap: 4px; min-height: 72px; padding: 6px 4px; font-size: 14px; text-align: center; }
  .shell.folded .side button .lb { flex: none; }
  .shell.folded .side button .badge { position: absolute; margin: -40px 0 0 34px; }
  .shell.folded .side .sfold { align-self: stretch; min-height: 48px; flex-direction: row; }
}

@media (max-width: 900px) {
  .shell { grid-template-columns: 1fr; }
  /* the menu is two even rows (pages; 의견·연결 상태·로그아웃) instead of wrapping into three or four */
  .side { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 4px; padding: 8px; position: static; height: auto; overflow: visible; border-right: 0; border-bottom: 1px solid var(--line); }
  .side .logo, .side .grow, .side .sfold { display: none; }
  .side button { position: relative; flex-direction: column; justify-content: center; gap: 2px; min-height: 64px; padding: 6px 4px; font-size: 15px; line-height: 1.25; text-align: center; }
  .side button .lb { flex: none; }
  .side button .ic { width: 24px; height: 24px; }
  .side .sub { min-height: 56px; font-size: 14px; }
  .side button .badge { position: absolute; top: 4px; right: 6px; }
  .side .who { display: flex; align-items: center; justify-content: center; margin: 0; padding: 4px; background: none; font-size: 14px; text-align: center; }
  .side .who b, .side .who .role { display: none; }
  .side .live { margin: 0; flex-direction: column; gap: 4px; line-height: 1.25; }
  body.ops .side .who { display: none; }
  main { padding: 20px 16px 40px; }
  .fsv { padding: 14px 12px 20px; }
  .dialog { padding: 24px 18px 20px; }
  .counts { grid-template-columns: repeat(2, 1fr); }
  .chat { grid-template-columns: 1fr; }
  .msg { max-width: 88%; }
}

/* ops 이동 지도 (2026-11-08): map + list of people, coloured line per person, details on hover */
.daymap { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 20px; align-items: stretch; }
.daymap .card { margin-bottom: 0; }
.mapbox { padding: 0; overflow: hidden; position: relative; min-height: 560px; isolation: isolate; }
#dmap { position: absolute; inset: 0; }
.mapempty { position: absolute; inset: 0; display: grid; place-content: center; text-align: center; background: rgba(255,255,255,.75); z-index: 500; font-weight: 700; font-size: 20px; color: var(--sub); }
.who-list { max-height: calc(100vh - 230px); min-height: 560px; overflow-y: auto; }
.wrow { all: unset; box-sizing: border-box; cursor: pointer; display: grid; grid-template-columns: 16px 1fr auto; gap: 10px; align-items: center; width: 100%; min-height: 48px; padding: 10px 10px; border-radius: 12px; }
.wrow:hover, .wrow.hl { background: var(--bg); }
.wrow i { width: 16px; height: 16px; border-radius: 50%; }
.wrow .km { font-weight: 700; color: var(--sub); font-variant-numeric: tabular-nums; }
.wrow .badge { min-height: 24px; font-size: 13px; padding: 0 6px; }
.leaflet-tooltip.maptip { padding: 10px 12px; border-radius: 12px; border: 0; box-shadow: 0 4px 18px rgba(0,0,0,.18); font: 15px/1.5 "Pretendard", system-ui, sans-serif; color: var(--ink); }
.tipcard b { font-size: 17px; }
.tipcard span { color: var(--sub); font-weight: 600; }
.tipcard .on { color: var(--ok); font-size: 15px; }
.tipcard .dim { color: var(--muted); font-size: 14px; }
.mapname span { display: inline-block; transform: translate(-50%, -38px); white-space: nowrap; background: #fff; border: 2px solid; border-radius: 999px; padding: 1px 8px; font: 700 13px/1.4 "Pretendard", system-ui, sans-serif; color: var(--ink); box-shadow: 0 1px 4px rgba(0,0,0,.15); }
@media (max-width: 1000px) { .daymap { grid-template-columns: 1fr; } .who-list { min-height: 0; } }

/* 의견 4: typed but unsaved ledger cells, and wrong ones */
table.lg td.pend { background: #fff7db !important; font-weight: 700; }
table.lg td.bad { background: var(--bad-l) !important; color: var(--bad); font-weight: 800; box-shadow: inset 0 0 0 2px var(--bad); }
table.lg tr.edrow .chip[aria-pressed="true"] { background: var(--brand); color: #fff; }
/* 의견 3: saved log viewer */
.dialog.wide { width: min(1400px, 96vw); max-height: 92vh; }
.savedlist { max-height: 360px; overflow-y: auto; }

/* board 호차별: 지시 취소 + 대신 출발 stack when the card is narrow (D-B37) */
td.num .btns { display: flex; flex-wrap: wrap; gap: 6px; justify-content: flex-end; }
td.num .btns .btn + .btn { margin-left: 0; }

/* 상황판 의견 5-6 (2026-11-08): 소집 응답 counts + groups, 작업 지시 card */
.ctiles { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; margin-bottom: 12px; }
.ctiles .t { background: var(--bg); border-radius: 14px; padding: 10px 12px; font-size: 15px; font-weight: 700; color: var(--sub); }
.ctiles .t b { display: block; font-size: 28px; line-height: 1.2; color: var(--ink); }
.ctiles .t.bad b { color: var(--bad); } .ctiles .t.warn b { color: var(--warn); } .ctiles .t.ok b { color: var(--ok); }
.crow { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 10px 0; border-bottom: 1px solid var(--line); flex-wrap: wrap; }
.crow .who { display: flex; flex-direction: column; }
.crow .btns { display: flex; gap: 6px; flex-wrap: wrap; }
table.wo td { vertical-align: top; }
table.wo .badge { min-height: 26px; font-size: 14px; }
.wo-memo { margin-top: 4px; color: var(--brand-d); font-weight: 600; white-space: normal; }
.bad-text { margin-top: 4px; color: var(--bad); font-weight: 600; white-space: normal; }

/* 상황판 2026-11-08: essentials first (map, 소집 응답, 작업 지시, 인원); 크게 보기 opens a fullscreen view */
/* 의견 11: a taller map row; 작업 지시 scrolls inside with a slim scrollbar */
.bgrid { display: grid; grid-template-columns: minmax(0, 1.55fr) minmax(360px, 1fr); gap: 20px; align-items: stretch; margin-bottom: 20px; height: clamp(600px, 72vh, 820px); }
.bgrid > .card, .bcol > .card { margin-bottom: 0; }
.bcol { display: flex; flex-direction: column; gap: 20px; }
.mapcard { display: flex; flex-direction: column; }
.mapcard .mapwrap { flex: 1; min-height: 320px; } /* 의견 9: the map card ends where 작업 지시 ends */
.bcol { min-height: 0; }
.bcol #b-callout { flex: none; max-height: 55%; overflow-y: auto; }
.bcol #b-work { flex: 1; min-height: 0; display: flex; flex-direction: column; }
.wlist { flex: 1; min-height: 0; overflow-y: auto; padding-right: 6px; margin-right: -6px; }
.wlist, .bcol #b-callout, .fslist { scrollbar-width: thin; scrollbar-color: #c9cfd6 transparent; }
.wlist::-webkit-scrollbar, .bcol #b-callout::-webkit-scrollbar, .fslist::-webkit-scrollbar { width: 6px; }
.wlist::-webkit-scrollbar-thumb, .bcol #b-callout::-webkit-scrollbar-thumb, .fslist::-webkit-scrollbar-thumb { background: #c9cfd6; border-radius: 3px; }
.mapwrap { position: relative; border-radius: 16px; overflow: hidden; background: var(--bg); isolation: isolate; } /* Leaflet panes (z 400+) stay inside, under dialogs and the fullscreen view */
.mapwrap > div:first-child { position: absolute; inset: 0; }
.fsbtn { all: unset; box-sizing: border-box; cursor: pointer; display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-height: 48px; min-width: 48px; padding: 0 14px; border-radius: 12px; color: var(--sub); font-weight: 700; font-size: 16px; background: var(--bg); }
.fsbtn:disabled { opacity: .6; cursor: progress; }
.fsbtn:hover { background: var(--line); color: var(--ink); }
.fsbtn:focus-visible { outline: 3px solid #9cc3fb; outline-offset: 2px; }
.morelink { all: unset; box-sizing: border-box; cursor: pointer; display: block; width: 100%; min-height: 48px; text-align: center; margin-top: 10px; padding: 12px; border-radius: 12px; color: var(--brand-d); font-weight: 700; background: var(--soft); }
.wrow2 { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 10px 0; border-bottom: 1px solid var(--line); }
.wrow2:last-of-type { border-bottom: 0; }
.wrow2 .badge { min-height: 24px; font-size: 13px; padding: 0 7px; }
.wrow2 .num { white-space: nowrap; }
.wrow2 .btns { display: flex; gap: 6px; flex-wrap: wrap; justify-content: flex-end; }
.pgroups { display: flex; flex-direction: column; gap: 10px; }
.pg { display: flex; gap: 12px; align-items: baseline; flex-wrap: wrap; }
.pg .badge { min-width: 92px; justify-content: center; }
.pg .pn { font-size: 17px; color: var(--ink2); }
.fsv { position: fixed; inset: 0; z-index: 15; background: var(--bg); display: flex; flex-direction: column; padding: 20px 28px 24px; overflow: auto; }
.fsv:focus, .dialog:focus { outline: none; }
.fshead { display: flex; align-items: center; gap: 10px 16px; flex-wrap: wrap; margin-bottom: 18px; }
.fshead h2 { margin: 0; font-size: 28px; font-weight: 800; }
.fshead .btn { margin-left: auto; }
.fsbody { flex: 1; display: flex; flex-direction: column; min-height: 0; }
.fsmap { flex: 1; display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 20px; min-height: 560px; }
.fsmap .mapwrap { min-height: 560px; }
.fslist { margin: 0; overflow-y: auto; }
.fs3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; }
.fs3 > .card { margin: 0; }
.mapdepot span { display: inline-block; transform: translate(-50%, -50%); background: var(--ink); color: #fff; border-radius: 8px; padding: 3px 8px; font: 700 13px/1.4 "Pretendard", system-ui, sans-serif; white-space: nowrap; }
.tipcard .warnc { color: var(--warn); }
@media (max-width: 1100px) { .bgrid, .fsmap, .fs3 { grid-template-columns: 1fr; } .bgrid { height: auto; } .mapcard .mapwrap { min-height: 360px; } .bcol #b-callout { max-height: none; } }

/* 운행일지 반영 (D-B44) */
.reviewbar { display: flex; justify-content: space-between; align-items: center; gap: 14px; flex-wrap: wrap; margin-top: 16px; padding: 14px 18px; border-radius: 16px; background: var(--warn-l); }
.reviewbar b { font-size: 18px; color: var(--warn); }
table.rv select { min-width: 150px; min-height: 46px; font-size: 16px; }
table.rv input[data-f="start"], table.rv input[data-f="end"] { width: 92px; min-height: 46px; text-align: center; font-size: 17px; }
table.rv input[type="checkbox"] { width: 24px; height: 24px; min-height: 0; }
table.rv tr.bad td { background: var(--bad-l); }
table.rv tr.bad input { border-color: var(--bad); }

/* 의견 10: 저장된 운행일지 — 저장한 때 first and readable */
.savedlist td.when { white-space: nowrap; }
.savedlist td.when b { display: block; font-size: 18px; color: var(--ink); }
.savedlist td.when span { font-size: 17px; color: var(--ink2); font-weight: 600; }

/* 운행일지 반영: overlap confirmation */
.ovbox { background: var(--bg); border-radius: 14px; padding: 12px 14px; }
table.ov th { text-align: left; font-size: 14px; padding: 8px 6px 4px; }
table.ov td { padding: 6px; font-size: 16px; }
table.ov tr.old td { color: var(--bad); text-decoration: line-through; }
table.ov tr.new td { color: var(--ok); font-weight: 700; }

/* ~400 px wide phones and narrow windows */
@media (max-width: 600px) {
  .card { padding: 20px 16px; }
  .ltool .fld { flex: 1 1 100%; min-width: 0; }
  .ltool select.big { min-width: 0; width: 100%; }
  .ltool .period input[type="date"] { min-width: 0; flex: 1 1 140px; }
  .fshead h2 { font-size: 24px; }
}

/* review 익일: a visible word in a big tap area */
.nxchk { display: inline-flex; align-items: center; gap: 8px; min-height: 48px; padding: 0 12px; border-radius: 12px; cursor: pointer; font-weight: 700; white-space: nowrap; }
.nxchk:hover { background: var(--bg); }

/* keyboard focus where all: unset removed the outline; ledger cells and date rows take the keyboard */
.room:focus-visible, .wrow:focus-visible, .morelink:focus-visible, .links button:focus-visible, .chip:focus-visible { outline: 3px solid #9cc3fb; outline-offset: 2px; }
table.lg td.ed:focus-visible, table.lg td.d:focus-visible, table.lg th[data-act]:focus-visible { outline: 3px solid var(--brand); outline-offset: -3px; }
table.lg td.d[data-act] { cursor: pointer; }

/* a button whose request is running (ui.js busy) */
[aria-busy="true"] { cursor: progress; }
.btn[aria-busy="true"]:disabled { opacity: .7; }
.btn[aria-busy="true"]::after, .fsbtn[aria-busy="true"]::after { content: ""; flex: none; width: 16px; height: 16px; border-radius: 50%; border: 2.5px solid currentColor; border-right-color: transparent; animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .btn[aria-busy="true"]::after, .fsbtn[aria-busy="true"]::after { animation: none; opacity: .5; } }
/* N-B11: a further piece of the same day (paper form: an extra row under the date) */
table.lg tr.more td { border-top: 1px dashed var(--line); }
table.lg tr.sel.more td { box-shadow: inset 0 -2px 0 var(--brand); }
/* D-B52: season 상시대기 8 h that the ledger adds by itself */
table.lg td.auto8 { color: var(--brand); }
.detail .standby { justify-content: space-between; align-items: center; gap: 12px; margin: 12px 0 0; padding: 12px 14px; background: var(--bg); border-radius: 12px; }
