/* Maliyyə səhifəsi — premium v1 (geri qaytarmaq üçün bu blok və .maliyye-filters / .maliyye-header-sub silinə bilər) */
#maliyye,
#xkLocalPage {
  --primary: #0f766e;
  --primary-hover: #115e59;
  --accent: #d97706;
  --accent-glow: rgba(217, 119, 6, 0.22);
  --bg: #eef2f6;
  --bg-mesh: radial-gradient(1200px 600px at 10% -10%, rgba(15, 118, 110, 0.09), transparent 55%),
    radial-gradient(900px 500px at 100% 0%, rgba(217, 119, 6, 0.07), transparent 50%),
    linear-gradient(180deg, #f1f5f9 0%, #e8edf3 48%, #eef2f6 100%);
  --card-bg: #ffffff;
  --text: #0c1222;
  --text-light: #5c6578;
  --border: #e2e8f0;
  --shadow: 0 4px 6px -1px rgba(15, 23, 42, 0.07);
  --shadow-card: 0 1px 2px rgba(15, 23, 42, 0.04), 0 18px 48px -20px rgba(15, 23, 42, 0.14);
  --radius: 14px;
  --transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);

  font-family: "Inter", ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  font-feature-settings: "tnum" 1, "lnum" 1;
  background: var(--bg-mesh);
  background-color: var(--bg);
  padding: clamp(1rem, 3vw, 2rem);
  min-height: 100vh;
  color: var(--text);
  box-sizing: border-box;
}

/* Ekspeditor modal — sakit tamamlama pəncərəsi: başlıq / scroll məzmun / sabit footer */
#expeditorModal.expeditor-modal-root,
#expeditorModal {
  backdrop-filter: blur(4px);
  background: rgba(15, 23, 42, 0.38);
  align-items: center;
  justify-content: center;
  padding: 12px;
  box-sizing: border-box;
  overflow: hidden;
}

#expeditorModal .modal-content.expeditor-modal-card {
  width: min(560px, calc(100vw - 24px));
  max-width: 560px;
  max-height: 90vh;
  height: auto;
  align-self: flex-start;
  margin: 0;
  padding: 0;
  border: 1px solid #e2e8f0;
  border-radius: 14px;
  box-shadow: 0 20px 50px rgba(15, 23, 42, 0.12);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  min-height: 0;
  background: #ffffff;
}

#expeditorModal .expeditor-modal-header {
  flex-shrink: 0;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
  padding: 12px 14px 10px;
  border-bottom: 1px solid #eef2f6;
  background: #fafbfc;
}

#expeditorModal .expeditor-modal-kicker {
  font-size: 11px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #64748b;
  font-weight: 600;
  margin: 0 0 8px;
}

#expeditorModal .expeditor-modal-title-wrap h3 {
  margin: 0 0 6px;
  font-size: 17px;
  line-height: 1.25;
  font-weight: 700;
  color: #0f172a;
  overflow-wrap: anywhere;
  word-break: break-word;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

#expeditorModal .expeditor-modal-heading-expeditor {
  font-weight: 700;
  color: #0f172a;
}

#expeditorModal .expeditor-modal-heading-main {
  display: inline;
}

#expeditorModal .expeditor-modal-copy-kesr-btn {
  flex-shrink: 0;
  width: 30px;
  height: 30px;
  min-width: 30px;
  min-height: 30px;
  border-radius: 8px;
  border: 1px solid #cbd5e1;
  background: #fff;
  color: #334155;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  transition: background-color 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

#expeditorModal .expeditor-modal-copy-kesr-btn i {
  font-size: 12px;
  line-height: 1;
}

#expeditorModal .expeditor-modal-copy-kesr-btn:hover {
  background: #f1f5f9;
  border-color: #94a3b8;
  color: #0f172a;
}

#expeditorModal .expeditor-modal-close {
  flex-shrink: 0;
  width: 32px;
  height: 32px;
  border-radius: 8px;
  border: 1px solid #e2e8f0;
  background: #fff;
  color: #475569;
  font-size: 20px;
  font-weight: 400;
  line-height: 1;
  cursor: pointer;
  transition: background-color 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

#expeditorModal .expeditor-modal-close:hover {
  background: #f1f5f9;
  border-color: #cbd5e1;
  color: #0f172a;
}

/* Böyüməsin: qısa məzmunda modal altında boş “quyu” qalmasın; uzun məzmunda scroll */
#expeditorModal .expeditor-modal-scroll {
  flex: 0 1 auto;
  min-height: 0;
  max-height: calc(90vh - 200px);
  overflow-y: auto;
  overflow-x: hidden;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
}

#expeditorModal .expeditor-modal-body {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 12px 14px;
}

#expeditorModal .expeditor-block {
  padding: 10px 12px;
  border: 1px solid #e8ecf1;
  border-radius: 10px;
  background: #fafbfc;
}

#expeditorModal .expeditor-block-title {
  margin: 0 0 12px;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  color: #475569;
}

#expeditorModal .expeditor-block--note .expeditor-block-title--inline {
  color: #7f1d1d;
}

#expeditorModal .expeditor-block-title--inline {
  margin: 0;
  text-transform: none;
  font-size: 13px;
  font-weight: 600;
  color: #334155;
  letter-spacing: 0;
}

#expeditorModal .expeditor-label {
  display: block;
  margin: 0 0 8px;
  font-size: 13px;
  font-weight: 600;
  color: #475569;
}

#expeditorModal .expeditor-visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

#expeditorModal select {
  width: 100%;
  padding: 10px 12px;
  margin: 0;
  border: 1px solid #cbd5e1;
  border-radius: 10px;
  background: #fff;
  color: #0f172a;
  font-size: 14px;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

#expeditorModal select:focus {
  outline: none;
  border-color: #3b82f6;
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.22);
}

#expeditorModal .expeditor-note-input:focus {
  outline: none;
  border-color: #dc2626;
  box-shadow: 0 0 0 3px rgba(220, 38, 38, 0.22);
}

#expeditorModal .expeditor-block--kassa .expeditor-table-wrap {
  margin: 0;
  padding: 0;
  border: none;
  border-radius: 8px;
  background: #fff;
  overflow-x: auto;
}

/* Kassir başlığı: canlı narıncı (.kv-table th boz fonundan üstün) */
#expeditorModal #smenKassaList .smen-kassa-head-row th {
  padding: 6px 8px;
  text-align: left;
  vertical-align: middle;
  background: linear-gradient(180deg, #fb923c 0%, #ea580c 55%, #c2410c 100%) !important;
  border: 1px solid #9a3412 !important;
  border-bottom: 1px solid #7c2d12 !important;
}

#expeditorModal #smenKassaList .smen-kassa-head-inner {
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  width: 100%;
}

#expeditorModal #smenKassaList .smen-kassa-head-title {
  flex: 1 1 auto;
  min-width: 0;
  font-weight: 700;
  font-size: 13px;
  color: #0f172a !important;
  line-height: 1.3;
  text-align: left;
}

#expeditorModal #smenKassaList .smen-kassa-head-row .smen-kassa-btn--icon-only {
  background: rgba(255, 255, 255, 0.95) !important;
  border-color: rgba(127, 29, 29, 0.45) !important;
  color: #b91c1c !important;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.12);
}

#expeditorModal #smenKassaList .smen-kassa-head-row .smen-kassa-btn--icon-only:hover {
  background: #fff !important;
  border-color: #991b1b !important;
}

#expeditorModal #smenKassaList button.smen-kassa-btn--icon-only {
  flex-shrink: 0;
  padding: 6px 10px;
  min-height: 30px;
  min-width: 36px;
  font-size: 13px;
}

#expeditorModal #smenKassaList button.smen-kassa-btn--icon-only i {
  pointer-events: none;
  line-height: 1;
}

/* Smena/kassa cədvəli: sıxılmış sətirlər */
#expeditorModal #smenKassaList table.kv-table tbody td {
  padding: 3px 8px;
  font-size: 12px;
  line-height: 1.15;
}

/* Kassir cədvəlində əməkdaş qeydi: açıq qırmızı fon + qırmızı məxəz çərçivə, mətn bold */
#expeditorModal #smenKassaList tr.smen-kassa-qeyd-row td {
  padding: 6px 8px !important;
  line-height: 1.25;
  vertical-align: top;
  background: #ffe4e6;
  border-top: 2px dashed #dc2626;
  border-bottom: 2px dashed #dc2626;
  font-size: 12px;
  font-weight: 700;
  color: #7f1d1d;
}

