:root {
  --bg: #f7f9fd;
  --panel: #ffffff;
  --text: #172033;
  --muted: #7d8794;
  --blue: #176fff;
  --border: #dde4ef;
  --danger: #d93333;
  --font-main: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Arial, Helvetica, sans-serif;
  --font-regular: 400;
  --font-medium: 500;
  --font-semibold: 600;
  --font-bold: 700;
}

* {
  box-sizing: border-box;
}

html {
  width: 100%;
  overflow-x: hidden;
}

body {
  width: 100%;
  min-width: 0;
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-main);
  font-weight: var(--font-regular);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
  text-rendering: optimizeLegibility;
}

.icon-sprite {
  position: absolute;
  width: 0;
  height: 0;
  overflow: hidden;
}

svg {
  width: 22px;
  height: 22px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

a {
  color: var(--blue);
  text-decoration: none;
}

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

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

.sidebar {
  position: sticky;
  top: 0;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  padding: 24px 18px;
  background: #fff;
  border-right: 1px solid var(--border);
}

.side-brand {
  display: block;
  margin: 0 10px 28px;
}

.side-brand img {
  width: 170px;
}

.side-nav {
  display: grid;
  gap: 8px;
}

.side-nav a {
  display: flex;
  align-items: center;
  gap: 14px;
  min-height: 38px;
  padding: 0 16px;
  border-radius: 8px;
  color: #536176;
  font-size: 14px;
  font-weight: var(--font-semibold);
}

.side-nav svg,
.side-nav .nav-icon {
  width: 19px;
  height: 19px;
  object-fit: contain;
}

.side-nav a:hover,
.side-nav a.active {
  background: #eef4ff;
  color: var(--blue);
}

.side-channel-list {
  display: grid;
  gap: 6px;
  margin: -2px 0 8px 28px;
}

.side-nav .side-channel {
  min-height: 32px;
  padding: 0 10px;
  gap: 10px;
  font-size: 13px;
  font-weight: var(--font-semibold);
}

.side-nav .side-channel.active {
  background: #eef1f6;
  color: var(--blue);
}

.side-nav .side-channel:hover {
  background: #eef1f6;
}

.side-channel img,
.side-channel svg {
  flex: 0 0 auto;
  width: 18px;
  height: 18px;
  border-radius: 5px;
  object-fit: cover;
}

.side-channel span {
  display: block;
  min-width: 0;
  max-width: 150px;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.side-footer {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 42px;
  gap: 10px;
  margin-top: auto;
  padding: 14px;
  border: 1px solid var(--border);
  border-radius: 8px;
  color: var(--muted);
}

.side-footer > span {
  grid-column: 1 / -1;
}

.side-footer form {
  margin: 0;
}

.side-footer button {
  width: 100%;
  min-height: 42px;
}

.side-footer-settings {
  display: grid;
  place-items: center;
  min-height: 42px;
  border-radius: 7px;
  background: #edf4ff;
  color: #536176;
}

.side-footer-settings.active,
.side-footer-settings:hover {
  color: var(--blue);
}

.side-footer-settings svg,
.side-footer-settings img {
  width: 20px;
  height: 20px;
  object-fit: contain;
}

.brand img {
  display: block;
  width: 220px;
  max-width: 46vw;
  height: auto;
}

.nav {
  display: flex;
  align-items: center;
  gap: 14px;
}

.nav form {
  margin: 0;
}

.page {
  width: min(1540px, 100%);
  min-width: 0;
  margin: 0 auto;
  padding: 26px 24px;
}

.login {
  min-height: calc(100vh - 120px);
  display: grid;
  place-items: center;
}

.login .panel {
  width: min(420px, 100%);
}

.login-logo {
  display: block;
  width: 100%;
  margin-bottom: 18px;
}

.heading {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  margin-bottom: 14px;
}

.channel-heading {
  align-items: center;
}

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

h1 {
  margin-bottom: 4px;
  font-size: 28px;
  font-weight: var(--font-bold);
}

h2 {
  margin-bottom: 14px;
  font-size: 20px;
  font-weight: var(--font-semibold);
}

p,
.label,
.hint {
  color: var(--muted);
  font-weight: var(--font-regular);
}

.hint {
  margin-bottom: 0;
  font-size: 14px;
}

.panel,
.card {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 8px;
  box-shadow: 0 12px 32px rgba(23, 32, 51, 0.06);
}

.panel {
  padding: 22px;
  margin-bottom: 18px;
}

.grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  margin-bottom: 18px;
}

.dashboard-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  min-width: 0;
  margin-bottom: 16px;
  padding-bottom: 18px;
  border-bottom: 1px solid var(--border);
}

.channel-title {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  min-width: 0;
}

.channel-title > div:not(.channel-avatar) {
  min-width: 0;
}

.channel-avatar {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: #eef4ff;
  color: var(--blue);
  font-size: 24px;
  overflow: hidden;
  flex: 0 0 42px;
  margin-top: 2px;
}

.channel-avatar svg {
  width: 24px;
  height: 24px;
}

.channel-avatar img {
  display: block;
  width: 34px;
  height: 34px;
  border-radius: 5px;
  object-fit: cover;
}

.star {
  color: #98a4b5;
  font-size: 18px;
}

.top-actions {
  display: flex;
  align-items: center;
  gap: 14px;
  flex: 0 0 auto;
  min-width: 0;
  white-space: nowrap;
}

button.is-loading {
  position: relative;
  min-width: 112px;
  padding-left: 34px;
  opacity: 0.9;
  cursor: progress;
}

button.is-loading::before {
  content: "";
  position: absolute;
  left: 14px;
  top: 50%;
  width: 12px;
  height: 12px;
  margin-top: -9px;
  border: 2px solid rgba(255, 255, 255, 0.55);
  border-top-color: #fff;
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

.period-switch {
  display: inline-flex;
  padding: 4px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: #fff;
}

.period-switch a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 32px;
  min-width: 54px;
  padding: 0 10px;
  border-radius: 6px;
  color: #536176;
  font-size: 13px;
  font-weight: var(--font-semibold);
  line-height: 1.05;
  white-space: nowrap;
}

