.api-logs-page {
  padding: 24px;
  background: #f6f8fb;
  min-height: 100vh;
}

.api-logs-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px;
  margin-bottom: 20px;
}

.api-logs-title {
  margin: 0;
  font-size: 28px;
  font-weight: 800;
  color: #0f172a;
}

.api-logs-subtitle {
  margin: 6px 0 0;
  color: #64748b;
  font-size: 14px;
}

.api-logs-stats {
  display: flex;
  gap: 12px;
}

.stat-card {
  background: white;
  border: 1px solid #e2e8f0;
  border-radius: 14px;
  padding: 12px 16px;
  min-width: 110px;
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.05);
}

.stat-label {
  display: block;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: #64748b;
  margin-bottom: 4px;
}

.stat-value {
  font-size: 20px;
  font-weight: 800;
  color: #0f172a;
}

.filters-panel {
  background: white;
  border: 1px solid #e2e8f0;
  border-radius: 18px;
  padding: 18px;
  margin-bottom: 20px;
  box-shadow: 0 8px 28px rgba(15, 23, 42, 0.05);
}

.filters-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
}

.filter-field {
  display: flex;
  flex-direction: column;
  gap: 6px;

  &--wide {
    grid-column: span 2;
  }

  label {
    font-size: 12px;
    font-weight: 700;
    color: #334155;
    text-transform: uppercase;
    letter-spacing: 0.4px;
  }
}

.filters-actions {
  display: flex;
  gap: 10px;
  margin-top: 16px;
}

.table-wrapper {
  border-radius: 18px;
  overflow: hidden;
  box-shadow: 0 8px 28px rgba(15, 23, 42, 0.08);
  background: #fff;
}

.logs-table {
  width: 100%;
  table-layout: fixed;
  border-collapse: collapse;
  font-size: 13px;
  background: white;

  th {
    text-align: left;
    font-weight: 700;
    color: #334155;
    background: #f8fafc;
    border-bottom: 1px solid #e2e8f0;
    padding: 14px 16px;
  }

  td {
    vertical-align: middle;
    border-bottom: 1px solid #edf2f7;
    padding: 14px 16px;
  }

  th:nth-child(1), td:nth-child(1) { width: 130px; }
  th:nth-child(2), td:nth-child(2) { width: 90px; }
  th:nth-child(4), td:nth-child(4) { width: 90px; }
  th:nth-child(5), td:nth-child(5) { width: 110px; }
  th:nth-child(6), td:nth-child(6) { width: 180px; }
  th:nth-child(7), td:nth-child(7) { width: 100px; }
}

.log-row {
  transition: background 0.2s ease;

  &:hover {
    background: #f8fbff;
  }

  &--expanded {
    background: #f8fbff;
  }
}

.provider-pill {
  display: inline-flex;
  align-items: center;
  padding: 0.3rem 0.6rem;
  border-radius: 999px;
  font-weight: 700;
  font-size: 12px;
  white-space: nowrap;
  text-transform: uppercase;
  letter-spacing: 1px;
  background: #f5f5f5;
  color: #4338ca;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;

  &.provider--unblock {
    color: #5f81e0;
  }

  &.provider--bridge {
    color: #15803d;
  }
}

.method {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 58px;
  padding: 4px 8px;
  border-radius: 999px;
  font-weight: 700;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.4px;

  &.post {
    background: #e3f2fd;
    color: #1976d2;
  }

  &.get {
    color: #2e7d32;
    background: #e8f5e9;
  }

  &.put {
    background: #fff3e0;
    color: #ef6c00;
  }

  &.delete {
    background: #ffebee;
    color: #c62828;
  }

  &.patch {
    background: #f3e8ff;
    color: #7c3aed;
  }
}

.response_status {
  display: inline-flex;
  min-width: 56px;
  justify-content: center;
  padding: 4px 8px;
  border-radius: 999px;
  font-weight: 700;
  font-size: 12px;

  &.success {
    background: #dcfce7;
    color: #166534;
  }

  &.warning {
    background: #fef3c7;
    color: #92400e;
  }

  &.error {
    background: #fee2e2;
    color: #b91c1c;
  }

  &.neutral {
    background: #e5e7eb;
    color: #4b5563;
  }
}

.duration-pill {
  display: inline-flex;
  min-width: 72px;
  justify-content: center;
  padding: 4px 8px;
  border-radius: 999px;
  font-weight: 600;
  font-size: 12px;

  &.fast {
    background: #ecfdf5;
    color: #047857;
  }

  &.medium {
    background: #eff6ff;
    color: #1d4ed8;
  }

  &.slow {
    background: #fff7ed;
    color: #c2410c;
  }

  &.neutral {
    background: #f3f4f6;
    color: #6b7280;
  }
}

