/* ==============================================
   UNIPARCEL REPORTS STYLES
   ============================================== */

/* Report Cards & Headers */
.report-card {
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.1);
    border: none;
    transition: all 0.3s ease;
    margin-bottom: 2rem;
}
.report-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.15);
}
.report-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border-radius: 12px 12px 0 0;
    padding: 2rem;
}
.report-header h3 {
    margin: 0;
    font-weight: 600;
    font-size: 1.8rem;
}
.report-header p {
    margin: 0.5rem 0 0 0;
    opacity: 0.9;
}

/* Form Sections */
.form-section {
    background: #f8f9fa;
    border-radius: 8px;
    padding: 1.5rem;
    margin-bottom: 1.5rem;
}
.section-title {
    color: #495057;
    font-weight: 600;
    font-size: 1.1rem;
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
}
.section-title i {
    margin-right: 0.5rem;
    color: #667eea;
}

/* Form Controls */
.custom-select, .select2-container--default .select2-selection--single {
    height: 45px;
    border-radius: 8px;
    border: 2px solid #e9ecef;
    font-size: 1rem;
}
.custom-select:focus, .select2-container--default.select2-container--focus .select2-selection--single {
    border-color: #667eea;
    box-shadow: 0 0 0 0.2rem rgba(102, 126, 234, 0.25);
}
.date-input {
    height: 45px;
    border-radius: 8px;
    border: 2px solid #e9ecef;
    font-size: 1rem;
}
.date-input:focus {
    border-color: #667eea;
    box-shadow: 0 0 0 0.2rem rgba(102, 126, 234, 0.25);
}

/* Buttons */
.generate-btn {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border: none;
    border-radius: 8px;
    padding: 12px 2rem;
    font-weight: 600;
    font-size: 1.1rem;
    transition: all 0.3s ease;
}
.generate-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.4);
}
.print-btn {
    background: linear-gradient(135deg, #28a745 0%, #20c997 100%);
    border: none;
    border-radius: 8px;
    color: white;
    padding: 0.75rem 2rem;
    font-weight: 600;
    width: 100%;
    transition: all 0.3s;
}
.print-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(40, 167, 69, 0.4);
    color: white;
}

/* Warehouse & Info Sections */
.warehouse-info-section {
    background: #f8f9fa;
    border-radius: 8px;
    padding: 2rem;
    margin-bottom: 2rem;
}
.info-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
}
.info-item {
    background: white;
    border-radius: 8px;
    padding: 1.5rem;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
    border-left: 4px solid #667eea;
}
.info-label {
    font-size: 0.875rem;
    font-weight: 600;
    color: #6c757d;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 0.5rem;
    display: flex;
    align-items: center;
}
.info-label i {
    margin-right: 0.5rem;
    color: #667eea;
}
.info-value {
    font-size: 1.1rem;
    font-weight: 500;
    color: #212529;
}

