/* Стили для страницы личного кабинета my-account - дизайн как на фото */

.my-account-container {
    max-width: 400px;
    margin: 0 auto;
    padding: 20px;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: #f5f5f5;
    min-height: 100vh;
}

/* Заголовок профиля */
.profile-header {
    display: flex;
    align-items: center;
    background: white;
    padding: 20px;
    border-radius: 15px;
    margin-bottom: 20px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    position: relative;
}

.user-avatar {
    position: relative;
    margin-right: 15px;
}

.user-avatar img {
    width: 60px;
    height: 60px;
    border-radius: 50% !important;
    background: #ff6b35;
    border: 3px solid #ff6b35;
}

.crown-icon {
    position: absolute;
    top: -5px;
    right: -5px;
    background: #ffd700;
    border-radius: 50%;
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
}

.user-info {
    flex: 1;
}

.user-name {
    margin: 0 0 5px 0;
    font-size: 18px;
    font-weight: 600;
    color: #333;
}

.user-username {
    margin: 0 0 8px 0;
    font-size: 14px;
    color: #666;
}

.golden-client-badge {
    background: #ff6b35;
    color: white;
    padding: 4px 12px;
    border-radius: 15px;
    font-size: 12px;
    font-weight: 600;
    display: inline-block;
}

.header-actions {
    display: flex;
    gap: 15px;
}

.notification-icon, .settings-icon {
    font-size: 20px;
    cursor: pointer;
}

/* Иконка обновления */
.refresh-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
}
.refresh-icon img {
    width: 22px;
    height: 22px;
    display: block;
}
.refresh-icon[data-loading="1"] {
    opacity: 0.6;
}

