#providersPanel {
  border-color:#bfdbfe;
  background:
    linear-gradient(
      180deg,
      rgba(239,246,255,.65),
      #ffffff 170px
    );
}

.provider-grid {
  grid-template-columns:
    repeat(4,minmax(165px,1fr));
  margin-bottom:18px;
}

.provider-settings {
  display:flex;
  align-items:center;
  flex-wrap:wrap;
  gap:9px;
  margin:0 0 18px;
}

.provider-chip {
  display:inline-flex;
  align-items:center;
  gap:7px;
  min-height:34px;
  padding:7px 11px;
  border:1px solid #dbeafe;
  border-radius:999px;
  background:#eff6ff;
  color:#1e3a8a;
  font-size:12px;
  font-weight:900;
}

.provider-chip.success {
  background:#dcfce7;
  border-color:#bbf7d0;
  color:#166534;
}

.provider-chip.warning {
  background:#fef3c7;
  border-color:#fde68a;
  color:#92400e;
}

.provider-chip.danger {
  background:#fee2e2;
  border-color:#fecaca;
  color:#991b1b;
}

.provider-subgrid {
  display:grid;
  grid-template-columns:
    minmax(260px,.8fr)
    minmax(0,2.2fr);
  gap:16px;
}

.provider-box {
  border:1px solid var(--line);
  border-radius:16px;
  background:#fff;
  overflow:hidden;
}

.provider-box-title {
  padding:14px 16px;
  border-bottom:1px solid var(--line);
  background:#f8fafc;
  font-weight:900;
}

.provider-reasons {
  padding:8px 16px;
}

.provider-reason-row {
  display:flex;
  justify-content:space-between;
  gap:12px;
  padding:10px 0;
  border-bottom:1px solid #eef2f7;
  font-size:13px;
  font-weight:800;
}

.provider-reason-row:last-child {
  border-bottom:0;
}

.provider-reason-row span {
  color:#475569;
}

.provider-reason-row b {
  color:#0f172a;
}

.provider-table table {
  min-width:1180px;
}

.provider-status {
  display:inline-flex;
  align-items:center;
  padding:5px 9px;
  border-radius:999px;
  font-size:11px;
  font-weight:900;
  white-space:nowrap;
}

.provider-status.match {
  color:#166534;
  background:#dcfce7;
}

.provider-status.conflict {
  color:#991b1b;
  background:#fee2e2;
}

.provider-status.neutral {
  color:#475569;
  background:#e2e8f0;
}

.provider-note {
  margin-top:14px;
  color:#64748b;
  font-size:12px;
  font-weight:700;
}

.provider-loading {
  padding:24px;
  color:#64748b;
  font-weight:800;
  text-align:center;
}

@media(max-width:1100px) {
  .provider-grid {
    grid-template-columns:
      repeat(2,minmax(160px,1fr));
  }

  .provider-subgrid {
    grid-template-columns:1fr;
  }
}

@media(max-width:640px) {
  .provider-grid {
    grid-template-columns:1fr;
  }
}

/* AURELION_PROVIDER_COMPACT_START */

.provider-table {
  overflow-x:hidden;
}

.provider-table table {
  width:100%;
  min-width:0;
  table-layout:fixed;
}

.provider-table th,
.provider-table td {
  padding:10px 8px;
  max-width:none;
  overflow:visible;
  text-overflow:clip;
  white-space:normal;
  word-break:break-word;
  line-height:1.35;
}

.provider-table th:nth-child(1) {
  width:12%;
}

.provider-table th:nth-child(2) {
  width:10%;
}

.provider-table th:nth-child(3) {
  width:12%;
}

.provider-table th:nth-child(4) {
  width:19%;
}

.provider-table th:nth-child(5) {
  width:17%;
}

.provider-table th:nth-child(6) {
  width:11%;
}

.provider-table th:nth-child(7) {
  width:12%;
}

.provider-table th:nth-child(8) {
  width:7%;
}

.provider-cell-stack {
  display:flex;
  flex-direction:column;
  align-items:flex-start;
  gap:5px;
}

.provider-cell-muted {
  color:#64748b;
  font-size:11px;
  font-weight:700;
}

@media(max-width:1000px) {
  .provider-table {
    overflow-x:auto;
  }

  .provider-table table {
    min-width:900px;
    table-layout:auto;
  }
}

/* AURELION_PROVIDER_COMPACT_END */

/* AURELION_PROVIDER_CARDS_START */

.provider-subgrid {
  grid-template-columns:
    230px minmax(0, 1fr);
  align-items:start;
}

.provider-table {
  overflow:visible;
  padding:10px;
}

.provider-request-list {
  display:flex;
  flex-direction:column;
  gap:10px;
}

.provider-request-card {
  padding:12px;
  border:1px solid #e2e8f0;
  border-radius:14px;
  background:#ffffff;
  box-shadow:0 5px 18px rgba(15,23,42,.04);
}

.provider-request-head {
  display:flex;
  align-items:flex-start;
  justify-content:space-between;
  gap:14px;
  padding-bottom:10px;
  border-bottom:1px solid #eef2f7;
}

