/* ===== 기본 ===== */
* { box-sizing: border-box; margin: 0; padding: 0; }

body {
  font-family: 'Apple SD Gothic Neo', '맑은 고딕', sans-serif;
  background: #f8f6f2;
  color: #333;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* ===== 헤더 ===== */
header {
  background: #2c5f8a;
  color: white;
  padding: 0 20px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.2);
}

.header-inner {
  max-width: 800px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 60px;
}

.logo {
  font-size: 1.2rem;
  font-weight: 700;
  letter-spacing: -0.5px;
}

nav a {
  color: rgba(255,255,255,0.8);
  text-decoration: none;
  margin-left: 20px;
  font-size: 0.95rem;
  padding: 6px 12px;
  border-radius: 20px;
  transition: all 0.2s;
}

nav a.active,
nav a:hover {
  background: rgba(255,255,255,0.2);
  color: white;
}

/* ===== 히어로 ===== */
.hero {
  background: linear-gradient(135deg, #2c5f8a, #4a8ab5);
  color: white;
  text-align: center;
  padding: 40px 20px;
}

.hero h1 { font-size: 1.8rem; margin-bottom: 8px; }
.hero p { opacity: 0.9; font-size: 1rem; }

/* ===== 폼 ===== */
.form-section {
  max-width: 600px;
  margin: 30px auto;
  padding: 0 20px 40px;
  flex: 1;
}

.form-group {
  margin-bottom: 18px;
}

label {
  display: block;
  font-weight: 600;
  margin-bottom: 6px;
  font-size: 0.95rem;
  color: #444;
}

.required { color: #e74c3c; }

input, select, textarea {
  width: 100%;
  padding: 12px 14px;
  border: 1.5px solid #ddd;
  border-radius: 8px;
  font-size: 1rem;
  font-family: inherit;
  transition: border-color 0.2s;
  background: white;
}

input:focus, select:focus, textarea:focus {
  outline: none;
  border-color: #2c5f8a;
  box-shadow: 0 0 0 3px rgba(44, 95, 138, 0.1);
}

small {
  display: block;
  margin-top: 4px;
  color: #888;
  font-size: 0.82rem;
}

textarea { resize: vertical; }

button[type="submit"] {
  width: 100%;
  padding: 14px;
  background: #2c5f8a;
  color: white;
  border: none;
  border-radius: 8px;
  font-size: 1.1rem;
  font-weight: 700;
  cursor: pointer;
  margin-top: 10px;
  transition: background 0.2s;
}

button[type="submit"]:hover { background: #1e4a6e; }
button[type="submit"]:disabled {
  background: #aaa;
  cursor: not-allowed;
}

/* ===== 메시지 ===== */
.success-msg {
  margin-top: 20px;
  padding: 18px;
  background: #e8f5e9;
  border: 1px solid #a5d6a7;
  border-radius: 8px;
  color: #2e7d32;
  line-height: 1.8;
}

.success-msg a {
  color: #2c5f8a;
  font-weight: 600;
}

.error-msg {
  margin-top: 20px;
  padding: 18px;
  background: #ffebee;
  border: 1px solid #ef9a9a;
  border-radius: 8px;
  color: #c62828;
}

.hidden { display: none; }

/* ===== 현황 페이지 ===== */
.status-section {
  max-width: 900px;
  margin: 30px auto;
  padding: 0 20px 40px;
  flex: 1;
}

.filter-bar {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 20px;
}

.filter-btn {
  padding: 8px 16px;
  border: 1.5px solid #ddd;
  border-radius: 20px;
  background: white;
  font-size: 0.9rem;
  cursor: pointer;
  transition: all 0.2s;
  font-family: inherit;
}

.filter-btn.active,
.filter-btn:hover {
  background: #2c5f8a;
  color: white;
  border-color: #2c5f8a;
}

.loading {
  text-align: center;
  padding: 40px;
  color: #888;
  font-size: 1rem;
}

table {
  width: 100%;
  border-collapse: collapse;
  background: white;
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 2px 10px rgba(0,0,0,0.08);
}

thead {
  background: #2c5f8a;
  color: white;
}

th, td {
  padding: 12px 14px;
  text-align: left;
  font-size: 0.9rem;
}

th { font-weight: 600; }

tbody tr:nth-child(even) { background: #f8f9fa; }
tbody tr:hover { background: #e8f0f7; }

/* 상태 뱃지 */
.badge {
  display: inline-block;
  padding: 3px 10px;
  border-radius: 12px;
  font-size: 0.82rem;
  font-weight: 600;
}

.badge-신청중 { background: #fff3cd; color: #856404; }
.badge-검토중 { background: #cce5ff; color: #004085; }
.badge-구매완료 { background: #d4edda; color: #155724; }
.badge-반려 { background: #f8d7da; color: #721c24; }

.empty-msg {
  text-align: center;
  padding: 40px;
  color: #888;
  font-size: 1rem;
}

/* ===== 푸터 ===== */
footer {
  background: #2c5f8a;
  color: rgba(255,255,255,0.7);
  text-align: center;
  padding: 16px;
  font-size: 0.85rem;
}

/* ===== 모바일 ===== */
@media (max-width: 600px) {
  .hero h1 { font-size: 1.4rem; }

  table { font-size: 0.82rem; }
  th, td { padding: 8px 10px; }

  /* 모바일에서 일부 컬럼 숨김 */
  th:nth-child(4), td:nth-child(4),
  th:nth-child(7), td:nth-child(7) {
    display: none;
  }
}
