/* ============================================
   Contentville Club — Личный кабинет
   Telegram Mini App — Design System & Styles
   ============================================ */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800&display=swap');

/* === CSS Variables / Design Tokens === */
:root {
  --bg-primary: #0a0e14;
  --bg-secondary: #111820;
  --bg-tertiary: #161d27;
  --bg-input: #0d1117;
  --bg-hover: #1a2332;

  --accent: #00E676;
  --accent-dim: rgba(0, 230, 118, 0.15);
  --accent-glow: rgba(0, 230, 118, 0.25);
  --accent-hover: #00ff85;
  --accent-dark: #00c064;

  --text-primary: #ffffff;
  --text-secondary: #8b949e;
  --text-tertiary: #6e7681;
  --text-accent: #00E676;

  --border: rgba(0, 230, 118, 0.12);
  --border-subtle: rgba(255, 255, 255, 0.06);
  --border-input: rgba(255, 255, 255, 0.1);

  --danger: #ff4757;
  --warning: #ffa502;
  --success: #00E676;
  --info: #54a0ff;

  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-xl: 20px;
  --radius-full: 50%;

  --shadow-card: 0 4px 24px rgba(0, 0, 0, 0.3);
  --shadow-glow: 0 0 20px rgba(0, 230, 118, 0.15);
  --shadow-modal: 0 -8px 40px rgba(0, 0, 0, 0.6);

  --font: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;

  --transition-fast: 0.15s ease;
  --transition-normal: 0.25s ease;
  --transition-slow: 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

/* === Reset & Base === */
*,
*::before,
*::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  font-size: 16px;
  -webkit-text-size-adjust: 100%;
  -webkit-tap-highlight-color: transparent;
}

body {
  font-family: var(--font);
  background: var(--bg-primary);
  color: var(--text-primary);
  min-height: 100vh;
  min-height: 100dvh;
  overflow-x: hidden;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* === App Container === */
.app {
  max-width: 480px;
  margin: 0 auto;
  min-height: 100vh;
  min-height: 100dvh;
  position: relative;
  display: flex;
  flex-direction: column;
  padding-bottom: 96px;
}

/* === Header === */
.header {
  padding: 16px 20px 12px;
  text-align: center;
  position: relative;
}

.header__logo {
  font-size: 18px;
  font-weight: 700;
  color: var(--text-primary);
  letter-spacing: 0.5px;
}

.header__logo span {
  color: var(--accent);
}

/* === Tab Bar === */
.tab-bar {
  position: fixed;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 100%;
  max-width: 480px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0;
  padding: 8px 20px;
  padding-bottom: calc(20px + env(safe-area-inset-bottom));
  background: rgba(16, 22, 30, 0.92);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  z-index: 100;
}

.tab-bar__item {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  padding: 8px 16px;
  border: none;
  background: transparent;
  color: var(--text-secondary);
  font-family: var(--font);
  font-size: 11px;
  font-weight: 500;
  cursor: pointer;
  border-radius: var(--radius-lg);
  transition: all var(--transition-normal);
  position: relative;
}

.tab-bar__icon {
  font-size: 20px;
  line-height: 1;
  transition: transform var(--transition-normal);
}

.tab-bar__label {
  font-size: 11px;
  letter-spacing: 0.3px;
}

.tab-bar__item.active {
  color: var(--accent);
  background: var(--accent-dim);
}

.tab-bar__item.active .tab-bar__icon {
  transform: scale(1.1);
}

.tab-bar__item:active {
  transform: scale(0.93);
}


/* === Tab Content === */
.tab-content {
  flex: 1;
  padding: 30px 20px 0 20px;
}

.tab-pane {
  display: none;
  animation: fadeInUp 0.35s ease;
}

.tab-pane.active {
  display: block;
}

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(12px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* === Profile Section === */
.profile-header {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 24px;
  padding: 20px;
  background: var(--bg-secondary);
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  position: relative;
  overflow: hidden;
}

.profile-header::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--accent), transparent);
}

.profile-avatar {
  width: 64px;
  height: 64px;
  border-radius: var(--radius-full);
  border: 2px solid var(--accent);
  object-fit: cover;
  flex-shrink: 0;
  box-shadow: 0 0 16px rgba(0, 230, 118, 0.2);
}

