@font-face {
    font-family: 'Roboto Flex';
    src: url('fonts/RobotoFlex-VariableFont_GRAD,XOPQ,XTRA,YOPQ,YTAS,YTDE,YTFI,YTLC,YTUC,opsz,slnt,wdth,wght.woff2') format('woff2-variations'),
         url('fonts/RobotoFlex-VariableFont_GRAD,XOPQ,XTRA,YOPQ,YTAS,YTDE,YTFI,YTLC,YTUC,opsz,slnt,wdth,wght.ttf') format('truetype-variations');
    font-weight: 100 1000;
    font-stretch: 75% 151%;
    font-style: normal;
    font-display: swap;
  }
  
@font-face {
    font-family: 'SF Pro Display';
    src: url('fonts/SF-Pro-Display-Medium.woff2') format('woff2'),
         url('fonts/SF-Pro-Display-Medium.ttf') format('truetype');
    font-weight: 100 1000;
    font-stretch: 75% 151%;
    font-style: normal;
    font-display: swap;
  }

/* ================================
   ГЛОБАЛЬНЫЕ СТИЛИ И ПЕРЕМЕННЫЕ
   ================================ */

:root {
    /* Цвета - оптимизированы для WebApp */
    --primary-orange: #FF9500;
    --background-dark: #0e0e0e;
    --background-card: #1c1c1e;
    --background-secondary: #2c2c2e;
    --text-primary: #ffffff;
    --text-secondary: #8e8e93;
    --text-tertiary: #aeaeb2;
    --border-subtle: rgba(255, 255, 255, 0.1);
    --border-medium: rgba(255, 255, 255, 0.2);
    
    /* МАКСИМАЛЬНО АДАПТИВНЫЕ РАЗМЕРЫ ДЛЯ WEBAPP */
    --app-max-width: 100vw;
    --content-padding: clamp(8px, 2.5vw, 16px);
    --gap-xs: clamp(2px, 0.5vw, 4px);
    --gap-small: clamp(4px, 1vw, 8px);
    --gap-medium: clamp(8px, 2vw, 12px);
    --gap-large: clamp(12px, 3vw, 16px);
    --gap-xl: clamp(16px, 4vw, 24px);
    
    /* УЛЬТРА-АДАПТИВНАЯ ТИПОГРАФИКА */
    --text-xs: clamp(10px, 2.2vw, 12px);
    --text-sm: clamp(12px, 2.8vw, 14px);
    --text-base: clamp(14px, 3.5vw, 16px);
    --text-lg: clamp(16px, 4vw, 18px);
    --text-xl: clamp(18px, 4.5vw, 20px);
    --text-2xl: clamp(20px, 5vw, 24px);
    
    /* TOUCH-FRIENDLY РАЗМЕРЫ */
    --touch-target: clamp(44px, 12vw, 48px);
    --touch-small: clamp(36px, 10vw, 40px);
    --touch-large: clamp(48px, 14vw, 56px);
    
    /* ДИНАМИЧЕСКИЕ РАДИУСЫ */
    --border-radius-small: clamp(4px, 1.5vw, 6px);
    --border-radius-medium: clamp(6px, 2.5vw, 10px);
    --border-radius-large: clamp(10px, 3.5vw, 14px);
    
    /* Z-индексы */
    --z-header: 40;
    --z-navigation: 50;
    --z-modal: 60;
}

/* БАЗОВЫЕ СТИЛИ ДЛЯ WEBAPP */
* {
    box-sizing: border-box;
    -webkit-tap-highlight-color: transparent;
}

html {
    /* Запрещаем зум и скролл */
    touch-action: manipulation;
    -webkit-text-size-adjust: 100%;
    -ms-text-size-adjust: 100%;
}

body {
    font-family: 'SF Pro Display', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    line-height: 1.4;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    font-size: var(--text-base);
    background-color: var(--background-dark);
    color: var(--text-primary);
    margin: 0;
    padding: 0;
    overflow-x: hidden;
    /* МАКСИМАЛЬНАЯ ПОДДЕРЖКА VIEWPORT */
    min-height: 100vh;
    min-height: 100dvh;
    height: 100vh;
    height: 100dvh;
    width: 100vw;
    position: fixed;
    top: 0;
    left: 0;
}

/* ================================
   КОНТЕЙНЕР ПРИЛОЖЕНИЯ
   ================================ */

.app-container {
    height: 100vh;
    height: 100dvh;
    width: 100vw;
    display: flex;
    flex-direction: column;
    background-color: var(--background-dark);
    position: relative;
    overflow: hidden;
}

/* ================================
   ГЛОБАЛЬНЫЙ ЛОАДЕР И ЭКРАН ОШИБКИ
   ================================ */

.app-loader,
.app-error {
    position: fixed;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--background-dark);
    z-index: calc(var(--z-modal) + 10);
}

.loader-content,
.error-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--gap-large);
    padding: var(--gap-xl);
    background: linear-gradient(135deg, rgba(28, 28, 30, 0.9) 0%, rgba(42, 42, 46, 0.8) 100%);
    border: 1px solid var(--border-subtle);
    border-radius: var(--border-radius-large);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.25);
}

.loader-spinner {
    width: 36px;
    height: 36px;
    border: 3px solid rgba(255, 149, 0, 0.2);
    border-top: 3px solid var(--primary-orange);
    border-radius: 50%;
    animation: spin 0.9s linear infinite;
}

.app-loader-title {
    font-size: var(--text-xl);
    font-weight: 700;
    color: var(--text-primary);
}

.app-loader-text {
    font-size: var(--text-sm);
    color: var(--text-secondary);
}

.error-code {
    font-size: 64px;
    font-weight: 800;
    line-height: 1;
    background: linear-gradient(135deg, var(--primary-orange) 0%, #ff8c42 100%);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.error-title {
    font-size: var(--text-xl);
    font-weight: 700;
    color: var(--text-primary);
    text-align: center;
}

.error-subtitle {
    font-size: var(--text-sm);
    color: var(--text-secondary);
    text-align: center;
    max-width: 280px;
}

/* ================================
   ЗАГОЛОВОК ПРИЛОЖЕНИЯ
   ================================ */

.app-header {
    position: sticky;
    top: 0;
    z-index: var(--z-header);
    background: var(--background-dark);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border-subtle);
    padding: var(--gap-medium) var(--content-padding);
    padding-top: max(var(--gap-medium), env(safe-area-inset-top));
    flex-shrink: 0;
}

.app-header .flex {
    display: flex;
    align-items: center;
    gap: var(--gap-medium);
}

.app-header h1 {
    margin: 0;
    font-size: var(--text-xl);
    font-weight: 700;
    color: var(--text-primary);
    font-family: 'Roboto Flex', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    font-variation-settings: 'wght' 700, 'wdth' 120, 'GRAD' -50;
    text-align: left;
    line-height: 1.3;
    display: flex;
    align-items: center;
}

