* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, sans-serif;
    background: #f5f7fa;
    color: #1a1f36;
    line-height: 1.6;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Шапка */
.header {
    background: white;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
    padding: 15px 0;
    position: sticky;
    top: 0;
    z-index: 100;
}

.header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-size: 24px;
    font-weight: 700;
    color: #3366FF;
    text-decoration: none;
}

.nav-menu {
    display: flex;
    gap: 30px;
    align-items: center;
}

.nav-menu a {
    text-decoration: none;
    color: #1a1f36;
    font-weight: 500;
}

.nav-menu a:hover {
    color: #3366FF;
}

.btn {
    padding: 10px 20px;
    border-radius: 8px;
    border: none;
    font-weight: 500;
    cursor: pointer;
    text-decoration: none;
    display: inline-block;
    font-size: 14px;
}

.btn-primary {
    background: #3366FF;
    color: white;
}

.btn-primary:hover {
    background: #2952cc;
}

.btn-outline {
    background: transparent;
    border: 1px solid #3366FF;
    color: #3366FF;
}

.btn-outline:hover {
    background: #f0f5ff;
}

.btn-success {
    background: #00C48C;
    color: white;
}

.btn-success:hover {
    background: #00a875;
}

.btn-danger {
    background: #ff3b30;
    color: white;
}

.btn-danger:hover {
    background: #e6352b;
}

/* Категории */
.categories-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 20px;
    margin: 40px 0;
}

.category-card {
    background: white;
    padding: 25px 20px;
    border-radius: 12px;
    text-align: center;
    text-decoration: none;
    color: #1a1f36;
    transition: transform 0.2s, box-shadow 0.2s;
    border: 1px solid #eef2f6;
}

.category-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
}

.category-name {
    font-weight: 600;
    font-size: 16px;
}

/* Карточки заказов */
.orders-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 25px;
    margin: 30px 0;
}

.order-card {
    background: white;
    border-radius: 12px;
    padding: 25px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.03);
    border: 1px solid #eef2f6;
    transition: all 0.2s;
}

.order-card:hover {
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
    border-color: #3366FF;
}

.order-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
}

.order-category {
    background: #f0f5ff;
    color: #3366FF;
    padding: 5px 10px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
}

.order-price {
    font-size: 20px;
    font-weight: 700;
    color: #00C48C;
}

.order-title {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 10px;
    color: #1a1f36;
}

.order-description {
    color: #666;
    margin-bottom: 20px;
    line-height: 1.5;
}

.order-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    color: #999;
    font-size: 13px;
}

/* Формы */
.form-container {
    max-width: 500px;
    margin: 50px auto;
    background: white;
    padding: 40px;
    border-radius: 20px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.1);
}

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

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    color: #1a1f36;
}

.form-control {
    width: 100%;
    padding: 12px 15px;
    border: 2px solid #eef2f6;
    border-radius: 8px;
    font-size: 15px;
    transition: border-color 0.2s;
}

.form-control:focus {
    outline: none;
    border-color: #3366FF;
}

textarea.form-control {
    min-height: 120px;
    resize: vertical;
}

/* Профиль */
.profile-header {
    background: white;
    border-radius: 20px;
    padding: 40px;
    margin: 40px 0;
    display: flex;
    gap: 40px;
    align-items: center;
}

.profile-avatar {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    background: #3366FF;
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 48px;
    font-weight: 600;
}

.profile-info h1 {
    font-size: 32px;
    margin-bottom: 10px;
}

.profile-stats {
    display: flex;
    gap: 30px;
    margin-top: 20px;
}

.stat {
    text-align: center;
}

.stat-value {
    font-size: 24px;
    font-weight: 700;
    color: #3366FF;
}

.stat-label {
    color: #666;
    font-size: 14px;
}

/* Детальная страница заказа */
.order-detail {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 30px;
    margin: 40px 0;
}

.order-main {
    background: white;
    padding: 30px;
    border-radius: 12px;
}

.order-sidebar {
    background: white;
    padding: 30px;
    border-radius: 12px;
    height: fit-content;
}

/* Сообщения */
.messages-container {
    background: white;
    border-radius: 12px;
    padding: 30px;
    margin: 40px 0;
}

.message {
    display: flex;
    gap: 15px;
    margin-bottom: 20px;
    padding: 15px;
    background: #f8f9fa;
    border-radius: 8px;
}

.message-sender {
    font-weight: 600;
    color: #3366FF;
}

.message-time {
    color: #999;
    font-size: 12px;
}

/* Баланс */
.balance-card {
    background: linear-gradient(135deg, #3366FF, #2541b2);
    color: white;
    padding: 40px;
    border-radius: 20px;
    margin: 40px 0;
    text-align: center;
}

.balance-amount {
    font-size: 64px;
    font-weight: 700;
    margin: 20px 0;
}

.balance-actions {
    display: flex;
    gap: 20px;
    justify-content: center;
}

.transactions-list {
    background: white;
    border-radius: 12px;
    padding: 30px;
}

.transaction-item {
    display: flex;
    justify-content: space-between;
    padding: 15px 0;
    border-bottom: 1px solid #eef2f6;
}

.transaction-item:last-child {
    border-bottom: none;
}

.transaction-positive {
    color: #00C48C;
    font-weight: 600;
}

.transaction-negative {
    color: #ff3b30;
    font-weight: 600;
}

/* Алерты */
.alert {
    padding: 15px 20px;
    border-radius: 8px;
    margin-bottom: 20px;
}

.alert-error {
    background: #fee;
    color: #c00;
    border: 1px solid #fcc;
}

.alert-success {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.alert-info {
    background: #d1ecf1;
    color: #0c5460;
    border: 1px solid #bee5eb;
}

/* Футер */
.footer {
    background: white;
    padding: 40px 0;
    margin-top: 80px;
    border-top: 1px solid #eef2f6;
}

.footer .container {
    display: flex;
    justify-content: space-between;
    color: #666;
}

/* Адаптивность */
@media (max-width: 768px) {
    .nav-menu {
        gap: 15px;
    }
    
    .orders-grid {
        grid-template-columns: 1fr;
    }
    
    .profile-header {
        flex-direction: column;
        text-align: center;
    }
    
    .profile-stats {
        justify-content: center;
    }
    
    .order-detail {
        grid-template-columns: 1fr;
    }
    
    .balance-amount {
        font-size: 48px;
    }
    
    .balance-actions {
        flex-direction: column;
    }
}