/* ——— Transfer Sorgu: əsas forma Aptekonline ilə eyni markup (.row / .col); qlobal style.css label/input ——— */

.transfer-sorgu-inner .trs-query-shell {
  position: relative;
  margin: 10px 0 0;
  padding: 18px 18px 16px;
  border: 1px solid rgba(148, 163, 184, 0.22);
  border-radius: 22px;
  background:
    radial-gradient(circle at top left, rgba(99, 102, 241, 0.1), transparent 34%),
    radial-gradient(circle at top right, rgba(20, 184, 166, 0.1), transparent 30%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.97), rgba(248, 250, 252, 0.96));
  box-shadow:
    0 10px 30px rgba(15, 23, 42, 0.08),
    inset 0 1px 0 rgba(255, 255, 255, 0.92);
}

.transfer-sorgu-inner .trs-query-grid {
  display: grid;
  grid-template-columns: minmax(260px, 1.25fr) repeat(2, minmax(190px, 1fr));
  gap: 16px;
  align-items: stretch;
}

.transfer-sorgu-inner .trs-query-col {
  display: flex;
  flex-direction: column;
  gap: 8px;
  justify-content: flex-end;
}

.transfer-sorgu-inner .trs-query-col label,
.transfer-sorgu-inner .trs-query-col .anbar-label-row label {
  margin: 0;
  min-height: 18px;
  display: inline-flex;
  align-items: center;
}

.transfer-sorgu-inner .trs-query-col .anbar-label-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.transfer-sorgu-inner .trs-query-col input {
  width: 100%;
}

.transfer-sorgu-inner .trs-query-col input[type="text"],
.transfer-sorgu-inner .trs-query-col input[type="date"] {
  min-height: 42px;
  border-radius: 14px;
}

.transfer-sorgu-inner .trs-query-col .anbar-open-picker-btn {
  flex: 0 0 auto;
  min-height: 34px;
  padding: 7px 14px;
  border: 1px solid rgba(14, 116, 144, 0.2);
  border-radius: 999px;
  background: linear-gradient(135deg, rgba(20, 184, 166, 0.14), rgba(14, 165, 233, 0.14));
  color: #0f172a;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  box-shadow: 0 6px 18px rgba(14, 165, 233, 0.12);
}

.transfer-sorgu-inner .trs-query-col .anbar-picked-label {
  margin-top: 2px;
  font-size: 11px;
  color: #64748b;
  font-weight: 700;
}

.transfer-sorgu-inner .trs-query-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 16px;
  flex-wrap: wrap;
}

.transfer-sorgu-inner .trs-premium-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 10px 18px;
  min-height: 40px;
  border: 1px solid transparent;
  border-radius: 999px;
  color: #f8fafc;
  font-size: 11px;
  font-weight: 800;
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  line-height: 1.2;
  cursor: pointer;
  box-shadow:
    0 1px 2px rgba(15, 23, 42, 0.06),
    0 8px 24px rgba(15, 23, 42, 0.14),
    inset 0 1px 0 rgba(255, 255, 255, 0.18);
  transition:
    transform 0.18s cubic-bezier(0.34, 1.56, 0.64, 1),
    box-shadow 0.2s ease,
    filter 0.2s ease,
    border-color 0.2s ease;
  -webkit-font-smoothing: antialiased;
}

