/* ===== Procurement Module - Shared Styles ===== */

/* CSS Variables */
:root {
    --proc-primary: #2563eb;
    --proc-primary-dark: #1d4ed8;
    --proc-primary-light: #dbeafe;
    --proc-secondary: #0891b2;
    --proc-secondary-light: #cffafe;
    --proc-success: #22c55e;
    --proc-success-light: #dcfce7;
    --proc-warning: #f59e0b;
    --proc-warning-light: #fef3c7;
    --proc-danger: #ef4444;
    --proc-danger-light: #fee2e2;
    --proc-info: #0ea5e9;
    --proc-info-light: #e0f2fe;
    --proc-shadow-sm: 0 1px 2px rgba(0,0,0,0.05);
    --proc-shadow: 0 1px 3px rgba(0,0,0,0.1), 0 1px 2px rgba(0,0,0,0.06);
    --proc-shadow-md: 0 4px 6px -1px rgba(0,0,0,0.1), 0 2px 4px -2px rgba(0,0,0,0.1);
    --proc-shadow-lg: 0 10px 15px -3px rgba(0,0,0,0.1), 0 4px 6px -4px rgba(0,0,0,0.1);
    --proc-radius: 0.5rem;
    --proc-radius-lg: 0.75rem;
    --proc-radius-xl: 1rem;
}

/* ===== Stats Grid ===== */
.proc-stats-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
    margin-bottom: 24px;
}

@media (max-width: 1024px) {
    .proc-stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 640px) {
    .proc-stats-grid {
        grid-template-columns: 1fr;
    }
}

.proc-stat-card {
    background: #fff;
    border-radius: var(--proc-radius-xl);
    padding: 20px;
    box-shadow: var(--proc-shadow);
    display: flex;
    align-items: center;
    gap: 16px;
    transition: transform 0.2s, box-shadow 0.2s;
}

.proc-stat-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--proc-shadow-md);
}

.proc-stat-icon {
    width: 56px;
    height: 56px;
    border-radius: var(--proc-radius-lg);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    flex-shrink: 0;
}

.proc-stat-info {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.proc-stat-value {
    font-size: 1.5rem;
    font-weight: 700;
    color: #1e293b;
    line-height: 1;
}

.proc-stat-label {
    color: #64748b;
    font-size: 0.875rem;
}

/* ===== Status Badges ===== */
.proc-status-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
    white-space: nowrap;
}