#expeditorModal #smenKassaList tr.smen-kassa-qeyd-row td:first-child {
  border-left: 2px dashed #dc2626;
  border-radius: 8px 0 0 8px;
}

#expeditorModal #smenKassaList tr.smen-kassa-qeyd-row td:last-child {
  border-right: 2px dashed #dc2626;
  border-radius: 0 8px 8px 0;
  min-height: 2.6em;
}

/* Smena/kassa: Hesabla sətri mərkəzdə */
#expeditorModal #smenKassaList .smen-kassa-actions {
  display: flex;
  flex-direction: row;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  justify-content: center;
  padding: 4px 0;
}

#expeditorModal #smenKassaList button.smen-kassa-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  padding: 5px 12px;
  min-height: 28px;
  width: auto;
  max-width: none;
  font-size: 11px;
  font-weight: 600;
  line-height: 1.2;
  letter-spacing: 0.02em;
  border-radius: 8px;
  border: 1px solid transparent;
  margin: 0;
  cursor: pointer;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.06);
  transition: background-color 0.15s ease, border-color 0.15s ease, color 0.15s ease,
    box-shadow 0.15s ease;
}

#expeditorModal #smenKassaList button.smen-kassa-btn:hover {
  transform: none;
  box-shadow: 0 2px 6px rgba(15, 23, 42, 0.08);
}

#expeditorModal #smenKassaList button.smen-kassa-btn--calc {
  color: #1e3a8a;
  background: linear-gradient(180deg, #f8fafc 0%, #eff6ff 100%);
  border-width: 1px;
  border-style: solid;
  border-color: #93c5fd;
  min-width: 140px;
  padding: 5px 18px;
  min-height: 0;
  height: auto;
  font-size: 12px;
  line-height: 1.2;
}

#expeditorModal #smenKassaList button.smen-kassa-btn--calc:hover {
  color: #1d4ed8;
  background: #e0f2fe;
  border-color: #3b82f6;
}

#expeditorModal #smenKassaList button.smen-kassa-btn--delete {
  color: #991b1b;
  background: linear-gradient(180deg, #fffafa 0%, #fff1f2 100%);
  border-color: #fecdd3;
}

#expeditorModal #smenKassaList button.smen-kassa-btn--delete:hover {
  color: #7f1d1d;
  background: #ffe4e6;
  border-color: #fda4af;
}

#expeditorModal .expeditor-block--note {
  background: linear-gradient(180deg, #fffafa 0%, #fff5f5 100%);
  border: 4px solid #dc2626;
  border-radius: 12px;
  box-shadow: 0 0 0 1px rgba(220, 38, 38, 0.12), 0 8px 24px rgba(220, 38, 38, 0.08);
  padding: 12px 14px;
}

#expeditorModal .expeditor-note-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 8px;
}

#expeditorModal .expeditor-note-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 4px 10px;
  border-radius: 999px;
  border: 1px solid #b91c1c;
  background: #dc2626;
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.03em;
  text-transform: uppercase;
}

#expeditorModal .expeditor-note-hint {
  margin: 0 0 12px;
  font-size: 12px;
  line-height: 1.5;
  color: #991b1b;
}

#expeditorModal .expeditor-note-input {
  width: 100%;
  min-height: 100px;
  padding: 12px;
  border: 2px solid #f87171;
  border-radius: 10px;
  background: #fff;
  color: #0f172a;
  font-size: 14px;
  line-height: 1.45;
  resize: vertical;
  box-sizing: border-box;
}

#expeditorModal .expeditor-status-box {
  display: none;
  padding: 12px;
  border-radius: 10px;
  border: 1px solid #dbeafe;
  background: #f8fafc;
  color: #1e40af;
  font-size: 13px;
  line-height: 1.45;
  font-weight: 500;
}

#expeditorModal .expeditor-status-box:not(:empty) {
  display: block;
}

@keyframes expeditorProbKompPulse {
  0% {
    border-color: #2563eb;
    box-shadow: 0 0 0 0 rgba(37, 99, 235, 0.5), 0 6px 22px rgba(59, 130, 246, 0.28);
  }
  35% {
    border-color: #7c3aed;
    box-shadow: 0 0 0 8px rgba(124, 58, 237, 0.12), 0 8px 26px rgba(124, 58, 237, 0.22);
  }
  65% {
    border-color: #0891b2;
    box-shadow: 0 0 0 5px rgba(6, 182, 212, 0.15), 0 6px 22px rgba(8, 145, 178, 0.2);
  }
  100% {
    border-color: #93c5fd;
    box-shadow: 0 0 0 0 transparent, 0 2px 10px rgba(59, 130, 246, 0.1);
  }
}

#expeditorModal #probKompResult.expeditor-prob-komp--pulse {
  animation: expeditorProbKompPulse 1s ease-in-out 2;
  border-width: 2px;
}

#expeditorModal .expeditor-modal-footer {
  flex-shrink: 0;
  padding: 8px 12px 8px;
  margin-top: 0;
  border-top: 1px solid #eef2f6;
  background: #fff;
  box-shadow: 0 -2px 14px rgba(15, 23, 42, 0.05);
  display: flex;
  flex-direction: column;
  gap: 6px;
}

/* 1-ci sətir: Yadda saxla | Uyğunluğa bax */
#expeditorModal .expeditor-footer-row--primary {
  display: flex;
  flex-direction: row;
  flex-wrap: nowrap;
  align-items: stretch;
  gap: 8px;
}

#expeditorModal .expeditor-footer-row--primary .expeditor-btn {
  flex: 1 1 0;
  min-width: 0;
}

/* 2-ci və 3-cü sətirlər: tək utility düymə */
#expeditorModal .expeditor-footer-row--utility {
  display: flex;
  flex-direction: row;
}

#expeditorModal .expeditor-footer-row--utility .expeditor-btn {
  flex: 1 1 auto;
  width: 100%;
}

#expeditorModal .modal-content .expeditor-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin: 0;
  border-radius: 10px;
  cursor: pointer;
  text-align: center;
  font-family: inherit;
  transition: background-color 0.15s ease, border-color 0.15s ease, color 0.15s ease,
    box-shadow 0.15s ease, transform 0.12s ease;
}

#expeditorModal .modal-content .expeditor-btn:active {
  transform: translateY(0);
}

#expeditorModal .modal-content .expeditor-btn:hover {
  transform: translateY(-1px);
}

#expeditorModal .modal-content .expeditor-btn-primary {
  min-height: 38px;
  padding: 0 18px;
  font-size: 13px;
  font-weight: 600;
  border: 1px solid #0f766e;
  background: linear-gradient(180deg, #14b8a6 0%, #0d9488 100%);
  color: #fff;
  box-shadow: 0 2px 8px rgba(13, 148, 136, 0.35);
}

#expeditorModal .modal-content .expeditor-btn-primary:hover {
  background: linear-gradient(180deg, #0d9488 0%, #0f766e 100%);
  border-color: #0f766e;
  box-shadow: 0 4px 14px rgba(13, 148, 136, 0.4);
}

#expeditorModal .modal-content .expeditor-btn-secondary {
  min-height: 38px;
  padding: 0 16px;
  font-size: 13px;
  font-weight: 600;
  border: 1px solid #fdba74;
  background: linear-gradient(180deg, #fffbeb 0%, #ffedd5 100%);
  color: #c2410c;
  box-shadow: 0 1px 4px rgba(251, 146, 60, 0.2);
}

#expeditorModal .modal-content .expeditor-btn-secondary:hover {
  background: linear-gradient(180deg, #ffedd5 0%, #fed7aa 100%);
  border-color: #fb923c;
  color: #9a3412;
}

#expeditorModal .modal-content .expeditor-btn-utility {
  min-height: 32px;
  padding: 0 11px;
  font-size: 12px;
  font-weight: 600;
  border: 1px solid #cbd5e1;
  background: #f8fafc;
  color: #475569;
}

#expeditorModal .modal-content .expeditor-btn-utility--hesabla {
  border-color: #93c5fd;
  background: linear-gradient(180deg, #eff6ff 0%, #dbeafe 100%);
  color: #1d4ed8;
  box-shadow: 0 1px 4px rgba(59, 130, 246, 0.15);
}