.profile-avatar-placeholder {
  width: 64px;
  height: 64px;
  border-radius: var(--radius-full);
  border: 2px solid var(--accent);
  background: var(--accent-dim);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  font-weight: 700;
  color: var(--accent);
  flex-shrink: 0;
}

.profile-info {
  flex: 1;
  min-width: 0;
}

.profile-name {
  font-size: 20px;
  font-weight: 700;
  margin-bottom: 4px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.profile-username {
  font-size: 13px;
  color: var(--text-secondary);
}

/* === Cards === */
.card {
  background: var(--bg-secondary);
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  padding: 20px;
  margin-bottom: 16px;
  transition: border-color var(--transition-normal);
}

.card:hover {
  border-color: rgba(0, 230, 118, 0.25);
}

.card__title {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: 12px;
}

.card__divider {
  height: 1px;
  background: var(--border-subtle);
  margin: 12px 0;
}

/* === Subscription Status === */
.subscription-status {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 4px;
}

.status-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 14px;
  border-radius: 20px;
  font-size: 13px;
  font-weight: 600;
}

.status-badge--active {
  background: rgba(0, 230, 118, 0.12);
  color: var(--accent);
}

.status-badge--active::before {
  content: '';
  width: 8px;
  height: 8px;
  border-radius: var(--radius-full);
  background: var(--accent);
  animation: pulse 2s infinite;
}

.status-badge--inactive {
  background: rgba(255, 71, 87, 0.12);
  color: var(--danger);
}

.status-badge--inactive::before {
  content: '';
  width: 8px;
  height: 8px;
  border-radius: var(--radius-full);
  background: var(--danger);
}

@keyframes pulse {
  0%, 100% {
    opacity: 1;
    transform: scale(1);
  }
  50% {
    opacity: 0.5;
    transform: scale(0.85);
  }
}

.subscription-date {
  font-size: 14px;
  color: var(--text-secondary);
  margin-top: 8px;
}

.subscription-date span {
  color: var(--text-primary);
  font-weight: 600;
}

/* === Links List === */
.links-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.link-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
  background: var(--bg-tertiary);
  border-radius: var(--radius-md);
  text-decoration: none;
  color: var(--text-primary);
  transition: all var(--transition-normal);
  border: 1px solid transparent;
}

.link-item:hover {
  background: var(--bg-hover);
  border-color: var(--border);
  transform: translateX(4px);
}

.link-item:active {
  transform: scale(0.98);
}

.link-item--locked {
  opacity: 0.4;
  cursor: not-allowed;
  border-color: transparent !important;
}

.link-item--locked:hover {
  transform: none !important;
  background: var(--bg-tertiary) !important;
  border-color: transparent !important;
}

.link-item--locked .link-item__icon {
  background: rgba(255, 255, 255, 0.04) !important;
  color: var(--text-tertiary) !important;
}

.link-item--locked .link-item__arrow {
  color: var(--text-tertiary) !important;
}

.link-item__icon {
  width: 40px;
  height: 40px;
  border-radius: var(--radius-md);
  background: var(--accent-dim);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  flex-shrink: 0;
  color: var(--accent);
}

.link-item__icon svg {
  width: 20px;
  height: 20px;
}

.link-item__arrow svg {
  width: 16px;
  height: 16px;
}

.link-item__text {
  flex: 1;
}

.link-item__title {
  font-size: 14px;
  font-weight: 600;
}

.link-item__subtitle {
  font-size: 12px;
  color: var(--text-secondary);
  margin-top: 2px;
}

.link-item__arrow {
  color: var(--text-tertiary);
  font-size: 14px;
  transition: transform var(--transition-fast);
}

.link-item:hover .link-item__arrow {
  transform: translateX(2px);
  color: var(--accent);
}

/* === Partner Section === */
.balance-card {
  text-align: center;
  padding: 28px 20px;
  position: relative;
  overflow: hidden;
}

.balance-card::before {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: radial-gradient(circle at center, rgba(0, 230, 118, 0.04) 0%, transparent 60%);
  pointer-events: none;
}

.balance-label {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: 8px;
}

