/* ==========================================================================
   GOOD Growth · светлая тема: слой исправлений
   Собран по живой проверке всех страниц: тёмные плашки, невидимый текст.
   Подключается последним, поэтому перекрывает страничные стили.
   ========================================================================== */

/* ---------- 1. общие токены (на случай страниц без theme.css) ---------- */
html[data-theme="light"] {
  --ink: #191713 !important;
  --fg: #191713 !important;
  --fg-2: #5F5B52 !important;
  --fg-3: #8B867B !important;
  --fg2: #5F5B52 !important;
  --fg3: #8B867B !important;
  --muted: #5F5B52 !important;
  --mut: #5F5B52 !important;
  --faint: #8B867B !important;
  --surface: #FFFDF8 !important;
  --surface-2: #FAF8F3 !important;
  --surface2: #FAF8F3 !important;
  --bg: #F6F4EE !important;
  --bg-2: #EFECE4 !important;
  --line: rgba(25,23,19,.10) !important;
  --line-2: rgba(25,23,19,.16) !important;
  --border: rgba(25,23,19,.12) !important;
  --hair: rgba(25,23,19,.14) !important;
  --amber: #9A5518 !important;
  --amber-ink: #FFFFFF !important;
  --copper: #9A5518 !important;
  --copper-lt: #B86A2E !important;
  --copper-2: #B86A2E !important;

  /* аналитика */
  --an-bg: #F4F1EA !important;
  --an-panel: #FFFDF8 !important;
  --an-panel2: #FAF8F3 !important;
  --an-line: rgba(25,23,19,.10) !important;
  --an-ink: #191713 !important;
  --an-mut: #5F5B52 !important;
  --an-copper: #9A5518 !important;
  --an-copper-lt: #B86A2E !important;
  --an-ok: #2E7D4F !important;
  --an-warn: #8A5A1C !important;
  --an-bad: #B03A22 !important;

  /* кабинет партнёра */
  --pk-bg: #F4F1EA !important;
  --pk-panel: #FFFDF8 !important;
  --pk-panel2: #FAF8F3 !important;
  --pk-line: rgba(25,23,19,.10) !important;
  --pk-ink: #191713 !important;
  --pk-mut: #5F5B52 !important;
  --pk-copper: #9A5518 !important;
  --pk-copper-lt: #B86A2E !important;
  --pk-ok: #2E7D4F !important;
  --pk-warn: #8A5A1C !important;

  /* помощь */
  --hp-line: rgba(25,23,19,.12) !important;
  --hp-ink: #191713 !important;
  --hp-mut: #5F5B52 !important;
  --hp-copper: #9A5518 !important;
  --hp-copper-lt: #B86A2E !important;
}

