/**
 * SmartSwing AI — Marketing Dashboard CSS
 * Extends white-theme.css — do not import white-theme.css variables here,
 * they are already loaded via <link> before this file.
 */

/* ── LAYOUT: Shell ── */
.mkt-shell {
  display: flex;
  min-height: 100vh;
  background: var(--bg-soft);
}

/* ── SIDEBAR ── */
.mkt-sidebar {
  width: 240px;
  min-width: 240px;
  background: #f5f5f7;
  border-right: 1px solid rgba(0, 0, 0, .08);
  display: flex;
  flex-direction: column;
  position: sticky;
  top: 0;
  height: 100vh;
  overflow-y: auto;
  z-index: 40;
  transition: transform 240ms var(--ease-out);
}

.mkt-sidebar__logo {
  padding: 20px 20px 16px;
  border-bottom: 1px solid rgba(0, 0, 0, .06);
  display: flex;
  align-items: center;
  gap: 10px;
}

.mkt-sidebar__logo-mark {
  width: 32px;
  height: 32px;
  background: var(--black);
  border-radius: 8px;
  display: grid;
  place-items: center;
  font-size: 16px;
  font-weight: 900;
  color: var(--volt);
  font-family: "DM Sans", sans-serif;
  letter-spacing: -.04em;
  flex-shrink: 0;
}

.mkt-sidebar__logo-text {
  font-size: 13px;
  font-weight: 700;
  color: var(--black);
  letter-spacing: -.02em;
  line-height: 1.2;
}

.mkt-sidebar__logo-sub {
  font-size: 11px;
  color: var(--muted);
  font-weight: 400;
}

.mkt-sidebar__nav {
  padding: 12px 10px;
  flex: 1;
}

.mkt-sidebar__section {
  margin-bottom: 8px;
}

.mkt-sidebar__section-label {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--subtle);
  padding: 8px 10px 4px;
}

.mkt-nav-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 10px;
  border-radius: 10px;
  cursor: pointer;
  transition: background var(--dur-fast) var(--ease-smooth),
              color var(--dur-fast) var(--ease-smooth);
  font-size: 13.5px;
  font-weight: 500;
  color: var(--mid);
  border: none;
  background: none;
  width: 100%;
  text-align: left;
  text-decoration: none;
}

.mkt-nav-item:hover {
  background: rgba(0, 0, 0, .05);
  color: var(--black);
}

.mkt-nav-item.is-active {
  background: var(--black);
  color: #fff;
}

.mkt-nav-item.is-active .mkt-nav-item__icon {
  filter: none;
}

.mkt-nav-item__icon {
  font-size: 16px;
  width: 20px;
  text-align: center;
  flex-shrink: 0;
}

.mkt-nav-item__badge {
  margin-left: auto;
  background: var(--volt);
  color: var(--black);
  font-size: 10px;
  font-weight: 800;
  padding: 2px 6px;
  border-radius: 999px;
  line-height: 1.4;
}

.mkt-sidebar__footer {
  padding: 12px 10px;
  border-top: 1px solid rgba(0, 0, 0, .06);
}

.mkt-sidebar__user {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 10px;
  border-radius: 10px;
  cursor: pointer;
}

.mkt-sidebar__user:hover { background: rgba(0, 0, 0, .05); }

.mkt-sidebar__avatar {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--black);
  color: var(--volt);
  display: grid;
  place-items: center;
  font-size: 11px;
  font-weight: 800;
  flex-shrink: 0;
}

.mkt-sidebar__user-name {
  font-size: 12px;
  font-weight: 600;
  color: var(--black);
}

.mkt-sidebar__user-role {
  font-size: 11px;
  color: var(--muted);
}

/* ── MAIN CONTENT ── */
.mkt-main {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
}

.mkt-topbar {
  background: #fff;
  border-bottom: 1px solid var(--border);
  padding: 0 28px;
  height: 60px;
  display: flex;
  align-items: center;
  gap: 16px;
  position: sticky;
  top: 0;
  z-index: 30;
}

.mkt-topbar__title {
  font-size: 16px;
  font-weight: 700;
  color: var(--black);
  letter-spacing: -.03em;
  flex: 1;
}

.mkt-topbar__actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.mkt-content {
  flex: 1;
  padding: 28px;
  max-width: 1200px;
}

/* ── TABS ── */
.mkt-tabs {
  display: none;
}

.mkt-tab-panel {
  display: none;
}

.mkt-tab-panel.is-active {
  display: block;
  animation: mktFadeIn 200ms var(--ease-out);
}

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

/* ── KPI CARDS ── */
.mkt-kpi-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  margin-bottom: 24px;
}

.mkt-kpi-card {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
  position: relative;
  overflow: hidden;
  transition: box-shadow var(--dur-mid) var(--ease-smooth),
              transform var(--dur-mid) var(--ease-smooth);
}

.mkt-kpi-card:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}

.mkt-kpi-card__label {
  font-size: 12px;
  font-weight: 600;
  color: var(--muted);
  letter-spacing: .04em;
  text-transform: uppercase;
  margin-bottom: 8px;
}

.mkt-kpi-card__value {
  font-size: 32px;
  font-weight: 900;
  color: var(--black);
  letter-spacing: -.05em;
  line-height: 1;
  margin-bottom: 6px;
}

.mkt-kpi-card__delta {
  font-size: 12px;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 4px;
}

.mkt-kpi-card__delta--up { color: var(--success); }
.mkt-kpi-card__delta--down { color: var(--error); }

.mkt-kpi-card__icon {
  position: absolute;
  top: 16px;
  right: 16px;
  font-size: 22px;
  opacity: .25;
}

.mkt-kpi-card--volt {
  background: var(--black);
  border-color: var(--black);
}

.mkt-kpi-card--volt .mkt-kpi-card__label,
.mkt-kpi-card--volt .mkt-kpi-card__value,
.mkt-kpi-card--volt .mkt-kpi-card__delta {
  color: #fff;
}

.mkt-kpi-card--volt .mkt-kpi-card__value {
  color: var(--volt);
}

/* ── TWO-COLUMN GRID ── */
.mkt-grid-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  margin-bottom: 24px;
}

.mkt-grid-3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  margin-bottom: 24px;
}

/* ── PANEL CARD ── */
.mkt-panel {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
}

.mkt-panel--full { grid-column: 1 / -1; }

