:root {
  --bg: #f5f6f8; --card: #fff; --text: #1f2430; --muted: #6b7280;
  --line: #e3e6eb; --primary: #2f5bea; --primary-d: #2548c4;
  --ok: #17803d; --warn: #b45309; --bad: #b91c1c;
}
* { box-sizing: border-box; }
body { margin: 0; background: var(--bg); color: var(--text);
  font: 15px/1.5 "Malgun Gothic", "Apple SD Gothic Neo", system-ui, sans-serif; }
a { color: var(--primary); text-decoration: none; cursor: pointer; }
a:hover { text-decoration: underline; }
.top { background: #fff; border-bottom: 1px solid var(--line); display: flex;
  align-items: center; gap: 4px; padding: 0 20px; min-height: 56px; flex-wrap: wrap; position: sticky; top: 0; z-index: 5; }
.top .brand { font-weight: 700; margin-right: 20px; }
.top nav a { color: var(--text); padding: 18px 12px; display: inline-block; }
.top nav a.on { color: var(--primary); border-bottom: 2px solid var(--primary); font-weight: 600; }
.top .who { margin-left: auto; color: var(--muted); font-size: 14px; display: flex; gap: 12px; align-items: center; }
main { max-width: 1100px; margin: 0 auto; padding: 24px 20px 60px; }
h1 { font-size: 22px; margin: 0 0 16px; }
h2 { font-size: 16px; margin: 0 0 12px; }
.row { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; margin-bottom: 14px; }
.row .sp { flex: 1; }
.card { background: var(--card); border: 1px solid var(--line); border-radius: 10px; padding: 18px; margin-bottom: 16px; }
.grid { display: grid; gap: 16px; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); }
.stats { display: grid; gap: 12px; grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); margin-bottom: 16px; }
.stat { background: var(--card); border: 1px solid var(--line); border-radius: 10px; padding: 14px 16px; }
.stat b { display: block; font-size: 26px; }
.stat span { color: var(--muted); font-size: 13px; }
table { width: 100%; border-collapse: collapse; }
th, td { text-align: left; padding: 9px 8px; border-bottom: 1px solid var(--line); vertical-align: top; }
th { color: var(--muted); font-weight: 600; font-size: 13px; }
td.num, th.num { text-align: right; }
.empty { color: var(--muted); padding: 12px 0; }
button, .btn { background: var(--primary); color: #fff; border: 0; border-radius: 7px;
  padding: 8px 14px; font: inherit; cursor: pointer; }