.transfer-sorgu-inner .trs-premium-btn--primary {
  border-color: rgba(99, 102, 241, 0.35);
  background: linear-gradient(155deg, #6366f1 0%, #4f46e5 42%, #4338ca 100%);
}

.transfer-sorgu-inner .trs-premium-btn--ghost {
  border-color: rgba(248, 113, 113, 0.2);
  background: linear-gradient(145deg, #f97316 0%, #ef4444 46%, #dc2626 100%);
}

.transfer-sorgu-inner .trs-premium-btn:hover {
  filter: brightness(1.05);
  box-shadow:
    0 2px 4px rgba(15, 23, 42, 0.08),
    0 10px 26px rgba(15, 23, 42, 0.18),
    inset 0 1px 0 rgba(255, 255, 255, 0.22);
  transform: translateY(-1px);
}

.transfer-sorgu-inner .trs-premium-btn:active {
  transform: translateY(0);
  filter: brightness(0.97);
  box-shadow:
    0 1px 3px rgba(15, 23, 42, 0.1),
    inset 0 1px 3px rgba(15, 23, 42, 0.12);
}

.transfer-sorgu-inner .trs-premium-btn:focus-visible {
  outline: none;
  box-shadow:
    0 0 0 3px rgba(99, 102, 241, 0.35),
    0 4px 16px rgba(79, 70, 229, 0.22),
    inset 0 1px 0 rgba(255, 255, 255, 0.18);
}

.transfer-sorgu-detail-inner .trs-detail-toolbar {
  margin-bottom: 10px;
}

.transfer-sorgu-detail-inner .trs-back-btn {
  padding: 8px 14px;
  border-radius: 10px;
  border: 1px solid #cbd5e1;
  background: linear-gradient(180deg, #fff 0%, #f8fafc 100%);
  font-weight: 700;
  font-size: 13px;
  cursor: pointer;
  transition: box-shadow 0.15s ease, transform 0.12s ease;
}

.transfer-sorgu-detail-inner .trs-back-btn:hover {
  box-shadow: 0 4px 12px rgba(15, 23, 42, 0.1);
  transform: translateY(-1px);
}

.transfer-sorgu-detail-inner .trs-detail-heading {
  font-size: 14px;
  margin: 0 0 8px;
}

/* ——— Kontekst menyu ——— */
#transferContextMenu.transfer-ctx-menu,
.transfer-ctx-menu {
  position: fixed;
  z-index: 10002;
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  padding: 6px;
  list-style: none;
  margin: 0;
  box-shadow: 0 12px 32px rgba(15, 23, 42, 0.18);
  display: none;
  min-width: 200px;
  font-size: 13px;
}

.transfer-ctx-menu li {
  padding: 8px 12px;
  border-radius: 8px;
  cursor: pointer;
  transition: background 0.12s ease;
}

.transfer-ctx-menu li:hover {
  background: #f1f5f9;
}

.transfer-ctx-menu--premium {
  min-width: 188px;
  padding: 8px;
  border: 1px solid rgba(148, 163, 184, 0.28);
  border-radius: 14px;
  background:
    radial-gradient(circle at top left, rgba(59, 130, 246, 0.12), transparent 38%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(248, 250, 252, 0.97));
  box-shadow:
    0 14px 30px rgba(15, 23, 42, 0.16),
    inset 0 1px 0 rgba(255, 255, 255, 0.96);
  backdrop-filter: blur(10px);
}

.transfer-ctx-menu__label {
  margin: 0 0 6px;
  padding: 0 2px;
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 0.11em;
  text-transform: uppercase;
  color: #64748b;
}

.transfer-ctx-action {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 7px 9px;
  border: 1px solid rgba(99, 102, 241, 0.16);
  border-radius: 10px;
  background: linear-gradient(135deg, rgba(99, 102, 241, 0.12), rgba(14, 165, 233, 0.08));
  color: #0f172a;
  cursor: pointer;
  text-align: left;
  transition: transform 0.14s ease, box-shadow 0.2s ease, border-color 0.2s ease, filter 0.2s ease;
  box-shadow: 0 5px 14px rgba(99, 102, 241, 0.1);
}

.transfer-ctx-action:hover {
  transform: translateY(-1px);
  filter: brightness(1.02);
  border-color: rgba(79, 70, 229, 0.28);
  box-shadow: 0 8px 18px rgba(79, 70, 229, 0.12);
}

.transfer-ctx-action:active {
  transform: translateY(0);
}

.transfer-ctx-action__icon {
  flex: 0 0 22px;
  width: 22px;
  height: 22px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 7px;
  background: linear-gradient(135deg, #6366f1 0%, #0ea5e9 100%);
  color: #fff;
  font-size: 12px;
  font-weight: 800;
  box-shadow: 0 6px 14px rgba(79, 70, 229, 0.2);
}

.transfer-ctx-action__text {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 1px;
}

.transfer-ctx-action__text strong {
  font-size: 11px;
  line-height: 1.15;
}

.transfer-ctx-action__text small {
  font-size: 9px;
  line-height: 1.2;
  color: #64748b;
}

/* ——— Hesabat cədvəli / premium alətlər ——— */
.tr-toolbar {
  display: flex;
  gap: 8px;
  justify-content: flex-end;
  align-items: center;
  flex-wrap: wrap;
  margin: 8px 0 12px;
}

.tr-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  padding: 6px 13px;
  min-height: 30px;
  border-radius: 999px;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  border: 1px solid rgba(255, 255, 255, 0.45);
  color: #fff;
  cursor: pointer;
  box-shadow: 0 2px 10px rgba(15, 23, 42, 0.12);
  transition: transform 0.12s ease, box-shadow 0.2s ease, filter 0.15s ease;
}

.tr-btn:hover {
  transform: translateY(-1px);
  filter: brightness(1.05);
  box-shadow: 0 6px 18px rgba(15, 23, 42, 0.16);
}

.tr-btn:active {
  transform: translateY(0);
}

.tr-btn--chart {
  background: linear-gradient(135deg, #6366f1 0%, #7c3aed 100%);
}

.tr-btn--photo {
  background: linear-gradient(135deg, #14b8a6 0%, #0d9488 100%);
}

.tr-btn--columns {
  background: linear-gradient(135deg, #0f172a 0%, #334155 100%);
}

.tr-btn--columns-compact {
  min-height: 28px;
  padding: 5px 11px;
  font-size: 10px;
  letter-spacing: 0.03em;
}

.tr-btn--slim {
  min-height: 24px;
  padding: 4px 10px;
  font-size: 9px;
  letter-spacing: 0.03em;
  border-radius: 999px;
  box-shadow: 0 2px 8px rgba(15, 23, 42, 0.1);
}

.tr-btn--modal-save {
  background: linear-gradient(135deg, #f59e0b 0%, #ea580c 100%);
  border-color: rgba(255, 255, 255, 0.35);
}

.tr-btn--modal-close {
  background: linear-gradient(135deg, #64748b 0%, #475569 100%);
  border-color: rgba(255, 255, 255, 0.3);
}

.tr-wrap {
  overflow-x: auto;
}

.tr-bottom-actions {
  display: flex;
  justify-content: flex-end;
  margin-top: 8px;
}

.tr-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
  background: #fff;
  border: 1px solid #cfd8dc;
  border-radius: 10px;
  overflow: hidden;
}

.tr-table thead th {
  background: #fff59d;
  font-weight: 800;
  padding: 10px;
  border: 1px solid #cfd8dc;
  white-space: nowrap;
}

.tr-table thead th.sortable {
  cursor: pointer;
  user-select: none;
}

.tr-table thead th.filterable-col {
  text-decoration: underline;
  text-decoration-style: dotted;
  text-underline-offset: 3px;
  position: relative;
}

.tr-table thead th.filterable-col::after {
  content: " ▾";
  font-size: 11px;
  color: #475569;
}

.tr-table thead th.sorted-asc,
.tr-table thead th.sorted-desc {
  background: #ffe178;
}

.tr-table tbody td {
  padding: 8px 10px;
  border: 1px solid #e0e6ea;
}

.tr-table tbody tr:hover {
  background: #eef6ff;
}

.tr-table .left {
  text-align: left;
}

.tr-table .center {
  text-align: center;
}

/* ——— Diaqram modalı ——— */
#trChart {
  position: fixed;
  inset: 0;
  display: none;
  z-index: 10001;
  background: rgba(0, 0, 0, 0.4);
}

#trChart .card {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  background: #fff;
  border: 1px solid #ddd;
  box-shadow: 0 8px 28px rgba(0, 0, 0, 0.23);
  width: 1000px;
  max-width: 96vw;
  max-height: 92vh;
  border-radius: 14px;
  padding: 14px;
  display: flex;
  flex-direction: column;
}

#trChart .hdr {
  font-weight: 700;
  text-align: center;
  margin-bottom: 10px;
}

#trChart .ctrls {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  margin-bottom: 8px;
}

#trChart .ctrls label {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 8px;
  border: 1px solid #e6e6e6;
  border-radius: 8px;
  font-size: 12px;
}

#trChart .main {
  height: 380px;
}

#trChart .grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 10px;
}