/* ================================
   КОНТЕЙНЕР ЭКРАНОВ
   ================================ */

.screens-container {
    flex: 1;
    overflow-y: auto;
    overflow-x: hidden;
    -webkit-overflow-scrolling: touch;
    padding: var(--content-padding);
    padding-bottom: calc(var(--content-padding) + var(--touch-large) + env(safe-area-inset-bottom));
}

.screen {
    display: none;
    /* Упрощенная анимация */
    animation: fadeIn 0.2s ease-out;
}

.screen.active {
    display: block;
}

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

/* ================================
   НИЖНЯЯ НАВИГАЦИЯ
   ================================ */

.bottom-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    width: 100vw;
    background: var(--background-dark);
    border-top: 1px solid var(--border-subtle);
    padding: var(--gap-small) var(--gap-medium);
    padding-bottom: calc(var(--gap-small) + env(safe-area-inset-bottom));
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: var(--gap-xs);
    z-index: var(--z-navigation);
    flex-shrink: 0;
}

.nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: var(--gap-xs);
    padding: var(--gap-small);
    border-radius: var(--border-radius-medium);
    background: transparent;
    border: none;
    color: var(--text-secondary);
    transition: transform 0.2s ease, color 0.2s ease, background-color 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
    cursor: pointer;
    min-height: var(--touch-target);
    position: relative;
    outline: none;
    -webkit-backface-visibility: hidden;
    backface-visibility: hidden;
    transform: translateZ(0);
    will-change: transform, opacity;
}

.nav-item::before {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: var(--border-radius-medium);
    background: transparent;
    transition: all 0.2s ease;
    z-index: -1;
}

.nav-item:hover::before {
    background: rgba(255, 255, 255, 0.05);
}

.nav-item.active {
    color: var(--text-primary);
}

