/* ===== ОСНОВНОЙ КОНТЕЙНЕР ===== */
.orders-container {
    max-width: 1200px;
    margin: 40px auto;
    padding: 0 20px;
    font-family: 'Segoe UI', 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
}

/* ===== ЗАГОЛОВОК СТРАНИЦЫ ===== */
.orders-title {
    font-size: 2.2rem;
    color: #1a2d28;
    margin-bottom: 35px;
    font-weight: 700;
    text-align: center;
    position: relative;
    padding-bottom: 15px;
}

.orders-title::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 80px;
    height: 4px;
    background: linear-gradient(90deg, #4a7a5a, #5c8b7b);
    border-radius: 2px;
}

/* ===== ЗАГОЛОВОК РАЗДЕЛА ===== */
.orders-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 35px;
    padding: 22px 28px;
    background: #ffffff;
    border-radius: 16px;
    box-shadow: 0 4px 20px rgba(42, 64, 57, 0.08);
    border: 1px solid rgba(221, 239, 233, 0.6);
}

.orders-header h3 {
    margin: 0;
    color: #1a2d28;
font-size: 1.8em;
    font-weight: 600;
}

.orders-header p {
    margin: 0;
    color: #5c8b7b;
    font-weight: 600;
font-size: 1.4em;
    padding: 8px 18px;
    background: rgba(92, 139, 123, 0.1);
    border-radius: 10px;
    border: 1px solid rgba(92, 139, 123, 0.2);
}

/* ===== СПИСОК ЗАКАЗОВ ===== */
.orders-list {
    display: flex;
    flex-direction: column;
    gap: 22px;
}

/* ===== КАРТОЧКА ЗАКАЗА ===== */
.order-card {
    background: #ffffff;
    border-radius: 18px;
    padding: 28px 30px;
    box-shadow: 0 5px 25px rgba(42, 64, 57, 0.07);
    border: 1px solid rgba(221, 239, 233, 0.8);
    transition: all 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    position: relative;
    overflow: hidden;
}

.order-card:hover {
    box-shadow: 0 10px 35px rgba(42, 64, 57, 0.12);
    transform: translateY(-3px);
    border-color: rgba(92, 139, 123, 0.4);
}

.order-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 5px;
    height: 100%;
    background: linear-gradient(to bottom, #5c8b7b 0%, #8bc2a9 100%);
    opacity: 0.8;
}

/* ===== ЗАГОЛОВОК КАРТОЧКИ ===== */
.order-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 22px;
    padding-bottom: 18px;
    border-bottom: 1px solid rgba(233, 236, 239, 0.7);
}

.order-info h4 {
    margin: 0 0 8px 0;
    color: #1a2d28;
font-size: 1.4em;
    font-weight: 700;
    letter-spacing: -0.2px;
}

.order-date {
    color: #6c757d;
  font-size: 1em;
    display: flex;
    align-items: center;
    gap: 7px;
    font-weight: 500;
}

.order-date::before {
    content: '📅';
    font-size: 0.85rem;
    opacity: 0.7;
}

/* ===== СТАТУСЫ ЗАКАЗОВ (УЛУЧШЕННЫЕ) ===== */
.order-status {
    padding: 9px 20px;
    border-radius: 24px;
    font-size: 0.85rem;
    font-weight: 700;
    min-width: 130px;
    text-align: center;
    letter-spacing: 0.3px;
    text-transform: uppercase;
    box-shadow: 0 3px 8px rgba(0,0,0,0.08);
    transition: all 0.25s ease;
}

.order-card:hover .order-status {
    transform: scale(1.03);
}

