/* ------------------- section01 날짜바 --------------- */
/* 헤더 날짜 */
#pageDateH1{
  margin:0; font-weight:800;
  font-size: 28px; 
  font-weight: 900;
  line-height:1.2;
  display:inline-flex; 
  align-items:center; 
  gap:8px; 
  cursor:pointer;
}
#pageDateH1::after{ 
  content:"▾"; 
  font-size:.8em; 
  color:#6b7280; 
}
.datebar {
  display: flex;
  align-items: center;
  gap: 8px;
  user-select: none;
}
.datebar .spacer { flex: 1; }

.sr-only{
  position:absolute !important;
  width: 1px;
  height: 1px;
  margin:-1px; padding:0; border:0;
  overflow:hidden;
  clip:rect(0 0 0 0);
  clip-path:inset(50%);
  white-space:nowrap;
}
#dateStart {
  top: 80px; left: 120px;
} 
#dateEnd {
  top: 80px; left: 340px;
}
label.datepick {
  position: static !important;
  width: auto; height: auto;
  clip: auto; clip-path: none;
  overflow: visible;
  opacity: 0;
  position: fixed;
  left: -9999px;
}
.datebtn,
#pageDateInput {
  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;
}
.chip.primary {
    border: 1px solid var(--line, #e5e7eb);
    background: #fff;
}
.chip:active { transform: translateY(1px); }
/* ------------------- section01 날짜바 end --------------- */
.visual_tit {
  padding: 20px 0;
}
.settle-summary span {
    margin-right: 10px;
}
#driverBody {
    text-align: center;
}
.add_btn {
    background-color: var(--primary-green);
    color: white;
}
input[type="checkbox"] {
    width: 18px;
    height: 18px;
    border-radius: 100px;
    accent-color: var(--primary-green);
    vertical-align: middle;
}
/* 레이아웃: 좌측 테이블 + 우측 패널 */
.orders-log-layout {
  display: flex; 
  gap: 20px; 
  align-items: flex-start;
}
.orders-log-wrap{ 
    width: 60%;
    flex: 1 1 auto; 
    min-width:0; 
}
#drvStatsBody .cell-center input {
    vertical-align: middle;
}
.driver-panel{ 
    width: 40%;
}
.card{
    background: white;
    border-radius: 14px;
    box-shadow:0 8px 30px rgba(2,6,23,.06)
}
.card .card-head{
    padding: 20px 30px;
    border-bottom: 1px solid var(--line);
    display: flex;
    align-items: center;
    gap: 8px;
    height: 75px;
}
.card .card-head .title{
    font-weight: 700;
    font-size: 18px;
}
.card .form {
    padding: 20px;
    height: auto;
}
/* 패널 내부 */
.driver-panel .card-body{ 
    padding: 20px 20px 40px 20px;
 }
.driver-hero {
  margin-bottom: 14px;
  padding-bottom: 12px;
}
.driver-hero .drv-line1{ 
    font-size: 20px; 
    display: flex; 
    gap: 8px; 
    align-items: center; 
    justify-content: center;
}
.driver-hero .drv-line2{ 
    color: var(--muted); 
    display: flex; 
    gap: 8px; 
    align-items: center; 
    justify-content: center;
}
.driver-hero .dot{ opacity:.6 }

.stats-row{
  display: flex; 
  gap: 20px; 
  margin: 12px 0 16px;
  padding: 0 40px;
}
.stat{
    flex: 1; 
    width: 100%;
    height: 100%;
    padding: 20px;
    background-color: var(--background-light);
    border-radius: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
}
.stat .label{ 
    color: var(--muted); 
    font-size: 14px;
}
.stat strong{ 
    font-size: 4rem;
    font-weight: 700;
 }

.mini-table-wrap { 
    border-top: 2px solid #1f2937;
    border-bottom: 2px solid #1f2937;
    overflow: hidden;
    background:#fff; 
}
.mini-table { 
    width:100%; 
    border-collapse: collapse; 
}
.mini-table thead {
    border-bottom: 2px solid #1f2937;
}
.mini-table th, 
.mini-table td {
  border-top: 1px solid var(--line);
  padding: 8px 10px; 
  font-size: 14px; 
  background:#fff;
  text-align: center;
}
.mini-table th { 
    background:#f3f4f6; 
    text-align: center; 
}
.mini-table .muted{ 
    color: var(--muted);
    padding: 100px 0;
 }
