@import url('https://fonts.googleapis.com/css2?family=IBM+Plex+Sans:wght@400;600;700&family=Space+Grotesk:wght@400;600;700&display=swap');

:root {
  color-scheme: light;
  --bg: #f4efe6;
  --ink: #1c1c1c;
  --muted: #5d5d5d;
  --accent: #ff6b4a;
  --accent-dark: #d35239;
  --card: #fff8ee;
  --border: #e7dcca;
  --shadow: 0 18px 40px rgba(36, 24, 12, 0.14);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: "IBM Plex Sans", system-ui, sans-serif;
  background: radial-gradient(circle at top, #fff8ee 0%, #f4efe6 45%, #efe1cf 100%);
  color: var(--ink);
}

a {
  color: inherit;
  text-decoration: none;
}

button {
  font-family: "Space Grotesk", sans-serif;
  font-weight: 600;
  border: none;
  border-radius: 999px;
  padding: 0.7rem 1.4rem;
  background: var(--accent);
  color: #fff;
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

button:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 18px rgba(255, 107, 74, 0.25);
}

button.secondary {
  background: transparent;
  border: 1px solid var(--border);
  color: var(--ink);
}

button.ghost {
  background: transparent;
  border: 1px solid transparent;
  color: var(--ink);
}

button.icon-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  justify-content: center;
  border-radius: 999px;
  border: none;
  background: transparent;
  box-shadow: none;
  padding: 0;
}

button.icon-btn svg {
  width: 24px;
  height: 24px;
  fill: currentColor;
}

button.icon-only svg {
  width: 28px;
  height: 28px;
}

button.icon-only {
  padding: 0;
  min-width: unset;
  width: 42px;
  height: 42px;
}

button.icon-btn:hover {
  transform: none;
  box-shadow: none;
  background: rgba(17, 24, 39, 0.06);
}

.list-actions button.icon-only {
  width: 44px;
  height: 44px;
}

button.danger {
  background: #d64545;
}

button.small {
  padding: 0.45rem 1rem;
  font-size: 0.9rem;
}

button.small.icon-only {
  width: 48px;
  height: 48px;
}

button.small.icon-only svg {
  width: 30px;
  height: 30px;
}

input,
select,
textarea {
  width: 100%;
  padding: 0.7rem 0.8rem;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: #fff;
  font-family: "IBM Plex Sans", sans-serif;
}

label {
  display: grid;
  gap: 0.35rem;
}

form {
  display: grid;
  gap: 1.1rem;
}

textarea {
  min-height: 120px;
  resize: vertical;
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 1.5rem 1.5rem 4rem;
}

.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.2rem 0;
}

.brand {
  font-family: "Space Grotesk", sans-serif;
  font-size: 1.5rem;
  font-weight: 700;
}

.nav-links {
  display: flex;
  gap: 1rem;
  align-items: center;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.lang-select {
  border-radius: 8px;
  padding: 0.4rem 0.8rem;
  border: 1px solid var(--border);
  background: #fff;
  font-family: "Space Grotesk", sans-serif;
  width: 110px;
}

.nav-links button {
  white-space: nowrap;
  min-width: 96px;
}

.hero {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 2.5rem;
  align-items: center;
  padding: 3rem 0 2rem;
}

.hero h1 {
  font-family: "Space Grotesk", sans-serif;
  font-size: 3rem;
  margin: 0 0 1rem;
}

.hero p {
  color: var(--muted);
  font-size: 1.1rem;
  line-height: 1.6;
}

.hero-actions {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1.5rem;
  margin-top: 2rem;
}

.card {
  background: var(--card);
  border-radius: 20px;
  padding: 1.4rem;
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
}

.card > * + * {
  margin-top: 0.9rem;
}

.card h3 {
  font-family: "Space Grotesk", sans-serif;
  margin-top: 0;
}

.sequence-list,
.update-list {
  margin: 0.6rem 0 0;
  padding-left: 1.2rem;
  color: var(--muted);
  line-height: 1.6;
}

.sequence-list li + li,
.update-list li + li {
  margin-top: 0.35rem;
}

.section-title {
  margin-top: 3rem;
  font-family: "Space Grotesk", sans-serif;
  font-size: 1.7rem;
}

.badge {
  background: #fff1dc;
  border-radius: 999px;
  padding: 0.2rem 0.8rem;
  font-size: 0.8rem;
  display: inline-flex;
  gap: 0.4rem;
  align-items: center;
}

.secret-badge {
  gap: 0.6rem;
}

.secret-text {
  font-family: "Space Grotesk", sans-serif;
  letter-spacing: 0.08em;
}

.secret-badge button {
  padding: 0.2rem 0.4rem;
  border-radius: 8px;
}

.toast {
  margin-top: 0.5rem;
  padding: 0.4rem 0.8rem;
  border-radius: 999px;
  background: #1f2933;
  color: #fff;
  font-size: 0.8rem;
  display: inline-block;
}

.panel {
  margin-top: 2.8rem;
  display: grid;
  gap: 1.8rem;
}

.panel h2 {
  font-family: "Space Grotesk", sans-serif;
}

.swagger-card {
  display: grid;
  gap: 0.9rem;
}

.swagger-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
}