.endpoint {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: #0f172a;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  width: 100%;
}

.expand-cell {
  text-align: right;
}

.expand-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: 8px;
  text-decoration: none;
  color: #334155;
  background: #f8fafc;
  border: 1px solid #e2e8f0;

  &:hover {
    background: #eef2ff;
  }
}

.detail-row {
  td {
    padding: 0;
    border-bottom: none;
  }
}

.detail-cell {
  padding: 0 !important;
}

.detail-panel {
  background: linear-gradient(180deg, #fbfdff 0%, #f8fafc 100%);
  border-top: 1px solid #e2e8f0;
  padding: 1rem 1.25rem 1.25rem;
}

.detail-overview {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.85rem;
  margin-bottom: 1rem;
}

.overview-item {
  background: white;
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  padding: 0.75rem 0.9rem;
  min-width: 0;

  &--wide {
    grid-column: span 2;
  }
}

.overview-label {
  display: block;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.6px;
  color: #64748b;
  margin-bottom: 0.35rem;
}

.overview-value {
  display: block;
  color: #0f172a;
  font-size: 13px;
  font-weight: 600;
  min-width: 0;
}

.endpoint-full {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  word-break: break-word;
}

.log-tabs {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.tab-section {
  border-radius: 14px;
  overflow: hidden;
  background: white;
  border: 1px solid #e5e7eb;
}

.tab-title {
  padding: 12px 16px;
  font-size: 13px;
  font-weight: 800;
  color: #0f172a;
  border-bottom: 1px solid #e5e7eb;
  background: #f8fafc;
}

.tab-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
  padding: 1rem;

  &--single {
    grid-template-columns: 1fr;
  }
}

.log-block {
  display: flex;
  flex-direction: column;
  min-width: 0;
  background: #0f172a;
  border-radius: 12px;
  border: 1px solid #1e293b;
  overflow: hidden;

  &--error {
    background: #1f1416;
    border-color: #7f1d1d;
  }

  &__header {
    padding: 0.75rem 1rem;
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    background: rgba(255, 255, 255, 0.04);
    color: #cbd5e1;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  }

  pre {
    margin: 0;
    padding: 1rem;
    max-height: 340px;
    overflow: auto;
    background: transparent;
    color: #e2e8f0;
    font-size: 12px;
    line-height: 1.55;
    font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
    white-space: pre-wrap;
    word-break: break-word;
    overflow-wrap: anywhere;
  }
}

.pagination-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 14px 16px;
  border-top: 1px solid #e5e7eb;
  background: #fff;
}

.pagination-meta {
  color: #475569;
  font-size: 13px;
}

.pagination-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.pagination-page {
  font-size: 13px;
  color: #334155;
  font-weight: 600;
}

.empty-state {
  text-align: center;
  padding: 40px 16px !important;
  color: #64748b;
}

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

  .detail-overview {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .tab-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 700px) {
  .api-logs-header {
    flex-direction: column;
  }

  .filters-grid {
    grid-template-columns: 1fr;
  }

  .filter-field--wide {
    grid-column: span 1;
  }

  .detail-overview {
    grid-template-columns: 1fr;
  }

  .overview-item--wide {
    grid-column: span 1;
  }

  .pagination-bar {
    flex-direction: column;
    gap: 12px;
    align-items: flex-start;
  }
}

.provider--default {
  background: #f3f4f6;
  color: #4b5563;
}

.expand-cell {
  text-align: right;
}

.expand-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: #64748b;
  cursor: pointer;
  transition: background 0.18s ease, color 0.18s ease, transform 0.18s ease;

  &:hover {
    background: #f1f5f9;
    color: #0f172a;
  }

  &:focus-visible {
    outline: 2px solid #cbd5e1;
    outline-offset: 2px;
  }

  &.is-open .expand-icon {
    transform: rotate(180deg);
  }
}

.expand-icon {
  width: 16px;
  height: 16px;
  transition: transform 0.18s ease;
}

.active-filters {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin-bottom: 16px;
  flex-wrap: wrap;
}

.active-filters-label {
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: #64748b;
  padding-top: 6px;
  white-space: nowrap;
}

.active-filters-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.filter-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 30px;
  padding: 4px 10px;
  border-radius: 999px;
  background: #ffffff;
  border: 1px solid #e2e8f0;
  box-shadow: 0 2px 8px rgba(15, 23, 42, 0.04);
  white-space: nowrap;
}

