/* 서울전자 업무시스템 — 작업지시서 느낌의 차분한 업무 화면 */
:root {
  --bg: #f3f5f7; --surface: #fff; --ink: #18212b; --muted: #5d6a77; --line: #dde3e9;
  --accent: #1f5fbf; --accent-soft: #e5edfa; --ok: #23804a; --ok-soft: #e2f2e8;
  --warn: #a86a00; --warn-soft: #fbf0d9; --bad: #b4382a; --bad-soft: #f9e4e1;
  --font: "Malgun Gothic", "Apple SD Gothic Neo", "Noto Sans KR", sans-serif;
}
* { box-sizing: border-box; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 14px/1.55 var(--font); }
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
.top { background: var(--ink); color: #fff; display: flex; align-items: center; gap: 18px; padding: 0 20px; height: 52px; position: sticky; top: 0; z-index: 10; }
.top .brand { font-weight: 700; letter-spacing: .02em; color: #fff; }
.top nav { display: flex; gap: 4px; flex-wrap: wrap; }
.top nav a { color: #cfd8e2; padding: 6px 10px; border-radius: 6px; }
.top nav a.on, .top nav a:hover { background: #2c3a48; color: #fff; text-decoration: none; }
.top .me { margin-left: auto; color: #cfd8e2; font-size: 13px; display: flex; gap: 10px; align-items: center; }
.top .me form { margin: 0; }
.top .me button { background: none; border: 1px solid #4a5a6a; color: #cfd8e2; border-radius: 6px; padding: 3px 8px; cursor: pointer; }
main { max-width: 1240px; margin: 0 auto; padding: 22px 20px 60px; display: grid; gap: 18px; }
h1 { font-size: 22px; margin: 0; }
h2 { font-size: 16px; margin: 0 0 10px; }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: 10px; padding: 16px 18px; min-width: 0; }
.grid { display: grid; gap: 14px; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); }
.grid2 { display: grid; gap: 14px; grid-template-columns: repeat(auto-fit, minmax(380px, 1fr)); }
.stat .n { font-size: 26px; font-weight: 700; font-variant-numeric: tabular-nums; }
.stat .l { color: var(--muted); font-size: 13px; }
.muted { color: var(--muted); }
.small { font-size: 12px; }
table { width: 100%; border-collapse: collapse; }
th, td { text-align: left; padding: 7px 8px; border-bottom: 1px solid var(--line); vertical-align: top; }
th { color: var(--muted); font-weight: 600; font-size: 12px; white-space: nowrap; }
td.num { text-align: right; font-variant-numeric: tabular-nums; }
.scroll { overflow-x: auto; }
.chip { display: inline-block; padding: 1px 8px; border-radius: 999px; font-size: 12px; font-weight: 600; white-space: nowrap; }
.chip.ok { background: var(--ok-soft); color: var(--ok); }
.chip.warn { background: var(--warn-soft); color: var(--warn); }
.chip.bad { background: var(--bad-soft); color: var(--bad); }
.chip.info { background: var(--accent-soft); color: var(--accent); }
.chip.gray { background: #eceff2; color: var(--muted); }
form.filters { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
input[type=text], input[type=search], input[type=date], input[type=password], select, textarea {
  font: inherit; padding: 7px 9px; border: 1px solid var(--line); border-radius: 6px; background: #fff; color: var(--ink); max-width: 100%; }
textarea { width: 100%; }
.btn { font: inherit; padding: 7px 14px; border-radius: 6px; border: 1px solid var(--accent); background: var(--accent); color: #fff; cursor: pointer; display: inline-block; }
.btn.ghost { background: #fff; color: var(--accent); }
.btn:hover { text-decoration: none; filter: brightness(1.05); }
dl.kv { display: grid; grid-template-columns: 130px minmax(0, 1fr); gap: 6px 12px; margin: 0; }
dl.kv dt { color: var(--muted); }
dl.kv dd { margin: 0; overflow-wrap: anywhere; }
.pager { display: flex; gap: 8px; align-items: center; justify-content: center; margin-top: 10px; }
.msg { padding: 10px 14px; border-radius: 8px; background: var(--ok-soft); color: var(--ok); }
.pre { white-space: pre-wrap; overflow-wrap: anywhere; }
.login { max-width: 380px; margin: 10vh auto; }
.login .card { display: grid; gap: 12px; }
.login input { width: 100%; }
.manage a.tile { display: block; padding: 14px 16px; border: 1px solid var(--line); border-radius: 10px; background: #fff; color: var(--ink); }
.manage a.tile:hover { border-color: var(--accent); text-decoration: none; }
.manage a.tile b { display: block; margin-bottom: 4px; }
@media (max-width: 700px) {
  .top { height: auto; flex-wrap: wrap; padding: 8px 12px; }
  main { padding: 14px 12px 40px; }
  dl.kv { grid-template-columns: 100px minmax(0, 1fr); }
  .grid2 { grid-template-columns: 1fr; }
}

/* 프로젝트 */
.row-between { display: flex; justify-content: space-between; align-items: flex-start; gap: 10px; flex-wrap: wrap; }
.row-between .btn { margin-left: 4px; }
.pbar { display: inline-block; width: 60px; height: 7px; background: #e6e9ee; border-radius: 4px; vertical-align: middle; overflow: hidden; }
.pbar.wide { width: 160px; }
.pbar i { display: block; height: 100%; background: var(--accent); }
form.inline { display: inline; }
button.tick, button.link { background: none; border: 0; padding: 0 4px; cursor: pointer; color: var(--accent); font: inherit; }
ol.stages { margin: 0; padding-left: 4px; list-style: none; }
ol.stages li { padding: 5px 0; border-bottom: 1px solid #eef0f3; }
ol.stages li.done { color: var(--muted); text-decoration: line-through; }
.note { padding: 8px 0; border-bottom: 1px solid #eef0f3; }
.card textarea { width: 100%; box-sizing: border-box; margin: 6px 0; }
.form .field { margin-bottom: 12px; }
.form .field label { display: block; font-weight: 600; margin-bottom: 4px; }
.form input:not([type=checkbox]), .form select, .form textarea { width: 100%; max-width: 560px; box-sizing: border-box; padding: 6px; font: inherit; }
.gantt-head { display: flex; justify-content: space-between; margin-left: 170px; }
.gantt-row { display: flex; align-items: center; gap: 8px; margin: 4px 0; }
.gantt-label { width: 162px; flex: none; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.gantt-track { position: relative; flex: 1; height: 16px; background: #f3f5f8; border-radius: 4px; }
.gantt-bar { position: absolute; top: 2px; height: 12px; border-radius: 3px; background: var(--accent); }
.gantt-bar.ok { background: var(--ok); }
.gantt-bar.bad { background: var(--bad); }
.gantt-today { position: absolute; top: -2px; bottom: -2px; width: 2px; background: var(--warn); }
@media (max-width: 640px) { .gantt-head { margin-left: 98px; } .gantt-label { width: 90px; } }

/* AS 접수·배정 */
.msg.bad { background: var(--bad-soft); color: var(--bad); }
.row { display: flex; gap: 12px; flex-wrap: wrap; }
.row .field { flex: 1 1 200px; }
.picklist { max-height: 300px; overflow: auto; }
.picklist button { display: block; width: 100%; text-align: left; padding: 8px; border: 0; border-bottom: 1px solid #eef0f3; background: #fff; cursor: pointer; font: inherit; }
.picklist button:hover { background: var(--accent-soft); }
.pinfo > div { margin: 4px 0; }
.warnbox { background: var(--warn-soft); color: var(--warn); padding: 6px 8px; border-radius: 6px; }
.seg { display: flex; flex-wrap: wrap; gap: 6px; }
.seg label { display: inline-flex !important; align-items: center; gap: 4px; font-weight: 400 !important; padding: 5px 9px; border: 1px solid #d9dee5; border-radius: 6px; cursor: pointer; }
.seg input { width: auto !important; }
a.card.tap { display: block; color: inherit; text-decoration: none; }
a.card.tap:hover { border-color: var(--accent); }
.photos { display: flex; flex-wrap: wrap; gap: 8px; }
.photos a { display: flex; flex-direction: column; align-items: center; width: 96px; font-size: 28px; }
.photos img { width: 96px; height: 96px; object-fit: cover; border-radius: 6px; }
.actions .btn { margin: 2px 0; }
td.num { text-align: right; }
@media (max-width: 640px) { .actions .btn { padding: 10px 14px; } }
.form ul { list-style: none; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: 4px 14px; }
.form ul label { font-weight: 400 !important; display: inline !important; }
.form ul input { width: auto !important; }
.card.scroll table input { min-width: 80px; width: 100%; box-sizing: border-box; }
.cal-wrap { padding: 6px; overflow-x: auto; }
table.cal { table-layout: fixed; width: 100%; min-width: 640px; border-collapse: collapse; }
table.cal th { text-align: center; font-size: 13px; }
table.cal td { vertical-align: top; height: 92px; border: 1px solid #eef0f3; padding: 3px; }
table.cal td.other { background: #fafbfc; color: var(--muted); }
table.cal td.today { background: var(--accent-soft); }
.cal .dnum { font-size: 12px; font-weight: 600; color: inherit; }
.cal .sun { color: var(--bad); } .cal .sat { color: var(--accent); }
.cal .ev { display: block; font-size: 11.5px; line-height: 1.35; margin-top: 2px; padding: 1px 4px; border-radius: 3px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; color: #222; background: #eceff2; }
.k-out { background: #dbeafe !important; } .k-meeting { background: #ede9fe !important; } .k-leave { background: #fde2e2 !important; }
.k-trip { background: #ffedd5 !important; } .k-event { background: #dcfce7 !important; } .k-as { background: #fef3c7 !important; }
.k-deadline { background: #fee2e2 !important; color: var(--bad) !important; }
i.dot { display: inline-block; width: 9px; height: 9px; border-radius: 2px; margin: 0 2px 0 8px; vertical-align: middle; }
.gsearch input { padding: 5px 8px; border-radius: 6px; border: 1px solid rgba(255,255,255,.4); width: 150px; font: inherit; font-size: 13px; }
@media (max-width: 640px) { .gsearch { order: 5; width: 100%; } .gsearch input { width: 100%; box-sizing: border-box; } }

/* 톡 */
.badge { display: inline-block; min-width: 16px; padding: 0 5px; border-radius: 999px; background: var(--bad); color: #fff; font-size: 11px; font-weight: 700; text-align: center; line-height: 16px; }
.roomrow { display: block; padding: 8px 4px; border-bottom: 1px solid #eef0f3; color: inherit; text-decoration: none; }
.roomrow:hover { background: #f7f9fb; text-decoration: none; }
.roomrow .right { float: right; }
.ellipsis { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.person { display: block; padding: 5px 2px; border-bottom: 1px solid #f2f4f6; }
.checks { display: flex; flex-wrap: wrap; gap: 4px 12px; max-height: 220px; overflow: auto; }
.checks label { font-weight: 400 !important; display: inline !important; }
.checks input { width: auto !important; }
.talk { display: flex; flex-direction: column; height: calc(100vh - 110px); min-height: 420px; background: #fff; border: 1px solid #e3e7ec; border-radius: 10px; overflow: hidden; }
.talk-head { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; padding: 8px 12px; border-bottom: 1px solid #eef0f3; }
.talk-head .members { margin-left: auto; position: relative; }
.talk-head .members > div, .talk-head .members form { max-width: 320px; margin-top: 4px; }
.talk-body { flex: 1; overflow-y: auto; padding: 12px; background: #b9cfe0; display: flex; flex-direction: column; gap: 6px; }
.bubble { max-width: 75%; align-self: flex-start; background: #fff; border-radius: 10px; padding: 6px 10px; box-shadow: 0 1px 1px rgba(0,0,0,.06); }
.bubble.mine { align-self: flex-end; background: #fef01b; }
.bubble .who { font-size: 12px; font-weight: 600; color: #555; }
.bubble .txt { white-space: pre-wrap; overflow-wrap: anywhere; }
.bubble .at { font-size: 10.5px; color: #888; text-align: right; }
.bubble img { max-width: 240px; max-height: 260px; border-radius: 6px; display: block; }
.sys { align-self: center; font-size: 12px; color: #444; background: rgba(255,255,255,.55); padding: 2px 10px; border-radius: 999px; }
.talk-input { display: flex; gap: 6px; align-items: flex-end; padding: 8px; border-top: 1px solid #eef0f3; }
.talk-input textarea { flex: 1; resize: none; font: inherit; padding: 8px; border-radius: 8px; border: 1px solid #d9dee5; }
.talk-input .attach { font-size: 22px; cursor: pointer; padding: 4px; }
@media (max-width: 640px) { .talk { height: calc(100vh - 150px); border-radius: 0; } .bubble { max-width: 88%; } }
.btn.big { font-size: 17px; padding: 10px 26px; }
table.aline { width: auto; } table.aline td, table.aline th { min-width: 110px; text-align: center; border: 1px solid #eef0f3; }
img.thumb { width: 54px; height: 54px; object-fit: cover; border-radius: 4px; }
tr.hl td { background: var(--accent-soft); }
.lrow { margin: 4px 0; }
.vbars { display: flex; align-items: flex-end; gap: 4px; height: 180px; padding-top: 16px; overflow-x: auto; }
.vb { flex: 1 0 28px; display: flex; flex-direction: column; align-items: center; justify-content: flex-end; height: 100%; }
.vb i { display: block; width: 70%; background: var(--accent); border-radius: 3px 3px 0 0; min-height: 2px; }
.vb .v { font-size: 10.5px; color: var(--muted); }
.vb .l { font-size: 10.5px; color: var(--muted); margin-top: 3px; }
.hb { display: flex; align-items: center; gap: 8px; margin: 4px 0; }
.hb .hl { width: 110px; flex: none; font-size: 13px; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.hb .ht { flex: 1; height: 12px; background: #f0f2f5; border-radius: 3px; }
.hb .ht i { display: block; height: 100%; background: var(--accent); border-radius: 3px; }
.hb .hn { width: 60px; text-align: right; font-size: 13px; }
.okbox { background: var(--ok-soft); color: var(--ok); padding: 8px 10px; border-radius: 6px; }
p.warnbox { padding: 8px 10px; }
[hidden] { display: none !important; }
details.inline-edit { display: inline-block; }
details.inline-edit > summary { cursor: pointer; color: var(--accent); list-style: none; display: inline; }
details.inline-edit[open] { display: block; margin: 4px 0; padding: 6px; background: #f7f9fb; border-radius: 6px; }
.photos .ph { display: inline-flex; flex-direction: column; align-items: center; }
.bubble .rcpt { font-size: 10.5px; text-align: right; }
.bubble .rcpt .unread { color: #d97706; font-weight: 700; }
.bubble .rcpt .read { color: #6b7280; }
.me .bell { font-size: 17px; text-decoration: none; position: relative; margin-right: 6px; }
.me .bell .badge { position: absolute; top: -6px; right: -10px; }
.me a { color: inherit; }
.unreadrow { font-weight: 600; }
canvas.sigpad { width: 100%; height: 220px; border: 2px dashed #b6c0cc; border-radius: 8px; background: #fff; touch-action: none; display: block; margin: 6px 0; }
.errrow td { background: #fff5f5; }
.neg { color: var(--bad); }
.pgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 12px; margin-bottom: 14px; }
a.card.pcard { display: flex; flex-direction: column; gap: 3px; color: inherit; text-decoration: none; }
a.card.pcard:hover { border-color: var(--accent); }
.pcard img, .pcard .noimg { width: 100%; height: 120px; object-fit: contain; background: #f5f7fa; border-radius: 6px; }
.pcard .noimg { display: flex; align-items: center; justify-content: center; font-size: 28px; color: var(--muted); }
.kanban { display: grid; grid-template-columns: repeat(6, minmax(180px, 1fr)); gap: 10px; overflow-x: auto; padding-bottom: 6px; }
.kcol { background: #f3f5f8; border-radius: 8px; padding: 8px; min-height: 120px; }
.khead { margin-bottom: 6px; }
a.card.kcard { display: flex; flex-direction: column; gap: 2px; color: inherit; text-decoration: none; padding: 8px; margin-bottom: 6px; }
a.card.kcard:hover { border-color: var(--accent); }
.stars { display: inline-flex; flex-direction: row-reverse; gap: 2px; }
.stars input { display: none; }
.stars label { font-size: 32px; color: #d1d5db; cursor: pointer; font-weight: 400 !important; }
.stars input:checked ~ label, .stars label:hover, .stars label:hover ~ label { color: #f59e0b; }
.menugrid, .orggrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 12px; }
a.menulink { display: block; padding: 6px 2px; border-bottom: 1px solid #f0f2f5; }
.person-row { padding: 6px 0; border-bottom: 1px solid #f0f2f5; }
.nowrap { white-space: nowrap; } td.c { text-align: center; }
.help h2 { margin-top: 14px; } .help li { margin: 4px 0; }
.slips { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 10px; }
.slip { border: 1px dashed #9aa4b2; border-radius: 8px; padding: 10px 12px; background: #fff; line-height: 1.7; }
.mono { font-family: Consolas, "Courier New", monospace; } .mono.big { font-size: 18px; letter-spacing: 1px; }
@media print { header.top, .noprint, .msg { display: none !important; } .slip { break-inside: avoid; } body { background: #fff; } }
