:root {
  color-scheme: light dark;
  --font-sans: "DM Sans", ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, sans-serif;
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.06);
  --shadow-md: 0 8px 24px rgba(0, 0, 0, 0.12);
  --app-layout-sidebar-width: 260px;
  --sidebar-w-collapsed: 4.5rem;
  --sidebar-w: var(--app-layout-sidebar-width);
  --header-h: 56px;
  --accent-orange: #f7a87c;
  --accent-orange-dim: rgba(247, 168, 124, 0.15);
  --accent-purple: #a78bfa;
  --accent-green: #34d399;
  --accent-blue: #60a5fa;
  --dot-publishing: #a78bfa;
  --dot-accounts: #f7a87c;
  --dot-analytics: #c084fc;
  --dot-billing: #34d399;
  --dot-account: #38bdf8;
  --dot-admin: #f43f5e;
}

[data-theme="light"] {
  --bg-app: #f5f5f7;
  --bg-sidebar: #ffffff;
  --bg-elevated: #ffffff;
  --bg-input: #ffffff;
  --bg-hover: rgba(0, 0, 0, 0.04);
  --bg-active: rgba(0, 0, 0, 0.06);
  --border: rgba(0, 0, 0, 0.08);
  --border-strong: rgba(0, 0, 0, 0.12);
  --shadow-card: 0 1px 2px rgba(0, 0, 0, 0.04), 0 1px 3px rgba(0, 0, 0, 0.06);
  --text: #1a1a1a;
  --text-muted: #737373;
  --text-faint: #a3a3a3;
  --logo-filter: none;
}

[data-theme="dark"],
:root:not([data-theme="light"]) {
  --bg-app: #141418;
  --bg-elevated: #1e1e24;
  --bg-sidebar: #18181e;
  --bg-input: #24242c;
  --bg-hover: rgba(255, 255, 255, 0.06);
  --bg-active: rgba(255, 255, 255, 0.09);
  --border: rgba(255, 255, 255, 0.08);
  --border-strong: rgba(255, 255, 255, 0.12);
  --text: #fafafa;
  --text-muted: #a3a3a3;
  --text-faint: #737373;
  --logo-filter: brightness(0) invert(1);
}

[data-theme="light"] .card,
[data-theme="light"] .metric-card,
[data-theme="light"] .table-wrap,
[data-theme="light"] .action-tile,
[data-theme="light"] .banner-promo {
  box-shadow: var(--shadow-card);
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  font-size: 15px;
  -webkit-text-size-adjust: 100%;
}

body.app {
  scroll-behavior: smooth;
}

@media (prefers-reduced-motion: reduce) {
  body.app {
    scroll-behavior: auto;
  }
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: var(--font-sans);
  background: var(--bg-app);
  color: var(--text);
  line-height: 1.5;
  transition: background 0.2s ease, color 0.2s ease;
}

a {
  color: inherit;
  text-decoration: none;
}

button {
  font: inherit;
  cursor: pointer;
  border: none;
  background: none;
  color: inherit;
  touch-action: manipulation;
}

img {
  display: block;
  max-width: 100%;
}

.app-shell {
  display: flex;
  min-height: 100vh;
  min-width: 0;
  width: 100%;
}

/* ─── In-app navigation preloader (main column on desktop — sidebar stays sharp, never blurred) ─── */

.app-nav-preloader {
  position: fixed;
  inset: 0;
  z-index: 260;
  display: flex;
  align-items: center;
  justify-content: center;
  background: color-mix(in srgb, var(--bg-app) 82%, transparent);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 0.12s ease, visibility 0.12s ease;
}

@media (min-width: 1024px) {
  .app-nav-preloader {
    left: var(--sidebar-w);
    /* Overlay only the content column; sidebar is untouched (no dim, no blur). */
  }
}

html.app-nav-loading .app-nav-preloader {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

.app-nav-preloader__inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.65rem;
  padding: 1rem 1.25rem;
}

.app-nav-preloader__orbit {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  border: 2.5px solid var(--border);
  border-top-color: var(--accent-orange);
  animation: app-nav-preloader-spin 0.38s linear infinite;
  will-change: transform;
}

.app-nav-preloader__text {
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  color: var(--text-muted);
  text-transform: uppercase;
}

@keyframes app-nav-preloader-spin {
  to {
    transform: rotate(360deg);
  }
}

@media (prefers-reduced-motion: reduce) {
  .app-nav-preloader__orbit {
    animation-duration: 0.9s;
  }
}

.app-sidebar {
  position: fixed;
  inset: 0 auto 0 0;
  width: var(--sidebar-w);
  background: var(--bg-sidebar);
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  z-index: 200;
  transform: translateX(-100%);
  box-shadow: var(--shadow-md);
  transition: transform 0.25s ease, width 0.28s cubic-bezier(0.22, 1, 0.36, 1);
}

.app-sidebar.is-open {
  transform: translateX(0);
}

.app-sidebar__brand {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 1rem 1rem 0.75rem;
}

.sidebar-collapse-btn {
  display: none;
  flex-shrink: 0;
}

.app-sidebar__brand .menu-btn--close {
  margin-left: auto;
  display: flex;
}

.app-sidebar__brand .brand-logo-svg {
  display: block;
  height: 28px;
  width: auto;
  flex-shrink: 0;
  filter: none;
  color: var(--text);
}

.app-sidebar__brand img {
  height: 28px;
  width: auto;
  filter: var(--logo-filter);
}

.app-sidebar__search {
  padding: 0 0.75rem 0.75rem;
}

.app-sidebar-search-wrap {
  position: relative;
  z-index: 5;
}

.app-sidebar-search-results {
  position: absolute;
  left: 0;
  right: 0;
  top: calc(100% + 4px);
  max-height: min(320px, 55vh);
  overflow-y: auto;
  padding: 0.35rem;
  border-radius: var(--radius-md);
  border: 1px solid var(--border);
  background: var(--bg-elevated);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.35);
}

.app-sidebar-search-hit {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.15rem;
  width: 100%;
  margin: 0;
  padding: 0.45rem 0.55rem;
  border: none;
  border-radius: var(--radius-sm);
  background: transparent;
  color: var(--text);
  font: inherit;
  text-align: left;
  cursor: pointer;
  transition: background 0.12s ease;
}

.app-sidebar-search-hit:hover,
.app-sidebar-search-hit--active {
  background: rgba(99, 102, 241, 0.12);
}

.app-sidebar-search-hit__label {
  font-size: 0.85rem;
  font-weight: 600;
  line-height: 1.25;
}

.app-sidebar-search-hit__group {
  font-size: 0.72rem;
  color: var(--text-muted);
  font-weight: 500;
}

.app-sidebar-search-empty {
  padding: 0.65rem 0.5rem;
  font-size: 0.8rem;
  color: var(--text-muted);
  text-align: center;
}

.search-field {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 0.75rem;
  background: var(--bg-input);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  color: var(--text-muted);
  font-size: 0.875rem;
}

.search-field input[type="search"] {
  flex: 1;
  min-width: 0;
  border: none;
  background: transparent;
  font: inherit;
  color: var(--text);
  outline: none;
}

.search-field input[type="search"]::placeholder {
  color: var(--text-muted);
}

.search-field > .fa-solid:first-child {
  opacity: 0.65;
  font-size: 0.875rem;
}

.menu-btn i {
  font-size: 1rem;
}

.banner-live > .fa-solid:first-of-type {
  color: var(--accent-orange);
}

.metric-card__icons {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  opacity: 0.65;
}

.metric-card__icons i {
  font-size: 0.7rem;
}

.card__head .fa-solid {
  opacity: 0.45;
}

.card__head-link .fa-solid {
  opacity: 0.55;
  font-size: 0.75em;
}

.action-tile > span:last-child i {
  opacity: 0.45;
  font-size: 0.85rem;
}

.head-actions .btn i {
  font-size: 0.85rem;
}

.banner-promo__icon {
  display: flex;
  align-items: center;
  justify-content: center;
}

.banner-promo__icon .fa-solid {
  font-size: 1.1rem;
  color: var(--accent-orange);
}

.ai-input__composer-link .fa-solid {
  font-size: 1rem;
}

.app-fab__avatar .fa-solid {
  font-size: 1rem;
}

.about-card .card__head .fa-solid {
  opacity: 0.45;
}

.search-field kbd {
  margin-left: auto;
  font-size: 0.7rem;
  padding: 0.15rem 0.4rem;
  border-radius: 4px;
  border: 1px solid var(--border);
  background: var(--bg-elevated);
  color: var(--text-faint);
}

.workspace-wrap {
  position: relative;
  margin: 0 0.75rem 0.75rem;
  z-index: 1;
}

.workspace-wrap.is-open {
  z-index: 50;
}

.workspace-wrap__label {
  display: block;
  font-size: 0.65rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-faint);
  margin: 0 0 0.35rem 0.15rem;
}

.workspace {
  padding: 0.5rem 0.75rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background: var(--bg-input);
  font-size: 0.875rem;
}

.workspace--trigger {
  width: 100%;
  margin: 0;
  font: inherit;
  color: inherit;
  text-align: left;
  cursor: pointer;
  transition: border-color 0.15s, box-shadow 0.15s;
}

.workspace--trigger:hover {
  border-color: var(--border-strong);
}

.workspace--trigger:focus-visible {
  outline: none;
  border-color: var(--accent-orange);
  box-shadow: 0 0 0 3px var(--accent-orange-dim);
}

.workspace__meta {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.1rem;
}

.workspace__name {
  font-weight: 600;
  font-size: 0.875rem;
  line-height: 1.25;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.workspace__hint {
  font-size: 0.68rem;
  font-weight: 500;
  color: var(--text-faint);
  line-height: 1.2;
}

.workspace__avatar {
  width: 24px;
  height: 24px;
  flex-shrink: 0;
  border-radius: 6px;
  background: linear-gradient(135deg, var(--accent-purple), var(--accent-orange));
}

.workspace__avatar--sm {
  width: 20px;
  height: 20px;
  border-radius: 5px;
}

.workspace__chev {
  margin-left: auto;
  flex-shrink: 0;
  opacity: 0.55;
  font-size: 0.65rem;
  transition: transform 0.25s cubic-bezier(0.34, 1.2, 0.64, 1);
}

.workspace-wrap.is-open .workspace__chev {
  transform: rotate(-180deg);
  opacity: 0.85;
}

.workspace-menu {
  position: absolute;
  left: 0;
  right: 0;
  top: calc(100% + 0.35rem);
  padding: 0.35rem;
  border-radius: var(--radius-md);
  border: 1px solid var(--border);
  background: var(--bg-elevated);
  box-shadow: var(--shadow-md);
  max-height: min(70vh, 320px);
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}

.workspace-menu[hidden] {
  display: none !important;
}

.workspace-menu__cap {
  display: block;
  font-size: 0.65rem;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--text-faint);
  padding: 0.35rem 0.5rem 0.5rem;
}

.workspace-menu__item {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.45rem 0.5rem;
  border-radius: var(--radius-sm);
  border: none;
  background: transparent;
  font: inherit;
  font-size: 0.85rem;
  color: var(--text);
  text-align: left;
  cursor: pointer;
  transition: background 0.12s;
}

.workspace-menu__item:hover {
  background: var(--bg-hover);
}

.workspace-menu__item.is-active {
  background: var(--bg-active);
}

.workspace-menu__item-text {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.workspace-menu__check {
  flex-shrink: 0;
  font-size: 0.75rem;
  color: var(--accent-orange);
  opacity: 0;
}

.workspace-menu__item.is-active .workspace-menu__check {
  opacity: 1;
}

.workspace-menu__divider {
  height: 1px;
  margin: 0.35rem 0.25rem;
  background: var(--border);
}

.workspace-menu__link {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.5rem 0.5rem;
  border-radius: var(--radius-sm);
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--accent-orange);
  transition: background 0.12s;
}

.workspace-menu__link:hover {
  background: var(--bg-hover);
}

.workspace-menu__link i {
  font-size: 0.9rem;
  opacity: 0.85;
}

.nav-scroll {
  flex: 1;
  overflow-y: auto;
  padding: 0 0.5rem 1rem;
}

.nav-group {
  margin-top: 1rem;
}

.nav-group__label {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.65rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-faint);
  padding: 0 0.5rem 0.35rem;
}

.nav-group__dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
}

.nav-group__dot--publishing {
  background: var(--dot-publishing);
}

.nav-group__dot--accounts {
  background: var(--dot-accounts);
}

.nav-group__dot--analytics {
  background: var(--dot-analytics);
}

.nav-group__dot--billing {
  background: var(--dot-billing);
}

.nav-group__dot--account {
  background: var(--dot-account);
}

.nav-group__dot--admin {
  background: var(--dot-admin);
}

.nav-link {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  padding: 0.45rem 0.65rem;
  border-radius: var(--radius-sm);
  font-size: 0.9rem;
  color: var(--text-muted);
  transition: background 0.15s, color 0.15s;
  touch-action: manipulation;
}

.nav-link:hover {
  background: var(--bg-hover);
  color: var(--text);
}

.nav-link--active {
  background: var(--bg-active);
  color: var(--text);
  font-weight: 500;
}

.nav-link:focus-visible {
  outline: 2px solid var(--accent-orange);
  outline-offset: 2px;
}

.nav-link > i {
  width: 1.25rem;
  text-align: center;
  flex-shrink: 0;
  opacity: 0.85;
}

.nav-link--sub {
  padding-left: 2rem;
  font-size: 0.875rem;
}

.nav-link__label {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  min-width: 0;
}

.nav-badge {
  display: inline-flex;
  align-items: center;
  padding: 0.1rem 0.35rem;
  border-radius: 4px;
  font-size: 0.62rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  line-height: 1.1;
  flex-shrink: 0;
}

.nav-badge--beta {
  background: rgba(96, 165, 250, 0.18);
  color: #60a5fa;
}

.nav-link--external i {
  margin-left: auto;
  opacity: 0.55;
  font-size: 0.7rem;
}

.app-sidebar__footer {
  border-top: 1px solid var(--border);
  padding: 0.75rem;
  margin-top: auto;
  min-width: 0;
  width: 100%;
  box-sizing: border-box;
}

.ai-credits-meter {
  --ai-meter-from: #818cf8;
  --ai-meter-to: #22d3ee;
  --ai-meter-glow: rgba(129, 140, 248, 0.35);
  position: relative;
  margin-bottom: 0.75rem;
  padding: 0.65rem 0.7rem;
  border-radius: var(--radius-md);
  border: 1px solid color-mix(in srgb, var(--ai-meter-from) 28%, var(--border));
  background:
    linear-gradient(145deg, color-mix(in srgb, var(--ai-meter-from) 8%, transparent), transparent 55%),
    var(--bg-input);
  overflow: hidden;
}

.ai-credits-meter::before {
  content: "";
  position: absolute;
  inset: -40% auto auto -30%;
  width: 70%;
  height: 120%;
  background: radial-gradient(circle, var(--ai-meter-glow), transparent 68%);
  pointer-events: none;
  opacity: 0.65;
}

.ai-credits-meter__header,
.ai-credits-meter__stats,
.ai-credits-meter__track,
.ai-credits-meter__hint {
  position: relative;
  z-index: 1;
}

.ai-credits-meter__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  margin-bottom: 0.45rem;
}

.ai-credits-meter__title {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--text-muted);
}

.ai-credits-meter__title i {
  color: var(--ai-meter-from);
  font-size: 0.78rem;
}

.ai-credits-meter__pct {
  font-size: 0.72rem;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  color: var(--ai-meter-from);
}

.ai-credits-meter__track {
  position: relative;
  height: 0.5rem;
  border-radius: 999px;
  background: color-mix(in srgb, var(--border) 85%, transparent);
  overflow: hidden;
  box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.12);
}

.ai-credits-meter__segments {
  position: absolute;
  inset: 0;
  background: repeating-linear-gradient(
    90deg,
    transparent,
    transparent calc(20% - 1px),
    color-mix(in srgb, var(--border) 70%, transparent) calc(20% - 1px),
    color-mix(in srgb, var(--border) 70%, transparent) 20%
  );
  opacity: 0.55;
  pointer-events: none;
}

.ai-credits-meter__fill {
  position: relative;
  height: 100%;
  min-width: 2px;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--ai-meter-from), var(--ai-meter-to));
  box-shadow: 0 0 12px var(--ai-meter-glow);
  transition: width 0.45s cubic-bezier(0.22, 1, 0.36, 1);
}

.ai-credits-meter__fill::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(
    105deg,
    transparent 0%,
    rgba(255, 255, 255, 0.35) 45%,
    transparent 70%
  );
  animation: ai-credits-shimmer 2.8s ease-in-out infinite;
}

@keyframes ai-credits-shimmer {
  0%,
  100% {
    transform: translateX(-120%);
    opacity: 0;
  }
  45% {
    opacity: 1;
  }
  55% {
    transform: translateX(120%);
    opacity: 1;
  }
}

.ai-credits-meter__stats {
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 0.2rem 0.35rem;
  margin-top: 0.45rem;
  font-size: 0.78rem;
  color: var(--text-muted);
}

.ai-credits-meter__remaining {
  font-size: 0.92rem;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  background: linear-gradient(90deg, var(--ai-meter-from), var(--ai-meter-to));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.ai-credits-meter__sep {
  opacity: 0.45;
}

.ai-credits-meter__budget,
.ai-credits-meter__unit {
  font-variant-numeric: tabular-nums;
}

.ai-credits-meter__hint {
  margin: 0.45rem 0 0;
  font-size: 0.7rem;
  line-height: 1.35;
  color: var(--text-muted);
}

.ai-credits-meter__hint a {
  color: var(--ai-meter-from);
  font-weight: 600;
  text-decoration: none;
}

.ai-credits-meter__hint a:hover {
  text-decoration: underline;
}

.ai-credits-meter__hint--muted {
  margin-top: 0.65rem;
}

.ai-credits-meter--low {
  --ai-meter-from: #f59e0b;
  --ai-meter-to: #fbbf24;
  --ai-meter-glow: rgba(245, 158, 11, 0.35);
}

.ai-credits-meter--critical,
.ai-credits-meter--empty {
  --ai-meter-from: #f87171;
  --ai-meter-to: #fb923c;
  --ai-meter-glow: rgba(248, 113, 113, 0.4);
}

.ai-credits-meter--empty .ai-credits-meter__fill {
  min-width: 0;
  width: 0 !important;
}

.ai-credits-meter--empty .ai-credits-meter__fill::after {
  animation: none;
}

.ai-credits-meter--card {
  margin-bottom: 1rem;
}

.ai-credits-meter--card .ai-credits-meter__track {
  height: 0.58rem;
}

.ai-credits-meter--card .ai-credits-meter__remaining {
  font-size: 1rem;
}

.test-mode {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  padding: 0.65rem 0.75rem;
  border-radius: var(--radius-md);
  border: 1px solid var(--border);
  background: var(--bg-input);
  margin-bottom: 0.75rem;
}

.test-mode__text strong {
  display: block;
  font-size: 0.8rem;
}

.test-mode__text small {
  font-size: 0.7rem;
  color: var(--text-muted);
}

.toggle {
  width: 40px;
  height: 22px;
  border-radius: 999px;
  background: var(--bg-hover);
  border: 1px solid var(--border);
  position: relative;
  flex-shrink: 0;
}

.toggle::after {
  content: "";
  position: absolute;
  top: 2px;
  left: 2px;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: var(--text-muted);
  transition: transform 0.2s;
}

.toggle[aria-checked="true"] {
  background: var(--accent-orange-dim);
  border-color: var(--accent-orange);
}

.toggle[aria-checked="true"]::after {
  transform: translateX(18px);
  background: var(--accent-orange);
}

.icon-row {
  display: flex;
  gap: 0.35rem;
  margin-bottom: 0.75rem;
}

.icon-btn {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
  transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

.icon-btn:focus-visible {
  outline: 2px solid var(--accent-orange);
  outline-offset: 2px;
}

.icon-btn:hover {
  background: var(--bg-hover);
  color: var(--text);
}

.icon-btn i {
  font-size: 1rem;
}

.user-chip {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem;
  border-radius: var(--radius-md);
  border: 1px solid var(--border);
  background: var(--bg-input);
  min-width: 0;
  max-width: 100%;
  width: 100%;
  box-sizing: border-box;
  overflow: hidden;
}

.user-chip-wrap {
  position: relative;
}

.user-chip__avatar {
  width: 32px;
  height: 32px;
  flex-shrink: 0;
  border-radius: 50%;
  background: linear-gradient(135deg, #6366f1, #ec4899);
  overflow: hidden;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.user-chip > button {
  flex-shrink: 0;
}

.user-chip__meta {
  flex: 1 1 0;
  min-width: 0;
  overflow: hidden;
}

.user-chip__meta strong {
  display: block;
  font-size: 0.8rem;
  line-height: 1.25;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 100%;
}

.user-chip__meta span {
  display: block;
  font-size: 0.7rem;
  line-height: 1.25;
  color: var(--text-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 100%;
}

.sidebar-workspace-menu {
  position: absolute;
  left: 0;
  right: 0;
  bottom: calc(100% + 0.5rem);
  z-index: 70;
  padding: 0.45rem;
  border: 1px solid rgba(15, 23, 42, 0.12);
  border-radius: var(--radius-lg);
  background: #fff;
  color: #111827;
  box-shadow: var(--shadow-lg);
}

.sidebar-workspace-menu__section + .sidebar-workspace-menu__section {
  margin-top: 0.4rem;
  padding-top: 0.4rem;
  border-top: 1px solid rgba(15, 23, 42, 0.1);
}

.sidebar-workspace-menu__eyebrow {
  padding: 0.25rem 0.4rem 0.35rem;
  color: #64748b;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.sidebar-workspace-menu__item,
.sidebar-workspace-menu__link {
  display: flex;
  width: 100%;
  align-items: center;
  gap: 0.55rem;
  padding: 0.5rem;
  border: 0;
  border-radius: var(--radius-md);
  background: transparent;
  color: #111827;
  text-align: left;
  text-decoration: none;
  cursor: pointer;
}

.sidebar-workspace-menu__item:hover,
.sidebar-workspace-menu__link:hover,
.sidebar-workspace-menu__item.is-active {
  background: #f1f5f9;
}

.sidebar-workspace-menu__item:disabled {
  cursor: default;
  opacity: 1;
}

.sidebar-workspace-menu__icon {
  display: inline-flex;
  width: 1.8rem;
  height: 1.8rem;
  flex: 0 0 1.8rem;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: #f8fafc;
  color: #64748b;
}

.sidebar-workspace-menu__body {
  flex: 1 1 0;
  min-width: 0;
}

.sidebar-workspace-menu__body strong,
.sidebar-workspace-menu__body small {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.sidebar-workspace-menu__body strong {
  font-size: 0.82rem;
}

.sidebar-workspace-menu__body small,
.sidebar-workspace-menu__empty {
  color: #64748b;
  font-size: 0.72rem;
}

.sidebar-workspace-menu__check {
  color: var(--accent-orange);
}

.sidebar-workspace-menu__empty {
  margin: 0;
  padding: 0.45rem 0.5rem;
}

.sidebar-logout {
  display: flex;
  width: 100%;
  align-items: center;
  justify-content: flex-start;
  gap: 0.5rem;
  margin-top: 0.5rem;
  padding: 0.5rem 0.65rem;
  border-radius: var(--radius-md);
  border: 1px solid var(--border);
  background: transparent;
  font: inherit;
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--text-muted);
  cursor: pointer;
  transition: background 0.15s, color 0.15s, border-color 0.15s;
}

.sidebar-logout:hover {
  background: var(--bg-hover);
  color: var(--text);
  border-color: var(--border-strong);
}

.sidebar-logout:focus-visible {
  outline: 2px solid var(--accent-orange);
  outline-offset: 2px;
}

.sidebar-logout i {
  font-size: 0.9rem;
  opacity: 0.9;
}

.app-main {
  position: relative;
  flex: 1;
  margin-left: 0;
  min-height: 100vh;
  min-width: 0;
  display: flex;
  flex-direction: column;
}

.app-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.75rem max(0.75rem, env(safe-area-inset-left)) 0.75rem max(0.75rem, env(safe-area-inset-right));
  border-bottom: 1px solid var(--border);
  background: var(--bg-elevated);
  position: sticky;
  top: 0;
  z-index: 50;
}

.app-topbar__lead {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.35rem;
  min-width: 0;
  font-size: 0.9rem;
  color: var(--text-muted);
}

.app-topbar__hello {
  font-weight: 500;
}

.app-topbar__name {
  font-weight: 700;
  color: var(--text);
  letter-spacing: -0.02em;
  max-width: min(14rem, 40vw);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.app-topbar__spacer {
  flex: 1;
  min-width: 0;
}

.app-topbar__cluster {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
  gap: 0.45rem;
  min-width: 0;
}

.app-topbar__date {
  font-size: 0.8rem;
  color: var(--text-muted);
  font-weight: 500;
  white-space: nowrap;
}

.app-topbar__notif-wrap {
  position: relative;
  display: inline-flex;
  align-items: center;
}

.app-topbar__notif {
  position: relative;
  width: 40px;
  height: 40px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: var(--bg-input);
}

.app-topbar__notif-badge {
  position: absolute;
  top: -4px;
  right: -4px;
  min-width: 1.05rem;
  height: 1.05rem;
  padding: 0 4px;
  border-radius: 999px;
  font-size: 0.6rem;
  font-weight: 700;
  line-height: 1.05rem;
  text-align: center;
  background: var(--accent-orange);
  color: #fff;
  box-shadow: 0 0 0 2px var(--bg-elevated, var(--bg-input));
}

.app-topbar__account {
  display: inline-flex;
  align-items: center;
  gap: 0.15rem;
  padding: 0.12rem 0.2rem 0.12rem 0.12rem;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--bg-input);
}

.app-topbar__account-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.28rem 0.4rem;
  margin: 0;
  border: none;
  border-radius: 999px;
  background: transparent;
  color: inherit;
  cursor: pointer;
  touch-action: manipulation;
}

.app-topbar__account-toggle:focus-visible {
  outline: 2px solid var(--accent-orange);
  outline-offset: 2px;
}

.app-topbar__account-wrap {
  position: relative;
  flex-shrink: 0;
}

.app-topbar__account-chev {
  opacity: 0.65;
  transition: transform 0.15s ease;
}

.app-topbar__account-wrap.is-open .app-topbar__account-chev {
  transform: rotate(-180deg);
}

.app-topbar-account-menu {
  position: absolute;
  top: calc(100% + 0.35rem);
  right: 0;
  min-width: 11.5rem;
  margin: 0;
  padding: 0.35rem;
  border-radius: var(--radius-md);
  border: 1px solid var(--border);
  background: var(--bg-elevated);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.18);
  z-index: 60;
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
}

/* [hidden] must win over `display: flex` above (author CSS overrides UA hidden otherwise). */
.app-topbar-account-menu[hidden] {
  display: none;
}

.app-topbar-account-menu__link {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.45rem 0.55rem;
  border-radius: var(--radius-sm);
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--text);
  text-decoration: none;
}

button.app-topbar-account-menu__link {
  width: 100%;
  border: none;
  background: none;
  font: inherit;
  text-align: left;
  cursor: pointer;
}

.app-topbar-account-menu__link:hover {
  background: var(--border);
}

.app-topbar-account-menu__link i {
  opacity: 0.85;
}

.app-topbar__avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: linear-gradient(135deg, #6366f1 0%, #ec4899 100%);
  border: 2px solid var(--border);
  flex-shrink: 0;
  overflow: hidden;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  vertical-align: middle;
}

.app-user-avatar {
  display: block;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
}

.app-topbar__avatar .app-user-avatar,
.user-chip__avatar .app-user-avatar,
.composer-feed-preview__avatar .app-user-avatar {
  width: 100%;
  height: 100%;
}

.app-user-avatar--sm {
  width: 32px;
  height: 32px;
}

.app-user-avatar--md {
  width: 40px;
  height: 40px;
}

.app-user-avatar--lg {
  width: 5.5rem;
  height: 5.5rem;
  max-width: 100%;
}

@media (max-width: 900px) {
  .app-topbar:not(.app-topbar--composer) .app-topbar__cluster {
    flex-basis: auto;
    justify-content: flex-end;
    padding-left: 0;
    margin-left: auto;
    gap: 0.35rem;
  }

  /* Keep the top bar lightweight on phones; full account/navigation controls
     remain available in the hamburger sidebar. */
  .app-topbar:not(.app-topbar--composer) .btn--topbar-upgrade,
  .app-topbar:not(.app-topbar--composer) .app-theme-toggle,
  .app-topbar:not(.app-topbar--composer) .app-topbar__account-wrap,
  .app-topbar:not(.app-topbar--composer) .app-topbar__date {
    display: none;
  }

  .app-topbar:not(.app-topbar--composer) .app-topbar__lead {
    font-size: 0.84rem;
  }

  .app-topbar:not(.app-topbar--composer) .app-topbar__name {
    max-width: min(9.75rem, 42vw);
  }
}

.app-topbar--composer {
  flex-wrap: wrap;
  row-gap: 0.65rem;
}


.btn--topbar-upgrade {
  padding: 0.4rem 0.95rem;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  border: none;
  border-radius: 999px;
  color: #fff;
  background: linear-gradient(135deg, #6366f1 0%, #8b5cf6 50%, #3b82f6 100%);
  box-shadow: 0 2px 14px rgba(99, 102, 241, 0.4);
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  touch-action: manipulation;
}

.btn--topbar-upgrade:hover {
  filter: brightness(1.06);
}

.btn--composer-schedule {
  padding: 0.5rem 1.15rem;
  font-weight: 600;
  border: none;
  border-radius: var(--radius-sm);
  color: #fff;
  background: linear-gradient(135deg, #6366f1 0%, #7c3aed 100%);
  box-shadow: 0 4px 16px rgba(99, 102, 241, 0.35);
}

.btn--composer-schedule:hover {
  filter: brightness(1.06);
}

@media (max-width: 640px) {
  .app-topbar--composer .app-topbar__cluster {
    flex-basis: auto;
    justify-content: flex-end;
    padding-left: 0;
    margin-left: auto;
    gap: 0.35rem;
  }

  .app-topbar--composer .btn--topbar-upgrade,
  .app-topbar--composer .app-theme-toggle,
  .app-topbar--composer .app-topbar__account-wrap,
  .app-topbar--composer .app-topbar__date {
    display: none;
  }

  .app-topbar--composer .app-topbar__lead {
    font-size: 0.84rem;
  }

  .app-topbar--composer .app-topbar__name {
    max-width: min(9.75rem, 42vw);
  }
}

.menu-btn {
  display: flex;
  width: 40px;
  height: 40px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  align-items: center;
  justify-content: center;
  touch-action: manipulation;
}

.app-theme-toggle {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.35rem 0.6rem;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--bg-input);
  font-size: 0.8rem;
  color: var(--text-muted);
  touch-action: manipulation;
}

.app-theme-toggle i {
  font-size: 1rem;
}

.app-theme-toggle__label {
  font-size: inherit;
}

.app-topbar__timezone {
  position: relative;
  flex-shrink: 0;
}

.timezone-trigger {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.35rem 0.55rem;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--bg-input);
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text);
  letter-spacing: 0.02em;
}

.timezone-trigger:hover {
  border-color: var(--border-strong);
}

.timezone-trigger:focus-visible {
  outline: 2px solid var(--accent-orange);
  outline-offset: 2px;
}

.timezone-trigger__chev {
  opacity: 0.65;
  transition: transform 0.15s ease;
}

.app-topbar__timezone.is-open .timezone-trigger__chev {
  transform: rotate(-180deg);
}

.timezone-menu {
  position: absolute;
  top: calc(100% + 0.35rem);
  right: 0;
  min-width: 11.5rem;
  max-height: min(65vh, 22rem);
  margin: 0;
  padding: 0.35rem;
  list-style: none;
  border-radius: var(--radius-md);
  border: 1px solid var(--border);
  background: var(--bg-elevated);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.18);
  overflow-y: auto;
  overflow-x: hidden;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
  z-index: 60;
}

