#istek_ctxMenu .ctx-item:hover{ background:#f3f4f6; }
#istek_detailCtxMenu .ctx-item:hover{ background:#f8fafc; }

/* Istek sifaris konteks menyu duymesi: qara + qalin */
#istek_ctxMenu .ctx-item{
  color:#111827;
  font-weight:700;
}
#istek_detailCtxMenu .ctx-item{
  color:#0f172a;
  font-weight:700;
}

#istek_detailCtxMenu .ctx-item + .ctx-item{
  border-top: 1px solid #eef2f7;
}

/* Istek sifaris siyahi ve detal cedvelleri ucun qara serhed */
#istekPage .kv-table,
#istekPage .kv-table th,
#istekPage .kv-table td,
#istekDetailPage .kv-table,
#istekDetailPage .kv-table th,
#istekDetailPage .kv-table td{
  border:1px solid #000;
  padding: 5px 7px;
  line-height: 1.2;
}
#istekPage .kv-table,
#istekDetailPage .kv-table{
  border-collapse:collapse;
}

/* Detail page premium header */
.istek-detail-hero{
  background: linear-gradient(135deg, rgba(255,255,255,.95), rgba(240,249,255,.95));
  border: 1px solid #dbeafe;
  border-radius: 16px;
  padding: 12px 14px;
  box-shadow: 0 10px 26px rgba(15,23,42,.06);
  margin-bottom: 10px;
}
.istek-detail-head{
  display: grid;
  grid-template-columns: 120px 1fr 120px;
  align-items: center;
  gap: 10px;
}
.istek-head-side{
  display:block;
  width:120px;
  height:1px;
}
.istek-back-btn{
  width: 120px !important;
  min-width: 120px !important;
  max-width: 120px;
  padding: 8px 10px !important;
  border-radius: 10px !important;
  border: 1px solid #bfdbfe !important;
  background: linear-gradient(180deg, #f8fbff, #eff6ff) !important;
  color: #0f172a !important;
  font-weight: 600 !important;
  box-shadow: 0 3px 10px rgba(59,130,246,.12);
}
.istek-back-btn:hover{
  transform: translateY(-1px);
  border-color: #93c5fd !important;
}
.istek-detail-title{
  margin:0;
  text-align:center;
  font-size: 36px;
  line-height: 1.2;
  color:#0f172a;
  letter-spacing: .2px;
}
.istek-detail-info{
  margin-top: 8px;
  text-align: center;
  font-size: 13px;
  color: #334155;
  background: rgba(255,255,255,.7);
  border: 1px solid #e2e8f0;
  border-radius: 999px;
  padding: 6px 12px;
  display: inline-block;
  position: relative;
  left: 50%;
  transform: translateX(-50%);
}

.istek-detail-actions{
  display:flex;
  flex-direction:column;
  align-items:center;
  justify-content:center;
  gap:8px;
  margin: 8px 0 12px;
}
.istek-progress-row{
  width: 100%;
  display:flex;
  justify-content:center;
}
.istek-primary-btn{
  background: linear-gradient(90deg, #fde68a, #86efac, #93c5fd);
  border: 1px solid rgba(59,130,246,.25);
  padding: 9px 16px;
  border-radius: 12px;
  cursor: pointer;
  font-weight: 700;
  color: #0f172a;
  box-shadow: 0 8px 20px rgba(59,130,246,.18);
}
.istek-primary-btn:hover{
  filter: brightness(.99);
  transform: translateY(-1px);
}
.istek-shot-btn{
  background: linear-gradient(180deg, #ffffff, #f8fafc);
  border: 1px solid #cbd5e1;
  color: #0f172a;
  font-weight: 700;
  border-radius: 10px;
  padding: 7px 11px;
  cursor: pointer;
  box-shadow: 0 5px 14px rgba(15,23,42,.08);
}
.istek-shot-btn:hover{
  border-color: #93c5fd;
  box-shadow: 0 8px 18px rgba(59,130,246,.14);
}

.istek-bulk-btn{
  background: linear-gradient(180deg, #ffffff, #f8fafc);
  border: 1px solid #cbd5e1;
  color: #0f172a;
  font-weight: 700;
  border-radius: 10px;
  padding: 7px 11px;
  cursor: pointer;
  box-shadow: 0 5px 14px rgba(15,23,42,.08);
}
.istek-bulk-btn:hover{
  border-color: #93c5fd;
  box-shadow: 0 8px 18px rgba(59,130,246,.14);
}
.istek-bulk-btn.primary{
  background: linear-gradient(90deg, #ecfccb, #dcfce7);
  border-color: #86efac;
}

.istek-select-cell{
  display:flex;
  align-items:center;
  justify-content:center;
  gap:8px;
}
.istek-select-num{
  font-size:12px;
  color:#64748b;
  min-width: 16px;
  text-align:center;
}
.istek-check{
  appearance: none;
  -webkit-appearance: none;
  width: 16px;
  height: 16px;
  border: 1.5px solid #94a3b8;
  border-radius: 5px;
  display:inline-grid;
  place-items:center;
  background:#fff;
  cursor:pointer;
  transition: all .15s ease;
}
.istek-check::after{
  content: "";
  width: 8px;
  height: 8px;
  transform: scale(0);
  transition: transform .12s ease;
  border-radius: 2px;
  background: linear-gradient(135deg, #22c55e, #16a34a);
}
.istek-check:checked{
  border-color:#22c55e;
  box-shadow: 0 0 0 3px rgba(34,197,94,.14);
}
.istek-check:checked::after{
  transform: scale(1);
}

.istek-qty-input{
  width: 56px;
  min-width: 56px;
  height: 24px;
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  text-align: center;
  font-weight: 600;
  color: #0f172a;
  outline: none;
}
.istek-qty-input:focus{
  border-color:#86efac;
  box-shadow: 0 0 0 3px rgba(134,239,172,.22);
}

#istek_detailResult tr.istek-ordered-row td{
  background: #dcfce7 !important;
}
#istek_detailResult tr.istek-ordered-row:hover td{
  background: #bbf7d0 !important;
}

.istek-history-modal{
  width: min(760px, 92vw);
  max-width: 760px;
  position: relative;
  border-radius: 16px;
  border: 1px solid #dbeafe;
  background: #fff;
  box-shadow: 0 24px 56px rgba(15,23,42,.22);
  overflow: hidden;
}
.istek-history-overlay{
  display: none;
  position: fixed;
  inset: 0;
  z-index: 10040;
  background: rgba(15,23,42,.45);
  backdrop-filter: blur(2px);
  align-items: center;
  justify-content: center;
  padding: 20px;
}
.istek-history-overlay .kv-modal-header{
  background: linear-gradient(135deg, #f8fbff, #eff6ff);
  border-bottom: 1px solid #e2e8f0;
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:10px;
}
.istek-history-overlay .kv-modal-body{
  max-height: min(62vh, 520px);
  overflow: auto;
  background: #fff;
  padding: 14px 16px;
}
#istek_history_title{
  font-size: 18px;
  font-weight: 800;
  color: #0f172a;
}
.istek-history-close{
  width:30px;
  height:30px;
  border-radius:999px;
  border:1px solid #cbd5e1;
  background:#fff;
  color:#334155;
  font-size:16px;
  line-height:1;
  cursor:pointer;
}
.istek-history-close:hover{
  border-color:#93c5fd;
  color:#0f172a;
}
.istek-history-table{
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
  table-layout: fixed;
}
.istek-history-table th,
.istek-history-table td{
  border: 1px solid #e2e8f0;
  padding: 9px 10px;
  vertical-align: top;
  word-break: break-word;
}
.istek-history-table th{
  background: #f8fafc;
  color: #334155;
  text-align: left;
  font-weight: 700;
}
.istek-history-empty{
  color:#64748b;
  background:#f8fafc;
  border:1px dashed #cbd5e1;
  border-radius:10px;
  padding:14px;
  text-align: center;
}

.istek-confirm-actions{
  display:flex;
  justify-content:flex-end;
  gap:10px;
}
.istek-confirm-btn{
  min-width: 92px;
  height: 36px;
  border-radius: 10px;
  border: 1px solid transparent;
  font-weight: 700;
  cursor: pointer;
}
.istek-confirm-btn.yes{
  background: linear-gradient(90deg, #dcfce7, #bbf7d0);
  border-color: #86efac;
  color:#065f46;
}
.istek-confirm-btn.no{
  background: linear-gradient(90deg, #fee2e2, #fecaca);
  border-color: #fca5a5;
  color:#7f1d1d;
}

.istek-stats-wrap{
  margin-top: 12px;
  display:grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 10px;
}
.istek-stat-card{
  border:1px solid #dbeafe;
  border-radius: 12px;
  background: linear-gradient(135deg, #ffffff, #f8fbff);
  box-shadow: 0 8px 20px rgba(15,23,42,.08);
  padding: 10px 12px;
}
.istek-stat-label{
  font-size: 12px;
  color:#64748b;
}
.istek-stat-value{
  font-size: 22px;
  font-weight: 800;
  color:#0f172a;
  margin-top: 2px;
}

/* Modal */
.kv-modal-backdrop{
  position:fixed; inset:0; background:rgba(0,0,0,.35); z-index:9997;
}

.kv-modal-header,
.kv-modal-footer{ padding:12px 16px; border-bottom:1px solid #e5e7eb; }
.kv-modal-footer{ border-top:1px solid #e5e7eb; border-bottom:none; }
.kv-modal-body{ padding:14px 16px; }
.kv-form-row{ margin-bottom:10px; }
.kv-form-row input{ padding:8px 10px; border:1px solid #cbd5e1; border-radius:8px; }

.kv-colored-btn{
  background:linear-gradient(90deg,#fde68a,#86efac,#93c5fd);
  border:none; padding:8px 12px; border-radius:10px; cursor:pointer;
  font-weight:700; color:#111827;
  box-shadow:0 2px 8px rgba(0,0,0,.08);
}
.kv-colored-btn:hover{ filter:brightness(0.98); }

.kv-progress{
  position:relative; width:260px; height:12px; border-radius:999px; overflow:hidden;
  background:#f1f5f9; border:1px solid #cbd5e1;
}
.kv-progress-fill{
  position:absolute; left:0; top:0; bottom:0; width:0%;
  background:linear-gradient(90deg,#93c5fd,#86efac,#fde68a);
  transition: width .35s ease;
}
.kv-progress-text{
  position:absolute; right:8px; top:50%; transform:translateY(-50%);
  font-size:11px; font-weight:700; color:#111827;
}

/* Istek sifaris ikonu: gradient reng + yumsaq animasiya */
.kv-istek-ico{
  margin-right:8px;
  font-size:18px;
  background: linear-gradient(90deg, #93c5fd, #86efac, #fde68a);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  filter: drop-shadow(0 1px 2px rgba(0,0,0,.12));
  animation: kvFloat 2.8s ease-in-out infinite;
}

button:hover .kv-istek-ico{
  animation: kvWiggle .7s ease-in-out infinite;
}

@keyframes kvFloat{
  0%   { transform: translateY(0) }
  50%  { transform: translateY(-2px) }
  100% { transform: translateY(0) }
}

@keyframes kvWiggle{
  0%   { transform: rotate(0deg) }
  25%  { transform: rotate(-8deg) }
  50%  { transform: rotate(6deg) }
  75%  { transform: rotate(-4deg) }
  100% { transform: rotate(0deg) }
}

@media (prefers-reduced-motion: reduce){
  .kv-istek-ico{ animation: none; }
  button:hover .kv-istek-ico{ animation: none; }
}

.istek-toast{
  position: fixed;
  right: 18px;
  top: 16px;
  z-index: 10050;
  min-width: 220px;
  max-width: 360px;
  padding: 10px 14px;
  border-radius: 12px;
  border: 1px solid #bbf7d0;
  background: linear-gradient(135deg, #ecfdf5, #d1fae5);
  color: #064e3b;
  font-weight: 700;
  box-shadow: 0 12px 28px rgba(16,185,129,.2);
  opacity: 0;
  transform: translateY(-10px) scale(.98);
  pointer-events: none;
  transition: opacity .2s ease, transform .2s ease;
}
.istek-toast.show{
  opacity: 1;
  transform: translateY(0) scale(1);
}
.istek-toast.error{
  border-color: #fecaca;
  background: linear-gradient(135deg, #fff1f2, #ffe4e6);
  color: #7f1d1d;
  box-shadow: 0 12px 28px rgba(239,68,68,.16);
}

@media (max-width: 860px){
  .istek-detail-head{
    grid-template-columns: 1fr;
    justify-items: center;
  }
  .istek-head-side{
    display:none;
  }
  .istek-back-btn{
    width:auto !important;
    min-width: 120px !important;
  }
  .istek-detail-title{
    font-size: 28px;
  }
}
