﻿.hidden {
  display: none !important;
}

.growth-dashboard {
  gap: 16px;
}

.growth-dashboard .card {
  gap: 12px;
}

.growth-dashboard .card h2 {
  margin: 0;
}

#partnerAuthStatus {
  margin: 0;
}

.growth-dashboard .card p.muted {
  line-height: 1.5;
}

.growth-dashboard .stat {
  min-height: 84px;
}

.growth-dashboard .stat strong {
  line-height: 1.25;
  word-break: break-word;
}

.partner-profile-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
}

.partner-profile-menu-wrap {
  position: relative;
}

.partner-menu-btn {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  border: 1px solid var(--line-soft);
  background: rgba(255, 255, 255, 0.03);
  color: var(--text-main);
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
}

.partner-menu-btn:focus-visible,
.tools-tab-btn:focus-visible,
.growth-dashboard .btn:focus-visible,
.growth-dashboard input:focus-visible,
.growth-dashboard select:focus-visible,
.growth-dashboard textarea:focus-visible {
  outline: 2px solid rgba(212, 175, 55, 0.8);
  outline-offset: 2px;
}

.partner-menu {
  position: absolute;
  right: 0;
  top: calc(100% + 6px);
  min-width: 140px;
  border: 1px solid var(--line-soft);
  border-radius: 10px;
  background: #161a22;
  box-shadow: 0 12px 26px rgba(0, 0, 0, 0.35);
  padding: 6px;
  z-index: 20;
}

.partner-menu button {
  width: 100%;
  text-align: left;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: var(--text-main);
  padding: 8px 10px;
  cursor: pointer;
}

.partner-menu button:hover {
  background: rgba(212, 175, 55, 0.12);
}

.kpi-grid,
.business-grid,
.analytics-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}

.help {
  display: inline-flex;
  width: 16px;
  height: 16px;
  border-radius: 999px;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  border: 1px solid var(--line-soft);
  cursor: help;
}

.unlock-box {
  border: 1px solid rgba(212, 175, 55, 0.25);
  border-radius: 12px;
  background: rgba(212, 175, 55, 0.08);
  padding: 12px;
  display: grid;
  gap: 8px;
}

.unlock-box h3 {
  margin: 0;
}

.unlock-box ul {
  margin: 0;
  padding-left: 18px;
}

.projection-card {
  border: 1px solid var(--line-soft);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.02);
  padding: 12px;
  display: grid;
  gap: 10px;
}

.projection-card h3 {
  margin: 0;
}

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

.projection-item {
  border: 1px solid var(--line-soft);
  border-radius: 10px;
  padding: 9px;
  display: grid;
  gap: 4px;
  background: rgba(255, 255, 255, 0.02);
}

.tools-tabs {
  display: flex;
  gap: 8px;
  flex-wrap: nowrap;
  overflow-x: auto;
  padding-bottom: 2px;
  scrollbar-width: thin;
}

.tools-tab-btn {
  border: 1px solid var(--line-soft);
  background: rgba(255, 255, 255, 0.03);
  color: var(--text-main);
  border-radius: 999px;
  padding: 9px 14px;
  min-height: 40px;
  white-space: nowrap;
  cursor: pointer;
  font-weight: 700;
}

.tools-tab-btn.is-active {
  border-color: rgba(212, 175, 55, 0.5);
  background: rgba(212, 175, 55, 0.18);
  color: #ffe89f;
}

.tools-panel {
  display: grid;
  gap: 10px;
}

.growth-dashboard .row-actions {
  margin-top: 2px;
}

.growth-dashboard .row-actions .btn {
  min-height: 42px;
}

.qr-wrap {
  display: grid;
  justify-content: center;
}

.qr-wrap img {
  width: 148px;
  height: 148px;
  border-radius: 10px;
  border: 1px solid var(--line-soft);
  background: #fff;
  padding: 6px;
}

.growth-dashboard input,
.growth-dashboard select,
textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--bg-card-soft);
  color: var(--text-main);
  padding: 10px 12px;
  font-family: inherit;
  transition: border-color 0.2s ease, box-shadow 0.2s ease, background-color 0.2s ease;
}

.growth-dashboard select {
  min-height: 44px;
  appearance: none;
  background-image:
    linear-gradient(45deg, transparent 50%, rgba(212, 175, 55, 0.9) 50%),
    linear-gradient(135deg, rgba(212, 175, 55, 0.9) 50%, transparent 50%);
  background-position:
    calc(100% - 18px) calc(50% - 2px),
    calc(100% - 12px) calc(50% - 2px);
  background-size: 6px 6px, 6px 6px;
  background-repeat: no-repeat;
  padding-right: 34px;
}

.growth-dashboard input:hover,
.growth-dashboard select:hover,
textarea:hover {
  border-color: rgba(212, 175, 55, 0.45);
}

.growth-dashboard input:focus,
.growth-dashboard select:focus,
textarea:focus {
  border-color: rgba(212, 175, 55, 0.6);
  box-shadow: 0 0 0 3px rgba(212, 175, 55, 0.12);
}