.period-switch a.active {
  background: #eef4ff;
  color: var(--blue);
}

.soft-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  padding: 0 16px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: #fff;
  color: var(--blue);
  font-weight: var(--font-semibold);
}

.export-button {
  flex: 0 0 42px;
  width: 42px;
  min-width: 42px;
  padding: 0;
}

.export-button svg {
  width: 18px;
  height: 18px;
}

.date-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 42px;
  padding: 0 14px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: #fff;
  color: #536176;
  font-size: 14px;
}

.date-pill svg {
  width: 16px;
  height: 16px;
  color: var(--muted);
}

.update-label {
  display: inline-flex;
  align-items: center;
  justify-content: flex-end;
  min-height: 42px;
  min-width: 170px;
  margin-right: -7px;
  color: var(--muted);
  font-size: 13px;
  font-weight: var(--font-regular);
  white-space: nowrap;
}

.top-actions button {
  min-width: 148px;
  white-space: nowrap;
}

.refresh-icon,
.logout-icon {
  display: none;
}

.channel-tabs {
  display: flex;
  gap: 8px;
  margin: -4px 0 16px;
}

.channel-tabs a {
  display: inline-flex;
  align-items: center;
  min-height: 34px;
  padding: 0 12px;
  border-radius: 7px;
  color: #536176;
  font-size: 14px;
  font-weight: var(--font-semibold);
}

.channel-tabs a.active {
  background: #eef4ff;
  color: var(--blue);
}

.tab-label-mobile {
  display: none;
}

.placeholder-card {
  padding: 18px 20px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 12px 32px rgba(23, 32, 51, 0.035);
}

.placeholder-card h2 {
  font-size: 18px;
}

.overview-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 16px;
  margin-bottom: 16px;
}

.overview-grid.max-overview-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.hero-graphs {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  margin-bottom: 16px;
}

.hero-stat {
  position: relative;
  display: grid;
  grid-template-columns: 210px minmax(0, 1fr);
  align-items: stretch;
  gap: 22px;
  min-height: 250px;
  padding: 24px 28px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 12px 32px rgba(23, 32, 51, 0.035);
  overflow: hidden;
}

.hero-ghost-icon {
  position: absolute;
  top: 44px;
  left: 155px;
  z-index: 0;
  color: #7d7d7d;
  opacity: 0.78;
  pointer-events: none;
}

.hero-ghost-icon img {
  width: 82px;
  height: 82px;
  object-fit: contain;
  filter: drop-shadow(0 8px 10px rgba(23, 32, 51, 0.16));
}

.hero-copy,
.hero-chart {
  position: relative;
  z-index: 1;
}

.hero-copy {
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  min-width: 0;
  padding-top: 12px;
}

.hero-copy > strong {
  display: block;
  margin-bottom: 18px;
  color: #4c535f;
  font-size: 41px;
  font-weight: var(--font-semibold);
  letter-spacing: 0;
}

.hero-copy > strong.good {
  color: #2ca84d;
}

.hero-copy > strong.bad {
  color: #e5484d;
}

.hero-copy > span {
  order: -1;
  align-self: flex-start;
  margin-bottom: 14px;
  color: #4c535f;
  font-size: 13px;
  font-weight: var(--font-bold);
  text-transform: uppercase;
}

.hero-copy dl {
  display: grid;
  gap: 4px;
  margin: 0;
}

.hero-copy dl div {
  display: grid;
  grid-template-columns: 74px max-content;
  align-items: baseline;
  gap: 0;
}

.hero-copy dt,
.hero-copy dd {
  margin: 0;
  font-size: 17px;
  font-weight: var(--font-bold);
}

.hero-copy dd {
  color: var(--muted);
  font-weight: var(--font-semibold);
}

.followers-hero .hero-copy dt {
  text-align: left;
}

.followers-hero .hero-copy dl div {
  grid-template-columns: 50px max-content;
}

.followers-hero .hero-copy dd {
  text-transform: lowercase;
}

.followers-hero .hero-ghost-icon {
  left: 150px;
}

.hero-chart {
  align-self: stretch;
  min-width: 0;
  display: flex;
  align-items: center;
}

.hero-chart.chart canvas {
  background: transparent;
}

.kpi-card {
  display: flex;
  gap: 14px;
  min-height: 122px;
  padding: 18px 20px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 12px 32px rgba(23, 32, 51, 0.04);
}

.kpi-icon {
  display: grid;
  flex: 0 0 auto;
  place-items: center;
  width: 52px;
  height: 52px;
  border: 1px solid var(--border);
  border-radius: 8px;
  color: var(--blue);
}

.kpi-icon img {
  width: 30px;
  height: 30px;
  object-fit: contain;
  filter: drop-shadow(0 4px 7px rgba(23, 111, 255, 0.22));
}

.kpi-card h2 {
  margin-bottom: 8px;
  font-size: 14px;
}

.kpi-card p {
  margin-bottom: 0;
  font-size: 12px;
  line-height: 1.25;
}

.kpi-value {
  display: flex;
  align-items: baseline;
  gap: 12px;
  margin-bottom: 6px;
  font-size: 26px;
  font-weight: var(--font-semibold);
}

.kpi-value.dual {
  display: grid;
  gap: 3px;
}

.kpi-value strong {
  font-size: inherit;
  font-weight: var(--font-semibold);
  line-height: 1;
}

.kpi-value .secondary {
  color: var(--muted);
}

.kpi-value span {
  font-size: 15px;
  font-weight: var(--font-medium);
}

.good {
  color: #2ca84d;
}

.bad {
  color: #e5484d;
}

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

.post-top-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
  margin-top: 16px;
}

.post-top-grid .wide {
  grid-column: span 2;
}

.graph-card {
  min-width: 0;
  padding: 16px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 12px 32px rgba(23, 32, 51, 0.04);
}

.graph-card.wide {
  grid-column: span 2;
}

.graph-card.small {
  min-height: 250px;
}

.graph-head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}

.graph-head h2 {
  margin-bottom: 4px;
  font-size: 16px;
}

.graph-head p {
  margin-bottom: 0;
  font-size: 13px;
}

