/* ── 변수 ─────────────────────────────────────────────────────────────── */
:root {
  --primary:       #FF6B35;
  --primary-light: #FFF0EB;
  --primary-dark:  #E55A27;
  --secondary:     #4ECDC4;
  --success:       #2ECC71;
  --warning:       #F39C12;
  --danger:        #E74C3C;
  --bg:            #F5F4F0;
  --card-bg:       #FFFFFF;
  --text:          #2C3E50;
  --text-muted:    #7F8C8D;
  --border:        #E8E6E0;
  --radius:        14px;
  --radius-sm:     8px;
  --shadow:        0 2px 12px rgba(0,0,0,0.07);
  --shadow-hover:  0 6px 24px rgba(0,0,0,0.13);
  --max-w:         760px;
  --font:          'Noto Sans KR', sans-serif;
}

/* ── 리셋 ─────────────────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { font-size: 16px; }
body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  line-height: 1.6;
}
a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; }
button { font-family: var(--font); cursor: pointer; border: none; background: none; }

/* ── 네비게이션 ───────────────────────────────────────────────────────── */
.navbar {
  background: var(--card-bg);
  border-bottom: 1px solid var(--border);
  padding: 0 1.5rem;
  height: 56px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: 0 1px 8px rgba(0,0,0,0.06);
}
.nav-logo {
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--primary);
  letter-spacing: -0.3px;
}
.nav-actions {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}
.nav-user {
  font-size: 0.9rem;
  color: var(--text-muted);
}
.nav-btn {
  font-size: 0.875rem;
  font-weight: 500;
  padding: 0.4rem 1rem;
  border-radius: 20px;
  background: var(--primary);
  color: #fff;
  transition: background 0.18s, transform 0.12s;
}
.nav-btn:hover { background: var(--primary-dark); transform: translateY(-1px); }
.nav-btn-outline {
  background: transparent;
  border: 1.5px solid var(--primary);
  color: var(--primary);
}
.nav-btn-outline:hover { background: var(--primary-light); }

/* ── 플래시 메시지 ────────────────────────────────────────────────────── */
.flash {
  max-width: var(--max-w);
  margin: 1rem auto 0;
  padding: 0.75rem 1.25rem;
  border-radius: var(--radius-sm);
  font-size: 0.9rem;
  font-weight: 500;
}
.flash-success { background: #D5F5E3; color: #1E8449; border: 1px solid #A9DFBF; }
.flash-error   { background: #FADBD8; color: #C0392B; border: 1px solid #F1948A; }
.flash-info    { background: #D6EAF8; color: #1A5276; border: 1px solid #AED6F1; }

/* ── 콘텐츠 영역 ──────────────────────────────────────────────────────── */
.main-content {
  flex: 1;
  max-width: var(--max-w);
  width: 100%;
  margin: 0 auto;
  padding: 1.5rem 1rem 3rem;
}

/* ── 푸터 ─────────────────────────────────────────────────────────────── */
.footer {
  text-align: center;
  padding: 1.5rem;
  font-size: 0.8rem;
  color: var(--text-muted);
  border-top: 1px solid var(--border);
  background: var(--card-bg);
}

/* ── 페이지 헤더 ──────────────────────────────────────────────────────── */
.page-header { margin-bottom: 1.5rem; }
.page-title {
  font-size: 1.6rem;
  font-weight: 700;
  letter-spacing: -0.5px;
  margin-bottom: 0.35rem;
}
.page-sub { color: var(--text-muted); font-size: 0.95rem; }

/* ── 공지 바 ──────────────────────────────────────────────────────────── */
.notice-bar {
  background: var(--primary-light);
  border: 1px solid #FFD4C2;
  border-radius: var(--radius-sm);
  padding: 0.65rem 1rem;
  font-size: 0.9rem;
  margin-bottom: 1.25rem;
  color: var(--primary-dark);
}
.notice-bar a { font-weight: 700; color: var(--primary); text-decoration: underline; }

/* ── 로그인 ───────────────────────────────────────────────────────────── */
.login-wrap {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: calc(100vh - 160px);
  padding: 2rem 1rem;
}
.login-card {
  background: var(--card-bg);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 2.5rem 2rem;
  width: 100%;
  max-width: 380px;
  text-align: center;
}
.login-logo { font-size: 3rem; margin-bottom: 0.5rem; }
.login-title { font-size: 1.5rem; font-weight: 700; margin-bottom: 0.25rem; }
.login-sub { color: var(--text-muted); font-size: 0.9rem; margin-bottom: 1.5rem; }
.login-error {
  background: #FADBD8;
  color: var(--danger);
  border-radius: var(--radius-sm);
  padding: 0.6rem 1rem;
  font-size: 0.875rem;
  margin-bottom: 1rem;
}
.login-form { text-align: left; }
.form-group { margin-bottom: 1rem; }
.form-group label { display: block; font-size: 0.875rem; font-weight: 500; margin-bottom: 0.35rem; }
.form-group input {
  width: 100%;
  padding: 0.65rem 0.875rem;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 1rem;
  font-family: var(--font);
  transition: border-color 0.15s;
  background: #FAFAFA;
}
.form-group input:focus { outline: none; border-color: var(--primary); background: #fff; }
.login-btn {
  width: 100%;
  padding: 0.75rem;
  background: var(--primary);
  color: #fff;
  border-radius: var(--radius-sm);
  font-size: 1rem;
  font-weight: 700;
  margin-top: 0.5rem;
  transition: background 0.18s, transform 0.12s;
}
.login-btn:hover { background: var(--primary-dark); transform: translateY(-1px); }

/* ── 에러 페이지 ──────────────────────────────────────────────────────── */
.error-wrap, .pending-wrap {
  text-align: center;
  padding: 4rem 1rem;
}
.error-code {
  font-size: 5rem;
  font-weight: 700;
  color: var(--primary);
  opacity: 0.25;
  line-height: 1;
  margin-bottom: 1rem;
}
.error-msg, .pending-msg {
  font-size: 1.05rem;
  color: var(--text-muted);
  margin-bottom: 2rem;
  line-height: 1.8;
}
.pending-icon { font-size: 4rem; margin-bottom: 1rem; }
.pending-title { font-size: 1.4rem; font-weight: 700; margin-bottom: 0.5rem; }
.pending-book {
  font-size: 1rem;
  color: var(--primary);
  font-weight: 500;
  margin-bottom: 1rem;
}
.btn-back {
  display: inline-block;
  padding: 0.6rem 1.4rem;
  border-radius: 20px;
  background: var(--primary);
  color: #fff;
  font-weight: 500;
  font-size: 0.9rem;
  transition: background 0.18s;
}
.btn-back:hover { background: var(--primary-dark); }

/* ── 반응형 ───────────────────────────────────────────────────────────── */
@media (max-width: 480px) {
  .navbar { padding: 0 1rem; }
  .nav-user { display: none; }
  .page-title { font-size: 1.3rem; }
  .login-card { padding: 2rem 1.25rem; }
}