#expeditorModal .modal-content .expeditor-btn-utility--hesabla:hover {
  background: linear-gradient(180deg, #dbeafe 0%, #bfdbfe 100%);
  border-color: #3b82f6;
  color: #1e40af;
}

#expeditorModal .modal-content .expeditor-btn-utility--yadda {
  border-color: #fda4af;
  background: linear-gradient(180deg, #fff1f2 0%, #ffe4e6 100%);
  color: #be123c;
  box-shadow: 0 1px 4px rgba(244, 63, 94, 0.12);
}

#expeditorModal .modal-content .expeditor-btn-utility--yadda:hover {
  background: linear-gradient(180deg, #ffe4e6 0%, #fecdd3 100%);
  border-color: #fb7185;
  color: #9f1239;
}

#expeditorModal .expeditor-modal-footer .expeditor-btn-primary,
#expeditorModal .expeditor-modal-footer .expeditor-btn-secondary {
  min-height: 36px;
  padding: 0 12px;
  font-size: 12px;
  font-weight: 800;
  white-space: normal;
  text-align: center;
  line-height: 1.25;
}

#expeditorModal .expeditor-modal-footer .expeditor-btn-utility,
#expeditorModal .expeditor-modal-footer .expeditor-btn-utility--hesabla,
#expeditorModal .expeditor-modal-footer .expeditor-btn-utility--yadda {
  min-height: 34px;
  padding: 0 12px;
  font-size: 12px;
  font-weight: 800;
  white-space: normal;
  text-align: center;
  line-height: 1.25;
}

/* Footer: qalın qara yazı, qara çərçivə, tünd fon */
#expeditorModal .expeditor-modal-footer .expeditor-btn {
  border-width: 2px !important;
  border-style: solid !important;
  border-color: #0f172a !important;
  color: #000000 !important;
  font-weight: 800 !important;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.12);
}

#expeditorModal .expeditor-modal-footer .expeditor-btn:hover {
  border-color: #000000 !important;
  color: #000000 !important;
}

#expeditorModal .expeditor-modal-footer .expeditor-btn-primary {
  background: linear-gradient(180deg, #5eead4 0%, #2dd4bf 100%) !important;
}

#expeditorModal .expeditor-modal-footer .expeditor-btn-primary:hover {
  background: linear-gradient(180deg, #2dd4bf 0%, #14b8a6 100%) !important;
}

#expeditorModal .expeditor-modal-footer .expeditor-btn-secondary {
  background: linear-gradient(180deg, #fcd34d 0%, #f59e0b 100%) !important;
}

#expeditorModal .expeditor-modal-footer .expeditor-btn-secondary:hover {
  background: linear-gradient(180deg, #fbbf24 0%, #d97706 100%) !important;
}

#expeditorModal .expeditor-modal-footer .expeditor-btn-utility--hesabla {
  background: linear-gradient(180deg, #7dd3fc 0%, #0ea5e9 100%) !important;
}

#expeditorModal .expeditor-modal-footer .expeditor-btn-utility--hesabla:hover {
  background: linear-gradient(180deg, #38bdf8 0%, #0284c7 100%) !important;
}

#expeditorModal .expeditor-modal-footer .expeditor-btn-utility--yadda {
  background: linear-gradient(180deg, #f9a8d4 0%, #ec4899 100%) !important;
}

#expeditorModal .expeditor-modal-footer .expeditor-btn-utility--yadda:hover {
  background: linear-gradient(180deg, #f472b6 0%, #db2777 100%) !important;
}

@media (max-width: 768px) {
  #expeditorModal .modal-content.expeditor-modal-card {
    width: 100%;
    max-height: 92vh;
    border-radius: 14px;
  }

  #expeditorModal .expeditor-modal-scroll {
    max-height: calc(92vh - 200px);
  }

  #expeditorModal .expeditor-modal-header,
  #expeditorModal .expeditor-modal-body,
  #expeditorModal .expeditor-modal-footer {
    padding-left: 12px;
    padding-right: 12px;
  }

  #expeditorModal .expeditor-modal-body {
    padding-top: 12px;
    padding-bottom: 12px;
  }

  #expeditorModal .expeditor-modal-title-wrap h3 {
    font-size: 16px;
  }

}

#maliyye .maliyye-container,
#xkLocalPage .maliyye-container {
  max-width: 1400px;
  margin: 0 auto;
  background: var(--card-bg);
  border-radius: var(--radius);
  box-shadow: var(--shadow-card);
  overflow: hidden;
  border: 1px solid rgba(15, 23, 42, 0.06);
}

#maliyye .maliyye-header,
#xkLocalPage .maliyye-header {
  padding: 1.5rem 2rem 1.35rem;
  border-bottom: 1px solid rgba(15, 23, 42, 0.06);
  background: linear-gradient(180deg, #ffffff 0%, #f8fafc 100%);
  position: relative;
}

#maliyye .maliyye-header::after,
#xkLocalPage .maliyye-header::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--primary) 0%, var(--accent) 55%, rgba(217, 119, 6, 0.35) 100%);
  opacity: 0.85;
}

#maliyye .maliyye-header h2,
#xkLocalPage .maliyye-header h2 {
  margin: 0;
  font-size: clamp(1.35rem, 2.5vw, 1.75rem);
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--text);
  display: flex;
  align-items: center;
  gap: 0.85rem;
}

#maliyye .maliyye-header h2::before,
#xkLocalPage .maliyye-header h2::before {
  display: none;
}

#maliyye .maliyye-header h2 i,
#xkLocalPage .maliyye-header h2 i {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.65rem;
  height: 2.65rem;
  border-radius: 12px;
  font-size: 1.15rem;
  color: #fff;
  background: linear-gradient(145deg, #f59e0b 0%, #c2410c 100%);
  box-shadow: 0 6px 20px var(--accent-glow);
}

#maliyye .maliyye-header-sub,
#xkLocalPage .maliyye-header-sub {
  margin: 0.55rem 0 0;
  padding-left: calc(2.65rem + 0.85rem);
  font-size: 0.875rem;
  line-height: 1.45;
  color: var(--text-light);
  font-weight: 500;
  max-width: 42rem;
}

@media (max-width: 520px) {
  #maliyye .maliyye-header-sub,
  #xkLocalPage .maliyye-header-sub {
    padding-left: 0;
    margin-top: 0.75rem;
  }
}

#maliyye .maliyye-content,
#xkLocalPage .maliyye-content {
  padding: 2rem;
}

#maliyye .maliyye-filters,
#xkLocalPage .maliyye-filters {
  padding: 1.35rem 1.5rem 1.5rem;
  border-radius: 12px;
  border: 1px solid rgba(15, 23, 42, 0.06);
  background: linear-gradient(180deg, #ffffff 0%, #fafbfc 100%);
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.04);
  margin-bottom: 1.5rem;
}

/* Form Elements */
#maliyye .form-grid,
#xkLocalPage .form-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1.25rem;
  margin-bottom: 0;
}

#maliyye .form-group,
#xkLocalPage .form-group {
  margin-bottom: 0;
}

#maliyye label,
#xkLocalPage .maliyye-content label {
  display: block;
  font-size: 0.8125rem;
  font-weight: 600;
  letter-spacing: 0.01em;
  color: var(--text-light);
  margin-bottom: 0.5rem;
  transition: var(--transition);
}

#maliyye input[type="text"],
#maliyye input[type="date"],
#xkLocalPage .maliyye-content input[type="text"],
#xkLocalPage .maliyye-content input[type="date"] {
  width: 100%;
  padding: 0.7rem 0.95rem;
  font-size: 0.9375rem;
  font-variant-numeric: tabular-nums;
  color: var(--text);
  background: #fff;
  border: 1px solid rgba(15, 23, 42, 0.1);
  border-radius: 10px;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
  box-shadow: inset 0 1px 2px rgba(15, 23, 42, 0.04);
  margin: 0;
}

#maliyye input[type="text"]:focus,
#maliyye input[type="date"]:focus,
#xkLocalPage .maliyye-content input[type="text"]:focus,
#xkLocalPage .maliyye-content input[type="date"]:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(15, 118, 110, 0.2);
}

#maliyye .form-actions,
#xkLocalPage .form-actions {
  display: flex;
  justify-content: flex-end;
  gap: 1rem;
  margin-top: 1.35rem;
  padding-top: 1.25rem;
  border-top: 1px solid rgba(15, 23, 42, 0.06);
}

