:root { --primary:#2f80ed; --primary-dark:#1b6ad4; --side-bg:#f7f9fc; --border:#e3e7ee; --text:#222; --muted:#7a8699; --danger:#e5484d; --ok:#2e9e5b; --warn:#e39b1f; }
* { box-sizing:border-box; }
html, body { height:100%; margin:0; }
body { font-family:"Pretendard","Malgun Gothic","Apple SD Gothic Neo",system-ui,sans-serif; font-size:13px; color:var(--text); background:#fff; }
a { color:var(--primary); text-decoration:none; }
button, input, select, textarea { font:inherit; color:inherit; }
button { cursor:pointer; }
.btn { display:inline-flex; align-items:center; gap:4px; padding:6px 12px; border:1px solid var(--border); border-radius:4px; background:#fff; }
.btn:hover { background:#f3f6fb; }
.btn.primary { background:var(--primary); border-color:var(--primary); color:#fff; }
.btn.primary:hover { background:var(--primary-dark); }
.btn.danger { color:var(--danger); border-color:#f1b5b7; }
.btn.sm { padding:3px 8px; font-size:12px; }
.btn:disabled { opacity:.5; cursor:default; }
.input, .select, .textarea { padding:6px 8px; border:1px solid var(--border); border-radius:4px; background:#fff; width:100%; }
.textarea { min-height:80px; resize:vertical; }
.input:focus, .select:focus, .textarea:focus { outline:none; border-color:var(--primary); }
.muted { color:var(--muted); }
.badge { display:inline-block; min-width:18px; padding:1px 6px; border-radius:10px; background:var(--primary); color:#fff; font-size:11px; text-align:center; }
.tag { display:inline-block; padding:1px 6px; border-radius:3px; background:#eef2f7; color:#556; font-size:11px; white-space:nowrap; }
.tag.ok { background:#e4f5ea; color:var(--ok); } .tag.warn { background:#fff4de; color:var(--warn); } .tag.danger { background:#fde8e8; color:var(--danger); } .tag.blue { background:#e4efff; color:var(--primary); }
.error { color:var(--danger); margin:6px 0; }
.hidden { display:none !important; }

.topbar { height:44px; display:flex; align-items:center; padding:0 16px; gap:16px; border-bottom:1px solid var(--border); background:#fff; position:relative; z-index:20; }
.topbar .logo { font-weight:700; font-size:16px; color:#1c2a3a; letter-spacing:-.5px; }
.topbar .app-switch { position:relative; }
.topbar .app-switch > button { border:0; background:none; font-size:15px; font-weight:600; padding:4px 6px; }
.topbar .spacer { flex:1; text-align:center; color:#1a7f8e; font-weight:700; }
.topbar .profile { display:flex; align-items:center; gap:10px; }
.menu-pop { position:absolute; top:36px; left:0; background:#fff; border:1px solid var(--border); border-radius:6px; box-shadow:0 6px 24px rgba(0,0,0,.12); padding:12px; width:460px; z-index:50; }
.menu-pop h4 { margin:0 0 8px; font-size:12px; color:var(--muted); }
.menu-pop .grid { display:grid; grid-template-columns:repeat(2,1fr); gap:4px 12px; }
.menu-pop .grid a, .menu-pop .grid span { display:flex; align-items:center; gap:8px; padding:6px 8px; border-radius:4px; color:var(--text); }
.menu-pop .grid a:hover { background:#f3f6fb; }
.menu-pop .grid span.off { color:#b8c0cc; text-decoration:line-through; }
.menu-pop .ico { display:inline-flex; width:22px; height:22px; border-radius:5px; background:#e4efff; align-items:center; justify-content:center; font-size:12px; color:var(--primary); }

.app { display:flex; height:calc(100% - 44px); }
.sidebar { width:210px; background:var(--side-bg); border-right:1px solid var(--border); padding:12px 10px; overflow:auto; display:flex; flex-direction:column; }
.sidebar .big { width:100%; padding:9px; font-size:14px; margin-bottom:12px; justify-content:center; }
.sidebar .group { margin-top:10px; }
.sidebar .group-title { font-size:12px; color:var(--muted); padding:4px 8px; display:flex; justify-content:space-between; align-items:center; }
.sidebar .item { display:flex; align-items:center; justify-content:space-between; padding:6px 8px; border-radius:4px; color:var(--text); cursor:pointer; }
.sidebar .item:hover { background:#edf1f7; }
.sidebar .item.active { background:#e2ecfb; color:var(--primary); font-weight:600; }
.sidebar .item.sub { padding-left:22px; font-size:12px; }
.sidebar .bottom { margin-top:auto; padding-top:12px; }
.sidebar .folder-node .fright { display:flex; align-items:center; gap:4px; }
.sidebar .folder-node .fmenu { border:0; background:transparent; color:var(--muted); cursor:pointer; padding:0 4px; font-size:14px; line-height:1; visibility:hidden; }
.sidebar .folder-node:hover .fmenu { visibility:visible; }
.sidebar .drop-over, .sidebar .drop-over > .item { background:#dbe7fb !important; outline:1px dashed var(--primary); }
.sidebar .drop-wrap { display:block; }
.sidebar .folder-node.locked .fname { color:#4a5568; }
.fmenu-pop { position:fixed; z-index:1000; width:220px; background:#fff; border:1px solid var(--border); border-radius:6px; box-shadow:0 6px 20px rgba(0,0,0,.12); padding:6px; }
.fmenu-pop .fmenu-title { font-size:12px; color:var(--muted); padding:4px 6px 6px; border-bottom:1px solid var(--border); margin-bottom:4px; }
.fmenu-pop button[data-act] { display:block; width:100%; text-align:left; border:0; background:transparent; padding:7px 8px; border-radius:4px; cursor:pointer; font-size:13px; }
.fmenu-pop button[data-act]:hover { background:#edf1f7; }
.fmenu-pop button[data-act].danger { color:#c0392b; }
.content { flex:1; overflow:auto; padding:14px 20px; min-width:0; }

.page-head { display:flex; align-items:center; gap:10px; margin-bottom:10px; }
.page-head h2 { margin:0; font-size:17px; }
.page-head .right { margin-left:auto; }
.toolbar { display:flex; align-items:center; gap:6px; padding:8px 0; border-bottom:1px solid var(--border); flex-wrap:wrap; }
.toolbar .right { margin-left:auto; display:flex; gap:6px; align-items:center; }
.notice { background:#fff8e6; border:1px solid #ffe2a8; padding:8px 12px; border-radius:4px; margin-bottom:10px; }

table.list { width:100%; border-collapse:collapse; }
table.list th { text-align:left; font-weight:500; color:var(--muted); padding:8px 6px; border-bottom:1px solid var(--border); white-space:nowrap; }
table.list td { padding:7px 6px; border-bottom:1px solid #eef1f5; vertical-align:middle; }
table.list tr:hover td { background:#f8fafd; }
table.list tr.unread td { font-weight:600; }
table.list .subject a { color:var(--text); }
table.list .num { text-align:right; color:var(--muted); white-space:nowrap; }
table.list .date { color:var(--muted); white-space:nowrap; }
table.list .ellipsis { overflow:hidden; text-overflow:ellipsis; white-space:nowrap; max-width:170px; }
.star { color:#cfd6e0; cursor:pointer; font-size:15px; } .star.on { color:#f5b301; }
.empty { padding:60px; text-align:center; color:var(--muted); }
.pager { display:flex; justify-content:center; gap:4px; padding:14px; align-items:center; }
.pager button { border:0; background:none; padding:4px 8px; border-radius:4px; }
.pager button.cur { background:var(--primary); color:#fff; }

.form-table { width:100%; border-collapse:collapse; margin-bottom:14px; }
.form-table th { width:110px; text-align:left; font-weight:500; background:#f7f9fc; padding:8px; border:1px solid var(--border); }
.form-table td { padding:6px 8px; border:1px solid var(--border); }
.row { display:flex; gap:8px; align-items:center; }
.chips { display:flex; flex-wrap:wrap; gap:4px; align-items:center; min-height:32px; padding:3px 6px; border:1px solid var(--border); border-radius:4px; background:#fff; flex:1; }
.chips input { border:0; outline:none; flex:1; min-width:160px; padding:4px; }
.chip { display:inline-flex; align-items:center; gap:4px; padding:2px 8px; background:#e9f0fb; border-radius:12px; font-size:12px; }
.chip button { border:0; background:none; color:var(--muted); padding:0; }
.dropzone { border:1px dashed #c7ced9; border-radius:4px; padding:14px; text-align:center; color:var(--muted); margin:8px 0; }
.attach-list { display:flex; flex-wrap:wrap; gap:6px; }
.attach-list .chip { background:#f3f6fb; }

.editor { border:1px solid var(--border); border-radius:4px; }
.editor .ed-toolbar { display:flex; gap:2px; flex-wrap:wrap; padding:4px 6px; border-bottom:1px solid var(--border); background:#fafbfd; align-items:center; }
.editor .ed-toolbar button { border:0; background:none; padding:4px 7px; border-radius:3px; min-width:28px; }
.editor .ed-toolbar button:hover { background:#e9eef6; }
.editor .ed-toolbar select { border:1px solid var(--border); border-radius:3px; padding:2px; }
.editor .ed-body { min-height:320px; padding:12px 16px; outline:none; line-height:1.6; overflow:auto; }
.editor .ed-body table td { padding:4px 6px; }

.mail-head { border-bottom:1px solid var(--border); padding-bottom:10px; margin-bottom:10px; }
.mail-head h2 { margin:0 0 8px; font-size:18px; }
.mail-head .meta { display:grid; grid-template-columns:70px 1fr; gap:3px 8px; color:#444; }
.mail-body iframe { width:100%; min-height:480px; border:0; }

.appr-line { border-collapse:collapse; font-size:12px; }
.appr-line th, .appr-line td { border:1px solid #c9d1dc; padding:4px 8px; text-align:center; min-width:84px; }
.appr-line th { background:#f7f9fc; font-weight:500; }
.appr-line td.sig { height:58px; vertical-align:middle; }
.appr-line .st { display:block; font-weight:700; }
.appr-line .st.approved { color:var(--ok); } .appr-line .st.rejected { color:var(--danger); } .appr-line .st.pending { color:var(--muted); font-weight:400; }
.appr-line .date { font-size:11px; color:var(--muted); }
.line-wrap { display:flex; gap:20px; flex-wrap:wrap; align-items:flex-start; }
.doc-paper { background:#fff; border:1px solid var(--border); padding:28px 36px; max-width:900px; }
.doc-paper h1 { text-align:center; font-size:22px; margin:0 0 20px; letter-spacing:4px; }
.doc-body { margin-top:14px; line-height:1.6; }
.doc-body table { border-collapse:collapse; } .doc-body td { padding:4px 6px; }
.opinion { border:1px solid var(--border); border-radius:4px; padding:8px 12px; margin:6px 0; }
.opinion .who { font-weight:600; }
.card { border:1px solid var(--border); border-radius:6px; padding:14px 16px; margin-bottom:12px; background:#fff; }

.modal-bg { position:fixed; inset:0; background:rgba(0,0,0,.3); display:flex; align-items:center; justify-content:center; z-index:100; }
.modal { background:#fff; border-radius:8px; width:760px; max-width:95vw; max-height:90vh; display:flex; flex-direction:column; box-shadow:0 10px 40px rgba(0,0,0,.2); }
.modal .mh { padding:12px 16px; border-bottom:1px solid var(--border); font-weight:600; display:flex; justify-content:space-between; }
.modal .mb { padding:12px 16px; overflow:auto; flex:1; }
.modal .mf { padding:10px 16px; border-top:1px solid var(--border); display:flex; justify-content:flex-end; gap:6px; }
.picker { display:grid; grid-template-columns:1fr 1fr; gap:12px; }
.picker .col { border:1px solid var(--border); border-radius:4px; min-height:320px; max-height:420px; overflow:auto; }
.picker .col .h { padding:6px 10px; background:#f7f9fc; border-bottom:1px solid var(--border); font-weight:600; }
.picker .u { display:flex; justify-content:space-between; padding:5px 10px; cursor:pointer; }
.picker .u:hover { background:#f3f6fb; }
.picker .dept { padding:5px 10px; color:var(--muted); font-size:12px; background:#fbfcfe; }

.login { height:100%; display:flex; flex-direction:column; align-items:center; justify-content:center; gap:14px; }
.login .box { width:320px; display:flex; flex-direction:column; gap:8px; }
.login h1 { font-size:20px; margin:0; } .login h1 b { color:var(--primary); }

.home { padding:30px; max-width:980px; margin:0 auto; }
.tiles { display:grid; grid-template-columns:repeat(4,1fr); gap:12px; }
.tile { border:1px solid var(--border); border-radius:8px; padding:18px; color:var(--text); display:block; }
.tile:hover { border-color:var(--primary); }
.tile.off { color:#b8c0cc; background:#fafbfc; }
.tile .t { font-weight:600; font-size:14px; margin-bottom:4px; } .tile .d { font-size:12px; color:var(--muted); }

@media print { .topbar, .sidebar, .toolbar, .no-print { display:none !important; } .app { height:auto; } .content { padding:0; overflow:visible; } .doc-paper { border:0; max-width:none; } }

.tabs { display:flex; gap:4px; border-bottom:1px solid var(--border); margin:0 0 14px; }
.tabs a { padding:8px 14px; color:var(--muted); border-bottom:2px solid transparent; margin-bottom:-1px; }
.tabs a.active { color:var(--primary); border-bottom-color:var(--primary); font-weight:600; }
pre.log { background:#f7f8fa; border:1px solid var(--border); border-radius:6px; padding:8px; max-height:260px; overflow:auto; font-size:12px; margin-top:8px; white-space:pre-wrap; }

/* 게시판 */
.board-list tr.pinned td { background:#f5f8ff; }
.board-list tr.unread a { font-weight:600; }
.post-view .post-body { display:block; width:100%; min-height:160px; border:0; border-top:1px solid var(--border); margin-top:12px; padding-top:8px; }
.comment { padding:8px 0; border-bottom:1px solid var(--border); }
.comment.reply { margin-left:28px; padding-left:10px; border-left:2px solid var(--border); }
.notice-ok { background:#e9f7ef; border:1px solid #b7e1c6; color:#1d6b3a; padding:8px 12px; border-radius:4px; margin-bottom:10px; }