.provider-request-number {
  display:flex;
  flex-direction:column;
  gap:3px;
}

.provider-request-number b {
  color:#0f172a;
  font-size:14px;
}

.provider-request-number span {
  color:#64748b;
  font-size:11px;
  font-weight:700;
}

.provider-request-head-meta {
  display:flex;
  align-items:center;
  justify-content:flex-end;
  flex-wrap:wrap;
  gap:7px;
  color:#475569;
  font-size:11px;
  font-weight:800;
}

.provider-request-head-meta span {
  padding:4px 7px;
  border-radius:7px;
  background:#f1f5f9;
}

.provider-request-head-meta b {
  color:#0f172a;
  font-size:13px;
}

.provider-request-providers {
  display:grid;
  grid-template-columns:
    minmax(145px, 1fr)
    24px
    minmax(145px, 1fr)
    auto;
  align-items:center;
  gap:8px;
  padding:11px 0;
}

.provider-result-box {
  display:flex;
  flex-direction:column;
  gap:4px;
  min-width:0;
  padding:9px 11px;
  border:1px solid #dbe4ef;
  border-radius:11px;
  background:#f8fafc;
}

.provider-result-box span {
  color:#64748b;
  font-size:10px;
  font-weight:900;
  text-transform:uppercase;
}

.provider-result-box b {
  color:#0f172a;
  font-size:12px;
  line-height:1.25;
  overflow-wrap:anywhere;
}

.provider-result-box small {
  color:#64748b;
  font-size:10px;
  font-weight:700;
}

.provider-result-arrow {
  color:#94a3b8;
  font-size:18px;
  font-weight:900;
  text-align:center;
}

.provider-request-agreement {
  display:flex;
  justify-content:flex-end;
}

.provider-request-bottom {
  display:flex;
  align-items:flex-start;
  justify-content:space-between;
  gap:15px;
  padding-top:10px;
  border-top:1px solid #eef2f7;
  color:#475569;
  font-size:11px;
}

.provider-request-reason {
  display:flex;
  justify-content:flex-end;
  gap:5px;
  text-align:right;
}

.provider-request-reason span {
  color:#64748b;
  font-weight:700;
}

@media(max-width:1050px) {
  .provider-subgrid {
    grid-template-columns:1fr;
  }
}

@media(max-width:720px) {
  .provider-request-head,
  .provider-request-bottom {
    flex-direction:column;
  }

  .provider-request-head-meta {
    justify-content:flex-start;
  }

  .provider-request-providers {
    grid-template-columns:1fr;
  }

  .provider-result-arrow {
    transform:rotate(90deg);
  }

  .provider-request-agreement,
  .provider-request-reason {
    justify-content:flex-start;
    text-align:left;
  }
}

/* AURELION_PROVIDER_CARDS_END */

/* AURELION_PROVIDER_DUAL_START */

.provider-subgrid {
  grid-template-columns:
    210px minmax(0, 1fr);
  align-items:start;
  gap:14px;
}

.provider-table {
  padding:10px;
  overflow:visible;
}

.provider-request-list {
  display:flex;
  flex-direction:column;
  gap:12px;
}

.provider-request-card {
  overflow:hidden;
  border:1px solid #dbe4ef;
  border-radius:15px;
  background:#ffffff;
  box-shadow:
    0 5px 18px rgba(15,23,42,.045);
}

.provider-request-header {
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:16px;
  padding:11px 13px;
  border-bottom:1px solid #edf2f7;
  background:#ffffff;
}

.provider-request-identity {
  display:flex;
  align-items:center;
  flex-wrap:wrap;
  gap:9px;
  min-width:0;
}

.provider-request-identity b {
  color:#0f172a;
  font-size:13px;
}

.provider-request-identity span {
  color:#64748b;
  font-size:11px;
  font-weight:700;
}

.provider-request-meta {
  display:flex;
  align-items:center;
  justify-content:flex-end;
  flex-wrap:wrap;
  gap:7px;
}

.provider-meta-pill {
  padding:4px 8px;
  border-radius:7px;
  background:#f1f5f9;
  color:#475569;
  font-size:10px;
  font-weight:900;
}

.provider-request-meta strong {
  margin-left:3px;
  color:#0f172a;
  font-size:13px;
}

.provider-comparison {
  display:grid;
  grid-template-columns:
    minmax(0, 1fr)
    46px
    minmax(0, 1fr);
  align-items:stretch;
  gap:10px;
  padding:12px 13px;
}

.provider-side {
  position:relative;
  display:flex;
  flex-direction:column;
  min-width:0;
  min-height:96px;
  padding:12px 14px;
  border:1px solid #dbe4ef;
  border-radius:12px;
  background:#f8fafc;
}

.provider-side-primary {
  border-left:4px solid #2563eb;
}

.provider-side-secondary {
  border-left:4px solid #16a34a;
}

.provider-side-caption {
  margin-bottom:4px;
  color:#94a3b8;
  font-size:9px;
  font-weight:900;
  letter-spacing:.04em;
  text-transform:uppercase;
}

