/* ------------------- section01 날짜바 --------------- */
/* 헤더 날짜 */
#pageDateH1{
  margin:0; font-weight:800;
  font-size:clamp(20px,3.2vw,28px); 
  line-height:1.2;
  display:inline-flex; 
  align-items:center; 
  gap:8px; 
  cursor:pointer;
}
#pageDateH1::after{ 
  content:"▾"; 
  font-size:.8em; 
  color:#6b7280; 
}
#datePicker {
  position: absolute;
  top: 70px;
  left: 130px;
  width: 1px; 
  height: 1px;
  margin: -1px; padding: 0; border: 0;
  white-space: nowrap;
  clip-path: inset(50%);
  clip: rect(0 0 0 0);
  overflow: hidden;
}
#datePicker[style]{
  top:auto !important; left:auto !important;
}
.datebar {
  display: flex;
  align-items: center;
  gap: 8px;
  user-select: none;
}
.datebar .spacer { flex: 1; }

.datebtn {
  display: none;
}
.datebtn:active { transform: translateY(1px); }

.chip {
    height: 32px;
    padding: 0 12px;
    border-radius: 999px;
    border: 1px solid var(--line, #e5e7eb);
    background: #fff;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.3s ease;
}
.chip.primary {
    border: 1px solid var(--line, #e5e7eb);
    background: #fff;
}
.chip:active { transform: translateY(1px); }
/* 🔥 활성화 상태 (삭제하기와 동일 컨셉) */
.main-chip,
.showall-chip {
  border: 1px solid var(--primary-brown) !important;
  color: var(--primary-brown);
}
.showall-chip.active {
  background-color: var(--primary-brown);
  color: #fff;
  border-color: var(--primary-brown);
}
.main-chip.active {
  border: 1px solid var(--primary-orange) !important;
  background-color: var(--primary-orange) !important;
  color: white;
  border: 1px solid transparent;
}
.showall-chip:hover {
  background-color: var(--primary-brown);
  color: white;
}
.main-chip:hover {
  border: 1px solid var(--primary-orange) !important;
  background-color: var(--primary-orange) !important;
  color: white;
  border: 1px solid transparent;
}

/* 버튼 효과 */
.orders-wrap.editing .table-scroll,
.orders-wrap.filtering .table-scroll {
  border-color: var(--primary-orange);
  box-shadow: 0 0 10px 2px #dbdbdb;
  transition: all 0.2s ease;
}
/* ------------------- section01 날짜바 end --------------- */
/* ------------------- section02 전체 도시락 수량 ------------------- */
.visual_tit {
  padding: 20px 0;
}
.section02 {
    display: flex;
    gap: 20px;
}
.quantity_wrap {
    display: flex;
    gap: 20px;
    justify-content: flex-start;
}
.container {
    width: auto;
    background-color: white;
    border-radius: 20px;
    box-shadow: 0 0 20px 1px rgba(0, 0, 0, 0.1);
    padding: 30px;
    display: flex;
    justify-content: flex-start;
    flex-direction: column;
}
.box_title {
    font-size: 2.4rem;
    font-weight: 600;
    color: var(--label-neutral);
    padding-bottom: 10px;
    user-select: none;
    -webkit-user-select: none; 
}
.quantity {
    width: auto;
    min-width: 160px;
    height: 160px;
    padding: 20px;
    background-color: var(--background-light);
    border-radius: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
}
.quantity div:nth-child(1) {
    font-size: 4rem;
    font-weight: 700;
}
.quantity_bg_none {
    background-color: transparent;
}
.qty_kind {
    padding: 2px 14px;
    border-radius: 100px;
    font-weight: 600;
    font-size: 18px;
    color: #00000090;
    user-select: none;
    -webkit-user-select: none; 
}
.heat_bg {
    background-color: #FF511720;
    color: var(--primary-orange);
}
.salad_bg {
    background-color: #189C3820;
    color: var(--primary-green);
}
.total_bg {
    background-color: #17171920;
    color: #00000090;
}
.dual-counter .primary,
.dual-counter .sep {
    color: #888;
}
/* ------------------- section02 전체 도시락 수량 end --------------- */
/* ------------------- 필터 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;
}
.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;
}
.multi-select {
  width: 160px;
  position: relative;
  font-size: 14px;
}

.multi-select-header {
  border: 1px solid #ccc;
  padding: 8px 10px;
  border-radius: 6px;
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  background: #fff;
}

.multi-select-list {
  position: absolute;
  width: 100%;
  background: white;
  border: 1px solid #ddd;
  border-radius: 6px;
  margin-top: 4px;
  padding: 8px;
  display: none;
  flex-direction: column;
  gap: 6px;
  z-index: 1000;
  box-shadow: 0 4px 8px rgba(0,0,0,0.1);
}

.multi-select-list label {
  display: flex;
  align-items: center;
  gap: 6px;
}

.multi-select-list input {
  cursor: pointer;
}

.arrow {
  font-size: 12px;
}

/* ------------------- 필터 css end --------------- */
.chk-cell input[type="checkbox"] {
    width: 18px;
    height: 18px;
    border-radius: 100px;
    accent-color: var(--primary-orange);
}
/* 요일 선택 css */
.weekday-group {
    gap: 10px;
    text-align: center;
    column-count: 1;
    padding: 20px;
    border-radius: 10px;
}
.weekday-cell {
    vertical-align: middle;
    gap: 8px;
}
.orders-table td.weekday-cell > * { padding-top: 6px; }
.wday {
    display: flex;
    justify-content: center;
    align-items: center;
    flex-direction: row;
}
.wday input[type="checkbox"] {
    width: 18px;
    height: 18px;
    border-radius: 4px;
    accent-color: var(--primary-orange);
}

/* 컨트롤 바 */
.orders-controls{
  display:flex;
  gap:12px;
  align-items:center;
  flex-wrap:wrap;
  margin:12px 0 8px;
  font-size:14px;
}
.orders-controls select,
.orders-controls input[type="checkbox"]{
  transform: translateY(1px);
}

/* 요일 체크 그룹 */
#weekdayFilter{
  display:flex;
  gap:8px;
  align-items:center;
}
#weekdayFilter .wday{
  display:inline-flex;
  gap:4px;
  align-items:center;
  padding:4px 8px;
  border:1px solid #e5e7eb;
  border-radius:6px;
  cursor:pointer;
  user-select:none;
}
#weekdayFilter .wday input{
  accent-color:#3B82F6;
}

