:root {
  --bg: #ffffff;
  --ink: #161616;
  --muted: #6d7178;
  --line: #e6e8ec;
  --soft: #f6f7f9;
  --softer: #fbfbfc;
  --coral: #ff5a5f;
  --teal: #00a6a6;
  --amber: #f6a623;
  --green: #28a56c;
  --shadow: 0 12px 32px rgba(20, 24, 31, 0.08);
  font-family:
    Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI",
    sans-serif;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  overflow-x: hidden;
}

button,
input,
select,
textarea {
  font: inherit;
}

button {
  cursor: pointer;
}

.shell {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 236px minmax(0, 1fr);
}

.sidebar {
  border-right: 1px solid var(--line);
  padding: 22px 16px;
  display: flex;
  flex-direction: column;
  gap: 22px;
  background: #fcfcfd;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0 8px 10px;
  font-weight: 800;
  letter-spacing: 0;
}

.brand-mark {
  width: 34px;
  height: 34px;
  border-radius: 8px;
  display: grid;
  place-items: center;
  color: #fff;
  background: linear-gradient(135deg, var(--coral), var(--teal));
  box-shadow: 0 8px 20px rgba(255, 90, 95, 0.22);
}

.nav {
  display: grid;
  gap: 4px;
}

.nav button {
  border: 0;
  background: transparent;
  color: #444951;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 9px;
  border-radius: 8px;
  text-align: left;
  font-size: 14px;
  font-weight: 650;
}

.nav button.active,
.nav button:hover {
  background: #f0f3f6;
  color: var(--ink);
}

.nav svg,
.icon {
  width: 18px;
  height: 18px;
  flex: 0 0 auto;
}

.sidebar-card {
  margin-top: auto;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 14px;
  background: #fff;
}

.sidebar-card strong {
  display: block;
  font-size: 13px;
  margin-bottom: 8px;
}

.sidebar-card p {
  margin: 0 0 12px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
}

.main {
  min-width: 0;
}

.topbar {
  min-height: 74px;
  border-bottom: 1px solid var(--line);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 0 28px;
  background: rgba(255, 255, 255, 0.88);
  position: sticky;
  top: 0;
  z-index: 10;
  backdrop-filter: blur(16px);
}

.topbar h1 {
  margin: 0;
  font-size: 23px;
  line-height: 1.15;
  letter-spacing: 0;
}

.topbar p {
  margin: 5px 0 0;
  color: var(--muted);
  font-size: 13px;
}

