:root {
  --bg: #f3f5f8; --card: #fff; --line: #e2e7ee; --line2: #cfd7e2; --fg: #18212d; --mute: #687485; --navy: #123a6b; --navy2: #1d4f8f;
  --sky: #e8f0fb; --red: #c9302c; --redbg: #fde9e8; --amb: #9a6400; --ambbg: #fff3d1; --grn: #1b7f47; --grnbg: #e2f4e9;
  --blu: #1f5fc4; --blubg: #e5eeff; --gray: #eef1f5; --side: 216px; --top: 56px;
  --head: #f0f4f9; --rn: #f6f8fb; --gl: #edf0f4; --soft: #f8fbfe; --alt: #f7f8fa; --hover: #f5f8fc; --calc: #fdf7f2; --calch: #fbeee4;
  --calcfg: #6b4b2d; --fg2: #3a4656; --selbg: #dfe9fb; --dash: #a9bbd3; --todaybg: #fff6e6; --toastbg: #1d2836; --ing: #fff7cc; --topbg: #123a6b;
  color-scheme: light;
  font-family: Pretendard, "Malgun Gothic", "Apple SD Gothic Neo", system-ui, sans-serif;
}
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
body { background: var(--bg); color: var(--fg); font-size: 14px; }
button, input, select { font: inherit; color: inherit; }
a { color: var(--blu); }
[hidden] { display: none !important; }