/* Yalnız əsas məzmun: modal/overlay düymələri (#maliyyeAvtoModal və s.) daxil deyil */
#maliyye .maliyye-container button,
#xkLocalPage button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.7rem 1.35rem;
  font-size: 0.9rem;
  font-weight: 600;
  color: #fff;
  background: linear-gradient(180deg, #14b8a6 0%, #0d9488 52%, #0f766e 100%);
  border: 1px solid rgba(15, 77, 72, 0.35);
  border-radius: 10px;
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.15s ease, filter 0.15s ease;
  box-shadow: 0 2px 8px rgba(15, 118, 110, 0.28);
  margin: 0;
}

#maliyye .maliyye-container button:hover,
#xkLocalPage button:hover {
  background: linear-gradient(180deg, #0d9488 0%, #0f766e 100%);
  filter: brightness(1.03);
  transform: translateY(-1px);
  box-shadow: 0 6px 18px rgba(15, 118, 110, 0.32);
}

#maliyye .maliyye-container button:active,
#xkLocalPage button:active {
  transform: translateY(0);
}

/* Loading State */
#maliyyeLoading {
  display: none;
  align-items: center;
  justify-content: center;
  padding: 1.35rem 1.5rem;
  background: linear-gradient(180deg, #f8fafc 0%, #f1f5f9 100%);
  border-radius: 12px;
  margin: 0 0 1rem;
  color: var(--text-light);
  font-weight: 600;
  font-size: 0.9rem;
  gap: 0.75rem;
  border: 1px solid rgba(15, 23, 42, 0.08);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.8);
}

#maliyyeLoading i {
  animation: spin 1s linear infinite;
  color: var(--primary);
}

@keyframes spin {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

/* Results */
#maliyyeResult {
  margin-top: 0.5rem;
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid rgba(15, 23, 42, 0.08);
  box-shadow: var(--shadow-card);
  background: var(--card-bg);
}

/* Yalnız Maliyyə nəticəsindəki cədvəllər — digər səhifələrə toxunmur */
#maliyye #maliyyeResult .kv-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  font-size: 13px;
  font-variant-numeric: tabular-nums;
  background: #fff;
  border: none;
  border-radius: 0;
}

#maliyye #maliyyeResult .kv-table thead th {
  position: sticky;
  top: 0;
  z-index: 1;
  background: linear-gradient(180deg, #f8fafc 0%, #f1f5f9 100%);
  color: var(--text);
  font-weight: 700;
  font-size: 12px;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  padding: 11px 10px;
  border-bottom: 2px solid rgba(15, 23, 42, 0.08);
  border-right: 1px solid rgba(15, 23, 42, 0.06);
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.9) inset;
}

#maliyye #maliyyeResult .kv-table thead th:last-child {
  border-right: none;
}

#maliyye #maliyyeResult .kv-table tbody td {
  padding: 10px 10px;
  border-bottom: 1px solid rgba(15, 23, 42, 0.06);
  border-right: 1px solid rgba(15, 23, 42, 0.04);
  vertical-align: middle;
}

#maliyye #maliyyeResult .kv-table tbody td:last-child {
  border-right: none;
}

#maliyye #maliyyeResult .kv-table tbody tr:nth-child(even) {
  background: rgba(248, 250, 252, 0.65);
}

#maliyye #maliyyeResult .kv-table tbody tr:hover {
  background: rgba(204, 251, 241, 0.35);
}

/* Kontekst menyusu — yumşaq, müasir (Maliyyə #contextMenu) */
.context-menu {
  display: none;
  position: fixed;
  z-index: 10000;
  min-width: 156px;
  width: max-content;
  max-width: min(240px, calc(100vw - 16px));
  padding: 6px;
  margin: 0;
  list-style: none;
  background: rgba(255, 255, 255, 0.94);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(15, 23, 42, 0.08);
  border-radius: 12px;
  box-shadow:
    0 4px 6px -1px rgba(15, 23, 42, 0.06),
    0 12px 28px -8px rgba(15, 23, 42, 0.14);
  animation: contextMenuIn 0.14s ease-out;
  box-sizing: border-box;
}

@keyframes contextMenuIn {
  from {
    opacity: 0;
    transform: translateY(-4px) scale(0.98);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.context-menu > button,
.context-menu-item {
  display: flex;
  justify-content: flex-start;
  align-items: center;
  gap: 10px;
  padding: 8px 10px !important;
  min-height: 36px;
  border: 0 !important;
  border-radius: 8px;
  margin: 0 0 2px !important;
  width: 100%;
  box-sizing: border-box;
  white-space: nowrap;
  text-align: left !important;
  font-family: inherit;
  font-size: 13px !important;
  font-weight: 500 !important;
  line-height: 1.25;
  letter-spacing: 0.01em;
  color: #334155 !important;
  background: transparent !important;
  cursor: pointer;
  transition: background-color 0.12s ease, color 0.12s ease;
}

.context-menu > button:last-child,
.context-menu-item:last-child {
  margin-bottom: 0 !important;
}

.context-menu > button[hidden],
.context-menu-item[hidden] {
  display: none !important;
}

.context-menu-item i {
  flex-shrink: 0;
  width: 1.1rem;
  text-align: center;
  font-size: 0.95rem;
  opacity: 0.88;
}

.maliyye-uygunluq-ctx-menu {
  z-index: 14030;
  min-width: 130px;
}

.maliyye-kimler-overlay {
  position: fixed;
  inset: 0;
  z-index: 14040;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 16px;
  box-sizing: border-box;
  background: rgba(15, 23, 42, 0.35);
  backdrop-filter: blur(5px);
  -webkit-backdrop-filter: blur(5px);
}

.maliyye-kimler-card {
  width: min(760px, 100%);
  max-height: min(88vh, 680px);
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 14px 16px;
  border-radius: 14px;
  border: 1px solid #dbe2ea;
  background: linear-gradient(180deg, #fff 0%, #f8fafc 100%);
  box-shadow: 0 24px 64px rgba(15, 23, 42, 0.18);
}

.maliyye-kimler-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 8px;
}

.maliyye-kimler-kicker {
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #64748b;
}

.maliyye-kimler-title {
  margin: 2px 0 0;
  font-size: 1rem;
  color: #0f172a;
}

.maliyye-kimler-x {
  width: 34px;
  height: 34px;
  border: 1px solid #dbe2ea;
  border-radius: 8px;
  background: #fff;
  color: #475569;
  font-size: 20px;
  cursor: pointer;
}

.maliyye-kimler-meta {
  font-size: 12px;
  color: #334155;
}

.maliyye-kimler-body {
  overflow: auto;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  background: #fff;
}

.maliyye-kimler-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 12px;
}

.maliyye-kimler-table th,
.maliyye-kimler-table td {
  padding: 8px 10px;
  border-bottom: 1px solid #eef2f7;
  text-align: left;
}

.maliyye-kimler-table th {
  position: sticky;
  top: 0;
  z-index: 1;
  background: #f8fafc;
}

.maliyye-kimler-table .num {
  text-align: right;
  font-variant-numeric: tabular-nums;
}

.maliyye-kimler-st-ok { color: #15803d; font-weight: 700; }
.maliyye-kimler-st-low { color: #b45309; font-weight: 700; }
.maliyye-kimler-st-high { color: #b91c1c; font-weight: 700; }
.maliyye-kimler-st-empty { color: #7c3aed; font-weight: 700; }

.maliyye-kimler-footer {
  display: flex;
  gap: 8px;
  justify-content: flex-end;
}

.maliyye-kimler-btn {
  padding: 8px 14px;
  border-radius: 10px;
  border: 1px solid #cbd5e1;
  background: #fff;
  color: #334155;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
}

.maliyye-kimler-btn-primary {
  border-color: #0f766e;
  background: linear-gradient(135deg, #0d9488 0%, #0f766e 100%);
  color: #fff;
}

.context-menu > button:hover,
.context-menu-item:hover {
  background: rgba(15, 23, 42, 0.05) !important;
  color: #0f172a !important;
}

.context-menu > button:active,
.context-menu-item:active {
  background: rgba(15, 23, 42, 0.08) !important;
}

.context-menu > button:focus-visible,
.context-menu-item:focus-visible {
  outline: none;
  box-shadow: 0 0 0 2px #fff, 0 0 0 4px rgba(59, 130, 246, 0.45);
}

/* «Bax» — premium vurğu (Maliyyə kontekst menyusu); hündürlük «Dəyiş» ilə eyni */
#contextMenu .context-menu-item--bax-premium {
  margin-top: 4px !important;
  padding: 8px 10px !important;
  min-height: 36px;
  border-radius: 8px !important;
  border: 1px solid rgba(15, 118, 110, 0.28) !important;
  background: linear-gradient(145deg, #f8fffe 0%, #ecfdf5 38%, #d1fae5 100%) !important;
  color: #0f766e !important;
  font-weight: 600 !important;
  letter-spacing: 0.02em;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.85),
    0 6px 18px -8px rgba(15, 118, 110, 0.45),
    0 2px 6px -2px rgba(15, 23, 42, 0.06);
  position: relative;
  overflow: hidden;
}

#contextMenu .context-menu-item--bax-premium::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(
    105deg,
    transparent 0%,
    rgba(255, 255, 255, 0.35) 42%,
    transparent 64%
  );
  pointer-events: none;
  opacity: 0.9;
}

#contextMenu .context-menu-item--bax-premium .context-menu-bax-ico {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  border-radius: 7px;
  flex-shrink: 0;
  background: linear-gradient(145deg, #14b8a6 0%, #0d9488 45%, #0f766e 100%);
  color: #fff;
  font-size: 0.78rem;
  box-shadow: 0 2px 8px -2px rgba(15, 118, 110, 0.55);
}

#contextMenu .context-menu-item--bax-premium .context-menu-bax-ico i {
  width: auto;
  opacity: 1;
  font-size: 0.82rem;
}

#contextMenu .context-menu-item--bax-premium .context-menu-bax-text {
  position: relative;
  z-index: 1;
}

#contextMenu .context-menu-item--bax-premium:hover {
  border-color: rgba(15, 118, 110, 0.42) !important;
  background: linear-gradient(145deg, #f0fdfa 0%, #d1fae5 45%, #a7f3d0 100%) !important;
  color: #115e59 !important;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.9),
    0 8px 22px -8px rgba(15, 118, 110, 0.5),
    0 2px 8px -2px rgba(15, 23, 42, 0.08);
}

#contextMenu .context-menu-item--bax-premium:hover .context-menu-bax-ico {
  filter: brightness(1.05);
}