.mini-date {
  align-self: start;
  flex: 0 0 auto;
  padding: 7px 10px;
  border: 1px solid var(--border);
  border-radius: 7px;
  background: #fff;
  color: #536176;
  font-size: 12px;
}

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

.data-card-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
  margin-top: 16px;
}

.data-card-grid.max-data-card-grid {
  margin-top: 0;
}

.data-card {
  min-width: 0;
  min-height: 210px;
  padding: 16px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 12px 32px rgba(23, 32, 51, 0.035);
}

.publication-card {
  grid-column: span 2;
}

.data-card-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 12px;
}

.data-card-title h2 {
  margin-bottom: 0;
  font-size: 16px;
}

.data-card-title img {
  width: 20px;
  height: 20px;
  object-fit: contain;
  filter: drop-shadow(0 4px 7px rgba(23, 111, 255, 0.18));
}

.donut-panel {
  display: grid;
  grid-template-columns: 120px minmax(0, 1fr);
  align-items: center;
  gap: 16px;
}

.donut-panel canvas {
  width: 120px;
  height: 120px;
}

.publication-panel {
  display: grid;
  grid-template-columns: 120px minmax(0, 1fr);
  align-items: start;
  gap: 18px;
}

.publication-total {
  display: grid;
  gap: 11px;
  padding-top: 106px;
}

.publication-total span {
  color: var(--muted);
  font-size: 13px;
  font-weight: var(--font-semibold);
}

.publication-total strong {
  color: var(--text);
  font-size: 34px;
  line-height: 1;
}

.publication-total dl {
  display: grid;
  gap: 5px;
  margin: 0;
}

.publication-total dl div {
  display: grid;
  grid-template-columns: 42px max-content;
  gap: 10px;
  align-items: baseline;
}

.publication-total dt,
.publication-total dd {
  margin: 0;
  font-size: 13px;
  font-weight: var(--font-bold);
}

.publication-total dt {
  color: #147ef5;
}

.average-reach-total dt {
  color: #7ed321;
}

.ads-actions-total dt {
  color: #22c55e;
}

.publication-total dd {
  color: var(--muted);
}

.publication-chart {
  min-height: 165px;
}