/* 표 안 요일 체크박스 */
.weekday-group{
  display:flex;
  gap:6px;
  flex-wrap:wrap;
}
.weekday-group .wday{
  display:inline-flex;
  gap:4px;
  align-items:center;
  padding:2px 6px;
  border:1px dashed #e5e7eb;
  border-radius:6px;
}

/* 테이블 스크롤 보조 */
.table-scroll{
  overflow:auto;
}

/* 숫자 입력 칸 최소 너비 */
.orders-table input[type="number"]{
  width:100%;
  min-width:80px;
  text-align: center;
}
.orders-table textarea{
  width:100%;
  min-height:40px;
  resize:vertical;
}

/* 요일선택 css (2) */
/* --- 멀티 셀렉트 공통 --- */
.ms {
  position: relative;
  display: inline-block;
  width: 100%;
  max-width: 100%;
}
.ms-toggle {
  width: 100%;
  padding: 8px 12px;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  background: #fff;
  font-size: 16px;
  font-weight: 600;
  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);
}

/* 선택된 배지 영역 */
.ms-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 8px;
  max-height: 200px; /* 칼럼 길이 제한 시 사용 */
}

/* 기존 .weekday-group 기본 레이아웃(드롭다운 내부로 이동됨) */
.weekday-group .wday{
  display:inline-flex; gap:4px; align-items:center;
  padding:2px 6px; border-radius:6px; border:1px dashed #e5e7eb;
}

