:root {
  --bg: #f2f6fb;
  --panel: #ffffff;
  --panel-alt: #eef4ff;
  --line: #d4dfef;
  --text: #112033;
  --muted: #5d7088;
  --accent: #0c8f6a;
  --accent-dark: #08694d;
  --danger: #c44f3a;
  --shadow: 0 24px 60px rgba(17, 32, 51, 0.12);
  --radius-lg: 28px;
  --radius-md: 18px;
  --radius-sm: 12px;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: "Segoe UI", "Helvetica Neue", sans-serif;
  color: var(--text);
  background:
    radial-gradient(circle at top left, rgba(12, 143, 106, 0.12), transparent 28%),
    linear-gradient(180deg, #f9fbfe 0%, var(--bg) 100%);
}

button,
input {
  font: inherit;
}

.app-shell {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 340px 1fr;
}

.sidebar {
  padding: 40px 32px;
  background: linear-gradient(180deg, #102741 0%, #173758 100%);
  color: #eff6ff;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.sidebar h1,
.content h2 {
  margin: 0;
  line-height: 1;
}

.sidebar h1 {
  font-size: 2.6rem;
}

.copy {
  color: rgba(239, 246, 255, 0.78);
  line-height: 1.6;
  margin-top: 18px;
}

.eyebrow {
  text-transform: uppercase;
  letter-spacing: 0.16em;
  font-size: 0.75rem;
  margin: 0 0 14px;
  color: inherit;
  opacity: 0.72;
}

.status-card,
.panel {
  background: var(--panel);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
}

.status-card {
  padding: 24px;
  color: #102741;
}

.status-card p {
  color: var(--muted);
  margin-bottom: 0;
  line-height: 1.5;
}

.status-label {
  display: inline-block;
  margin-bottom: 12px;
  color: var(--accent-dark);
  font-size: 0.82rem;
  font-weight: 700;
}

.content {
  padding: 40px;
  display: grid;
  gap: 28px;
}

.panel {
  padding: 28px;
}

.panel-head {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 24px;
}

.panel-head.compact {
  margin-bottom: 18px;
}

.panel-head h2 {
  font-size: 2rem;
}

.topic-form {
  display: grid;
  grid-template-columns: 1.4fr 1fr auto;
  gap: 16px;
  align-items: end;
}

.topic-form label {
  display: grid;
  gap: 10px;
  color: var(--muted);
  font-size: 0.95rem;
}

.topic-form input {
  width: 100%;
  padding: 14px 16px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--line);
  background: #fbfdff;
}

.form-actions {
  display: flex;
  gap: 12px;
}

.primary-button,
.ghost-button,
.topic-actions button {
  border: 0;
  border-radius: 999px;
  padding: 12px 18px;
  cursor: pointer;
  transition: transform 120ms ease, background 120ms ease, color 120ms ease;
}

.primary-button {
  background: var(--accent);
  color: white;
  font-weight: 700;
}

.primary-button:hover,
.ghost-button:hover,
.topic-actions button:hover {
  transform: translateY(-1px);
}

.ghost-button,
.topic-actions button {
  background: var(--panel-alt);
  color: var(--text);
}

.topic-list {
  display: grid;
  gap: 14px;
}

.topic-card {
  border: 1px solid var(--line);
  background: #fbfdff;
  border-radius: var(--radius-md);
  padding: 18px 20px;
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: center;
}

.topic-main code {
  display: inline-block;
  padding: 6px 10px;
  border-radius: 999px;
  background: rgba(12, 143, 106, 0.1);
  color: var(--accent-dark);
  font-size: 0.95rem;
  font-weight: 700;
}

.topic-main p {
  margin: 12px 0 0;
  color: var(--muted);
}

.topic-actions {
  display: flex;
  gap: 10px;
}

.topic-actions button[data-action="delete"] {
  color: var(--danger);
}

.message {
  margin: 6px 0 0;
  color: var(--muted);
}

.message[data-type="success"] {
  color: var(--accent-dark);
}

.message[data-type="error"] {
  color: var(--danger);
}

.empty-state {
  margin: 0;
  padding: 24px;
  text-align: center;
  color: var(--muted);
  border: 1px dashed var(--line);
  border-radius: var(--radius-md);
}

.hidden {
  display: none;
}

@media (max-width: 980px) {
  .app-shell {
    grid-template-columns: 1fr;
  }

  .topic-form {
    grid-template-columns: 1fr;
  }

  .topic-card {
    flex-direction: column;
    align-items: start;
  }
}