.balance-amount {
  font-size: 40px;
  font-weight: 800;
  color: var(--text-primary);
  line-height: 1.1;
  margin-bottom: 4px;
}

.balance-currency {
  font-size: 14px;
  color: var(--text-secondary);
  font-weight: 500;
}

/* === Referral Link === */
.referral-card {
  position: relative;
}

.referral-link-wrapper {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 14px;
  background: var(--bg-input);
  border-radius: var(--radius-md);
  border: 1px solid var(--border-input);
  cursor: pointer;
  transition: all var(--transition-normal);
  margin-top: 8px;
}

.referral-link-wrapper:hover {
  border-color: var(--accent);
  background: var(--bg-tertiary);
}

.referral-link-wrapper:active {
  transform: scale(0.98);
}

.referral-link-text {
  flex: 1;
  font-size: 13px;
  color: var(--text-secondary);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-family: 'Courier New', monospace;
}

.referral-copy-btn {
  flex-shrink: 0;
  width: 36px;
  height: 36px;
  border-radius: var(--radius-sm);
  background: var(--accent-dim);
  border: none;
  color: var(--accent);
  font-size: 16px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all var(--transition-fast);
}

.referral-copy-btn:hover {
  background: var(--accent);
  color: var(--bg-primary);
}

.referral-copy-btn.copied {
  background: var(--accent);
  color: var(--bg-primary);
}

/* === Stats Grid === */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 8px;
  margin-bottom: 16px;
}

.stat-item {
  background: var(--bg-tertiary);
  border-radius: var(--radius-md);
  padding: 12px 6px;
  text-align: center;
  border: 1px solid var(--border-subtle);
  min-width: 0;
}

.clickable-stat {
  cursor: pointer;
  transition: all var(--transition-normal);
  border-color: rgba(0, 230, 118, 0.3);
  background: rgba(0, 230, 118, 0.05);
}
.clickable-stat:hover {
  background: rgba(0, 230, 118, 0.12);
  border-color: var(--accent);
  transform: translateY(-2px);
}
.clickable-stat:active {
  transform: translateY(0);
}

.stat-value {
  font-size: 18px;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 4px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.stat-label {
  font-size: 10px;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.3px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* === Buttons === */
.btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  padding: 16px 24px;
  border: none;
  border-radius: var(--radius-md);
  font-family: var(--font);
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--transition-normal);
  position: relative;
  overflow: hidden;
}

.btn:active {
  transform: scale(0.97);
}

.btn:disabled {
  background: var(--bg-tertiary) !important;
  color: var(--text-tertiary) !important;
  border: 1px solid var(--border-subtle) !important;
  cursor: not-allowed;
  box-shadow: none !important;
  transform: none !important;
  pointer-events: none;
}

.btn--primary {
  background: var(--accent);
  color: var(--bg-primary);
  box-shadow: 0 4px 16px rgba(0, 230, 118, 0.3);
}

.btn--primary:hover {
  background: var(--accent-hover);
  box-shadow: 0 4px 24px rgba(0, 230, 118, 0.4);
}

.btn--secondary {
  background: var(--bg-tertiary);
  color: var(--text-primary);
  border: 1px solid var(--border);
}

.btn--secondary:hover {
  background: var(--bg-hover);
  border-color: var(--accent);
}

.btn--outline {
  background: transparent;
  color: var(--accent);
  border: 1px solid var(--accent);
}

.btn--outline:hover {
  background: var(--accent-dim);
}

.btn--danger {
  background: rgba(255, 71, 87, 0.12);
  color: var(--danger);
  border: 1px solid rgba(255, 71, 87, 0.2);
}

.btn--small {
  padding: 10px 16px;
  font-size: 13px;
}

.btn-group {
  display: flex;
  gap: 10px;
}

.btn-group .btn {
  flex: 1;
}

/* === Instructions / Info Block === */
.info-block {
  background: var(--bg-tertiary);
  border-radius: var(--radius-md);
  padding: 16px;
  border-left: 3px solid var(--accent);
}

.info-block__title {
  font-size: 14px;
  font-weight: 600;
  margin-bottom: 8px;
  color: var(--accent);
}

.info-block__text {
  font-size: 13px;
  color: var(--text-secondary);
  line-height: 1.6;
}

