:root {
  color-scheme: light;
  --ink: #172033;
  --muted: #667085;
  --line: #dde3ea;
  --paper: #f7f8fb;
  --panel: #ffffff;
  --accent: #16a085;
  --accent-2: #f59e0b;
  --danger: #c2410c;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  display: grid;
  grid-template-columns: 260px 1fr;
  background: var(--paper);
  color: var(--ink);
  font-family: Arial, Helvetica, sans-serif;
}

button,
select {
  font: inherit;
}

button {
  border: 0;
  border-radius: 8px;
  padding: 11px 16px;
  background: var(--accent);
  color: white;
  font-weight: 700;
  cursor: pointer;
}

button.secondary {
  background: #172033;
}

button:disabled {
  cursor: wait;
  opacity: .65;
}

.sidebar {
  position: sticky;
  top: 0;
  height: 100vh;
  padding: 26px 20px;
  display: flex;
  flex-direction: column;
  gap: 28px;
  background: #101828;
  color: white;
}

.eyebrow {
  margin: 0 0 6px;
  color: #9ee6d5;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: .08em;
  font-weight: 800;
}

.sidebar h1 {
  margin: 0;
  font-size: 24px;
  line-height: 1.05;
}

nav {
  display: grid;
  gap: 8px;
}

nav a {
  color: #e6eef8;
  text-decoration: none;
  padding: 10px 12px;
  border-radius: 8px;
}

nav a:hover {
  background: rgba(255, 255, 255, .08);
}

nav a.active {
  background: rgba(158, 230, 213, .16);
  color: #ffffff;
}

.status {
  margin-top: auto;
  padding: 12px;
  border: 1px solid rgba(255, 255, 255, .14);
  border-radius: 8px;
  color: #d8e2ee;
  font-size: 13px;
  line-height: 1.35;
}

.workspace {
  padding: 28px;
  display: grid;
  gap: 20px;
  align-content: start;
}

.page {
  display: none;
  gap: 20px;
  align-content: start;
}

.page.active {
  display: grid;
}

.topbar,
.panel {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 22px;
}

h2,
h3,
p {
  margin-top: 0;
}

h2 {
  margin-bottom: 6px;
  font-size: 28px;
}

h3 {
  margin-bottom: 0;
  font-size: 20px;
}

p {
  margin-bottom: 0;
  color: var(--muted);
}

.panel {
  padding: 18px;
}

.metric-grid,
.shortcut-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  gap: 12px;
}

.metric,
.shortcut {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 18px;
}

.metric span {
  display: block;
  margin-bottom: 10px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: .08em;
}

.metric strong {
  display: block;
  margin-bottom: 6px;
  font-size: 34px;
}

.shortcut {
  color: inherit;
  text-decoration: none;
}

.shortcut:hover {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(22, 160, 133, .1);
}

.shortcut strong {
  display: block;
  margin-bottom: 8px;
}

.panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 14px;
}

.panel-head span {
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

.trend-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 12px;
}

.trend,
.item {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 14px;
  background: #fff;
}

.trend.selected {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(22, 160, 133, .12);
}

.trend strong,
.item strong {
  display: block;
  margin-bottom: 8px;
}

.meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
}

.pill {
  border-radius: 999px;
  padding: 6px 9px;
  background: #edf2f7;
  color: #344054;
  font-size: 12px;
  font-weight: 700;
}

.creator {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 280px;
  gap: 18px;
  align-items: stretch;
}

.controls {
  display: grid;
  grid-template-columns: repeat(2, minmax(180px, 1fr)) auto;
  gap: 12px;
  margin-top: 16px;
  align-items: end;
}

label {
  display: grid;
  gap: 7px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

select {
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px 11px;
  background: white;
  color: var(--ink);
}

.preview {
  min-height: 210px;
  border-radius: 8px;
  border: 1px solid var(--line);
  display: grid;
  place-items: center;
  overflow: hidden;
  background: #fef7ed;
}

.preview iframe {
  width: 118px;
  height: 210px;
  border: 0;
  transform: scale(1.55);
  pointer-events: none;
}

.preview span {
  color: var(--muted);
  font-weight: 700;
}

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

.item {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 12px;
  align-items: center;
}

.item.single {
  grid-template-columns: 1fr;
}

.item p {
  line-height: 1.45;
}

details {
  margin-top: 12px;
}

summary {
  cursor: pointer;
  color: var(--accent);
  font-weight: 800;
}

.strategy-box {
  margin-top: 18px;
  border-left: 4px solid var(--accent-2);
  background: #fff7ed;
  padding: 14px;
  border-radius: 8px;
}

.strategy-box strong {
  display: block;
  margin-bottom: 6px;
}

.actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: end;
}

a.open {
  color: var(--accent);
  font-weight: 800;
  text-decoration: none;
}

.empty {
  color: var(--muted);
  padding: 16px;
  border: 1px dashed var(--line);
  border-radius: 8px;
}

@media (max-width: 860px) {
  body {
    grid-template-columns: 1fr;
  }

  .sidebar {
    position: static;
    height: auto;
  }

  .workspace {
    padding: 16px;
  }

  .topbar,
  .creator,
  .controls,
  .item {
    grid-template-columns: 1fr;
  }

  .topbar {
    align-items: stretch;
  }
}