/* ---------- 2. плашки и поверхности, зашитые тёмными ---------- */
html[data-theme="light"] .an-tile,
html[data-theme="light"] .aa-tile {
  background: linear-gradient(180deg, #FFFDF8, #FAF8F3) !important;
}
html[data-theme="light"] .hp-card { background: #FFFDF8 !important; }
html[data-theme="light"] .pk-canvas {
  background: radial-gradient(120% 80% at 50% 0%, rgba(232,165,79,.10), transparent 60%), #FFFDF8 !important;
}
html[data-theme="light"] .pk-code {
  background: #FAF8F3 !important;
  color: var(--pk-ink) !important;
}
html[data-theme="light"] .pk-bar,
html[data-theme="light"] .fn-bar .track { background: #EFECE4 !important; }
html[data-theme="light"] .pk-toggle { color: var(--pk-ink) !important; }

/* ---------- 3. кнопки и чипы с тёмными цветами ---------- */
html[data-theme="light"] .pacts button,
html[data-theme="light"] .sacts button,
html[data-theme="light"] .mrow button {
  background: rgba(25,23,19,.04) !important;
  color: #191713 !important;
  border-color: rgba(25,23,19,.16) !important;
}
html[data-theme="light"] .pacts button.pub { color: #1B1206 !important; }
html[data-theme="light"] .show-more {
  color: #191713 !important;
  border-color: rgba(25,23,19,.16) !important;
  background: #FFFDF8 !important;
}
html[data-theme="light"] .chip,
html[data-theme="light"] .chip.draft { color: #5F5B52 !important; }
html[data-theme="light"] .chip.approved { color: #2E7D4F !important; border-color: rgba(46,125,79,.35) !important; background: rgba(46,125,79,.08) !important; }
html[data-theme="light"] .chip.published { color: #9A5518 !important; border-color: rgba(154,85,24,.35) !important; background: rgba(154,85,24,.08) !important; }
html[data-theme="light"] .aa-chip { color: #5F5B52 !important; border-color: rgba(25,23,19,.16) !important; }
html[data-theme="light"] .aa-chip.ok { color: #2E7D4F !important; }
html[data-theme="light"] .aa-chip.silent { color: #8A5A1C !important; }
html[data-theme="light"] .mini.memo-btn,
html[data-theme="light"] .memo-flag { color: #9A5518 !important; }
html[data-theme="light"] .journal-more { color: #9A5518 !important; border-color: rgba(154,85,24,.35) !important; }
html[data-theme="light"] .rolechip.rc-pending { color: #8A5A1C !important; }

/* ---------- 4. помощь: подписи и вопросы ---------- */
html[data-theme="light"] label.hp-l,
html[data-theme="light"] .hp-q summary { color: #5F5B52 !important; }
html[data-theme="light"] .hp-say { color: #9A5518 !important; }
html[data-theme="light"] .hp-i,
html[data-theme="light"] .hp-i:focus { background: #FFFDF8 !important; color: #191713 !important; border-color: rgba(25,23,19,.16) !important; }
html[data-theme="light"] .hp-q { border-bottom-color: rgba(25,23,19,.08) !important; }

/* ---------- 5. рейл: имя и почта в аккаунте ---------- */
html[data-theme="light"] .gg-acc-btn { color: #5F5B52 !important; }
html[data-theme="light"] .gg-acc-tx b { color: #191713 !important; }
html[data-theme="light"] .gg-acc-tx em { color: #8B867B !important; }
html[data-theme="light"] .gg-acc-btn:hover { background: rgba(25,23,19,.05) !important; border-color: rgba(25,23,19,.10) !important; }
html[data-theme="light"] .gg-acc-pop { background: #FFFDF8 !important; border-color: rgba(25,23,19,.12) !important; }
html[data-theme="light"] .gg-acc-pop a,
html[data-theme="light"] .gg-acc-pop button { color: #191713 !important; }
html[data-theme="light"] .gg-acc-pop a:hover { background: rgba(25,23,19,.05) !important; }

/* ---------- 6. cookie-плашка ---------- */
html[data-theme="light"] .gg-cookie {
  background: rgba(255,253,248,.98) !important;
  border-color: rgba(154,85,24,.35) !important;
  box-shadow: 0 18px 40px rgba(25,23,19,.18) !important;
}
html[data-theme="light"] .gg-cookie p { color: #191713 !important; }
html[data-theme="light"] .gg-cookie a { color: #9A5518 !important; border-bottom-color: rgba(154,85,24,.45) !important; }
html[data-theme="light"] .gg-cookie button {
  background: rgba(154,85,24,.12) !important;
  border-color: rgba(154,85,24,.5) !important;
  color: #7E400E !important;
}

/* ---------- 7. системная светлая тема (телефон в дневном режиме) ---------- */
@media (prefers-color-scheme: light) {
  html[data-theme-src="system"] .gg-cookie {
    background: rgba(255,253,248,.98) !important;
    border-color: rgba(154,85,24,.35) !important;
  }
  html[data-theme-src="system"] .gg-cookie p { color: #191713 !important; }
  html[data-theme-src="system"] .gg-cookie a { color: #9A5518 !important; }
  html[data-theme-src="system"] .pacts button,
  html[data-theme-src="system"] .sacts button { background: rgba(25,23,19,.04) !important; color: #191713 !important; }
}

/* ---------- 8. аналитика: строки списков и таблиц ---------- */
html[data-theme="light"] .an-card b,
html[data-theme="light"] .an-card .ns-bd { color: #191713 !important; }
html[data-theme="light"] .an-card .ns-t,
html[data-theme="light"] .an-card .st-t,
html[data-theme="light"] .an-card .st-b,
html[data-theme="light"] .an-card .b { color: #5F5B52 !important; }
html[data-theme="light"] .an-card .st-d { color: #8A5A1C !important; }

/* таблица в аналитике аккаунта */
html[data-theme="light"] table.aa-t td { color: #5F5B52 !important; border-bottom-color: rgba(25,23,19,.08) !important; }
html[data-theme="light"] table.aa-t td.n { color: #191713 !important; }
html[data-theme="light"] table.aa-t th { color: #8B867B !important; border-bottom-color: rgba(25,23,19,.12) !important; }

/* каналы: зелёные метки */
html[data-theme="light"] .chan-ic,
html[data-theme="light"] .chan-st { color: #2E7D4F !important; }

/* кабинет партнёра: табы и лестница уровней */
html[data-theme="light"] .pr-tabs a,
html[data-theme="light"] .pr-tabs button { color: #5F5B52 !important; border-color: rgba(25,23,19,.14) !important; }
html[data-theme="light"] .pr-tabs a.is-on,
html[data-theme="light"] .pr-tabs button.is-on { color: #191713 !important; background: #FFFDF8 !important; }
html[data-theme="light"] .ladder .nm { color: #191713 !important; }
html[data-theme="light"] .pk-act { color: #9A5518 !important; }

/* ---------- 9. таблицы аналитики: цифры и названия брендов ---------- */
html[data-theme="light"] .an-card table b,
html[data-theme="light"] .an-card table td,
html[data-theme="light"] .aa-card table b { color: #191713 !important; }
html[data-theme="light"] .an-card table td.n,
html[data-theme="light"] .aa-card table td.n { color: #7E400E !important; }
html[data-theme="light"] .an-card table td .b { color: #8B867B !important; }
html[data-theme="light"] .an-card table a { color: #9A5518 !important; }

/* лестница уровней в кабинете партнёра */
html[data-theme="light"] .ladder .nm,
html[data-theme="light"] .ladder .cond,
html[data-theme="light"] .ladder .rate { color: #5F5B52 !important; }
html[data-theme="light"] .ladder .is-on .nm,
html[data-theme="light"] .ladder .is-on .rate { color: #191713 !important; }

/* ---------- 10. лестница уровней и строка статуса в кабинете партнёра ---------- */
html[data-theme="light"] .pk-strip {
  background: linear-gradient(180deg, #FFFDF8, #FAF8F3) !important;
}
html[data-theme="light"] .pk-ladder,
html[data-theme="light"] .pk-ladder-box {
  background: #FFFDF8 !important;
}
html[data-theme="light"] .pk-ladder-top .t,
html[data-theme="light"] .pk-ladder-top .h { color: #5F5B52 !important; }
html[data-theme="light"] .pk-ladder .nm,
html[data-theme="light"] .pk-ladder .rate,
html[data-theme="light"] .pk-ladder .cond { color: #5F5B52 !important; }
html[data-theme="light"] .pk-ladder .is-on .nm,
html[data-theme="light"] .pk-ladder .is-on .h { color: #191713 !important; }
html[data-theme="light"] .pk-ladder .is-on { background: rgba(232,165,79,.10) !important; }

/* полоса прогресса и «копится» */
html[data-theme="light"] .pk-bar { background: #EFECE4 !important; }
html[data-theme="light"] .pk-cell { border-color: rgba(25,23,19,.10) !important; }
html[data-theme="light"] .pk-lab { color: #8B867B !important; }
html[data-theme="light"] .pk-act { color: #9A5518 !important; }