.timezone-menu li {
  margin: 0;
}

.timezone-menu__option {
  display: flex;
  width: 100%;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.45rem 0.55rem;
  border-radius: var(--radius-sm);
  border: none;
  background: transparent;
  font: inherit;
  text-align: left;
  cursor: pointer;
  color: var(--text);
}

.timezone-menu__option:hover {
  background: var(--border);
}

.timezone-menu__option[aria-selected="true"] {
  background: var(--accent-orange-dim);
  color: var(--accent-orange);
}

.timezone-menu__abbr {
  font-weight: 700;
  font-size: 0.8rem;
  letter-spacing: 0.04em;
}

.timezone-menu__label {
  font-size: 0.75rem;
  color: var(--text-muted);
  font-weight: 500;
}

.app-context-banner {
  display: flex;
  align-items: flex-start;
  gap: 0.5rem;
  margin: 0 0 1rem;
  padding: 0.55rem 0.75rem;
  border-radius: var(--radius-md);
  border: 1px dashed var(--border-strong);
  background: rgba(167, 139, 250, 0.06);
  font-size: 0.8rem;
  line-height: 1.45;
  color: var(--text-muted);
}

.app-context-banner i {
  margin-top: 0.15rem;
  color: var(--accent-purple);
  flex-shrink: 0;
}

.app-context-banner strong {
  color: var(--text);
  font-weight: 600;
}

.app-context-banner a {
  color: var(--accent-orange);
  font-weight: 600;
  text-decoration: none;
}

.app-context-banner a:hover {
  text-decoration: underline;
}

.table-meta-note {
  margin: 0 0 0.75rem;
  font-size: 0.8rem;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: 0.4rem;
  flex-wrap: wrap;
}

.table-badge {
  display: inline-flex;
  align-items: center;
  padding: 0.12rem 0.35rem;
  border-radius: 4px;
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  background: var(--border);
  color: var(--text-muted);
  vertical-align: middle;
}

th .table-badge {
  margin-left: 0.35rem;
}

.app-content {
  flex: 1;
  padding: 0.75rem max(0.75rem, env(safe-area-inset-left)) 1.5rem max(0.75rem, env(safe-area-inset-right));
  max-width: 1400px;
  width: 100%;
  min-width: 0;
  margin: 0 auto;
  box-sizing: border-box;
}

.app-content--composer {
  max-width: 1480px;
}

[data-theme="light"] body[data-app-page="composer"] .app-main {
  background: #eef0f5;
}

.page-head--composer {
  margin-bottom: 1rem;
}

.page-icon--composer {
  background: linear-gradient(145deg, rgba(99, 102, 241, 0.12), rgba(168, 85, 247, 0.08));
  border-color: rgba(99, 102, 241, 0.25);
}

.page-icon--composer i {
  color: #6366f1;
}

.banner-live {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  flex-wrap: nowrap;
  gap: 0.75rem;
  padding: 0.65rem 1rem;
  margin-bottom: 1rem;
  border-radius: var(--radius-md);
  border: 1px solid rgba(247, 168, 124, 0.45);
  background: var(--accent-orange-dim);
  font-size: 0.875rem;
}

@media (min-width: 769px) {
  .banner-live {
    flex-direction: row;
    flex-wrap: wrap;
    align-items: center;
  }
}

.banner-live__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-left: 0;
  width: 100%;
}

@media (min-width: 769px) {
  .banner-live__actions {
    margin-left: auto;
    width: auto;
  }
}

.btn .fa-brands,
.btn .fa-solid {
  font-size: 0.9em;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  padding: 0.45rem 0.9rem;
  border-radius: var(--radius-sm);
  font-size: 0.875rem;
  font-weight: 500;
  border: 1px solid transparent;
  touch-action: manipulation;
  transition: opacity 0.15s, transform 0.1s, background 0.2s ease, border-color 0.2s ease, color 0.2s ease, box-shadow 0.2s ease;
}

.btn:focus-visible {
  outline: 2px solid var(--accent-orange);
  outline-offset: 2px;
}

.btn:active {
  transform: scale(0.98);
}

.btn:disabled,
.btn[disabled] {
  opacity: 0.45;
  cursor: not-allowed;
  pointer-events: none;
  transform: none;
}

.btn--primary {
  background: var(--accent-orange);
  color: #1a0a00;
  border-color: var(--accent-orange);
}

.btn--ghost {
  border-color: var(--border-strong);
  background: var(--bg-elevated);
  color: var(--text);
}

.btn--outline {
  border-color: var(--border-strong);
  background: transparent;
  color: var(--text);
}

.btn--sm {
  padding: 0.32rem 0.65rem;
  font-size: 0.8rem;
}

.btn--dark {
  background: var(--text);
  color: var(--bg-app);
}

[data-theme="light"] .btn--dark {
  background: #111;
  color: #fff;
}

.banner-promo {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  flex-wrap: nowrap;
  gap: 0.75rem;
  padding: 0.65rem 1rem;
  margin-bottom: 1rem;
  border-radius: var(--radius-md);
  border: 1px solid var(--border);
  background: var(--bg-elevated);
  font-size: 0.875rem;
}

@media (min-width: 769px) {
  .banner-promo {
    flex-direction: row;
    flex-wrap: wrap;
    align-items: center;
  }
}

.banner-promo__icon {
  width: 36px;
  height: 36px;
  border-radius: var(--radius-sm);
  background: var(--accent-orange-dim);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
}

.banner-promo__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-left: 0;
  width: 100%;
  align-items: center;
}

@media (min-width: 769px) {
  .banner-promo__actions {
    margin-left: auto;
    width: auto;
  }
}

.page-head {
  margin-bottom: 1.25rem;
}

.page-head__row {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  flex-wrap: nowrap;
  justify-content: flex-start;
  gap: 1rem;
}

.page-head__title {
  display: flex;
  gap: 0.75rem;
  align-items: flex-start;
  min-width: 0;
  flex: 1 1 auto;
}

.page-head__title > div:last-child {
  min-width: 0;
}

.page-icon {
  width: 44px;
  height: 44px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border);
  background: var(--bg-input);
  display: flex;
  align-items: center;
  justify-content: center;
}

.page-icon i {
  font-size: 1.25rem;
  color: var(--text-muted);
}

.page-head h1 {
  margin: 0;
  font-size: 1.25rem;
  font-weight: 600;
  letter-spacing: -0.02em;
}

.page-head p {
  margin: 0.25rem 0 0;
  font-size: 0.9rem;
  color: var(--text-muted);
  max-width: 520px;
}

.segmented {
  display: flex;
  width: 100%;
  max-width: 100%;
  padding: 3px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border);
  background: var(--bg-input);
  flex-wrap: wrap;
  box-sizing: border-box;
}

.segmented button {
  padding: 0.35rem 0.85rem;
  border-radius: var(--radius-sm);
  font-size: 0.8rem;
  color: var(--text-muted);
  flex: 1 1 auto;
  min-width: min(8rem, 100%);
  text-align: center;
  transition: background 0.18s ease, color 0.18s ease, box-shadow 0.18s ease;
}

.segmented button:focus-visible {
  outline: 2px solid var(--accent-orange);
  outline-offset: 2px;
}

.segmented button[aria-selected="true"] {
  background: var(--bg-elevated);
  color: var(--text);
  box-shadow: var(--shadow-sm);
  font-weight: 500;
}

.head-actions {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  flex-wrap: nowrap;
  gap: 0.5rem;
  margin-top: 0.75rem;
}

.head-actions .btn {
  width: 100%;
  justify-content: center;
}

@media (min-width: 769px) {
  .head-actions {
    flex-direction: row;
    flex-wrap: wrap;
    align-items: center;
  }

  .head-actions .btn {
    width: auto;
    justify-content: center;
  }
}

.app-trial-ended-banner {
  margin: 0 0 1rem;
  padding: 0.75rem 1rem;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-strong);
  background: var(--bg-elevated);
}

.app-trial-ended-banner__inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
}

.app-trial-ended-banner__text {
  margin: 0;
  font-size: 0.875rem;
  color: var(--text);
  flex: 1;
  min-width: 200px;
  line-height: 1.45;
}

.app-trial-ended-banner__text .fa-solid {
  margin-right: 0.35rem;
  color: var(--accent-orange, #f97316);
}

.app-trial-ended-banner__actions {
  flex-shrink: 0;
}

.app-subscription-renewal-banner {
  margin: 0 0 1rem;
  padding: 0.75rem 1rem;
  border-radius: var(--radius-md);
  border: 1px solid rgba(96, 165, 250, 0.35);
  background: rgba(37, 99, 235, 0.12);
}

.app-subscription-renewal-banner__inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
}

.app-subscription-renewal-banner__text {
  margin: 0;
  font-size: 0.875rem;
  color: var(--text);
  flex: 1;
  min-width: 200px;
  line-height: 1.45;
}

.app-subscription-renewal-banner__text .fa-solid {
  margin-right: 0.35rem;
  color: var(--accent-blue, #60a5fa);
}

.filter-row {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  flex-wrap: nowrap;
  justify-content: flex-start;
  gap: 0.75rem;
  margin-bottom: 1rem;
}

.filter-row .filter-scope {
  align-self: flex-start;
}

.pills {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
}

.pill {
  padding: 0.35rem 0.85rem;
  border-radius: 999px;
  border: 1px solid var(--border);
  font-size: 0.8rem;
  color: var(--text-muted);
  background: transparent;
}

.pill[aria-selected="true"] {
  background: var(--bg-active);
  color: var(--text);
  border-color: var(--border-strong);
}

a.pill {
  text-decoration: none;
  display: inline-block;
  cursor: pointer;
}

.pill[aria-current="page"],
.pill.pill--active {
  background: var(--bg-active);
  color: var(--text);
  border-color: var(--border-strong);
}

.filter-scope {
  display: inline-flex;
  border-radius: var(--radius-md);
  border: 1px solid var(--border);
  overflow: hidden;
}

.filter-scope button {
  padding: 0.35rem 0.75rem;
  font-size: 0.8rem;
  display: flex;
  align-items: center;
  gap: 0.35rem;
  color: var(--text-muted);
  border-left: 1px solid var(--border);
}

.filter-scope button:first-child {
  border-left: none;
}

.filter-scope button[aria-selected="true"] {
  background: var(--bg-input);
  color: var(--text);
}

.filter-scope__link {
  text-decoration: none;
  color: inherit;
  padding: 0.35rem 0.75rem;
  font-size: 0.8rem;
  display: flex;
  align-items: center;
  gap: 0.35rem;
  color: var(--text-muted);
  border-left: 1px solid var(--border);
}

.filter-scope__link:first-child {
  border-left: none;
}

.filter-scope__link--active,
.filter-scope__link[aria-current="page"] {
  background: var(--bg-input);
  color: var(--text);
}

.filter-platform-form {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem;
  width: 100%;
}

.filter-platform-form__label {
  font-size: 0.8rem;
  color: var(--text-muted);
}

@media (min-width: 769px) {
  .filter-row > .filter-platform-form {
    width: auto;
    flex: 0 1 15rem;
  }
}

.filter-scope__dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
}

.filter-scope__dot--primary {
  background: var(--accent-green);
}

.filter-scope__dot--muted {
  background: var(--text-muted);
}

.grid-metrics {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.75rem;
  margin-bottom: 1rem;
}

@media (min-width: 421px) {
  .grid-metrics {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 769px) {
  .grid-metrics {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (min-width: 1201px) {
  .grid-metrics {
    grid-template-columns: repeat(5, 1fr);
  }
}

.metric-card {
  padding: 1rem;
  border-radius: var(--radius-md);
  border: 1px solid var(--border);
  background: var(--bg-elevated);
}

.metric-card__label {
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-bottom: 0.35rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.metric-card__value {
  font-size: 1.35rem;
  font-weight: 600;
  letter-spacing: -0.02em;
}

.metric-card__sub {
  font-size: 0.75rem;
  color: var(--text-faint);
  margin-top: 0.25rem;
}

.grid-charts {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.75rem;
  margin-bottom: 1rem;
  min-width: 0;
}

@media (min-width: 901px) {
  .grid-charts {
    grid-template-columns: 2fr 1fr;
  }
}

.grid-charts--thirds {
  grid-template-columns: 1fr;
}

@media (min-width: 900px) {
  .grid-charts--thirds {
    grid-template-columns: repeat(3, 1fr);
  }
}

.grid-charts--split {
  grid-template-columns: 1fr;
}

@media (min-width: 900px) {
  .grid-charts--split {
    grid-template-columns: 1fr 1fr;
  }
}

.app-content--insights {
  max-width: 1380px;
}

.insights-hero {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 1rem 1.5rem;
  margin-bottom: 1.25rem;
}

.insights-hero__eyebrow {
  margin: 0 0 0.35rem;
  font-size: 0.8rem;
  color: var(--text-muted);
  letter-spacing: 0.02em;
}

.insights-hero__title {
  margin: 0;
  font-size: clamp(1.5rem, 2.5vw, 2rem);
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.15;
}

.insights-hero__lede {
  margin: 0.4rem 0 0;
  font-size: 0.875rem;
  color: var(--text-muted);
  max-width: 36rem;
}

.insights-hero__actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem;
}

.insights-range-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.45rem 0.85rem;
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--text-muted);
  border: 1px solid var(--border);
  background: var(--bg-elevated);
}

.insights-tabs {
  margin-bottom: 0.75rem;
}

.insights-context-banner {
  margin-bottom: 1.1rem;
}

.insights-kpi-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.75rem;
  margin-bottom: 1.25rem;
}

@media (min-width: 560px) {
  .insights-kpi-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 1024px) {
  .insights-kpi-grid {
    grid-template-columns: repeat(4, 1fr);
  }
}

.insights-kpi {
  display: flex;
  gap: 0.85rem;
  align-items: flex-start;
  padding: 1rem 1.05rem;
  border-radius: var(--radius-md);
  border: 1px solid var(--border);
  background: var(--bg-elevated);
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.04), 0 8px 24px rgba(15, 23, 42, 0.06);
  transition: border-color 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
}

[data-theme="light"] .insights-kpi {
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.06), 0 10px 28px rgba(99, 102, 241, 0.08);
}

.insights-kpi:hover {
  border-color: rgba(99, 102, 241, 0.35);
  transform: translateY(-1px);
}

.insights-kpi__icon {
  flex-shrink: 0;
  width: 2.5rem;
  height: 2.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 12px;
  font-size: 1rem;
}

.insights-kpi--reach .insights-kpi__icon {
  background: linear-gradient(135deg, rgba(99, 102, 241, 0.22), rgba(168, 85, 247, 0.15));
  color: #818cf8;
}

.insights-kpi--impressions .insights-kpi__icon {
  background: linear-gradient(135deg, rgba(56, 189, 248, 0.2), rgba(99, 102, 241, 0.12));
  color: #38bdf8;
}

.insights-kpi--engagement .insights-kpi__icon {
  background: linear-gradient(135deg, rgba(236, 72, 153, 0.18), rgba(168, 85, 247, 0.12));
  color: #ec4899;
}

.insights-kpi--posts .insights-kpi__icon {
  background: linear-gradient(135deg, rgba(34, 197, 94, 0.18), rgba(56, 189, 248, 0.1));
  color: #22c55e;
}

.insights-kpi__body {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
}

.insights-kpi__label {
  font-size: 0.72rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-muted);
}

.insights-kpi__value {
  font-size: clamp(1.35rem, 2vw, 1.65rem);
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.1;
}

.insights-kpi__delta {
  display: inline-flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.25rem 0.35rem;
  font-size: 0.72rem;
  font-weight: 600;
  margin-top: 0.15rem;
}

.insights-kpi__delta-hint {
  font-weight: 500;
  color: var(--text-faint);
}

.insights-kpi__delta--up {
  color: #22c55e;
}

.insights-kpi__delta--down {
  color: #f87171;
}

.insights-kpi__delta--down .fa-arrow-trend-up {
  transform: rotate(180deg);
}

.insights-kpi__delta--muted {
  color: var(--text-muted);
  font-weight: 500;
}

.insights-pill {
  font-size: 0.68rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 0.2rem 0.55rem;
  border-radius: 999px;
  background: rgba(99, 102, 241, 0.12);
  color: var(--text-muted);
  border: 1px solid rgba(99, 102, 241, 0.22);
}

.insights-pill--success {
  background: rgba(34, 197, 94, 0.12);
  border-color: rgba(34, 197, 94, 0.28);
  color: #22c55e;
}

.card__head--insights-smart {
  flex-wrap: wrap;
  gap: 0.5rem;
}

.insights-smart-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-top: 0.65rem;
}

.insights-smart-chip {
  font-size: 0.72rem;
  font-weight: 600;
  padding: 0.3rem 0.65rem;
  border-radius: 999px;
  border: 1px solid rgba(168, 85, 247, 0.35);
  background: linear-gradient(135deg, rgba(99, 102, 241, 0.1), rgba(168, 85, 247, 0.08));
  color: var(--text);
}

.insights-grid-charts .card--insights-chart {
  min-height: 320px;
}

.insights-chart-legend-inline {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem 1rem;
  font-size: 0.72rem;
  color: var(--text-muted);
  margin-right: 0.35rem;
}

.insights-chart-legend-inline__item {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
}

.insights-chart-legend-inline__dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  display: inline-block;
}

.insights-chart-legend-inline__dot--reach {
  background: #6366f1;
}

