/* [[[고객관리 : 전체 주문서 기록 css]]] */
/* *******🚫사용안하는 기능🚫******* */
/* .modal-overlay.open {display: none !important;} */
/* ********************************* */
/* ------------------- 필터 css --------------- */
.orders-filter{
    display:flex;
    align-items:center;
    gap:10px 14px;
    padding:10px 12px;
    border:1px solid #e5e7eb;
    border-radius:12px;
    background:#fff; 
}
.orders-filter label,
.orders-filter fieldset,
.orders-filter select,
.orders-filter button{
    font-size:14px;
    width: 100%;
}
.orders-filter select{
    padding:6px 10px;
    border:1px solid #e5e7eb;
    border-radius:8px;
    background:#fff;
}
.orders-filter fieldset#weekdayFilter{
    display:flex;
    gap:6px;
    align-items:center;
    border:none;
    margin:0;
    padding:0;
}
.orders-filter fieldset#weekdayFilter > label{
    display:inline-flex;
    gap:4px;
    align-items:center;
    padding:4px 8px;
    border:1px solid #e5e7eb;
    border-radius:999px;
    background:#f9fafb;
    cursor:pointer;
}
.orders-filter fieldset#weekdayFilter input[type="checkbox"]{
    accent-color:#2563eb;
}
.orders-filter #missingOnly + span,
.orders-filter label[for="missingOnly"]{
    cursor:pointer;
}
.orders-filter #filterClear{
    padding: 6px 14px;
    height: 40px;
    font-size: 14px;
    font-weight: 500;
    color: #374151;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    background: #fff;
    cursor: pointer;
}
.orders-filter .filter-badge{
    margin-left:auto;
    background:#fff6ee;
    color: var(--primary-orange);
    border:1px solid #ffcda1;
    padding:4px 10px;
    border-radius:999px;
    font-weight:700;
}
#missingOnly[type="checkbox"] {
    width: 18px;
    height: 18px;
    border-radius: 100px;
    accent-color: var(--primary-orange);
}
/* 활성화 시 테두리 강조 */
.orders-filter.active{
  border-color: #FF511770;
  box-shadow:0 0 0 3px #fff6ee;
}
.orders-filter label {
    user-select: none;
    -webkit-user-select: none; 
}
.orders-filter input,
.orders-filter select,
.orders-filter button {
    cursor: pointer;
}

/* 셀렉트 헤더 제거 */
#daySelectHeader {
  display: none;
}

/* 체크박스 리스트 항상 표시 */
#daySelectList {
  display: flex !important;
  gap: 10px;
  padding: 4px 0;
}

/* 체크박스 라벨 스타일 */
#daySelectList label {
  display: flex;
  align-items: center;
  gap: 4px;
  cursor: pointer;
  font-size: 14px;
}

/* 체크박스 색상 */
#daySelectList input[type="checkbox"] {
  accent-color: var(--primary-brown);
}

/* ------------------- 필터 css end --------------- */
/* ===== Modal base ===== */
.visual_tit {
  padding: 20px 0;
}
.modal-overlay {
  display: none;
  position: fixed; inset: 0;
  background: rgba(0,0,0,.4);
  align-items: center; justify-content: center;
  z-index: 8889;
}
.modal-overlay.open { display: flex; }

.modal-card {
  display: flex;
  justify-content: center;
  align-items: center;
  flex-direction: column;
  width: 70vw;
  padding: 20px;
  background: #fff;
  border-radius: 16px;
  box-shadow: 0 20px 60px rgba(2,6,23,.18);
  overflow: hidden;
  font-family: var(--cal-font, ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial);
}

.modal-close {
  position: absolute; 
  top: 12px; right: 12px;
  border: 0; 
  background: transparent; 
  font-size: 18px; 
  cursor: pointer;
  opacity: .7;
}
.modal-close:hover { opacity: 1; }