.popular-post-slider {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.popular-post-slide {
  display: none;
}

.popular-post-slide.active {
  display: block;
}

.popular-post-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.popular-post {
  display: grid;
  grid-template-columns: 108px minmax(0, 1fr);
  gap: 12px;
  min-width: 0;
  color: inherit;
}

.popular-post > img {
  display: block;
  width: 108px;
  height: 78px;
  border-radius: 8px;
  object-fit: cover;
  background: #fff;
}

.popular-post > img[src*="post-placeholder.png"] {
  border: 1px solid #b8bdc4;
  border-radius: 8px;
  object-fit: contain;
  padding: 8px;
}

.popular-post strong {
  display: -webkit-box;
  overflow: hidden;
  color: var(--text);
  font-size: 14px;
  line-height: 1.2;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.popular-post span {
  display: block;
  margin-top: 5px;
  color: var(--muted);
  font-size: 12px;
}

.popular-post-metrics {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 7px;
  color: #6f7479;
  font-size: 12px;
}

.popular-post-metrics span {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  line-height: 1;
}

.popular-post-metrics img {
  width: 15px;
  height: 15px;
  opacity: 0.88;
}

.popular-post-dots {
  display: flex;
  justify-content: center;
  gap: 8px;
  padding-top: 2px;
}

.popular-post-dots button {
  width: 8px;
  height: 8px;
  min-width: 8px;
  min-height: 8px;
  padding: 0;
  border: 0;
  border-radius: 999px;
  background: #c9d4e5;
  line-height: 0;
  cursor: pointer;
}

.popular-post-dots button.active {
  background: #147ef5;
}

.mentions-summary {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  align-items: stretch;
  margin-bottom: 14px;
}

.mentions-summary div {
  display: grid;
  gap: 8px;
  min-height: 96px;
  padding: 16px;
  border: 1px solid #edf1f7;
  border-radius: 8px;
  background: #fbfdff;
}

.mentions-summary span {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.25;
}

.mentions-summary strong {
  align-self: end;
  color: var(--text);
  font-size: 30px;
  line-height: 1;
}

.mention-source-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px 14px;
}

.mention-source {
  display: grid;
  gap: 4px;
  min-width: 0;
  padding: 10px 12px;
  border: 1px solid #edf1f7;
  border-radius: 8px;
  background: #fff;
  color: inherit;
}

.mention-source:hover {
  border-color: #cdd8ea;
  background: #fbfdff;
}

.mention-type {
  color: var(--blue);
  font-size: 11px;
  font-weight: var(--font-bold);
  text-transform: uppercase;
}

.mention-source strong {
  overflow: hidden;
  color: var(--text);
  font-size: 13px;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.mention-source p {
  display: -webkit-box;
  overflow: hidden;
  margin: 0;
  color: #536176;
  font-size: 12px;
  line-height: 1.25;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.mention-source small,
.mention-empty {
  color: var(--muted);
  font-size: 12px;
}

.donut-legend,
.metric-list,
.bar-list {
  display: grid;
  gap: 10px;
}

.donut-legend div,
.metric-list div,
.bar-row div {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  color: #536176;
  font-size: 13px;
}

.donut-legend span {
  display: inline-flex;
  align-items: center;
  gap: 7px;
}

.donut-legend i {
  width: 8px;
  height: 8px;
  border-radius: 50%;
}

.donut-legend strong,
.metric-list strong,
.bar-row strong {
  color: var(--text);
}

.bar-row i {
  display: block;
  height: 7px;
  margin-top: 7px;
  border-radius: 999px;
  background: #edf3fb;
  overflow: hidden;
}

.bar-row b {
  display: block;
  height: 100%;
  border-radius: inherit;
}

.language-bars {
  display: grid;
  gap: 12px;
  padding: 6px 4px 4px;
}

.language-row {
  display: grid;
  gap: 7px;
}

.language-row div {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  color: #536176;
  font-size: 14px;
}

.language-row strong {
  color: var(--text);
}

.language-row i {
  display: block;
  height: 8px;
  border-radius: 999px;
  background: #edf3fb;
  overflow: hidden;
}

.language-row b {
  display: block;
  height: 100%;
  border-radius: inherit;
}

.recent-posts-card {
  min-height: 352px;
}

.recent-posts-card .recent-post-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px 18px;
}

.recent-post {
  display: grid;
  grid-template-columns: 46px minmax(0, 1fr) 52px;
  align-items: center;
  gap: 12px;
  min-width: 0;
  padding-bottom: 9px;
  border-bottom: 1px solid #edf1f7;
  color: inherit;
}

.recent-post:last-child {
  padding-bottom: 0;
  border-bottom: 0;
}

.recent-post-thumb {
  display: grid;
  place-items: center;
  width: 46px;
  height: 46px;
  border-radius: 8px;
  background: #eef4ff;
  color: var(--blue);
  overflow: hidden;
}

.recent-post-thumb img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.recent-post-thumb img[src*="post-placeholder.png"] {
  border: 1px solid #b8bdc4;
  border-radius: 8px;
  object-fit: contain;
  padding: 4px;
  background: #fff;
}

.recent-post-thumb svg {
  width: 20px;
  height: 20px;
}

.recent-post-body {
  min-width: 0;
}

.recent-post-body strong {
  display: -webkit-box;
  overflow: hidden;
  color: var(--text);
  font-size: 13px;
  line-height: 1.25;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.recent-post-body span,
.recent-post-metrics {
  color: var(--muted);
  font-size: 12px;
}

.recent-post-body span {
  display: block;
  margin-top: 4px;
}

.recent-post-metrics {
  display: grid;
  gap: 4px;
  min-width: 52px;
  white-space: nowrap;
}

.recent-post-metrics span {
  display: inline-flex;
  justify-content: flex-end;
  align-items: center;
  gap: 7px;
  color: #6f7479;
  line-height: 1;
}

.recent-post-metrics img {
  display: block;
  width: 15px;
  height: 15px;
  object-fit: contain;
  opacity: 0.88;
}

.compact-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  max-width: 620px;
  gap: 10px;
  margin-bottom: 12px;
}

.heading + .grid {
  grid-template-columns: minmax(220px, 320px);
}

.connection-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.connection-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 18px;
  min-height: 150px;
  padding: 18px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: #fbfdff;
}

.connection-card h3 {
  margin: 0 0 8px;
  font-size: 17px;
}

.connection-card p {
  margin-bottom: 0;
  font-size: 14px;
  line-height: 1.4;
}

.connection-card .connection-status {
  margin-top: 8px;
  color: var(--blue);
  font-weight: var(--font-semibold);
}

.connection-card form {
  margin: 0;
}

.connection-card .button-link,
.connection-card button {
  white-space: nowrap;
}

.ads-check-result {
  grid-column: 1 / -1;
  display: grid;
  gap: 8px;
  padding: 12px;
  border: 1px solid #dce7fb;
  border-radius: 8px;
  background: #f7fbff;
}

.ads-check-result.compact {
  gap: 6px;
  padding: 10px 12px;
}

.ads-check-result strong {
  font-size: 13px;
}

.ads-check-result p {
  margin: 0;
  font-size: 13px;
}

.ads-check-result dl {
  display: grid;
  gap: 5px;
  margin: 0;
}

.ads-check-result dl div {
  display: grid;
  grid-template-columns: 82px minmax(0, 1fr);
  gap: 10px;
  min-width: 0;
  font-size: 12px;
}

.ads-check-result dt,
.ads-check-result dd {
  margin: 0;
}

.ads-check-result dt {
  color: var(--muted);
}

.ads-check-result dd {
  overflow: hidden;
  color: var(--text);
  white-space: nowrap;
  text-overflow: ellipsis;
}

.ads-local-connect ol {
  display: grid;
  gap: 7px;
  margin: 0;
  padding-left: 18px;
}

.ads-local-connect li {
  font-size: 13px;
  line-height: 1.45;
}

.ads-local-connect li code {
  display: inline;
  padding: 1px 5px;
  border: 1px solid #d7e4f8;
  border-radius: 5px;
  background: #ffffff;
  color: var(--text);
  font-size: 12px;
  white-space: nowrap;
}

.ads-archive-download {
  width: fit-content;
  margin-top: 2px;
}

.local-command-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
  align-items: stretch;
}

.local-command-row > code {
  display: block;
  padding: 10px 12px;
  overflow-x: auto;
  border: 1px solid #d7e4f8;
  border-radius: 8px;
  background: #ffffff;
  color: var(--text);
  font-size: 12px;
  line-height: 1.5;
  white-space: nowrap;
}

.copy-command-button {
  min-height: 38px;
  padding: 0 14px;
  border-radius: 8px;
  font-size: 13px;
}

@media (max-width: 720px) {
  .local-command-row {
    grid-template-columns: 1fr;
  }
}

.card {
  padding: 16px;
}

.card.muted {
  opacity: 0.76;
}

.metric {
  display: block;
  margin-bottom: 6px;
  font-size: 30px;
  font-weight: var(--font-bold);
}

.channels-count-card {
  display: flex;
  align-items: baseline;
  gap: 8px;
}

.channels-count-card .metric {
  margin-bottom: 0;
}

.channels-count-card .label {
  color: var(--muted);
  font-size: 16px;
}

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

.inline-form {
  grid-template-columns: 1fr 1fr 120px auto;
  align-items: end;
}

label {
  display: grid;
  gap: 6px;
  color: var(--muted);
  font-size: 14px;
}

input,
select,
button {
  min-height: 42px;
  border-radius: 7px;
  font: inherit;
}

.button-link {
  display: inline-flex;
  align-items: center;
  min-height: 42px;
  padding: 0 16px;
  border-radius: 7px;
  background: var(--blue);
  color: #fff;
}

input,
select {
  width: 100%;
  padding: 0 12px;
  border: 1px solid var(--border);
  background: #fff;
  color: var(--text);
}

button {
  padding: 0 16px;
  border: 0;
  background: var(--blue);
  color: #fff;
  cursor: pointer;
}