.insights-chart-legend-inline__dot--imp {
  background: linear-gradient(90deg, #38bdf8, #818cf8);
}

.insights-chart-area {
  padding: 0.5rem 1rem 1rem;
}

.insights-chart-area__svg {
  width: 100%;
  height: auto;
  max-height: 200px;
  display: block;
}

.insights-chart-area__grid {
  stroke: var(--border);
  opacity: 0.45;
  stroke-dasharray: 4 6;
}

.insights-chart-area__baseline {
  stroke: var(--border);
}

.insights-chart-area__line--reach {
  stroke: #6366f1;
}

.insights-chart-area__line--imp {
  stroke: url(#insights-imp-stroke);
}

.insights-chart-area__axis {
  display: flex;
  justify-content: space-between;
  font-size: 0.72rem;
  color: var(--text-muted);
  margin-top: 0.35rem;
  padding: 0 0.15rem;
}

.insights-chart-footnote {
  margin: 0.65rem 0 0;
  font-size: 0.75rem;
  color: var(--text-muted);
}

.card--insights-smart {
  margin-bottom: 1.25rem;
}

.insights-smart-body {
  padding: 0.75rem 1rem 1.1rem;
}

.insights-smart-lede {
  margin: 0 0 0.65rem;
  font-size: 0.875rem;
  color: var(--text-muted);
  line-height: 1.5;
}

.insights-smart-list {
  margin: 0 0 0.75rem;
  padding-left: 1.15rem;
  font-size: 0.84rem;
  line-height: 1.55;
  color: var(--text);
}

.insights-smart-slots {
  margin: 0;
  font-size: 0.84rem;
}

.insights-hour-card {
  margin-bottom: 1.25rem;
}

.card--insights-hour .card__head {
  flex-wrap: wrap;
  gap: 0.5rem;
}

.insights-hour-heat {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 3px;
  padding: 1rem 1rem 0.35rem;
  min-height: 128px;
}

.insights-hour-heat__col {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.2rem;
  min-width: 0;
}

.insights-hour-heat__bar {
  width: 100%;
  max-width: 16px;
  border-radius: 4px 4px 2px 2px;
  background: linear-gradient(180deg, rgba(168, 85, 247, 0.95), rgba(99, 102, 241, 0.4));
  min-height: 4px;
  box-shadow: 0 0 0 transparent;
  transition: box-shadow 0.2s ease;
}

.insights-hour-heat__bar--peak {
  box-shadow: 0 0 14px rgba(168, 85, 247, 0.45);
}

.insights-hour-heat__label {
  font-size: 0.58rem;
  color: var(--text-muted);
  line-height: 1;
  min-height: 0.65rem;
}

.insights-hour-footnote {
  margin: 0 1rem 1rem;
}

.insights-bar-rank__empty {
  padding: 0.75rem 1rem;
  margin: 0;
}

.composer-audience-hint {
  display: flex;
  gap: 0.75rem;
  align-items: flex-start;
  margin: 0.75rem 0 1rem;
  padding: 0.75rem 1rem;
  border-radius: var(--radius-md, 10px);
  background: linear-gradient(135deg, rgba(99, 102, 241, 0.12), rgba(168, 85, 247, 0.08));
  border: 1px solid rgba(99, 102, 241, 0.22);
}

.composer-audience-hint__icon {
  flex-shrink: 0;
  width: 2rem;
  height: 2rem;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  background: rgba(99, 102, 241, 0.2);
  color: var(--accent-purple, #a855f7);
}

.composer-audience-hint__body {
  min-width: 0;
  flex: 1;
}

.composer-audience-hint__body strong {
  display: block;
  font-size: 0.8rem;
  margin-bottom: 0.35rem;
}

.composer-audience-hint__body p {
  margin: 0 0 0.5rem;
  font-size: 0.78rem;
  line-height: 1.45;
  color: var(--text-muted);
}

.composer-audience-hint__chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
}

.composer-slot-chip {
  font-size: 0.72rem;
  font-weight: 600;
  padding: 0.25rem 0.55rem;
  border-radius: 999px;
  border: 1px solid rgba(99, 102, 241, 0.35);
  background: var(--bg-elevated, rgba(255, 255, 255, 0.04));
  color: var(--text);
  cursor: pointer;
}

.composer-slot-chip:hover {
  border-color: var(--accent-purple, #a855f7);
  background: rgba(168, 85, 247, 0.12);
}

.composer-delay-row {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 0.5rem;
  align-items: center;
}

.calendar-smart-hint {
  margin: 0.75rem 0 1rem;
  padding: 0.65rem 0.85rem;
  border-radius: var(--radius-md, 10px);
  background: rgba(99, 102, 241, 0.08);
  border: 1px solid rgba(99, 102, 241, 0.2);
  font-size: 0.82rem;
}

.calendar-smart-hint strong {
  display: block;
  margin-bottom: 0.35rem;
  font-size: 0.78rem;
}

.calendar-smart-hint p {
  margin: 0 0 0.35rem;
  color: var(--text-muted);
  line-height: 1.45;
}

.calendar-smart-hint__times {
  margin: 0 !important;
  color: var(--text) !important;
  font-weight: 500;
}

.insights-bar-rank {
  padding: 0.75rem 1rem 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
}

.insights-bar-rank__row {
  display: grid;
  grid-template-columns: 2rem minmax(0, 1fr) 3.5rem;
  gap: 0.55rem;
  align-items: center;
  font-size: 0.78rem;
}

.insights-bar-rank__rank {
  font-size: 0.7rem;
  font-weight: 800;
  color: var(--accent-purple, #a855f7);
  letter-spacing: 0.02em;
}

.insights-bar-rank__main {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.insights-bar-rank__label {
  color: var(--text);
  font-weight: 500;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.insights-bar-rank__score {
  font-weight: 700;
  font-size: 0.75rem;
  color: var(--text-muted);
  text-align: right;
}

.insights-bar-rank__track {
  height: 7px;
  border-radius: 999px;
  background: var(--bg-input);
  overflow: hidden;
}

.insights-bar-rank__fill {
  display: block;
  height: 100%;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--accent-purple), var(--accent-orange));
}

.insights-donut-block {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1.25rem;
  flex-wrap: wrap;
  padding: 0.85rem 1rem 1.15rem;
}

.insights-donut-block--compact {
  gap: 1rem;
}

.insights-donut-wrap {
  position: relative;
  flex-shrink: 0;
}

.insights-donut-wrap--sm .insights-donut--sm {
  width: 108px;
  height: 108px;
}

.insights-donut {
  width: 140px;
  height: 140px;
  border-radius: 50%;
  flex-shrink: 0;
  background: conic-gradient(
    #6366f1 0deg 126deg,
    #0a66c2 126deg 226.8deg,
    #e4405f 226.8deg 306deg,
    #f97316 306deg 360deg
  );
  position: relative;
}

.insights-donut--sm {
  width: 108px;
  height: 108px;
}

.insights-donut::after {
  content: "";
  position: absolute;
  inset: 24%;
  border-radius: 50%;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
}

.insights-donut__center {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  pointer-events: none;
  z-index: 1;
}

.insights-donut__center-label {
  font-size: 0.62rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-muted);
  font-weight: 600;
}

.insights-donut__center strong {
  font-size: 1.05rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  margin-top: 0.1rem;
}

.insights-donut-legend {
  margin: 0;
  padding: 0;
  list-style: none;
  font-size: 0.8rem;
  color: var(--text-muted);
  line-height: 1.65;
}

.insights-donut-legend li {
  display: grid;
  grid-template-columns: 12px 1fr auto;
  align-items: center;
  gap: 0.45rem 0.65rem;
}

.insights-donut-legend__text {
  color: var(--text);
  font-weight: 500;
}

.insights-donut-legend__pct {
  font-weight: 700;
  color: var(--text-muted);
  font-size: 0.75rem;
}

.insights-donut-legend__swatch {
  width: 10px;
  height: 10px;
  border-radius: 2px;
  flex-shrink: 0;
}

.insights-donut-legend__swatch--x {
  background: #6366f1;
}

.insights-donut-legend__swatch--in {
  background: #0a66c2;
}

.insights-donut-legend__swatch--ig {
  background: #e4405f;
}

.insights-donut-legend__swatch--ot {
  background: #f97316;
}

.dashboard-platform-mix__note {
  margin: 0;
  padding: 0 1rem 0.9rem;
  font-size: 0.72rem;
  color: var(--text-faint);
  line-height: 1.45;
}

.insights-week-bars {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 0.35rem;
  padding: 0.75rem 1rem 1rem;
  min-height: 160px;
}

.insights-week-bars__col {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.35rem;
  min-width: 0;
}

.insights-week-bars__val {
  font-size: 0.62rem;
  font-weight: 700;
  color: var(--text-muted);
  min-height: 0.9rem;
  line-height: 1;
}

.insights-week-bars__bar {
  width: 100%;
  max-width: 36px;
  border-radius: 6px 6px 2px 2px;
  background: linear-gradient(180deg, rgba(99, 102, 241, 0.85), rgba(99, 102, 241, 0.35));
  min-height: 4px;
}

.insights-week-bars__bar--peak {
  background: linear-gradient(180deg, #a855f7, #6366f1);
  box-shadow: 0 0 16px rgba(168, 85, 247, 0.35);
}

.insights-week-bars__dow {
  font-size: 0.68rem;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.insights-format-chart {
  padding: 0.75rem 1rem 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.insights-format-chart__row {
  display: grid;
  grid-template-columns: 5.5rem 1fr 2.5rem;
  gap: 0.5rem;
  align-items: center;
  font-size: 0.8rem;
}

.insights-format-chart__track {
  height: 8px;
  border-radius: 999px;
  background: var(--bg-input);
  overflow: hidden;
}

.insights-format-chart__fill {
  display: block;
  height: 100%;
  border-radius: 999px;
}

.insights-format-chart__pct {
  text-align: right;
  font-weight: 600;
  color: var(--text-muted);
  font-size: 0.78rem;
}

.insights-stacked-preview {
  padding: 0.85rem 1rem 1rem;
}

.insights-stacked-preview__bar {
  display: flex;
  height: 36px;
  border-radius: var(--radius-sm);
  overflow: hidden;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.04em;
}

.insights-stacked-preview__seg {
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.35);
}

.insights-stacked-preview__seg--new {
  background: linear-gradient(135deg, #6366f1, #8b5cf6);
}

.insights-stacked-preview__seg--ret {
  background: linear-gradient(135deg, #0ea5e9, #06b6d4);
}

.insights-stacked-preview__key {
  display: flex;
  flex-wrap: wrap;
  gap: 0.85rem 1.25rem;
  margin-top: 0.75rem;
  font-size: 0.78rem;
  color: var(--text-muted);
}

.insights-stacked-preview__dot {
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 2px;
  margin-right: 0.35rem;
  vertical-align: middle;
}

.insights-stacked-preview__dot--new {
  background: #8b5cf6;
}

.insights-stacked-preview__dot--ret {
  background: #06b6d4;
}

.insights-rate-panel {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 1.25rem 1.5rem;
  padding: 1rem 1.1rem 1.15rem;
}

.insights-rate-panel__ring {
  position: relative;
  width: 120px;
  height: 120px;
  flex-shrink: 0;
}

.insights-rate-panel__svg {
  width: 100%;
  height: 100%;
  display: block;
}

.insights-rate-panel__pct {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.35rem;
  font-weight: 800;
  letter-spacing: -0.03em;
}

.insights-rate-panel__copy {
  flex: 1;
  min-width: 12rem;
}

.insights-rate-panel__copy p {
  margin: 0 0 0.75rem;
  font-size: 0.82rem;
  color: var(--text-muted);
  line-height: 1.5;
}

.insights-rate-panel__stats {
  margin: 0;
  padding: 0;
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem 1.25rem;
  font-size: 0.8rem;
  color: var(--text-muted);
}

.insights-rate-panel__stats strong {
  display: block;
  font-size: 1rem;
  color: var(--text);
  font-weight: 700;
}

.insights-channel-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(7.5rem, 1fr));
  gap: 0.65rem;
  padding: 0.85rem 1rem 1rem;
}

.insights-channel-tile {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 0.2rem;
  padding: 0.75rem 0.5rem;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: var(--bg-input);
  transition: border-color 0.2s ease, background 0.2s ease;
}

.insights-channel-tile:hover {
  border-color: rgba(99, 102, 241, 0.4);
  background: rgba(99, 102, 241, 0.06);
}

.insights-channel-tile__icon {
  width: 2.25rem;
  height: 2.25rem;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 10px;
  background: linear-gradient(135deg, rgba(99, 102, 241, 0.18), rgba(168, 85, 247, 0.1));
  color: var(--accent-purple, #a855f7);
  font-size: 1.1rem;
  margin-bottom: 0.15rem;
}

.insights-channel-tile__name {
  font-size: 0.68rem;
  font-weight: 600;
  color: var(--text-muted);
  line-height: 1.2;
}

.insights-channel-tile strong {
  font-size: 1.2rem;
  font-weight: 800;
  letter-spacing: -0.02em;
}

.insights-channel-tile__sub {
  font-size: 0.62rem;
  color: var(--text-faint);
}

.insights-channel-grid__empty {
  grid-column: 1 / -1;
  padding: 0.5rem 0;
  margin: 0;
}

.insights-format-chart--empty {
  padding: 1.25rem 1rem;
}

.insights-spark-compare {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
  padding: 0.85rem 1rem 1rem;
}

.insights-spark-compare__metric {
  padding: 0.75rem;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: var(--bg-input);
}

.insights-spark-compare__label {
  display: block;
  font-size: 0.72rem;
  color: var(--text-muted);
  margin-bottom: 0.25rem;
}

.insights-spark-compare__metric strong {
  font-size: 1.25rem;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.insights-mini-spark {
  display: flex;
  align-items: flex-end;
  gap: 3px;
  height: 40px;
  margin-top: 0.75rem;
}

.insights-mini-spark span {
  flex: 1;
  min-width: 4px;
  border-radius: 2px;
  background: linear-gradient(180deg, var(--accent-purple), rgba(99, 102, 241, 0.35));
  align-self: stretch;
}

.card {
  border-radius: var(--radius-md);
  border: 1px solid var(--border);
  background: var(--bg-elevated);
  overflow: hidden;
  transition: border-color 0.22s ease, box-shadow 0.22s ease;
}

.card__body {
  padding: 1rem 1.25rem;
}

.card__body--flush {
  padding: 0;
}

.card--app-section {
  margin-bottom: 1.25rem;
  box-shadow: var(--shadow-sm);
  transition: border-color 0.22s ease, box-shadow 0.28s ease;
}

@media (hover: hover) {
  .card--app-section:hover {
    border-color: var(--border-strong);
    box-shadow: 0 6px 24px rgba(0, 0, 0, 0.06);
  }
}

[data-theme="dark"] .card--app-section:hover {
  box-shadow: 0 8px 28px rgba(0, 0, 0, 0.35);
}

.card--context-note {
  border-color: rgba(167, 139, 250, 0.28);
  background: linear-gradient(165deg, rgba(167, 139, 250, 0.07) 0%, var(--bg-elevated) 55%);
}

.card--context-note .card__body--dense {
  padding: 0.85rem 1.1rem;
}

.card--context-note .app-context-banner {
  margin: 0;
  padding: 0;
  border: none;
  background: transparent;
}

.card__head--media {
  flex-wrap: wrap;
  gap: 0.65rem;
  align-items: center;
}

.card__head--media .media-lib-section__title {
  margin: 0;
  flex: 1 1 auto;
  min-width: 0;
}

@media (min-width: 640px) {
  .card__head--media {
    flex-wrap: nowrap;
    justify-content: space-between;
  }
}

.card--app-section .table-wrap {
  border: none;
  border-radius: 0;
  background: transparent;
}

.card--app-section .table-toolbar {
  border-radius: 0;
}

@media (hover: hover) {
  .app-main .card:hover {
    border-color: var(--border-strong);
  }
}

.card__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.5rem;
  padding: 0.85rem 1rem;
  border-bottom: 1px solid var(--border);
  font-size: 0.9rem;
  font-weight: 600;
}

@media (min-width: 769px) {
  .card__head {
    flex-wrap: nowrap;
    gap: 0;
  }
}

.card__head select {
  font: inherit;
  font-size: 0.8rem;
  padding: 0.25rem 0.5rem;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: var(--bg-input);
  color: var(--text);
}

.empty-lg {
  min-height: 220px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 2rem;
  text-align: center;
  color: var(--text-muted);
}

.empty-lg > i {
  font-size: 2.75rem;
  margin-bottom: 0.75rem;
  opacity: 0.35;
}

.empty-lg strong {
  color: var(--text);
  display: block;
  margin-bottom: 0.25rem;
}

.dashboard-chart {
  padding: 0.35rem 1rem 1rem;
  min-height: 220px;
  min-width: 0;
}

.dashboard-chart__figure {
  margin: 0;
  min-width: 0;
}

.dashboard-chart__plot {
  width: 100%;
  overflow: hidden;
  border-radius: 0.5rem;
}

.dashboard-chart__svg {
  width: 100%;
  height: auto;
  display: block;
  max-height: 300px;
}

.dashboard-chart__grid {
  stroke: var(--border);
  stroke-width: 1;
  opacity: 0.2;
  vector-effect: non-scaling-stroke;
}

.dashboard-chart__baseline {
  stroke: var(--text-muted);
  stroke-width: 1;
  stroke-dasharray: 5 7;
  opacity: 0.45;
  vector-effect: non-scaling-stroke;
}

.dashboard-chart__axis-text {
  fill: var(--text-muted);
  font-size: 10px;
  font-family: inherit;
}

.dashboard-chart__axis-text--x {
  font-size: 9px;
}

.dashboard-chart__area {
  pointer-events: none;
}

.dashboard-chart__line {
  stroke: currentColor;
  vector-effect: non-scaling-stroke;
}

.dashboard-chart__line--posts {
  color: #2563eb;
}

.dashboard-chart__line--impressions {
  color: #7c3aed;
}

.dashboard-chart__line--engagement {
  color: #059669;
}

.dashboard-chart__dot {
  fill: currentColor;
  stroke: var(--bg-elevated);
  stroke-width: 2;
}

.dashboard-chart__legend {
  list-style: none;
  margin: 0.65rem 0 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem 1.1rem;
  font-size: 0.78rem;
  color: var(--text-muted);
}

.dashboard-chart__legend-item {
  display: flex;
  align-items: center;
  gap: 0.35rem;
}

.dashboard-chart__swatch {
  width: 10px;
  height: 10px;
  border-radius: 2px;
  flex-shrink: 0;
}

.dashboard-chart__legend-item .dashboard-chart__swatch.dashboard-chart__line--posts {
  background: #2563eb;
}

.dashboard-chart__legend-item .dashboard-chart__swatch.dashboard-chart__line--impressions {
  background: #7c3aed;
}

.dashboard-chart__legend-item .dashboard-chart__swatch.dashboard-chart__line--engagement {
  background: #059669;
}

.dashboard-chart__note {
  margin: 0.65rem 0 0;
  font-size: 0.72rem;
  color: var(--text-faint);
  line-height: 1.45;
}

.dashboard-chart__note strong {
  color: var(--text-muted);
  font-weight: 600;
}

.action-row {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.75rem;
  margin-bottom: 1rem;
}

@media (min-width: 1025px) {
  .action-row {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

.action-tile {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.85rem 1rem;
  border-radius: var(--radius-md);
  border: 1px solid var(--border);
  background: var(--bg-elevated);
  font-size: 0.9rem;
  font-weight: 500;
  transition: background 0.15s;
}

.action-tile:hover {
  background: var(--bg-hover);
}

.action-tile__left {
  display: flex;
  align-items: center;
  gap: 0.65rem;
}

.action-tile__icon {
  width: 36px;
  height: 36px;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
}

.action-tile__icon--purple {
  background: rgba(167, 139, 250, 0.15);
  color: var(--accent-purple);
}

.action-tile__icon--orange {
  background: var(--accent-orange-dim);
  color: #c2410c;
}

[data-theme="dark"] .action-tile__icon--orange {
  color: var(--accent-orange);
}

.action-tile__icon--green {
  background: rgba(52, 211, 153, 0.15);
  color: var(--accent-green);
}

.action-tile__icon--teal {
  background: rgba(20, 184, 166, 0.16);
  color: #14b8a6;
}

.action-tile span:last-child {
  opacity: 0.45;
  font-size: 1rem;
}

.action-tile__icon i {
  font-size: 1rem;
}

.tools-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.75rem;
  padding: 0.85rem;
}

@media (min-width: 1025px) {
  .tools-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

.tool-card {
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background: var(--bg-soft);
  padding: 0.75rem;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}

.tool-card--enabled {
  border-color: rgba(34, 197, 94, 0.28);
}

.tool-card__head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.6rem;
}

.tool-card__head h3 {
  margin: 0;
  font-size: 0.98rem;
}

.tool-card__head p {
  margin: 0.18rem 0 0;
  font-size: 0.78rem;
  color: var(--text-muted);
}

.tool-card__body p {
  margin: 0;
  font-size: 0.84rem;
  color: var(--text-muted);
}

.tool-card__form {
  display: grid;
  gap: 0.45rem;
}

.tool-card__label {
  font-size: 0.76rem;
  font-weight: 600;
  color: var(--text-muted);
}

.tool-card__foot {
  margin-top: auto;
}

.tool-card__foot .btn {
  width: 100%;
  justify-content: center;
}

.tool-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  border: 1px solid var(--border);
  padding: 0.14rem 0.5rem;
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--text-muted);
  background: var(--bg);
}

.tool-pill--enabled {
  color: #22c55e;
  border-color: rgba(34, 197, 94, 0.35);
  background: rgba(34, 197, 94, 0.1);
}

.grid-bottom {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.75rem;
  min-width: 0;
}

.grid-bottom > .card {
  min-width: 0;
}

@media (min-width: 1025px) {
  .grid-bottom {
    grid-template-columns: 1fr 1fr 1fr;
  }
}

.card__head-link {
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--text-muted);
}

.card__head-link:hover {
  color: var(--text);
}

.empty-sm {
  min-height: 140px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 1.25rem;
  color: var(--text-muted);
  font-size: 0.875rem;
}

.empty-sm > i {
  font-size: 2.25rem;
  margin-bottom: 0.5rem;
  opacity: 0.35;
}

.ai-panel .card__body {
  padding: 0;
}

.ai-disabled {
  padding: 1.25rem;
  text-align: center;
  font-size: 0.875rem;
  color: var(--text-muted);
  min-height: 100px;
}

.ai-panel__note {
  display: block;
  margin-top: 0.65rem;
  font-size: 0.78rem;
  line-height: 1.45;
  color: var(--text-muted);
}

.ai-input {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.65rem 1rem;
  border-top: 1px solid var(--border);
  background: var(--bg-input);
}

.ai-input input {
  flex: 1;
  border: none;
  background: transparent;
  font: inherit;
  color: var(--text);
  outline: none;
}

.ai-input input::placeholder {
  color: var(--text-faint);
}

.ai-input__pro-link {
  flex-shrink: 0;
  text-decoration: none;
}
.ai-input__pro-link:hover .composer-ai-paywall__badge {
  filter: brightness(1.08);
}
.ai-input__pro-link:focus-visible {
  outline: 2px solid var(--accent-blue, #60a5fa);
  outline-offset: 2px;
  border-radius: 999px;
}

.ai-input__composer-link {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: inherit;
  opacity: 0.35;
  text-decoration: none;
}
.ai-input__composer-link:hover {
  opacity: 0.65;
}
.ai-input__composer-link:focus-visible {
  outline: 2px solid var(--accent-blue, #60a5fa);
  outline-offset: 2px;
  border-radius: 4px;
  opacity: 1;
}

.app-fab {
  position: fixed;
  bottom: max(1rem, env(safe-area-inset-bottom));
  right: max(1rem, env(safe-area-inset-right));
  z-index: 150;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.6rem 1rem;
  border-radius: 999px;
  background: linear-gradient(135deg, #7c3aed, #a78bfa);
  color: #fff;
  font-size: 0.875rem;
  font-weight: 600;
  box-shadow: var(--shadow-md);
}

.app-fab__avatar {
  width: 28px;
  height: 28px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.25);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.9rem;
}

.table-wrap {
  border-radius: var(--radius-md);
  border: 1px solid var(--border);
  background: var(--bg-elevated);
  overflow: hidden;
  min-width: 0;
  max-width: 100%;
}

.table-toolbar {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  flex-wrap: nowrap;
  justify-content: flex-start;
  gap: 0.75rem;
  padding: 0.75rem 1rem;
  border-bottom: 1px solid var(--border);
}

.table-toolbar .link-create {
  justify-content: center;
  text-align: center;
}

@media (min-width: 769px) {
  .table-toolbar {
    flex-direction: row;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
  }

  .table-toolbar .link-create {
    justify-content: flex-start;
    text-align: left;
  }
}

.table-toolbar .pills .pill {
  text-transform: capitalize;
}

.link-create {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--text);
}

button.link-create {
  font: inherit;
  text-align: inherit;
}

.link-create i {
  font-size: 0.75rem;
  opacity: 0.8;
}

.link-create:hover {
  text-decoration: underline;
}

.table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.8rem;
  min-width: 560px;
}

.table th {
  text-align: left;
  padding: 0.65rem 1rem;
  color: var(--text-faint);
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  border-bottom: 1px solid var(--border);
}

.table td {
  padding: 0.75rem 1rem;
  border-bottom: 1px solid var(--border);
}

.table-empty {
  padding: 3rem 1.5rem;
  text-align: center;
}

.table-empty > i {
  display: block;
  font-size: 3.25rem;
  margin: 0 auto 1rem;
  opacity: 0.25;
}

.table-empty h3 {
  margin: 0 0 0.35rem;
  font-size: 1.1rem;
}

.table-empty p {
  margin: 0 0 1.25rem;
  color: var(--text-muted);
  font-size: 0.9rem;
}

.table-scroll {
  min-width: 0;
  max-width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

@media (min-width: 641px) {
  .table-scroll {
    overflow-x: visible;
  }

  .table {
    min-width: 0;
  }
}

.grid-balance {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.75rem;
  align-items: start;
}

@media (min-width: 901px) {
  .grid-balance {
    grid-template-columns: 1.4fr 0.9fr;
  }
}

.prose-muted {
  font-size: 0.9rem;
  color: var(--text-muted);
  line-height: 1.6;
  margin: 0;
}

.quick-links {
  padding: 0;
  margin: 0;
  list-style: none;
}

.quick-links li + li {
  border-top: 1px solid var(--border);
}

.quick-links a {
  display: flex;
  align-items: flex-start;
  gap: 0.65rem;
  padding: 0.85rem 1rem;
  font-size: 0.875rem;
  transition: background 0.15s;
}

.quick-links a:hover {
  background: var(--bg-hover);
}

.quick-links i {
  flex-shrink: 0;
  margin-top: 2px;
  color: var(--text-muted);
  font-size: 1rem;
}

.about-card .card__body {
  padding: 1rem;
}

.about-card h3 {
  margin: 0 0 0.5rem;
  font-size: 0.95rem;
  display: flex;
  align-items: center;
  gap: 0.35rem;
}

.link-inline {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  margin-top: 0.75rem;
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--accent-orange);
}

.tabs-inline {
  display: flex;
  flex-wrap: wrap;
  row-gap: 0.25rem;
  gap: 0.5rem;
  padding: 0 1rem;
  border-bottom: 1px solid var(--border);
}

@media (min-width: 769px) {
  .tabs-inline {
    flex-wrap: nowrap;
  }
}

.tabs-inline button {
  padding: 0.65rem 0;
  margin-right: 0.75rem;
  font-size: 0.85rem;
  color: var(--text-muted);
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
}

.tabs-inline button[aria-selected="true"] {
  color: var(--text);
  border-bottom-color: var(--accent-orange);
  font-weight: 500;
}

.app-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.45);
  z-index: 190;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s;
}

.app-overlay.is-open {
  opacity: 1;
  pointer-events: auto;
}

@media (min-width: 769px) {
  .app-topbar {
    padding: 0.75rem max(1.25rem, env(safe-area-inset-left)) 0.75rem max(1.25rem, env(safe-area-inset-right));
  }

  .app-content {
    padding: 1rem max(1.25rem, env(safe-area-inset-left)) 2rem max(1.25rem, env(safe-area-inset-right));
  }

  .page-head__row {
    flex-direction: row;
    flex-wrap: wrap;
    align-items: flex-start;
    justify-content: space-between;
  }

  .page-head h1 {
    font-size: 1.5rem;
  }

  .head-actions {
    margin-top: 0;
  }

  .segmented {
    display: inline-flex;
    width: auto;
    max-width: none;
  }

  .segmented button {
    flex: 0 1 auto;
    min-width: 0;
    text-align: inherit;
  }

  .filter-row {
    flex-direction: row;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
  }

  .filter-row .filter-scope {
    align-self: auto;
  }

  .action-row {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (min-width: 1024px) {
  .app-sidebar {
    transform: translateX(0);
    box-shadow: none;
  }

  .app-sidebar__brand .menu-btn--close {
    display: none;
  }

  .app-main {
    margin-left: var(--sidebar-w);
    transition: margin-left 0.28s cubic-bezier(0.22, 1, 0.36, 1);
  }

  .menu-btn {
    display: none;
  }

  .sidebar-collapse-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    flex-shrink: 0;
    border-radius: var(--radius-sm);
    border: 1px solid var(--border);
    background: var(--bg-input);
    color: var(--text-muted);
    cursor: pointer;
    transition: background 0.15s, border-color 0.15s, color 0.15s;
  }

  .sidebar-collapse-btn:hover {
    background: var(--bg-hover);
    color: var(--text);
  }

  .sidebar-collapse-btn:focus-visible {
    outline: none;
    border-color: var(--accent-orange);
    box-shadow: 0 0 0 3px var(--accent-orange-dim);
  }

  .sidebar-collapse-btn i {
    font-size: 0.85rem;
  }

  body.app-sidebar-collapsed {
    --sidebar-w: var(--sidebar-w-collapsed);
  }

  body.app-sidebar-collapsed .app-sidebar__brand {
    flex-wrap: nowrap;
    gap: 0.35rem;
    padding-left: 0.65rem;
    padding-right: 0.65rem;
  }

  body.app-sidebar-collapsed .app-sidebar__brand > a {
    flex: 1;
    min-width: 0;
    display: flex;
    justify-content: center;
  }

  body.app-sidebar-collapsed .app-sidebar__brand img,
  body.app-sidebar-collapsed .app-sidebar__brand .brand-logo-svg {
    height: 26px;
    max-width: 100%;
    object-fit: contain;
  }

  body.app-sidebar-collapsed .app-sidebar__search .search-field input,
  body.app-sidebar-collapsed .app-sidebar__search .search-field kbd {
    display: none;
  }

  body.app-sidebar-collapsed .app-sidebar__search .search-field {
    justify-content: center;
    padding: 0.55rem 0.5rem;
    cursor: pointer;
  }

  body.app-sidebar-collapsed .workspace-wrap__label,
  body.app-sidebar-collapsed .workspace__meta,
  body.app-sidebar-collapsed .workspace__chev {
    display: none;
  }

  body.app-sidebar-collapsed .workspace-wrap {
    margin-left: 0.5rem;
    margin-right: 0.5rem;
  }

  body.app-sidebar-collapsed .workspace--trigger {
    justify-content: center;
    padding: 0.5rem;
  }

  body.app-sidebar-collapsed .nav-group__label {
    display: none;
  }

  body.app-sidebar-collapsed .nav-group {
    margin-top: 0.35rem;
  }

  body.app-sidebar-collapsed .nav-link {
    font-size: 0;
    justify-content: center;
    gap: 0;
    padding: 0.55rem 0.4rem;
  }

  body.app-sidebar-collapsed .nav-link > i {
    font-size: 1rem;
    width: 1.35rem;
  }

  body.app-sidebar-collapsed .nav-link--sub {
    padding-left: 0.4rem;
  }

  body.app-sidebar-collapsed .nav-link--external > .fa-arrow-up-right-from-square {
    display: none;
  }

  body.app-sidebar-collapsed .test-mode__text {
    display: none;
  }

  body.app-sidebar-collapsed .test-mode {
    justify-content: center;
    padding: 0.5rem;
  }

  body.app-sidebar-collapsed .icon-row {
    justify-content: center;
    flex-wrap: wrap;
    gap: 0.25rem;
  }

  body.app-sidebar-collapsed .user-chip__meta {
    display: none;
  }

  body.app-sidebar-collapsed .user-chip__avatar {
    display: none;
  }

  body.app-sidebar-collapsed .user-chip {
    justify-content: center;
    padding: 0.45rem;
  }

  body.app-sidebar-collapsed .sidebar-logout {
    justify-content: center;
    margin-top: 0.5rem;
    padding: 0.55rem 0.45rem;
  }

  body.app-sidebar-collapsed .sidebar-logout span {
    display: none;
  }

  body.app-sidebar-collapsed .ai-credits-meter--sidebar .ai-credits-meter__header,
  body.app-sidebar-collapsed .ai-credits-meter--sidebar .ai-credits-meter__stats,
  body.app-sidebar-collapsed .ai-credits-meter--sidebar .ai-credits-meter__hint {
    display: none;
  }

  body.app-sidebar-collapsed .ai-credits-meter--sidebar {
    margin-bottom: 0.5rem;
    padding: 0.4rem 0.35rem;
  }

  body.app-sidebar-collapsed .ai-credits-meter--sidebar .ai-credits-meter__track {
    height: 0.35rem;
  }
}

@media (max-width: 1023px) {
  body.app-sidebar-collapsed {
    --sidebar-w: var(--app-layout-sidebar-width);
  }
}

.app-modal {
  position: fixed;
  inset: 0;
  z-index: 400;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  padding: 0;
  pointer-events: none;
  visibility: hidden;
  opacity: 0;
  transition: opacity 0.28s cubic-bezier(0.22, 1, 0.36, 1), visibility 0.28s;
}

.app-modal.is-open {
  pointer-events: auto;
  visibility: visible;
  opacity: 1;
}

.app-modal__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.52);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  opacity: 0;
  transition: opacity 0.32s cubic-bezier(0.22, 1, 0.36, 1);
}

.app-modal.is-open .app-modal__backdrop {
  opacity: 1;
}

.app-modal__panel {
  position: relative;
  width: 100%;
  max-width: 520px;
  max-height: min(92vh, 720px);
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-bottom: none;
  border-radius: var(--radius-lg) var(--radius-lg) 0 0;
  box-shadow: 0 -12px 48px rgba(0, 0, 0, 0.35);
  transform: translateY(110%) translateZ(0);
  transition: transform 0.42s cubic-bezier(0.34, 1.2, 0.64, 1);
  will-change: transform;
}

.app-modal__panel.app-modal__panel--wide {
  max-width: 640px;
}

.app-modal__form {
  display: flex;
  flex: 1;
  min-height: 0;
  flex-direction: column;
}

.app-modal.is-open .app-modal__panel {
  transform: translateY(0) translateZ(0);
}

.app-modal__head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  padding: 1.1rem 1.15rem 0.85rem;
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
}

.app-modal__head h2 {
  margin: 0;
  font-size: 1.15rem;
  font-weight: 600;
  letter-spacing: -0.02em;
}

.app-modal__lede {
  margin: 0.2rem 0 0;
  font-size: 0.85rem;
  color: var(--text-muted);
  line-height: 1.45;
}

.app-modal__body {
  padding: 1rem 1.15rem;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  flex: 1;
  min-height: 0;
}

.app-modal__foot {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
  justify-content: flex-end;
  padding: 0.85rem 1.15rem max(0.85rem, env(safe-area-inset-bottom));
  border-top: 1px solid var(--border);
  background: var(--bg-elevated);
  flex-shrink: 0;
}

.app-modal__foot .btn {
  min-width: min(100%, 7rem);
}

@media (min-width: 640px) {
  .app-modal {
    align-items: center;
    padding: 1rem max(1rem, env(safe-area-inset-right)) 1rem max(1rem, env(safe-area-inset-left));
  }

  .app-modal__panel {
    border-radius: var(--radius-lg);
    border-bottom: 1px solid var(--border);
    box-shadow: var(--shadow-md);
    transform: translateY(16px) scale(0.94);
    transition: transform 0.38s cubic-bezier(0.34, 1.25, 0.64, 1), opacity 0.28s ease;
    opacity: 0;
  }

  .app-modal.is-open .app-modal__panel {
    transform: translateY(0) scale(1);
    opacity: 1;
  }
}

.app-modal.app-modal--fab-ticket {
  align-items: flex-end;
  justify-content: flex-end;
  padding: 0 max(0.65rem, env(safe-area-inset-right)) max(0.5rem, env(safe-area-inset-bottom)) max(0.65rem, env(safe-area-inset-left));
}

.app-modal.app-modal--fab-ticket .app-modal__panel {
  width: 100%;
  max-width: 420px;
  max-height: min(88vh, 560px);
  margin: 0 0 0 auto;
  border-radius: var(--radius-lg);
  border-bottom: 1px solid var(--border);
  box-shadow: 0 16px 56px rgba(0, 0, 0, 0.38);
  transform: translate3d(0, 120%, 0);
  opacity: 0;
  transition: transform 0.42s cubic-bezier(0.34, 1.2, 0.64, 1), opacity 0.32s ease;
}