.provider-side-title {
  color:#334155;
  font-size:11px;
  font-weight:900;
  letter-spacing:.02em;
  text-transform:uppercase;
}

.provider-side-status {
  margin-top:8px;
  color:#0f172a;
  font-size:14px;
  font-weight:900;
  line-height:1.3;
  overflow-wrap:anywhere;
}

.provider-side-time {
  margin-top:auto;
  padding-top:7px;
  color:#64748b;
  font-size:10px;
  font-weight:700;
}

.provider-versus {
  display:flex;
  align-items:center;
  justify-content:center;
  align-self:center;
  width:36px;
  height:36px;
  margin:auto;
  border:1px solid #dbe4ef;
  border-radius:50%;
  background:#ffffff;
  color:#64748b;
  font-size:10px;
  font-weight:900;
  box-shadow:0 4px 12px rgba(15,23,42,.07);
}

.provider-request-footer {
  display:grid;
  grid-template-columns:
    auto auto minmax(220px, 1fr);
  align-items:center;
  gap:16px;
  padding:10px 13px;
  border-top:1px solid #edf2f7;
  background:#fbfdff;
}

.provider-footer-item {
  display:flex;
  align-items:center;
  gap:7px;
  white-space:nowrap;
}

.provider-footer-item > span,
.provider-footer-reason > span {
  color:#64748b;
  font-size:10px;
  font-weight:800;
}

.provider-fallback-yes,
.provider-fallback-no {
  display:inline-flex;
  align-items:center;
  min-height:23px;
  padding:4px 8px;
  border-radius:999px;
  font-size:10px;
  font-weight:900;
}

.provider-fallback-yes {
  color:#166534;
  background:#dcfce7;
}

.provider-fallback-no {
  color:#475569;
  background:#e2e8f0;
}

.provider-footer-reason {
  display:flex;
  align-items:center;
  justify-content:flex-end;
  gap:7px;
  min-width:0;
  text-align:right;
}

.provider-footer-reason b {
  color:#475569;
  font-size:10px;
  line-height:1.35;
}

@media(max-width:1050px) {
  .provider-subgrid {
    grid-template-columns:1fr;
  }
}

@media(max-width:760px) {
  .provider-request-header {
    align-items:flex-start;
    flex-direction:column;
  }

  .provider-request-meta {
    justify-content:flex-start;
  }

  .provider-comparison {
    grid-template-columns:1fr;
  }

  .provider-versus {
    border-radius:8px;
  }

  .provider-request-footer {
    grid-template-columns:1fr;
    align-items:flex-start;
  }

  .provider-footer-reason {
    justify-content:flex-start;
    text-align:left;
  }
}

/* AURELION_PROVIDER_DUAL_END */

/* AURELION_PROVIDER_PAGINATION_START */

/* Левый блок с причинами делаем шире */
.provider-subgrid {
  grid-template-columns:
    280px minmax(0, 1fr);
  gap:16px;
  align-items:start;
}

#providerReasons .provider-reasons {
  padding:10px 16px;
}

#providerReasons .provider-reason-row {
  align-items:flex-start;
  gap:14px;
  padding:12px 0;
}

#providerReasons .provider-reason-row span {
  flex:1;
  min-width:0;
  line-height:1.4;
  word-break:normal;
}

#providerReasons .provider-reason-row b {
  flex:0 0 auto;
  min-width:22px;
  text-align:right;
}

/* Навигация по последним запросам */
.provider-pagination {
  display:flex;
  align-items:center;
  justify-content:center;
  gap:16px;
  margin-top:14px;
  padding:13px;
  border:1px solid #dbe4ef;
  border-radius:13px;
  background:#f8fafc;
}

.provider-pagination button {
  min-width:105px;
  min-height:36px;
  padding:8px 14px;
  border:0;
  border-radius:9px;
  background:#2563eb;
  color:#ffffff;
  font-size:11px;
  font-weight:900;
  cursor:pointer;
  transition:
    transform .15s ease,
    opacity .15s ease,
    background .15s ease;
}

.provider-pagination button:hover:not(:disabled) {
  background:#1d4ed8;
  transform:translateY(-1px);
}

.provider-pagination button:disabled {
  cursor:not-allowed;
  opacity:.38;
  transform:none;
}

.provider-pagination-info {
  display:flex;
  flex-direction:column;
  align-items:center;
  min-width:145px;
  gap:3px;
  color:#334155;
  text-align:center;
}

.provider-pagination-info b {
  font-size:12px;
}

.provider-pagination-info span {
  color:#64748b;
  font-size:10px;
  font-weight:700;
}

@media(max-width:1050px) {
  .provider-subgrid {
    grid-template-columns:1fr;
  }
}

@media(max-width:600px) {
  .provider-pagination {
    gap:8px;
  }

  .provider-pagination button {
    min-width:82px;
    padding:8px 10px;
  }

  .provider-pagination-info {
    min-width:110px;
  }
}

/* AURELION_PROVIDER_PAGINATION_END */