.nav-item.active::before {
    background: linear-gradient(135deg, var(--primary-orange) 0%, #ff8c42 100%);
    box-shadow: 0 2px 8px rgba(255, 107, 53, 0.3);
}

.nav-item svg {
    width: clamp(18px, 5vw, 22px);
    height: clamp(18px, 5vw, 22px);
    transition: transform 0.2s ease;
    flex-shrink: 0;
}

.nav-item.active svg {
    transform: scale(1.05);
}

.nav-item span {
    font-size: var(--text-xs);
    font-weight: 500;
    line-height: 1;
    white-space: nowrap;
    text-align: center;
}

/* ================================
   ТИПОГРАФИКА
   ================================ */

/* removed unused .font-heading */

h1, h2, h3, h4, h5, h6, .text-2xl, .text-xl {
    font-family: 'Roboto Flex', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    font-variation-settings: 'wght' 700, 'wdth' 120, 'GRAD' -50;
    margin: 0 0 var(--gap-medium) 0;
    color: var(--text-primary);
    line-height: 1.3;
    text-align: left;
    display: flex;
    align-items: center;
}

.text-xs { font-size: var(--text-xs); }
.text-sm { font-size: var(--text-sm); }
.text-lg { font-size: var(--text-lg); }
.text-xl { font-size: var(--text-xl); }
.text-2xl { font-size: var(--text-2xl); }

.font-medium { font-weight: 500; }
.font-semibold { font-weight: 600; }
.font-bold { font-weight: 700; }
.text-center { text-align: center; }

/* ================================
   ЦВЕТА
   ================================ */

.bg-orange { background-color: var(--primary-orange); }
.text-orange { color: var(--primary-orange); }
.border-orange { border-color: var(--primary-orange); }
.text-white { color: var(--text-primary); }
.text-gray-600 { color: var(--text-secondary); }
.text-gray-700 { color: var(--text-tertiary); }
.text-gray-400 { color: var(--text-secondary); }
.text-black { color: var(--text-primary); }

/* ================================
   LAYOUT UTILITIES
   ================================ */

.flex { display: flex; }
.flex-col { flex-direction: column; }
.flex-1 { flex: 1 1 0%; }
.items-start { align-items: flex-start; }
.items-center { align-items: center; }
.justify-between { justify-content: space-between; }
.justify-center { justify-content: center; }
.grid { display: grid; }
.hidden { display: none; }
.pending-withdrawal-notice.hidden { display: none !important; }
.block { display: block; }

.gap-2 { gap: var(--gap-small); }
.gap-3 { gap: var(--gap-medium); }
.gap-4 { gap: var(--gap-large); }

.w-full { width: 100%; }
.w-12 { width: 3rem; }
.h-12 { height: 3rem; }

.p-2 { padding: 0.5rem; }
.p-3 { padding: 0.75rem; }
.p-4 { padding: var(--gap-large); }
.p-6 { padding: var(--gap-large); }
.px-3 { padding-left: 0.75rem; padding-right: 0.75rem; }
.px-4 { padding-left: var(--gap-large); padding-right: var(--gap-large); }
.py-2 { padding-top: 0.5rem; padding-bottom: 0.5rem; }
.py-4 { padding-top: var(--gap-large); padding-bottom: var(--gap-large); }

.mb-1 { margin-bottom: 0.25rem; }
.mb-2 { margin-bottom: 0.5rem; }
.mb-3 { margin-bottom: 0.75rem; }
.mb-4 { margin-bottom: var(--gap-large); }
.mb-6 { margin-bottom: var(--gap-large); }
.mt-4 { margin-top: var(--gap-large); }
.mr-2 { margin-right: 0.5rem; }
.mx-auto { margin-left: auto; margin-right: auto; }
.mx-4 { margin-left: var(--gap-large); margin-right: var(--gap-large); }

.rounded { border-radius: var(--border-radius-small); }
.rounded-lg { border-radius: var(--border-radius-large); }
.rounded-full { border-radius: 9999px; }

.border { border-width: 1px; }
.border-gray-200 { border-color: var(--background-secondary); }

.cursor-pointer { cursor: pointer; }
.transition { transition: all 0.3s ease; }
.duration-200 { transition-duration: 200ms; }

.fixed { position: fixed; }
.inset-0 { top: 0; right: 0; bottom: 0; left: 0; }
.z-50 { z-index: var(--z-modal); }

.min-h-screen { min-height: 100vh; min-height: 100dvh; }
.max-w-sm { max-width: 24rem; }

/* ================================
   КАРТОЧКИ И КОМПОНЕНТЫ
   ================================ */

.stats-unified-card,
.step-card,
.info-card,
.payout-card,
.education-card,
.user-referral-unified-card {
    
    background: linear-gradient(135deg, rgba(28, 28, 30, 0.9) 0%, rgba(42, 42, 46, 0.8) 100%);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid var(--border-subtle);
    border-radius: var(--border-radius-large);
    padding: var(--gap-large);
    transition: all 0.3s ease;
    margin-bottom: var(--gap-medium);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
}

/* ================================
   КАРТОЧКА ПОЛЬЗОВАТЕЛЯ
   ================================ */

/* removed unused .user-info-card */

/* ================================
   ОБЪЕДИНЕННАЯ КАРТОЧКА ПОЛЬЗОВАТЕЛЯ И РЕФЕРАЛЬНОЙ ССЫЛКИ
   ================================ */

.user-referral-unified-card {
    background: linear-gradient(135deg, 
        rgba(255, 149, 0, 0.08) 0%, 
        rgba(255, 149, 0, 0.03) 50%, 
        rgba(28, 28, 30, 0.9) 100%);
    border: 1px solid rgba(255, 149, 0, 0.2);
    border-radius: var(--border-radius-large);
    padding: var(--gap-large);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    position: relative;
    overflow: hidden;
    transition: all 0.3s ease;
    box-shadow: 
        0 4px 20px rgba(255, 149, 0, 0.1),
        0 2px 8px rgba(0, 0, 0, 0.15),
        inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

.user-info-section {
    display: flex;
    align-items: center;
    gap: var(--gap-large);
    margin-bottom: var(--gap-large);
}

.unified-card-divider {
    height: 2px;
    background: linear-gradient(90deg, 
        transparent 0%, 
        rgba(255, 149, 0, 0.2) 25%, 
        rgba(255, 149, 0, 0.8) 50%, 
        rgba(255, 149, 0, 0.2) 75%, 
        transparent 100%);
    margin: var(--gap-large) 0;
    position: relative;
    border-radius: 1px;
}

.referral-section {
    display: flex;
    flex-direction: column;
}

/* Обновленные стили для элементов внутри объединенной карточки */
.user-referral-unified-card .user-avatar {
    width: clamp(48px, 12vw, 56px);
    height: clamp(48px, 12vw, 56px);
    border-radius: 50%;
    overflow: hidden;
    flex-shrink: 0;
    position: relative;
    background: linear-gradient(135deg, var(--primary-orange) 0%, #ff8c42 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: none;
    border: 2px solid rgba(255, 255, 255, 0.15);
}

.user-referral-unified-card .user-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 50%;
}

.user-referral-unified-card .user-details {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: var(--gap-xs);
}

/* removed unused .user-info-row */

.user-referral-unified-card .user-name {
    color: var(--text-primary);
    font-size: var(--text-xl);
    font-weight: 700;
    margin: 0;
    line-height: 1.3;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    font-family: 'Roboto Flex', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    font-variation-settings: 'wght' 700, 'wdth' 115, 'GRAD' -30;
}

.user-referral-unified-card .user-telegram-id {
    color: var(--text-secondary);
    font-size: var(--text-sm);
    font-weight: 500;
    margin: 0;
    line-height: 1.4;
    font-family: 'SF Pro Display', monospace;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* removed unused .user-status-inline */

/* removed unused .status-indicator-small */

/* removed unused @keyframes pulse-small */

/* removed unused .status-text-small */

/* removed unused user status styles inside unified card */

.user-referral-unified-card .referral-title {
    color: var(--text-primary);
    font-weight: 600;
    font-size: var(--text-lg);
    margin: 0 0 var(--gap-medium) 0;
    display: flex;
    align-items: center;
    gap: var(--gap-small);
    text-align: left;
    line-height: 1.4;
}

.user-referral-unified-card .referral-title svg {
    color: var(--primary-orange);
    flex-shrink: 0;
}

.user-referral-unified-card .referral-input-container {
    display: flex;
    align-items: center;
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(255, 149, 0, 0.2);
    border-radius: var(--border-radius-medium);
    padding: 4px;
    transition: all 0.3s ease;
    margin-bottom: var(--gap-large);
}

.user-referral-unified-card .referral-input {
    background: transparent;
    border: none;
    color: var(--text-primary);
    font-size: var(--text-base);
    padding: var(--gap-medium);
    flex: 1;
    outline: none;
    font-family: 'SF Pro Display', monospace;
    width: 100%;
}

.user-referral-unified-card .referral-copy-btn {
    background: linear-gradient(135deg, var(--primary-orange) 0%, #FF7A00 100%);
    color: var(--text-primary);
    border: none;
    border-radius: var(--border-radius-medium);
    padding: var(--gap-medium) var(--gap-large);
    font-weight: 600;
    font-size: var(--text-sm);
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--gap-small);
    width: 100%;
    min-height: var(--touch-target);
    -webkit-tap-highlight-color: transparent;
}

/* removed unused @keyframes pulse */

/* Адаптивные стили для объединенной карточки */
@media (max-width: 360px) {
    .user-referral-unified-card {
        padding: var(--gap-medium);
    }
    
    .user-info-section {
        gap: var(--gap-medium);
        margin-bottom: var(--gap-medium);
    }
    
    .unified-card-divider {
        margin: var(--gap-medium) 0;
    }
    
    .user-referral-unified-card .user-avatar {
        width: clamp(48px, 12vw, 56px);
        height: clamp(48px, 12vw, 56px);
    }
    
    /* removed unused .avatar-status-indicator */
    
    .user-referral-unified-card .user-name {
        font-size: var(--text-lg);
    }
    
    .user-referral-unified-card .user-telegram-id {
        font-size: var(--text-xs);
    }
    
    /* removed unused .user-info-row responsive styles */
    
    /*
    .user-status-text {
        align-self: flex-end;
        font-size: clamp(9px, 2vw, 10px);
    }
    */
}

@media (max-height: 500px) {
    .user-referral-unified-card {
        padding: var(--gap-medium);
    }
    
    .user-info-section {
        gap: var(--gap-medium);
        margin-bottom: var(--gap-medium);
    }
    
    .unified-card-divider {
        margin: var(--gap-small) 0;
    }
    
    /* removed unused .user-info-row and .user-status-text responsive styles */
}

/* Стили для обратной совместимости (если используются старые классы) */
.user-avatar {
    width: clamp(56px, 15vw, 70px);
    height: clamp(56px, 15vw, 70px);
    border-radius: 50%;
    overflow: hidden;
    flex-shrink: 0;
    position: relative;
    background: linear-gradient(135deg, var(--primary-orange) 0%, #ff8c42 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 
        0 4px 16px rgba(255, 149, 0, 0.3),
        0 2px 8px rgba(0, 0, 0, 0.2),
        inset 0 1px 0 rgba(255, 255, 255, 0.2);
    border: 2px solid rgba(255, 255, 255, 0.15);
}

.user-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 50%;
}

.user-details {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: var(--gap-xs);
}

.user-name {
    color: var(--text-primary);
    font-size: var(--text-xl);
    font-weight: 700;
    margin: 0;
    line-height: 1.3;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    font-family: 'Roboto Flex', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    font-variation-settings: 'wght' 700, 'wdth' 115, 'GRAD' -30;
}

.user-telegram-id {
    color: var(--text-secondary);
    font-size: var(--text-sm);
    font-weight: 500;
    margin: 0;
    line-height: 1.4;
    font-family: 'SF Pro Display', monospace;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    flex: 1;
}

/* removed unused global user status styles */

/* ================================
   РЕФЕРАЛЬНАЯ КАРТОЧКА
   ================================ */

/* removed unused standalone referral-card styles (unified card styles retained) */

/* ================================
   СТАТИСТИКА
   ================================ */

.stats-unified-card {
    background: linear-gradient(135deg, rgba(28, 28, 30, 0.9) 0%, rgba(42, 42, 46, 0.8) 100%);
    border: 1px solid var(--border-subtle);
    border-radius: var(--border-radius-large);
    padding: 0;
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
    box-shadow: 
        0 2px 8px rgba(0, 0, 0, 0.15),
        inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

.stats-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: var(--gap-large);
    position: relative;
    z-index: 1;
    transition: all 0.2s ease;
    min-height: var(--touch-target);
}

.stats-row-highlight {
        background: linear-gradient(135deg, 
        rgba(255, 149, 0, 0.12) 0%, 
        rgba(255, 149, 0, 0.06) 50%, 
        transparent 100%);
}

.stats-label {
    color: var(--text-secondary);
    font-size: var(--text-sm);
    font-weight: 500;
    line-height: 1.4;
    flex: 1;
}

.stats-value {
    color: var(--text-primary);
    font-weight: 700;
    font-size: var(--text-lg);
    line-height: 1.2;
    text-align: right;
    white-space: nowrap;
}

.stats-value-orange {
    color: var(--primary-orange);
}

.stats-divider {
    height: 1px;
    background: linear-gradient(90deg, 
        transparent 0%, 
        rgba(255, 255, 255, 0.08) 20%, 
        rgba(255, 255, 255, 0.12) 50%, 
        rgba(255, 255, 255, 0.08) 80%, 
            transparent 100%);
    margin: 0 var(--gap-large);
}

/* ================================
   ШАГИ
   ================================ */

.step-card {
    background: linear-gradient(135deg, rgba(28, 28, 30, 0.9) 0%, rgba(42, 42, 46, 0.8) 100%);
    border: 1px solid var(--border-subtle);
    border-radius: var(--border-radius-large);
    padding: var(--gap-large);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
    display: flex;
    align-items: center;
    gap: var(--gap-large);
    box-shadow: 
        0 2px 8px rgba(0, 0, 0, 0.15),
        inset 0 1px 0 rgba(255, 255, 255, 0.08);
    min-height: var(--touch-target);
}

.step-card-highlight {
    background: linear-gradient(135deg, 
        rgba(255, 149, 0, 0.15) 0%, 
        rgba(255, 149, 0, 0.08) 50%, 
        rgba(28, 28, 30, 0.9) 100%);
    border-color: rgba(255, 149, 0, 0.3);
}

.step-number {
    width: 2.5rem;
    height: 2.5rem;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: var(--border-radius-medium);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-primary);
    flex-shrink: 0;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    font-weight: 700;
    font-size: var(--text-sm);
}

.step-number-highlight {
    background: linear-gradient(135deg, rgba(255, 149, 0, 0.8) 0%, rgba(255, 149, 0, 0.6) 100%);
    border-color: rgba(255, 149, 0, 0.4);
    color: var(--text-primary);
    box-shadow: 0 2px 8px rgba(255, 149, 0, 0.3);
}

.step-content {
    flex: 1;
    display: flex;
    align-items: center;
}

.step-text {
    color: var(--text-primary);
    font-size: var(--text-base);
    font-weight: 500;
    line-height: 1.4;
}

.step-text strong {
    color: var(--primary-orange);
    font-weight: 700;
}

/* ================================
   КНОПКИ
   ================================ */

.btn-primary,
.btn-secondary,
.btn-withdraw-large,
.referral-copy-btn {
    min-height: var(--touch-target);
    padding: var(--gap-medium) var(--gap-large);
    border-radius: var(--border-radius-medium);
    font-size: var(--text-sm);
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.2s ease, background-color 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease, color 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--gap-small);
    width: 100%;
    border: none;
    outline: none;
    line-height: 1.4;
    -webkit-backface-visibility: hidden;
    backface-visibility: hidden;
    transform: translateZ(0);
    will-change: transform, opacity;
}

.btn-primary {
    background: linear-gradient(145deg, var(--primary-orange) 0%, #ff8c42 100%);
    color: var(--text-primary);
    box-shadow: 0 4px 20px rgba(255, 149, 0, 0.2);
}

.btn-withdraw-large {
    background: rgba(58, 58, 60, 0.6);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    color: var(--text-secondary);
    border: 1px solid var(--border-subtle);
    cursor: not-allowed;
    min-height: calc(var(--touch-target) + 8px);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
}

.btn-withdraw-large.enabled {
    background: linear-gradient(145deg, var(--primary-orange) 0%, #ff8c42 100%);
    color: var(--text-primary);
    cursor: pointer;
    border-color: rgba(255, 149, 0, 0.4);
    box-shadow: 0 4px 20px rgba(255, 149, 0, 0.2);
}

.btn-secondary {
    background: rgba(44, 44, 46, 0.8);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    color: var(--text-primary);
    border: 1px solid var(--border-subtle);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
}

/* ================================
   ИНПУТЫ
   ================================ */

.input-modern {
    background-color: var(--background-card);
    border: 1px solid var(--background-secondary);
    border-radius: var(--border-radius-medium);
    padding: var(--gap-large);
    font-size: var(--text-base);
    transition: all 0.2s ease;
    width: 100%;
    color: var(--text-primary);
    min-height: var(--touch-target);
}

.input-modern:focus {
    outline: none;
    border-color: var(--primary-orange);
    background-color: var(--background-secondary);
    box-shadow: 0 0 0 3px rgba(255, 149, 0, 0.1);
}

.input-modern::placeholder {
    color: var(--text-secondary);
}

/* ================================
   ИНФОРМАЦИОННЫЕ КАРТОЧКИ
   ================================ */

.info-card {
    background: linear-gradient(135deg, rgba(28, 28, 30, 0.9) 0%, rgba(42, 42, 46, 0.8) 100%);
    border: 1px solid var(--border-subtle);
    border-radius: var(--border-radius-large);
    padding: var(--gap-large);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
    box-shadow: 
        0 2px 8px rgba(0, 0, 0, 0.15),
        inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

.info-content {
    display: flex;
    flex-direction: column;
    gap: var(--gap-small);
    position: relative;
    z-index: 1;
}

.info-text {
    color: var(--text-primary);
    font-size: var(--text-base);
    font-weight: 500;
    line-height: 1.4;
    margin: 0;
}

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

.info-highlight {
    color: var(--text-secondary);
    font-size: var(--text-sm);
    font-weight: 500;
    line-height: 1.4;
    margin: 0;
}

/* ================================
   ВЫПЛАТЫ
   ================================ */

.payouts-container {
    display: flex;
    flex-direction: column;
    gap: var(--gap-medium);
}

.payout-card {
    background: linear-gradient(135deg, rgba(28, 28, 30, 0.9) 0%, rgba(42, 42, 46, 0.8) 100%);
    border: 1px solid var(--border-subtle);
    border-radius: var(--border-radius-large);
    padding: var(--gap-large);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
    box-shadow: 
        0 2px 8px rgba(0, 0, 0, 0.15),
        inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

.payout-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: var(--gap-large);
    position: relative;
    z-index: 1;
}

.payout-status {
    display: flex;
    align-items: center;
    gap: var(--gap-small);
    font-size: var(--text-sm);
    font-weight: 500;
}

.payout-amount {
    font-size: var(--text-xl);
    font-weight: 700;
    color: var(--text-primary);
}

.payout-details {
    display: flex;
    flex-direction: column;
    gap: var(--gap-small);
    position: relative;
    z-index: 1;
}

.payout-detail {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: var(--text-sm);
}

.payout-detail span:first-child {
    color: var(--text-secondary);
    font-weight: 500;
}

.payout-detail span:last-child {
    color: var(--text-primary);
    font-weight: 500;
    text-align: right;
}

/* Статусы выплат */
.payout-completed {
    border-color: rgba(52, 199, 89, 0.3);
    background: linear-gradient(135deg, 
        rgba(52, 199, 89, 0.12) 0%, 
        rgba(52, 199, 89, 0.05) 50%, 
        rgba(28, 28, 30, 0.9) 100%);
}

.payout-completed .payout-status {
    color: #34C759;
}

.payout-completed .payout-amount {
    color: #34C759;
}

.payout-processing {
    border-color: rgba(255, 149, 0, 0.3);
    background: linear-gradient(135deg, 
        rgba(255, 149, 0, 0.12) 0%, 
        rgba(255, 149, 0, 0.05) 50%, 
        rgba(28, 28, 30, 0.9) 100%);
}

.payout-processing .payout-status {
    color: var(--primary-orange);
}

.payout-processing .payout-amount {
    color: var(--primary-orange);
}

.payout-pending {
    border-color: rgba(142, 142, 147, 0.3);
    background: linear-gradient(135deg, 
        rgba(142, 142, 147, 0.08) 0%, 
        rgba(142, 142, 147, 0.03) 50%, 
        rgba(28, 28, 30, 0.9) 100%);
}

.payout-pending .payout-status {
    color: var(--text-secondary);
}

.payout-pending .payout-amount {
    color: var(--text-secondary);
}

/* ================================
   РЕФЕРАЛЫ
   ================================ */

.referrals-controls {
    display: flex;
    flex-direction: column;
    gap: var(--gap-large);
    margin-bottom: var(--gap-xl);
}

.referral-search-container {
    position: relative;
    display: flex;
    align-items: center;
}

.search-icon {
    position: absolute;
    left: var(--gap-large);
    color: var(--text-secondary);
    z-index: 2;
    pointer-events: none;
}

.referral-search-input {
    background: linear-gradient(135deg, rgba(28, 28, 30, 0.9) 0%, rgba(42, 42, 46, 0.8) 100%);
    border: 1px solid var(--border-subtle);
    border-radius: var(--border-radius-large);
    padding: var(--gap-medium) var(--gap-large) var(--gap-medium) calc(var(--gap-large) * 3);
    font-size: var(--text-base);
    color: var(--text-primary);
    width: 100%;
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    transition: all 0.3s ease;
    min-height: var(--touch-target);
    box-shadow: 
        0 2px 8px rgba(0, 0, 0, 0.15),
        inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

.referral-search-input::placeholder {
    color: var(--text-secondary);
    font-weight: 500;
}

.referral-search-input:focus {
    outline: none;
    border-color: rgba(255, 149, 0, 0.4);
    background: linear-gradient(135deg, rgba(42, 42, 46, 0.95) 0%, rgba(58, 58, 62, 0.9) 100%);
    box-shadow: 
        0 4px 20px rgba(255, 149, 0, 0.15),
        0 2px 8px rgba(0, 0, 0, 0.1),
        inset 0 1px 0 rgba(255, 255, 255, 0.1);
}

.referral-filters {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--gap-medium);
    margin-top: var(--gap-small);
}

.filter-btn {
    background: rgba(255, 255, 255, 0.06);
    border: 2px solid var(--border-subtle);
    border-radius: var(--border-radius-medium);
    padding: var(--gap-medium) var(--gap-large);
    font-size: var(--text-sm);
    font-weight: 500;
    color: var(--text-secondary);
    cursor: pointer;
    transition: none;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
    display: flex;
    align-items: center;
    gap: var(--gap-small);
    min-height: var(--touch-target);
    -webkit-tap-highlight-color: transparent;
    justify-content: center;
    white-space: nowrap;
    text-align: center;
}

.filter-btn.filter-active {
    background: linear-gradient(145deg, var(--primary-orange) 0%, #ff8c42 100%);
    border: none;
    color: var(--text-primary);
    box-shadow: none;
}

.filter-count {
    background: rgba(255, 255, 255, 0.15);
    border-radius: var(--border-radius-small);
    padding: 0.25rem 0.5rem;
    font-size: var(--text-xs);
    font-weight: 600;
    min-width: 1.5rem;
    text-align: center;
}

.filter-btn.filter-active .filter-count {
    background: rgba(255, 255, 255, 0.25);
    color: var(--text-primary);
}

.referrals-container {
    display: flex;
    flex-direction: column;
    gap: var(--gap-large);
}

.referral-item {
    background: linear-gradient(135deg, rgba(28, 28, 30, 0.95) 0%, rgba(42, 42, 46, 0.9) 100%);
    border: 1px solid var(--border-subtle);
    border-radius: var(--border-radius-large);
    padding: 0;
    transition: all 0.3s ease;
    cursor: pointer;
    overflow: hidden;
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    box-shadow: 
        0 2px 8px rgba(0, 0, 0, 0.15),
        inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

.referral-header {
    display: flex;
    align-items: center;
    padding: var(--gap-xl) var(--gap-large);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    min-height: calc(var(--touch-target) + var(--gap-large));
}

.referral-main-info {
    display: flex;
    align-items: center;
    gap: var(--gap-xl);
    flex: 1;
    min-width: 0;
}

.referral-avatar {
    width: clamp(48px, 12vw, 56px);
    height: clamp(48px, 12vw, 56px);
    border-radius: 50%;
    background: transparent;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-primary);
    font-weight: 700;
    font-size: var(--text-lg);
    flex-shrink: 0;
    box-shadow: none;
    border: none;
    outline: none;
    transition: all 0.2s ease;
    margin-right: var(--gap-medium);
}

.referral-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 50%;
    border: none;
    outline: none;
    display: block;
}

.referral-info {
    flex: 1;
    min-width: 0;
    padding: var(--gap-small) 0;
}

.referral-name {
    color: var(--text-primary);
    font-size: var(--text-lg);
    font-weight: 600;
    margin: 0 0 var(--gap-xs) 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    line-height: 1.3;
}

.referral-username {
    color: var(--text-secondary);
    font-size: var(--text-base);
    font-weight: 500;
    margin: 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    line-height: 1.4;
}

.referral-earning {
    color: var(--primary-orange);
    font-size: var(--text-xl);
    font-weight: 700;
    margin: 0;
    flex-shrink: 0;
    text-align: right;
    line-height: 1.2;
    padding: var(--gap-small) 0;
}

.referral-details {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0;
    background: rgba(255, 255, 255, 0.02);
    padding: var(--gap-medium) 0;
}

.referral-detail {
    padding: var(--gap-large) var(--gap-large);
    border-right: 1px solid rgba(255, 255, 255, 0.06);
    min-height: calc(var(--touch-target) + var(--gap-small));
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.referral-detail:last-child {
    border-right: none;
}

.referral-detail-label {
    color: var(--text-secondary);
    font-size: var(--text-xs);
    font-weight: 600;
    margin: 0 0 var(--gap-small) 0;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    line-height: 1;
}

.referral-detail-value {
    color: var(--text-primary);
    font-size: var(--text-base);
    font-weight: 600;
    margin: 0;
    line-height: 1.3;
    display: flex;
    align-items: center;
    gap: var(--gap-small);
}

.referral-status {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    padding: 0.25rem 0.5rem;
    border-radius: 6px;
    font-size: var(--text-xs);
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    line-height: 1;
}

.referral-status.status-registered {
    background: rgba(142, 142, 147, 0.15);
    color: var(--text-secondary);
}

.referral-status.status-paid {
    background: rgba(52, 199, 89, 0.15);
    color: #34C759;
}

.referral-status.status-renewed {
    background: rgba(255, 149, 0, 0.15);
    color: var(--primary-orange);
}

.load-more-container {
    display: flex;
    justify-content: center;
    align-items: center;
    margin-top: var(--gap-large);
}

.load-more-btn {
    background: transparent;
    border: 2px solid rgba(255, 149, 0, 0.3);
    border-radius: var(--border-radius-medium);
    padding: var(--gap-large);
    font-size: var(--text-sm);
    font-weight: 600;
    color: var(--primary-orange);
    cursor: pointer;
    transition: none;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--gap-medium);
    min-height: calc(var(--touch-target) + 8px);
    -webkit-tap-highlight-color: transparent;
}

.loading-indicator {
    display: flex;
    align-items: center;
    gap: var(--gap-medium);
    color: var(--text-secondary);
    font-size: var(--text-base);
    font-weight: 500;
}

.loading-spinner {
    width: 20px;
    height: 20px;
    border: 2px solid rgba(255, 149, 0, 0.2);
    border-top: 2px solid var(--primary-orange);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.end-message {
    display: flex;
    align-items: center;
    gap: var(--gap-medium);
    color: #34C759;
    font-size: var(--text-base);
    font-weight: 500;
}

.empty-state {
    text-align: center;
    padding: 3rem var(--gap-large);
    color: var(--text-secondary);
}

.empty-state svg {
    width: 48px;
    height: 48px;
    margin: 0 auto var(--gap-large);
    opacity: 0.5;
}

.empty-state h3 {
    font-size: var(--text-xl);
    font-weight: 600;
    margin-bottom: var(--gap-small);
    color: var(--text-primary);
}

.empty-state p {
    font-size: var(--text-base);
    line-height: 1.5;
}

/* Секция ошибки (локальная) */
.section-error {
    background: linear-gradient(135deg, rgba(28, 28, 30, 0.95) 0%, rgba(42, 42, 46, 0.9) 100%);
    border: 1px solid var(--border-subtle);
    border-radius: var(--border-radius-large);
    padding: var(--gap-xl);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--gap-medium);
    text-align: center;
}

.section-error .error-icon {
    color: var(--primary-orange);
}

.section-error .error-title {
    color: var(--text-primary);
    font-weight: 700;
    font-size: var(--text-lg);
}

.section-error .error-subtitle {
    color: var(--text-secondary);
    font-size: var(--text-sm);
}

.section-error .retry-btn {
    width: auto;
    min-width: 160px;
}

/* Секция пустого состояния (как ошибка по стилю) */
.section-empty {
    background: linear-gradient(135deg, rgba(28, 28, 30, 0.95) 0%, rgba(42, 42, 46, 0.9) 100%);
    border: 1px solid var(--border-subtle);
    border-radius: var(--border-radius-large);
    padding: var(--gap-xl);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--gap-medium);
    text-align: center;
}

.section-empty .empty-icon {
    color: var(--text-secondary);
}

.section-empty .empty-title {
    color: var(--text-primary);
    font-weight: 700;
    font-size: var(--text-lg);
}

.section-empty .empty-subtitle {
    color: var(--text-secondary);
    font-size: var(--text-sm);
}

/* Skeletons */
.skeleton {
    position: relative;
    overflow: hidden;
}

.skeleton::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, rgba(255,255,255,0) 0%, rgba(255,255,255,0.12) 50%, rgba(255,255,255,0) 100%);
    transform: translateX(-100%);
    animation: shimmer 1.2s infinite;
    will-change: transform;
}

@keyframes shimmer {
    0% { transform: translateX(-100%); }
    100% { transform: translateX(100%); }
}

.skeleton-line, .skeleton-badge {
    background: rgba(255, 255, 255, 0.08);
    border-radius: 8px;
}

/* Улучшения для загрузки рефералов */
.referral-item.skeleton {
    pointer-events: none;
}

.referral-item.loaded {
    animation: fadeIn 0.2s ease-out;
}

/* Исправление отступов внутри referral skeleton */
.referral-item.skeleton .referral-info .skeleton-line + .skeleton-line {
    margin-top: var(--gap-xs);
}

.referral-item.skeleton .referral-details {
    padding: var(--gap-medium) 0;
}

.referral-item.skeleton .referral-detail {
    padding: var(--gap-small) var(--gap-large);
}

.skeleton-avatar {
    width: clamp(48px, 12vw, 56px);
    height: clamp(48px, 12vw, 56px);
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.08);
    flex-shrink: 0;
    margin-right: var(--gap-medium);
}

