* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: #f6f7fb;
  color: #202124;
  font-family: 'Pretendard', 'Noto Sans KR', 'Malgun Gothic', Arial, sans-serif;
  font-size: 16px;
  line-height: 1.55;
}
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; }

.topbar {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255,255,255,.92);
  border-bottom: 1px solid #e8ebf2;
  backdrop-filter: blur(12px);
}
.topbar-inner {
  width: min(1180px, calc(100% - 32px));
  min-height: 74px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}
.brand { display: flex; align-items: center; gap: 10px; font-weight: 800; letter-spacing: -0.5px; }
.brand-mark {
  width: 40px;
  height:40px;
  display: inline-flex;
  align-items: center;
  justify-content: center;

  color: #fff;
  font-weight: 900;
}
.brand-mark img {width:100%}
.nav { display: flex; align-items: center; gap: 6px; }
.nav a { padding: 10px 12px; border-radius: 12px; color: #555; font-size: 15px; }
.nav a:hover { background: #f2f3f7; color: #111; }
.nav .logout { color: #d80c18; font-weight: 700; }
.mobile-nav-btn { display: none; border: 0; background: #f1f2f6; border-radius: 12px; padding: 8px 12px; }

.page { width: min(1180px, calc(100% - 32px)); margin: 0 auto; padding: 34px 0 70px; }
.login-page { min-height: 100vh; display: grid; place-items: center; padding: 24px; background: linear-gradient(135deg, #fff7f7, #f6f7fb); }
.login-box { width: min(430px, 100%); padding: 34px; background: #fff; border: 1px solid #eceef4; border-radius: 28px; box-shadow: 0 24px 70px rgba(20,20,30,.08); }
.login-logo { display: flex; align-items: center; gap: 12px; margin-bottom: 28px; }
.login-logo strong { display: block; font-size: 24px; letter-spacing: -1px; }
.login-logo span:not(.brand-mark) { color: #777; font-size: 14px; }
.form-row { margin-top: 14px; }
.form-row label { display: block; margin-bottom: 7px; color: #555; font-size: 14px; font-weight: 700; }
.input { width: 100%; height: 52px; padding: 0 16px; border: 1px solid #dfe3ec; border-radius: 15px; background: #fff; outline: none; }
.input:focus { border-color: #d80c18; box-shadow: 0 0 0 4px rgba(216,12,24,.08); }
.btn { display: inline-flex; align-items: center; justify-content: center; min-height: 48px; padding: 0 18px; border: 0; border-radius: 15px; background: #d80c18; color: #fff; font-weight: 800; cursor: pointer; }
.btn.full { width: 100%; margin-top: 20px; }
.alert { padding: 13px 15px; margin-bottom: 16px; border-radius: 14px; background: #fff1f1; color: #c00010; font-size: 14px; }
.hero { padding: 34px; border-radius: 28px; background: linear-gradient(135deg, #d80c18, #991018); color: #fff; box-shadow: 0 18px 40px rgba(216,12,24,.18); }
.hero h1 { margin: 0; font-size: clamp(14px, 2vw, 20px); letter-spacing: -1.5px; }
.hero p { margin: 10px 0 0; opacity: .86; }
.grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; margin-top: 24px; }
.card { display: block; padding: 24px; border: 1px solid #e8ebf2; border-radius: 24px; background: #fff; box-shadow: 0 12px 30px rgba(20,20,30,.04); }
.card:hover { transform: translateY(-2px); box-shadow: 0 16px 36px rgba(20,20,30,.07); }
.card .icon { width: 46px; height: 46px; display: inline-flex; align-items: center; justify-content: center; border-radius: 16px; background: #fff1f1; color: #d80c18; font-weight: 900; }
.card h2 { margin: 16px 0 6px; font-size: 20px; letter-spacing: -0.8px; }
.card p { margin: 0; color: #777; font-size: 14px; }
.section { margin-top: 28px; padding: 26px; border: 1px solid #e8ebf2; border-radius: 24px; background: #fff; }
.section-title { display: flex; align-items: flex-end; justify-content: space-between; gap: 12px; margin-bottom: 16px; }
.section-title h2 { margin: 0; font-size: 23px; letter-spacing: -1px; }
.section-actions,.admin-row-actions,.form-actions { display:flex; align-items:center; gap:8px; }
.btn-small { min-height:36px; padding:0 14px; border-radius:10px; font-size:13px; }
.admin-row-actions { justify-content:flex-end; padding:7px 0 13px; border-bottom:1px solid #eceef4; font-size:13px; }
.admin-row-actions form { margin:0; }
.admin-row-actions a,.admin-row-actions button { border:0; background:#f4f5f8; color:#555; padding:6px 10px; border-radius:8px; cursor:pointer; }
.admin-row-actions button { color:#c00010; }
.manage-table-wrap { overflow-x:auto; }
.manage-table { width:100%; border-collapse:collapse; min-width:760px; }
.manage-table th,.manage-table td { padding:13px 10px; border-bottom:1px solid #eceef4; text-align:left; font-size:14px; }
.manage-table th { background:#f8f9fb; }
.manage-table .actions { display:flex; gap:6px; }
.manage-table .actions form { margin:0; }
.form-grid { display:grid; grid-template-columns:1fr 1fr; gap:16px; }
.form-grid .full { grid-column:1/-1; }
.textarea { min-height:280px; padding:15px; resize:vertical; }
.checkbox-row { display:flex; gap:18px; align-items:center; min-height:52px; }
.help { margin-top:6px; color:#888; font-size:13px; }
.form-actions { justify-content:flex-end; margin-top:20px; }
.board-list { border-top: 1px solid #eceef4; }
.board-row { display: grid; grid-template-columns: 110px 1fr 130px; gap: 12px; align-items: center; padding: 17px 0; border-bottom: 1px solid #eceef4; }
.badge { display: inline-flex; align-items: center; justify-content: center; width: fit-content; min-width: 76px; padding: 5px 10px; border-radius: 999px; background: #f4f5f8; color: #666; font-size: 13px; font-weight: 800; }
.board-subject { font-weight: 800; letter-spacing: -0.4px; }
.board-date { color: #888; font-size: 14px; text-align: right; }
.empty { padding: 38px 10px; color: #888; text-align: center; border-top: 1px solid #eceef4; border-bottom: 1px solid #eceef4; }
.view-head { padding-bottom: 22px; border-bottom: 1px solid #eceef4; }
.view-head h1 { margin: 0 0 8px; font-size: clamp(25px, 4vw, 34px); letter-spacing: -1.2px; }
.view-meta { color: #888; font-size: 14px; }
.view-body { min-height: 240px; padding: 28px 0; white-space: pre-line; }
.file-link { display: inline-flex; padding: 10px 14px; border-radius: 12px; background: #f6f7fb; color: #d80c18; font-weight: 800; }
.back-link { display: inline-flex; margin-top: 20px; color: #555; font-weight: 800; }

@media (max-width: 900px) {
  .grid { grid-template-columns: repeat(2, 1fr); }
  .mobile-nav-btn { display: inline-flex; }
  .nav { display: none; position: absolute; left: 16px; right: 16px; top: 74px; padding: 12px; background: #fff; border: 1px solid #e8ebf2; border-radius: 18px; box-shadow: 0 18px 40px rgba(20,20,30,.08); flex-direction: column; align-items: stretch; }
  .nav.is-open { display: flex; }
}
@media (max-width: 620px) {
  .page { width: min(100% - 24px, 1180px); padding-top: 22px; }
  .login-box { padding: 26px; border-radius: 22px; }
  .hero { padding: 26px; border-radius: 22px; }
  .grid { grid-template-columns: 1fr; gap: 12px; }
  .section { padding: 20px; border-radius: 20px; }
  .board-row { grid-template-columns: 1fr; gap: 6px; }
  .board-date { text-align: left; }
  .form-grid { grid-template-columns:1fr; }
  .form-grid .full { grid-column:auto; }
}
