:root {
  --bg: #070b14;
  --bg-2: #0d1324;
  --surface: #121a2b;
  --surface-2: #182237;
  --surface-3: #1f2c45;
  --text: #ecf2ff;
  --muted: #95a3bf;
  --border: #273654;
  --primary: #4f7cff;
  --primary-2: #7a5cff;
  --accent: #32d6ff;
  --success: #20c997;
  --warning: #ffb648;
  --danger: #ff5f8f;
  --radius: 14px;
  --radius-lg: 20px;
  --shadow: 0 24px 48px rgba(4, 8, 18, .42);
  --shadow-soft: 0 10px 24px rgba(4, 8, 18, .26);
  --ease-ui: cubic-bezier(.22, .61, .36, 1);
}

body.theme-light {
  --bg: #f3f6ff;
  --bg-2: #e8eeff;
  --surface: #ffffff;
  --surface-2: #f7f9ff;
  --surface-3: #eef3ff;
  --text: #101a2f;
  --muted: #5f6f8d;
  --border: #dbe5fa;
  --primary: #3f69e8;
  --primary-2: #684ee6;
  --accent: #1698d6;
  --success: #12956d;
  --warning: #b77c14;
  --danger: #d73f6f;
  --shadow: 0 20px 45px rgba(36, 60, 120, .13);
  --shadow-soft: 0 10px 24px rgba(36, 60, 120, .08);
}

* { box-sizing: border-box; }
html, body { width: 100%; overflow-x: hidden; }

body {
  margin: 0;
  font-family: 'Inter', system-ui, -apple-system, Segoe UI, Roboto, sans-serif;
  color: var(--text);
  background:
    radial-gradient(circle at 0% 0%, rgba(122, 92, 255, .19), transparent 30%),
    radial-gradient(circle at 100% 0%, rgba(50, 214, 255, .16), transparent 32%),
    linear-gradient(180deg, var(--bg), var(--bg-2));
}

body::before {
  content: '';
  position: fixed;
  inset: 0;
  pointer-events: none;
  background:
    radial-gradient(circle at 8% 12%, rgba(57,255,20,.06), transparent 26%),
    radial-gradient(circle at 92% 88%, rgba(122,92,255,.10), transparent 30%);
  z-index: -1;
}

.app-layout { min-height: 100vh; }

.sidebar {
  position: fixed;
  inset: 0 auto 0 0;
  width: 292px;
  padding: 22px 16px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  background:
    linear-gradient(180deg, rgba(14, 22, 38, .96), rgba(10, 16, 30, .97));
  border-right: 1px solid rgba(130, 151, 203, .2);
  backdrop-filter: blur(14px);
  box-shadow: 10px 0 32px rgba(3, 8, 18, .38);
  z-index: 20;
}

.brand { display: flex; gap: 12px; align-items: center; }
.brand h1 { margin: 0; font-size: 1.08rem; letter-spacing: .2px; }
.brand p { margin: 4px 0 0; color: var(--muted); font-size: .82rem; }

.brand-logo {
  margin: 0;
  font-size: clamp(1.05rem, 1vw + .85rem, 1.2rem);
  letter-spacing: .35px;
  font-weight: 800;
  line-height: 1;
  display: inline-flex;
  align-items: center;
  gap: 1px;
  position: relative;
  color: var(--text);
  text-shadow: 0 0 14px rgba(143, 170, 235, .16);
  transition: text-shadow .28s var(--ease-ui), transform .28s var(--ease-ui);
}

.brand-logo::after {
  content: '';
  position: absolute;
  left: 0;
  right: 0;
  bottom: -7px;
  height: 2px;
  border-radius: 999px;
  background: linear-gradient(90deg, rgba(117, 144, 245, .0), rgba(117, 144, 245, .48), rgba(57,255,20,.72));
  opacity: .85;
}

.sidebar .brand-logo {
  font-size: clamp(1.35rem, 1vw + 1.1rem, 1.56rem);
  letter-spacing: .45px;
  text-shadow: 0 0 18px rgba(117, 144, 245, .2);
}

.sidebar .brand-logo::after {
  height: 3px;
  bottom: -9px;
  background: linear-gradient(90deg, rgba(117, 144, 245, .1), rgba(117, 144, 245, .88), rgba(57,255,20,.95));
}