textarea {
  resize: vertical;
  min-height: 92px;
  line-height: 1.45;
}

.funnel {
  display: grid;
  gap: 8px;
}

.funnel-row {
  display: grid;
  grid-template-columns: 72px 1fr auto;
  gap: 8px;
  align-items: center;
}

.funnel-bar {
  height: 10px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  overflow: hidden;
}

.funnel-bar i {
  display: block;
  height: 100%;
  width: 0%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--gold), var(--gold-dark));
}

.beta-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.75rem;
  border: 1px solid rgba(212, 175, 55, 0.4);
  color: #f0d57f;
  border-radius: 999px;
  padding: 2px 8px;
}

.leader-you {
  background: rgba(212, 175, 55, 0.12);
}

.affiliates-filters {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.affiliates-filters label {
  display: grid;
  gap: 6px;
  font-size: 0.86rem;
  font-weight: 600;
  color: var(--text-muted);
}

.affiliates-filters select {
  min-height: 44px;
}

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

.status-pill {
  display: inline-flex;
  width: fit-content;
  border-radius: 999px;
  padding: 4px 10px;
  border: 1px solid var(--line-soft);
  font-size: 0.78rem;
  font-weight: 700;
}

.status-pill.is-neutral {
  color: #d2d8e2;
  background: rgba(255, 255, 255, 0.04);
}

.status-pill.is-ok {
  color: #8bf1b2;
  background: rgba(46, 204, 113, 0.16);
  border-color: rgba(46, 204, 113, 0.4);
}

.compact-table .affiliate-table {
  min-width: 100%;
}

.mini-summary {
  border: 1px solid rgba(212, 175, 55, 0.25);
  border-radius: 12px;
  background:
    linear-gradient(180deg, rgba(212, 175, 55, 0.08) 0%, rgba(212, 175, 55, 0.02) 100%),
    rgba(255, 255, 255, 0.02);
  padding: 12px;
  display: grid;
  gap: 8px;
}

.mini-summary p {
  margin: 0;
}

.mini-summary .stat {
  min-height: 72px;
}

.redeem-wait-modal {
  position: fixed;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: radial-gradient(900px 420px at 50% -16%, rgba(212, 175, 55, 0.16) 0%, rgba(212, 175, 55, 0) 62%), rgba(0, 0, 0, 0.72);
  backdrop-filter: blur(2px);
  z-index: 10020;
  padding: 18px;
}

.redeem-wait-box {
  width: min(460px, 92vw);
  border: 1px solid rgba(212, 175, 55, 0.35);
  border-radius: 16px;
  background: linear-gradient(180deg, rgba(212, 175, 55, 0.07) 0%, rgba(212, 175, 55, 0.01) 100%), linear-gradient(155deg, #171b24 0%, #131820 100%);
  box-shadow: 0 22px 52px rgba(0, 0, 0, 0.56), 0 0 0 1px rgba(212, 175, 55, 0.08) inset;
  padding: 18px 18px 16px;
  display: grid;
  gap: 12px;
  text-align: center;
}

.redeem-wait-box h3 {
  margin: 0;
}

.partners-toast {
  position: fixed;
  right: 16px;
  bottom: 16px;
  z-index: 10030;
  max-width: 360px;
  border: 1px solid var(--line-soft);
  border-radius: 12px;
  background: #121721;
  color: #f3f6fb;
  padding: 10px 12px;
  box-shadow: 0 12px 24px rgba(0, 0, 0, 0.35);
}

.partners-toast.is-ok {
  border-color: rgba(46, 204, 113, 0.45);
}

.partners-toast.is-err {
  border-color: rgba(231, 76, 60, 0.45);
}

@media (max-width: 1040px) {
  .kpi-grid,
  .business-grid,
  .analytics-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .projection-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 860px) {
  .kpi-grid,
  .business-grid,
  .analytics-grid,
  .affiliates-filters,
  .payments-grid {
    grid-template-columns: 1fr;
  }

  .funnel-row {
    grid-template-columns: 64px 1fr auto;
  }

  .growth-dashboard .card {
    padding: 14px;
  }

  .growth-dashboard .row-actions {
    display: grid;
    gap: 8px;
  }

  .growth-dashboard .row-actions .btn {
    width: 100%;
    justify-content: center;
  }

  .partners-toast {
    left: 12px;
    right: 12px;
    bottom: 12px;
    max-width: none;
  }
}

@media (max-width: 520px) {
  .growth-dashboard .card h2 {
    font-size: 1.04rem;
  }

  .growth-dashboard .stat {
    min-height: 76px;
  }

  .growth-dashboard input,
  .growth-dashboard select,
  .growth-dashboard textarea {
    font-size: 16px;
  }

  .tools-tab-btn {
    min-height: 42px;
    padding: 9px 12px;
  }

  .redeem-wait-box {
    padding: 16px 14px 14px;
  }
}