.info-block__text ol,
.info-block__text ul {
  padding-left: 18px;
  margin-top: 8px;
}

.info-block__text li {
  margin-bottom: 6px;
}

.info-block__text strong {
  color: var(--text-primary);
  font-weight: 600;
}

/* === Modal / Overlay === */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  z-index: 100;
  display: none;
  align-items: flex-end;
  justify-content: center;
  animation: fadeIn 0.2s ease;
}

.modal-overlay.active {
  display: flex;
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

.modal {
  background: var(--bg-secondary);
  border-radius: var(--radius-xl) var(--radius-xl) 0 0;
  width: 100%;
  max-width: 480px;
  max-height: 90vh;
  overflow-y: auto;
  padding: 0;
  animation: slideUp 0.35s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: var(--shadow-modal);
}

@keyframes slideUp {
  from {
    transform: translateY(100%);
  }
  to {
    transform: translateY(0);
  }
}

.modal__handle {
  width: 36px;
  height: 4px;
  background: rgba(255, 255, 255, 0.15);
  border-radius: 2px;
  margin: 12px auto 0;
}

.modal__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px;
  border-bottom: 1px solid var(--border-subtle);
}

.modal__title {
  font-size: 18px;
  font-weight: 700;
}

.modal__close {
  width: 32px;
  height: 32px;
  border-radius: var(--radius-sm);
  background: var(--bg-tertiary);
  border: none;
  color: var(--text-secondary);
  font-size: 18px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all var(--transition-fast);
}

.modal__close:hover {
  background: var(--bg-hover);
  color: var(--text-primary);
}

.modal__body {
  padding: 20px;
}

.modal__footer {
  padding: 16px 20px 24px;
  border-top: 1px solid var(--border-subtle);
}

/* === Withdrawal Steps === */
.withdrawal-step {
  display: none;
}

.withdrawal-step.active {
  display: block;
  animation: fadeInUp 0.3s ease;
}

/* === Form Elements === */
.form-group {
  margin-bottom: 16px;
}

.form-label {
  display: block;
  font-size: 12px;
  font-weight: 600;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 8px;
}

.form-input {
  width: 100%;
  padding: 14px 16px;
  background: var(--bg-input);
  border: 1px solid var(--border-input);
  border-radius: var(--radius-md);
  color: var(--text-primary);
  font-family: var(--font);
  font-size: 14px;
  transition: all var(--transition-normal);
  outline: none;
}

.form-input::placeholder {
  color: var(--text-tertiary);
}

.form-input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(0, 230, 118, 0.1);
}

.form-input.error {
  border-color: var(--danger);
  box-shadow: 0 0 0 3px rgba(255, 71, 87, 0.1);
}

.form-hint {
  font-size: 12px;
  color: var(--text-tertiary);
  margin-top: 6px;
}

.form-error {
  font-size: 12px;
  color: var(--danger);
  margin-top: 6px;
  display: none;
}

.form-error.visible {
  display: block;
}

/* === Method Toggle === */
.method-toggle {
  display: flex;
  gap: 4px;
  padding: 4px;
  background: var(--bg-input);
  border-radius: var(--radius-md);
  margin-bottom: 20px;
}

.method-toggle__item {
  flex: 1;
  padding: 10px 16px;
  border: none;
  background: transparent;
  color: var(--text-secondary);
  font-family: var(--font);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  border-radius: var(--radius-sm);
  transition: all var(--transition-normal);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
}

.method-toggle__item.active {
  background: var(--accent);
  color: var(--bg-primary);
}

.method-toggle__item:active {
  transform: scale(0.97);
}

/* === Summary Row === */
.summary-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 0;
  border-bottom: 1px solid var(--border-subtle);
}

.summary-row:last-child {
  border-bottom: none;
  padding-bottom: 0;
}

.summary-row__label {
  font-size: 13px;
  color: var(--text-secondary);
}

.summary-row__value {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-primary);
}

.summary-row--total {
  margin-top: 4px;
  padding-top: 12px;
  border-top: 1px solid var(--border);
}

.summary-row--total .summary-row__label {
  font-weight: 600;
  color: var(--accent);
}