/* ---------- 위 막대 */
.top { position: fixed; inset: 0 0 auto 0; height: var(--top); background: var(--topbg); color: #fff; display: flex; align-items: center; gap: 14px; padding: 0 16px; z-index: 30; }
.brand { display: flex; align-items: center; gap: 10px; color: #fff; text-decoration: none; font-weight: 700; font-size: 17px; white-space: nowrap; }
.brand img { height: 22px; filter: brightness(0) invert(1); }
.menu-btn { display: none; background: none; border: 0; color: #fff; font-size: 22px; width: 40px; height: 40px; cursor: pointer; }
.find { position: relative; flex: 1; max-width: 560px; margin-left: 12px; }
.find input { width: 100%; height: 38px; border-radius: 19px; border: 0; padding: 0 16px 0 40px; background: rgba(255,255,255,.14) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='18' height='18' fill='none' stroke='%23fff' stroke-width='2'%3E%3Ccircle cx='8' cy='8' r='6'/%3E%3Cpath d='M13 13l4 4'/%3E%3C/svg%3E") no-repeat 14px 50%; color: #fff; outline: none; }
.find input::placeholder { color: rgba(255,255,255,.7); }
.find input:focus { background-color: #fff; color: var(--fg); background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='18' height='18' fill='none' stroke='%23687485' stroke-width='2'%3E%3Ccircle cx='8' cy='8' r='6'/%3E%3Cpath d='M13 13l4 4'/%3E%3C/svg%3E"); }
.find-pop { position: absolute; top: 44px; left: 0; right: 0; background: var(--card); color: var(--fg); border-radius: 12px; box-shadow: 0 12px 40px rgba(16,30,54,.25); max-height: 70vh; overflow: auto; padding: 6px; }
.find-pop .grp { font-size: 12px; color: var(--mute); padding: 8px 10px 4px; font-weight: 600; }
.find-pop .hit { display: block; width: 100%; text-align: left; border: 0; background: none; padding: 8px 10px; border-radius: 8px; cursor: pointer; }
.find-pop .hit:hover, .find-pop .hit.on { background: var(--sky); }
.find-pop .hit b { color: var(--navy); }
.find-pop .none { padding: 14px; color: var(--mute); }
.me { margin-left: auto; display: flex; gap: 12px; align-items: center; font-size: 13px; white-space: nowrap; }
.me a { color: rgba(255,255,255,.8); }

/* ---------- 왼쪽 메뉴 */
.shell { display: flex; padding-top: var(--top); height: 100%; }
.side { width: var(--side); flex: none; background: var(--card); border-right: 1px solid var(--line); overflow-y: auto; padding: 12px 10px 24px; }
.side .who { display: flex; align-items: center; gap: 8px; width: 100%; border: 0; background: none; padding: 10px 10px; font-weight: 700; font-size: 15px; cursor: pointer; border-radius: 8px; }
.side .who .dot { width: 10px; height: 10px; border-radius: 3px; }
.side .who .car { margin-left: auto; color: var(--mute); transition: transform .15s; }
.side .grp.closed .car { transform: rotate(-90deg); }
.side .grp.closed .items { display: none; }
.side .items { display: flex; flex-direction: column; gap: 2px; margin: 0 0 10px 0; }
.side .items a { display: flex; align-items: center; gap: 8px; padding: 9px 12px 9px 28px; border-radius: 8px; text-decoration: none; color: var(--fg); font-size: 14px; }
.side .items a:hover { background: var(--gray); }
.side .items a.on { background: var(--sky); color: var(--navy); font-weight: 700; }
.side .items a .n:empty { display: none; }
.side .items a .n { margin-left: auto; font-size: 11px; background: var(--gray); color: var(--mute); border-radius: 10px; padding: 1px 7px; }
.side .items a.on .n { background: var(--card); }
.side hr { border: 0; border-top: 1px solid var(--line); margin: 10px 6px; }
.side .tool { display: block; width: 100%; text-align: left; border: 0; background: none; padding: 9px 12px; border-radius: 8px; cursor: pointer; color: var(--mute); }
.side .tool:hover { background: var(--gray); color: var(--fg); }

main { flex: 1; min-width: 0; overflow: auto; padding: 18px 22px 40px; }
main.sheet-mode { overflow: hidden; display: flex; flex-direction: column; padding-bottom: 12px; }
h1.page { font-size: 21px; margin: 0; display: flex; align-items: center; gap: 10px; }
h1.page .who { font-size: 13px; font-weight: 600; color: var(--mute); background: var(--card); border: 1px solid var(--line); border-radius: 20px; padding: 2px 10px; }
.page-head { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 14px; }
.page-head .sp { flex: 1; }
.muted { color: var(--mute); }

/* ---------- 단추 */
.btn { display: inline-flex; align-items: center; gap: 6px; height: 36px; padding: 0 14px; border-radius: 8px; border: 1px solid var(--line2); background: var(--card); cursor: pointer; font-weight: 600; font-size: 13.5px; white-space: nowrap; text-decoration: none; color: var(--fg); }
.btn:hover { border-color: var(--navy2); }
.btn.primary { background: var(--navy); color: #fff; border-color: var(--navy); }
.btn.primary:hover { background: var(--navy2); }
.btn.danger { color: var(--red); }
.btn.danger.fill { background: var(--red); color: #fff; border-color: var(--red); }
.btn.ok { background: var(--grn); border-color: var(--grn); color: #fff; }
.btn.sm { height: 30px; padding: 0 10px; font-size: 12.5px; }
.btn.big { height: 48px; font-size: 16px; width: 100%; justify-content: center; }
.btn:disabled { opacity: .45; cursor: default; }
.chips { display: flex; gap: 6px; flex-wrap: wrap; }
.chip { height: 32px; padding: 0 12px; border-radius: 16px; border: 1px solid var(--line2); background: var(--card); cursor: pointer; font-size: 13px; }
.chip.on { background: var(--navy); color: #fff; border-color: var(--navy); }
.chip .c { opacity: .7; margin-left: 4px; font-size: 12px; }
select.sel, input.box { height: 36px; border: 1px solid var(--line2); border-radius: 8px; padding: 0 10px; background: var(--card); }
input.box { width: 180px; }

/* ---------- 표 */
.toolbar { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-bottom: 10px; }
.toolbar .sp { flex: 1; }
.grid-host { flex: 1; min-height: 0; background: var(--card); border: 1px solid var(--line); border-radius: 10px; overflow: hidden; display: flex; }
.grid-wrap { position: relative; overflow: auto; flex: 1; }
table.grid { border-collapse: separate; border-spacing: 0; table-layout: fixed; width: max-content; font-size: 13px; }
table.grid th, table.grid td { border-right: 1px solid var(--gl); border-bottom: 1px solid var(--gl); height: 30px; padding: 0 6px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
table.grid thead th { position: sticky; top: 0; z-index: 3; background: var(--head); font-weight: 600; font-size: 12px; color: var(--fg2); cursor: pointer; height: 34px; border-bottom: 1px solid var(--line2); user-select: none; }
table.grid thead th.calc { background: var(--calch); }
table.grid th.rn, table.grid td.rn { position: sticky; left: 0; z-index: 2; background: var(--rn); color: var(--mute); text-align: center; font-size: 11px; cursor: pointer; padding: 0; }
table.grid thead th.rn { z-index: 4; }
table.grid td.cell { cursor: cell; }
table.grid td.num { text-align: right; font-variant-numeric: tabular-nums; }
table.grid td.calc { background: var(--calc); color: var(--calcfg); }
table.grid tr.alt td.cell { background: var(--alt); }
table.grid tr.cur td.rn { background: var(--navy); color: #fff; }
table.grid tr.sel td { background: var(--selbg) !important; }
table.grid tr.hl td.cell { animation: hl 2.4s ease-out; }
@keyframes hl { 0%, 40% { background: #ffe58a; } 100% { } }
table.grid tr.done td.cell { color: #8a94a3; }
table.grid tr.newrow td { background: var(--soft); }
table.grid tr.newrow td.rn { color: var(--navy2); font-size: 14px; }
table.grid td.act { outline: 2px solid var(--navy2); outline-offset: -2px; }
.grid-ed { position: absolute; z-index: 5; border: 2px solid var(--navy2); padding: 0 5px; font-size: 13px; outline: none; background: var(--card); border-radius: 0; box-shadow: 0 2px 8px rgba(29,79,143,.2); }
.grid-ed.num { text-align: right; }
.grid-ed.ro { background: var(--calc); border-color: #c9a27d; }
td.red, .red { color: var(--red); }
td.bold { font-weight: 700; }
td.bg-red { background: var(--redbg) !important; color: var(--red); font-weight: 700; }
td.bg-amb { background: var(--ambbg) !important; color: var(--amb); font-weight: 700; }
td.bg-grn { background: var(--grnbg) !important; color: var(--grn); }
td.bad { background: #ffe1e1 !important; text-decoration: underline wavy var(--red); }
td.note { color: #a32d38; }
.selbar { display: flex; gap: 8px; align-items: center; background: var(--navy); color: #fff; border-radius: 10px; padding: 6px 8px 6px 14px; }
.selbar .btn { height: 30px; }
.statusline { font-size: 12px; color: var(--mute); margin-top: 6px; display: flex; gap: 16px; flex-wrap: wrap; }
.statusline kbd { background: var(--card); border: 1px solid var(--line2); border-bottom-width: 2px; border-radius: 4px; padding: 0 5px; font-family: inherit; font-size: 11px; }

/* ---------- 현황판 */
.tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 12px; margin-bottom: 16px; }
.tile { background: var(--card); border: 1px solid var(--line); border-radius: 12px; padding: 14px 16px; cursor: pointer; text-align: left; }
.tile:hover { border-color: var(--navy2); }
.tile .k { font-size: 12.5px; color: var(--mute); font-weight: 600; }
.tile .v { font-size: 28px; font-weight: 800; margin-top: 4px; font-variant-numeric: tabular-nums; }
.tile .v small { font-size: 13px; font-weight: 600; color: var(--mute); margin-left: 3px; }
.tile.red .v { color: var(--red); } .tile.amb .v { color: var(--amb); } .tile.blu .v { color: var(--blu); }
.cols2 { display: grid; grid-template-columns: minmax(0, 1fr) 360px; gap: 16px; align-items: start; }
.panel { background: var(--card); border: 1px solid var(--line); border-radius: 12px; padding: 14px 16px; margin-bottom: 16px; }
.panel h2 { font-size: 15px; margin: 0 0 10px; display: flex; align-items: center; gap: 8px; }
.panel h2 .sp { flex: 1; }
.panel h2 .c { font-size: 12px; color: var(--mute); font-weight: 600; }
.drop { border: 2px dashed var(--dash); border-radius: 12px; padding: 18px; text-align: center; background: var(--soft); color: var(--fg2); cursor: pointer; transition: .15s; }
.drop b { color: var(--navy); font-size: 15px; }
.drop.over { background: var(--sky); border-color: var(--navy2); }
.drop .s { font-size: 12.5px; color: var(--mute); margin-top: 4px; }
.log { margin-top: 10px; font-size: 13px; display: flex; flex-direction: column; gap: 3px; max-height: 220px; overflow: auto; }
.log .e { color: var(--red); } .log .ok { color: var(--grn); }
.todo { display: flex; flex-direction: column; gap: 6px; }
.todo .t { display: flex; gap: 10px; align-items: flex-start; padding: 9px 10px; border-radius: 8px; background: var(--gray); cursor: pointer; font-size: 13px; line-height: 1.45; border: 0; text-align: left; width: 100%; }
.todo .t:hover { background: var(--sky); }
.todo .t .ic { flex: none; width: 22px; height: 22px; border-radius: 6px; display: grid; place-items: center; font-size: 12px; font-weight: 800; color: #fff; }
.todo .t.r .ic { background: var(--red); } .todo .t.a .ic { background: #d49a00; } .todo .t.b .ic { background: var(--blu); } .todo .t.g .ic { background: #7a8698; }
.todo .empty { color: var(--mute); padding: 8px 2px; }
.bls { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 12px; }
.blc { background: var(--card); border: 1px solid var(--line); border-radius: 12px; padding: 13px 14px 12px; cursor: pointer; display: flex; flex-direction: column; gap: 8px; position: relative; }
.blc:hover { border-color: var(--navy2); box-shadow: 0 4px 14px rgba(18,58,107,.08); }
.blc .h { display: flex; align-items: baseline; gap: 8px; }
.blc .no { font-weight: 800; font-size: 15.5px; color: var(--navy); letter-spacing: .2px; }
.blc .port { margin-left: auto; font-size: 12px; color: var(--mute); white-space: nowrap; }
.blc .mat { font-size: 13px; color: var(--fg2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cns { display: flex; flex-wrap: wrap; gap: 4px; }
.cn { font-size: 11px; padding: 2px 6px; border-radius: 5px; background: var(--gray); color: var(--fg2); font-variant-numeric: tabular-nums; }
.cn.out { background: var(--blubg); color: var(--blu); } .cn.in { background: var(--grnbg); color: var(--grn); } .cn.bad { background: var(--redbg); color: var(--red); }
.badges { display: flex; gap: 5px; flex-wrap: wrap; }
.bdg { font-size: 11.5px; font-weight: 700; padding: 2px 8px; border-radius: 10px; background: var(--gray); color: var(--fg2); }
.bdg.r { background: var(--redbg); color: var(--red); } .bdg.a { background: var(--ambbg); color: var(--amb); } .bdg.g { background: var(--grnbg); color: var(--grn); } .bdg.b { background: var(--blubg); color: var(--blu); }
.prog { height: 6px; border-radius: 3px; background: var(--gray); overflow: hidden; }
.prog i { display: block; height: 100%; background: var(--grn); }
.prog.part i { background: #d49a00; }
.blc .foot { display: flex; align-items: center; gap: 8px; font-size: 12px; color: var(--mute); }
.blc .foot .sp { flex: 1; }
.jobs .day { font-size: 12.5px; font-weight: 700; color: var(--mute); margin: 10px 0 6px; }
.jobs .day:first-child { margin-top: 0; }
.job { display: flex; gap: 8px; align-items: center; padding: 7px 0; border-bottom: 1px dashed var(--line); font-size: 13px; }
.job:last-child { border-bottom: 0; }
.job .k { flex: none; font-size: 11px; font-weight: 700; padding: 2px 7px; border-radius: 5px; background: var(--gray); }
.k-수입, .k-유리 { background: #e3eefc !important; color: #1f5fc4; } .k-원자재 { background: #efe6fb !important; color: #6b3fb0; }
.k-수출 { background: #e2f4e9 !important; color: #1b7f47; } .k-LCL { background: #fff0db !important; color: #a35b00; }
.job .m { min-width: 0; flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.job .st { font-size: 11.5px; color: var(--mute); }

/* ---------- 세아 진행판 */
.bks { display: flex; flex-direction: column; gap: 10px; }
.bk { background: var(--card); border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px; display: grid; grid-template-columns: 92px minmax(0, 1fr) auto; gap: 14px; align-items: center; }
.bk .d { text-align: center; border-right: 1px solid var(--line); padding-right: 12px; }
.bk .d .dd { font-size: 20px; font-weight: 800; color: var(--navy); }
.bk .d .dw { font-size: 12px; color: var(--mute); }
.bk .d .dday { font-size: 11.5px; font-weight: 700; margin-top: 2px; }
.bk .t1 { font-weight: 800; color: var(--navy); font-size: 15px; display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.bk .t2 { font-size: 13px; color: var(--fg2); margin-top: 3px; }
.bk .t3 { margin-top: 6px; }

/* ---------- 오른쪽 서랍 (BL 상세) */
.drawer-bg { position: fixed; inset: 0; background: rgba(13,25,44,.35); z-index: 40; }
.drawer { position: fixed; top: 0; right: 0; bottom: 0; width: min(620px, 100%); background: var(--card); z-index: 41; overflow-y: auto; box-shadow: -10px 0 40px rgba(0,0,0,.18); padding: 18px 20px 40px; }
.drawer .dh { display: flex; align-items: center; gap: 10px; margin-bottom: 4px; }
.drawer .dh h2 { margin: 0; font-size: 20px; color: var(--navy); }
.drawer .dh .x { margin-left: auto; border: 0; background: var(--gray); width: 36px; height: 36px; border-radius: 18px; font-size: 18px; cursor: pointer; }
.drawer h3 { font-size: 14px; margin: 18px 0 8px; display: flex; align-items: center; gap: 8px; }
.drawer h3 .sp { flex: 1; }
.kv { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 6px 14px; font-size: 13px; }
.kv div span { color: var(--mute); font-size: 12px; display: block; }
.doc { display: grid; grid-template-columns: 22px 130px minmax(0, 1fr) auto; gap: 8px; align-items: center; padding: 8px 6px; border-bottom: 1px solid var(--line); font-size: 13px; border-radius: 6px; }
.doc.over { background: var(--sky); }
.doc .ck { width: 20px; height: 20px; border-radius: 6px; border: 2px solid var(--line2); display: grid; place-items: center; font-size: 12px; color: #fff; }
.doc.has .ck { background: var(--grn); border-color: var(--grn); }
.doc.miss .nm { color: var(--red); font-weight: 700; }
.doc .fs { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.doc .fs a { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-size: 12.5px; }
.doc .fs .f { display: flex; gap: 6px; align-items: center; min-width: 0; }
.doc .fs .f button { border: 0; background: none; color: var(--mute); cursor: pointer; padding: 0 2px; }
.mini { width: 100%; border-collapse: collapse; font-size: 12.5px; }
.mini th, .mini td { border-bottom: 1px solid var(--line); padding: 6px 5px; text-align: left; white-space: nowrap; }
.mini th { color: var(--mute); font-weight: 600; font-size: 12px; }
.hist { font-size: 12.5px; display: flex; flex-direction: column; gap: 4px; }
.hist div { color: var(--fg2); } .hist b { color: var(--fg); } .hist span { color: var(--mute); }

.toast { position: fixed; left: 50%; bottom: 26px; transform: translateX(-50%); background: var(--toastbg); color: #fff; padding: 11px 18px; border-radius: 10px; z-index: 60; font-size: 14px; box-shadow: 0 8px 24px rgba(0,0,0,.25); max-width: 90vw; }
.toast.err { background: var(--red); }
.modal-bg { position: fixed; inset: 0; background: rgba(13,25,44,.4); z-index: 50; display: grid; place-items: center; padding: 16px; }
.modal { background: var(--card); border-radius: 14px; padding: 20px; width: min(760px, 100%); max-height: 86vh; overflow: auto; }
.modal h2 { margin: 0 0 12px; font-size: 18px; }
.modal .acts { display: flex; gap: 8px; justify-content: flex-end; margin-top: 14px; }

/* ---------- 로그인 */
.login-body { display: grid; place-items: center; min-height: 100%; background: linear-gradient(160deg, #123a6b, #1d4f8f 60%, #2b6cb0); padding: 16px; }
.login { width: min(380px, 100%); background: var(--card); border-radius: 16px; padding: 28px 26px; display: flex; flex-direction: column; gap: 12px; box-shadow: 0 20px 60px rgba(0,0,0,.25); }
.login-logo { height: 26px; align-self: flex-start; }
.login h1 { margin: 6px 0 0; font-size: 24px; color: var(--navy); }
.login .sub { margin: 0 0 8px; color: var(--mute); }
.login label { display: flex; flex-direction: column; gap: 5px; font-size: 13px; font-weight: 600; color: var(--fg2); }
.login input { height: 46px; border: 1px solid var(--line2); border-radius: 10px; padding: 0 12px; font-size: 16px; }
.login-err { background: var(--redbg); color: var(--red); padding: 9px 12px; border-radius: 8px; font-size: 13px; }
.login .hint { font-size: 12.5px; color: var(--mute); margin: 4px 0 0; line-height: 1.6; }


/* ---------- BL 현황 (왼쪽 목록 · 오른쪽 내용) */
.lxh { display: grid; grid-template-columns: 330px minmax(0, 1fr); gap: 16px; align-items: start; }
.lxl { position: sticky; top: 0; background: var(--card); border: 1px solid var(--line); border-radius: 12px; padding: 12px; display: flex; flex-direction: column; gap: 8px; max-height: calc(100vh - var(--top) - 36px); }
.lxr { min-width: 0; }
.seg3 { display: grid; grid-template-columns: repeat(3, 1fr); background: var(--gray); border-radius: 9px; padding: 3px; gap: 3px; }
.seg3 button { height: 30px; border: 0; border-radius: 7px; background: none; cursor: pointer; font-weight: 600; color: var(--mute); }
.seg3 button.on { background: var(--card); color: var(--navy); box-shadow: 0 1px 3px rgba(0,0,0,.12); }
.seg { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; }
.seg button { height: 36px; border-radius: 8px; border: 1px solid var(--line2); background: var(--card); cursor: pointer; font-weight: 600; }
.seg button.on { background: var(--navy); color: #fff; border-color: var(--navy); }
.seg button span { opacity: .7; font-weight: 500; margin-left: 2px; }
.lxl > * { flex: none; }
.lxl > .lst { flex: 1 1 auto; }
.lst { overflow-y: auto; min-height: 120px; flex: 1; margin: 0 -6px; padding: 0 6px; }
.li { display: flex; gap: 10px; padding: 10px 8px; border-radius: 9px; cursor: pointer; border-bottom: 1px solid var(--line); align-items: flex-start; }
.li:hover { background: var(--hover); }
.li.on { background: var(--sky); box-shadow: inset 3px 0 0 var(--navy); }
.li input { margin-top: 3px; width: 17px; height: 17px; flex: none; }
.li .lm { min-width: 0; flex: 1; }
.li .l1 { display: flex; gap: 5px; align-items: center; flex-wrap: wrap; }
.li .l1 b { font-size: 14px; color: var(--navy); margin-right: auto; }
.li .l2 { font-size: 12px; color: var(--mute); margin-top: 3px; line-height: 1.4; overflow: hidden; text-overflow: ellipsis; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.dayh { font-size: 12px; font-weight: 700; color: var(--mute); padding: 10px 8px 4px; position: sticky; top: 0; background: var(--card); z-index: 1; }
.dayh.today { color: var(--red); }
.bh { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.bh .sp { flex: 1; }
.blno { margin: 0; font-size: 21px; color: var(--navy); letter-spacing: .3px; }
.kv.edit { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 8px 10px; }
.kv.edit label { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.kv.edit label span { font-size: 11.5px; color: var(--mute); }
.kv.edit input { height: 34px; border: 1px solid var(--line); border-radius: 7px; padding: 0 8px; background: var(--soft); min-width: 0; width: 100%; transition: background .3s; }
.kv.edit input:focus { outline: 2px solid var(--navy2); outline-offset: -1px; background: var(--card); border-color: transparent; }
.kv.edit input.saved { background: var(--grnbg); }
.row2 { display: flex; gap: 10px; flex-wrap: wrap; }
.row2 label { display: flex; flex-direction: column; gap: 4px; font-size: 12.5px; color: var(--mute); font-weight: 600; }
.mail { border: 1px solid var(--line); border-radius: 10px; margin-top: 12px; overflow: hidden; }
.mail .subj { padding: 8px 12px; background: var(--rn); border-bottom: 1px solid var(--line); display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.mail .body { padding: 12px; overflow-x: auto; background: #fff; color: #000; }  /* 메일에 붙는 모양 그대로(항상 흰 바탕) */
.grid-host.sub { height: 340px; flex: none; }
p.ok, .ok { color: var(--grn); }
/* ---------- 세아 붙여넣기 */
.sk-paste { padding: 12px; }
.pbox { min-height: 54px; max-height: 180px; overflow: auto; border: 2px dashed var(--dash); border-radius: 10px; padding: 12px 14px; background: var(--soft); font-size: 13px; white-space: pre-wrap; outline: none; }
.pbox:focus { border-color: var(--navy2); background: var(--card); }
.pbox:empty::before { content: attr(data-ph); color: var(--mute); }
.ord { border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; margin-top: 8px; }
.ord .oh { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-bottom: 8px; }
.ord .oh .sp { flex: 1; }
.week { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 8px; }
.wd { background: var(--soft); border-radius: 9px; padding: 8px; min-height: 90px; display: flex; flex-direction: column; gap: 5px; }
.wd.today { background: var(--todaybg); box-shadow: inset 0 0 0 1px var(--amb); }
.wd .wh { font-weight: 700; font-size: 13px; } .wd .wh span { color: var(--mute); font-weight: 500; }
.wb { border: 1px solid var(--line); background: var(--card); border-radius: 7px; padding: 5px 7px; text-align: left; cursor: pointer; display: flex; flex-direction: column; font-size: 12px; }
.wb:hover { border-color: var(--navy2); }
.wb b { color: var(--navy); font-size: 12.5px; } .wb span { color: var(--mute); }
@media (max-width: 900px) {
  .lxh { grid-template-columns: minmax(0, 1fr); }
  .lxl { position: static; max-height: 46vh; }
  .week { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

/* ---------- 폰 */
@media (max-width: 900px) {
  .cols2 { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 760px) {
  :root { --top: 54px; }
  .menu-btn { display: block; }
  .brand { display: none; }
  .me span { display: none; }
  .find { margin-left: 0; }
  .side { position: fixed; top: var(--top); bottom: 0; left: 0; z-index: 25; width: 260px; transform: translateX(-100%); transition: transform .2s; box-shadow: 8px 0 30px rgba(0,0,0,.15); }
  .side.open { transform: none; }
  main { padding: 14px 12px 30px; }
  .bk { grid-template-columns: 70px minmax(0, 1fr); }
  .bk .acts { grid-column: 1 / -1; }
  table.grid th, table.grid td { height: 38px; font-size: 14px; }
  .grid-ed { font-size: 16px; }
  input.box { width: 130px; }
  .doc { grid-template-columns: 22px 100px minmax(0, 1fr); }
  .doc .up { grid-column: 2 / -1; }
}

/* ---------- 환영 화면 (로그인 직후 한 번) — 움직임은 transform·opacity만 써서 버벅임 없게 */
.intro { position: fixed; inset: 0; z-index: 100; background: radial-gradient(ellipse at 50% 42%, #12376a 0%, #081a36 55%, #040c1c 100%); color: #e8f1ff; display: grid; place-items: center; overflow: hidden; cursor: pointer; animation: iIn .5s ease-out both; }
.intro .i-grid { position: absolute; inset: -50%; background-image: linear-gradient(rgba(110,170,255,.07) 1px, transparent 1px), linear-gradient(90deg, rgba(110,170,255,.07) 1px, transparent 1px); background-size: 46px 46px; transform: perspective(600px) rotateX(58deg) translateY(10%); animation: iGrid 6s linear infinite; mask-image: radial-gradient(ellipse at 50% 40%, #000 20%, transparent 60%); -webkit-mask-image: radial-gradient(ellipse at 50% 40%, #000 20%, transparent 60%); }
.intro .i-scan { position: absolute; left: 0; right: 0; height: 120px; top: -120px; background: linear-gradient(transparent, rgba(120,190,255,.12), transparent); animation: iScan 2.4s ease-in-out .2s 2; }
.intro .i-core { position: absolute; top: 50%; left: 50%; width: 360px; height: 360px; margin: -300px 0 0 -180px; display: grid; place-items: center; }
.i-hud { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; }
.i-hud circle { fill: none; stroke: #6fb4ff; transform-origin: 100px 100px; }
.i-hud .r1 { stroke-width: .6; stroke-dasharray: 2 6; opacity: .55; animation: iSpin 14s linear infinite, iRing .9s ease-out both; }
.i-hud .r2 { stroke-width: 2.2; stroke-dasharray: 90 40 20 40; opacity: .85; animation: iSpinR 7s linear infinite, iRing .9s .1s ease-out both; filter: drop-shadow(0 0 4px #4aa3ff); }
.i-hud .r3 { stroke-width: 1; stroke-dasharray: 4 3; opacity: .6; animation: iSpin 10s linear infinite, iRing .9s .2s ease-out both; }
.i-hud .r4 { stroke-width: 3; stroke-dasharray: 60 254; stroke: #9fd0ff; opacity: .9; animation: iSpin 2.2s linear infinite, iRing .9s .3s ease-out both; filter: drop-shadow(0 0 6px #6fb4ff); }
.i-hud .dot { fill: #bfe0ff; stroke: none; animation: iPulse 1.6s ease-in-out infinite; filter: drop-shadow(0 0 10px #8cc8ff); }
.i-logo { width: 150px; filter: brightness(0) invert(1) drop-shadow(0 0 12px rgba(120,190,255,.6)); opacity: 0; animation: iUp .7s .5s ease-out forwards; }
.intro .i-text { position: relative; margin-top: 260px; text-align: center; padding: 0 20px; max-width: 760px; }
.i-sys { font-size: 12.5px; letter-spacing: 4px; color: #7fb6f0; opacity: 0; animation: iUp .6s .35s ease-out forwards; }
.i-hi { font-size: clamp(26px, 4.6vw, 44px); font-weight: 300; margin-top: 12px; opacity: 0; animation: iUp .7s .6s ease-out forwards; }
.i-hi b { font-weight: 800; background: linear-gradient(90deg, #ffffff, #9fd0ff); -webkit-background-clip: text; background-clip: text; color: transparent; }
.i-cheer { font-size: clamp(16px, 2.2vw, 21px); color: #bcd8f7; margin-top: 10px; opacity: 0; animation: iUp .7s .95s ease-out forwards; }
.i-boot { margin: 22px auto 0; display: inline-flex; flex-direction: column; gap: 6px; text-align: left; font-size: 13.5px; color: #a9c6e8; min-height: 110px; }
.i-boot div { opacity: 0; transform: translateX(-10px); animation: iLine .35s ease-out forwards; }
.i-boot i { font-style: normal; color: #55e39b; margin-right: 8px; font-weight: 800; }
.i-boot b { color: #fff; } .i-boot b.warn { color: #ffb4a8; }
.i-quote { margin-top: 18px; font-size: 14.5px; color: #d6e7fb; opacity: 0; animation: iUp .7s 2.7s ease-out forwards; }
.i-quote span { display: block; font-size: 11px; letter-spacing: 3px; color: #7fb6f0; margin-bottom: 4px; }
.i-skip { position: absolute; right: max(18px, env(safe-area-inset-right, 0px)); bottom: max(18px, env(safe-area-inset-bottom, 0px)); background: rgba(255,255,255,.08); border: 1px solid rgba(255,255,255,.18); color: #cfe3fa; border-radius: 20px; padding: 8px 16px; cursor: pointer; }
.intro.out { animation: iOut .8s cubic-bezier(.6, 0, .4, 1) forwards; pointer-events: none; }
.intro.out .i-core { animation: iZoom .8s cubic-bezier(.6, 0, .4, 1) forwards; }
.intro.out .i-text { animation: iFade .4s ease-in forwards; }
body.intro-on .shell, body.intro-on .top { opacity: 0; }
body.intro-done .shell, body.intro-done .top { animation: iEnter .7s .15s cubic-bezier(.2, .7, .2, 1) both; }
.intro.calm, .intro.calm * { animation-duration: .01s !important; animation-delay: 0s !important; }
.intro.calm.out { animation: iOut .4s ease forwards !important; }
@keyframes iIn { from { opacity: 0; } }
@keyframes iGrid { to { background-position: 0 46px, 0 0; } }
@keyframes iScan { 0% { transform: translateY(0); } 100% { transform: translateY(calc(100vh + 240px)); } }
@keyframes iSpin { to { transform: rotate(360deg); } }
@keyframes iSpinR { to { transform: rotate(-360deg); } }
@keyframes iRing { from { opacity: 0; transform: scale(.6); } }
@keyframes iPulse { 50% { opacity: .35; transform: scale(1.5); } }
@keyframes iUp { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
@keyframes iLine { to { opacity: 1; transform: none; } }
@keyframes iOut { to { opacity: 0; } }
@keyframes iZoom { to { transform: scale(5); opacity: 0; } }
@keyframes iFade { to { opacity: 0; transform: translateY(-10px); } }
@keyframes iEnter { from { opacity: 0; transform: scale(.97); } to { opacity: 1; transform: none; } }
.quote-line { font-size: 13px; color: var(--mute); margin: -4px 0 14px; display: flex; gap: 8px; align-items: baseline; }
.quote-line b { color: var(--navy); font-size: 11.5px; letter-spacing: 1px; white-space: nowrap; }
@media (max-width: 760px) { .intro .i-core { width: 260px; height: 260px; margin: -250px 0 0 -130px; } .intro .i-text { margin-top: 210px; } .i-logo { width: 120px; } }

/* ---------- 블랙 테마 */
:root[data-theme="dark"] {
  --bg: #0e1116; --card: #161b22; --line: #262d37; --line2: #36404d; --fg: #e6ebf1; --fg2: #c2cad5; --mute: #8b96a5; --navy: #7fb2ff; --navy2: #9cc3ff;
  --sky: #1c2a3f; --red: #ff7b72; --redbg: #3a1d1d; --amb: #e3b341; --ambbg: #3a2f12; --grn: #56d364; --grnbg: #143222; --blu: #79b8ff; --blubg: #172a45;
  --gray: #1f252e; --head: #1b222c; --rn: #151a21; --gl: #232a33; --soft: #131820; --alt: #18202a; --hover: #1d2530; --calc: #241d16; --calch: #2d2218;
  --calcfg: #e0b98d; --selbg: #22385a; --dash: #3d5170; --todaybg: #2a2414; --toastbg: #2b3542; --ing: #3a3410; --topbg: #0b1424;
  color-scheme: dark;
}
:root[data-theme="dark"] .btn.primary, :root[data-theme="dark"] .chip.on, :root[data-theme="dark"] .seg button.on, :root[data-theme="dark"] .selbar { background: #2f6fd6; border-color: #2f6fd6; color: #fff; }
:root[data-theme="dark"] .seg3 button.on { background: var(--card); }
:root[data-theme="dark"] table.grid tr.cur td.rn { background: #2f6fd6; }
:root[data-theme="dark"] .grid-ed { background: #0e1116; color: var(--fg); }
:root[data-theme="dark"] .login-logo, :root[data-theme="dark"] img.dk { filter: brightness(0) invert(1); }
:root[data-theme="dark"] select.sel, :root[data-theme="dark"] input.box, :root[data-theme="dark"] .kv.edit input { background: var(--soft); color: var(--fg); }
.theme-btn { background: rgba(255,255,255,.12); border: 0; color: #fff; width: 36px; height: 36px; border-radius: 18px; cursor: pointer; font-size: 16px; }

/* ---------- 제이디 배차현황 */
table.grid tr.ing td.cell { background: var(--ing); }
table.grid tr.paid td.rn { box-shadow: inset 3px 0 0 var(--grn); }
.sumbar { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 10px; margin-bottom: 10px; }
.sumbar div { background: var(--card); border: 1px solid var(--line); border-radius: 10px; padding: 8px 12px; display: flex; flex-direction: column; }
.sumbar span { font-size: 11.5px; color: var(--mute); font-weight: 600; }
.sumbar b { font-size: 19px; font-variant-numeric: tabular-nums; }
.sumbar small { font-size: 11px; color: var(--mute); }
@media (max-width: 760px) { .sumbar { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

/* ---------- 메뉴 순서 바꾸기 */
.side .mv { margin-left: auto; display: inline-flex; gap: 3px; }
.side .mv button { border: 1px solid var(--line2); background: var(--card); color: var(--fg); border-radius: 6px; width: 28px; height: 26px; cursor: pointer; font-size: 11px; padding: 0; }
.side .mv button:hover { border-color: var(--navy2); }
.side .it { display: flex; align-items: center; gap: 6px; padding: 6px 6px 6px 28px; font-size: 13.5px; }
.side.editing .grp { border: 1px dashed var(--line2); border-radius: 10px; margin-bottom: 8px; padding-bottom: 4px; }
.side .grp.hid { opacity: .45; }
.side .tool.on { color: var(--grn); font-weight: 700; }

/* ---------- 월마감 · 대조 */
.warnlist { max-height: 46vh; overflow: auto; font-size: 13px; line-height: 1.75; }
.warnlist div { padding: 2px 0; border-bottom: 1px dashed var(--line); }
.invrow { display: grid; grid-template-columns: 1fr auto; gap: 2px 12px; padding: 12px 14px; margin: 8px 0; border: 1px solid var(--line2); border-radius: 10px; text-decoration: none; color: inherit; background: var(--card); }
.invrow:hover { border-color: var(--navy2); background: var(--soft); }
.invrow b { font-size: 15px; } .invrow span { grid-column: 1; font-size: 12px; color: var(--mute); }
.invrow i { grid-row: 1 / span 2; grid-column: 2; align-self: center; font-style: normal; font-weight: 700; font-size: 17px; font-variant-numeric: tabular-nums; }
.chkwrap { overflow: auto; max-height: 60vh; border: 1px solid var(--line); border-radius: 8px; }
table.chk { border-collapse: collapse; width: 100%; font-size: 13px; }
table.chk th { position: sticky; top: 0; background: var(--head); text-align: left; padding: 7px 10px; font-size: 12px; white-space: nowrap; }
table.chk td { padding: 6px 10px; border-top: 1px solid var(--line); white-space: nowrap; }
table.chk td.num { text-align: right; font-variant-numeric: tabular-nums; }
.tags { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 10px; }
.tag2 { border: 1px solid var(--line2); border-radius: 8px; padding: 6px 10px; font-size: 13px; background: var(--soft); }

/* ---------- 체크박스 칸 · 완료한 줄 */
table.grid td.check { text-align: center; cursor: pointer; padding: 0; }
table.grid td.check .cb { display: inline-flex; align-items: center; justify-content: center; width: 20px; height: 20px; border: 2px solid var(--line2); border-radius: 5px; background: var(--card); font-size: 14px; line-height: 1; color: #fff; vertical-align: middle; }
table.grid td.check:hover .cb { border-color: var(--grn); }
table.grid td.check .cb.on { background: var(--grn); border-color: var(--grn); }
table.grid tr.fin td.cell { background: var(--grnbg); color: var(--fg2); }
table.grid tr.fin td.rn { box-shadow: inset 3px 0 0 var(--grn); }

/* ---------- 날짜 범위 고르기 */
.range { display: inline-flex; align-items: center; gap: 4px; }
.range .box { width: 138px; padding: 0 8px; }
.range i { font-style: normal; color: var(--mute); }
.range .x { height: 28px; width: 28px; border-radius: 14px; border: 1px solid var(--line2); background: var(--card); color: var(--mute); cursor: pointer; }
.range .x:hover { color: var(--red); border-color: var(--red); }
@media (max-width: 760px) { .range .box { width: 124px; } }