.app-modal.app-modal--fab-ticket.is-open .app-modal__panel {
  transform: translate3d(0, 0, 0);
  opacity: 1;
}

@media (min-width: 480px) {
  .app-modal.app-modal--fab-ticket .app-modal__panel {
    transform: translate3d(110%, 110%, 0) scale(0.94);
  }

  .app-modal.app-modal--fab-ticket.is-open .app-modal__panel {
    transform: translate3d(0, 0, 0) scale(1);
  }
}

@media (min-width: 640px) {
  .app-modal.app-modal--fab-ticket {
    align-items: flex-end;
    justify-content: flex-end;
    padding: 1rem max(1rem, env(safe-area-inset-right)) max(1rem, env(safe-area-inset-bottom)) max(1rem, env(safe-area-inset-left));
  }
}

@media (prefers-reduced-motion: reduce) {
  .app-modal,
  .app-modal__backdrop,
  .app-modal__panel {
    transition: none !important;
  }

  .app-modal.app-modal--fab-ticket .app-modal__panel {
    transform: none !important;
    opacity: 1 !important;
  }

  .app-modal.app-modal--fab-ticket:not(.is-open) .app-modal__panel {
    opacity: 0 !important;
  }

  .spark__bar {
    animation: none !important;
    transform: scaleY(1) !important;
  }
}

.field {
  margin-bottom: 1rem;
}

.field:last-child {
  margin-bottom: 0;
}

.field__label {
  display: block;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-muted);
  margin-bottom: 0.35rem;
}

.field__hint {
  margin: 0.35rem 0 0;
  font-size: 0.75rem;
  color: var(--text-faint);
  line-height: 1.4;
}

.input,
.select,
.textarea {
  width: 100%;
  padding: 0.55rem 0.75rem;
  font: inherit;
  font-size: 0.9rem;
  color: var(--text);
  background: var(--bg-input);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  transition: border-color 0.15s, box-shadow 0.15s;
}

.input:focus,
.select:focus,
.textarea:focus {
  outline: none;
  border-color: var(--accent-orange);
  box-shadow: 0 0 0 3px var(--accent-orange-dim);
}

.textarea {
  min-height: 88px;
  resize: vertical;
}

.form-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0 0.75rem;
}

@media (min-width: 480px) {
  .form-grid--2 {
    grid-template-columns: 1fr 1fr;
  }
}

.field-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 1rem;
}

.check-line {
  display: flex;
  align-items: flex-start;
  gap: 0.65rem;
  font-size: 0.875rem;
  color: var(--text-muted);
  cursor: pointer;
}

.check-line input {
  margin-top: 0.2rem;
  accent-color: var(--accent-orange);
}

.stat-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.75rem;
}

@media (min-width: 520px) {
  .stat-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

.stat-card {
  padding: 1rem;
  border-radius: var(--radius-md);
  border: 1px solid var(--border);
  background: var(--bg-elevated);
}

.stat-card__label {
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-bottom: 0.35rem;
}

.stat-card__value {
  font-size: 1.35rem;
  font-weight: 600;
  letter-spacing: -0.02em;
}

.spark {
  display: flex;
  align-items: flex-end;
  gap: 4px;
  height: 48px;
  margin-top: 0.75rem;
}

.spark__bar {
  flex: 1;
  min-width: 0;
  align-self: flex-end;
  border-radius: 4px 4px 0 0;
  background: linear-gradient(180deg, var(--accent-orange), rgba(247, 168, 124, 0.35));
  opacity: 0.85;
  transform-origin: bottom;
  transform: scaleY(0.4);
  animation: spark-rise 0.65s cubic-bezier(0.34, 1.25, 0.64, 1) forwards;
}

@keyframes spark-rise {
  to {
    transform: scaleY(1);
  }
}

.spark__bar:nth-child(1) {
  animation-delay: 0.04s;
}
.spark__bar:nth-child(2) {
  animation-delay: 0.08s;
}
.spark__bar:nth-child(3) {
  animation-delay: 0.12s;
}
.spark__bar:nth-child(4) {
  animation-delay: 0.16s;
}
.spark__bar:nth-child(5) {
  animation-delay: 0.2s;
}
.spark__bar:nth-child(6) {
  animation-delay: 0.24s;
}
.spark__bar:nth-child(7) {
  animation-delay: 0.28s;
}

.code-block {
  font-family: ui-monospace, "Cascadia Code", Consolas, monospace;
  font-size: 0.78rem;
  padding: 0.75rem 1rem;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: var(--bg-input);
  color: var(--text-muted);
  overflow-x: auto;
  word-break: break-all;
}

.pill-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}

.pill-row .pill {
  cursor: default;
}

.pill-row .pill--account-tab {
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0;
  padding: 0.24rem 0.45rem;
  min-height: 32px;
  min-width: 32px;
}

.pill__avatar-wrap {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  flex-shrink: 0;
  border-radius: 50%;
}

.pill__avatar-core {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  overflow: hidden;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--bg-hover);
}

.pill__avatar-wrap--fallback {
  font-size: 0.62rem;
  color: var(--text-muted);
}

.pill__avatar {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  object-fit: cover;
  display: block;
}

.pill__platform-badge {
  position: absolute;
  right: -3px;
  bottom: -3px;
  width: 11px;
  height: 11px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(255, 255, 255, 0.2);
  background: #111827;
  color: #f8fafc;
  font-size: 6px;
  line-height: 1;
}

.app-content--composer .pill--account-tab.is-deselected,
.app-content--composer .pill--account-tab:disabled {
  opacity: 0.38;
  filter: grayscale(1);
  cursor: not-allowed;
  border-color: var(--border);
  background: transparent;
  color: var(--text-muted);
}

.app-content--composer .pill--account-tab.is-deselected[aria-selected="true"],
.app-content--composer .pill--account-tab:disabled[aria-selected="true"] {
  background: transparent;
  border-color: var(--border);
  color: var(--text-muted);
  box-shadow: none;
}

.platform-checklist__avatar {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  flex-shrink: 0;
  border-radius: 50%;
  overflow: hidden;
  background: var(--bg-hover);
}

.platform-checklist__avatar img {
  width: 22px;
  height: 22px;
  object-fit: cover;
  display: block;
}

.platform-checklist__avatar--fallback {
  font-size: 0.65rem;
  color: var(--text-muted);
}

.platform-checklist__text {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  max-width: 8rem;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  border: 0;
}

.login-page {
  min-height: 100vh;
  margin: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 1.5rem max(1rem, env(safe-area-inset-left)) 2rem max(1rem, env(safe-area-inset-right));
  background:
    radial-gradient(1200px 500px at 50% -220px, rgba(99, 102, 241, 0.16), transparent 58%),
    var(--bg-app);
  color: var(--text);
  font-family: "DM Sans", system-ui, sans-serif;
}

.login-page__brand {
  align-self: stretch;
  width: 100%;
  max-width: none;
  margin-bottom: 1rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  box-sizing: border-box;
}

.login-page__brand .brand-logo-svg {
  display: block;
  flex-shrink: 0;
  margin: 0 auto 0.5rem;
  filter: none;
  color: var(--text);
}

.login-page__brand img {
  display: block;
  margin: 0 auto 0.5rem;
  filter: var(--logo-filter);
}

.login-page__panel {
  width: 100%;
  max-width: 480px;
  padding: 1.35rem 1.35rem 0;
  border-radius: 14px;
  border: 1px solid var(--border);
  background: var(--bg-elevated);
  box-shadow: 0 14px 42px rgba(0, 0, 0, 0.16);
  overflow: hidden;
}

.login-page__head {
  margin-bottom: 1.1rem;
  text-align: left;
}

.login-page__head h1 {
  margin: 0 0 0.35rem;
  font-size: 1.4rem;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.login-page__head p {
  margin: 0;
  font-size: 0.9rem;
  color: var(--text-muted);
  line-height: 1.45;
}

.login-page__head--center {
  text-align: center;
}

.login-page__panel form {
  display: flex;
  flex-direction: column;
  align-items: stretch;
}

.login-page__panel .field {
  margin-bottom: 0.9rem;
}

.login-page__panel .field__label {
  margin-bottom: 0.36rem;
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  color: var(--text);
  text-transform: uppercase;
}

.login-page__panel .input {
  min-height: 46px;
  border-radius: 8px;
  border-color: var(--border);
  background: var(--bg-input);
}

.login-page__actions {
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
  margin-top: 0.45rem;
  padding-bottom: 1.1rem;
}

.login-page__submit {
  width: 100%;
  justify-content: center;
  min-height: 46px;
  border-radius: 8px;
  font-size: 1.05rem;
  font-weight: 700;
  letter-spacing: -0.01em;
  color: #fff;
  border-color: #7c3aed;
  background: linear-gradient(135deg, var(--accent-purple) 0%, #7c3aed 100%);
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.1), 0 4px 24px rgba(168, 85, 247, 0.35);
}

.login-page__submit:hover {
  transform: translateY(-1px);
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.15), 0 8px 32px rgba(168, 85, 247, 0.45);
}

.login-page__meta-links {
  display: grid;
  grid-template-columns: 1fr 1fr;
  border-top: 1px solid var(--border);
  margin: 0 -1.35rem;
}

.login-page__meta-links a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0.55rem 0.7rem;
  font-size: 0.92rem;
  font-weight: 700;
  text-decoration: none;
  color: var(--accent-orange);
}

.login-page__meta-links a + a {
  border-left: 1px solid var(--border);
}

.login-page__meta-links a:hover {
  background: var(--accent-orange-dim);
  color: var(--text);
}

/* ─── Alert banners ────────────────────────────────────── */

.alert {
  display: flex;
  align-items: flex-start;
  gap: 0.6rem;
  padding: 0.7rem 1rem;
  border-radius: var(--radius-md, 8px);
  font-size: 0.85rem;
  line-height: 1.45;
  margin-bottom: 1rem;
}

.alert i {
  margin-top: 0.1rem;
  flex-shrink: 0;
}

.alert ul {
  margin: 0;
  padding-left: 1.1rem;
}

.alert--error {
  border: 1px solid rgba(239, 68, 68, 0.4);
  background: rgba(239, 68, 68, 0.08);
  color: #fca5a5;
}

.alert--error i {
  color: #ef4444;
}

.alert--warning {
  border: 1px solid rgba(250, 204, 21, 0.45);
  background: rgba(250, 204, 21, 0.1);
  color: var(--text);
}

.alert--warning i {
  color: #fbbf24;
}

.alert--warning a {
  color: var(--accent-orange);
  font-weight: 600;
}

.accounts-plan-cap {
  margin: 0 0 0.75rem;
  font-size: 0.875rem;
}

.accounts-plan-cap a {
  color: var(--accent-orange);
  font-weight: 600;
}

.alert--info {
  border: 1px solid rgba(96, 165, 250, 0.4);
  background: rgba(96, 165, 250, 0.08);
  color: var(--text);
}

.alert--info i {
  color: #60a5fa;
}

.alert--info.alert--spaced {
  margin-bottom: 1rem;
}

.alert--success {
  border: 1px solid rgba(34, 197, 94, 0.4);
  background: rgba(34, 197, 94, 0.08);
  color: var(--text);
}

.alert--success i {
  color: #22c55e;
}

/* ─── Social auth buttons ──────────────────────────────── */

.social-auth-buttons {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  margin-bottom: 1rem;
}

.btn--social {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.6rem;
  position: relative;
  width: 100%;
  padding: 0.6rem 1rem;
  border-radius: var(--radius-md, 8px);
  font-size: 0.875rem;
  font-weight: 500;
  text-decoration: none;
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s, box-shadow 0.15s;
  border: 1px solid var(--border);
  background: var(--bg-elevated);
  color: var(--text);
}

.social-auth-last-used {
  position: absolute;
  top: -0.38rem;
  right: 0.75rem;
  font-size: 0.62rem;
  line-height: 1;
  font-weight: 600;
  letter-spacing: 0.01em;
  text-transform: uppercase;
  padding: 0.2rem 0.42rem;
  border-radius: 999px;
  border: 1px solid rgba(124, 58, 237, 0.38);
  color: #6d28d9;
  background: #f5f3ff;
  pointer-events: none;
}

.btn--social:hover {
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.12);
}

.btn--google:hover {
  border-color: #4285f4;
  background: rgba(66, 133, 244, 0.06);
}

.btn--linkedin {
  color: var(--text);
}

.btn--linkedin i {
  font-size: 1.15rem;
  color: #0a66c2;
}

.btn--linkedin:hover {
  border-color: #0a66c2;
  background: rgba(10, 102, 194, 0.06);
}

.social-auth-icon {
  flex-shrink: 0;
}

.social-auth-divider {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin: 0.25rem 0 1rem;
  font-size: 0.8rem;
  color: var(--text-muted);
}

.social-auth-divider::before,
.social-auth-divider::after {
  content: "";
  flex: 1;
  height: 1px;
  background: var(--border);
}

.auth-page-footer {
  padding: 1.25rem 1rem 1.75rem;
  text-align: center;
  font-size: 0.8rem;
  color: var(--text-muted);
}

.auth-page-footer a {
  color: var(--text-muted);
  text-decoration: none;
}

.auth-page-footer a:hover {
  color: var(--accent-orange);
  text-decoration: underline;
}

.auth-page-footer__sep {
  margin: 0 0.35rem;
  opacity: 0.5;
  user-select: none;
}

.legal-page {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: var(--bg-app);
  color: var(--text);
}

.legal-page__header {
  flex-shrink: 0;
  padding: 1.25rem 1.5rem;
  border-bottom: 1px solid var(--border);
  background: var(--bg-elevated);
}

.legal-page__logo {
  display: inline-flex;
  align-items: center;
  text-decoration: none;
  color: inherit;
}

.legal-page__logo .brand-logo-svg {
  height: 28px;
  width: auto;
}

.legal-page__main {
  flex: 1;
  width: 100%;
  max-width: 42rem;
  margin: 0 auto;
  padding: 2rem 1.25rem 3rem;
}

.legal-page__article {
  font-size: 0.9rem;
  line-height: 1.65;
  color: var(--text);
}

.legal-page__title {
  margin: 0 0 0.35rem;
  font-size: 1.65rem;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.legal-page__meta {
  margin: 0 0 1.5rem;
  font-size: 0.8rem;
  color: var(--text-muted);
}

.legal-page__article h2 {
  margin: 1.75rem 0 0.5rem;
  font-size: 1.05rem;
  font-weight: 600;
}

.legal-page__article h3 {
  margin: 1.15rem 0 0.35rem;
  font-size: 0.95rem;
  font-weight: 600;
}

.legal-page__article p {
  margin: 0 0 0.85rem;
}

.legal-page__list {
  margin: 0 0 0.85rem;
  padding-left: 1.25rem;
}

.legal-page__list li {
  margin-bottom: 0.45rem;
}

.legal-page__footer {
  flex-shrink: 0;
  padding: 1rem 1.25rem 1.5rem;
  text-align: center;
  font-size: 0.8rem;
  color: var(--text-muted);
  border-top: 1px solid var(--border);
  background: var(--bg-elevated);
}

.legal-page__footer a {
  color: var(--text-muted);
  text-decoration: none;
}

.legal-page__footer a:hover {
  color: var(--accent-orange);
  text-decoration: underline;
}

.legal-page__footer-sep {
  margin: 0 0.35rem;
  opacity: 0.5;
  user-select: none;
}

.app-shell-footer {
  flex-shrink: 0;
  margin-top: auto;
  padding: 0.65rem 1rem 0.85rem;
  font-size: 0.75rem;
  color: var(--text-muted);
  border-top: 1px solid var(--border);
  background: var(--bg-elevated);
  text-align: center;
}

.app-shell-footer a {
  color: var(--text-muted);
  text-decoration: none;
}

.app-shell-footer a:hover {
  color: var(--accent-orange);
  text-decoration: underline;
}

.app-shell-footer__sep {
  margin: 0 0.35rem;
  opacity: 0.5;
  user-select: none;
}

.admin-banner {
  display: flex;
  align-items: flex-start;
  gap: 0.65rem;
  padding: 0.65rem 1rem;
  margin-bottom: 1rem;
  border-radius: var(--radius-md);
  border: 1px solid rgba(250, 204, 21, 0.45);
  background: rgba(250, 204, 21, 0.08);
  font-size: 0.85rem;
  line-height: 1.45;
  color: var(--text);
}

.admin-banner i {
  color: #eab308;
  margin-top: 0.1rem;
  flex-shrink: 0;
}

.super-admin-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.75rem;
}

@media (min-width: 900px) {
  .super-admin-grid {
    grid-template-columns: 1fr 1fr;
  }
}

.super-admin-grid__full {
  grid-column: 1 / -1;
}

.admin-flag-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.55rem 0;
  border-bottom: 1px solid var(--border);
}

.admin-flag-row:last-child {
  border-bottom: none;
}

.admin-flag-row__meta {
  display: flex;
  flex-direction: column;
  gap: 0.1rem;
  min-width: 0;
}

.admin-flag-row__meta strong {
  font-size: 0.875rem;
}

.user-status {
  display: inline-block;
  padding: 0.12rem 0.45rem;
  border-radius: 999px;
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.user-status--ok {
  background: rgba(52, 211, 153, 0.15);
  color: var(--accent-green);
}

.user-status--off {
  background: var(--border);
  color: var(--text-muted);
}

.user-status--ban {
  background: rgba(248, 113, 113, 0.15);
  color: #f87171;
}

.admin-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  justify-content: flex-end;
}

.admin-card-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  align-items: center;
}

.admin-flag-row__actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem;
  flex-shrink: 0;
}

.btn--compact {
  font-size: 0.75rem;
  padding: 0.35rem 0.6rem;
  font-weight: 500;
}

.app-modal__body .field-group-label {
  display: block;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin: 0.75rem 0 0.45rem;
}

.app-modal__body .field-group-label:first-child {
  margin-top: 0;
}

.admin-check-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(7.5rem, 1fr));
  gap: 0.35rem 0.75rem;
}

.admin-check-grid label {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.85rem;
  cursor: pointer;
}

.social-connect-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 0.75rem;
}

.social-connect-card {
  position: relative;
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  padding: 1rem 1.1rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background: var(--bg-elevated);
}

.social-connect-card--coming-soon {
  opacity: 0.72;
  filter: grayscale(0.35);
  border-style: dashed;
  background: color-mix(in srgb, var(--bg-elevated) 88%, var(--text-muted) 12%);
  pointer-events: none;
}

.social-connect-card--coming-soon .social-connect-card__body {
  pointer-events: auto;
}

.social-connect-card--coming-soon .social-connect-card__btn {
  pointer-events: none;
}

.social-connect-badge--coming-soon {
  position: absolute;
  top: 0.65rem;
  right: 0.65rem;
  z-index: 1;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.2rem 0.55rem;
  border-radius: 999px;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #fff;
  background: linear-gradient(135deg, #6366f1 0%, #a855f7 50%, #ec4899 100%);
  box-shadow: 0 2px 10px color-mix(in srgb, #6366f1 45%, transparent);
}

.social-connect-badge--coming-soon::before {
  content: "";
  width: 0.35rem;
  height: 0.35rem;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.9);
  animation: social-connect-badge-pulse 1.6s ease-in-out infinite;
}

@keyframes social-connect-badge-pulse {
  0%, 100% { opacity: 0.45; transform: scale(0.85); }
  50% { opacity: 1; transform: scale(1); }
}

.social-connect-card__icon {
  width: 2.5rem;
  height: 2.5rem;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
  flex-shrink: 0;
  background: var(--bg-hover);
}

.social-connect-card__body {
  flex: 1;
  min-width: 0;
}

.social-connect-card__body h3 {
  margin: 0 0 0.2rem;
  font-size: 0.95rem;
  font-weight: 600;
}

.social-connect-card__body p {
  margin: 0;
  font-size: 0.8rem;
  color: var(--text-muted);
}

.composer-create {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(300px, 380px);
  gap: 1.25rem;
  align-items: start;
}

@media (max-width: 1100px) {
  .composer-create {
    grid-template-columns: 1fr;
  }
}

.composer-create__main {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  min-width: 0;
}

.composer-create__aside {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  position: sticky;
  top: calc(var(--header-h) + 0.75rem);
  align-self: start;
}

@media (max-width: 1100px) {
  .composer-create__aside {
    position: static;
  }
}

.card--composer {
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  background: var(--bg-elevated);
  box-shadow: var(--shadow-card, none);
  overflow: hidden;
}

[data-theme="dark"] .card--composer {
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.35);
}

.composer-form-card {
  padding: 1.15rem 1.25rem 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 1.15rem;
  overflow: visible;
}

.composer-form-card__section {
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
}

.composer-form-card__section--tight {
  gap: 0.5rem;
}

.composer-form-card__label {
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--text-muted);
}

.composer-tailor-cue {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  padding: 0.55rem 0.65rem;
  border-radius: var(--radius-sm);
  border: 1px solid rgba(92, 158, 255, 0.35);
  background: color-mix(in srgb, var(--bg-hover) 78%, rgba(92, 158, 255, 0.2));
}

.composer-tailor-cue__title {
  display: inline-flex;
  align-items: center;
  gap: 0.38rem;
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.035em;
  color: var(--text);
}

.composer-tailor-cue p {
  margin: 0;
  font-size: 0.79rem;
  line-height: 1.45;
  color: var(--text-muted);
}

.composer-form-card__row {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  align-items: flex-end;
}

.field--half {
  flex: 1 1 200px;
  min-width: 0;
}

.field--flush {
  margin-bottom: 0;
}

.composer-upload-field {
  flex: 0 0 auto;
}

.textarea--composer {
  min-height: 10rem;
  font-size: 0.95rem;
  line-height: 1.55;
  border-radius: var(--radius-md);
  resize: vertical;
}

.composer-draft-anchor {
  position: relative;
  z-index: 2;
}

.composer-draft-stack {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.composer-master-wrap {
  position: relative;
}

.composer-master-wrap.is-showing-ai-diff #composer-master {
  opacity: 0.12;
}

.composer-draft-diff {
  position: absolute;
  inset: 0;
  z-index: 7;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-strong);
  background: color-mix(in srgb, var(--bg-elevated) 94%, transparent);
  backdrop-filter: blur(2px);
  -webkit-backdrop-filter: blur(2px);
  display: flex;
  flex-direction: column;
  min-height: 100%;
}

.composer-draft-diff[hidden] {
  display: none !important;
}

.composer-draft-diff__head {
  padding: 0.5rem 0.65rem;
  border-bottom: 1px solid var(--border);
  background: color-mix(in srgb, var(--bg-input) 90%, var(--accent-color) 10%);
}

.composer-draft-diff__title {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.74rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  font-weight: 700;
  color: var(--text-muted);
}

.composer-draft-diff__body {
  flex: 1 1 auto;
  overflow: auto;
  padding: 0.65rem 0.75rem;
}

.composer-draft-diff__actions {
  display: flex;
  justify-content: flex-end;
  gap: 0.5rem;
  padding: 0.5rem 0.65rem;
  border-top: 1px solid var(--border);
}

.composer-ai-dock {
  position: absolute;
  left: 0;
  right: 0;
  top: calc(100% + 0.35rem);
  z-index: 25;
  filter: drop-shadow(0 12px 28px rgba(0, 0, 0, 0.18));
}

[data-theme="dark"] .composer-ai-dock {
  filter: drop-shadow(0 16px 40px rgba(0, 0, 0, 0.55));
}

.composer-ai-dock[hidden] {
  display: none !important;
}

.composer-ai-dock__panel {
  margin: 0;
  border-radius: var(--radius-md);
}

.composer-ai-dock .ai-chat-panel {
  min-height: 0;
  max-height: min(52vh, 320px);
}

.composer-ai-dock__stack {
  position: relative;
  flex: 1 1 auto;
  min-height: 0;
  display: flex;
  flex-direction: column;
}

.composer-ai-dock__stack-inner {
  flex: 1 1 auto;
  min-height: 0;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.composer-ai-dock__stack--locked .composer-ai-dock__stack-inner {
  filter: blur(7px);
  opacity: 0.5;
  pointer-events: none;
  user-select: none;
}

.composer-ai-inline-lock {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.5rem 0.6rem;
  padding: 0.55rem 0.75rem;
  border-bottom: 1px solid var(--border);
  background: color-mix(in srgb, var(--bg-input) 90%, var(--accent-color) 10%);
}

.composer-ai-inline-lock__text {
  margin: 0;
  font-size: 0.78rem;
  color: var(--text-muted);
  flex: 1 1 100%;
}

.composer-ai-inline-lock__actions {
  display: flex;
  gap: 0.45rem;
}

.composer-ai-paywall {
  position: absolute;
  inset: 0;
  z-index: 3;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  background: color-mix(in srgb, var(--bg-elevated) 72%, transparent);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
}

.composer-ai-paywall__card {
  max-width: 17rem;
  text-align: center;
  padding: 1rem 1.15rem;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-strong);
  background: var(--bg-elevated);
  box-shadow: var(--shadow-md, 0 12px 32px rgba(0, 0, 0, 0.2));
}

.composer-ai-paywall__badge {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.25rem 0.65rem;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  background: linear-gradient(135deg, rgba(251, 191, 36, 0.25), rgba(245, 158, 11, 0.12));
  border: 1px solid rgba(251, 191, 36, 0.45);
  color: var(--text);
}

.composer-ai-paywall__badge i {
  color: #fbbf24;
  font-size: 0.85rem;
}

.composer-ai-paywall__title {
  margin: 0.75rem 0 0.35rem;
  font-size: 0.95rem;
  font-weight: 700;
  line-height: 1.3;
  color: var(--text);
}

.composer-ai-paywall__text {
  margin: 0 0 1rem;
  font-size: 0.8rem;
  line-height: 1.45;
  color: var(--text-muted);
}

.composer-ai-paywall__actions {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.composer-ai-paywall__card .btn {
  width: 100%;
  justify-content: center;
}

.composer-ai-dock .ai-chat-panel__messages {
  max-height: min(36vh, 220px);
  flex: 1 1 auto;
}

.composer-assistant-card__head--row {
  flex-direction: row;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.75rem;
}

.composer-assistant-card__head-text {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
  min-width: 0;
}

.composer-ai-dock__close {
  flex-shrink: 0;
}

.composer-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem;
}

.composer-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.4rem 0.85rem;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--bg-input);
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text);
  transition: background 0.15s, border-color 0.15s;
}

.composer-pill:hover {
  background: var(--bg-hover);
  border-color: var(--border-strong);
}

#composer-ai-toggle[aria-expanded="true"] {
  border-color: var(--accent-orange);
  background: var(--accent-orange-dim);
  color: var(--text);
}

.composer-pill--icon {
  padding: 0.4rem 0.65rem;
  margin-left: auto;
}

.composer-override-wrap {
  position: relative;
}

.composer-mention-suggestions {
  position: absolute;
  left: 0;
  right: 0;
  top: calc(100% + 0.25rem);
  z-index: 40;
  margin: 0;
  padding: 0.35rem 0;
  list-style: none;
  max-height: 11rem;
  overflow: auto;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background: var(--bg-card);
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.12);
}

.composer-mention-suggestions__item {
  padding: 0.45rem 0.75rem;
  font-size: 0.85rem;
  cursor: pointer;
  color: var(--text);
}

.composer-mention-suggestions__item:hover,
.composer-mention-suggestions__item:focus {
  background: var(--bg-hover);
  outline: none;
}

.composer-emoji-dock {
  z-index: 24;
  left: auto;
  right: 0;
  top: calc(100% + 0.35rem);
  position: absolute;
  filter: drop-shadow(0 12px 28px rgba(0, 0, 0, 0.18));
}

.composer-emoji-dock__panel {
  margin: 0 0 0 auto;
  width: min(20rem, calc(100vw - 2rem));
  border-radius: var(--radius-md);
  padding: 0.75rem;
}

.composer-emoji-picker {
  width: 100%;
  padding: 0.25rem 0.1rem 0.1rem;
  display: grid;
  grid-template-columns: repeat(8, minmax(0, 1fr));
  gap: 0.3rem;
}

.composer-emoji-picker__item {
  border: 1px solid transparent;
  border-radius: 0.5rem;
  background: transparent;
  cursor: pointer;
  font-size: 1.05rem;
  line-height: 1;
  padding: 0.38rem 0.2rem;
}

.composer-emoji-picker__item:hover {
  background: var(--bg-hover);
  border-color: var(--border);
}

.composer-upload-zone {
  display: flex;
  width: 100%;
  min-height: 4.5rem;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 0.18rem;
  padding: 0.5rem 0.65rem;
  border-radius: var(--radius-md);
  border: 2px dashed var(--border-strong);
  background: var(--bg-input);
  color: var(--text-muted);
  font-size: 1.1rem;
  text-align: center;
  transition: border-color 0.15s, color 0.15s;
}