#contextMenu .context-menu-item--bax-premium:active {
  transform: scale(0.99);
}

#contextMenu .context-menu-item--bax-premium:focus-visible {
  box-shadow: 0 0 0 2px #fff, 0 0 0 4px rgba(13, 148, 136, 0.45);
}

/* İncə semantik vurğu — kobud fon / qara çərçivə yox */
#deyisContextBtn i {
  color: #64748b;
}

#tesdiqEtBtn i {
  color: #059669;
}

#tesdiqiQaldirBtn i {
  color: #e11d48;
}

#inceleBtn i {
  color: #2563eb;
}

#tesdiqEtBtn:hover,
#deyisContextBtn:hover,
#tesdiqiQaldirBtn:hover,
#inceleBtn:hover {
  background: rgba(15, 23, 42, 0.06) !important;
  color: #0f172a !important;
}

#tesdiqiQaldirBtn:hover i {
  color: #be123c;
}

/* Animation */
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(-5px); }
  to { opacity: 1; transform: translateY(0); }
}

.table-wrapper {
  overflow-x: auto;
  margin-top: 20px;
}

.kv-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
  background: white;
}

.kv-table th,
.kv-table td {
  border: 1px solid #ddd;
  padding: 8px;
  text-align: center;
}

.kv-table th {
  background-color: #f2f2f2;
  font-weight: bold;
}

.highlight {
  background-color: yellow !important;
}

.editable {
  background-color: #e9f5ff;
  cursor: pointer;
}

.modal {
  display: none;
  position: fixed;
  z-index: 1000;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  overflow: auto;
  background-color: rgba(0,0,0,0.4);
}

.modal-content {
  background-color: #fff;
  margin: 5% auto;
  padding: 20px;
  border: 1px solid #888;
  width: 90%;
  max-width: 600px;
  max-height: 85vh;              /* ✳️ ekranın 85%-nə qədər */
  overflow-y: auto;              /* ✳️ sığmayan hissə üçün scroll */
  border-radius: 8px;
  box-sizing: border-box;
}
/* Responsive Design */
@media (max-width: 768px) {
  #maliyye,
  #xkLocalPage {
    padding: 1rem;
  }
  
  #maliyye .maliyye-content,
  #xkLocalPage .maliyye-content {
    padding: 1.25rem;
  }

  #maliyye .maliyye-filters,
  #xkLocalPage .maliyye-filters {
    padding: 1rem 1.1rem 1.15rem;
  }
  
  #maliyye .form-grid,
  #xkLocalPage .form-grid {
    grid-template-columns: 1fr;
    gap: 1rem;
  }
  
  #maliyye .form-actions,
  #xkLocalPage .form-actions {
    flex-direction: column;
    gap: 0.75rem;
  }
  
  #maliyye .maliyye-container button,
  #xkLocalPage button {
    width: 100%;
  }
  
  .modal-content {
    width: 95%;
    max-height: 90vh;
    margin: 5vh auto;
  }
}


.modal-content h3 {
  margin-top: 0;
}

.modal-content select {
  width: 100%;
  padding: 8px;
  margin-top: 10px;
  margin-bottom: 15px;
}
.maliyye-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}

.maliyye-table th, .maliyye-table td {
  border: 1px solid #ccc;
  padding: 8px;
  text-align: center;
}

.maliyye-table th {
  background-color: #f2f2f2;
  font-weight: bold;
}

.maliyye-table tr[style*="background:yellow"] {
  background-color: yellow !important;
  font-weight: bold;
}

/* Silmə modalının ümumi örtüyü */
#confirmDeleteModal {
  display: none;
  position: fixed;
  z-index: 2000; /* Digər modalardan üstün */
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  background: rgba(0,0,0,0.5);
  justify-content: center;
  align-items: center;
}

/* Modal pəncərənin öz dizaynı */
#confirmDeleteModal .modal-content {
  background: #fff;
  padding: 20px 25px;
  border-radius: 10px;
  max-width: 380px; /* Daha dar görünüş */
  width: 90%;
  text-align: center;
  box-shadow: 0 4px 15px rgba(0,0,0,0.25);
  animation: scaleIn 0.2s ease-out;
}

/* Başlıq */
#confirmDeleteModal h3 {
  margin-top: 0;
  font-size: 20px;
  color: #d32f2f;
}

/* Təsvir mətn */
#confirmDeleteModal p {
  font-size: 14px;
  margin: 10px 0 20px;
  color: #555;
}

/* Düymələr */
#confirmDeleteModal button {
  padding: 8px 16px;
  border-radius: 5px;
  font-size: 14px;
  border: none;
  cursor: pointer;
  transition: background 0.2s;
}

#confirmDeleteModal #confirmDeleteYesBtn {
  background: #d32f2f;
  color: white;
}

#confirmDeleteModal #confirmDeleteYesBtn:hover {
  background: #b71c1c;
}

#confirmDeleteModal #confirmDeleteNoBtn {
  background: #ccc;
}

#confirmDeleteModal #confirmDeleteNoBtn:hover {
  background: #aaa;
}

/* Kiçik açılış animasiyası */
@keyframes scaleIn {
  from { transform: scale(0.9); opacity: 0; }
  to { transform: scale(1); opacity: 1; }
}

#contextMenu{
  position: fixed;    /* ← vacib */
  z-index: 13050; /* Avto modal (12040) üstündə görünsün */
  left: 0; top: 0;
  display: none;
}

/* Avto düzəlt hesabatı (kopyalanan mətn) */
.maliyye-avto-duzelt-overlay {
  position: fixed;
  inset: 0;
  z-index: 14020;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 16px;
  box-sizing: border-box;
  background: rgba(15, 23, 42, 0.4);
  backdrop-filter: blur(5px);
  -webkit-backdrop-filter: blur(5px);
}