.nav button,
.actions button {
  min-height: 34px;
  background: #edf4ff;
  color: var(--blue);
}

.error {
  padding: 10px 12px;
  border-radius: 7px;
  background: #fff0f0;
  color: var(--danger);
}

.notice {
  padding: 10px 12px;
  border-radius: 7px;
  background: #edf8ff;
  color: var(--blue);
}

.memo {
  display: grid;
  gap: 8px;
  padding: 14px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: #f8fbff;
  color: var(--text);
  overflow-wrap: anywhere;
}

.table-wrap {
  overflow-x: auto;
}

table {
  width: 100%;
  min-width: 760px;
  border-collapse: collapse;
}

th,
td {
  padding: 12px 10px;
  border-bottom: 1px solid var(--border);
  text-align: left;
  vertical-align: top;
}

th {
  color: var(--muted);
  font-weight: var(--font-semibold);
}

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

.actions form {
  display: flex;
  gap: 8px;
}

.actions input {
  width: 180px;
  min-height: 34px;
}

.ads-table-card {
  display: grid;
  gap: 18px;
  margin-bottom: 20px;
  padding: 22px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 10px 30px rgba(20, 35, 60, 0.04);
}

.ads-summary {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
  width: 100%;
  margin-bottom: 20px;
}

.ads-summary div {
  display: grid;
  grid-template-columns: 52px minmax(0, 1fr);
  grid-template-rows: auto auto;
  column-gap: 14px;
  row-gap: 6px;
  align-items: center;
  min-width: 0;
  min-height: 122px;
  padding: 18px 20px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 12px 32px rgba(23, 32, 51, 0.04);
}

.ads-summary span {
  display: block;
  grid-column: 2;
  grid-row: 1;
  align-self: end;
  color: var(--text);
  font-size: 14px;
  font-weight: var(--font-bold);
  line-height: 1.2;
  white-space: nowrap;
}

.ads-table td > span {
  display: block;
  margin-top: 4px;
  color: var(--muted);
  font-size: inherit;
}

.ads-summary strong {
  display: block;
  grid-column: 2;
  grid-row: 2;
  align-self: start;
  font-size: 26px;
  font-weight: var(--font-semibold);
  line-height: 1;
}

.ads-summary-icon {
  position: relative;
  display: grid;
  grid-column: 1;
  grid-row: 1 / span 2;
  place-items: center;
  width: 52px;
  height: 52px;
  border: 1px solid var(--border);
  border-radius: 8px;
  color: var(--blue);
  background: #fff;
  font-style: normal;
}

.ads-summary-icon img,
.ads-summary-icon svg {
  width: 30px;
  height: 30px;
  object-fit: contain;
  filter: drop-shadow(0 4px 7px rgba(23, 111, 255, 0.22));
}

.ads-graphs {
  margin-bottom: 20px;
}

.ads-table {
  min-width: 1126px;
  table-layout: fixed;
}

.ads-col-title {
  width: 170px;
}

.ads-col-wide {
  width: 95px;
}

.ads-col-views {
  width: 120px;
}

.ads-col-spent {
  width: 135px;
}

.ads-col-compact {
  width: 62px;
}

.ads-col-spark {
  width: 76px;
}

.ads-col-status {
  width: 112px;
}

.invite-table {
  width: 100%;
  min-width: 760px;
}

.invite-table-card {
  margin-top: 20px;
}

.invite-col-date {
  width: 150px;
}

.invite-col-link {
  width: 350px;
}

.invite-col-subscriptions {
  width: 120px;
}

.invite-col-spacer {
  width: auto;
}

.invite-col-status {
  width: 112px;
}

.invite-title-link {
  max-width: 310px;
}

.invite-table small {
  display: block;
  margin-top: 4px;
  color: var(--muted);
}

.ads-table th:last-child,
.ads-table td:last-child {
  text-align: center;
}

.invite-table th:last-child,
.invite-table td:last-child {
  text-align: center;
}

.ads-table th,
.ads-table td {
  font-size: 14px;
  font-weight: var(--font-regular);
  line-height: 1.25;
  vertical-align: middle;
}

.ads-table th {
  white-space: nowrap;
}

.ad-title-link {
  display: block;
  max-width: 160px;
  color: var(--text);
  font-weight: var(--font-regular);
}

.invite-table .invite-title-link {
  max-width: 310px;
  white-space: nowrap;
}

.ads-metric-pair {
  display: inline-flex !important;
  align-items: center;
  gap: 6px;
  margin: 0 !important;
  color: var(--text) !important;
  font-size: inherit !important;
  white-space: nowrap;
}

.ads-metric-pair strong {
  font-weight: var(--font-regular);
}

.ads-metric-pair b {
  color: #159447;
  font-weight: var(--font-regular);
}

.ads-table small {
  display: inline;
  margin: 0;
  color: inherit;
  font-size: inherit;
  white-space: nowrap;
}

.ads-cpa-spark {
  display: flex !important;
  align-items: flex-end;
  gap: 3px;
  width: 58px;
  height: 28px;
  margin: 0 !important;
  padding: 0 1px;
  color: inherit !important;
  background: linear-gradient(to top, #e8eef7 1px, transparent 1px);
}

.ads-cpa-spark i {
  position: relative;
  display: block;
  flex: 1 1 0;
  min-width: 4px;
  min-height: 2px;
  border-radius: 2px 2px 0 0;
  background: #5ac8fa;
  opacity: 0.9;
}

.ads-cpa-spark i:hover {
  opacity: 1;
}

.ads-cpa-spark i:hover::after {
  content: attr(data-tooltip);
  position: absolute;
  left: 50%;
  bottom: calc(100% + 8px);
  z-index: 4;
  transform: translateX(-50%);
  min-width: 72px;
  padding: 5px 7px;
  border: 1px solid var(--border);
  border-radius: 7px;
  background: #fff;
  box-shadow: 0 8px 20px rgba(23, 32, 51, 0.12);
  color: var(--text);
  font-size: 11px;
  font-style: normal;
  line-height: 1.15;
  text-align: center;
  white-space: nowrap;
}

.ads-cpa-spark i[style*="height: 0%"] {
  opacity: 0.25;
}

.status-pill {
  display: inline-flex;
  align-items: flex-start;
  justify-content: center;
  min-width: 52px;
  height: 25px;
  padding: 6px 7px 0;
  border-radius: 999px;
  background: #edf3fb;
  color: #6f7f94;
  font-size: 9px;
  font-weight: var(--font-regular);
  line-height: 1;
}

.status-pill.active {
  background: #eaf8ef;
  color: #1d8f48;
}

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

.graph-item {
  padding: 14px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: #fbfdff;
}

.graph-item h3 {
  margin: 0 0 6px;
  font-size: 20px;
}

pre {
  max-height: 260px;
  overflow: auto;
  padding: 12px;
  border-radius: 7px;
  background: #101827;
  color: #d6e4ff;
  font-size: 12px;
  white-space: pre-wrap;
}

.chart {
  position: relative;
  width: 100%;
}

.chart canvas {
  display: block;
  width: 100%;
  border-radius: 7px;
  background: #fff;
}

.chart-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 10px;
  padding-left: 44px;
}