/* Заполненность профиля */
.profile-completion-card {
    background: white;
    padding: 20px;
    border-radius: 15px;
    margin-bottom: 20px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.profile-completion-card h3 {
    margin: 0 0 15px 0;
    font-size: 16px;
    font-weight: 600;
    color: #333;
}

.progress-container {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 10px;
}

.progress-bar {
    flex: 1;
    height: 8px;
    background: #e0e0e0;
    border-radius: 4px;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    background: #ff6b35;
    border-radius: 4px;
    transition: width 0.3s ease;
}

.progress-text {
    font-size: 14px;
    font-weight: 600;
    color: #666;
}

.progress-hint {
    margin: 0;
    font-size: 12px;
    color: #999;
}

/* Кэшбек секция */
.cashback-section {
    background: linear-gradient(135deg, #ff6b35 0%, #ff8c42 100%);
    color: white;
    padding: 25px;
    border-radius: 15px;
    margin-bottom: 20px;
    box-shadow: 0 4px 15px rgba(255, 107, 53, 0.3);
    position: relative;
    overflow: hidden;
}

.cashback-info h3 {
    margin: 0 0 10px 0;
    font-size: 16px;
    font-weight: 500;
    opacity: 0.9;
}

.cashback-amount {
    font-size: 24px;
    font-weight: 700;
    margin-bottom: 20px;
}

.cashback-progress {
    position: absolute;
    top: 20px;
    right: 20px;
}

.circular-progress {
    width: 60px;
    height: 60px;
    position: relative;
}

.progress-circle {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    background: conic-gradient(from 0deg, white 0deg, white 245deg, rgba(255,255,255,0.3) 245deg);
    display: flex;
    align-items: center;
    justify-content: center;
}

.progress-percentage {
    font-size: 14px;
    font-weight: 700;
    color: white;
}

.next-level-info {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
    font-size: 14px;
}

.remaining-percent {
    font-weight: 600;
}

.gift-info {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 12px;
    opacity: 0.9;
}

.gift-icon {
    font-size: 16px;
}

/* Интерактивные карточки */
.interactive-cards {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
    margin-bottom: 20px;
}

.card {
    background: white;
    padding: 20px;
    border-radius: 15px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    display: flex;
    align-items: center;
    gap: 15px;
    cursor: pointer;
    transition: transform 0.2s ease;
}

.card:hover {
    transform: translateY(-2px);
}

.card-icon {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
}

.card-icon.purple {
    background: #e8d5ff;
    color: #8b5cf6;
}

.card-icon.green {
    background: #d1fae5;
    color: #10b981;
}

.card-icon.blue {
    background: #dbeafe;
    color: #3b82f6;
}

.card-icon.yellow {
    background: #fef3c7;
    color: #f59e0b;
}

.card-content {
    flex: 1;
}

.card-content h4 {
    margin: 0 0 5px 0;
    font-size: 14px;
    font-weight: 600;
    color: #333;
}

.card-content p {
    margin: 0;
    font-size: 12px;
    color: #666;
}

.card-count {
    text-align: right;
}

.count-number {
    display: block;
    font-size: 18px;
    font-weight: 700;
    color: #333;
}

.count-label {
    font-size: 12px;
    color: #666;
}

/* Дисконтная карта */
.discount-card-section {
    background: white;
    padding: 20px;
    border-radius: 15px;
    margin-bottom: 20px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.discount-card-section h3 {
    margin: 0 0 20px 0;
    font-size: 16px;
    font-weight: 600;
    color: #333;
}

.discount-card {
    text-align: center;
}

.discount-card .card-icon {
    font-size: 24px;
    margin-bottom: 10px;
}

.card-number {
    font-size: 14px;
    color: #666;
    margin-bottom: 20px;
}

.barcode-container {
    margin: 20px 0;
}

.barcode-number {
    font-size: 12px;
    color: #666;
    margin-bottom: 10px;
}

.barcode {
    width: 200px;
    height: 40px;
    background: repeating-linear-gradient(
        90deg,
        #000 0px,
        #000 2px,
        transparent 2px,
        transparent 4px
    );
    margin: 0 auto;
    border-radius: 4px;
}

.barcode-hint {
    font-size: 12px;
    color: #666;
    margin: 10px 0 20px 0;
}

.show-fullscreen-btn {
    background: #ff6b35;
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s ease;
}

.show-fullscreen-btn:hover {
    background: #e55a2b;
}

/* Нижняя навигация */
.bottom-navigation {
    display: flex;
    justify-content: space-around;
    background: white;
    padding: 15px 0;
    border-radius: 15px;
    box-shadow: 0 -2px 10px rgba(0,0,0,0.1);
    position: fixed;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: calc(100% - 40px);
    max-width: 360px;
}

.nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 5px;
    cursor: pointer;
    transition: color 0.2s ease;
}

.nav-item.active {
    color: #ff6b35;
}

.nav-item.active .nav-icon {
    background: #ff6b35;
    color: white;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
}

.nav-icon {
    font-size: 20px;
}

.nav-item span {
    font-size: 12px;
    font-weight: 500;
}

/* Стили для неавторизованных пользователей */
.not-logged-in-card {
    background: white;
    padding: 40px 20px;
    border-radius: 15px;
    text-align: center;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
    margin: 50px auto;
    max-width: 570px;
}

.auth-icon {
    font-size: 48px;
    margin-bottom: 20px;
}

.not-logged-in-card h3 {
    margin: 0 0 15px 0;
    font-size: 18px;
    font-weight: 600;
    color: #333;
}

.not-logged-in-card p {
    margin: 0 0 30px 0;
    font-size: 14px;
    color: #666;
    line-height: 1.5;
}

.auth-button-container {
    margin-top: 20px;
}

.auth-button-container #telegram-auth-button {
    background: linear-gradient(135deg, #ff6b35 0%, #ff8c42 100%);
    color: white;
    border: none;
    padding: 15px 30px;
    border-radius: 25px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.2s ease;
    box-shadow: 0 4px 15px rgba(255, 107, 53, 0.3);
}

.auth-button-container #telegram-auth-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(255, 107, 53, 0.4);
}

/* Адаптивность */
@media (max-width: 480px) {
    .my-account-container {
        padding: 15px;
    }
    
    .profile-header {
        padding: 15px;
    }
    
    .user-avatar img {
        width: 50px;
        height: 50px;
    }
    
    .user-name {
        font-size: 16px;
    }
    
    .interactive-cards {
        grid-template-columns: 1fr;
    }
    
    .card {
        padding: 15px;
    }
    
    .not-logged-in-card {
        margin: 20px auto;
        padding: 30px 15px;
    }
}

/* ===== Десктопная адаптация ===== */
@media (min-width: 768px) {
    .my-account-container {
        max-width: 720px;
    }
    /* Прячем мобильную нижнюю навигацию на планшетах и ПК */
    .bottom-navigation {
        display: none;
    }
}

@media (min-width: 1024px) {
    .my-account-container {
        max-width: 1100px;
    }
    .interactive-cards {
        grid-template-columns: repeat(3, 1fr);
        gap: 20px;
    }
    .cashback-section {
        padding: 30px;
    }
}

.my-account-header {
    display: flex;
    align-items: center;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 30px;
    border-radius: 15px;
    margin-bottom: 30px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
}

.user-avatar {
    margin-right: 20px;
}

.user-avatar img {
    border-radius: 50% !important;
    border: 3px solid rgba(255,255,255,0.3);
}

.user-info h2 {
    margin: 0 0 10px 0;
    font-size: 28px;
    font-weight: 600;
}

.user-info p {
    margin: 5px 0;
    opacity: 0.9;
}

.account-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.stat-card {
    background: white;
    padding: 25px;
    border-radius: 12px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.08);
    display: flex;
    align-items: center;
    transition: transform 0.2s ease;
}