.summary-row--total .summary-row__value {
  font-size: 16px;
  color: var(--accent);
}

/* === Rules List === */
.rules-list {
  list-style: none;
  padding: 0;
}

.rules-list li {
  position: relative;
  padding: 10px 0 10px 28px;
  font-size: 13px;
  color: var(--text-secondary);
  line-height: 1.5;
  border-bottom: 1px solid var(--border-subtle);
}

.rules-list li:last-child {
  border-bottom: none;
}

.rules-list li::before {
  content: attr(data-num);
  position: absolute;
  left: 0;
  top: 10px;
  width: 20px;
  height: 20px;
  border-radius: var(--radius-full);
  background: var(--accent-dim);
  color: var(--accent);
  font-size: 11px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* === Success Screen === */
.success-screen {
  text-align: center;
  padding: 32px 0;
}

.success-icon {
  width: 72px;
  height: 72px;
  border-radius: var(--radius-full);
  background: var(--accent-dim);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 20px;
  font-size: 32px;
  color: var(--accent);
  animation: scaleIn 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.success-icon svg {
  width: 36px;
  height: 36px;
}

@keyframes scaleIn {
  from {
    transform: scale(0);
    opacity: 0;
  }
  50% {
    transform: scale(1.2);
  }
  to {
    transform: scale(1);
    opacity: 1;
  }
}

.success-title {
  font-size: 20px;
  font-weight: 700;
  margin-bottom: 8px;
}

.success-text {
  font-size: 14px;
  color: var(--text-secondary);
  line-height: 1.5;
  max-width: 280px;
  margin: 0 auto;
}

/* === Toast Notification === */
.toast {
  position: fixed;
  top: 16px;
  left: 50%;
  transform: translateX(-50%) translateY(-150px);
  padding: 12px 20px;
  background: var(--bg-secondary);
  border: 1px solid var(--accent);
  border-radius: var(--radius-md);
  color: var(--accent);
  font-family: var(--font);
  font-size: 13px;
  font-weight: 600;
  z-index: 200;
  transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: var(--shadow-glow);
  max-width: 90%;
  width: max-content;
  text-align: center;
  box-sizing: border-box;
}

.toast.visible {
  transform: translateX(-50%) translateY(0);
}

/* === Warning Box === */
.warning-box {
  display: flex;
  gap: 10px;
  padding: 12px 14px;
  background: rgba(255, 165, 2, 0.08);
  border: 1px solid rgba(255, 165, 2, 0.2);
  border-radius: var(--radius-md);
  margin-top: 12px;
}

.warning-box__icon {
  font-size: 16px;
  flex-shrink: 0;
  margin-top: 1px;
  color: #ffa502;
}

.warning-box__icon svg {
  width: 18px;
  height: 18px;
}

.warning-box__text {
  font-size: 12px;
  color: var(--text-secondary);
  line-height: 1.5;
}

/* === Scrollbar === */
::-webkit-scrollbar {
  width: 4px;
}

::-webkit-scrollbar-track {
  background: transparent;
}

::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.1);
  border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
  background: rgba(255, 255, 255, 0.2);
}

/* === Utilities === */
.mt-8 { margin-top: 8px; }
.mt-12 { margin-top: 12px; }
.mt-16 { margin-top: 16px; }
.mt-20 { margin-top: 20px; }
.mt-24 { margin-top: 24px; }
.mb-8 { margin-bottom: 8px; }
.mb-16 { margin-bottom: 16px; }
.mb-24 { margin-bottom: 24px; }
.text-center { text-align: center; }
.text-accent { color: var(--accent); }
.text-secondary { color: var(--text-secondary); }
.text-small { font-size: 13px; }
.fw-600 { font-weight: 600; }
.hidden { display: none !important; }

/* Manage Subscription Button */
.link-manage-sub {
  color: var(--text-secondary);
  text-decoration: none;
  font-size: 15px;
  font-weight: 500;
  padding: 8px 16px;
  display: inline-block;
  transition: opacity 0.2s ease;
}
.link-manage-sub:active {
  opacity: 0.7;
}

