@charset "utf-8";
/* ==========================================================================
   ERVA · Uygulamaya özel bileşenler
   (eski css/customstyle.css + sayfalardan taşınan <style> blokları)
   Renkler theme.css içindeki --mw-* değişkenlerinden gelir.
   ========================================================================== */

/* ---------- Giriş ---------- */
.login-logo { display: flex; justify-content: center; }
.login-logo img { max-width: 200px; }

/* ---------- Liste işlem butonları ---------- */
.islem-btn-box { display: flex; flex-direction: row; align-items: center; gap: 6px; flex-wrap: nowrap; }
.islem-btn { display: inline-flex; justify-content: center; align-items: center; }
.islem-btn-box > .btn,
.islem-btn-box > a.btn { margin: 0 !important; }

/* ---------- Durum etiketleri (A / P ve diğer kısa durumlar) ---------- */
.durum-label,
.diger-label {
  display: inline-flex;
  justify-content: center;
  align-items: center;
  height: 26px;
  min-height: 26px;
  border-radius: 20px !important;
  border: 0 !important;
  font: 800 10.5px var(--mw-font) !important;
  letter-spacing: .3px;
  margin: 0;
  cursor: default;
  transform: none !important;
}
.durum-label { width: 26px; min-width: 26px; padding: 0 !important; }
.diger-label { width: auto; padding: 0 10px !important; gap: 5px; }
.diger-label:before { content: ""; width: 5px; height: 5px; border-radius: 50%; background: currentColor; }
.durum-label.label-success, .diger-label.label-success,
.durum-label.btn-success, .diger-label.btn-success { background: var(--mw-ok-bg) !important; color: var(--mw-ok) !important; }
.durum-label.btn-danger, .diger-label.btn-danger,
.durum-label.label-danger, .diger-label.label-danger { background: var(--mw-bad-bg) !important; color: var(--mw-bad) !important; }
.durum-label.btn-warning, .diger-label.btn-warning,
.durum-label.label-warning, .diger-label.label-warning { background: var(--mw-warn-bg) !important; color: var(--mw-warn) !important; }

/* Ekle/düzenle formundaki durum anahtarı */
.durum-switch-box { display: flex; align-items: center; }
.durum-switch-box .switchery { margin-top: 0 !important; margin-right: 0 !important; }
.durum-switch-box label { margin: 0 10px; }

/* ---------- Sipariş / sözleşme numarası ---------- */
.teklifNo-label {
  display: inline-block;
  color: var(--mw-accent);
  background: var(--mw-soft);
  border-radius: 10px;
  padding: 6px 12px;
  font: 800 18px var(--mw-font-head);
}

/* ---------- Açıklama ipucu (liste hücresi) ---------- */
.aciklama-tooltip { position: relative; cursor: pointer; color: var(--mw-accent); font-size: 20px; }
.aciklama-tooltip-hover {
  display: none;
  position: absolute;
  bottom: 26px;
  left: -40%;
  z-index: 1050;
  width: max-content;
  max-width: 300px;
  padding: 12px 14px;
  border-radius: 12px;
  background: rgba(22, 36, 60, .92);
  backdrop-filter: blur(8px);
  box-shadow: var(--mw-shadow-pop);
  color: #fff;
  font: 500 12.5px/1.55 var(--mw-font);
}
.aciklama-tooltip:hover > .aciklama-tooltip-hover { display: block; }

/* ---------- Cari hareket: ALACAK / BORÇ seçici ---------- */
.wrapperCariHareket {
  display: inline-flex;
  width: 100%;
  height: 42px;
  gap: 10px;
  align-items: stretch;
  background: transparent;
}
.wrapperCariHareket input[type="radio"] { display: none; }
.wrapperCariHareket .option {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  margin: 0;
  padding: 0 12px;
  border: 1px solid var(--mw-edge-input);
  border-radius: var(--mw-r-ctl);
  background: var(--mw-surface);
  cursor: pointer;
  transition: all .2s ease;
}
.wrapperCariHareket .option:hover { border-color: var(--mw-accent-focus); }
.wrapperCariHareket .option span { font: 700 12px var(--mw-font); color: var(--mw-text-2); letter-spacing: .3px; }
#option-1:checked ~ .option-1 { border-color: var(--mw-ok); background: var(--mw-ok-bg); box-shadow: 0 0 0 3px rgba(35, 131, 93, .10); }
#option-1:checked ~ .option-1 span { color: var(--mw-ok); }
#option-2:checked ~ .option-2 { border-color: var(--mw-bad); background: var(--mw-bad-bg); box-shadow: 0 0 0 3px rgba(182, 92, 80, .10); }
#option-2:checked ~ .option-2 span { color: var(--mw-bad); }