.composer-upload-zone__text {
  font-size: 0.83rem;
  font-weight: 600;
  color: var(--text);
  line-height: 1.2;
}

.composer-upload-zone__meta {
  font-size: 0.72rem;
  color: var(--text-muted);
  line-height: 1.2;
}

.composer-upload-zone:hover {
  border-color: #6366f1;
  color: #6366f1;
}

.composer-upload-zone.is-loading {
  opacity: 0.65;
  pointer-events: none;
}

.composer-selected-media {
  margin: 0.45rem 0 0.25rem;
  padding: 0.6rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background: var(--bg-input);
}

.composer-selected-media__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.55rem;
  margin-bottom: 0.5rem;
}

.composer-selected-media__title {
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--text);
}

.composer-selected-media__clear {
  padding: 0.18rem 0.45rem;
}

.composer-selected-media__grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(72px, 1fr));
  gap: 0.45rem;
}

.composer-selected-media__item {
  display: flex;
  flex-direction: column;
  gap: 0.22rem;
  border: 1px solid var(--border);
  border-radius: 0.55rem;
  background: var(--bg-elevated);
  padding: 0.26rem;
  cursor: pointer;
  transition: border-color 0.15s, box-shadow 0.15s, background 0.15s;
}

.composer-selected-media__item:hover {
  border-color: #6366f1;
  box-shadow: 0 2px 8px rgba(99, 102, 241, 0.12);
}

.composer-selected-media__item.is-active {
  border-color: #6366f1;
  background: rgba(99, 102, 241, 0.08);
}

.composer-selected-media__thumb {
  position: relative;
  display: block;
  width: 100%;
  aspect-ratio: 1 / 1;
  overflow: hidden;
  border-radius: 0.45rem;
  background: var(--bg-app);
}

.composer-selected-media__thumb img,
.composer-selected-media__thumb video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.composer-selected-media__play {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: none;
  color: #fff;
  font-size: 1.1rem;
  text-shadow: 0 1px 6px rgba(0, 0, 0, 0.65);
}

.composer-preview-video-wrap {
  position: relative;
  width: 100%;
  background: #000;
  border-radius: 0.35rem;
  overflow: hidden;
}

.composer-preview-video-wrap .composer-preview-video {
  width: 100%;
  max-height: 160px;
}

.composer-selected-media__remove {
  position: absolute;
  top: 0.28rem;
  right: 0.28rem;
  width: 1.1rem;
  height: 1.1rem;
  border: none;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.7);
  color: #fff;
  font-size: 0.72rem;
  line-height: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

.composer-selected-media__name {
  font-size: 0.66rem;
  color: var(--text-muted);
  line-height: 1.2;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.app-modal--composer-media .app-modal__panel--composer-media {
  max-width: 28rem;
  padding: 1.25rem 1.35rem;
}

.composer-media-modal__title {
  margin: 0 0 0.5rem;
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--text);
}

.composer-media-modal__hint {
  margin: 0 0 1.1rem;
  font-size: 0.88rem;
  line-height: 1.45;
  color: var(--text-muted);
}

.composer-media-modal__actions {
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
  margin-bottom: 0.85rem;
}

.composer-media-modal__choice {
  width: 100%;
  justify-content: center;
  gap: 0.5rem;
}

.composer-media-modal__cancel {
  width: 100%;
  justify-content: center;
}

.composer-media-modal--library {
  min-width: 0;
}

.composer-media-modal__library-head {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  margin-bottom: 0.75rem;
}

.composer-media-modal__back {
  flex-shrink: 0;
  padding-left: 0.35rem;
  padding-right: 0.35rem;
}

.composer-media-modal__library-title {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--text);
}

.composer-media-modal__loading {
  margin: 0 0 0.65rem;
  font-size: 0.85rem;
  color: var(--text-muted);
}

.composer-media-modal__empty {
  margin: 0.75rem 0 0;
  font-size: 0.85rem;
  color: var(--text-muted);
  text-align: center;
}

.composer-media-picker__grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.55rem;
  max-height: min(48vh, 280px);
  overflow-y: auto;
  padding: 0.1rem;
  margin: 0 -0.1rem;
}

@media (min-width: 480px) {
  .app-modal--composer-media .app-modal__panel--composer-media {
    max-width: 32rem;
  }

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

.composer-media-picker__item {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 0.35rem;
  margin: 0;
  padding: 0.35rem;
  border-radius: var(--radius-md);
  border: 1px solid var(--border);
  background: var(--bg-input);
  color: var(--text);
  text-align: left;
  cursor: pointer;
  transition: border-color 0.15s, background 0.15s, box-shadow 0.15s;
}

.composer-media-picker__item:hover {
  border-color: #6366f1;
  background: var(--bg-hover);
  box-shadow: 0 2px 10px rgba(99, 102, 241, 0.12);
}

.composer-media-picker__thumb {
  position: relative;
  display: block;
  aspect-ratio: 3 / 2;
  border-radius: calc(var(--radius-md) - 2px);
  overflow: hidden;
  background: var(--bg-elevated);
}

.composer-media-picker__thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.composer-media-picker__play {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.35);
  color: #fff;
  font-size: 1rem;
  pointer-events: none;
}

.composer-media-picker__caption {
  display: block;
  font-size: 0.68rem;
  line-height: 1.25;
  color: var(--text-muted);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.composer-post-mode {
  margin: 0;
  padding: 0;
  border: none;
}

.composer-post-mode__legend {
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin: 0 0 0.65rem;
  padding: 0;
}

.composer-post-mode__opt {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 0.45rem;
  font-size: 0.9rem;
  cursor: pointer;
}

.composer-post-mode__opt input {
  accent-color: #6366f1;
}

.composer-form-footer {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: 1rem;
  padding-top: 0.5rem;
  border-top: 1px solid var(--border);
  justify-content: space-between;
}

.composer-form-footer__schedule {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem 1rem;
  align-items: flex-end;
  flex: 1 1 240px;
  min-width: 0;
}

.composer-schedule-field {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  min-width: 0;
}

.composer-schedule-field .input {
  min-width: 10rem;
}

.composer-form-footer__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  justify-content: flex-end;
}

.composer-assistant-card__head {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
  padding: 0.85rem 1rem;
  border-bottom: 1px solid var(--border);
  background: var(--bg-input);
}

.composer-ai-dock .composer-assistant-card__head {
  padding: 0.65rem 0.75rem;
}

.composer-assistant-card__title {
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--text-muted);
}

.composer-assistant-card__hint {
  font-size: 0.78rem;
  color: var(--text-faint);
}

.composer-feed-card__label {
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--text-muted);
  padding: 0.85rem 1rem 0;
}

.composer-feed-preview {
  padding: 0 1rem 1rem;
}

.composer-feed-preview__post {
  border-radius: var(--radius-md);
  border: 1px solid var(--border);
  background: var(--bg-input);
  overflow: hidden;
}

.composer-feed-preview__head {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  padding: 0.75rem 0.85rem;
  border-bottom: 1px solid var(--border);
}

.composer-feed-preview__avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: linear-gradient(135deg, #94a3b8, #64748b);
  flex-shrink: 0;
  overflow: hidden;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.composer-feed-preview__avatar-img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 50%;
}

.composer-feed-preview__avatar-fallback {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
  color: #fff;
  background: linear-gradient(135deg, #6366f1, #ec4899);
}

.composer-feed-preview__meta {
  display: flex;
  flex-direction: column;
  gap: 0.1rem;
  min-width: 0;
}

.composer-feed-preview__meta strong {
  font-size: 0.9rem;
  font-weight: 600;
}

.composer-feed-preview__when {
  font-size: 0.75rem;
  color: var(--text-muted);
}

.composer-feed-preview__body {
  margin: 0;
  padding: 0.85rem 0.95rem;
  font-size: 0.88rem;
  line-height: 1.5;
  word-break: break-word;
}

.composer-feed-preview__media {
  margin: 0 0 0.65rem;
  border-radius: var(--radius-sm);
  overflow: hidden;
  background: var(--bg-hover);
}

.composer-feed-preview__media[hidden] {
  display: none !important;
}

.composer-feed-preview__live {
  margin: 0;
  white-space: pre-wrap;
}

.composer-inline-diff {
  display: block;
}

.composer-inline-diff del.diff-inline-del {
  display: block;
  margin: 0;
  padding: 0;
  font: inherit;
  color: var(--text-muted);
  text-decoration: line-through;
  text-decoration-color: var(--text-faint);
  white-space: pre-wrap;
}

.composer-inline-diff ins.diff-inline-ins {
  display: block;
  margin: 0.4rem 0 0;
  padding: 0;
  font: inherit;
  color: var(--accent-green);
  text-decoration: none;
  white-space: pre-wrap;
}

.composer-feed-preview__bar {
  display: flex;
  align-items: center;
  justify-content: space-around;
  padding: 0.45rem 0.5rem;
  border-top: 1px solid var(--border);
  font-size: 1rem;
  color: var(--text-muted);
}

.composer-feed-preview__comment {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  padding: 0.55rem 0.75rem;
  border-top: 1px solid var(--border);
  font-size: 0.8rem;
  color: var(--text-faint);
}

.composer-feed-preview__comment-ph {
  flex: 1;
}

.card__head--composer-channel {
  text-transform: none;
  letter-spacing: normal;
}

.composer-channel-card__sub {
  font-size: 0.75rem;
  font-weight: 400;
  color: var(--text-muted);
}

.preview-strip--scroll {
  flex-direction: row;
  flex-wrap: nowrap;
  overflow-x: auto;
  gap: 0.65rem;
  padding: 0 1rem 1rem;
  scroll-snap-type: x proximity;
  -webkit-overflow-scrolling: touch;
}

.preview-strip--scroll .preview-card {
  flex: 0 0 min(220px, 85vw);
  scroll-snap-align: start;
}

.platform-checklist label {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.45rem 0;
  font-size: 0.9rem;
  cursor: pointer;
}

.platform-checklist--inline {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
}

.platform-checklist--inline label {
  padding: 0.35rem 0.65rem;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--bg-input);
  font-size: 0.82rem;
}

.platform-checklist--inline label:hover {
  border-color: var(--border-strong);
}

.platform-checklist input {
  accent-color: var(--accent-orange);
}

.app-content--composer .platform-checklist--inline {
  gap: 0.5rem;
}

.app-content--composer .platform-checklist--inline .platform-checklist__item {
  position: relative;
  padding: 0;
  border: 0;
  background: transparent;
  min-height: 0;
  min-width: 0;
}

.app-content--composer .platform-checklist--inline .platform-checklist__item input {
  position: absolute;
  inline-size: 1px;
  block-size: 1px;
  opacity: 0;
  pointer-events: none;
}

.app-content--composer .platform-checklist--inline .platform-checklist__avatar-wrap {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 999px;
  padding: 2px;
  border: 2px solid rgba(154, 164, 182, 0.55);
  background: var(--bg-card);
  transition: border-color 0.16s ease, box-shadow 0.16s ease, transform 0.16s ease;
}

.app-content--composer .platform-checklist--inline .platform-checklist__item:hover .platform-checklist__avatar-wrap {
  border-color: rgba(92, 158, 255, 0.72);
  transform: translateY(-1px);
}

.app-content--composer .platform-checklist--inline .platform-checklist__item input:checked + .platform-checklist__avatar-wrap {
  border-color: #4b9bff;
  box-shadow: 0 0 0 2px rgba(75, 155, 255, 0.25);
}

.app-content--composer .platform-checklist--inline .platform-checklist__item input:not(:checked) + .platform-checklist__avatar-wrap {
  opacity: 0.38;
  filter: grayscale(1);
  border-color: rgba(154, 164, 182, 0.28);
  box-shadow: none;
}

.app-content--composer .platform-checklist--inline .platform-checklist__item:hover input:not(:checked) + .platform-checklist__avatar-wrap {
  opacity: 0.55;
  filter: grayscale(0.72);
  border-color: rgba(154, 164, 182, 0.45);
}

.app-content--composer .platform-checklist--inline .platform-checklist__item input:not(:checked) + .platform-checklist__avatar-wrap .platform-checklist__platform-badge {
  opacity: 0.55;
}

.app-content--composer .platform-checklist--inline .platform-checklist__item input:focus-visible + .platform-checklist__avatar-wrap {
  outline: 2px solid rgba(75, 155, 255, 0.55);
  outline-offset: 2px;
}

.app-content--composer .platform-checklist--inline .platform-checklist__avatar {
  width: 100%;
  height: 100%;
  border-radius: 999px;
  overflow: hidden;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--bg-hover);
}

.app-content--composer .platform-checklist--inline .platform-checklist__avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.app-content--composer .platform-checklist--inline .platform-checklist__avatar--fallback {
  font-size: 0.82rem;
  color: var(--text-muted);
}

.app-content--composer .platform-checklist--inline .platform-checklist__platform-badge {
  position: absolute;
  left: -3px;
  bottom: -3px;
  width: 16px;
  height: 16px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(255, 255, 255, 0.2);
  background: #111827;
  color: #f8fafc;
  font-size: 9px;
  line-height: 1;
}

.preview-strip {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.preview-card {
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background: var(--bg-input);
  overflow: hidden;
}

.preview-card__bar {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.4rem 0.65rem;
  font-size: 0.75rem;
  font-weight: 600;
  border-bottom: 1px solid var(--border);
  background: var(--bg-hover);
}

.preview-card__bar-avatar--photo {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
}

.preview-card__bar-avatar--fallback {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #6366f1, #ec4899);
  color: #fff;
  font-size: 0.6rem;
}

.preview-card__bar-label {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 0.05rem;
  line-height: 1.15;
  align-items: flex-start;
}

.preview-card__bar-name {
  font-weight: 600;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  max-width: 11rem;
}

.preview-card__bar-platform {
  font-size: 0.68rem;
  font-weight: 500;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  max-width: 11rem;
}

.preview-card__body {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  padding: 0.75rem;
  font-size: 0.85rem;
  line-height: 1.45;
  max-height: 220px;
  overflow: auto;
}

.preview-card__body .composer-preview-card__text {
  white-space: pre-wrap;
  word-break: break-word;
}

.composer-preview-card__media {
  flex-shrink: 0;
  border-radius: var(--radius-sm);
  overflow: hidden;
  background: var(--bg-hover);
}

.composer-preview-card__media[hidden] {
  display: none !important;
}

.composer-preview-img,
.composer-preview-video {
  display: block;
  width: 100%;
  max-height: 120px;
  object-fit: cover;
}

.composer-preview-video {
  max-height: 140px;
  background: #000;
}

.composer-preview-gallery {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 0.35rem;
}

.composer-preview-gallery__main {
  border-radius: calc(var(--radius-sm) - 1px);
  overflow: hidden;
}

.composer-preview-gallery__thumbs {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.3rem;
}

.composer-preview-gallery__thumb {
  position: relative;
  border-radius: calc(var(--radius-sm) - 2px);
  overflow: hidden;
  min-height: 50px;
}

.composer-preview-gallery__thumb .composer-preview-img {
  max-height: 72px;
}

.composer-preview-gallery__more {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.52);
  color: #fff;
  font-size: 0.82rem;
  font-weight: 700;
}

.preview-card__constraints {
  margin: 0;
  padding: 0.35rem 0 0 1rem;
  font-size: 0.68rem;
  line-height: 1.35;
  color: #f43f5e;
  list-style: disc;
}

.preview-card__constraints[hidden] {
  display: none !important;
}

.composer-media-constraints-alert {
  border-color: rgba(244, 63, 94, 0.35);
  background: rgba(244, 63, 94, 0.06);
}

.composer-media-constraints-alert__head {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  font-size: 0.8rem;
  font-weight: 600;
  color: #f43f5e;
}

.composer-media-constraints-alert__body {
  font-size: 0.8rem;
  line-height: 1.45;
  color: var(--text-muted);
}

.composer-media-constraints-alert__intro {
  margin: 0 0 0.5rem;
}

.composer-media-constraints-alert__list {
  margin: 0;
  padding-left: 1.2rem;
  color: var(--text);
}

.ai-chat-panel {
  display: flex;
  flex-direction: column;
  min-height: 320px;
  max-height: min(70vh, 520px);
}

.ai-chat-panel__messages {
  flex: 1;
  overflow-y: auto;
  padding: 0.75rem;
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
  font-size: 0.85rem;
}

.ai-msg {
  padding: 0.55rem 0.75rem;
  border-radius: var(--radius-sm);
  max-width: 95%;
}

.ai-msg--assistant {
  align-self: flex-start;
  background: var(--bg-hover);
  border: 1px solid var(--border);
}

.ai-msg--user {
  align-self: flex-end;
  background: var(--accent-orange-dim);
  border: 1px solid rgba(247, 168, 124, 0.35);
}

.ai-msg--thinking {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  color: var(--text-muted);
}

.ai-thinking__label {
  font-size: 0.85rem;
}

.ai-thinking__dots {
  display: inline-flex;
  align-items: center;
  gap: 0.2rem;
}

.ai-thinking__dots span {
  width: 0.35rem;
  height: 0.35rem;
  border-radius: 50%;
  background: var(--text-muted);
  animation: ai-thinking-bounce 1.2s ease-in-out infinite;
}

.ai-thinking__dots span:nth-child(2) {
  animation-delay: 0.15s;
}

.ai-thinking__dots span:nth-child(3) {
  animation-delay: 0.3s;
}

@keyframes ai-thinking-bounce {
  0%,
  80%,
  100% {
    transform: translateY(0);
    opacity: 0.45;
  }
  40% {
    transform: translateY(-0.2rem);
    opacity: 1;
  }
}

.ai-msg--typing::after {
  content: "";
  display: inline-block;
  width: 2px;
  height: 0.95em;
  margin-left: 2px;
  vertical-align: text-bottom;
  background: var(--text-muted);
  animation: ai-typing-cursor 0.8s step-end infinite;
}

@keyframes ai-typing-cursor {
  50% {
    opacity: 0;
  }
}

.ai-chat-panel__input.is-busy {
  opacity: 0.85;
  pointer-events: none;
}

.ai-chat-panel__input {
  display: flex;
  gap: 0.5rem;
  padding: 0.75rem;
  border-top: 1px solid var(--border);
}

.ai-chat-panel form.ai-chat-panel__input {
  align-items: center;
}

.ai-chat-panel__input input {
  flex: 1;
  min-width: 0;
}

.diff-block {
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background: var(--bg-input);
  font-family: ui-monospace, "Cascadia Code", "Segoe UI Mono", monospace;
  font-size: 0.78rem;
  line-height: 1.5;
  overflow: auto;
  max-height: 220px;
  margin: 0;
  padding: 0.75rem 1rem;
}

.diff-line {
  display: block;
  padding: 0.08rem 0.35rem;
  margin: 0 -0.35rem;
  border-radius: 2px;
}

.diff-line--add {
  background: rgba(52, 211, 153, 0.12);
  color: var(--accent-green);
}

.diff-line--del {
  background: rgba(248, 113, 113, 0.1);
  color: #f87171;
}

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

.calendar-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 280px;
  gap: 1rem;
  align-items: start;
}

@media (max-width: 1024px) {
  .calendar-layout {
    grid-template-columns: 1fr;
  }
}

.calendar-month {
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background: var(--bg-elevated);
  overflow: hidden;
}

.calendar-month__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  padding: 0.75rem 1rem;
  border-bottom: 1px solid var(--border);
  font-weight: 600;
}

.calendar-month__head-center {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.25rem;
  flex: 1;
  min-width: 0;
  text-align: center;
}

.calendar-month__title {
  font-weight: 600;
}

.calendar-month__today-link {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--accent-orange, #f97316);
  text-decoration: none;
}

.calendar-month__today-link:hover {
  text-decoration: underline;
}

.calendar-dow {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 0;
  font-size: 0.7rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-muted);
  padding: 0.5rem 0.35rem 0.25rem;
  text-align: center;
}

.calendar-cells {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 1px;
  background: var(--border);
  border-top: 1px solid var(--border);
}

.calendar-cell {
  min-height: 88px;
  background: var(--bg-elevated);
  padding: 0.35rem;
  font-size: 0.75rem;
  transition: background 0.15s ease;
}

.calendar-cell--muted {
  opacity: 0.45;
}

