/* 온리드 자료실 — 회사 홈페이지와 같은 색·글꼴을 쓴다 */

:root {
  --ink: #0B1220;
  --ink-soft: #1A2333;
  --cobalt: #2049E6;
  --cobalt-deep: #1737B8;
  --mist: #F4F6F9;
  --line: #E3E8EF;
  --gray: #5B6472;
  --gray-light: #9AA3B2;
  --red: #C8342B;
  --amber: #8A5A00;
  --green: #157347;
  --radius: 14px;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

* { margin: 0; padding: 0; box-sizing: border-box; }

body {
  font-family: "Pretendard Variable", Pretendard, -apple-system, system-ui, sans-serif;
  background: var(--mist);
  color: var(--ink);
  line-height: 1.65;
  font-size: 15px;
  word-break: keep-all;
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; text-decoration: none; }
ul { list-style: none; }

:focus-visible { outline: 3px solid var(--cobalt); outline-offset: 2px; border-radius: 4px; }

.ic { width: 14px; height: 14px; fill: none; stroke: currentColor; stroke-width: 2;
      stroke-linecap: round; stroke-linejoin: round; flex: none; }

/* ── 상단 바 ─────────────────────────────────────────── */
.top { background: var(--ink); color: #fff; }
.top .wrap {
  max-width: 1140px; margin: 0 auto; padding: 0 20px;
  height: 60px; display: flex; align-items: center; gap: 28px;
}
.brand { display: flex; align-items: center; gap: 10px; flex: none; }
.brand .logo { height: 22px; width: auto; display: block; }
.brand span {
  font-size: 14px; font-weight: 600; color: rgba(255, 255, 255, 0.6);
  padding-left: 10px; border-left: 1px solid rgba(255, 255, 255, 0.2);
}
.nav { display: flex; gap: 4px; flex: 1; }
.nav a {
  font-size: 14.5px; font-weight: 600; color: rgba(255, 255, 255, 0.7);
  padding: 7px 14px; border-radius: 999px; transition: background 0.2s, color 0.2s;
}
.nav a:hover { color: #fff; background: rgba(255, 255, 255, 0.08); }
.nav a.on { color: #fff; background: var(--cobalt); }

.me { display: flex; align-items: center; gap: 12px; font-size: 13.5px; }
.me .who { color: rgba(255, 255, 255, 0.75); white-space: nowrap; }
.me .who b { color: #7A96FF; font-weight: 700; font-size: 11px; letter-spacing: 0.04em; }
.inline { display: inline; }
.ghost {
  background: none; border: 0; font: inherit; font-size: 13px;
  color: rgba(255, 255, 255, 0.6); cursor: pointer; padding: 4px 2px;
}
.ghost:hover { color: #fff; text-decoration: underline; }

/* ── 본문 ───────────────────────────────────────────── */
main { max-width: 900px; margin: 0 auto; padding: 32px 20px 72px; }
main.wide { max-width: 1140px; }

h1 { font-size: 25px; font-weight: 800; letter-spacing: -0.03em; }
h2 { font-size: 17px; font-weight: 700; letter-spacing: -0.02em; }
.sub { color: var(--gray); font-size: 14px; margin-top: 6px; }
.dim { color: var(--gray-light); font-style: normal; }

.head-row {
  display: flex; align-items: flex-end; justify-content: space-between;
  gap: 16px; margin-bottom: 22px; flex-wrap: wrap;
}

.card {
  background: #fff; border: 1px solid var(--line);
  border-radius: var(--radius); padding: 24px; margin-bottom: 20px;
}
.card > h2 { margin-bottom: 4px; }
.card > .sub { margin-bottom: 18px; }

/* ── 폼 ─────────────────────────────────────────────── */
.field { margin-bottom: 16px; }
.field label { display: block; font-size: 13.5px; font-weight: 700; margin-bottom: 6px; }
.field input, .field select, .field textarea {
  width: 100%; font: inherit; font-size: 14.5px; color: var(--ink);
  background: var(--mist); border: 1.5px solid transparent; border-radius: 10px;
  padding: 11px 13px; transition: border-color 0.2s, background 0.2s;
}
.field textarea { resize: vertical; min-height: 120px; line-height: 1.7; }
.field input:focus, .field select:focus, .field textarea:focus {
  outline: none; border-color: var(--cobalt); background: #fff;
}
.field input[type="file"] {
  padding: 14px; background: #fff; border: 1.5px dashed var(--line); cursor: pointer;
}
.field input[type="file"]:hover { border-color: var(--cobalt); background: #FAFBFF; }
.field .hint { font-size: 12.5px; color: var(--gray-light); margin-top: 5px; }
.row { display: flex; gap: 14px; flex-wrap: wrap; }
.row > * { flex: 1; min-width: 180px; }

/* 체크박스 */
.check {
  display: flex; align-items: flex-start; gap: 9px;
  font-size: 14px; cursor: pointer; margin-bottom: 16px; user-select: none;
}
.check input { width: 17px; height: 17px; margin-top: 2px; accent-color: var(--cobalt); flex: none; cursor: pointer; }
.check span { font-weight: 600; }
.check span em { display: block; font-style: normal; font-weight: 400; font-size: 12.5px; color: var(--gray-light); }
.check.tight { margin-bottom: 0; }

.picked { margin-top: 10px; display: grid; gap: 5px; }
.picked li {
  display: flex; justify-content: space-between; gap: 12px; align-items: center;
  font-size: 13.5px; background: var(--mist); border-radius: 8px; padding: 8px 12px;
}
.picked li span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.picked li b { color: var(--gray); font-weight: 600; flex: none; }
.picked li.sum { background: #E8EEFD; font-weight: 700; }
.picked li.sum b { color: var(--cobalt-deep); }

/* 업로드 진행률 — 큰 파일은 이게 없으면 멈춘 줄 안다 */
.progress { margin-top: 20px; }
.progress-track {
  height: 10px;
  background: var(--line);
  border-radius: 999px;
  overflow: hidden;
}
.progress-fill {
  height: 100%;
  width: 0;
  background: var(--cobalt);
  border-radius: 999px;
  transition: width 0.25s linear;
}
.progress-text {
  margin-top: 9px;
  font-size: 13.5px;
  font-weight: 600;
  color: var(--gray);
  font-variant-numeric: tabular-nums;
}
.progress.err .progress-fill { background: var(--red); }
.progress.err .progress-text { color: var(--red); }

.keep-list { display: grid; gap: 8px; background: var(--mist); border-radius: 10px; padding: 12px 14px; }
.keep-list em { font-style: normal; color: var(--gray-light); font-weight: 400; font-size: 12.5px; }

.form-foot {
  display: flex; justify-content: flex-end; gap: 10px;
  margin-top: 24px; padding-top: 20px; border-top: 1px solid var(--line);
}

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 7px;
  font: inherit; font-size: 14.5px; font-weight: 700; border: 0; border-radius: 999px;
  padding: 11px 24px; cursor: pointer; background: var(--cobalt); color: #fff;
  transition: background 0.2s, transform 0.2s var(--ease); white-space: nowrap;
}
.btn:hover { background: var(--cobalt-deep); transform: translateY(-1px); }
.btn:disabled { opacity: 0.55; cursor: not-allowed; transform: none; }
.btn.sm { font-size: 13px; padding: 7px 15px; }
.btn.line { background: #fff; color: var(--ink); box-shadow: inset 0 0 0 1.5px var(--line); }
.btn.line:hover { background: var(--mist); }
.btn.danger { background: var(--red); }
.btn.danger:hover { background: #A62A22; }
.btn.block { width: 100%; }

/* ── 알림 ───────────────────────────────────────────── */
.flash { border-radius: 10px; padding: 12px 16px; font-size: 14px; font-weight: 600; margin-bottom: 20px; }
.flash.ok { background: #E6F4EC; color: var(--green); }
.flash.err { background: #FBEAE9; color: var(--red); }
.flash.info { background: #E8EEFD; color: var(--cobalt-deep); }

.notice {
  background: #FFF6E5; border: 1px solid #F5D9A0; border-radius: 10px;
  padding: 13px 16px; font-size: 14px; font-weight: 600; color: var(--amber); margin-bottom: 20px;
}
.notice a { color: var(--cobalt-deep); text-decoration: underline; }
.notice a:hover { color: var(--cobalt); }

/* ── 검색 ───────────────────────────────────────────── */
.tools { display: flex; gap: 10px; margin-bottom: 18px; flex-wrap: wrap; }
.tools input[type="search"], .tools select {
  font: inherit; font-size: 14px; padding: 9px 13px;
  border: 1.5px solid var(--line); border-radius: 10px; background: #fff;
}
.tools input[type="search"] { flex: 1; min-width: 200px; }
.tools select { min-width: 130px; }

/* ── 표 ─────────────────────────────────────────────── */
table { width: 100%; border-collapse: collapse; background: #fff; }
.tbl-wrap { border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.scroll-x { overflow-x: auto; }
th, td { text-align: left; padding: 13px 16px; border-bottom: 1px solid var(--line); }
th {
  font-size: 12px; font-weight: 700; letter-spacing: 0.06em;
  color: var(--gray); background: var(--mist); white-space: nowrap;
}
tr:last-child td { border-bottom: 0; }
tbody tr:hover { background: #FAFBFD; }
td.name { font-weight: 600; }
td.num, th.num { text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; }
td.meta { color: var(--gray); font-size: 13.5px; white-space: nowrap; }
.empty { padding: 64px 20px; text-align: center; color: var(--gray-light); background: #fff; }

/* 게시판 목록 */
.board th.no, .board td.no { width: 62px; text-align: center; }
.board td.no { color: var(--gray-light); font-size: 13.5px; font-variant-numeric: tabular-nums; }
.board th.cat, .board td.cat { width: 118px; }
.board td.ttl { font-weight: 600; }
.board td.ttl a { display: inline; }
.board td.ttl a:hover { color: var(--cobalt); text-decoration: underline; }
.board tr.notice-row { background: #FBFCFE; }
.board tr.notice-row td.ttl { font-weight: 700; }
.clip {
  display: inline-flex; align-items: center; gap: 3px; vertical-align: middle;
  margin-left: 7px; font-size: 12px; font-weight: 700; color: var(--gray-light);
}
.new {
  display: inline-block; margin-left: 6px; vertical-align: middle;
  font-size: 10px; font-weight: 800; color: #fff; background: var(--cobalt);
  border-radius: 4px; padding: 1px 5px; letter-spacing: 0.02em;
}

.tag {
  display: inline-block; font-size: 11.5px; font-weight: 700;
  padding: 3px 9px; border-radius: 999px;
  background: #E8EEFD; color: var(--cobalt-deep); white-space: nowrap;
}
.tag.gray { background: var(--mist); color: var(--gray); }
.tag.red { background: #FBEAE9; color: var(--red); }
.tag.amber { background: #FFF3DE; color: var(--amber); }

.pager { display: flex; gap: 6px; justify-content: center; margin-top: 24px; flex-wrap: wrap; }
.pager a, .pager span {
  min-width: 38px; height: 38px; padding: 0 12px;
  display: inline-flex; align-items: center; justify-content: center;
  border-radius: 9px; font-size: 14px; font-weight: 600;
  background: #fff; border: 1px solid var(--line);
}
.pager .on { background: var(--cobalt); color: #fff; border-color: var(--cobalt); }
.pager .gap { background: none; border: 0; min-width: 20px; color: var(--gray-light); }
.pager a:hover { background: var(--mist); }

/* ── 게시글 상세 ─────────────────────────────────────── */
.post { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.post-head { padding: 26px 28px 22px; border-bottom: 1px solid var(--line); }
.post-cat { display: flex; gap: 6px; margin-bottom: 10px; }
.post-head h1 { font-size: 22px; line-height: 1.4; }
.post-meta {
  margin-top: 12px; display: flex; gap: 16px; flex-wrap: wrap;
  font-size: 13.5px; color: var(--gray);
}
.post-meta span:first-child { font-weight: 700; color: var(--ink); }

.attach { padding: 18px 28px; background: #FAFBFD; border-bottom: 1px solid var(--line); }
.attach h2 { font-size: 13px; color: var(--gray); letter-spacing: 0.04em; margin-bottom: 10px; }
.attach h2 em { font-style: normal; color: var(--cobalt); }
.attach ul { display: grid; gap: 7px; }
.attach li { display: flex; align-items: center; gap: 12px; font-size: 14px; }
.attach .dl {
  display: inline-flex; align-items: center; gap: 7px;
  font-weight: 600; color: var(--cobalt-deep); min-width: 0;
}
.attach .dl span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.attach .dl:hover { text-decoration: underline; }
.attach .fsize { color: var(--gray); font-size: 13px; flex: none; }
.attach .fcount { color: var(--gray-light); font-size: 12.5px; flex: none; }

.post-body { padding: 28px; font-size: 15.5px; line-height: 1.85; min-height: 120px; }
.post-foot {
  display: flex; align-items: center; gap: 10px;
  padding: 18px 28px; border-top: 1px solid var(--line); background: #FAFBFD;
}
.post-foot .right { margin-left: auto; display: flex; gap: 8px; }

.temp-pw {
  font-size: 22px; font-weight: 800; letter-spacing: 0.06em;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  background: var(--mist); padding: 14px 18px; border-radius: 10px; user-select: all;
}

/* ── 로그인 화면 ─────────────────────────────────────── */
body.auth {
  background: var(--ink); min-height: 100vh;
  display: flex; align-items: center; justify-content: center; padding: 24px;
}
body.auth main { max-width: 380px; width: 100%; padding: 0; }
.login-brand { text-align: center; margin-bottom: 26px; }
.login-brand .logo { height: 26px; width: auto; margin: 0 auto 12px; display: block; }
.login-brand p { color: rgba(255, 255, 255, 0.55); font-size: 13.5px; }
body.auth .card { padding: 28px; margin: 0; border: 0; }
body.auth h1 { font-size: 20px; margin-bottom: 20px; }
body.auth .check { margin: -2px 0 18px; font-size: 13.5px; }

/* ── 반응형 ─────────────────────────────────────────── */
@media (max-width: 760px) {
  .top .wrap { height: auto; padding: 12px 16px; flex-wrap: wrap; gap: 10px; }
  .nav { order: 3; width: 100%; overflow-x: auto; }
  .me { margin-left: auto; }
  main { padding: 20px 14px 56px; }
  .card { padding: 18px; }
  h1 { font-size: 21px; }
  th, td { padding: 11px 10px; }
  .hide-sm { display: none; }
  .board th.no, .board td.no { width: 44px; }
  .board th.cat, .board td.cat { width: 92px; }
  .post-head, .attach, .post-body, .post-foot { padding-left: 18px; padding-right: 18px; }
  .form-foot { flex-direction: column-reverse; }
  .form-foot .btn { width: 100%; }
  .head-row .btn { width: 100%; }
}
