/* 원장별 요약현황 팝업 */
.ledger-summary-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.5);
  display: none;
  justify-content: center;
  align-items: center;
  z-index: 10000;
}

.ledger-summary-overlay.active {
  display: flex;
}

.ledger-summary-popup {
  background: white;
  border-radius: 8px;
  width: 90%;
  max-width: 1000px;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
  position: relative;
}

/* 팝업 헤더 */
.ledger-summary-header {
  background: #5a6c7d;
  color: white;
  padding: 16px 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-radius: 8px 8px 0 0;
}

.ledger-summary-title {
  font-size: 16px;
  font-weight: 600;
  margin: 0;
}

.ledger-summary-close {
  background: none;
  border: none;
  color: white;
  font-size: 20px;
  cursor: pointer;
  padding: 0;
  width: 30px;
  height: 30px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  transition: background 0.2s;
}

.ledger-summary-close:hover {
  background: rgba(255, 255, 255, 0.1);
}

/* 팝업 본문 */
.ledger-summary-body {
  padding: 20px;
}

/* 통계 박스 영역 */
.ledger-stats-row {
  display: flex;
  gap: 12px;
  margin-bottom: 16px;
}

.ledger-stat-box {
  flex: 1;
  background: #f5f5f5;
  border: 1px solid #dee2e6;
  border-radius: 4px;
  padding: 12px 16px;
  text-align: center;
}

.ledger-stat-label {
  font-size: 12px;
  color: #666;
  margin-bottom: 6px;
  font-weight: 500;
}

.ledger-stat-value {
  font-size: 16px;
  font-weight: 700;
  color: #2c3e50;
}

.ledger-stat-value.text-red {
  color: #e74c3c;
}

.ledger-stat-unit {
  font-size: 14px;
  margin-left: 2px;
}

/* 버튼 영역 */
.ledger-buttons-row {
  display: flex;
  gap: 8px;
  margin-bottom: 16px;
  flex-wrap: wrap;
}

.ledger-action-btn {
  flex: 1;
  min-width: 120px;
  padding: 8px 12px;
  background: #f8f9fa;
  border: 1px solid #dee2e6;
  border-radius: 4px;
  font-size: 12px;
  font-weight: 500;
  color: #2c3e50;
  cursor: pointer;
  transition: all 0.2s;
}

.ledger-action-btn:hover {
  background: #e9ecef;
  border-color: #adb5bd;
}

.ledger-action-btn.btn-primary {
  background: #ffc107;
  border-color: #ffc107;
  color: #000;
}

.ledger-action-btn.btn-primary:hover {
  background: #ffb300;
  border-color: #ffb300;
}

.ledger-action-btn.btn-info {
  background: #17a2b8;
  border-color: #17a2b8;
  color: white;
}

.ledger-action-btn.btn-info:hover {
  background: #138496;
  border-color: #138496;
}

/* 테이블 */
.ledger-summary-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}

.ledger-summary-table thead {
  background: #eaeaea;
}

.ledger-summary-table th {
  padding: 10px 8px;
  text-align: center;
  font-weight: 600;
  color: #2c3e50;
  border: 1px solid #dee2e6;
}

.ledger-summary-table tbody td {
  padding: 10px 8px;
  text-align: center;
  border: 1px solid #dee2e6;
  color: #495057;
}

.ledger-summary-table tbody tr:hover {
  background: #f8f9fa;
}

.ledger-summary-table tfoot {
  background: #f2f2f2;
}

.ledger-summary-table tfoot td {
  padding: 10px 8px;
  text-align: center;
  font-weight: 600;
  border: 1px solid #dee2e6;
  color: #2c3e50;
}

/* 반응형 */
@media (max-width: 768px) {
  .ledger-summary-popup {
    width: 95%;
    max-height: 95vh;
  }
  
  .ledger-stats-row {
    flex-direction: column;
  }
  
  .ledger-buttons-row {
    flex-direction: column;
  }
  
  .ledger-action-btn {
    min-width: 100%;
  }
}
