/* =============== ARTIQ / ƏSKİK HESABATI =============== */

#artiqEskikPage,
#artiqEskikDetailPage,
#artiqEskikEtrafliPage,
.ae-wrap,
.ae-detail-wrap,
.ae-etrafli-wrap {
  color: #000;
}

.ae-wrap label,
.ae-controls label,
.ae-title,
.ae-detail-wrap h3,
.ae-caption,
.ae-result,
.ae-detail-result {
  color: #000;
}

.ae-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
  text-align: center;
  color: #000;
}

.ae-table th,
.ae-table td {
  border: 1px solid #333;
  color: #000;
}

.ae-table thead th {
  background: #ffa500;
  font-weight: bold;
  font-size: 15px;
}

.ae-table .ae-th-filter {
  cursor: pointer;
  user-select: none;
}

.ae-table .ae-th-filter:hover {
  background: #ff8c00;
}

.ae-table-detail thead th {
  background: #ffff00;
}

.ae-row-even td {
  background: #fff;
}

.ae-row-odd td {
  background: #e6f7ff;
}

.ae-row-total td {
  background: #d9edf7;
  font-weight: bold;
}

.ae-cell-link {
  font-weight: bold;
  cursor: pointer;
}

.ae-diff-pos {
  background: #ccffcc !important;
}

.ae-diff-neg {
  background: #ffcccc !important;
}

.ae-caption {
  margin: 6px 0 10px;
  font-weight: 700;
}

.ae-loading {
  color: #000;
  font-weight: bold;
}

.ae-detail-name {
  text-align: left;
}

.ae-share-toolbar {
  display: flex;
  justify-content: flex-end;
  margin-bottom: 6px;
}

.ae-share-btn-inline {
  padding: 6px 12px;
  font-size: 13px;
  border-radius: 6px;
  border: 1px solid #c7d2fe;
  background: #eef2ff;
  cursor: pointer;
  color: #000;
}

/* Filtr modal */
.ae-filter-modal {
  position: fixed;
  inset: 0;
  z-index: 10090;
  display: none;
  align-items: center;
  justify-content: center;
  background: rgba(15, 23, 42, 0.35);
  padding: 16px;
}

.ae-filter-box {
  width: min(420px, 96vw);
  max-height: 80vh;
  display: flex;
  flex-direction: column;
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 20px 50px rgba(15, 23, 42, 0.22);
  overflow: hidden;
  color: #000;
}

.ae-filter-header {
  padding: 12px 14px 10px;
  border-bottom: 1px solid #e2e8f0;
}

.ae-filter-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  margin-bottom: 8px;
}

.ae-filter-sort {
  display: flex;
  gap: 6px;
}

.ae-filter-sort button {
  padding: 5px 10px;
  font-size: 12px;
  font-weight: 600;
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  background: #f8fafc;
  cursor: pointer;
  color: #000;
}

.ae-filter-sort button:hover {
  background: #e2e8f0;
}

.ae-filter-close {
  width: 30px;
  height: 30px;
  border: none;
  border-radius: 8px;
  background: #f1f5f9;
  font-size: 20px;
  line-height: 1;
  cursor: pointer;
  color: #000;
}

#aeExcelFilterSearch {
  width: 100%;
  padding: 8px 10px;
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  font-size: 13px;
  color: #000;
}

.ae-excel-filter-range {
  display: flex;
  gap: 10px;
  margin-top: 8px;
}

.ae-excel-range-cell {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.ae-excel-range-cell span {
  font-size: 11px;
  font-weight: 600;
  color: #000;
}

.ae-excel-range-cell input {
  padding: 6px 8px;
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  color: #000;
}

.ae-filter-list {
  overflow: auto;
  max-height: 46vh;
  padding: 8px 10px;
}

.ae-filter-grid-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
  color: #000;
}

.ae-filter-grid-table td {
  padding: 5px 6px;
  border-bottom: 1px solid #f1f5f9;
}

.ae-filter-footer {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  padding: 10px 14px;
  border-top: 1px solid #e2e8f0;
}

