:root {
  --bg-0: #fff8dd;
  --bg-1: #fff4d6;
  --surface: rgba(255, 255, 255, 0.76);
  --surface-solid: #ffffff;
  --text: #2f2411;
  --muted: #7b6a45;
  --line: rgba(122, 82, 0, 0.18);
  --brand: #f6c445;
  --brand-dark: #7a5200;
  --brand-soft: #fff1bf;
  --accent: #ffe8a3;
  --danger: #b91c1c;
  --shadow: 0 18px 44px rgba(122, 82, 0, 0.18);
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  min-height: 100%;
  color: var(--text);
  font-family: "Manrope", sans-serif;
  background: radial-gradient(circle at 8% 8%, #fffdf4 0%, var(--bg-0) 38%, var(--bg-1) 100%);
}

.ambient {
  position: fixed;
  inset: 0;
  background-image: linear-gradient(130deg, rgba(246, 196, 69, 0.22), transparent 48%),
    linear-gradient(315deg, rgba(122, 82, 0, 0.09), transparent 40%);
  pointer-events: none;
}

.layout {
  position: relative;
  z-index: 1;
  max-width: 1200px;
  margin: 0 auto;
  padding: 20px;
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: 16px;
  align-items: start;
  min-height: 100vh;
}

.glass {
  border: 1px solid var(--line);
  border-radius: 22px;
  background: var(--surface);
  box-shadow: var(--shadow);
  backdrop-filter: blur(10px);
}

.sidebar {
  padding: 20px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  position: sticky;
  top: 20px;
  max-height: calc(100vh - 40px);
  overflow-y: auto;
  overscroll-behavior: contain;
  background: linear-gradient(180deg, rgba(109, 76, 29, 0.96) 0%, rgba(139, 106, 51, 0.94) 100%);
  border-color: rgba(255, 232, 163, 0.34);
}

.logo-kicker {
  margin: 0;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.16em;
  color: #f3e4b5;
  text-transform: uppercase;
}

.sidebar h1 {
  font-family: "Space Grotesk", sans-serif;
  margin: 8px 0 4px;
  color: #fffaf0;
}

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

.sidebar .muted {
  color: #f3e4b5;
}

.nav {
  display: grid;
  gap: 8px;
  margin-top: 20px;
}

.nav-btn,
.btn {
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 11px 14px;
  background: var(--surface-solid);
  color: var(--text);
  font: inherit;
  font-weight: 700;
  cursor: pointer;
  transition: transform 140ms ease, background 140ms ease;
}

.nav-btn:hover,
.btn:hover {
  transform: translateY(-1px);
}

.nav-btn.active {
  background: linear-gradient(120deg, #f6c445 0%, #e8b22a 100%);
  border-color: rgba(246, 196, 69, 0.72);
  color: #2f2411;
}

.sidebar .nav-btn {
  background: rgba(255, 250, 240, 0.11);
  color: #fffaf0;
  border-color: rgba(255, 232, 163, 0.35);
}

.sidebar .nav-btn:hover {
  background: rgba(255, 250, 240, 0.19);
}

.sidebar .nav-btn.active:hover {
  background: linear-gradient(120deg, #f6c445 0%, #e8b22a 100%);
}

.status {
  margin-top: 20px;
  font-size: 13px;
  font-weight: 700;
  color: #fff1bf;
}

.content {
  display: grid;
  gap: 14px;
}

.content-shell {
  position: sticky;
  top: 20px;
  max-height: calc(100vh - 40px);
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: 18px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.84) 0%, rgba(255, 253, 245, 0.78) 100%);
}

.panel {
  display: none;
  animation: reveal 240ms ease;
  gap: 14px;
}

.panel.active {
  display: grid;
}

.panel-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

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

.kpi-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}

