/* === 공통 스타일 === */
/* 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: 10px 0;
    /* 텍스트와 기호 사이의 간격을 위해 display를 inline-block으로 변경할 수 있습니다. */
    /* display: inline-block; */ 
}

/* 텍스트 앞에 ■ 추가 */
.content-title::before {
    content: "■"; /* 원하는 문자 (검은색 사각형) */
    margin-right: 8px; /* 텍스트와의 간격 */
    color: #444; /* 기호 색상 (선택 사항) */
}

/* 텍스트 뒤에 ■ 추가 */
.content-title::after {
    content: "■"; /* 원하는 문자 (검은색 사각형) */
    margin-left: 8px; /* 텍스트와의 간격 */
    color: #444; /* 기호 색상 (선택 사항) */
}

.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; 
    margin-top: 5px; 
}

.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: 4px 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;

    /* <a>와 <button>을 통일시키기 위한 추가/수정 스타일 */
    display: inline-block; /* <a>를 블록 레벨 요소처럼 만들어 padding/margin 적용을 용이하게 함 */
    color: #333; /* <a> 태그의 기본 파란색 링크 색상을 변경 (원하는 색상으로 설정) */
    text-align: center; /* 텍스트 가운데 정렬 (button의 기본 스타일과 유사하게) */
    box-sizing: border-box; /* padding과 border가 width/height에 포함되도록 설정 */
    -webkit-appearance: none; /* WebKit 브라우저에서 버튼 기본 스타일 제거 */
    -moz-appearance: none; /* Mozilla 브라우저에서 버튼 기본 스타일 제거 */
    appearance: none; /* 표준화된 버튼 기본 스타일 제거 */
}

.btn:hover { 
    background-color: #e0e0e0; 
}

.btn-search { 
    background: #006453; 
    color: #fff; 
    border-color: #006453; 
}

.btn-search:hover { 
    background: #007a66; 
}

.btn-reset { 
    background: #f3f3f3; 
    color: #000; 
    border-color: #333; 
}

.btn-reset:hover { 
    background: #e0e0e0; 
}

.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: #006453;
    color: white;
    border-color: #006453;
}

.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: 4px 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: #006453;
  border-color: #006453;
  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: #006453; 
    color: #fff; 
    border-color: #006453; 
}

/* === 기타 스타일 === */
.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;
}

/* ===== Status badge polish ===== */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border-radius: 9999px;
  font-size: 12px;
  font-weight: 600;
  line-height: 1;
  letter-spacing: .2px;
  border: 1px solid transparent;
  user-select: none;
  vertical-align: middle;
  white-space: nowrap;
}

/* 왼쪽 컬러 점 */
.badge .dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: currentColor;
  flex: 0 0 6px;
}

