/* ============================================================
   ЗАКАЗЫ
   ============================================================ */
.orders-page, .order-detail-page {
    max-width: 1100px;
    margin: 0 auto;
    padding: 32px 16px 80px;
}

.orders-header { margin-bottom: 24px; }
.orders-title { font-size: 32px; font-weight: 700; color: #1a1a1a; margin: 0 0 6px; }
.orders-subtitle { font-size: 14px; color: #999; margin: 0; }

/* Роли */
.orders-roles { display: flex; gap: 8px; margin-bottom: 20px; }
.orders-role {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 24px;
    background: #f5f5f5;
    border-radius: 12px;
    font-size: 15px;
    font-weight: 600;
    color: #666;
    text-decoration: none;
    transition: all 0.15s;
}
.orders-role:hover { background: #e8e8e8; color: #1a1a1a; text-decoration: none; }
.orders-role.active { background: #00AAFF; color: #fff; }

/* Статистика */
.orders-stats { display: grid; grid-template-columns: repeat(5, 1fr); gap: 12px; margin-bottom: 24px; }
.orders-stat {
    padding: 16px;
    background: #fff;
    border: 2px solid #f0f0f0;
    border-radius: 12px;
    text-align: center;
}
.orders-stat-value { font-size: 26px; font-weight: 700; color: #1a1a1a; line-height: 1; margin-bottom: 6px; }
.orders-stat-label { font-size: 11px; color: #999; text-transform: uppercase; letter-spacing: 0.5px; font-weight: 600; }
.orders-stat-warning .orders-stat-value { color: #cc8800; }
.orders-stat-info .orders-stat-value { color: #0088cc; }
.orders-stat-success .orders-stat-value { color: #00A046; }
.orders-stat-danger .orders-stat-value { color: #cc3344; }

/* Фильтры */
.orders-filters { display: flex; gap: 8px; margin-bottom: 24px; flex-wrap: wrap; padding-bottom: 16px; border-bottom: 1px solid #f0f0f0; }
.orders-filter {
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 14px;
    font-weight: 500;
    color: #666;
    text-decoration: none;
    background: #f5f5f5;
    transition: all 0.15s;
}
.orders-filter:hover { background: #e8e8e8; color: #1a1a1a; text-decoration: none; }
.orders-filter.active { background: #1a1a1a; color: #fff; }

/* Список */
.orders-list { display: flex; flex-direction: column; gap: 12px; }
.order-card {
    display: grid;
    grid-template-columns: 100px 1fr 40px;
    gap: 20px;
    padding: 16px;
    background: #fff;
    border: 1px solid #f0f0f0;
    border-radius: 16px;
    text-decoration: none;
    color: inherit;
    transition: all 0.15s;
    align-items: center;
}
.order-card:hover { border-color: #00AAFF; text-decoration: none; color: inherit; box-shadow: 0 4px 16px rgba(0,0,0,0.05); }
.order-card-image { width: 100px; height: 100px; border-radius: 12px; overflow: hidden; background: #f5f5f5; }
.order-card-image img { width: 100%; height: 100%; object-fit: cover; }
.order-card-info { min-width: 0; }
.order-card-header { display: flex; align-items: flex-start; gap: 12px; margin-bottom: 8px; flex-wrap: wrap; }
.order-card-title { font-size: 16px; font-weight: 700; color: #1a1a1a; flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.order-card-status { display: inline-flex; align-items: center; gap: 4px; padding: 4px 10px; border-radius: 20px; font-size: 12px; font-weight: 600; white-space: nowrap; }
.order-status-warning { background: #fff8e6; color: #cc8800; }
.order-status-info { background: #e8f4ff; color: #0088cc; }
.order-status-primary { background: #e8f4ff; color: #0088cc; }
.order-status-success { background: #e8f9ed; color: #00A046; }
.order-status-danger { background: #fff0f0; color: #cc3344; }
.order-status-secondary { background: #f5f5f5; color: #666; }
.order-card-price { font-size: 20px; font-weight: 700; color: #1a1a1a; margin-bottom: 6px; }
.order-card-meta { display: flex; gap: 16px; flex-wrap: wrap; font-size: 12px; color: #999; margin-bottom: 4px; }
.order-card-party { font-size: 13px; color: #666; }
.order-card-arrow { color: #ccc; font-size: 20px; }

/* Пагинация */
.orders-pagination { display: flex; justify-content: center; gap: 6px; margin-top: 32px; flex-wrap: wrap; }
.orders-page-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 40px;
    height: 40px;
    padding: 0 12px;
    border-radius: 10px;
    background: #f5f5f5;
    color: #1a1a1a;
    font-size: 14px;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.15s;
}
.orders-page-link:hover { background: #e8e8e8; color: #1a1a1a; text-decoration: none; }
.orders-page-link.active { background: #00AAFF; color: #fff; }

/* Пусто */
.orders-empty { text-align: center; padding: 80px 20px; }
.orders-empty-title { font-size: 24px; font-weight: 700; color: #1a1a1a; margin: 16px 0 8px; }
.orders-empty-text { font-size: 15px; color: #999; margin: 0 0 24px; }

/* ============ ДЕТАЛЬНАЯ ============ */
.order-back {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: #666;
    text-decoration: none;
    font-size: 14px;
    margin-bottom: 16px;
}
.order-back:hover { color: #00AAFF; }
.order-detail-header { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; margin-bottom: 32px; flex-wrap: wrap; }
.order-detail-title { font-size: 28px; font-weight: 700; color: #1a1a1a; margin: 0 0 6px; }
.order-detail-date { font-size: 14px; color: #999; margin: 0; }
.order-detail-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 16px; margin-bottom: 32px; }
.order-detail-card { padding: 20px; background: #fff; border: 1px solid #f0f0f0; border-radius: 16px; }
.order-detail-section-title { font-size: 16px; font-weight: 700; color: #1a1a1a; margin: 0 0 16px; }
.order-product { display: flex; gap: 12px; text-decoration: none; color: inherit; margin-bottom: 16px; }
.order-product:hover { color: inherit; }
.order-product-image { width: 80px; height: 80px; border-radius: 10px; overflow: hidden; background: #f5f5f5; flex-shrink: 0; }
.order-product-image img { width: 100%; height: 100%; object-fit: cover; }
.order-product-info { min-width: 0; flex: 1; }
.order-product-title { font-size: 15px; font-weight: 700; color: #1a1a1a; margin-bottom: 4px; }
.order-product-price { font-size: 18px; font-weight: 700; color: #1a1a1a; margin-bottom: 4px; }
.order-product-qty { font-size: 13px; color: #999; }
.order-detail-total { display: flex; justify-content: space-between; align-items: center; padding-top: 16px; border-top: 1px solid #f0f0f0; font-size: 16px; }
.order-detail-total strong { font-size: 22px; color: #1a1a1a; }
.order-party { display: flex; align-items: center; gap: 12px; margin-bottom: 16px; }
.order-party-avatar { width: 48px; height: 48px; border-radius: 50%; background: #FFC107; color: #1a1a1a; display: flex; align-items: center; justify-content: center; font-size: 20px; font-weight: 700; flex-shrink: 0; overflow: hidden; }
.order-party-avatar img { width: 100%; height: 100%; object-fit: cover; }
.order-party-name { font-size: 15px; font-weight: 700; color: #1a1a1a; margin-bottom: 2px; }
.order-party-rating { font-size: 13px; color: #666; }
.order-detail-row { display: flex; justify-content: space-between; gap: 12px; padding: 10px 0; font-size: 14px; border-bottom: 1px solid #f5f5f5; }
.order-detail-row:last-child { border-bottom: none; }
.order-detail-row span { color: #999; }
.order-detail-row strong { color: #1a1a1a; text-align: right; }
.order-detail-comment { font-size: 14px; color: #2c3e50; line-height: 1.6; margin: 0; white-space: pre-wrap; }
.order-detail-actions { display: flex; gap: 12px; flex-wrap: wrap; }
.order-action-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 24px;
    border-radius: 12px;
    font-size: 15px;
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
    border: none;
    transition: all 0.15s;
    font-family: inherit;
}
.order-action-primary { background: #00AAFF; color: #fff; }
.order-action-primary:hover { background: #0088cc; color: #fff; }
.order-action-success { background: #00A046; color: #fff; }
.order-action-success:hover { background: #008037; color: #fff; }
.order-action-danger { background: #fff; color: #FF4053; border: 2px solid #FF4053; }
.order-action-danger:hover { background: #FF4053; color: #fff; }

/* Адаптив */
@media (max-width: 768px) {
    .orders-stats { grid-template-columns: repeat(3, 1fr); }
    .order-card { grid-template-columns: 80px 1fr; }
    .order-card-image { width: 80px; height: 80px; }
    .order-card-arrow { display: none; }
    .order-card-title { font-size: 14px; }
    .order-card-price { font-size: 18px; }
}
@media (max-width: 576px) {
    .orders-stats { grid-template-columns: repeat(2, 1fr); }
    .order-card { grid-template-columns: 1fr; }
    .order-card-image { width: 100%; height: 160px; }
    .order-detail-grid { grid-template-columns: 1fr; }
}