.kpi {
  background: linear-gradient(180deg, #ffffff 0%, #fffbef 100%);
  border-radius: 16px;
  border: 1px solid var(--line);
  padding: 14px;
}

.kpi p {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.kpi h4 {
  margin: 8px 0 0;
  font-size: 28px;
  font-family: "Space Grotesk", sans-serif;
  color: var(--brand-dark);
}

.card {
  padding: 16px;
}

.card h3 {
  margin: 0 0 12px;
}

.row {
  display: grid;
  gap: 12px;
}

.two-col {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.stack {
  display: grid;
  gap: 10px;
}

.stack-item {
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 10px;
  background: linear-gradient(180deg, #ffffff 0%, #fffef8 100%);
}

.stack-item strong {
  display: block;
  margin-bottom: 2px;
}

.article-list {
  display: grid;
  gap: 10px;
}

.article-item {
  display: grid;
  gap: 8px;
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 12px;
  background: linear-gradient(180deg, #ffffff 0%, #fff9e8 100%);
}

.article-item strong {
  font-size: 16px;
  line-height: 1.4;
  color: var(--brand-dark);
}

.article-meta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.chip {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: 4px 10px;
  font-size: 12px;
  font-weight: 800;
  background: #fff1bf;
  border: 1px solid #efd27d;
  color: #6f4a00;
}

.article-summary {
  margin: 0;
  color: #4e3c1d;
  font-size: 13px;
  line-height: 1.5;
}

.article-preview-list {
  margin: 0;
  padding-left: 18px;
  color: #66502a;
  display: grid;
  gap: 4px;
  font-size: 13px;
}

.badge {
  display: inline-flex;
  border-radius: 999px;
  padding: 4px 10px;
  font-size: 12px;
  font-weight: 800;
  border: 1px solid transparent;
}

.badge.draft {
  background: #fff8dd;
  color: #7a5200;
  border-color: #f0d46f;
}

.badge.published {
  background: #f0fdf4;
  color: #166534;
  border-color: #bbf7d0;
}

.form-grid {
  display: grid;
  gap: 12px;
}

label {
  display: grid;
  gap: 6px;
  font-size: 13px;
  font-weight: 700;
}

input,
textarea,
select {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 10px;
  font: inherit;
  color: var(--text);
  background: var(--surface-solid);
}

input:focus,
textarea:focus,
select:focus {
  outline: 2px solid rgba(246, 196, 69, 0.5);
  outline-offset: 1px;
  border-color: rgba(246, 196, 69, 0.72);
}

textarea {
  resize: vertical;
}

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

.btn.primary {
  background: linear-gradient(130deg, #f6c445, #e8b22a);
  color: #2f2411;
  border-color: transparent;
}

.btn.ghost {
  background: rgba(255, 255, 255, 0.84);
}

.btn.danger {
  color: var(--danger);
}

.content .panel-head h2 {
  color: #6d4c1d;
}

@keyframes reveal {
  from {
    opacity: 0;
    transform: translateY(6px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (max-width: 1040px) {
  .layout {
    grid-template-columns: 1fr;
    min-height: unset;
  }

  .sidebar {
    position: static;
    max-height: none;
    overflow-y: visible;
  }

  .content-shell {
    position: static;
    max-height: none;
    overflow-y: visible;
    padding: 14px;
  }

  .kpi-grid,
  .two-col {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 780px) {
  .layout {
    padding: 14px;
    gap: 12px;
  }

  .sidebar,
  .content-shell {
    border-radius: 18px;
  }

  .panel-head {
    flex-direction: column;
    align-items: stretch;
    gap: 10px;
  }

  .actions {
    flex-direction: column;
  }

  .kpi-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .nav {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 560px) {
  .layout {
    padding: 10px;
  }

  .sidebar,
  .content-shell {
    padding: 14px;
  }

  .sidebar h1 {
    font-size: 26px;
    line-height: 1.1;
  }

  .kpi-grid,
  .two-col {
    grid-template-columns: 1fr;
  }

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

  .nav-btn,
  .btn {
    width: 100%;
    justify-content: center;
  }

  .card,
  .article-item,
  .kpi {
    border-radius: 18px;
  }
}
