/* Orders Container */
.orders-container {
    padding: 32px;
    background-color: #f9fafb;
    min-height: 100vh;
}

/* Header Section */
.orders-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 32px;
}

.orders-header-left {
    flex: 1;
}

.back-link {
    display: inline-flex;
    align-items: center;
    color: #3b82f6;
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    margin-bottom: 12px;
    transition: color 0.2s;
}

.back-link:hover {
    color: #2563eb;
    text-decoration: none;
}

.back-link i {
    margin-right: 6px;
}

.orders-title-section {
    margin-top: 8px;
}

.orders-title {
    font-size: 32px;
    font-weight: 700;
    color: #111827;
    margin: 0 0 8px 0;
}

.orders-subtitle {
    font-size: 16px;
    color: #6b7280;
    margin: 0;
}

.orders-new-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 24px;
    background-color: #111827;
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}

.orders-new-btn:hover {
    background-color: #1f2937;
    transform: translateY(-1px);
}

.orders-new-btn i {
    font-size: 14px;
}

/* Summary Cards Grid */
.orders-summary-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin-bottom: 32px;
}

.orders-summary-card {
    background: white;
    border-radius: 12px;
    padding: 24px;
    display: flex;
    align-items: center;
    gap: 16px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    transition: box-shadow 0.2s;
}

.orders-summary-card:hover {
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.summary-icon {
    width: 48px;
    height: 48px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    flex-shrink: 0;
}

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

.summary-icon-orange {
    background-color: #fed7aa;
    color: #f97316;
}

.summary-icon-indigo {
    background-color: #e0e7ff;
    color: #6366f1;
}

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

.summary-content {
    flex: 1;
}

.summary-label {
    font-size: 14px;
    color: #6b7280;
    margin-bottom: 4px;
}

.summary-value {
    font-size: 32px;
    font-weight: 700;
    color: #111827;
    line-height: 1;
}

/* Order History Section */
.orders-history-section {
    background: white;
    border-radius: 12px;
    padding: 24px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.section-title {
    font-size: 20px;
    font-weight: 600;
    color: #111827;
    margin: 0 0 20px 0;
}

/* Filters Bar */
.orders-filters-bar {
    display: flex;
    gap: 16px;
    margin-bottom: 24px;
    flex-wrap: wrap;
}

.search-container {
    position: relative;
    flex: 1;
    min-width: 300px;
}

.search-icon {
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    color: #9ca3af;
    font-size: 16px;
}

.search-input {
    width: 100%;
    padding: 10px 12px 10px 40px;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    font-size: 14px;
    transition: border-color 0.2s;
}

.search-input:focus {
    outline: none;
    border-color: #3b82f6;
}

.search-input::placeholder {
    color: #9ca3af;
}

.filter-container {
    position: relative;
    min-width: 200px;
}

.filter-icon {
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    color: #9ca3af;
    font-size: 14px;
    pointer-events: none;
}

.filter-select {
    width: 100%;
    padding: 10px 12px 10px 36px;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    font-size: 14px;
    background-color: white;
    cursor: pointer;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 20 20'%3E%3Cpath stroke='%236b7280' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='M6 8l4 4 4-4'/%3E%3C/svg%3E");
    background-position: right 8px center;
    background-repeat: no-repeat;
    background-size: 20px;
    padding-right: 36px;
}

.filter-select:focus {
    outline: none;
    border-color: #3b82f6;
}

/* Orders Table */
.orders-table-container {
    overflow-x: auto;
}

.orders-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
}

.orders-table thead th {
    background-color: #f9fafb;
    color: #6b7280;
    font-weight: 600;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    padding: 12px 16px;
    text-align: left;
    border-bottom: 2px solid #e5e7eb;
    white-space: nowrap;
}

.orders-table tbody tr {
    border-bottom: 1px solid #e5e7eb;
    transition: background-color 0.15s;
}

.orders-table tbody tr:hover {
    background-color: #f9fafb;
}

.orders-table tbody td {
    padding: 16px;
    font-size: 14px;
    color: #374151;
    vertical-align: middle;
}

.order-id {
    font-weight: 600;
    color: #111827;
}

.customer-info {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.customer-name {
    font-weight: 600;
    color: #111827;
}

.contact-person {
    font-size: 13px;
    color: #6b7280;
}

.items-count {
    text-align: center;
}

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

/* Status Badges */
.status-badge,
.invoice-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    border-radius: 6px;
    font-size: 13px;
    font-weight: 500;
    white-space: nowrap;
}

.status-badge i,
.invoice-badge i {
    font-size: 12px;
}

.status-processing {
    background-color: #fef3c7;
    color: #92400e;
}

.status-shipped {
    background-color: #dbeafe;
    color: #1e40af;
}

.status-delivered {
    background-color: #d1fae5;
    color: #065f46;
}

.status-pending {
    background-color: #f3f4f6;
    color: #374151;
}

.invoice-generated {
    background-color: #e9d5ff;
    color: #6b21a8;
}

.invoice-paid {
    background-color: #d1fae5;
    color: #065f46;
}

.invoice-sent {
    background-color: #dbeafe;
    color: #1e40af;
}

.invoice-pending {
    background-color: #fef3c7;
    color: #92400e;
}

.order-date {
    color: #6b7280;
    white-space: nowrap;
}

.expected-delivery {
    color: #6b7280;
    white-space: nowrap;
}

.delivered-text {
    color: #10b981;
    font-weight: 500;
}

/* Actions Cell */
.actions-cell {
    text-align: right;
}

.action-btn {
    background: transparent;
    border: 1px solid #e5e7eb;
    border-radius: 6px;
    padding: 6px 10px;
    margin-left: 6px;
    color: #6b7280;
    cursor: pointer;
    transition: all 0.2s;
    font-size: 14px;
}

.action-btn:hover {
    background-color: #f3f4f6;
    color: #111827;
    border-color: #d1d5db;
}

.action-btn:first-child {
    margin-left: 0;
}

/* Empty State */
.empty-state {
    text-align: center;
    padding: 60px 20px;
}

.empty-icon {
    font-size: 64px;
    color: #d1d5db;
    margin-bottom: 16px;
}

.empty-text {
    font-size: 18px;
    font-weight: 600;
    color: #374151;
    margin: 0 0 8px 0;
}

.empty-subtext {
    font-size: 14px;
    color: #6b7280;
    margin: 0;
}

/* Responsive Design */
@media (max-width: 1200px) {
    .orders-summary-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .orders-container {
        padding: 20px;
    }

    .orders-header {
        flex-direction: column;
        gap: 16px;
    }

    .orders-title {
        font-size: 24px;
    }

    .orders-summary-grid {
        grid-template-columns: 1fr;
    }

    .orders-filters-bar {
        flex-direction: column;
    }

    .search-container {
        min-width: 100%;
    }

    .filter-container {
        min-width: 100%;
    }

    .orders-table {
        font-size: 12px;
    }

    .orders-table thead th,
    .orders-table tbody td {
        padding: 10px;
    }
}
