:root {
  --bg: #f8fafc; --card: #ffffff; --fg: #1e293b; --muted: #475569; --faint: #64748b;
  --line: #e2e8f0; --soft: #eef2f6; --primary: #334155; --on-primary: #ffffff;
  --accent: #c2410c; --on-accent: #ffffff; --accent-soft: #ffedd5; --danger: #b91c1c;
  --mine: #334155; --on-mine: #ffffff; --ring: #c2410c;
  --radius: 10px; --nav-h: 60px; --side-w: 232px;
  --font: "Pretendard", "Malgun Gothic", "Apple SD Gothic Neo", "Noto Sans KR", system-ui, sans-serif;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0f172a; --card: #1e293b; --fg: #e2e8f0; --muted: #cbd5e1; --faint: #94a3b8;
    --line: #334155; --soft: #263449; --primary: #e2e8f0; --on-primary: #0f172a;
    --accent: #fb923c; --on-accent: #1c1917; --accent-soft: #432a17; --danger: #fca5a5;
    --mine: #475569; --on-mine: #ffffff; --ring: #fb923c;
  }
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--fg); font: 16px/1.55 var(--font); min-height: 100dvh; }
button, input, select, textarea { font: inherit; color: inherit; }
a { color: inherit; }
h1, h2, h3 { line-height: 1.3; margin: 0; }
h1 { font-size: 1.5rem; letter-spacing: -0.01em; }
h2 { font-size: 1.1rem; }
:focus-visible { outline: 3px solid var(--ring); outline-offset: 2px; border-radius: 6px; }
.skip { position: absolute; left: -999px; top: 8px; background: var(--card); padding: 8px 12px; z-index: 100; }
.skip:focus { left: 8px; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
svg.ic { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.75; stroke-linecap: round; stroke-linejoin: round; flex: none; }

/* 레이아웃 */
.shell { min-height: 100dvh; }
.side { display: none; }
.tabbar { position: fixed; inset: auto 0 0 0; z-index: 20; display: flex; background: var(--card); border-top: 1px solid var(--line); padding-bottom: env(safe-area-inset-bottom); }
.tabbar a { flex: 1; min-height: var(--nav-h); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; font-size: .75rem; text-decoration: none; color: var(--faint); position: relative; }
.tabbar a[aria-current="page"] { color: var(--accent); font-weight: 700; }
main { padding: 16px 16px calc(var(--nav-h) + 24px + env(safe-area-inset-bottom)); max-width: 1600px; width: 100%; margin: 0 auto; min-width: 0; }
main.narrow { max-width: 980px; }
main:focus { outline: none; }
.badge { position: absolute; top: 6px; left: calc(50% + 6px); min-width: 18px; height: 18px; padding: 0 5px; border-radius: 9px; background: var(--accent); color: var(--on-accent); font-size: .7rem; font-weight: 700; display: grid; place-items: center; }
@media (min-width: 900px) {
  .shell { display: grid; grid-template-columns: var(--side-w) 1fr; }
  .tabbar { display: none; }
  .side { display: flex; flex-direction: column; gap: 4px; padding: 20px 12px; position: sticky; top: 0; height: 100dvh; background: var(--card); border-right: 1px solid var(--line); }
  .side .brand { display: flex; align-items: center; gap: 10px; padding: 4px 10px 18px; font-weight: 800; font-size: 1.05rem; }
  .side .brand img { width: 30px; height: 30px; border-radius: 7px; }
  .side a, .side button.link { display: flex; align-items: center; gap: 10px; padding: 10px 12px; min-height: 44px; border-radius: 8px; text-decoration: none; color: var(--muted); background: none; border: 0; width: 100%; text-align: left; cursor: pointer; position: relative; }
  .side a:hover, .side button.link:hover { background: var(--soft); }
  .side a[aria-current="page"] { background: var(--soft); color: var(--fg); font-weight: 700; box-shadow: inset 3px 0 0 var(--accent); }
  .side .spacer { flex: 1; }
  .side .me { padding: 8px 12px; font-size: .85rem; color: var(--faint); }
  .side .badge { position: static; margin-left: auto; }
  main { padding: 32px 36px 48px; }
}

/* 공통 컴포넌트 */
.page-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 16px; }
.page-head .sub { color: var(--faint); font-size: .9rem; margin-top: 2px; }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 44px; padding: 0 16px; border-radius: 8px; border: 1px solid var(--line); background: var(--card); cursor: pointer; text-decoration: none; font-weight: 600; transition: background .15s, border-color .15s; }
.btn:hover { background: var(--soft); }
.btn.primary { background: var(--accent); border-color: var(--accent); color: var(--on-accent); }
.btn.primary:hover { filter: brightness(1.08); }
.btn.danger { color: var(--danger); }
.btn.sm { min-height: 36px; padding: 0 12px; font-size: .9rem; }
.btn.icon { padding: 0; width: 44px; }
.btn.icon.sm { width: 36px; }
.btn[disabled] { opacity: .5; cursor: not-allowed; }
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); }
.empty { text-align: center; padding: 40px 16px; color: var(--faint); }
.empty strong { display: block; color: var(--fg); margin-bottom: 4px; }
.muted { color: var(--faint); }
.tag { display: inline-block; font-size: .75rem; padding: 1px 8px; border-radius: 999px; background: var(--soft); color: var(--muted); font-weight: 600; }
.tag.pin { background: var(--accent-soft); color: var(--accent); }
.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--line); margin-bottom: 20px; overflow-x: auto; overflow-y: hidden; }
.tabs a { padding: 10px 14px; min-height: 44px; text-decoration: none; color: var(--faint); font-weight: 600; white-space: nowrap; border-bottom: 3px solid transparent; margin-bottom: -1px; display: flex; align-items: center; }
.tabs a[aria-current="page"] { color: var(--fg); border-color: var(--accent); }
.crumbs { display: flex; flex-wrap: wrap; align-items: center; gap: 2px; margin-bottom: 14px; font-size: .95rem; }
.crumbs a { padding: 6px 6px; min-height: 36px; display: inline-flex; align-items: center; text-decoration: none; color: var(--muted); border-radius: 6px; }
.crumbs a:hover { background: var(--soft); }
.crumbs span.sep { color: var(--faint); }
.crumbs [aria-current] { font-weight: 700; color: var(--fg); }

/* 게시판 */
.posts { display: grid; gap: 10px; }
.post { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); }
.post summary { list-style: none; cursor: pointer; padding: 14px 16px; display: flex; flex-direction: column; gap: 4px; min-height: 44px; }
.post summary::-webkit-details-marker { display: none; }
.post summary .t { font-weight: 700; }
.post summary .meta { font-size: .85rem; color: var(--faint); display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.post .body { padding: 0 16px 16px; white-space: pre-wrap; overflow-wrap: anywhere; border-top: 1px solid var(--line); padding-top: 14px; }
.post .body a { color: var(--accent); }
.post .actions { display: flex; gap: 8px; padding: 0 16px 14px; }
.seg { display: inline-flex; background: var(--soft); border-radius: 8px; padding: 3px; }
.seg a { padding: 6px 16px; min-height: 36px; display: flex; align-items: center; border-radius: 6px; text-decoration: none; color: var(--muted); font-weight: 600; }
.seg a[aria-current="page"] { background: var(--card); color: var(--fg); box-shadow: 0 1px 2px rgb(0 0 0 / .1); }

/* 프로젝트·폴더 */
.grid { display: grid; gap: 12px; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); }
.tile { display: flex; flex-direction: column; gap: 6px; padding: 16px; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); text-decoration: none; transition: border-color .15s, transform .15s; min-height: 92px; }
.tile:hover { border-color: var(--accent); }
.tile .name { font-weight: 700; display: flex; align-items: center; gap: 8px; overflow-wrap: anywhere; }
.tile .name svg { color: var(--accent); }
.tile .desc { color: var(--muted); font-size: .9rem; }
.tile .info { color: var(--faint); font-size: .8rem; margin-top: auto; }
.tools { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 16px; }
.list { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); }
.row { display: flex; align-items: center; gap: 12px; padding: 10px 14px; min-height: 56px; border-bottom: 1px solid var(--line); }
.row:last-child { border-bottom: 0; }
.row .grow { flex: 1; min-width: 0; }
.row .fname { font-weight: 600; overflow-wrap: anywhere; text-decoration: none; }
.row .fname:hover { text-decoration: underline; }
.row .sub { font-size: .8rem; color: var(--faint); }
.drop { border: 2px dashed var(--line); border-radius: var(--radius); padding: 14px; text-align: center; color: var(--faint); margin-bottom: 16px; }
.drop.over { border-color: var(--accent); background: var(--accent-soft); }
.progress { height: 6px; border-radius: 3px; background: var(--soft); overflow: hidden; margin-top: 6px; }
.progress > i { display: block; height: 100%; background: var(--accent); width: 0; }
.uploads { display: grid; gap: 8px; margin-bottom: 16px; }
.uploads .u { padding: 10px 14px; background: var(--card); border: 1px solid var(--line); border-radius: 8px; font-size: .9rem; }

