.url-query-tool {
  max-width: 1160px;
}

header .flex-grow-1 {
  min-width: 0;
}

header h1 {
  overflow-wrap: anywhere;
}

.tool-panel {
  background: #ffffff;
  border: 1px solid #d8dee8;
  border-radius: 8px;
  padding: 24px;
  box-shadow: 0 8px 24px rgba(32, 45, 64, 0.08);
}

.tool-panel__header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 24px;
}

.button-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.code-area {
  font-family: Consolas, "Courier New", monospace;
  font-size: 0.95rem;
  line-height: 1.6;
  resize: vertical;
}

.result-area {
  background: #1f2937;
  color: #f8fafc;
}

.query-table-wrap {
  overflow-x: auto;
}

.query-table input {
  min-width: 180px;
}

.status-message {
  border-radius: 8px;
  border: 1px solid #d8dee8;
  padding: 12px 14px;
  background: #f8fafc;
  color: #334155;
}

.status-message.is-success {
  border-color: #9dd7b0;
  background: #eefaf2;
  color: #14532d;
}

.status-message.is-error {
  border-color: #f3a7a7;
  background: #fff1f1;
  color: #8a1f1f;
}

.status-message.is-info {
  border-color: #b8d4f4;
  background: #f0f7ff;
  color: #1e3a5f;
}

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

.stats-grid div {
  border: 1px solid #d8dee8;
  border-radius: 8px;
  padding: 12px;
  background: #fbfcfe;
}

.stats-grid span {
  display: block;
  color: #64748b;
  font-size: 0.82rem;
}

.stats-grid strong {
  display: block;
  color: #111827;
  font-size: 1.05rem;
  word-break: break-word;
}

@media (max-width: 767.98px) {
  header h1 {
    font-size: 1.05rem;
    line-height: 1.2;
  }

  header a.ms-auto img {
    width: 64px;
  }

  .tool-panel {
    padding: 16px;
  }

  .tool-panel__header {
    display: block;
  }

  .tool-panel__header .button-row {
    margin-top: 16px;
  }

  .button-row .btn {
    flex: 1 1 45%;
  }

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

  .query-table thead {
    display: none;
  }

  .query-table,
  .query-table tbody,
  .query-table tr,
  .query-table td {
    display: block;
    width: 100%;
  }

  .query-table tr {
    border-bottom: 1px solid #d8dee8;
    padding: 8px 0;
  }

  .query-table td {
    border: 0;
    padding: 6px 0;
  }

  .query-table input {
    min-width: 0;
    width: 100%;
  }

  .query-table .text-end {
    text-align: left !important;
  }
}