/* Tariff Card */
.tariff-card {
  background: var(--bg-tertiary);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 16px;
  position: relative;
  overflow: hidden;
}
.tariff-card__badge {
  display: inline-block;
  background: #10B981;
  color: #fff;
  font-size: 12px;
  font-weight: 600;
  padding: 4px 10px;
  border-radius: 12px;
  margin-bottom: 12px;
}
.tariff-card__main {
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.tariff-card__name {
  font-size: 18px;
  font-weight: 700;
  color: var(--text-primary);
}
.tariff-card__right {
  text-align: right;
}
.tariff-card__price {
  font-size: 18px;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 4px;
}
.tariff-card__date {
  font-size: 12px;
  color: var(--text-secondary);
}

/* Pause Subscription Link */
.link-pause-sub {
  color: var(--text-secondary);
  text-decoration: none;
  font-size: 15px;
  transition: opacity 0.2s ease;
}
.link-pause-sub:active {
  opacity: 0.7;
}

/* Cancel Sub Screen */
.modal__back {
  background: none;
  border: none;
  color: var(--text-primary);
  cursor: pointer;
  padding: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}
.modal__back:active {
  opacity: 0.7;
}
.cancel-title {
  font-size: 18px;
  font-weight: 600;
  line-height: 1.4;
  color: var(--text-primary);
}
.text-danger {
  color: #ff4747;
}
.cancel-text p {
  margin-bottom: 12px;
}
.cancel-text a {
  color: var(--accent);
  text-decoration: none;
}

/* === Subscription Tariffs and Status Header === */
.subscription-status-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
}

.tariffs-container {
  margin-top: 16px;
  display: none;
}

.tariffs-title {
  font-size: 11px;
  font-weight: 600;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: 12px;
  margin-top: 16px;
}

.tariffs-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.tariff-item {
  background: var(--bg-tertiary);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 14px 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  transition: border-color var(--transition-normal);
}

.tariff-item:hover {
  border-color: rgba(255, 255, 255, 0.1);
}

.tariff-item__header {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.tariff-item__title {
  font-size: 15px;
  font-weight: 700;
  color: var(--text-primary);
  display: flex;
  align-items: center;
  gap: 8px;
}

.tariff-item__price {
  font-size: 16px;
  font-weight: 700;
  color: var(--accent);
}

.tariff-item--premium {
  border: 1px solid rgba(255, 255, 255, 0.12);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.tariff-item--premium:hover {
  border-color: rgba(255, 255, 255, 0.2);
}

.tariff-item--premium .tariff-item__price {
  color: var(--text-primary);
}

.premium-badge {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: var(--text-secondary);
  font-size: 9px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  padding: 2px 6px;
  border-radius: 4px;
}


/* ============================================ */
/* REFERRALS LIST                               */
/* ============================================ */

.referrals-list-block {
  display: flex;
  flex-direction: column;
}

.referrals-list-title {
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-secondary);
  margin: 0 0 10px 0;
}

.referrals-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.referral-card {
  background: var(--surface);
  border: 1px solid rgba(255,255,255,0.06);
  border-radius: 14px;
  padding: 14px 16px;
  transition: border-color 0.2s;
}

.referral-card:hover {
  border-color: rgba(255,255,255,0.12);
}

.referral-card__header {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 12px;
}

.referral-card__name {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-primary);
  flex: 1 1 auto;
}

.referral-card__username {
  font-size: 12px;
  color: var(--text-secondary);
}

.referral-status {
  font-size: 11px;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: 20px;
  letter-spacing: 0.03em;
}

.referral-status--active {
  background: rgba(52, 211, 153, 0.12);
  color: #34d399;
}

.referral-status--cancelled {
  background: rgba(239, 68, 68, 0.12);
  color: #ef4444;
}

.referral-card__stats {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 8px;
}

.referral-stat {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.referral-stat__label {
  font-size: 11px;
  color: var(--text-secondary);
  letter-spacing: 0.03em;
}

.referral-stat__value {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-primary);
}

.referral-stat--highlight .referral-stat__value {
  color: #a78bfa;
}

.referrals-empty {
  background: var(--surface);
  border: 1px dashed rgba(255,255,255,0.08);
  border-radius: 14px;
  padding: 24px 20px;
  text-align: center;
  color: var(--text-secondary);
  font-size: 13px;
  line-height: 1.5;
}
