:root {
  --ink: #0f2439;
  --slate: #2f4862;
  --bright: #1e7ac9;
  --accent: #fe7f2d;
  --paper: #f7fafc;
  --border: #dce9f6;
}

body {
  margin: 0;
  font-family: "Avenir Next", "Segoe UI", sans-serif;
  background:
    radial-gradient(80rem 40rem at 0% 0%, #d8ecff 0%, transparent 65%),
    radial-gradient(80rem 40rem at 100% 0%, #fff2e8 0%, transparent 70%),
    linear-gradient(170deg, #f5fbff 0%, #fffefb 45%, #f6f9fb 100%);
  color: var(--ink);
  line-height: 1.5;
}

.layout {
  display: flex;
  min-height: 100vh;
}

.sidebar {
  width: 240px;
  background: rgba(255, 255, 255, 0.88);
  padding: 24px;
  box-sizing: border-box;
  border-right: 1px solid var(--border);
  box-shadow: 0 6px 24px rgba(15, 36, 57, 0.06);
}

.brand {
  font-size: 28px;
  font-weight: 700;
  margin-bottom: 8px;
  color: var(--ink);
}

.tagline {
  font-size: 13px;
  color: var(--slate);
  margin-bottom: 24px;
}

.sidebar nav a {
  display: block;
  color: var(--slate);
  text-decoration: none;
  margin-bottom: 12px;
  font-weight: 500;
  font-size: 0.95rem;
  padding: 8px 12px;
  border-radius: 8px;
  transition: background 0.2s, color 0.2s;
}

.sidebar nav a:hover {
  background: #ebf5ff;
  color: var(--bright);
}

.sidebar nav a.active {
  background: var(--bright);
  color: #fff;
}

.auth-section {
  margin-top: auto;
  padding-top: 24px;
  border-top: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.auth-status {
  font-size: 13px;
  color: #22c55e;
  font-weight: 500;
}

.logout-button {
  width: 100%;
  padding: 8px 12px;
  background: var(--ink);
  color: white;
  border: none;
  border-radius: 8px;
  font-size: 13px;
  cursor: pointer;
  transition: background 0.2s;
  margin: 0;
  font-weight: 600;
}

.logout-button:hover {
  background: #081729;
}

.content {
  flex: 1;
  padding: 32px 40px;
  max-width: 1200px;
}

.section {
  margin-bottom: 48px;
}

.section h1, .section h2 {
  margin: 0 0 8px;
  color: var(--ink);
}

.section-subtitle {
  margin-top: -8px;
  margin-bottom: 24px;
  color: var(--slate);
  font-size: 14px;
  line-height: 1.6;
}

.cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 16px;
  margin-bottom: 24px;
}

.card, .status-box, .response-box {
  background: rgba(255, 255, 255, 0.88);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 20px;
  box-shadow: 0 6px 24px rgba(15, 36, 57, 0.06);
}

.card span {
  display: block;
  color: var(--slate);
  font-size: 13px;
  margin-bottom: 8px;
}

.card strong {
  font-size: 24px;
  color: var(--ink);
}

.status-box h3 {
  margin: 0 0 12px;
  color: var(--ink);
  font-size: 1rem;
}

.status-box ul {
  margin: 0;
  padding-left: 0;
  list-style: none;
}

.status-box li {
  padding: 6px 0;
  color: var(--slate);
  font-size: 14px;
}

table {
  width: 100%;
  border-collapse: collapse;
  background: rgba(255, 255, 255, 0.88);
  border: 1px solid var(--border);
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 6px 24px rgba(15, 36, 57, 0.06);
}

th, td {
  padding: 14px 16px;
  border-bottom: 1px solid var(--border);
  text-align: left;
  font-size: 14px;
}

th {
  background: #f0f6fc;
  color: var(--ink);
  font-weight: 600;
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

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

tr:hover {
  background: #fafbfc;
}

input, select, textarea {
  width: 100%;
  box-sizing: border-box;
  margin-top: 8px;
  margin-bottom: 16px;
  padding: 12px 14px;
  border-radius: 10px;
  border: 1px solid #bfd4e8;
  background: #fff;
  color: var(--ink);
  font: inherit;
  font-size: 14px;
  transition: border-color 0.2s, box-shadow 0.2s;
}

input:focus, select:focus, textarea:focus {
  outline: none;
  border-color: var(--bright);
  box-shadow: 0 0 0 3px rgba(30, 122, 201, 0.15);
}

button {
  cursor: pointer;
  background: var(--ink);
  color: #fff;
  border: none;
  border-radius: 10px;
  padding: 12px 20px;
  font: inherit;
  font-weight: 600;
  font-size: 14px;
  transition: background 0.2s, transform 0.1s;
}

button:hover {
  background: #081729;
}

button:active {
  transform: scale(0.98);
}

.inline-form {
  display: flex;
  gap: 12px;
  align-items: flex-end;
  margin-bottom: 16px;
}

.inline-form input {
  margin: 0;
  flex: 1;
  max-width: 320px;
}

.inline-form button {
  width: auto;
  margin: 0;
}

.playground-form label {
  display: block;
  font-weight: 600;
  color: var(--ink);
  margin: 16px 0 8px;
  font-size: 14px;
}

.playground-form select,
.playground-form textarea {
  margin: 0 0 16px;
}

.playground-form button {
  width: auto;
  min-width: 140px;
}

.response-box {
  margin-top: 24px;
}

.response-box h3 {
  margin: 0 0 12px;
  color: var(--ink);
  font-size: 1rem;
}

pre {
  white-space: pre-wrap;
  word-break: break-word;
  background: var(--ink);
  color: #fff;
  padding: 16px;
  border-radius: 8px;
  font-family: "SF Mono", "Fira Code", monospace;
  font-size: 13px;
  line-height: 1.6;
  margin: 0;
}

.status-message {
  margin: 8px 0 16px;
  padding: 12px 16px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.88);
  color: var(--slate);
  border: 1px solid var(--border);
  font-size: 14px;
}

.ok {
  color: #16a34a;
  font-weight: 500;
}

.error {
  color: #dc2626;
  font-weight: 500;
}

.muted-cell {
  color: var(--slate);
}

.nowrap-cell {
  white-space: nowrap;
}

@media (max-width: 768px) {
  .layout {
    flex-direction: column;
  }
  .sidebar {
    width: 100%;
    border-right: none;
    border-bottom: 1px solid var(--border);
  }
  .content {
    padding: 24px;
  }
  .cards {
    grid-template-columns: 1fr;
  }
  .inline-form {
    flex-direction: column;
    align-items: stretch;
  }
  .inline-form input {
    max-width: none;
  }
}
