/* ==========================================================================
   TheCBD.ru — Партнёрский кабинет (/personal/partners/) 1-в-1 по Figma
   Экраны: 7618:14728 (Инструменты + Баннер), 7682:8436 (Рефералы),
           7683:9612 (Детализация), 7618:16654 (Реквизиты),
           7618:17192 (Вывод средств), 7618:17700 (Правила),
           7618:19420 (Инструкции)
   ========================================================================== */

.cbd-lk-page--partner {
  padding-top: 28px;
}

.cbd-lk-page--partner .cbd-lk-topbar {
  grid-template-columns: 305px minmax(0, 1fr);
  gap: 20px;
}

.cbd-lk-page--partner .cbd-lk-layout {
  grid-template-columns: 305px minmax(0, 1fr);
  gap: 20px;
}

/* 1. Full-bleed бирюзовый дашборд-баннер (Figma 7618:15772) */
.cbd-pbanner {
  width: 100%;
  background: linear-gradient(96deg, #7bc6d2 0%, #44aebf 48%, #1d8a9c 100%);
  padding: 24px 0;
  margin-bottom: 28px;
  color: #ffffff;
}

.cbd-pbanner__grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 232px 158px 346px;
  gap: 14px;
  align-items: stretch;
}

.cbd-pbanner__info {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding-right: 12px;
  font-size: 12.5px;
  line-height: 1.48;
  color: rgba(255, 255, 255, 0.96);
}

.cbd-pbanner__info-icon {
  width: 24px;
  height: 24px;
  flex-shrink: 0;
  margin-top: 2px;
}