.hero-chart + .chart-legend {
  padding-left: 48px;
}

.chart-legend span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--muted);
  font-size: 14px;
  cursor: pointer;
  user-select: none;
  transition: opacity 0.15s ease, color 0.15s ease;
}

.chart-legend span::before {
  content: "";
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--series-color);
}

.chart-legend span.is-off {
  opacity: 0.42;
}

.chart-tooltip {
  position: absolute;
  z-index: 1;
  display: none;
  min-width: 230px;
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.96);
  box-shadow: 0 12px 28px rgba(23, 32, 51, 0.12);
  color: var(--text);
  font-size: 13px;
  pointer-events: none;
}

.chart-tooltip strong {
  display: block;
  margin-bottom: 6px;
}

.chart-tooltip .tooltip-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 54px;
  align-items: center;
  gap: 6px;
  margin-top: 4px;
}

.chart-tooltip .tooltip-row span {
  display: inline-flex;
  align-items: center;
  min-width: 0;
  gap: 6px;
}

.chart-tooltip .tooltip-row strong {
  margin: 0;
  text-align: right;
}

.chart-tooltip i {
  width: 9px;
  height: 9px;
  border-radius: 50%;
}

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

  .sidebar {
    position: static;
    height: auto;
    min-height: 0;
    padding: 14px;
  }

  .side-brand {
    margin-bottom: 12px;
  }

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

  .topbar {
    align-items: flex-start;
    flex-direction: column;
    padding: 12px 16px;
  }

  .nav {
    width: 100%;
    justify-content: space-between;
  }

  .page {
    padding: 16px;
  }

  .grid,
  .inline-form,
  .connection-grid,
  .ads-summary,
  .overview-grid,
  .hero-graphs,
  .dashboard-grid,
  .post-top-grid,
  .data-card-grid {
    grid-template-columns: 1fr;
  }

  .hero-stat {
    grid-template-columns: 1fr;
  }

  .connection-card {
    grid-template-columns: 1fr;
    align-items: start;
  }

  .graph-card.wide {
    grid-column: span 1;
  }

  .post-top-grid .wide {
    grid-column: span 1;
  }

  .publication-card {
    grid-column: span 1;
  }

  .publication-panel {
    grid-template-columns: 1fr;
  }

  .recent-posts-card .recent-post-list {
    grid-template-columns: 1fr;
  }

  .donut-panel {
    grid-template-columns: 1fr;
  }

  .dashboard-top,
  .top-actions {
    align-items: stretch;
    flex-direction: column;
  }

  h1 {
    font-size: 28px;
  }
}