.filter-chip__key {
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.4px;
  color: #64748b;
}

.filter-chip__value {
  font-size: 12px;
  font-weight: 600;
  color: #0f172a;
}

.pagination-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 14px 16px;
  border-top: 1px solid #e5e7eb;
  background: #fff;
}

.pagination-footer__info {
  min-width: 0;

  .pagy.info {
    display: inline-block;
    font-size: 13px;
    color: #475569;
    font-weight: 500;
  }
}

.pagination-footer__nav {
  .pagy.series-nav {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-wrap: wrap;
  }

  .pagy.series-nav a,
  .pagy.series-nav [role="link"],
  .pagy.series-nav [role="separator"] {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 34px;
    height: 34px;
    padding: 0 10px;
    border-radius: 10px;
    font-size: 13px;
    font-weight: 700;
    text-decoration: none;
    transition: all 0.18s ease;
  }

  .pagy.series-nav a {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    color: #334155;

    &:hover {
      background: #f8fafc;
      border-color: #cbd5e1;
      color: #0f172a;
    }
  }

  .pagy.series-nav [aria-current="page"] {
    background: #0f172a;
    color: white;
    border: 1px solid #0f172a;
    box-shadow: 0 6px 18px rgba(15, 23, 42, 0.16);
  }

  .pagy.series-nav [aria-disabled="true"] {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    color: #94a3b8;
    cursor: default;
  }

  .pagy.series-nav [role="separator"] {
    min-width: auto;
    padding: 0 4px;
    background: transparent;
    border: 0;
    color: #94a3b8;
  }
}
@media (max-width: 700px) {
  .pagination-footer {
    flex-direction: column;
    align-items: flex-start;
  }

  .pagination-footer__nav {
    width: 100%;
  }
}
/*
 * This is a manifest file that'll be compiled into application.css, which will include all the files
 * listed below.
 *
 * Any CSS (and SCSS, if configured) file within this directory, lib/assets/stylesheets, or any plugin's
 * vendor/assets/stylesheets directory can be referenced here using a relative path.
 *
 * You're free to add application-wide styles to this file and they'll appear at the bottom of the
 * compiled file so the styles you add here take precedence over styles defined in any other CSS
 * files in this directory. Styles in this file should be added after the last require_* statement.
 * It is generally better to create a new file per style scope.
 *


 */


/* Design Tokens */
:root {
  --bg: #f8fafc;
  --panel: #ffffff;
  --sidebar: #f6f7fb;
  --muted: #6b7280;
  --line: #e5e7eb;
  --text: #111827;
  --text-muted: #6b7280;
  --brand: #6c5ce7;
  --brand-600: #5b4bd6;
  --success: #16a34a;
  --danger: #dc2626;
  --warning: #f59e0b;
}

/* Base Styles */
body {
  font-family: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  background-color: var(--bg);
  color: var(--text);
  line-height: 1.5;
}

/* Utility Classes */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.5rem 1rem;
  border-radius: 0.5rem;
  font-weight: 500;
  font-size: 0.875rem;
  line-height: 1.25rem;
  border: 1px solid transparent;
  transition: all 0.2s ease-in-out;
  cursor: pointer;
  text-decoration: none;
  min-height: 2.5rem;
}

.btn:focus {
  outline: 2px solid transparent;
  outline-offset: 2px;
  box-shadow: 0 0 0 2px rgba(99, 102, 241, 0.5);
}

.btn-primary {
  background-color: #111827;
  color: #ffffff;
  border-color: #111827;
}

.btn-primary:hover {
  background-color: #1f2937;
  border-color: #1f2937;
}

.btn-secondary {
  background-color: #ffffff;
  color: #111827;
  border-color: #d1d5db;
}

.btn-secondary:hover {
  background-color: #f9fafb;
}

.btn-subtle {
  background-color: transparent;
  color: #6b7280;
}

.btn-subtle:hover {
  color: #111827;
  background-color: #f3f4f6;
}