#trChart .mini {
  height: 260px;
  background: #fff;
  border: 1px solid #eee;
  border-radius: 10px;
  padding: 8px;
}

#trChart .act {
  display: flex;
  gap: 8px;
  justify-content: flex-end;
  margin-top: 10px;
}

#trChart .act button {
  padding: 6px 16px;
  min-height: 32px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 650;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  border: 1px solid rgba(255, 255, 255, 0.4);
  color: #fff;
  cursor: pointer;
  transition: transform 0.12s ease, filter 0.15s ease, box-shadow 0.2s ease;
}

#trChart .act button:hover {
  transform: translateY(-1px);
  filter: brightness(1.06);
}

.tr-sort-menu {
  position: fixed;
  display: none;
  z-index: 10006;
  min-width: 160px;
  padding: 6px;
  border: 1px solid #d1d5db;
  border-radius: 10px;
  background: #fff;
  box-shadow: 0 12px 26px rgba(15, 23, 42, 0.18);
}

.tr-sort-menu button {
  width: 100%;
  border: 0;
  background: transparent;
  text-align: left;
  padding: 7px 9px;
  border-radius: 7px;
  font-size: 12px;
  font-weight: 700;
  color: #111;
  cursor: pointer;
}

.tr-sort-menu button:hover {
  background: #eef2ff;
}

