/* IIRN 사내 사이트 — 홍보사이트와 같은 토큰을 씁니다 */
:root {
  --ink: #1A1F2B; --sheet: #E9EDF1; --paper: #F8F9FB; --surface: #FFFFFF; --rule: #D3D9E1; --rule-strong: #B8C0CB;
  --pencil: #586272; --marker: #FFD23F; --on-marker: #1A1F2B; --on-ink: #F8F9FB;
  --ok: #1E7A4C; --ok-bg: #E2F3EA; --warn: #8A5A00; --warn-bg: #FFF3C4; --bad: #B3261E; --bad-bg: #FBE4E2; --info: #2251A8; --info-bg: #E3EBFA;
  --font: "Wanted Sans Variable", -apple-system, BlinkMacSystemFont, "Apple SD Gothic Neo", "Malgun Gothic", sans-serif;
  --radius: 10px; --radius-sm: 6px; --topbar-h: 60px;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --ink: #E7EAF0; --sheet: #171B23; --paper: #11141A; --surface: #1A1F29; --rule: #2B3240; --rule-strong: #3A4352;
    --pencil: #9DA6B5; --on-ink: #11141A;
    --ok: #6FD3A0; --ok-bg: #173327; --warn: #F2C94C; --warn-bg: #3A3016; --bad: #FF8A80; --bad-bg: #3D1E1C; --info: #8FB3FF; --info-bg: #1C2A47;
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --ink: #E7EAF0; --sheet: #171B23; --paper: #11141A; --surface: #1A1F29; --rule: #2B3240; --rule-strong: #3A4352;
  --pencil: #9DA6B5; --on-ink: #11141A;
  --ok: #6FD3A0; --ok-bg: #173327; --warn: #F2C94C; --warn-bg: #3A3016; --bad: #FF8A80; --bad-bg: #3D1E1C; --info: #8FB3FF; --info-bg: #1C2A47;
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--paper); color: var(--ink); font-family: var(--font); font-size: 15px; line-height: 1.6; font-weight: 450; word-break: keep-all; overflow-wrap: anywhere; -webkit-font-smoothing: antialiased; }
a { color: inherit; text-underline-offset: .2em; }
a:hover { text-decoration-color: var(--marker); text-decoration-thickness: 2px; }
h1, h2, h3 { margin: 0; line-height: 1.3; letter-spacing: -0.02em; }
p { margin: 0 0 .75em; }
img { display: block; max-width: 100%; }
:focus-visible { outline: 3px solid var(--marker); outline-offset: 1px; box-shadow: 0 0 0 5px var(--ink); border-radius: 4px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: -999px; top: 8px; z-index: 50; background: var(--marker); color: var(--on-marker); padding: 8px 14px; border-radius: var(--radius); }
.skip:focus { left: 8px; }
.muted { color: var(--pencil); }
.small { font-size: 13px; }
.strong { font-weight: 700; }
.num { text-align: right; font-variant-numeric: tabular-nums; }
.late { color: var(--bad); font-weight: 600; }
.grow { flex: 1; }
.hidden, [hidden] { display: none !important; }
.loading { padding: 48px; color: var(--pencil); text-align: center; }
.logo-dark { display: none; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .logo-light { display: none; } :root:not([data-theme="light"]) .logo-dark { display: block; } }
:root[data-theme="dark"] .logo-light { display: none; }
:root[data-theme="dark"] .logo-dark { display: block; }

/* 틀 */
.app { min-height: 100vh; }
/* 위쪽 메뉴 */
.topbar { position: sticky; top: 0; z-index: 30; display: flex; align-items: center; gap: 8px; height: var(--topbar-h); padding: 0 clamp(12px, 2.4vw, 32px); background: var(--sheet); border-bottom: 1px solid var(--rule); }
.brand { display: flex; align-items: center; gap: 8px; text-decoration: none; font-weight: 700; color: var(--pencil); font-size: 13px; margin-right: 12px; flex: none; }
.brand img { height: 28px; width: auto; }
.icon-btn.menu-btn { display: none; }
.top-nav { display: flex; align-items: center; gap: 2px; flex: 1; min-width: 0; }
.top-item { position: relative; }
.top-link { display: inline-flex; align-items: center; gap: 6px; height: 38px; padding: 0 12px; border: 0; border-radius: var(--radius-sm); background: none; color: var(--ink); font: inherit; font-weight: 650; font-size: 15px; text-decoration: none; cursor: pointer; white-space: nowrap; }
.top-link:hover, .top-item.open > .top-link { background: color-mix(in srgb, var(--ink) 7%, transparent); }
.top-item.current > .top-link { background: var(--ink); color: var(--on-ink); }
.top-link .caret { width: 14px; height: 14px; fill: none; stroke: currentColor; stroke-width: 2.2; opacity: .7; transition: transform .15s; }
.top-item.open > .top-link .caret { transform: rotate(180deg); }
.nav-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--marker); }
.top-item.current .nav-dot { box-shadow: 0 0 0 2px var(--ink); }
.dropdown { position: absolute; top: calc(100% + 6px); left: 0; min-width: 210px; padding: 6px; background: var(--surface); border: 1px solid var(--rule); border-radius: var(--radius); box-shadow: 0 10px 30px rgb(0 0 0 / .14); display: none; z-index: 40; }
.dropdown.right { left: auto; right: 0; }
.top-item.open > .dropdown { display: block; }
@media (hover: hover) and (min-width: 901px) {
  .top-item:not(.hush):hover > .dropdown { display: block; }
  .top-item:hover > .dropdown::before { content: ""; position: absolute; left: 0; right: 0; top: -8px; height: 8px; }
}
.dropdown a, .drop-btn { display: flex; align-items: center; gap: 10px; width: 100%; padding: 8px 10px; border-radius: var(--radius-sm); text-decoration: none; font-weight: 550; color: var(--ink); background: none; border: 0; font: inherit; text-align: left; cursor: pointer; }
.dropdown a:hover, .drop-btn:hover { background: var(--sheet); }
.dropdown a[aria-current="page"] { background: var(--ink); color: var(--on-ink); }
.ico { width: 18px; height: 18px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.dropdown .ico { color: var(--pencil); }
/* 링크처럼 보이는 버튼 */
.linklike { background: none; border: 0; padding: 0; font: inherit; color: inherit; cursor: pointer; text-decoration: underline; text-decoration-color: var(--rule-strong); text-underline-offset: 3px; }
.linklike:hover { text-decoration-color: var(--marker); text-decoration-thickness: 2px; }
.linklike.danger { color: var(--bad); }
.dropdown a[aria-current="page"] .ico { stroke: var(--marker); }
.nav-badge { margin-left: auto; min-width: 20px; height: 20px; padding: 0 6px; border-radius: 10px; background: var(--marker); color: var(--on-marker); font-size: 12px; font-weight: 800; display: inline-grid; place-items: center; }
.top-link .nav-badge { margin-left: 2px; }
.top-me { margin-left: auto; flex: none; }
.me-btn { padding-left: 6px; }
.me-info { margin: 0; padding: 8px 10px 10px; border-bottom: 1px solid var(--rule); margin-bottom: 6px; }
.me-info strong, .me-info small { display: block; }
.me-info small { font-size: 12px; color: var(--pencil); }
.drop-btn { color: var(--pencil); }
@media (max-width: 1100px) { .me-name { display: none; } .top-link { padding: 0 9px; font-size: 14.5px; } }
@media (max-width: 900px) {
  .topbar { flex-wrap: wrap; height: auto; min-height: var(--topbar-h); }
  .icon-btn.menu-btn { display: inline-grid; order: 3; }
  .top-me { order: 2; }
  .top-nav { display: none; order: 4; flex-basis: 100%; flex-direction: column; align-items: stretch; gap: 0; padding: 4px 0 12px; max-height: calc(100vh - var(--topbar-h)); overflow-y: auto; }
  .topbar.open .top-nav { display: flex; }
  .top-nav .top-link { width: 100%; justify-content: flex-start; height: 40px; }
  .top-nav .top-link .caret { margin-left: auto; }
  .top-nav .dropdown { position: static; box-shadow: none; border: 0; background: none; padding: 0 0 6px 12px; min-width: 0; }
  .top-nav .top-item.current > .dropdown { display: block; }
}
.main { padding: 28px clamp(16px, 3.4vw, 44px) 64px; min-width: 0; outline: none; }
@media (max-width: 900px) { .main { padding-top: 20px; } }

/* 머리 */
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 12px 24px; flex-wrap: wrap; margin-bottom: 20px; }
.page-head h1 { font-size: clamp(1.5rem, 2.6vw, 1.9rem); font-weight: 850; }
.page-head .sub { margin: 4px 0 0; color: var(--pencil); }
.head-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.crumb { margin: 0 0 8px; font-size: 13px; color: var(--pencil); }
.crumb a::before { content: "‹ "; }
.h2 { font-size: 1.05rem; font-weight: 800; margin: 24px 0 10px; }
.h3 { font-size: .95rem; font-weight: 800; margin: 0 0 8px; }
.tabs { display: flex; gap: 2px; border-bottom: 1px solid var(--rule); margin-bottom: 18px; overflow-x: auto; }
.tabs a { flex: none; padding: 9px 12px; text-decoration: none; font-weight: 600; color: var(--pencil); border-bottom: 3px solid transparent; margin-bottom: -1px; }
.tabs a:hover { color: var(--ink); }
.tabs a[aria-current="page"] { color: var(--ink); border-bottom-color: var(--ink); }
.count { font-size: 12px; color: var(--pencil); font-weight: 600; }
.toolbar { display: flex; align-items: center; gap: 8px 12px; flex-wrap: wrap; margin-bottom: 16px; }
.toolbar input[type="search"] { max-width: 320px; }
.toolbar p { margin: 0; }
.month-nav h2 { font-size: 1.15rem; font-weight: 800; min-width: 7.5em; text-align: center; }

