/* =====================================================
   jangsite.css - 사이트 공통 (로딩 순서: base.css 다음)
   - 알림, 탭, 뱃지, 공통 컴포넌트
   - 헤더/메인 레이아웃은 base.css·shell.css에서 처리
===================================================== */

html, body {
  height: 100%;
}

body {
  margin: 0;
  background: #fff;
  color: #111;
  font-family: system-ui, -apple-system, Segoe UI, Roboto, "Noto Sans KR", sans-serif;
}
#account-overlay {
  position: fixed;
  top: 0;
  right: 0;
  width: 520px;
  height: 100%;
  background: white;
  z-index: 9999;
  box-shadow: -4px 0 12px rgba(0, 0, 0, 0.2);
  overflow: auto;
}

/* =====================================================
   알림(noti) 드롭다운 (헤더 레이아웃은 base.css에서 처리)
===================================================== */

.noti-btn {
  position: relative;
  font-size: 18px;
  border: none;
  background: none;
  cursor: pointer;
}

.noti-badge {
  position: absolute;
  top: -6px;
  right: -10px;
  background: red;
  color: white;
  border-radius: 50%;
  padding: 2px 6px;
  font-size: 11px;
}

.noti-dropdown {
  display: none;
  position: absolute;
  top: 35px;
  left: 0;
  width: 320px;
  background: white;
  border: 1px solid #ccc;
  max-height: 400px;
  overflow-y: auto;
  z-index: 1000;
  box-shadow: 0 4px 8px rgba(0,0,0,0.1);
}

.noti-item {
  padding: 12px;
  border-bottom: 1px solid #eee;
  cursor: pointer;
  font-size: 14px;
}

.noti-empty {
  padding: 15px;
  text-align: center;
  color: #888;
}

.dot {
  color: red;
  margin-right: 5px;
}

.repair-wrap {
  margin-left: auto;
}

.repair-btn {
  text-decoration: none;
  font-size: 12px;
  padding: 6px 12px;
  border: 1px solid #ffc107;
  color: #856404;
  background: #fff3cd;
  border-radius: 4px;
  font-weight: bold;
}


/* =====================================================
   Tabs (board / clan 공통 - shell 구조와 충돌 없음)
===================================================== */

/* 탭 바 전체 너비 사용 → 50%씩 좌우 배열 */
.bar-tabs {
  display: block;
  width: 100%;
  box-sizing: border-box;
}

.bar-tabs .tabs {
  display: flex;
  width: 100%;
  gap: 10px;
  margin-bottom: 0;
  justify-content: stretch;
}

.side-panel .tabs {
  display: flex;
  gap: 10px;
  margin-bottom: 12px;
  width: 100%;
}

.side-panel .tab {
  flex: 0 0 calc(50% - 5px);
  width: calc(50% - 5px);
  max-width: calc(50% - 5px);
  padding: 8px 0;
  border: 1px solid #e4e6ea;
  border-radius: 10px;
  background: #fff;
  cursor: pointer;
  font-weight: 800;
  text-align: center;
  transition: all .15s ease;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}


.side-panel .tab:hover {
  border-color: #111;
}

.side-panel .tab.active {
  background: #111;
  color: #fff;
  border-color: #111;
}


/* =====================================================
   Responsive (base 레벨만)
===================================================== */

@media (max-width: 900px) {
  .site-main {
    padding: 12px;
  }
}

/* =========================
   QNA 상태 뱃지
========================= */

.badge {
  display: inline-block;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
}

.badge-success {
  background: #e6f4ea;
  color: #2e7d32;
}

.badge-danger {
  background: #fdecea;
  color: #c62828;
}

.nav-left a,
.nav-right a {
  text-decoration: none;
}

/* =====================================================
   Global UI Components (공통 UI)
===================================================== */

/* 제목 */
.section-title {
  font-size: 20px;
  font-weight: 800;
  margin-bottom: 16px;
}

/* 카드 (짙은 회색 + 노란색 이중 테두리) */
.card {
  background: #fff;
  border: 2px solid #374151;
  box-shadow: 0 0 0 2px #eab308;
  border-radius: 12px;
  padding: 16px;
}

/* 행 레이아웃 */
.row {
  display: flex;
  gap: 10px;
  align-items: center;
  flex-wrap: wrap;
  margin-bottom: 12px;
}

/* 보조 텍스트 */
.muted {
  color: #6b7280;
  font-size: 13px;
}

/* 테이블 */
table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}

th,
td {
  padding: 10px 8px;
  border-bottom: 1px solid #e5e7eb;
  text-align: left;
  white-space: nowrap;
}

th {
  background: #f9fafb;
  font-weight: 700;
}

/* 기본 버튼 */
button {
  padding: 6px 12px;
  border-radius: 8px;
  border: 1px solid #d1d5db;
  background: #fff;
  cursor: pointer;
  font-size: 13px;
}

button:hover {
  background: #f3f4f6;
}

/* 상태 버튼 */
button.secondary {
  background: #f3f4f6;
}

button.danger {
  background: #fdecea;
  border-color: #f5c2c7;
  color: #b91c1c;
}

/* 상태 배지 */
.badge {
  display: inline-block;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
}

.badge-ok {
  background: #e6f4ea;
  color: #2e7d32;
}

.badge-warn {
  background: #fff3cd;
  color: #856404;
}

.badge-danger {
  background: #fdecea;
  color: #c62828;
}