/* === 공통 스타일 === */
/* assets\css\common.css */
* { 
    margin: 0; 
    padding: 0; 
    box-sizing: border-box; 
}

html, body {
    width: 100%; 
    height: 100%; 
    font-family: 'Malgun Gothic','맑은 고딕',sans-serif;
    font-size: 13px; 
    background: #f3f3f3; 
    color: #333;
}

.container { 
    display: flex; 
    flex-direction: column; 
    width: 100%; 
    height: 100vh; 
}

.header { 
    background: #f0f0f0; 
    padding: 5px 0px; 
    padding-right: 15px;
    border-bottom: 1px solid #ccc; 
    display: flex; 
    justify-content: space-between; 
    align-items: center;     
}

.header .btn-theme > * {
  margin-left: 1px; /* 기본 12px → 6px */
  height: 20px;
}

.main-content { 
    display: flex; 
    flex: 1; 
    overflow: hidden; 
}

/* === 콘텐츠 영역 스타일 === */
.content-area { 
    flex: 1; 
    display: flex; 
    flex-direction: column; 
    padding: 10px; 
    overflow-y: auto; 
    background-color: white;
}

.content-title { 
    font-size: 18px; 
    font-weight: bold; 
    margin-bottom: 20px; 
}

.section-title { 
    font-size: 13px; 
    padding-bottom: 8px;
    font-weight: bold; 
}

.section-title-container { 
    display: flex; 
    justify-content: space-between; 
    align-items: center; 
    margin-bottom: 10px; 
}


/* === 검색 섹션 스타일 === */
.search-section { 
    background: #fff; 
    border: 1px solid #ccc; 
    padding: 10px; 
    margin-bottom: 10px; 
}

.search-table { 
    width: 100%; 
    border-collapse: collapse; 
    table-layout: fixed; 
}

.search-table th, .search-table td { 
    border: 1px solid #e0e0e0; 
    padding: 8px; 
    font-size: 12px; 
    vertical-align: middle; 
}

.search-table th { 
    background-color: #f7f7f7; 
    font-weight: bold; 
    text-align: center; 
    width: 100px; 
}

.search-table td { 
    background-color: #fff; 
}

.search-table td > * { 
    margin-right: 4px; 
    vertical-align: middle; 
}

.search-table td label { 
    margin-right: 10px; 
    cursor: pointer; 
}

.search-table td input[type="radio"] { 
    margin-right: 3px; 
}

.search-actions { 
    text-align: center; 
    margin-top: 10px; 
}

.search-input, .search-select, .date-input { 
    padding: 5px; 
    border: 1px solid #ccc; 
    font-size: 12px; 
}

/* === 버튼 스타일 === */
.btn { 
    padding: 5px 14px; 
    border: 1px solid #999; 
    background: #f0f0f0; 
    cursor: pointer; 
    font-size: 12px; 
    margin-left: 4px; 
    border-radius: 4px; 
    transition: background-color 0.2s; 
    text-decoration: none; 
}

.btn:hover { 
    background-color: #e0e0e0; 
}

.btn-search { 
    background: #4a90e2; 
    color: #fff; 
    border-color: #4a90e2; 
}

.btn-search:hover { 
    background: #357ABD; 
}

.btn-reset { 
    background: #f44336; 
    color: #fff; 
    border-color: #f44336; 
}

.btn-reset:hover { 
    background: #D32F2F; 
}

.btn-small { 
    padding: 3px 8px; 
}

.btn-red { 
    background: #f44336; 
    color: #fff; 
    border-color: #f44336; 
}

/* === 날짜 필터 버튼 스타일 === */
.btn-date-filter {
    background-color: #f8f9fa;
    border-color: #dee2e6;
    color: #495057;
}

.btn-date-filter.active {
    background-color: #1565C0;
    color: white;
    border-color: #1565C0;
}

.date-button-group {
    margin-top: 5px;
}

/* === 날짜 입력 필드 스타일 === */
.date-input {
    cursor: pointer;
}

.date-input::-webkit-calendar-picker-indicator {
    cursor: pointer;
}

/* === 테이블 스타일 === */
.info-table { 
    width: 100%; 
    border-collapse: collapse; 
    margin-bottom: 30px; 
    background: #fff; 
}

.info-table th, .info-table td { 
    border: 1px solid #e0e0e0; 
    padding: 12px; 
    font-size: 12px; 
}

.info-table th { 
    background-color: #f7f7f7; 
    font-weight: bold; 
    text-align: center; 
    width: 150px; 
}

.info-table td { 
    padding-left: 15px; 
}

.data-table { 
    width: 100%; 
    border-collapse: collapse; 
}

.data-table th, .data-table td { 
    border: 1px solid #ccc; 
    padding: 6px; 
    text-align: center; 
    font-size: 12px; 
}

.data-table th { 
    background: #f7f7f7; 
    white-space: nowrap;
}

/* === Sort Arrows (light) === */
.data-table th a {
  text-decoration: none;
  display: inline-block;
  min-width: 18px;
  height: 18px;
  line-height: 18px;
  text-align: center;
  border-radius: 4px;
  margin: 0 3px;
  padding: 0 2px;
  font-size: 11px;
  color: #888;
  border: 1px solid transparent;
  vertical-align: middle;
  cursor: pointer;
}
.data-table th a:hover {
  background: #ececec;
  color: #333;
}
.data-table th a.active {
  background: #4a90e2;
  border-color: #4a90e2;
  color: #fff;
}

.data-table tr:nth-child(even) { 
    background: #fafafa; 
}

.product-table, .cs-table { 
    width: 100%; 
    border-collapse: collapse; 
    text-align: center; 
    background: #fff; 
    margin-bottom: 30px;
}