.maliyye-avto-duzelt-card {
  width: min(520px, 100%);
  max-height: min(88vh, 640px);
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 16px 18px 18px;
  border-radius: 16px;
  background: linear-gradient(165deg, #fff 0%, #f8fafc 100%);
  border: 1px solid #e2e8f0;
  box-shadow: 0 24px 64px rgba(15, 23, 42, 0.18);
}

.maliyye-avto-duzelt-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
}

.maliyye-avto-duzelt-head h4 {
  margin: 0;
  font-size: 1.05rem;
  font-weight: 700;
  color: #0f172a;
}

.maliyye-avto-duzelt-x {
  flex: 0 0 auto;
  width: 36px;
  height: 36px;
  border: none;
  border-radius: 10px;
  background: #f1f5f9;
  color: #64748b;
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
}

.maliyye-avto-duzelt-x:hover {
  background: #e2e8f0;
  color: #0f172a;
}

.maliyye-avto-duzelt-hint {
  margin: 0;
  font-size: 12px;
  line-height: 1.45;
  color: #64748b;
}

.maliyye-avto-duzelt-ta {
  width: 100%;
  flex: 1;
  min-height: 200px;
  box-sizing: border-box;
  font-family: ui-monospace, "Cascadia Code", Consolas, monospace;
  font-size: 12px;
  line-height: 1.45;
  padding: 10px 12px;
  border-radius: 10px;
  border: 1px solid #e2e8f0;
  background: #fff;
  color: #0f172a;
  resize: vertical;
}

.maliyye-avto-duzelt-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.maliyye-avto-duzelt-btn {
  font-family: inherit;
  font-size: 13px;
  font-weight: 600;
  padding: 10px 16px;
  border-radius: 10px;
  border: 1px solid #e2e8f0;
  background: #fff;
  color: #334155;
  cursor: pointer;
}

.maliyye-avto-duzelt-btn-primary {
  border-color: rgba(15, 118, 110, 0.35);
  background: linear-gradient(135deg, #0d9488 0%, #0f766e 100%);
  color: #fff;
}

.maliyye-avto-duzelt-btn-primary:hover {
  filter: brightness(1.03);
}

/* --- İncələ Modal (Center + Table) --- */
#inceleModal.kv-modal-overlay{
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.45);
  display: none;
  justify-content: center;
  align-items: center;
  padding: 18px;
  z-index: 5000;
}

#inceleModal .kv-modal-window{
  background: #fff;
  width: min(1100px, 95vw);
  max-height: 92vh;
  border-radius: 14px;
  box-shadow: 0 18px 60px rgba(0,0,0,.25);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

#inceleModal .kv-modal-header{
  display:flex;
  align-items:flex-start;
  justify-content:space-between;
  gap: 12px;
  padding: 12px 16px;
  border-bottom: 1px solid #e2e8f0;
  background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
}

#inceleModal .kv-modal-title-wrap{
  flex: 1;
  min-width: 0;
}

#inceleModal .kv-modal-title-wrap h3{
  margin: 0;
  font-size: 16px;
  line-height: 1.35;
  font-weight: 700;
  color: #0f172a;
}

#inceleModal .kv-modal-header-actions{
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
  flex-shrink: 0;
  max-width: 100%;
}

#inceleModal .incele-header-btn{
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 12px;
  border-radius: 10px;
  border: 1px solid #cbd5e1;
  background: #fff;
  color: #0f172a;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  line-height: 1;
  font-family: inherit;
}

#inceleModal .incele-header-btn:hover{
  background: #f1f5f9;
  border-color: #94a3b8;
}

#inceleModal .incele-header-btn--edit{
  padding: 8px 12px;
  min-width: 40px;
  justify-content: center;
}

#inceleModal .incele-header-btn--edit:hover{
  background: #eff6ff;
  border-color: #3b82f6;
  color: #1d4ed8;
}

#inceleModal .kv-modal-close{
  border: 0;
  background: transparent;
  color: #0f172a !important;
  font-size: 22px;
  cursor: pointer;
  padding: 6px 10px;
  border-radius: 10px;
  line-height: 1;
  font-weight: 700;
  flex-shrink: 0;
}

#inceleModal .kv-modal-close:hover{
  background:#e2e8f0;
  color:#0f172a !important;
}

#inceleModal .incele-umumi-qeyd{
  margin-bottom: 12px;
  padding: 11px 14px;
  border-radius: 10px;
  border: 1px solid #e2e8f0;
  background: #f8fafc;
}

#inceleModal .incele-umumi-qeyd-label{
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: #64748b;
  margin-bottom: 6px;
}

#inceleModal .incele-umumi-qeyd-text{
  font-size: 14px;
  line-height: 1.45;
  color: #0f172a;
  white-space: pre-wrap;
  word-break: break-word;
}

#inceleModal .incele-umumi-qeyd--empty .incele-umumi-qeyd-text{
  color: #94a3b8;
  font-weight: 500;
}

#inceleModal .incele-container{
  padding: 14px 16px;
  overflow: auto;
  font-family: "Segoe UI", system-ui, -apple-system, "Roboto", "Helvetica Neue", Arial,
    "Noto Sans", sans-serif;
}

#inceleModal .incele-body-toolbar{
  display: flex;
  justify-content: flex-start;
  align-items: center;
  margin: 0 0 12px;
}

#inceleModal .incele-toolbar-copy{
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  padding: 0;
  border-radius: 10px;
  border: 1px solid #cbd5e1;
  background: #fff;
  color: #0f172a;
  cursor: pointer;
  font-size: 16px;
  line-height: 1;
  flex-shrink: 0;
}

#inceleModal .incele-toolbar-copy:hover{
  background: #f1f5f9;
  border-color: #94a3b8;
  color: #0f172a;
}

/* table */
#inceleModal table{ width:100%; border-collapse:collapse; font-size:14px; }
#inceleModal thead th{
  position: sticky; top: 0;
  background:#f8fafc;
  text-align:left;
  padding:10px;
  border-bottom:1px solid #e2e8f0;
  z-index: 1;
}
#inceleModal tbody td{
  padding:10px;
  border-bottom:1px solid #e2e8f0;
}
#inceleModal tbody tr:hover{ background:#f1f5f9; }
#inceleModal .num{ text-align:right; font-variant-numeric: tabular-nums; }


/* İNCƏLƏ MODALI */
#inceleModal .close { color:#000 !important; }