.status-pending { 
    background: linear-gradient(135deg, #fff8e1 0%, #ffeaa7 100%); 
    color: #e6a700; 
    border: 2px solid #ffd54f;
}

.status-processing { 
    background: linear-gradient(135deg, #e3f2fd 0%, #bbdefb 100%); 
    color: #1565c0; 
    border: 2px solid #64b5f6;
}

.status-shipped { 
    background: linear-gradient(135deg, #e0f7fa 0%, #b2ebf2 100%); 
    color: #00838f; 
    border: 2px solid #4dd0e1;
}

.status-delivered { 
    background: linear-gradient(135deg, #e8f5e9 0%, #c8e6c9 100%); 
    color: #2e7d32; 
    border: 2px solid #81c784;
}

.status-cancelled { 
    background: linear-gradient(135deg, #ffebee 0%, #ffcdd2 100%); 
    color: #c62828; 
    border: 2px solid #e57373;
}

/* ===== ДЕТАЛИ ЗАКАЗА ===== */
.order-details {
display: block;

}

.order-summary {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 18px;
}

.detail-item {
    padding: 16px;
    background: linear-gradient(135deg, #f8faf9 0%, #f1f7f4 100%);
    border-radius: 12px;
    border: 1px solid rgba(221, 239, 233, 0.6);
    transition: all 0.25s ease;
    position: relative;font-size: 1.2em;
    overflow: hidden;
}

.detail-item:hover {
    background: linear-gradient(135deg, #f1f7f4 0%, #e9f3ee 100%);
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(92, 139, 123, 0.1);
    border-color: rgba(92, 139, 123, 0.4);
}

.detail-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 4px;
    height: 100%;
    background: #5c8b7b;
    opacity: 0.5;
}

.detail-item strong {
    display: block;
   font-size: .8em;
    color: #5c8b7b;
    margin-bottom: 6px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.detail-item span {
    color: #2a4039;
    font-weight: 600;
    font-size: 1.05rem;
    line-height: 1.4;
}

/* ===== КНОПКА "ПОДРОБНЕЕ" ===== */
.btn-order-details {
    padding: 14px 32px;
    background: linear-gradient(135deg, #5c8b7b 0%, #4a7a5a 100%);
    color: white;
    border: none;
    border-radius: 12px;
    cursor: pointer;
font-size: 1.2em;
    font-weight: 700;
    transition: all 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    white-space: nowrap;
    box-shadow: 0 6px 20px rgba(92, 139, 123, 0.25);
    position: relative;
    overflow: hidden;
}

.btn-order-details::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: 0.5s;
}

.btn-order-details:hover {
    background: linear-gradient(135deg, #4a7a5a 0%, #3a6a4a 100%);
    transform: translateY(-3px);
    box-shadow: 0 10px 30px rgba(92, 139, 123, 0.35);
}

.btn-order-details:hover::before {
    left: 100%;
}

.btn-order-details::after {
    content: '→';
    font-weight: 900;
    font-size: 1.1rem;
    transition: transform 0.3s ease;
}

.btn-order-details:hover::after {
    transform: translateX(5px);
}

/* ===== МОДАЛЬНОЕ ОКНО (УПРОЩЕННОЕ) ===== */
.order-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000;
    padding: 20px;
    backdrop-filter: blur(3px);
    animation: fadeIn 0.2s ease-out;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.order-modal {
    background: white;
    border-radius: 20px;
    max-width: 700px;
    width: 100%;
    max-height: 85vh;
    overflow-y: auto;
    box-shadow: 0 25px 60px rgba(0, 0, 0, 0.2);
    animation: slideUp 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;position: relative;
    padding: 25px 30px;
    background: linear-gradient(135deg, #f8faf9 0%, #f1f7f4 100%);
    border-radius: 20px 20px 0 0;
    border-bottom: 1px solid rgba(221, 239, 233, 0.8);
}

.modal-header h3 {
    margin: 0;
    color: #1a2d28;
    font-size: 1.5rem;
    font-weight: 700;
}

.modal-close {
    background: rgba(92, 139, 123, 0.1);
    border: none;
    font-size: 1.8rem;position:absolute;right:20px;
    cursor: pointer;
    color: #5c8b7b;
    line-height: 1;
    padding: 8px;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.25s ease;
}

.modal-close:hover {
    background: #5c8b7b;
    color: white;
    transform: rotate(90deg);
}

.modal-content {
    padding: 30px;
}

.order-info-section {
    margin-bottom: 30px;
    padding-bottom: 25px;
    border-bottom: 2px solid rgba(233, 236, 239, 0.7);
}

.info-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 0;
font-size: 1.3em;
}

.info-row:not(:last-child) {
    border-bottom: 1px solid rgba(233, 236, 239, 0.4);
}

.info-row span:first-child {
    color: #5c8b7b;
    font-weight: 600;
    min-width: 140px;
}

.info-row span:last-child {
    color: #2a4039;
    font-weight: 600;
    text-align: right;
}

.order-items-section h4 {
    color: #1a2d28;
    margin-bottom: 20px;
    font-size: 1.3rem;
    font-weight: 700;
    padding-bottom: 15px;
    border-bottom: 2px solid rgba(233, 236, 239, 0.7);
}

.order-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 18px;
    border-radius: 12px;
    margin-bottom: 10px;
    background: #f8faf9;
    border: 1px solid rgba(221, 239, 233, 0.6);
    transition: all 0.2s ease;
}

.order-item:hover {
    background: #f1f7f4;
    transform: translateX(3px);
}

.item-info h5 {
    margin: 0 0 5px 0;
    color: #1a2d28;
font-size: 22px;
    font-weight: 600;
}

.item-description {
    color: #6c757d;
font-size: 16px;
    margin: 0;
}

.item-quantity {
    margin: 0 25px;
    color: #5c8b7b;
    font-weight: 700;
    white-space: nowrap;
    padding: 6px 14px;
    background: white;
    border-radius: 8px;
    border: 1px solid rgba(221, 239, 233, 0.8);
}

.item-total {
    font-weight: 700;
    color: #2a4039;
    white-space: nowrap;
    font-size: 1.15rem;
}

.order-total {
    text-align: right;
    margin-top: 30px;
    padding-top: 20px;
    border-top: 3px solid rgba(233, 236, 239, 0.8);
font-size: 1.4em;
    font-weight: 700;
    color: #1a2d28;
}

.order-total span {
    color: #5c8b7b;
    margin-left: 15px;
    font-size: 1.5rem;
}

.modal-footer {
    padding: 25px 30px;
    border-top: 1px solid rgba(233, 236, 239, 0.8);
    display: flex;
    justify-content: flex-end;
    gap: 15px;
    background: #f8faf9;
    border-radius: 0 0 20px 20px;
}

.btn-primary, .btn-secondary {
    padding: 14px 32px;
    border: none;
    border-radius: 12px;
font-size: 1em;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s ease;
    min-width: 140px;
}

.btn-primary {
    background: linear-gradient(135deg, #5c8b7b 0%, #4a7a5a 100%);
    color: white;
    box-shadow: 0 6px 20px rgba(92, 139, 123, 0.25);
}

.btn-primary:hover {
    background: linear-gradient(135deg, #4a7a5a 0%, #3a6a4a 100%);
    transform: translateY(-2px);
    box-shadow: 0 10px 30px rgba(92, 139, 123, 0.35);
}

.btn-secondary {
    background: white;
    color: #5c8b7b;
    border: 2px solid #5c8b7b;
}

.btn-secondary:hover {
    background: #5c8b7b;
    color: white;
    transform: translateY(-2px);
}

/* ===== СОСТОЯНИЯ ПУСТОГО СПИСКА ===== */
.no-orders, .not-authorized {
    text-align: center;
    padding: 70px 40px;
    background: white;
    border-radius: 20px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.08);
    max-width: 500px;
    margin: 50px auto;
    border: 2px dashed rgba(221, 239, 233, 0.8);
}

.no-orders-icon, .auth-icon {
    margin-bottom: 25px;
    font-size: 4rem;
    color: #5c8b7b;
    opacity: 0.7;
}

.no-orders h3, .not-authorized h3 {
    color: #1a2d28;
    margin-bottom: 15px;
    font-size: 1.8rem;
    font-weight: 700;
}

.no-orders p, .not-authorized p {
    color: #6c757d;
    margin-bottom: 30px;
    line-height: 1.6;
    font-size: 1.05rem;
    max-width: 350px;
    margin-left: auto;
    margin-right: auto;
}

.no-orders-actions, .auth-actions {
    margin-top: 25px;
    display: flex;
    justify-content: center;
    gap: 15px;
}

/* ===== ИНДИКАТОР ЗАГРУЗКИ ===== */
.loading-spinner {
    text-align: center;
    padding: 80px 20px;
    font-size: 1.1rem;
    color: #5c8b7b;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
}

.loading-spinner::after {
    content: '';
    width: 50px;
    height: 50px;
    border: 3px solid rgba(221, 239, 233, 0.8);
    border-top: 3px solid #5c8b7b;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* ===== АДАПТИВНОСТЬ ===== */
@media (max-width: 992px) {
    .order-details {
        grid-template-columns: 1fr;
        gap: 25px;
    }
    
    .btn-order-details {
        width: 100%;
        justify-content: center;
    }
    
    .order-summary {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .orders-container {
        padding: 0 15px;
        margin: 25px auto;
    }
    
    .orders-title {
        font-size: 1.8rem;
        margin-bottom: 25px;
    }
    
    .orders-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 15px;
        padding: 20px;
    }
    
    .order-card {
        padding: 22px;
    }
    
    .order-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 15px;
    }
    
    .order-status {
        align-self: flex-start;
    }
    
    .order-summary {
        grid-template-columns: 1fr;
    }
    
    .order-modal {
        margin: 10px;
    }
    
    .modal-header, .modal-content {
        padding: 20px;
    }
    
    .modal-header h3 {
        font-size: 1.3rem;
    }
    
    .info-row {
        flex-direction: column;
        align-items: flex-start;
        gap: 5px;
        text-align: left;
    }
    
    .info-row span:first-child {
        min-width: auto;
    }
    
    .info-row span:last-child {
        text-align: left;
        width: 100%;
    }
    
    .order-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
    }
    
    .item-quantity, .item-total {
        margin: 0;
        align-self: flex-start;
    }
    
    .modal-footer {
        flex-direction: column;
        gap: 12px;
    }
    
    .btn-primary, .btn-secondary {
        width: 100%;
    }
}

@media (max-width: 480px) {
    .orders-title {
        font-size: 1.6rem;
    }
    
    .no-orders, .not-authorized {
        padding: 40px 20px;
        margin: 30px auto;
    }
    
    .no-orders h3, .not-authorized h3 {
        font-size: 1.5rem;
    }
    
    .btn-order-details {
        padding: 12px 24px;
        font-size: 0.95rem;
    }
    
    .orders-header p {
        font-size: 0.9rem;
        padding: 6px 12px;
    }
}