.badge {
  display: inline-flex;
  align-items: center;
  padding: 0.25rem 0.5rem;
  border-radius: 9999px;
  font-size: 0.75rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.badge-soon {
  margin-left: auto;
  background-color: #f3f4f6;
  color: #6b7280;
  font-size: 0.75rem;
  padding: 0.125rem 0.5rem;
  border-radius: 9999px;
  font-weight: 400;
}

.form-input {
  width: 100%;
  padding: 0.5rem 0.75rem;
  border: 1px solid #d1d5db;
  border-radius: 0.5rem;
  font-size: 0.875rem;
  line-height: 1.25rem;
  background-color: #ffffff;
  transition: all 0.2s ease-in-out;
}

.form-input:focus {
  outline: 2px solid transparent;
  outline-offset: 2px;
  border-color: #8b5cf6;
  box-shadow: 0 0 0 2px rgba(139, 92, 246, 0.2);
}

.form-select {
  width: 100%;
  padding: 0.5rem 0.75rem;
  border: 1px solid #d1d5db;
  border-radius: 0.5rem;
  font-size: 0.875rem;
  line-height: 1.25rem;
  background-color: #ffffff;
  transition: all 0.2s ease-in-out;
}

.form-select:focus {
  outline: 2px solid transparent;
  outline-offset: 2px;
  border-color: #8b5cf6;
  box-shadow: 0 0 0 2px rgba(139, 92, 246, 0.2);
}

.modal {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  left: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: center;
  background-color: rgba(0, 0, 0, 0.5);
}

.modal-content {
  background-color: #ffffff;
  border-radius: 0.5rem;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
  max-width: 42rem;
  width: 100%;
  margin: 0 1rem;
  max-height: 90vh;
  overflow-y: auto;
}

.tab {
  padding: 0.5rem 1rem;
  font-size: 0.875rem;
  font-weight: 500;
  color: #4b5563;
  border-bottom: 2px solid transparent;
  transition: all 0.2s ease-in-out;
}

.tab:hover {
  color: #111827;
  border-bottom-color: #d1d5db;
}

.tab-active {
  color: #8b5cf6;
  border-bottom-color: #8b5cf6;
}

.empty-state {
  text-align: center;
  padding: 3rem 0;
}

.empty-state-icon {
  margin: 0 auto;
  height: 3rem;
  width: 3rem;
  color: #8b5cf6;
  margin-bottom: 1rem;
}

.empty-state-title {
  font-size: 1.125rem;
  font-weight: 500;
  color: #111827;
  margin-bottom: 0.5rem;
}

.empty-state-subtitle {
  color: #4b5563;
}

/* Navigation Styles */
.nav-item {
  display: flex;
  align-items: center;
  gap: 0.625rem;
  padding: 0.5rem 0.75rem;
  font-size: 0.875rem;
  font-weight: 500;
  color: #6b7280;
  border-radius: 0.5rem;
  transition: all 0.2s ease-in-out;
  position: relative;
  text-decoration: none;
}

.nav-item:hover {
  background-color: #f3f4f6;
  color: #111827;
}

.nav-item svg {
  width: 1rem;
  height: 1rem;
  flex-shrink: 0;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.nav-item span {
  align-self: center;
}

.nav-item-active {
  background-color: #f3f4f6;
  color: #111827;
}

.nav-item-active::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 0.125rem;
  background-color: #111827;
}

.nav-item-tenant {
  border: 1px solid #e5e7eb;
  background-color: #ffffff;
  margin-bottom: 1rem;
}

.nav-item-tenant:hover {
  background-color: #f9fafb;
}

.btn:disabled,
.btn[disabled] {
  opacity: 0.4;
  cursor: not-allowed;
  pointer-events: none;
}

.btn-danger {
  border-color: #fca5a5;
  background-color: #fef2f2;
  color: #b91c1c;
}

.btn-danger:hover {
  background-color: #fef2f2;
}

.btn-danger:focus {
  box-shadow: 0 0 0 2px rgba(239, 68, 68, 0.5);
}

/* ── Animations ──────────────────────────────────────────────────────────── */

@keyframes slideUpFade {
  from { opacity: 0; transform: translateY(14px); }
  to   { opacity: 1; transform: translateY(0);    }
}

@keyframes fadeIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}

.animate-slide-up {
  animation: slideUpFade 0.4s cubic-bezier(0.16, 1, 0.3, 1) both;
}

.animate-fade-in {
  animation: fadeIn 0.3s ease both;
}

/* Quote form slides in when direction is selected */
[data-operation-form-target="quoteStep"]:not([hidden]) {
  animation: slideUpFade 0.35s cubic-bezier(0.16, 1, 0.3, 1) both;
}

/* Quote result and receiving-instructions children animate in when inserted */
#quote_result > *,
#receiving_instructions > * {
  animation: slideUpFade 0.4s cubic-bezier(0.16, 1, 0.3, 1) both;
}

/* Button press feedback */
.btn:active:not(:disabled) {
  transform: scale(0.97);
  transition: transform 0.1s ease;
}
