/* ===== Остальные страницы кабинета ===== */
.page.narrow { max-width: 900px; margin-left: auto; margin-right: auto; }
.center { text-align: center; }

/* Таблицы и формы */
.link-source { display: inline-flex; align-items: center; gap: 10px; }
.dot.big { width: 14px; height: 14px; }
.underlined { text-decoration: underline; text-decoration-color: var(--border-strong); text-underline-offset: 4px; }
.wrap-cell { white-space: normal; display: inline-block; max-width: 320px; font-size: 14px; }
.grid-2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.code-cell { display: inline-flex; align-items: center; gap: 4px; }
.code-cell code { font-family: var(--font-mono); font-weight: 600; letter-spacing: .06em; background: var(--bg-soft-2); padding: 4px 10px; border-radius: 8px; }
.code-input { font-family: var(--font-mono); font-weight: 600; letter-spacing: .08em; }
.code-row { display: flex; gap: 12px; align-items: flex-end; }
.code-row .field { flex: 1; }
.usage { display: flex; flex-direction: column; gap: 6px; min-width: 130px; }
.table-card.is-loading { opacity: .55; transition: opacity .15s; }
.person { display: flex; align-items: center; gap: 12px; }

.swatches { display: flex; gap: 10px; flex-wrap: wrap; }
.swatch {
  width: 38px; height: 38px; border-radius: 12px; background: var(--sw); color: #fff;
  display: grid; place-items: center; border: 3px solid transparent; transition: transform .12s;
}
.swatch .icon { opacity: 0; stroke-width: 3; }
.swatch[aria-checked="true"] { border-color: var(--bg-elev); box-shadow: 0 0 0 2px var(--sw); }
.swatch[aria-checked="true"] .icon { opacity: 1; }
.swatch:hover { transform: scale(1.08); }

/* Выбор периода */
.daterange-pop { padding: 10px; }
.daterange { display: grid; grid-template-columns: 210px minmax(0, 1fr); gap: 14px; }
.daterange-presets { display: flex; flex-direction: column; gap: 2px; padding-right: 10px; border-right: 1px solid var(--border); }
.daterange-custom { display: flex; flex-direction: column; gap: 12px; padding: 4px 4px 4px 0; justify-content: center; }
@media (max-width: 640px) {
  .daterange { grid-template-columns: minmax(0, 1fr); }
  .daterange-presets { flex-direction: row; flex-wrap: wrap; border-right: 0; border-bottom: 1px solid var(--border); padding: 0 0 10px; }
  .daterange-presets .menu-item { width: auto; padding: 8px 12px; background: var(--bg-soft); }
}

/* Настройки и оценка */
.settings-list { display: flex; flex-direction: column; }
.settings-row { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 12px 0; border-top: 1px solid var(--border); }
.settings-row .faint { font-size: 13.5px; }
.rate-stars { display: flex; flex-direction: column; align-items: center; gap: 10px; padding: 8px 0; }
.rate-label { min-height: 24px; }

/* Промоматериалы */
.section-note { margin-bottom: 16px; }
.mat-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 18px; align-items: start; }
.mat-card { border: 1px solid var(--border); border-radius: 20px; overflow: hidden; background: var(--bg-elev); }
.mat-preview { background: var(--bg-soft); padding: 14px; display: grid; place-items: center; }
.mat-canvas { display: block; width: auto; height: auto; max-width: 100%; max-height: 340px; border-radius: 12px; box-shadow: var(--shadow-md); }
.mat-body { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 14px 18px 16px; }
.text-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(380px, 1fr)); gap: 16px; margin-top: 16px; }
.text-card { display: flex; flex-direction: column; gap: 14px; }
.text-body {
  margin: 0; padding: 16px; flex: 1; background: var(--bg-soft); border-radius: 14px;
  font-family: var(--font); font-size: 15px; line-height: 1.6; white-space: pre-wrap; word-break: break-word;
}
.text-actions { display: flex; gap: 10px; flex-wrap: wrap; }

/* Выводы и субпартнёры */
.balance-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; margin-bottom: 16px; }
.payout-layout { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); gap: 16px; align-items: start; }
.payout-card { display: flex; flex-direction: column; gap: 16px; }
.payout-card .card-head { margin-bottom: 0; }
.method-row { display: flex; align-items: center; gap: 14px; padding: 16px; background: var(--bg-soft); border-radius: 16px; }
.method-ic { width: 52px; height: 52px; border-radius: 16px; background: var(--primary-soft); color: var(--primary); display: grid; place-items: center; flex: none; }
.estimate { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; padding: 0 4px; }
.estimate b { font-size: 28px; letter-spacing: -.02em; }
.payout-foot { font-size: 13.5px; line-height: 1.55; }
.steps { display: flex; flex-direction: column; gap: 18px; }
.steps li { display: flex; gap: 14px; align-items: flex-start; }
.step-n { width: 34px; height: 34px; border-radius: 50%; background: var(--primary-soft); color: var(--primary-soft-text); display: grid; place-items: center; font-weight: 750; flex: none; }
.invite-card { margin-top: 16px; }

/* FAQ, контакты, блог */
.faq-group + .faq-group { margin-top: 28px; }
.faq-cat { font-size: 13px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--text-3); margin-bottom: 12px; }
.faq-help { margin-top: 28px; display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.contact-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 16px; }
.contact-card { display: flex; flex-direction: column; gap: 14px; align-items: flex-start; }
.contact-ic { width: 52px; height: 52px; border-radius: 16px; background: var(--primary-soft); color: var(--primary); display: grid; place-items: center; }
.contact-body h3 { font-size: 19px; margin-bottom: 4px; }
.contact-card .btn { margin-top: auto; }

.news-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 18px; }
.news-card {
  display: flex; flex-direction: column; border: 1px solid var(--border); border-radius: 20px; overflow: hidden;
  background: var(--bg-elev); color: var(--text); transition: transform .18s var(--ease), box-shadow .18s;
}
.news-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-md); text-decoration: none; }
.news-cover, .article-cover {
  display: grid; place-items: center; height: 150px; color: rgba(255, 255, 255, .9);
  background: linear-gradient(135deg, hsl(var(--hue) 70% 42%), hsl(calc(var(--hue) + 44) 78% 58%));
}
.article-cover { height: 220px; border-radius: 24px; }
.news-body { padding: 18px 20px 20px; display: flex; flex-direction: column; gap: 10px; flex: 1; }
.news-body h3 { font-size: 20px; letter-spacing: -.01em; line-height: 1.3; }
.news-body .link-btn { margin-top: auto; }
.article-meta { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.article { display: flex; flex-direction: column; gap: 16px; }
.article-title { font-size: clamp(28px, 4vw, 40px); }
.article p { font-size: 18px; line-height: 1.7; color: var(--text-2); }
.back-link { margin-bottom: 18px; }

@media (max-width: 1100px) {
  .payout-layout { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 760px) {
  .balance-grid { grid-template-columns: minmax(0, 1fr); }
  .grid-2 { grid-template-columns: minmax(0, 1fr); }
  .text-grid { grid-template-columns: minmax(0, 1fr); }
  .code-row { flex-direction: column; align-items: stretch; }
}