.ae-filter-footer button {
  padding: 7px 14px;
  font-size: 13px;
  font-weight: 600;
  border-radius: 8px;
  border: 1px solid #cbd5e1;
  background: #fff;
  cursor: pointer;
  color: #000;
}

.ae-filter-footer button:first-child {
  background: #0f766e;
  color: #fff;
  border-color: #0f766e;
}

.ae-title {
  text-align: center;
  margin: 12px 0;
}

.ae-anbar-block {
  margin: 10px 0;
}

.ae-anbar-input {
  width: 100px;
}

.ae-controls {
  margin: 10px 0;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 12px;
}

.ae-submit-btn {
  background: #007BFF;
  color: white;
  padding: 6px 16px;
  border: none;
  border-radius: 5px;
  font-weight: bold;
  cursor: pointer;
}

.ae-etrafli-nav-btn {
  padding: 6px 14px;
  border: 1px solid #0f766e;
  border-radius: 5px;
  background: #ecfdf5;
  color: #000;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
}

.ae-etrafli-nav-btn:hover {
  background: #d1fae5;
}

.ae-etrafli-hint {
  margin: 0 0 10px;
  font-size: 13px;
  color: #000;
}

.ae-loading-box {
  margin: 8px 0;
  color: #000;
  font-weight: bold;
}

.ae-table-wrap {
  overflow-x: auto;
  margin-top: 8px;
}

.ae-table-scroll {
  overflow: auto;
  max-height: min(68vh, 760px);
  margin-top: 4px;
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  background: #fff;
}

.ae-table-sticky thead th {
  position: sticky;
  top: 0;
  z-index: 3;
  background: #ffa500;
  box-shadow: 0 1px 0 #333;
}

.ae-table-sticky .ae-th-filter:hover {
  background: #ff8c00;
}

.ae-etrafli-view-tabs {
  display: flex;
  gap: 8px;
  margin: 12px 0 6px;
  flex-wrap: wrap;
}

.ae-etrafli-view-tab {
  padding: 8px 14px;
  border: 1px solid #cbd5e1;
  border-radius: 999px;
  background: #f8fafc;
  color: #000;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
}

.ae-etrafli-view-tab.is-active {
  background: #1e40af;
  border-color: #1e40af;
  color: #fff;
}

.ae-etrafli-data-panel {
  display: none;
}

.ae-etrafli-data-panel.is-active {
  display: block;
}

.ae-qaima-row {
  cursor: context-menu;
}

.ae-etrafli-qaima-modal {
  display: none;
  align-items: center;
  justify-content: center;
  padding: 18px;
}

.ae-etrafli-qaima-modal .ae-kimsatib-modal-card {
  width: min(920px, calc(100vw - 28px));
}

.ae-etrafli-qaima-body {
  overflow: auto;
  max-height: calc(82vh - 110px);
  padding-right: 2px;
}

.ae-etrafli-qaima-info {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 8px 14px;
  margin-bottom: 12px;
  padding: 10px 12px;
  border: 1px solid rgba(148, 163, 184, 0.22);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.72);
  color: #000;
  font-size: 13px;
  font-weight: 600;
}

.ae-etrafli-qaima-info span {
  color: #475569;
  font-weight: 700;
  margin-right: 4px;
}

.ae-etrafli-qaima-note {
  grid-column: 1 / -1;
}

.ae-etrafli-qaima-scroll {
  max-height: min(52vh, 480px);
}

.ae-table-etrafli .ae-detail-name {
  text-align: left;
  min-width: 140px;
}

.ae-table-etrafli .col-left {
  text-align: left;
}

.ae-etrafli-info-block {
  margin-top: 20px;
  padding-top: 16px;
  border-top: 2px solid #e2e8f0;
}

.ae-etrafli-info-title {
  margin: 0 0 6px;
  font-size: 16px;
  font-weight: 800;
  color: #000;
}

.ae-etrafli-info-meta {
  margin: 0 0 10px;
  font-size: 13px;
  font-weight: 600;
  color: #000;
}