.product-table th, .product-table td, .cs-table th, .cs-table td { 
    border: 1px solid #e0e0e0; 
    padding: 10px; 
    font-size: 12px; 
    vertical-align: middle; 
}

.product-table th, .cs-table th { 
    background-color: #f7f7f7; 
}

.product-table .product-img { 
    width: 60px; 
    height: 60px; 
    border: 1px solid #eee; 
    background: #f9f9f9; 
}

.memo-table { 
    width: 100%; 
    border-collapse: collapse; 
    background: #fff; 
    margin-bottom: 30px; 
}

.memo-table th, .memo-table td { 
    border: 1px solid #e0e0e0; 
    padding: 10px; 
    font-size: 12px; 
    text-align: left; 
}

.memo-table th { 
    background-color: #f7f7f7; 
    text-align: center; 
}

.memo-table textarea { 
    width: 100%; 
    min-height: 60px; 
    padding: 5px; 
    border: 1px solid #ccc; 
}

/* === 테이블 컨트롤 스타일 === */
.table-controls { 
    display: flex; 
    justify-content: space-between; 
    align-items: center; 
    margin-bottom: 8px; 
}

.table-section { 
    flex-shrink: 0; 
    background: #fff; 
    border: 1px solid #ccc; 
    padding: 8px; 
}

.table-header { 
    display: flex; 
    justify-content: space-between; 
    align-items: center; 
    margin-bottom: 8px; 
}

.table-title { 
    font-weight: bold; 
}

/* === 페이지네이션 스타일 === */
.pagination-section { 
    display: flex; 
    justify-content: center; 
    align-items: center; 
    padding: 10px; 
    background: #fff; 
    border: 1px solid #ccc; 
    border-top: none; 
}

.pagination a, .pagination strong { 
    display: inline-block; 
    padding: 4px 10px; 
    margin: 0 2px; 
    border: 1px solid #ccc; 
    background: #f0f0f0; 
    text-decoration: none; 
    color: #333; 
    font-size: 12px; 
    border-radius: 3px; 
}

.pagination strong { 
    background: #4a90e2; 
    color: #fff; 
    border-color: #4a90e2; 
}

/* === 기타 스타일 === */
.text-right { 
    text-align: right; 
}

.footer-buttons { 
    text-align: center; 
    margin-top: 20px; 
}

textarea { 
    resize: none; 
}

/* === 모달 스타일 === */
.modal-overlay { 
    display: none; 
    position: fixed; 
    top: 0; 
    left: 0; 
    width: 100%; 
    height: 100%; 
    background-color: rgba(0,0,0,0.5); 
    z-index: 1000; 
    justify-content: center; 
    align-items: flex-start;   /* 중앙 → 상단 정렬 */
    padding-top: 10vh;         /* 상단에서 살짝 아래 (원하면 6~15vh로 조절) */
}

.modal-content { 
    background: #fff; 
    padding: 20px; 
    border-radius: 5px; 
    box-shadow: 0 2px 10px rgba(0,0,0,0.1); 
    min-width: 300px; 
}

.modal-header { 
    font-size: 16px; 
    font-weight: bold; 
    margin-bottom: 15px; 
}

.modal-body { 
    margin-bottom: 20px; 
}

.modal-body ul { 
    list-style-position: inside; 
    padding-left: 5px; 
    margin-bottom: 15px; 
}

.modal-body ul li { 
    margin-bottom: 5px; 
}

.modal-footer { 
    text-align: center; 
}

.modal-footer .btn { 
    padding: 8px 20px; 
}

.modal-alert .modal-footer { 
    text-align: center; 
}

.modal-table { 
    width: 100%; 
    border-collapse: collapse; 
    margin-bottom: 15px; 
}

.modal-table th, .modal-table td { 
    border: 1px solid #e0e0e0; 
    padding: 8px; 
    font-size: 12px; 
    text-align: center; 
}

.modal-table th { 
    background-color: #f7f7f7; 
}

.modal-table textarea { 
    width: 100%; 
    min-height: 80px; 
    padding: 5px; 
    border: 1px solid #ccc; 
}

.reason-table { 
    width: 100%; 
}

.reason-table th { 
    width: 120px; 
}

.btn-logout {
  padding: 4px 10px;
  border: 1px solid #d9534f;
  background: #d9534f;
  color: #fff;
  font-size: 12px;
  border-radius: 4px;
  text-decoration: none;
  transition: background 0.2s;
  height: 20px;
}
.btn-logout:hover {
  background: #c9302c;
}

/* === Error Page === */
.error-page {
  background: #f3f3f3;
  color: #333;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
}

.error-wrap {
  width: 100%;
  max-width: 720px;
  padding: 16px;
}

.error-card {
  background: #fff;
  border: 1px solid #ddd;
  border-radius: 12px;
  box-shadow: 0 4px 16px rgba(0,0,0,.06);
  padding: 28px 32px;
}

.error-title {
  font-size: 24px;
  font-weight: 800;
  color: #c62828;
  text-align: center;
  margin-bottom: 8px;
}

.error-desc {
  text-align: center;
  margin-bottom: 18px;
  color: #444;
}

.error-detail {
  margin-top: 14px;
}

.error-detail h3 {
  font-size: 13px;
  margin: 8px 0;
  color: #333;
}

.error-detail pre {
  background: #f7f7f7;
  border: 1px solid #e6e6e6;
  border-radius: 8px;
  padding: 10px 12px;
  font-size: 12px;
  line-height: 1.5;
  overflow: auto;
  max-height: 45vh;
  white-space: pre-wrap;
  word-break: break-all;
}

.error-actions {
  text-align: center;
  margin-top: 18px;
}

#confirm-modal,
#alert-modal {
    z-index: 2001; /* 다른 모달(.modal-overlay)보다 높게 */
}