:root {
  --primary: #4f46e5;
  --primary-hover: #4338ca;
  --background: #f7f9fc;
  --surface: #ffffff;
  --border: #e5e7eb;
  --text-primary: #111827;
  --text-secondary: #6b7280;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
  background: var(--background);
  color: var(--text-primary);
}

.container {
  max-width: 1000px;
  margin: 2rem auto;
  padding: 0 1rem 2rem;
}

.app-header {
  margin-bottom: 1.2rem;
}

.app-header h1 {
  margin: 0 0 0.35rem;
}

.app-header p {
  margin: 0;
  color: var(--text-secondary);
}

.status-banner {
  display: none;
  margin-bottom: 1rem;
  padding: 0.7rem 0.9rem;
  border-radius: 10px;
  border: 1px solid transparent;
  font-size: 0.92rem;
  font-weight: 600;
}

.status-banner.success {
  display: block;
  background: #ecfdf3;
  color: #166534;
  border-color: #bbf7d0;
}

.status-banner.error {
  display: block;
  background: #fef2f2;
  color: #b91c1c;
  border-color: #fecaca;
}

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 1rem;
  margin-bottom: 1rem;
}

.tabs {
  display: flex;
  gap: 0.6rem;
  flex-wrap: wrap;
  margin-bottom: 1rem;
}

.tab-btn {
  background: #e8ebff;
  color: var(--primary);
}

.tab-btn.active {
  background: var(--primary);
  color: #fff;
}

.tab-panel {
  display: none;
}

.tab-panel.active {
  display: block;
}

h2 {
  margin: 0 0 0.8rem;
  font-size: 1.1rem;
}

.form-grid {
  display: grid;
  gap: 0.8rem;
}

label {
  display: grid;
  gap: 0.35rem;
  font-weight: 600;
  font-size: 0.92rem;
}

input,
textarea,
select {
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 0.62rem 0.75rem;
  font-size: 0.92rem;
  font-family: inherit;
  color: var(--text-primary);
}

textarea {
  resize: vertical;
}

.hint {
  margin: -0.2rem 0 0;
  color: var(--text-secondary);
  font-size: 0.83rem;
}

.hint code {
  font-size: 0.9em;
  background: #f3f4f6;
  padding: 0.12rem 0.35rem;
  border-radius: 4px;
  font-weight: 600;
}

.readonly-input {
  background: #f9fafb;
  color: var(--text-secondary);
}

.curl-row {
  display: grid;
  gap: 0.5rem;
}

.curl-label-full {
  display: block;
  margin: 0;
}

.curl-box {
  margin: 0;
  padding: 0.75rem;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: #0f172a;
  color: #e2e8f0;
  font-size: 0.8rem;
  line-height: 1.45;
  overflow-x: auto;
  white-space: pre-wrap;
  word-break: break-all;
  min-height: 3.5rem;
}

button {
  border: 0;
  border-radius: 8px;
  padding: 0.65rem 0.95rem;
  background: var(--primary);
  color: #fff;
  cursor: pointer;
  font-weight: 600;
  width: fit-content;
}

button:hover {
  background: var(--primary-hover);
}

.result-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.8rem;
  margin-bottom: 0.8rem;
}

.danger-btn {
  background: #dc2626;
}

.danger-btn:hover {
  background: #b91c1c;
}

.output {
  margin: 0;
  padding: 0.8rem;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: #fbfcfe;
  max-height: 350px;
  overflow: auto;
  font-size: 0.86rem;
}