.cbd-pbanner__info-text {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.cbd-pbanner__info-text p {
  margin: 0;
}

.cbd-pbanner__card {
  background: #ffffff;
  color: #202c25;
  border-radius: 14px;
  padding: 14px 16px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 8px;
  box-shadow: 0 4px 18px rgba(13, 87, 99, 0.12);
}

.cbd-pbanner__card--mint {
  background: #ebf9e7;
}

.cbd-pbanner__card--pink {
  background: #fff2f0;
}

.cbd-pbanner__card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.cbd-pbanner__label {
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #6b7280;
}

.cbd-pbanner__val-row {
  display: flex;
  align-items: center;
  gap: 10px;
}

.cbd-pbanner__coin {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: linear-gradient(135deg, #4cb7c6 0%, #1d8a9c 100%);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.cbd-pbanner__coin--orange {
  background: #dc8e4a;
}

.cbd-pbanner__coin img {
  width: 16px;
  height: 16px;
  display: block;
}

.cbd-pbanner__num {
  font-size: 28px;
  font-weight: 500;
  line-height: 1;
  color: #111827;
}

.cbd-pbanner__unit {
  font-size: 12px;
  color: #4b5563;
  margin-left: 2px;
}

.cbd-pbanner__withdraw {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  height: 34px;
  border: 0;
  border-radius: 8px;
  background: #71aab3;
  color: #ffffff;
  font-family: var(--cbd-font-sans, 'Montserrat', sans-serif);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: background-color 0.2s ease;
}

.cbd-pbanner__withdraw:hover {
  background: #5996a0;
}

.cbd-pbanner__withdraw img {
  width: 16px;
  height: 16px;
  filter: brightness(0) invert(1);
}

.cbd-pbanner__sub {
  font-size: 11px;
  line-height: 1.35;
  color: #6b7280;
}

.cbd-pbanner__sub strong {
  display: block;
  font-size: 13px;
  font-weight: 500;
  color: #374151;
}

.cbd-pbanner__nav {
  display: flex;
  gap: 4px;
}

.cbd-pbanner__nav-btn {
  width: 22px;
  height: 22px;
  border: 0;
  border-radius: 5px;
  background: #6b7280;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  cursor: pointer;
}

.cbd-pbanner__nav-btn img {
  width: 10px;
  height: 10px;
}

.cbd-pbanner__burns {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.cbd-pbanner__burn-sum {
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 17px;
  font-weight: 500;
  color: #111827;
}

.cbd-pbanner__burn-coin {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: #e55c44;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.cbd-pbanner__burn-coin img {
  width: 10px;
  height: 10px;
}

.cbd-pbanner__burn-date {
  margin-top: 3px;
  font-size: 10px;
  color: #4b5563;
}

/* 2. Вкладка 1: Инструменты (Figma 7618:15927) */
.cbd-ptools-block {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 410px;
  gap: 32px;
  padding: 24px 0;
  border-top: 1px solid #e5e7eb;
}

.cbd-ptools-block__h2 {
  margin: 0 0 10px;
  font-size: 16px;
  font-weight: 600;
  color: #111827;
}

.cbd-ptools-block__p {
  margin: 0 0 10px;
  font-size: 12.5px;
  line-height: 1.55;
  color: #374151;
}

.cbd-ptools-promo-label {
  font-size: 11.5px;
  font-weight: 600;
  color: #111827;
  margin-bottom: 6px;
}

.cbd-ptools-promo-row {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 16px;
}

.cbd-ptools-dashed-code {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 158px;
  height: 44px;
  padding: 0 16px;
  border: 1.2px dashed #374151;
  border-radius: 10px;
  background: #ffffff;
  font-size: 14px;
  font-weight: 500;
  color: #111827;
  letter-spacing: 0.02em;
}

.cbd-ptools-stat {
  display: inline-flex;
  align-items: center;
  gap: 10px;
}

.cbd-ptools-stat__num {
  font-size: 28px;
  font-weight: 400;
  line-height: 1;
  color: #5caab4;
  min-width: 24px;
}

.cbd-ptools-stat__lbl {
  font-size: 11px;
  line-height: 1.3;
  color: #374151;
}

.cbd-ptools-refbox {
  display: flex;
  align-items: flex-start;
  gap: 24px;
  padding: 28px 32px;
  border: 1px solid #e5e7eb;
  border-radius: 16px;
  background: #ffffff;
  margin: 24px 0 32px;
}

.cbd-ptools-refbox__icon {
  width: 56px;
  height: 56px;
  flex-shrink: 0;
  margin-top: 6px;
}

.cbd-ptools-refbox__body {
  flex: 1;
  min-width: 0;
}

.cbd-ptools-refbox__row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 14px;
  margin-top: 16px;
}

.cbd-ptools-refbox__url {
  display: inline-flex;
  align-items: center;
  height: 42px;
  padding: 0 18px;
  border: 1.2px dashed #374151;
  border-radius: 4px;
  font-size: 15px;
  font-weight: 500;
  color: #111827;
  min-width: 240px;
}

.cbd-ptools-refbox__metric {
  font-size: 12px;
  color: #374151;
}

.cbd-ptools-refbox__metric strong {
  font-size: 16px;
  font-weight: 700;
  margin-right: 4px;
}

.cbd-ptools-sites-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 18px;
}

.cbd-ptools-add-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 230px;
  height: 44px;
  padding: 0 24px;
  border: 0;
  border-radius: 10px;
  background: #6da8b2;
  color: #ffffff;
  font-family: var(--cbd-font-sans, 'Montserrat', sans-serif);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
}

.cbd-ptools-add-btn:hover {
  background: #57939d;
}

/* 3. Вкладка 4: Мои реквизиты (Figma 7618:16824) */
.cbd-req-card__icons {
  display: inline-flex;
  align-items: center;
  gap: 10px;
}

.cbd-req-card__icon-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  padding: 0;
  border: 0;
  background: transparent;
  cursor: pointer;
}

.cbd-req-card__icon-btn img {
  width: 16px;
  height: 16px;
  display: block;
}

.cbd-req-add--figma {
  min-height: 168px;
  border: 1.2px dashed #6da8b2;
  background: #ffffff;
}

.cbd-req-add--figma span {
  text-decoration: underline;
  color: #5caab4;
}

/* 4. Вкладка 5: Вывод средств (Figma 7618:17362) */
.cbd-withdraw-input-wrap {
  position: relative;
  display: flex;
  align-items: center;
}

.cbd-withdraw-input-wrap input {
  padding-right: 68px;
}

.cbd-withdraw-input-wrap__rub {
  position: absolute;
  right: 40px;
  font-size: 15px;
  font-weight: 600;
  color: #9ca3af;
  pointer-events: none;
}