.tr-filter-overlay {
  position: fixed;
  inset: 0;
  display: none;
  z-index: 10000;
  background: rgba(0, 0, 0, 0.35);
}

.tr-filter-overlay .card {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  background: #fff;
  border: 1px solid #ddd;
  box-shadow: 0 8px 28px rgba(0, 0, 0, 0.2);
  width: 520px;
  max-width: 92vw;
  max-height: 82vh;
  border-radius: 12px;
  padding: 14px;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.tr-filter-overlay .hdr-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 8px;
}

.tr-filter-overlay .hdr {
  font-weight: 600;
}

.tr-filter-overlay .hdr-row button {
  width: 28px;
  height: 28px;
  border-radius: 8px;
  border: 1px solid #d1d5db;
  background: #f8fafc;
  color: #111827;
  font-size: 12px;
  cursor: pointer;
}

.tr-filter-overlay .hdr-row button:hover {
  background: #eef2ff;
  border-color: #9ca3af;
}

.tr-filter-overlay .body {
  overflow: auto;
}

.tr-filter-overlay .top {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin: 6px 0;
}

.tr-filter-overlay .top button,
.tr-filter-overlay .act button {
  width: auto !important;
  min-height: 30px;
  padding: 0 12px;
  border-radius: 8px;
  border: 1px solid transparent;
  font-size: 12px;
  font-weight: 700;
  color: #111;
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.1);
  cursor: pointer;
}

.tr-filter-overlay .top #trFilterAll {
  background: linear-gradient(180deg, #dcfce7 0%, #bbf7d0 100%);
  border-color: #86efac;
}

.tr-filter-overlay .top #trFilterNone {
  background: linear-gradient(180deg, #fee2e2 0%, #fecaca 100%);
  border-color: #fca5a5;
}

.tr-filter-overlay .body input,
.tr-filter-overlay .body select {
  width: 100%;
  min-height: 38px;
  border: 1px solid #cbd5e1;
  border-radius: 10px;
  padding: 8px 10px;
  background: #fff;
  color: #0f172a;
  font-weight: 600;
  box-sizing: border-box;
}

.tr-filter-overlay .body label {
  display: block;
  margin-bottom: 6px;
  font-size: 12px;
  font-weight: 800;
  color: #334155;
}

.tr-filter-overlay .list {
  max-height: 55vh;
  overflow: auto;
  border: 1px solid #eee;
  border-radius: 8px;
  padding: 6px;
}

.tr-filter-overlay .row {
  display: grid;
  grid-template-columns: 18px 1fr;
  align-items: center;
  column-gap: 10px;
  padding: 4px 6px;
}

.tr-filter-overlay .row input[type="checkbox"] {
  width: 16px;
  height: 16px;
  margin: 0;
}

.tr-filter-overlay .row span {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.tr-filter-overlay .act {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  margin-top: 12px;
}

.tr-filter-overlay .act #trFilterApply {
  background: linear-gradient(180deg, #dcfce7 0%, #bbf7d0 100%);
  border-color: #86efac;
}

.tr-filter-overlay .act #trFilterClear {
  background: linear-gradient(180deg, #fee2e2 0%, #fecaca 100%);
  border-color: #fca5a5;
}

@media (max-width: 900px) {
  .transfer-sorgu-inner .trs-query-grid {
    grid-template-columns: 1fr;
  }

  .transfer-sorgu-inner .trs-query-actions {
    justify-content: stretch;
  }

  .transfer-sorgu-inner .trs-premium-btn {
    flex: 1 1 220px;
  }
}