.sidebar .logo-x {
  background: linear-gradient(110deg, #39ff14 0%, #2dff73 36%, #22d3ee 72%, #60efff 100%);
  background-size: 200% 100%;
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  -webkit-text-fill-color: transparent;
  text-shadow: 0 0 12px rgba(57, 255, 20, .52), 0 0 24px rgba(34, 211, 238, .4);
  animation: logoNeonFlow 3.2s linear infinite;
}

@keyframes logoNeonFlow {
  0% { background-position: 0% 50%; }
  100% { background-position: 200% 50%; }
}

/* ── Logo SVG gráfica ── */
.affix-x-svg {
  height: 1.22em;
  width: auto;
  overflow: visible;
  vertical-align: -0.16em;
  display: inline-block;
  margin-left: 2px;
  transform-origin: 50% 60%;
  transition: transform .35s cubic-bezier(.34,1.56,.64,1);
  will-change: transform;
}

.affix-x-mark {
  animation: xGlowPulse 2.5s ease-in-out infinite;
  transition: filter .35s ease;
  transform-origin: 50% 60%;
}

@keyframes xGlowPulse {
  0%, 100% {
    filter: drop-shadow(0 0 3px rgba(57,255,20,.5))
            drop-shadow(0 0 9px rgba(57,255,20,.22));
  }
  50% {
    filter: drop-shadow(0 0 6px rgba(57,255,20,.72))
            drop-shadow(0 0 18px rgba(57,255,20,.4))
            drop-shadow(0 0 32px rgba(212,255,0,.18));
  }
}

/* Hover: X escala com efeito spring + glow intenso */
.brand-logo:hover .affix-x-svg,
.brand:hover .affix-x-svg {
  transform: scale(1.18) translateY(-3px);
}

.brand-logo:hover .affix-x-mark,
.brand:hover .affix-x-mark {
  animation: none;
  filter:
    drop-shadow(0 0 2px #fff)
    drop-shadow(0 0 5px #d4ff00)
    drop-shadow(0 0 12px #39ff14)
    drop-shadow(0 0 24px #39ff14)
    drop-shadow(0 0 48px rgba(57,255,20,.55));
}

/* Click: feedback tátil */
.brand-logo:active .affix-x-svg,
.brand:active .affix-x-svg {
  transform: scale(0.92);
  transition: transform .1s ease;
}

.logo-x {
  display: inline-block;
  background: linear-gradient(120deg, #39ff14 0%, #2dff73 34%, #22d3ee 68%, #61efff 100%);
  background-size: 200% 100%;
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  -webkit-text-fill-color: transparent;
  text-shadow: 0 0 10px rgba(57, 255, 20, .5), 0 0 18px rgba(34, 211, 238, .34);
  animation: logoNeonFlow 3.2s linear infinite;
  transition: filter .28s var(--ease-ui), text-shadow .28s var(--ease-ui), transform .28s var(--ease-ui);
}

.brand:hover .brand-logo,
.brand-logo:hover {
  text-shadow: 0 0 18px rgba(143, 170, 235, .28);
}

.brand:hover .logo-x,
.brand-logo:hover .logo-x {
  text-shadow: 0 0 14px rgba(57, 255, 20, .72), 0 0 28px rgba(34, 211, 238, .5);
  filter: brightness(1.07);
  transform: translateY(-.5px);
}

.brand-mark {
  width: 46px;
  height: 46px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  font-weight: 800;
  font-size: .94rem;
  color: #fff;
  background: linear-gradient(135deg, var(--primary), var(--primary-2));
  box-shadow: 0 8px 20px rgba(79, 124, 255, .35);
}

.menu {
  display: grid;
  gap: 8px;
  padding: 8px;
  border: 1px solid rgba(126, 147, 197, .18);
  border-radius: 14px;
  background: linear-gradient(180deg, rgba(16, 26, 44, .7), rgba(11, 19, 33, .62));
}

.menu-item {
  border: 1px solid rgba(126, 147, 197, .14);
  background: rgba(17, 27, 45, .6);
  color: #d8e3fb;
  font: inherit;
  font-weight: 600;
  text-align: left;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 11px 12px;
  border-radius: 11px;
  cursor: pointer;
  position: relative;
  transition: transform .24s var(--ease-ui), background .24s var(--ease-ui), border-color .24s var(--ease-ui), color .24s var(--ease-ui), box-shadow .24s var(--ease-ui);
}

.nav-icon {
  width: 18px;
  height: 18px;
  display: inline-grid;
  place-items: center;
  flex: 0 0 18px;
}

.nav-icon svg {
  width: 18px;
  height: 18px;
  stroke: currentColor;
  fill: none;
  stroke-width: 1.9;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.nav-icon svg [fill="currentColor"] {
  fill: currentColor;
  stroke: none;
}

.menu-item:hover {
  background: linear-gradient(140deg, rgba(67, 98, 170, .28), rgba(57, 83, 145, .22));
  border-color: rgba(146, 173, 238, .42);
  color: #f7fbff;
  transform: translateX(2px);
  box-shadow: 0 10px 20px rgba(79, 124, 255, .14);
}

.menu-item.active {
  background: linear-gradient(130deg, rgba(79, 124, 255, .34), rgba(122, 92, 255, .26));
  border-color: rgba(159, 183, 243, .7);
  color: #fff;
  box-shadow: inset 0 0 0 1px rgba(182, 204, 255, .24), 0 12px 24px rgba(79, 124, 255, .18);
}

.menu-item.active::before {
  content: '';
  position: absolute;
  left: -8px;
  top: 8px;
  bottom: 8px;
  width: 3px;
  border-radius: 999px;
  background: linear-gradient(180deg, #8fb1ff, #39FF14);
  box-shadow: 0 0 10px rgba(57, 255, 20, .35);
}

.sidebar-footer {
  margin-top: auto;
  border-top: 1px solid rgba(130, 151, 203, .18);
  padding: 14px 8px 4px;
  color: #a9bad9;
  font-size: .8rem;
  line-height: 1.45;
}

.content {
  margin-left: 292px;
  padding: 24px;
  min-height: 100vh;
  min-width: 0;
}

.topbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 14px;
  margin-bottom: 18px;
  background: linear-gradient(145deg, rgba(24, 34, 55, .9), rgba(18, 26, 43, .9));
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 18px;
  box-shadow: var(--shadow-soft);
  backdrop-filter: blur(10px);
  position: relative;
  overflow: hidden;
}

.topbar::after {
  content: '';
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(110deg, transparent 0%, rgba(255,255,255,.06) 46%, transparent 78%);
  transform: translateX(-120%);
  animation: topbarSweep 7s linear infinite;
}

.topbar h2 { margin: 0; font-size: 1.35rem; }
.topbar p { margin: 6px 0 0; color: var(--muted); font-size: .92rem; }
.topbar-actions { display: flex; flex-wrap: wrap; gap: 8px; }

.page { display: none; }
.page.active { display: block; animation: fadeIn .28s ease; }

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: translateY(0); }
}

.cards-grid { display: grid; gap: 16px; }
.cards-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.cards-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.cards-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.mt-16 { margin-top: 16px; }

.card {
  background: linear-gradient(170deg, rgba(23, 34, 54, .96), rgba(18, 27, 45, .98));
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 18px;
  box-shadow: var(--shadow-soft);
  transition: transform .28s var(--ease-ui), border-color .28s var(--ease-ui), box-shadow .28s var(--ease-ui);
  position: relative;
  overflow: hidden;
}

.card::before {
  content: '';
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(130deg, rgba(255,255,255,.05), transparent 40%, transparent 60%, rgba(255,255,255,.03));
  opacity: .5;
}

.card:hover {
  transform: translateY(-2px);
  border-color: rgba(151, 176, 232, .4);
  box-shadow: 0 18px 34px rgba(4, 8, 18, .34);
}

.kpi {
  position: relative;
  overflow: hidden;
  background:
    linear-gradient(165deg, rgba(29, 42, 68, .95), rgba(18, 28, 45, .98));
}

.kpi::after {
  content: '';
  position: absolute;
  inset: auto -40px -40px auto;
  width: 120px;
  height: 120px;
  border-radius: 999px;
  background: radial-gradient(circle, rgba(122, 92, 255, .25), transparent 68%);
  pointer-events: none;
}

.kpi p { margin: 0; color: var(--muted); font-size: .85rem; }
.kpi strong { display: block; margin-top: 10px; font-size: 1.62rem; letter-spacing: .2px; }
.kpi strong {
  background: linear-gradient(120deg, #ffffff 8%, #b8ccff 44%, #ffffff 75%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  -webkit-text-fill-color: transparent;
}
.kpi span { display: inline-flex; margin-top: 10px; color: var(--success); font-size: .8rem; font-weight: 600; }

.card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  margin-bottom: 12px;
  flex-wrap: wrap;
}

.card-header h3 { margin: 0; font-size: 1.02rem; }

.inline-actions { display: flex; flex-wrap: wrap; gap: 8px; }

.btn {
  border: 1px solid transparent;
  border-radius: 11px;
  padding: 10px 13px;
  font: inherit;
  font-weight: 600;
  cursor: pointer;
  color: #fff;
  transition: transform .24s var(--ease-ui), box-shadow .24s var(--ease-ui), background .24s var(--ease-ui), border-color .24s var(--ease-ui), filter .24s var(--ease-ui);
  position: relative;
  overflow: hidden;
}

.btn::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(120deg, transparent 20%, rgba(255,255,255,.18) 45%, transparent 70%);
  transform: translateX(-140%);
  transition: transform .55s var(--ease-ui);
  pointer-events: none;
}

.btn:hover { transform: translateY(-2px); }
.btn:hover::before { transform: translateX(140%); }
.btn:active { transform: translateY(0) scale(.98); }
.btn:focus-visible {
  outline: none;
  box-shadow: 0 0 0 3px rgba(115, 145, 214, .25), 0 10px 20px rgba(4, 8, 18, .35);
}
.btn:disabled {
  opacity: .45;
  cursor: not-allowed;
  transform: none;
  box-shadow: none !important;
  filter: grayscale(.1);
}

.btn-icon {
  width: 16px;
  height: 16px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-right: 6px;
  flex: 0 0 16px;
}

.btn-icon svg {
  width: 16px;
  height: 16px;
  stroke: currentColor;
  fill: none;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.btn-primary {
  background: linear-gradient(125deg, #39FF14, #19d70b);
  border-color: rgba(130, 255, 111, .55);
  box-shadow: 0 12px 22px rgba(57, 255, 20, .28);
  color: #06210a;
}

.btn-primary:hover {
  box-shadow: 0 18px 34px rgba(57, 255, 20, .38), 0 0 18px rgba(57, 255, 20, .22);
  filter: brightness(1.04);
  transform: translateY(-2px) scale(1.01);
}

.btn-primary:active {
  box-shadow: 0 8px 16px rgba(57, 255, 20, .24), 0 0 10px rgba(57, 255, 20, .18);
}

.btn-secondary {
  background: linear-gradient(150deg, rgba(35, 49, 79, .95), rgba(27, 40, 65, .95));
  border-color: rgba(130, 151, 203, .31);
  color: #d9e5ff;
}

.btn-secondary:hover {
  background: linear-gradient(150deg, rgba(45, 63, 100, .95), rgba(34, 50, 82, .95));
  border-color: rgba(170, 191, 241, .45);
  box-shadow: 0 14px 26px rgba(79, 124, 255, .18);
}

.btn-link {
  background: transparent;
  color: #9ec4ff;
  border-color: transparent;
  padding: 4px 6px;
  text-decoration: none;
}

.btn-link:hover { color: #c6ddff; }

.btn-affiliate {
  background: linear-gradient(125deg, #39FF14, #17c90b);
  border-color: rgba(130, 255, 111, .58);
  color: #06210a;
  box-shadow: 0 12px 24px rgba(57, 255, 20, .24);
}

.quick-actions { display: grid; gap: 10px; }

.list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 10px;
}

.profile-card-main .profile-readonly-meta {
  margin-top: 12px;
  padding-top: 10px;
  border-top: 1px solid rgba(130, 151, 203, 0.25);
}

.profile-kpi-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.profile-kpi-item {
  border: 1px solid rgba(130, 151, 203, 0.25);
  border-radius: 10px;
  padding: 10px;
  background: rgba(12, 20, 34, 0.45);
}

.profile-kpi-item p {
  margin: 0;
  font-size: 0.8rem;
  color: var(--muted);
}

.profile-kpi-item strong {
  display: block;
  margin-top: 4px;
  color: #f0f6ff;
}

.list li {
  background: linear-gradient(150deg, rgba(26, 39, 63, .94), rgba(22, 33, 53, .94));
  border: 1px solid rgba(117, 140, 192, .25);
  border-radius: 12px;
  padding: 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  transition: transform .24s var(--ease-ui), border-color .24s var(--ease-ui), background .24s var(--ease-ui);
}

.list li:hover {
  transform: translateY(-1px);
  border-color: rgba(150, 176, 233, .4);
  background: linear-gradient(150deg, rgba(33, 48, 75, .95), rgba(24, 37, 60, .95));
}

.opportunity-item { display: grid !important; grid-template-columns: 1fr auto; align-items: stretch !important; }
.opportunity-main { display: grid; gap: 4px; min-width: 0; }
.opportunity-main strong { font-size: .95rem; }
.opportunity-main small { color: var(--muted); font-size: .78rem; }
.opportunity-main p { margin: 2px 0; color: #c9d5ee; font-size: .84rem; }
.opportunity-tags { display: flex; flex-wrap: wrap; gap: 6px; }
.opportunity-actions { display: grid; align-content: center; gap: 8px; min-width: 170px; }

.metas-hub-card {
  display: grid;
  gap: 10px;
}

.metas-hub-kpis {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.metas-tabbar {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.metas-tab-btn {
  min-width: 160px;
}

.metas-tab-btn.active {
  border-color: rgba(57,255,136,.55);
  box-shadow: inset 0 0 0 1px rgba(57,255,136,.2), 0 8px 18px rgba(57,255,136,.14);
  color: #eafff4;
}

.metas-panel {
  display: none;
}

.metas-panel.active {
  display: block;
}

/* Fluxo de tarefas (estilo mapa mental minimalista) */
.daily-missions-list {
  display: grid;
  align-items: stretch;
  gap: 10px;
  overflow-x: visible;
  padding: 2px 2px 8px;
  scrollbar-width: thin;
}

.daily-missions-list .mission-flow-item {
  position: relative;
  min-width: 0;
  max-width: none;
  width: 100%;
  display: grid !important;
  grid-template-columns: 1fr;
  gap: 10px;
  align-items: start !important;
  padding: 12px;
}

.premium-24h-plan {
  display: grid;
  gap: 12px;
}

.premium-24h-head {
  display: grid;
  gap: 8px;
  padding: 12px;
  border: 1px solid rgba(111, 230, 178, .28);
  border-radius: 12px;
  background: linear-gradient(160deg, rgba(17, 44, 38, .36), rgba(13, 31, 29, .28));
}

.premium-24h-head h4 {
  margin: 0;
  font-size: 1rem;
}

.premium-24h-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.premium-24h-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 10px;
}

.premium-24h-block {
  border: 1px solid rgba(130, 152, 204, .24);
  border-radius: 11px;
  background: rgba(16, 25, 40, .6);
  padding: 10px;
  display: grid;
  gap: 6px;
}

.premium-24h-block-top {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  align-items: center;
}

.premium-24h-block-top span {
  font-size: .74rem;
  color: var(--muted);
}

.premium-24h-block h5 {
  margin: 0;
  font-size: .9rem;
}

.premium-24h-block p {
  margin: 0;
  color: #c9d5ee;
  font-size: .82rem;
  line-height: 1.45;
}

.daily-missions-list .mission-flow-item:not(:last-child)::after {
  content: '↓';
  position: absolute;
  right: auto;
  left: 50%;
  top: auto;
  bottom: -14px;
  transform: translateX(-50%);
  color: rgba(171, 191, 232, .85);
  font-weight: 700;
  font-size: 1rem;
}

.mission-flow-main {
  display: grid;
  gap: 6px;
  min-width: 0;
  position: relative;
}

.mission-flow-main::before {
  content: '';
  position: absolute;
  left: 10px;
  top: 38px;
  bottom: 6px;
  width: 2px;
  border-radius: 99px;
  background: linear-gradient(180deg, rgba(111,230,178,.55), rgba(130,151,203,.15));
}

.mission-flow-step-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
}

.mission-step-chip {
  display: inline-flex;
  align-items: center;
  padding: 3px 8px;
  border-radius: 999px;
  font-size: .72rem;
  font-weight: 700;
  border: 1px solid rgba(135, 156, 208, .35);
  background: rgba(44, 61, 95, .65);
  color: #dce8ff;
}

.mission-step-status {
  font-size: .72rem;
  color: var(--muted);
}

.mission-flow-main strong {
  font-size: .98rem;
  color: #edf4ff;
  line-height: 1.45;
}

.mission-flow-main small {
  color: #c9d5ee;
  font-size: .82rem;
  line-height: 1.55;
}

.mission-meta-note {
  padding-left: 24px;
}

.mission-atomic-steps {
  display: grid;
  gap: 6px;
  margin-top: 2px;
  padding-left: 24px;
}

.mission-atomic-step {
  display: grid;
  grid-template-columns: 70px 74px minmax(0, 1fr);
  align-items: center;
  gap: 8px;
  padding: 7px 8px;
  border: 1px solid rgba(130, 151, 203, .26);
  border-radius: 9px;
  background: rgba(16, 25, 40, .6);
  position: relative;
}

.mission-atomic-step::before {
  content: '';
  position: absolute;
  left: -19px;
  top: 50%;
  transform: translateY(-50%);
  width: 9px;
  height: 9px;
  border-radius: 999px;
  border: 2px solid rgba(130,151,203,.55);
  background: rgba(16,25,40,.96);
}

.mission-atomic-index {
  font-size: .68rem;
  font-weight: 700;
  color: #d9e6ff;
  padding: 2px 6px;
  border-radius: 999px;
  border: 1px solid rgba(130, 151, 203, .35);
  background: rgba(44, 61, 95, .56);
}

.mission-atomic-state {
  font-size: .67rem;
  font-weight: 700;
  color: var(--muted);
}

.mission-atomic-text {
  font-size: .75rem;
  color: #d4e0f7;
  line-height: 1.4;
  min-width: 0;
  overflow-wrap: anywhere;
}

.mission-atomic-step.is-now {
  border-color: rgba(111, 230, 178, .45);
  background: rgba(20, 58, 49, .34);
}

.mission-atomic-step.is-now::before {
  border-color: rgba(111,230,178,.8);
  box-shadow: 0 0 0 4px rgba(111,230,178,.18);
}

.mission-atomic-step.is-now .mission-atomic-state {
  color: #9df0d1;
}

.mission-atomic-step.is-done .mission-atomic-state {
  color: #9df0d1;
}

.mission-atomic-step.is-cancelled .mission-atomic-state {
  color: #ffd08a;
}

.mission-flow-actions {
  display: grid;
  grid-template-columns: 1fr;
  gap: 8px;
}

.mission-flow-actions > [data-action="mission-step-done"] {
  width: fit-content;
  justify-self: start;
}

.mission-extra-actions {
  display: grid;
  grid-template-columns: 1fr;
  gap: 7px;
}

.mission-extra-actions[hidden],
[data-mission-options][hidden] {
  display: none !important;
}

.mission-details-toggle,
.mission-options-toggle {
  justify-content: flex-start;
  width: fit-content;
}

.mission-focus-wrap {
  display: grid;
  gap: 12px;
  padding-left: 24px;
}

.mission-focus-current {
  display: grid;
  grid-template-columns: 88px 88px minmax(0, 1fr);
  align-items: start;
  gap: 10px;
  padding: 14px;
  border: 1px solid rgba(111, 230, 178, .45);
  border-radius: 14px;
  background: rgba(20, 58, 49, .36);
  box-shadow: inset 0 0 0 1px rgba(111,230,178,.14);
}

.mission-focus-current.is-resolved {
  grid-template-columns: 1fr;
  border-color: rgba(130,151,203,.3);
  background: rgba(16,25,40,.55);
}

.mission-map-trail {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: minmax(360px, 1fr);
  gap: 18px;
  padding: 6px 4px 10px;
  position: relative;
  overflow-x: auto;
  overflow-y: hidden;
  scrollbar-width: none;
  -ms-overflow-style: none;
  -webkit-overflow-scrolling: touch;
  touch-action: pan-x;
  cursor: grab;
}

.mission-map-trail.is-dragging {
  cursor: grabbing;
  user-select: none;
}

.mission-map-trail::-webkit-scrollbar {
  width: 0;
  height: 0;
  display: none;
}

.mission-map-trail::before {
  content: none;
}

.mission-map-node {
  display: grid;
  grid-template-columns: 1fr;
  align-items: start;
  gap: 12px;
  min-height: 200px;
  padding: 18px;
  border: 1px solid rgba(130,151,203,.26);
  border-radius: 14px;
  background: rgba(16,25,40,.6);
  position: relative;
}

.mission-map-node .mission-atomic-index {
  font-size: .78rem;
  padding: 4px 10px;
}

.mission-map-node .mission-atomic-state {
  font-size: .84rem;
}

.mission-map-node .mission-atomic-text {
  font-size: .95rem;
  line-height: 1.55;
}

.mission-map-node.is-current {
  border-color: rgba(111, 230, 178, .72);
  background: linear-gradient(160deg, rgba(20, 58, 49, .78), rgba(16, 38, 35, .72));
  box-shadow: inset 0 0 0 1px rgba(111,230,178,.32), 0 14px 24px rgba(57,255,20,.14);
}

.mission-map-node.is-current .mission-atomic-state {
  color: #9df0d1;
}

.mission-map-node.is-done {
  border-color: rgba(111,230,178,.38);
}

.mission-map-node.is-done .mission-atomic-state {
  color: #9df0d1;
}

.mission-map-node.is-cancelled {
  border-color: rgba(255, 182, 72, .4);
  background: rgba(45, 34, 20, .62);
}

.mission-map-node.is-cancelled .mission-atomic-state {
  color: #ffd08a;
}

.mission-map-node::before {
  content: '';
  position: absolute;
  left: -10px;
  top: 50%;
  transform: translateY(-50%);
  width: 10px;
  height: 10px;
  border-radius: 99px;
  border: 2px solid rgba(111,230,178,.7);
  background: rgba(16,25,40,.95);
}

.mission-map-node:not(:last-child)::after {
  content: '';
  position: absolute;
  right: -16px;
  top: 50%;
  width: 16px;
  height: 2px;
  transform: translateY(-50%);
  background: linear-gradient(90deg, rgba(111,230,178,.55), rgba(130,151,203,.28));
}

.mission-flow-item.is-next {
  border-color: rgba(111, 230, 178, .55) !important;
  box-shadow: inset 0 0 0 1px rgba(111, 230, 178, .2), 0 8px 18px rgba(57, 255, 20, .12);
}

.mission-flow-item.is-done .mission-step-chip {
  border-color: rgba(111, 230, 178, .5);
  background: rgba(17, 73, 62, .5);
  color: #9df0d1;
}

.mission-flow-item.is-cancelled .mission-step-chip {
  border-color: rgba(255, 182, 72, .45);
  background: rgba(85, 58, 22, .45);
  color: #ffd08a;
}

.urgency-now { border-color: rgba(32, 201, 151, .55) !important; box-shadow: inset 0 0 0 1px rgba(32, 201, 151, .22); }
.urgency-today { border-color: rgba(255, 182, 72, .5) !important; }
.urgency-watch { border-color: rgba(117, 140, 192, .45) !important; }

.filters-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 12px;
}

label {
  display: flex;
  flex-direction: column;
  gap: 8px;
  color: #c9d6f0;
  font-size: .9rem;
}

select, input {
  border: 1px solid rgba(130, 151, 203, .38);
  background: rgba(14, 21, 35, .88);
  color: var(--text);
  border-radius: 11px;
  padding: 10px;
  font: inherit;
}

input::placeholder { color: #7f91b3; }

select:focus, input:focus {
  outline: none;
  border-color: rgba(142, 168, 235, .75);
  box-shadow: 0 0 0 3px rgba(79, 124, 255, .18);
}

.checkbox { flex-direction: row; align-items: center; align-self: end; gap: 8px; padding-bottom: 10px; }

.catalog-sections { display: grid; gap: 16px; }

.catalog-category-section {
  background: linear-gradient(170deg, rgba(22, 34, 55, .94), rgba(17, 27, 44, .98));
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 14px;
  box-shadow: var(--shadow-soft);
}

.catalog-category-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  margin-bottom: 12px;
  flex-wrap: wrap;
}

.catalog-category-header h4 { margin: 0; font-size: 1rem; }

.catalog-category-header span {
  font-size: .76rem;
  font-weight: 700;
  color: #eaf1ff;
  padding: 5px 10px;
  border-radius: 999px;
  background: linear-gradient(120deg, rgba(79, 124, 255, .5), rgba(122, 92, 255, .45));
  border: 1px solid rgba(164, 186, 245, .3);
}

.catalog-offers-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 14px;
}

.offer-card { display: flex; flex-direction: column; gap: 10px; height: 100%; }

.offer-title {
  margin: 0;
  line-height: 1.3;
  overflow: hidden;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  line-clamp: 2;
  word-break: break-word;
}

.offer-card-hotmart {
  border-color: rgba(120, 172, 255, .34);
  background:
    radial-gradient(circle at 88% 0%, rgba(120, 172, 255, .16), transparent 42%),
    linear-gradient(170deg, rgba(23, 34, 56, .96), rgba(16, 24, 42, .98));
}

.offer-media-wrap {
  width: 100%;
  aspect-ratio: 16/10;
  border-radius: 12px;
  border: 1px solid rgba(124, 146, 196, .3);
  overflow: hidden;
  background: #111a2d;
}

.offer-media { width: 100%; height: 100%; object-fit: cover; display: block; }

.offer-top { display: flex; justify-content: space-between; align-items: start; gap: 10px; }
.offer-top h4 { margin: 0; font-size: .96rem; }
.offer-top small { color: var(--muted); font-size: .78rem; }

.offer-description { margin: 2px 0; color: #c9d5ee; font-size: .89rem; line-height: 1.44; }
.offer-actions {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
  gap: 8px;
  width: 100%;
  margin-top: auto;
}

.offer-actions .btn {
  display: flex;
  align-items: center;
  width: 100%;
  justify-content: center;
  text-align: center;
  min-height: 44px;
  padding-inline: 12px;
  white-space: normal;
  line-height: 1.25;
}

.offer-actions .btn:last-child:nth-child(odd) {
  grid-column: 1 / -1;
}

.offer-actions .helper {
  grid-column: 1 / -1;
  margin: 0;
}

@media (max-width: 560px) {
  .offer-actions {
    grid-template-columns: 1fr;
  }
}

.tags { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 2px; }

.tag {
  border-radius: 999px;
  border: 1px solid rgba(133, 155, 205, .34);
  background: rgba(47, 63, 98, .68);
  color: #d7e4ff;
  padding: 4px 9px;
  font-size: .73rem;
  font-weight: 700;
}

.tag.commission {
  border-color: rgba(111, 220, 185, .52);
  background: rgba(17, 73, 62, .45);
  color: #98f0d1;
}

.tag.niche {
  border-color: rgba(149, 170, 228, .45);
  background: rgba(47, 63, 98, .8);
}

.table-wrap {
  overflow: auto;
  border: 1px solid rgba(132, 154, 203, .24);
  border-radius: 12px;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.05);
}

@keyframes topbarSweep {
  0% { transform: translateX(-120%); }
  100% { transform: translateX(120%); }
}

table { width: 100%; border-collapse: collapse; min-width: 760px; }

th, td {
  border-bottom: 1px solid rgba(132, 154, 203, .2);
  text-align: left;
  padding: 11px;
  font-size: .87rem;
}

thead th {
  background: rgba(41, 58, 90, .45);
  color: #b8c9e9;
  font-weight: 600;
}

.payment-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }

.payment-list li {
  border: 1px solid rgba(128, 150, 199, .28);
  border-radius: 12px;
  background: rgba(33, 47, 75, .7);
  padding: 10px 12px;
  display: grid;
  grid-template-columns: 1fr auto auto;
  gap: 8px;
  align-items: center;
}

.pill {
  font-size: .74rem;
  font-weight: 700;
  padding: 4px 8px;
  border-radius: 999px;
}

.pill.ok { background: rgba(32, 201, 151, .19); color: #8ef0cf; }
.pill.pending { background: rgba(255, 182, 72, .2); color: #ffd492; }
.pill.scheduled { background: rgba(79, 124, 255, .2); color: #b7ccff; }

.form-grid { display: grid; gap: 12px; }

.helper { color: var(--muted); margin-top: 10px; font-size: .84rem; }

.auth-page {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 26px;
  position: relative;
}

.auth-page::before {
  content: '';
  position: absolute;
  width: min(620px, 92vw);
  height: min(620px, 92vw);
  border-radius: 999px;
  background: radial-gradient(circle, rgba(57, 255, 20, .1), rgba(57, 255, 20, 0) 65%);
  filter: blur(6px);
  pointer-events: none;
}

.auth-card {
  width: min(460px, 100%);
  padding: 28px;
  border-radius: 20px;
  box-shadow: 0 28px 60px rgba(4, 8, 18, .45), 0 0 0 1px rgba(130, 151, 203, .08) inset;
  backdrop-filter: blur(8px);
  position: relative;
  z-index: 1;
}

.auth-brand {
  display: grid;
  gap: 10px;
  margin-bottom: 18px;
  justify-items: center;
  text-align: center;
}

.auth-brand h1 {
  margin: 0;
}

.auth-brand .brand-logo {
  font-size: clamp(1.35rem, 1vw + 1.1rem, 1.56rem);
  letter-spacing: .45px;
  text-shadow: 0 0 18px rgba(117, 144, 245, .2);
}

.auth-brand .brand-logo::after {
  height: 3px;
  bottom: -9px;
  background: linear-gradient(90deg, rgba(117, 144, 245, .1), rgba(117, 144, 245, .88), rgba(57,255,20,.95));
}

.auth-brand .logo-x {
  text-shadow: 0 0 12px rgba(57, 255, 20, .52), 0 0 24px rgba(34, 211, 238, .4);
}

.auth-brand p {
  margin: 0;
  color: var(--muted);
  font-size: .84rem;
  letter-spacing: .2px;
}

.auth-header {
  margin-bottom: 16px;
}

.auth-header h2 {
  margin: 0;
  font-size: 1.46rem;
  letter-spacing: -.02em;
}

.auth-header .helper {
  margin-top: 8px;
}

.auth-meta {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin: 0 0 14px;
}

.auth-meta span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 10px;
  border-radius: 999px;
  border: 1px solid rgba(130, 151, 203, .28);
  background: rgba(30, 43, 69, .5);
  font-size: .72rem;
  color: #bfd0ee;
}

.auth-card .form-grid {
  gap: 14px;
}

.auth-card label {
  display: grid;
  gap: 7px;
}

.auth-card .label-text {
  font-size: .82rem;
  font-weight: 600;
  color: #d7e4fb;
}

.auth-card input {
  min-height: 46px;
  transition: border-color .2s ease, box-shadow .2s ease, background .2s ease;
}

.auth-card input.is-valid {
  border-color: rgba(50, 214, 130, .62);
  box-shadow: 0 0 0 3px rgba(50, 214, 130, .14);
}

.auth-card input.is-invalid {
  border-color: rgba(255, 95, 143, .62);
  box-shadow: 0 0 0 3px rgba(255, 95, 143, .12);
}

.field-help {
  min-height: 1.05em;
  font-size: .74rem;
  color: #ff9bb0;
  line-height: 1.3;
}

.auth-card input:hover {
  border-color: rgba(154, 178, 234, .55);
}

.auth-card .btn-primary {
  min-height: 46px;
  font-weight: 700;
  letter-spacing: .2px;
}

.auth-card .btn-primary:active {
  transform: translateY(0) scale(.995);
}

.auth-links {
  margin-top: 14px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.auth-links .btn-link {
  border-radius: 8px;
  padding: 6px 8px;
}

.auth-links .btn-link:hover {
  background: rgba(57, 255, 20, .08);
  color: #d7ffcc;
}

.auth-switch {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin: 0 0 14px;
}

.auth-switch-btn {
  min-height: 40px;
  border-radius: 10px;
  border: 1px solid rgba(129, 151, 199, .32);
  background: rgba(30, 43, 69, .62);
  color: #c9d7f1;
  font: inherit;
  font-weight: 600;
  cursor: pointer;
  transition: all .2s ease;
}

.auth-switch-btn:hover {
  border-color: rgba(154, 178, 234, .55);
  color: #eef4ff;
}

.auth-switch-btn.active {
  background: linear-gradient(135deg, rgba(79, 124, 255, .24), rgba(57, 255, 20, .14));
  border-color: rgba(120, 147, 245, .62);
  color: #f4f7ff;
  box-shadow: 0 8px 20px rgba(8, 16, 30, .28);
}

.auth-pane {
  border: 1px solid rgba(130, 151, 203, .2);
  border-radius: 14px;
  padding: 16px;
  background: rgba(13, 21, 36, .58);
  transition: border-color .24s ease, box-shadow .24s ease, transform .24s ease;
}

.auth-pane:focus-within {
  border-color: rgba(141, 167, 235, .54);
  box-shadow: 0 14px 24px rgba(10, 17, 30, .3);
}

.auth-pane .helper {
  margin-bottom: 0;
}

.auth-pane .btn-link {
  padding: 0;
  border: 0;
}

.auth-footer {
  justify-content: center;
  margin-top: 10px;
}

.auth-social-block {
  margin-top: 12px;
}

.auth-divider {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 12px 0 10px;
  color: #a9bad9;
  font-size: .76rem;
  text-transform: uppercase;
  letter-spacing: .08em;
}

.auth-divider::before,
.auth-divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: linear-gradient(90deg, rgba(128, 150, 199, .04), rgba(128, 150, 199, .3), rgba(128, 150, 199, .04));
}

.auth-social-grid {
  display: grid;
  gap: 8px;
}

.btn-social {
  min-height: 42px;
  border-color: rgba(130, 151, 203, .35);
  background: rgba(18, 28, 46, .88);
  color: #e9f1ff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  font-weight: 600;
}

.btn-social:hover {
  border-color: rgba(154, 178, 234, .62);
  background: rgba(28, 41, 66, .9);
  box-shadow: 0 10px 20px rgba(8, 14, 25, .3);
}

.btn-social-google {
  border-color: rgba(173, 193, 255, .56);
  background: linear-gradient(145deg, rgba(28, 41, 66, .95), rgba(19, 29, 47, .95));
}

.social-mark {
  width: 20px;
  height: 20px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: rgba(159, 183, 243, .22);
  color: #f3f7ff;
  font-size: .76rem;
  font-weight: 800;
  line-height: 1;
}

@media (max-width: 560px) {
  .auth-card {
    padding: 22px 16px;
    border-radius: 16px;
  }

  .auth-pane {
    padding: 14px;
  }

  .auth-card .btn-primary {
    width: 100%;
  }
}

.toast {
  position: fixed;
  right: 20px;
  bottom: 20px;
  border-radius: 12px;
  border: 1px solid rgba(161, 182, 232, .36);
  background: linear-gradient(130deg, rgba(22, 33, 54, .98), rgba(18, 28, 46, .98));
  box-shadow: var(--shadow);
  color: #eef4ff;
  padding: 12px 14px;
  opacity: 0;
  transform: translateY(8px);
  pointer-events: none;
  transition: .2s ease;
  z-index: 80;
}

.toast.show { opacity: 1; transform: translateY(0); }

.affiliate-modal {
  position: fixed;
  inset: 0;
  z-index: 50;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 16px;
  background: rgba(6, 10, 18, .72);
  backdrop-filter: blur(4px);
}

.affiliate-modal.show { display: flex; animation: fadeIn .2s ease; }

.affiliate-modal-content {
  width: min(700px, 100%);
  background: linear-gradient(160deg, rgba(24, 35, 56, .98), rgba(17, 26, 43, .98));
  border: 1px solid rgba(136, 158, 208, .3);
  border-radius: 16px;
  box-shadow: var(--shadow);
  padding: 16px;
}

.affiliate-modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  margin-bottom: 8px;
}

.affiliate-modal-header h3 { margin: 0; }
.affiliate-modal-actions { margin-top: 12px; display: flex; flex-wrap: wrap; gap: 8px; }

/* ── Affiliate wizard ─────────────────────────────── */
.aff-modal-scroll { max-height: 90vh; overflow-y: auto; }

.aff-panel { display: none; }

/* Step indicator bar */
.aff-wizard-bar {
  display: flex;
  align-items: center;
  gap: 0;
  margin: 10px 0 18px;
}
.aff-wdot {
  width: 28px; height: 28px;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: .78rem; font-weight: 700;
  background: rgba(79,124,255,.1);
  border: 2px solid rgba(79,124,255,.2);
  color: var(--muted);
  flex-shrink: 0;
  transition: background .2s, border-color .2s, color .2s;
}
.aff-wdot.active {
  background: var(--primary); border-color: var(--primary); color: #fff;
}
.aff-wdot.done {
  background: rgba(50,214,130,.15); border-color: #32d684; color: #32d684;
  font-size: .7rem;
}
.aff-wline {
  flex: 1; height: 2px; min-width: 16px;
  background: rgba(79,124,255,.18);
  transition: background .2s;
}
.aff-wline.active { background: var(--primary); }

/* Ready / success banner */
.aff-ready-banner {
  display: flex; align-items: center; gap: 14px;
  padding: 12px 16px;
  background: rgba(50,214,130,.07);
  border: 1px solid rgba(50,214,130,.22);
  border-radius: 10px;
  margin: 10px 0 4px;
}
.aff-ready-icon {
  width: 42px; height: 42px; flex-shrink: 0;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.3rem;
  background: rgba(50,214,130,.12);
}
.aff-ready-banner strong { font-size: 1rem; }

/* Value grid */
.aff-value-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 9px;
  margin-top: 14px;
}
.aff-vblock {
  background: rgba(79,124,255,.06);
  border: 1px solid rgba(79,124,255,.13);
  border-radius: 8px;
  padding: 11px 13px;
}
.aff-vblock h5 { margin: 0 0 5px; font-size: .82rem; color: var(--primary); font-weight: 600; }
.aff-vblock p, .aff-vblock ul { margin: 0; font-size: .8rem; color: var(--muted); line-height: 1.5; }
.aff-vblock ul { padding-left: 15px; }
.aff-vblock li { margin-bottom: 3px; }

@media (max-width: 560px) { .aff-value-grid { grid-template-columns: 1fr; } }

/* Catalog card seals */
.aff-seal {
  display: inline-flex; align-items: center;
  font-size: .7rem; font-weight: 700;
  padding: 3px 9px;
  border-radius: 20px;
  white-space: nowrap;
  flex-shrink: 0;
  align-self: flex-start;
  letter-spacing: .02em;
}
.aff-seal.ok   { background: rgba(50,214,130,.14); color: #32d684; border: 1px solid rgba(50,214,130,.3); }
.aff-seal.pending { background: rgba(255,182,72,.11); color: #ffc15e; border: 1px solid rgba(255,182,72,.24); }

.aff-product-name-box {
  display: flex;
  align-items: baseline;
  gap: 8px;
  padding: 9px 13px;
  background: rgba(79,124,255,.07);
  border: 1px solid rgba(79,124,255,.18);
  border-radius: 8px;
}
.aff-product-name-label {
  font-size: .72rem;
  font-weight: 700;
  color: var(--primary);
  text-transform: uppercase;
  letter-spacing: .04em;
  white-space: nowrap;
  flex-shrink: 0;
}
.aff-product-name-value {
  font-size: .88rem;
  font-weight: 600;
  color: var(--text);
  line-height: 1.4;
}

.btn-outline {
  background: transparent;
  border: 1px solid rgba(79,124,255,.4);
  color: var(--primary);
  padding: 7px 14px;
  border-radius: 8px;
  font-size: .85rem;
  cursor: pointer;
  transition: background .15s, border-color .15s;
}
.btn-outline:hover { background: rgba(79,124,255,.08); border-color: var(--primary); }

.aff-search-hint {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 10px 13px;
  background: rgba(255,182,72,.07);
  border: 1px solid rgba(255,182,72,.2);
  border-radius: 8px;
  font-size: .82rem;
  color: var(--muted);
  line-height: 1.5;
  margin-bottom: 2px;
}
.aff-search-hint-icon { font-size: 1.1rem; flex-shrink: 0; margin-top: 1px; }

.aff-help-details {
  margin-top: 14px;
  border: 1px solid rgba(79,124,255,.15);
  border-radius: 8px;
  overflow: hidden;
}
.aff-help-summary {
  padding: 9px 13px;
  font-size: .81rem;
  color: var(--primary);
  cursor: pointer;
  user-select: none;
  list-style: none;
  display: flex;
  align-items: center;
  gap: 6px;
}
.aff-help-summary::-webkit-details-marker { display: none; }
.aff-help-summary::before { content: '▸'; font-size: .7rem; transition: transform .2s; }
.aff-help-details[open] .aff-help-summary::before { transform: rotate(90deg); }
.aff-help-body {
  padding: 0 14px 13px;
  border-top: 1px solid rgba(79,124,255,.1);
}
.aff-help-body ol {
  margin: 11px 0 10px;
  padding-left: 18px;
  font-size: .8rem;
  color: var(--muted);
  line-height: 1.6;
}
.aff-help-body li { margin-bottom: 4px; }
.aff-help-warn {
  font-size: .79rem;
  color: #ffc15e;
  background: rgba(255,182,72,.07);
  border: 1px solid rgba(255,182,72,.18);
  border-radius: 6px;
  padding: 8px 11px;
  margin: 0;
  line-height: 1.5;
}

.ai-chat-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(5, 9, 17, .6);
  opacity: 0;
  pointer-events: none;
  transition: opacity .2s ease;
  z-index: 48;
}

.ai-chat-backdrop.show { opacity: 1; pointer-events: auto; }

.copilot-sidebar {
  position: fixed;
  top: 0;
  right: 0;
  width: min(460px, 100vw);
  height: 100vh;
  display: grid;
  grid-template-rows: auto 1fr;
  background: linear-gradient(170deg, rgba(16, 24, 39, .98), rgba(11, 18, 30, .98));
  border-left: 1px solid rgba(130, 152, 204, .35);
  box-shadow: -24px 0 40px rgba(4, 8, 18, .52);
  transform: translateX(106%);
  transition: transform .24s ease;
  z-index: 49;
}

.copilot-sidebar.open { transform: translateX(0); }

.copilot-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 8px;
  padding: 14px;
  border-bottom: 1px solid rgba(130, 152, 204, .24);
}

.copilot-header h3 { margin: 0; font-size: 1.06rem; }
.copilot-header p { margin: 4px 0 0; color: var(--muted); font-size: .8rem; }

.copilot-body {
  display: grid;
  gap: 10px;
  padding: 12px;
  overflow-y: auto;
}

.copilot-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.copilot-progress {
  font-size: .8rem;
  color: #b9caea;
  font-weight: 700;
}

.copilot-current-step {
  border: 1px solid rgba(130, 152, 204, .28);
  border-radius: 12px;
  background: rgba(17, 28, 47, .7);
  padding: 12px;
}

.copilot-current-step h4 { margin: 0 0 6px; font-size: .96rem; }
.copilot-current-step p { margin: 0; color: #d6e3fb; line-height: 1.5; font-size: .86rem; }

.copilot-controls {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.copilot-controls .btn:last-child {
  grid-column: 1 / -1;
}

.copilot-voice-settings {
  border: 1px solid rgba(130, 152, 204, .24);
  border-radius: 10px;
  background: rgba(13, 22, 36, .55);
  padding: 10px;
}

.copilot-voice-settings summary {
  cursor: pointer;
  color: #bcd0f5;
  font-size: .82rem;
  font-weight: 600;
}

.copilot-voice-grid {
  margin-top: 8px;
  display: grid;
  gap: 8px;
}

.copilot-steps-list {
  margin-top: 2px;
}

.copilot-step-item.is-current {
  border-color: rgba(111, 230, 178, .52) !important;
  box-shadow: inset 0 0 0 1px rgba(111, 230, 178, .2);
}

.copilot-step-item strong {
  font-size: .83rem;
}

.copilot-step-item p {
  margin: 4px 0 0;
  color: #c9d8f3;
  font-size: .8rem;
  line-height: 1.45;
}

@media (max-width: 760px) {
  .copilot-sidebar {
    width: 100vw;
  }

  .copilot-controls {
    grid-template-columns: 1fr;
  }

  .copilot-controls .btn:last-child {
    grid-column: auto;
  }
}

.ai-chat-sidebar {
  position: fixed;
  top: 0;
  right: 0;
  width: min(430px, 100vw);
  height: 100vh;
  display: grid;
  grid-template-rows: auto 1fr auto;
  gap: 10px;
  padding: 14px;
  background: linear-gradient(170deg, rgba(18, 27, 45, .98), rgba(13, 20, 34, .98));
  border-left: 1px solid rgba(130, 152, 204, .35);
  box-shadow: -24px 0 40px rgba(4, 8, 18, .52);
  transform: translateX(106%);
  transition: transform .24s ease;
  z-index: 49;
}

.ai-chat-sidebar.open { transform: translateX(0); }

.ai-chat-sidebar-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 8px;
  padding: 8px 8px 10px;
  border-bottom: 1px solid rgba(130, 152, 204, .24);
}

.ai-chat-sidebar-header h3 { margin: 0; font-size: 1.03rem; }
.ai-chat-sidebar-header p { margin: 4px 0 0; color: var(--muted); font-size: .78rem; }

.ai-chat-messages {
  border: 1px solid rgba(130, 152, 204, .27);
  background:
    radial-gradient(circle at 12% 0%, rgba(122, 92, 255, .2), transparent 34%),
    rgba(10, 16, 28, .9);
  border-radius: 14px;
  padding: 12px;
  overflow-y: auto;
  display: grid;
  gap: 10px;
  align-content: start;
  -ms-overflow-style: none;
  scrollbar-width: none;
}

.ai-chat-empty-state {
  min-height: 100%;
  display: grid;
  align-content: center;
  justify-items: center;
  text-align: center;
  gap: 10px;
  padding: 28px 18px;
}

.ai-chat-empty-state h4 {
  margin: 0;
  font-size: 1.38rem;
  line-height: 1.25;
  color: #f2f7ff;
}

.ai-chat-empty-state p {
  margin: 0;
  max-width: 34ch;
  color: var(--muted);
  font-size: .95rem;
  line-height: 1.55;
}

.ai-chat-messages::-webkit-scrollbar { width: 0; height: 0; }

.ai-chat-row { display: flex; align-items: flex-start; }
.ai-chat-row.user { justify-content: flex-end; }
.ai-chat-row.assistant { justify-content: flex-start; }

.ai-chat-bubble {
  max-width: 86%;
  border-radius: 16px;
  padding: 10px 12px;
  white-space: pre-wrap;
  line-height: 1.45;
  font-size: .86rem;
  box-shadow: var(--shadow-soft);
}

.ai-chat-bubble.assistant {
  background: linear-gradient(145deg, rgba(42, 57, 90, .86), rgba(34, 48, 79, .86));
  border: 1px solid rgba(131, 153, 205, .35);
  border-top-left-radius: 8px;
}

.ai-chat-bubble.user {
  background: linear-gradient(140deg, var(--primary), var(--primary-2));
  border: 1px solid rgba(174, 194, 247, .28);
  color: #f7faff;
  border-top-right-radius: 8px;
}

.ai-chat-form {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 8px;
  border: 1px solid rgba(130, 152, 204, .3);
  background: rgba(15, 22, 37, .92);
  border-radius: 14px;
  padding: 8px;
}

.ai-chat-form input {
  border: 0;
  background: transparent;
  box-shadow: none;
}

.ai-chat-form input:focus {
  border: 0;
  box-shadow: none;
}

.ai-chat-typing-wrap { display: inline-flex; align-items: center; gap: 8px; }
.ai-chat-typing-label { color: #c8d7f3; font-size: .82rem; }
.ai-chat-typing-dots { display: inline-flex; gap: 4px; }

.ai-chat-typing-dots i {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #b8cbff;
  opacity: .4;
  animation: aiTyping 1.2s infinite ease-in-out;
}

.ai-chat-typing-dots i:nth-child(2) { animation-delay: .15s; }
.ai-chat-typing-dots i:nth-child(3) { animation-delay: .3s; }

@keyframes aiTyping {
  0%, 80%, 100% { transform: translateY(0); opacity: .35; }
  40% { transform: translateY(-3px); opacity: 1; }
}

@media (max-width: 1320px) {
  .cards-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .cards-3 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .filters-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 1024px) {
  .sidebar {
    position: sticky;
    width: 100%;
    border-right: 0;
    border-bottom: 1px solid rgba(130, 151, 203, .24);
    box-shadow: 0 10px 24px rgba(3, 8, 18, .28);
  }

  .menu {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 7px;
  }

  .menu-item {
    text-align: center;
    justify-content: center;
    padding: 10px 8px;
    font-size: .85rem;
  }

  .menu-item.active::before { display: none; }

  .content {
    margin-left: 0;
    padding-top: 14px;
  }
}

@media (max-width: 760px) {
  .content { padding: 14px; }
  .topbar { flex-direction: column; align-items: flex-start; padding: 14px; }
  .cards-2, .cards-3, .cards-4 { grid-template-columns: 1fr; }
  .filters-grid { grid-template-columns: 1fr; }
  .menu { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .checkbox { align-self: flex-start; padding-bottom: 0; }
  .opportunity-item { grid-template-columns: 1fr !important; }
  .opportunity-actions { min-width: 0; }

  .daily-missions-list {
    display: grid;
    gap: 10px;
    overflow-x: visible;
    padding-bottom: 0;
  }

  .daily-missions-list .mission-flow-item {
    min-width: 0;
    max-width: none;
  }

  .daily-missions-list .mission-flow-item:not(:last-child)::after {
    content: '↓';
    right: auto;
    left: 50%;
    top: auto;
    bottom: -14px;
    transform: translateX(-50%);
  }
}