.proc-status-badge.status-draft { background: #f3f4f6; color: #6b7280; }
.proc-status-badge.status-sent { background: #dbeafe; color: #2563eb; }
.proc-status-badge.status-priced { background: #fef3c7; color: #d97706; }
.proc-status-badge.status-awarded { background: #dcfce7; color: #16a34a; }
.proc-status-badge.status-shipped { background: #e0e7ff; color: #4f46e5; }
.proc-status-badge.status-in-transit { background: #dbeafe; color: #2563eb; }
.proc-status-badge.status-at-port { background: #fef3c7; color: #d97706; }
.proc-status-badge.status-clearing { background: #fef3c7; color: #d97706; }
.proc-status-badge.status-cleared { background: #dcfce7; color: #16a34a; }
.proc-status-badge.status-received { background: #dcfce7; color: #16a34a; }
.proc-status-badge.status-valid { background: #dcfce7; color: #16a34a; }
.proc-status-badge.status-expiring { background: #fef3c7; color: #d97706; }
.proc-status-badge.status-expired { background: #fee2e2; color: #dc2626; }
.proc-status-badge.status-none { background: #f3f4f6; color: #6b7280; }
.proc-status-badge.status-pending { background: #fef3c7; color: #d97706; }
.proc-status-badge.status-paid { background: #dbeafe; color: #2563eb; }
.proc-status-badge.status-completed { background: #dcfce7; color: #16a34a; }
.proc-status-badge.status-match { background: #dcfce7; color: #16a34a; }
.proc-status-badge.status-shortage { background: #fee2e2; color: #dc2626; }
.proc-status-badge.status-excess { background: #fef3c7; color: #d97706; }
.proc-status-badge.status-inproduction { background: #fef3c7; color: #d97706; }
.proc-status-badge.status-cancelled { background: #fee2e2; color: #dc2626; }
.proc-status-badge.status-approved { background: #dcfce7; color: #16a34a; }
.proc-status-badge.status-renewed { background: #e0e7ff; color: #4f46e5; }
.proc-status-badge.status-sent { background: #dbeafe; color: #2563eb; }
.proc-status-badge.status-info { background: #dbeafe; color: #2563eb; }
.proc-status-badge.status-unknown { background: #f3f4f6; color: #6b7280; }

/* ===== Procurement Page Base ===== */
.procurement-page .page-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    flex-wrap: wrap;
    gap: 16px;
    margin-bottom: 24px;
}

.procurement-page .page-title h2 {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 1.5rem;
    font-weight: 700;
    color: #1e293b;
    margin: 0;
}

.procurement-page .page-title h2 i {
    color: var(--proc-primary);
}

.procurement-page .page-subtitle {
    color: #64748b;
    font-size: 0.875rem;
    margin: 4px 0 0 0;
}

.procurement-page .header-actions {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

/* ===== Quick Actions ===== */
.proc-quick-actions {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    margin-bottom: 24px;
}

.proc-quick-actions .btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    border-radius: 10px;
    font-weight: 600;
    font-size: 0.875rem;
    transition: all 0.2s;
}

/* Colorful Action Buttons */
.proc-action-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 24px;
    border-radius: 12px;
    font-weight: 600;
    font-size: 0.9rem;
    border: none;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.proc-action-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.15);
}

.proc-action-btn i {
    font-size: 1.1rem;
}

/* New Order - Green */
.proc-btn-new {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    color: white;
}

.proc-btn-new:hover {
    background: linear-gradient(135deg, #059669 0%, #047857 100%);
    color: white;
}

/* Track Shipments - Blue */
.proc-btn-shipments {
    background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
    color: white;
}

.proc-btn-shipments:hover {
    background: linear-gradient(135deg, #2563eb 0%, #1d4ed8 100%);
    color: white;
}

/* Certificates - Teal */
.proc-btn-certificates {
    background: linear-gradient(135deg, #14b8a6 0%, #0d9488 100%);
    color: white;
}

.proc-btn-certificates:hover {
    background: linear-gradient(135deg, #0d9488 0%, #0f766e 100%);
    color: white;
}

/* Customs Clearance - Orange */
.proc-btn-clearance {
    background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
    color: white;
}

.proc-btn-clearance:hover {
    background: linear-gradient(135deg, #d97706 0%, #b45309 100%);
    color: white;
}

/* Inventory - Purple */
.proc-btn-inventory {
    background: linear-gradient(135deg, #8b5cf6 0%, #7c3aed 100%);
    color: white;
}

.proc-btn-inventory:hover {
    background: linear-gradient(135deg, #7c3aed 0%, #6d28d9 100%);
    color: white;
}

/* ===== Alert Cards ===== */
.proc-alert-card {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 12px 16px;
    border-radius: 10px;
    margin-bottom: 8px;
    border-inline-start: 4px solid;
}

.proc-alert-card.alert-danger {
    background: #fef2f2;
    border-color: var(--proc-danger);
}

.proc-alert-card.alert-warning {
    background: #fffbeb;
    border-color: var(--proc-warning);
}

.proc-alert-card.alert-info {
    background: #eff6ff;
    border-color: var(--proc-info);
}

.proc-alert-card .alert-icon {
    font-size: 1.2rem;
    flex-shrink: 0;
}

.proc-alert-card .alert-content {
    flex: 1;
    min-width: 0;
}

.proc-alert-card .alert-title {
    font-weight: 600;
    font-size: 0.875rem;
    color: #1e293b;
}

.proc-alert-card .alert-message {
    font-size: 0.8rem;
    color: #64748b;
    margin-top: 2px;
}

/* ===== Dashboard Cards Row ===== */
.proc-cards-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-bottom: 24px;
}

@media (max-width: 768px) {
    .proc-cards-row {
        grid-template-columns: 1fr;
    }
}

/* ===== Section Card ===== */
.proc-section-card {
    background: white;
    border-radius: 12px;
    border: 1px solid #e2e8f0;
    overflow: hidden;
}

.proc-section-card .card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 20px;
    border-bottom: 1px solid #e2e8f0;
}

.proc-section-card .card-header h3 {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 1rem;
    font-weight: 600;
    color: #1e293b;
    margin: 0;
}

.proc-section-card .card-header h3 i {
    color: var(--proc-primary);
}

.proc-section-card .card-body {
    padding: 20px;
}

.proc-section-card .card-body.no-padding {
    padding: 0;
}

/* ===== Simple Table ===== */
.proc-simple-table {
    width: 100%;
    border-collapse: collapse;
}

.proc-simple-table th {
    padding: 10px 16px;
    text-align: right;
    font-size: 0.75rem;
    font-weight: 600;
    color: #64748b;
    text-transform: uppercase;
    background: #f8fafc;
    border-bottom: 1px solid #e2e8f0;
    white-space: nowrap;
}

.proc-simple-table td {
    padding: 10px 16px;
    font-size: 0.85rem;
    color: #334155;
    border-bottom: 1px solid #f1f5f9;
}

.proc-simple-table tbody tr:hover {
    background: #f8fafc;
}

.proc-simple-table code {
    background: #f1f5f9;
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 0.8rem;
    color: var(--proc-primary);
}

/* ===== Shipment Cards Grid ===== */
.proc-shipment-cards {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 16px;
}

/* ===== Timeline ===== */
.proc-timeline {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    padding: 20px 10px;
    position: relative;
    overflow-x: auto;
}

.proc-timeline::before {
    content: '';
    position: absolute;
    top: 38px;
    right: 40px;
    left: 40px;
    height: 3px;
    background: #e2e8f0;
    z-index: 0;
}

.proc-step {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    position: relative;
    z-index: 1;
    min-width: 80px;
}

.proc-step-icon {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    background: #f1f5f9;
    color: #94a3b8;
    border: 3px solid #e2e8f0;
    transition: all 0.3s;
}

.proc-step.completed .proc-step-icon {
    background: var(--proc-success);
    color: white;
    border-color: var(--proc-success);
}

.proc-step.active .proc-step-icon {
    background: var(--proc-primary);
    color: white;
    border-color: var(--proc-primary);
    box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.2);
    animation: pulse-ring 2s ease-in-out infinite;
}

@keyframes pulse-ring {
    0%, 100% { box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.2); }
    50% { box-shadow: 0 0 0 8px rgba(37, 99, 235, 0.1); }
}

.proc-step-label {
    font-size: 0.7rem;
    font-weight: 600;
    color: #94a3b8;
    text-align: center;
    max-width: 80px;
}

.proc-step.completed .proc-step-label {
    color: var(--proc-success);
}

.proc-step.active .proc-step-label {
    color: var(--proc-primary);
}

/* ===== Cost Breakdown ===== */
.proc-cost-breakdown {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.proc-cost-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 12px;
    border-radius: 8px;
    font-size: 0.85rem;
}

.proc-cost-item:nth-child(odd) {
    background: #f8fafc;
}

.proc-cost-item .cost-label {
    color: #64748b;
}

.proc-cost-item .cost-value {
    font-weight: 600;
    color: #334155;
}

.proc-cost-item.total {
    background: #eff6ff;
    border: 1px solid #bfdbfe;
    font-weight: 700;
    margin-top: 8px;
}

.proc-cost-item.total .cost-label,
.proc-cost-item.total .cost-value {
    color: var(--proc-primary);
    font-size: 1rem;
}

/* ===== Shipment Map ===== */
.proc-map-container {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 20px;
    background: linear-gradient(135deg, #eff6ff 0%, #f0fdf4 100%);
    border-radius: 12px;
    margin-bottom: 16px;
}

.proc-map-point {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
}

.proc-map-point .point-icon {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
}

.proc-map-point.origin .point-icon {
    background: var(--proc-primary);
    color: white;
}

.proc-map-point.destination .point-icon {
    background: var(--proc-success);
    color: white;
}

.proc-map-point .point-label {
    font-size: 0.7rem;
    font-weight: 600;
    color: #64748b;
}

.proc-map-route {
    flex: 1;
    height: 3px;
    background: #e2e8f0;
    position: relative;
    min-width: 80px;
    max-width: 200px;
}

.proc-map-route .route-progress {
    height: 100%;
    background: var(--proc-primary);
    border-radius: 3px;
    transition: width 0.5s;
}

.proc-map-route .route-ship {
    position: absolute;
    top: -12px;
    font-size: 1.2rem;
    transition: right 0.5s;
}

/* ===== Inventory Row Colors ===== */
.proc-row-match { background-color: rgba(34, 197, 94, 0.05) !important; }
.proc-row-shortage { background-color: rgba(239, 68, 68, 0.05) !important; }
.proc-row-excess { background-color: rgba(245, 158, 11, 0.05) !important; }

/* ===== Progress Bar ===== */
.proc-progress-bar {
    width: 100%;
    height: 8px;
    background: #e2e8f0;
    border-radius: 4px;
    overflow: hidden;
}

.proc-progress-bar .progress-fill {
    height: 100%;
    border-radius: 4px;
    transition: width 0.5s;
    background: var(--proc-success);
}

/* ===== Filter Buttons ===== */
.proc-filter-buttons {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    margin-bottom: 16px;
}

.proc-filter-btn {
    padding: 8px 18px;
    border: 2px solid #e2e8f0;
    border-radius: 12px;
    background: white;
    color: #475569;
    font-size: 0.82rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.25s ease;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    position: relative;
    overflow: hidden;
}

.proc-filter-btn i {
    font-size: 1rem;
    transition: transform 0.25s ease;
}

.proc-filter-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.08);
}

.proc-filter-btn:hover i {
    transform: scale(1.15);
}

.proc-filter-btn:active {
    transform: translateY(0);
}

/* === "الكل" (All) Button === */
.proc-filter-btn.filter-all {
    border-color: #dbeafe;
    background: linear-gradient(135deg, #f0f7ff 0%, #eff6ff 100%);
    color: var(--proc-primary);
}
.proc-filter-btn.filter-all:hover {
    border-color: var(--proc-primary);
    background: linear-gradient(135deg, #dbeafe 0%, #e0f2fe 100%);
}
.proc-filter-btn.filter-all.active {
    background: linear-gradient(135deg, var(--proc-primary) 0%, #3b82f6 100%);
    color: white;
    border-color: var(--proc-primary);
    box-shadow: 0 4px 14px rgba(37, 99, 235, 0.35);
}

/* === Manufacturing / قيد التصنيع === */
.proc-filter-btn.filter-manufacturing {
    border-color: #fef3c7;
    color: #92400e;
}
.proc-filter-btn.filter-manufacturing i { color: #d97706; }
.proc-filter-btn.filter-manufacturing:hover {
    border-color: #fcd34d;
    background: #fffbeb;
}
.proc-filter-btn.filter-manufacturing.active {
    background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
    color: white;
    border-color: #d97706;
    box-shadow: 0 4px 14px rgba(217, 119, 6, 0.35);
}
.proc-filter-btn.filter-manufacturing.active i { color: white; }

/* === Shipped / تم الشحن === */
.proc-filter-btn.filter-shipped {
    border-color: #e0e7ff;
    color: #3730a3;
}
.proc-filter-btn.filter-shipped i { color: #6366f1; }
.proc-filter-btn.filter-shipped:hover {
    border-color: #a5b4fc;
    background: #eef2ff;
}
.proc-filter-btn.filter-shipped.active {
    background: linear-gradient(135deg, #6366f1 0%, #4f46e5 100%);
    color: white;
    border-color: #4f46e5;
    box-shadow: 0 4px 14px rgba(99, 102, 241, 0.35);
}
.proc-filter-btn.filter-shipped.active i { color: white; }

/* === InTransit / في البحر === */
.proc-filter-btn.filter-intransit {
    border-color: #dbeafe;
    color: #1e40af;
}
.proc-filter-btn.filter-intransit i { color: #2563eb; }
.proc-filter-btn.filter-intransit:hover {
    border-color: #93c5fd;
    background: #eff6ff;
}
.proc-filter-btn.filter-intransit.active {
    background: linear-gradient(135deg, #2563eb 0%, #1d4ed8 100%);
    color: white;
    border-color: #1d4ed8;
    box-shadow: 0 4px 14px rgba(37, 99, 235, 0.35);
}
.proc-filter-btn.filter-intransit.active i { color: white; }

/* === AtPort / في الميناء === */
.proc-filter-btn.filter-atport {
    border-color: #fed7aa;
    color: #9a3412;
}
.proc-filter-btn.filter-atport i { color: #ea580c; }
.proc-filter-btn.filter-atport:hover {
    border-color: #fdba74;
    background: #fff7ed;
}
.proc-filter-btn.filter-atport.active {
    background: linear-gradient(135deg, #ea580c 0%, #c2410c 100%);
    color: white;
    border-color: #c2410c;
    box-shadow: 0 4px 14px rgba(234, 88, 12, 0.35);
}
.proc-filter-btn.filter-atport.active i { color: white; }

/* === Clearing / جاري التخليص === */
.proc-filter-btn.filter-clearing {
    border-color: #e9d5ff;
    color: #6b21a8;
}
.proc-filter-btn.filter-clearing i { color: #9333ea; }
.proc-filter-btn.filter-clearing:hover {
    border-color: #c084fc;
    background: #faf5ff;
}
.proc-filter-btn.filter-clearing.active {
    background: linear-gradient(135deg, #9333ea 0%, #7e22ce 100%);
    color: white;
    border-color: #7e22ce;
    box-shadow: 0 4px 14px rgba(147, 51, 234, 0.35);
}
.proc-filter-btn.filter-clearing.active i { color: white; }

/* === Cleared / تم التخليص === */
.proc-filter-btn.filter-cleared {
    border-color: #bbf7d0;
    color: #166534;
}
.proc-filter-btn.filter-cleared i { color: #16a34a; }
.proc-filter-btn.filter-cleared:hover {
    border-color: #86efac;
    background: #f0fdf4;
}
.proc-filter-btn.filter-cleared.active {
    background: linear-gradient(135deg, #16a34a 0%, #15803d 100%);
    color: white;
    border-color: #15803d;
    box-shadow: 0 4px 14px rgba(22, 163, 74, 0.35);
}
.proc-filter-btn.filter-cleared.active i { color: white; }

/* === Received / تم الاستلام === */
.proc-filter-btn.filter-received {
    border-color: #a7f3d0;
    color: #065f46;
}
.proc-filter-btn.filter-received i { color: #059669; }
.proc-filter-btn.filter-received:hover {
    border-color: #6ee7b7;
    background: #ecfdf5;
}
.proc-filter-btn.filter-received.active {
    background: linear-gradient(135deg, #059669 0%, #047857 100%);
    color: white;
    border-color: #047857;
    box-shadow: 0 4px 14px rgba(5, 150, 105, 0.35);
}
.proc-filter-btn.filter-received.active i { color: white; }

/* === Filter btn count badge === */
.proc-filter-btn .count {
    background: rgba(0, 0, 0, 0.08);
    padding: 2px 8px;
    border-radius: 10px;
    font-size: 0.7rem;
    font-weight: 700;
    min-width: 22px;
    text-align: center;
}

.proc-filter-btn.active .count {
    background: rgba(255, 255, 255, 0.3);
    color: white;
}

/* ===== Broker Cards ===== */
.proc-broker-cards {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 12px;
}

.proc-broker-card {
    background: white;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    padding: 16px;
    text-align: center;
    transition: all 0.2s;
}

.proc-broker-card:hover {
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
}

.proc-broker-card .broker-name {
    font-weight: 600;
    color: #1e293b;
    margin-bottom: 4px;
}

.proc-broker-card .broker-contact {
    font-size: 0.8rem;
    color: #64748b;
    direction: ltr;
}

.proc-broker-card .broker-stats {
    display: flex;
    justify-content: center;
    gap: 16px;
    margin-top: 12px;
    font-size: 0.75rem;
    color: #94a3b8;
}

.proc-broker-card .broker-stat-value {
    font-weight: 700;
    color: var(--proc-primary);
    display: block;
}

/* ===== Responsive ===== */
@media (max-width: 768px) {
    .proc-timeline {
        padding: 10px 0;
    }

    .proc-step {
        min-width: 60px;
    }

    .proc-step-icon {
        width: 32px;
        height: 32px;
        font-size: 0.8rem;
    }

    .proc-step-label {
        font-size: 0.6rem;
    }

    .proc-shipment-cards {
        grid-template-columns: 1fr;
    }

    .procurement-page .page-header {
        flex-direction: column;
    }
}

/* ===== New Order Page ===== */
.proc-section-card {
    margin-bottom: 1.25rem;
}

.proc-section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 20px;
    border-bottom: 1px solid #e2e8f0;
}

.proc-section-header h3 {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 1rem;
    font-weight: 600;
    color: #1e293b;
    margin: 0;
}

.proc-section-body {
    padding: 20px;
}

.proc-step-number {
    width: 28px;
    height: 28px;
    background: var(--proc-primary, #2563eb);
    color: white;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 0.85rem;
    font-weight: 700;
    flex-shrink: 0;
}

/* ===== File Upload Area ===== */
.proc-file-upload-area {
    position: relative;
}

.proc-file-input {
    position: absolute;
    inset: 0;
    opacity: 0;
    cursor: pointer;
    z-index: 2;
}

.proc-file-upload-label {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    padding: 32px 20px;
    border: 2px dashed #cbd5e1;
    border-radius: 12px;
    background: #f8fafc;
    cursor: pointer;
    transition: all 0.2s;
    text-align: center;
}

.proc-file-upload-label:hover {
    border-color: var(--proc-primary, #2563eb);
    background: #eff6ff;
}

.proc-file-upload-icon {
    font-size: 2.5rem;
    color: #16a34a;
}

.proc-file-upload-text {
    font-size: 0.95rem;
    color: #475569;
}

.proc-file-upload-hint {
    font-size: 0.8rem;
    color: #94a3b8;
}

.proc-uploaded-file {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 14px;
    background: #f0fdf4;
    border: 1px solid #bbf7d0;
    border-radius: 8px;
    font-size: 0.85rem;
    color: #166534;
}

/* ===== Proc Card (Reusable Card Component) ===== */
.proc-card {
    background: white;
    border-radius: 12px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06);
    overflow: hidden;
    border: 1px solid #e2e8f0;
}

.proc-card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 20px;
    border-bottom: 1px solid #e2e8f0;
    flex-wrap: wrap;
    gap: 12px;
}

.proc-card-title {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 1rem;
    font-weight: 600;
    color: #1e293b;
    margin: 0;
}

.proc-card-body {
    padding: 20px;
}

.proc-mb-4 {
    margin-bottom: 20px;
}

/* ===== Order Details Page ===== */

/* --- Loading & Empty States --- */
.procurement-page .loading-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 16px;
    padding: 80px 20px;
    color: #64748b;
    font-size: 0.95rem;
}

.procurement-page .empty-state-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 12px;
    padding: 80px 20px;
    text-align: center;
    color: #64748b;
}

.procurement-page .empty-state-container h3 {
    color: #1e293b;
    margin: 0;
}

.procurement-page .empty-state-container p {
    color: #94a3b8;
    margin: 0;
}

/* --- Order Timeline (Enhanced) --- */
.order-timeline {
    display: flex;
    align-items: flex-start;
    justify-content: center;
    gap: 0;
    padding: 12px 10px 8px;
    direction: ltr; /* Timeline always LTR for visual flow */
    overflow: visible;
}

.order-timeline .timeline-step {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    min-width: 85px;
    position: relative;
    overflow: visible;
}

.order-timeline .timeline-icon {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.15rem;
    background: #f1f5f9;
    color: #94a3b8;
    border: 3px solid #e2e8f0;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    z-index: 1;
    flex-shrink: 0;
    inset: unset;
}

.order-timeline .timeline-icon i.bi {
    line-height: 1;
    vertical-align: middle;
}

.order-timeline .timeline-step span {
    font-size: 0.74rem;
    font-weight: 600;
    color: #94a3b8;
    text-align: center;
    white-space: nowrap;
    transition: all 0.3s ease;
}

/* Timeline step states */
.order-timeline .timeline-step.completed .timeline-icon {
    background: linear-gradient(135deg, #22c55e 0%, #16a34a 100%);
    color: white;
    border-color: #22c55e;
    box-shadow: 0 3px 10px rgba(34, 197, 94, 0.25);
}

.order-timeline .timeline-step.completed span {
    color: #16a34a;
    font-weight: 700;
}

.order-timeline .timeline-step.active .timeline-icon {
    background: linear-gradient(135deg, #2563eb 0%, #1d4ed8 100%);
    color: white;
    border-color: #2563eb;
    box-shadow: 0 0 0 5px rgba(37, 99, 235, 0.15), 0 4px 12px rgba(37, 99, 235, 0.3);
    animation: pulse-ring 2s ease-in-out infinite;
    transform: scale(1.08);
}

.order-timeline .timeline-step.active span {
    color: var(--proc-primary);
    font-weight: 800;
    font-size: 0.78rem;
}

/* Timeline connector */
.order-timeline .timeline-connector {
    flex: 1;
    height: 4px;
    background: #e2e8f0;
    margin-top: 24px; /* Centers with the icon */
    min-width: 30px;
    max-width: 80px;
    border-radius: 3px;
    transition: all 0.4s ease;
    position: relative;
}

.order-timeline .timeline-connector.completed {
    background: linear-gradient(90deg, #22c55e 0%, #16a34a 100%);
    box-shadow: 0 1px 4px rgba(34, 197, 94, 0.2);
}

/* --- Order Details Grid (3-column) --- */
.order-details-grid {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 24px;
    margin-bottom: 28px;
}

@media (max-width: 992px) {
    .order-details-grid {
        grid-template-columns: 1fr 1fr;
    }
}

@media (max-width: 576px) {
    .order-details-grid {
        grid-template-columns: 1fr;
    }
}

/* --- Detail Rows (Key-Value Pairs) --- */
.detail-rows {
    display: flex;
    flex-direction: column;
    gap: 0;
}

.detail-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 0;
    border-bottom: 1px solid #f1f5f9;
    gap: 12px;
}

.detail-row:last-child {
    border-bottom: none;
}

.detail-label {
    font-size: 0.82rem;
    color: #64748b;
    flex-shrink: 0;
}

.detail-value {
    font-size: 0.85rem;
    color: #1e293b;
    font-weight: 500;
    text-align: left;
}

.detail-value code {
    background: #f1f5f9;
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 0.82rem;
    color: var(--proc-primary);
    font-family: 'Courier New', monospace;
}

.detail-value-number {
    font-variant-numeric: tabular-nums;
    direction: ltr;
}

/* --- Items Table --- */
.procurement-items-table {
    margin-bottom: 0;
}

.procurement-items-table thead th {
    background: #f8fafc;
    font-size: 0.78rem;
    font-weight: 600;
    color: #64748b;
    text-transform: none;
    border-bottom: 2px solid #e2e8f0;
    padding: 12px 16px;
    white-space: nowrap;
}

.procurement-items-table tbody td {
    padding: 10px 16px;
    font-size: 0.85rem;
    color: #334155;
    vertical-align: middle;
}

.procurement-items-table tbody tr:hover {
    background: #f8fafc;
}

.procurement-items-table tbody td code {
    background: #f1f5f9;
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 0.8rem;
    color: var(--proc-primary);
}

.table-total-row {
    background: #f0f7ff !important;
    border-top: 2px solid var(--proc-primary) !important;
}

.table-total-row td {
    padding: 14px 16px !important;
    font-size: 0.9rem !important;
}

/* --- Empty Items Message --- */
.empty-items-message {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 40px 20px;
    color: #94a3b8;
    text-align: center;
}

.empty-items-message p {
    margin: 0;
    font-size: 0.9rem;
}

/* --- Notes --- */
.order-notes-text {
    margin: 0;
    font-size: 0.9rem;
    color: #475569;
    line-height: 1.7;
    white-space: pre-wrap;
}

/* --- Header Actions Row --- */
.proc-header-actions-row {
    display: flex;
    gap: 8px;
    align-items: center;
    flex-wrap: wrap;
}

/* --- Header SABER Warning --- */
.proc-header-saber-warning {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    background: linear-gradient(135deg, #fef2f2, #fee2e2);
    border: 1px solid #fca5a5;
    border-radius: 8px;
    color: #991b1b;
    font-size: 0.85rem;
    font-weight: 500;
}

.proc-header-saber-warning i {
    font-size: 1.1rem;
    color: #dc2626;
}

/* --- Order Details Responsive --- */
@media (max-width: 768px) {
    .order-timeline {
        padding: 10px 0;
        gap: 0;
    }

    .order-timeline .timeline-step {
        min-width: 55px;
    }

    .order-timeline .timeline-icon {
        width: 36px;
        height: 36px;
        font-size: 0.9rem;
    }

    .order-timeline .timeline-step span {
        font-size: 0.6rem;
    }

    .order-timeline .timeline-connector {
        min-width: 16px;
        margin-top: 18px;
    }

    .detail-row {
        flex-direction: column;
        align-items: flex-start;
        gap: 4px;
    }

    .detail-value {
        text-align: right;
    }
}

/* ===== Shipment Details Page ===== */

/* Status badges for new shipment statuses */
.proc-status-badge.status-manufacturing {
    background: #fef3c7;
    color: #92400e;
    border: 1px solid #fcd34d;
}

.proc-status-badge.status-shipped {
    background: #dbeafe;
    color: #1e40af;
    border: 1px solid #93c5fd;
}

.proc-status-badge.status-cancelled {
    background: #fee2e2;
    color: #991b1b;
    border: 1px solid #fca5a5;
}

/* Procurement table */
.proc-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.9rem;
}

.proc-table th {
    background: #f8fafc;
    color: #64748b;
    font-weight: 600;
    font-size: 0.8rem;
    padding: 10px 14px;
    text-align: right;
    border-bottom: 2px solid #e2e8f0;
}

.proc-table td {
    padding: 10px 14px;
    border-bottom: 1px solid #f1f5f9;
    color: #334155;
}

.proc-table tbody tr:hover {
    background: #f8fafc;
}

.proc-table tbody tr:last-child td {
    border-bottom: none;
}

/* Order link */
.order-link {
    color: var(--proc-primary, #2563eb);
    text-decoration: none;
    font-weight: 500;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    transition: color 0.2s;
}

.order-link:hover {
    color: #1d4ed8;
    text-decoration: underline;
}

/* Link orders modal */
.link-orders-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
    max-height: 400px;
    overflow-y: auto;
    padding: 4px;
}

.link-order-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 14px;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.2s;
    background: #fff;
}

.link-order-item:hover {
    border-color: var(--proc-primary, #2563eb);
    background: #f0f7ff;
}

.link-order-item.selected {
    border-color: var(--proc-primary, #2563eb);
    background: #eff6ff;
    box-shadow: 0 0 0 2px rgba(37, 99, 235, 0.15);
}

.link-order-item input[type="checkbox"] {
    width: 18px;
    height: 18px;
    accent-color: var(--proc-primary, #2563eb);
    flex-shrink: 0;
}

.link-order-info {
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 0;
}

.link-order-number {
    font-weight: 600;
    color: #1e293b;
    font-size: 0.9rem;
}

.link-order-detail {
    font-size: 0.8rem;
    color: #94a3b8;
}

/* Shipment orders table wrapper */
.shipment-orders-table {
    overflow-x: auto;
}

/* Loading & empty for details */
.loading-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 80px 20px;
    gap: 16px;
    color: #64748b;
}

.empty-state-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 80px 20px;
    gap: 12px;
    color: #64748b;
    text-align: center;
}

.empty-state-container h3 {
    color: #334155;
    margin: 0;
}

.empty-state-container p {
    margin: 0;
    font-size: 0.9rem;
}

/* Responsive for shipment details */
@media (max-width: 768px) {
    .shipment-orders-table {
        margin: 0 -16px;
        padding: 0 16px;
    }

    .proc-table th,
    .proc-table td {
        padding: 8px 10px;
        font-size: 0.8rem;
    }

    .link-orders-list {
        max-height: 300px;
    }
}

/* ======================================================================
   PROTOTYPE-MATCHING ENHANCED STYLES
   Styles ported from the prototype design system for visual parity
   ====================================================================== */

/* ===== Prototype Badge System ===== */
.proc-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 4px 12px;
    border-radius: 9999px;
    font-size: 0.75rem;
    font-weight: 600;
    white-space: nowrap;
}

.proc-badge-primary { background: var(--proc-primary-light); color: var(--proc-primary); }
.proc-badge-success { background: var(--proc-success-light); color: var(--proc-success); }
.proc-badge-warning { background: var(--proc-warning-light); color: var(--proc-warning); }
.proc-badge-danger { background: var(--proc-danger-light); color: var(--proc-danger); }
.proc-badge-info { background: var(--proc-info-light); color: var(--proc-info); }
.proc-badge-neutral { background: #f1f5f9; color: #64748b; }

/* ===== Procurement Buttons (Prototype Style) ===== */
.proc-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 8px 16px;
    border-radius: var(--proc-radius-lg);
    font-family: inherit;
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    border: none;
    transition: all 0.2s ease;
    white-space: nowrap;
    text-decoration: none;
}

.proc-btn:disabled { opacity: 0.5; cursor: not-allowed; }
.proc-btn-primary { background: var(--proc-primary); color: white; }
.proc-btn-primary:hover:not(:disabled) { background: var(--proc-primary-dark); }
.proc-btn-secondary { background: #f1f5f9; color: #475569; }
.proc-btn-secondary:hover:not(:disabled) { background: #e2e8f0; }
.proc-btn-success { background: var(--proc-success); color: white; }
.proc-btn-success:hover:not(:disabled) { background: #16a34a; }
.proc-btn-outline { background: transparent; color: var(--proc-primary); border: 2px solid var(--proc-primary); }
.proc-btn-outline:hover:not(:disabled) { background: var(--proc-primary); color: white; }
.proc-btn-sm { padding: 5px 12px; font-size: 0.78rem; }
.proc-btn-lg { padding: 12px 24px; font-size: 0.95rem; }

/* ===== Enhanced Shipment Card (Prototype Layout) ===== */
.proc-shipment-card {
    background: white;
    border-radius: var(--proc-radius-xl);
    border: 1px solid #e2e8f0;
    border-inline-start: 4px solid #94a3b8;
    padding: 16px;
    transition: all 0.2s ease;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.proc-shipment-card:hover {
    box-shadow: var(--proc-shadow-md);
    transform: translateY(-2px);
}

/* Status border colors */
.proc-shipment-card.status-manufacturing { border-inline-start-color: #d97706; }
.proc-shipment-card.status-shipped { border-inline-start-color: #6366f1; }
.proc-shipment-card.status-in-transit { border-inline-start-color: var(--proc-primary); }
.proc-shipment-card.status-at-port { border-inline-start-color: var(--proc-warning); }
.proc-shipment-card.status-clearing { border-inline-start-color: var(--proc-warning); }
.proc-shipment-card.status-cleared { border-inline-start-color: var(--proc-success); }
.proc-shipment-card.status-received { border-inline-start-color: var(--proc-success); }

/* Card header with container# + badge */
.proc-shipment-card .proc-shipment-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
}

.proc-shipment-card .proc-shipment-id {
    font-family: 'Courier New', monospace;
    font-weight: 700;
    font-size: 0.95rem;
    color: #1e293b;
    letter-spacing: 0.5px;
}

/* Card info grid with icon+text pairs */
.proc-shipment-card .proc-shipment-info {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
    font-size: 0.82rem;
}

.proc-shipment-card .proc-shipment-info-item {
    display: flex;
    align-items: center;
    gap: 8px;
    color: #475569;
}

.proc-shipment-card .proc-shipment-info-item i {
    color: #94a3b8;
    width: 16px;
    text-align: center;
    flex-shrink: 0;
    font-size: 0.85rem;
}

/* Card footer */
.proc-shipment-card .proc-shipment-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 12px;
    border-top: 1px solid #f1f5f9;
    gap: 8px;
}

.proc-shipment-card .proc-shipment-footer .proc-shipment-meta {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 0.8rem;
    color: #94a3b8;
}

.proc-shipment-card .proc-shipment-footer .proc-shipment-meta i {
    font-size: 0.85rem;
}

.proc-shipment-card .proc-shipment-actions {
    display: flex;
    gap: 6px;
}

/* ===== Filter Card Wrapper (Prototype Style) ===== */
.proc-filter-card {
    background: linear-gradient(135deg, #ffffff 0%, #f8fafc 100%);
    border-radius: var(--proc-radius-xl);
    border: 1px solid #e2e8f0;
    padding: 18px 24px;
    margin-bottom: 24px;
    box-shadow: var(--proc-shadow);
}

.proc-filter-card .proc-filter-buttons {
    margin-bottom: 0;
    gap: 10px;
}

/* ===== Enhanced Map Card (Prototype Style) ===== */
.proc-map-card {
    background: white;
    border-radius: var(--proc-radius-xl);
    border: 1px solid #e2e8f0;
    overflow: hidden;
    margin-bottom: 24px;
    box-shadow: var(--proc-shadow-sm);
}

.proc-map-card .proc-map-card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 20px;
    border-bottom: 1px solid #e2e8f0;
}

.proc-map-card .proc-map-card-header h3 {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 1rem;
    font-weight: 600;
    color: #1e293b;
    margin: 0;
}

.proc-map-card .proc-map-card-header h3 i {
    color: var(--proc-primary);
}

.proc-map-card .proc-map-card-body {
    padding: 24px;
    background: linear-gradient(135deg, #f8fafc 0%, var(--proc-primary-light) 100%);
}

.proc-map-visual {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 16px;
    flex-wrap: wrap;
}

.proc-map-visual .map-point {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    text-align: center;
}

.proc-map-visual .map-point-icon {
    font-size: 2rem;
    line-height: 1;
}

.proc-map-visual .map-point-name {
    font-weight: 600;
    color: #1e293b;
    font-size: 0.85rem;
}

.proc-map-visual .map-point-label {
    font-size: 0.75rem;
    color: #64748b;
}

.proc-map-visual .map-route {
    flex: 1;
    max-width: 200px;
    min-width: 80px;
    position: relative;
    height: 4px;
    background: var(--proc-primary);
    border-radius: 2px;
}

.proc-map-visual .map-route .map-ship-icon {
    position: absolute;
    top: -12px;
    left: 50%;
    transform: translateX(-50%);
    font-size: 1.4rem;
    color: var(--proc-primary);
}

.proc-map-card .proc-map-card-footer {
    padding: 12px 20px;
    text-align: center;
    color: #64748b;
    font-size: 0.82rem;
    background: #f8fafc;
    border-top: 1px solid #f1f5f9;
}

.proc-map-card .proc-map-card-footer i {
    color: var(--proc-info);
    margin-inline-end: 4px;
}

/* ===== Search Input Enhancement ===== */
.proc-search-input {
    position: relative;
    min-width: 260px;
}

.proc-search-input i.search-icon {
    position: absolute;
    right: 14px;
    top: 50%;
    transform: translateY(-50%);
    color: #94a3b8;
    font-size: 0.9rem;
    pointer-events: none;
}

.proc-search-input input {
    width: 100%;
    padding: 10px 16px;
    padding-right: 38px;
    border: 2px solid #e2e8f0;
    border-radius: var(--proc-radius-lg);
    font-family: inherit;
    font-size: 0.85rem;
    color: #334155;
    background: white;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.proc-search-input input:focus {
    outline: none;
    border-color: var(--proc-primary);
    box-shadow: 0 0 0 3px var(--proc-primary-light);
}

.proc-search-input input::placeholder {
    color: #94a3b8;
}

/* ===== Page Header Enhancement ===== */
.procurement-page .page-title h2 i {
    color: var(--proc-primary);
    font-size: 1.3rem;
}

.procurement-page .page-title h2 code {
    background: #f1f5f9;
    padding: 2px 10px;
    border-radius: 6px;
    font-size: 0.9rem;
    color: var(--proc-primary);
    margin-inline-start: 4px;
}

/* ===== Enhanced Card Hover ===== */
.proc-card {
    transition: box-shadow 0.2s ease, transform 0.2s ease;
}

.proc-card:hover {
    box-shadow: var(--proc-shadow-md);
}

/* ===== Enhanced Proc Card Header Icons ===== */
.proc-card-title i {
    font-size: 1.1rem;
}

/* ===== Empty State Enhancement ===== */
.proc-empty-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 12px;
    padding: 60px 20px;
    text-align: center;
    color: #94a3b8;
}

.proc-empty-state .proc-empty-icon {
    font-size: 3rem;
    opacity: 0.6;
}

.proc-empty-state h5 {
    color: #475569;
    font-weight: 600;
    margin: 0;
}

.proc-empty-state p {
    margin: 0;
    font-size: 0.9rem;
    max-width: 400px;
}

/* ===== Loading State Enhancement ===== */
.proc-loading-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 16px;
    padding: 60px 20px;
    text-align: center;
}

.proc-loading-state .spinner-border {
    width: 3rem;
    height: 3rem;
    border-width: 3px;
    color: var(--proc-primary);
}

.proc-loading-state p {
    color: #64748b;
    margin: 0;
    font-size: 0.9rem;
}

/* ===== Shipment Details - Info Card Style (Redesigned) ===== */
.proc-info-card {
    background: white;
    border-radius: 16px;
    border: 1px solid #e2e8f0;
    box-shadow: 0 2px 8px rgba(0,0,0,0.04);
    overflow: hidden;
    transition: all 0.3s ease;
}

.proc-info-card:hover {
    box-shadow: 0 8px 24px rgba(0,0,0,0.08);
    transform: translateY(-2px);
}

/* --- Card Header with large icon + gradient bg --- */
.proc-info-card .proc-info-card-header {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 18px 22px;
    border-bottom: none;
    position: relative;
}

.proc-info-card .proc-info-card-header::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 20px;
    right: 20px;
    height: 1px;
    background: linear-gradient(90deg, transparent, #e2e8f0, transparent);
}

.proc-info-card .proc-info-card-header i {
    font-size: 1.3rem;
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 12px;
    flex-shrink: 0;
}

.proc-info-card .proc-info-card-header i.icon-primary {
    background: linear-gradient(135deg, #dbeafe 0%, #bfdbfe 100%);
    color: var(--proc-primary);
    box-shadow: 0 2px 8px rgba(37, 99, 235, 0.15);
}

.proc-info-card .proc-info-card-header i.icon-secondary {
    background: linear-gradient(135deg, #cffafe 0%, #a5f3fc 100%);
    color: var(--proc-secondary);
    box-shadow: 0 2px 8px rgba(8, 145, 178, 0.15);
}

.proc-info-card .proc-info-card-header i.icon-success {
    background: linear-gradient(135deg, #dcfce7 0%, #bbf7d0 100%);
    color: var(--proc-success);
    box-shadow: 0 2px 8px rgba(34, 197, 94, 0.15);
}

.proc-info-card .proc-info-card-header i.icon-warning {
    background: linear-gradient(135deg, #fef3c7 0%, #fde68a 100%);
    color: #d97706;
    box-shadow: 0 2px 8px rgba(245, 158, 11, 0.15);
}

.proc-info-card .proc-info-card-header h4 {
    font-size: 1.05rem;
    font-weight: 700;
    color: #0f172a;
    margin: 0;
    letter-spacing: -0.01em;
}

.proc-info-card .proc-info-card-body {
    padding: 8px 22px 18px;
}

/* --- Enhanced Detail Rows --- */
.proc-info-card .detail-rows {
    display: flex;
    flex-direction: column;
    gap: 0;
}

.proc-info-card .detail-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 14px;
    border-radius: 10px;
    gap: 12px;
    transition: background 0.15s ease;
    border-bottom: none;
    margin: 1px 0;
}

.proc-info-card .detail-row:nth-child(odd) {
    background: #f8fafc;
}

.proc-info-card .detail-row:hover {
    background: #f1f5f9;
}

.proc-info-card .detail-row:last-child {
    border-bottom: none;
}

.proc-info-card .detail-label {
    font-size: 0.82rem;
    color: #64748b;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 6px;
}

.proc-info-card .detail-value {
    font-size: 0.88rem;
    color: #0f172a;
    font-weight: 600;
}

.proc-info-card .detail-value code {
    background: linear-gradient(135deg, #eff6ff 0%, #dbeafe 100%);
    padding: 3px 10px;
    border-radius: 6px;
    font-size: 0.82rem;
    color: var(--proc-primary);
    font-family: 'Courier New', monospace;
    font-weight: 700;
    border: 1px solid #bfdbfe;
}

/* --- Timeline Card Enhancement --- */
.proc-detail-timeline-card {
    background: linear-gradient(135deg, #ffffff 0%, #f8fafc 100%);
    border-radius: 16px;
    border: 1px solid #e2e8f0;
    box-shadow: 0 2px 8px rgba(0,0,0,0.04);
    padding: 10px 20px;
    margin-bottom: 24px;
    overflow: visible;
}

.proc-detail-timeline-card .order-timeline {
    padding: 8px 10px 4px;
}

/* --- Enhanced Section Cards for lower sections --- */
.proc-detail-section {
    background: white;
    border-radius: 16px;
    border: 1px solid #e2e8f0;
    box-shadow: 0 2px 8px rgba(0,0,0,0.04);
    overflow: hidden;
    margin-bottom: 24px;
    transition: box-shadow 0.3s ease;
}

.proc-detail-section:hover {
    box-shadow: 0 4px 16px rgba(0,0,0,0.06);
}

.proc-detail-section .proc-detail-section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 18px 22px;
    border-bottom: 1px solid #f1f5f9;
    background: linear-gradient(135deg, #fafbfc 0%, #f8fafc 100%);
    flex-wrap: wrap;
    gap: 12px;
}

.proc-detail-section .proc-detail-section-title {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 1.05rem;
    font-weight: 700;
    color: #0f172a;
    margin: 0;
}

.proc-detail-section .proc-detail-section-title i {
    font-size: 1.2rem;
}

.proc-detail-section .proc-detail-section-title .section-count {
    background: #eff6ff;
    color: var(--proc-primary);
    padding: 2px 10px;
    border-radius: 20px;
    font-size: 0.78rem;
    font-weight: 700;
    border: 1px solid #bfdbfe;
}

.proc-detail-section .proc-detail-section-body {
    padding: 20px 22px;
}

.proc-detail-section .proc-detail-section-body.no-padding {
    padding: 0;
}

/* --- Enhanced Table for Detail Sections --- */
.proc-detail-section .proc-table th {
    background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
    font-weight: 700;
    color: #475569;
    font-size: 0.8rem;
    padding: 14px 18px;
    border-bottom: 2px solid #e2e8f0;
    text-transform: none;
    letter-spacing: 0;
}

.proc-detail-section .proc-table td {
    padding: 14px 18px;
    font-size: 0.88rem;
    color: #1e293b;
    border-bottom: 1px solid #f1f5f9;
    vertical-align: middle;
}

.proc-detail-section .proc-table tbody tr {
    transition: background 0.15s ease;
}

.proc-detail-section .proc-table tbody tr:hover {
    background: #f0f7ff;
}

.proc-detail-section .proc-table tbody tr:last-child td {
    border-bottom: none;
}

/* --- Notes Section Enhancement --- */
.proc-detail-notes {
    background: linear-gradient(135deg, #fffbeb 0%, #fef3c7 30%, #ffffff 100%);
    border: 1px solid #fde68a;
}

.proc-detail-notes .proc-detail-section-header {
    background: transparent;
    border-bottom: 1px solid rgba(253, 230, 138, 0.5);
}

.proc-detail-notes .proc-detail-section-title i {
    color: #d97706;
}

/* ===== Pagination Enhancement ===== */
.proc-pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
    margin-top: 24px;
}

.proc-pagination .proc-btn {
    min-width: 36px;
    min-height: 36px;
    padding: 6px 12px;
}

.proc-pagination .page-indicator {
    background: var(--proc-primary);
    color: white;
    padding: 6px 16px;
    border-radius: var(--proc-radius-lg);
    font-size: 0.85rem;
    font-weight: 600;
}

/* ===== Responsive Enhancements ===== */
@media (max-width: 768px) {
    .proc-shipment-card .proc-shipment-info {
        grid-template-columns: 1fr;
        gap: 6px;
    }

    .proc-search-input {
        min-width: unset;
        width: 100%;
    }

    .proc-filter-card {
        padding: 12px 16px;
    }

    .proc-filter-card .proc-filter-buttons {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        flex-wrap: nowrap;
        padding-bottom: 4px;
    }

    .proc-filter-card .proc-filter-btn {
        flex-shrink: 0;
    }

    .proc-map-card .proc-map-card-body {
        padding: 16px;
    }

    .proc-map-visual {
        gap: 12px;
    }
}

/* ==========================================================================
   SHIPMENT DETAILS PAGE - Enhanced Header & Layout
   ========================================================================== */

/* --- Page Header --- */
.proc-detail-page-header {
    background: linear-gradient(135deg, #ffffff 0%, #f0f7ff 50%, #eff6ff 100%);
    border: 1px solid #dbeafe;
    border-radius: 16px;
    padding: 24px 28px;
    margin-bottom: 24px;
    box-shadow: 0 2px 12px rgba(37, 99, 235, 0.06);
    position: relative;
    overflow: hidden;
}

.proc-detail-page-header::before {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    width: 200px;
    height: 200px;
    background: radial-gradient(circle, rgba(37, 99, 235, 0.04) 0%, transparent 70%);
    border-radius: 50%;
    transform: translate(50px, -80px);
    pointer-events: none;
}

.proc-detail-page-header-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 16px;
    position: relative;
    z-index: 1;
}

.proc-detail-page-title-group {
    display: flex;
    align-items: center;
    gap: 16px;
    flex-wrap: wrap;
}

.proc-detail-page-title {
    font-size: 1.4rem;
    font-weight: 800;
    color: #0f172a;
    margin: 0;
    display: flex;
    align-items: center;
    gap: 12px;
    letter-spacing: -0.02em;
}

.proc-detail-container-code {
    background: linear-gradient(135deg, #eff6ff 0%, #dbeafe 100%);
    padding: 4px 14px;
    border-radius: 8px;
    font-size: 0.88rem;
    color: var(--proc-primary);
    font-family: 'Courier New', monospace;
    font-weight: 700;
    border: 1px solid #bfdbfe;
    letter-spacing: 0;
}

.proc-badge-lg {
    font-size: 0.85rem !important;
    padding: 7px 16px !important;
}

.proc-detail-page-actions {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

/* --- Enhanced order-link in tables --- */
.order-link {
    color: var(--proc-primary);
    text-decoration: none;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 10px;
    border-radius: 8px;
    transition: all 0.2s ease;
    background: transparent;
}

.order-link:hover {
    background: #eff6ff;
    color: #1d4ed8;
    text-decoration: none;
}

.order-link i {
    font-size: 0.9rem;
    color: #93c5fd;
}

/* --- Notes text enhancement --- */
.order-notes-text {
    color: #475569;
    font-size: 0.9rem;
    line-height: 1.8;
    padding: 8px 14px;
    background: rgba(255, 255, 255, 0.6);
    border-radius: 10px;
    margin: 0;
    border-right: 3px solid #fbbf24;
}

/* --- Detail Section detail-rows (outside info-card) --- */
.proc-detail-section .detail-rows {
    display: flex;
    flex-direction: column;
    gap: 0;
}

.proc-detail-section .detail-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 14px;
    border-radius: 10px;
    gap: 12px;
    transition: background 0.15s ease;
    margin: 1px 0;
}

.proc-detail-section .detail-row:nth-child(odd) {
    background: #f8fafc;
}

.proc-detail-section .detail-row:hover {
    background: #f1f5f9;
}

.proc-detail-section .detail-label {
    font-size: 0.82rem;
    color: #64748b;
    font-weight: 500;
}

.proc-detail-section .detail-value {
    font-size: 0.88rem;
    color: #0f172a;
    font-weight: 600;
}

.proc-detail-section .detail-value code {
    background: linear-gradient(135deg, #eff6ff 0%, #dbeafe 100%);
    padding: 3px 10px;
    border-radius: 6px;
    font-size: 0.82rem;
    color: var(--proc-primary);
    font-family: 'Courier New', monospace;
    font-weight: 700;
    border: 1px solid #bfdbfe;
}

/* --- Procurement Modal Enhancement --- */
.procurement-modal {
    border: 1px solid #e2e8f0;
    box-shadow: 0 20px 50px rgba(0,0,0,0.15);
}

.procurement-modal .modal-header {
    background: linear-gradient(135deg, #f8fafc 0%, #eff6ff 100%);
    border-bottom: 1px solid #e2e8f0;
    padding: 18px 24px;
}

.procurement-modal .modal-header h3 {
    color: #0f172a;
    font-weight: 700;
    font-size: 1.08rem;
}

.procurement-modal .modal-header h3 i {
    color: var(--proc-primary);
}

.procurement-modal .modal-body {
    padding: 20px 24px;
}

.procurement-modal .modal-footer {
    background: #fafbfc;
    border-top: 1px solid #f1f5f9;
    padding: 14px 24px;
}

/* --- Link Order Item Enhancement --- */
.link-order-item {
    border-radius: 12px;
    transition: all 0.2s ease;
}

.link-order-item.selected {
    background: #eff6ff;
    border-color: var(--proc-primary);
    box-shadow: 0 0 0 2px rgba(37, 99, 235, 0.1);
}

.link-order-number {
    font-weight: 700;
    color: var(--proc-primary);
}

.link-order-detail {
    font-size: 0.82rem;
    color: #64748b;
}

/* --- Responsive for detail page header --- */
@media (max-width: 768px) {
    .proc-detail-page-header {
        padding: 18px 16px;
    }

    .proc-detail-page-header-content {
        flex-direction: column;
        align-items: stretch;
    }

    .proc-detail-page-title {
        font-size: 1.15rem;
    }

    .proc-detail-page-actions {
        justify-content: flex-end;
    }

    .proc-detail-timeline-card {
        padding: 16px;
    }

    .order-details-grid {
        grid-template-columns: 1fr !important;
    }
}

/* ==========================================================================
   PURCHASE ORDER FILTER BUTTONS (Status-Colored)
   ========================================================================== */

/* === Draft / مسودة === */
.proc-filter-btn.filter-draft {
    border-color: #f1f5f9;
    color: #475569;
}
.proc-filter-btn.filter-draft i { color: #64748b; }
.proc-filter-btn.filter-draft:hover {
    border-color: #cbd5e1;
    background: #f8fafc;
}
.proc-filter-btn.filter-draft.active {
    background: linear-gradient(135deg, #64748b 0%, #475569 100%);
    color: white;
    border-color: #475569;
    box-shadow: 0 4px 14px rgba(71, 85, 105, 0.35);
}
.proc-filter-btn.filter-draft.active i { color: white; }

/* === Sent / مُرسل === */
.proc-filter-btn.filter-sent {
    border-color: #dbeafe;
    color: #1e40af;
}
.proc-filter-btn.filter-sent i { color: #2563eb; }
.proc-filter-btn.filter-sent:hover {
    border-color: #93c5fd;
    background: #eff6ff;
}
.proc-filter-btn.filter-sent.active {
    background: linear-gradient(135deg, #2563eb 0%, #1d4ed8 100%);
    color: white;
    border-color: #1d4ed8;
    box-shadow: 0 4px 14px rgba(37, 99, 235, 0.35);
}
.proc-filter-btn.filter-sent.active i { color: white; }

/* === Priced / تم التسعير === */
.proc-filter-btn.filter-priced {
    border-color: #fef3c7;
    color: #92400e;
}
.proc-filter-btn.filter-priced i { color: #d97706; }
.proc-filter-btn.filter-priced:hover {
    border-color: #fcd34d;
    background: #fffbeb;
}
.proc-filter-btn.filter-priced.active {
    background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
    color: white;
    border-color: #d97706;
    box-shadow: 0 4px 14px rgba(217, 119, 6, 0.35);
}
.proc-filter-btn.filter-priced.active i { color: white; }

/* === Awarded / مُعمّد === */
.proc-filter-btn.filter-awarded {
    border-color: #bbf7d0;
    color: #166534;
}
.proc-filter-btn.filter-awarded i { color: #16a34a; }
.proc-filter-btn.filter-awarded:hover {
    border-color: #86efac;
    background: #f0fdf4;
}
.proc-filter-btn.filter-awarded.active {
    background: linear-gradient(135deg, #22c55e 0%, #16a34a 100%);
    color: white;
    border-color: #16a34a;
    box-shadow: 0 4px 14px rgba(22, 163, 74, 0.35);
}
.proc-filter-btn.filter-awarded.active i { color: white; }

/* === InProduction / قيد التصنيع === */
.proc-filter-btn.filter-inproduction {
    border-color: #e9d5ff;
    color: #6b21a8;
}
.proc-filter-btn.filter-inproduction i { color: #9333ea; }
.proc-filter-btn.filter-inproduction:hover {
    border-color: #c084fc;
    background: #faf5ff;
}
.proc-filter-btn.filter-inproduction.active {
    background: linear-gradient(135deg, #9333ea 0%, #7e22ce 100%);
    color: white;
    border-color: #7e22ce;
    box-shadow: 0 4px 14px rgba(147, 51, 234, 0.35);
}
.proc-filter-btn.filter-inproduction.active i { color: white; }

/* =====================================================
   Items Summary Footer (New/Edit Order Pages)
   ===================================================== */
.proc-items-summary {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    padding: 0.875rem 1.25rem;
    border: 1px solid var(--gray-200, #e5e7eb);
    background: linear-gradient(135deg, #f0f9ff 0%, #f8fafc 100%);
    border-radius: 12px 12px 0 0;
    flex-wrap: wrap;
}

.proc-items-summary-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.875rem;
    color: var(--gray-600, #4b5563);
}

.proc-items-summary-item > i {
    font-size: 1rem;
    color: var(--proc-primary, #2563eb);
    opacity: 0.7;
}

.proc-items-summary-label {
    font-weight: 500;
    color: var(--gray-500, #6b7280);
}

.proc-items-summary-value {
    font-weight: 700;
    color: var(--gray-800, #1f2937);
    font-size: 0.95rem;
}

.proc-items-summary-price {
    color: var(--proc-primary, #2563eb) !important;
    font-size: 1rem !important;
}

.proc-items-summary-divider {
    width: 1px;
    height: 24px;
    background: var(--gray-300, #d1d5db);
}

/* =====================================================
   Delete Button (Table Rows)
   ===================================================== */
.proc-btn-delete {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border-radius: 8px;
    border: 1px solid #fca5a5;
    background: #fef2f2;
    color: #dc2626;
    cursor: pointer;
    transition: all 0.2s ease;
    font-size: 0.85rem;
    padding: 0;
}

.proc-btn-delete:hover {
    background: #dc2626;
    color: white;
    border-color: #dc2626;
    box-shadow: 0 2px 8px rgba(220, 38, 38, 0.3);
    transform: translateY(-1px);
}

.proc-btn-delete:active {
    transform: translateY(0);
    box-shadow: 0 1px 4px rgba(220, 38, 38, 0.2);
}

/* ===== Responsive ===== */
@media (max-width: 768px) {
    .proc-items-summary {
        gap: 0.75rem;
        padding: 0.75rem 1rem;
    }

    .proc-items-summary-divider {
        display: none;
    }

    .proc-items-summary-item {
        flex: 1;
        min-width: 140px;
    }
}

/* ========== Saber Certificate Status in PO Details ========== */
.saber-summary-badges {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
    align-items: center;
}

.saber-status-list {
    display: flex;
    flex-direction: column;
}

.saber-status-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.75rem 1.25rem;
    border-bottom: 1px solid #f1f5f9;
    gap: 1rem;
    transition: background 0.15s;
}

.saber-status-row:last-child {
    border-bottom: none;
}

.saber-status-row:hover {
    background: #f8fafc;
}

.saber-status-row.saber-valid {
    border-inline-start: 3px solid #22c55e;
}

.saber-status-row.saber-warning {
    border-inline-start: 3px solid #f59e0b;
    background: #fffbeb;
}

.saber-status-row.saber-danger {
    border-inline-start: 3px solid #ef4444;
    background: #fef2f2;
}

.saber-status-row.saber-expired {
    border-inline-start: 3px solid #ef4444;
    background: #fef2f2;
}

.saber-status-row.saber-missing {
    border-inline-start: 3px solid #94a3b8;
    background: #f8fafc;
}

.saber-item-info {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    flex: 1;
    min-width: 0;
}

.saber-part-number {
    font-size: 0.8rem;
    padding: 0.15rem 0.5rem;
    background: #f1f5f9;
    border-radius: 4px;
    white-space: nowrap;
    color: #334155;
    font-weight: 600;
}

.saber-product-name {
    font-size: 0.85rem;
    color: #475569;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.saber-cert-info {
    display: flex;
    align-items: center;
    gap: 1rem;
    flex-shrink: 0;
}

.saber-cert-number {
    font-size: 0.8rem;
    color: #64748b;
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

.saber-expiry {
    font-size: 0.8rem;
    color: #64748b;
    display: flex;
    align-items: center;
    gap: 0.25rem;
    white-space: nowrap;
}

.saber-status-badge {
    flex-shrink: 0;
}

.saber-action-btn {
    flex-shrink: 0;
    margin-inline-start: 0.5rem;
}

.saber-action-btn .proc-btn-sm {
    padding: 4px 10px;
    font-size: 0.75rem;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    white-space: nowrap;
}

/* ===== Saber Status Responsive ===== */
@media (max-width: 768px) {
    .saber-status-row {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
        padding: 0.75rem 1rem;
    }

    .saber-item-info {
        width: 100%;
    }

    .saber-cert-info {
        width: 100%;
        justify-content: flex-start;
    }

    .saber-summary-badges {
        width: 100%;
        justify-content: flex-start;
    }
}

/* ===== Order Items Summary Cards ===== */
.order-items-summary-cards {
    display: flex;
    gap: 1rem;
    padding: 1rem 1.25rem;
    background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
    border-bottom: 1px solid #e2e8f0;
}

/* ===== Order Info Card - بطاقة معلومات الطلب المحسنة ===== */
.order-info-card {
    background: #fff;
    border-radius: var(--proc-radius-xl);
    box-shadow: var(--proc-shadow-md);
    border: 1px solid #e2e8f0;
    margin-bottom: 1.5rem;
    overflow: hidden;
}

.order-info-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1.5rem;
    padding: 1.25rem 1.5rem;
    border-bottom: 1px solid #f1f5f9;
}

.order-info-group {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 1.5rem;
}

.info-item {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.info-label {
    font-size: 0.7rem;
    color: #64748b;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.info-value {
    font-size: 0.9rem;
    color: #1e293b;
    font-weight: 600;
}

.info-code {
    background: linear-gradient(135deg, var(--proc-primary-light) 0%, #bfdbfe 100%);
    color: var(--proc-primary-dark);
    padding: 0.375rem 0.75rem;
    border-radius: 0.5rem;
    font-size: 0.85rem;
    font-weight: 700;
    border: 1px solid rgba(37, 99, 235, 0.15);
    display: inline-block;
}

/* بطاقة المورد */
.order-info-supplier {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 1rem;
    background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
    border-radius: var(--proc-radius);
    border: 1px solid #e2e8f0;
}

.order-info-supplier i {
    font-size: 1.5rem;
    color: var(--proc-secondary);
}

.supplier-details {
    display: flex;
    flex-direction: column;
    gap: 0.125rem;
}

.supplier-name {
    font-size: 0.9rem;
    font-weight: 700;
    color: #1e293b;
}

.supplier-code {
    font-size: 0.75rem;
    color: #64748b;
    background: #fff;
    padding: 0.125rem 0.5rem;
    border-radius: 0.25rem;
    border: 1px solid #e2e8f0;
}

/* الإحصائيات */
.order-info-stats-row {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    padding: 1rem 1.5rem;
    background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
}

.stat-box {
    display: flex;
    align-items: center;
    gap: 0.625rem;
    padding: 0.625rem 1rem;
    background: #fff;
    border-radius: var(--proc-radius);
    border: 1px solid #e2e8f0;
    transition: all 0.2s ease;
}

.stat-box:hover {
    box-shadow: var(--proc-shadow-sm);
    transform: translateY(-1px);
}

.stat-box i {
    font-size: 1.25rem;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 0.5rem;
}

.stat-box.stat-info i {
    color: var(--proc-info);
    background: rgba(14, 165, 233, 0.1);
}

.stat-box.stat-secondary i {
    color: var(--proc-secondary);
    background: rgba(8, 145, 178, 0.1);
}

.stat-box.stat-success i {
    color: var(--proc-success);
    background: rgba(34, 197, 94, 0.1);
}

.stat-box .stat-number {
    font-size: 1.125rem;
    font-weight: 700;
    color: #1e293b;
}

.stat-box.stat-success .stat-number {
    color: var(--proc-success);
    font-size: 1.25rem;
}

.stat-box .stat-label {
    font-size: 0.75rem;
    color: #64748b;
    font-weight: 500;
}

/* Responsive - Tablet */
@media (max-width: 1024px) {
    .order-info-row {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
    }

    .order-info-supplier {
        width: 100%;
    }

    .order-info-stats-row {
        flex-wrap: wrap;
    }

    .stat-box {
        flex: 1;
        min-width: 120px;
        justify-content: center;
    }
}

/* Responsive - Mobile */
@media (max-width: 640px) {
    .order-info-card {
        border-radius: var(--proc-radius);
    }

    .order-info-row {
        padding: 1rem;
    }

    .order-info-group {
        gap: 1rem;
        width: 100%;
    }

    .info-item {
        min-width: calc(50% - 0.5rem);
    }

    .order-info-supplier {
        flex-direction: row;
        padding: 0.625rem 0.875rem;
    }

    .order-info-supplier i {
        font-size: 1.25rem;
    }

    .supplier-name {
        font-size: 0.85rem;
    }

    .order-info-stats-row {
        padding: 0.875rem 1rem;
        gap: 0.5rem;
    }

    .stat-box {
        padding: 0.5rem 0.75rem;
        flex-direction: column;
        gap: 0.25rem;
        text-align: center;
    }

    .stat-box i {
        width: 32px;
        height: 32px;
        font-size: 1rem;
    }

    .stat-box .stat-number {
        font-size: 1rem;
    }

    .stat-box.stat-success .stat-number {
        font-size: 1rem;
    }

    .stat-box .stat-label {
        font-size: 0.65rem;
    }
}

.summary-card {
    display: flex;
    align-items: center;
    gap: 0.875rem;
    padding: 1rem 1.25rem;
    background: #fff;
    border-radius: var(--proc-radius-lg);
    box-shadow: var(--proc-shadow-sm);
    min-width: 180px;
    transition: all 0.2s ease;
}

.summary-card:hover {
    box-shadow: var(--proc-shadow);
    transform: translateY(-1px);
}

.summary-card-icon {
    width: 44px;
    height: 44px;
    border-radius: var(--proc-radius);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
    flex-shrink: 0;
}

.summary-card-quantity .summary-card-icon {
    background: linear-gradient(135deg, var(--proc-info-light) 0%, #bae6fd 100%);
    color: var(--proc-info);
}

.summary-card-value .summary-card-icon {
    background: linear-gradient(135deg, var(--proc-success-light) 0%, #bbf7d0 100%);
    color: var(--proc-success);
}

.summary-card-content {
    display: flex;
    flex-direction: column;
    gap: 0.125rem;
}

.summary-card-label {
    font-size: 0.75rem;
    color: #64748b;
    font-weight: 500;
    letter-spacing: 0.025em;
}

.summary-card-value {
    font-size: 1.375rem;
    font-weight: 700;
    color: #1e293b;
    line-height: 1.2;
}

.summary-card-quantity .summary-card-value {
    color: var(--proc-info);
}

.summary-card-value .summary-card-value {
    color: var(--proc-success);
}

/* Responsive */
@media (max-width: 640px) {
    .order-items-summary-cards {
        flex-direction: column;
        gap: 0.75rem;
        padding: 1rem;
    }

    .summary-card {
        width: 100%;
        min-width: auto;
        padding: 0.875rem 1rem;
    }

    .summary-card-icon {
        width: 40px;
        height: 40px;
        font-size: 1.125rem;
    }

    .summary-card-value {
        font-size: 1.25rem;
    }
}

/* ========================================
   Procurement Modal System
   ======================================== */

/* Modal Backdrop - الخلفية المعتمة */
.proc-modal-backdrop {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    width: 100%;
    height: 100%;
    background: rgba(15, 23, 42, 0.6);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1050;
    padding: 20px;
    animation: procModalFadeIn 0.2s ease-out;
}

@keyframes procModalFadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

/* Modal Container */
.proc-modal {
    background: #ffffff;
    border-radius: 16px;
    box-shadow: 0 25px 60px rgba(0, 0, 0, 0.25), 0 10px 20px rgba(0, 0, 0, 0.1);
    max-height: 90vh;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    animation: procModalSlideIn 0.25s ease-out;
}

@keyframes procModalSlideIn {
    from {
        opacity: 0;
        transform: translateY(-20px) scale(0.98);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

/* Modal Sizes */
.proc-modal-sm {
    width: 100%;
    max-width: 400px;
}

.proc-modal-md {
    width: 100%;
    max-width: 600px;
}

.proc-modal-lg {
    width: 100%;
    max-width: 900px;
}

.proc-modal-xl {
    width: 100%;
    max-width: 1200px;
}

/* Modal Header */
.proc-modal .modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 18px 24px;
    background: linear-gradient(135deg, #f8fafc 0%, #eff6ff 100%);
    border-bottom: 1px solid #e2e8f0;
}

.proc-modal .modal-title {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 1.1rem;
    font-weight: 700;
    color: #0f172a;
    margin: 0;
}

.proc-modal .modal-title i {
    font-size: 1.25rem;
}

.proc-modal .btn-close {
    background: none;
    border: none;
    font-size: 1.5rem;
    color: #64748b;
    cursor: pointer;
    padding: 0;
    line-height: 1;
    transition: color 0.15s ease;
}

.proc-modal .btn-close:hover {
    color: #ef4444;
}

.proc-modal .btn-close::before {
    content: "×";
}

/* Modal Body */
.proc-modal .modal-body {
    padding: 24px;
    overflow-y: auto;
    flex: 1;
}

/* Modal Footer */
.proc-modal .modal-footer {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 12px;
    padding: 16px 24px;
    background: #fafbfc;
    border-top: 1px solid #f1f5f9;
}

/* Modal Form Styles */
.proc-modal .form-label {
    font-weight: 600;
    color: #374151;
    margin-bottom: 6px;
    font-size: 0.9rem;
}

.proc-modal .form-control {
    border: 1px solid #d1d5db;
    border-radius: 8px;
    padding: 10px 14px;
    font-size: 0.95rem;
    transition: all 0.15s ease;
}

.proc-modal .form-control:focus {
    border-color: var(--proc-primary);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
    outline: none;
}

.proc-modal .form-control::placeholder {
    color: #9ca3af;
}

/* Responsive Modal */
@media (max-width: 768px) {
    .proc-modal-backdrop {
        padding: 10px;
        align-items: flex-end;
    }

    .proc-modal {
        max-height: 85vh;
        border-radius: 16px 16px 0 0;
        width: 100% !important;
        max-width: 100% !important;
    }

    .proc-modal .modal-header {
        padding: 14px 16px;
    }

    .proc-modal .modal-body {
        padding: 16px;
    }

    .proc-modal .modal-footer {
        padding: 12px 16px;
        flex-wrap: wrap;
    }

    .proc-modal .modal-footer .proc-btn {
        flex: 1;
        min-width: 120px;
    }
}

/* ===== Certificate Details Modal ===== */
.detail-item {
    background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
    padding: 12px 16px;
    border-radius: 10px;
    border: 1px solid #e2e8f0;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.detail-label {
    font-size: 0.8rem;
    color: #64748b;
    display: flex;
    align-items: center;
    gap: 6px;
}

.detail-label i {
    color: var(--proc-primary);
}

.detail-value {
    font-size: 0.95rem;
    font-weight: 600;
    color: #1e293b;
}