.calendar-cell--today {
  box-shadow: inset 0 0 0 2px var(--accent-orange, #f97316);
  background: color-mix(in srgb, var(--accent-orange-dim, rgba(249, 115, 22, 0.12)) 100%, var(--bg-elevated));
}

.calendar-cell--today.calendar-cell--muted {
  opacity: 1;
  box-shadow: inset 0 0 0 2px var(--accent-orange, #f97316);
  background: color-mix(in srgb, var(--accent-orange-dim, rgba(249, 115, 22, 0.08)) 100%, var(--bg-elevated));
}

.calendar-cell--today .calendar-cell__num {
  color: var(--accent-orange, #f97316);
}

.calendar-cell--drop {
  outline: 2px dashed var(--accent-orange);
  outline-offset: -2px;
  background: var(--accent-orange-dim);
}

.calendar-cell__num {
  font-weight: 600;
  margin-bottom: 0.25rem;
}

.calendar-post-pill {
  display: flex;
  flex-direction: column;
  gap: 0.18rem;
  padding: 0.2rem 0.35rem;
  margin-bottom: 0.2rem;
  border-radius: 4px;
  font-size: 0.68rem;
  line-height: 1.25;
  cursor: grab;
  border: 1px solid var(--border);
  background: var(--bg-hover);
  user-select: none;
}

.calendar-post-pill:active {
  cursor: grabbing;
}

.calendar-post-pill__text {
  display: block;
}

.calendar-post-pill__accounts {
  display: inline-flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.18rem;
}

.calendar-post-pill__account {
  position: relative;
  display: inline-flex;
  width: 16px;
  height: 16px;
  border-radius: 999px;
}

.calendar-post-pill__account-core {
  width: 100%;
  height: 100%;
  border-radius: 999px;
  overflow: hidden;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--bg-card);
  color: var(--text-muted);
  font-size: 8px;
  border: 1px solid rgba(148, 163, 184, 0.38);
}

.calendar-post-pill__account-core img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.calendar-post-pill__account-badge {
  position: absolute;
  right: -3px;
  bottom: -3px;
  width: 9px;
  height: 9px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(255, 255, 255, 0.2);
  background: #111827;
  color: #f8fafc;
  font-size: 5px;
  line-height: 1;
}

.calendar-post-pill__account-more {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 16px;
  height: 16px;
  padding: 0 3px;
  border-radius: 999px;
  border: 1px solid rgba(148, 163, 184, 0.4);
  background: var(--bg-card);
  color: var(--text-muted);
  font-size: 0.58rem;
  font-weight: 700;
  line-height: 1;
}

.calendar-post-pill--x {
  border-left: 3px solid #000;
}

.calendar-post-pill--in {
  border-left: 3px solid #0a66c2;
}

.calendar-post-pill--bl {
  border-left: 3px solid #0085ff;
}

.calendar-post-pill--wh {
  border-left: 3px solid #25d366;
}

.calendar-queue {
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background: var(--bg-elevated);
}

.calendar-queue__head {
  padding: 0.65rem 1rem;
  border-bottom: 1px solid var(--border);
  font-size: 0.8rem;
  font-weight: 600;
}

.calendar-queue__list {
  padding: 0.5rem;
  max-height: 420px;
  overflow-y: auto;
}

.app-content--calendar {
  max-width: 1200px;
}

.calendar-shell.card--app-section {
  margin-bottom: 0;
}

.card__body--calendar {
  padding: 1rem 1.25rem 1.25rem;
}

@media (max-width: 640px) {
  .card__body--calendar {
    padding: 0.75rem;
  }
}

.calendar-shell__head-title {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
}

.calendar-shell__head-title .fa-calendar-days {
  color: var(--accent-green);
}

.app-content--plans {
  max-width: 1200px;
}

.plan-current-banner {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  flex-wrap: wrap;
  padding: 0.75rem 1rem;
  margin-bottom: 0.75rem;
  border-radius: var(--radius-md);
  border: 1px solid var(--border);
  background: var(--bg-elevated);
  font-size: 0.95rem;
}

.card__body > .plan-current-banner:last-child {
  margin-bottom: 0;
}

.card__body > .plan-status-msg:last-child {
  margin-bottom: 0;
}

.plan-current-banner i {
  color: var(--accent-purple);
}

.plan-status-msg {
  margin: 0 0 1rem;
  min-height: 1.25rem;
  font-size: 0.85rem;
  color: var(--text-muted);
}

.card__body[data-plans-section-busy="1"] .plans-pay-card {
  pointer-events: none;
  opacity: 0.55;
}

.plans-gateway-picker {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.75rem 1.25rem;
  margin-bottom: 1.25rem;
  padding: 0.75rem 1rem;
  border-radius: var(--radius-md);
  border: 1px solid var(--border);
  background: var(--bg-elevated);
  font-size: 0.9rem;
}

.plans-gateway-picker__label {
  font-weight: 600;
  color: var(--text-muted);
}

.plans-gateway-picker__opt {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  cursor: pointer;
  user-select: none;
}

.plans-gateway-picker__opt input {
  margin: 0;
}

.plans-pay-cards {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(148px, 1fr));
  gap: 0.75rem;
  margin-bottom: 1.25rem;
}

.plans-pay-card {
  position: relative;
  display: block;
  margin: 0;
  cursor: pointer;
  user-select: none;
}

.plans-pay-card__input.sr-only {
  margin: -1px;
}

.plans-pay-card__surface {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  min-height: 5.5rem;
  padding: 0.85rem 0.65rem;
  border-radius: var(--radius-md);
  border: 2px solid var(--border);
  background: var(--bg-elevated);
  transition: border-color 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
}

.plans-pay-card:hover .plans-pay-card__surface {
  border-color: var(--text-muted);
  background: var(--bg-input);
}

.plans-pay-card:has(.plans-pay-card__input:checked) .plans-pay-card__surface {
  border-color: var(--accent-orange, #f97316);
  box-shadow: 0 0 0 3px var(--accent-orange-dim, rgba(247, 168, 124, 0.2));
  background: var(--bg-elevated);
}

.plans-pay-card__input:focus-visible + .plans-pay-card__surface {
  outline: 2px solid var(--accent-orange, #f97316);
  outline-offset: 2px;
}

.plans-pay-card__icon {
  font-size: 1.65rem;
  line-height: 1;
  color: var(--text-muted);
}

.plans-pay-card:has(.plans-pay-card__input:checked) .plans-pay-card__icon {
  color: var(--accent-orange, #f97316);
}

.plans-pay-card__label {
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--text);
  text-align: center;
}

.app-modal__body .plans-pay-cards {
  margin-bottom: 0;
}

.plans-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1rem;
  align-items: stretch;
  margin-bottom: 1.25rem;
}

.card__body .plans-grid {
  margin-bottom: 0;
}

.plan-card {
  position: relative;
  display: flex;
  flex-direction: column;
  padding: 1.15rem 1.15rem 1.25rem;
  border-radius: var(--radius-md);
  border: 1px solid var(--border);
  background: var(--bg-elevated);
  transition: border-color 0.15s, box-shadow 0.15s;
}

.plan-card:hover {
  border-color: var(--border-strong);
}

.plan-card--current {
  border-color: rgba(99, 102, 241, 0.45);
  box-shadow: 0 0 0 1px rgba(99, 102, 241, 0.12);
}

/* Featured plan + “Most Popular” strip: match landing `.lp-pricing-card--featured` / `__badge-most` */
.plan-card--featured {
  border-color: rgba(168, 85, 247, 0.45);
  background: linear-gradient(180deg, rgba(168, 85, 247, 0.1) 0%, var(--bg-elevated) 45%);
}

.plan-card__popular-strip {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: -0.2rem -1.15rem 0.65rem;
  padding: 0.45rem 1.15rem 0;
  min-height: 1.6rem;
}

.plan-card__popular-line {
  position: absolute;
  left: 0.5rem;
  right: 0.5rem;
  top: 50%;
  height: 2px;
  margin-top: -1px;
  border-radius: 2px;
  background: linear-gradient(
    90deg,
    transparent,
    #a855f7 20%,
    #9333ea 80%,
    transparent
  );
  box-shadow: 0 0 14px rgba(168, 85, 247, 0.45);
}

.plan-card__badge-most {
  position: relative;
  z-index: 1;
  padding: 0.32rem 0.95rem;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.02em;
  color: #fff;
  background: linear-gradient(135deg, #a855f7 0%, #9333ea 100%);
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.1), 0 4px 20px rgba(168, 85, 247, 0.35);
}

.plan-card__name {
  margin: 0 0 0.35rem;
  font-size: 1.05rem;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.plan-card__platforms {
  display: grid;
  grid-template-columns: repeat(6, 1.55rem);
  gap: 0.45rem;
  justify-content: center;
  justify-items: center;
  width: 100%;
  max-width: calc(6 * 1.55rem + 5 * 0.45rem);
  margin: 0 auto 0.55rem;
}

.plan-card__platforms--rows-3 {
  gap: 0.4rem;
}

.plan-card__platform {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.55rem;
  height: 1.55rem;
  border-radius: 999px;
  border: 1px solid var(--border);
  color: var(--text-muted);
  background: var(--bg-hover);
  font-size: 0.8rem;
}

.plan-card__platform--coming-soon {
  opacity: 0.65;
  filter: grayscale(0.4);
  border-style: dashed;
}

.plan-card__platform--empty {
  border: 1px dashed var(--border);
  background: transparent;
  opacity: 0.35;
  pointer-events: none;
}

.plan-card__platform-badge {
  position: absolute;
  top: -0.35rem;
  right: -0.35rem;
  padding: 0.05rem 0.28rem;
  border-radius: 999px;
  font-size: 0.45rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  line-height: 1.2;
  color: #fff;
  background: linear-gradient(135deg, #6366f1 0%, #a855f7 50%, #ec4899 100%);
  box-shadow: 0 1px 6px color-mix(in srgb, #6366f1 40%, transparent);
}

.plan-card__price {
  display: block;
  margin-bottom: 0.5rem;
  font-size: 1.65rem;
  font-weight: 700;
  letter-spacing: -0.03em;
}

.plan-card__cycle {
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--text-muted);
}

.plan-card__trial {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  margin: 0 0 0.65rem;
  padding: 0.4rem 0.55rem;
  border-radius: var(--radius-sm);
  font-size: 0.78rem;
  font-weight: 600;
  color: #4ade80;
  background: rgba(74, 222, 128, 0.1);
  border: 1px solid rgba(74, 222, 128, 0.28);
}

.plan-card__trial i {
  opacity: 0.9;
}

.plan-card__includes-title {
  margin: 0.85rem 0 0.5rem;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-muted);
}

.plan-card__list {
  margin: 0 0 1.1rem;
  padding: 0;
  list-style: none;
  font-size: 0.85rem;
  color: var(--text-muted);
  line-height: 1.55;
  flex: 1 1 auto;
}

.plan-card__list-item {
  display: flex;
  align-items: flex-start;
  gap: 0.5rem;
  margin-bottom: 0.4rem;
}

.plan-card__list-item:last-child {
  margin-bottom: 0;
}

.plan-card__list-item.is-excluded span {
  color: var(--text-faint);
  opacity: 0.9;
}

.plan-card__list .plan-feature-rows__icon--yes {
  color: var(--accent-green);
}

.plan-card__list .plan-feature-rows__icon--no {
  color: #f87171;
}

.plan-card .btn {
  width: 100%;
  justify-content: center;
  margin-top: auto;
}

.app-modal--cool .app-modal__panel {
  overflow: hidden;
  border-color: rgba(255, 255, 255, 0.1);
  box-shadow:
    0 28px 90px rgba(0, 0, 0, 0.45),
    0 0 0 1px rgba(99, 102, 241, 0.12);
}

[data-theme="light"] .app-modal--cool .app-modal__panel {
  box-shadow:
    0 24px 64px rgba(15, 23, 42, 0.12),
    0 0 0 1px rgba(99, 102, 241, 0.18);
}

.app-modal__panel--notifications {
  max-width: 420px;
}

.app-modal__body--notifications {
  padding-top: 0.35rem;
}

.modal-notif-list {
  margin: 0;
  padding: 0;
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.modal-notif-item {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  padding: 0.65rem 0.75rem;
  min-width: 0;
  border-radius: var(--radius-md);
  border: 1px solid var(--border);
  background: var(--bg-input);
  transition: border-color 0.15s, background 0.15s;
}

.modal-notif-item:hover {
  border-color: var(--border-strong);
  background: var(--bg-hover);
}

.modal-notif-item--interactive {
  cursor: pointer;
}

.modal-notif-item--interactive:focus-visible {
  outline: 2px solid var(--accent-orange);
  outline-offset: 2px;
}

.modal-notif-item--empty,
.modal-notif-item--placeholder {
  cursor: default;
}

.modal-notif-item--empty .modal-notif-item__body,
.modal-notif-item--placeholder .modal-notif-item__body {
  color: var(--text-muted);
}

.modal-notif-item__action-hint {
  margin-top: 0.2rem;
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--accent-blue, #60a5fa);
}

.modal-notif-item__icon {
  width: 2rem;
  height: 2rem;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  background: rgba(52, 211, 153, 0.12);
  color: var(--accent-green);
  font-size: 0.95rem;
}

.modal-notif-item__icon--purple {
  background: rgba(167, 139, 250, 0.18);
  color: var(--accent-purple);
}

.modal-notif-item__icon--amber {
  background: var(--accent-orange-dim);
  color: var(--accent-orange);
}

.modal-notif-item__body {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
  min-width: 0;
  max-width: 100%;
  font-size: 0.82rem;
  color: var(--text-muted);
  line-height: 1.4;
}

.modal-notif-item__body span,
.modal-notif-item__body strong {
  max-width: 100%;
  white-space: normal;
  overflow-wrap: anywhere;
  word-break: break-word;
}

.modal-notif-item__body strong {
  font-size: 0.88rem;
  color: var(--text);
  font-weight: 600;
}

.app-modal--connect .app-modal__panel--connect {
  max-width: 440px;
  padding: 0;
}

.app-modal--connect .app-modal__panel--connect {
  position: relative;
}

.modal-connect-close {
  position: absolute;
  top: 0.65rem;
  right: 0.65rem;
  z-index: 2;
  background: rgba(0, 0, 0, 0.2);
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: #fff;
}

[data-theme="light"] .modal-connect-close {
  background: var(--bg-elevated);
  border-color: var(--border);
  color: var(--text);
}

.modal-connect-hero {
  position: relative;
  padding: 1.85rem 1.35rem 1.35rem;
  text-align: center;
  overflow: hidden;
  border-bottom: 1px solid var(--border);
  background: linear-gradient(
    165deg,
    rgba(99, 102, 241, 0.35) 0%,
    rgba(168, 85, 247, 0.2) 42%,
    transparent 100%
  );
}

.modal-connect-hero__glow {
  position: absolute;
  left: 50%;
  top: -60%;
  width: 140%;
  height: 140%;
  transform: translateX(-50%);
  background: radial-gradient(ellipse 50% 40% at 50% 100%, rgba(99, 102, 241, 0.55), transparent 72%);
  pointer-events: none;
}

.modal-connect-hero__icon {
  position: relative;
  z-index: 1;
  font-size: 3rem;
  margin-bottom: 0.5rem;
  filter: drop-shadow(0 4px 12px rgba(0, 0, 0, 0.25));
}

.modal-connect-hero__title {
  position: relative;
  z-index: 1;
  margin: 0;
  font-size: 1.35rem;
  font-weight: 700;
  letter-spacing: -0.03em;
}

.modal-connect-hero__lede {
  position: relative;
  z-index: 1;
  margin: 0.35rem 0 0;
  font-size: 0.85rem;
  color: var(--text-muted);
}

.app-modal__body--connect {
  padding: 1rem 1.15rem 1.1rem;
}

.modal-connect-steps {
  margin: 0;
  padding: 0;
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
}

.modal-connect-step {
  display: flex;
  align-items: flex-start;
  gap: 0.65rem;
  font-size: 0.86rem;
  line-height: 1.45;
  color: var(--text-muted);
}

.modal-connect-step-num {
  flex-shrink: 0;
  width: 1.4rem;
  height: 1.4rem;
  border-radius: 50%;
  background: linear-gradient(135deg, #6366f1, #a855f7);
  color: #fff;
  font-size: 0.72rem;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
}

.modal-connect-hint {
  margin: 0.85rem 0 0;
  padding: 0.65rem 0.75rem;
  border-radius: var(--radius-sm);
  font-size: 0.8rem;
  line-height: 1.45;
  color: var(--text-muted);
  background: var(--bg-input);
  border: 1px dashed var(--border-strong);
}

.modal-success-hero {
  padding: 1.5rem 1.25rem 1rem;
  text-align: center;
  border-bottom: 1px solid var(--border);
  background: linear-gradient(180deg, rgba(52, 211, 153, 0.1) 0%, transparent 100%);
}

.modal-success-hero__icon {
  display: inline-flex;
  width: 3.25rem;
  height: 3.25rem;
  align-items: center;
  justify-content: center;
  margin-bottom: 0.65rem;
  border-radius: 50%;
  font-size: 1.35rem;
  background: linear-gradient(145deg, rgba(52, 211, 153, 0.25), rgba(99, 102, 241, 0.15));
  color: var(--accent-green);
  border: 1px solid rgba(52, 211, 153, 0.35);
}

.modal-success-hero h2 {
  margin: 0;
  font-size: 1.2rem;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.modal-success-hero .app-modal__lede {
  margin-top: 0.4rem;
}

.app-modal--composer-feedback[data-feedback-state="error"] .modal-success-hero {
  background: linear-gradient(180deg, rgba(244, 63, 94, 0.14) 0%, transparent 100%);
  border-bottom: 1px solid rgba(244, 63, 94, 0.3);
}

.app-modal--composer-feedback[data-feedback-state="error"] .modal-success-hero__icon {
  background: linear-gradient(145deg, rgba(244, 63, 94, 0.28), rgba(251, 113, 133, 0.18));
  color: #f43f5e;
  border-color: rgba(244, 63, 94, 0.45);
}

.app-modal--composer-feedback[data-feedback-state="error"] .modal-success-hero h2 {
  color: #f43f5e;
}

.app-modal--composer-feedback .app-modal__foot {
  justify-content: center;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.app-modal--calendar-quick .modal-spark {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
  margin: 0.75rem 0 0;
}

.app-modal--calendar-quick .modal-spark a {
  flex: 1 1 auto;
  min-width: 8rem;
  justify-content: center;
}

.app-content--media-library {
  max-width: 1200px;
}

.app-content--posts-index {
  max-width: 960px;
}

.composer-editing-banner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.65rem 1rem;
  margin-top: 1rem;
  padding: 0.65rem 1rem;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-strong);
  background: color-mix(in srgb, var(--accent-orange) 12%, var(--bg-elevated));
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--text);
}

.composer-editing-banner[hidden] {
  display: none !important;
}

.composer-editing-banner .btn {
  margin-left: auto;
}

.posts-index-filters__body {
  display: grid;
  gap: 1rem;
}

@media (min-width: 640px) {
  .posts-index-filters__body {
    grid-template-columns: 1fr minmax(10rem, 14rem) minmax(10rem, 12rem);
    align-items: end;
  }
}

.posts-index-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 0.85rem;
  grid-template-columns: repeat(1, minmax(0, 1fr));
}

.posts-index-list[hidden],
.posts-index-empty[hidden],
.posts-index-loading[hidden],
.posts-index-pagination[hidden] {
  display: none !important;
}

@media (min-width: 900px) {
  .posts-index-list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

.posts-index-item {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.75rem;
  padding: 1rem;
  border-radius: var(--radius-md);
  border: 1px solid var(--border);
  background: var(--bg-input);
}

@media (min-width: 720px) {
  .posts-index-item {
    grid-template-columns: auto 1fr auto;
    align-items: start;
    column-gap: 0.85rem;
    row-gap: 0.65rem;
  }
}

.posts-index-item__main {
  flex: 1;
  min-width: 0;
}

.posts-index-item__thumb-wrap {
  width: 112px;
  height: 88px;
  border-radius: 0.65rem;
  overflow: hidden;
  border: 1px solid var(--border);
  background: var(--bg-elevated);
}

.posts-index-item__thumb {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.posts-index-item__thumb--video {
  width: 112px;
  height: 88px;
  border-radius: 0.65rem;
  border: 1px solid var(--border);
  background: var(--bg-elevated);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
}

.posts-index-item__excerpt {
  margin: 0.35rem 0 0.5rem;
  font-size: 0.9rem;
  line-height: 1.5;
  color: var(--text);
  white-space: pre-wrap;
  word-break: break-word;
}

.posts-index-item__meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem 1.25rem;
  font-size: 0.78rem;
  color: var(--text-muted);
}

.posts-index-item__meta strong {
  font-weight: 600;
  color: var(--text);
}

.posts-index-item__actions {
  flex-shrink: 0;
  display: flex;
  align-items: flex-start;
}

.posts-index-item__na {
  font-size: 0.85rem;
}

.posts-index-badge {
  display: inline-block;
  padding: 0.15rem 0.45rem;
  border-radius: 999px;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.03em;
  text-transform: uppercase;
}

.posts-index-badge--draft {
  background: rgba(96, 165, 250, 0.15);
  color: #60a5fa;
}

.posts-index-badge--scheduled {
  background: rgba(167, 139, 250, 0.18);
  color: #a78bfa;
}

.posts-index-badge--published {
  background: rgba(52, 211, 153, 0.15);
  color: #34d399;
}

.posts-index-badge--failed {
  background: rgba(244, 63, 94, 0.12);
  color: #f43f5e;
}

.posts-index-badge--pending {
  background: rgba(247, 168, 124, 0.2);
  color: var(--accent-orange);
}

.posts-index-badge--muted {
  background: var(--bg-hover);
  color: var(--text-muted);
}

.posts-index-pagination {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 0.75rem 1rem;
  margin-top: 1.25rem;
  padding-top: 1rem;
  border-top: 1px solid var(--border);
}

.posts-index-pagination__status {
  font-size: 0.8rem;
}

.card__head--posts-index {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.35rem 1rem;
}

.posts-index-list__title {
  margin: 0;
  font-size: 1.05rem;
  font-weight: 700;
}

.posts-index-count {
  font-size: 0.8rem;
}

.media-lib-section__head {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 0.75rem;
  margin-bottom: 1rem;
}

@media (min-width: 640px) {
  .media-lib-section__head {
    flex-direction: row;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
  }
}

.media-lib-section__title {
  margin: 0;
  font-size: 1.05rem;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.media-lib-filter.segmented {
  max-width: 100%;
}

.media-lib-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 0.85rem;
}

.media-lib-card {
  border-radius: var(--radius-md);
  border: 1px solid var(--border);
  background: var(--bg-elevated);
  overflow: hidden;
  transition: border-color 0.15s, box-shadow 0.15s;
}

.media-lib-card:hover {
  border-color: var(--border-strong);
  box-shadow: var(--shadow-sm);
}

.media-lib-card__thumb {
  position: relative;
  aspect-ratio: 3 / 2;
  background: var(--bg-input);
}

.media-lib-card__thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.media-lib-card__thumb--video::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 40%, rgba(0, 0, 0, 0.55));
  pointer-events: none;
}

.media-lib-card__play {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  width: 2.75rem;
  height: 2.75rem;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.95);
  color: #111;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.95rem;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.25);
  z-index: 1;
}

.media-lib-card__badge {
  position: absolute;
  top: 0.45rem;
  left: 0.45rem;
  padding: 0.2rem 0.45rem;
  border-radius: 6px;
  font-size: 0.65rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  background: rgba(0, 0, 0, 0.65);
  color: #fff;
  z-index: 1;
}

.media-lib-card__badge--video {
  background: rgba(99, 102, 241, 0.9);
}

.media-lib-card__badge--sale {
  background: linear-gradient(135deg, rgba(245, 158, 11, 0.95) 0%, rgba(217, 119, 6, 0.95) 100%);
  color: #fff;
  text-shadow: 0 1px 1px rgba(0, 0, 0, 0.2);
}

.media-lib-card__meta {
  padding: 0.55rem 0.65rem 0.65rem;
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
}

.media-lib-card__name {
  font-size: 0.86rem;
  font-weight: 600;
  line-height: 1.3;
}

.media-lib-card__when {
  font-size: 0.75rem;
  color: var(--text-muted);
}

.media-lib-card__price {
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--accent-orange);
  margin-top: 0.2rem;
}

.media-lib-stock-lede {
  margin: 0 0 1rem;
  font-size: 0.9rem;
  color: var(--text-muted);
  line-height: 1.55;
  max-width: 52rem;
}

.media-lib-subhead {
  margin: 1.25rem 0 0.65rem;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--text-muted);
}

.media-lib-subhead:first-of-type {
  margin-top: 0;
}

.stock-market-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 0.75rem;
}

.stock-card {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.35rem;
  padding: 1rem 1rem 0.9rem;
  border-radius: var(--radius-md);
  border: 1px solid var(--border);
  background: var(--bg-elevated);
  text-decoration: none;
  color: inherit;
  transition: border-color 0.15s, transform 0.12s;
}

.stock-card:hover {
  border-color: rgba(99, 102, 241, 0.45);
  transform: translateY(-2px);
}

.stock-card--free {
  background: linear-gradient(165deg, rgba(52, 211, 153, 0.08) 0%, var(--bg-elevated) 55%);
}

.stock-card__icon {
  width: 2.5rem;
  height: 2.5rem;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  background: var(--bg-hover);
  color: var(--text-muted);
}

.stock-card--free .stock-card__icon {
  color: var(--accent-green);
}

.stock-card__name {
  font-size: 1rem;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.stock-card__hint {
  font-size: 0.8rem;
  color: var(--text-muted);
  line-height: 1.4;
}

.stock-card__cta {
  margin-top: 0.25rem;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--accent-blue);
}

.stock-card:hover .stock-card__cta {
  text-decoration: underline;
}

.app-content--profile {
  max-width: 1100px;
}

.profile-card__body {
  padding: 1rem 1.25rem 1.25rem;
}

.profile-avatar-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1.25rem;
}

.profile-avatar-lg {
  width: 5.5rem;
  height: 5.5rem;
  border-radius: 50%;
  border: 2px solid var(--border);
  background: linear-gradient(145deg, var(--bg-hover), var(--bg-input));
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2.25rem;
  color: var(--text-muted);
  flex-shrink: 0;
  overflow: hidden;
}

.profile-avatar-lg .app-user-avatar {
  width: 100%;
  height: 100%;
}

.profile-avatar-actions {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.35rem;
  min-width: 0;
}

.profile-card--stack {
  margin-bottom: 0.75rem;
}

.profile-card__body .field__hint--tight {
  margin: 0;
}

.profile-card__body .profile-note {
  margin: 0;
  font-size: 0.85rem;
}

.profile-card__body .profile-note--spaced {
  margin: 0 0 0.75rem;
  font-size: 0.85rem;
}

.profile-danger-card {
  margin-top: 1rem;
  border-color: color-mix(in srgb, var(--danger, #dc2626) 35%, var(--border, #e5e7eb));
}

.profile-danger-card__lede {
  margin: 0 0 1rem;
  font-size: 0.9rem;
  line-height: 1.55;
  color: var(--text-muted, #64748b);
}

.profile-danger-card__lede a {
  color: inherit;
  text-decoration: underline;
}

.profile-danger-card__alert {
  margin-bottom: 1rem;
}

.app-content--settings {
  max-width: 1100px;
}

.settings-ai-card {
  margin-top: 1.25rem;
}

.settings-ai-lede {
  margin-bottom: 1rem;
}

.settings-ai-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 1rem;
  margin-top: 0.75rem;
}

.settings-ai-status {
  margin: 0;
  flex: 1 1 12rem;
}

.app-ai-byok {
  margin-top: 0.25rem;
}

.app-content--plan-history {
  max-width: 1100px;
}

.settings-billing-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  align-items: center;
}

.plan-history-badge {
  display: inline-flex;
  align-items: center;
  padding: 0.12rem 0.4rem;
  border-radius: 4px;
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  vertical-align: middle;
}

.plan-history-badge--upgrade {
  background: rgba(52, 211, 153, 0.2);
  color: var(--accent-green);
}

.plan-history-badge--downgrade {
  background: rgba(245, 158, 11, 0.2);
  color: #f59e0b;
}

.plan-history-change-note {
  display: block;
  font-size: 0.8rem;
  margin-top: 0.15rem;
}

.plan-history-pagination {
  padding: 1rem 1.25rem;
  border-top: 1px solid var(--border, rgba(255, 255, 255, 0.08));
}

.plan-history-badge--neutral {
  background: var(--border);
  color: var(--text-muted);
}

/* ── Installer ───────────────────────────────────────────── */

.installer {
  width: 100%;
  max-width: 540px;
  margin: 0 auto;
}

.installer__steps {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0;
  margin-bottom: 1.5rem;
}

.installer__step {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.8rem;
  color: var(--text-muted);
  opacity: 0.5;
  transition: opacity 0.2s;
}

.installer__step--active {
  opacity: 1;
  color: var(--text);
  font-weight: 600;
}

.installer__step--done {
  color: #22c55e;
}

.installer__step-num {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.7rem;
  font-weight: 700;
  border: 2px solid var(--border);
  flex-shrink: 0;
}

.installer__step--active .installer__step-num {
  border-color: var(--accent-orange);
  color: var(--accent-orange);
}

.installer__step--done .installer__step-num {
  border-color: #22c55e;
  background: rgba(34, 197, 94, 0.12);
  color: #22c55e;
}

.installer__step-line {
  width: 32px;
  height: 2px;
  background: var(--border);
  margin: 0 0.35rem;
}

.installer__step-line--done {
  background: #22c55e;
}

.installer__panel {
  padding: 1.75rem 1.5rem;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  background: var(--bg-elevated);
  box-shadow: 0 16px 48px rgba(0, 0, 0, 0.18);
}

.installer__title {
  margin: 0 0 0.35rem;
  font-size: 1.2rem;
  font-weight: 700;
}

.installer__desc {
  margin: 0 0 1.25rem;
  font-size: 0.875rem;
  color: var(--text-muted);
  line-height: 1.5;
}

.installer__section {
  margin-bottom: 1.25rem;
}

.installer__section-title {
  font-size: 0.8rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--text-muted);
  margin: 0 0 0.5rem;
}

.installer__check {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.4rem 0;
  font-size: 0.85rem;
  border-bottom: 1px solid var(--border);
}

.installer__check:last-child {
  border-bottom: none;
}

.installer__check-icon {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.65rem;
  flex-shrink: 0;
}

.installer__check-icon--ok {
  background: rgba(34, 197, 94, 0.15);
  color: #22c55e;
}

.installer__check-icon--fail {
  background: rgba(239, 68, 68, 0.15);
  color: #ef4444;
}

.installer__check-icon--warn {
  background: rgba(250, 204, 21, 0.15);
  color: #eab308;
}

.installer__check-value {
  margin-left: auto;
  font-size: 0.78rem;
  color: var(--text-muted);
  font-weight: 500;
}

.installer__tag {
  font-size: 0.65rem;
  font-weight: 600;
  text-transform: uppercase;
  padding: 0.1rem 0.4rem;
  border-radius: 4px;
  background: rgba(96, 165, 250, 0.12);
  color: #60a5fa;
}

.installer__hint {
  font-size: 0.78rem;
  color: var(--text-muted);
  margin: 0.25rem 0 0.5rem;
  line-height: 1.45;
}

.installer__warn {
  font-size: 0.8rem;
  color: #ef4444;
  margin-top: 0.5rem;
}

.installer__actions {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-top: 1.25rem;
  flex-wrap: wrap;
}

.installer__actions--center {
  justify-content: center;
}

.installer__field-row {
  display: flex;
  gap: 0.75rem;
}

.installer__field-row .field {
  flex: 1;
}

.installer__field-row .field--port {
  flex: 0 0 auto;
  max-width: 120px;
}

.installer__hint--stack {
  margin-top: 1rem;
}

.installer__divider {
  border: none;
  border-top: 1px solid var(--border);
  margin: 1rem 0;
}

.installer__success {
  text-align: center;
  padding: 1rem 0 0.5rem;
}

.installer__success-icon {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 2rem;
  margin-bottom: 1.25rem;
  background: rgba(34, 197, 94, 0.12);
  color: #22c55e;
}

.installer__success-icon--info {
  background: rgba(96, 165, 250, 0.12);
  color: #60a5fa;
}

.installer__success code {
  background: var(--bg-app);
  padding: 0.15rem 0.45rem;
  border-radius: 4px;
  font-size: 0.82rem;
}

/* ── Error pages ─────────────────────────────────────────── */

.error-page {
  min-height: 100vh;
  min-height: 100dvh;
  margin: 0;
  width: 100%;
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1.25rem;
  padding: max(1rem, env(safe-area-inset-top)) max(1rem, env(safe-area-inset-right))
    max(1.25rem, env(safe-area-inset-bottom)) max(1rem, env(safe-area-inset-left));
  background: var(--bg-app);
  color: var(--text);
  font-family: var(--font-sans);
  overflow-x: hidden;
}

.error-page__container {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2.5rem;
  width: 100%;
  max-width: 440px;
  min-width: 0;
  text-align: center;
}

.error-page__card {
  width: 100%;
  min-width: 0;
  box-sizing: border-box;
  padding: 2.5rem 2rem 2rem;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  background: var(--bg-elevated);
  box-shadow: 0 16px 48px rgba(0, 0, 0, 0.18);
}

.error-page__icon {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1.25rem;
  font-size: 1.5rem;
}

.error-page__icon--default,
.error-page__icon--warning {
  background: rgba(250, 204, 21, 0.12);
  color: #eab308;
}

.error-page__icon--forbidden {
  background: rgba(239, 68, 68, 0.12);
  color: #ef4444;
}

.error-page__icon--not-found {
  background: rgba(167, 139, 250, 0.12);
  color: var(--accent-purple);
}

.error-page__icon--expired {
  background: rgba(247, 168, 124, 0.12);
  color: var(--accent-orange);
}

.error-page__icon--throttle {
  background: rgba(251, 146, 60, 0.12);
  color: #fb923c;
}

.error-page__icon--server {
  background: rgba(239, 68, 68, 0.12);
  color: #ef4444;
}

.error-page__icon--maintenance {
  background: rgba(96, 165, 250, 0.12);
  color: var(--accent-blue);
}

.error-page__code {
  display: block;
  font-size: clamp(2.25rem, 14vw, 3.5rem);
  font-weight: 800;
  line-height: 1;
  letter-spacing: -0.04em;
  margin-bottom: 0.5rem;
  background: linear-gradient(135deg, var(--accent-orange), var(--accent-purple));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  word-break: break-word;
}

.error-page__title {
  margin: 0 0 0.5rem;
  font-size: clamp(1.1rem, 4vw, 1.35rem);
  font-weight: 700;
  word-wrap: break-word;
}

.error-page__message {
  margin: 0 0 1.75rem;
  font-size: 0.9rem;
  line-height: 1.55;
  color: var(--text-muted);
  overflow-wrap: anywhere;
  word-wrap: break-word;
}

.error-page__actions {
  display: flex;
  align-items: stretch;
  justify-content: center;
  gap: 0.75rem;
  flex-wrap: wrap;
  width: 100%;
}

.error-page__actions .btn {
  flex: 1 1 auto;
  min-width: 0;
  justify-content: center;
  box-sizing: border-box;
}

@media (max-width: 420px) {
  .error-page__card {
    padding: 1.5rem 1rem 1.25rem;
  }

  .error-page__actions {
    flex-direction: column;
    align-items: stretch;
  }

  .error-page__actions .btn {
    width: 100%;
    max-width: none;
  }
}

.error-page__brand .brand-logo-svg {
  display: block;
  opacity: 0.35;
  filter: none;
  color: var(--text);
  transition: opacity 0.2s;
}

.error-page__brand .brand-logo-svg:hover {
  opacity: 0.6;
}

.error-page__brand img {
  display: block;
  opacity: 0.35;
  filter: var(--logo-filter);
  transition: opacity 0.2s;
}

.error-page__brand img:hover {
  opacity: 0.6;
}

/* ─── Health / status page icons ───────────────────────── */

.error-page__icon--healthy {
  background: rgba(34, 197, 94, 0.12);
  color: #22c55e;
}

.error-page__icon--outage {
  background: rgba(239, 68, 68, 0.12);
  color: #ef4444;
}

/* ─── Status check list ────────────────────────────────── */

.status-checks {
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 0;
  margin-bottom: 1.5rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-md, 8px);
  overflow: hidden;
}

.status-check {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  padding: 0.75rem 1rem;
  border-bottom: 1px solid var(--border);
}

.status-check:last-child {
  border-bottom: none;
}

.status-check__indicator {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  flex-shrink: 0;
}

.status-check__indicator--ok {
  background: #22c55e;
  box-shadow: 0 0 6px rgba(34, 197, 94, 0.45);
}

.status-check__indicator--down {
  background: #ef4444;
  box-shadow: 0 0 6px rgba(239, 68, 68, 0.45);
}

.status-check__name {
  flex: 1;
  min-width: 0;
  font-size: 0.875rem;
  font-weight: 500;
  text-align: left;
  overflow-wrap: anywhere;
}

.status-check__badge {
  flex-shrink: 0;
  font-size: 0.75rem;
  font-weight: 600;
  padding: 0.15rem 0.55rem;
  border-radius: 9999px;
}

.status-check__badge--ok {
  background: rgba(34, 197, 94, 0.12);
  color: #22c55e;
}

.status-check__badge--down {
  background: rgba(239, 68, 68, 0.12);
  color: #ef4444;
}

