* { box-sizing: border-box; }
:root {
  --navy: #0f2a4a;
  --navy-light: #16385f;
  --accent: #1c6dd0;
  --accent-soft: #eaf2fc;
  --bg: #f4f6f9;
  --card: #ffffff;
  --border: #e2e6ec;
  --text: #1c2733;
  --text-dim: #6b7684;
  --danger: #d64545;
}
body {
  margin: 0;
  font-family: "Pretendard", "Apple SD Gothic Neo", "Malgun Gothic", sans-serif;
  background: var(--bg);
  color: var(--text);
}
.hidden { display: none !important; }

/* ---------- 로그인 화면 ---------- */
.login-screen {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(160deg, var(--navy) 0%, var(--navy-light) 55%, #274d7c 100%);
}
.login-card {
  background: var(--card);
  width: 360px;
  max-width: 90vw;
  padding: 40px 32px;
  border-radius: 14px;
  box-shadow: 0 20px 50px rgba(0,0,0,0.25);
}
.login-badge {
  display: inline-block;
  font-size: 12px;
  color: var(--accent);
  background: var(--accent-soft);
  padding: 4px 10px;
  border-radius: 20px;
  font-weight: 600;
  margin-bottom: 14px;
}
.login-card h1 { font-size: 20px; margin: 0 0 6px; }
.login-sub { color: var(--text-dim); font-size: 13px; margin: 0 0 22px; }
.login-card label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  margin-bottom: 14px;
  color: var(--text-dim);
}
.login-card input {
  display: block;
  width: 100%;
  margin-top: 6px;
  padding: 11px 12px;
  border: 1px solid var(--border);
  border-radius: 8px;
  font-size: 14px;
  color: var(--text);
}
.login-card button {
  width: 100%;
  margin-top: 6px;
  padding: 12px;
  background: var(--navy);
  color: #fff;
  border: none;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
}
.login-card button:hover { background: var(--accent); }
.error-msg { color: var(--danger); font-size: 12.5px; min-height: 16px; margin-top: 10px; }

/* ---------- 상단바 ---------- */
.topbar {
  background: var(--navy);
  color: #fff;
  padding: 16px 28px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.topbar-title { font-size: 17px; font-weight: 700; letter-spacing: -0.3px; }
.topbar-user { font-size: 13px; display: flex; align-items: center; gap: 10px; }

.content { max-width: 880px; margin: 0 auto; padding: 28px 20px 80px; }

/* ---------- 공지사항 ---------- */
.notice-section {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 18px 20px;
  margin-bottom: 26px;
}
.section-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 10px; }
.section-head h2 { font-size: 15px; margin: 0; color: var(--navy); }
.notice-list { list-style: none; margin: 0; padding: 0; max-height: 220px; overflow-y: auto; }
.notice-list li {
  padding: 9px 0;
  border-bottom: 1px dashed var(--border);
  font-size: 13.5px;
  display: flex;
  justify-content: space-between;
  gap: 10px;
}
.notice-list li:last-child { border-bottom: none; }
.notice-text { flex: 1; }
.notice-meta { color: var(--text-dim); font-size: 12px; white-space: nowrap; }
.notice-del { border: none; background: none; color: var(--text-dim); cursor: pointer; font-size: 12px; }
.notice-del:hover { color: var(--danger); }

/* ---------- 업로드 버튼 ---------- */
.upload-bar { margin-bottom: 22px; }
.primary-btn {
  background: var(--accent);
  color: #fff;
  border: none;
  padding: 11px 18px;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
}
.primary-btn:hover { background: #1558aa; }
.small-btn {
  background: var(--accent-soft);
  color: var(--accent);
  border: none;
  padding: 6px 12px;
  border-radius: 20px;
  font-size: 12.5px;
  font-weight: 600;
  cursor: pointer;
}
.ghost-btn {
  background: transparent;
  border: 1px solid rgba(255,255,255,0.4);
  color: inherit;
  padding: 6px 12px;
  border-radius: 6px;
  font-size: 12.5px;
  cursor: pointer;
}
.topbar .ghost-btn:hover { background: rgba(255,255,255,0.12); }

/* ---------- 자료 목록 ---------- */
.file-category {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 12px;
  margin-bottom: 18px;
  overflow: hidden;
}
.file-category-head {
  background: #f7f9fc;
  padding: 12px 18px;
  font-weight: 700;
  font-size: 14px;
  color: var(--navy);
  border-bottom: 1px solid var(--border);
}
.file-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 18px;
  border-bottom: 1px solid var(--border);
  gap: 12px;
}
.file-row:last-child { border-bottom: none; }
.file-info { min-width: 0; }
.file-title { font-size: 14px; font-weight: 600; margin-bottom: 3px; }
.file-link {
  color: var(--accent);
  text-decoration: none;
  font-size: 13px;
  word-break: break-all;
}
.file-link:hover { text-decoration: underline; }
.file-meta { font-size: 12px; color: var(--text-dim); margin-top: 3px; }
.file-actions { display: flex; gap: 6px; flex-shrink: 0; }
.icon-btn {
  border: 1px solid var(--border);
  background: #fff;
  color: var(--text-dim);
  padding: 6px 10px;
  border-radius: 6px;
  font-size: 12px;
  cursor: pointer;
}
.icon-btn:hover { background: #f1f3f6; }
.icon-btn.danger { color: var(--danger); border-color: #f3d0d0; }
.icon-btn.danger:hover { background: #fdeeee; }
.empty-msg { text-align: center; color: var(--text-dim); padding: 40px 0; font-size: 13.5px; }

/* ---------- 모달 ---------- */
.modal {
  position: fixed; inset: 0;
  background: rgba(15, 42, 74, 0.45);
  display: flex; align-items: center; justify-content: center;
  z-index: 100;
}
.modal-box {
  background: #fff;
  width: 380px;
  max-width: 90vw;
  border-radius: 12px;
  padding: 26px 24px;
}
.modal-box h3 { margin: 0 0 16px; font-size: 16px; color: var(--navy); }
.modal-box label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-dim);
  margin-bottom: 14px;
}
.modal-box input, .modal-box textarea {
  display: block;
  width: 100%;
  margin-top: 6px;
  padding: 10px 11px;
  border: 1px solid var(--border);
  border-radius: 8px;
  font-size: 13.5px;
  font-family: inherit;
}
.modal-actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 8px; }
.modal-actions .ghost-btn { color: var(--text-dim); border-color: var(--border); }