.stat-card:hover {
    transform: translateY(-2px);
}

.stat-icon {
    font-size: 32px;
    margin-right: 15px;
}

.stat-info h3 {
    margin: 0;
    font-size: 24px;
    font-weight: 700;
    color: #333;
}

.stat-info p {
    margin: 5px 0 0 0;
    color: #666;
    font-size: 14px;
}

.recent-orders, .personal-data {
    background: white;
    padding: 25px;
    border-radius: 12px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.08);
    margin-bottom: 20px;
}

.recent-orders h3, .personal-data h3 {
    margin: 0 0 20px 0;
    font-size: 20px;
    font-weight: 600;
    color: #333;
}

.orders-list {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.order-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px;
    background: #f8f9fa;
    border-radius: 8px;
    border-left: 4px solid #667eea;
}

.order-info h4 {
    margin: 0 0 5px 0;
    font-size: 16px;
    font-weight: 600;
}

.order-date {
    margin: 0;
    color: #666;
    font-size: 14px;
}

.order-status {
    margin: 0 15px;
}

.status {
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
}

.status-completed {
    background: #d4edda;
    color: #155724;
}

.status-processing {
    background: #fff3cd;
    color: #856404;
}

.status-pending {
    background: #f8d7da;
    color: #721c24;
}

.order-total {
    font-weight: 600;
    color: #333;
}

.data-form {
    max-width: 600px;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #333;
}

.form-group input {
    width: 100%;
    padding: 12px;
    border: 2px solid #e1e5e9;
    border-radius: 8px;
    font-size: 16px;
    transition: border-color 0.2s ease;
}

.form-group input:focus {
    outline: none;
    border-color: #667eea;
}

.form-group input[readonly] {
    background: #f8f9fa;
    color: #666;
}

.form-group small {
    display: block;
    margin-top: 5px;
    color: #666;
    font-size: 12px;
}

.btn-primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    padding: 12px 30px;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.2s ease;
}

.btn-primary:hover {
    transform: translateY(-1px);
}

.my-account-not-logged-in {
    text-align: center;
    padding: 40px;
    background: white;
    border-radius: 12px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.08);
}

.my-account-not-logged-in h3 {
    margin: 0 0 20px 0;
    color: #333;
}

/* Адаптивность */
@media (max-width: 768px) {
    .my-account-container {
        padding: 15px;
    }

    .my-account-header {
        flex-direction: column;
        text-align: center;
    }

    .user-avatar {
        margin-right: 0;
        margin-bottom: 15px;
    }

    .form-row {
        grid-template-columns: 1fr;
    }

    .order-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }

    .order-status {
        margin: 0;
    }
}
