/* [[[당일 주문처 목록 css]]] */
/* ------------------- section02 전체 도시락 수량 ------------------- */
.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;
}

/* 기사들 총합 */
.board-total {
  display: flex;
  border-bottom: 1px solid var(--line);
  width: 100%;
}

.board-total .quantity_wrap {
  display: flex;
  width: 100%;
  justify-content: space-between;
  align-items: stretch;
  gap: 0;
}
.board-total .quantity {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  flex: 1 1 0;            
  min-width: 0; 
  height: 80px;
  padding: 20px;
  background-color: transparent;
  border-radius: 0;
  position: relative;
  border-right: 1px solid var(--line-normal);
  background-color: var(--background-light);
  overflow: hidden;
}
.board-total .quantity_wrap .quantity:last-child {
  border-right: 0;
}
.board-total .quantity div:nth-child(1) {
  font-size: 3rem;
  padding: 20px 0 0 0;
  text-align: right;
  display: inline-flex;
  justify-content: right;
  width: 100%;
}
.board-total .quantity_wrap .quantity_bg_none {
    background-color: transparent;
}
.board-total .qty_kind {
  position: absolute;
  top: 10px;
  left: 10px;
  font-size: 14px;
}
/* 주문처 목록 - 축소 */
#board_btn:checked ~ .board .board-body .table-scroll {
    max-height: 1000px; 
}
#board_btn ~ .board .board-body .table-scroll {
    max-height: 0;
    overflow: hidden; 
    transition: max-height 0.3s ease;
}
#board_btn ~ .board .board-body .table-scroll label[for="board_btn"] {
    display: block;
    cursor: pointer;
    padding: 8px 0;
    user-select: none;
}