.cbd-withdraw-stepper {
  position: absolute;
  right: 8px;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.cbd-withdraw-stepper button {
  width: 22px;
  height: 16px;
  border: 0;
  padding: 0;
  background: transparent;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}

.cbd-withdraw-stepper img {
  width: 20px;
  height: 14px;
  display: block;
}

/* 5. Вкладка 6: Правила (Figma 7618:17870) — 1-в-1 с 3D-иллюстрациями */
.cbd-rules-top {
  display: grid;
  grid-template-columns: minmax(0, 1.55fr) minmax(0, 1fr);
  gap: 16px;
  margin-bottom: 16px;
}

.cbd-rules-card {
  position: relative;
  border: 1px solid #e5e7eb;
  border-radius: 16px;
  padding: 22px 24px;
  background: #ffffff;
  overflow: hidden;
}

.cbd-rules-card--partner {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  min-height: 196px;
}

.cbd-rules-card--teal {
  background: linear-gradient(135deg, #6ec4d0 0%, #3aa3b4 55%, #178699 100%);
  border-color: transparent;
  color: #ffffff;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  min-height: 196px;
}

.cbd-rules-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 16px;
  border-radius: 999px;
  background: #6da8b2;
  color: #ffffff;
  font-size: 13px;
  font-weight: 600;
  width: fit-content;
}

.cbd-rules-big-pct {
  font-size: 40px;
  font-weight: 600;
  line-height: 1.05;
  text-align: right;
}

.cbd-rules-2col {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  margin-bottom: 24px;
}

.cbd-rules-card-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}

.cbd-rules-kicker {
  margin: 0;
  font-size: 13px;
  font-weight: 600;
  text-transform: uppercase;
  color: #3da0af;
  letter-spacing: 0.02em;
}

.cbd-rules-p {
  margin: 0;
  font-size: 12.5px;
  line-height: 1.5;
  color: #1f2937;
}

.cbd-rules-h3 {
  margin: 28px 0 16px;
  font-size: 16px;
  font-weight: 600;
  text-align: center;
  color: #111827;
}

.cbd-rules-sub-center {
  margin: -10px 0 18px;
  font-size: 12.5px;
  line-height: 1.5;
  text-align: center;
  color: #374151;
}

.cbd-rules-banner-strip {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 10px 44px;
  border: 1px solid #9fd2da;
  border-radius: 16px;
  background: #f9fdfd;
  margin-bottom: 24px;
}

.cbd-rules-banner-strip__text {
  font-size: 14px;
  font-weight: 600;
  color: #3da0af;
  text-align: center;
}

.cbd-rules-ref-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 36px minmax(0, 1fr) 36px minmax(0, 1fr);
  gap: 8px;
  align-items: center;
  margin-bottom: 28px;
}

.cbd-rules-ref-arrow {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: #5caab4;
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  font-weight: 700;
}

.cbd-rules-tool-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.15fr);
  gap: 24px;
  border: 1px solid #e5e7eb;
  border-radius: 16px;
  padding: 24px;
  background: #ffffff;
  margin-bottom: 16px;
}

.cbd-rules-dashed-box {
  border: 1px dashed #d1d5db;
  border-radius: 12px;
  padding: 16px 18px;
  font-size: 12px;
  line-height: 1.55;
  color: #1f2937;
}

.cbd-rules-dashed-box--warn {
  border-color: #f87171;
  margin-top: 12px;
  background: #fffafa;
}

.cbd-rules-dashed-box--warn strong {
  color: #dc2626;
}

.cbd-rules-file-row {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 8px 0;
  font-size: 12.5px;
  font-weight: 600;
  color: #2b8b99;
  word-break: break-all;
}

.cbd-rules-3col {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}