.mini-table .center{ text-align:center; }

/* 드래그 핸들 (네 기존 스타일 이용) */
.drag-handle {
  width: 100%; 
  height: 32px; 
  display: flex; 
  align-items: center; 
  justify-content: center;
  cursor: grab; 
  color:#9ca3af; 
  user-select: none;
}
.drag-handle svg { width: 18px; height:18px; }

/* 반응형 보조 */
@media (max-width: 1200px){
  .orders-log-layout{ flex-direction: column; }
  .driver-panel{ width:100%; flex: 1 1 auto; }
}

/* 행 호버시, css */
.orders-table tbody tr::before { content: none !important; }

.orders-table tbody#driverBody tr > td {
  background: #fff;
  transition: background-color .12s ease;
}
.orders-table tbody#driverBody tr:hover > td {
  background: #f2fff1 !important;
}
.orders-table tbody#driverBody tr:focus-within > td {
  background: #f2fff1 !important;
}

/* 체크된 행 */
.orders-table tbody#driverBody tr:has(input[type="checkbox"]:checked) > td {
  background: #e3ffe3 !important; /* 원래 색 유지 (원한다면 이것도 #f2fff1로 변경 가능) */
}
/* 드래그 중 */
.orders-table tbody#driverBody tr.dragging > td {
  background: #fffaf5 !important;
}
@media (hover:hover) {
  .orders-table tbody#driverBody tr:hover > td {
    background: #f2fff1 !important;
  }
}
/* ===========================
   Driver Grade Box (panel)
   =========================== */