/* Report Sections */
.report-section {
    background: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
    margin-bottom: 2rem;
    border: none;
}
.location-section {
    background: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
    margin-bottom: 2rem;
    border: none;
}
.customers-section {
    background: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
    margin-bottom: 2rem;
    border: none;
}
.section-header {
    padding: 1.5rem;
    font-weight: 600;
    color: white;
    display: flex;
    align-items: center;
    justify-content: space-between;
}
.section-header i {
    margin-right: 0.75rem;
    font-size: 1.25rem;
}
.section-header.orders { background: linear-gradient(135deg, #667eea 0%, #764ba2 100%); }
.section-header.waybills { background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%); }
.section-header.withdraws { background: linear-gradient(135deg, #ffecd2 0%, #fcb69f 100%); color: #495057; }
.section-header.pickups { background: linear-gradient(135deg, #17a2b8 0%, #6f42c1 100%); }
.section-header.warehouse-stats { background: linear-gradient(135deg, #28a745 0%, #20c997 100%); }
.section-header.warehouse-orders { background: linear-gradient(135deg, #667eea 0%, #764ba2 100%); }
.section-header.warehouse-pending { background: linear-gradient(135deg, #ffc107 0%, #fd7e14 100%); color: #495057; }
.section-header.warehouse-picked { background: linear-gradient(135deg, #28a745 0%, #20c997 100%); }
.section-header.warehouse-delivered { background: linear-gradient(135deg, #17a2b8 0%, #6f42c1 100%); }
.section-header.warehouse-returned { background: linear-gradient(135deg, #dc3545 0%, #fd7e14 100%); }
.section-header.customers { background: linear-gradient(135deg, #28a745 0%, #20c997 100%); }

.count-badge {
    background: rgba(255,255,255,0.2);
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.875rem;
    font-weight: 600;
}

/* Statistics Cards */
.summary-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}
.stat-card {
    background: white;
    border-radius: 12px;
    padding: 1.5rem;
    text-align: center;
    box-shadow: 0 4px 15px rgba(0,0,0,0.08);
    border: none;
    transition: transform 0.2s;
}
.stat-card:hover {
    transform: translateY(-3px);
}
.stat-icon {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1rem;
    font-size: 1.25rem;
    color: white;
}
.stat-icon.orders { background: linear-gradient(135deg, #667eea 0%, #764ba2 100%); }
.stat-icon.waybills { background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%); }
.stat-icon.withdraws { background: linear-gradient(135deg, #ffecd2 0%, #fcb69f 100%); }
.stat-icon.pickups { background: linear-gradient(135deg, #17a2b8 0%, #6f42c1 100%); }
.stat-icon.customers { background: linear-gradient(135deg, #28a745 0%, #20c997 100%); }
.stat-icon.period { background: linear-gradient(135deg, #17a2b8 0%, #6f42c1 100%); }
.stat-icon.warehouse { background: linear-gradient(135deg, #667eea 0%, #764ba2 100%); }
.stat-icon.locations { background: linear-gradient(135deg, #28a745 0%, #20c997 100%); }
.stat-icon.governorates { background: linear-gradient(135deg, #ffc107 0%, #fd7e14 100%); }
.stat-icon.income { background: linear-gradient(135deg, #28a745 0%, #20c997 100%); }
.stat-icon.outcome { background: linear-gradient(135deg, #dc3545 0%, #fd7e14 100%); }
.stat-icon.net-flow { background: linear-gradient(135deg, #17a2b8 0%, #6f42c1 100%); }
.stat-icon.transactions { background: linear-gradient(135deg, #ffc107 0%, #fd7e14 100%); }

.stat-value {
    font-size: 1.75rem;
    font-weight: 700;
    color: #212529;
    margin-bottom: 0.5rem;
}
.stat-label {
    color: #6c757d;
    font-size: 0.875rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Financial Cards */
.financial-overview {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}
.financial-card {
    background: white;
    border-radius: 12px;
    padding: 1.5rem;
    box-shadow: 0 4px 15px rgba(0,0,0,0.08);
    border: none;
    text-align: center;
}
.financial-card.income { border-left: 5px solid #28a745; }
.financial-card.outcome { border-left: 5px solid #dc3545; }
.financial-card.net-flow { border-left: 5px solid #17a2b8; }
.financial-card h4 {
    font-size: 0.875rem;
    font-weight: 600;
    color: #6c757d;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 1rem;
}
.financial-amount {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
}
.financial-amount.positive { color: #28a745; }
.financial-amount.negative { color: #dc3545; }
.financial-amount.neutral { color: #17a2b8; }

/* Progress Bars & Statistics */
.driver-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}
.progress-card {
    background: white;
    border-radius: 12px;
    padding: 1.5rem;
    box-shadow: 0 4px 15px rgba(0,0,0,0.08);
    text-align: center;
}
.progress-title {
    font-size: 0.875rem;
    font-weight: 600;
    color: #6c757d;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 1rem;
}
.progress-value {
    font-size: 1.5rem;
    font-weight: 700;
    color: #212529;
    margin-bottom: 0.5rem;
}
.progress-bar-custom {
    width: 100%;
    height: 8px;
    background: #e9ecef;
    border-radius: 4px;
    overflow: hidden;
    margin-bottom: 0.5rem;
}
.progress-fill {
    height: 100%;
    border-radius: 4px;
    transition: width 0.3s ease;
}
.progress-fill.orders { background: linear-gradient(135deg, #667eea 0%, #764ba2 100%); }
.progress-fill.waybills { background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%); }
.progress-fill.withdraws { background: linear-gradient(135deg, #ffecd2 0%, #fcb69f 100%); }
.progress-fill.pickups { background: linear-gradient(135deg, #17a2b8 0%, #6f42c1 100%); }
.progress-percentage {
    font-size: 0.75rem;
    color: #6c757d;
    font-weight: 500;
}

/* Tables */
.modern-table {
    margin: 0;
}
.modern-table thead th {
    background: #f8f9fa;
    border: none;
    font-weight: 600;
    color: #495057;
    padding: 1rem 0.75rem;
    font-size: 0.875rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    vertical-align: middle;
}
.modern-table tbody td {
    border: none;
    padding: 1rem 0.75rem;
    vertical-align: middle;
    border-bottom: 1px solid #f1f1f1;
}
.modern-table tbody tr:hover {
    background: #f8f9fa;
}
.modern-table tbody tr:last-child td {
    border-bottom: none;
}

/* Data Display Elements */
.status-badge {
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
}
.status-badge.pending { background: #fff3cd; color: #856404; }
.status-badge.in-progress { background: #d1ecf1; color: #0c5460; }
.status-badge.completed { background: #d4edda; color: #155724; }
.status-badge.cancelled { background: #f8d7da; color: #721c24; }

.currency-display {
    font-weight: 700;
    font-size: 1.1rem;
}
.currency-display.positive { color: #28a745; }
.currency-display.negative { color: #dc3545; }
.currency-display.neutral { color: #495057; }

.count-display {
    font-weight: 700;
    font-size: 1.1rem;
    color: #212529;
    background: #f8f9fa;
    padding: 0.5rem 1rem;
    border-radius: 20px;
    text-align: center;
    min-width: 60px;
}

.qr-code {
    font-family: 'Courier New', monospace;
    background: #e9ecef;
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    font-size: 0.875rem;
    font-weight: 600;
    color: #495057;
    cursor: pointer;
    transition: all 0.2s;
}
.qr-code:hover {
    background: #dee2e6;
}

/* Customer & Location Elements */
.customer-name, .governorate-info {
    font-weight: 600;
    color: #495057;
    display: flex;
    align-items: center;
}
.customer-name i, .governorate-info i {
    margin-right: 0.5rem;
    color: #667eea;
}
.customer-email, .city-info {
    color: #6c757d;
    font-size: 0.875rem;
    display: flex;
    align-items: center;
}
.customer-email i, .city-info i {
    margin-right: 0.5rem;
    color: #17a2b8;
}
.customer-phone {
    color: #495057;
    font-weight: 500;
    display: flex;
    align-items: center;
}
.customer-phone i {
    margin-right: 0.5rem;
    color: #ffc107;
}
.date-badge {
    background: linear-gradient(135deg, #28a745 0%, #20c997 100%);
    color: white;
    padding: 0.375rem 0.75rem;
    border-radius: 20px;
    font-size: 0.875rem;
    font-weight: 500;
    text-align: center;
}

/* Empty States */
.empty-section {
    padding: 3rem;
    text-align: center;
    color: #6c757d;
}
.empty-section i {
    font-size: 3rem;
    opacity: 0.3;
    margin-bottom: 1rem;
}

/* Animations */
.slide-down {
    animation: slideDown 0.3s ease-out;
}
@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Print Styles */
@media print {
    .no-print { display: none !important; }
    .report-section, .location-section, .customers-section { 
        box-shadow: none; 
        border: 1px solid #ddd; 
        page-break-inside: avoid; 
    }
    .summary-stats { grid-template-columns: repeat(4, 1fr); }
    .financial-overview { grid-template-columns: repeat(3, 1fr); }
}

/* Simple Summary Tables */
.summary-cards {
    margin-bottom: 2rem;
}
.summary-card {
    background: white;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.08);
    border: 1px solid #e9ecef;
}
.summary-card table {
    width: 100%;
    margin: 0;
}
.summary-card table tbody tr {
    border-bottom: 1px solid #f1f1f1;
}
.summary-card table tbody tr:last-child {
    border-bottom: none;
}
.summary-card table tbody td {
    padding: 0.75rem 1rem;
    border: none;
    vertical-align: middle;
}
.summary-label {
    font-weight: 600;
    color: #495057;
    font-size: 0.9rem;
}
.summary-value {
    font-weight: 700;
    color: #212529;
    font-size: 1.1rem;
    text-align: right;
}

/* Warehouse Cards */
.warehouse-card {
    background: white;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.08);
    margin-bottom: 2rem;
    border: 1px solid #e9ecef;
    overflow: hidden;
    transition: all 0.3s ease;
}
.warehouse-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.12);
}
.warehouse-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 1.5rem 2rem;
    font-size: 1.25rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    justify-content: space-between;
}
.warehouse-header i {
    margin-right: 0.75rem;
    font-size: 1.5rem;
}
.warehouse-body {
    padding: 2rem;
}

/* Stats Grid */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}
.stats-section {
    background: white;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.08);
    border: 1px solid #e9ecef;
    overflow: hidden;
}
.stats-list {
    list-style: none;
    padding: 10px;
    margin: 0;
}
.stats-list li {
    padding: 1rem 1.5rem;
    border-bottom: 1px solid #f1f3f4;
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.stats-list li:last-child {
    border-bottom: none;
}
.stats-list li .label {
    font-weight: 500;
    color: #495057;
    font-size: 0.95rem;
}
.stats-list li .value {
    font-weight: 600;
    color: #212529;
    font-size: 1.05rem;
}

/* Empty State */
.empty-state {
    text-align: center;
    padding: 4rem 2rem;
    color: #6c757d;
}
.empty-state i {
    font-size: 4rem;
    opacity: 0.3;
    margin-bottom: 1.5rem;
    display: block;
}
.empty-state h4 {
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
    color: #495057;
}
.empty-state p {
    font-size: 1rem;
    opacity: 0.8;
}

/* Statistics Items */
.stats-item {
    padding: 1rem 1.5rem;
    border-bottom: 1px solid #f1f3f4;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}
.stats-item:last-child {
    border-bottom: none;
}
.stats-item .stat-label {
    font-weight: 600;
    color: #495057;
    font-size: 0.95rem;
    margin-bottom: 0.75rem;
}
.stats-item .stat-values {
    display: flex;
    align-items: center;
    gap: 1rem;
}
.stats-item .stat-count {
    font-weight: 700;
    color: #212529;
    font-size: 1.1rem;
    min-width: 50px;
}
.stats-item .stat-count.completed {
    color: #28a745;
}
.stats-item .stat-count.failed {
    color: #dc3545;
}
.stats-item .progress-bar-custom {
    flex: 1;
    height: 8px;
    background: #e9ecef;
    border-radius: 4px;
    overflow: hidden;
}
.stats-item .progress-percentage {
    font-size: 0.875rem;
    color: #6c757d;
    font-weight: 600;
    min-width: 45px;
    text-align: right;
}

/* Progress Cards */
.progress-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

/* Responsive Design */
@media (max-width: 768px) {
    .info-grid { grid-template-columns: 1fr; }
    .summary-stats { grid-template-columns: repeat(2, 1fr); }
    .financial-overview { grid-template-columns: 1fr; }
    .driver-stats { grid-template-columns: 1fr; }
    .stats-grid { grid-template-columns: 1fr; }
    .progress-cards { grid-template-columns: 1fr; }
    .modern-table { font-size: 0.875rem; }
    .modern-table th, .modern-table td { padding: 0.75rem 0.5rem; }
    .report-header { padding: 1.5rem; }
    .report-header h3 { font-size: 1.5rem; }
    .summary-card table tbody td { padding: 0.5rem 0.75rem; }
    .warehouse-header { padding: 1rem 1.5rem; font-size: 1.1rem; }
    .warehouse-body { padding: 1.5rem; }
    .stats-list li { padding: 0.75rem 1rem; }
}