.ae-etrafli-summary-table {
  max-width: 520px;
}

.ae-note-cell {
  text-align: left;
  max-width: 220px;
  white-space: pre-wrap;
  word-break: break-word;
}

.ae-summary-line {
  margin: 0 0 10px;
  font-size: 13px;
  font-weight: 600;
  color: #000;
}

.ae-date-input {
  margin-right: 0;
}

.ae-result {
  margin-top: 15px;
}

.ae-back-btn {
  margin-bottom: 8px;
  cursor: pointer;
}

.ae-detail-result {
  margin-top: 10px;
}

.ae-share-actions {
  margin-top: 10px;
  display: flex;
  gap: 8px;
}

.ae-share-status {
  margin-top: 8px;
  font-size: 13px;
  color: #555;
}

.ae-share-btn {
  margin-top: 8px;
}

/* Artıq-Əskik — “Seç” telebat ilə eyni */
#artiqEskikPage .anbar-label-row .anbar-open-picker-btn {
  width: auto;
  min-width: 0;
  height: 24px;
  padding: 0 10px;
  border-radius: 999px;
  border: 1px solid #c4b5fd;
  background: linear-gradient(135deg, #f5f3ff 0%, #ede9fe 100%);
  color: #4c1d95;
  font-size: 11px;
  font-weight: 600;
  box-shadow: 0 4px 12px rgba(124, 58, 237, 0.14), inset 0 1px 0 rgba(255, 255, 255, .85);
}

#artiqEskikPage .anbar-label-row .anbar-open-picker-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 10px 20px rgba(124, 58, 237, 0.18), inset 0 1px 0 rgba(255, 255, 255, .9);
  filter: saturate(1.02);
}

/* Kim satıb modal */
#kimSatibModal {
  display: none;
  align-items: center;
  justify-content: center;
  padding: 18px;
}

#kimSatibModal .ae-kimsatib-modal-card {
  position: relative;
  left: auto;
  top: auto;
  transform: none;
  width: min(700px, calc(100vw - 28px));
  max-height: min(82vh, calc(100vh - 28px));
  margin: 0;
  padding: 14px;
  border: 1px solid rgba(148, 163, 184, 0.28);
  border-radius: 20px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.92), rgba(255, 255, 255, 0.88)),
    linear-gradient(135deg, #f8fafc, #eef2ff);
  box-shadow: 0 28px 70px rgba(15, 23, 42, 0.22);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.ae-kimsatib-modal-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 10px;
}

.ae-kimsatib-modal-title {
  margin: 0;
  color: #0f172a;
  font-size: 18px;
  font-weight: 800;
  line-height: 1.25;
  letter-spacing: -0.01em;
}

.ae-kimsatib-modal-meta {
  margin-top: 4px;
  color: #000;
  font-size: 12px;
  font-weight: 600;
}

.ae-kimsatib-close-btn,
.ae-kimsatib-fetch-btn,
.ae-kimsatib-menu-btn {
  border: 1px solid rgba(15, 23, 42, 0.08);
  border-radius: 14px;
  cursor: pointer;
  font-weight: 700;
  font-size: 14px;
  transition: all .18s ease;
}

.ae-kimsatib-close-btn {
  width: 38px;
  height: 38px;
  min-width: 38px;
  padding: 0;
  background: rgba(255, 255, 255, 0.78);
  color: #0f172a;
  box-shadow: 0 8px 20px rgba(15, 23, 42, 0.06);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  line-height: 1;
}

.ae-kimsatib-close-btn:hover,
.ae-kimsatib-menu-btn:hover {
  background: #ffffff;
  transform: translateY(-1px);
}

.ae-kimsatib-toolbar {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) auto;
  gap: 10px;
  align-items: end;
  padding: 10px;
  border: 1px solid rgba(148, 163, 184, 0.18);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.64);
  margin-bottom: 10px;
}

.ae-kimsatib-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.ae-kimsatib-field label {
  color: #000;
  font-size: 12px;
  font-weight: 700;
}