button:hover { background: var(--primary-d); }
button.ghost { background: #fff; color: var(--text); border: 1px solid var(--line); }
button.ghost:hover { background: #f1f3f6; }
button.danger { background: #fff; color: var(--bad); border: 1px solid #f0c4c4; }
button.small, .btn.small { padding: 4px 10px; font-size: 13px; }
a.btn { display: inline-block; text-decoration: none; }
.btn.ghost { background: #fff; color: var(--text); border: 1px solid var(--line); cursor: pointer; }
input, select, textarea { font: inherit; padding: 8px 10px; border: 1px solid #cdd2da;
  border-radius: 7px; width: 100%; background: #fff; }
textarea { min-height: 80px; resize: vertical; }
label { display: block; font-size: 13px; color: var(--muted); margin-bottom: 4px; }
.form { display: grid; gap: 12px; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); }
.form .wide { grid-column: 1 / -1; }
.search { max-width: 280px; }
/* 코웍 요청 범위: 눌러서 켜고 끄는 버튼 */
.seg { display: flex; gap: 6px; flex-wrap: wrap; }
.chips { display: flex; gap: 6px; flex-wrap: wrap; margin: 4px 0; }
.seg label, .chip { display: inline-flex; align-items: center; gap: 4px; padding: 6px 12px; border: 1px solid var(--line);
  border-radius: 99px; background: #fff; cursor: pointer; font-size: 14px; user-select: none; }
.seg input, .chip input { display: none; }
.seg label:has(input:checked), .chip:has(input:checked) { background: var(--primary); border-color: var(--primary); color: #fff; }
.chip.mine { border-color: var(--primary); }
.chip .n { font-size: 12px; opacity: .7; }
.chip.all { border-style: dashed; }
.tag { display: inline-block; white-space: nowrap; padding: 2px 9px; border-radius: 99px; font-size: 12px; background: #eef1f6; }
.tag.s-추천 { background: #e8eefc; color: #2548c4; }
.tag.s-서류통과 { background: #e6f4ff; color: #0b6aa8; }
.tag.s-면접 { background: #fff4de; color: var(--warn); }
.tag.s-최종합격 { background: #efe8fd; color: #6b34c9; }
.tag.s-입사 { background: #e3f6e9; color: var(--ok); }
.tag.s-탈락 { background: #fde9e9; color: var(--bad); }
.tag.p-진행중 { background: #e3f6e9; color: var(--ok); }
.tag.mine { background: #eef1fd; color: var(--primary-d); }
.tag.joined { background: #fff4de; color: var(--warn); }
label.chk { display: flex; gap: 8px; align-items: center; color: var(--text); font-size: 15px; margin-bottom: 6px; cursor: pointer; }
label.chk input { width: auto; }
.muted { color: var(--muted); }
.pipeline { display: flex; gap: 8px; flex-wrap: wrap; }
.pipeline div { flex: 1; min-width: 90px; text-align: center; padding: 10px 6px; background: #f6f7fa; border-radius: 8px; }
.pipeline b { display: block; font-size: 22px; }
.login { max-width: 360px; margin: 12vh auto; }
.msg { padding: 10px 14px; border-radius: 8px; margin-bottom: 14px; }
.msg.err { background: #fde9e9; color: var(--bad); }
.msg.ok { background: #e3f6e9; color: var(--ok); }
.modal-bg { position: fixed; inset: 0; background: rgba(20,24,34,.45); display: flex;
  align-items: center; justify-content: center; z-index: 20; padding: 20px; }
.modal { background: #fff; border-radius: 12px; padding: 22px; width: 100%; max-width: 440px; max-height: 90vh; overflow: auto; }
/* 카페 글쓰기 같은 편집기 */
.rte { border: 1px solid var(--line); border-radius: 8px; background: #fff; }
.rte-bar { display: flex; flex-wrap: wrap; align-items: center; gap: 3px; padding: 6px; border-bottom: 1px solid var(--line);
  background: #f8f9fb; position: sticky; top: -22px; z-index: 2; border-radius: 8px 8px 0 0; }
.rte-bar button { background: #fff; color: var(--text); border: 1px solid var(--line); padding: 3px 9px; font-size: 13px; border-radius: 5px; }
.rte-bar button:hover { background: #eef1f6; }
.rte-bar select { width: auto; padding: 3px 6px; font-size: 13px; }
.rte-color { display: inline-flex; align-items: center; gap: 2px; font-size: 13px; color: var(--text); margin: 0; }
.rte-color input { width: 26px; height: 24px; padding: 0; border: 1px solid var(--line); }
.rte-sep { width: 1px; height: 20px; background: var(--line); margin: 0 4px; }
.rte-area { min-height: 420px; padding: 14px; outline: none; line-height: 1.7; overflow-wrap: anywhere; }
.rte-area:empty:before { content: attr(data-ph); color: var(--muted); white-space: pre-line; }
.rich { line-height: 1.7; overflow-wrap: anywhere; margin-top: 10px; }
.rich table, .rte-area table { border-collapse: collapse; max-width: 100%; }
.rich td, .rich th, .rte-area td, .rte-area th { border: 1px solid #ccc; padding: 4px 8px; }
.rich img, .rte-area img { max-width: 100%; height: auto; }
.jdfiles-view { margin-top: 14px; padding-top: 10px; border-top: 1px solid var(--line); }
.jdfile { margin: 4px 0; }
/* JD 올리기·수정: 카페 글쓰기처럼 넓게 */
.modal.wide { max-width: 1000px; max-height: 95vh; }
.modal.wide textarea[name=description] { min-height: 420px; font-size: 15px; line-height: 1.6; }
@media (max-width: 700px) {
  .top { padding: 0 12px; position: static; }
  .top nav a { padding: 14px 7px; }
  .top .brand { display: none; }
  .top .who { margin-left: 0; width: 100%; padding: 0 7px 10px; }
  .top .who span { font-size: 12px; } /* 관리자 화면인지 휴대폰에서도 보이게 */
  .stack { grid-template-columns: 1fr !important; } /* 여러 칸 화면은 한 줄로 */
  main { padding: 16px 16px 60px; }
  .card { overflow-x: auto; }
  table.list { min-width: 640px; } /* 목록 표는 좁은 화면에서 옆으로 밀어서 본다 */
}
/* 필수 조건·참여자 전용 메모 */
.reqbox { margin: 12px 0; padding: 10px 14px; background: #f8f9fb; border-radius: 8px; }
.reqbox ul { margin: 6px 0 0; padding-left: 20px; }
.reqbox table td { padding: 4px 8px 4px 0; }
.hiddenbox { margin: 12px 0; padding: 10px 14px; background: #fff9db; border: 1px solid #ffe066; border-radius: 8px; }
table.reqcheck td { padding: 3px 6px 3px 0; vertical-align: middle; }
table.reqcheck select, table.reqcheck input { width: auto; min-width: 110px; }
/* 잠깐 떴다 사라지는 안내 */
#toasts { position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%); z-index: 1000;
  display: flex; flex-direction: column; gap: 8px; align-items: center; width: max-content; max-width: calc(100vw - 32px); }
.toast { background: #1f2937; color: #fff; padding: 10px 16px; border-radius: 10px; font-size: 14px; line-height: 1.5;
  white-space: pre-line; box-shadow: 0 6px 20px rgba(0,0,0,.18); cursor: pointer; transition: opacity .4s, transform .4s; }
.toast.err { background: #c0392b; }
.toast.out { opacity: 0; transform: translateY(8px); }
/* 서버를 기다리는 동안 맨 위 얇은 막대 */
#busybar { position: fixed; top: 0; left: 0; height: 3px; width: 0; background: #2f5fe0; z-index: 1001; opacity: 0; transition: opacity .2s; }
#busybar.on { opacity: 1; width: 100%; animation: busy 1.2s ease-in-out infinite; }
@keyframes busy { 0% { transform: translateX(-100%); } 100% { transform: translateX(100%); } }
/* 메뉴 숫자, 새 소식 */
.navbadge:not(:empty) { display: inline-block; margin-left: 4px; min-width: 18px; padding: 0 5px; border-radius: 9px;
  background: #e03131; color: #fff; font-size: 11px; line-height: 18px; text-align: center; font-weight: 700; vertical-align: 1px; }
.tag.news { background: #ffe3e3; color: #c92a2a; }
/* JD 화면 탭 */
.tabs { display: flex; gap: 4px; margin: 4px 0 12px; border-bottom: 1px solid #e3e7ee; overflow-x: auto; }
.tabs .tab { background: none; color: #555; border: none; border-bottom: 2px solid transparent; border-radius: 0;
  padding: 10px 14px; font-weight: 500; white-space: nowrap; }
.tabs .tab.on { color: #2f5fe0; border-bottom-color: #2f5fe0; font-weight: 700; }
.modal button[data-ok]:disabled { opacity: .6; cursor: wait; }
/* 휴대폰: 목록 표는 카드처럼 한 줄씩 쌓아서 */
@media (max-width: 700px) {
  table.list { min-width: 0; }
  table.list tr:first-child:has(th) { display: none; }
  table.list tr { display: block; border: 1px solid #e3e7ee; border-radius: 10px; padding: 8px 10px; margin-bottom: 8px; }
  table.list td { display: block; border: none; padding: 2px 0; text-align: left !important; }
  table.list td[data-l]::before { content: attr(data-l); color: #8a94a6; font-size: 12px; }
  table.list td.num { display: inline-block; margin-right: 14px; }
  .card > table:not(.list) td { display: block; width: auto !important; border: none; padding: 2px 0; }
  .card > table:not(.list) td.muted { margin-top: 6px; font-size: 12px; }
  .modal { width: calc(100vw - 24px); max-height: 92vh; padding: 16px; }
  .row { flex-wrap: wrap; }
  h1 { font-size: 20px; }
  .tabs .tab { padding: 10px 10px; }
}
/* 글자색·배경색 색 판 (네이버 카페처럼) */
.rte-palwrap { position: relative; display: inline-block; }
.rte-pal i { display: inline-block; width: 14px; height: 4px; margin-left: 2px; vertical-align: -1px; border-radius: 1px; }
.rte-palette { position: absolute; top: 100%; left: 0; z-index: 50; margin-top: 4px; padding: 10px; background: #fff;
  border: 1px solid var(--line); border-radius: 8px; box-shadow: 0 6px 20px rgba(0,0,0,.15); width: 262px; }
.rte-palette .swrow, .rte-palette .swgrid { display: grid; grid-template-columns: repeat(10, 22px); gap: 3px; margin: 4px 0 8px; }
.rte-palette .sw { width: 22px; height: 22px; padding: 0; border: 1px solid rgba(0,0,0,.12); border-radius: 3px; cursor: pointer; }
.rte-palette .sw:hover { outline: 2px solid #2f5fe0; outline-offset: 1px; }
.rte-palette .sw.none { width: auto; height: 26px; padding: 0 8px; background: #fff; font-size: 12px; display: inline-flex; align-items: center; gap: 6px; color: var(--text); }
.rte-palette .sw.none i { width: 14px; height: 14px; border: 1px solid #ccc; background: #fff linear-gradient(135deg, transparent 44%, #e03131 44%, #e03131 56%, transparent 56%); }
/* 휴대폰: 위쪽 이름 줄 넘침, 필수 조건 표, 색 판 */
@media (max-width: 700px) {
  .top .who { flex-wrap: wrap; gap: 6px 10px; }
  table.reqcheck, table.reqcheck tbody, table.reqcheck tr, table.reqcheck td { display: block; width: 100%; }
  table.reqcheck select, table.reqcheck input { min-width: 0; width: 100%; }
  .rte-palette { width: 240px; }
  .rte-palette .swrow, .rte-palette .swgrid { grid-template-columns: repeat(10, 20px); gap: 2px; }
  .rte-palette .sw { width: 20px; height: 20px; }
}
/* JD 한 줄 보기 (카페 목록처럼) */
table.compact { table-layout: fixed; width: 100%; }
table.compact th:nth-child(1) { width: auto; }
table.compact th:nth-child(2) { width: 90px; } table.compact th:nth-child(3) { width: 56px; }
table.compact th:nth-child(4) { width: 108px; } table.compact th:nth-child(5) { width: 60px; }
table.compact th:nth-child(6) { width: 96px; }  /* 올린 때: "오늘 10:26"이 잘리지 않게 */
table.compact td { padding: 7px 8px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; vertical-align: middle; }
table.compact .cline { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
table.compact .cline .tag { margin-right: 4px; font-size: 11px; padding: 1px 6px; }
table.compact .cmeta { display: none; font-size: 12px; }
table.compact tr.closed td { opacity: .55; }
table.compact tr:hover td { background: #f6f8fc; }
@media (max-width: 700px) {
  table.compact, table.compact tbody { display: block; width: 100%; }
  table.compact td.ct { display: block; width: 100%; max-width: calc(100vw - 70px); }
  table.compact td.cx { display: none !important; }
  table.compact .cmeta { display: block; white-space: normal; }
  table.compact tr { padding: 6px 10px; }
}
#vmode { gap: 0; }
#vmode button { background: #fff; color: var(--text); border: 1px solid var(--line); padding: 5px 12px; font-size: 13px; border-radius: 0; }
#vmode button:first-child { border-radius: 8px 0 0 8px; }
#vmode button:last-child { border-radius: 0 8px 8px 0; border-left: none; }
#vmode button.on { background: #2f5fe0; color: #fff; border-color: #2f5fe0; }
/* 대시보드 목록도 한 줄씩 (길면 …) */
table.dl td { white-space: nowrap; vertical-align: middle; padding: 7px 8px; }
table.dl td:first-child { max-width: 0; width: 100%; overflow: hidden; text-overflow: ellipsis; }
table.dl tr th { white-space: nowrap; }
table.dl .tag { font-size: 11px; padding: 1px 6px; }
@media (max-width: 700px) {
  .card > table.dl td { display: table-cell; }
  table.dl td:first-child { max-width: calc(100vw - 150px); }
}

/* 변경·추가 소식 (2026-10-21) */
a.tab { text-decoration: none; display: inline-block; padding: 8px 14px; }
.tag.upd { background: #fff4d6; color: #8a5a00; }
.updbox { background: #fffaf0; border: 1px solid #f0dfb5; border-radius: 8px; padding: 10px 12px; margin-bottom: 12px; font-size: 14px; }
.updbox > div { margin-top: 4px; }
