:root {
  --primary-color: #1E5149;
  --primary-hover: #163d37;
  --bg-default: #FFFFFF;
  --bg-muted: #F9FAFB;
  --info-color: #4B5563; /* 무채색 계열로 변경 */
  --text-main: #111827;
  --text-muted: #6B7280;
  --border-color: #E5E7EB;
}

.app-container {
  display: flex;
  flex-direction: column;
  height: 100vh;
  width: 100%;
  background-color: var(--bg-default);
  color: var(--text-main);
  letter-spacing: -0.02em;
}

.top-bar {
  height: 50px;
  background-color: var(--primary-color);
  color: white;
  display: flex;
  align-items: center;
  padding: 0 40px;
  border-bottom: 1px solid rgba(0, 0, 0, 0.1);
  box-sizing: border-box;
}

.top-bar-brand {
  font-size: 1rem;
  font-weight: 700;
  margin-right: 48px;
  color: white;
}

.top-bar-menu {
  display: flex;
  gap: 4px;
  height: 100%;
}

.menu-item {
  display: flex;
  align-items: center;
  padding: 0 16px;
  cursor: pointer;
  transition: all 0.2s;
  color: rgba(255, 255, 255, 0.7);
  font-weight: 500;
  font-size: 0.875rem;
  height: 100%;
  border-bottom: 3px solid transparent;
}

.menu-item:hover {
  color: white;
}

.menu-item.active {
  color: white;
  border-bottom: 3px solid white;
  background-color: rgba(255, 255, 255, 0.1);
}

.main-content {
  flex: 1;
  display: flex;
  flex-direction: column;
  height: calc(100vh - 50px);
  overflow: hidden; /* 전체 페이지 스크롤 방지 */
  padding: 0; /* 패딩은 내부 요소에서 관리 */
}

.content-header {
  padding: 32px 40px 16px 40px;
  margin-bottom: 0;
  border-bottom: 1px solid var(--border-color);
  display: flex;
  justify-content: space-between;
  align-items: center;
  background-color: var(--bg-default);
  flex-shrink: 0;
}

.table-container {
  flex: 1;
  overflow: auto;
  padding: 0 40px 40px 40px;
}

.content-title {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--text-main);
}

/* Common Table Styles */
.data-table {
  width: 100%;
  border-collapse: separate; /* sticky border 유지를 위해 separate 사용 */
  border-spacing: 0;
  font-size: 0.875rem;
}

.data-table th, .data-table td {
  padding: 14px 12px;
  text-align: left;
  border-bottom: 1px solid var(--border-color);
  white-space: nowrap;
}

.data-table th {
  font-weight: 600;
  color: var(--text-muted);
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  background-color: #F8FAFC; /* 헤더 전용 배경색 */
  position: sticky;
  top: 0;
  z-index: 10;
  border-bottom: 2px solid var(--border-color);
}

.data-table tr:hover {
  background-color: var(--bg-muted);
}

/* Buttons */
.btn {
  padding: 8px 16px;
  border-radius: 4px;
  cursor: pointer;
  border: 1px solid transparent;
  font-weight: 600;
  font-size: 0.875rem;
  transition: all 0.2s;
}

.btn-primary {
  background-color: var(--primary-color);
  color: white;
}

.btn-primary:hover {
  background-color: var(--primary-hover);
}

.btn-outline {
  background-color: transparent;
  border: 1px solid var(--border-color);
  color: var(--text-main);
}

.btn-outline:hover {
  background-color: var(--bg-muted);
}

/* Dashboard Stats - Border based */
.dashboard-stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 0;
  margin-bottom: 48px;
  border-top: 1px solid var(--border-color);
  border-bottom: 1px solid var(--border-color);
}

.stat-card {
  padding: 24px;
  display: flex;
  flex-direction: column;
  border-right: 1px solid var(--border-color);
}

.stat-card:last-child {
  border-right: none;
}

.stat-label {
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--text-muted);
  margin-bottom: 12px;
}

.stat-value {
  font-size: 2rem;
  font-weight: 700;
  color: var(--primary-color);
}

/* Modal Styles */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: rgba(0, 0, 0, 0.5);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 1000;
  padding: 20px;
}

.modal-content {
  background-color: var(--bg-default);
  width: 100%;
  max-width: 800px;
  border-radius: 8px;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  max-height: 90vh;
}

.modal-header {
  background-color: var(--primary-color);
  color: white;
  padding: 16px 24px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.modal-close-btn {
  background: none;
  border: none;
  color: white;
  font-size: 1.5rem;
  line-height: 1;
  cursor: pointer;
  padding: 4px;
  opacity: 0.8;
  transition: opacity 0.2s;
}

.modal-close-btn:hover {
  opacity: 1;
}

.modal-body {
  padding: 24px;
  overflow-y: auto;
  flex: 1;
}

.detail-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px 24px;
}

.detail-item {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.detail-item.full-width {
  grid-column: 1 / -1;
}

.detail-item label {
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--text-main);
}

.detail-value {
  padding: 10px 12px;
  border: 1px solid var(--border-color);
  border-radius: 4px;
  font-size: 0.875rem;
  color: var(--text-muted);
  background-color: var(--bg-default);
  min-height: 20px;
}

.modal-footer {
  padding: 16px 24px;
  border-top: 1px solid var(--border-color);
  display: flex;
  justify-content: flex-end;
  background-color: var(--bg-muted);
}

