/* ===========================
   전역 리셋 & 기본
=========================== */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
body { font-family: 'Noto Sans KR', 'Segoe UI', sans-serif; background: #f0f4f2; color: #1e2a24; min-height: 100vh; }
a { color: inherit; text-decoration: none; }
button { cursor: pointer; }

/* ===========================
   네비게이션 바
=========================== */
.navbar {
  display: flex;
  align-items: center;
  gap: 0;
  background: #1a3c2e;
  color: #fff;
  padding: 0 24px;
  height: 56px;
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: 0 2px 8px rgba(0,0,0,0.18);
}

.navbar-brand a {
  display: flex;
  align-items: center;
  gap: 4px;
  white-space: nowrap;
  margin-right: 28px;
  text-decoration: none;
}
.brand-icon { font-size: 18px; }
.brand-main {
  font-size: 15px;
  font-weight: 800;
  color: #a8e6c3;
  letter-spacing: -0.5px;
}
.brand-sub {
  font-size: 13px;
  font-weight: 600;
  color: #7dc4a4;
  letter-spacing: -0.3px;
}
.brand-eng {
  font-size: 11px;
  color: #4e8c6c;
  font-style: italic;
  margin-left: 4px;
  align-self: flex-end;
  padding-bottom: 2px;
}

.navbar-menu {
  display: flex;
  list-style: none;
  gap: 2px;
  flex: 1;
}

.navbar-menu li a {
  display: block;
  padding: 0 14px;
  line-height: 56px;
  font-size: 14px;
  color: #c8ddd4;
  border-bottom: 3px solid transparent;
  transition: color 0.15s, border-color 0.15s;
  white-space: nowrap;
}
.navbar-menu li a:hover,
.navbar-menu li a.active {
  color: #fff;
  border-bottom-color: #4caf82;
}

.navbar-right {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-left: auto;
}

.admin-badge {
  font-size: 10px;
  font-weight: 700;
  background: linear-gradient(135deg, #49b883, #1d5a40);
  color: #f4fff8;
  padding: 4px 10px;
  border-radius: 999px;
  letter-spacing: 0.5px;
  border: 1px solid rgba(206, 255, 227, 0.28);
  box-shadow: 0 6px 14px rgba(23, 90, 60, 0.34);
}

.admin-name {
  font-size: 13px;
  color: #f4fff8;
  font-weight: 700;
  background: linear-gradient(135deg, rgba(112, 212, 154, 0.34), rgba(46, 109, 79, 0.52));
  border: 1px solid rgba(196, 248, 217, 0.38);
  border-radius: 999px;
  padding: 6px 13px;
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.14), 0 4px 12px rgba(18, 54, 38, 0.22);
}

.admin-identity {
  display: flex;
  align-items: center;
}

.btn-logout {
  font-size: 13px;
  color: #c8ddd4;
  padding: 5px 12px;
  border: 1px solid #3a6b52;
  border-radius: 6px;
  transition: background 0.15s;
}
.btn-logout:hover { background: #2d5c42; }

.btn-homepage {
  font-size: 13px;
  color: #c8ddd4;
  padding: 5px 12px;
  border: 1px solid #3a6b52;
  border-radius: 6px;
  transition: background 0.15s;
  text-decoration: none;
}
.btn-homepage:hover { background: #2d5c42; color: #fff; }

.btn-shutdown {
  background: #c0392b;
  color: #fff;
  border: none;
  padding: 6px 16px;
  border-radius: 6px;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.3px;
  transition: background 0.15s;
}
.btn-shutdown:hover { background: #e74c3c; }

/* ===========================
   네비 드롭다운 메뉴
=========================== */
.menu-group {
  position: relative;
  list-style: none;
}
.menu-group > .menu-label {
  display: block;
  padding: 0 14px;
  line-height: 56px;
  font-size: 14px;
  color: #c8ddd4;
  cursor: pointer;
  white-space: nowrap;
  border-bottom: 3px solid transparent;
  transition: color 0.15s, border-color 0.15s;
}
.menu-group > .menu-label:hover,
.menu-group > .menu-label.active {
  color: #fff;
  border-bottom-color: #4caf82;
}
.menu-dropdown {
  display: none;
  position: absolute;
  top: 56px;
  left: 0;
  background: #1a3c2e;
  min-width: 140px;
  border-radius: 0 0 10px 10px;
  box-shadow: 0 8px 20px rgba(0,0,0,0.22);
  z-index: 200;
  padding: 6px 0;
  list-style: none;
}
.menu-dropdown li a {
  display: block;
  padding: 10px 18px;
  font-size: 13px;
  color: #b0d4c0;
  white-space: nowrap;
  border-bottom: none;
  transition: background 0.12s, color 0.12s;
}
.menu-dropdown li a:hover {
  background: #2d5c42;
  color: #fff;
}

/* ===========================
   메인 컨테이너
=========================== */
.main-container {
  max-width: 1280px;
  margin: 0 auto;
  padding: 24px 20px;
}

.content { }

/* ===========================
   플래시 메시지
=========================== */
.flash-messages { margin-bottom: 16px; }
.flash {
  padding: 12px 16px;
  border-radius: 8px;
  margin-bottom: 8px;
  font-size: 14px;
  font-weight: 500;
}
.flash-success { background: #d4edda; color: #155724; border: 1px solid #c3e6cb; }
.flash-error, .flash-danger { background: #f8d7da; color: #721c24; border: 1px solid #f5c6cb; }
.flash-warning { background: #fff3cd; color: #856404; border: 1px solid #ffeeba; }
.flash-info { background: #d1ecf1; color: #0c5460; border: 1px solid #bee5eb; }

/* ===========================
   카드 & 공통 섹션
=========================== */
.card {
  background: #fff;
  border-radius: 14px;
  box-shadow: 0 2px 10px rgba(0,0,0,0.06);
  padding: 22px 24px;
  margin-bottom: 20px;
}

.page-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
}
.page-header h2, .page-header h1 {
  font-size: 20px;
  font-weight: 700;
  color: #1a3c2e;
}

/* ===========================
   버튼
=========================== */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 18px;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 600;
  border: none;
  transition: background 0.15s, transform 0.1s;
  cursor: pointer;
  text-decoration: none;
}
.btn:active { transform: scale(0.97); }
.btn-primary { background: #2e7d5a; color: #fff; }
.btn-primary:hover { background: #256047; }
.btn-secondary { background: #e9ecef; color: #333; }
.btn-secondary:hover { background: #dee2e6; }
.btn-danger { background: #c0392b; color: #fff; }
.btn-danger:hover { background: #a93226; }
.btn-warning { background: #e67e22; color: #fff; }
.btn-warning:hover { background: #ca6f1e; }
.btn-sm { padding: 5px 12px; font-size: 12px; }

/* ===========================
   테이블
=========================== */
.table-wrap { overflow-x: auto; }
table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}
thead tr { background: #eaf4ee; }
th {
  padding: 11px 14px;
  text-align: left;
  font-weight: 700;
  color: #1a3c2e;
  border-bottom: 2px solid #c8ddd4;
  white-space: nowrap;
}
td {
  padding: 10px 14px;
  border-bottom: 1px solid #eef3f0;
  vertical-align: middle;
}
tbody tr:hover { background: #f7fbf9; }

/* ===========================
   폼
=========================== */
.form-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 18px;
}
.form-group { display: flex; flex-direction: column; gap: 6px; }
.form-group label { font-size: 13px; font-weight: 600; color: #444; }
.form-control {
  padding: 10px 12px;
  border: 1px solid #cfd8d3;
  border-radius: 8px;
  font-size: 14px;
  background: #fff;
  transition: border-color 0.15s, box-shadow 0.15s;
}
.form-control:focus {
  outline: none;
  border-color: #2e7d5a;
  box-shadow: 0 0 0 3px rgba(46,125,90,0.12);
}
.form-actions {
  display: flex;
  gap: 10px;
  margin-top: 22px;
  padding-top: 18px;
  border-top: 1px solid #eef3f0;
}

/* ===========================
   필터 박스
=========================== */
.filter-box {
  background: white;
  padding: 18px;
  border-radius: 14px;
  box-shadow: 0 2px 10px rgba(0,0,0,0.06);
  margin-bottom: 18px;
}
.filter-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 14px;
}
.filter-grid label { display: block; margin-bottom: 6px; font-weight: bold; }
.filter-grid input, .filter-grid select {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid #cfd8d3;
  border-radius: 8px;
  font-size: 14px;
}

/* ===========================
   페이지네이션
=========================== */
.pagination-box {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  margin-top: 18px;
}
.pagination-info { font-weight: bold; color: #374151; }

/* ===========================
   배지
=========================== */
.badge {
  display: inline-block;
  padding: 3px 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 600;
}
.badge-green { background: #d4edda; color: #155724; }
.badge-red { background: #f8d7da; color: #721c24; }
.badge-yellow { background: #fff3cd; color: #856404; }
.badge-gray { background: #e9ecef; color: #495057; }
.badge-blue { background: #cce5ff; color: #004085; }

/* ===========================
   종료 확인 모달
=========================== */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.45);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 999;
}
.modal-box {
  background: #fff;
  border-radius: 16px;
  padding: 36px 40px;
  max-width: 380px;
  width: 90%;
  box-shadow: 0 8px 40px rgba(0,0,0,0.18);
  text-align: center;
}
.modal-box h3 { font-size: 20px; font-weight: 700; margin-bottom: 12px; color: #1a3c2e; }
.modal-box p { font-size: 15px; color: #555; margin-bottom: 28px; }
.modal-actions { display: flex; gap: 12px; justify-content: center; }

/* ===========================
   로그인 폼
=========================== */
.login-wrap {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: calc(100vh - 56px);
}
.login-box {
  background: #fff;
  border-radius: 18px;
  box-shadow: 0 4px 30px rgba(0,0,0,0.10);
  padding: 44px 48px;
  width: 100%;
  max-width: 400px;
}
.login-box h2 { text-align: center; font-size: 22px; font-weight: 700; color: #1a3c2e; margin-bottom: 28px; }
.login-box .form-group { margin-bottom: 16px; }
.login-box .btn { width: 100%; justify-content: center; padding: 12px; margin-top: 8px; }
.login-error { color: #c0392b; font-size: 13px; background: #fdf0ee; border: 1px solid #f5c6cb; border-radius: 8px; padding: 10px 14px; margin-bottom: 14px; }

.login-logo { text-align: center; margin-bottom: 28px; }
.login-logo-icon { font-size: 40px; margin-bottom: 8px; }
.login-logo-name { font-size: 20px; font-weight: 800; color: #1a3c2e; letter-spacing: -0.5px; margin-bottom: 4px; }
.login-logo-eng { font-size: 12px; color: #888; font-style: italic; }
.login-footer { text-align: center; font-size: 11px; color: #bbb; margin-top: 28px; }

/* ===========================
   대시보드 통계 카드
=========================== */
.stat-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 16px;
  margin-bottom: 24px;
}
.stat-card {
  background: #fff;
  border-radius: 14px;
  padding: 22px 20px;
  box-shadow: 0 2px 10px rgba(0,0,0,0.06);
  text-align: center;
}
.stat-card .stat-label { font-size: 13px; color: #888; margin-bottom: 8px; }
.stat-card .stat-value { font-size: 32px; font-weight: 800; color: #1a3c2e; }

/* ===========================
   옷 그룹 & 코드블록
=========================== */
.btn-group {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

pre {
  background: #f7faf8;
  padding: 12px 16px;
  border-radius: 8px;
  overflow-x: auto;
  font-size: 13px;
  color: #2d4a3a;
  border: 1px solid #d0e8db;
  line-height: 1.6;
}

/* ===========================
   호환성: detail-box / form-box / search-box
=========================== */
.detail-box {
  background: #fff;
  border-radius: 14px;
  box-shadow: 0 2px 10px rgba(0,0,0,0.06);
  padding: 20px 24px;
  margin-bottom: 20px;
}
.detail-box p { margin-bottom: 10px; font-size: 14px; line-height: 1.6; }
.detail-box strong { color: #444; min-width: 80px; display: inline-block; }

.form-box {
  background: #fff;
  border-radius: 14px;
  box-shadow: 0 2px 10px rgba(0,0,0,0.06);
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  max-width: 720px;
}
.form-box label {
  font-size: 13px;
  font-weight: 600;
  color: #444;
  margin-bottom: 2px;
}
.form-box input,
.form-box select,
.form-box textarea {
  padding: 10px 12px;
  border: 1px solid #cfd8d3;
  border-radius: 8px;
  font-size: 14px;
  background: #fff;
  width: 100%;
}
.form-box input:focus,
.form-box select:focus,
.form-box textarea:focus {
  outline: none;
  border-color: #2e7d5a;
  box-shadow: 0 0 0 3px rgba(46,125,90,0.12);
}

/* ===========================
   관리자 공통 푸터
=========================== */
.admin-footer {
  background-color: #2c5f2d;
  color: white;
  padding: 50px 20px 0;
  margin-top: 48px;
  font-size: 13px;
}

.admin-footer-content {
  max-width: 1200px;
  margin: 0 auto;
}

.admin-footer-top {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 40px;
  padding-bottom: 30px;
  border-bottom: 1px solid rgba(255,255,255,0.2);
}

.admin-footer .footer-col {
  line-height: 1.8;
}

.admin-footer .footer-org-name {
  display: block;
  font-size: 15px;
  font-weight: 700;
  color: #a8f0c6;
  margin-bottom: 6px;
}

.admin-footer .footer-col h4 {
  font-size: 14px;
  font-weight: 600;
  color: #a8f0c6;
  margin: 0 0 10px;
}

.admin-footer .footer-col p {
  margin-bottom: 5px;
  color: rgba(255,255,255,0.9);
}

.admin-footer .footer-col ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.admin-footer .footer-col li {
  margin-bottom: 7px;
}

.admin-footer .footer-col a,
.admin-footer .footer-col p a {
  color: #90ee90;
  text-decoration: none;
}

.admin-footer .footer-col a:hover {
  color: white;
  text-decoration: underline;
}

.admin-footer-bottom {
  text-align: center;
  font-size: 12px;
  opacity: 0.8;
  padding: 18px;
  border-top: 1px solid rgba(255,255,255,0.2);
}

.admin-footer-bottom p { margin: 0; }

@media (max-width: 900px) {
  .admin-footer-top { grid-template-columns: 1fr 1fr; gap: 24px; }
}
@media (max-width: 500px) {
  .admin-footer-top { grid-template-columns: 1fr; }
}


.search-box {
  display: flex;
  align-items: center;
  gap: 8px;
  background: #fff;
  padding: 14px 18px;
  border-radius: 14px;
  box-shadow: 0 2px 10px rgba(0,0,0,0.06);
  margin-bottom: 18px;
  flex-wrap: wrap;
}
.search-box input[type="text"] {
  flex: 1;
  min-width: 220px;
  padding: 9px 12px;
  border: 1px solid #cfd8d3;
  border-radius: 8px;
  font-size: 14px;
}
.search-box input[type="text"]:focus {
  outline: none;
  border-color: #2e7d5a;
}

/* ===========================
   반응형
=========================== */
@media (max-width: 768px) {
  .navbar-menu { display: none; }
  .main-container { padding: 14px 10px; }
  .form-grid { grid-template-columns: 1fr; }
}

