/* İadələrin Analizi — modul stilləri */

.iad-wrap {
  max-width: 920px;
}

.iad-wrap h2 {
  margin: 0 0 14px 0;
  font-size: 1.35rem;
  font-weight: 700;
  color: #0f172a;
}

.iad-anbar-block {
  margin-bottom: 14px;
}

.iad-anbar-block > label {
  display: block;
  margin-bottom: 6px;
  font-weight: 600;
  font-size: 0.9rem;
  color: #334155;
}

.iad-anbar-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}

.iad-anbar-row input[type="text"] {
  flex: 1 1 200px;
  min-width: 160px;
  padding: 8px 11px;
  border: 1px solid #cbd5e1;
  border-radius: 10px;
  font-size: 14px;
}

.iad-anbar-pick {
  flex: 0 0 auto;
  padding: 8px 14px;
  font-size: 13px;
  font-weight: 600;
  color: #fff;
  background: linear-gradient(145deg, #0ea5e9, #0284c7);
  border: none;
  border-radius: 10px;
  cursor: pointer;
  box-shadow: 0 2px 8px rgba(14, 165, 233, 0.35);
  transition: transform 0.12s ease, filter 0.12s ease;
}

.iad-anbar-pick:hover {
  filter: brightness(1.06);
  transform: translateY(-1px);
}

.iad-dates {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-bottom: 14px;
}

.iad-dates .col {
  flex: 1 1 180px;
}

.iad-dates label {
  display: block;
  margin-bottom: 4px;
  font-size: 0.85rem;
  font-weight: 600;
  color: #475569;
}

.iad-dates input[type="date"] {
  width: 100%;
  max-width: 220px;
  padding: 8px 10px;
  border: 1px solid #cbd5e1;
  border-radius: 10px;
}

.iad-submit {
  padding: 9px 18px;
  font-size: 14px;
  font-weight: 600;
  color: #fff;
  background: linear-gradient(145deg, #6366f1, #4f46e5);
  border: none;
  border-radius: 10px;
  cursor: pointer;
  box-shadow: 0 2px 10px rgba(79, 70, 229, 0.35);
  transition: transform 0.12s ease, filter 0.12s ease;
}

.iad-submit:hover {
  filter: brightness(1.05);
  transform: translateY(-1px);
}

.iad-loading {
  display: none;
  margin-top: 10px;
  font-size: 14px;
  color: #64748b;
}

.iad-result {
  margin-top: 18px;
}

/* Kart + cədvəl */
.iade-card {
  background: #fff;
  border-radius: 12px;
  padding: 14px 14px 6px;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.08);
  border: 1px solid #eef2f7;
  margin-top: 10px;
}

.iade-header {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 10px;
}

.iade-title {
  font-weight: 700;
  font-size: 16px;
  color: #1f2937;
  margin: 0;
}

.iade-badges {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

.iade-badges .badge {
  background: #f1f5f9;
  color: #111827;
  border: 1px solid #e5e7eb;
  font-size: 12px;
  font-weight: 600;
  padding: 4px 8px;
  border-radius: 999px;
}

.kv-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  font-size: 14px;
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 10px;
  overflow: hidden;
}

.kv-table thead th {
  position: sticky;
  top: 0;
  background: linear-gradient(135deg, #f0f4ff, #dce6ff);
  color: #0f172a;
  font-weight: 700;
  padding: 12px;
  border-bottom: 2px solid #cbd5e1;
  text-align: center;
  font-size: 14px;
  letter-spacing: 0.3px;
  box-shadow: inset 0 -1px 0 rgba(0, 0, 0, 0.06);
}

.kv-table tbody td {
  padding: 10px;
  border-bottom: 1px solid #eef2f7;
  vertical-align: middle;
  text-align: center;
}

.kv-table tbody tr:nth-child(even) {
  background: #fafafa;
}

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

.col-left {
  text-align: left;
}

.col-right {
  text-align: right;
}

.clickable {
  color: #0ea5e9;
  font-weight: 700;
}

.bold-cell {
  font-weight: 700;
}

.total-row {
  background: #e9f5ff;
  font-weight: 800;
}

/* Premium alət zolağı */
.iade-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: flex-end;
  align-items: center;
  margin: 10px 0 12px;
}

.iade-pill-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  padding: 0.32rem 0.85rem;
  min-height: 2rem;
  font-size: 0.68rem;
  font-weight: 650;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  border: none;
  border-radius: 999px;
  cursor: pointer;
  color: #fff;
  box-shadow:
    0 1px 2px rgba(15, 23, 42, 0.06),
    inset 0 1px 0 rgba(255, 255, 255, 0.22);
  transition:
    transform 0.14s ease,
    box-shadow 0.14s ease,
    filter 0.14s ease;
}

.iade-pill-btn i {
  font-size: 0.75rem;
  opacity: 0.95;
}

.iade-pill-btn:hover {
  transform: translateY(-1px);
  filter: brightness(1.06);
  box-shadow:
    0 4px 14px rgba(15, 23, 42, 0.1),
    inset 0 1px 0 rgba(255, 255, 255, 0.25);
}

.iade-pill-btn:active {
  transform: translateY(0);
  filter: brightness(0.98);
}

.iade-pill-btn--violet {
  background: linear-gradient(145deg, #8b5cf6, #6d28d9);
}

.iade-pill-btn--ocean {
  background: linear-gradient(145deg, #06b6d4, #0891b2);
}

.iade-pill-btn--rose {
  background: linear-gradient(145deg, #f472b6, #db2777);
}

.iade-pill-btn--amber {
  background: linear-gradient(145deg, #fbbf24, #d97706);
}

.iade-pill-btn--emerald {
  background: linear-gradient(145deg, #34d399, #059669);
}

.iade-pill-btn--slate {
  background: linear-gradient(145deg, #64748b, #475569);
}

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

#iadeChart .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: 12px;
  padding: 14px;
  display: flex;
  flex-direction: column;
}

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

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

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

#iadeChart .main {
  height: 400px;
}

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

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

#iadeChart .act {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: flex-end;
  align-items: center;
  margin-top: 10px;
}

@media (max-width: 768px) {
  .kv-table {
    font-size: 13px;
  }

  .kv-table thead th,
  .kv-table tbody td {
    padding: 8px;
  }

  .iade-title {
    font-size: 14px;
  }

  .iade-toolbar {
    justify-content: center;
  }
}
