/* Sipariş Takip */
.od-nav-count {
  display: inline-block; min-width: 20px; padding: 1px 6px; margin-left: 4px;
  border-radius: 999px; background: var(--red); color: #fff; font-size: 11px; font-weight: 900; text-align: center;
}
.od-top { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 14px; }
.od-tabs { display: inline-flex; gap: 4px; padding: 4px; border-radius: 12px; background: #eef2ef; }
.od-tabs button {
  border: 0; border-radius: 9px; background: transparent; padding: 10px 18px;
  font-weight: 800; color: #4f5d55; cursor: pointer; font-size: 14px;
}
.od-tabs button b { display: inline-block; min-width: 22px; margin-left: 6px; padding: 1px 7px; border-radius: 999px; background: #dfe6e1; font-size: 12px; }
.od-tabs button.active { background: #fff; color: var(--green); box-shadow: 0 1px 3px rgba(0,0,0,.1); }
.od-tabs button.active b { background: var(--green); color: #fff; }
.od-tools { display: flex; gap: 10px; flex-wrap: wrap; }
.od-tools .search { min-width: 260px; }

.od-plan { margin-bottom: 16px; overflow: hidden; }
.od-plan-toggle {
  width: 100%; display: flex; justify-content: space-between; align-items: center; gap: 10px;
  border: 0; background: #fff; padding: 14px 18px; font: inherit; font-size: 14px; cursor: pointer; text-align: left;
}
.od-plan-toggle em { font-style: normal; font-weight: 700; }
.od-plan-toggle i { font-style: normal; color: var(--muted); }
.od-ok { color: var(--green); font-weight: 700; }
.od-short { color: var(--red); font-weight: 800; }

.od-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 14px; margin-bottom: 18px; }
.od-card {
  display: flex; flex-direction: column; gap: 10px;
  background: #fff; border: 1px solid var(--line); border-left: 5px solid #cfd8d2; border-radius: 14px; padding: 16px;
}
.od-card.late { border-left-color: var(--red); }
.od-card.today { border-left-color: #f59e0b; }
.od-card.soon { border-left-color: #2d7bd8; }
.od-card.shipped { border-left-color: var(--green); background: #fbfdfc; }
.od-card header { display: flex; justify-content: space-between; align-items: flex-start; gap: 10px; }
.od-no { color: var(--muted); font-size: 12px; font-weight: 800; }
.od-card h3 { margin: 2px 0 0; font-size: 17px; }
.od-due { flex: 0 0 auto; font-size: 11px; font-weight: 900; padding: 5px 9px; border-radius: 999px; background: #eef2ef; color: #4f5d55; }
.od-due.late { background: #fde8e8; color: var(--red); }
.od-due.today { background: #fff1cc; color: #8a6300; }
.od-due.soon { background: #e6f0fb; color: #22609f; }
.od-meta { color: var(--muted); font-size: 12px; }
.od-items { list-style: none; margin: 0; padding: 0; border-top: 1px solid #f0f3f1; }
.od-items li { display: grid; grid-template-columns: 38px minmax(0, 1fr) auto; gap: 4px 8px; align-items: center; padding: 8px 0; border-bottom: 1px solid #f0f3f1; font-size: 14px; }
.od-code { color: var(--muted); font-weight: 800; font-size: 12px; }
.od-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.od-items b { font-variant-numeric: tabular-nums; white-space: nowrap; }
.od-items small { grid-column: 2 / -1; font-size: 11px; }
.od-total { display: flex; justify-content: space-between; font-size: 14px; color: var(--muted); }
.od-total b { color: var(--text); font-size: 16px; }
.od-note { margin: 0; padding: 8px 10px; border-radius: 9px; background: #fff8e6; color: #7a5600; font-size: 13px; }
.od-shipped { font-size: 12px; color: var(--muted); }
.od-card footer { display: flex; gap: 8px; align-items: center; margin-top: auto; }
.od-card footer .od-ship {
  flex: 1;
  background: #f1f5f2;
  color: #2f5d45;
  border: 1px solid #cddbd2;
}
.od-card footer .od-ship:hover { background: #e6eee9; }
.od-confirm { background: #3f6b55; color: #fff; }
.od-confirm:hover { background: #355c48; }
.od-del { border: 0; background: none; color: var(--muted); cursor: pointer; font-weight: 700; padding: 8px; }
.od-del:hover { color: var(--red); }
.od-day { margin: 6px 0 10px; font-size: 15px; }
.od-day span { color: var(--muted); font-weight: 600; font-size: 13px; margin-left: 6px; }
.od-empty { padding: 40px 16px; text-align: center; color: var(--muted); background: #fff; border: 1px dashed var(--line); border-radius: 14px; }

.od-modal p { margin: 0 0 10px; }
.od-modal .od-items { margin-bottom: 12px; }
.od-check { display: flex; gap: 10px; align-items: flex-start; padding: 12px; border: 1px solid var(--line); border-radius: 10px; margin-bottom: 10px; font-size: 14px; cursor: pointer; }
.od-check input { width: 18px; height: 18px; margin-top: 1px; accent-color: var(--green); }
.od-warn { background: #fff8e6; color: #7a5600; border-radius: 10px; padding: 10px 12px; font-size: 13px; margin-bottom: 12px; }
.od-modal .btn, .od-form > .btn.green { width: 100%; }
.od-form-dates { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.od-form-label { display: block; font-size: 13px; font-weight: 700; margin: 4px 0 6px; }
.od-item-row { display: grid; grid-template-columns: minmax(0, 1fr) 110px 38px; gap: 8px; margin-bottom: 8px; }
.od-item-row input { height: 42px; border: 1px solid #d6dfd9; border-radius: 10px; padding: 0 10px; font: inherit; min-width: 0; }
.od-i-del { border: 1px solid var(--line); border-radius: 10px; background: #fff; color: var(--muted); cursor: pointer; }
#odAddItem { margin-bottom: 12px; }
@media (max-width: 800px) {
  .od-top { align-items: stretch; }
  .od-tabs { display: grid; grid-template-columns: 1fr 1fr; width: 100%; }
  .od-tools { width: 100%; }
  .od-tools .search { min-width: 0; flex: 1; }
  .od-tools .btn { width: 100%; }
  .od-grid { grid-template-columns: minmax(0, 1fr); }
}

.od-diff { color: #8a6300; font-weight: 700; }
.od-items li.od-missing { opacity: .7; }
.od-items small.od-diff { grid-column: 2 / -1; font-size: 11px; }
.od-ship-form p { font-size: 14px; line-height: 1.45; }
.od-ship-head { display: grid; grid-template-columns: minmax(0, 1fr) 120px 38px; gap: 8px; font-size: 12px; font-weight: 800; color: var(--muted); margin-bottom: 4px; }
.od-ship-row { display: grid; grid-template-columns: minmax(0, 1fr) 120px 38px; gap: 6px 8px; margin-bottom: 10px; }
.od-ship-row input { height: 42px; border: 1px solid #d6dfd9; border-radius: 10px; padding: 0 10px; font: inherit; min-width: 0; }
.od-ship-row input.bad { border-color: #e59a9a; background: #fff6f6; }
.od-ship-row .od-s-kg { text-align: right; font-weight: 800; }
.od-s-info { grid-column: 1 / -1; font-size: 12px; margin-top: -2px; }
.od-s-info:empty { display: none; }
#odShipAdd { margin-bottom: 12px; }
.od-ship-total { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 4px 10px; padding: 10px 2px; border-top: 1px solid var(--line); margin-bottom: 10px; font-size: 15px; }
.od-ship-total em { flex-basis: 100%; font-style: normal; font-size: 13px; }
#odDoShip:disabled { opacity: .5; cursor: not-allowed; }

/* Daha kompakt sipariş kartları */
.od-grid { grid-template-columns: repeat(auto-fill, minmax(270px, 1fr)); gap: 12px; }
.od-card { gap: 7px; padding: 12px 14px; border-radius: 12px; border-left-width: 4px; }
.od-card h3 { font-size: 15px; }
.od-no { font-size: 11px; }
.od-due { font-size: 10px; padding: 4px 8px; }
.od-meta { font-size: 11px; }
.od-items li { padding: 5px 0; font-size: 13px; grid-template-columns: 34px minmax(0, 1fr) auto; }
.od-code { font-size: 11px; }
.od-items small { font-size: 10px; }
.od-total { font-size: 12px; }
.od-total b { font-size: 14px; }
.od-note { padding: 6px 9px; font-size: 12px; }
.od-shipped { font-size: 11px; }
.od-card footer { gap: 6px; }
.od-card footer .btn { padding: 7px 12px; font-size: 13px; }
.od-del { padding: 6px; font-size: 13px; }
/* Stok yeterliyse ayrı "✓" satırı gösterme; yalnız yetersizlik uyarısı kalsın */
.od-card .od-items small.od-ok { display: none; }

/* Bölgelere göre gruplama */
.od-region-group { margin-bottom: 22px; }
.od-region-head {
  display: flex; align-items: baseline; justify-content: space-between; gap: 10px; flex-wrap: wrap;
  margin: 0 0 10px; padding: 10px 14px; border-radius: 12px;
  background: #e9f4ee; color: #1f5a3c; border-left: 5px solid var(--green);
}
.od-region-head span { font-size: 15px; font-weight: 900; letter-spacing: .3px; }
.od-region-head em { font-style: normal; font-size: 13px; font-weight: 700; color: #4f6f5e; }
.od-region-group.none .od-region-head { background: #f3f4f3; color: #5d6762; border-left-color: #b9c2bd; }
.od-region-group.small { margin-bottom: 12px; }
.od-region-group.small .od-region-head { padding: 7px 12px; background: #f2f7f4; }
.od-region-group.small .od-region-head span { font-size: 13px; }
.od-region-group .od-grid { margin-bottom: 0; }
.od-meta { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.od-region {
  border: 1px solid #cfe2d7; background: #f1f8f4; color: #2f5d45; border-radius: 999px;
  padding: 3px 9px; font-size: 11px; font-weight: 800; cursor: pointer;
}
.od-region:hover { background: #e3f1e9; }
.od-region.none { border-style: dashed; border-color: #e0b86a; background: #fff8e8; color: #8a6300; }
.od-region-form p { margin: 0 0 12px; }
.od-region-msg { padding: 8px 10px; border-radius: 9px; background: #fff8e6; color: #7a5600; font-weight: 700; }
.od-region-choices { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 8px; margin-bottom: 14px; }
.od-region-choice {
  border: 1px solid var(--line); background: #fff; border-radius: 10px; padding: 11px 10px;
  font-weight: 800; font-size: 13px; color: #253340; cursor: pointer; text-align: left;
}
.od-region-choice:hover { border-color: var(--green); color: var(--green); }
.od-region-choice.active { background: var(--green); border-color: var(--green); color: #fff; }
.od-region-form .btn { width: 100%; margin-top: 6px; }

/* Ürün satırı açıklaması */
.od-item-row .od-i-note { grid-column: 1 / -1; height: 36px; font-size: 13px; margin-top: -2px; }
.od-item-note { font-style: italic; color: #8a6300; font-size: 12px; }