.swagger-link-line {
  display: flex;
  gap: 0.6rem;
  flex-wrap: wrap;
  align-items: center;
}

.swagger-link-text {
  font-family: "Space Grotesk", sans-serif;
  font-size: 0.95rem;
  color: var(--ink);
  word-break: break-all;
}

.swagger-frame {
  width: 100%;
  min-height: 680px;
  border: 1px solid var(--border);
  border-radius: 16px;
  background: #fff;
}

@media (max-width: 900px) {
  .swagger-frame {
    min-height: 520px;
  }
}

.row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1.4rem;
}

.row.stack {
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 0.75rem;
}

.client-actions {
  margin-top: 1rem;
}

.split-panel {
  display: grid;
  gap: 2rem;
  margin-top: 1.4rem;
}

.client-header {
  display: flex;
  gap: 1.5rem;
  justify-content: space-between;
  align-items: flex-start;
  flex-wrap: wrap;
}

.client-actions-inline {
  display: flex;
  gap: 0.6rem;
  align-items: center;
  flex-wrap: wrap;
}

.list-grid {
  display: grid;
  grid-template-columns: minmax(200px, 1fr) auto minmax(200px, 1fr);
  gap: 1.4rem;
  align-items: stretch;
  margin-top: 1rem;
}

.list-box {
  border: 1px solid var(--border);
  border-radius: 14px;
  background: #fff;
  padding: 1rem;
  min-height: 180px;
  display: grid;
  gap: 0.6rem;
  align-content: start;
}

.list-title {
  font-weight: 600;
  font-size: 0.85rem;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.list-item {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.95rem;
}

.list-item input {
  width: auto;
}

.list-empty {
  color: var(--muted);
  font-size: 0.9rem;
}

.list-actions {
  display: grid;
  gap: 0.6rem;
  justify-items: center;
}

.list-actions button {
  width: 90px;
}

.list-controls {
  display: grid;
  grid-template-columns: 1fr auto auto;
  gap: 1rem;
  margin-top: 1.2rem;
  align-items: center;
}

.list-controls .icon-btn {
  width: 44px;
  height: 44px;
}

.tag {
  margin-left: auto;
  font-size: 0.75rem;
  padding: 0.15rem 0.5rem;
  border-radius: 999px;
  background: #f7e4cf;
  color: #6d4a2c;
}

.table {
  display: grid;
  gap: 0.9rem;
}

.table-item {
  padding: 1rem;
  border-radius: 14px;
  border: 1px solid var(--border);
  background: #fff;
}

.actions {
  display: flex;
  gap: 0.7rem;
  flex-wrap: wrap;
  margin-top: 0.6rem;
}

.muted {
  color: var(--muted);
  font-size: 0.95rem;
}

.chip-row {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.footer {
  margin-top: 4rem;
  text-align: center;
  color: var(--muted);
}

.load-more {
  display: grid;
  justify-items: center;
  gap: 0.6rem;
  margin-top: 1.5rem;
}

.load-more-sentinel {
  width: 100%;
  height: 1px;
}

.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(24, 19, 12, 0.45);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
  z-index: 50;
}

.modal {
  background: #fff;
  border-radius: 18px;
  padding: 1.5rem;
  width: min(520px, 95vw);
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
}

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.modal-actions {
  margin-top: 1.5rem;
  display: flex;
  justify-content: flex-end;
}

@media (max-width: 768px) {
  .hero h1 {
    font-size: 2.2rem;
  }

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

  .list-actions {
    grid-template-columns: repeat(3, 1fr);
    justify-items: stretch;
  }

  .list-actions button {
    width: 100%;
  }

  .list-controls {
    grid-template-columns: 1fr;
  }
}