.status-page__timestamp {
  font-size: 0.78rem;
  color: var(--text-muted);
  margin: 0 0 1.25rem;
  overflow-wrap: anywhere;
}

.status-page .error-page__card {
  max-width: 480px;
}

.status-page .error-page__container {
  max-width: min(480px, 100%);
}

.error-page__status-link {
  margin: 1rem 0 0;
  font-size: 0.8rem;
}

.error-page__status-link a {
  color: var(--text-muted);
  text-decoration: none;
  transition: color 0.15s;
}

.error-page__status-link a:hover {
  color: var(--accent-blue, #60a5fa);
}

/* ── Flash messages ─────────────────────────────────── */

.app-flash {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.85rem 1.05rem;
  border-radius: 0.5rem;
  font-size: 0.94rem;
  font-weight: 600;
  margin-bottom: 1rem;
  animation: flash-in 0.3s ease;
}

.app-flash--success {
  background: linear-gradient(180deg, rgba(34, 197, 94, 0.2), rgba(34, 197, 94, 0.12));
  color: #1e9f4a;
  border: 1px solid rgba(34, 197, 94, 0.36);
  box-shadow: 0 10px 24px rgba(34, 197, 94, 0.18);
}

.app-flash--error {
  background: rgba(239, 68, 68, 0.12);
  color: #ef4444;
  border: 1px solid rgba(239, 68, 68, 0.2);
}

.app-flash__close {
  margin-left: auto;
  background: none;
  border: none;
  font-size: 1.1rem;
  cursor: pointer;
  color: inherit;
  opacity: 0.7;
  line-height: 1;
}

.app-flash__close:hover {
  opacity: 1;
}

@keyframes flash-in {
  from { opacity: 0; transform: translateY(-8px); }
  to { opacity: 1; transform: translateY(0); }
}

/* Workflows builder (n8n-inspired) */
.workflows-page {
  padding-top: 0.6rem;
}

.workflows-studio {
  border: 1px solid var(--border, #2c2f36);
  border-radius: 14px;
  background: var(--bg-elevated, #111827);
  overflow: hidden;
}

.workflows-studio__topbar {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  gap: 0.75rem;
  align-items: center;
  padding: 0.65rem 0.8rem;
  border-bottom: 1px solid var(--border, #2c2f36);
}

.workflows-topbar__left,
.workflows-topbar__right,
.workflows-topbar__center {
  display: flex;
  align-items: center;
  gap: 0.45rem;
}

.workflows-topbar__center {
  justify-content: center;
}

.workflows-topbar__right {
  justify-content: flex-end;
}

.workflows-topbar__name {
  min-width: 220px;
  max-width: 360px;
}

.workflows-topbar__meta {
  font-size: 0.7rem;
  border: 1px solid var(--border, #2c2f36);
  border-radius: 999px;
  padding: 0.16rem 0.5rem;
  color: var(--muted, #94a3b8);
  background: rgba(15, 23, 42, 0.5);
}

.workflows-topbar__select {
  min-width: 120px;
}

.workflows-topbar__toggle {
  margin-right: 0.35rem;
}

.workflows-studio__body {
  display: grid;
  grid-template-columns: 210px 1fr 320px;
  min-height: 72vh;
}

.workflows-side {
  border-right: 1px solid var(--border, #2c2f36);
  padding: 0.65rem;
  overflow: auto;
}

.workflows-side--right {
  border-right: none;
  border-left: 1px solid var(--border, #2c2f36);
}

.workflows-side__head h3 {
  margin: 0 0 0.5rem;
  font-size: 0.92rem;
}

.workflows-node-list {
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
}

.workflows-node-list .btn {
  justify-content: flex-start;
}

.workflows-canvas-wrap {
  display: grid;
  grid-template-rows: auto 1fr auto;
  min-width: 0;
}

.workflows-canvas-toolbar {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.5rem 0.65rem;
  border-bottom: 1px solid var(--border, #2c2f36);
}

.workflows-toolbar__hint {
  margin-left: auto;
  font-size: 0.72rem;
  color: var(--muted, #94a3b8);
}

[data-workflow-connect-mode].is-active {
  border-color: rgba(96, 165, 250, 0.8);
  background: rgba(59, 130, 246, 0.18);
}

.workflows-canvas {
  position: relative;
  min-height: 560px;
  overflow: auto;
  background-image: radial-gradient(circle, rgba(148, 163, 184, 0.24) 1px, transparent 1px);
  background-size: 18px 18px;
}

.workflows-canvas__edges,
.workflows-canvas__nodes {
  position: absolute;
  inset: 0;
}

.workflows-canvas__nodes {
  pointer-events: auto;
}

.workflows-canvas__empty {
  position: absolute;
  top: 48%;
  left: 50%;
  transform: translate(-50%, -50%);
  padding: 0.5rem 0.8rem;
  border: 1px dashed var(--border, #2c2f36);
  border-radius: 999px;
  background: rgba(17, 24, 39, 0.35);
}

.workflow-edge-path {
  fill: none;
  stroke: rgba(148, 163, 184, 0.85);
  stroke-width: 2;
  stroke-linecap: round;
}

.workflow-node-card.is-active .workflow-node-card__in,
.workflow-node-card.is-active .workflow-node-card__out {
  border-color: rgba(96, 165, 250, 0.9);
  box-shadow: 0 0 0 1px rgba(96, 165, 250, 0.35);
}

.workflow-node-card {
  position: absolute;
  width: 212px;
  border: 1px solid var(--border, #2c2f36);
  border-radius: 10px;
  background: var(--bg-elevated, #151a25);
  color: var(--text, #f8fafc);
  cursor: grab;
  padding: 0.48rem 0.6rem;
  box-shadow: 0 8px 20px rgba(2, 6, 23, 0.28);
}

.workflow-node-card.is-active {
  border-color: var(--accent-blue, #60a5fa);
  box-shadow: 0 0 0 1px rgba(96, 165, 250, 0.45), 0 10px 24px rgba(2, 6, 23, 0.34);
}

.workflow-node-card__head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.5rem;
}

.workflow-node-card__head strong {
  font-size: 0.78rem;
  font-weight: 700;
}

.workflow-node-card__head small {
  opacity: 0.76;
  font-size: 0.68rem;
}

.workflow-node-card__sub {
  font-size: 0.68rem;
  opacity: 0.75;
  margin-top: 0.15rem;
}

.workflow-node-card__in,
.workflow-node-card__out {
  position: absolute;
  top: 33px;
  width: 12px;
  height: 12px;
  border-radius: 999px;
  border: 1px solid rgba(148, 163, 184, 0.8);
  background: #111827;
  cursor: pointer;
}

.workflow-node-card__in {
  left: -7px;
}

.workflow-node-card__out {
  right: -7px;
}

.workflow-node-card__plus {
  position: absolute;
  right: -33px;
  top: 28px;
  width: 22px;
  height: 22px;
  border-radius: 999px;
  border: 1px solid var(--border, #2c2f36);
  background: var(--bg-elevated, #111827);
  color: inherit;
  cursor: pointer;
}

.btn--danger {
  border-color: rgba(239, 68, 68, 0.45);
  color: #fecaca;
}

.btn--danger:hover {
  background: rgba(239, 68, 68, 0.2);
}

.workflows-canvas-footer {
  padding: 0.5rem 0.65rem;
  border-top: 1px solid var(--border, #2c2f36);
  display: flex;
  align-items: center;
  gap: 0.45rem;
}

.workflows-list {
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
}

.workflows-list__item {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  border: 1px solid var(--border, #2c2f36);
  border-radius: 8px;
  padding: 0.42rem 0.5rem;
  flex-wrap: wrap;
}

.workflows-accounts .check-line {
  margin-bottom: 0.1rem;
}

@media (max-width: 1280px) {
  .workflows-studio__body {
    grid-template-columns: 180px 1fr;
  }

  .workflows-side--right {
    grid-column: 1 / -1;
    border-left: 0;
    border-top: 1px solid var(--border, #2c2f36);
  }
}

@media (max-width: 900px) {
  .workflows-studio__topbar {
    grid-template-columns: 1fr;
  }

  .workflows-topbar__center,
  .workflows-topbar__right {
    justify-content: flex-start;
  }

  .workflows-studio__body {
    grid-template-columns: 1fr;
  }

  .workflows-side {
    border-right: 0;
    border-bottom: 1px solid var(--border, #2c2f36);
  }
}

/* ── Global upload progress (XHR / multipart forms) ─ */

.app-upload-progress {
  position: fixed;
  left: 50%;
  bottom: max(1rem, env(safe-area-inset-bottom));
  transform: translateX(-50%);
  z-index: 220;
  width: min(420px, calc(100vw - 2rem));
  padding: 0.65rem 0.85rem;
  border-radius: var(--radius-md, 10px);
  border: 1px solid var(--border);
  background: var(--bg-elevated, #1e293b);
  box-shadow: var(--shadow-md, 0 12px 40px rgba(0, 0, 0, 0.35));
  color: var(--text, #f1f5f9);
}

.app-upload-progress__inner {
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
  min-width: 0;
}

.app-upload-progress__label {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.8rem;
  font-weight: 600;
}

.app-upload-progress__label::before {
  content: "";
  width: 0.55rem;
  height: 0.55rem;
  border-radius: 50%;
  background: var(--accent-blue, #6366f1);
  box-shadow: 0 0 0 2px rgba(99, 102, 241, 0.35);
  animation: app-upload-pulse 1s ease-in-out infinite;
}

@keyframes app-upload-pulse {
  0%,
  100% {
    opacity: 1;
    transform: scale(1);
  }
  50% {
    opacity: 0.55;
    transform: scale(0.92);
  }
}

.app-upload-progress__track {
  position: relative;
  height: 6px;
  border-radius: 999px;
  background: var(--border, rgba(148, 163, 184, 0.25));
  overflow: hidden;
  isolation: isolate;
}

.app-upload-progress__fill {
  height: 100%;
  width: 0%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--accent-blue, #6366f1), #a78bfa);
  transition: width 0.12s ease-out;
}

.app-upload-progress__track--indeterminate .app-upload-progress__fill {
  width: 35% !important;
  position: absolute;
  left: 0;
  top: 0;
  animation: app-upload-indeterminate 1.1s ease-in-out infinite;
}

@keyframes app-upload-indeterminate {
  0% {
    transform: translateX(-100%);
  }
  100% {
    transform: translateX(320%);
  }
}

.app-upload-progress__pct {
  font-size: 0.72rem;
  font-variant-numeric: tabular-nums;
  color: var(--text-muted, #94a3b8);
  align-self: flex-end;
}

/* ── Alert banners (server flash) ──────────────────── */

.alert {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.75rem 1rem;
  border-radius: 0.5rem;
  font-size: 0.88rem;
  margin-bottom: 1rem;
}

.alert--success {
  background: rgba(34, 197, 94, 0.12);
  color: #22c55e;
  border: 1px solid rgba(34, 197, 94, 0.2);
}

.alert--error {
  background: rgba(239, 68, 68, 0.12);
  color: #ef4444;
  border: 1px solid rgba(239, 68, 68, 0.2);
}

.alert--info {
  background: rgba(96, 165, 250, 0.12);
  color: #60a5fa;
  border: 1px solid rgba(96, 165, 250, 0.2);
}

/* ── Connected account status ──────────────────────── */

.social-connect-card--connected {
  border-color: rgba(34, 197, 94, 0.3);
}

.social-connect-card__user {
  color: #22c55e;
  font-size: 0.85rem;
  display: flex;
  align-items: center;
  gap: 0.35rem;
  margin-bottom: 0.5rem;
}

/* ── Recent posts list ─────────────────────────────── */

.recent-posts-list {
  list-style: none;
  padding: 0.75rem 1rem 1rem;
  margin: 0;
  min-width: 0;
  overflow-x: hidden;
}

.recent-post-item {
  display: grid;
  grid-template-columns: minmax(0, max-content) minmax(0, 1fr) minmax(7rem, min(11rem, 45%));
  align-items: center;
  gap: 0.5rem 0.6rem;
  min-width: 0;
  padding: 0.5rem 0;
  border-bottom: 1px solid var(--border, rgba(255,255,255,0.06));
  font-size: 0.85rem;
  overflow: hidden;
}

.recent-post-item:last-child {
  border-bottom: none;
}

.recent-post-item__status {
  font-size: 0.72rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  padding: 0.1rem 0.55rem 0.1rem 0.5rem;
  border-radius: 9999px;
  white-space: nowrap;
  justify-self: start;
  max-width: 100%;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
}

.recent-post-item__status--draft {
  background: rgba(148, 163, 184, 0.15);
  color: var(--text-muted, #94a3b8);
}

.recent-post-item__status--scheduled {
  background: rgba(96, 165, 250, 0.15);
  color: #60a5fa;
}

.recent-post-item__status--published {
  background: rgba(34, 197, 94, 0.15);
  color: #22c55e;
}

.recent-post-item__status--failed {
  background: rgba(239, 68, 68, 0.15);
  color: #ef4444;
}

.recent-post-item__text {
  display: block;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.recent-post-item__when {
  display: block;
  color: var(--text-muted, #94a3b8);
  white-space: nowrap;
  font-size: 0.78rem;
  line-height: 1.25;
  min-width: 0;
  max-width: 100%;
  width: 100%;
  box-sizing: border-box;
  overflow: hidden;
  text-overflow: ellipsis;
  justify-self: stretch;
  text-align: right;
  font-variant-numeric: tabular-nums;
}

/* ── WordPress site URL in connected card ─────────── */

.social-connect-card__site {
  display: block;
  font-size: 0.78rem;
  color: var(--text-muted, #94a3b8);
  margin-top: 0.15rem;
  word-break: break-all;
}

/* ── Notification unread dot ───────────────────────── */

.modal-notif-item--unread .modal-notif-item__body strong {
  color: var(--accent-blue, #60a5fa);
}

/* ── Super Admin Dashboard ────────────────────────── */

.admin-filter-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 1rem;
}

.admin-filter-bar--inline {
  margin-bottom: 0;
}

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

.admin-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.875rem;
}

.admin-table th,
.admin-table td {
  padding: 0.65rem 0.75rem;
  text-align: left;
  border-bottom: 1px solid var(--border, rgba(255, 255, 255, 0.08));
}

.admin-table th {
  font-weight: 600;
  color: var(--text-muted, #94a3b8);
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.admin-table tbody tr:hover {
  background: var(--surface-hover, rgba(255, 255, 255, 0.03));
}

.admin-table__sub {
  font-size: 0.78rem;
}

.admin-table--tx {
  min-width: 960px;
}

.admin-table__error-cell {
  max-width: 14rem;
  word-break: break-word;
  font-size: 0.8125rem;
}

.admin-table__refs {
  max-width: 10rem;
  word-break: break-all;
  font-size: 0.8125rem;
}

.admin-pill {
  display: inline-block;
  padding: 0.15rem 0.45rem;
  border-radius: 999px;
  font-size: 0.7rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.admin-pill--success {
  background: rgba(34, 197, 94, 0.15);
  color: #4ade80;
}

.admin-pill--danger {
  background: rgba(239, 68, 68, 0.15);
  color: #f87171;
}

.admin-pill--muted {
  background: rgba(148, 163, 184, 0.12);
  color: var(--text-muted, #94a3b8);
}

.admin-cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(360px, 1fr));
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.admin-form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.75rem;
}

.admin-form-grid .field--full {
  grid-column: 1 / -1;
}

.admin-exchange-rates {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  margin-top: 0.5rem;
}

.admin-card-actions {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-top: 1rem;
  padding-top: 0.75rem;
  border-top: 1px solid var(--border, rgba(255, 255, 255, 0.08));
}

.admin-form-footer {
  margin-top: 1.5rem;
}

.admin-settings-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 1rem;
}

.admin-settings-nav__btn {
  border: 1px solid var(--border);
  background: var(--bg-elevated);
  color: var(--text-muted);
  border-radius: 999px;
  padding: 0.42rem 0.8rem;
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
  transition: border-color 0.15s ease, color 0.15s ease, background 0.15s ease;
}

.admin-settings-nav__btn:hover {
  border-color: var(--border-strong);
  color: var(--text);
}

.admin-settings-nav__btn.is-active {
  border-color: rgba(99, 102, 241, 0.55);
  background: rgba(99, 102, 241, 0.18);
  color: var(--text);
}

[data-admin-settings-grid][data-admin-single-column="1"] {
  grid-template-columns: 1fr;
}

.admin-settings-cache-card {
  margin-top: 1.25rem;
}

.admin-seo-files-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem;
  margin-top: 0.75rem;
}

.admin-seo-preview {
  margin-top: 1rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background: var(--bg-input);
  padding: 0.85rem;
}

.admin-seo-preview__label {
  margin: 0 0 0.45rem;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--text-faint);
}

.admin-seo-preview__serp {
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 0.65rem;
  background: var(--bg-elevated);
}

.admin-seo-preview__serp strong {
  display: block;
  color: #3b82f6;
  font-size: 0.95rem;
  line-height: 1.25;
}

.admin-seo-preview__url {
  display: block;
  margin-top: 0.2rem;
  font-size: 0.72rem;
  color: #22c55e;
}

.admin-seo-preview__serp p {
  margin: 0.35rem 0 0;
  font-size: 0.8rem;
  color: var(--text-muted);
}

.admin-seo-preview__social {
  margin-top: 0.65rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  overflow: hidden;
  background: var(--bg-elevated);
}

.admin-seo-preview__thumb {
  aspect-ratio: 1.91 / 1;
  min-height: 120px;
  background: rgba(99, 102, 241, 0.08);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-faint);
  font-size: 0.8rem;
}

.admin-seo-preview__thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.admin-seo-preview__social-meta {
  padding: 0.65rem;
}

.admin-seo-preview__social-meta strong {
  display: block;
  font-size: 0.9rem;
  color: var(--text);
  line-height: 1.3;
}

.admin-seo-preview__social-meta p {
  margin: 0.35rem 0 0;
  font-size: 0.8rem;
  color: var(--text-muted);
}

.admin-seo-preview__social-meta span {
  display: block;
  margin-top: 0.35rem;
  font-size: 0.72rem;
  color: var(--text-faint);
}

.admin-seo-favicon-preview {
  margin-top: 0.55rem;
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  font-size: 0.8rem;
}

.admin-seo-favicon-preview img {
  width: 24px;
  height: 24px;
  border-radius: 6px;
  border: 1px solid var(--border);
  object-fit: cover;
  background: var(--bg-elevated);
}

.admin-seo-favicon-preview a {
  color: var(--text-muted);
  text-decoration: none;
}

.admin-seo-favicon-preview a:hover {
  color: var(--text);
  text-decoration: underline;
}

.admin-landing-features-form {
  margin-top: 1.25rem;
}

.admin-landing-feature-block {
  margin: 0;
  padding: 1rem 0 0;
  border: none;
  border-top: 1px solid var(--border, rgba(255, 255, 255, 0.08));
}

.admin-landing-feature-block:first-of-type {
  padding-top: 0;
  border-top: none;
}

.admin-landing-feature-block__title {
  float: none;
  width: 100%;
  font-size: 0.85rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--text-muted);
  padding: 0 0 0.65rem;
  margin: 0 0 0.35rem;
}

.admin-checkbox-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 0.35rem;
}

.admin-pagination {
  margin-top: 1rem;
  display: flex;
  justify-content: center;
}

.admin-filter-bar--wrap {
  align-items: flex-end;
}

.admin-notification-form__master,
.admin-email-template__body {
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: 0.8125rem;
  line-height: 1.45;
}

.admin-notification-test {
  margin-top: 1.5rem;
}

.admin-form-actions {
  margin-top: 1rem;
  margin-bottom: 1.5rem;
}

.admin-table__cell-clip {
  max-width: 14rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.admin-pill--queued {
  background: rgba(234, 179, 8, 0.18);
  color: #facc15;
}

.admin-pill--sent {
  background: rgba(34, 197, 94, 0.15);
  color: #4ade80;
}

.admin-pill--failed {
  background: rgba(239, 68, 68, 0.15);
  color: #f87171;
}

.admin-pill--draft {
  background: rgba(148, 163, 184, 0.15);
  color: #cbd5e1;
}

.admin-pill--scheduled {
  background: rgba(59, 130, 246, 0.18);
  color: #93c5fd;
}

.admin-pill--sending {
  background: rgba(234, 179, 8, 0.18);
  color: #facc15;
}

.admin-pill--completed {
  background: rgba(34, 197, 94, 0.15);
  color: #4ade80;
}

.admin-pill--cancelled {
  background: rgba(239, 68, 68, 0.12);
  color: #f87171;
}

.admin-table__actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.35rem;
}

.marketing-campaign-actions .card__body {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.75rem;
}

.marketing-campaign-form__actions,
.marketing-campaign-form__send-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.75rem;
}

.marketing-campaign-form__hint {
  margin: 0;
}

.marketing-campaign-form__estimate {
  margin-top: 0.75rem;
}

.marketing-campaign-preview-frame {
  width: 100%;
  min-height: 420px;
  border: 1px solid var(--border);
  border-radius: 0.65rem;
  background: #fff;
  margin: 0.75rem 0 0;
}

#modal-campaign-preview .app-modal__panel--wide {
  max-width: 760px;
  width: min(96vw, 760px);
}

.inline-form {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
}

.hidden {
  display: none !important;
}

.text-center {
  text-align: center;
}

/* ── Admin platforms page grid ───────────────────── */

.admin-platforms-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1.25rem;
  align-items: stretch;
  width: 100%;
}

.admin-platforms-grid > .admin-gateway-card {
  height: 100%;
  min-width: 0;
}

.admin-platforms-grid .admin-gateway-card__head {
  flex-direction: column;
  align-items: stretch;
}

.admin-platforms-grid .admin-platform-card__header {
  margin-bottom: 0;
}

.admin-platforms-grid .admin-gateway-card__title {
  font-size: 1.05rem;
}

.admin-platforms-grid .admin-gateway-card__sub {
  font-size: 0.82rem;
}

@media (max-width: 960px) {
  .admin-platforms-grid {
    grid-template-columns: 1fr;
  }
}

/* ── Admin platform card ─────────────────────────── */

.admin-platform-card__toggles {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 0.5rem;
  flex-shrink: 0;
}

.admin-toggle--coming-soon .admin-toggle__slider {
  background: color-mix(in srgb, var(--border) 70%, #a855f7 30%);
}

.admin-platform-card__header {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 0.75rem;
}

.admin-platform-card__icon {
  font-size: 1.5rem;
  width: 2rem;
  text-align: center;
}

/* ── Custom platform icons (no Font Awesome brand) ── */

.platform-icon {
  display: inline-block;
  width: 1em;
  height: 1em;
  background-color: currentColor;
  -webkit-mask-repeat: no-repeat;
  mask-repeat: no-repeat;
  -webkit-mask-position: center;
  mask-position: center;
  -webkit-mask-size: contain;
  mask-size: contain;
  vertical-align: -0.125em;
}

.platform-icon--lemmy {
  -webkit-mask-image: url(../icons/platforms/lemmy.svg);
  mask-image: url(../icons/platforms/lemmy.svg);
}

/* ── Platform brand icon colors ───────────────────── */

.fa-brands.fa-linkedin { color: #0a66c2; }
.fa-brands.fa-facebook,
.fa-brands.fa-facebook-f { color: #1877f2; }
.fa-brands.fa-instagram {
  background: linear-gradient(45deg, #f9ce34 0%, #ee2a7b 48%, #6228d7 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.fa-brands.fa-x-twitter { color: var(--text); }
.fa-brands.fa-tiktok {
  color: var(--text);
  text-shadow: -1px -1px 0 #25f4ee, 1px 1px 0 #fe2c55;
}
.fa-brands.fa-youtube { color: #ff0000; }
.fa-brands.fa-telegram,
.fa-brands.fa-telegram-plane { color: #229ed9; }
.fa-brands.fa-pinterest,
.fa-brands.fa-pinterest-p { color: #e60023; }
.fa-brands.fa-threads { color: var(--text); }
.fa-brands.fa-reddit,
.fa-brands.fa-reddit-alien { color: #ff4500; }
.fa-brands.fa-mastodon { color: #6364ff; }
.platform-icon.platform-icon--lemmy { color: var(--text); }
.fa-brands.fa-wordpress { color: #21759b; }
.fa-brands.fa-google { color: #4285f4; }
.fa-brands.fa-discord { color: #5865f2; }
.fa-brands.fa-bluesky { color: #1185fe; }
.fa-brands.fa-dev { color: var(--text); }
.fa-brands.fa-whatsapp { color: #25d366; }
.fa-brands.fa-stripe { color: #635bff; }
.fa-brands.fa-paypal { color: #003087; }

.admin-platform-card__footer {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 1.25rem;
  padding-top: 1rem;
  border-top: 1px solid var(--border, rgba(255, 255, 255, 0.08));
}

.admin-platform-save-status {
  font-size: 0.85rem;
  color: var(--text-muted);
}

.admin-platform-card__plans {
  font-size: 0.78rem;
  margin-top: 0.5rem;
}

/* ── Admin toggle switch ─────────────────────────── */

.admin-toggle {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  cursor: pointer;
  font-size: 0.875rem;
}

.admin-toggle input {
  display: none;
}

.admin-toggle__slider {
  width: 36px;
  height: 20px;
  background: var(--border, #475569);
  border-radius: 10px;
  position: relative;
  transition: background 0.2s;
}

.admin-toggle__slider::after {
  content: '';
  position: absolute;
  left: 2px;
  top: 2px;
  width: 16px;
  height: 16px;
  background: #fff;
  border-radius: 50%;
  transition: transform 0.2s;
}

.admin-toggle input:checked + .admin-toggle__slider {
  background: var(--accent-blue, #3b82f6);
}

.admin-toggle input:checked + .admin-toggle__slider::after {
  transform: translateX(16px);
}

/* ── Admin tickets ───────────────────────────────── */

.admin-ticket {
  padding: 1rem 0;
  border-bottom: 1px solid var(--border, rgba(255, 255, 255, 0.08));
}

.admin-ticket:last-child {
  border-bottom: none;
}

.admin-ticket__header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 0.5rem;
}

.admin-ticket__header strong {
  margin-right: 0.5rem;
}

.admin-ticket__message {
  margin-bottom: 0.75rem;
  line-height: 1.5;
}

.admin-ticket__replies {
  margin-left: 1.5rem;
  padding-left: 1rem;
  border-left: 2px solid var(--border, rgba(255, 255, 255, 0.12));
  margin-bottom: 0.75rem;
}

.admin-ticket__reply {
  padding: 0.5rem 0;
  font-size: 0.875rem;
}

.admin-ticket__reply strong {
  margin-right: 0.35rem;
}

.admin-ticket__actions {
  display: flex;
  align-items: flex-end;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.admin-ticket__reply-form {
  flex: 1;
  min-width: 200px;
  display: flex;
  gap: 0.5rem;
  align-items: flex-end;
}

.admin-ticket__reply-form textarea {
  flex: 1;
}

.admin-ticket--user-thread {
  border: none;
  padding: 0;
}

.admin-ticket--user-thread .admin-ticket__reply:first-child {
  padding-top: 0;
}

.admin-ticket--user-thread .user-ticket-reply-body {
  margin: 0.35rem 0 0;
  white-space: pre-wrap;
}

.admin-ticket--user-thread .admin-ticket__reply-form {
  flex-direction: column;
  align-items: stretch;
}

.user-ticket-closed-note {
  margin-top: 1rem;
}

.user-ticket-reply-form {
  margin-top: 1.25rem;
}

.user-tickets-pagination {
  padding: 0.75rem 1rem;
}

.user-tickets-empty {
  padding: 2rem;
}

/* ── Admin migration name ────────────────────────── */

.admin-migration-name code {
  font-size: 0.78rem;
  word-break: break-all;
}

/* ── Badges ──────────────────────────────────────── */

.badge {
  display: inline-flex;
  align-items: center;
  padding: 0.2rem 0.55rem;
  border-radius: 9999px;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  line-height: 1.2;
}

.badge--sm {
  padding: 0.12rem 0.4rem;
  font-size: 0.68rem;
}

.badge--success {
  background: rgba(52, 211, 153, 0.15);
  color: #34d399;
}

.badge--warning {
  background: rgba(251, 191, 36, 0.15);
  color: #fbbf24;
}

.badge--danger {
  background: rgba(244, 63, 94, 0.15);
  color: #f43f5e;
}

.badge--info {
  background: rgba(96, 165, 250, 0.15);
  color: #60a5fa;
}

.badge--muted {
  background: rgba(148, 163, 184, 0.15);
  color: #94a3b8;
}

/* ── Alert messages ──────────────────────────────── */

.alert {
  padding: 0.75rem 1rem;
  border-radius: 0.5rem;
  font-size: 0.875rem;
  margin-bottom: 1rem;
  line-height: 1.45;
}

.alert--success {
  background: rgba(52, 211, 153, 0.1);
  color: #34d399;
  border: 1px solid rgba(52, 211, 153, 0.2);
}

.alert--danger {
  background: rgba(244, 63, 94, 0.1);
  color: #f43f5e;
  border: 1px solid rgba(244, 63, 94, 0.2);
}

.alert--info {
  background: rgba(96, 165, 250, 0.1);
  color: #60a5fa;
  border: 1px solid rgba(96, 165, 250, 0.2);
}

/* ── Button variants for admin ───────────────────── */

.btn--danger {
  color: #f43f5e;
}

.btn--danger:hover {
  background: rgba(244, 63, 94, 0.1);
}

.btn--success {
  color: #34d399;
}

.btn--success:hover {
  background: rgba(52, 211, 153, 0.1);
}

.select--xs {
  padding: 0.2rem 0.4rem;
  font-size: 0.75rem;
  min-width: 90px;
}

.select--sm {
  padding: 0.35rem 0.5rem;
  font-size: 0.8rem;
}

.input--sm {
  padding: 0.35rem 0.5rem;
  font-size: 0.8rem;
}

.page-head__actions {
  display: flex;
  gap: 0.5rem;
  align-items: center;
}

@media (max-width: 640px) {
  .admin-form-grid {
    grid-template-columns: 1fr;
  }
  .admin-cards-grid {
    grid-template-columns: 1fr;
  }
  .admin-ticket__actions {
    flex-direction: column;
    align-items: stretch;
  }
}

/* ── Admin sidebar subgroups ─────────────────────── */

.nav-subgroup-label {
  display: block;
  margin: 0.65rem 0 0.2rem 1.85rem;
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-muted);
}

.nav-subgroup-label:first-of-type {
  margin-top: 0.35rem;
}

.affiliate-stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 1rem;
}

/* ── Admin payment gateways & subscriptions ──────── */

.admin-gateway-stack {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
  width: 100%;
}

.admin-gateway-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1.25rem;
  align-items: stretch;
  width: 100%;
}

.admin-gateway-grid > .admin-gateway-card {
  height: 100%;
  min-width: 0;
}

@media (max-width: 960px) {
  .admin-gateway-grid {
    grid-template-columns: 1fr;
  }
}

.admin-gateway-card__head {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.75rem;
}

.admin-gateway-card__title {
  margin: 0;
  font-size: 1.05rem;
  font-weight: 700;
}

.admin-gateway-card__sub {
  margin: 0.25rem 0 0;
  font-size: 0.82rem;
  color: var(--text-muted);
  line-height: 1.45;
  max-width: 36rem;
}

.admin-gateway-card--muted {
  opacity: 0.92;
}

.admin-badge-soon {
  display: inline-block;
  margin-left: 0.35rem;
  padding: 0.12rem 0.45rem;
  border-radius: 999px;
  font-size: 0.65rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  background: var(--bg-hover);
  border: 1px solid var(--border);
  color: var(--text-muted);
}

.admin-code-tag {
  font-size: 0.78em;
  padding: 0.1rem 0.35rem;
  border-radius: 4px;
  background: var(--bg-input);
  border: 1px solid var(--border);
}

.admin-mono {
  font-family: ui-monospace, monospace;
  font-size: 0.82rem;
  word-break: break-all;
}

.admin-gateway-hint {
  font-size: 0.82rem;
  line-height: 1.5;
}

.admin-metrics-row {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(11rem, 1fr));
  gap: 1rem;
  margin-bottom: 1.25rem;
}

.admin-metric-card {
  padding: 1rem 1.1rem;
}

.admin-metric-card__label {
  display: block;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 0.35rem;
}

.admin-metric-card__value {
  display: block;
  font-size: 1.65rem;
  font-weight: 800;
  line-height: 1.1;
  letter-spacing: -0.02em;
}

.admin-metric-card__hint {
  display: block;
  margin-top: 0.35rem;
  font-size: 0.75rem;
  color: var(--text-muted);
  line-height: 1.35;
}

.admin-metric-card--accent {
  border-color: rgba(99, 102, 241, 0.45);
  background: linear-gradient(135deg, rgba(99, 102, 241, 0.08), transparent);
}

.admin-charts-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1rem;
  margin-bottom: 1.25rem;
}

.admin-charts-grid--split {
  align-items: stretch;
}

.admin-chart-wrap {
  position: relative;
  height: 240px;
}

.admin-chart-wrap--donut {
  height: 280px;
  max-width: 320px;
  margin: 0 auto;
}

.admin-two-col {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 1rem;
}

.admin-mini-stat {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.5rem 0;
  border-bottom: 1px solid var(--border);
}

.admin-mini-stat:last-child {
  border-bottom: none;
}

.admin-mini-stat__label {
  font-size: 0.85rem;
  color: var(--text-muted);
}

.admin-mini-stat__value {
  font-size: 1rem;
  font-weight: 700;
}

.app-content--admin-subs .admin-table {
  font-size: 0.82rem;
}

.admin-analytics-filters .card__body {
  padding-top: 0.75rem;
}

.admin-analytics-period {
  margin: 0.75rem 0 0;
  font-size: 0.85rem;
}

.admin-analytics-period i {
  margin-right: 0.35rem;
  opacity: 0.85;
}

.admin-analytics-custom-dates {
  display: inline-flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.35rem;
}

.admin-analytics-custom-dates--hidden {
  display: none;
}

.admin-analytics-footnote {
  margin: 0.75rem 0 0;
  font-size: 0.78rem;
}

@media (max-width: 640px) {
  .admin-metrics-row {
    grid-template-columns: 1fr 1fr;
  }
}

/* Admin setup checklist */
.admin-setup-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(280px, 0.85fr);
  gap: 1.25rem;
  align-items: start;
}

@media (max-width: 1100px) {
  .admin-setup-layout {
    grid-template-columns: 1fr;
  }
}

.admin-setup-card {
  background: linear-gradient(165deg, #1e3a5f 0%, #152a45 48%, #0f1f33 100%);
  border: 1px solid rgba(148, 163, 184, 0.18);
  border-radius: var(--radius-lg, 12px);
  color: #f8fafc;
  box-shadow: 0 18px 40px rgba(15, 23, 42, 0.28);
  overflow: hidden;
}

.admin-setup-card__head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.5rem 1rem;
  padding: 1.1rem 1.25rem 0.75rem;
  border-bottom: 1px solid rgba(148, 163, 184, 0.14);
}

.admin-setup-card__title {
  margin: 0;
  font-size: 1.35rem;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.admin-setup-card__progress {
  margin: 0;
  font-size: 0.9rem;
  color: rgba(226, 232, 240, 0.88);
}

.admin-setup-card__progress-count {
  font-weight: 700;
  color: #fff;
}

.admin-setup-card__progress-sep {
  opacity: 0.5;
  margin: 0 0.15rem;
}

.admin-setup-card__banner {
  margin: 0.85rem 1.25rem 0;
}

.admin-setup-list {
  list-style: none;
  margin: 0;
  padding: 0.35rem 0 0.5rem;
}

.admin-setup-list__item {
  display: flex;
  gap: 0.85rem;
  padding: 0.85rem 1.25rem;
  border-bottom: 1px dotted rgba(148, 163, 184, 0.28);
}

.admin-setup-list__item:last-child {
  border-bottom: none;
}

.admin-setup-list__icon {
  flex: 0 0 1.35rem;
  width: 1.35rem;
  height: 1.35rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-top: 0.1rem;
  border-radius: 999px;
  font-size: 0.72rem;
}

.admin-setup-list__item--done .admin-setup-list__icon {
  background: rgba(34, 197, 94, 0.2);
  color: #4ade80;
}

.admin-setup-list__item--required:not(.admin-setup-list__item--done) .admin-setup-list__icon {
  color: #fca5a5;
}

.admin-setup-list__item--optional:not(.admin-setup-list__item--done) .admin-setup-list__icon {
  color: #fcd34d;
}

.admin-setup-list__body {
  min-width: 0;
  flex: 1;
}

.admin-setup-list__label-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.45rem 0.65rem;
}

.admin-setup-list__label {
  font-size: 0.98rem;
  font-weight: 600;
  line-height: 1.35;
}

.admin-setup-list__label--link {
  color: #fff;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.admin-setup-list__label--link:hover {
  color: #bae6fd;
}

.admin-setup-list__tag {
  font-size: 0.68rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  padding: 0.12rem 0.45rem;
  border-radius: 999px;
  background: rgba(148, 163, 184, 0.16);
  color: rgba(226, 232, 240, 0.85);
}

.admin-setup-list__hint {
  margin: 0.35rem 0 0;
  font-size: 0.82rem;
  line-height: 1.45;
  color: rgba(226, 232, 240, 0.78);
}

.admin-setup-list__action {
  margin: 0.4rem 0 0;
}

.admin-setup-list__action-link {
  font-size: 0.82rem;
  font-weight: 600;
  color: #7dd3fc;
  text-decoration: none;
}

.admin-setup-list__action-link:hover {
  color: #bae6fd;
}

.admin-setup-aside {
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
}

.admin-setup-section-card .card__head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.75rem;
}

.admin-setup-section-card__count {
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--text-muted, #94a3b8);
}

.admin-setup-section-summary {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
}

.admin-setup-section-summary li {
  display: flex;
  align-items: flex-start;
  gap: 0.5rem;
  font-size: 0.82rem;
  line-height: 1.35;
  color: var(--text-muted, #94a3b8);
}

.admin-setup-section-summary li i {
  margin-top: 0.15rem;
  width: 0.9rem;
  text-align: center;
  flex-shrink: 0;
}

.admin-setup-section-summary li.is-done {
  color: var(--text, #e2e8f0);
}

.admin-setup-section-summary li.is-done i {
  color: #22c55e;
}

.admin-setup-section-summary li.is-missing i {
  color: #ef4444;
}

.admin-setup-quicklinks {
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
}

.admin-setup-quicklinks a {
  font-size: 0.88rem;
  font-weight: 500;
  color: var(--accent, #6366f1);
  text-decoration: none;
}

.admin-setup-quicklinks a:hover {
  text-decoration: underline;
}

.admin-setup-tools {
  margin-bottom: 1.25rem;
}

.admin-setup-tools__row {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  margin-top: 0.75rem;
}

.admin-setup-tools__actions {
  flex-shrink: 0;
}

@media (prefers-reduced-motion: reduce) {
  .nav-link,
  .btn,
  .icon-btn,
  .segmented button,
  .card,
  .card--app-section {
    transition-duration: 0.01ms !important;
  }
}

/* --- Dashboard command center --- */
.app-content--dashboard {
  position: relative;
  padding-bottom: 3.5rem;
}

.filter-row--dashboard {
  margin-bottom: 0.85rem;
}

@media (min-width: 769px) {
  .filter-row--dashboard {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
  }
}

.filter-row__right {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.65rem;
}

.pills--dashboard .pill {
  font-size: 0.78rem;
}

.app-context-banner--compact {
  margin-bottom: 0.85rem;
  padding: 0.55rem 0.75rem;
  font-size: 0.82rem;
}

.dash-metrics {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.85rem;
  margin-bottom: 1rem;
}

@media (min-width: 640px) {
  .dash-metrics {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (min-width: 1100px) {
  .dash-metrics {
    grid-template-columns: repeat(5, minmax(0, 1fr));
  }
}

.dash-metric {
  position: relative;
  padding: 1rem 1rem 0.9rem;
  border-radius: var(--radius-md);
  border: 1px solid var(--border);
  background: var(--bg-elevated);
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.04) inset;
  min-width: 0;
  overflow: hidden;
}

.dash-metric::before {
  content: "";
  position: absolute;
  inset: 0 0 auto;
  height: 3px;
  border-radius: var(--radius-md) var(--radius-md) 0 0;
  opacity: 0.85;
}

.dash-metric--profiles::before {
  background: linear-gradient(90deg, #6366f1, #8b5cf6);
}

.dash-metric--audience::before {
  background: linear-gradient(90deg, #0ea5e9, #22c55e);
}

.dash-metric--engage::before {
  background: linear-gradient(90deg, #ec4899, #f97316);
}

.dash-metric--published::before {
  background: linear-gradient(90deg, #2563eb, #7c3aed);
}

.dash-metric--scheduled::before {
  background: linear-gradient(90deg, #f59e0b, #ef4444);
}

.dash-metric__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.35rem;
}

.dash-metric__label {
  font-size: 0.72rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--text-muted);
}

.dash-metric__ico {
  opacity: 0.35;
  font-size: 0.95rem;
}

.dash-metric__value-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.45rem;
}

.dash-metric__value-row--spark {
  justify-content: space-between;
}

.dash-metric__value {
  font-size: 1.5rem;
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.1;
}

.dash-metric__value--sm {
  font-size: 1.15rem;
}

.dash-metric__suffix {
  font-size: 0.78rem;
  color: var(--text-muted);
}

.dash-metric__sub {
  margin: 0.45rem 0 0;
  font-size: 0.72rem;
  color: var(--text-faint);
  line-height: 1.35;
}

.dash-metric__muted {
  font-size: 0.75rem;
  color: var(--text-muted);
}

.dash-metric__platforms {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  margin-top: 0.5rem;
}

.dash-metric__plat {
  width: 28px;
  height: 28px;
  border-radius: 8px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--bg-soft);
  border: 1px solid var(--border);
  font-size: 0.85rem;
  color: var(--text-muted);
}

.dash-sparkline {
  flex-shrink: 0;
  color: #0ea5e9;
  opacity: 0.9;
}

.dash-metric__engage-body {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  margin-top: 0.15rem;
}

.dash-mini-donut {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  flex-shrink: 0;
  box-shadow: inset 0 0 0 10px var(--bg-elevated);
}

.dash-metric__engage-copy {
  flex: 1;
  min-width: 0;
}

.dash-engage-legend {
  list-style: none;
  margin: 0.25rem 0 0;
  padding: 0;
  font-size: 0.7rem;
  color: var(--text-muted);
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
}

.dash-engage-legend li {
  display: flex;
  align-items: center;
  gap: 0.35rem;
}

.dash-engage-legend .sw {
  width: 7px;
  height: 7px;
  border-radius: 2px;
  flex-shrink: 0;
}

.dash-engage-legend .sw--likes {
  background: #6366f1;
}

.dash-engage-legend .sw--comments {
  background: #ec4899;
}

.dash-engage-legend .sw--reposts {
  background: #22c55e;
}

.dash-delta {
  font-size: 0.72rem;
  font-weight: 600;
  padding: 0.15rem 0.45rem;
  border-radius: 999px;
}

.dash-delta--up {
  color: #16a34a;
  background: rgba(34, 197, 94, 0.12);
}

.dash-delta--down {
  color: #dc2626;
  background: rgba(239, 68, 68, 0.1);
}

.dash-micro-bars {
  display: flex;
  align-items: flex-end;
  gap: 3px;
  height: 36px;
  margin-top: 0.45rem;
}

.dash-micro-bars__bar {
  flex: 1;
  min-width: 3px;
  max-width: 10px;
  border-radius: 3px 3px 0 0;
  background: linear-gradient(180deg, #6366f1, rgba(99, 102, 241, 0.35));
  opacity: 0.85;
}

.dash-metric__badge {
  margin-left: auto;
  font-size: 0.65rem;
  font-weight: 700;
  padding: 0.1rem 0.4rem;
  border-radius: 6px;
  background: rgba(239, 68, 68, 0.15);
  color: #ef4444;
}

.dash-sched-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1rem;
  font-size: 0.7rem;
  color: var(--text-muted);
  margin-top: 0.35rem;
}

.dash-sched-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  margin-top: 0.45rem;
}

.dash-sched-strip__cell {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.dash-sched-strip__cell:has(.dash-sched-strip__accounts) {
  width: auto;
  height: auto;
  padding: 0;
  border: none;
  background: transparent;
  overflow: visible;
}

.dash-sched-strip__cell:has(.dash-sched-strip__ph) {
  width: 24px;
  height: 24px;
  border-radius: 8px;
  overflow: hidden;
  border: 1px solid var(--border);
  background: var(--bg-soft);
}

.dash-sched-strip__accounts {
  display: inline-flex;
  align-items: center;
  flex-wrap: nowrap;
  gap: 0.18rem;
}

.dash-sched-strip__account {
  position: relative;
  display: inline-flex;
  width: 16px;
  height: 16px;
  border-radius: 999px;
  flex-shrink: 0;
}

.dash-sched-strip__account-core {
  width: 100%;
  height: 100%;
  border-radius: 999px;
  overflow: hidden;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--bg-card);
  color: var(--text-muted);
  font-size: 8px;
  border: 1px solid rgba(148, 163, 184, 0.38);
}

.dash-sched-strip__account-core img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.dash-sched-strip__account-badge {
  position: absolute;
  right: -3px;
  bottom: -3px;
  width: 9px;
  height: 9px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(255, 255, 255, 0.2);
  background: #111827;
  color: #f8fafc;
  font-size: 5px;
  line-height: 1;
}

.dash-sched-strip__account-more {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 16px;
  height: 16px;
  padding: 0 3px;
  border-radius: 999px;
  border: 1px solid rgba(148, 163, 184, 0.4);
  background: var(--bg-card);
  color: var(--text-muted);
  font-size: 0.58rem;
  font-weight: 700;
  line-height: 1;
}

.dash-sched-strip__ph {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
  font-size: 0.85rem;
}

.dash-charts-row {
  margin-bottom: 1rem;
}

.card--dash-chart {
  position: relative;
  overflow: hidden;
}

.card__head--dashboard-chart {
  flex-wrap: wrap;
  gap: 0.5rem;
}

.card__head-controls--wrap {
  flex-wrap: wrap;
  gap: 0.5rem;
}

.dash-chart-modes {
  display: inline-flex;
  border-radius: 999px;
  border: 1px solid var(--border);
  overflow: hidden;
}

.dash-chart-modes__btn {
  border: none;
  background: transparent;
  color: var(--text-muted);
  font-size: 0.72rem;
  font-weight: 600;
  padding: 0.3rem 0.65rem;
  cursor: pointer;
}

.dash-chart-modes__btn.is-active {
  background: var(--bg-active);
  color: var(--text);
}

.dash-chart-modes__btn:hover {
  color: var(--text);
}

.dashboard-chart--framed {
  position: relative;
  padding-top: 0.25rem;
}

.dash-chart-shine {
  pointer-events: none;
  position: absolute;
  inset: 10% 5% auto;
  height: 42%;
  background: radial-gradient(ellipse at 50% 0%, rgba(167, 139, 250, 0.12), transparent 65%);
  opacity: 0.9;
}

.dashboard-platform-mix--lg .insights-donut {
  width: 140px;
  height: 140px;
}

.action-row--dashboard {
  margin-bottom: 1rem;
}

@media (min-width: 1025px) {
  .action-row--dashboard {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}

.action-tile--dash {
  flex-direction: column;
  align-items: stretch;
  gap: 0.5rem;
}

.action-tile--dash .action-tile__left {
  width: 100%;
}

.action-tile__text {
  display: flex;
  flex-direction: column;
  gap: 0.1rem;
}

.action-tile__text small {
  font-size: 0.72rem;
  font-weight: 400;
  color: var(--text-muted);
}

.action-tile__quick {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  font-size: 0.85rem;
  color: var(--text-muted);
  opacity: 0.85;
}

.dash-bottom-grid {
  grid-template-columns: 1fr;
}

@media (min-width: 900px) {
  .dash-bottom-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (min-width: 1200px) {
  .dash-bottom-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

.dash-bottom-grid .card--span-2 {
  grid-column: 1 / -1;
}

@media (min-width: 1200px) {
  .dash-bottom-grid .card--span-2 {
    grid-column: span 2;
  }
}

.dash-chip {
  font-size: 0.68rem;
  font-weight: 600;
  padding: 0.15rem 0.45rem;
  border-radius: 999px;
  background: var(--bg-soft);
  color: var(--text-muted);
  border: 1px solid var(--border);
}

.dash-cal {
  width: 100%;
  max-width: 100%;
  min-width: 0;
  box-sizing: border-box;
  padding: 0.75rem 1rem 1rem;
  overflow: hidden;
  container-type: inline-size;
  container-name: dash-cal;
}

.dash-cal__title {
  font-weight: 700;
  font-size: 0.88rem;
  font-size: clamp(0.82rem, 4.5cqi, 0.95rem);
  margin-bottom: 0.45rem;
  line-height: 1.2;
}

.dash-cal__dow {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  width: 100%;
  gap: 2px;
  gap: clamp(1px, 0.6cqi, 0.15rem);
  font-size: 0.58rem;
  font-size: clamp(0.52rem, 3.2cqi, 0.65rem);
  font-weight: 600;
  color: var(--text-muted);
  text-align: center;
  margin-bottom: 0.2rem;
}

.dash-cal__dow span {
  min-width: 0;
  overflow: hidden;
  text-overflow: clip;
}

.dash-cal__grid {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  width: 100%;
  gap: 2px;
  gap: clamp(1px, 0.7cqi, 0.2rem);
}

.dash-cal__cell {
  box-sizing: border-box;
  min-width: 0;
  max-width: 100%;
  aspect-ratio: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  text-align: center;
  font-size: 0.6rem;
  font-size: clamp(0.52rem, 3.8cqi, 0.72rem);
  font-variant-numeric: tabular-nums;
  padding: 0;
  border-radius: 6px;
  border-radius: clamp(4px, 1.2cqi, 8px);
  border: 1px solid transparent;
  color: var(--text);
  line-height: 1;
}

.dash-cal__num {
  display: inline-block;
}

.dash-cal__pub {
  position: absolute;
  right: 2px;
  bottom: 2px;
  display: inline-flex;
  align-items: center;
  gap: 2px;
  max-width: calc(100% - 4px);
  pointer-events: none;
}

.dash-cal__avatar {
  width: 12px;
  height: 12px;
  border-radius: 999px;
  object-fit: cover;
  border: 1px solid rgba(255, 255, 255, 0.18);
  background: rgba(255, 255, 255, 0.06);
  box-sizing: border-box;
}

.dash-cal__cell--muted {
  color: var(--text-faint);
  opacity: 0.45;
}

.dash-cal__cell--today {
  border-color: rgba(99, 102, 241, 0.55);
  background: rgba(99, 102, 241, 0.1);
  font-weight: 700;
}

.dash-cal__cell--busy {
  box-shadow: inset 0 -2px 0 #22c55e;
}

.dash-cal__hint {
  margin: 0.45rem 0 0;
  font-size: 0.62rem;
  font-size: clamp(0.58rem, 3cqi, 0.68rem);
  color: var(--text-muted);
  line-height: 1.35;
  hyphens: auto;
  overflow-wrap: anywhere;
}

@container dash-cal (max-width: 260px) {
  .dash-cal__cell--busy {
    box-shadow: inset 0 -1px 0 #22c55e;
  }
}

.dash-campaign {
  width: 100%;
  max-width: 100%;
  min-width: 0;
  box-sizing: border-box;
  padding: 0.65rem 1rem 1rem;
  overflow: hidden;
  container-type: inline-size;
  container-name: dash-campaign;
}

.dash-campaign__lede {
  margin: 0 0 0.55rem;
  font-size: 0.76rem;
  font-size: clamp(0.7rem, 3.4cqi, 0.8rem);
  color: var(--text-muted);
  line-height: 1.4;
  overflow-wrap: anywhere;
  hyphens: auto;
}

.dash-campaign__stats {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.4rem;
  gap: clamp(0.35rem, 2cqi, 0.5rem);
  width: 100%;
}

@container dash-campaign (max-width: 240px) {
  .dash-campaign__stats {
    grid-template-columns: 1fr;
  }
}

.dash-campaign__stats li {
  padding: 0.45rem 0.5rem;
  padding: clamp(0.4rem, 2.2cqi, 0.5rem) clamp(0.4rem, 2.5cqi, 0.55rem);
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: var(--bg-soft);
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 0.12rem;
}

.dash-campaign__stats strong {
  display: block;
  font-size: 0.92rem;
  font-size: clamp(0.82rem, 4.2cqi, 1.05rem);
  font-weight: 700;
  line-height: 1.15;
  word-break: break-word;
  overflow-wrap: anywhere;
}

.dash-campaign__stats span {
  font-size: 0.64rem;
  font-size: clamp(0.58rem, 2.8cqi, 0.68rem);
  color: var(--text-muted);
  line-height: 1.25;
  overflow-wrap: break-word;
}

.dash-campaign__delta {
  margin: 0.55rem 0 0;
  font-size: 0.72rem;
  font-size: clamp(0.66rem, 3.1cqi, 0.78rem);
  color: var(--text-muted);
  line-height: 1.45;
  overflow-wrap: anywhere;
  hyphens: auto;
}

.dash-campaign__delta.is-up strong {
  color: #16a34a;
}

.dash-campaign__delta.is-down strong {
  color: #dc2626;
}

.card--dash-bottom .card__head {
  min-width: 0;
}

.card--dash-bottom .card__head > span:first-child {
  min-width: 0;
  flex: 1 1 auto;
  overflow-wrap: anywhere;
}

.card--dash-bottom .dash-chip {
  max-width: 100%;
  text-align: center;
  white-space: normal;
  overflow-wrap: anywhere;
  line-height: 1.25;
}

@media (min-width: 769px) {
  .card--dash-bottom .card__head {
    flex-wrap: wrap;
    gap: 0.35rem;
  }
}

.dash-balance {
  width: 100%;
  max-width: 100%;
  min-width: 0;
  box-sizing: border-box;
  padding: 0.75rem 1rem 1rem;
  overflow: hidden;
  container-type: inline-size;
  container-name: dash-balance;
}

/* Label + % on first row, bar full width below */
.dash-balance__row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  grid-template-rows: auto auto;
  gap: 0.28rem 0.5rem;
  align-items: start;
  margin-bottom: 0.5rem;
  min-width: 0;
}

@container dash-balance (max-width: 280px) {
  .dash-balance__row {
    grid-template-columns: minmax(0, 1fr);
    grid-template-rows: auto auto auto;
    column-gap: 0;
  }

  .dash-balance__label {
    grid-column: 1;
    grid-row: 1;
  }

  .dash-balance__pct {
    grid-column: 1;
    grid-row: 2;
    justify-self: end;
    width: 100%;
    max-width: 100%;
  }

  .dash-balance__track {
    grid-column: 1;
    grid-row: 3;
  }
}

.dash-balance__label {
  grid-column: 1;
  grid-row: 1;
  font-size: 0.72rem;
  color: var(--text-muted);
  min-width: 0;
  max-width: 100%;
  line-height: 1.3;
  white-space: normal;
  overflow-wrap: anywhere;
  word-break: break-word;
  hyphens: auto;
}

.dash-balance__pct {
  grid-column: 2;
  grid-row: 1;
  font-size: 0.7rem;
  font-weight: 600;
  color: var(--text-muted);
  text-align: right;
  white-space: nowrap;
  justify-self: end;
  flex-shrink: 0;
  min-width: 0;
  max-width: min(100%, 5.5rem);
}

.dash-balance__track {
  grid-column: 1 / -1;
  grid-row: 2;
  height: 8px;
  border-radius: 999px;
  background: var(--bg-soft);
  border: 1px solid var(--border);
  overflow: hidden;
  min-width: 0;
}

.dash-balance__fill {
  display: block;
  height: 100%;
  border-radius: 999px;
  transition: width 0.25s ease;
}

.dash-ticker {
  margin: 1rem 0 0;
  border-radius: var(--radius-md);
  border: 1px solid var(--border);
  background: var(--bg-soft);
  overflow: hidden;
  height: 2.1rem;
  display: flex;
  align-items: center;
}

.dash-ticker__track {
  display: flex;
  gap: 3rem;
  white-space: nowrap;
  padding-left: 1rem;
  animation: dash-ticker 38s linear infinite;
}

.dash-ticker__item {
  font-size: 0.78rem;
  color: var(--text-muted);
}

@keyframes dash-ticker {
  0% {
    transform: translateX(0);
  }
  100% {
    transform: translateX(-50%);
  }
}

@media (prefers-reduced-motion: reduce) {
  .dash-ticker__track {
    animation: none;
  }
}

.dash-help-fab {
  position: fixed;
  right: 1.25rem;
  bottom: 1.25rem;
  z-index: 30;
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.55rem 0.85rem;
  border-radius: 999px;
  font-size: 0.82rem;
  font-weight: 600;
  text-decoration: none;
  color: #fff;
  background: linear-gradient(135deg, #6366f1, #7c3aed);
  box-shadow: 0 10px 28px rgba(99, 102, 241, 0.35);
}

.dash-help-fab:hover {
  filter: brightness(1.06);
  color: #fff;
}

.dashboard-chart__bar.dashboard-chart__line--posts {
  fill: rgba(37, 99, 235, 0.88);
}

.dashboard-chart__bar.dashboard-chart__line--impressions {
  fill: rgba(124, 58, 237, 0.88);
}

.dashboard-chart__bar.dashboard-chart__line--engagement {
  fill: rgba(5, 150, 105, 0.88);
}