@media (max-width: 1180px) {
  .app-shell {
    grid-template-columns: 220px minmax(0, 1fr);
  }

  .sidebar {
    padding: 20px 14px;
  }

  .side-brand img {
    width: 150px;
  }

  .page {
    padding: 22px 18px;
  }

  .dashboard-top {
    align-items: flex-start;
    flex-direction: column;
  }

  .top-actions {
    width: 100%;
    flex-wrap: wrap;
    justify-content: flex-start;
    white-space: normal;
  }

  .update-label {
    justify-content: flex-start;
    min-width: 0;
    margin-right: 0;
  }

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

  .hero-graphs,
  .ads-graphs {
    grid-template-columns: 1fr;
  }

  .hero-stat,
  .graph-card.wide {
    grid-column: span 1;
  }

  .hero-stat {
    grid-template-columns: 170px minmax(0, 1fr);
    gap: 18px;
    padding: 20px;
  }

  .hero-ghost-icon {
    left: 120px;
  }

  .followers-hero .hero-ghost-icon {
    left: 116px;
  }

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

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

@media (max-width: 900px) {
  .app-shell {
    display: block;
    max-width: 100vw;
    overflow-x: hidden;
  }

  .sidebar {
    position: sticky;
    top: 0;
    z-index: 8;
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    align-items: center;
    gap: 10px;
    height: auto;
    min-height: 0;
    padding: 10px 14px;
    border-right: 0;
    border-bottom: 1px solid var(--border);
    box-shadow: 0 8px 22px rgba(23, 32, 51, 0.05);
    max-width: 100vw;
    overflow: hidden;
  }

  .side-brand {
    margin: 0;
  }

  .side-brand img {
    width: 116px;
  }

  .side-nav {
    display: flex;
    gap: 6px;
    min-width: 0;
    overflow-x: auto;
    padding-bottom: 2px;
    scrollbar-width: thin;
  }

  .side-nav a {
    justify-content: center;
    flex: 0 0 auto;
    width: 38px;
    min-height: 38px;
    padding: 0;
    gap: 0;
    font-size: 0;
  }

  .side-nav svg,
  .side-nav .nav-icon {
    width: 19px;
    height: 19px;
  }

  .side-channel-list {
    display: contents;
    margin: 0;
  }

  .side-nav .side-channel {
    width: 38px;
    min-height: 38px;
    padding: 0;
  }

  .side-channel span,
  .side-footer > span {
    display: none;
  }

  .side-channel img,
  .side-channel svg {
    width: 22px;
    height: 22px;
    border-radius: 6px;
  }

  .side-footer {
    display: grid;
    grid-template-columns: 38px 38px;
    gap: 8px;
    margin-top: 0;
    padding: 0;
    border: 0;
    border-radius: 0;
  }

  .side-footer form {
    margin: 0;
  }

  .side-footer button {
    display: grid;
    place-items: center;
    width: 38px;
    min-width: 38px;
    min-height: 38px;
    padding: 0;
    background: #eef4ff;
    color: var(--blue);
  }

  .side-footer button span {
    display: none;
  }

  .side-footer .logout-icon {
    display: block;
    width: 19px;
    height: 19px;
  }

  .side-footer-settings {
    width: 38px;
    min-width: 38px;
    min-height: 38px;
  }

  .page {
    width: 100%;
    max-width: 100vw;
    overflow-x: hidden;
    padding: 18px 14px 24px;
  }

  .heading {
    align-items: flex-start;
    flex-direction: column;
    gap: 10px;
  }

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

  .connection-grid,
  .inline-form {
    grid-template-columns: 1fr;
  }

  .connection-card {
    grid-template-columns: 1fr;
    gap: 14px;
  }

  .connection-card .button-link,
  .connection-card button {
    width: 100%;
    justify-content: center;
  }

  .channel-title {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    align-items: center;
    width: 100%;
  }

  .channel-title h1 {
    font-size: 24px;
    line-height: 1.15;
  }

  .top-actions {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 42px 42px;
    gap: 8px;
    min-width: 0;
    white-space: normal;
  }

  .update-label,
  .period-switch,
  .date-pill,
  .top-actions form {
    width: 100%;
  }

  .update-label,
  .period-switch,
  .date-pill {
    grid-column: 1 / -1;
  }

  .date-pill {
    grid-column: 1;
    grid-row: 3;
  }

  .period-switch {
    justify-content: stretch;
  }

  .period-switch a {
    min-height: 28px;
    flex: 1 1 0;
    min-width: 0;
    padding: 0 7px;
    font-size: 12px;
  }

  .date-pill {
    justify-content: center;
    align-self: center;
    min-height: 34px;
    padding: 0 8px;
    font-size: 12px;
  }

  .export-button {
    align-self: center;
    width: 42px;
    min-height: 42px;
    min-width: 0;
  }

  .top-actions form {
    grid-column: 3;
    grid-row: 3;
  }

  .export-button {
    grid-column: 2;
    grid-row: 3;
  }

  .top-actions button {
    display: grid;
    place-items: center;
    width: 42px;
    min-width: 42px;
    min-height: 42px;
    padding: 0;
  }

  .top-actions button span {
    display: none;
  }

  .top-actions .refresh-icon {
    display: block;
    width: 18px;
    height: 18px;
  }

  .top-actions button.is-loading {
    font-size: 0;
  }

  .top-actions button.is-loading::before {
    left: 50%;
    margin-left: -6px;
  }

  .channel-tabs {
    gap: 6px;
    overflow-x: auto;
    padding-bottom: 4px;
    scrollbar-width: thin;
  }

  .channel-tabs a {
    flex: 0 0 auto;
    white-space: nowrap;
  }

  .hero-stat {
    grid-template-columns: 145px minmax(0, 1fr);
    min-height: 230px;
  }

  .hero-copy strong {
    font-size: 46px;
  }

  .hero-ghost-icon {
    left: 96px;
    opacity: 0.45;
  }

  .followers-hero .hero-ghost-icon {
    left: 92px;
  }

  .overview-grid,
  .dashboard-grid,
  .post-top-grid,
  .data-card-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .post-top-grid .wide,
  .publication-card,
  .graph-card.wide {
    grid-column: span 2;
  }

  .popular-post-grid,
  .recent-posts-card .recent-post-list,
  .mention-source-list {
    grid-template-columns: 1fr;
  }

  .mentions-summary {
    grid-template-columns: 1fr;
  }

  .ads-table-card {
    padding: 18px;
  }

  .table-wrap {
    margin: 0 -8px;
    padding: 0 8px 4px;
    max-width: calc(100vw - 28px);
    -webkit-overflow-scrolling: touch;
  }

  .ads-table {
    min-width: 1040px;
  }

  .invite-table {
    min-width: 700px;
  }
}

@media (max-width: 720px) {
  body {
    background: #f4f7fc;
  }

  .topbar {
    min-height: 0;
  }

  .brand img {
    max-width: 180px;
  }

  .page {
    max-width: 100vw;
    overflow-x: hidden;
    padding: 14px 10px 22px;
  }

  h1 {
    font-size: 24px;
  }

  h2 {
    font-size: 18px;
  }

  .panel,
  .card,
  .placeholder-card,
  .graph-card,
  .data-card,
  .kpi-card,
  .hero-stat,
  .ads-table-card {
    border-radius: 8px;
    box-shadow: 0 8px 22px rgba(23, 32, 51, 0.045);
  }

  .panel,
  .ads-table-card {
    max-width: 100%;
    overflow: hidden;
    padding: 14px;
  }

  .connection-card,
  .graph-card,
  .data-card,
  .kpi-card,
  .hero-stat,
  .ads-summary div,
  .ads-check-result,
  .local-command-row {
    min-width: 0;
    max-width: 100%;
  }

  .grid,
  .overview-grid,
  .hero-graphs,
  .dashboard-grid,
  .post-top-grid,
  .data-card-grid,
  .ads-summary {
    grid-template-columns: 1fr;
    gap: 12px;
  }

  .overview-grid.max-overview-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 12px;
    max-width: 100%;
    overflow: visible;
    padding: 0;
  }

  .overview-grid.max-overview-grid .kpi-card {
    width: auto;
    max-width: 100%;
  }

  .post-top-grid .wide,
  .publication-card,
  .graph-card.wide {
    grid-column: span 1;
  }

  .dashboard-top {
    gap: 12px;
    margin-bottom: 12px;
    padding-bottom: 14px;
  }

  .channel-avatar {
    width: 38px;
    height: 38px;
    flex-basis: 38px;
  }

  .channel-avatar img {
    width: 31px;
    height: 31px;
  }

  .channel-title h1 {
    font-size: 22px;
  }

  .channel-title p {
    margin-bottom: 0;
    font-size: 14px;
  }

  .top-actions {
    grid-template-columns: minmax(0, 1fr) 42px 42px;
  }

  .period-switch,
  .date-pill,
  .update-label,
  .soft-button,
  .top-actions form,
  .top-actions button {
    min-width: 0;
    max-width: 100%;
  }

  .update-label,
  .date-pill,
  .soft-button {
    min-height: 34px;
  }

  .period-switch a {
    min-height: 28px;
    font-size: 12px;
  }

  .channel-tabs {
    margin-bottom: 12px;
  }

  .channel-tabs a {
    min-height: 32px;
    padding: 0 10px;
    font-size: 13px;
  }

  .tab-label-full {
    display: none;
  }

  .tab-label-mobile {
    display: inline;
  }

  .hero-stat {
    grid-template-columns: 1fr;
    gap: 12px;
    min-height: 0;
    padding: 16px;
  }

  .hero-copy {
    position: relative;
    z-index: 1;
  }

  .hero-copy strong {
    font-size: 42px;
  }

  .hero-copy dl {
    max-width: 220px;
  }

  .hero-chart {
    min-height: 205px;
  }

  .hero-ghost-icon {
    top: 22px;
    right: 18px;
    left: auto;
  }

  .followers-hero .hero-ghost-icon {
    left: auto;
  }

  .hero-ghost-icon img {
    width: 70px;
  }

  .kpi-card {
    min-height: 0;
    padding: 14px;
  }

  .kpi-icon {
    width: 46px;
    height: 46px;
  }

  .kpi-value {
    font-size: 24px;
  }

  .graph-card,
  .data-card {
    padding: 14px;
  }

  .graph-head {
    align-items: flex-start;
    flex-direction: column;
    gap: 6px;
  }

  .chart {
    max-width: 100%;
    overflow: hidden;
    min-height: 230px;
  }

  .chart canvas {
    max-width: 100%;
  }

  .chart-tooltip {
    min-width: 0;
    max-width: calc(100vw - 44px);
  }

  .publication-panel,
  .donut-panel {
    grid-template-columns: 1fr;
  }

  .publication-total {
    grid-template-columns: auto minmax(0, 1fr);
    align-items: end;
    gap: 8px 14px;
    padding-top: 0;
  }

  .publication-total span {
    grid-column: 1 / -1;
  }

  .publication-total strong {
    font-size: 30px;
  }

  .publication-total dl {
    align-self: end;
  }

  .popular-post {
    grid-template-columns: 92px minmax(0, 1fr);
    gap: 10px;
  }

  .popular-post > img {
    width: 92px;
    height: 66px;
  }

  .popular-post strong {
    font-size: 13px;
  }

  .recent-post {
    grid-template-columns: 44px minmax(0, 1fr);
    gap: 10px;
  }

  .recent-post-metrics {
    grid-column: 2;
    display: flex;
    gap: 12px;
    margin-top: -5px;
  }

  .recent-post-metrics span {
    justify-content: flex-start;
  }

  .ads-summary div {
    grid-template-columns: 46px minmax(0, 1fr);
    column-gap: 14px;
    row-gap: 6px;
    min-height: 0;
    padding: 14px;
  }

  .ads-summary-icon {
    width: 46px;
    height: 46px;
  }

  .ads-summary span {
    font-size: 14px;
  }

  .ads-summary strong {
    font-size: 24px;
  }

  .ads-table th,
  .ads-table td {
    padding: 10px 8px;
    font-size: 13px;
  }

  .ads-table {
    min-width: 980px;
  }

  .invite-table {
    min-width: 640px;
  }

  .status-pill {
    min-width: 76px;
  }
}