.cbd-rules-card--aqua {
  border-color: #a6d6de;
  background: linear-gradient(180deg, #f3fafb 0%, #ffffff 42%);
}

/* Точные спрайтовые кропы 3D-иконок из Figma */
.cbd-fig-crop {
  position: relative;
  overflow: hidden;
  flex-shrink: 0;
}

.cbd-fig-crop img {
  position: absolute;
  max-width: none;
  pointer-events: none;
}

/* 6. Вкладка 7: Инструкции (Figma 7618:19590) — 1-в-1 с фото и телефонами */
.cbd-instr-hero {
  display: grid;
  grid-template-columns: 240px minmax(0, 1fr);
  gap: 24px;
  align-items: start;
  margin-bottom: 32px;
}

.cbd-instr-doctor {
  width: 240px;
  height: auto;
  display: block;
  transform: scaleX(-1);
}

.cbd-instr-what-box {
  position: relative;
  padding: 26px 28px 26px 34px;
  border-radius: 16px;
  background: linear-gradient(95deg, #4db3c1 0%, #52b89d 100%);
  color: #ffffff;
  margin-bottom: 24px;
}

.cbd-instr-what-box__title {
  margin: 0 0 10px;
  font-size: 15px;
  font-weight: 700;
  text-transform: uppercase;
}

.cbd-instr-what-box__p {
  margin: 0;
  font-size: 13px;
  line-height: 1.5;
  max-width: 440px;
}

.cbd-instr-what-box__art {
  position: absolute;
  top: -28px;
  right: 16px;
  width: 108px;
  height: 108px;
  object-fit: contain;
}

.cbd-instr-status-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 8px 0 8px 14px;
}

.cbd-instr-reg-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 360px;
  gap: 20px;
  align-items: end;
  margin-bottom: 12px;
}

.cbd-instr-phones-stage {
  position: relative;
  min-height: 350px;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: flex-end;
}

.cbd-instr-store-badges {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 10px;
  z-index: 2;
}

.cbd-instr-store-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 12px;
  border: 1px solid #d1d5db;
  border-radius: 8px;
  background: #ffffff;
  font-size: 11px;
  font-weight: 600;
  color: #111827;
  width: 132px;
}

.cbd-instr-phones-row {
  display: flex;
  align-items: flex-end;
  gap: 10px;
  position: relative;
  z-index: 2;
}

.cbd-instr-phone-mock {
  position: relative;
  width: 136px;
  height: 264px;
  flex-shrink: 0;
}

.cbd-instr-phone-mock__screen {
  position: absolute;
  left: 10px;
  top: 9px;
  width: 116px;
  height: 246px;
  border-radius: 16px;
  object-fit: cover;
}

.cbd-instr-phone-mock__frame {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  pointer-events: none;
}

.cbd-instr-woman-bg {
  position: absolute;
  right: -12px;
  top: -18px;
  width: 196px;
  height: auto;
  z-index: 1;
  pointer-events: none;
}

.cbd-instr-nottax {
  display: grid;
  grid-template-columns: 240px minmax(0, 1fr);
  gap: 20px;
  align-items: center;
  padding: 20px 24px;
  border: 1.2px dashed #6da8b2;
  border-radius: 16px;
  margin-bottom: 28px;
}

.cbd-instr-remove-banner {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 310px;
  gap: 20px;
  align-items: center;
  padding: 24px 28px;
  border-radius: 16px;
  background: linear-gradient(95deg, #4db3c1 0%, #52b89d 100%);
  color: #ffffff;
  margin-bottom: 28px;
}

/* Адаптив 1120px / 900px / 640px */
@media (max-width: 1180px) {
  .cbd-pbanner__grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .cbd-ptools-block,
  .cbd-rules-top,
  .cbd-rules-tool-card,
  .cbd-instr-reg-grid,
  .cbd-instr-remove-banner {
    grid-template-columns: minmax(0, 1fr);
  }

  .cbd-rules-ref-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .cbd-rules-ref-arrow {
    margin: 0 auto;
    transform: rotate(90deg);
  }
}

@media (max-width: 900px) {
  .cbd-lk-page--partner .cbd-lk-topbar,
  .cbd-lk-page--partner .cbd-lk-layout {
    grid-template-columns: minmax(0, 1fr);
  }

  .cbd-rules-2col,
  .cbd-rules-3col,
  .cbd-instr-hero,
  .cbd-instr-nottax {
    grid-template-columns: minmax(0, 1fr);
  }

  .cbd-instr-doctor {
    margin: 0 auto;
    width: 180px;
  }

  .cbd-instr-woman-bg {
    display: none;
  }

  .cbd-ptools-refbox {
    flex-direction: column;
    padding: 20px;
  }
}

@media (max-width: 600px) {
  .cbd-pbanner__grid,
  .cbd-pbanner__burns {
    grid-template-columns: minmax(0, 1fr);
  }

  .cbd-rules-banner-strip {
    padding: 14px 16px;
  }
}
