/* YBIO 업무포털 — 디자인 토큰 + 컴포넌트 */
:root, [data-theme="dark"] {
  --bg: #0f0d1a; --bg2: #14122299; --panel: #1a1730; --panel2: #231f3f; --line: #2f2a52; --line2: #3d3768;
  --text: #ece9fb; --muted: #a09ac4; --faint: #6f6a94;
  --brand: #7c6cf5; --brand2: #5b8def; --brand-soft: #7c6cf522; --grad: linear-gradient(135deg, #5b8def, #8b5cf6);
  --ok: #34d399; --warn: #fbbf24; --err: #f87171; --info: #38bdf8; --teal: #2dd4bf;
  --shadow: 0 10px 30px #0006; --r: 18px; --r-sm: 12px;
  color-scheme: dark;
}
[data-theme="light"] {
  --bg: #f3f2fb; --bg2: #ffffffcc; --panel: #ffffff; --panel2: #f1effc; --line: #e2dff3; --line2: #cfcaea;
  --text: #1c1838; --muted: #5e5886; --faint: #8e89ad; --brand-soft: #7c6cf518; --shadow: 0 10px 30px #4b3fa01a;
  --ok: #059669; --warn: #b45309; --err: #dc2626; --info: #0284c7; --teal: #0d9488;
  color-scheme: light;
}
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
body { background: var(--bg); color: var(--text); font: 15px/1.55 "Pretendard Variable", Pretendard, -apple-system, "Apple SD Gothic Neo", "Malgun Gothic", "Noto Sans KR", system-ui, sans-serif; -webkit-font-smoothing: antialiased; }
button, input, select, textarea { font: inherit; color: inherit; }
a { color: var(--brand2); text-decoration: none; }
h1, h2, h3, h4 { margin: 0; line-height: 1.3; }
h2 { font-size: 20px; } h3 { font-size: 16px; }
::selection { background: #7c6cf566; }
::-webkit-scrollbar { width: 10px; height: 10px; } ::-webkit-scrollbar-thumb { background: var(--line2); border-radius: 8px; border: 2px solid var(--bg); }
.muted { color: var(--muted); } .faint { color: var(--faint); } .small { font-size: 13px; } .tiny { font-size: 12px; }
.num { font-variant-numeric: tabular-nums; } .right { text-align: right; } .center { text-align: center; } .nowrap { white-space: nowrap; }
.row { display: flex; align-items: center; gap: 10px; } .row.wrap { flex-wrap: wrap; } .col { display: flex; flex-direction: column; gap: 10px; }
.grow { flex: 1; min-width: 0; } .gap-s { gap: 6px; } .gap-l { gap: 18px; } .mt { margin-top: 14px; } .mt-l { margin-top: 22px; } .mb { margin-bottom: 14px; }
.hide { display: none !important; } .pre { white-space: pre-wrap; word-break: break-word; }

/* 부팅 */
.boot { height: 100vh; display: grid; place-content: center; justify-items: center; gap: 16px; color: var(--muted); }
.boot-logo, .logo-mark { width: 56px; height: 56px; border-radius: 16px; background: var(--grad); display: grid; place-items: center; font-weight: 800; font-size: 26px; color: #fff; box-shadow: 0 8px 24px #7c6cf555; }
.boot-logo { animation: pulse 1.4s ease-in-out infinite; } @keyframes pulse { 50% { transform: scale(.92); opacity: .7; } }

/* 버튼·입력 */
.btn { border: 1px solid var(--line2); background: var(--panel2); padding: 9px 16px; border-radius: 999px; cursor: pointer; font-weight: 600; display: inline-flex; align-items: center; gap: 8px; justify-content: center; transition: .15s; white-space: nowrap; }
.btn:hover { border-color: var(--brand); } .btn:disabled { opacity: .5; cursor: not-allowed; }
.btn.primary { background: var(--grad); border-color: transparent; color: #fff; box-shadow: 0 6px 18px #7c6cf540; } .btn.primary:hover { filter: brightness(1.08); }
.btn.ok { background: #10b98122; border-color: #10b98166; color: var(--ok); } .btn.danger { background: #f8717118; border-color: #f8717166; color: var(--err); }
.btn.ghost { background: transparent; border-color: transparent; } .btn.ghost:hover { background: var(--panel2); }
.btn.sm { padding: 5px 12px; font-size: 13px; } .btn.lg { padding: 14px 22px; font-size: 16px; } .btn.block { width: 100%; }
.btn.pink { background: linear-gradient(135deg, #f093fb, #f5576c); color: #fff; border-color: transparent; }
.input, select.input, textarea.input { width: 100%; background: var(--bg); border: 1px solid var(--line2); border-radius: var(--r-sm); padding: 10px 14px; outline: none; transition: .15s; }
.input:focus { border-color: var(--brand); box-shadow: 0 0 0 3px var(--brand-soft); } textarea.input { resize: vertical; min-height: 84px; }
label.field { display: flex; flex-direction: column; gap: 6px; font-size: 13px; color: var(--muted); font-weight: 600; } label.field .req { color: var(--err); }
.form-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 12px; } .form-grid .full { grid-column: 1 / -1; }

/* 카드·뱃지 */
.card { background: var(--panel); border: 1px solid var(--line); border-radius: var(--r); padding: 20px; }
.card.tight { padding: 14px 16px; } .card h3 { margin-bottom: 12px; } .card-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 14px; } .card-head h3 { margin: 0; }
.badge { display: inline-flex; align-items: center; gap: 4px; padding: 2px 10px; border-radius: 999px; font-size: 12px; font-weight: 700; background: var(--panel2); border: 1px solid var(--line2); color: var(--muted); white-space: nowrap; }
.badge.ok { color: var(--ok); background: #34d39918; border-color: #34d39944; } .badge.warn { color: var(--warn); background: #fbbf2418; border-color: #fbbf2444; }
.badge.err { color: var(--err); background: #f8717118; border-color: #f8717144; } .badge.info { color: var(--info); background: #38bdf818; border-color: #38bdf844; } .badge.brand { color: var(--brand); background: var(--brand-soft); border-color: #7c6cf555; }
.avatar { width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; font-size: 20px; flex: none; position: relative; border: 2px solid var(--panel); }
.avatar.sm { width: 30px; height: 30px; font-size: 15px; } .avatar.lg { width: 60px; height: 60px; font-size: 30px; }
.avatar.on::after { content: ""; position: absolute; right: -1px; bottom: -1px; width: 10px; height: 10px; border-radius: 50%; background: var(--ok); border: 2px solid var(--panel); }
.kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 12px; }
.kpi { background: var(--panel2); border: 1px solid var(--line); border-radius: var(--r-sm); padding: 14px 16px; } .kpi b { display: block; font-size: 24px; font-variant-numeric: tabular-nums; } .kpi span { font-size: 12.5px; color: var(--muted); }
.empty { text-align: center; color: var(--faint); padding: 28px 10px; }
table.tbl { width: 100%; border-collapse: collapse; font-size: 14px; } .tbl th { text-align: left; color: var(--muted); font-size: 12.5px; font-weight: 600; padding: 8px 10px; border-bottom: 1px solid var(--line2); white-space: nowrap; }
.tbl td { padding: 10px; border-bottom: 1px solid var(--line); vertical-align: top; } .tbl tr.click { cursor: pointer; } .tbl tr.click:hover td { background: var(--panel2); } .tbl-wrap { overflow-x: auto; }
.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--line); margin-bottom: 16px; overflow-x: auto; } .tab { padding: 10px 16px; border: 0; background: none; cursor: pointer; color: var(--muted); font-weight: 600; border-bottom: 2px solid transparent; white-space: nowrap; }
.tab.on { color: var(--text); border-color: var(--brand); } .tab .cnt { background: var(--err); color: #fff; border-radius: 999px; font-size: 11px; padding: 0 6px; margin-left: 4px; }
.ai-chip { font-size: 11px; padding: 1px 8px; border-radius: 999px; background: linear-gradient(135deg, #5b8def33, #8b5cf633); border: 1px solid #8b5cf666; color: var(--text); font-weight: 700; }
.note { background: var(--panel2); border: 1px dashed var(--line2); border-radius: var(--r-sm); padding: 10px 14px; font-size: 13px; color: var(--muted); }
.note.warn { border-color: #fbbf2466; color: var(--warn); background: #fbbf2410; }

/* 로그인 */
.login-wrap { min-height: 100vh; display: grid; place-items: center; padding: 20px; background: radial-gradient(1200px 600px at 10% -10%, #5b8def22, transparent), radial-gradient(900px 500px at 110% 110%, #8b5cf622, transparent); }
.login { width: min(1080px, 100%); display: grid; grid-template-columns: 1fr 1fr; border-radius: 28px; overflow: hidden; border: 1px solid var(--line); box-shadow: var(--shadow); background: var(--panel); }
.login-hero { background: linear-gradient(150deg, #5b8def, #6f5fd6 45%, #8b4fb3); color: #fff; padding: 56px 48px; display: flex; flex-direction: column; gap: 18px; }
.login-hero h1 { font-size: 40px; letter-spacing: -1px; } .login-hero p { opacity: .92; font-size: 17px; margin: 0; } .login-hero ul { list-style: none; padding: 0; margin: 12px 0 0; display: grid; gap: 12px; font-size: 15.5px; }
.login-hero .logo-mark { background: #ffffff26; box-shadow: none; backdrop-filter: blur(6px); }
.login-form { padding: 48px; display: flex; flex-direction: column; gap: 14px; } .login-form h2 { font-size: 28px; }
.demo-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; } .demo-acc { display: flex; gap: 10px; align-items: center; padding: 9px 12px; border-radius: 14px; border: 1px solid var(--line2); background: var(--panel2); cursor: pointer; text-align: left; }
.demo-acc:hover { border-color: #f093fb; } .demo-acc b { display: block; font-size: 14px; } .demo-acc span { font-size: 11.5px; color: var(--muted); display: block; line-height: 1.3; }
.divider { display: flex; align-items: center; gap: 12px; color: var(--faint); font-size: 13px; } .divider::before, .divider::after { content: ""; flex: 1; height: 1px; background: var(--line); }

/* 앱 셸 */
.topbar { position: sticky; top: 0; z-index: 30; height: 64px; display: flex; align-items: center; gap: 16px; padding: 0 20px; background: var(--bg2); backdrop-filter: blur(14px); border-bottom: 1px solid var(--line); }
.brand { display: flex; align-items: center; gap: 10px; font-weight: 800; font-size: 19px; color: var(--text); letter-spacing: -.3px; } .brand .logo-mark { width: 38px; height: 38px; font-size: 18px; border-radius: 12px; } .brand em { font-style: normal; background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.ai-bar { flex: 1; max-width: 560px; position: relative; } .ai-bar input { padding-left: 42px; border-radius: 999px; background: var(--panel); } .ai-bar .ico { position: absolute; left: 14px; top: 50%; transform: translateY(-50%); }
.top-actions { margin-left: auto; display: flex; align-items: center; gap: 6px; }
.icon-btn { width: 40px; height: 40px; border-radius: 50%; border: 0; background: var(--panel); cursor: pointer; font-size: 18px; position: relative; display: grid; place-items: center; } .icon-btn:hover { background: var(--panel2); }
.dot { position: absolute; top: 2px; right: 0; min-width: 17px; height: 17px; border-radius: 9px; background: var(--err); color: #fff; font-size: 10.5px; font-weight: 800; display: grid; place-items: center; padding: 0 4px; }
.shell { display: grid; grid-template-columns: 250px minmax(0, 1fr); gap: 22px; max-width: 1480px; margin: 0 auto; padding: 22px 20px 90px; }
.side { position: sticky; top: 86px; align-self: start; max-height: calc(100vh - 100px); overflow-y: auto; display: flex; flex-direction: column; gap: 4px; }
.me-card { display: flex; gap: 12px; align-items: center; padding: 6px 10px 14px; } .me-card b { display: block; } .me-card span { font-size: 12.5px; color: var(--muted); }
.nav-item { display: flex; align-items: center; gap: 12px; padding: 11px 14px; border-radius: 14px; color: var(--text); font-weight: 600; cursor: pointer; border: 0; background: none; width: 100%; text-align: left; }
.nav-item:hover { background: var(--panel); } .nav-item.on { background: var(--panel2); color: var(--brand2); box-shadow: inset 3px 0 0 var(--brand); } .nav-item .ico { width: 22px; text-align: center; font-size: 17px; } .nav-item .cnt { margin-left: auto; background: var(--err); color: #fff; font-size: 11px; border-radius: 999px; padding: 0 7px; }
.nav-label { font-size: 12px; color: var(--faint); padding: 16px 14px 6px; font-weight: 700; letter-spacing: .04em; }
.proj-dot { width: 10px; height: 10px; border-radius: 3px; flex: none; }
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 14px; margin-bottom: 18px; flex-wrap: wrap; } .page-head p { margin: 4px 0 0; color: var(--muted); font-size: 14px; }
.cols { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 22px; align-items: start; } .cols-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; } .stack { display: flex; flex-direction: column; gap: 18px; }
.bottom-nav { display: none; }

/* 홈 */
.hero { background: linear-gradient(135deg, #1d2a5e, #3a2a73 60%, #4b2a6b); border: 1px solid #ffffff14; border-radius: 22px; padding: 24px 26px; color: #fff; display: flex; gap: 20px; align-items: center; justify-content: space-between; flex-wrap: wrap; }
[data-theme="light"] .hero { background: linear-gradient(135deg, #5b8def, #8b5cf6); }
.hero h2 { font-size: 23px; } .hero p { margin: 6px 0 0; opacity: .85; } .hero .btn { background: #ffffff1f; border-color: #ffffff33; color: #fff; } .hero .btn.primary { background: #fff; color: #3b2f8f; box-shadow: none; }
.flow { display: grid; grid-template-columns: repeat(6, 1fr); gap: 10px; } .flow a { display: flex; flex-direction: column; gap: 4px; align-items: center; text-align: center; padding: 14px 6px; border-radius: 16px; background: var(--panel); border: 1px solid var(--line); color: var(--text); font-weight: 700; font-size: 13.5px; }
.flow a:hover { border-color: var(--brand); transform: translateY(-2px); } .flow a i { font-style: normal; font-size: 24px; } .flow a span { font-weight: 500; font-size: 11.5px; color: var(--muted); }
.list { display: flex; flex-direction: column; } .list-item { display: flex; gap: 12px; align-items: center; padding: 10px 4px; border-bottom: 1px solid var(--line); cursor: pointer; color: var(--text); } .list-item:last-child { border: 0; } .list-item:hover { background: var(--panel2); border-radius: 10px; }
.bar { height: 8px; border-radius: 6px; background: var(--panel2); overflow: hidden; } .bar > i { display: block; height: 100%; border-radius: 6px; background: var(--grad); }

/* 피드 */
.composer textarea { border: 0; background: transparent; width: 100%; resize: none; outline: none; min-height: 54px; font-size: 16px; }
.composer-tools { display: flex; align-items: center; gap: 8px; border-top: 1px solid var(--line); padding-top: 12px; margin-top: 8px; flex-wrap: wrap; }
.post { padding: 0; overflow: hidden; } .post-body { padding: 18px 20px 6px; } .post-head { display: flex; gap: 12px; align-items: center; margin-bottom: 10px; } .post-head b { display: block; } .post-meta { font-size: 12.5px; color: var(--muted); display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.post-text { white-space: pre-wrap; word-break: break-word; font-size: 15.5px; } .post-text .tag { color: var(--brand2); font-weight: 600; } .post-text .mention { color: var(--teal); font-weight: 700; }
.post.notice { border-color: #fbbf2455; } .post-actions { display: flex; gap: 4px; padding: 6px 12px; border-top: 1px solid var(--line); margin-top: 12px; flex-wrap: wrap; }
.rx { border: 1px solid var(--line2); background: var(--panel2); border-radius: 999px; padding: 2px 10px; cursor: pointer; font-size: 13px; } .rx.on { border-color: var(--brand); background: var(--brand-soft); }
.comments { background: #00000018; padding: 12px 20px 16px; display: flex; flex-direction: column; gap: 10px; } .comment { display: flex; gap: 10px; } .comment .bubble { background: var(--panel2); border-radius: 14px; padding: 8px 12px; font-size: 14px; } .comment .bubble b { font-size: 13px; margin-right: 6px; }
.file-chip { display: inline-flex; gap: 8px; align-items: center; border: 1px solid var(--line2); background: var(--panel2); border-radius: 12px; padding: 6px 12px; font-size: 13px; color: var(--text); margin: 8px 8px 0 0; }

/* 출퇴근 */
.radar { width: 100%; max-width: 340px; aspect-ratio: 1; margin: 0 auto; display: block; }
.clock { font-size: 46px; font-weight: 800; font-variant-numeric: tabular-nums; letter-spacing: -1px; }
.cal { display: grid; grid-template-columns: repeat(7, 1fr); gap: 6px; } .cal .dow { text-align: center; font-size: 12px; color: var(--faint); padding-bottom: 2px; }
.cal .day { min-height: 64px; border-radius: 12px; background: var(--panel2); border: 1px solid var(--line); padding: 6px 8px; font-size: 11.5px; display: flex; flex-direction: column; gap: 2px; } .cal .day b { font-size: 13px; } .cal .day.off { opacity: .45; } .cal .day.today { border-color: var(--brand); }
.cal .day.late b { color: var(--warn); } .cal .day .ev { border-radius: 6px; padding: 1px 5px; background: var(--brand-soft); color: var(--text); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* 타임리포트 */
.timeline { position: relative; border-left: 2px solid var(--line2); margin-left: 8px; padding-left: 18px; display: flex; flex-direction: column; gap: 10px; }
.tl-item { position: relative; background: var(--panel2); border: 1px solid var(--line); border-radius: 14px; padding: 10px 14px; } .tl-item::before { content: ""; position: absolute; left: -25px; top: 16px; width: 10px; height: 10px; border-radius: 50%; background: var(--c, var(--brand)); border: 2px solid var(--panel); }
.timer-box { border: 1px solid #34d39955; background: #34d39912; border-radius: 16px; padding: 14px 16px; display: flex; gap: 14px; align-items: center; flex-wrap: wrap; } .timer-box .t { font-size: 28px; font-weight: 800; font-variant-numeric: tabular-nums; color: var(--ok); }
.chips { display: flex; flex-wrap: wrap; gap: 6px; } .chip { border: 1px solid var(--line2); background: var(--panel2); border-radius: 999px; padding: 4px 12px; font-size: 13px; cursor: pointer; display: inline-flex; gap: 6px; align-items: center; } .chip.on { border-color: var(--brand); background: var(--brand-soft); color: var(--text); font-weight: 700; }
.daybars { display: flex; align-items: flex-end; gap: 4px; height: 110px; } .daybars > div { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 4px; justify-content: flex-end; height: 100%; } .daybars i { display: block; width: 100%; max-width: 22px; border-radius: 6px 6px 2px 2px; background: var(--grad); min-height: 2px; } .daybars span { font-size: 10px; color: var(--faint); }

/* 급여 */
.payslip { max-width: 760px; margin: 0 auto; } .payslip .net { font-size: 34px; font-weight: 800; background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.lock { text-align: center; padding: 40px 20px; } .lock .big { font-size: 54px; }

/* 전자결재 */
.line { display: flex; align-items: stretch; gap: 0; overflow-x: auto; padding: 4px 2px 10px; } .line-step { min-width: 150px; flex: 1; border: 1px solid var(--line2); background: var(--panel2); border-radius: 14px; padding: 10px 12px; position: relative; display: flex; flex-direction: column; gap: 3px; }
.line-step + .line-step { margin-left: 26px; } .line-step + .line-step::before { content: "→"; position: absolute; left: -21px; top: 50%; transform: translateY(-50%); color: var(--faint); font-weight: 800; }
.line-step.pending { border-color: var(--warn); box-shadow: 0 0 0 3px #fbbf2422; } .line-step.approved { border-color: #34d39977; } .line-step.rejected { border-color: var(--err); } .line-step .why { font-size: 11.5px; color: var(--muted); line-height: 1.35; margin-top: 2px; }
.line-step .k { font-size: 11px; font-weight: 800; letter-spacing: .05em; } .k-결재 { color: var(--brand2); } .k-합의 { color: var(--teal); } .k-참조 { color: var(--faint); } .k-기안 { color: var(--muted); }
.doc-kv { display: grid; grid-template-columns: 140px 1fr; gap: 8px 14px; font-size: 14.5px; } .doc-kv dt { color: var(--muted); } .doc-kv dd { margin: 0; white-space: pre-wrap; word-break: break-word; }
.tpl-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; } .tpl { border: 1px solid var(--line2); background: var(--panel2); border-radius: 16px; padding: 14px; cursor: pointer; text-align: left; } .tpl:hover, .tpl.on { border-color: var(--brand); background: var(--brand-soft); } .tpl i { font-style: normal; font-size: 26px; display: block; } .tpl b { display: block; margin-top: 6px; } .tpl span { font-size: 12px; color: var(--muted); }

/* 컴퓨터 사용 에이전트 */
.agent { display: grid; grid-template-columns: minmax(0, 1fr) 330px; gap: 14px; } .agent-screen { position: relative; border: 1px solid var(--line2); border-radius: 14px; overflow: hidden; background: #fff; height: 560px; }
.agent-screen iframe { width: 100%; height: 100%; border: 0; display: block; } .agent-chrome { display: flex; align-items: center; gap: 8px; background: #e9e7f3; color: #444; padding: 6px 12px; font-size: 12px; border-bottom: 1px solid #cfcbe2; } .agent-chrome i { width: 10px; height: 10px; border-radius: 50%; display: inline-block; }
.agent-cursor { position: absolute; z-index: 5; width: 22px; height: 22px; pointer-events: none; transition: left .55s cubic-bezier(.3, .7, .2, 1), top .55s cubic-bezier(.3, .7, .2, 1); left: 40px; top: 60px; filter: drop-shadow(0 2px 3px #0006); }
.agent-cursor.click::after { content: ""; position: absolute; left: -8px; top: -8px; width: 34px; height: 34px; border-radius: 50%; border: 3px solid #7c6cf5; animation: ping .45s ease-out; } @keyframes ping { from { transform: scale(.3); opacity: 1; } to { transform: scale(1.2); opacity: 0; } }
.agent-log { background: #0b0a14; border: 1px solid var(--line2); border-radius: 14px; padding: 12px; font: 12.5px/1.6 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; height: 560px; overflow-y: auto; color: #cfcbe8; }
.agent-log .act { color: #93c5fd; } .agent-log .ok { color: #6ee7b7; } .agent-log .err { color: #fca5a5; } .agent-log .warn { color: #fcd34d; } .agent-log time { color: #6f6a94; margin-right: 6px; }

/* 공시 */
.judge { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; } .judge > div { background: var(--panel2); border: 1px solid var(--line); border-radius: 12px; padding: 10px 12px; } .judge > div.wide { grid-column: 1 / -1; } .judge span { display: block; font-size: 11.5px; color: var(--muted); font-weight: 700; } .judge b { font-size: 14px; font-weight: 600; }
.chat { display: flex; flex-direction: column; gap: 10px; max-height: 420px; overflow-y: auto; padding-right: 4px; } .chat .q { align-self: flex-end; background: var(--grad); color: #fff; border-radius: 16px 16px 4px 16px; padding: 8px 14px; max-width: 85%; } .chat .a { background: var(--panel2); border: 1px solid var(--line); border-radius: 16px 16px 16px 4px; padding: 10px 14px; max-width: 95%; white-space: pre-wrap; }
.msg-wrap { display: grid; grid-template-columns: 260px 1fr; gap: 0; min-height: 520px; padding: 0; overflow: hidden; } .msg-list { border-right: 1px solid var(--line); overflow-y: auto; } .msg-pane { display: flex; flex-direction: column; } .msg-scroll { flex: 1; overflow-y: auto; padding: 16px; display: flex; flex-direction: column; gap: 8px; max-height: 460px; }
.bub { max-width: 72%; padding: 8px 13px; border-radius: 16px; background: var(--panel2); align-self: flex-start; white-space: pre-wrap; word-break: break-word; } .bub.me { align-self: flex-end; background: var(--grad); color: #fff; }

/* 조직도 */
.org ul { list-style: none; margin: 0; padding-left: 22px; border-left: 1px dashed var(--line2); } .org > ul { border: 0; padding: 0; } .org li { margin: 8px 0; } .org .dept { font-weight: 700; display: flex; gap: 8px; align-items: center; } .org .people { display: flex; flex-wrap: wrap; gap: 8px; margin: 8px 0 4px; }
.person { display: flex; gap: 8px; align-items: center; border: 1px solid var(--line); background: var(--panel2); border-radius: 12px; padding: 6px 10px; font-size: 13px; } .person.head { border-color: #7c6cf588; }

/* 모달·토스트·드로어 */
.modal-back { position: fixed; inset: 0; background: #07061099; backdrop-filter: blur(4px); z-index: 60; display: grid; place-items: center; padding: 16px; animation: fade .15s; } @keyframes fade { from { opacity: 0; } }
.modal { background: var(--panel); border: 1px solid var(--line2); border-radius: 22px; width: min(640px, 100%); max-height: 90vh; overflow-y: auto; padding: 24px; box-shadow: var(--shadow); } .modal.wide { width: min(1180px, 100%); } .modal-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 16px; gap: 10px; }
#toasts { position: fixed; bottom: 24px; left: 50%; transform: translateX(-50%); z-index: 90; display: flex; flex-direction: column; gap: 8px; align-items: center; pointer-events: none; }
.toast { background: var(--panel2); border: 1px solid var(--line2); color: var(--text); padding: 10px 18px; border-radius: 999px; box-shadow: var(--shadow); font-weight: 600; animation: rise .2s; max-width: 90vw; } .toast.err { border-color: var(--err); } .toast.ok { border-color: var(--ok); } @keyframes rise { from { transform: translateY(12px); opacity: 0; } }
.drawer { position: fixed; top: 70px; right: 16px; width: min(380px, calc(100vw - 32px)); max-height: 76vh; overflow-y: auto; z-index: 50; background: var(--panel); border: 1px solid var(--line2); border-radius: 18px; box-shadow: var(--shadow); padding: 14px; }
.ai-result { position: absolute; top: 48px; left: 0; right: 0; z-index: 40; background: var(--panel); border: 1px solid var(--brand); border-radius: 16px; padding: 14px; box-shadow: var(--shadow); }

@media (max-width: 1100px) { .cols { grid-template-columns: 1fr; } .agent { grid-template-columns: 1fr; } .agent-log { height: 220px; } .flow { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 860px) {
  .shell { grid-template-columns: 1fr; padding: 14px 12px 96px; } .side { display: none; } .login { grid-template-columns: 1fr; } .login-hero { padding: 32px 28px; } .login-hero h1 { font-size: 30px; } .login-hero ul { display: none; } .login-form { padding: 28px; }
  .bottom-nav { display: flex; position: fixed; bottom: 0; left: 0; right: 0; z-index: 40; background: var(--bg2); backdrop-filter: blur(14px); border-top: 1px solid var(--line); padding: 6px 4px calc(6px + env(safe-area-inset-bottom)); justify-content: space-around; }
  .bottom-nav a { display: flex; flex-direction: column; align-items: center; font-size: 10.5px; color: var(--muted); gap: 1px; padding: 4px 8px; border-radius: 10px; font-weight: 600; } .bottom-nav a i { font-style: normal; font-size: 20px; } .bottom-nav a.on { color: var(--brand2); }
  .cols-2 { grid-template-columns: 1fr; } .judge { grid-template-columns: 1fr 1fr; } .brand span { display: none; } .topbar { padding: 0 12px; gap: 10px; } .msg-wrap { grid-template-columns: 1fr; } .msg-list { border-right: 0; border-bottom: 1px solid var(--line); max-height: 180px; }
  .doc-kv { grid-template-columns: 100px 1fr; } .demo-grid { grid-template-columns: 1fr; } .cal .day { min-height: 50px; padding: 4px; } .clock { font-size: 38px; }
}
@media print { .topbar, .side, .bottom-nav, .no-print, #toasts { display: none !important; } .shell { display: block; padding: 0; } body { background: #fff; color: #000; } .card { border-color: #ccc; } .payslip .net { color: #000; background: none; -webkit-text-fill-color: #000; } }