@media (max-width: 480px) {
  .sidebar {
    grid-template-columns: auto minmax(0, 1fr) auto;
    gap: 8px;
    padding: 9px 10px;
  }

  .side-brand img {
    width: 98px;
  }

  .side-footer button {
    width: 36px;
    min-width: 36px;
    min-height: 36px;
  }

  .side-footer {
    grid-template-columns: 36px 36px;
  }

  .side-footer-settings {
    width: 36px;
    min-width: 36px;
    min-height: 36px;
  }

  .side-nav {
    gap: 5px;
  }

  .side-nav a,
  .side-nav .side-channel {
    width: 36px;
    min-height: 36px;
  }

  .side-channel img,
  .side-channel svg {
    width: 21px;
    height: 21px;
  }

  .page {
    padding: 12px 8px 20px;
  }

  .dashboard-top {
    margin-left: 0;
    margin-right: 0;
  }

  .channel-title {
    gap: 10px;
  }

  .channel-title h1 {
    font-size: 20px;
  }

  .date-pill {
    font-size: 13px;
  }

  .top-actions {
    grid-template-columns: minmax(0, 1fr) 40px 40px;
    gap: 7px;
  }

  .export-button {
    width: 40px;
    min-width: 40px;
    min-height: 38px;
  }

  .top-actions button {
    width: 40px;
    min-width: 40px;
    min-height: 38px;
  }

  .ads-summary div {
    padding: 12px;
  }

  .ads-table-card,
  .graph-card,
  .data-card,
  .hero-stat,
  .kpi-card,
  .card,
  .panel {
    padding: 12px;
  }

  .metric {
    font-size: 26px;
  }

  .hero-copy strong {
    font-size: 38px;
  }

  .chart,
  .hero-chart {
    min-height: 210px;
  }

  .publication-total {
    grid-template-columns: 1fr;
  }

  .publication-total dl div {
    grid-template-columns: 48px max-content;
  }

  .popular-post {
    grid-template-columns: 84px minmax(0, 1fr);
  }

  .popular-post > img {
    width: 84px;
    height: 62px;
  }

  .popular-post-metrics {
    gap: 9px;
  }

  .table-wrap {
    margin: 0 -12px;
    padding: 0 12px 4px;
    max-width: calc(100vw - 16px);
  }

  .invite-table {
    min-width: 590px;
  }
}