.weekday-group { 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);
}
/* 테이블 너비 사이즈 */
textarea[name="note"],
input[name="hot"],
input[name="salad"] {
  font-size: 16px;
  font-weight: 600;
}
input[name="hot"] {
  background-color: #FF511710;
}
input[name="salad"] {
  background-color: #189C3810;
}
textarea[name="note"] {
  text-align: center;
  width: 100%;
}
.company-view {
  text-align: center;
  font-size: 16px;
  font-weight: 600;
  pointer-events: auto !important;
  position: relative;
  z-index: 2;
  transition: all 0.3s ease;
  border-radius: 10px;
  padding: 10px 0;
  border: 1px solid transparent;
}
.company-view:hover {
  background: white;
  border: 1px solid var(--primary-orange);
  cursor: copy;
}
.company-view:hover {
  background: white;
  border: 1px solid var(--primary-orange);
}

/* --------------------- */
/* ===== 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.show { display: flex; }

.modal-card {
  display: flex;
  justify-content: center;
  align-items: center;
  flex-direction: column;
  width: 60vw;
  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: 60vw;
  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; width: 100%; }
.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: 200px;
  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.8;
}
.change-log li:last-child {
  border-bottom: 1px solid transparent; 
}
.change-log .log-el-pre {
  font-size: 12px; 
  font-weight: 800;
  padding : 4px 10px; 
  background-color: rgb(223, 223, 223);
  color: #767676; 
  border-radius: 100px;
}
.change-log .log-el-next {
  font-size: 12px;
  font-weight: 800;
  padding : 4px 10px; 
  background-color: rgb(255, 218, 201);
  color: #FF5117; 
  border-radius: 100px;
}
.log-body {
  font-size: 14px;
  font-weight: 800;
}

.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: #fff; 
    color: initial;
    border: 1px solid var(--line-normal); 
}
/* 요일선택 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="company"] {
  width: 100%;
  height: 34px;
  border-radius: 8px;
  padding: 0 10px;
  outline: none;
  background:#fff;
  font-size: 16px;
  font-weight: 500;
}
input[name="manager"],
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;
}
textarea[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: block;}

/* 보류 라벨(체크박스) */
.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;
}
/* 밥온다/풀온다 수량 체크 */
.need-value {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0 10px;
}
.need-value:placeholder-shown {
  border-color: var(--primary-orange);
}

/* 보류 상태일 때 요일들 흐리게 */
.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: 14px;
}
.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;
}
/* =============밥/풀 온다 수량 버튼 ============= */
/* 숫자 입력 전체 래퍼 */
.num-wrap {
  display: flex;
  align-items: center;
  gap: 6px;
}

/* input 기본 스피너 제거 */
.num-wrap input[type="number"]::-webkit-inner-spin-button,
.num-wrap input[type="number"]::-webkit-outer-spin-button {
  -webkit-appearance: none;
  margin: 0;
}
.num-wrap input[type="number"] {
  -moz-appearance: textfield; /* Firefox */
}

/* 숫자 input 스타일 */
.num-wrap input[type="number"] {
  width: 80px;
  height: 42px;
  font-size: 18px;
  font-weight: 600;
  text-align: center;
  border-radius: 10px;
  border: 1.5px solid #d0d0d0;
}

/* + / - 버튼 */
.num-btn {
  width: 42px;
  height: 42px;
  font-size: 26px;
  font-weight: 700;
  border-radius: 10px;
  border: 1.5px solid #d0d0d0;
  color: #222;
  display: flex;
  justify-content: center;
  align-items: center;
  cursor: pointer;
  transition: all 0.3s;
}

/* 눌렀을 때 */
.num-btn:active {
  background: #e0e0e0;
}
.num-btn:hover {
  background-color: var(--primary-orange);
  color: white;
  border: 1.5px solid var(--primary-orange);
}

/* 🔥 number input의 기본 스피너 제거 */
input[type=number]::-webkit-inner-spin-button,
input[type=number]::-webkit-outer-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

input[type=number] {
  -moz-appearance: textfield; /* Firefox */
}