/* ================================
   ОБУЧЕНИЕ
   ================================ */

.education-container {
    display: flex;
    flex-direction: column;
    gap: var(--gap-large);
}

.education-card {
    background: linear-gradient(135deg, #1a1a1a 0%, #252525 100%);
    border: 1px solid var(--border-subtle);
    border-radius: var(--border-radius-large);
    padding: var(--gap-large);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.education-card-featured {
    background: linear-gradient(135deg, #ff6b35 0%, #ff8c42 100%);
    color: var(--text-primary);
    border: none;
}

.education-header {
    display: flex;
    align-items: flex-start;
    gap: var(--gap-large);
    margin-bottom: var(--gap-large);
}

.education-icon {
    width: 48px;
    height: 48px;
    border-radius: var(--border-radius-medium);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: all 0.3s ease;
}

/* Цветные фоны для иконок обучения */
.education-icon-chat {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    color: #ffffff;
}

.education-icon-guide {
    background: linear-gradient(135deg, #ff9500 0%, #d97706 100%);
    color: #ffffff;
}

.education-icon-course {
    background: linear-gradient(135deg, #3b82f6 0%, #1d4ed8 100%);
}

.education-icon-strategy {
    background: linear-gradient(135deg, #8b5cf6 0%, #7c3aed 100%);
}

.education-icon-materials {
    background: linear-gradient(135deg, #8b5cf6 0%, #7c3aed 100%);
    color: #ffffff;
}

.education-icon-webinar {
    background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
}

.education-card-featured .education-icon {
    background: rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(10px);
}

.education-info {
    flex: 1;
}

.education-title {
    font-size: var(--text-lg);
    font-weight: 600;
    color: var(--text-primary);
    margin: 0 0 0.25rem 0;
    line-height: 1.4;
    text-align: left;
    display: flex;
    align-items: center;
    min-height: 1.5em;
}

.education-subtitle {
    font-size: var(--text-sm);
    color: #9ca3af;
    margin: 0;
    text-align: left;
    line-height: 1.4;
}

.education-card-featured .education-subtitle {
    color: rgba(255, 255, 255, 0.8);
}

.education-progress {
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.1);
    border-radius: var(--border-radius-small);
    padding: var(--gap-small) var(--gap-medium);
    min-width: 60px;
}

.progress-text {
    font-size: var(--text-sm);
    font-weight: 600;
    color: var(--text-primary);
}

.education-card-featured .education-progress {
    background: rgba(255, 255, 255, 0.2);
}

.education-status {
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(156, 163, 175, 0.2);
    border-radius: var(--border-radius-small);
    padding: var(--gap-small);
    color: #9ca3af;
}

.education-status-locked {
    background: rgba(239, 68, 68, 0.2);
    color: #ef4444;
}

.education-badge {
    background: linear-gradient(135deg, #ff6b35 0%, #ff8c42 100%);
    color: var(--text-primary);
    padding: 0.25rem var(--gap-medium);
    border-radius: var(--border-radius-medium);
    font-size: var(--text-xs);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.education-time {
    background: rgba(255, 255, 255, 0.1);
    color: var(--text-primary);
    padding: var(--gap-small) var(--gap-medium);
    border-radius: var(--border-radius-small);
    font-size: var(--text-sm);
    font-weight: 500;
}

.education-description {
    color: #d1d5db;
    line-height: 1.6;
    margin-bottom: var(--gap-large);
    font-size: var(--text-base);
}

.education-card-featured .education-description {
    color: rgba(255, 255, 255, 0.9);
}

.education-requirement {
    color: #9ca3af;
    font-size: var(--text-sm);
    font-style: italic;
    margin-top: var(--gap-large);
    padding: var(--gap-medium);
    background: rgba(156, 163, 175, 0.1);
    border-radius: var(--border-radius-small);
    border-left: 3px solid #9ca3af;
}

.education-progress-bar {
    background: rgba(255, 255, 255, 0.1);
    border-radius: var(--border-radius-small);
    height: 8px;
    margin-bottom: var(--gap-large);
    overflow: hidden;
}

.progress-bar-fill {
    background: linear-gradient(90deg, var(--text-primary) 0%, rgba(255, 255, 255, 0.8) 100%);
    height: 100%;
    border-radius: var(--border-radius-small);
    transition: width 0.5s ease;
}

.education-btn {
    padding: var(--gap-medium) var(--gap-large);
    border-radius: var(--border-radius-medium);
    font-weight: 600;
    font-size: var(--text-sm);
    transition: none;
    cursor: pointer;
    border: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: var(--gap-small);
    text-decoration: none;
    width: 100%;
    min-height: var(--touch-target);
    -webkit-tap-highlight-color: transparent;
}

.education-btn-primary {
    background: linear-gradient(145deg, var(--primary-orange) 0%, #ff8c42 100%);
    color: var(--text-primary);
    box-shadow: none;
}

.education-btn-outline {
    background: transparent;
    color: var(--primary-orange);
    border: 2px solid rgba(255, 149, 0, 0.3);
}

.education-card-featured .education-btn-outline {
    border-color: rgba(255, 255, 255, 0.3);
}

/* ================================
   МОДАЛЬНЫЕ ОКНА
   ================================ */

.bg-black {
    background-color: rgba(0, 0, 0, 0.8);
}

.bg-opacity-50 {
    background-color: rgba(0, 0, 0, 0.5);
}

.bg-white {
    background-color: var(--background-card);
}

/* removed unused .text-muted and .text-emphasis */

/* ================================
   СПЕЦИАЛЬНЫЕ МЕДИА-ЗАПРОСЫ
   ================================ */

/* Очень маленькие экраны */
@media (max-width: 360px) {
    :root {
        --content-padding: clamp(6px, 2vw, 12px);
        --gap-small: clamp(3px, 0.8vw, 6px);
        --gap-medium: clamp(6px, 1.5vw, 9px);
        --gap-large: clamp(9px, 2.5vw, 12px);
        --touch-target: clamp(40px, 11vw, 44px);
    }
    
    .referral-filters {
        gap: var(--gap-small);
        grid-template-columns: 1fr 1fr;
    }
    
    .filter-btn {
        padding: var(--gap-small) var(--gap-medium);
        font-size: var(--text-xs);
        min-height: var(--touch-target);
    }
    
    .filter-count {
        padding: 0.125rem 0.25rem;
        font-size: clamp(8px, 2vw, 10px);
        min-width: 1.25rem;
    }
}

/* Экраны с низкой высотой (landscape) */
@media (max-height: 500px) {
    .app-header {
        padding: var(--gap-small) var(--content-padding);
    }
    
    .screens-container {
        padding: var(--gap-small) var(--content-padding);
    }
    
    .bottom-nav {
        padding: var(--gap-xs) var(--gap-small);
    }
    
    .nav-item {
        flex-direction: row;
        gap: var(--gap-xs);
        min-height: var(--touch-small);
    }
    
    .referral-filters {
        grid-template-columns: 1fr 1fr;
        gap: var(--gap-small);
    }
}

/* Высокие экраны (много места) */
@media (min-height: 800px) {
    :root {
        --content-padding: clamp(12px, 3vw, 20px);
        --gap-large: clamp(16px, 4vw, 20px);
    }
    
    .referral-filters {
        grid-template-columns: 1fr 1fr;
        gap: var(--gap-large);
    }
    
    .filter-btn {
        min-height: calc(var(--touch-target) + var(--gap-small));
        padding: var(--gap-large);
    }
}

/* Поддержка безопасных зон */
@supports (padding: max(0px)) {
    .app-header {
        padding-top: max(var(--gap-medium), env(safe-area-inset-top));
    }
    
    .screens-container {
        padding-bottom: calc(var(--content-padding) + var(--touch-large) + max(0px, env(safe-area-inset-bottom)));
    }
}

/* Компактные карточки для всех экранов */
.step-card {
    gap: var(--gap-large);
    min-height: calc(var(--touch-target) + 4px);
}

.step-number {
    width: clamp(32px, 8vw, 40px);
    height: clamp(32px, 8vw, 40px);
    border-radius: var(--border-radius-medium);
    font-size: var(--text-sm);
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.15);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-primary);
    flex-shrink: 0;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    font-weight: 700;
}

.stats-row {
    padding: var(--gap-medium) var(--gap-large);
    min-height: var(--touch-target);
}

.stats-divider {
    margin: 0 var(--gap-large);
}

.referral-header {
    padding: var(--gap-medium) var(--gap-large);
}

.referral-detail {
    padding: var(--gap-small) var(--gap-large);
}

.referral-avatar {
    width: clamp(36px, 9vw, 44px);
    height: clamp(36px, 9vw, 44px);
    font-size: var(--text-sm);
    border-radius: 50%;
    background: transparent;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-primary);
    font-weight: 700;
    flex-shrink: 0;
    box-shadow: none;
    border: none;
    outline: none;
    transition: all 0.2s ease;
}

.referral-main-info {
    gap: var(--gap-large);
}

/* Высокая плотность пикселей */
@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) {
    .stats-unified-card,
    .step-card,
    .info-card,
    .payout-card,
    .referral-item,
    .education-card {
        border-width: 0.5px;
    }
}

/* Accessibility и touch эффекты */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
    
    .screen {
        animation: none;
    }
}

/* Touch эффекты для мобильных */
@media (hover: none) and (pointer: coarse) {
    .nav-item:active,
    .btn-primary:active,
    .btn-secondary:active,
    .btn-withdraw-large:active {
        transform: scale(0.95);
        transition: transform 0.1s ease;
    }
    
    .stats-unified-card:active,
    .step-card:active,
    .info-card:active,
    .payout-card:active,
    .referral-item:active {
        transform: scale(0.98);
        transition: transform 0.1s ease;
    }
}

/* Hover эффекты для desktop */
@media (hover: hover) and (pointer: fine) {
    .btn-primary:hover,
    .btn-secondary:hover,
    .btn-withdraw-large.enabled:hover {
        transform: translateY(-1px);
        box-shadow: 0 6px 24px rgba(255, 149, 0, 0.3);
    }
    
    .stats-unified-card:hover,
    .step-card:hover,
    .info-card:hover,
    .payout-card:hover {
        transform: translateY(-1px);
        border-color: var(--border-medium);
    }
}

/* Высокий контраст */
@media (prefers-contrast: high) {
    :root {
        --border-subtle: rgba(255, 255, 255, 0.3);
        --border-medium: rgba(255, 255, 255, 0.5);
        --text-secondary: #ffffff;
    }
}

/* Темная тема (если поддерживается системой) */
@media (prefers-color-scheme: dark) {
    :root {
        --background-dark: #000000;
        --background-card: #0a0a0a;
        --background-secondary: #1a1a1a;
        --border-subtle: rgba(255, 255, 255, 0.08);
        --border-medium: rgba(255, 255, 255, 0.15);
    }
}

/* removed duplicate .user-referral-unified-card .referral-input */

.user-referral-unified-card .referral-copy-icon-btn {
    background: rgba(255, 149, 0, 0.1);
    border: none;
    border-radius: var(--border-radius-small);
    padding: 8px;
    color: var(--primary-orange);
    cursor: pointer;
    transition: transform 0.2s ease, background-color 0.2s ease, border-color 0.2s ease, color 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 36px;
    min-height: 36px;
    margin-right: 4px;
    -webkit-tap-highlight-color: transparent;
    -webkit-backface-visibility: hidden;
    backface-visibility: hidden;
    transform: translateZ(0);
    will-change: transform, opacity;
}

.user-referral-unified-card .referral-copy-icon-btn:hover {
    background: rgba(255, 149, 0, 0.2);
    transform: scale(1.05);
}

.user-referral-unified-card .referral-copy-icon-btn:active {
    background: rgba(255, 149, 0, 0.3);
    transform: scale(0.95);
}

/* Success состояние для кнопки копирования */
.user-referral-unified-card .referral-copy-icon-btn.success {
    background: rgba(52, 199, 89, 0.15);
    color: #34C759;
    border: 1px solid rgba(52, 199, 89, 0.3);
}

/* ================================
   УВЕДОМЛЕНИЕ О ЗАХОДЛИРОВАННОМ БАЛАНСЕ
   ================================ */

.pending-withdrawal-notice {
    background: linear-gradient(135deg, 
        rgba(255, 149, 0, 0.12) 0%, 
        rgba(255, 149, 0, 0.08) 50%, 
        rgba(28, 28, 30, 0.95) 100%);
    border: 1px solid rgba(255, 149, 0, 0.3);
    border-radius: var(--border-radius-large);
    padding: var(--gap-large);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    display: flex;
    align-items: center;
    gap: var(--gap-large);
    position: relative;
    overflow: hidden;
    box-shadow: 
        0 4px 20px rgba(255, 149, 0, 0.15),
        0 2px 8px rgba(0, 0, 0, 0.1),
        inset 0 1px 0 rgba(255, 255, 255, 0.08);
    transition: all 0.3s ease;
    animation: slideInUp 0.4s ease-out;
}

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

.pending-notice-icon {
    background: linear-gradient(135deg, rgba(255, 149, 0, 0.9) 0%, rgba(255, 140, 0, 0.95) 100%);
    border-radius: var(--border-radius-medium);
    padding: var(--gap-medium);
    color: var(--text-primary);
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 
        0 2px 8px rgba(255, 149, 0, 0.3),
        inset 0 1px 0 rgba(255, 255, 255, 0.2);
    width: clamp(48px, 12vw, 56px);
    height: clamp(48px, 12vw, 56px);
    border: 1px solid rgba(255, 149, 0, 0.4);
}

.pending-notice-content {
    flex: 1;
    min-width: 0;
}

.pending-notice-text {
    color: var(--text-primary);
    font-size: var(--text-base);
    font-weight: 500;
    line-height: 1.5;
    margin: 0;
}

.pending-notice-text span {
    color: var(--primary-orange);
    font-weight: 700;
}

/* Адаптивные стили для маленьких экранов */
@media (max-width: 360px) {
    .pending-withdrawal-notice {
        padding: var(--gap-medium);
        gap: var(--gap-medium);
    }
    
    .pending-notice-icon {
        width: clamp(40px, 10vw, 48px);
        height: clamp(40px, 10vw, 48px);
        padding: var(--gap-small);
    }
    
    .pending-notice-text {
        font-size: var(--text-sm);
    }
}

/* ================================
   КНОПКИ
   ================================ */