/* 버튼 */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-height: 38px; padding: 0 14px; border-radius: var(--radius-sm); border: 1.5px solid var(--rule-strong); background: var(--surface); color: var(--ink); font: inherit; font-weight: 650; text-decoration: none; cursor: pointer; white-space: nowrap; }
.btn:hover { border-color: var(--ink); }
.btn:disabled { opacity: .55; cursor: progress; }
.btn-primary { background: var(--marker); border-color: var(--marker); color: var(--on-marker); }
.btn-primary:hover { background: var(--ink); border-color: var(--ink); color: var(--on-ink); }
.btn-ink { background: var(--ink); border-color: var(--ink); color: var(--on-ink); }
.btn-danger { background: var(--bad); border-color: var(--bad); color: #fff; }
.btn-danger-ghost { color: var(--bad); border-color: color-mix(in srgb, var(--bad) 40%, transparent); background: transparent; }
.btn-danger-ghost:hover { border-color: var(--bad); }
.btn-sm { min-height: 32px; padding: 0 10px; font-size: 13.5px; }
.btn-lg { min-height: 48px; padding: 0 22px; font-size: 16px; }
.btn-block { width: 100%; }
.icon-btn { width: 38px; height: 38px; border: 0; background: transparent; color: inherit; border-radius: var(--radius-sm); cursor: pointer; font-size: 18px; display: inline-grid; place-items: center; }
.icon-btn:hover { background: color-mix(in srgb, var(--ink) 8%, transparent); }
.file-btn { position: relative; overflow: hidden; }
.file-btn input { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
.form-actions { display: flex; gap: 8px; justify-content: flex-end; align-items: center; flex-wrap: wrap; margin-top: 8px; }
.form-actions.left { justify-content: flex-start; }

/* 입력 */
.stack { display: flex; flex-direction: column; gap: 14px; }
.form-narrow { max-width: 720px; }
.form-wide { max-width: 960px; }
.field { display: flex; flex-direction: column; gap: 5px; font-weight: 600; font-size: 14px; min-width: 0; border: 0; padding: 0; margin: 0; }
.field > span small, legend small { font-weight: 450; color: var(--pencil); margin-left: 4px; }
.field small { font-weight: 450; color: var(--pencil); }
.field.inline { flex-direction: row; align-items: center; gap: 8px; }
legend { padding: 0; margin-bottom: 6px; font-weight: 600; font-size: 14px; }
input, select, textarea { font: inherit; font-weight: 450; font-size: 15px; color: var(--ink); background: var(--surface); border: 1.5px solid var(--rule); border-radius: var(--radius-sm); padding: 8px 11px; width: 100%; min-height: 38px; }
textarea { resize: vertical; line-height: 1.6; }
input:hover, select:hover, textarea:hover { border-color: var(--rule-strong); }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--ink); box-shadow: 0 0 0 3px var(--marker); }
input[type="checkbox"], input[type="radio"] { width: 18px; height: 18px; min-height: 0; accent-color: var(--ink); padding: 0; }
.check { display: inline-flex; align-items: center; gap: 8px; font-weight: 600; cursor: pointer; }
.checks { display: flex; flex-wrap: wrap; gap: 6px; }
.check-chip { position: relative; }
.check-chip input { position: absolute; opacity: 0; inset: 0; width: 100%; height: 100%; cursor: pointer; }
.check-chip span { display: inline-block; padding: 5px 12px; border: 1.5px solid var(--rule); border-radius: 999px; font-weight: 550; font-size: 14px; background: var(--surface); }
.check-chip input:checked + span { background: var(--ink); color: var(--on-ink); border-color: var(--ink); }
.check-chip input:focus-visible + span { outline: 3px solid var(--marker); outline-offset: 2px; }
.grid-2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
.span-2 { grid-column: span 2; }
@media (max-width: 640px) { .grid-2, .grid-3 { grid-template-columns: 1fr; } .span-2 { grid-column: auto; } }
.inline-add { display: flex; gap: 8px; flex-wrap: wrap; }
.inline-add select, .inline-add input[type="date"] { width: auto; }
.inline-add input:not([type]) { flex: 1; min-width: 200px; }
.dt { display: flex; gap: 6px; }
.callout { background: var(--sheet); border-left: 4px solid var(--ink); padding: 10px 14px; border-radius: var(--radius-sm); }
.callout.warn { background: var(--warn-bg); border-left-color: var(--warn); }
.total { font-size: 15px; margin: 0; }
.items-table input, .items-table select { min-height: 34px; padding: 5px 8px; }
.items-table td { padding: 4px 6px; }
.approver-line { list-style: none; margin: 0 0 8px; padding: 0; counter-reset: ap; display: flex; flex-direction: column; gap: 4px; }
.approver-line li { counter-increment: ap; display: flex; justify-content: space-between; align-items: center; padding: 6px 10px; background: var(--sheet); border-radius: var(--radius-sm); }
.approver-line li:not(.muted)::before { content: counter(ap); font-weight: 800; margin-right: 10px; color: var(--pencil); }
.approver-line li span { margin-right: auto; }