.grade-box{
  margin: 8px 20px 6px;
  padding: 14px 16px;
  border: 1px solid var(--line, #e5e7eb);
  border-radius: 14px;
  background: #fff;
  box-shadow: 0 4px 14px rgba(2,6,23,.06);
}
.grade-main{
  display: grid;
  grid-template-columns: 80px 1fr auto;
  gap: 10px;
  align-items: center;
}
.grade-label{
  font-weight: 800;
  color: #111827;
  letter-spacing: .02em;
  display: flex;
  align-items: center;
  gap: 4px;
}
.grade-badge{
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 6px 10px;
  min-width: 96px;
  border-radius: 999px;
  font-weight: 700;
  background: #f3f4f6;
  color: #111827;
  border: 1px solid #e5e7eb;
}
.grade-allowance{
  font-weight: 700;
  color: var(--primary-green);
}
.grade-progress{
  position: relative;
  height: 10px;
  border-radius: 999px;
  background: #f3f4f6;
  overflow: hidden;
  margin: 10px 0 6px;
}
.grade-bar{
  position: absolute;
  top: 0; left: 0;
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, #86efac, #10b981);
  transition: width .25s ease;
}
.grade-bar.is-max{
  background: linear-gradient(90deg, #34d399, #059669);
}
.grade-meta{
  font-size: 12px;
  color: var(--muted, #6b7280);
}
.grade-actions{
  margin-top: 10px;
  display: flex;
  justify-content: flex-end;
}
.btn.sm{
  padding: 6px 12px;
  height: 32px;
  border-radius: 8px;
  font-weight: 700;
  border: 1px solid var(--line, #e5e7eb);
  background: #fff;
  cursor: pointer;
}
.btn.sm:active{ transform: translateY(1px); }

/* 패널 카드 안의 배치와 어울리도록 간격 미세조정 */
.driver-panel .card-body .grade-box{
  margin-left: 40px;
  margin-right: 40px;
}

/* ===========================
   Grade Modal
   =========================== */
.modal{
  position: fixed;
  inset: 0;
  background: rgba(17,24,39,.5);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 60;
}
.modal.open{ display: flex; }
.modal[aria-hidden="true"]{ display: none; }

.modal .modal-dialog{
  width: min(760px, 92vw);
  max-height: 86vh;
  overflow: auto;
  background: #fff;
  border-radius: 16px;
  box-shadow: 0 20px 60px rgba(2,6,23,.2);
}

.modal .modal-head{
  padding: 18px 24px 12px 24px;
  border-bottom: 1px solid var(--line, #e5e7eb);
}
.modal .eyebrow{
  font-size: 12px;
  color: var(--muted, #6b7280);
  letter-spacing: .02em;
  margin-bottom: 4px;
}
.modal .modal-head h3{
  margin: 0;
  font-size: 18px;
  font-weight: 800;
}

.modal .modal-body{
  padding: 16px 20px 8px 20px;
}
.modal .modal-body h4{
  margin: 12px 0 8px;
  font-size: 15px;
  font-weight: 800;
}

.modal .modal-foot{
  display: flex;
  gap: 8px;
  justify-content: flex-end;
  padding: 14px 20px 18px;
  border-top: 1px solid var(--line, #e5e7eb);
}
.modal .modal-foot .btn{
  padding: 8px 14px;
  border-radius: 10px;
  border: 1px solid var(--line, #e5e7eb);
  background: #fff;
  font-weight: 700;
  cursor: pointer;
}
.modal .modal-foot .btn:active{ transform: translateY(1px); }

/* 모달 안 표(네 기존 .mini-table 스타일 재사용 + 약간 보강) */
.modal .mini-table{
  width: 100%;
  border-collapse: collapse;
  margin-bottom: 8px;
}
.modal .mini-table thead th{
  background: #f3f4f6;
  border-bottom: 2px solid #1f2937;
}
.modal .mini-table th,
.modal .mini-table td{
  border-top: 1px solid var(--line, #e5e7eb);
  padding: 8px 10px;
  text-align: center;
  font-size: 14px;
}
.modal .mini-table .center{ text-align: center; }
.modal .muted{ color: var(--muted, #6b7280); }

/* ===========================
   Small tweaks
   =========================== */
@media (max-width: 1200px){
  .driver-panel .card-body .grade-box{
    margin-left: 20px;
    margin-right: 20px;
  }
  .grade-main{
    grid-template-columns: 72px 1fr;
  }
  .grade-allowance{ grid-column: 1 / -1; }
}
#grade_info:checked ~ .grade_overlay {display: block;}
#grade_info ~ .grade_overlay {display: none;}
.more_info {
  border-radius: 100px;
  font-size: 10px;
  padding: 1px 4px;
  color: var(--primary-green);
  border: 1px solid var(--primary-green);
  cursor: pointer;
  transition: all 0.3s;
}
.more_info:hover {
  border-radius: 100px;
  font-size: 10px;
  padding: 1px 4px;
  color: white;
  background-color: var(--primary-green);
  cursor: pointer;
}
.grade_info {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  position: fixed;
  top: 30%;
  left: 35%;
  background-color: white;
  border-radius: 20px;
  width: 30vw;
  height: auto;
  overflow: hidden;
  padding: 40px;
}
.grade_overlay {
  display: none;
  position: fixed; inset: 0;
  background: rgba(0,0,0,.4);
  align-items: center; justify-content: center;
  z-index: 8889;
}
.grade_overlay.open { display: flex; }
.grade_info_body{
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
}
.grade_info h3 {
  padding: 0px 40px 16px;
}
.grade_info_body ul {
  text-align: center;
}
.grade_info_body ul:nth-child(1) {
  width: 30%;
}
.grade_info_body ul:nth-child(2) {
  width: 70%;
}
.grade_info_body ul:nth-child(2) li {
  border-left: 1px solid var(--line);
}
.grade_info_body ul:nth-child(2) li:nth-child(1) {
  border-left: 1px solid transparent;
}
.grade_info_body ul li {
  padding: 10px 0;
  border-bottom: 1px solid var(--line);
}
.grade_info_body ul li:last-child {
  border-bottom: 1px solid transparent;
}
.grade_info ul li:nth-child(1) {
  background-color: var(--background-light);
  font-weight: 700;
}
.grade_detail_info {
  padding-top: 30px;
  line-height: 150%;
  color: #333;
}