.incele-head{
  display:flex;
  flex-direction:column;
  gap:6px;
  margin:6px 0 10px;
  font-size:14px;
}
.incele-sub{ color:#334155; font-size:13px; }

.incele-table-wrap{
  max-height:60vh;
  overflow:auto;
  border:1px solid #e5e7eb;
  border-radius:10px;
}

.incele-table{
  width:100%;
  border-collapse:collapse;
  min-width:980px;
  font-size:13px;
}
.incele-table th, .incele-table td{
  border-bottom:1px solid #eef2f7;
  padding:8px 10px;
  text-align:center;
}
.incele-table thead th{
  position:sticky;
  top:0;
  background:#f8fafc;
  border-bottom:1px solid #e5e7eb;
  font-weight:800;
}
.incele-table tbody tr:hover{ background:#f9fafb; }

.maliyye-summary{ margin-top:10px; padding:10px; border:1px solid #e5e7eb; border-radius:10px; background:#fff; }
.maliyye-summary .sum-grid{ display:grid; grid-template-columns:repeat(auto-fit,minmax(190px,1fr)); gap:8px; font-size:12px; }
.maliyye-summary .sum-item{ padding:6px 8px; border:1px dashed #e5e7eb; border-radius:8px; background:#fafafa; }

/* —— Avto: alt düymə + incə modal —— */
.maliyye-avto-bar {
  margin-top: 1.5rem;
  padding-top: 1rem;
  border-top: 1px solid var(--border, #e2e8f0);
  display: flex;
  justify-content: center;
}

.maliyye-avto-trigger {
  font-family: inherit;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #0f766e;
  background: linear-gradient(180deg, #ffffff 0%, #f8fafc 100%);
  border: 1px solid rgba(15, 118, 110, 0.22);
  border-radius: 999px;
  padding: 10px 28px;
  cursor: pointer;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04), 0 12px 32px -18px rgba(15, 118, 110, 0.35);
  transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
}

.maliyye-avto-trigger:hover {
  border-color: rgba(15, 118, 110, 0.4);
  box-shadow: 0 4px 14px -6px rgba(15, 118, 110, 0.45);
  transform: translateY(-1px);
}

.maliyye-avto-trigger:active {
  transform: translateY(0);
}

.maliyye-avto-overlay {
  position: fixed;
  inset: 0;
  z-index: 12040;
  display: none;
  align-items: flex-end;
  justify-content: center;
  padding: 0;
  box-sizing: border-box;
  background: rgba(15, 23, 42, 0.28);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
}

.maliyye-avto-sheet {
  width: 100%;
  max-width: min(96vw, 720px);
  max-height: min(88vh, 720px);
  margin: 0 auto;
  animation: maliyyeAvtoIn 0.28s cubic-bezier(0.22, 1, 0.36, 1);
}

@keyframes maliyyeAvtoIn {
  from {
    opacity: 0;
    transform: translateY(16px) scale(0.98);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.maliyye-avto-sheet-inner {
  background: linear-gradient(165deg, #ffffff 0%, #fafbfc 48%, #f4f6f9 100%);
  border: 1px solid rgba(226, 232, 240, 0.95);
  border-radius: 20px 20px 0 0;
  box-shadow: 0 -8px 40px rgba(15, 23, 42, 0.08), 0 24px 64px -32px rgba(15, 23, 42, 0.18);
  padding: 1.15rem 1.25rem 1.35rem;
  display: flex;
  flex-direction: column;
  gap: 0.9rem;
  min-height: 0;
  max-height: inherit;
}

@media (min-width: 480px) {
  .maliyye-avto-overlay {
    align-items: center;
    padding: 16px;
  }
  .maliyye-avto-sheet {
    border-radius: 20px;
    max-height: min(88vh, 720px);
  }
  .maliyye-avto-sheet-inner {
    border-radius: 20px;
  }
}

/* Mobil: tam en, təhlükəsiz zona, kompakt düymələr, məzmun üçün scroll */
@media (max-width: 479.98px) {
  .maliyye-avto-overlay {
    align-items: flex-end;
    justify-content: stretch;
    padding: 0;
    padding-bottom: env(safe-area-inset-bottom, 0px);
  }

  .maliyye-avto-sheet {
    width: 100%;
    max-width: 100%;
    max-height: 92vh;
    max-height: 92dvh;
    margin: 0;
    border-radius: 0;
    display: flex;
    flex-direction: column;
    min-height: 0;
  }

  .maliyye-avto-sheet-inner {
    border-radius: 16px 16px 0 0;
    padding: 0.75rem 0.85rem calc(0.65rem + env(safe-area-inset-bottom, 0px));
    gap: 0.55rem;
    overflow: hidden;
    flex: 1;
    min-height: 0;
    max-height: 92vh;
    max-height: 92dvh;
  }

  .maliyye-avto-title {
    font-size: 1.02rem;
    line-height: 1.25;
  }

  .maliyye-avto-kicker {
    font-size: 9px;
  }

  .maliyye-avto-x {
    width: 32px;
    min-width: 32px;
    max-width: 32px;
    height: 32px;
    padding: 0;
    font-size: 18px;
    border-radius: 8px;
  }

  .maliyye-avto-label {
    font-size: 10px;
    margin-bottom: 0.28rem;
  }

  /* iOS: 16px altında input fokusda zoom edir */
  .maliyye-avto-input {
    font-size: 16px;
    padding: 8px 10px;
    border-radius: 10px;
  }

  .maliyye-avto-date-grid {
    gap: 0.5rem;
  }

  .maliyye-avto-progress {
    font-size: 11px;
    padding: 6px 8px;
    border-radius: 8px;
  }

  .maliyye-avto-summary {
    flex: 1 1 auto;
    min-height: 0;
    max-height: min(42vh, 320px);
    max-height: min(42dvh, 320px);
    font-size: 11px;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior: contain;
    border-radius: 10px;
  }

  .maliyye-avto-summary table {
    font-size: 10px;
  }

  .maliyye-avto-summary th,
  .maliyye-avto-summary td {
    padding: 5px 6px;
  }

  .maliyye-avto-actions {
    flex-shrink: 0;
    padding-top: 0.35rem;
  }

  .maliyye-avto-btn {
    font-size: 13px;
    font-weight: 600;
    padding: 9px 12px;
    border-radius: 10px;
    min-height: 40px;
  }

  .maliyye-avto-iade-notes {
    padding: 8px 10px;
    font-size: 10px;
    margin-top: 8px;
  }

  .maliyye-avto-uyg-scroll {
    max-height: min(36vh, 260px);
    max-height: min(36dvh, 260px);
    -webkit-overflow-scrolling: touch;
  }

  .maliyye-avto-uyg-table {
    font-size: 11px;
  }

  .maliyye-avto-uyg-table th,
  .maliyye-avto-uyg-table td {
    padding: 5px 6px;
  }

  .maliyye-avto-trigger {
    font-size: 11px;
    padding: 8px 18px;
    letter-spacing: 0.05em;
  }

  .maliyye-avto-stats-wrap {
    font-size: 11px;
    padding: 8px 10px;
  }

  .maliyye-avto-stats-title {
    font-size: 10px;
  }
}

.maliyye-avto-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.75rem;
}

.maliyye-avto-kicker {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: #94a3b8;
  margin-bottom: 0.2rem;
}

.maliyye-avto-title {
  margin: 0;
  font-size: 1.15rem;
  font-weight: 700;
  color: #0f172a;
  letter-spacing: -0.02em;
}

.maliyye-avto-sub {
  margin: 0.45rem 0 0;
  font-size: 12px;
  line-height: 1.45;
  color: #64748b;
  max-width: 36em;
}

.maliyye-avto-x {
  flex: 0 0 auto;
  flex-shrink: 0;
  width: 36px;
  min-width: 36px;
  max-width: 36px;
  height: 36px;
  padding: 0;
  border: none;
  border-radius: 10px;
  background: rgba(241, 245, 249, 0.9);
  color: #64748b;
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease;
  box-sizing: border-box;
}

.maliyye-avto-x:hover {
  background: #e2e8f0;
  color: #0f172a;
}

.maliyye-avto-form {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.maliyye-avto-date-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.65rem;
}

@media (max-width: 400px) {
  .maliyye-avto-date-grid {
    grid-template-columns: 1fr;
  }
}

.maliyye-avto-field .anbar-label-row {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
}

.maliyye-avto-label {
  display: block;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #64748b;
  margin-bottom: 0.35rem;
}

.maliyye-avto-input {
  width: 100%;
  box-sizing: border-box;
  font-family: inherit;
  font-size: 14px;
  padding: 10px 12px;
  border-radius: 12px;
  border: 1px solid #e2e8f0;
  background: #fff;
  color: #0f172a;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.maliyye-avto-input:focus {
  outline: none;
  border-color: rgba(15, 118, 110, 0.45);
  box-shadow: 0 0 0 3px rgba(15, 118, 110, 0.12);
}

.maliyye-avto-progress {
  font-size: 12px;
  color: #475569;
  padding: 8px 10px;
  border-radius: 10px;
  background: rgba(241, 245, 249, 0.85);
  border: 1px solid #e2e8f0;
}

.maliyye-avto-summary {
  font-size: 12px;
  max-height: 200px;
  overflow: auto;
  border-radius: 12px;
  border: 1px solid #e8ecf1;
  background: rgba(255, 255, 255, 0.7);
  min-height: 0;
}

.maliyye-avto-summary:empty {
  display: none;
}

.maliyye-avto-summary table {
  width: 100%;
  border-collapse: collapse;
  font-size: 11px;
}

.maliyye-avto-summary th,
.maliyye-avto-summary td {
  padding: 7px 9px;
  text-align: left;
  border-bottom: 1px solid #eef2f7;
}

.maliyye-avto-summary th {
  position: sticky;
  top: 0;
  background: #f8fafc;
  font-weight: 700;
  color: #334155;
}

.maliyye-avto-summary tr:last-child td {
  border-bottom: none;
}

.maliyye-avto-summary tr.maliyye-avto-row-duzelt td {
  background: #86efac !important;
}

.maliyye-avto-summary .avto-ok {
  color: #15803d;
  font-weight: 600;
}

.maliyye-avto-summary .avto-err {
  color: #b91c1c;
  font-weight: 600;
}

.maliyye-avto-summary .avto-iade-ok {
  color: #64748b;
  font-size: 11px;
}

.maliyye-avto-summary .avto-iade-flag {
  color: #c2410c;
  font-weight: 700;
  font-size: 11px;
  cursor: help;
  text-decoration: underline dotted;
  text-underline-offset: 2px;
}

.maliyye-avto-summary .avto-sigorta-flag {
  color: #1d4ed8;
  font-weight: 700;
  font-size: 11px;
  cursor: help;
  text-decoration: underline dotted;
  text-underline-offset: 2px;
}

.maliyye-avto-sigorta-notes {
  border-color: #bfdbfe !important;
  background: linear-gradient(180deg, #eff6ff 0%, #f8fafc 100%) !important;
}

.maliyye-avto-sigorta-notes .maliyye-avto-iade-notes-title {
  color: #1e40af !important;
}

.maliyye-avto-iade-notes {
  margin-top: 12px;
  padding: 10px 12px;
  border-radius: 12px;
  border: 1px solid #fed7aa;
  background: linear-gradient(180deg, #fffbeb 0%, #fff7ed 100%);
  font-size: 11px;
  line-height: 1.45;
  color: #431407;
}

.maliyye-avto-iade-notes-title {
  font-weight: 700;
  margin-bottom: 8px;
  color: #9a3412;
}

.maliyye-avto-iade-day {
  margin-bottom: 10px;
}

.maliyye-avto-iade-day:last-child {
  margin-bottom: 0;
}

.maliyye-avto-iade-day-h {
  margin-bottom: 4px;
}

.maliyye-avto-iade-ul {
  margin: 0;
  padding-left: 1.1rem;
}

.maliyye-avto-summary .avto-total-row td {
  font-weight: 700;
  background: #f1f5f9;
  border-top: 1px solid #e2e8f0;
}

.maliyye-avto-stats-wrap {
  margin-top: 0.85rem;
  padding: 10px 12px;
  border-radius: 12px;
  border: 1px solid #c7d2fe;
  background: linear-gradient(180deg, #eef2ff 0%, #f8fafc 100%);
  font-size: 12px;
  line-height: 1.5;
  color: #1e1b4b;
}

.maliyye-avto-stats-title {
  font-weight: 800;
  font-size: 11px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #4338ca;
  margin-bottom: 0.55rem;
}

.maliyye-avto-stats-day {
  margin-top: 0.5rem;
  padding-top: 0.45rem;
  border-top: 1px solid rgba(199, 210, 254, 0.85);
}

.maliyye-avto-stats-day:first-of-type {
  margin-top: 0;
  padding-top: 0;
  border-top: none;
}

.maliyye-avto-stats-day-h {
  font-weight: 700;
  color: #312e81;
  margin-bottom: 0.35rem;
}

.maliyye-avto-stats-ul {
  margin: 0;
  padding-left: 1.15rem;
}

.maliyye-avto-stats-ul li {
  margin-bottom: 0.35rem;
}

.maliyye-avto-stats-ul li:last-child {
  margin-bottom: 0;
}

.maliyye-avto-stats-muted {
  color: #6366f1;
  font-weight: 500;
  font-size: 0.95em;
}

.maliyye-avto-uyg-notes {
  margin-top: 0.75rem;
  padding-top: 0.65rem;
  border-top: 1px solid rgba(226, 232, 240, 0.95);
}

.maliyye-avto-uyg-day {
  margin-top: 0.65rem;
}

.maliyye-avto-uyg-day-h {
  font-size: 12px;
  font-weight: 800;
  color: #334155;
  margin-bottom: 0.35rem;
}

.maliyye-avto-uyg-warn {
  font-size: 11px;
  line-height: 1.45;
  color: #92400e;
  background: linear-gradient(180deg, #fffbeb 0%, #fefce8 100%);
  border: 1px solid #fcd34d;
  border-radius: 10px;
  padding: 8px 10px;
  margin-bottom: 0.45rem;
}

.maliyye-avto-uyg-scroll {
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  overflow: auto;
  max-height: min(42vh, 320px);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.maliyye-avto-uyg-table {
  margin: 0;
  width: 100%;
  font-size: 12px;
}

.maliyye-avto-uyg-table th,
.maliyye-avto-uyg-table td {
  padding: 6px 8px;
  white-space: nowrap;
}

.maliyye-avto-uyg-table th:first-child,
.maliyye-avto-uyg-table td:first-child {
  white-space: normal;
  min-width: 8rem;
}

.maliyye-avto-uyg-row-warn {
  background: rgba(254, 243, 199, 0.45);
}

.maliyye-avto-uyg-muted {
  font-size: 12px;
  color: #64748b;
  margin: 0.25rem 0 0;
}

.maliyye-avto-uyg-err {
  font-size: 12px;
  color: #b91c1c;
  margin: 0.25rem 0 0;
}

.maliyye-avto-uyg-badge-warn {
  font-weight: 800;
  color: #b45309;
  cursor: help;
}

.maliyye-avto-actions {
  display: flex;
  justify-content: stretch;
  padding-top: 0.15rem;
}

.maliyye-avto-btn {
  font-family: inherit;
  flex: 1;
  font-size: 14px;
  font-weight: 600;
  padding: 12px 16px;
  border-radius: 12px;
  border: none;
  cursor: pointer;
  transition: opacity 0.15s ease, transform 0.12s ease;
}

.maliyye-avto-btn:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

.maliyye-avto-btn-primary {
  background: linear-gradient(135deg, #0d9488 0%, #0f766e 55%, #115e59 100%);
  color: #fff;
  box-shadow: 0 4px 16px -4px rgba(15, 118, 110, 0.55);
}

.maliyye-avto-btn-primary:hover:not(:disabled) {
  transform: translateY(-1px);
}

/* ✅ İncələ modalında alt hissə görünməsi üçün */
#inceleModal .modal-content {
  overflow: auto !important;
}

/* ✅ İncələ container-in özündə də scroll olsun */
#inceleContainer {
  overflow: auto;
  padding: 10px;
}

/* ✅ Cədvəl daha stabil olsun */
#inceleContainer table {
  table-layout: fixed;
}

/* ✅ Bonus ödəniş sütununu daralt (7-ci sütun) */
#inceleContainer th:nth-child(7),
#inceleContainer td:nth-child(7) {
  width: 70px;
  max-width: 70px;
  min-width: 70px;
  white-space: nowrap;
}

/* ✅ Modal içində Qeyd hüceyrəsi sətirdən-sətrə keçsin */
#expeditorModal td[data-name="qeyd"]{
  white-space: pre-wrap !important;
  overflow-wrap: anywhere !important;
  word-break: break-word !important;
  max-width: 100% !important;
  line-height: 1.25;
  padding: 8px 10px;
}

/* Mobil ekranda daha rahat olsun */
@media (max-width: 520px){
  #expeditorModal td[data-name="qeyd"]{
    min-height: 44px; /* 2-3 sətr görünsün */
  }
  #expeditorModal #smenKassaList table.kv-table td[data-name="qeyd"]{
    min-height: 0;
  }
}

/* Kassa cədvəli: əvvəl qalın qara kənar; Hesabla + Kəsrə görə tünd qırmızı/yaşıl */
#expeditorModal #smenKassaList table.kv-table {
  border: 3px solid #0f172a;
  border-radius: 10px;
  overflow: hidden;
}

#expeditorModal #smenKassaList table.kv-table.calc-done {
  border-radius: 10px;
  overflow: hidden;
  border-style: solid;
}

#expeditorModal #smenKassaList table.kv-table.calc-done--kesr-pos {
  background: #fef2f2;
  border-width: 4px;
  border-color: #7f1d1d;
  box-shadow: 0 0 0 1px rgba(127, 29, 29, 0.35);
}

#expeditorModal #smenKassaList table.kv-table.calc-done--kesr-neg {
  background: #ecfdf5;
  border-width: 4px;
  border-color: #14532d;
  box-shadow: 0 0 0 1px rgba(20, 83, 45, 0.35);
}

#expeditorModal #smenKassaList table.kv-table.calc-done--kesr-zero {
  background: #f8fafc;
  border-width: 4px;
  border-color: #334155;
  box-shadow: 0 0 0 1px rgba(51, 65, 85, 0.25);
}

/* Avto düzəliş olunan kassir sətri: daha tünd yaşıl fon vurğusu */
#expeditorModal #smenKassaList table.kv-table.avto-duzelt-done tbody tr td {
  background: #bbf7d0 !important;
}