.ae-kimsatib-field input {
  width: 100%;
  min-height: 40px;
  padding: 0 12px;
  border: 1px solid rgba(148, 163, 184, 0.4);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.92);
  color: #0f172a;
  font-size: 14px;
  font-weight: 600;
}

.ae-kimsatib-field input:focus {
  outline: none;
  border-color: rgba(59, 130, 246, 0.65);
  box-shadow: 0 0 0 4px rgba(59, 130, 246, 0.12);
}

.ae-kimsatib-fetch-btn {
  width: 40px;
  height: 40px;
  min-height: 40px;
  min-width: 40px;
  padding: 0;
  background: linear-gradient(135deg, #ffffff, #e2e8f0);
  color: #0f172a;
  box-shadow: 0 10px 24px rgba(15, 23, 42, 0.08);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  line-height: 1;
}

.ae-kimsatib-fetch-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 14px 28px rgba(15, 23, 42, 0.12);
}

.ae-kimsatib-fetch-btn:disabled {
  opacity: .7;
  cursor: wait;
  transform: none;
}

.ae-kimsatib-body {
  overflow: auto;
  max-height: calc(82vh - 150px);
  padding-right: 2px;
}

.ae-kimsatib-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-height: 220px;
  border: 1px dashed rgba(148, 163, 184, 0.45);
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.5);
  color: #000;
  text-align: center;
  padding: 18px;
}

.ae-kimsatib-empty strong {
  color: #000;
  font-size: 17px;
}

.ae-kimsatib-empty-error strong,
.ae-kimsatib-empty-error span {
  color: #b91c1c;
}

.ae-kimsatib-table-wrap {
  border: 1px solid rgba(148, 163, 184, 0.18);
  border-radius: 16px;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.88);
}

.ae-kimsatib-itemref {
  padding: 10px 14px 0;
  color: #64748b;
  font-size: 11px;
  font-weight: 700;
}

.ae-kimsatib-table {
  width: 100%;
  border-collapse: collapse;
  min-width: 460px;
}

.ae-kimsatib-table thead th {
  position: sticky;
  top: 0;
  z-index: 1;
  padding: 11px 14px;
  background: linear-gradient(180deg, #f8fafc, #eef2ff);
  color: #000;
  text-align: left;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.02em;
}

.ae-kimsatib-table tbody td {
  padding: 11px 14px;
  border-top: 1px solid rgba(226, 232, 240, 0.95);
  color: #000;
  font-size: 13px;
  font-weight: 600;
}

.ae-kimsatib-table tbody tr:nth-child(even) td {
  background: rgba(248, 250, 252, 0.78);
}

.ae-kimsatib-table tbody tr:hover td {
  background: rgba(238, 242, 255, 0.95);
}

.ae-kimsatib-num {
  text-align: right;
  font-variant-numeric: tabular-nums;
}

.ae-kimsatib-menu {
  min-width: 156px;
  padding: 6px;
  border: 1px solid rgba(148, 163, 184, 0.22);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.96);
  box-shadow: 0 20px 50px rgba(15, 23, 42, 0.16);
  backdrop-filter: blur(14px);
}

.ae-kimsatib-menu-btn {
  width: 100%;
  padding: 10px 12px;
  background: linear-gradient(135deg, #ffffff, #f8fafc);
  color: #000000;
  text-align: left;
}

@media (max-width: 720px) {
  #kimSatibModal {
    padding: 10px;
  }

  #kimSatibModal .ae-kimsatib-modal-card {
    width: calc(100vw - 20px);
    max-height: calc(100vh - 20px);
    padding: 14px;
    border-radius: 20px;
  }

  .ae-kimsatib-modal-head,
  .ae-kimsatib-toolbar {
    grid-template-columns: 1fr;
    display: grid;
  }

  .ae-kimsatib-close-btn,
  .ae-kimsatib-fetch-btn {
    width: 40px;
  }

  .ae-kimsatib-body {
    max-height: calc(100vh - 220px);
  }
}