.controls {
  display: flex;
  gap: 10px;
  align-items: center;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.select,
.input,
.textarea {
  border: 1px solid var(--line);
  background: #fff;
  border-radius: 8px;
  color: var(--ink);
  padding: 10px 12px;
  font-size: 13px;
  min-height: 40px;
}

.button {
  border: 1px solid var(--line);
  background: #fff;
  border-radius: 8px;
  color: var(--ink);
  min-height: 40px;
  padding: 9px 13px;
  font-weight: 750;
  font-size: 13px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.button svg {
  width: 18px;
  height: 18px;
  flex: 0 0 auto;
}

.button.primary {
  border-color: #111;
  background: #111;
  color: #fff;
}

.button.teal {
  border-color: rgba(0, 166, 166, 0.2);
  background: rgba(0, 166, 166, 0.09);
  color: #007575;
}

.button.coral {
  border-color: rgba(255, 90, 95, 0.25);
  background: rgba(255, 90, 95, 0.1);
  color: #c7343a;
}

.content {
  padding: 24px 28px 34px;
  display: grid;
  gap: 18px;
}

.kpis {
  display: grid;
  grid-template-columns: repeat(5, minmax(150px, 1fr));
  gap: 12px;
}

.panel,
.kpi,
.post-card,
.content-card,
.research-item {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 1px 0 rgba(20, 24, 31, 0.02);
}

.kpi {
  padding: 15px;
}

.kpi .label {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
  display: flex;
  justify-content: space-between;
  gap: 8px;
}

.kpi .value {
  margin: 12px 0 7px;
  font-size: 26px;
  font-weight: 850;
  letter-spacing: 0;
}

.trend {
  font-size: 12px;
  color: var(--green);
  font-weight: 750;
}

.trend.warn {
  color: #bf7d00;
}

.grid {
  display: grid;
  grid-template-columns: minmax(280px, 1.1fr) minmax(320px, 1.2fr) minmax(280px, 0.95fr);
  gap: 14px;
}

.panel {
  padding: 18px;
  min-width: 0;
}

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

.panel h2 {
  font-size: 16px;
  margin: 0;
  letter-spacing: 0;
}

.panel .sub {
  margin: 5px 0 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
}

.health-score {
  width: 58px;
  height: 58px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-size: 17px;
  font-weight: 850;
  background:
    radial-gradient(circle at center, #fff 55%, transparent 56%),
    conic-gradient(var(--teal) 0 76%, #eef0f3 76% 100%);
}

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

.post-card {
  display: grid;
  grid-template-columns: 62px 1fr;
  gap: 12px;
  padding: 10px;
  box-shadow: none;
}

.thumb {
  height: 78px;
  border-radius: 8px;
  background:
    linear-gradient(150deg, rgba(0, 166, 166, 0.88), rgba(255, 90, 95, 0.78)),
    var(--soft);
  position: relative;
  overflow: hidden;
}

.thumb::after {
  content: "";
  position: absolute;
  inset: 12px;
  border: 2px solid rgba(255, 255, 255, 0.58);
  border-radius: 8px;
}

.thumb.carousel {
  background:
    linear-gradient(160deg, rgba(246, 166, 35, 0.95), rgba(0, 166, 166, 0.82)),
    var(--soft);
}

.thumb.story {
  background:
    linear-gradient(160deg, #252525, rgba(255, 90, 95, 0.8)),
    var(--soft);
}

.post-meta {
  min-width: 0;
}

.post-meta strong {
  display: block;
  font-size: 13px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.post-meta p {
  margin: 5px 0 9px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.35;
}

.mini-metrics {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.mini-metrics span,
.tag {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 3px 7px;
  border-radius: 7px;
  background: var(--soft);
  color: #4d535b;
  font-size: 11px;
  font-weight: 750;
}

.bar-list {
  display: grid;
  gap: 13px;
}

.bar-row {
  display: grid;
  grid-template-columns: 105px 1fr 40px;
  gap: 10px;
  align-items: center;
  font-size: 12px;
  font-weight: 750;
}

.bar-track {
  height: 9px;
  border-radius: 8px;
  background: #edf0f3;
  overflow: hidden;
}

.bar-fill {
  height: 100%;
  border-radius: inherit;
  background: var(--teal);
}

.bar-fill.coral {
  background: var(--coral);
}

.bar-fill.amber {
  background: var(--amber);
}

.priority-list {
  display: grid;
  gap: 10px;
  counter-reset: priority;
}

.priority {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px;
  display: grid;
  gap: 7px;
  background: var(--softer);
}

.priority strong {
  font-size: 13px;
}

.priority p {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
}

.lab {
  display: grid;
  grid-template-columns: 1fr 330px;
  gap: 14px;
}

.watch-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(260px, 0.7fr);
  gap: 14px;
}

.tabs {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  margin: 0 0 14px;
}

.tab {
  border: 1px solid var(--line);
  background: #fff;
  border-radius: 8px;
  padding: 8px 11px;
  font-size: 12px;
  font-weight: 800;
  color: #4a5058;
}

.tab.active {
  color: #fff;
  background: #111;
  border-color: #111;
}

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

.content-card {
  padding: 14px;
  display: flex;
  flex-direction: column;
  gap: 11px;
  min-height: 390px;
}

.content-card h3 {
  margin: 0;
  font-size: 15px;
  line-height: 1.25;
}

.content-card p,
.content-card li {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
}

.content-card p {
  margin: 0;
}

.content-card ul {
  margin: 0;
  padding-left: 17px;
}

.card-actions {
  margin-top: auto;
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

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

.textarea {
  min-height: 116px;
  resize: vertical;
  line-height: 1.45;
}

.scan-status {
  display: grid;
  gap: 10px;
}

.switch-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px;
  background: var(--softer);
}

.switch-row strong {
  font-size: 13px;
}

.switch-row p {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.4;
}

.switch {
  width: 48px;
  height: 28px;
  border: 0;
  border-radius: 999px;
  background: #d9dde2;
  padding: 3px;
  flex: 0 0 auto;
}

.switch::before {
  content: "";
  display: block;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.18);
  transition: 180ms ease;
}

.switch.on {
  background: var(--teal);
}

.switch.on::before {
  transform: translateX(20px);
}

.status-row {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  border-bottom: 1px solid var(--line);
  padding-bottom: 9px;
  font-size: 12px;
}

.status-row:last-child {
  border-bottom: 0;
  padding-bottom: 0;
}

.status-row span {
  color: var(--muted);
}

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

.research-item {
  padding: 14px;
}

.research-item strong {
  font-size: 13px;
}

.research-item p {
  color: var(--muted);
  margin: 7px 0 10px;
  font-size: 12px;
  line-height: 1.45;
}

.research-item a {
  color: #007575;
  font-size: 12px;
  font-weight: 750;
  text-decoration: none;
}

.toast {
  position: fixed;
  right: 22px;
  bottom: 22px;
  background: #111;
  color: #fff;
  border-radius: 8px;
  padding: 12px 14px;
  font-size: 13px;
  font-weight: 750;
  box-shadow: var(--shadow);
  opacity: 0;
  transform: translateY(12px);
  transition: 180ms ease;
  pointer-events: none;
}

.toast.show {
  opacity: 1;
  transform: translateY(0);
}

@media (max-width: 1180px) {
  .kpis {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .grid,
  .lab,
  .watch-grid,
  .research {
    grid-template-columns: 1fr;
  }

  .content-cards {
    grid-template-columns: 1fr;
  }
}

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

  .sidebar {
    position: sticky;
    top: 0;
    z-index: 20;
    border-right: 0;
    border-bottom: 1px solid var(--line);
    padding: 12px;
    width: 100%;
    max-width: 100vw;
    overflow: hidden;
  }

  .brand {
    padding-bottom: 0;
  }

  .nav {
    grid-template-columns: 1fr;
    width: 100%;
    max-width: 354px;
  }

  .nav button {
    justify-content: flex-start;
    font-size: 12px;
    min-width: 0;
  }

  .sidebar-card {
    display: none;
  }

  .topbar {
    position: static;
    align-items: flex-start;
    flex-direction: column;
    padding: 18px;
    overflow: hidden;
    width: 100%;
    max-width: 100vw;
  }

  .topbar h1 {
    font-size: 22px;
    width: 100%;
    max-width: 330px;
    overflow-wrap: anywhere;
  }

  .topbar p {
    max-width: 330px;
  }

  .controls {
    width: 100%;
    max-width: 354px;
    display: grid;
    grid-template-columns: 1fr 1fr;
    justify-content: stretch;
  }

  .select,
  .button {
    min-width: 0;
  }

  .controls .button.primary {
    grid-column: 1 / -1;
    justify-content: center;
  }

  .content {
    padding: 16px;
  }

  .kpis,
}