/* ---------- Küçük yardımcılar ---------- */
.thumb-120 { width: 120px; border-radius: 8px; }
.font-bold { font-weight: 600; }

/* ---------- Sözleşme ekle/düzenle: kalem satırları ---------- */
.page-sozlesmeAdd .order-row,
.page-sozlesmeEdit .order-row {
  border-bottom: 1px solid var(--mw-line);
  padding-bottom: 10px;
  margin-bottom: 10px;
}
.page-sozlesmeAdd .label-row,
.page-sozlesmeEdit .label-row {
  font-weight: 700;
  color: var(--mw-th);
  border-bottom: 2px solid var(--mw-edge);
  margin-bottom: 8px;
}

/* ---------- Sipariş ekle: çoklu seçimli alanlar yüksekliğe göre büyür ---------- */
.page-siparisAdd .select2-container--default.select2-container--focus .select2-selection--multiple,
.page-siparisAdd .select2-selection.select2-selection--multiple,
.page-siparisAdd .select2-container--default .select2-selection--single,
.page-siparisAdd .select2-container--default .select2-selection--single .select2-selection__rendered,
.page-siparisAdd .form-control:not(textarea) {
  height: auto !important;
  min-height: 42px !important;
}


/* ==========================================================================
   Ortak modal form bileşeni (mw-modal) – müşteri ekle/düzenle/sil
   ========================================================================== */