.mkt-panel__header {
  padding: 16px 20px;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.mkt-panel__title {
  font-size: 14px;
  font-weight: 700;
  color: var(--black);
  letter-spacing: -.02em;
}

.mkt-panel__body {
  padding: 20px;
}

.mkt-panel__body--no-pad { padding: 0; }

/* ── NEXT BEST ACTION ── */
.mkt-nba-list {
  list-style: none;
}

.mkt-nba-item {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 14px 20px;
  border-bottom: 1px solid var(--border);
  transition: background var(--dur-fast);
  cursor: pointer;
}

.mkt-nba-item:last-child { border-bottom: none; }
.mkt-nba-item:hover { background: var(--bg-soft); }

.mkt-nba-item__priority {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-size: 11px;
  font-weight: 800;
  flex-shrink: 0;
  margin-top: 1px;
}

.mkt-nba-item__priority--1 { background: #fee2e2; color: #dc2626; }
.mkt-nba-item__priority--2 { background: #fef3c7; color: #d97706; }
.mkt-nba-item__priority--3 { background: #dbeafe; color: #2563eb; }
.mkt-nba-item__priority--4 { background: #f3e8ff; color: #7c3aed; }
.mkt-nba-item__priority--5 { background: #dcfce7; color: #16a34a; }

.mkt-nba-item__text {
  flex: 1;
  font-size: 13.5px;
  color: var(--black);
  line-height: 1.4;
}

.mkt-nba-item__meta {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 4px;
}

.mkt-nba-item__deadline {
  font-size: 11px;
  color: var(--muted);
  font-weight: 600;
}

.mkt-nba-item__run {
  margin-left: auto;
  flex-shrink: 0;
}

/* ── STATUS BADGES ── */
.mkt-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 9px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .02em;
  text-transform: capitalize;
}

.mkt-badge--lead        { background: #f0f9ff; color: #0369a1; }
.mkt-badge--prospect    { background: #fef3c7; color: #b45309; }
.mkt-badge--trial       { background: #f3e8ff; color: #6d28d9; }
.mkt-badge--customer    { background: #dcfce7; color: #15803d; }
.mkt-badge--churned     { background: #fee2e2; color: #b91c1c; }
.mkt-badge--player      { background: #e0f2fe; color: #0369a1; }
.mkt-badge--coach       { background: #fef9c3; color: #854d0e; }
.mkt-badge--club        { background: #f0fdf4; color: #166534; }
.mkt-badge--parent      { background: #fdf4ff; color: #6b21a8; }
.mkt-badge--active      { background: #dcfce7; color: #15803d; }
.mkt-badge--draft       { background: var(--bg-soft); color: var(--muted); }
.mkt-badge--scheduled   { background: #dbeafe; color: #1d4ed8; }
.mkt-badge--published   { background: #dcfce7; color: #15803d; }
.mkt-badge--paused      { background: #fef3c7; color: #b45309; }
.mkt-badge--completed   { background: #e0f2fe; color: #0369a1; }
.mkt-badge--high        { background: #fee2e2; color: #dc2626; }
.mkt-badge--medium      { background: #fef3c7; color: #d97706; }
.mkt-badge--low         { background: #f0fdf4; color: #16a34a; }

/* Platform badges */
.mkt-badge--tiktok      { background: #000; color: #fff; }
.mkt-badge--instagram   { background: linear-gradient(135deg,#f09433,#e6683c,#dc2743,#cc2366,#bc1888); color: #fff; }
.mkt-badge--youtube     { background: #ff0000; color: #fff; }
.mkt-badge--facebook    { background: #1877f2; color: #fff; }
.mkt-badge--blog        { background: #166534; color: #fff; }
.mkt-badge--email       { background: #ea580c; color: #fff; }
.mkt-badge--linkedin    { background: #0a66c2; color: #fff; }

/* ── DATA TABLE ── */
.mkt-table-wrap {
  overflow-x: auto;
}

.mkt-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13.5px;
}

.mkt-table thead tr {
  border-bottom: 2px solid var(--border);
}

.mkt-table th {
  padding: 10px 14px;
  text-align: left;
  font-size: 11px;
  font-weight: 700;
  color: var(--muted);
  letter-spacing: .05em;
  text-transform: uppercase;
  white-space: nowrap;
}

.mkt-table td {
  padding: 12px 14px;
  border-bottom: 1px solid var(--border);
  color: var(--black);
  vertical-align: middle;
}

.mkt-table tbody tr:last-child td {
  border-bottom: none;
}

.mkt-table tbody tr:hover td {
  background: var(--bg-soft);
}

.mkt-table__name {
  font-weight: 600;
  font-size: 13.5px;
}

.mkt-table__sub {
  font-size: 11.5px;
  color: var(--muted);
  margin-top: 1px;
}

.mkt-table__actions {
  display: flex;
  align-items: center;
  gap: 6px;
}

/* ── FILTERS BAR ── */
.mkt-filters {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 16px;
  flex-wrap: wrap;
}

.mkt-filter-select {
  padding: 7px 12px;
  border: 1px solid var(--border);
  border-radius: 8px;
  font-size: 13px;
  font-family: inherit;
  color: var(--black);
  background: #fff;
  cursor: pointer;
  outline: none;
  transition: border-color var(--dur-fast);
}

.mkt-filter-select:focus { border-color: var(--black); }

.mkt-search {
  flex: 1;
  max-width: 280px;
  padding: 7px 12px 7px 32px;
  border: 1px solid var(--border);
  border-radius: 8px;
  font-size: 13px;
  font-family: inherit;
  color: var(--black);
  background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='%2386868b' stroke-width='2.5'%3E%3Ccircle cx='11' cy='11' r='8'/%3E%3Cpath d='m21 21-4.35-4.35'/%3E%3C/svg%3E") no-repeat 10px center;
  outline: none;
  transition: border-color var(--dur-fast);
}

.mkt-search:focus { border-color: var(--black); }

.mkt-filters__spacer { flex: 1; }

/* ── CADENCE CARDS ── */
.mkt-cadence-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px;
}

.mkt-cadence-card {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
}

.mkt-cadence-card__header {
  padding: 18px 20px;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  cursor: pointer;
}

.mkt-cadence-card__header:hover { background: var(--bg-soft); }

.mkt-cadence-card__title {
  font-size: 14px;
  font-weight: 700;
  color: var(--black);
  letter-spacing: -.02em;
}

.mkt-cadence-card__meta {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 5px;
  flex-wrap: wrap;
}

.mkt-cadence-card__stats {
  font-size: 11.5px;
  color: var(--muted);
}

.mkt-cadence-card__chevron {
  font-size: 12px;
  color: var(--muted);
  transition: transform var(--dur-fast);
  flex-shrink: 0;
  margin-top: 2px;
}

.mkt-cadence-card.is-expanded .mkt-cadence-card__chevron {
  transform: rotate(180deg);
}

.mkt-cadence-card__body {
  display: none;
  padding: 0;
}

.mkt-cadence-card.is-expanded .mkt-cadence-card__body {
  display: block;
}

.mkt-cadence-step {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 14px 20px;
  border-bottom: 1px solid var(--border);
  cursor: pointer;
  transition: background var(--dur-fast);
}

.mkt-cadence-step:last-child { border-bottom: none; }
.mkt-cadence-step:hover { background: var(--bg-soft); }

.mkt-cadence-step__num {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: var(--bg-soft);
  border: 1.5px solid var(--border);
  display: grid;
  place-items: center;
  font-size: 11px;
  font-weight: 700;
  color: var(--mid);
  flex-shrink: 0;
}

.mkt-cadence-step--sms .mkt-cadence-step__num {
  background: #f0fdf4;
  border-color: #86efac;
  color: #15803d;
}

.mkt-cadence-step__info { flex: 1; }

.mkt-cadence-step__day {
  font-size: 11px;
  font-weight: 700;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: .04em;
}

.mkt-cadence-step__subject {
  font-size: 13.5px;
  font-weight: 600;
  color: var(--black);
  margin-top: 2px;
}

.mkt-cadence-step__preview {
  font-size: 12px;
  color: var(--muted);
  margin-top: 2px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 340px;
}

.mkt-cadence-card__actions {
  padding: 14px 20px;
  background: var(--bg-soft);
  display: flex;
  align-items: center;
  gap: 8px;
  border-top: 1px solid var(--border);
}

/* ── CONTENT CALENDAR ── */
.mkt-cal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
}

.mkt-cal-nav {
  display: flex;
  align-items: center;
  gap: 8px;
}

.mkt-cal-nav__label {
  font-size: 15px;
  font-weight: 700;
  color: var(--black);
  letter-spacing: -.03em;
  min-width: 160px;
  text-align: center;
}

.mkt-cal-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 1px;
  background: var(--border);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
}

.mkt-cal-day-header {
  background: var(--bg-soft);
  padding: 8px 10px;
  font-size: 11px;
  font-weight: 700;
  color: var(--muted);
  text-align: center;
  letter-spacing: .04em;
  text-transform: uppercase;
}

.mkt-cal-day {
  background: #fff;
  min-height: 90px;
  padding: 6px;
  display: flex;
  flex-direction: column;
  gap: 3px;
  cursor: pointer;
  transition: background var(--dur-fast);
}

.mkt-cal-day:hover { background: #fafafa; }

.mkt-cal-day--today { background: #fefce8; }

.mkt-cal-day__num {
  font-size: 12px;
  font-weight: 700;
  color: var(--mid);
  width: 22px;
  height: 22px;
  display: grid;
  place-items: center;
  border-radius: 50%;
}

.mkt-cal-day--today .mkt-cal-day__num {
  background: var(--black);
  color: #fff;
}

.mkt-cal-item {
  border-radius: 5px;
  padding: 4px 7px;
  font-size: 11px;
  font-weight: 600;
  color: #fff;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  cursor: pointer;
  transition: opacity var(--dur-fast);
}

.mkt-cal-item:hover { opacity: .85; }
.mkt-cal-item-thumb {
  width: 100%; height: 28px; object-fit: cover;
  border-radius: 3px; margin-bottom: 2px; display: block;
}

.mkt-cal-item--tiktok    { background: #000; color: #fff; }
.mkt-cal-item--instagram { background: linear-gradient(45deg, #f09433, #e6683c, #dc2743, #cc2366, #bc1888); color: #fff; }
.mkt-cal-item--youtube   { background: #FF0000; color: #fff; }
.mkt-cal-item--facebook  { background: #1877F2; color: #fff; }
.mkt-cal-item--blog      { background: #10B981; color: #fff; }
.mkt-cal-item--email     { background: #F59E0B; color: #fff; }
.mkt-cal-item--linkedin  { background: #0A66C2; color: #fff; }

/* Status indicator icons on calendar items */
.mkt-cal-item--draft    { opacity: 1; border: 1.5px dashed rgba(255,255,255,.5); }
.mkt-cal-item--draft .mkt-cal-status-icon::before { content: '\270E'; }
.mkt-cal-item--approved { opacity: 1; }
.mkt-cal-item--approved .mkt-cal-status-icon::before { content: '\2713'; }
.mkt-cal-item--approved .mkt-cal-status-icon { color: #22c55e; }
.mkt-cal-item--scheduled { opacity: 1; }
.mkt-cal-item--scheduled .mkt-cal-status-icon::before { content: '\1F551'; font-size: 9px; }
.mkt-cal-item--published { opacity: 1; }
.mkt-cal-item--published .mkt-cal-status-icon { display: inline-block; width: 7px; height: 7px; background: #22c55e; border-radius: 50%; vertical-align: middle; margin-right: 3px; }
.mkt-cal-item--published .mkt-cal-status-icon::before { content: ''; }

.mkt-cal-status-icon {
  font-size: 10px;
  margin-right: 2px;
  vertical-align: middle;
  line-height: 1;
}

/* Calendar item time label */
.mkt-cal-item-time {
  font-size: 9px;
  opacity: .8;
  margin-right: 2px;
}

/* Grayed out days (prev/next month) */
.mkt-cal-day--outside {
  background: #f9fafb;
}
.mkt-cal-day--outside .mkt-cal-day__num {
  color: #d1d5db;
}

/* Platform legend bar */
.mkt-cal-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 16px;
  align-items: center;
}
.mkt-cal-legend__item {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 11px;
  font-weight: 600;
  color: var(--mid);
}
.mkt-cal-legend__dot {
  width: 10px;
  height: 10px;
  border-radius: 3px;
  flex-shrink: 0;
}
.mkt-cal-legend__dot--tiktok    { background: #000; }
.mkt-cal-legend__dot--instagram { background: linear-gradient(45deg, #f09433, #dc2743, #bc1888); }
.mkt-cal-legend__dot--youtube   { background: #FF0000; }
.mkt-cal-legend__dot--facebook  { background: #1877F2; }
.mkt-cal-legend__dot--linkedin  { background: #0A66C2; }
.mkt-cal-legend__dot--blog      { background: #10B981; }
.mkt-cal-legend__dot--email     { background: #F59E0B; }

/* Status legend items */
.mkt-cal-legend__sep {
  width: 1px;
  height: 16px;
  background: var(--border);
  margin: 0 4px;
}
.mkt-cal-legend__status {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 10px;
  color: var(--muted);
}

/* Date/time editing in detail modal */
.cd-datetime-row {
  display: flex;
  gap: 10px;
  margin-bottom: 16px;
}
.cd-datetime-row .mkt-form-group {
  flex: 1;
  margin-bottom: 0;
}
.cd-datetime-row .mkt-label {
  font-size: 11px;
  margin-bottom: 4px;
}
.cd-datetime-row .mkt-input {
  font-size: 12px;
  padding: 6px 8px;
}

/* ── CAMPAIGN CARDS ── */
.mkt-campaign-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px;
}

.mkt-campaign-card {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
  transition: box-shadow var(--dur-mid);
}

.mkt-campaign-card:hover { box-shadow: var(--shadow-md); }

.mkt-campaign-card__top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}

.mkt-campaign-card__name {
  font-size: 15px;
  font-weight: 700;
  color: var(--black);
  letter-spacing: -.03em;
}

.mkt-campaign-card__type {
  font-size: 12px;
  color: var(--muted);
  margin-top: 3px;
  font-weight: 500;
}

.mkt-progress {
  height: 6px;
  background: var(--border);
  border-radius: 999px;
  overflow: hidden;
  margin-bottom: 8px;
}

.mkt-progress__bar {
  height: 100%;
  background: var(--volt-dark);
  border-radius: 999px;
  transition: width 600ms var(--ease-out);
}

.mkt-campaign-card__dates {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 12px;
  color: var(--muted);
}

.mkt-campaign-card__actions {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px solid var(--border);
}

/* ── AI AGENTS ── */
.mkt-agent-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  margin-bottom: 28px;
}

.mkt-agent-card {
  background: #fff;
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
  cursor: pointer;
  transition: border-color var(--dur-fast), box-shadow var(--dur-fast), transform var(--dur-fast);
}

.mkt-agent-card:hover {
  border-color: var(--black);
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}

.mkt-agent-card.is-selected {
  border-color: var(--black);
  background: var(--black);
}

.mkt-agent-card.is-selected .mkt-agent-card__name,
.mkt-agent-card.is-selected .mkt-agent-card__desc {
  color: #fff;
}

.mkt-agent-card__icon {
  font-size: 28px;
  margin-bottom: 10px;
}

.mkt-agent-card__name {
  font-size: 14px;
  font-weight: 700;
  color: var(--black);
  letter-spacing: -.02em;
  margin-bottom: 4px;
}

.mkt-agent-card__desc {
  font-size: 12px;
  color: var(--muted);
  line-height: 1.4;
}

/* Agent chat panel */
.mkt-agent-chat {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  margin-bottom: 24px;
}

.mkt-agent-chat__header {
  padding: 14px 20px;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  gap: 10px;
  background: var(--bg-soft);
}

.mkt-agent-chat__name {
  font-size: 14px;
  font-weight: 700;
  color: var(--black);
}

.mkt-agent-chat__status {
  font-size: 12px;
  color: var(--muted);
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 5px;
}

.mkt-agent-chat__status-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--success);
}

.mkt-agent-chat__status-dot--thinking {
  background: var(--warning);
  animation: pulse 1s ease-in-out infinite;
}

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: .4; }
}

.mkt-agent-chat__input-area {
  padding: 16px 20px;
  border-top: 1px solid var(--border);
  display: flex;
  gap: 10px;
  align-items: flex-end;
}

.mkt-agent-chat__textarea {
  flex: 1;
  padding: 10px 14px;
  border: 1px solid var(--border);
  border-radius: 12px;
  font-size: 13.5px;
  font-family: inherit;
  resize: none;
  min-height: 44px;
  max-height: 160px;
  outline: none;
  transition: border-color var(--dur-fast);
  line-height: 1.5;
}

.mkt-agent-chat__textarea:focus { border-color: var(--black); }

.mkt-agent-response {
  padding: 20px;
  min-height: 80px;
  font-size: 13.5px;
  color: var(--black);
  line-height: 1.7;
  white-space: pre-wrap;
}

.mkt-agent-response:empty::before {
  content: attr(data-placeholder);
  color: var(--muted);
  font-style: italic;
}

.mkt-agent-response__thinking {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--muted);
  font-size: 13px;
}

.mkt-typing-dots {
  display: flex;
  gap: 4px;
}

.mkt-typing-dots span {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--muted);
  animation: typing 1.2s ease-in-out infinite;
}

.mkt-typing-dots span:nth-child(2) { animation-delay: .2s; }
.mkt-typing-dots span:nth-child(3) { animation-delay: .4s; }

@keyframes typing {
  0%, 80%, 100% { transform: scale(1); opacity: .4; }
  40% { transform: scale(1.2); opacity: 1; }
}

/* Agent task history */
.mkt-task-table { margin-top: 0; }

/* ── ANALYTICS ── */
.mkt-gauge-wrap {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 24px 20px;
}

.mkt-gauge {
  width: 140px;
  height: 70px;
  position: relative;
  overflow: hidden;
  margin-bottom: 12px;
}

.mkt-gauge__bg {
  width: 140px;
  height: 140px;
  border-radius: 50%;
  background: conic-gradient(
    var(--border) 0deg,
    var(--border) 180deg,
    transparent 180deg
  );
  position: absolute;
  top: 0;
  left: 0;
}

.mkt-gauge__fill {
  width: 140px;
  height: 140px;
  border-radius: 50%;
  background: conic-gradient(
    var(--volt-dark) 0deg,
    var(--volt-dark) var(--gauge-deg),
    var(--border) var(--gauge-deg),
    var(--border) 180deg,
    transparent 180deg
  );
  position: absolute;
  top: 0;
  left: 0;
  --gauge-deg: 130deg;
}

.mkt-gauge__inner {
  width: 100px;
  height: 100px;
  background: #fff;
  border-radius: 50%;
  position: absolute;
  top: 20px;
  left: 20px;
}

.mkt-gauge__score {
  font-size: 28px;
  font-weight: 900;
  color: var(--black);
  letter-spacing: -.05em;
  text-align: center;
}

.mkt-gauge__label {
  font-size: 12px;
  color: var(--muted);
  text-align: center;
  font-weight: 600;
}

/* Channel performance bars */
.mkt-channel-list {
  list-style: none;
}

.mkt-channel-item {
  margin-bottom: 14px;
}

.mkt-channel-item:last-child { margin-bottom: 0; }

.mkt-channel-item__top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 5px;
}

.mkt-channel-item__name {
  font-size: 13px;
  font-weight: 600;
  color: var(--black);
}

.mkt-channel-item__value {
  font-size: 12px;
  color: var(--muted);
  font-weight: 600;
}

.mkt-bar {
  height: 7px;
  background: var(--border);
  border-radius: 999px;
  overflow: hidden;
}

.mkt-bar__fill {
  height: 100%;
  background: var(--black);
  border-radius: 999px;
  transition: width 800ms var(--ease-out);
}

.mkt-bar__fill--volt { background: var(--volt-dark); }
.mkt-bar__fill--blue { background: #2563eb; }
.mkt-bar__fill--orange { background: #ea580c; }
.mkt-bar__fill--purple { background: #7c3aed; }

/* Brand mentions */
.mkt-mention-list { list-style: none; }

.mkt-mention-item {
  padding: 12px 0;
  border-bottom: 1px solid var(--border);
  display: flex;
  gap: 10px;
  align-items: flex-start;
}

.mkt-mention-item:last-child { border-bottom: none; }

.mkt-mention-item__sentiment {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  margin-top: 5px;
  flex-shrink: 0;
}

.mkt-mention-item__sentiment--positive { background: var(--success); }
.mkt-mention-item__sentiment--neutral  { background: var(--warning); }
.mkt-mention-item__sentiment--negative { background: var(--error); }

.mkt-mention-item__text {
  flex: 1;
  font-size: 13px;
  color: var(--black);
  line-height: 1.5;
}

.mkt-mention-item__source {
  font-size: 11px;
  color: var(--muted);
  margin-top: 3px;
}

/* ── MODALS ── */
.mkt-modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, .5);
  backdrop-filter: blur(4px);
  z-index: 100;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.mkt-modal-overlay.is-open {
  display: flex;
  animation: mktFadeIn 200ms var(--ease-out);
}

.mkt-modal {
  background: #fff;
  border-radius: var(--radius-lg);
  width: 100%;
  max-width: 560px;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: var(--shadow-lg);
  animation: mktSlideUp 240ms var(--ease-out);
}

.mkt-modal--lg { max-width: 720px; }

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

.mkt-modal__header {
  padding: 22px 24px 16px;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.mkt-modal__title {
  font-size: 17px;
  font-weight: 800;
  color: var(--black);
  letter-spacing: -.04em;
}

.mkt-modal__close {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: var(--bg-soft);
  border: none;
  cursor: pointer;
  display: grid;
  place-items: center;
  font-size: 16px;
  color: var(--mid);
  transition: background var(--dur-fast);
}

.mkt-modal__close:hover { background: var(--border); }

.mkt-modal__body {
  padding: 20px 24px;
}

.mkt-modal__footer {
  padding: 16px 24px;
  border-top: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
}

/* ── FORM ELEMENTS ── */
.mkt-form-group {
  margin-bottom: 16px;
}

.mkt-label {
  display: block;
  font-size: 12px;
  font-weight: 700;
  color: var(--mid);
  letter-spacing: .03em;
  text-transform: uppercase;
  margin-bottom: 6px;
}

.mkt-input,
.mkt-select,
.mkt-textarea {
  width: 100%;
  padding: 9px 12px;
  border: 1px solid var(--border);
  border-radius: 10px;
  font-size: 14px;
  font-family: inherit;
  color: var(--black);
  background: #fff;
  outline: none;
  transition: border-color var(--dur-fast), box-shadow var(--dur-fast);
}

.mkt-input:focus,
.mkt-select:focus,
.mkt-textarea:focus {
  border-color: var(--black);
  box-shadow: 0 0 0 3px rgba(0, 0, 0, .06);
}

.mkt-textarea {
  resize: vertical;
  min-height: 80px;
  line-height: 1.5;
}

.mkt-form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

/* ── BUTTONS ── */
.mkt-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 8px 16px;
  border-radius: 10px;
  font-size: 13px;
  font-weight: 700;
  font-family: inherit;
  cursor: pointer;
  border: none;
  transition: background var(--dur-fast), transform var(--dur-fast), box-shadow var(--dur-fast);
  text-decoration: none;
  white-space: nowrap;
}

.mkt-btn:active { transform: scale(.97); }

.mkt-btn--primary {
  background: var(--black);
  color: #fff;
}

.mkt-btn--primary:hover { background: var(--mid); }

.mkt-btn--volt {
  background: var(--volt);
  color: var(--black);
}

.mkt-btn--volt:hover {
  background: var(--volt-dark);
  box-shadow: var(--shadow-volt);
}

.mkt-btn--ghost {
  background: transparent;
  color: var(--black);
  border: 1.5px solid var(--border);
}

.mkt-btn--ghost:hover { background: var(--bg-soft); border-color: var(--mid); }

.mkt-btn--sm {
  padding: 5px 10px;
  font-size: 12px;
  border-radius: 8px;
}

.mkt-btn--icon {
  width: 32px;
  height: 32px;
  padding: 0;
  border-radius: 8px;
  flex-shrink: 0;
}

/* ── ACTIVITY FEED ── */
.mkt-activity-list { list-style: none; }

.mkt-activity-item {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 10px 0;
  border-bottom: 1px solid var(--border);
}

.mkt-activity-item:last-child { border-bottom: none; }

.mkt-activity-item__dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--border);
  margin-top: 5px;
  flex-shrink: 0;
}

.mkt-activity-item__dot--email { background: #ea580c; }
.mkt-activity-item__dot--social { background: #c13584; }
.mkt-activity-item__dot--contact { background: #0369a1; }
.mkt-activity-item__dot--agent { background: var(--volt-dark); }

.mkt-activity-item__text {
  font-size: 13px;
  color: var(--black);
  line-height: 1.4;
  flex: 1;
}

.mkt-activity-item__time {
  font-size: 11px;
  color: var(--muted);
  flex-shrink: 0;
  margin-top: 1px;
}

/* ── EMPTY STATE ── */
.mkt-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 48px 24px;
  text-align: center;
}

.mkt-empty__icon {
  font-size: 40px;
  margin-bottom: 12px;
  opacity: .5;
}

.mkt-empty__title {
  font-size: 15px;
  font-weight: 700;
  color: var(--black);
  margin-bottom: 6px;
}

.mkt-empty__text {
  font-size: 13px;
  color: var(--muted);
  max-width: 280px;
  line-height: 1.5;
}

/* ── TOAST NOTIFICATION ── */
.mkt-toast-wrap {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 200;
  display: flex;
  flex-direction: column;
  gap: 8px;
  pointer-events: none;
}

.mkt-toast {
  background: var(--black);
  color: #fff;
  padding: 12px 18px;
  border-radius: 12px;
  font-size: 13.5px;
  font-weight: 600;
  box-shadow: var(--shadow-md);
  animation: mktToastIn 300ms var(--ease-spring);
  pointer-events: all;
  display: flex;
  align-items: center;
  gap: 10px;
  max-width: 320px;
}

.mkt-toast--success { background: #15803d; }
.mkt-toast--error   { background: #dc2626; }

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

/* ── SIDEBAR MOBILE TOGGLE ── */
.mkt-menu-btn {
  display: none;
  width: 36px;
  height: 36px;
  border-radius: 8px;
  background: var(--bg-soft);
  border: 1px solid var(--border);
  cursor: pointer;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  flex-shrink: 0;
}

/* ── RESPONSIVE ── */
@media (max-width: 1024px) {
  .mkt-kpi-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .mkt-grid-2,
  .mkt-grid-3 {
    grid-template-columns: 1fr;
  }

  .mkt-cadence-grid,
  .mkt-campaign-grid {
    grid-template-columns: 1fr;
  }

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

@media (max-width: 768px) {
  .mkt-sidebar {
    position: fixed;
    top: 0;
    left: 0;
    height: 100vh;
    transform: translateX(-100%);
    z-index: 60;
    box-shadow: var(--shadow-lg);
  }

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

  .mkt-sidebar-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, .4);
    z-index: 55;
  }

  .mkt-sidebar-overlay.is-open { display: block; }

  .mkt-menu-btn { display: flex; }

  .mkt-content { padding: 16px; }

  .mkt-kpi-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
  }

  .mkt-cal-grid {
    grid-template-columns: repeat(7, minmax(90px, 1fr));
    overflow-x: auto;
  }

  .mkt-agent-grid {
    grid-template-columns: 1fr;
  }

  .mkt-topbar { padding: 0 16px; }

  .mkt-form-row {
    grid-template-columns: 1fr;
  }

  .mkt-modal {
    max-width: 100%;
    border-radius: var(--radius);
  }

  /* Bottom tab bar on mobile */
  .mkt-mobile-tabs {
    display: flex;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: #fff;
    border-top: 1px solid var(--border);
    z-index: 50;
    padding: 0 4px env(safe-area-inset-bottom);
  }

  .mkt-main {
    padding-bottom: 60px;
  }
}

@media (min-width: 769px) {
  .mkt-mobile-tabs { display: none; }
}

.mkt-mobile-tab {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 8px 4px;
  gap: 3px;
  font-size: 9px;
  font-weight: 700;
  color: var(--muted);
  cursor: pointer;
  border: none;
  background: none;
  text-transform: uppercase;
  letter-spacing: .03em;
  transition: color var(--dur-fast);
}

.mkt-mobile-tab.is-active {
  color: var(--black);
}

.mkt-mobile-tab__icon { font-size: 18px; }

/* ── PIPELINE VISUALIZATION ── */
.mkt-pipeline { display:flex; flex-direction:column; gap:0; padding:16px; background:var(--surface-2,#f5f5f7); border-radius:12px; border:1px solid var(--border); }
.mkt-pipeline-step { display:flex; align-items:center; gap:12px; padding:8px 0; position:relative; }
.mkt-pipeline-step__connector { width:2px; height:20px; background:var(--border); position:absolute; left:19px; top:-10px; }
.mkt-pipeline-step__dot { width:20px; height:20px; border-radius:50%; background:#e5e7eb; border:2px solid var(--border); flex-shrink:0; transition:all .2s; }
.mkt-pipeline-step[data-status="running"] .mkt-pipeline-step__dot { background:#fbbf24; border-color:#f59e0b; animation:wt-volt-pulse 1s infinite; }
.mkt-pipeline-step[data-status="completed"] .mkt-pipeline-step__dot { background:#39ff14; border-color:#2bcc0f; }
.mkt-pipeline-step__info { display:flex; align-items:center; gap:8px; flex:1; }
.mkt-pipeline-step__icon { font-size:14px; }
.mkt-pipeline-step__agent { font-size:13px; font-weight:700; color:var(--black); text-transform:capitalize; }
.mkt-pipeline-step__role { font-size:12px; color:var(--muted); }
.mkt-pipeline-step__status { margin-left:auto; font-size:12px; color:var(--muted); }

/* ── WORKFLOW STEPS in content detail ── */
.mkt-workflow-step { padding:12px; border-radius:8px; border:1px solid var(--border); margin-bottom:8px; }
.mkt-workflow-step--completed { border-color:#bbf7d0; background:#f0fdf4; }
.mkt-workflow-step__header { display:flex; align-items:center; gap:8px; margin-bottom:6px; }
.mkt-workflow-step__num { width:20px; height:20px; border-radius:50%; background:var(--volt); color:#000; font-size:11px; font-weight:800; display:flex; align-items:center; justify-content:center; }
.mkt-workflow-step__agent { font-size:13px; font-weight:700; text-transform:capitalize; }
.mkt-workflow-step__role { font-size:12px; color:var(--muted); }
.mkt-workflow-step__output { font-size:12px; color:var(--ink-2,#6e6e73); line-height:1.5; padding-top:4px; border-top:1px solid var(--border); margin-top:6px; white-space:pre-wrap; }

/* ── MODAL LG ── */
.mkt-modal--lg { max-width: 700px; }

/* ═══════════════════════════════���═══════════════════════
   CONTENT PREVIEW MODAL
   ═══════════════════════════════════════════════════════ */
.mkt-modal--preview { max-width: 960px; width: 96vw; }

.cd-preview-layout {
  display: grid;
  grid-template-columns: 320px 1fr;
  min-height: 500px;
}
@media (max-width: 768px) {
  .cd-preview-layout { grid-template-columns: 1fr; }
  .cd-preview-phone-col { border-right: none; border-bottom: 1px solid var(--border); }
}

/* ── Phone Column ── */
.cd-preview-phone-col {
  background: #fafafa;
  border-right: 1px solid var(--border);
  padding: 24px 20px;
  display: flex;
  flex-direction: column;
  align-items: center;
}
.cd-phone-frame {
  width: 272px;
  background: #fff;
  border-radius: 32px;
  border: 3px solid #1a1a1a;
  overflow: hidden;
  box-shadow: 0 8px 40px rgba(0,0,0,.12), inset 0 0 0 1px rgba(0,0,0,.06);
  position: relative;
}
.cd-phone-notch {
  width: 100px;
  height: 24px;
  background: #1a1a1a;
  border-radius: 0 0 16px 16px;
  margin: 0 auto;
}
.cd-phone-screen {
  background: #fff;
  min-height: 380px;
}
.cd-phone-header {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 12px 8px;
  border-bottom: 1px solid #efefef;
}
.cd-phone-avatar {
  width: 28px; height: 28px;
  border-radius: 50%;
  background: linear-gradient(135deg, #c8ff00, #7ed321);
  color: #000;
  font-size: 10px; font-weight: 800;
  display: flex; align-items: center; justify-content: center;
}
.cd-phone-username {
  font-size: 12px; font-weight: 700; color: #262626;
}
.cd-phone-img-wrap {
  width: 100%;
  aspect-ratio: 1/1;
  background: #f0f0f0;
  position: relative;
  overflow: hidden;
}
.cd-phone-img {
  width: 100%; height: 100%;
  object-fit: cover;
  display: block;
}
.cd-phone-img-placeholder {
  width: 100%; height: 100%;
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  color: #999; font-size: 12px; gap: 8px;
}
.cd-gen-img-btn {
  background: var(--volt, #c8ff00); color: #000;
  border: none; border-radius: 6px;
  padding: 6px 14px; font-size: 11px; font-weight: 700;
  cursor: pointer; transition: opacity .15s;
}
.cd-gen-img-btn:hover { opacity: .85; }
.cd-phone-engage {
  display: flex; align-items: center; gap: 14px;
  padding: 8px 12px;
}
.cd-phone-engage svg { cursor: pointer; }
.cd-phone-engage svg:hover { opacity: .6; }
.cd-phone-caption {
  padding: 4px 12px 14px;
  font-size: 12px; line-height: 1.5; color: #262626;
  max-height: 80px; overflow-y: auto;
}
.cd-phone-caption-user {
  font-weight: 700; margin-right: 4px;
}
.cd-phone-home-bar {
  width: 100px; height: 4px;
  background: #1a1a1a; border-radius: 2px;
  margin: 6px auto 10px;
}

/* Facebook variation */
.cd-phone-frame--facebook .cd-phone-header { background: #fff; border-bottom: 1px solid #ddd; }
.cd-phone-frame--facebook .cd-phone-engage { border-top: 1px solid #ddd; justify-content: space-around; }
/* LinkedIn variation */
.cd-phone-frame--linkedin .cd-phone-header { background: #fff; }
.cd-phone-frame--linkedin .cd-phone-engage { border-top: 1px solid #e0e0e0; justify-content: space-around; }

/* Platform switcher */
.cd-platform-switcher {
  display: flex; gap: 6px; margin-top: 14px;
}
.cd-plat-btn {
  background: transparent; border: 1.5px solid var(--border);
  border-radius: 8px; padding: 5px 14px;
  font-size: 11px; font-weight: 600; color: var(--muted);
  cursor: pointer; transition: all .15s;
}
.cd-plat-btn:hover { border-color: #aaa; color: var(--black); }
.cd-plat-btn--active {
  background: var(--black, #111); color: #fff;
  border-color: var(--black, #111);
}

/* ── Details Column ── */
.cd-preview-details {
  padding: 20px 24px;
  overflow-y: auto;
  max-height: 640px;
}
.cd-section-label {
  font-size: 11px; font-weight: 700; color: var(--muted);
  text-transform: uppercase; letter-spacing: .08em;
  margin-bottom: 8px;
}
.cd-detail-section { margin-bottom: 16px; }
.cd-copy-box {
  white-space: pre-wrap; font-size: 13px; line-height: 1.7;
  color: var(--black); background: var(--surface-2, #f5f5f7);
  border-radius: 10px; padding: 14px; border: 1px solid var(--border);
}
.cd-copy-box[contenteditable="true"] {
  outline: none; cursor: text;
  border-color: var(--volt, #c8ff00);
  box-shadow: 0 0 0 2px rgba(200,255,0,.2);
}

/* Full-size image in details */
.cd-full-img-wrap {
  position: relative; border-radius: 10px;
  overflow: hidden; border: 1px solid var(--border);
}
.cd-full-img {
  width: 100%; display: block; border-radius: 10px;
}
.cd-img-actions {
  position: absolute; bottom: 8px; right: 8px;
  display: flex; gap: 6px;
}
.cd-img-action-btn {
  background: rgba(0,0,0,.7); color: #fff;
  border: none; border-radius: 6px;
  padding: 5px 12px; font-size: 11px; font-weight: 600;
  cursor: pointer; backdrop-filter: blur(8px);
  transition: background .15s;
}
.cd-img-action-btn:hover { background: rgba(0,0,0,.85); }
.cd-img-action-btn:disabled { opacity:.5; cursor:wait; }

/* Remove image button */
.cd-remove-img-btn {
  position: absolute; top: 8px; right: 8px;
  width: 28px; height: 28px; border-radius: 50%;
  background: rgba(0,0,0,.65); color: #fff;
  border: none; font-size: 14px; font-weight: 700;
  cursor: pointer; display: flex; align-items: center; justify-content: center;
  backdrop-filter: blur(8px); transition: background .15s;
}
.cd-remove-img-btn:hover { background: rgba(220,38,38,.85); }

/* Workflow collapse */
.cd-section-toggle {
  display: flex; align-items: center; justify-content: space-between;
  width: 100%; background: none; border: none; padding: 4px 0;
  cursor: pointer; color: inherit;
}
.cd-toggle-arrow { transition: transform .2s; }
.cd-detail-section--open .cd-toggle-arrow { transform: rotate(180deg); }
.cd-section-collapsible {
  max-height: 0; overflow: hidden; transition: max-height .3s ease;
}
.cd-detail-section--open .cd-section-collapsible {
  max-height: 2000px;
}

/* Action bar */
.cd-preview-actions {
  display: flex; gap: 8px; flex-wrap: wrap;
  padding-top: 12px; border-top: 1px solid var(--border);
}

/* Edit mode indicator */
.cd-edit-indicator {
  display: inline-flex; align-items: center; gap: 4px;
  font-size: 10px; font-weight: 700; color: var(--volt, #c8ff00);
  background: rgba(200,255,0,.1); border-radius: 4px;
  padding: 2px 8px; text-transform: uppercase; letter-spacing: .05em;
}
.cd-save-bar {
  display: none; gap: 8px; padding: 10px 0;
  border-top: 1px solid var(--border); margin-top: 8px;
}
.cd-save-bar.is-visible { display: flex; }

/* ── EXPANDABLE ITEMS ── */
.mkt-kpi-card { cursor:pointer; transition:box-shadow .15s, transform .15s; }
.mkt-kpi-card:hover { box-shadow:0 4px 20px rgba(0,0,0,.12); transform:translateY(-2px); }
.mkt-action-item { border-radius:10px; border:1px solid transparent; transition:border-color .15s, background .15s; }
.mkt-action-item:hover { background:#f9f9fb; border-color:var(--border); }
.mkt-action-item.is-expanded { border-color:var(--volt); background:#f9fff4; }
.mkt-campaign-card { cursor:pointer; }
.mkt-campaign-card.is-expanded { border-color:var(--volt) !important; }

/* ═══════════════════════════════════════════════════════════
   PAID MEDIA HUB — pm-* components
   ═══════════════════════════════════════════════════════════ */

/* Sub-nav pills */
.pm-subnav-btn {
  padding: 7px 18px;
  font-size: 13px;
  font-weight: 700;
  color: var(--muted);
  background: transparent;
  border: none;
  border-radius: 7px;
  cursor: pointer;
  transition: background .15s, color .15s;
  white-space: nowrap;
}
.pm-subnav-btn:hover { background: rgba(0,0,0,.06); color: var(--black); }
.pm-subnav-btn.is-active { background: #fff; color: var(--black); box-shadow: 0 1px 4px rgba(0,0,0,.12); }

/* KPI cards in paid media */
.pm-kpi-card {
  background: var(--bg-alt, #f5f5f5);
  border-radius: 10px;
  padding: 14px 16px;
  text-align: center;
}
.pm-kpi-label {
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: .06em;
  color: var(--muted);
  font-weight: 700;
  margin-bottom: 4px;
}
.pm-kpi-value {
  font-size: 22px;
  font-weight: 800;
  color: var(--black);
  letter-spacing: -.04em;
}
.pm-kpi-delta {
  font-size: 11px;
  color: var(--muted);
  margin-top: 2px;
}
.pm-kpi-delta.up { color: #00a859; }
.pm-kpi-delta.down { color: #e74c3c; }

/* Hook chips (viral templates) */
.pm-hook-chip {
  display: inline-block;
  padding: 6px 12px;
  font-size: 12px;
  color: var(--black);
  background: var(--bg-alt, #f5f5f5);
  border: 1px solid var(--border);
  border-radius: 6px;
  cursor: pointer;
  text-align: left;
  transition: background .15s, border-color .15s, transform .1s;
  font-weight: 500;
  max-width: 320px;
}
.pm-hook-chip:hover {
  background: var(--black);
  color: #fff;
  border-color: var(--black);
  transform: translateY(-1px);
}

/* Keyword chips */
.pm-kw-chip {
  display: inline-block;
  padding: 4px 10px;
  font-size: 12px;
  font-weight: 600;
  color: #1a1a8c;
  background: rgba(66,133,244,.1);
  border-radius: 5px;
}
.pm-kw-chip--comp {
  color: #8b5a00;
  background: rgba(255,160,50,.12);
}
.pm-kw-chip--neg {
  color: #8b0000;
  background: rgba(220,50,50,.08);
  text-decoration: line-through;
  text-decoration-color: #e74c3c;
}

/* RSA chips */
.pm-rsa-chip {
  display: inline-block;
  padding: 4px 10px;
  font-size: 12px;
  font-weight: 600;
  color: var(--black);
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 5px;
  cursor: default;
}
.pm-rsa-desc {
  font-size: 12px;
  color: var(--muted);
  background: var(--bg-alt, #f5f5f5);
  padding: 8px 12px;
  border-radius: 6px;
  line-height: 1.5;
}

/* Checklist */
.pm-checklist {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.pm-check-item {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  font-size: 12px;
  color: var(--muted);
  cursor: pointer;
  padding: 4px 0;
  line-height: 1.4;
}
.pm-check-item input[type="checkbox"] {
  margin-top: 2px;
  flex-shrink: 0;
  accent-color: var(--volt, #c8ff00);
}
.pm-check-item:has(input:checked) {
  color: var(--black);
  text-decoration: line-through;
  text-decoration-color: #00a859;
}

/* mkt-input--sm */
.mkt-input--sm { padding: 5px 10px; font-size: 12px; height: 32px; }

/* Generated copy hook buttons */
.pm-copy-hook-btn {
  padding: 6px 14px;
  font-size: 12px;
  font-weight: 600;
  color: var(--black);
  background: var(--bg-alt, #f5f5f5);
  border: 1px solid var(--border);
  border-radius: 6px;
  cursor: pointer;
  transition: background .15s;
}
.pm-copy-hook-btn:hover { background: var(--black); color: #fff; }


/* ═══════════════════════════════════════════════════════════════
   PREMIUM DARK SIDEBAR v2 — SmartSwing AI
   Nike meets Apple: deep navy + volt-green accent
   ═══════════════════════════════════════════════════════════════ */

/* Override sidebar to dark premium */
.mkt-sidebar {
  background: #06101e;
  border-right: 1px solid rgba(255,255,255,0.06);
}

.mkt-sidebar__logo {
  padding: 18px 16px 16px;
  border-bottom: 1px solid rgba(255,255,255,0.06);
  min-height: 64px;
}

.mkt-sidebar__logo-mark {
  background: rgba(57,255,20,0.12);
  border: 1.5px solid rgba(57,255,20,0.25);
  color: var(--volt);
  width: 36px;
  height: 36px;
  border-radius: 10px;
}

.mkt-sidebar__logo-text {
  color: #fff;
  font-size: 13.5px;
  letter-spacing: -.025em;
}

.mkt-sidebar__logo-sub {
  color: rgba(255,255,255,0.35);
  font-size: 10.5px;
}

.mkt-sidebar__section-label {
  color: rgba(255,255,255,0.28);
  font-size: 9.5px;
  letter-spacing: .1em;
}

/* Nav items in dark sidebar */
.mkt-nav-item {
  color: rgba(255,255,255,0.5);
  padding: 8px 10px;
  font-size: 13px;
  font-weight: 500;
}

.mkt-nav-item:hover {
  background: rgba(255,255,255,0.06);
  color: rgba(255,255,255,0.9);
}

.mkt-nav-item.is-active {
  background: rgba(57,255,20,0.1);
  color: var(--volt);
  border: 1px solid rgba(57,255,20,0.15);
}

.mkt-nav-item__badge {
  background: var(--volt);
  color: #06101e;
}

/* Sidebar footer / user */
.mkt-sidebar__footer {
  border-top: 1px solid rgba(255,255,255,0.06);
}

.mkt-sidebar__user:hover {
  background: rgba(255,255,255,0.06);
}

.mkt-sidebar__avatar {
  background: rgba(57,255,20,0.12);
  border: 1.5px solid rgba(57,255,20,0.2);
  color: var(--volt);
}

.mkt-sidebar__user-name {
  color: rgba(255,255,255,0.85);
}

.mkt-sidebar__user-role {
  color: rgba(255,255,255,0.35);
}

/* SVG icon wrapper in nav */
.mkt-nav-svg {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
  display: block;
}

/* ═══════════════════════════════════════════════════════════════
   AI INSIGHTS PANEL — Dashboard top widget
   ═══════════════════════════════════════════════════════════════ */

.mkt-ai-insights {
  position: relative;
  background: linear-gradient(135deg, #07101f 0%, #0c1929 100%);
  border: 1px solid rgba(57,255,20,0.16);
  border-radius: var(--radius);
  margin-bottom: 24px;
  overflow: hidden;
}

.mkt-ai-insights::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 2px;
  background: linear-gradient(90deg, rgba(57,255,20,0.9) 0%, rgba(57,255,20,0.2) 60%, transparent 100%);
  pointer-events: none;
}

.mkt-ai-insights__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 20px 10px;
  border-bottom: 1px solid rgba(255,255,255,0.05);
}

.mkt-ai-insights__label {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--volt);
}

.mkt-ai-insights__pulse {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--volt);
  box-shadow: 0 0 10px rgba(57,255,20,0.7);
  animation: insightPulse 2.4s ease-in-out infinite;
}

@keyframes insightPulse {
  0%, 100% { opacity: 1; box-shadow: 0 0 10px rgba(57,255,20,0.7); }
  50% { opacity: 0.4; box-shadow: 0 0 4px rgba(57,255,20,0.3); }
}

.mkt-ai-insights__items {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0;
}

.mkt-ai-insight-card {
  padding: 16px 20px 18px;
  border-right: 1px solid rgba(255,255,255,0.05);
  cursor: pointer;
  transition: background 0.18s var(--ease-smooth);
  position: relative;
}

.mkt-ai-insight-card:last-child {
  border-right: none;
}

.mkt-ai-insight-card:hover {
  background: rgba(255,255,255,0.03);
}

.mkt-ai-insight-card__category {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: .09em;
  text-transform: uppercase;
  color: rgba(57,255,20,0.75);
  margin-bottom: 7px;
  display: flex;
  align-items: center;
  gap: 5px;
}

.mkt-ai-insight-card__title {
  font-size: 13px;
  font-weight: 700;
  color: #fff;
  line-height: 1.35;
  letter-spacing: -.02em;
  margin-bottom: 5px;
}

.mkt-ai-insight-card__desc {
  font-size: 11.5px;
  color: rgba(255,255,255,0.45);
  line-height: 1.5;
}

.mkt-ai-insight-card__cta {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  margin-top: 10px;
  font-size: 11.5px;
  font-weight: 600;
  color: var(--volt);
  background: none;
  border: none;
  padding: 0;
  cursor: pointer;
  letter-spacing: .01em;
  text-decoration: none;
}

.mkt-ai-insight-card__cta svg {
  width: 12px;
  height: 12px;
  stroke: currentColor;
}

.mkt-ai-insight-card__loading {
  grid-column: 1 / -1;
  padding: 28px 20px;
  text-align: center;
  color: rgba(255,255,255,0.3);
  font-size: 13px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

/* ═══════════════════════════════════════════════════════════════
   KPI CARD UPGRADES
   ═══════════════════════════════════════════════════════════════ */

/* Color-coded left accent border per metric */
.mkt-kpi-card {
  border-left: 3px solid transparent;
  cursor: pointer;
}

.mkt-kpi-card--contacts { border-left-color: #38bdf8; }
.mkt-kpi-card--campaigns { border-left-color: #a78bfa; }
.mkt-kpi-card--content  { border-left-color: #fb923c; }
.mkt-kpi-card--leads    { border-left-color: #34d399; }

/* KPI icon badge */
.mkt-kpi-icon-badge {
  position: absolute;
  top: 14px;
  right: 14px;
  width: 36px;
  height: 36px;
  border-radius: 10px;
  display: grid;
  place-items: center;
}

.mkt-kpi-icon-badge svg {
  width: 18px;
  height: 18px;
}

.mkt-kpi-icon-badge--blue  { background: rgba(56,189,248,0.12); color: #38bdf8; }
.mkt-kpi-icon-badge--violet { background: rgba(167,139,250,0.12); color: #a78bfa; }
.mkt-kpi-icon-badge--orange { background: rgba(251,146,60,0.12); color: #fb923c; }
.mkt-kpi-icon-badge--volt   { background: rgba(57,255,20,0.12); color: var(--volt); }
.mkt-kpi-icon-badge--green  { background: rgba(52,211,153,0.12); color: #34d399; }

.mkt-kpi-card__sub {
  font-size: 11.5px;
  color: var(--muted);
  margin-top: 2px;
}

/* ═══════════════════════════════════════════════════════════════
   TOPBAR UPGRADE
   ═══════════════════════════════════════════════════════════════ */

.mkt-topbar {
  border-bottom: 1px solid var(--border);
  background: rgba(255,255,255,0.98);
  backdrop-filter: blur(8px);
  box-shadow: none;
}

.mkt-topbar__title {
  font-size: 15px;
  font-weight: 700;
  letter-spacing: -.03em;
}

/* Refresh/action icon button */
.mkt-icon-btn {
  width: 36px;
  height: 36px;
  border-radius: 9px;
  border: 1px solid var(--border);
  background: #fff;
  display: grid;
  place-items: center;
  cursor: pointer;
  color: var(--mid);
  transition: color .15s, border-color .15s, background .15s;
  flex-shrink: 0;
}

.mkt-icon-btn:hover {
  color: var(--black);
  border-color: var(--black);
  background: var(--bg-soft);
}

.mkt-icon-btn svg {
  width: 16px;
  height: 16px;
  stroke: currentColor;
}

/* Mobile hamburger SVG */
.mkt-menu-btn {
  background: none;
  border: none;
  cursor: pointer;
  color: var(--mid);
  display: none;
  padding: 4px;
  border-radius: 8px;
  transition: color .15s;
  line-height: 1;
}

.mkt-menu-btn:hover { color: var(--black); }

/* ═══════════════════════════════════════════════════════════════
   PANEL HEADER ICON SUPPORT
   ═══════════════════════════════════════════════════════════════ */

.mkt-panel__title {
  display: flex;
  align-items: center;
  gap: 8px;
}

.mkt-panel__title-icon {
  width: 28px;
  height: 28px;
  border-radius: 8px;
  display: grid;
  place-items: center;
  flex-shrink: 0;
}

.mkt-panel__title-icon svg {
  width: 15px;
  height: 15px;
  stroke: currentColor;
}

.mkt-panel__title-icon--brain  { background: rgba(139,92,246,0.1); color: #8b5cf6; }
.mkt-panel__title-icon--bolt   { background: rgba(245,158,11,0.1); color: #f59e0b; }
.mkt-panel__title-icon--cal    { background: rgba(14,165,233,0.1); color: #0ea5e9; }

/* Sidebar logo SVG */
.mkt-sidebar__logo-svg {
  width: 36px;
  height: 36px;
  flex-shrink: 0;
}

/* Mobile responsive: show hamburger */
@media (max-width: 768px) {
  .mkt-menu-btn { display: grid; place-items: center; }
}


/* ── VIRAL QUICK-PROMPT BUTTONS ───────────────────────────────── */
.mkt-quick-prompt {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 5px 10px;
  border: 1px solid var(--line, rgba(0,0,0,0.12));
  border-radius: 20px;
  background: #fff;
  color: #374151;
  font-size: 11px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s, color 0.15s;
  white-space: nowrap;
}
.mkt-quick-prompt:hover {
  background: var(--volt, #c8ff00);
  border-color: var(--volt, #c8ff00);
  color: #0a0a0a;
}

/* ── 30-DAY CALENDAR LIST VIEW ───────────────────────────────── */
.mkt-cal-list-view {
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.mkt-cal-list-day {
  display: grid;
  grid-template-columns: 100px 1fr;
  gap: 12px;
  align-items: start;
  padding: 10px 0;
  border-bottom: 1px solid var(--line, rgba(0,0,0,0.06));
}
.mkt-cal-list-day:last-child { border-bottom: none; }
.mkt-cal-list-date {
  font-size: 12px;
  font-weight: 700;
  color: var(--muted);
  padding-top: 3px;
}
.mkt-cal-list-date.is-today {
  color: var(--volt, #c8ff00);
}
.mkt-cal-list-items {
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.mkt-cal-list-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 10px;
  border-radius: 8px;
  background: var(--card-bg, #f8fafc);
  border: 1px solid var(--line, rgba(0,0,0,0.06));
  font-size: 12px;
  cursor: pointer;
  transition: background 0.12s;
}
.mkt-cal-list-item:hover { background: #f0f4ff; }
.mkt-cal-list-item__dot {
  width: 8px; height: 8px;
  border-radius: 50%;
  flex-shrink: 0;
}
.mkt-cal-list-item__title { flex: 1; font-weight: 600; color: var(--ink, #1e293b); }
.mkt-cal-list-item__meta { color: var(--muted); font-size: 11px; white-space: nowrap; }
.mkt-cal-list-empty {
  padding: 20px;
  text-align: center;
  color: var(--muted);
  font-size: 12px;
}

/* ── BULK ENROLL BUTTON ──────────────────────────────────────── */
.mkt-cal-view-toggle {
  display: flex;
  gap: 2px;
  background: var(--card-bg, #f1f5f9);
  border-radius: 8px;
  padding: 3px;
}
.mkt-cal-view-toggle button {
  padding: 4px 10px;
  border: none;
  border-radius: 6px;
  font-size: 11px;
  font-weight: 600;
  cursor: pointer;
  color: var(--muted);
  background: transparent;
  transition: background 0.12s, color 0.12s;
}
.mkt-cal-view-toggle button.is-active {
  background: #fff;
  color: var(--ink, #1e293b);
  box-shadow: 0 1px 3px rgba(0,0,0,0.08);
}
