.wrap {
  max-width: 760px;
  margin: 0 auto;
  padding: 0 20px 60px;
}

.schema-card {
  padding: 16px 24px;
}

.schema-title {
  font-size: 12px;
  color: #64748b;
  margin: 0 0 10px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.schema-tables {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.schema-table {
  background: #f8fafc;
  border: 1px solid var(--border-soft);
  border-radius: 8px;
  padding: 8px 14px;
  font-size: 13px;
}

.table-name {
  font-weight: 600;
  color: var(--brand);
  margin-right: 8px;
}

.col-list {
  color: #64748b;
}

.editor-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 12px;
}

.preset-label {
  font-size: 13px;
  color: #555;
  white-space: nowrap;
}

select {
  padding: 6px 10px;
  border: 1.5px solid var(--border);
  border-radius: 8px;
  font: inherit;
  font-size: 13px;
  flex: 1;
}

#sql-input {
  width: 100%;
  height: 140px;
  padding: 12px 14px;
  border: 1.5px solid var(--border);
  border-radius: 10px;
  font-family: 'Menlo', 'Consolas', 'Courier New', monospace;
  font-size: 14px;
  line-height: 1.6;
  resize: vertical;
  box-sizing: border-box;
  color: #1e293b;
  background: #fafafa;
}

#sql-input:focus {
  outline: none;
  border-color: var(--brand);
  background: #fff;
}

.btn-row {
  display: flex;
  gap: 10px;
  margin-top: 12px;
}

button {
  padding: 9px 18px;
  border: 1px solid #ccc;
  border-radius: 8px;
  background: #fff;
  font: inherit;
  font-size: 14px;
  cursor: pointer;
  transition: background 0.15s;
}

button:hover { background: #f0f0f0; }

.btn-primary {
  background: var(--brand);
  color: #fff;
  border-color: var(--brand);
  font-weight: 600;
}

.btn-primary:hover { background: var(--brand-dark); }

.result-label {
  font-size: 13px;
  color: #64748b;
  margin: 0 0 12px;
}

#result-area table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}

#result-area th {
  padding: 8px 12px;
  text-align: left;
  font-size: 11px;
  font-weight: 600;
  color: #64748b;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  border-bottom: 2px solid var(--border);
  background: #f8fafc;
}

#result-area td {
  padding: 8px 12px;
  border-bottom: 1px solid #f0f0f0;
  color: #1e293b;
}

#result-area tr:last-child td {
  border-bottom: none;
}

#result-area tr:hover td {
  background: #f8fafc;
}

.null-cell {
  color: #94a3b8;
  font-style: italic;
}

.error-msg {
  color: #dc2626;
  font-size: 14px;
  font-family: monospace;
  padding: 12px;
  background: #fef2f2;
  border-radius: 8px;
  border: 1px solid #fecaca;
}