html.mw-modal-lock, html.mw-modal-lock body { overflow: hidden; }
.mw-modal {
  position: fixed;
  inset: 0;
  z-index: 2100;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 18px;
  visibility: hidden;
  pointer-events: none;
}
.mw-modal.is-open { visibility: visible; pointer-events: auto; }
.mw-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(13, 27, 48, .62);
  backdrop-filter: blur(5px);
  opacity: 0;
  transition: opacity .2s ease;
}
.mw-modal.is-open .mw-modal-backdrop { opacity: 1; }
.mw-modal-dialog {
  position: relative;
  width: min(580px, 100%);
  max-height: calc(100vh - 36px);
  display: flex;
  flex-direction: column;
  margin: 0;
  background: #fff;
  border: 1px solid #d7e1ee;
  border-radius: 19px;
  box-shadow: 0 25px 75px rgba(9, 25, 49, .32);
  overflow: hidden;
  opacity: 0;
  transform: translateY(-10px) scale(.98);
  transition: opacity .2s ease, transform .22s cubic-bezier(.2, .8, .2, 1);
}
.mw-modal.is-open .mw-modal-dialog { opacity: 1; transform: none; }
.mw-modal-dialog.mw-modal-sm { width: min(440px, 100%); }
.mw-modal-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 18px 20px 15px;
  border-bottom: 1px solid #e1e8f1;
}
.mw-modal-top h3 { margin: 0; font: 800 16px var(--mw-font); color: var(--mw-accent); }
.mw-modal-subtitle { display: block; margin-top: 5px; color: #8290a1; font-size: 11px; }
.mw-modal-close {
  width: 30px;
  height: 30px;
  border: 0;
  border-radius: 9px;
  background: transparent;
  color: #8996a7;
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
}
.mw-modal-close:hover { background: #edf2f8; color: var(--mw-accent); }
.mw-modal-body { padding: 17px 19px 15px; overflow-y: auto; }
.mw-modal-foot {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  padding: 13px 19px;
  background: #f7f9fc;
  border-top: 1px solid #e1e8f1;
}
.mw-modal-foot .btn { min-width: 110px; }
.mw-modal-foot .btn.is-loading { pointer-events: none; opacity: .8; }
.mw-modal-foot .btn.is-loading i { animation: mwSpin .8s linear infinite; }
.mw-modal-foot .btn.is-loading i:before { content: "\f110"; }
@keyframes mwSpin { to { transform: rotate(360deg); } }

.mw-modal-alert {
  margin-bottom: 14px;
  padding: 11px 14px;
  border-radius: 10px;
  border: 1px solid #f2d5d0;
  border-left: 4px solid var(--mw-bad);
  background: var(--mw-bad-bg);
  color: #9a4a40;
  font-size: 12.5px;
  font-weight: 600;
}

.mw-form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 13px 12px; }
.mw-field.full { grid-column: 1 / -1; }
.mw-field label {
  display: block;
  margin: 0 0 6px;
  color: #65758b;
  font: 700 10px var(--mw-font);
  letter-spacing: .35px;
}
.mw-field input:not([type="checkbox"]),
.mw-field select,
.mw-field textarea {
  width: 100%;
  height: 42px;
  padding: 10px 11px;
  border: 1px solid #d4e0e9;
  border-radius: 8px;
  background: #fff;
  color: var(--mw-text);
  font: 12px var(--mw-font);
  outline: 0;
  transition: border-color .15s, box-shadow .15s;
}
.mw-field textarea { height: auto; min-height: 58px; resize: vertical; }
.mw-field input:focus, .mw-field select:focus, .mw-field textarea:focus {
  border-color: var(--mw-accent-focus);
  box-shadow: var(--mw-ring);
}
.mw-field.has-error input, .mw-field.has-error textarea { border-color: var(--mw-bad); }
.mw-field .mw-field-error { display: block; margin-top: 5px; color: var(--mw-bad); font-size: 11px; font-weight: 600; }
.mw-modal.is-readonly .mw-field input,
.mw-modal.is-readonly .mw-field textarea { background: #f6f8fb; }

.mw-status-field { display: flex; align-items: center; gap: 11px; padding-top: 2px; }
.mw-status-caption { font-size: 11.5px; color: #68788b; }
.mw-switch {
  position: relative;
  display: inline-flex !important;
  align-items: center;
  gap: 8px;
  margin: 0 !important;
  cursor: pointer;
  font-size: 11.5px !important;
  letter-spacing: 0 !important;
  color: var(--mw-accent) !important;
}
.mw-switch input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.mw-switch-track {
  position: relative;
  flex: none;
  width: 34px;
  height: 20px;
  border-radius: 20px;
  background: #c0564a;
  transition: background .2s;
}
.mw-switch-track:after {
  content: "";
  position: absolute;
  top: 3px;
  left: 3px;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: #fff;
  transition: transform .2s;
}
.mw-switch input:checked + .mw-switch-track { background: var(--mw-accent); }
.mw-switch input:checked + .mw-switch-track:after { transform: translateX(14px); }
.mw-switch input:focus-visible + .mw-switch-track { box-shadow: var(--mw-ring); }
.mw-switch b { font-size: 12px; color: var(--mw-bad); }
.mw-switch input:checked ~ b { color: var(--mw-accent); }
.mw-delete-text { margin: 0; color: var(--mw-text-2); font-size: 13px; line-height: 1.6; }

/* Kaydedilen / güncellenen satırı kısa süre vurgula */
@keyframes mwRowFlash { from { background: #e3ecf8; } to { background: transparent; } }
table.dataTable tbody tr.mw-flash > td { animation: mwRowFlash 1.6s ease; }

/* Bildirimler */
.mw-toast-stack {
  position: fixed;
  right: 22px;
  bottom: 22px;
  z-index: 2200;
  display: flex;
  flex-direction: column;
  gap: 8px;
  pointer-events: none;
}
.mw-toast {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 260px;
  max-width: 380px;
  padding: 12px 16px;
  border-radius: 12px;
  background: #fff;
  border: 1px solid var(--mw-edge);
  border-left: 4px solid var(--mw-ok);
  box-shadow: var(--mw-shadow-pop);
  color: var(--mw-text);
  font: 600 12.5px var(--mw-font);
  pointer-events: auto;
  animation: mwToastIn .22s ease;
}
.mw-toast i { color: var(--mw-ok); font-size: 15px; }
.mw-toast.is-error { border-left-color: var(--mw-bad); }
.mw-toast.is-error i { color: var(--mw-bad); }
.mw-toast.is-hiding { opacity: 0; transform: translateY(6px); transition: .25s; }
@keyframes mwToastIn { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }

@media (max-width: 560px) {
  .mw-form-grid { grid-template-columns: 1fr; }
  .mw-field.full { grid-column: auto; }
  .mw-modal { padding: 10px; align-items: flex-end; }
  .mw-toast-stack { left: 12px; right: 12px; bottom: 12px; }
  .mw-toast { max-width: none; }
}

/* Yarım genişlikteki durum alanı, yanındaki input ile aynı hizada dursun */
.mw-form-grid .mw-status-field:not(.full) { align-self: end; height: 42px; }