/* (선택) 펼쳐졌을 때 도움말 스타일 변경 */
#board_btn:checked ~ .board .board-body .table-scroll label[for="board_btn"] .help {
    opacity: 0.7;
}
.orders-table {
    position: relative;
}
/* ------------------- section02 전체 도시락 수량 end --------------- */
header{
    position:sticky; top:0; z-index:10;
    background:linear-gradient(180deg,#fff,rgba(255,255,255,.8));
    backdrop-filter:saturate(140%) blur(6px);
    border-bottom:1px solid var(--line);
}
.topbar{
    max-width:1200px; margin:0 auto; padding:14px 16px;
    display:flex; align-items:center; gap:12px;
}
.topbar h1{font-size:20px; margin:0; font-weight:900}
.spacer{flex:1}
.btn{
    appearance:none; border:1px solid var(--line); background:#fff; color:#111;
    padding:10px 14px; border-radius:12px; cursor:pointer; font-weight:700;
    box-shadow:0 1px 0 rgba(0,0,0,.02);
}
.btn.primary{ background:var(--primary-orange); color:#fff; border-color:var(--primary-orange) }
.btn:hover{ filter:brightness(1.03) }

/* Boards */
.table-scroll {
    border: initial;
}
.boards{
    display: grid; 
    gap: 14px;
    grid-template-columns: repeat(2,1fr);
}
@media (max-width:1100px){ .boards{ grid-template-columns:repeat(2,1fr); } }
@media (max-width:640px){ .boards{ grid-template-columns:1fr; } }

.board{
    background:#fff; 
    border:1px solid var(--line); 
    border-radius:var(--radius);
    min-height:180px; 
    display:flex; 
    flex-direction:column; 
    overflow:hidden;
}
.board header{
    position:static; border:0; background:#fff;
}
.board-title{
    padding: 12px 14px; 
    display:flex; 
    align-items:center; 
    gap:8px;
    border-bottom:1px solid var(--line);
}
.board-title .dot{
    width:10px; height:10px; border-radius:50%;
    background:#9CA3AF; flex:0 0 10px;
}
.board[data-driver="UNASSIGNED"] .dot{ background:#9CA3AF }
.board[data-driver="D1"] .dot{ background:#fca5a5 }
.board[data-driver="D2"] .dot{ background:#86efac }
.board[data-driver="D3"] .dot{ background:#93c5fd }

.board-title h2{ margin:0; font-size:15px; font-weight:800 }
.counter{ margin-left:auto; font-size:13px; color:var(--muted) }

.board-body{ 
    display: flex; 
    flex-direction: column; 
    gap: 12px; 
}
.board.drop-target{ 
    outline:2px dashed var(--primary-orange); 
    outline-offset:-6px; 
}

/* Card */
.card:active{ cursor:grabbing }
.card.dragging{ opacity:.6; transform:scale(.99) }

.card-head{
    display:flex; align-items:center; gap:8px; margin-bottom:8px;
}
.card-title{
    font-weight:900; font-size:16px; display:flex; align-items:center; gap:8px;
}
.badge{
    font-size:12px; font-weight:800; padding:4px 8px; border-radius:999px;
    background:var(--badge); color:var(--badge-text);
}
.card-fields{
    display:grid; gap:10px;
    grid-template-columns:1fr 1fr;
}
.field{ display:flex; flex-direction:column; gap:6px }
.field.full{ grid-column:1 / -1 }
.field label{ font-size:12px; color:var(--muted); font-weight:700 }
.field input[type="text"],
.field input[type="number"],
.field textarea{
    width:100%; border:1px solid var(--line); border-radius:10px; background:#fff;
    padding:10px 12px; font:inherit;
}
.field input[readonly]{ background:#F3F4F6; color:#6B7280; cursor:not-allowed }
.checks{ display:grid; grid-template-columns:1fr 1fr; gap:10px }
.check{
    display:flex; align-items:center; gap:8px; padding:10px 12px; border:1px solid var(--line);
    border-radius:10px; background:#fff;
}
.check input{ width:18px; height:18px; accent-color:var(--primary-orange) }
.meta{
    font-size:12px; color:var(--muted); display:flex; gap:10px; margin-top:6px;
}

/* 동 라벨 */
.dong-cell { 
    text-align: center;
}
.region-badge {
    display:inline-block;
    padding: 2px 12px;
    border-radius:999px;
    background:var(--label-bg);
    color:var(--label-text);
    font-size: 14px;
    font-weight:600;
    white-space: nowrap;
    user-select: none;
    pointer-events:none;   
    margin: 5px 0;
}
/* 값이 비어있을 때(미정) 스타일 */
.region-badge.is-empty{
    background:#e5e7eb;
    color:#6b7280;
}

/* Footer help */
.help {
    display: flex;
    justify-content: center;
    padding: 0 16px; 
    color: var(--muted); 
    font-size: 13px;
}

/* Focus ring */
:focus-visible{ 
    outline:3px solid rgba(255,81,23,.45); 
    outline-offset:2px; 
    border-radius:8px;
}

@media (prefers-reduced-motion: reduce){
    *{ transition:none !important; animation:none !important; }
}

/* ========== 특이사항 모달 스타일 ========== */
.note-modal {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.35);
  display: none;
  align-items: center;
  justify-content: center;
  padding: 24px;
  z-index: 9000;
}
.note-modal.open { display: flex; }
.note-modal__dialog {
  width: 100%;
  max-width: 720px;
  background: #fff;
  border-radius: 16px;
  box-shadow: 0 20px 60px rgba(0,0,0,.25);
  padding: 20px;
  position: relative;
}
.note-modal__close {
  position: absolute;
  right: 12px;
  top: 10px;
  width: 36px;
  height: 36px;
  border: 0;
  border-radius: 50%;
  background: #f3f4f6;
  font-size: 24px;
  cursor: pointer;
}
.note-modal__close:hover { background: #e5e7eb; }
.note-modal__title {
  font-size: 20px;
  font-weight: 700;
  margin: 4px 28px 8px 4px;
}
.note-modal__meta {
  background: #fafafa;
  border: 1px solid #eee;
  border-radius: 10px;
  padding: 10px 12px;
  margin-bottom: 14px;
}
.meta-row { display: flex; gap: 8px; font-size: 13px; color: #555; }
.meta-label { color: #6b7280; }
.meta-value { color: #111; }

.note-modal__section + .note-modal__section { margin-top: 14px; }
.note-modal__label {
  font-size: 14px;
  font-weight: 600;
  margin-bottom: 6px;
  color: #374151;
  display: flex; align-items: center; gap: 8px;
}
.note-modal__hint { font-weight: 400; color: #6b7280; }

.note-modal__current {
  min-height: 44px;
  padding: 10px 12px;
  border: 1px solid #e5e7eb;
  border-radius: 10px;
  background: #fbfbfb;
  color: #111;
  white-space: pre-wrap;
  line-height: 1.5;
}

.note-modal__form textarea {
  width: 100%;
  resize: vertical;
  border: 1px solid #e5e7eb;
  border-radius: 10px;
  padding: 10px 12px;
  font-size: 14px;
  line-height: 1.6;
}
.note-modal__form textarea:focus {
  outline: none;
  border-color: #111;
  box-shadow: 0 0 0 3px rgba(17,17,17,.08);
}
.note-modal__actions {
  display: flex; gap: 8px; justify-content: flex-end;
  margin-top: 10px;
}
.btn-primary, .btn-secondary {
  appearance: none; border: 0; cursor: pointer; border-radius: 10px;
  padding: 10px 14px; font-weight: 600; font-size: 14px;
}
.btn-primary   { 
  background: var(--primary-orange); 
  color: #fff; 
  transition: all 0.3s;
}
.btn-primary:hover { background: var(--primary-brown); }
.btn-secondary { background: #f3f4f6; color: #111; }
.btn-secondary:hover { background: #e5e7eb; }

.note-modal__history {
  list-style: none; padding: 0; margin: 0;
  border: 1px solid #eee; border-radius: 10px; overflow: hidden;
}
.note-modal__history li {
  padding: 10px 12px;
  border-bottom: 1px solid #f0f0f0;
  display: grid; grid-template-columns: 140px 1fr; gap: 12px;
}
.note-modal__history li:last-child { border-bottom: 0; }
.note-modal__history .ts {
  font-size: 12px; color: #6b7280;
}
.note-modal__history .txt {
  white-space: pre-wrap; line-height: 1.5; color: #111;
}

/* 표 안의 행을 클릭 가능처럼 */
.boards .orders-table tbody tr {
  cursor: pointer;
}
.boards .orders-table tbody tr:hover {
  background: #fafafa;
}