/* 표 */
.table-wrap { overflow-x: auto; border: 1px solid var(--rule); border-radius: var(--radius); background: var(--surface); }
.table { width: 100%; border-collapse: collapse; font-size: 14.5px; }
.table th, .table td { text-align: left; padding: 10px 12px; border-bottom: 1px solid var(--rule); vertical-align: top; }
.table thead th { font-size: 13px; font-weight: 700; color: var(--pencil); background: var(--sheet); white-space: nowrap; }
.table tbody tr:last-child td { border-bottom: 0; }
.table tfoot th, .table tfoot td { border-top: 2px solid var(--ink); border-bottom: 0; font-weight: 700; }
.table tbody tr:hover { background: color-mix(in srgb, var(--sheet) 50%, transparent); }
.table .num { text-align: right; }
.table tr.pinned { background: color-mix(in srgb, var(--marker) 10%, transparent); }
.table tr.dim { opacity: .55; }
.table .act { text-align: right; white-space: nowrap; }
.items-table { border: 0; background: transparent; }
.items-table thead th { background: transparent; }
.w-date { width: 110px; } .w-num { width: 90px; } .w-author { width: 110px; } .w-type { width: 70px; } .w-act { width: 1%; }
.row-link { font-weight: 650; text-decoration: none; }
.row-link:hover { text-decoration: underline; text-decoration-color: var(--marker); text-decoration-thickness: 2px; }
.pin { display: inline-block; font-size: 11.5px; font-weight: 800; background: var(--marker); color: var(--on-marker); padding: 0 6px; border-radius: 4px; margin-right: 6px; vertical-align: 1px; }
.pager { display: flex; gap: 4px; justify-content: center; margin-top: 16px; }
.pager a { min-width: 34px; height: 34px; display: grid; place-items: center; border-radius: var(--radius-sm); text-decoration: none; }
.pager a[aria-current="page"] { background: var(--ink); color: var(--on-ink); }
.clip { margin: 2px 0 0; max-width: 46ch; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* 배지·아바타 */
.badge { display: inline-block; font-size: 12px; font-weight: 700; padding: 1px 8px; border-radius: 999px; background: var(--sheet); color: var(--ink); white-space: nowrap; vertical-align: 1px; }
.badge.ok { background: var(--ok-bg); color: var(--ok); }
.badge.warn { background: var(--warn-bg); color: var(--warn); }
.badge.bad { background: var(--bad-bg); color: var(--bad); }
.badge.info { background: var(--info-bg); color: var(--info); }
.badge.mute { background: transparent; color: var(--pencil); border: 1px solid var(--rule); }
.badge.ink { background: var(--ink); color: var(--on-ink); }
.avatar { --h: 210; flex: none; width: 32px; height: 32px; border-radius: 50%; display: inline-grid; place-items: center; font-weight: 800; font-size: 14px; color: hsl(var(--h) 45% 22%); background: hsl(var(--h) 55% 86%); }
.avatar.xs { width: 20px; height: 20px; font-size: 11px; }
.avatar.sm { width: 26px; height: 26px; font-size: 12px; }
.avatar.lg { width: 44px; height: 44px; font-size: 18px; }
.avatar.xl { width: 72px; height: 72px; font-size: 30px; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .avatar { color: hsl(var(--h) 60% 88%); background: hsl(var(--h) 30% 26%); } }

/* 빈 화면 */
.empty { padding: 40px 20px; text-align: center; color: var(--pencil); border: 1.5px dashed var(--rule-strong); border-radius: var(--radius); }
.empty p { margin-bottom: 12px; }
.empty p:last-child { margin: 0; }

/* 대시보드 */
.dash { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.panel { background: var(--surface); border: 1px solid var(--rule); border-radius: var(--radius); padding: 18px 20px; min-width: 0; }
.panel.span-2 { grid-column: span 2; }
.panel h2 { font-size: 14px; font-weight: 800; color: var(--pencil); margin-bottom: 12px; }
.panel-head { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 8px; }
.panel-head h2 { margin: 0; }
.panel-head a { font-size: 13px; color: var(--pencil); }
.panel.today { background: var(--sheet); }
.panel.today .btn + p, .panel.today .done-line + p { margin-top: 12px; }
.panel .empty { padding: 20px; }
@media (max-width: 1100px) { .dash { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 700px) { .dash { grid-template-columns: 1fr; } .panel.span-2 { grid-column: auto; } }
.kv { display: grid; grid-template-columns: max-content 1fr; gap: 6px 18px; margin: 0 0 16px; }
.kv div { display: contents; }
.kv dt { color: var(--pencil); }
.kv dd { margin: 0; font-weight: 600; }
.kv.big { grid-template-columns: repeat(2, 1fr); gap: 0 16px; }
.kv.big div { display: flex; flex-direction: column; }
.kv.big dd { font-size: 1.9rem; font-weight: 850; font-variant-numeric: tabular-nums; letter-spacing: -0.02em; }
.inline-stats { display: flex; flex-wrap: wrap; gap: 8px 32px; }
.inline-stats div { display: flex; flex-direction: column; }
.inline-stats dd { font-size: 1.35rem; font-weight: 800; }
.inline-stats dd.hl { background: var(--marker); color: var(--on-marker); padding: 0 8px; border-radius: 4px; }
.stat { display: flex; align-items: baseline; gap: 6px; margin-bottom: 8px; }
.stat strong { font-size: 2.4rem; font-weight: 850; line-height: 1; letter-spacing: -0.03em; }
.stat span { color: var(--pencil); }
.done-line { font-weight: 700; margin: 0 0 8px; }
.links { list-style: none; margin: 0; padding: 0; }
.links a { display: flex; justify-content: space-between; padding: 8px 0; border-bottom: 1px solid var(--rule); text-decoration: none; }
.links li:last-child a { border-bottom: 0; }
.links strong { font-size: 1.1rem; font-variant-numeric: tabular-nums; }
.links strong.hot { background: var(--marker); color: var(--on-marker); padding: 0 8px; border-radius: 4px; }
.rows { list-style: none; margin: 0; padding: 0; }
.rows > li > a, .rows > li > .row-flat, .row-btn { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 9px 0; border-bottom: 1px solid var(--rule); text-decoration: none; width: 100%; }
.rows > li:last-child > a, .rows > li:last-child > .row-flat, .rows > li:last-child > .row-btn { border-bottom: 0; }
.row-btn { background: none; border-left: 0; border-right: 0; border-top: 0; font: inherit; color: inherit; text-align: left; cursor: pointer; }
.rows a:hover .row-main, .row-btn:hover .row-main { text-decoration: underline; text-decoration-color: var(--marker); text-decoration-thickness: 2px; }
.row-main { min-width: 0; font-weight: 600; }
.row-main small { display: block; font-weight: 450; color: var(--pencil); font-size: 13px; }
.row-side { display: flex; align-items: center; gap: 8px; flex: none; font-size: 13px; color: var(--pencil); }
.plain { list-style: none; margin: 0; padding: 0; }
.plain li { padding: 4px 0; }
.events li { display: flex; gap: 10px; align-items: flex-start; }
.events small { display: block; color: var(--pencil); font-size: 12.5px; }
.who { display: inline-flex; align-items: center; gap: 4px; }

/* 일정 색 */
.dot { flex: none; width: 10px; height: 10px; border-radius: 3px; margin-top: 6px; background: var(--pencil); }
.k-meeting { --k: #2F6FDB; } .k-event { --k: #1A1F2B; } .k-deadline { --k: #C8371E; } .k-task { --k: #B07A00; } .k-out { --k: #1E7A4C; } .k-trip { --k: #7A3FB5; } .k-holiday { --k: #C8371E; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .k-event { --k: #C7CDD8; } }
.dot[class*="k-"] { background: var(--k); }

/* 게시글 */
.post { max-width: 820px; }
.post header { border-bottom: 2px solid var(--ink); padding-bottom: 12px; margin-bottom: 20px; }
.post h1 { font-size: 1.6rem; font-weight: 850; }
.post .sub { color: var(--pencil); margin: 6px 0 0; }
.post-body { line-height: 1.8; font-size: 15.5px; }
.post-body.boxed { background: var(--sheet); padding: 14px 16px; border-radius: var(--radius-sm); margin-bottom: 16px; }
.attach { list-style: none; padding: 12px 14px; margin: 20px 0; background: var(--sheet); border-radius: var(--radius-sm); }
.attach:empty { display: none; }
.attach li::before { content: "📎 "; }
.comments { max-width: 820px; margin-top: 32px; border-top: 1px solid var(--rule); padding-top: 20px; }
.comments h2 { font-size: 1rem; font-weight: 800; margin-bottom: 12px; }
.comments ul { list-style: none; padding: 0; margin: 0 0 16px; }
.comments li { padding: 10px 0; border-bottom: 1px solid var(--rule); }
.comments li p { margin: 0; }
.c-head { display: flex; gap: 8px; align-items: baseline; margin-bottom: 4px !important; }
.c-head .linklike { margin-left: auto; color: var(--pencil); }
.comment-form { display: flex; gap: 8px; align-items: flex-end; }

/* 자료실 */
.split { display: grid; grid-template-columns: 200px minmax(0, 1fr); gap: 24px; }
@media (max-width: 760px) { .split { grid-template-columns: 1fr; } }
.folder-nav { display: flex; flex-direction: column; gap: 2px; }
.folder-nav a { padding: 7px 10px; border-radius: var(--radius-sm); text-decoration: none; font-weight: 550; display: flex; justify-content: space-between; }
.folder-nav a:hover { background: var(--sheet); }
.folder-nav a[aria-current="page"] { background: var(--ink); color: var(--on-ink); }
.folder-nav a[aria-current="page"] .count { color: inherit; }
@media (max-width: 760px) { .folder-nav { flex-direction: row; flex-wrap: wrap; } }
.dropzone { border: 2px dashed var(--rule-strong); border-radius: var(--radius); padding: 16px 18px; margin-bottom: 16px; display: flex; flex-wrap: wrap; align-items: center; gap: 10px 20px; }
.dropzone p { margin: 0; color: var(--pencil); }
.dropzone.over { border-color: var(--ink); background: color-mix(in srgb, var(--marker) 18%, transparent); }
.dropzone .field.inline input { width: 160px; }
#progress:empty { display: none; }

/* 2단 */
.cols-2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 32px; }
.cols-2 > section > .h2:first-child { margin-top: 0; }
@media (max-width: 900px) { .cols-2 { grid-template-columns: 1fr; } }

/* 결재 문서 · 급여명세서 · 회의록 */
.doc-sheet { max-width: 880px; background: var(--surface); border: 1px solid var(--rule); border-radius: var(--radius); padding: clamp(18px, 3vw, 32px); }
.doc-top { display: flex; justify-content: space-between; align-items: flex-start; gap: 20px; flex-wrap: wrap; border-bottom: 2px solid var(--ink); padding-bottom: 16px; margin-bottom: 18px; }
.doc-top h1 { font-size: 1.5rem; font-weight: 850; margin: 2px 0 6px; }
.doc-top p { margin: 0; }
.doc-status { margin-bottom: 14px; }
.doc-sheet section { margin-top: 8px; }
.decisions { background: color-mix(in srgb, var(--marker) 16%, transparent); border-left: 4px solid var(--marker); padding: 10px 14px; border-radius: var(--radius-sm); }
.stamps { list-style: none; margin: 0; padding: 0; display: flex; border: 1.5px solid var(--ink); border-radius: var(--radius-sm); overflow: hidden; }
.stamp { width: 84px; display: flex; flex-direction: column; align-items: center; text-align: center; border-left: 1px solid var(--rule-strong); font-size: 12px; }
.stamp:first-child { border-left: 0; }
.stamp .role { width: 100%; background: var(--sheet); padding: 3px 4px; color: var(--pencil); font-weight: 650; border-bottom: 1px solid var(--rule-strong); }
.stamp .who { padding: 6px 4px 0; font-weight: 700; font-size: 13px; }
.stamp .mark { margin: 4px 0; padding: 1px 6px; border-radius: 4px; font-weight: 800; }
.stamp .when { color: var(--pencil); font-size: 11px; padding-bottom: 6px; }
.stamp.done .mark, .stamp.s-approved .mark { color: var(--bad); border: 1.5px solid var(--bad); }
.stamp.s-rejected .mark { background: var(--bad); color: #fff; }
.stamp.s-pending .mark { background: var(--marker); color: var(--on-marker); }
.stamp.s-waiting .mark, .stamp.s-skipped .mark { color: var(--pencil); }
.opinions ul { list-style: none; padding: 0; margin: 0; }
.opinions li { padding: 8px 0; border-bottom: 1px solid var(--rule); }
.opinions p { margin: 4px 0 0; }
.pay-table td, .pay-table th { width: 25%; }
.net-pay { text-align: right; font-size: 1.15rem; margin: 18px 0 8px; }
.net-pay strong { font-size: 1.6rem; font-weight: 850; background: var(--marker); color: var(--on-marker); padding: 0 8px; border-radius: 4px; margin-left: 8px; }
.pay-grid h3 { margin-top: 4px; }

/* 직원 */
.people { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 12px; }
.people li { background: var(--surface); border: 1px solid var(--rule); border-radius: var(--radius); padding: 14px 16px; }
.people li > a { display: flex; gap: 12px; align-items: center; text-decoration: none; }
.people li > a strong { font-size: 1.05rem; }
.people li > a .muted { display: block; font-size: 13px; }
.people .contact { margin: 10px 0 0; display: flex; flex-direction: column; font-size: 13.5px; color: var(--pencil); }
.profile { display: flex; gap: 18px; align-items: center; margin-bottom: 20px; }
.profile h1 { font-size: 1.6rem; font-weight: 850; }
.profile h1 small { font-size: 1rem; color: var(--pencil); font-weight: 600; }
.profile p { margin: 2px 0 0; }

/* 조직도 */
.org-wrap { overflow-x: auto; padding-bottom: 12px; }
.org-tree, .org-tree ul { list-style: none; margin: 0; padding: 0; }
.org-tree ul { padding-left: 28px; position: relative; }
.org-tree li { position: relative; padding-top: 10px; }
.org-tree ul > li::before { content: ""; position: absolute; left: -16px; top: 0; bottom: 0; border-left: 1.5px solid var(--rule-strong); }
.org-tree ul > li:last-child::before { bottom: auto; height: 32px; }
.org-tree ul > li::after { content: ""; position: absolute; left: -16px; top: 32px; width: 14px; border-top: 1.5px solid var(--rule-strong); }
.org-node { display: inline-block; min-width: 240px; background: var(--surface); border: 1px solid var(--rule); border-radius: var(--radius); padding: 12px 14px; }
.org-node.root { background: var(--ink); color: var(--on-ink); border-color: var(--ink); }
.org-node h3 { font-size: 1rem; font-weight: 800; margin-bottom: 6px; }
.org-node.root h3 { margin: 0; }
.org-people { list-style: none; padding: 0; margin: 0; }
.org-people li { padding: 3px 0 !important; }
.org-people li::before, .org-people li::after { display: none; }
.org-people a { display: flex; align-items: center; gap: 8px; text-decoration: none; }

/* 프로젝트 */
.project-list { border: 1px solid var(--rule); border-radius: var(--radius); background: var(--surface); }
.project-row { display: grid; grid-template-columns: minmax(0, 2.2fr) 90px minmax(120px, 1fr) 130px 80px; gap: 14px; align-items: center; padding: 14px 16px; border-bottom: 1px solid var(--rule); text-decoration: none; }
.project-row:last-child { border-bottom: 0; }
.project-row:hover { background: color-mix(in srgb, var(--sheet) 60%, transparent); }
.project-row:hover strong { text-decoration: underline; text-decoration-color: var(--marker); text-decoration-thickness: 2px; }
.pr-main small { display: block; color: var(--pencil); font-size: 13px; }
.pr-progress { display: flex; align-items: center; gap: 8px; font-size: 12.5px; color: var(--pencil); }
.bar { flex: 1; height: 6px; background: var(--sheet); border-radius: 3px; overflow: hidden; display: block; }
.bar span { display: block; height: 100%; background: var(--ink); }
.pr-due { font-size: 13.5px; }
.pr-owner { font-size: 13px; text-align: right; }
@media (max-width: 900px) { .project-row { grid-template-columns: 1fr auto; } .pr-progress, .pr-owner { display: none; } .pr-due { grid-column: 1 / -1; } }

.kanban { display: grid; grid-template-columns: repeat(4, minmax(220px, 1fr)); gap: 12px; overflow-x: auto; padding-bottom: 8px; }
.col { background: var(--sheet); border-radius: var(--radius); padding: 10px; min-height: 240px; border: 2px solid transparent; }
.col.over { border-color: var(--ink); border-style: dashed; }
.col h2 { font-size: 13.5px; font-weight: 800; padding: 2px 4px 10px; }
.col[data-col="done"] h2 { color: var(--ok); }
.cards { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.card { background: var(--surface); border: 1px solid var(--rule); border-radius: var(--radius-sm); padding: 10px 12px; cursor: grab; }
.card:hover { border-color: var(--rule-strong); }
.card.dragging { opacity: .5; }
.col[data-col="done"] .card-title { color: var(--pencil); text-decoration: line-through; text-decoration-color: var(--rule-strong); }
.card-title { margin: 0 0 6px; font-weight: 600; }
.card-meta { margin: 0; display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; font-size: 12.5px; color: var(--pencil); }

/* 달력 */
.legend { list-style: none; display: flex; flex-wrap: wrap; gap: 4px 14px; margin: 0 0 0 auto; padding: 0; font-size: 12.5px; color: var(--pencil); }
.legend li { display: flex; align-items: center; gap: 5px; }
.legend .dot { margin: 0; }
.cal { border: 1px solid var(--rule); border-radius: var(--radius); overflow: hidden; background: var(--surface); }
.cal-head, .cal-body { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); }
.cal-head div { padding: 8px; font-size: 12.5px; font-weight: 700; color: var(--pencil); background: var(--sheet); text-align: center; }
.cal-day { min-height: 116px; border-top: 1px solid var(--rule); border-left: 1px solid var(--rule); padding: 4px; min-width: 0; }
.cal-day:nth-child(7n + 1) { border-left: 0; }
.cal-day.other { background: color-mix(in srgb, var(--sheet) 45%, transparent); }
.cal-day.other .day-num { opacity: .45; }
.sun, .sun .day-num { color: var(--bad); }
.sat, .sat .day-num { color: var(--info); }
.day-num { border: 0; background: none; font: inherit; font-weight: 700; font-size: 13px; color: inherit; min-width: 26px; height: 26px; padding: 0 5px; border-radius: 13px; white-space: nowrap; overflow-wrap: normal; word-break: normal; cursor: pointer; display: grid; place-items: center; }
.day-num:hover { background: var(--sheet); }
.cal-day.today .day-num { background: var(--marker); color: var(--on-marker); }
.cal-day ul { list-style: none; margin: 2px 0 0; padding: 0; display: flex; flex-direction: column; gap: 2px; }
.ev { width: 100%; display: block; text-align: left; border: 0; font: inherit; font-size: 12px; font-weight: 600; padding: 1px 6px; border-radius: 4px; cursor: pointer; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  background: color-mix(in srgb, var(--k) 14%, transparent); color: var(--ink); border-left: 3px solid var(--k); }
.ev:hover { background: color-mix(in srgb, var(--k) 26%, transparent); }
.ev .tm { color: var(--pencil); margin-right: 4px; font-variant-numeric: tabular-nums; }
.more { border: 0; background: none; font: inherit; font-size: 12px; color: var(--pencil); cursor: pointer; padding: 0 6px; }
@media (max-width: 700px) { .cal-day { min-height: 74px; } .ev { font-size: 0; height: 6px; padding: 0; border-left-width: 0; background: var(--k); } .ev .tm { display: none; } .legend { margin-left: 0; } }

/* 모달 */
.modal { border: 0; padding: 0; border-radius: 14px; width: min(560px, calc(100vw - 24px)); max-height: calc(100vh - 32px); background: var(--surface); color: var(--ink); box-shadow: 0 24px 64px rgba(10, 14, 22, .28); }
.modal.wide { width: min(820px, calc(100vw - 24px)); }
.modal::backdrop { background: rgba(10, 14, 22, .45); }
.modal-head { display: flex; justify-content: space-between; align-items: center; padding: 16px 20px 0; position: sticky; top: 0; background: var(--surface); z-index: 1; }
.modal-head h2 { font-size: 1.15rem; font-weight: 800; }
.modal-body { padding: 14px 20px 20px; }
.big-code { font-size: 1.3rem; font-weight: 800; letter-spacing: .04em; background: var(--marker); color: var(--on-marker); padding: 2px 10px; border-radius: 4px; }

/* 알림 */
#toasts { position: fixed; bottom: 20px; left: 50%; transform: translateX(-50%); display: flex; flex-direction: column; gap: 8px; z-index: 100; width: max-content; max-width: calc(100vw - 32px); }
.toast { background: var(--ink); color: var(--on-ink); padding: 11px 18px; border-radius: var(--radius); font-weight: 600; box-shadow: 0 8px 24px rgba(10, 14, 22, .25); transition: opacity .3s, transform .3s; }
.toast.bad { background: var(--bad); color: #fff; }
.toast.warn { background: var(--marker); color: var(--on-marker); }
.toast.out { opacity: 0; transform: translateY(8px); }
@media (prefers-reduced-motion: reduce) { .toast { transition: none; } }

/* 로그인 */
.auth { min-height: 100vh; display: grid; place-items: center; padding: 24px 16px; background-color: var(--sheet);
  background-image: linear-gradient(color-mix(in srgb, var(--ink) 6%, transparent) 1px, transparent 1px), linear-gradient(90deg, color-mix(in srgb, var(--ink) 6%, transparent) 1px, transparent 1px); background-size: 32px 32px; }
.auth-card { width: min(420px, 100%); background: var(--surface); border: 1px solid var(--rule); border-radius: 14px; padding: 32px 28px; }
.auth-card img { height: 36px; width: auto; margin-bottom: 20px; }
.auth-card h1 { font-size: 1.4rem; font-weight: 850; }
.auth-card .sub { color: var(--pencil); margin: 6px 0 20px; }
.auth-alt { margin-top: 18px; text-align: center; color: var(--pencil); font-size: .92rem; }
.auth-alt a { color: var(--ink); font-weight: 700; }
.pending-list { display: grid; gap: 10px; margin-bottom: 20px; }
.pending-item { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 16px; padding: 12px 14px; border: 1px solid var(--rule); border-left: 4px solid var(--marker); border-radius: 10px; background: var(--surface); }
.pending-item .grow { flex: 1 1 200px; min-width: 0; }
.mail-task { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }

/* 인쇄 */
@media print {
  .topbar, .crumb, .form-actions, .no-print, .tabs, #toasts { display: none !important; }
  .app { display: block; }
  .main { padding: 0; }
  .doc-sheet { border: 0; padding: 0; max-width: none; }
  body { background: #fff; color: #000; }
}

/* ================= 회사 운영 ================= */
.danger { color: var(--bad); }
.ok-text { color: var(--ok) !important; }
.gap-top { margin-top: 24px; }
.mono { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 12.5px; }
.grow { flex: 1; }
.row-inline { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; font-weight: 450; }
.plain-fs { border: 0; padding: 0; margin: 0; min-width: 0; }
.stat-row { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; margin-bottom: 18px; }
@media (max-width: 760px) { .stat-row { grid-template-columns: 1fr; } }
.stat-row .stat strong { font-size: 1.9rem; }
.seg { display: inline-flex; flex-wrap: wrap; gap: 4px; }
.seg a { padding: 4px 10px; border-radius: 999px; text-decoration: none; font-size: 13.5px; font-weight: 600; color: var(--pencil); border: 1px solid var(--rule); }
.seg a[aria-current] { background: var(--ink); color: var(--on-ink); border-color: var(--ink); }

/* 메일 목록 */
.mail-sync { margin: -6px 0 12px; }
.mail-list { list-style: none; margin: 0; padding: 0; border: 1px solid var(--rule); border-radius: var(--radius); background: var(--surface); overflow: hidden; }
.mail-list li + li { border-top: 1px solid var(--rule); }
.mail-list a { display: grid; grid-template-columns: minmax(120px, 190px) minmax(0, 1fr) auto; gap: 14px; align-items: baseline; padding: 11px 14px; text-decoration: none; }
.mail-list a:hover { background: color-mix(in srgb, var(--sheet) 60%, transparent); }
.mail-list .m-from { font-weight: 550; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mail-list .m-from small { color: var(--pencil); font-weight: 500; }
.mail-list .unread .m-from, .mail-list .unread strong { font-weight: 800; }
.mail-list .m-main { min-width: 0; display: flex; gap: 8px; align-items: baseline; overflow: hidden; }
.mail-list .m-main strong { font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; flex: 0 1 auto; max-width: 60%; }
.mail-list .m-sum { color: var(--pencil); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; font-size: 14px; }
.mail-list .m-side { display: flex; gap: 8px; align-items: center; white-space: nowrap; color: var(--pencil); font-size: 13px; }
.unread-dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: var(--info); margin-right: 6px; vertical-align: 2px; }
.star { color: #E0A100; margin-right: 4px; }
@media (max-width: 760px) { .mail-list a { grid-template-columns: 1fr auto; } .mail-list .m-main { grid-column: 1 / -1; grid-row: 2; flex-direction: column; gap: 0; } .mail-list .m-main strong { max-width: 100%; } .mail-list .m-side .badge { display: none; } }

/* 메일 읽기 */
.mail-layout { display: grid; grid-template-columns: minmax(0, 1fr) 260px; gap: 20px; align-items: start; }
@media (max-width: 1000px) { .mail-layout { grid-template-columns: 1fr; } .mail-side { order: -1; } }
.mail-thread { display: flex; flex-direction: column; gap: 12px; min-width: 0; }
.mail-side { position: sticky; top: 16px; }
.side-block { border-top: 1px solid var(--rule); margin-top: 16px; padding-top: 14px; }
.side-block h3 { font-size: 13px; color: var(--pencil); margin-bottom: 8px; }
.msg { background: var(--surface); border: 1px solid var(--rule); border-radius: var(--radius); padding: 14px 16px; }
.msg.out { background: color-mix(in srgb, var(--sheet) 55%, var(--surface)); }
.msg-head { display: flex; justify-content: space-between; gap: 12px; align-items: baseline; cursor: pointer; flex-wrap: wrap; }
.msg-head small { color: var(--pencil); font-weight: 450; }
.msg.collapsed .msg-content { display: none; }
.msg-content > p:first-child { margin: 2px 0 10px; }
.msg-body { white-space: normal; line-height: 1.7; overflow-wrap: anywhere; }
.msg .attach { margin: 12px 0 0; }
.msg .attach li::before { content: none; }
.quoted { margin-top: 10px; color: var(--pencil); font-size: 14px; }
.quoted summary { cursor: pointer; font-size: 13px; }
.mail-frame { width: 100%; min-height: 200px; border: 1px solid var(--rule); border-radius: var(--radius-sm); background: #fff; }
.ai-box { border: 1.5px solid var(--marker); background: color-mix(in srgb, var(--marker) 10%, var(--surface)); border-radius: var(--radius); padding: 12px 16px; }
.ai-box p { margin: 4px 0; }
.ai-head { display: flex; justify-content: space-between; align-items: center; font-weight: 800; font-size: 14px; margin-bottom: 4px; }
.ai-box .kv { margin: 8px 0 0; }
.ai-draft { display: flex; gap: 8px; flex-wrap: wrap; }
.ai-draft input { flex: 1 1 260px; }
.ai-draft select { flex: 0 0 auto; width: auto; }
.composer h2 { margin-bottom: 10px; }
.attach-pick { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.chips { display: flex; gap: 6px; flex-wrap: wrap; }
.chip { display: inline-flex; gap: 6px; align-items: center; padding: 3px 10px; border-radius: 999px; background: var(--sheet); font-size: 13.5px; }
.pick-list { list-style: none; padding: 0; margin: 10px 0 0; max-height: 50vh; overflow: auto; }
.pick-list .row-btn { padding: 8px 4px; }

/* 견적 */
.w-num { width: 84px; } .w-unit { width: 84px; } .w-price { width: 140px; }
.totals { justify-content: end; grid-template-columns: max-content 160px; text-align: right; margin-left: auto; }
.totals dd strong { font-size: 1.15rem; }

/* 앱 */
.app-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 14px; }
.app-card { display: flex; gap: 14px; padding: 16px; background: var(--surface); border: 1px solid var(--rule); border-radius: var(--radius); text-decoration: none; }
.app-card:hover { border-color: var(--rule-strong); }
.app-icon { flex: none; width: 52px; height: 52px; border-radius: 14px; background: var(--c); color: #fff; display: grid; place-items: center; font-weight: 850; font-size: 22px; }
.app-body { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.app-body > small { color: var(--pencil); }
.app-tags { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin-top: 4px; }
.app-tags small { color: var(--pencil); font-size: 12.5px; }
.ai-result { max-height: 60vh; overflow: auto; }

/* 홈페이지 */
.site-actions { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 16px; margin-bottom: 18px; }
.site-actions .steps { margin: 8px 0 0; padding-left: 1.2em; color: var(--pencil); }
.btn-col { display: flex; flex-direction: column; gap: 8px; align-items: stretch; min-width: 200px; }
.build-out { grid-column: 1 / -1; border-top: 1px solid var(--rule); padding-top: 12px; }
.log { background: #12151C; color: #DDE3EC; padding: 12px; border-radius: var(--radius-sm); max-height: 50vh; overflow: auto; font-size: 12px; white-space: pre-wrap; word-break: break-all; }
@media (max-width: 700px) { .site-actions { grid-template-columns: 1fr; } }

/* 권한 */
.perm-box legend { font-weight: 600; font-size: 14px; margin-bottom: 6px; padding: 0; }
.perm-box .check-chip input:disabled + span { opacity: .7; }

/* AI 비서 */
.chat-layout { display: grid; grid-template-columns: 220px minmax(0, 1fr); gap: 20px; align-items: start; }
@media (max-width: 900px) { .chat-layout { grid-template-columns: 1fr; } .chat-list { display: none; } }
.chat-list a { display: block; padding: 7px 10px; border-radius: var(--radius-sm); text-decoration: none; font-size: 14px; font-weight: 550; }
.chat-list a small { display: block; color: var(--pencil); font-weight: 450; font-size: 12px; }
.chat-list a[aria-current] { background: var(--sheet); }
.chat { display: flex; flex-direction: column; gap: 10px; min-width: 0; }
.chat-log { min-height: 46vh; max-height: 64vh; overflow: auto; display: flex; flex-direction: column; gap: 10px; padding: 16px; background: var(--surface); border: 1px solid var(--rule); border-radius: var(--radius); }
.bubble { max-width: 80ch; padding: 10px 14px; border-radius: 14px; line-height: 1.65; overflow-wrap: anywhere; }
.bubble.me { align-self: flex-end; background: var(--ink); color: var(--on-ink); border-bottom-right-radius: 4px; }
.bubble.ai { align-self: flex-start; background: var(--sheet); border-bottom-left-radius: 4px; }
.bubble.ai ul { margin: 4px 0; padding-left: 1.2em; }
.bubble.thinking { color: var(--pencil); font-style: italic; }
.tool-note { align-self: flex-start; margin: 0; font-size: 12.5px; color: var(--pencil); }
.chat-hello { margin: auto 0; text-align: center; }
.chat-hello .chips { justify-content: center; margin-top: 10px; }
.chip-btn { font: inherit; font-size: 14px; padding: 6px 12px; border-radius: 999px; border: 1px solid var(--rule-strong); background: var(--surface); color: var(--ink); cursor: pointer; }
.chip-btn:hover { border-color: var(--ink); }
.chat-input { display: flex; gap: 8px; align-items: flex-end; }
.chat-input textarea { flex: 1; resize: vertical; }
.chat + p, .chat > p { margin: 0; }

/* 대시보드: 회사 운영 */
.ops-strip { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 14px; margin-bottom: 16px; }
.ops-strip .panel { padding: 14px 16px; }
.ops-strip .stat strong { font-size: 1.8rem; }
.toolbar select { width: auto; max-width: 240px; }
[data-amt] { white-space: nowrap; }
.panel + .panel, form.panel + form.panel { margin-top: 16px; }
.cols-2 > .panel + .panel, .stat-row > .panel + .panel, .ops-strip > .panel + .panel, .dash > .panel + .panel { margin-top: 0; }

/* 주소록 */
.select-bar { display: flex; flex-wrap: wrap; gap: 8px 10px; align-items: center; padding: 10px 12px; margin-bottom: 12px; border-radius: var(--radius); background: var(--sheet); position: sticky; top: calc(var(--topbar-h) + 8px); z-index: 2; }
.select-bar select { width: auto; }
.table .chk { width: 36px; }
.table.contacts td { white-space: nowrap; }
.linklike.strong { font-weight: 700; }
.rcpt { display: grid; gap: 8px; }
.rcpt .label-row { font-weight: 650; font-size: 14px; }
.rcpt-add { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.rcpt-add input[type="email"] { flex: 2 1 220px; }
.rcpt-add input[data-rcpt-name] { flex: 1 1 140px; }
.chip.direct { background: var(--surface); border: 1px dashed var(--rule-strong); }
.pick-groups { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.contact-pick label.row-btn { gap: 10px; justify-content: flex-start; }
.contact-pick label.row-btn > span { flex: 1; }
.contact-pick input:disabled + span { opacity: .6; }
.bulk-progress progress { width: 100%; height: 10px; }

/* 직원 사진·이력서 */
img.avatar.photo { object-fit: cover; background: var(--sheet); }
.staff-media { display: grid; grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr); gap: 16px; padding: 14px; border: 1px solid var(--rule); border-radius: var(--radius); background: var(--paper); }
@media (max-width: 700px) { .staff-media { grid-template-columns: 1fr; } }
.photo-box { display: flex; gap: 14px; align-items: flex-start; }
.photo-frame { flex: none; width: 96px; height: 96px; border-radius: 12px; overflow: hidden; background: var(--sheet); display: grid; place-items: center; border: 1px solid var(--rule); }
.photo-frame img { width: 100%; height: 100%; object-fit: cover; display: block; }
.photo-frame.big { width: 240px; height: 240px; margin: 0 auto; }
.photo-empty { font-size: 34px; font-weight: 800; color: var(--pencil); }
.stack-sm { display: grid; gap: 6px; }
.stack-sm p, .resume-box p { margin: 0; }
.resume-box { display: grid; gap: 6px; align-content: start; }
.btn-row { display: flex; gap: 6px; flex-wrap: wrap; }
.table .who { display: inline-flex; align-items: center; gap: 10px; }
.proj-list { list-style: none; margin: 6px 0 0; padding: 0; max-height: 260px; overflow-y: auto; border: 1px solid var(--rule); border-radius: var(--radius-sm); }
.proj-list li { display: flex; justify-content: space-between; gap: 10px; align-items: center; padding: 7px 10px; border-bottom: 1px solid var(--rule); }
.proj-list li:last-child { border-bottom: 0; }
.proj-list li.dim a { color: var(--pencil); }
.table.access .c { text-align: center; }
.table.access input[type="checkbox"] { width: 18px; height: 18px; }
.unlock { max-width: 460px; }

/* 휴가 규칙 */
.mode-cards { display: grid; gap: 10px; }
.mode-card { display: flex; gap: 12px; align-items: flex-start; padding: 14px 16px; border: 1.5px solid var(--rule); border-radius: var(--radius); background: var(--surface); cursor: pointer; }
.mode-card.on { border-color: var(--ink); box-shadow: inset 4px 0 0 var(--marker); }
.mode-card > input { margin-top: 4px; }
.mode-card > span { display: grid; gap: 4px; }
.mode-card small { color: var(--pencil); }
.mode-sub { display: grid; gap: 6px; margin-top: 6px; }
.mode-sub .field.inline { display: flex; align-items: center; gap: 8px; }
.mode-sub .field.inline input { width: 100px; }
.leave-box p { margin: 0 0 6px; }

/* 홈 */
.home-head { margin-bottom: 18px; }
.home-head h1 { font-size: 1.6rem; margin: 0; }
.home-head .sub { margin: 4px 0 0; color: var(--pencil); }
.home { display: grid; grid-template-columns: minmax(0, 2fr) minmax(280px, 1fr); gap: 18px; align-items: start; }
.home-main, .home-side { display: grid; gap: 16px; }
.home .panel + .panel { margin-top: 0; }
@media (max-width: 960px) { .home { grid-template-columns: 1fr; } .home-side { order: -1; } }
.checks { display: flex; flex-wrap: wrap; gap: 8px; }
.check-item { display: inline-flex; align-items: baseline; gap: 8px; padding: 10px 14px; border: 1px solid var(--rule); border-radius: var(--radius); background: var(--surface); text-decoration: none; color: var(--ink); }
.check-item strong { font-size: 1.25rem; font-variant-numeric: tabular-nums; }
.check-item span { font-size: 14px; color: var(--pencil); }
.check-item.hot { border-color: var(--marker); box-shadow: inset 3px 0 0 var(--marker); }
.check-item.bad strong { color: var(--bad); }
.check-item:hover { border-color: var(--ink); }
.task-group { font-size: 13px; font-weight: 750; margin: 14px 0 2px; color: var(--ink); }
.task-group:first-of-type { margin-top: 4px; }
.task-group.late { color: var(--bad); }
.task-group.muted { color: var(--pencil); }
.task-group small { font-weight: 600; color: var(--pencil); margin-left: 4px; }
.prio { display: inline-grid; place-items: center; width: 16px; height: 16px; margin-right: 6px; border-radius: 4px; background: var(--bad-bg); color: var(--bad); font-size: 11px; font-weight: 900; }
.work-card { background: var(--sheet); }
.work-top { display: flex; justify-content: space-between; align-items: center; }
.work-top h2 { margin: 0; }
.work-state { font-size: 13px; font-weight: 750; padding: 3px 10px; border-radius: 999px; background: var(--surface); color: var(--pencil); }
.work-state.on { background: var(--ok-bg); color: var(--ok); }
.work-state.done { background: var(--surface); color: var(--ink); }
.work-time { font-size: 1.35rem; font-weight: 800; margin: 10px 0 6px; font-variant-numeric: tabular-nums; }
.work-act { display: flex; gap: 8px; margin: 10px 0 4px; }
.work-act select { width: auto; }
.work-act .btn-primary { flex: 1; }
.work-links { margin: 10px 0 0; }
.out-line { margin: 10px 0 0; padding-top: 10px; border-top: 1px solid var(--rule); }
.notice-list li { display: flex; justify-content: space-between; gap: 10px; padding: 6px 0; border-bottom: 1px solid var(--rule); }
.notice-list li:last-child { border-bottom: 0; }
.notice-list a { text-decoration: none; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.notice-list small { flex: none; }

/* 근태 */
.table.att td { vertical-align: middle; }
.table.att tr.att-warn td:first-child { box-shadow: inset 3px 0 0 var(--bad); }
.warn-text { color: var(--bad); }
.month-nav { display: flex; align-items: center; gap: 10px; }
.month-nav h2 { margin: 0; font-size: 1.1rem; }
.req-list { list-style: none; margin: 0 0 20px; padding: 0; display: grid; gap: 8px; }
.req-item { display: flex; gap: 12px; padding: 12px 14px; border: 1px solid var(--rule); border-radius: var(--radius); background: var(--surface); }
.req-item p { margin: 4px 0 0; }
.req-side { display: grid; gap: 6px; justify-items: end; align-content: start; }

/* 직원 카드 */
.view-toggle { display: inline-flex; border: 1px solid var(--rule); border-radius: var(--radius-sm); overflow: hidden; }
.view-toggle .icon-btn { border-radius: 0; width: 38px; height: 36px; display: grid; place-items: center; background: var(--surface); }
.view-toggle .icon-btn svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.8; }
.view-toggle .icon-btn[aria-pressed="true"] { background: var(--ink); color: var(--on-ink); }
.inline-search { display: flex; gap: 8px; }
.inline-search input { max-width: 320px; }
.pcards { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; }
.pcards.big { grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); }
.pcards.small { grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 8px; }
.pcard { display: flex; gap: 12px; align-items: center; height: 100%; padding: 12px 14px; border: 1px solid var(--rule); border-radius: var(--radius); background: var(--surface); text-decoration: none; color: var(--ink); }
.pcards.big .pcard { flex-direction: column; text-align: center; padding: 20px 14px 16px; }
.pcard.link { cursor: pointer; }
.pcard.link:hover, .pcard.link:focus-visible { border-color: var(--ink); }
.pcard .pc-text { display: grid; gap: 3px; min-width: 0; justify-items: inherit; }
.pcards.big .pc-text { justify-items: center; }
.pcard strong { font-size: 1.02rem; }
.pcard .muted { font-size: 13px; }
.pcard .tel { font-size: 13.5px; color: var(--pencil); text-decoration: none; }
.pcard .tel:hover { text-decoration: underline; }
.pcards.big .avatar.xl { width: 88px; height: 88px; font-size: 34px; }
.avatar.md { width: 40px; height: 40px; font-size: 16px; }
.pcards + p { margin-top: 12px; }