/* 공통 톤 (라이트) */
.badge-success { color: #0b7a45; background: #e8f7ef; border-color: #c8ecd9; }
.badge-warning { color: #8a5300; background: #fff4e0; border-color: #ffe4ba; }
.badge-danger  { color: #a61b1b; background: #fdebec; border-color: #f8c9cd; }
.badge-secondary{color: #384052; background: #eef1f5; border-color: #d8dee7; }
.badge-dark    { color: #263238; background: #e8edf0; border-color: #c9d3da; }
.badge-muted   { color: #5b5b5b; background: #f2f2f2; border-color: #e2e2e2; }

/* 상태별 미세 효과 */
.badge[data-state="pending"] { 
  /* 승낙대기: 옅은 스트라이프 */
  background-image: repeating-linear-gradient(
    45deg,
    transparent 0, transparent 6px,
    rgba(0,0,0,.04) 6px, rgba(0,0,0,.04) 12px
  );
}
.badge[data-state="draft"] {
  /* 판매대기: 테두리 강조 */
  border-color: #c9d3da;
}

/* 다크 모드 */
body.dark-mode .badge-success { color:#a0eec6; background:#113325; border-color:#1a4a34; }
body.dark-mode .badge-warning { color:#ffd08a; background:#3a2a11; border-color:#5a3f19; }
body.dark-mode .badge-danger  { color:#ffb3b8; background:#3a1719; border-color:#5a2327; }
body.dark-mode .badge-secondary{color:#c9d4e6; background:#1f2430; border-color:#2b3444; }
body.dark-mode .badge-dark    { color:#c5d0d6; background:#182027; border-color:#27323a; }
body.dark-mode .badge-muted   { color:#cfcfcf; background:#242424; border-color:#333; }

/* 호버 시 살짝 리프트 */
.badge:hover { filter: brightness(0.98); transform: translateY(-0.5px); transition: all .15s ease; }


/* 라이트 기본 */ .img-card{ border:1px solid #ddd; border-radius:8px; padding:8px; background:#fff; }
.img-box{ width:100%; aspect-ratio:1/1; border:1px dashed #bbb; border-radius:6px; background:#fafafa; display:flex; align-items:center; justify-content:center; overflow:hidden; cursor:pointer; }
.img-box .placeholder{ color:#999; font-size:12px; }
.img-card.dragging{ opacity:.85; outline:2px solid rgba(99,102,241,.6); outline-offset:2px; }

/* ===== Dashboard chips (pld-*) — 공통 =====
   라이트(화이트 카드 + 연한 테두리). 선택시 브랜드그린(#006453) 강조. */
:root {
  --pld-bg: #ffffff;
  --pld-border: #006453;
  --pld-border-soft: #9fcfc6;
  --pld-text: #111;
  --pld-subtext: #81939f;
  --pld-green: #006453;
}
.pld-wrap { padding: 10px; margin: 6px 0 8px; background: transparent; }
.pld-flow { display:flex; align-items:stretch; gap:12px; overflow-x:auto; overflow-y:visible; padding-bottom:2px; }
.pld-step{
  position:relative; background:var(--pld-bg); color:var(--pld-text);
  border:2px solid var(--pld-border-soft); border-radius:10px; text-decoration:none;
  display:flex; align-items:center; justify-content:center; text-align:center;
  flex:1 1 0; min-width:210px; padding:12px 14px;
}

.pld-step::after{
  content:''; position:absolute; right:-16px; top:0; bottom:0; width:0; height:0;
  border-top: calc(50% + 2px) solid transparent;
  border-bottom: calc(50% + 2px) solid transparent;
  border-left:16px solid var(--pld-border-soft);
}
.pld-step::before{
  content:''; position:absolute; right:-14px; top:2px; bottom:2px; width:0; height:0;
  border-top: calc(50% - 2px) solid transparent;
  border-bottom: calc(50% - 2px) solid transparent;
  border-left:14px solid var(--pld-bg);
}
.pld-step:last-child::after, .pld-step:last-child::before{ display:none; }
.pld-step:hover{ filter:brightness(0.985); }
.pld-active{ border-color: var(--pld-green) !important; box-shadow: 0 0 0 2px var(--pld-green) inset; }
.pld-active::after{ border-left-color: var(--pld-green); }
.pld-count{ font-weight:800; font-size:17px; line-height:1.05; }
.pld-label{ margin-top:4px; font-size:12px; color:var(--pld-subtext); }
.pld-step.stack{ padding:10px 12px; }
.pld-stack{ display:grid; gap:8px; width:100%; }
.pld-mini{
  display:flex; flex-direction:column; align-items:center; justify-content:center;
  background:var(--pld-bg); color:var(--pld-text);
  border:2px solid var(--pld-border-soft); border-radius:10px; text-decoration:none; padding:8px 10px;
}
.pld-mini:hover{ filter:brightness(0.985); }
.pld-mini .pld-count{ font-size:15px; font-weight:800; line-height:1.05; }
.pld-mini .pld-label{ margin-top:2px; font-size:12px; color:var(--pld-subtext); }
.pld-mini.pld-active{ border-color: var(--pld-green) !important; box-shadow: 0 0 0 2px var(--pld-green) inset; }
.pld-arrow{ position:absolute; right:10px; top:50%; transform:translateY(-50%); width:14px; height:14px; pointer-events:none; opacity:.75; }
.pld-arrow svg{ width:100%; height:100%; display:block; }
.pld-step:last-child .pld-arrow{ display:none; }
.pld-arrow path{ stroke: var(--pld-border-soft); }
.pld-active .pld-arrow path{ stroke: var(--pld-green); }

/* 플로우 안에서 '열'을 쓸 때(상단 큰칩 + 하단 보조칩 스택) */
.pld-col{
  display:flex;
  flex-direction:column;
  gap:8px;
  flex: 1 1 0;        /* ✅ 가로를 꽉 채우게 */
  min-width:210px;    /* 칩과 동일한 최소너비 */
}

/* 마지막 열의 오른쪽 화살표 숨김 (열 래퍼 사용 시 필요) */
.pld-flow > .pld-col:last-child .pld-arrow{ display:none; }