.modal-header {
  position: relative;
  padding: 20px 24px 12px;
}
.modal-title  {
  display: flex;
  justify-content: center;
  align-items: center;
  font-size: 20px; 
  color: var(--label-normal); 
  letter-spacing: .02em;
  font-weight: 600;
}
.modal-eyebrow{
  display: flex;
  justify-content: center;
  align-items: center;
  margin: 6px 0 0;
  font-size: 16px; 
  font-weight: 500; 
  color: var(--label-alternative);
  line-height: 1.3;
  padding-bottom: 10px;
}
/* 첫주문 ------------ */
.date-hidden-input {
  position: absolute; 
  left: 0;
  top: 50px;
  width: 1px; 
  height: 1px; 
  opacity: 0;
}
.modal-body {
  width: 70vw;
  display: flex;
  flex-direction: row;
  gap: 20px;
  padding: 16px 24px;
  border-top: 1px solid #e5e7eb;
}
.modal-body-group {
  display: flex;
  gap: 20px;
  width: 70%;
}
.body-box {
  display: flex;
  flex-direction: column;
  width: 100%;
}
.kv { 
  display: grid; 
  grid-template-columns: 120px 1fr; 
  gap: 8px 12px; 
  align-items: center; 
}
.k { color: #374151; font-weight: 600; font-size: 16px; }
.v { color: #111827; font-size: 16px; word-break: break-all; }
.input_form { 
  display: flex;
  justify-content: center;
  gap: 8px;
  margin-bottom: 8px;
}
.kv_log {
  width: 30%;
  display: flex;
  flex-direction: column;
}
.modal-body hr {
  border: 0; 
  border-top: 1px dashed var(--line-normal); 
  margin: 10px 0;
}
.change-log {
  background-color: #f7f7f7;
  max-height: 460px;
  border-radius: 10px;
  overflow: auto; 
  padding-left: 0; 
  margin: 0; 
  list-style: none;
}
.change-log li {
  padding: 20px 10px; 
  border-bottom: 1px solid #eee; 
  line-height: 1.5;
}
.change-log li:last-child {
  border-bottom: 1px solid transparent; 
}
.change-log .log-el-pre {
  font-size: 13px; 
  padding : 4px 10px; 
  background-color: rgb(223, 223, 223);
  color: #767676; 
  border-radius: 100px;
}
.change-log .log-el-next {
  font-size:13px;
  padding : 4px 10px; 
  background-color: rgb(255, 218, 201);
  color: #FF5117; 
  border-radius: 100px;
}

.modal-footer {
  padding: 12px 24px 16px; 
  display: flex; 
  width: 100%;
  height: auto;
  justify-content: center; 
  gap: 8px;
  border-top: 1px solid var(--line-normal);
}
.btn.modal-ok {
  padding: 10px 40px; 
  border-radius: 100px; 
  border: 1px solid var(--line-normal); 
  background: #fff; 
  cursor: pointer;
  box-shadow: initial;
  transition: all 0.3s;
}
.btn.modal-ok:hover { 
    background: var(--primary-orange); 
    color: white;
    border: 1px solid var(--primary-orange); 
}
/* 팝업창-수정버튼 */
.modal-overlay .edit_btn {
    border-radius: 100px; 
    border: 1px solid var(--line-normal); 
    background: #fff; 
    box-shadow: initial;
    transition: all .3s;
    padding: 0 20px;
}
.modal-overlay .edit_btn:hover {
    background-color: var(--primary-orange);
    color: white;
    border: 1px solid var(--primary-orange);
}
.modal-overlay .edit_btn.active {
    background-color: var(--primary-brown);
    color: white;
    border: 1px solid var(--primary-brown);
}
/* 요일선택 css (2) */
/* --- 멀티 셀렉트 공통 --- */
.ms {
  position: relative;
  display: inline-block;
  width: 100%;
  max-width: 100%;
  height: 34px;
  margin: 5px 0;
}
.ms-toggle {
  width: 100%;
  padding: 8px 12px;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  background: #fff;
  font-size: 14px;
  line-height: 1.2;
  text-align: left;
  cursor: pointer;
}
.ms-toggle:after{
  content: "▾";
  float: right;
  opacity: .6;
}
.ms-toggle[aria-expanded="true"]:after{
  transform: rotate(180deg);
}

.ms-menu {
  position: absolute;
  z-index: 30;
  top: calc(100% + 6px);
  left: 0;
  min-width: 240px;
  width: max-content;
  max-width: 90vw;
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 10px;
  padding: 10px 10px 8px;
  box-shadow: 0 8px 24px rgba(0,0,0,.08);
  display: flex;
}
.ms-menu label{
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 8px;
  border-radius: 8px;
  cursor: pointer;
  white-space: nowrap;
}
.ms-menu label:hover{
  background: #f7f7fb;
}
.ms-menu input[type="checkbox"]{
  accent-color: #3B82F6;
  transform: translateY(1px);
}
/* 수정가능한 input --------------- */
input[name="manager"],
input[name="company"],
input[name="dept"] {
  width: 100%;
  height: 34px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0 10px;
  outline: none;
  background:#fff;
  font-size: 16px;
  font-weight: 500;
}
input[name="addr"],
textarea[name="call"],
textarea[name="memo"] {
  width: 100%;
  min-height: 44px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 8px 10px;
  outline: none;
  background:#fff;
  font-size: 16px;
  font-weight: 500;
}

/* 선택된 배지 영역 */
.ms-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 8px;
  max-height: 200px;
}
.ms-tag{
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 14px;
  font-weight: 600;
  padding: 4px 10px;
  border-radius: 999px;
  background: #eef2ff;
  color: #2f5aff;
}
.ms-tag .x{
  font-weight: 700;
  line-height: 1;
  cursor: pointer;
  opacity: .55;
}
.ms-tag .x:hover{ opacity: .95; }

/* 기존 .weekday-group 기본 레이아웃(드롭다운 내부로 이동됨) */
.wday{
  display:inline-flex; gap:4px; align-items:center;
  justify-content: center;
  padding:2px 6px; border-radius:6px; border:1px dashed #e5e7eb;
}

.weekday-group:not(.ms-menu) { display: none; }
.ms-menu[hidden] { display: none; }

/* 보류 라벨(체크박스) */
.wday.hold {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  cursor: pointer;
  user-select: none;
}
.wday.hold input[type="checkbox"] {
  accent-color: #ef4444;
}
.badge-hold {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 999px;
  background: #fee2e2;
  color: #991b1b;
  font-size: 12px;
  line-height: 18px;
}

/* 보류 상태일 때 요일들 흐리게 */
.weekday-cell.is-hold .wday:not(.hold) {
  opacity: 0.45;
}
tr.row-on-hold {
  background: rgba(239, 68, 68, 0.04);
}

/* 페이지 넘김 번호 */
.page_number {
  display: flex;
  justify-content: center;
}
.page_number .action {
  padding: 10px 0;
}
.page_num {
  display: flex;
  flex-direction: row;
}
.page_num li {
  padding: 0 6px;
  cursor: pointer;
  color: #767676;
}
.page_num li:hover {
  font-weight: 700;
  color: var(--primary-orange);
}
.next_btn {
  color: #991b1b;
}

/* ==========정기주문 DB 보기테이블 스타일============= */
#ordersBody td {
  text-align: center;
  font-weight: 600;
  color: #374151;
  font-size: 16px;
}
.col-Reg div{
  display: flex;
  align-items: center;
  justify-content: center;
  width: auto;
  height: 28px;
  text-align: center;
  border-radius: 999px;
  padding: 2px 12px;
  font-weight: 700;
  font-size: 14px;
  border: 1px solid transparent;
  line-height: 1;
  background-clip: padding-box;
}
/* 기본 셀렉트 모양을 배지처럼 */

/* 미정 */
.tag-basic {
  color: #6b7280;
  border-color: #e5e7eb;
}

/* 보류 */
.tag-stop {
  background: #e5e7eb;
  color: #6b7280;
  border-color: rgb(197, 197, 197);
}

/* 정기 */
.tag-regular{
  background: #e5f8e5;
  color: #00c070;
  border-color: #e5f8e5;
}

/* 비정기 */
.tag-adhoc{
  background: #f5eff4;
  color: #9452d1;
  border-color: #f5eff4;
}

/* 비활성 상태일 때 느낌 */
select.regular:disabled{
  cursor: not-allowed;
}
select.regular:focus{
  outline: none;
  box-shadow: 0 0 0 3px rgba(47,90,255,.15);
}

.address_btn a {
  padding: 14px;
  border: 1px solid var(--line-normal);
  box-sizing: border-box;
  border-radius: 4px;
}