/* 작업일보 */
.composer { padding: 14px; margin-bottom: 20px; display: grid; gap: 10px; }
.composer textarea { width: 100%; min-height: 84px; resize: vertical; }
.thumbs { display: flex; gap: 8px; flex-wrap: wrap; }
.thumbs .th { position: relative; width: 72px; height: 72px; border-radius: 8px; overflow: hidden; background: var(--soft); }
.thumbs img { width: 100%; height: 100%; object-fit: cover; display: block; }
.thumbs button { position: absolute; top: 2px; right: 2px; width: 28px; height: 28px; border-radius: 50%; border: 0; background: rgb(0 0 0 / .65); color: #fff; cursor: pointer; display: grid; place-items: center; padding: 0; }
.composer .bar { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.composer .bar .spacer { flex: 1; }
.feed { display: grid; gap: 14px; }
.upd { padding: 16px; }
.upd header { display: flex; align-items: center; gap: 10px; margin-bottom: 8px; flex-wrap: wrap; }
.avatar { width: 36px; height: 36px; border-radius: 50%; background: var(--primary); color: var(--on-primary); display: grid; place-items: center; font-weight: 700; flex: none; }
.upd .who { font-weight: 700; line-height: 1.2; }
.upd .when { font-size: .8rem; color: var(--faint); }
.upd .txt { white-space: pre-wrap; overflow-wrap: anywhere; margin: 6px 0 10px; }
.photos { display: grid; gap: 6px; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); }
.photos button { padding: 0; border: 0; background: var(--soft); border-radius: 8px; overflow: hidden; cursor: zoom-in; aspect-ratio: 4 / 3; }
.photos img, .photos video { width: 100%; height: 100%; object-fit: cover; display: block; }
.lightbox { border: 0; padding: 0; background: transparent; max-width: 100vw; max-height: 100dvh; width: 100vw; height: 100dvh; }
.lightbox::backdrop { background: rgb(0 0 0 / .88); }
.lightbox .in { width: 100%; height: 100%; display: grid; place-items: center; padding: 16px; }
.lightbox img { max-width: 100%; max-height: calc(100dvh - 32px); object-fit: contain; }
.lightbox .x { position: fixed; top: 12px; right: 12px; }

/* 채팅 */
.chat { display: grid; gap: 0; height: calc(100dvh - var(--nav-h) - 56px - env(safe-area-inset-bottom)); min-height: 360px; }
.chat.full { height: calc(100dvh - var(--nav-h) - 130px - env(safe-area-inset-bottom)); }
.rooms { display: grid; gap: 6px; align-content: start; }
.room { display: flex; align-items: center; gap: 10px; padding: 12px 14px; min-height: 52px; background: var(--card); border: 1px solid var(--line); border-radius: 10px; text-decoration: none; }
.room[aria-current="page"] { border-color: var(--accent); }
.room .badge { position: static; margin-left: auto; }
.conv { display: flex; flex-direction: column; min-height: 0; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.conv .top { display: flex; align-items: center; gap: 8px; padding: 10px 14px; border-bottom: 1px solid var(--line); font-weight: 700; }
.msgs { flex: 1; overflow-y: auto; padding: 14px; display: flex; flex-direction: column; gap: 6px; overscroll-behavior: contain; }
.msg { max-width: 82%; align-self: flex-start; }
.msg .nm { font-size: .78rem; color: var(--faint); margin: 6px 2px 2px; }
.msg .bubble { background: var(--soft); padding: 8px 12px; border-radius: 14px 14px 14px 4px; white-space: pre-wrap; overflow-wrap: anywhere; }
.msg .tm { font-size: .7rem; color: var(--faint); margin: 2px 4px 0; }
.msg.mine { align-self: flex-end; text-align: right; }
.msg.mine .bubble { background: var(--mine); color: var(--on-mine); border-radius: 14px 14px 4px 14px; text-align: left; }
.msgs .older { align-self: center; }
.sendbar { display: flex; gap: 8px; padding: 10px; border-top: 1px solid var(--line); align-items: flex-end; }
.sendbar textarea { flex: 1; min-height: 44px; max-height: 140px; resize: none; }
@media (min-width: 900px) {
  .chat { grid-template-columns: 260px 1fr; gap: 16px; height: calc(100dvh - 130px); }
  .chat.full { height: calc(100dvh - 130px); }
  .chat .back { display: none; }
}
@media (max-width: 899px) {
  .chat[data-has-room="true"] .rooms { display: none; }
  .chat[data-has-room="false"] .conv { display: none; }
}

/* 폼·다이얼로그 */
input[type=text], input[type=password], input[type=email], select, textarea { width: 100%; min-height: 44px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 8px; background: var(--card); }
textarea { line-height: 1.5; }
label { display: block; font-weight: 600; font-size: .9rem; margin-bottom: 4px; }
.field { margin-bottom: 14px; }
.field .hint { font-size: .8rem; color: var(--faint); margin-top: 3px; }
.field.check { display: flex; align-items: center; gap: 10px; }
.field.check input { width: 20px; height: 20px; }
.field.check label { margin: 0; }
dialog.modal { border: 1px solid var(--line); border-radius: 14px; background: var(--card); color: var(--fg); width: min(480px, calc(100vw - 24px)); padding: 0; }
dialog.modal::backdrop { background: rgb(15 23 42 / .55); }
dialog.modal form { padding: 20px; }
dialog.modal h2 { margin-bottom: 16px; }
dialog.modal .err { color: var(--danger); font-size: .9rem; min-height: 1.2em; margin-bottom: 8px; }
dialog.modal .foot { display: flex; gap: 8px; justify-content: flex-end; }
#toasts { position: fixed; left: 12px; right: 12px; bottom: calc(var(--nav-h) + 12px + env(safe-area-inset-bottom)); z-index: 60; display: grid; gap: 8px; pointer-events: none; justify-items: center; }
@media (min-width: 900px) { #toasts { bottom: 20px; left: auto; right: 20px; justify-items: end; } }
.toast { background: var(--fg); color: var(--bg); padding: 10px 16px; border-radius: 10px; box-shadow: 0 6px 20px rgb(0 0 0 / .25); max-width: 420px; font-size: .95rem; }
.toast.err { background: var(--danger); color: #fff; }

/* 로그인 */
.auth { min-height: 100dvh; display: grid; place-items: center; padding: 20px; }
.auth .box { width: min(400px, 100%); padding: 28px; }
.auth .logo { display: flex; align-items: center; gap: 12px; margin-bottom: 20px; font-weight: 800; font-size: 1.3rem; }
.auth .logo img { width: 40px; height: 40px; border-radius: 9px; }
.auth p { color: var(--muted); margin: 0 0 18px; }
.auth .btn { width: 100%; }

/* 설정·준비 중 카드 */
.stack { display: grid; gap: 14px; }
.panel { padding: 18px; }
.panel h2 { margin-bottom: 4px; }
.status { display: inline-flex; align-items: center; gap: 6px; font-size: .85rem; font-weight: 600; color: var(--faint); }
.status::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--faint); }
.status.ok::before { background: #15803d; }

@media (prefers-reduced-motion: reduce) { * { transition: none !important; scroll-behavior: auto !important; } }

/* ===== 모바일 상단 바 ===== */
.mtop { position: sticky; top: 0; z-index: 15; display: flex; align-items: center; gap: 4px; padding: 6px 8px 6px 14px; padding-top: calc(6px + env(safe-area-inset-top)); background: var(--card); border-bottom: 1px solid var(--line); }
.mtop .grow { flex: 1; }
.mbrand { display: flex; align-items: center; gap: 8px; font-weight: 800; text-decoration: none; }
.mbrand img { width: 26px; height: 26px; border-radius: 6px; }
.iconbtn { position: relative; width: 44px; height: 44px; display: grid; place-items: center; border-radius: 10px; color: var(--fg); text-decoration: none; }
.iconbtn:hover { background: var(--soft); }
.iconbtn .badge { top: 4px; left: auto; right: 2px; }
@media (min-width: 900px) { .mtop { display: none; } }

/* ===== 게시글·댓글·언급 ===== */
.postrow { display: flex; flex-direction: column; gap: 4px; padding: 14px 16px; text-decoration: none; min-height: 44px; }
.postrow:hover { border-color: var(--accent); }
.postrow .t { font-weight: 700; }
.postrow .meta { font-size: .85rem; color: var(--faint); display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.pbody { white-space: pre-wrap; overflow-wrap: anywhere; margin-top: 14px; }
.pbody a, .ct a, .txt a { color: var(--accent); }
.mention { color: var(--accent); font-weight: 700; background: var(--accent-soft); border-radius: 4px; padding: 0 3px; }
.mention-host { position: relative; }
.mention-pop { position: absolute; left: 0; right: 0; bottom: calc(100% + 4px); z-index: 30; background: var(--card); border: 1px solid var(--line); border-radius: 10px; box-shadow: 0 8px 24px rgb(0 0 0 / .18); overflow: hidden; }
.mention-pop .mi { padding: 10px 14px; min-height: 44px; display: flex; align-items: center; cursor: pointer; }
.mention-pop .mi[aria-selected="true"], .mention-pop .mi:hover { background: var(--accent-soft); color: var(--accent); font-weight: 700; }
.sendbar .mention-host { flex: 1; }
.sendbar .mention-host textarea { width: 100%; }
.comments { margin-top: 20px; }
.comments h2 { margin-bottom: 10px; }
.clist { display: grid; gap: 10px; margin-bottom: 14px; }
.cm { display: flex; gap: 10px; }
.avatar.sm { width: 30px; height: 30px; font-size: .85rem; }
.cm .cb { flex: 1; min-width: 0; background: var(--card); border: 1px solid var(--line); border-radius: 10px; padding: 8px 12px; }
.cm .ch { display: flex; align-items: center; gap: 8px; font-size: .9rem; }
.cm .when { color: var(--faint); font-size: .8rem; }
.cm .cdel { margin-left: auto; width: 32px; height: 32px; }
.cm .ct { white-space: pre-wrap; overflow-wrap: anywhere; }
.cform { display: grid; gap: 8px; }
.cform textarea, .cwrap textarea { width: 100%; resize: vertical; }
.cform .btn { justify-self: end; }
.upd-foot { margin-top: 10px; }
.notif.unread { background: var(--accent-soft); }
.notif { text-decoration: none; }
.dot { width: 10px; height: 10px; border-radius: 50%; background: var(--accent); flex: none; }

/* ===== 결재 ===== */
.chip { display: inline-flex; align-items: center; padding: 2px 10px; border-radius: 999px; font-size: .78rem; font-weight: 700; background: var(--soft); color: var(--muted); white-space: nowrap; }
.chip.st-pending { background: var(--accent-soft); color: var(--accent); }
.chip.st-ok, .chip.st-approved { background: #dcfce7; color: #166534; }
.chip.st-no, .chip.st-rejected { background: #fee2e2; color: #991b1b; }
.chip.st-cancel, .chip.st-canceled, .chip.st-waiting { background: var(--soft); color: var(--faint); }
@media (prefers-color-scheme: dark) { .chip.st-ok, .chip.st-approved { background: #14532d; color: #bbf7d0; } .chip.st-no, .chip.st-rejected { background: #7f1d1d; color: #fecaca; } }
.count { display: inline-grid; place-items: center; min-width: 20px; height: 20px; padding: 0 6px; border-radius: 10px; background: var(--accent); color: var(--on-accent); font-size: .75rem; font-weight: 700; margin-left: 4px; }
.arow { text-decoration: none; }
.arow:hover { background: var(--soft); }
.atitle { font-weight: 700; overflow-wrap: anywhere; }
.atable-wrap { overflow-x: auto; margin: 14px 0; }
.atable { width: 100%; border-collapse: collapse; table-layout: fixed; min-width: 520px; background: var(--card); }
.atable th, .atable td { border: 1px solid var(--muted); padding: 0; vertical-align: middle; overflow-wrap: anywhere; }
@media (prefers-color-scheme: light) { .atable th, .atable td { border-color: #94a3b8; } }
.atable th.lbl { background: var(--soft); font-weight: 700; padding: 8px 10px; text-align: left; font-size: .92rem; }
.atable th.hd { background: var(--soft); font-weight: 800; padding: 8px 10px; text-align: center; font-size: .92rem; }
.atable td.val { padding: 8px 10px; white-space: pre-wrap; }
.atable td.num { text-align: right; font-variant-numeric: tabular-nums; }
.atable td.in input, .atable td.in textarea, .atable td.in select { border: 0; border-radius: 0; min-height: 44px; background: transparent; width: 100%; padding: 8px 10px; }
.atable td.in input.num { text-align: right; }
.atable td.in:focus-within { outline: 2px solid var(--ring); outline-offset: -2px; background: var(--accent-soft); }
.atable td.in :focus-visible { outline: none; }
.steps { list-style: none; margin: 14px 0; padding: 0; display: grid; gap: 8px; }
.steps li { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 10px; background: var(--card); }
.steps li.s-pending { border-color: var(--accent); }
.steps .n { width: 26px; height: 26px; border-radius: 50%; background: var(--primary); color: var(--on-primary); display: grid; place-items: center; font-size: .8rem; font-weight: 700; flex: none; }
.steps .grow { flex: 1; min-width: 0; }
.scomment { margin-top: 4px; white-space: pre-wrap; overflow-wrap: anywhere; font-size: .92rem; }
.steps.edit li .btn { flex: none; }
.addrow { display: flex; gap: 8px; margin-top: 10px; flex-wrap: wrap; }
.addrow select { flex: 1; min-width: 160px; }
.line, .decide { margin: 16px 0; }
.err { color: var(--danger); font-size: .9rem; min-height: 1.2em; margin: 8px 0; }
.grow-row { padding: 12px; margin-bottom: 10px; }
.gr-head { display: flex; align-items: center; gap: 8px; margin-bottom: 10px; }
.gr-cells { display: flex; flex-wrap: wrap; gap: 8px; }
.gcell { display: grid; gap: 6px; padding: 8px; border: 1px solid var(--line); border-radius: 8px; background: var(--bg); flex: 1 1 200px; max-width: 280px; }
.gc-foot { display: flex; align-items: center; gap: 6px; font-size: .85rem; }
.gc-foot label { margin: 0; font-weight: 500; white-space: nowrap; }
.gc-foot select { width: 64px; min-height: 36px; padding: 4px 6px; }
.gc-foot .btn { margin-left: auto; }

/* ===== 캘린더 ===== */
.calbar { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; margin-bottom: 10px; }
.calnav { display: flex; align-items: center; gap: 6px; }
.calnav h2 { min-width: 9ch; text-align: center; font-size: 1.15rem; }
.chk { display: flex; align-items: center; gap: 8px; margin: 0; font-weight: 500; min-height: 44px; }
.chk input { width: 20px; height: 20px; }
.legend { display: flex; flex-wrap: wrap; gap: 4px 14px; margin-bottom: 10px; font-size: .85rem; color: var(--muted); }
.lg { display: inline-flex; align-items: center; gap: 6px; }
.lg i, .sw, .dots i { display: inline-block; width: 10px; height: 10px; border-radius: 3px; background: var(--uc); flex: none; }
.u0 { --uc: #2563eb; } .u1 { --uc: #c2410c; } .u2 { --uc: #15803d; } .u3 { --uc: #9333ea; } .u4 { --uc: #be123c; } .u5 { --uc: #0e7490; } .u6 { --uc: #a16207; } .u7 { --uc: #475569; }
@media (prefers-color-scheme: dark) { .u0 { --uc: #60a5fa; } .u1 { --uc: #fb923c; } .u2 { --uc: #4ade80; } .u3 { --uc: #c084fc; } .u4 { --uc: #fb7185; } .u5 { --uc: #22d3ee; } .u6 { --uc: #facc15; } .u7 { --uc: #94a3b8; } }
.cal { border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; background: var(--card); }
.dow, .week { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); }
.dow div { padding: 6px 0; text-align: center; font-size: .8rem; font-weight: 700; color: var(--muted); background: var(--soft); }
.dow .sun { color: var(--danger); } .dow .sat { color: #2563eb; }
@media (prefers-color-scheme: dark) { .dow .sat { color: #93c5fd; } }
.day { min-height: 64px; border-top: 1px solid var(--line); border-left: 1px solid var(--line); padding: 2px 3px 4px; cursor: pointer; display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.week .day:first-child { border-left: 0; }
.day.out { background: var(--bg); } .day.out .dnum { color: var(--faint); }
.day.sel { background: var(--accent-soft); }
.dnum { align-self: flex-start; min-width: 28px; height: 28px; border-radius: 14px; border: 0; background: none; cursor: pointer; font-weight: 600; }
.day.today .dnum { background: var(--accent); color: var(--on-accent); }
.chips { display: none; flex-direction: column; gap: 2px; min-width: 0; }
.evchip { text-align: left; border: 0; border-left: 3px solid var(--uc); background: color-mix(in srgb, var(--uc) 16%, var(--card)); color: var(--fg); border-radius: 3px; padding: 1px 5px; font-size: .78rem; line-height: 1.5; min-height: 22px; cursor: pointer; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; width: 100%; }
.evchip:hover { background: color-mix(in srgb, var(--uc) 30%, var(--card)); }
.evchip .t { font-variant-numeric: tabular-nums; opacity: .8; }
.more { border: 0; background: none; color: var(--muted); font-size: .75rem; text-align: left; padding: 0 4px; cursor: pointer; min-height: 20px; }
.dots { display: flex; gap: 3px; flex-wrap: wrap; padding: 0 2px; }
@media (min-width: 700px) { .day { min-height: 104px; } .chips { display: flex; } .dots { display: none; } }
.agenda { margin-top: 16px; }
.ag-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 8px; }
.agrow { display: flex; align-items: center; gap: 10px; width: 100%; text-align: left; background: none; border: 0; border-top: 1px solid var(--line); padding: 10px 4px; min-height: 52px; cursor: pointer; }
.agrow:hover { background: var(--soft); }
.agrow .when { width: 3.2em; font-size: .85rem; color: var(--muted); font-variant-numeric: tabular-nums; flex: none; }
.agrow .grow { display: flex; flex-direction: column; min-width: 0; flex: 1; }
.agrow .sub { font-size: .82rem; color: var(--faint); }
dialog.modal.wide { width: min(560px, calc(100vw - 24px)); max-height: calc(100dvh - 24px); overflow-y: auto; }
dialog.modal .two { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
dialog.modal.allday .tm { display: none; }
dialog.modal.allday .two { grid-template-columns: 1fr; }
dialog.modal .evd { padding: 20px; }
dialog.modal .evd h2 { display: flex; align-items: center; gap: 8px; margin-bottom: 10px; overflow-wrap: anywhere; }
.meta { display: grid; grid-template-columns: auto 1fr; gap: 4px 12px; margin: 0; }
.meta dt { color: var(--faint); font-size: .85rem; } .meta dd { margin: 0; }

/* ===== 인쇄(결재 문서) ===== */
@media print {
  .side, .tabbar, .mtop, .noprint, #toasts, .crumbs { display: none !important; }
  .shell { display: block; } main { padding: 0; max-width: none; }
  body { background: #fff; color: #000; } .card { border: 0; }
  .atable th, .atable td { border-color: #000 !important; }
}

/* ===== 결재: 합계·첨부·검색 필터 ===== */
.sumcell { background: var(--accent-soft); padding: 8px 10px !important; font-size: 1.05rem; }
.sumcell strong { font-variant-numeric: tabular-nums; }
.amt { font-weight: 700; font-variant-numeric: tabular-nums; white-space: nowrap; margin-right: 6px; }
.asum { margin: 10px 2px; padding: 10px 14px; background: var(--accent-soft); border-radius: 10px; }
.filters { margin-bottom: 12px; padding: 0; }
.filters summary { cursor: pointer; padding: 12px 16px; font-weight: 700; min-height: 44px; display: flex; align-items: center; gap: 8px; }
.fgrid { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 0 12px; padding: 0 16px 14px; align-items: end; }
.fgrid .field { margin-bottom: 10px; }
.fgrid .fbtn { grid-column: 1 / -1; display: flex; gap: 8px; margin: 0; }
.fgrid2 { display: grid; grid-template-columns: 1fr; gap: 0 14px; }
@media (min-width: 700px) { .fgrid2 { grid-template-columns: 2fr 1fr; } }
.attach { margin: 16px 0; }
.attach-view { margin-top: 18px; }
.attach-view h2 { font-size: 1rem; margin-bottom: 8px; }
.thumbs .th.file { width: auto; max-width: 240px; height: auto; min-height: 44px; display: flex; align-items: center; padding: 6px 36px 6px 12px; background: var(--soft); }
.thumbs .th.file .fname { overflow-wrap: anywhere; font-size: .9rem; }
.filelink { justify-content: flex-start; text-align: left; }
@media print { .attach-view .photos { grid-template-columns: repeat(3, 1fr); } .attach-view .photos button { cursor: default; } }

.exportbar { align-items: center; margin: 0 0 12px; }
.exportbar .muted { font-size: .85rem; }

/* ===== 경비사용 ===== */
.amt.big { font-size: 1.35rem; font-variant-numeric: tabular-nums; }
.tile .amt.big { font-weight: 800; margin-top: 2px; }
.etable { width: 100%; border-collapse: collapse; min-width: 900px; background: var(--card); }
.etable th, .etable td { border: 1px solid #94a3b8; padding: 6px 8px; vertical-align: middle; }
@media (prefers-color-scheme: dark) { .etable th, .etable td { border-color: #64748b; } }
.etable thead tr.site th { background: var(--primary); color: var(--on-primary); font-size: 1.1rem; text-align: left; padding: 12px 14px; }
.etable thead tr.cols th { background: var(--soft); font-weight: 800; text-align: center; font-size: .9rem; }
.etable thead tr.cols th small { font-weight: 500; color: var(--faint); }
.etable td.num { text-align: right; font-variant-numeric: tabular-nums; }
.etable td.c { text-align: center; color: var(--muted); width: 56px; }
.etable td.note { color: var(--muted); font-size: .9rem; overflow-wrap: anywhere; }
.etable td.act { white-space: nowrap; text-align: right; }
.etable td.act .btn + .btn { margin-left: 4px; }
.etable tr.entry td { background: var(--accent-soft); padding: 4px; }
.etable tr.entry input, .etable tr.entry select { width: 100%; min-height: 40px; padding: 6px 8px; border: 1px solid var(--line); border-radius: 6px; background: var(--card); }
.etable tr.entry input.num { text-align: right; }
.etable tfoot th, .etable tfoot td { background: var(--soft); font-weight: 800; }
.etable tfoot th { text-align: right; }
.catsum { margin-top: 18px; }
.catsum h2 { font-size: 1rem; margin-bottom: 8px; }
.catsum ul { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.catsum li { display: flex; align-items: baseline; gap: 8px; padding: 8px 12px; background: var(--card); border: 1px solid var(--line); border-radius: 10px; }
/* 경비 장부: 열 너비는 비율(colgroup)로 화면에 맞춰 늘고 줄어듭니다. 이보다 좁으면 카드로 바뀝니다 */
.etable { width: 100%; min-width: 960px; table-layout: fixed; }
.etable tbody td:nth-child(-n+4) { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.etable tbody td:nth-child(2) { font-variant-numeric: tabular-nums; }

/* ===== 경비 장부: 휴대폰은 카드, 컴퓨터는 표 ===== */
.ecards, .esite, .efab { display: none; }
.cchips { display: flex; flex-wrap: wrap; gap: 8px; }
.cchip { position: relative; margin: 0; font-weight: 600; }
.cchip input { position: absolute; opacity: 0; inset: 0; width: 100%; height: 100%; margin: 0; cursor: pointer; }
.cchip span { display: inline-flex; align-items: center; min-height: 44px; padding: 0 16px; border: 1px solid var(--line); border-radius: 22px; background: var(--card); }
.cchip input:checked + span { background: var(--accent); border-color: var(--accent); color: var(--on-accent); }
.cchip input:focus-visible + span { outline: 3px solid var(--ring); outline-offset: 2px; }
fieldset.cfield { border: 0; padding: 0; margin: 0 0 14px; min-width: 0; }
fieldset.cfield legend { font-weight: 600; font-size: .9rem; margin-bottom: 6px; padding: 0; }
dialog.modal.sheet .foot { flex-wrap: wrap; }
dialog.modal.sheet input, dialog.modal.sheet select { font-size: 1rem; }
@media (max-width: 1279px) {
  .etable-wrap { display: none; }
  .esite { display: block; background: var(--primary); color: var(--on-primary); font-weight: 800; padding: 12px 14px; border-radius: 10px 10px 0 0; }
  .ecards { display: grid; gap: 8px; list-style: none; margin: 0 0 12px; padding: 10px; background: var(--soft); border-radius: 0 0 10px 10px; padding-bottom: 76px; }
  .ecard { background: var(--card); border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px; }
  .ecard.empty { color: var(--faint); text-align: center; padding: 22px 14px; }
  .ecard.etotal { background: var(--accent-soft); border-color: var(--accent); }
  .ec-top { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; font-size: .85rem; color: var(--muted); }
  .ec-top .chip { margin-left: auto; }
  .ec-no { font-weight: 700; color: var(--faint); }
  .ec-amt { font-size: 1.4rem; font-weight: 800; font-variant-numeric: tabular-nums; margin-top: 4px; }
  .ec-sub { font-size: .85rem; color: var(--muted); font-variant-numeric: tabular-nums; }
  .ec-meta { font-size: .9rem; margin-top: 4px; overflow-wrap: anywhere; }
  .ec-act { display: flex; gap: 8px; margin-top: 8px; }
  .ecards { grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); }
  .ecard.etotal, .ecard.empty { grid-column: 1 / -1; }
  .efab { display: inline-flex; position: fixed; right: 16px; bottom: calc(var(--nav-h) + 16px + env(safe-area-inset-bottom)); z-index: 18; min-height: 52px; padding: 0 22px; border-radius: 26px; box-shadow: 0 6px 18px rgb(0 0 0 / .3); font-size: 1rem; }
}
@media (min-width: 900px) and (max-width: 1279px) { .efab { bottom: 24px; right: 32px; } }
@media (max-width: 699px) {
  .ecards { grid-template-columns: 1fr; }
  dialog.modal.sheet { margin: auto 0 0; width: 100%; max-width: 100%; border-radius: 18px 18px 0 0; max-height: 94dvh; overflow-y: auto; padding-bottom: env(safe-area-inset-bottom); }
}
dialog.modal.sheet input[type=date] { width: 100%; min-height: 44px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 8px; background: var(--card); }
dialog.modal.sheet .foot { position: sticky; bottom: -1px; background: var(--card); padding: 12px 0 calc(12px + env(safe-area-inset-bottom)); margin-top: 4px; border-top: 1px solid var(--line); }
dialog.modal.sheet form { padding-bottom: 0; }

/* ===== 결재 양식 표: 휴대폰(화면 폭 799px 이하)에서는 카드로 ===== */
.atable .m-more { display: none; }
@media screen and (max-width: 799px) {
  .atable-wrap { overflow: visible; margin: 12px 0; }
  .atable { display: block; min-width: 0; width: 100%; border: 1px solid var(--line); border-radius: 12px; background: var(--card); overflow: hidden; table-layout: auto; }
  .atable tbody { display: block; counter-reset: item; }
  .atable tr { display: block; padding: 10px 14px; border-bottom: 1px solid var(--line); }
  .atable tr:last-child { border-bottom: 0; }
  .atable th, .atable td { display: block; border: 0; width: auto; padding: 0; text-align: left; }
  .atable th.lbl { background: none; font-size: .85rem; color: var(--muted); padding: 6px 0 4px; }
  .atable th.lbl:first-child { padding-top: 0; }
  .atable tr.hrow { display: none; }
  /* 머리글 아래 입력 줄 = "항목 N" 카드 */
  .atable tr.itemrow { counter-increment: item; margin: 10px; padding: 12px; border: 1px solid var(--line); border-radius: 12px; background: var(--soft); }
  .atable tr.itemrow::before { content: "항목 " counter(item); display: block; font-weight: 800; margin-bottom: 4px; }
  .atable tr.itemrow td[data-label]::before { content: attr(data-label); display: block; font-size: .8rem; font-weight: 700; color: var(--muted); margin: 8px 0 3px; }
  .atable tr.extra, .atable tr.blank, .atable tr.itemrow td.empty { display: none; }
  .atable td.in input, .atable td.in select, .atable td.in textarea { border: 1px solid var(--line); border-radius: 8px; min-height: 44px; background: var(--card); padding: 10px 12px; width: 100%; font-size: 1rem; }
  .atable td.in:focus-within { outline: none; background: none; }
  .atable td.in input.num { text-align: right; }
  .atable td.val { padding: 2px 0 6px; overflow-wrap: anywhere; }
  .atable td.val.num { text-align: right; }
  .atable td.sumcell { background: var(--accent-soft); border-radius: 8px; padding: 10px 12px !important; font-size: 1.2rem; text-align: right; }
  .atable tr.m-more { display: block; border-bottom: 0; padding: 0 10px 12px; }
  .atable tr.m-more td { display: block; }
  .atable tr.m-more .btn { width: 100%; }
  .atable tr.m-more.done { display: none; }
}
@media screen and (max-width: 799px) { .atable td.val.num[data-label]::before { text-align: left; } }

/* ===== 프로젝트 상태(진행 중·완료·취소) ===== */
.count.dim { background: var(--soft); color: var(--muted); }
.tile.arch { background: var(--bg); border-style: dashed; }
.tile.arch .name { color: var(--muted); }
details.past { margin-top: 18px; }
details.past summary { cursor: pointer; font-weight: 700; padding: 10px 2px; min-height: 44px; display: flex; align-items: center; }
details.past .grid { margin-top: 6px; }
details.rooms-past { margin-top: 6px; }
details.rooms-past summary { cursor: pointer; font-weight: 700; color: var(--muted); padding: 10px 4px; min-height: 44px; display: flex; align-items: center; }
details.rooms-past .room { margin-top: 6px; }
.asum.warn { background: var(--soft); border: 1px dashed var(--faint); }

/* ===== 채팅: 팀원 목록(오른쪽 위)과 1:1 대화 ===== */
.chathead { display: flex; justify-content: flex-end; margin-bottom: 8px; }
.rooms-h { font-size: .8rem; color: var(--faint); margin: 10px 4px 0; text-transform: none; letter-spacing: 0; }
.room .rt { min-width: 0; flex: 1; overflow: hidden; }
.room .rt small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.members { display: none; }
.mlist { list-style: none; margin: 0; padding: 0; display: grid; gap: 2px; }
.mem { display: flex; align-items: center; gap: 8px; width: 100%; min-height: 44px; padding: 6px 10px; text-align: left; background: none; border: 0; border-radius: 8px; cursor: pointer; }
.mem:hover, .mem[aria-expanded="true"] { background: var(--soft); }
.mem .mn { font-weight: 600; flex: 1; min-width: 0; overflow-wrap: anywhere; }
.mem .on { width: 10px; height: 10px; border-radius: 50%; background: #16a34a; flex: none; }
.mem-act { padding: 4px 10px 10px 48px; }
.mem-act .btn { width: 100%; }
dialog.modal .mdlg { padding: 20px; max-height: 80dvh; overflow-y: auto; }
dialog.modal .mdlg h2 { margin-bottom: 10px; }
@media (min-width: 1200px) {
  .chathead { display: none; }
  .chat { grid-template-columns: 260px 1fr 250px; }
  .members { display: block; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 12px; overflow-y: auto; align-self: stretch; }
  .members h2 { font-size: 1rem; margin: 2px 4px 8px; }
}
@media (max-width: 899px) { .chat[data-has-room="true"] ~ .chathead, .chathead:has(+ .chat[data-has-room="true"]) { display: none; } }
@media (min-width: 900px) and (max-width: 1199px) { .chathead + .chat { height: calc(100dvh - 184px); } }

/* ===== 작업일보: 현장 카드 ===== */
.fgrid { grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); }
.tile.fcard { padding: 0; overflow: hidden; gap: 0; min-height: 0; }
.fcard .cover { display: block; aspect-ratio: 16 / 9; background: var(--soft); overflow: hidden; }
.fcard .cover img { width: 100%; height: 100%; object-fit: cover; display: block; }
.fcard .nocover { width: 100%; height: 100%; display: grid; place-items: center; color: var(--faint); }
.fcard .nocover svg { width: 32px; height: 32px; }
.fcard .fbody { display: flex; flex-direction: column; gap: 4px; padding: 12px 14px 14px; }
.fcard .fbody .info { margin-top: 0; }
.fcard .name svg { color: var(--accent); }
.fcard:hover { transform: translateY(-2px); }
.fcard.arch .cover { filter: grayscale(.7); opacity: .8; }

/* ===== 작업일보 입력 양식 ===== */
.rform { border-top: 1px dashed var(--line); padding-top: 12px; display: grid; gap: 10px; }
.rform[hidden] { display: none; }
.rf-h { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; font-size: 1.05rem; margin: 0; }
.rf-h svg { color: var(--accent); }
.rf-h .muted { font-size: .8rem; font-weight: 400; }
.rf-s { margin: 8px 0 0; font-size: .95rem; padding-bottom: 4px; border-bottom: 2px solid var(--accent); }
.rf-grid { display: grid; gap: 10px; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); }
.rf-f { display: grid; gap: 4px; font-size: .85rem; font-weight: 700; color: var(--muted); }
.rf-f.wide { grid-column: 1 / -1; }
.rf-f input, .rf-f textarea, .rin input, .rin textarea { width: 100%; font: inherit; font-weight: 400; color: var(--fg); background: var(--card); border: 1px solid var(--line); border-radius: 8px; padding: 8px 10px; min-height: 40px; }
.rin textarea { resize: vertical; min-height: 40px; }
.rf-add { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.rf-total { font-weight: 700; color: var(--accent); }
.rf-checks { display: flex; gap: 8px 16px; flex-wrap: wrap; }
.rf-checks .chk { display: inline-flex; align-items: center; gap: 6px; min-height: 36px; font-size: .9rem; }
.rf-checks input { width: 18px; height: 18px; }

/* 표 공통 (입력·보기) */
.tscroll { max-width: 100%; }
.rt { width: 100%; border-collapse: collapse; font-size: .88rem; table-layout: fixed; }
.rt th { background: #171717; color: #fff; font-weight: 700; font-size: .8rem; padding: 7px 6px; text-align: center; }
.rt td { border-bottom: 1px solid var(--line); padding: 6px; vertical-align: middle; overflow-wrap: anywhere; }
.rt th.c1 { width: 44px; } .rt th.c2 { width: 13%; } .rt th.c5 { width: 17%; } .rt th.c3 { width: 64px; } .rt th.c4 { width: 28%; }
.rt td.ctr { text-align: center; } .rt td.pre, .rep-line.pre { white-space: pre-wrap; }
.rt.rin td { padding: 4px; border-bottom: 0; }
.rt.rin { border: 1px solid var(--line); }
.rt.rin tbody tr + tr td { border-top: 1px solid var(--line); }
.rt.rin th { background: var(--primary); color: var(--on-primary); }
#t_works th:nth-child(1) { width: 16%; } #t_works th:nth-child(3) { width: 72px; } #t_works th:nth-child(2) { width: 24%; } #t_works th:nth-child(5) { width: 15%; }
#t_next th:nth-child(1) { width: 16%; } #t_next th:nth-child(3) { width: 28%; }
#t_mat th:nth-child(2) { width: 96px; }

/* ===== 작업일보 보기 (엑셀 양식 모양) ===== */
.rep { margin: 4px 0 14px; padding: 14px 14px 0; border: 1px solid var(--line); border-radius: 8px; background: var(--card); }
.rep-co { font-size: .7rem; font-weight: 800; letter-spacing: .08em; color: #a16207; }
.rep-title { font-size: 1.7rem; margin: 2px 0 2px; letter-spacing: .12em; }
.rep-proj { color: var(--muted); font-size: 1.02rem; margin-bottom: 14px; }
.rep-info { display: grid; grid-template-columns: 1fr 1fr; gap: 0; border-top: 1px solid var(--line); border-left: 1px solid var(--line); }
.rep-info .ri { display: grid; grid-template-columns: 82px 1fr; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); min-width: 0; }
.rep-info .rl { background: #f3f2ee; color: #404040; font-weight: 700; font-size: .82rem; display: grid; place-items: center; padding: 7px 4px; text-align: center; }
.rep-info .rv { padding: 7px 10px; font-size: .92rem; overflow-wrap: anywhere; }
@media (prefers-color-scheme: dark) { .rep-info .rl { background: #263449; color: var(--fg); } }
.rep-sec { font-size: 1.02rem; margin: 18px 0 8px; padding-bottom: 5px; border-bottom: 2px solid #a16207; }
.rep-total { text-align: right; font-weight: 700; padding: 8px 2px; font-size: .92rem; }
.rep-line { margin: 6px 2px; font-size: .92rem; overflow-wrap: anywhere; }
.rep-foot { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin: 18px -14px 0; padding: 12px 14px; background: #f3f2ee; border-top: 2px solid #171717; border-bottom: 2px solid #171717; font-weight: 700; color: #171717; }
.rep-foot span:first-child { font-size: 1.15rem; }
.rep-foot span:last-child { text-align: right; font-size: .85rem; line-height: 1.7; }
@media (prefers-color-scheme: dark) { .rep-foot { background: #263449; color: var(--fg); border-color: var(--fg); } }
.rep-sum { background: var(--soft); border-radius: 8px; padding: 10px 12px; margin: 6px 0 10px; }
.rep-sum .rs-head { display: flex; flex-wrap: wrap; gap: 4px 12px; align-items: center; font-size: .88rem; color: var(--muted); }
.rep-sum .rs-head strong { color: var(--fg); display: inline-flex; align-items: center; gap: 6px; }
.rep-sum .rs-head svg { color: var(--accent); }
.rep-sum ul { margin: 6px 0 0; padding-left: 18px; font-size: .9rem; }

/* 휴대폰: 작업일보 표를 카드로 */
@media screen and (max-width: 799px) {
  .rep-info { grid-template-columns: 1fr; }
  .rep-title { font-size: 1.4rem; }
  .rt, .rt tbody, .rt tr, .rt td { display: block; width: 100%; }
  .rt thead { display: none; }
  .rt tbody tr { padding: 10px 12px; margin-bottom: 8px; border: 1px solid var(--line); border-radius: 10px; background: var(--soft); }
  .rt tbody tr.blank { display: none; }
  .rt td { border: 0; padding: 2px 0; }
  .rt td[data-l]::before { content: attr(data-l); display: block; font-size: .75rem; font-weight: 700; color: var(--muted); margin: 6px 0 2px; }
  .rt td.ctr { text-align: left; }
  .rt.rin { border: 0; }
  .rt tbody { counter-reset: row; }
  .rt tbody tr { counter-increment: row; }
  .rt tbody tr::before { content: "항목 " counter(row); display: block; font-weight: 800; margin-bottom: 2px; }
  .rt td[data-l="No"] { display: none; }
  .rt.rin tbody tr + tr td { border-top: 0; }
  .rt.rin td { padding: 2px 0; }
  .rt.rin input, .rt.rin textarea { min-height: 44px; }
  .rep-foot { flex-direction: column; align-items: flex-start; }
  .rep-foot span:last-child { text-align: left; }
}

.modal .field input[type=date] { width: 100%; }

/* ===== 채팅·댓글 첨부, 연락처, 답글, 반응 ===== */
.sendbar { flex-wrap: wrap; }
.sendbar .replybar { order: -3; flex: 0 0 100%; display: flex; align-items: center; justify-content: space-between; gap: 8px; background: var(--soft); border-left: 3px solid var(--accent); border-radius: 8px; padding: 6px 8px 6px 10px; font-size: .88rem; min-width: 0; }
.sendbar .replybar[hidden] { display: none; }
.sendbar .replybar > span { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; display: inline-flex; align-items: center; gap: 6px; }
.sendbar .replybar .rqt { color: var(--muted); overflow: hidden; text-overflow: ellipsis; }
.sendbar .atray { order: -2; flex: 0 0 100%; }
.sendbar .attwrap { order: -1; }
.atray { display: flex; flex-wrap: wrap; gap: 8px; }
.atray[hidden] { display: none; }
.atray .at { position: relative; border-radius: 8px; background: var(--soft); overflow: hidden; min-height: 44px; display: flex; align-items: center; }
.atray .at.image, .atray .at.video { width: 72px; height: 72px; }
.atray .at img, .atray .at video { width: 100%; height: 100%; object-fit: cover; display: block; }
.atray .at .atn { display: inline-flex; align-items: center; gap: 6px; padding: 6px 36px 6px 10px; font-size: .88rem; max-width: 240px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.atray .at button { position: absolute; top: 2px; right: 2px; width: 28px; height: 28px; border-radius: 50%; border: 0; background: rgb(0 0 0 / .65); color: #fff; cursor: pointer; display: grid; place-items: center; padding: 0; }
.atray .at.busy { padding: 8px 12px; font-size: .85rem; color: var(--muted); }
.attwrap { position: relative; }
.attbtn { background: var(--soft); border-color: var(--line); }
.attmenu { position: absolute; bottom: calc(100% + 6px); left: 0; z-index: 30; min-width: 190px; background: var(--card); border: 1px solid var(--line); border-radius: 12px; box-shadow: 0 8px 28px rgb(0 0 0 / .18); padding: 6px; display: grid; }
.attmenu[hidden] { display: none; }
.attmenu button { display: flex; align-items: center; gap: 10px; min-height: 44px; padding: 8px 12px; border: 0; background: none; color: var(--fg); font: inherit; border-radius: 8px; cursor: pointer; text-align: left; }
.attmenu button:hover, .attmenu button:focus-visible { background: var(--soft); }
.cform { grid-template-columns: 1fr auto; align-items: center; }
.cform .atray, .cform .cwrap { grid-column: 1 / -1; }
.cform .attwrap { justify-self: start; }

.msg .bubble { cursor: pointer; }
.msg .bubble:focus-visible { outline: 2px solid var(--ring); outline-offset: 2px; }
.msg .mtxt { white-space: pre-wrap; overflow-wrap: anywhere; }
.msg .rq { background: rgb(0 0 0 / .08); border-left: 3px solid var(--accent); border-radius: 6px; padding: 4px 8px; margin-bottom: 6px; font-size: .82rem; opacity: .92; max-height: 3.2em; overflow: hidden; cursor: pointer; }
.msg.mine .rq { background: rgb(255 255 255 / .16); }
.msg.flash .bubble { animation: flashbg 1.5s ease; }
@keyframes flashbg { 0%, 60% { box-shadow: 0 0 0 3px var(--accent); } 100% { box-shadow: 0 0 0 0 transparent; } }
.msg .macts { display: inline-flex; gap: 4px; margin: 4px 0 0; padding: 4px; background: var(--card); border: 1px solid var(--line); border-radius: 999px; box-shadow: 0 2px 10px rgb(0 0 0 / .12); }
.msg .macts button { display: inline-flex; align-items: center; gap: 6px; min-height: 40px; padding: 6px 12px; border: 0; background: none; border-radius: 999px; color: var(--fg); font: inherit; font-size: .88rem; cursor: pointer; }
.msg .macts button:hover { background: var(--soft); }
.msg .macts button[aria-pressed="true"] { color: var(--accent); font-weight: 700; }
.msg .rx { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 4px; }
.msg.mine .rx { justify-content: flex-end; }
.msg .rx:empty { display: none; }
.rxc { display: inline-flex; align-items: center; gap: 4px; min-height: 28px; padding: 2px 10px; border: 1px solid var(--line); border-radius: 999px; background: var(--card); color: var(--fg); font-size: .8rem; cursor: pointer; }
.rxc svg { width: 14px; height: 14px; }
.rxc.on { border-color: var(--accent); background: var(--accent-soft); color: #7c2d12; }
@media (prefers-color-scheme: dark) { .rxc.on { color: var(--fg); } }

.cfiles { display: grid; gap: 6px; margin-top: 6px; }
.msg .bubble > .cfiles:first-child, .cm .ct + .cfiles { margin-top: 0; }
.cf-img { padding: 0; border: 0; background: var(--soft); border-radius: 10px; overflow: hidden; cursor: zoom-in; max-width: 240px; }
.cf-img img { display: block; width: 100%; max-height: 260px; object-fit: cover; }
.cf-vid { max-width: 100%; width: 260px; border-radius: 10px; background: #000; }
.cf-file { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; padding: 8px 12px; border-radius: 10px; background: var(--card); color: var(--fg); border: 1px solid var(--line); text-decoration: none; max-width: 100%; }
.cf-file .cfn { overflow-wrap: anywhere; min-width: 0; }
.cf-file .cfs { color: var(--faint); font-size: .75rem; white-space: nowrap; }
.ccard { background: var(--card); color: var(--fg); border: 1px solid var(--line); border-radius: 12px; padding: 10px 12px; display: grid; gap: 4px; min-width: 200px; text-align: left; }
.msg + .msg .ccard, .ccard + .cfiles { margin-top: 0; }
.ccard .cc-name { display: flex; align-items: center; gap: 8px; }
.ccard .cc-name svg { color: var(--accent); }
.ccard .cc-row { color: var(--accent); text-decoration: none; padding: 4px 0; min-height: 32px; display: flex; align-items: center; overflow-wrap: anywhere; }
.ccard .cc-save { justify-self: start; margin-top: 4px; }
.cm .cb .cfiles { margin-top: 6px; }
.msg .bubble { white-space: normal; }

/* ===== 채팅 날짜 구분선·검색 ===== */
.conv .top .ttl { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dsep { display: flex; align-items: center; gap: 10px; margin: 14px 0 6px; color: var(--faint); font-size: .78rem; align-self: stretch; }
.dsep::before, .dsep::after { content: ""; flex: 1; height: 1px; background: var(--line); }
.dsep span { background: var(--soft); border-radius: 999px; padding: 3px 12px; font-weight: 600; color: var(--muted); }
.schpanel { border-bottom: 1px solid var(--line); background: var(--card); padding: 10px 12px; display: grid; gap: 8px; max-height: 50%; overflow: auto; }
.schpanel[hidden] { display: none; }
.schform { display: grid; gap: 8px; }
.schrow { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.schrow input[type=search] { flex: 1; min-width: 0; }
.schrow.dates label { display: inline-flex; align-items: center; gap: 6px; font-size: .85rem; color: var(--muted); }
.schrow.dates input[type=date] { min-height: 40px; }
.schrow .chk { gap: 6px; }
.schres { display: grid; gap: 6px; }
.schres .sumline { font-size: .82rem; color: var(--muted); }
.sres { display: grid; gap: 2px; text-align: left; width: 100%; padding: 8px 10px; border: 1px solid var(--line); border-radius: 10px; background: var(--bg); color: var(--fg); font: inherit; cursor: pointer; min-height: 44px; }
.sres:hover, .sres:focus-visible { border-color: var(--accent); }
.sres .sm1 { display: flex; align-items: center; gap: 8px; font-size: .8rem; flex-wrap: wrap; }
.sres .sm1 time { color: var(--faint); margin-left: auto; }
.sres .sm2 { overflow-wrap: anywhere; font-size: .92rem; }
.rchip { background: var(--accent-soft); color: #7c2d12; border-radius: 999px; padding: 1px 8px; font-size: .72rem; }
@media (prefers-color-scheme: dark) { .rchip { color: var(--fg); } }
mark { background: #fde68a; color: #1c1917; border-radius: 3px; padding: 0 2px; }
.afterbar { display: flex; gap: 8px; justify-content: center; flex-wrap: wrap; padding: 12px 0; }

/* PC 우클릭 메뉴 */
.ctxmenu { position: fixed; z-index: 200; min-width: 170px; background: var(--card); border: 1px solid var(--line); border-radius: 12px; box-shadow: 0 10px 30px rgb(0 0 0 / .22); padding: 6px; display: grid; }
.ctxmenu button { display: flex; align-items: center; gap: 10px; min-height: 40px; padding: 8px 12px; border: 0; background: none; color: var(--fg); font: inherit; border-radius: 8px; cursor: pointer; text-align: left; }
.ctxmenu button:hover, .ctxmenu button:focus-visible { background: var(--soft); outline: none; }
.ctxmenu button[aria-pressed="true"] { color: var(--accent); font-weight: 700; }

/* ===== 업무요청 ===== */
.tsum { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px; margin-bottom: 20px; }
.tsum-h { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-bottom: 10px; }
.tsum-h h2 { margin: 0; font-size: 1.05rem; display: inline-flex; align-items: center; gap: 8px; }
.tsum-h h2 svg { color: var(--accent); }
.tcounts { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 8px; margin-bottom: 12px; }
.tcount { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; padding: 10px 6px; border: 1px solid var(--line); border-radius: 10px; background: var(--bg); text-decoration: none; color: var(--fg); min-height: 64px; }
.tcount:hover { border-color: var(--accent); }
.tcount .n { font-size: 1.5rem; font-weight: 800; line-height: 1.1; }
.tcount .l { font-size: .78rem; color: var(--muted); text-align: center; }
.tcount.ts-doing .n { color: #1d4ed8; } .tcount.ts-hold .n { color: #a16207; } .tcount.ts-done .n { color: #15803d; } .tcount.mine .n { color: var(--accent); }
@media (prefers-color-scheme: dark) { .tcount.ts-doing .n { color: #93c5fd; } .tcount.ts-hold .n { color: #fcd34d; } .tcount.ts-done .n { color: #86efac; } }
.tlist { display: grid; gap: 8px; }
.tempty { margin: 4px 0 0; }
.trow { display: grid; gap: 6px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 10px; background: var(--bg); color: var(--fg); text-decoration: none; }
.trow:hover, .trow:focus-visible { border-color: var(--accent); }
.trow.is-done .ttl { text-decoration: line-through; color: var(--muted); }
.trow .t1 { display: flex; align-items: center; gap: 8px; min-width: 0; }
.trow .ttl { overflow-wrap: anywhere; }
.trow .t2 { display: flex; align-items: center; gap: 6px 10px; flex-wrap: wrap; font-size: .84rem; color: var(--muted); }
.trow .t2 em { font-style: normal; color: var(--faint); }
.trow .cnt { display: inline-flex; align-items: center; gap: 3px; }
.trow .cnt svg { width: 14px; height: 14px; }
.pchip, .tchip { display: inline-flex; align-items: center; padding: 1px 9px; border-radius: 999px; font-size: .74rem; font-weight: 700; white-space: nowrap; flex: none; }
.pchip.p-urgent { background: #fee2e2; color: #991b1b; } .pchip.p-high { background: #ffedd5; color: #9a3412; } .pchip.p-normal { background: var(--soft); color: var(--muted); } .pchip.p-low { background: var(--soft); color: var(--faint); }
.tchip.ts-todo { background: var(--soft); color: var(--muted); } .tchip.ts-doing { background: #dbeafe; color: #1e40af; } .tchip.ts-hold { background: #fef3c7; color: #92400e; } .tchip.ts-done { background: #dcfce7; color: #166534; }
@media (prefers-color-scheme: dark) { .pchip.p-urgent { background: #7f1d1d; color: #fecaca; } .pchip.p-high { background: #7c2d12; color: #fed7aa; } .tchip.ts-doing { background: #1e3a8a; color: #bfdbfe; } .tchip.ts-hold { background: #78350f; color: #fde68a; } .tchip.ts-done { background: #14532d; color: #bbf7d0; } }
.due { display: inline-flex; align-items: center; gap: 4px; font-weight: 600; }
.due svg { width: 14px; height: 14px; }
.due.late { color: #b91c1c; } .due.soon { color: #c2410c; } .due.none { color: var(--faint); font-weight: 400; }
@media (prefers-color-scheme: dark) { .due.late { color: #fca5a5; } .due.soon { color: #fdba74; } }
.tkbar { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.tkbar input[type=search] { flex: 1; min-width: 160px; }
.seg { display: inline-flex; border: 1px solid var(--line); border-radius: 10px; overflow: hidden; background: var(--card); }
.seg button { min-height: 40px; padding: 6px 12px; border: 0; background: none; color: var(--fg); font: inherit; font-size: .88rem; cursor: pointer; }
.seg button + button { border-left: 1px solid var(--line); }
.seg button[aria-pressed="true"] { background: var(--primary); color: var(--on-primary); font-weight: 700; }
.tdetail { display: grid; gap: 14px; }
.td-head { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; align-items: flex-start; }
.td-head h1 { margin: 6px 0 0; overflow-wrap: anywhere; }
.td-badges { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.tstatus { justify-self: start; max-width: 100%; overflow-x: auto; }
.tmeta { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 10px 16px; margin: 0; }
.tmeta dt { font-size: .78rem; color: var(--muted); } .tmeta dd { margin: 2px 0 0; font-weight: 600; overflow-wrap: anywhere; }
.tmeta em { font-style: normal; color: var(--faint); font-weight: 400; }
.tsec { font-size: .95rem; margin: 4px 0 -4px; }
.tmodal { width: min(560px, calc(100vw - 24px)); }
.tmodal .trow2 { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.tmodal input[type=date], .tmodal select, .tmodal textarea, .tmodal input:not([type=checkbox]):not([type=file]) { width: 100%; }
.tk-old { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 6px; }
.tk-f { display: inline-flex; align-items: center; gap: 6px; background: var(--soft); border-radius: 8px; padding: 4px 4px 4px 10px; font-size: .86rem; }
.tk-f button { width: 28px; height: 28px; border: 0; background: none; cursor: pointer; color: var(--muted); display: grid; place-items: center; padding: 0; }
.tk-att { display: grid; gap: 8px; }
.tk-att .attwrap { justify-self: start; }
.tk-att .atray { order: 0; }
@media (max-width: 599px) {
  .tcounts { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .tmodal .trow2 { grid-template-columns: 1fr; }
  .tkbar .seg { width: 100%; } .tkbar .seg button { flex: 1; padding: 6px 4px; font-size: .8rem; }
}
.tcounts.t3 { grid-template-columns: repeat(3, minmax(0, 1fr)); max-width: 520px; margin-bottom: 18px; }
.tcount.late .n { color: #b91c1c; }
@media (prefers-color-scheme: dark) { .tcount.late .n { color: #fca5a5; } }
.tgroup { margin-bottom: 18px; }
.tgroup h2 { font-size: .95rem; margin: 0 0 8px; display: flex; align-items: center; gap: 6px; }
.tgroup.g-late h2 { color: #b91c1c; }
@media (prefers-color-scheme: dark) { .tgroup.g-late h2 { color: #fca5a5; } }
.trw { display: flex; gap: 8px; align-items: stretch; }
.trw .trow { flex: 1; min-width: 0; }
.trw > .btn { align-self: center; flex: none; min-height: 44px; }
.tkbar .chk { display: inline-flex; align-items: center; gap: 6px; font-size: .88rem; }

/* ===== 체크리스트 · 캘린더 업무 마감 ===== */
.trow .cnt.allok { color: #15803d; font-weight: 700; }
.tcheck { display: grid; gap: 8px; }
.tcheck .tsec .muted { font-weight: 400; font-size: .85rem; margin-left: 6px; }
.tbar { height: 8px; border-radius: 999px; background: var(--soft); overflow: hidden; }
.tbar i { display: block; height: 100%; background: var(--accent); border-radius: 999px; transition: width .2s; }
.titems { list-style: none; margin: 0; padding: 0; display: grid; gap: 2px; }
.titems li { display: flex; align-items: center; gap: 6px; border-bottom: 1px solid var(--line); padding: 2px 0; }
.titems li .tcb { flex: 1; display: flex; align-items: center; gap: 10px; min-height: 44px; cursor: pointer; min-width: 0; }
.titems li .tcb input { width: 20px; height: 20px; flex: none; }
.titems li .tx { overflow-wrap: anywhere; }
.titems li.done .tx { text-decoration: line-through; color: var(--muted); }
.titems li .who { font-size: .76rem; color: var(--faint); white-space: nowrap; }
.titems li .btn.icon { width: 36px; height: 36px; }
.titem-add { display: flex; gap: 8px; }
.titem-add input { flex: 1; min-width: 0; }
.evchip.tkchip { display: flex; align-items: center; gap: 3px; text-decoration: none; background: transparent; border: 1px dashed var(--accent); color: var(--fg); }
.evchip.tkchip svg { width: 12px; height: 12px; flex: none; color: var(--accent); }
.evchip.tkchip.late { border-color: #b91c1c; color: #b91c1c; }
.evchip.tkchip.ts-done { border-style: solid; border-color: var(--line); color: var(--faint); text-decoration: line-through; }
i.tkdot { background: transparent !important; border: 2px solid var(--accent); box-sizing: border-box; }
.agtasks { display: grid; gap: 6px; margin-bottom: 12px; }
.agtasks > .sub { font-size: .8rem; color: var(--muted); }
.agrow.agtask { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--fg); }
.agrow.agtask svg { color: var(--accent); flex: none; }
.agrow.agtask.ts-done strong { text-decoration: line-through; color: var(--muted); }

/* ===== 인사정보 · 캘린더 행사 ===== */
.hrmodal { width: min(620px, calc(100vw - 24px)); max-height: calc(100dvh - 24px); overflow: auto; }
.hr-h { font-size: .95rem; margin: 16px 0 6px; padding-bottom: 4px; border-bottom: 2px solid var(--accent); }
.hr-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0 12px; }
.hr-grid3 { display: grid; grid-template-columns: 1fr 1fr 1.3fr; gap: 0 12px; }
.hrmodal input:not([type=checkbox]), .hrmodal select, .hrmodal textarea { width: 100%; }
.hr-note { font-size: .82rem; margin: 8px 0 0; }
.rrn-cur { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-bottom: 6px; }
.rrn-cur b { font-variant-numeric: tabular-nums; letter-spacing: .02em; }
@media (max-width: 599px) { .hr-grid, .hr-grid3 { grid-template-columns: 1fr; } }
.evchip.hrchip { display: flex; align-items: center; gap: 3px; background: #fef3c7; color: #78350f; cursor: default; }
.evchip.hrchip svg { width: 12px; height: 12px; flex: none; }
.evchip.hrchip.anniversary { background: #e0e7ff; color: #3730a3; }
@media (prefers-color-scheme: dark) { .evchip.hrchip { background: #78350f; color: #fef3c7; } .evchip.hrchip.anniversary { background: #3730a3; color: #e0e7ff; } }
i.hrdot { background: #f59e0b !important; }
.agrow.hrrow { display: flex; align-items: center; gap: 10px; }
.agrow.hrrow svg { color: #d97706; flex: none; }

/* 채팅 팀원 기본정보 카드 */
.mem-act { display: grid; gap: 8px; }
.mcard { background: var(--soft); border-radius: 10px; padding: 8px 10px; font-size: .86rem; display: grid; gap: 6px; }
.mdl { margin: 0; display: grid; gap: 4px; }
.mdl > div { display: grid; grid-template-columns: 52px 1fr; gap: 6px; align-items: baseline; }
.mdl dt { color: var(--muted); font-size: .78rem; }
.mdl dd { margin: 0; overflow-wrap: anywhere; font-weight: 600; }
.mdl a { color: var(--accent); text-decoration: none; }
.mcard .mnone { margin: 0; }

/* ===== 출퇴근 ===== */
.attmodal { width: min(560px, calc(100vw - 24px)); max-height: calc(100dvh - 24px); overflow: auto; }
.attpunch { text-align: center; display: grid; gap: 12px; justify-items: center; }
.attpunch .clock { font-size: 2.6rem; font-weight: 800; font-variant-numeric: tabular-nums; letter-spacing: .02em; line-height: 1.1; }
.attpunch .field { width: min(360px, 100%); text-align: left; margin: 0; }
.attpunch select { width: 100%; }
.attbig { min-height: 64px; width: min(360px, 100%); font-size: 1.25rem; font-weight: 800; border-radius: 16px; display: inline-flex; align-items: center; justify-content: center; gap: 8px; }
.attbig.out { background: #b45309; border-color: #b45309; color: #fff; }
.attbig .ic { width: 22px; height: 22px; }
.attst { font-size: .95rem; }
.attstate { display: inline-block; padding: 2px 10px; border-radius: 999px; font-weight: 700; font-size: .8rem; }
.attstate.in { background: #dcfce7; color: #166534; } .attstate.out { background: var(--soft); color: var(--muted); } .attstate.none { background: #fee2e2; color: #991b1b; }
.attmbar { display: flex; align-items: center; gap: 8px; margin-bottom: 12px; flex-wrap: wrap; }
.attmbar .grow { flex: 1; }
.atiles { grid-template-columns: repeat(5, minmax(0, 1fr)); }
.atiles .tcount .n { font-size: 1.05rem; text-align: center; }
.attdays { display: grid; gap: 8px; }
.attday { border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; display: grid; gap: 4px; background: var(--card); }
.attday.hol { background: color-mix(in srgb, #f59e0b 8%, var(--card)); }
.attday .dd { display: flex; gap: 8px; align-items: center; }
.attday .tm { font-variant-numeric: tabular-nums; }
.attday .nums { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; }
.chip-s { display: inline-block; padding: 1px 8px; border-radius: 999px; font-size: .74rem; font-weight: 700; background: var(--soft); color: var(--muted); }
.chip-s.ot { background: #dbeafe; color: #1e40af; } .chip-s.nt { background: #ede9fe; color: #5b21b6; } .chip-s.hol { background: #fef3c7; color: #92400e; } .chip-s.warn { background: #fee2e2; color: #991b1b; }
@media (prefers-color-scheme: dark) { .attstate.in { background: #14532d; color: #bbf7d0; } .attstate.none { background: #7f1d1d; color: #fecaca; } .chip-s.ot { background: #1e3a8a; color: #dbeafe; } .chip-s.nt { background: #4c1d95; color: #ede9fe; } .chip-s.hol { background: #78350f; color: #fef3c7; } .chip-s.warn { background: #7f1d1d; color: #fecaca; } }
.attlist { padding-left: 18px; display: grid; gap: 8px; font-size: .92rem; }
.atabs { margin-bottom: 14px; flex-wrap: wrap; }
.tablewrap { overflow-x: auto; }
.atable { width: 100%; border-collapse: collapse; font-size: .9rem; }
.atable th, .atable td { padding: 8px 10px; text-align: left; border-bottom: 1px solid var(--line); white-space: nowrap; }
.atable td.hi { font-weight: 800; color: #1e40af; }
.attnote { font-size: .82rem; margin-top: 8px; }
.attrow, .attreq, .attsite, .attprof { gap: 8px; flex-wrap: wrap; }
.attsite .rad { width: 80px; }
.attprof input[type=time] { width: 112px; }
.attedit { border: 1px solid var(--line); border-radius: 10px; padding: 10px; margin-bottom: 10px; }
@media (max-width: 599px) { .atiles { grid-template-columns: repeat(2, minmax(0, 1fr)); } .attpunch .clock { font-size: 2.2rem; } }

.attsub { width: min(360px, 100%); min-height: 48px; display: inline-flex; align-items: center; justify-content: center; gap: 6px; font-weight: 700; }
.attnet { font-size: .85rem; font-weight: 700; padding: 2px 10px; border-radius: 999px; }
.attnet.on { background: #dcfce7; color: #166534; } .attnet.off { background: var(--soft); color: var(--muted); }
@media (prefers-color-scheme: dark) { .attnet.on { background: #14532d; color: #bbf7d0; } }
.attsite input.grow { min-width: 0; }

/* ===== 지출결의서 원가 정산 ===== */
.costbox, .costview { margin-top: 16px; }
.costcalc { background: var(--soft); border-radius: 10px; padding: 10px 12px; font-size: .9rem; line-height: 1.6; }
.costcalc .warn { color: #b91c1c; font-weight: 600; }
@media (prefers-color-scheme: dark) { .costcalc .warn { color: #fca5a5; } }
.costview .mdl > div { grid-template-columns: 90px 1fr; }

.costlines { display: grid; gap: 6px; margin-bottom: 12px; }
.costlines .cl { display: grid; grid-template-columns: 28px minmax(0, 1.2fr) minmax(0, 2fr); gap: 8px; align-items: baseline; padding: 8px 10px; border: 1px solid var(--line); border-radius: 10px; background: var(--card); font-size: .9rem; }
.costlines .cl.bad { border-color: #f59e0b; background: color-mix(in srgb, #f59e0b 8%, var(--card)); }
.costlines .cl.ctot { background: var(--soft); border-color: transparent; font-weight: 600; }
.costlines .cn { color: var(--muted); font-weight: 700; text-align: center; }
.costlines .warn { color: #b91c1c; font-weight: 600; }
@media (max-width: 599px) { .costlines .cl { grid-template-columns: 24px 1fr; } .costlines .cr { grid-column: 2; } }
.ctable .num { text-align: right; font-variant-numeric: tabular-nums; }
.ctable .ctotal td { font-weight: 800; background: var(--soft); }
.rolesel { font-size: .8rem; margin-top: 4px; }

.atable td.in select { min-width: 7.5em; }

/* ===== 견적·원가 분석 ===== */
.anp { grid-template-columns: repeat(5, minmax(0, 1fr)); }
.anp .tcount .n { font-size: 1.05rem; text-align: center; }
.anp .tcount.neg .n { color: #b91c1c; }
.anest { gap: 8px; flex-wrap: wrap; }
.anest select { min-width: 9em; }
.anign { font-size: .84rem; margin: 8px 0 0; }
.antable .num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.antable .neg { color: #b91c1c; font-weight: 600; }
.antable tr.common td { color: var(--muted); }
.antable .rate { font-weight: 700; margin-right: 6px; }
.antable .rate.warn { color: #b45309; } .antable .rate.over { color: #b91c1c; }
.antable .bar { display: inline-block; width: 56px; height: 6px; background: var(--soft); border-radius: 3px; vertical-align: middle; overflow: hidden; }
.antable .bar i { display: block; height: 100%; background: var(--accent); }
@media (max-width: 799px) { .anp { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

/* 결재 목록: 선택 삭제 */
.selbar { position: sticky; top: 0; z-index: 5; display: flex; align-items: center; gap: 8px; padding: 10px 12px; margin-bottom: 10px; background: var(--card); border: 1px solid var(--accent); border-radius: 10px; }
.selrow { cursor: pointer; align-items: center; gap: 10px; }
.selrow input[type=checkbox] { width: 20px; height: 20px; flex: none; }

/* 채팅: 안 읽은 사람 수 (카카오톡처럼) */
.msg .rdn { color: var(--accent); font-weight: 600; margin-right: 4px; }

/* ===== 검색·필터 입력 디자인 통일 (둥근 모서리, 부드러운 테두리, 선명한 포커스) ===== */
:root { --ctl-r: 10px; --ctl-line: #cbd5e1; --ctl-focus: rgb(194 65 12 / .16); }
@media (prefers-color-scheme: dark) { :root { --ctl-line: #475569; --ctl-focus: rgb(251 146 60 / .22); } }
input[type=search], input[type=date], input[type=time], input[type=month], input[type=number], input[type=tel], input[type=url],
input[type=text], input[type=password], input[type=email], select, textarea {
  border: 1px solid var(--ctl-line); border-radius: var(--ctl-r); background-color: var(--card); color: var(--fg);
  min-height: 44px; padding: 8px 12px; transition: border-color .15s, box-shadow .15s, background-color .15s;
}
input[type=search], input[type=date], input[type=time], input[type=month], input[type=number], input[type=tel], input[type=url] { font-size: .95rem; }
input:hover:not(:disabled), select:hover:not(:disabled), textarea:hover:not(:disabled) { border-color: var(--faint); }
input[type=search]:focus, input[type=date]:focus, input[type=time]:focus, input[type=month]:focus, input[type=number]:focus, input[type=tel]:focus, input[type=url]:focus,
input[type=text]:focus, input[type=password]:focus, input[type=email]:focus, select:focus, textarea:focus {
  outline: none; border-color: var(--accent); box-shadow: 0 0 0 4px var(--ctl-focus);
}
input::placeholder, textarea::placeholder { color: var(--faint); opacity: .85; }
/* 검색창: 알약 모양 + 돋보기 아이콘 */
input[type=search] {
  -webkit-appearance: none; appearance: none; width: 100%; padding-left: 42px; padding-right: 14px; border-radius: 999px; background-color: var(--soft);
  border-color: transparent;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='18' height='18' viewBox='0 0 24 24' fill='none' stroke='%2394a3b8' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='11' cy='11' r='7'/%3E%3Cpath d='m20 20-3.5-3.5'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: 15px center; background-size: 18px;
}
input[type=search]:hover:not(:disabled) { border-color: var(--ctl-line); }
input[type=search]:focus { background-color: var(--card); }
input[type=search]::-webkit-search-cancel-button { -webkit-appearance: none; height: 16px; width: 16px; cursor: pointer; opacity: .55;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2364748b' stroke-width='2.4' stroke-linecap='round'%3E%3Cpath d='M6 6l12 12M18 6 6 18'/%3E%3C/svg%3E") center / 16px no-repeat; }
input[type=search]::-webkit-search-cancel-button:hover { opacity: 1; }
/* 선택 상자: 화살표 직접 그리기 */
select {
  -webkit-appearance: none; appearance: none; padding-right: 36px; cursor: pointer;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%2364748b' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 12px center; background-size: 16px;
}
input[type=date]::-webkit-calendar-picker-indicator, input[type=time]::-webkit-calendar-picker-indicator, input[type=month]::-webkit-calendar-picker-indicator { cursor: pointer; opacity: .6; border-radius: 6px; padding: 2px; }
input[type=date]::-webkit-calendar-picker-indicator:hover, input[type=time]::-webkit-calendar-picker-indicator:hover { opacity: 1; background: var(--soft); }
@media (prefers-color-scheme: dark) { input[type=date], input[type=time], input[type=month] { color-scheme: dark; } }
input[type=checkbox], input[type=radio] { accent-color: var(--accent); }
dialog.modal.sheet input[type=date], .modal .field input[type=date] { border-radius: var(--ctl-r); }
/* 표 안 입력칸은 그대로 (엑셀처럼 테두리 없음) */
.atable td.in input, .atable td.in select, .atable td.in textarea { border-radius: 0; box-shadow: none; }
@media (max-width: 720px) { .atable td.in input, .atable td.in select, .atable td.in textarea { border-radius: var(--ctl-r); } }

/* 채팅 검색 패널 */
.schpanel { background: var(--bg); padding: 14px 16px; gap: 12px; }
.schform { gap: 12px; }
.schrow { gap: 10px; }
.schrow .btn { min-height: 44px; border-radius: 999px; padding: 0 20px; }
.schrow.dates { gap: 10px 14px; }
.schrow.dates label { margin: 0; font-size: .82rem; font-weight: 600; color: var(--muted); gap: 8px; }
.schrow.dates input[type=date] { min-height: 40px; width: auto; }
.schrow .chk { margin: 0 0 0 2px; font-weight: 600; color: var(--muted); cursor: pointer; }
.schrow #schClear { border-radius: 999px; background: transparent; border-color: var(--ctl-line); color: var(--muted); min-height: 40px; padding: 0 16px; }
.schrow #schClear:hover { background: var(--soft); }
/* 일반 필터 패널 (결재·경비·업무 등) */
.filters { border-radius: 14px; overflow: hidden; }
.filters summary { padding: 12px 18px; }
.fgrid { padding: 2px 18px 16px; gap: 0 14px; }
.fgrid .field > label, .rf-f > span { font-size: .8rem; color: var(--muted); }
.fgrid .fbtn .btn { border-radius: 999px; padding: 0 20px; }
.tkbar { gap: 10px; }
.tkbar input[type=search] { min-width: 200px; }
.seg { border-radius: 999px; }
.seg button[aria-pressed="true"] { box-shadow: inset 0 0 0 1px rgb(255 255 255 / .06); }
.schrow .chk input[type=checkbox], .filters input[type=checkbox] { -webkit-appearance: none; appearance: none; width: 20px; height: 20px; border: 1.5px solid var(--ctl-line); border-radius: 6px; background: var(--card); display: inline-grid; place-content: center; cursor: pointer; transition: background .15s, border-color .15s; }
.schrow .chk input[type=checkbox]:checked, .filters input[type=checkbox]:checked { background: var(--accent); border-color: var(--accent); }
.schrow .chk input[type=checkbox]:checked::after, .filters input[type=checkbox]:checked::after { content: ""; width: 5px; height: 10px; border: solid var(--on-accent); border-width: 0 2.2px 2.2px 0; transform: translateY(-1px) rotate(45deg); }
.schrow .chk input[type=checkbox]:focus-visible, .filters input[type=checkbox]:focus-visible { outline: none; box-shadow: 0 0 0 4px var(--ctl-focus); }

/* 출퇴근 관리: 간단 필터 줄 */
.attfilter { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin: 4px 0 12px; }
.attfilter select { width: auto; min-width: 140px; min-height: 40px; }
.attfilter .chk { display: inline-flex; align-items: center; gap: 8px; margin: 0; padding: 8px 14px; border: 1px solid var(--ctl-line); border-radius: 999px; background: var(--card); font-weight: 600; cursor: pointer; }
.attfilter .chk input[type=checkbox] { -webkit-appearance: none; appearance: none; width: 18px; height: 18px; border: 1.5px solid var(--ctl-line); border-radius: 5px; background: var(--card); display: inline-grid; place-content: center; cursor: pointer; }
.attfilter .chk input[type=checkbox]:checked { background: var(--accent); border-color: var(--accent); }
.attfilter .chk input[type=checkbox]:checked::after { content: ""; width: 4px; height: 9px; border: solid var(--on-accent); border-width: 0 2px 2px 0; transform: translateY(-1px) rotate(45deg); }

/* ===== 출퇴근 관리 팝업: 여백 넉넉하게 ===== */
dialog.modal.attmodal { padding: 26px 26px 22px; width: min(600px, calc(100vw - 24px)); }
dialog.modal.attmodal form { padding: 0; }
dialog.modal.attmodal h2 { margin: 0 0 18px; font-size: 1.15rem; }
dialog.modal.attmodal .atiles { gap: 10px; margin-bottom: 18px; }
dialog.modal.attmodal .tools { margin-bottom: 18px; }
dialog.modal.attmodal .attdays { gap: 12px; }
dialog.modal.attmodal .attday { padding: 14px 16px; gap: 8px; border-radius: 12px; }
dialog.modal.attmodal .attday .btn { margin-top: 6px; }
dialog.modal.attmodal .attedit { padding: 16px 18px; margin-bottom: 14px; border-radius: 12px; display: grid; gap: 12px; }
dialog.modal.attmodal .attedit .hr-grid { gap: 14px; }
dialog.modal.attmodal .attedit .field { margin-bottom: 0; }
dialog.modal.attmodal .attedit .tools { margin: 0; gap: 10px; }
dialog.modal.attmodal .foot { margin-top: 20px; padding-top: 16px; border-top: 1px solid var(--line); }
dialog.modal.attmodal .err { margin-bottom: 4px; }
@media (max-width: 599px) { dialog.modal.attmodal { padding: 20px 16px 16px; } }

/* ===== 견적·원가: 핵심 금액 카드 + 보기 편한 표 ===== */
.kpis { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; margin: 4px 0 14px; }
.kpi { display: flex; flex-direction: column; gap: 6px; padding: 18px 20px; background: var(--card); border: 1px solid var(--line); border-radius: 14px; min-width: 0; }
.kpi .kl { font-size: .84rem; font-weight: 700; color: var(--muted); }
.kpi .kn { font-size: 1.75rem; font-weight: 800; line-height: 1.15; letter-spacing: -.01em; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.kpi .kn small { font-size: .95rem; font-weight: 700; color: var(--muted); margin-left: 3px; }
.kpi .ks { font-size: .8rem; color: var(--faint); }
.kpi .ks b { color: var(--muted); font-weight: 700; font-variant-numeric: tabular-nums; }
.kpi.contract { background: var(--primary); border-color: var(--primary); }
.kpi.contract .kl, .kpi.contract .kn small, .kpi.contract .ks, .kpi.contract .ks b { color: color-mix(in srgb, var(--on-primary) 78%, transparent); }
.kpi.contract .kn { color: var(--on-primary); }
.kpi.profit .kn { color: #15803d; } .kpi.profit.neg .kn { color: #b91c1c; }
.kpi.rate .kn { color: var(--fg); } .kpi.rate.warn .kn { color: #b45309; } .kpi.rate.over .kn { color: #b91c1c; }
.kbar { display: block; height: 8px; border-radius: 99px; background: var(--soft); overflow: hidden; margin-top: 4px; }
.kbar i { display: block; height: 100%; border-radius: 99px; background: var(--accent); }
.kpi.rate.warn .kbar i { background: #d97706; } .kpi.rate.over .kbar i { background: #dc2626; }
.kpnote { font-size: .84rem; color: var(--muted); background: var(--soft); border-radius: 10px; padding: 9px 14px; margin: 0 0 10px; }
@media (prefers-color-scheme: dark) { .kpi.profit .kn { color: #86efac; } .kpi.profit.neg .kn, .kpi.rate.over .kn { color: #fca5a5; } .kpi.rate.warn .kn { color: #fcd34d; } }
@media (max-width: 1000px) { .kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 480px) { .kpi { padding: 14px 16px; } .kpi .kn { font-size: 1.45rem; } }

.antr, .anlist { padding: 20px 22px; margin-bottom: 16px; }
.anhead { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; margin-bottom: 12px; }
.anhead h2 { margin: 0; }
.antable { border-collapse: separate; border-spacing: 0; font-size: .92rem; }
.antable th, .antable td { border-bottom: 1px solid var(--line); padding: 12px 14px; }
.antable thead th { position: sticky; top: 0; background: var(--soft); color: var(--muted); font-size: .8rem; font-weight: 700; line-height: 1.3; vertical-align: bottom; border-bottom: 1px solid var(--ctl-line); }
.antable thead th:first-child { border-top-left-radius: 10px; } .antable thead th:last-child { border-top-right-radius: 10px; }
.antable thead th small { display: block; font-weight: 500; color: var(--faint); }
.antable th.num, .antable td.num { text-align: right; }
.antable td:first-child, .antable th:first-child { position: sticky; left: 0; background: var(--card); font-weight: 600; z-index: 1; }
.antable thead th:first-child { background: var(--soft); z-index: 2; }
.antable tbody tr:hover td { background: color-mix(in srgb, var(--soft) 55%, var(--card)); }
.antable td.num { font-variant-numeric: tabular-nums; color: var(--muted); }
.antable td.num.strong, .antable th.strong { color: var(--fg); font-weight: 700; }
.antable td.num.neg { color: #b91c1c; font-weight: 700; }
.antable tr.common td { color: var(--faint); font-style: normal; }
.antable tr.common td:first-child { font-weight: 500; }
.antable td.rt, .antable th.rt { width: 190px; min-width: 150px; }
.ratecell { display: flex; align-items: center; gap: 10px; }
.ratecell .rate { min-width: 52px; text-align: right; font-variant-numeric: tabular-nums; font-weight: 800; margin: 0; }
.ratecell .bar { flex: 1; height: 8px; width: auto; border-radius: 99px; background: var(--soft); overflow: hidden; }
.ratecell .bar i { display: block; height: 100%; border-radius: 99px; background: var(--accent); }
.ratecell.warn .rate { color: #b45309; } .ratecell.warn .bar i { background: #d97706; }
.ratecell.over .rate { color: #b91c1c; } .ratecell.over .bar i { background: #dc2626; }
.antable tr.ctotal td { background: var(--soft); font-weight: 800; color: var(--fg); border-bottom: 0; font-size: .98rem; }
.antable tr.ctotal td:first-child { border-bottom-left-radius: 10px; } .antable tr.ctotal td:last-child { border-bottom-right-radius: 10px; }
.antable tr.ctotal td.neg { color: #b91c1c; }
.anest select { width: auto; min-width: 9em; min-height: 40px; }
@media (max-width: 600px) { .antr, .anlist { padding: 16px 14px; } .antable th, .antable td { padding: 10px 10px; } }
@media (prefers-color-scheme: dark) { .antable td.num.neg, .antable tr.ctotal td.neg { color: #fca5a5; } .ratecell.warn .rate { color: #fcd34d; } .ratecell.over .rate { color: #fca5a5; } }
/* 견적·원가: 좁은 화면 보정 */
.kpis { grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); }
.kpi { padding: 16px 18px; }
.kpi .kn { font-size: clamp(1.3rem, 2vw, 1.7rem); white-space: nowrap; overflow-wrap: normal; }
@media (max-width: 1000px) { .kpis { grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); } }
.antable { table-layout: auto; width: 100%; min-width: 860px; }
.antable th, .antable td { border-top: 0; border-left: 0; border-right: 0; white-space: nowrap; }
.antable td.rt, .antable th.rt { min-width: 170px; }
.kpis { grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); }
.kpi .kn { font-size: clamp(1.2rem, 1.8vw, 1.65rem); }
.antable { min-width: 0; }
.antable th, .antable td { padding: 12px 10px; }
.antable td.rt, .antable th.rt { width: auto; min-width: 150px; }
.ratecell { gap: 8px; } .ratecell .bar { min-width: 50px; }

.antable tr.subrow td { background: transparent; color: var(--muted); font-size: .86rem; border-bottom: 0; padding-top: 8px; }
.antable tr.subrow td:first-child { font-weight: 600; background: var(--card); }
.antable tr.subrow small { color: var(--faint); font-weight: 500; }
.antable tr.subrow td.strong { color: var(--fg); font-weight: 700; }

/* ===== 세금 예상 ===== */
.txwarn { display: flex; gap: 10px; align-items: flex-start; background: #fffbeb; border: 1px solid #fde68a; color: #78350f; border-radius: 12px; padding: 12px 16px; margin: 0 0 16px; font-size: .88rem; line-height: 1.55; }
.txwarn svg { flex: none; width: 20px; height: 20px; margin-top: 2px; }
@media (prefers-color-scheme: dark) { .txwarn { background: #3a2a0c; border-color: #78350f; color: #fde68a; } }
.txyear select { width: auto; min-width: 110px; }
.txups { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 12px; }
.txcard { display: flex; flex-direction: column; gap: 4px; padding: 16px 18px; border: 1px solid var(--line); border-radius: 14px; background: var(--card); }
.txcard.soon { border-color: #f59e0b; box-shadow: 0 0 0 3px rgb(245 158 11 / .15); }
.txcard .top { display: flex; justify-content: space-between; align-items: center; margin-bottom: 4px; }
.txcard .txd { font-weight: 800; font-size: .95rem; font-variant-numeric: tabular-nums; }
.txcard.soon .txd { color: #b45309; }
.txcard strong { font-size: .95rem; line-height: 1.35; }
.txcard .due { font-size: .82rem; color: var(--muted); }
.txcard .amt { font-size: 1.35rem; font-weight: 800; margin-top: 6px; font-variant-numeric: tabular-nums; }
.txcard .nt { font-size: .76rem; color: var(--faint); }
.txtype { display: inline-block; padding: 2px 10px; border-radius: 999px; font-size: .76rem; font-weight: 700; }
.txtype.vat { background: #dbeafe; color: #1e40af; } .txtype.corp { background: #ede9fe; color: #5b21b6; } .txtype.wh { background: #ffedd5; color: #9a3412; }
@media (prefers-color-scheme: dark) { .txtype.vat { background: #1e3a8a; color: #dbeafe; } .txtype.corp { background: #4c1d95; color: #ede9fe; } .txtype.wh { background: #7c2d12; color: #fed7aa; } .txcard.soon .txd { color: #fcd34d; } }
.txtable { table-layout: auto; min-width: 640px; border-collapse: separate; border-spacing: 0; }
.txtable th, .txtable td { border: 0; border-bottom: 1px solid var(--line); padding: 11px 12px; white-space: nowrap; vertical-align: middle; font-size: .92rem; }
.txtable thead th { background: var(--soft); color: var(--muted); font-size: .8rem; font-weight: 700; text-align: left; }
.txtable th.num, .txtable td.num { text-align: right; font-variant-numeric: tabular-nums; }
.txtable td.strong { font-weight: 800; }
.txtable tr.past td { color: var(--faint); }
.txtable .sub { font-size: .74rem; color: var(--faint); font-weight: 400; }
.txtable .neg, .txcorp .neg { color: #15803d; }
.txtable td.act { text-align: right; } .txtable td.act .btn { margin-left: 6px; min-height: 36px; }
.txtable td input[type=text] { min-height: 40px; }
.txtable td input.num { text-align: right; width: 150px; }
.txcorp { display: grid; gap: 0; max-width: 640px; }
.txl { display: flex; justify-content: space-between; gap: 16px; padding: 9px 4px; border-bottom: 1px dashed var(--line); font-size: .92rem; }
.txl b { font-variant-numeric: tabular-nums; white-space: nowrap; }
.txl.sub { font-weight: 700; border-bottom: 1px solid var(--ctl-line); }
.txl.step { padding-left: 22px; color: var(--muted); font-size: .84rem; }
.txl.total { background: var(--primary); color: var(--on-primary); border-radius: 12px; padding: 14px 16px; margin-top: 10px; border: 0; align-items: center; }
.txl.total .big { font-size: 1.4rem; font-weight: 800; }
.txdates { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 12px; margin-top: 16px; }
.txdates > div { background: var(--soft); border-radius: 12px; padding: 12px 16px; display: flex; flex-direction: column; gap: 2px; }
.txdates b { font-size: 1.05rem; } .txdates small { color: var(--faint); font-size: .78rem; }
.txset { margin-bottom: 24px; } .txset summary { cursor: pointer; font-weight: 700; min-height: 44px; display: flex; align-items: center; }
.txtiers { display: grid; gap: 8px; }
.txtiers .tier { display: flex; gap: 8px; align-items: center; } .txtiers .tier input[data-up] { max-width: 220px; }
dialog.modal.txmodal { padding: 24px; width: min(520px, calc(100vw - 24px)); }
dialog.modal.txmodal form { padding: 0; }
dialog.modal.txmodal .foot { margin-top: 18px; }
.txwarn ~ section.card.panel { margin-bottom: 16px; padding: 20px 22px; }
@media (max-width: 600px) { .txcorp { max-width: none; } .txtable td input.num { width: 110px; } }
.txtype.ins { background: #dcfce7; color: #166534; }
@media (prefers-color-scheme: dark) { .txtype.ins { background: #14532d; color: #bbf7d0; } }
.txtabs { margin: 0 0 16px; max-width: 100%; }
.txtabs a { padding: 8px 18px; }
.txtable tr.cur td { background: color-mix(in srgb, var(--accent-soft) 55%, var(--card)); }
.txtable thead th small { display: block; font-weight: 500; color: var(--faint); }
.txtable tr.ctotal td { background: var(--soft); font-weight: 800; color: var(--fg); border-bottom: 0; }
.txtable .neg2 { color: #b91c1c; }
.txtable td input[type=month] { min-height: 40px; }
dialog.modal.txmodal.wide { width: min(760px, calc(100vw - 24px)); max-height: calc(100dvh - 24px); overflow-y: auto; }
dialog.modal.txmodal .chk { display: flex; align-items: center; gap: 10px; font-weight: 600; margin: 0 0 6px; }
dialog.modal.txmodal .revtable input.num { width: 120px; }
dialog.modal.txmodal .two { gap: 14px; }

dialog.modal.txmodal.wide { width: min(980px, calc(100vw - 24px)); }
dialog.modal.txmodal .revtable select { width: auto; min-height: 40px; }
dialog.modal.txmodal .revtable input:disabled { background: var(--soft); color: var(--fg); font-weight: 700; opacity: 1; }
dialog.modal.txmodal .revtable { min-width: 0; width: 100%; }
dialog.modal.txmodal .revtable th, dialog.modal.txmodal .revtable td { padding: 6px 5px; }
dialog.modal.txmodal .revtable input.num, dialog.modal.txmodal .revtable input[type=month] { width: 100%; min-width: 92px; padding: 6px 8px; }
dialog.modal.txmodal .revtable input[data-p=annual] { min-width: 118px; }
dialog.modal.txmodal .revtable select { min-width: 74px; padding: 6px 26px 6px 8px; background-position: right 6px center; }
/* 세금 예상: 넓은 화면에서는 법인세 계산표 옆에 기한 카드 */
@media (min-width: 1100px) {
  section.card.panel:has(> .txcorp) { display: grid; grid-template-columns: minmax(0, 680px) minmax(260px, 1fr); column-gap: 28px; align-items: start; }
  section.card.panel:has(> .txcorp) > .anhead, section.card.panel:has(> .txcorp) > p { grid-column: 1 / -1; }
  section.card.panel:has(> .txcorp) > .txdates { grid-template-columns: 1fr; margin-top: 0; }
}

.txtable tr.autorow td { background: color-mix(in srgb, #dbeafe 22%, var(--card)); }
@media (prefers-color-scheme: dark) { .txtable tr.autorow td { background: color-mix(in srgb, #1e3a8a 22%, var(--card)); } }
.txissues { margin: 4px 0 0; padding-left: 18px; }

/* ===== 인건비 관리대장 (견적서 디자인: 먹색 머리글 · 따뜻한 회색 · 앰버 포인트) ===== */
.ledger { --lb-ink: #171717; --lb-text: #262626; --lb-muted: #6b7280; --lb-amber: #a16207; --lb-warm: #f3f2ee; --lb-line: #e3e3e0; --lb-paper: #ffffff; --lb-we: #faf8f3; --lb-red: #b91c1c; color: var(--lb-text); }
@media (prefers-color-scheme: dark) { .ledger { --lb-ink: #0b0b0b; --lb-text: #e5e5e5; --lb-muted: #a3a3a3; --lb-amber: #f59e0b; --lb-warm: #262420; --lb-line: #3a3936; --lb-paper: #1c1b19; --lb-we: #23211d; --lb-red: #fca5a5; } }
.lbhead { display: flex; justify-content: space-between; align-items: flex-end; gap: 16px; flex-wrap: wrap; padding-bottom: 14px; border-bottom: 2px solid var(--lb-ink); margin-bottom: 16px; }
@media (prefers-color-scheme: dark) { .lbhead { border-bottom-color: var(--lb-amber); } }
.lbbrand { font-size: .68rem; font-weight: 800; letter-spacing: .14em; color: var(--lb-amber); }
.lbtitle { font-size: 1.9rem; font-weight: 800; letter-spacing: .04em; margin: 2px 0 2px; color: var(--lb-text); }
.lbsub { font-size: .92rem; color: var(--lb-muted); }
.lbtools { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.lbmonth { display: flex; gap: 6px; align-items: center; }
.lbmonth input[type=month] { width: auto; min-height: 40px; }
.lbsum { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); border: 1px solid var(--lb-line); border-radius: 12px; overflow: hidden; margin-bottom: 18px; background: var(--lb-paper); }
.lbsum > div { display: flex; flex-direction: column; gap: 2px; padding: 14px 16px; border-right: 1px solid var(--lb-line); }
.lbsum > div:last-child { border-right: 0; }
.lbsum span { font-size: .78rem; font-weight: 700; color: var(--lb-muted); background: none; }
.lbsum b { font-size: 1.35rem; font-weight: 800; font-variant-numeric: tabular-nums; }
.lbsum b.red { color: var(--lb-red); }
.lbsum small { font-size: .74rem; color: var(--lb-muted); }
.lbsum .dark { background: var(--lb-ink); color: #fff; }
.lbsum .dark span, .lbsum .dark small { color: #d4d4d4; }
.lbbar { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 10px; }
.lbbar .grow { flex: 1; }
.lbsec { font-weight: 800; font-size: 1rem; padding-bottom: 3px; border-bottom: 2px solid var(--lb-amber); }
.lbwrap { overflow: auto; max-height: calc(100dvh - 300px); border: 1px solid var(--lb-line); border-radius: 12px; background: var(--lb-paper); }
.lbtable { border-collapse: separate; border-spacing: 0; font-size: .86rem; min-width: 100%; }
.lbtable th, .lbtable td { padding: 0 8px; height: 38px; white-space: nowrap; border-bottom: 1px solid var(--lb-line); }
.lbtable thead th { position: sticky; top: 0; z-index: 3; background: var(--lb-ink); color: #fff; font-weight: 700; font-size: .8rem; text-align: left; height: 32px; }
.lbtable thead tr.sub th { top: 32px; font-size: .64rem; font-weight: 500; color: #a3a3a3; height: 20px; letter-spacing: .04em; }
.lbtable thead th.we { color: #f59e0b; }
.lbtable thead th.today { background: var(--lb-amber); color: #fff; }
.lbtable .n { text-align: right; font-variant-numeric: tabular-nums; }
.lbtable td.strong { font-weight: 800; }
.lbtable td.tax { color: var(--lb-red); }
.lbtable td.qty { font-weight: 700; }
.lbtable .sticky1 { position: sticky; left: 0; z-index: 2; background: var(--lb-paper); min-width: 120px; max-width: 160px; overflow: hidden; text-overflow: ellipsis; }
.lbtable .sticky2 { position: sticky; left: 120px; z-index: 2; background: var(--lb-paper); min-width: 92px; box-shadow: 1px 0 0 var(--lb-line); }
.lbtable thead .sticky1, .lbtable thead .sticky2 { z-index: 4; background: var(--lb-ink); }
.lbtable td.tc { color: var(--lb-muted); }
.lbtable th.dc, .lbtable td.dc { width: 34px; min-width: 34px; padding: 0; text-align: center; }
.lbtable td.dc.we { background: var(--lb-we); }
.lbtable td.dc input { width: 100%; height: 37px; min-height: 0; border: 0; border-radius: 0; background: transparent; text-align: center; padding: 0; font-size: .86rem; font-weight: 700; color: var(--lb-text); box-shadow: none; }
.lbtable td.dc input:hover { background: color-mix(in srgb, var(--lb-amber) 10%, transparent); }
.lbtable td.dc input:focus { outline: 2px solid var(--lb-amber); outline-offset: -2px; background: color-mix(in srgb, var(--lb-amber) 14%, var(--lb-paper)); box-shadow: none; }
.lbtable td.dc input.saved { background: color-mix(in srgb, #16a34a 18%, transparent); transition: background .3s; }
.lbtable tbody tr:hover td { background-color: color-mix(in srgb, var(--lb-warm) 60%, var(--lb-paper)); }
.lbtable tbody tr:hover td.sticky1, .lbtable tbody tr:hover td.sticky2 { background: var(--lb-warm); }
.lbname { border: 0; background: none; padding: 0; font: inherit; font-weight: 800; color: var(--lb-text); cursor: pointer; text-decoration: underline; text-decoration-color: var(--lb-line); text-underline-offset: 3px; }
.lbname:hover { text-decoration-color: var(--lb-amber); color: var(--lb-amber); }
.lbwarn { display: inline-grid; place-items: center; width: 16px; height: 16px; margin-left: 6px; border-radius: 50%; background: #fef3c7; color: #92400e; font-size: .7rem; font-weight: 800; }
.lbx { font-size: .72rem; font-weight: 700; color: var(--lb-muted); }
.lbtable tfoot td { position: sticky; bottom: 0; z-index: 2; background: var(--lb-warm); font-weight: 800; border-top: 2px solid var(--lb-ink); border-bottom: 0; }
.lbtable tfoot td.sticky1 { z-index: 3; text-align: center; letter-spacing: .3em; }
.lbtable tfoot td.sticky2 { z-index: 3; }
.lbempty { border: 1px dashed var(--lb-line); border-radius: 12px; padding: 36px 16px; text-align: center; color: var(--lb-muted); background: var(--lb-paper); }
.lbempty strong { display: block; color: var(--lb-text); margin-bottom: 4px; }
.lbnote { font-size: .8rem; color: var(--lb-muted); margin-top: 12px; line-height: 1.7; }
dialog.modal.lbmodal { width: min(620px, calc(100vw - 24px)); }
dialog.modal.lbmodal h2 { margin: 2px 0 16px; padding-bottom: 10px; border-bottom: 2px solid #171717; }
dialog.modal.lbmodal h2 small { font-size: .8rem; font-weight: 500; color: var(--faint); margin-left: 6px; }
.lbrrn { display: flex; gap: 6px; } .lbrrn input { flex: 1; min-width: 0; }
.lbfound { display: flex; flex-direction: column; gap: 4px; margin-top: 6px; font-size: .82rem; }
.lbpick { text-align: left; border: 1px solid var(--line); background: var(--card); border-radius: 8px; padding: 8px 10px; cursor: pointer; font: inherit; color: inherit; }
.lbpick:hover { border-color: #a16207; background: #fffbeb; }
@media (prefers-color-scheme: dark) { .lbpick:hover { background: #2a2111; } dialog.modal.lbmodal h2 { border-bottom-color: #f59e0b; } }
@media (max-width: 600px) { .lbtitle { font-size: 1.45rem; } .lbtable .sticky1 { min-width: 90px; max-width: 90px; } .lbtable .sticky2 { left: 90px; } }

/* 인건비 관리대장: 오른쪽 합계 열 고정 (날짜 칸만 가로로 스크롤) */
.lbtable .rs1, .lbtable .rs2, .lbtable .rs3, .lbtable .rs4, .lbtable .rs5 { position: sticky; z-index: 2; background: var(--lb-paper); }
.lbtable .rs1 { right: 0; width: 100px; min-width: 100px; }
.lbtable .rs2 { right: 100px; width: 84px; min-width: 84px; }
.lbtable .rs3 { right: 184px; width: 100px; min-width: 100px; }
.lbtable .rs4 { right: 284px; width: 76px; min-width: 76px; }
.lbtable .rs5 { right: 360px; width: 52px; min-width: 52px; box-shadow: -1px 0 0 var(--lb-line); }
.lbtable thead .rs1, .lbtable thead .rs2, .lbtable thead .rs3, .lbtable thead .rs4, .lbtable thead .rs5 { z-index: 4; background: var(--lb-ink); }
.lbtable tfoot .rs1, .lbtable tfoot .rs2, .lbtable tfoot .rs3, .lbtable tfoot .rs4, .lbtable tfoot .rs5 { z-index: 3; background: var(--lb-warm); }
.lbtable tbody tr:hover td.rs1, .lbtable tbody tr:hover td.rs2, .lbtable tbody tr:hover td.rs3, .lbtable tbody tr:hover td.rs4, .lbtable tbody tr:hover td.rs5 { background: var(--lb-warm); }
.lbtable td.rs1 { background: color-mix(in srgb, var(--lb-warm) 55%, var(--lb-paper)); }
@media (max-width: 900px) { .lbtable .rs2, .lbtable .rs3, .lbtable .rs4, .lbtable .rs5 { position: static; box-shadow: none; } }

/* 실적·신고 */
.txdrop { display: flex; gap: 14px; align-items: center; padding: 18px 20px; border: 2px dashed var(--ctl-line); border-radius: 14px; cursor: pointer; background: var(--bg); font-weight: 400; margin: 0; }
.txdrop:hover { border-color: var(--accent); background: color-mix(in srgb, var(--accent-soft) 40%, var(--bg)); }
.txdrop svg { width: 28px; height: 28px; flex: none; color: var(--accent); }
.txdrop small { color: var(--muted); }
.txupres { display: grid; gap: 4px; margin: 10px 0; font-size: .88rem; }

/* 감면·영업권 */
.two-col { display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr); gap: 22px; align-items: start; }
@media (max-width: 900px) { .two-col { grid-template-columns: 1fr; } }
.h3 { font-size: .95rem; margin: 6px 0 10px; }
.drawform { display: grid; grid-template-columns: 150px 150px minmax(0, 1fr) auto; gap: 8px; margin-bottom: 12px; }
@media (max-width: 700px) { .drawform { grid-template-columns: 1fr 1fr; } .drawform input[name=note] { grid-column: 1 / -1; } }
.two-col .txtable { min-width: 0; width: 100%; }

.drawform { grid-template-columns: 170px 150px 140px minmax(0, 1fr) auto; }
.drawform select { width: auto; }
@media (max-width: 700px) { .drawform { grid-template-columns: 1fr 1fr; } .drawform select { grid-column: 1 / -1; width: 100%; } }

/* ---------- 홈 ---------- */
.side a.brand { display: flex; align-items: center; gap: 10px; padding: 4px 10px 18px; min-height: 0; font-weight: 800; font-size: 1.05rem; color: var(--fg); border-radius: 8px; }
.side a.brand:hover { background: none; opacity: .85; }
.home { max-width: 1240px; margin: 0 auto; }
.home-head { margin: 4px 0 20px; }
.home-head .hh-date { margin: 0 0 4px; color: var(--faint); font-size: .9rem; font-weight: 600; }
.home-head h1 { font-size: 1.6rem; letter-spacing: -0.02em; }
.home-grid { display: grid; grid-template-columns: minmax(0, 1fr); gap: 16px; align-items: start; }
.hc-side { display: grid; gap: 16px; min-width: 0; }
.hc { padding: 18px 20px; min-width: 0; border-radius: 14px; }
.hc-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin: -4px -6px 10px 0; }
.hc-head h2 { display: flex; align-items: center; gap: 8px; font-size: 1rem; font-weight: 800; min-width: 0; }
.hc-head h2 svg.ic { color: var(--accent); width: 18px; height: 18px; }
.hc-count { font-size: .8rem; font-weight: 600; color: var(--faint); margin-left: 2px; }
.hc-more { display: inline-flex; align-items: center; gap: 2px; min-height: 40px; padding: 0 6px 0 10px; border-radius: 8px; color: var(--faint); font-size: .85rem; font-weight: 600; text-decoration: none; white-space: nowrap; }
.hc-more svg.ic { width: 16px; height: 16px; }
.hc-more:hover { background: var(--soft); color: var(--fg); }
.hc-empty { margin: 8px 0 4px; padding: 22px 12px; text-align: center; color: var(--faint); font-size: .92rem; background: var(--bg); border-radius: 10px; }
.hc-foot { margin: 6px 0 0; text-align: center; font-size: .85rem; }
.hc-foot a { color: var(--faint); }

.hlist, .hteam, .hweek { list-style: none; margin: 0; padding: 0; }
.hlist li + li, .hteam li + li { border-top: 1px solid var(--line); }
.hrow { display: flex; align-items: center; gap: 12px; min-height: 56px; padding: 8px; margin: 0 -8px; border-radius: 10px; text-decoration: none; color: inherit; transition: background .15s; }
.hrow:hover { background: var(--soft); }
.hrow > svg.ic { color: var(--faint); width: 16px; height: 16px; }
.hn-main { display: flex; flex-direction: column; gap: 2px; flex: 1; min-width: 0; }
.hn-title { display: flex; align-items: center; gap: 6px; min-width: 0; font-weight: 600; }
.hn-title .t { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
.hn-title .tag { flex: none; }
.hn-meta { color: var(--faint); font-size: .82rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.hnew { flex: none; display: inline-grid; place-items: center; width: 18px; height: 18px; border-radius: 50%; background: var(--accent); color: var(--on-accent); font-size: .65rem; font-weight: 800; }

/* 출퇴근 카드 */
.hc-att { display: flex; flex-direction: column; gap: 14px; background: linear-gradient(160deg, var(--card) 55%, var(--soft)); }
.hc-att .hc-head { margin-bottom: 0; }
.att-body { display: grid; gap: 4px; }
.att-state { display: inline-flex; align-items: center; gap: 8px; font-size: .95rem; }
.att-dot { width: 10px; height: 10px; border-radius: 50%; background: var(--faint); }
.st-in .att-dot { background: #16a34a; box-shadow: 0 0 0 4px rgba(22, 163, 74, .18); animation: attpulse 2.4s ease-in-out infinite; }
.st-in .att-state strong { color: #15803d; }
.st-none .att-dot { background: var(--accent); }
@keyframes attpulse { 50% { box-shadow: 0 0 0 7px rgba(22, 163, 74, 0); } }
@media (prefers-reduced-motion: reduce) { .st-in .att-dot { animation: none; } }
.att-clock { font-size: 2.75rem; line-height: 1.1; font-weight: 800; letter-spacing: -0.03em; font-variant-numeric: tabular-nums; }
.att-since { color: var(--muted); font-size: .92rem; }
.att-worked { color: var(--faint); font-size: .88rem; }
.att-worked b { color: var(--fg); font-variant-numeric: tabular-nums; }
.att-cta { width: 100%; min-height: 48px; border-radius: 12px; font-size: 1rem; }
.att-note { margin: -4px 0 0; display: flex; align-items: center; gap: 6px; color: var(--accent); font-size: .85rem; font-weight: 600; }
.att-note svg.ic { width: 16px; height: 16px; }
@media (prefers-color-scheme: dark) { .st-in .att-state strong { color: #86efac; } .st-in .att-dot { background: #4ade80; } }

/* 요약 타일 */
.hstats { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.hstat { display: grid; grid-template-columns: auto 1fr; grid-template-rows: auto auto; column-gap: 10px; align-items: center; padding: 14px; min-height: 76px; border-radius: 14px; background: var(--card); border: 1px solid var(--line); text-decoration: none; color: inherit; transition: border-color .15s, background .15s; }
.hstat:hover { border-color: var(--faint); }
.hs-ic { grid-row: 1 / 3; display: grid; place-items: center; width: 40px; height: 40px; border-radius: 12px; background: var(--soft); color: var(--muted); }
.hs-l { font-size: .8rem; color: var(--faint); font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.hs-n { font-size: .85rem; color: var(--faint); }
.hs-n b { font-size: 1.35rem; color: var(--fg); font-weight: 800; margin-right: 2px; font-variant-numeric: tabular-nums; }

/* 일정 */
.hweek { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 4px; margin-bottom: 8px; }
.hday { display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 8px 0 6px; border-radius: 10px; }
.hd-w { font-size: .72rem; color: var(--faint); font-weight: 600; }
.hd-d { font-size: 1rem; font-weight: 700; font-variant-numeric: tabular-nums; }
.hday.sun .hd-d, .hday.sun .hd-w { color: var(--danger); }
.hday.sat .hd-d, .hday.sat .hd-w { color: #2563eb; }
.hday.today { background: var(--primary); }
.hday.today .hd-w, .hday.today .hd-d { color: var(--on-primary); }
.hd-dots { display: flex; gap: 3px; height: 5px; }
.hd-dots i { width: 5px; height: 5px; border-radius: 50%; background: var(--accent); }
.hday.today .hd-dots i { background: var(--on-primary); }
.hev-bar { width: 4px; align-self: stretch; margin: 4px 0; border-radius: 4px; background: var(--uc); flex: none; }
@media (prefers-color-scheme: dark) { .hday.sat .hd-d, .hday.sat .hd-w { color: #93c5fd; } }

/* 채팅 */
.hroom-ic { display: grid; place-items: center; width: 30px; height: 30px; border-radius: 50%; background: var(--soft); color: var(--muted); flex: none; }
.hroom-ic svg.ic { width: 16px; height: 16px; }
.hch-side { display: flex; flex-direction: column; align-items: flex-end; gap: 4px; flex: none; }
.hch-side small { color: var(--faint); font-size: .75rem; }
.hcount { min-width: 20px; height: 20px; padding: 0 6px; border-radius: 10px; background: var(--accent); color: var(--on-accent); font-size: .72rem; font-weight: 800; display: grid; place-items: center; }
.hrow.unread .hn-title { font-weight: 800; }
.hrow.unread .hn-meta { color: var(--muted); }

/* 팀원 */
.hmem { display: flex; align-items: center; gap: 12px; min-height: 56px; padding: 8px 0; }
.avatar.online { position: relative; }
.avatar.online::after { content: ""; position: absolute; right: -1px; bottom: -1px; width: 10px; height: 10px; border-radius: 50%; background: #16a34a; box-shadow: 0 0 0 2px var(--card); }
.hst { flex: none; padding: 3px 10px; border-radius: 999px; font-size: .78rem; font-weight: 700; }
.hst.in { background: #dcfce7; color: #166534; }
.hst.out { background: var(--soft); color: var(--muted); }
.hst.none { color: var(--faint); box-shadow: inset 0 0 0 1px var(--line); }
@media (prefers-color-scheme: dark) { .hst.in { background: #14532d; color: #bbf7d0; } .avatar.online::after { background: #4ade80; } }


/* 홈 2차: 큰 캘린더 · 세무 일정 · 오른쪽 묶음 */
.hc-stack { display: grid; gap: 16px; min-width: 0; align-content: start; }
.hcal-wrap { display: grid; gap: 20px; }
.hmonth { display: none; }
.hcal-h { display: none; font-size: .85rem; font-weight: 700; color: var(--faint); margin: 0 0 8px; }
.hm-title { font-weight: 800; font-size: 1.05rem; margin-bottom: 8px; }
.hm-dow, .hm-grid { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); }
.hm-dow span { text-align: center; font-size: .75rem; font-weight: 700; color: var(--faint); padding: 4px 0 6px; }
.hm-dow .sun, .mc.sun .mc-d { color: var(--danger); }
.hm-dow .sat, .mc.sat .mc-d { color: #2563eb; }
.hm-grid { border-top: 1px solid var(--line); border-left: 1px solid var(--line); border-radius: 10px; overflow: hidden; }
.mc { min-height: 92px; padding: 6px 5px; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.mc.other { background: var(--bg); }
.mc.other .mc-d { opacity: .45; }
.mc-d { font-size: .82rem; font-weight: 700; font-variant-numeric: tabular-nums; width: 24px; height: 24px; display: grid; place-items: center; border-radius: 50%; }
.mc.today .mc-d { background: var(--accent); color: var(--on-accent); }
.mc-ev { display: block; font-size: .74rem; line-height: 1.35; padding: 2px 6px; border-radius: 5px; background: var(--soft); box-shadow: inset 3px 0 0 var(--uc); color: var(--fg); text-decoration: none; overflow: hidden; display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; line-clamp: 2; overflow-wrap: anywhere; }
.mc-ev:hover { background: var(--line); }
.mc-ev b { font-weight: 700; color: var(--muted); }
.mc-more { font-size: .72rem; color: var(--faint); text-decoration: none; padding-left: 6px; font-weight: 600; }
@media (prefers-color-scheme: dark) { .hm-dow .sat, .mc.sat .mc-d { color: #93c5fd; } }

.htx-d { flex: none; min-width: 58px; text-align: center; padding: 6px 4px; border-radius: 10px; background: var(--soft); font-weight: 800; font-size: .85rem; font-variant-numeric: tabular-nums; color: var(--muted); }
.htx-d.soon { background: var(--accent-soft); color: var(--accent); }
.htx-d.urgent { background: #fee2e2; color: #b91c1c; }
@media (prefers-color-scheme: dark) { .htx-d.urgent { background: #7f1d1d; color: #fecaca; } }
.hc-tax .txtype { flex: none; padding: 1px 8px; font-size: .7rem; }

@media (min-width: 1500px) { .home { max-width: 1400px; } .mc { min-height: 104px; } }

/* 공지·매뉴얼 세부 항목 탭 */
.catbar { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin: 0 0 14px; }
.catchip { display: inline-flex; align-items: center; gap: 6px; min-height: 40px; padding: 0 14px; border-radius: 999px; border: 1px solid var(--line); background: var(--card); color: var(--muted); font-weight: 600; cursor: pointer; transition: background .15s, border-color .15s, color .15s; }
.catchip .n { font-size: .75rem; color: var(--faint); font-weight: 700; font-variant-numeric: tabular-nums; }
.catchip:hover { border-color: var(--faint); color: var(--fg); }
.catchip[aria-pressed="true"] { background: var(--primary); border-color: var(--primary); color: var(--on-primary); }
.catchip[aria-pressed="true"] .n { color: var(--on-primary); opacity: .8; }
.catedit { display: inline-flex; align-items: center; gap: 6px; min-height: 40px; padding: 0 12px; border-radius: 999px; border: 1px dashed var(--line); background: none; color: var(--faint); font-weight: 600; cursor: pointer; margin-left: auto; }
.catedit svg.ic { width: 16px; height: 16px; }
.catedit:hover { color: var(--fg); border-color: var(--faint); }
.catmgr .catadd { display: flex; gap: 8px; margin-bottom: 12px; }
.catmgr .catadd input { flex: 1; min-width: 0; min-height: 44px; padding: 0 14px; border: 1px solid var(--line); border-radius: 10px; background: var(--card); }
.catlist { list-style: none; margin: 0; padding: 0; border: 1px solid var(--line); border-radius: 10px; }
.catlist li { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 4px 6px 4px 14px; min-height: 48px; }
.catlist li + li { border-top: 1px solid var(--line); }
.catlist .btn.icon { color: var(--danger); }
.postrow .clip { display: inline-flex; align-items: center; gap: 2px; margin-left: 8px; font-size: .78rem; color: var(--faint); font-weight: 600; vertical-align: middle; }
.postrow .clip svg.ic { width: 14px; height: 14px; }
.pfiles { margin-top: 20px; padding-top: 16px; border-top: 1px solid var(--line); }
.pfiles h2 { display: flex; align-items: center; gap: 6px; font-size: .95rem; margin-bottom: 8px; }
.pfiles h2 svg.ic { width: 18px; height: 18px; color: var(--accent); }
.pfiles .cfiles { grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); }
.pfiles .cf-img { max-width: none; }
.postdlg .tk-att { display: flex; align-items: flex-start; gap: 8px; flex-wrap: wrap; }

/* ===== 세금 예상·고정비·급여 표: 휴대폰에서는 줄마다 카드 (머리글을 각 칸의 이름표로) ===== */
@media screen and (max-width: 799px) {
  .txtabs { display: flex; overflow-x: auto; scrollbar-width: none; -webkit-overflow-scrolling: touch; }
  .txtabs::-webkit-scrollbar { display: none; }
  .txtabs a { flex: none; white-space: nowrap; padding: 8px 14px; }
  .tablewrap:has(> .txtable:not(.revtable)) { overflow: visible; }
  .atable.txtable:not(.revtable) { display: block; min-width: 0; width: 100%; border: 0; border-radius: 0; background: none; overflow: visible; }
  .atable.txtable:not(.revtable) thead { display: none; }
  .atable.txtable:not(.revtable) tbody, .atable.txtable:not(.revtable) tfoot { display: block; }
  .atable.txtable:not(.revtable) tr { display: block; padding: 12px 0; border-bottom: 1px solid var(--line); }
  .atable.txtable:not(.revtable) tr:last-child { border-bottom: 0; }
  .atable.txtable:not(.revtable) tr.cur { margin: 0 -10px; padding: 12px 10px; border-radius: 10px; }
  .atable.txtable:not(.revtable) td, .atable.txtable:not(.revtable) tr.cur td, .atable.txtable:not(.revtable) tr.autorow td { display: block; overflow: hidden; padding: 3px 0; border: 0; white-space: normal; text-align: right; background: none; font-size: .92rem; }
  .atable.txtable:not(.revtable) td::before { content: attr(data-label); float: left; max-width: 48%; margin-right: 12px; line-height: 1.7; text-align: left; color: var(--faint); font-size: .8rem; font-weight: 600; }
  .atable.txtable:not(.revtable) td:not([data-label])::before, .atable.txtable:not(.revtable) td[data-label=""]::before { content: none; }
  .atable.txtable:not(.revtable) td:first-child { text-align: left; font-size: 1rem; font-weight: 700; color: var(--fg); padding-bottom: 6px; }
  .atable.txtable:not(.revtable) td:first-child::before { content: none; }
  .atable.txtable:not(.revtable) td.act { text-align: right; padding-top: 8px; }
  .atable.txtable:not(.revtable) td.act::before { content: none; }
  .atable.txtable:not(.revtable) td.act .btn { margin: 0 0 0 6px; }
  .atable.txtable:not(.revtable) td:empty { display: none; }
  .atable.txtable:not(.revtable) td input.num, .atable.txtable:not(.revtable) td input[type=text], .atable.txtable:not(.revtable) td input[type=month] { width: 60%; max-width: 200px; }
  .atable.txtable:not(.revtable) tr.ctotal { margin-top: 8px; padding: 12px; border-radius: 12px; background: var(--soft); border: 0; }
  .atable.txtable:not(.revtable) tr.ctotal td { background: none; }
  .atable.txtable:not(.revtable) tr.past td:first-child { color: var(--faint); }
  .atable.txtable.revtable { min-width: 0; }
}

/* ===== 홈 꾸미기: 넓은 칸·좁은 칸 두 줄 (휴대폰은 한 줄, 내가 정한 순서) ===== */
.home-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.he-btn { color: var(--muted); }
.he-btn svg.ic { width: 16px; height: 16px; }
.home-cols { display: flex; flex-direction: column; gap: 16px; }
.hcol { display: contents; }
.hw { min-width: 0; container-type: inline-size; }
.hw > .hc { height: 100%; }
@media (min-width: 900px) {
  .home-cols { display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); align-items: start; }
  .home.side-left .home-cols { grid-template-columns: minmax(0, 1fr) minmax(0, 2fr); }
  .home.side-left .hcol-narrow { order: -1; }
  .home-cols.one { grid-template-columns: minmax(0, 1fr) !important; }
  .hcol { display: flex; flex-direction: column; gap: 16px; min-width: 0; }
  .hcol:empty { display: none; }
  .hw { order: 0 !important; }
  .home-head h1 { font-size: 1.75rem; }
}
/* 카드가 놓인 칸의 폭에 맞춰 모양을 바꿈 */
.hmonth, .hcal-h { display: none; }
@container (min-width: 520px) {
  .home:not(.cal-week) .hmonth { display: block; }
  .home:not(.cal-week) .hcal-side { display: none; }
  .hstats { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .hc-att .att-cta { width: auto; align-self: flex-start; min-width: 220px; }
}
.home.cal-week .hcal-h { display: block; }
.hdue { flex: none; font-size: .8rem; font-weight: 700; color: var(--muted); font-variant-numeric: tabular-nums; padding: 3px 8px; border-radius: 999px; background: var(--soft); }
.hdue.today { background: var(--accent-soft); color: var(--accent); }
.hdue.late { background: #fee2e2; color: #b91c1c; }
@media (prefers-color-scheme: dark) { .hdue.late { background: #7f1d1d; color: #fecaca; } }

/* 홈 꾸미기 창 */
.homeedit .mdlg { max-width: 560px; }
.he-sub { margin: 4px 0 14px; font-size: .9rem; }
.he-list { list-style: none; margin: 0; padding: 0; border: 1px solid var(--line); border-radius: 12px; }
.he-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 8px 8px 8px 12px; min-height: 56px; flex-wrap: wrap; }
.he-row + .he-row { border-top: 1px solid var(--line); }
.he-row.off .he-on span { color: var(--faint); }
.he-on { display: flex; align-items: center; gap: 10px; min-height: 44px; cursor: pointer; flex: 1 1 180px; min-width: 0; font-weight: 600; }
.he-on input, .he-check input { width: 20px; height: 20px; accent-color: var(--accent); flex: none; }
.he-ctl { display: flex; align-items: center; gap: 6px; }
.he-ctl .btn.icon { min-height: 40px; width: 40px; padding: 0; }
.he-ctl .btn.icon:disabled { opacity: .35; cursor: default; }
.he-seg { display: inline-flex; padding: 3px; border-radius: 10px; background: var(--soft); }
.he-seg button { min-height: 36px; padding: 0 12px; border: 0; border-radius: 8px; background: none; color: var(--muted); font-weight: 600; cursor: pointer; white-space: nowrap; }
.he-seg button[aria-pressed="true"] { background: var(--card); color: var(--fg); box-shadow: 0 1px 2px rgb(0 0 0 / .12); }
.he-seg button:disabled { opacity: .4; cursor: default; }
.he-opts { display: grid; gap: 4px; margin-top: 14px; padding: 6px 12px; border-radius: 12px; background: var(--bg); }
.he-opt { display: flex; align-items: center; justify-content: space-between; gap: 10px; min-height: 52px; flex-wrap: wrap; font-weight: 600; }
.he-opt small { color: var(--faint); font-weight: 500; }
.he-check { justify-content: flex-start; cursor: pointer; }
.homeedit .foot { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.homeedit .foot .grow { flex: 1; }

/* 글 보기: 제목 옆 수정·삭제 */
.post-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.post-head h1 { flex: 1 1 240px; min-width: 0; overflow-wrap: anywhere; }
.post-acts { display: flex; gap: 8px; flex: none; }

/* 뒤로가기 버튼 (상세 화면 왼쪽 위) */
.crumbs .backbtn, .backbtn { display: inline-flex; align-items: center; gap: 4px; min-height: 40px; padding: 0 14px 0 10px; margin-right: 8px; border-radius: 999px; border: 1px solid var(--line); background: var(--card); color: var(--fg); font-weight: 700; font-size: .9rem; text-decoration: none; transition: background .15s, border-color .15s; }
.crumbs .backbtn:hover, .backbtn:hover { background: var(--soft); border-color: var(--faint); }
.backbtn svg.ic { width: 18px; height: 18px; }

/* 프로젝트 폴더: 무엇을 저장하는 곳인지 안내 */
.tile .fdesc { color: var(--muted); font-size: .8rem; line-height: 1.45; }
/* 프로젝트 기본 폴더 편집 */
.ftpl { max-width: 620px; }
.ftpl-sub { margin: 4px 0 14px; font-size: .9rem; }
.ftpl-list { list-style: none; margin: 0 0 12px; padding: 0; border: 1px solid var(--line); border-radius: 12px; }
.ftpl-row { display: grid; gap: 6px; padding: 10px 12px; }
.ftpl-row + .ftpl-row { border-top: 1px solid var(--line); }
.ftpl-top { display: flex; align-items: center; gap: 8px; }
.ftpl-name { flex: 1; min-width: 0; font-weight: 700; }
.ftpl-name[readonly] { background: var(--soft); color: var(--muted); cursor: not-allowed; }
.ftpl-desc, .ftpl-subs { font-size: .9rem; }
.ftpl-ctl { display: flex; gap: 4px; flex: none; }
.ftpl-ctl .btn.icon { min-height: 40px; width: 40px; padding: 0; }
.ftpl-ctl .btn.icon:disabled { opacity: .35; cursor: default; }
.ftpl .foot { display: flex; justify-content: flex-end; gap: 8px; margin-top: 14px; }
.ftpl-top .ftpl-name { width: auto; flex: 1 1 0; }
@media (max-width: 480px) { .ftpl-row { padding: 10px 8px; } .ftpl-ctl { gap: 2px; } }
.ftpl-row { grid-template-columns: minmax(0, 1fr); }
.ftpl-row > * { min-width: 0; }
.ftpl-desc, .ftpl-subs { width: 100%; box-sizing: border-box; }
.ftpl-top .ftpl-name { min-width: 0; box-sizing: border-box; }

/* 프로젝트 상태 (보류 추가) + 카드에서 바로 바꾸기 */
.chip.st-hold { background: #fef3c7; color: #92400e; }
@media (prefers-color-scheme: dark) { .chip.st-hold { background: #78350f; color: #fde68a; } }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.ptile { position: relative; display: flex; min-width: 0; }
.ptile > .tile { flex: 1; min-width: 0; padding-bottom: 56px; }
.pst-help { margin: -6px 0 12px; font-size: .85rem; }
.pst { position: absolute; right: 12px; bottom: 12px; }
.pst select { appearance: none; -webkit-appearance: none; min-height: 36px; padding: 0 30px 0 12px; border-radius: 999px; border: 1px solid var(--line); background: var(--card) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%23888' stroke-width='2.5'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E") no-repeat right 10px center; font-weight: 700; font-size: .85rem; color: var(--fg); cursor: pointer; width: auto; }
.pst select:hover { border-color: var(--faint); }
.pst.hold select { background-color: #fef3c7; color: #92400e; border-color: #fcd34d; }
.pst.ok select { background-color: #dcfce7; color: #166534; border-color: #86efac; }
.pst.cancel select { background-color: var(--soft); color: var(--muted); }
@media (prefers-color-scheme: dark) { .pst.hold select { background-color: #78350f; color: #fde68a; border-color: #b45309; } .pst.ok select { background-color: #14532d; color: #bbf7d0; border-color: #166534; } }
/* 삭제 확인 창 */
.danger-dlg h2 { display: flex; align-items: center; gap: 8px; color: var(--danger); }
.danger-dlg h2 svg.ic { width: 22px; height: 22px; }
.danger-box { margin: 10px 0 14px; padding: 12px 14px 12px 30px; border-radius: 12px; background: #fef2f2; border: 1px solid #fecaca; color: #7f1d1d; line-height: 1.6; font-size: .92rem; display: grid; gap: 6px; }
@media (prefers-color-scheme: dark) { .danger-box { background: #3b0d0d; border-color: #7f1d1d; color: #fecaca; } }
.danger-dlg .foot { display: flex; justify-content: flex-end; gap: 8px; margin-top: 14px; }
.btn.danger-solid { background: var(--danger); border-color: var(--danger); color: #fff; }
.btn.danger-solid:disabled { opacity: .45; cursor: not-allowed; }

/* 묶음(거래처) 프로젝트 카드 */
.tile.group { border-style: solid; border-left: 4px solid var(--accent); }

/* ===== 전체 검색 ===== */
.sbox { display: flex; align-items: center; gap: 8px; padding: 6px 6px 6px 14px; border: 1px solid var(--line); border-radius: 14px; background: var(--card); margin: 0 0 16px; }
.sbox:focus-within { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.sbox > svg.ic { width: 20px; height: 20px; color: var(--muted); flex: none; }
.sbox input { flex: 1; min-width: 0; border: 0; background: none; padding: 8px 0; font-size: 1rem; box-shadow: none; outline: none; width: auto; }
.sbox .btn { flex: none; min-height: 40px; }
.sbox.big input { font-size: 1.05rem; }
.sfilter { margin-bottom: 14px; }
.sres-sec { margin: 0 0 22px; }
.sres-sec h2 { font-size: 1rem; margin: 0 0 8px; display: flex; align-items: center; gap: 6px; }
.sres-sec .list { margin-bottom: 8px; }
.srow { text-decoration: none; color: inherit; }
.srow .sr-title { font-weight: 700; overflow-wrap: anywhere; }
.srow .sub { overflow-wrap: anywhere; }
.srow mark { background: #fef08a; color: inherit; border-radius: 3px; padding: 0 1px; }
@media (prefers-color-scheme: dark) { .srow mark { background: #854d0e; } }
.sr-date { flex: none; color: var(--faint); font-size: .8rem; white-space: nowrap; }
.sr-note { font-size: .85rem; }
@media (max-width: 600px) { .sr-date { display: none; } }

/* ===== 폴더: 사진 미리보기 격자 ===== */
.fv-bar { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin: 4px 0 12px; }
.fv-bar .grow { flex: 1; }
.pgrid { display: grid; gap: 12px; grid-template-columns: repeat(auto-fill, minmax(var(--ph, 170px), 1fr)); }
.pgrid.sz-s { --ph: 112px; gap: 8px; }
.pgrid.sz-m { --ph: 180px; }
.pgrid.sz-l { --ph: 280px; }
@media (max-width: 600px) { .pgrid.sz-s { --ph: 84px; } .pgrid.sz-m { --ph: 130px; } .pgrid.sz-l { --ph: 100%; } }
.ph { margin: 0; min-width: 0; }
.ph-img { position: relative; display: block; width: 100%; aspect-ratio: 4 / 3; padding: 0; border: 1px solid var(--line); border-radius: 10px; overflow: hidden; background: var(--soft); cursor: zoom-in; }
.ph-img img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .2s; }
.ph-img:hover img { transform: scale(1.03); }
.ph-img:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }
.ph-img.noimg img { visibility: hidden; }
.ph-img.noimg::after { content: '미리보기 없음'; position: absolute; inset: 0; display: grid; place-items: center; color: var(--faint); font-size: .8rem; }
.ph-play { position: absolute; inset: 0; display: grid; place-items: center; color: #fff; font-size: 1.6rem; text-shadow: 0 1px 6px rgb(0 0 0 / .6); pointer-events: none; }
.ph figcaption { margin-top: 6px; font-size: .8rem; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pgrid.sz-s figcaption { display: none; }
.thumb-sm { flex: none; width: 44px; height: 44px; padding: 0; border: 1px solid var(--line); border-radius: 8px; overflow: hidden; background: var(--soft); cursor: zoom-in; }
.thumb-sm img { width: 100%; height: 100%; object-fit: cover; display: block; }
.thumb-sm.noimg img { visibility: hidden; }
/* 사진 크게 보기 */
.mviewer .in { position: relative; width: min(96vw, 1400px); height: min(92vh, 1000px); display: flex; flex-direction: column; background: #111; border-radius: 12px; overflow: hidden; }
.mv-top { display: flex; align-items: center; gap: 8px; padding: 8px 10px; background: rgb(0 0 0 / .6); color: #fff; flex-wrap: wrap; }
.mv-name { flex: 1; min-width: 0; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mv-n { color: #bbb; font-weight: 400; margin-left: 6px; font-size: .85rem; }
.mv-acts { display: flex; gap: 6px; }
.mv-stage { flex: 1; min-height: 0; display: grid; place-items: center; }
.mv-stage img, .mv-stage video { max-width: 100%; max-height: 100%; object-fit: contain; }
.mv-nav { position: absolute; top: 50%; transform: translateY(-50%); width: 48px; height: 48px; border-radius: 50%; border: 0; background: rgb(0 0 0 / .5); color: #fff; display: grid; place-items: center; cursor: pointer; }
.mv-nav:disabled { opacity: .25; cursor: default; }
.mv-nav.prev { left: 10px; }
.mv-nav.next { right: 10px; }
.mv-nav.next svg { transform: rotate(180deg); }
.srow.sbtn { width: 100%; text-align: left; font: inherit; border: 0; background: none; cursor: pointer; }
.srow.sbtn + .srow, .srow + .srow.sbtn { border-top: 1px solid var(--line); }
.mviewer .mv-acts .btn { background: rgb(255 255 255 / .14); color: #fff; border-color: rgb(255 255 255 / .28); }
.mviewer .mv-acts .btn:hover { background: rgb(255 255 255 / .24); }
.mviewer .mv-acts .btn svg.ic { color: #fff; }
/* 사진 크게 보기: 화면 전체, 사진은 가운데 */
dialog.mviewer { position: fixed; inset: 0; margin: 0; width: 100vw; height: 100dvh; max-width: none; max-height: none; overflow: hidden; }
.mviewer .in { width: 100%; height: 100%; padding: 0; display: flex; flex-direction: column; background: transparent; border-radius: 0; place-items: initial; }
.mviewer .mv-top { justify-content: center; background: linear-gradient(rgb(0 0 0 / .55), transparent); padding: 10px 70px; }
.mviewer .mv-name { flex: 0 1 auto; }
.mviewer .mv-stage { padding: 4px 72px 20px; }
.mviewer .mv-stage img, .mviewer .mv-stage video { width: auto; height: auto; max-width: 100%; max-height: calc(100dvh - 90px); border-radius: 4px; box-shadow: 0 8px 40px rgb(0 0 0 / .5); }
.mviewer .mv-nav { width: 52px; height: 52px; }
.mviewer .mv-nav.prev { left: 14px; }
.mviewer .mv-nav.next { right: 14px; }
@media (max-width: 600px) { .mviewer .mv-top { padding: 8px 10px; justify-content: space-between; } .mviewer .mv-stage { padding: 0 0 12px; } .mviewer .mv-nav { width: 42px; height: 42px; top: auto; bottom: 18px; transform: none; } }
dialog.mviewer::backdrop { background: rgb(0 0 0 / .95); }

/* 탐색기 연결 안내 */
.exp-dlg { max-width: 560px; }
.exp-dlg h2 { display: flex; align-items: center; gap: 8px; }
.exp-steps { margin: 12px 0; padding-left: 20px; display: grid; gap: 10px; line-height: 1.6; }
.exp-steps .btn { vertical-align: middle; margin-right: 4px; }
.exp-note { font-size: .85rem; line-height: 1.6; }
.exp-dlg .foot { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-top: 14px; }
.exp-dlg .foot .grow { flex: 1; }

/* 파일 종류 아이콘 */
svg.fti { width: 26px; height: 32px; flex: none; display: inline-block; vertical-align: middle; }
.fti-doc { fill: var(--card); stroke: var(--fc); stroke-width: 1.6; }
.fti-fold { fill: none; stroke: var(--fc); stroke-width: 1.6; stroke-linejoin: round; }
.fti-band { fill: var(--fc); }
svg.fti text { fill: #fff; font-weight: 800; font-family: inherit; letter-spacing: -.02em; }
.list .row svg.fti { width: 30px; height: 36px; }
.tk-f svg.fti, .cf-file svg.fti { width: 20px; height: 25px; }
.srow svg.fti { width: 24px; height: 30px; }

/* Microsoft 파일 아이콘 + 문서 미리보기 */
img.fti-ms { width: 32px; height: 32px; flex: none; object-fit: contain; vertical-align: middle; }
.list .row img.fti-ms { width: 34px; height: 34px; }
.tk-f img.fti-ms, .cf-file img.fti-ms { width: 22px; height: 22px; }
.srow img.fti-ms { width: 28px; height: 28px; }
.fprev { position: relative; flex: none; width: 44px; height: 44px; display: grid; place-items: center; }
.fprev .fprev-img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: top; border: 1px solid var(--line); border-radius: 6px; background: #fff; }
.fprev > .fti { position: absolute; right: -5px; bottom: -5px; width: 20px !important; height: 20px !important; z-index: 1; filter: drop-shadow(0 1px 1px rgb(0 0 0 / .25)); }
.fprev.noprev > .fti { position: static; width: 34px !important; height: 34px !important; filter: none; }

/* 격자 속 문서(PDF 도면 등): 흰 바탕, 위쪽 기준, 오른쪽 아래 종류 아이콘 */
.ph-badge { position: absolute; right: 6px; bottom: 6px; display: grid; place-items: center; width: 30px; height: 30px; border-radius: 8px; background: rgb(255 255 255 / .92); box-shadow: 0 1px 3px rgb(0 0 0 / .2); pointer-events: none; }
.ph-badge img.fti-ms, .ph-badge svg.fti { width: 22px !important; height: 22px !important; }
.ph-img:has(.ph-badge) { background: #fff; }
.ph-img:has(.ph-badge) img:first-child { object-fit: contain; }
button.fprev { padding: 0; border: 0; background: none; cursor: zoom-in; }
.mviewer .mv-stage img[src*="/thumb"] { background: #fff; }

/* 노란 폴더 아이콘 */
img.fold-ic { width: 24px; height: 24px; flex: none; object-fit: contain; vertical-align: middle; }
.tile .name img.fold-ic { width: 26px; height: 26px; margin-right: 2px; }
.srow img.fold-ic { width: 28px; height: 28px; }

/* 앱 업데이트 */
.up-list { margin: 6px 0 8px; padding-left: 18px; display: grid; gap: 4px; font-size: .9rem; }
.up-list code { font-size: .8rem; background: var(--soft); padding: 1px 6px; border-radius: 6px; }
.up-note { font-size: .85rem; }

/* Claude 연결 */
.tok-list { list-style: none; margin: 10px 0; padding: 0; border: 1px solid var(--line); border-radius: 12px; }
.tok-list li { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 10px 12px; flex-wrap: wrap; }
.tok-list li + li { border-top: 1px solid var(--line); }
.tok-new { margin-top: 12px; padding: 12px 14px; border-radius: 12px; background: var(--accent-soft); }
.tok-cfg { width: 100%; box-sizing: border-box; font-family: ui-monospace, Consolas, monospace; font-size: .8rem; line-height: 1.45; }

/* 출퇴근: 기록마다 오른쪽 정정 요청 */
.attday.has-act { grid-template-columns: minmax(0, 1fr) auto; column-gap: 10px; }
.attday.has-act > :not(.attact) { grid-column: 1; }
.attday .attact { grid-column: 2; grid-row: 1 / span 4; align-self: center; }
.field .lbl { display: block; font-weight: 600; font-size: .9rem; margin-bottom: 6px; }
.attcur { padding: 8px 10px; border-radius: 8px; background: var(--soft); font-variant-numeric: tabular-nums; }

/* 공유 캘린더: 나만 보기 일정 */
.evchip.priv { border-left-style: dashed; }
.evchip svg, .agrow strong svg, .evd dd svg { width: 13px; height: 13px; vertical-align: -2px; margin-right: 3px; }
.evvis { display: flex; gap: 6px; flex-wrap: wrap; }
.evvis label { margin: 0; font-weight: 500; position: relative; }
.evvis input { position: absolute; opacity: 0; pointer-events: none; }
.evvis span { display: inline-flex; align-items: center; gap: 6px; padding: 8px 14px; min-height: 40px; box-sizing: border-box; border: 1px solid var(--line); border-radius: 999px; cursor: pointer; background: var(--card); }
.evvis span svg { width: 16px; height: 16px; }
.evvis input:checked + span { border-color: var(--primary); background: var(--soft); font-weight: 700; }
.evvis input:focus-visible + span { outline: 2px solid var(--primary); outline-offset: 2px; }

/* 결재 › 미수·미지급 (관리자) */
.lg-kind { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin: 4px 0 14px; }
.lg-kind a { display: grid; grid-template-columns: auto 1fr; grid-template-rows: auto auto; column-gap: 8px; align-items: baseline; padding: 12px 16px; border: 1px solid var(--line); border-radius: 12px; background: var(--card); color: var(--fg); text-decoration: none; }
.lg-kind a span { color: var(--muted); font-size: .82rem; }
.lg-kind a b { grid-column: 1 / -1; font-size: 1.25rem; font-variant-numeric: tabular-nums; margin-top: 2px; }
.lg-kind a.on { border: 2px solid var(--accent); padding: 11px 15px; background: color-mix(in srgb, var(--accent) 6%, var(--card)); }
.lg-import { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; padding: 12px 16px; background: var(--accent-soft); border-color: transparent; }
.lg-import svg { width: 18px; height: 18px; vertical-align: -3px; margin-right: 6px; }
.lg-tiles { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.lg-tiles .n { font-size: 1.2rem; font-variant-numeric: tabular-nums; }
.tcount.warn { border-color: color-mix(in srgb, var(--danger) 45%, var(--line)); }
.tcount.warn .n { color: var(--danger); }
.lg-aging { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; margin-bottom: 14px; }
.lg-aging .ag { position: relative; padding: 8px 10px 12px; border: 1px solid var(--line); border-radius: 10px; background: var(--card); overflow: hidden; }
.lg-aging .l { display: block; font-size: .76rem; color: var(--muted); }
.lg-aging b { font-variant-numeric: tabular-nums; font-size: .92rem; }
.lg-aging i { position: absolute; left: 0; bottom: 0; height: 4px; background: #f59e0b; }
.lg-aging .d0 i { background: #fbbf24; } .lg-aging .d30 i { background: #f97316; } .lg-aging .d60 i { background: #ef4444; } .lg-aging .d90 i { background: #991b1b; }
.lg-bar { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-bottom: 10px; }
.lg-bar input[type=search] { width: 220px; max-width: 100%; min-height: 40px; }
.lg-row { width: 100%; text-align: left; font: inherit; color: inherit; background: none; border: 0; border-bottom: 1px solid var(--line); cursor: pointer; }
.lg-row:hover { background: var(--soft); }
.lg-row:focus-visible { outline: 2px solid var(--primary); outline-offset: -2px; }
.lg-name { font-weight: 700; overflow-wrap: anywhere; }
.lg-name .muted { font-weight: 400; font-size: .8rem; }
.lg-amt { display: flex; flex-direction: column; align-items: flex-end; gap: 4px; text-align: right; }
.lg-amt b { font-variant-numeric: tabular-nums; white-space: nowrap; }
dialog.modal.lg-dlg { width: min(720px, calc(100vw - 24px)); }
dialog.modal.lg-pd { padding: 20px; }
.lg-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; }
.lg-head h2 { margin-bottom: 2px; overflow-wrap: anywhere; }
.lg-head .sub { color: var(--muted); font-size: .85rem; }
.lg-sum { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; margin-top: 14px; }
.lg-sum div { padding: 10px 12px; border-radius: 10px; background: var(--soft); }
.lg-sum span { display: block; font-size: .78rem; color: var(--muted); }
.lg-sum b { font-variant-numeric: tabular-nums; }
.lg-sum .bal { background: var(--accent-soft); }
.lg-items { display: grid; gap: 10px; }
.lg-item { border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px; }
.lg-item.done { background: var(--bg); }
.lg-item.done .lg-ih strong { color: var(--muted); }
.lg-ih { display: flex; gap: 10px; align-items: flex-start; }
.lg-ih .grow, .lg-import .grow, .lg-bar .grow { flex: 1; min-width: 0; }
.lg-ih .sub { font-size: .8rem; color: var(--faint); margin-top: 2px; }
.lg-pays { list-style: none; margin: 10px 0 0; padding: 8px 0 0; border-top: 1px dashed var(--line); display: grid; gap: 4px; font-size: .86rem; }
.lg-pays li { display: grid; grid-template-columns: minmax(0, 1fr) auto auto; align-items: center; gap: 8px; color: var(--muted); }
.lg-pays b { font-variant-numeric: tabular-nums; color: var(--fg); }
.lg-acts { margin: 10px 0 0; gap: 6px; }
.lg-settle-row { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.lg-settle-row input { width: auto; }
.lg-ibar { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin: 8px 0; font-size: .88rem; }
.lg-ilist { border: 1px solid var(--line); border-radius: 10px; max-height: 46dvh; overflow-y: auto; }
.lg-irow { display: grid; grid-template-columns: auto minmax(0, 1fr) auto minmax(0, 180px); align-items: center; gap: 10px; padding: 8px 12px; border-bottom: 1px solid var(--line); }
.lg-irow:last-child { border-bottom: 0; }
.lg-irow .sub { font-size: .78rem; color: var(--faint); overflow-wrap: anywhere; }
.lg-irow strong { overflow-wrap: anywhere; }
.lg-iamt { font-variant-numeric: tabular-nums; white-space: nowrap; }
.lg-irow select { min-height: 36px; font-size: .85rem; }
@media (max-width: 640px) {
  .lg-tiles, .lg-aging { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .lg-kind a b { font-size: 1.05rem; }
  .lg-sum { grid-template-columns: 1fr 1fr; } .lg-sum .bal { grid-column: 1 / -1; }
  .lg-irow { grid-template-columns: auto minmax(0, 1fr) auto; }
  .lg-irow select { grid-column: 2 / -1; }
  .lg-bar input[type=search] { flex: 1 1 100%; width: auto; order: 3; }
}

/* 미수·미지급: 업체 메모 */
.lg-memo1 { margin-top: 4px; font-size: .8rem; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lg-memo1 svg { width: 12px; height: 12px; vertical-align: -1px; margin-right: 4px; }
.lg-memo { margin-top: 14px; }
.lg-memo textarea { width: 100%; box-sizing: border-box; }
.lg-memo-foot { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-top: 6px; font-size: .8rem; }
.lg-cr { font-size: .74rem; font-weight: 400; }
.lg-src { font-size: .85rem; margin: 0 0 12px; }
.nowrap { white-space: nowrap; }

/* 미수·미지급: 목록에서 바로 입력 · 자동 지급 · 나눠서 지급 */
.lg-line { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; border-bottom: 1px solid var(--line); }
.lg-line:last-child { border-bottom: 0; }
.lg-line .lg-row { border-bottom: 0; }
.lg-qbtn { margin-right: 12px; white-space: nowrap; }
.lg-qbtn svg { width: 15px; height: 15px; }
.lg-line.qopen { background: var(--soft); }
.lg-qf { grid-column: 1 / -1; display: flex; flex-wrap: wrap; align-items: flex-end; gap: 10px; padding: 4px 14px 12px; }
.lg-qf label { display: grid; gap: 4px; margin: 0; font-size: .8rem; font-weight: 600; color: var(--muted); }
.lg-qf input { min-height: 40px; width: 170px; max-width: 100%; }
.lg-qf input[name=a] { text-align: right; font-variant-numeric: tabular-nums; }
.lg-qbtns { display: flex; gap: 6px; flex-wrap: wrap; }
.lg-qhint { flex-basis: 100%; margin: 0; font-size: .78rem; }
.lg-auto { margin: 8px 0 0; font-size: .82rem; color: var(--muted); display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.lg-auto svg { width: 14px; height: 14px; }
.lg-auto.off { color: var(--danger); }
.linkbtn { border: 0; background: none; padding: 0; color: var(--primary); text-decoration: underline; cursor: pointer; font: inherit; }
.lg-plan { list-style: none; margin: 8px 0 0; padding: 8px 10px; border-radius: 8px; background: var(--soft); display: grid; gap: 4px; font-size: .85rem; }
.lg-plan li { display: grid; grid-template-columns: minmax(0, 1fr) auto auto; gap: 8px; align-items: center; }
.lg-plan b { font-variant-numeric: tabular-nums; }
.pl-list { display: grid; gap: 8px; margin: 12px 0; }
.pl-row { display: grid; grid-template-columns: 40px 150px 130px minmax(0, 1fr) minmax(36px, auto); gap: 6px; align-items: center; }
.pl-row .chip-s { white-space: nowrap; }
.pl-row input { min-height: 38px; }
.pl-row input[name=a] { text-align: right; font-variant-numeric: tabular-nums; }
.pl-n { font-weight: 700; }
.pl-foot { display: flex; justify-content: space-between; align-items: center; gap: 8px; flex-wrap: wrap; font-size: .88rem; font-variant-numeric: tabular-nums; }
.pl-ok { color: var(--muted); } .pl-bad { color: var(--danger); font-weight: 700; }
dialog.modal .foot .grow { flex: 1; }
@media (max-width: 640px) {
  .lg-line { grid-template-columns: 1fr; }
  .lg-qbtn { margin: 0 14px 10px; justify-self: start; }
  .lg-qf input { width: 100%; } .lg-qf label { flex: 1 1 140px; }
  .pl-row { grid-template-columns: 34px minmax(0, 1fr) minmax(0, 1fr) minmax(36px, auto); }
  .pl-row input[name=n] { grid-column: 2 / 4; grid-row: 2; }
}

/* 경비사용: 카드 사용 확인 · 카드·문자 연결 */
.cx-panel { margin-bottom: 14px; }
.cx-head { display: flex; align-items: center; gap: 8px; }
.cx-head h2 { display: flex; align-items: center; gap: 8px; margin: 0; font-size: 1.05rem; }
.cx-head h2 svg { width: 18px; height: 18px; }
.cx-head .grow { flex: 1; }
.cx-sub { font-size: .84rem; margin: 6px 0 10px; }
.cx-month { display: flex; flex-wrap: wrap; gap: 6px 14px; font-size: .84rem; margin-bottom: 10px; padding: 8px 10px; border-radius: 8px; background: var(--soft); }
.cx-month b { margin-right: 4px; }
.cx-bar { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 10px 0; }
.cx-bar select { min-height: 38px; max-width: 260px; }
.cx-list { border: 1px solid var(--line); border-radius: 10px; max-height: 60dvh; overflow-y: auto; }
.cx-row { display: grid; grid-template-columns: auto 92px minmax(0, 1fr) auto 130px; gap: 10px; align-items: center; padding: 8px 12px; border-bottom: 1px solid var(--line); margin: 0; font-weight: 400; cursor: pointer; }
.cx-row.ro { grid-template-columns: 92px minmax(0, 1fr) auto auto; cursor: default; }
.cx-row:last-child { border-bottom: 0; }
.cx-row select { min-height: 34px; font-size: .84rem; }
.cx-row select[data-cxu] { grid-column: 3 / -1; }
.cx-when { font-variant-numeric: tabular-nums; color: var(--muted); font-size: .84rem; }
.cx-m { min-width: 0; overflow-wrap: anywhere; }
.cx-amt { font-variant-numeric: tabular-nums; white-space: nowrap; }
dialog.modal.cx-dlg { width: min(860px, calc(100vw - 24px)); padding: 20px; }
.cx-h3 { font-size: 1rem; margin: 18px 0 4px; }
.cx-tablewrap { overflow-x: auto; }
.cx-table { width: 100%; border-collapse: collapse; font-size: .88rem; }
.cx-table th { text-align: left; font-size: .78rem; color: var(--muted); padding: 6px; border-bottom: 1px solid var(--line); }
.cx-table td { padding: 6px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.cx-table input, .cx-table select { min-height: 36px; width: 100%; box-sizing: border-box; }
.cx-table td:first-child { width: 80px; }
.cx-act { white-space: nowrap; width: 1%; }
.cx-act .btn { margin-left: 4px; }
.cx-new td { background: var(--soft); }
.cx-warn { margin-top: 10px; padding: 8px 12px; border-radius: 8px; background: #fef3c7; color: #92400e; font-size: .86rem; }
.cx-warn svg { width: 15px; height: 15px; vertical-align: -2px; margin-right: 4px; }
@media (prefers-color-scheme: dark) { .cx-warn { background: #78350f; color: #fef3c7; } }
.cx-copy { display: flex; align-items: flex-end; gap: 8px; margin-top: 8px; }
.cx-copy label { flex: 1; display: grid; gap: 4px; margin: 0; font-size: .8rem; }
.cx-copy input { font-family: ui-monospace, Consolas, monospace; font-size: .8rem; }
#cxTest { width: 100%; box-sizing: border-box; }
@media (max-width: 640px) {
  .cx-row { grid-template-columns: auto minmax(0, 1fr) auto; }
  .cx-row .cx-when { grid-column: 2; grid-row: 1; }
  .cx-row .cx-m { grid-column: 2 / -1; }
  .cx-row .cx-amt { grid-column: 3; grid-row: 1; }
  .cx-row select { grid-column: 2 / -1; }
  .cx-row.ro { grid-template-columns: minmax(0, 1fr) auto; }
  .cx-row.ro .cx-when { grid-column: 1; }
  .cx-table thead { display: none; }
  .cx-table tr { display: grid; grid-template-columns: 70px 1fr; gap: 6px; padding: 8px 0; border-bottom: 1px solid var(--line); }
  .cx-table td { border: 0; padding: 0; }
  .cx-table td:first-child { width: auto; grid-row: span 2; }
  .cx-table td.cx-act { grid-column: 1 / -1; width: auto; text-align: right; }
}

.cx-privnote { font-size: .8rem; }
svg.ic + .privcat, .privcat svg { width: 12px; height: 12px; vertical-align: -1px; }
p.muted svg { width: 12px; height: 12px; vertical-align: -1px; margin-right: 2px; }

/* 경비사용 공종 · 인건비 현장 연결 */
tr.entry select.etrade { display: block; width: 100%; margin-top: 4px; font-size: .8rem; min-height: 32px; height: 32px; color: var(--muted); }
tr.entry select[name=category] { display: block; width: 100%; }
.etrade-tag { display: block; font-size: .74rem; color: var(--muted); }
dialog.modal.lbs-dlg { width: min(760px, calc(100vw - 24px)); padding: 20px; }
.lbs-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 10px; }
.lbs-head h2 { margin-bottom: 4px; }
.lbs-head p { font-size: .85rem; margin: 0 0 12px; }
.lbs-list { border: 1px solid var(--line); border-radius: 10px; max-height: 62dvh; overflow-y: auto; }
.lbs-row { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 260px); gap: 10px; align-items: center; padding: 8px 12px; border-bottom: 1px solid var(--line); }
.lbs-row:last-child { border-bottom: 0; }
.lbs-row .sub { font-size: .78rem; color: var(--faint); }
.lbs-row strong { overflow-wrap: anywhere; }
.lbs-row select { min-height: 38px; }
@media (max-width: 640px) { .lbs-row { grid-template-columns: 1fr; } }
