.sql-uppercase-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;
  box-shadow: 0 8px 24px rgba(32, 45, 64, 0.08);
  padding: 24px;
}

.tool-panel__header {
  align-items: flex-start;
  display: flex;
  gap: 16px;
  justify-content: space-between;
  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;
}

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

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

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

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

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

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

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

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

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

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

  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%;
  }

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