/* ===== 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;
}

/* === Inventory Filter: Match / مطابق === */
.proc-filter-btn.filter-match {
    border-color: #bbf7d0;
    color: #166534;
}
.proc-filter-btn.filter-match i { color: #22c55e; }
.proc-filter-btn.filter-match:hover {
    border-color: #86efac;
    background: #f0fdf4;
}
.proc-filter-btn.filter-match.active {
    background: linear-gradient(135deg, #22c55e 0%, #16a34a 100%);
    color: white;
    border-color: #16a34a;
    box-shadow: 0 4px 14px rgba(34, 197, 94, 0.35);
}
.proc-filter-btn.filter-match.active i { color: white; }

/* === Inventory Filter: Shortage / نقص === */
.proc-filter-btn.filter-shortage {
    border-color: #fecaca;
    color: #991b1b;
}
.proc-filter-btn.filter-shortage i { color: #ef4444; }
.proc-filter-btn.filter-shortage:hover {
    border-color: #fca5a5;
    background: #fef2f2;
}
.proc-filter-btn.filter-shortage.active {
    background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
    color: white;
    border-color: #dc2626;
    box-shadow: 0 4px 14px rgba(239, 68, 68, 0.35);
}
.proc-filter-btn.filter-shortage.active i { color: white; }

/* === Inventory Filter: Excess / زيادة === */
.proc-filter-btn.filter-excess {
    border-color: #fef3c7;
    color: #92400e;
}
.proc-filter-btn.filter-excess i { color: #f59e0b; }
.proc-filter-btn.filter-excess:hover {
    border-color: #fcd34d;
    background: #fffbeb;
}
.proc-filter-btn.filter-excess.active {
    background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
    color: white;
    border-color: #d97706;
    box-shadow: 0 4px 14px rgba(245, 158, 11, 0.35);
}
.proc-filter-btn.filter-excess.active i { 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: 16px 8px;
        flex-wrap: wrap;
        justify-content: center;
        gap: 8px 4px;
        overflow-x: visible;
        direction: rtl;
    }

    .proc-timeline::before {
        display: none;
    }

    .proc-step {
        min-width: 70px;
        flex: 0 0 auto;
        position: relative;
        padding: 4px 8px;
    }

    /* Arrow connector between steps */
    .proc-step:not(:first-child)::before {
        content: '←';
        position: absolute;
        top: 16px;
        right: -8px;
        font-size: 0.9rem;
        color: #cbd5e1;
        font-weight: bold;
        z-index: 2;
    }

    .proc-step.completed:not(:first-child)::before {
        color: var(--proc-success);
    }

    .proc-step.active:not(:first-child)::before {
        color: var(--proc-primary);
        animation: arrow-pulse 1.5s ease-in-out infinite;
    }

    @keyframes arrow-pulse {
        0%, 100% { opacity: 1; }
        50% { opacity: 0.4; }
    }

    .proc-step-icon {
        width: 36px;
        height: 36px;
        font-size: 0.85rem;
        box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
    }

    .proc-step-label {
        font-size: 0.65rem;
        max-width: 65px;
    }

    .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;
}

/* --- SABER Warning Banner (below timeline) --- */
.po-saber-warning-banner {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 20px;
    background: linear-gradient(135deg, #fef2f2, #fee2e2);
    border: 1px solid #fca5a5;
    border-radius: 12px;
    margin-bottom: 16px;
}

.po-saber-warning-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: #fee2e2;
    color: #dc2626;
    font-size: 1.2rem;
    flex-shrink: 0;
}

.po-saber-warning-text {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.po-saber-warning-text strong {
    color: #991b1b;
    font-size: 0.9rem;
}

.po-saber-warning-text span {
    color: #b91c1c;
    font-size: 0.8rem;
}

/* ========================================
   Procurement Page Loader (Logo + Pulse)
   ======================================== */
.proc-loader {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 100px 20px;
    gap: 28px;
}

.proc-loader-logo {
    position: relative;
    width: 170px;
    height: 170px;
}

/* الحلقة الخارجية الدوّارة */
.proc-loader-ring {
    position: absolute;
    inset: 0;
    border: 3.5px solid #e2e8f0;
    border-top-color: #00a693;
    border-right-color: #f5a623;
    border-radius: 50%;
    animation: procLoaderSpin 1.2s linear infinite;
}

/* الدائرة البيضاء الداخلية */
.proc-loader-inner {
    position: absolute;
    inset: 16px;
    border-radius: 50%;
    background: #fff;
    box-shadow: 0 3px 16px rgba(0, 0, 0, 0.07);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2;
}

/* صورة الشعار */
.proc-loader-image {
    width: 64px;
    height: 64px;
    object-fit: contain;
    animation: procLoaderPulse 2s ease-in-out infinite;
}

.proc-loader-text {
    color: #64748b;
    font-size: 1.05rem;
    font-weight: 500;
    margin: 0;
    animation: procLoaderFade 1.5s ease-in-out infinite;
}

/* --- Responsive: Mobile --- */
@media (max-width: 768px) {
    .proc-loader {
        padding: 16px;
        gap: 20px;
        min-height: 60vh;
    }

    .proc-loader-logo {
        width: 120px;
        height: 120px;
    }

    .proc-loader-ring {
        border-width: 2.5px;
    }

    .proc-loader-inner {
        inset: 12px;
        box-shadow: 0 2px 10px rgba(0, 0, 0, 0.06);
    }

    .proc-loader-image {
        width: 44px;
        height: 44px;
    }

    .proc-loader-text {
        font-size: 0.88rem;
    }
}

@keyframes procLoaderPulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.06); }
}

@keyframes procLoaderSpin {
    to { transform: rotate(360deg); }
}

@keyframes procLoaderFade {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

/* ========================================
   Compare Table: Desktop / Mobile Cards
   ======================================== */

/* Desktop: show table, hide cards */
.proc-compare-desktop { display: block; }
.proc-compare-mobile  { display: none; }

@media (max-width: 768px) {
    .proc-compare-desktop { display: none; }
    .proc-compare-mobile  { display: flex; flex-direction: column; gap: 12px; padding: 12px; }
}

/* --- Mobile Compare Cards --- */
.proc-compare-card {
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 14px;
    transition: box-shadow 0.2s;
}

.proc-compare-card:hover {
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.06);
}

.proc-compare-card--unavailable {
    opacity: 0.55;
    background: #fef2f2;
    border-color: #fecaca;
}

.proc-compare-card--summary {
    background: #f0f9ff;
    border-color: #bae6fd;
    opacity: 1;
}

/* Card Header */
.proc-compare-card-header {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
    padding-bottom: 10px;
    border-bottom: 1px solid #f1f5f9;
}

.proc-compare-card-num {
    font-weight: 700;
    font-size: 0.82rem;
    color: #64748b;
    background: #f1f5f9;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.proc-compare-card-part {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--proc-primary, #2563eb);
    background: #eff6ff;
    padding: 2px 8px;
    border-radius: 6px;
}

.proc-compare-card-badge {
    margin-inline-start: auto;
    font-size: 0.72rem;
    font-weight: 600;
    padding: 3px 8px;
    border-radius: 20px;
    display: inline-flex;
    align-items: center;
    gap: 3px;
    white-space: nowrap;
}

.proc-compare-card-badge--available {
    background: #dcfce7;
    color: #16a34a;
}

.proc-compare-card-badge--unavailable {
    background: #fef2f2;
    color: #dc2626;
}

/* Description */
.proc-compare-card-desc {
    margin: 8px 0 0;
    font-size: 0.82rem;
    color: #475569;
    line-height: 1.5;
}

/* 2x2 Grid */
.proc-compare-card-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    margin-top: 12px;
}

.proc-compare-card-field {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.proc-compare-card-label {
    font-size: 0.72rem;
    color: #94a3b8;
    font-weight: 500;
}

.proc-compare-card-value {
    font-size: 0.88rem;
    color: #1e293b;
    font-weight: 500;
}

/* --- Purchase Orders Action Buttons --- */
.po-action-buttons {
    display: flex;
    gap: 6px;
    align-items: center;
    justify-content: center;
}

.po-action-btn {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 5px 12px;
    border-radius: 8px;
    font-size: 0.8rem;
    font-weight: 500;
    border: 1.5px solid;
    cursor: pointer;
    transition: all 0.2s ease;
    white-space: nowrap;
    font-family: inherit;
}

.po-action-btn i {
    font-size: 0.85rem;
}

/* View - Green */
.po-action-btn-view {
    background: #f0fdf4;
    color: #16a34a;
    border-color: #bbf7d0;
}

.po-action-btn-view:hover {
    background: #16a34a;
    color: #fff;
    border-color: #16a34a;
    box-shadow: 0 2px 8px rgba(22, 163, 74, 0.3);
    transform: translateY(-1px);
}

/* Edit - Orange */
.po-action-btn-edit {
    background: #fffbeb;
    color: #f59e0b;
    border-color: #fcd34d;
}

.po-action-btn-edit:hover {
    background: #f59e0b;
    color: #fff;
    border-color: #f59e0b;
    box-shadow: 0 2px 8px rgba(245, 158, 11, 0.3);
    transform: translateY(-1px);
}

/* Delete - Red (icon only) */
.po-action-btn-delete {
    background: #fef2f2;
    color: #ef4444;
    border-color: #fecaca;
    padding: 5px 8px;
}

.po-action-btn-delete:hover {
    background: #ef4444;
    color: #fff;
    border-color: #ef4444;
    box-shadow: 0 2px 8px rgba(239, 68, 68, 0.3);
    transform: translateY(-1px);
}

/* --- 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: linear-gradient(135deg, #2563eb, #1d4ed8); color: white; }
.proc-badge-success { background: linear-gradient(135deg, #22c55e, #16a34a); color: white; }
.proc-badge-warning { background: linear-gradient(135deg, #f59e0b, #d97706); color: white; }
.proc-badge-danger { background: linear-gradient(135deg, #ef4444, #dc2626); color: white; }
.proc-badge-info { background: linear-gradient(135deg, #0ea5e9, #0284c7); color: white; }
.proc-badge-neutral { background: #e2e8f0; color: #475569; }
.proc-badge-indigo { background: linear-gradient(135deg, #6366f1, #4f46e5); color: white; }
.proc-badge-teal { background: linear-gradient(135deg, #14b8a6, #0d9488); color: white; }
.proc-badge-purple { background: linear-gradient(135deg, #a855f7, #9333ea); color: white; }

/* ===== 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: white; color: #334155; border: 1.5px solid #cbd5e1; box-shadow: 0 1px 3px rgba(0,0,0,0.06); }
.proc-btn-secondary:hover:not(:disabled) { background: #f1f5f9; color: #1e293b; border-color: #94a3b8; box-shadow: 0 3px 10px rgba(100,116,139,0.18); transform: translateY(-1px); }
.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-danger { background: #ef4444; color: white; }
.proc-btn-danger:hover:not(:disabled) { background: #dc2626; }
.proc-btn-view { background: #10b981; color: white; }
.proc-btn-view:hover:not(:disabled) { background: #059669; }
.proc-btn-download { background: #2563eb; color: white; }
.proc-btn-download:hover:not(:disabled) { background: #1d4ed8; }
.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;
}

/* ==========================================================================
   ORDER HISTORY TIMELINE
   ========================================================================== */

/* --- Rejection / Revision Alert Bar --- */
.po-rejection-alert {
    display: flex;
    align-items: flex-start;
    gap: 14px;
    padding: 14px 20px;
    border-radius: 12px;
    margin-bottom: 8px;
    border: 1px solid;
    animation: po-alert-slide-in 0.4s ease-out;
}

@keyframes po-alert-slide-in {
    from { opacity: 0; transform: translateY(-10px); }
    to { opacity: 1; transform: translateY(0); }
}

.po-rejection-alert-active {
    background: linear-gradient(135deg, #fef3c7 0%, #fffbeb 100%);
    border-color: #f59e0b;
    color: #92400e;
}

.po-rejection-alert-resolved {
    background: linear-gradient(135deg, #f0f9ff 0%, #e0f2fe 100%);
    border-color: #7dd3fc;
    color: #0c4a6e;
}

.po-rejection-alert-icon {
    font-size: 1.5rem;
    flex-shrink: 0;
    margin-top: 2px;
}

.po-rejection-alert-active .po-rejection-alert-icon {
    color: #d97706;
}

.po-rejection-alert-resolved .po-rejection-alert-icon {
    color: #0284c7;
}

.po-rejection-alert-body {
    flex: 1;
    min-width: 0;
}

.po-rejection-alert-title {
    display: block;
    font-size: 0.95rem;
    font-weight: 700;
    margin-bottom: 4px;
}

.po-rejection-alert-reason {
    margin: 6px 0 4px;
    font-size: 0.88rem;
    line-height: 1.6;
    opacity: 0.9;
}

.po-rejection-alert-reason .bi-quote {
    opacity: 0.5;
    margin-inline-end: 4px;
}

.po-rejection-alert-date {
    font-size: 0.8rem;
    opacity: 0.7;
}

.po-rejection-alert-date .bi {
    margin-inline-end: 4px;
}

@media (max-width: 576px) {
    .po-rejection-alert {
        flex-direction: column;
        gap: 8px;
        padding: 12px 14px;
    }
}

/* --- History Section --- */
.proc-order-history {
    background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 50%, #ffffff 100%);
    border: 1px solid #e2e8f0;
}

.proc-order-history .proc-detail-section-header {
    background: transparent;
    border-bottom: 1px solid #e2e8f0;
}

.proc-order-history .proc-detail-section-title i {
    color: var(--proc-primary, #2563eb);
}

/* --- Timeline Container --- */
.po-timeline {
    position: relative;
    padding: 0;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}

/* Remove old vertical line */
.po-timeline::before {
    display: none;
}

/* --- Timeline Item --- */
.po-timeline-item {
    position: relative;
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 14px 16px;
    background: #f8fafc;
    border-radius: 12px;
    border: 1px solid #e2e8f0;
    transition: box-shadow 0.2s;
}

.po-timeline-item:hover {
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.po-timeline-item + .po-timeline-item {
    border-top: none;
}

/* --- Dot --- */
.po-timeline-dot {
    position: relative;
    z-index: 1;
    width: 32px;
    height: 32px;
    min-width: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.8rem;
    background: #f1f5f9;
    color: #64748b;
    border: 2px solid #e2e8f0;
    transition: all 0.2s;
}

/* --- Content --- */
.po-timeline-content {
    flex: 1;
    min-width: 0;
}

.po-timeline-header {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
    margin-bottom: 4px;
}

.po-timeline-action {
    font-weight: 600;
    font-size: 0.9rem;
    color: #0f172a;
}

.po-timeline-date {
    font-size: 0.78rem;
    color: #94a3b8;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    direction: ltr;
    unicode-bidi: embed;
}

.po-timeline-desc {
    margin: 4px 0 6px;
    font-size: 0.85rem;
    color: #475569;
    line-height: 1.6;
    white-space: pre-line;
    background: rgba(255, 255, 255, 0.7);
    padding: 8px 12px;
    border-radius: 8px;
    border-inline-start: 3px solid #e2e8f0;
}

.po-timeline-actor {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 0.78rem;
    color: #64748b;
    background: #f8fafc;
    padding: 2px 10px;
    border-radius: 20px;
    border: 1px solid #e2e8f0;
    margin-inline-end: 8px;
}

.po-timeline-amount {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--proc-primary, #2563eb);
    direction: ltr;
    unicode-bidi: embed;
}

/* --- Type-specific Dot & Card Colors --- */
.po-timeline-created .po-timeline-dot {
    background: #eff6ff;
    color: #2563eb;
    border-color: #bfdbfe;
}
.po-timeline-created {
    border-color: #bfdbfe;
    background: #f8fbff;
}
.po-timeline-created .po-timeline-desc {
    border-inline-start-color: #93c5fd;
}

.po-timeline-priced .po-timeline-dot {
    background: #fff7ed;
    color: #ea580c;
    border-color: #fed7aa;
}
.po-timeline-priced {
    border-color: #fed7aa;
    background: #fffcf8;
}
.po-timeline-priced .po-timeline-desc {
    border-inline-start-color: #fdba74;
}

.po-timeline-awarded .po-timeline-dot {
    background: #f0fdf4;
    color: #16a34a;
    border-color: #bbf7d0;
}
.po-timeline-awarded {
    border-color: #bbf7d0;
    background: #f8fdf9;
}
.po-timeline-awarded .po-timeline-desc {
    border-inline-start-color: #86efac;
}

.po-timeline-reject .po-timeline-dot {
    background: #fef2f2;
    color: #ef4444;
    border-color: #fecaca;
}
.po-timeline-reject {
    border-color: #fecaca;
    background: #fefafa;
}
.po-timeline-reject .po-timeline-desc {
    border-inline-start-color: #fca5a5;
    background: rgba(254, 242, 242, 0.5);
}
.po-timeline-reject .po-timeline-action {
    color: #dc2626;
}

.po-timeline-note .po-timeline-dot {
    background: #fffbeb;
    color: #d97706;
    border-color: #fde68a;
}
.po-timeline-note {
    border-color: #fde68a;
    background: #fffdf6;
}
.po-timeline-note .po-timeline-desc {
    border-inline-start-color: #fcd34d;
}

.po-timeline-status .po-timeline-dot {
    background: #f0f9ff;
    color: #0284c7;
    border-color: #bae6fd;
}
.po-timeline-status {
    border-color: #bae6fd;
    background: #f8fcff;
}
.po-timeline-status .po-timeline-desc {
    border-inline-start-color: #7dd3fc;
}

/* --- Mobile Responsive --- */
@media (max-width: 768px) {
    .po-timeline {
        grid-template-columns: 1fr;
        gap: 10px;
    }
    .po-timeline-dot {
        width: 26px;
        height: 26px;
        min-width: 26px;
        font-size: 0.68rem;
    }
    .po-timeline-item {
        gap: 10px;
        padding: 12px;
    }
    .po-timeline-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 2px;
    }
    .po-timeline-desc {
        padding: 6px 10px;
        font-size: 0.82rem;
    }
}

/* ===== 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 {
        flex-wrap: wrap;
        gap: 8px;
    }

    .proc-filter-card .proc-filter-btn {
        flex-shrink: 0;
        padding: 6px 12px;
        font-size: 0.75rem;
    }

    .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 Detail Page Action Buttons --- */
.proc-detail-action {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    padding: 9px 20px;
    border-radius: 10px;
    font-family: inherit;
    font-size: 0.84rem;
    font-weight: 600;
    cursor: pointer;
    border: none;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    white-space: nowrap;
    text-decoration: none;
    position: relative;
    overflow: hidden;
    letter-spacing: 0.01em;
}
.proc-detail-action:disabled {
    opacity: 0.55;
    cursor: not-allowed;
    transform: none !important;
    box-shadow: none !important;
}
.proc-detail-action i {
    font-size: 1rem;
    line-height: 1;
}

/* Primary action - gradient blue (تأكيد الشحن, تغيير الحالة) */
.proc-detail-action-primary {
    background: linear-gradient(135deg, #2563eb 0%, #1d4ed8 100%);
    color: white;
    box-shadow: 0 2px 8px rgba(37, 99, 235, 0.3);
}
.proc-detail-action-primary:hover:not(:disabled) {
    background: linear-gradient(135deg, #1d4ed8 0%, #1e40af 100%);
    box-shadow: 0 4px 16px rgba(37, 99, 235, 0.4);
    transform: translateY(-1px);
}
.proc-detail-action-primary:active:not(:disabled) {
    transform: translateY(0);
    box-shadow: 0 2px 6px rgba(37, 99, 235, 0.3);
}

/* Success action - gradient green (جرد الشحنة) */
.proc-detail-action-success {
    background: linear-gradient(135deg, #22c55e 0%, #16a34a 100%);
    color: white;
    box-shadow: 0 2px 8px rgba(34, 197, 94, 0.3);
}
.proc-detail-action-success:hover:not(:disabled) {
    background: linear-gradient(135deg, #16a34a 0%, #15803d 100%);
    box-shadow: 0 4px 16px rgba(34, 197, 94, 0.4);
    transform: translateY(-1px);
}

/* Warning action - gradient amber (بدء التخليص) */
.proc-detail-action-warning {
    background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
    color: white;
    box-shadow: 0 2px 8px rgba(245, 158, 11, 0.3);
}
.proc-detail-action-warning:hover:not(:disabled) {
    background: linear-gradient(135deg, #d97706 0%, #b45309 100%);
    box-shadow: 0 4px 16px rgba(245, 158, 11, 0.4);
    transform: translateY(-1px);
}

/* Secondary action - teal fill (عرض الجرد) */
.proc-detail-action-secondary {
    background: linear-gradient(135deg, #0d9488 0%, #0f766e 100%);
    color: white;
    box-shadow: 0 2px 8px rgba(13, 148, 136, 0.3);
}
.proc-detail-action-secondary:hover:not(:disabled) {
    background: linear-gradient(135deg, #0f766e 0%, #115e59 100%);
    box-shadow: 0 4px 16px rgba(13, 148, 136, 0.4);
    transform: translateY(-1px);
}

/* Edit action - soft blue (تعديل) */
.proc-detail-action-edit {
    background: #eff6ff;
    color: #2563eb;
    border: 1px solid #bfdbfe;
}
.proc-detail-action-edit:hover:not(:disabled) {
    background: #dbeafe;
    color: #1d4ed8;
    border-color: #93c5fd;
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(37, 99, 235, 0.15);
}

/* PDF export action - rose/red gradient (تصدير PDF) */
.proc-detail-action-pdf {
    background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
    color: white;
    box-shadow: 0 2px 8px rgba(220, 38, 38, 0.3);
}
.proc-detail-action-pdf:hover:not(:disabled) {
    background: linear-gradient(135deg, #dc2626 0%, #b91c1c 100%);
    box-shadow: 0 4px 16px rgba(220, 38, 38, 0.4);
    transform: translateY(-1px);
}

/* Back/outline action (العودة) */
.proc-detail-action-back {
    background: white;
    color: #334155;
    border: 1.5px solid #cbd5e1;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06);
}
.proc-detail-action-back:hover:not(:disabled) {
    background: #f1f5f9;
    color: #1e293b;
    border-color: #94a3b8;
    transform: translateY(-1px);
    box-shadow: 0 3px 10px rgba(100, 116, 139, 0.18);
}

/* Blocked action - danger light */
.proc-detail-action-blocked {
    background: #fef2f2;
    color: #ef4444;
    border: 1px solid #fecaca;
    cursor: not-allowed;
    opacity: 0.85;
}

/* --- 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;
    }
}

/* ==========================================================================
   PRICING MODAL - Desktop & Mobile Responsive
   ========================================================================== */

/* --- Modal Container --- */
.pricing-modal {
    max-width: 850px;
    width: 95vw;
}

/* --- Toolbar (Title + Excel Button) --- */
.pricing-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 12px;
    margin-bottom: 16px;
    padding-bottom: 12px;
    border-bottom: 1px solid #f1f5f9;
}

.pricing-toolbar-title {
    font-weight: 600;
    margin: 0 !important;
    font-size: 0.95rem;
    color: #0f172a;
    white-space: nowrap;
}

.pricing-toolbar-actions {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.pricing-excel-match-info {
    font-size: 0.8rem;
    color: #16a34a;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    background: #f0fdf4;
    padding: 4px 10px;
    border-radius: 20px;
    white-space: nowrap;
}

.pricing-excel-btn {
    margin: 0;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    white-space: nowrap;
    padding: 6px 14px !important;
    font-size: 0.82rem !important;
    border-color: #16a34a !important;
    color: #16a34a !important;
}

.pricing-excel-btn:hover {
    background: #f0fdf4 !important;
}

/* --- Table Wrapper --- */
.pricing-table-wrapper {
    overflow-x: auto;
    border: 1px solid #e5e7eb;
    border-radius: 10px;
    max-height: 420px;
    overflow-y: auto;
}

.pricing-table {
    margin: 0 !important;
    font-size: 0.85rem;
}

.pricing-table thead th {
    white-space: nowrap;
    font-size: 0.8rem;
}

.pricing-row-unavailable {
    opacity: 0.5;
    background: #f9fafb;
}

.pricing-footer-row {
    background: #f0f9ff;
    font-weight: 600;
}

/* --- Mobile: Hide desktop table, show cards --- */
.pricing-mobile-only {
    display: none;
}

/* --- Mobile Footer --- */
.pricing-modal-footer {
    flex-direction: row-reverse;
    gap: 8px;
}

.pricing-save-btn {
    flex: 1;
}

/* --- Bottom Bar: Notes + Buttons side-by-side (Desktop) --- */
.pricing-bottom-bar {
    display: flex;
    align-items: stretch;
    gap: 12px;
    padding: 14px 24px;
    border-top: 1px solid #f1f5f9;
    background: #fafbfc;
    border-radius: 0 0 16px 16px;
}

.pricing-bottom-notes {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
}

.pricing-bottom-notes textarea {
    font-size: 0.88rem;
    resize: none;
    flex: 1;
    min-height: 0;
}

.pricing-bottom-actions {
    display: flex;
    flex-direction: column;
    gap: 8px;
    flex-shrink: 0;
    min-width: 160px;
}

.pricing-bottom-actions .pricing-save-btn {
    width: 100%;
    flex: 1;
}

.pricing-bottom-actions .proc-btn-secondary {
    width: 100%;
    text-align: center;
    flex: 1;
}

/* Desktop: hide in-body notes (use bottom-bar instead) */
.pricing-modal .modal-body > .form-group:last-child {
    display: none;
}

/* --- Sticky table header --- */
.pricing-table-wrapper .pricing-table thead {
    position: sticky;
    top: 0;
    z-index: 2;
    background: #f8fafc;
}

/* --- Sticky table footer (total row) --- */
.pricing-table-wrapper .pricing-table tfoot {
    position: sticky;
    bottom: 0;
    z-index: 2;
}

.pricing-table-wrapper .pricing-table tfoot .pricing-footer-row {
    background: #f0f9ff;
    box-shadow: 0 -2px 6px rgba(0,0,0,0.06);
}

/* --- Mobile Cards --- */
.pricing-card {
    border: 1px solid #e5e7eb;
    border-radius: 10px;
    padding: 12px;
    margin-bottom: 10px;
    background: #fff;
    transition: opacity 0.2s;
}

.pricing-card-unavailable {
    opacity: 0.5;
    background: #f9fafb;
}

.pricing-card-header {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 6px;
}

.pricing-card-num {
    background: #eff6ff;
    color: var(--proc-primary, #2563eb);
    font-weight: 700;
    font-size: 0.75rem;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 6px;
    flex-shrink: 0;
}

.pricing-card-part {
    font-weight: 600;
    font-size: 0.85rem;
    color: #1e40af;
    flex: 1;
}

.pricing-card-check {
    margin-inline-start: auto;
}

.pricing-card-check input[type="checkbox"] {
    width: 20px;
    height: 20px;
    accent-color: var(--proc-primary, #2563eb);
}

.pricing-card-desc {
    font-size: 0.82rem;
    color: #64748b;
    margin-bottom: 10px;
    padding-inline-start: 32px;
}

.pricing-card-fields {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr auto;
    gap: 8px;
    align-items: center;
}

.pricing-card-field {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.pricing-card-label {
    font-size: 0.7rem;
    color: #94a3b8;
    font-weight: 500;
}

.pricing-card-value {
    font-weight: 600;
    font-size: 0.88rem;
    color: #1e293b;
}

.pricing-card-input {
    width: 100%;
    padding: 4px 8px !important;
    font-size: 0.85rem !important;
    height: 32px;
}

.pricing-card-total {
    color: var(--proc-primary, #2563eb);
    font-size: 0.9rem;
}

.pricing-mobile-total {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: #f0f9ff;
    border: 1px solid #bfdbfe;
    border-radius: 10px;
    padding: 12px 16px;
    margin-top: 4px;
    font-weight: 600;
}

.pricing-mobile-total small {
    font-weight: 400;
    color: #64748b;
    display: block;
    font-size: 0.75rem;
}

.pricing-mobile-total strong {
    color: var(--proc-primary, #2563eb);
    font-size: 1.1rem;
}

/* ==========================================================================
   PRICING MODAL - Mobile Responsive
   ========================================================================== */
@media (max-width: 768px) {
    .pricing-modal {
        max-width: 100vw !important;
        width: 100vw;
        margin: 0;
        border-radius: 16px 16px 0 0;
        max-height: 95vh;
        position: fixed;
        bottom: 0;
        left: 0;
        right: 0;
    }

    .pricing-modal .modal-body {
        padding: 16px;
        max-height: calc(95vh - 130px);
        overflow-y: auto;
        -webkit-overflow-scrolling: touch;
    }

    .pricing-modal .modal-header {
        padding: 14px 16px;
    }

    .pricing-toolbar {
        flex-direction: column;
        align-items: stretch;
        gap: 10px;
    }

    .pricing-toolbar-actions {
        justify-content: flex-start;
    }

    .pricing-desktop-only {
        display: none !important;
    }

    .pricing-mobile-only {
        display: block !important;
    }

    .pricing-modal-footer {
        flex-direction: column;
        padding: 12px 16px !important;
    }

    /* Mobile: hide bottom-bar, show in-body notes + use mobile footer */
    .pricing-bottom-bar {
        flex-direction: column;
        padding: 12px 16px;
        gap: 12px;
    }

    .pricing-bottom-actions {
        flex-direction: column;
        width: 100%;
    }

    .pricing-bottom-actions .pricing-save-btn {
        padding: 12px !important;
        font-size: 1rem !important;
    }

    .pricing-modal .modal-body > .form-group:last-child {
        display: block;
    }

    .pricing-bottom-notes {
        display: none;
    }

    .pricing-save-btn {
        width: 100%;
        padding: 12px !important;
        font-size: 1rem !important;
    }

    .pricing-modal-footer .proc-btn-secondary {
        width: 100%;
        text-align: center;
    }
}

/* Small phones */
@media (max-width: 480px) {
    .pricing-card-fields {
        grid-template-columns: 1fr 1fr;
        gap: 10px;
    }
    
    .pricing-card-desc {
        padding-inline-start: 0;
    }
}

/* ==========================================================================
   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; }

/* === Completed / مكتمل === */
.proc-filter-btn.filter-completed {
    border-color: #bbf7d0;
    color: #166534;
}
.proc-filter-btn.filter-completed i { color: #22c55e; }
.proc-filter-btn.filter-completed:hover {
    border-color: #86efac;
    background: #f0fdf4;
}
.proc-filter-btn.filter-completed.active {
    background: linear-gradient(135deg, #22c55e 0%, #16a34a 100%);
    color: white;
    border-color: #16a34a;
    box-shadow: 0 4px 14px rgba(34, 197, 94, 0.35);
}
.proc-filter-btn.filter-completed.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-summary-badges .proc-badge {
    cursor: pointer;
    transition: transform 0.15s, box-shadow 0.15s, opacity 0.15s;
    user-select: none;
}

.saber-summary-badges .proc-badge:hover {
    transform: scale(1.05);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.12);
}

.saber-summary-badges .proc-badge.active {
    transform: scale(1.08);
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.25);
    outline: 2.5px solid #1e293b;
    outline-offset: 2px;
}

.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 #ef4444;
    background: #fef2f2;
}

.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 Buttons (styled) --- */
.saber-btn {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 5px 12px;
    font-size: 0.76rem;
    font-weight: 600;
    border-radius: 8px;
    border: none;
    cursor: pointer;
    white-space: nowrap;
    transition: all 0.2s;
    line-height: 1.4;
}

.saber-btn-add {
    background: linear-gradient(135deg, #2563eb, #1d4ed8);
    color: #fff;
    box-shadow: 0 2px 6px rgba(37, 99, 235, 0.25);
}
.saber-btn-add:hover {
    box-shadow: 0 3px 10px rgba(37, 99, 235, 0.4);
    transform: translateY(-1px);
}

.saber-btn-renew {
    background: linear-gradient(135deg, #f59e0b, #d97706);
    color: #fff;
    box-shadow: 0 2px 6px rgba(245, 158, 11, 0.25);
}
.saber-btn-renew:hover {
    box-shadow: 0 3px 10px rgba(245, 158, 11, 0.4);
    transform: translateY(-1px);
}

.saber-btn-view {
    background: #f1f5f9;
    color: #475569;
    border: 1px solid #e2e8f0;
    padding: 5px 8px;
}
.saber-btn-view:hover {
    background: #e2e8f0;
    color: #1e293b;
}

.saber-btn-details {
    background: #f0fdf4;
    color: #16a34a;
    border: 1px solid #bbf7d0;
}
.saber-btn-details:hover {
    background: #dcfce7;
    color: #15803d;
}

/* --- Saber Table Action Buttons (Certificates Page) --- */
/* ===== Saber Stats Grid (FilterCard Footer) ===== */
.saber-stats-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 12px;
    margin-top: 4px;
}

.saber-stat-card {
    background: #f8fafc;
    border: 2px solid transparent;
    border-radius: 10px;
    padding: 12px 8px;
    text-align: center;
    cursor: pointer;
    transition: all 0.2s ease;
}

.saber-stat-card:hover {
    background: #f1f5f9;
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
}

.saber-stat-card.active {
    background: #fff;
    border-color: currentColor;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.saber-stat-value {
    font-size: 1.75rem;
    font-weight: 700;
    line-height: 1.2;
}

.saber-stat-label {
    color: #64748b;
    font-size: 0.8rem;
    margin-top: 2px;
}

@media (max-width: 768px) {
    .saber-stats-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 8px;
    }

    .saber-stat-card {
        padding: 10px 6px;
    }

    .saber-stat-value {
        font-size: 1.35rem;
    }

    .saber-stat-label {
        font-size: 0.75rem;
    }
}

@media (max-width: 480px) {
    .saber-stats-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 6px;
    }

    .saber-stat-value {
        font-size: 1.15rem;
    }
}

.saber-table-actions {
    display: flex;
    align-items: center;
    gap: 5px;
    justify-content: center;
}

.saber-tbl-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 30px;
    height: 30px;
    border-radius: 8px;
    border: none;
    cursor: pointer;
    font-size: 0.78rem;
    transition: all 0.2s;
    text-decoration: none;
}

.saber-tbl-btn-delete {
    background: #fee2e2;
    color: #ef4444;
}
.saber-tbl-btn-delete:hover {
    background: #ef4444;
    color: #fff;
    transform: translateY(-1px);
    box-shadow: 0 2px 6px rgba(239, 68, 68, 0.3);
}

.saber-tbl-btn-edit {
    background: #eff6ff;
    color: #2563eb;
}
.saber-tbl-btn-edit:hover {
    background: #2563eb;
    color: #fff;
    transform: translateY(-1px);
    box-shadow: 0 2px 6px rgba(37, 99, 235, 0.3);
}

.saber-tbl-btn-file {
    background: #fef2f2;
    color: #dc2626;
}
.saber-tbl-btn-file:hover {
    background: #dc2626;
    color: #fff;
    transform: translateY(-1px);
    box-shadow: 0 2px 6px rgba(220, 38, 38, 0.3);
}

.saber-tbl-btn-file-delete {
    background: #fff1f2;
    color: #f43f5e;
}
.saber-tbl-btn-file-delete:hover {
    background: #f43f5e;
    color: #fff;
    transform: translateY(-1px);
    box-shadow: 0 2px 6px rgba(244, 63, 94, 0.3);
}

.saber-tbl-btn-upload {
    background: #eff6ff;
    color: #3b82f6;
    cursor: pointer;
}
.saber-tbl-btn-upload:hover {
    background: #3b82f6;
    color: #fff;
    transform: translateY(-1px);
    box-shadow: 0 2px 6px rgba(59, 130, 246, 0.3);
}

/* Upload button loading state handled inline - button replaced by spinner */

.saber-tbl-btn-renew {
    background: #fef3c7;
    color: #d97706;
}
.saber-tbl-btn-renew:hover {
    background: #d97706;
    color: #fff;
    transform: translateY(-1px);
    box-shadow: 0 2px 6px rgba(217, 119, 6, 0.3);
}

.saber-tbl-btn-clearance {
    background: #f1f5f9;
    color: #64748b;
}
.saber-tbl-btn-clearance:hover {
    background: #475569;
    color: #fff;
    transform: translateY(-1px);
    box-shadow: 0 2px 6px rgba(71, 85, 105, 0.3);
}

/* ===== Shipment Certificate Table Actions (sc-action-*) ===== */
.sc-actions {
    display: flex;
    align-items: center;
    gap: 6px;
    justify-content: center;
    flex-wrap: wrap;
}

.sc-action-btn {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 5px 12px;
    border-radius: 8px;
    border: 1px solid transparent;
    cursor: pointer;
    font-size: 0.75rem;
    font-weight: 600;
    font-family: 'Tajawal', sans-serif;
    white-space: nowrap;
    transition: all 0.2s ease;
    text-decoration: none;
    line-height: 1.4;
}
.sc-action-btn i {
    font-size: 0.8rem;
}
.sc-action-btn span {
    font-size: 0.72rem;
}

/* إصدار شهادة - Green prominent */
.sc-action-issue {
    background: linear-gradient(135deg, #ecfdf5 0%, #d1fae5 100%);
    color: #059669;
    border-color: #a7f3d0;
}
.sc-action-issue:hover {
    background: linear-gradient(135deg, #059669 0%, #047857 100%);
    color: #fff;
    border-color: #059669;
    transform: translateY(-1px);
    box-shadow: 0 3px 8px rgba(5, 150, 105, 0.3);
}

/* عرض التفاصيل - Blue */
.sc-action-view {
    background: #eff6ff;
    color: #2563eb;
    border-color: #bfdbfe;
}
.sc-action-view:hover {
    background: #2563eb;
    color: #fff;
    border-color: #2563eb;
    transform: translateY(-1px);
    box-shadow: 0 3px 8px rgba(37, 99, 235, 0.3);
}

/* تعديل - Amber */
.sc-action-edit {
    background: #fffbeb;
    color: #d97706;
    border-color: #fde68a;
}
.sc-action-edit:hover {
    background: #d97706;
    color: #fff;
    border-color: #d97706;
    transform: translateY(-1px);
    box-shadow: 0 3px 8px rgba(217, 119, 6, 0.3);
}

/* PDF - Red */
.sc-action-pdf {
    background: #fef2f2;
    color: #dc2626;
    border-color: #fecaca;
}
.sc-action-pdf:hover {
    background: #dc2626;
    color: #fff;
    border-color: #dc2626;
    transform: translateY(-1px);
    box-shadow: 0 3px 8px rgba(220, 38, 38, 0.3);
}

/* رفع ملف */
.sc-action-upload {
    background: #f0f9ff;
    color: #0284c7;
    border-color: #bae6fd;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 5px 12px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 0.75rem;
    font-weight: 600;
    font-family: 'Tajawal', sans-serif;
    white-space: nowrap;
    transition: all 0.2s ease;
    line-height: 1.4;
}
.sc-action-upload:hover {
    background: #0284c7;
    color: #fff;
    border-color: #0284c7;
    transform: translateY(-1px);
    box-shadow: 0 3px 8px rgba(2, 132, 199, 0.3);
}
.sc-action-upload i {
    font-size: 0.8rem;
}
.sc-action-upload span {
    font-size: 0.72rem;
}

/* إرسال للمخلص - Green */
.sc-action-send {
    background: linear-gradient(135deg, #ecfdf5 0%, #d1fae5 100%);
    color: #059669;
    border-color: #a7f3d0;
}
.sc-action-send:hover {
    background: linear-gradient(135deg, #059669 0%, #047857 100%);
    color: #fff;
    border-color: #059669;
    transform: translateY(-1px);
    box-shadow: 0 3px 8px rgba(5, 150, 105, 0.3);
}

/* التخليص الجمركي - Brown/Orange */
.sc-action-clearance {
    background: #fef3c7;
    color: #92400e;
    border-color: #fcd34d;
}
.sc-action-clearance:hover {
    background: #92400e;
    color: #fff;
    border-color: #92400e;
    transform: translateY(-1px);
    box-shadow: 0 3px 8px rgba(146, 64, 14, 0.3);
}

/* Action buttons (text + icon) for shipment cert table */
.saber-action-btn {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 5px 14px;
    border-radius: 20px;
    border: none;
    cursor: pointer;
    font-size: 0.78rem;
    font-weight: 600;
    font-family: 'Tajawal', sans-serif;
    white-space: nowrap;
    transition: all 0.25s ease;
    text-decoration: none;
    line-height: 1.4;
}
.saber-action-btn i {
    font-size: 0.82rem;
}
.saber-action-btn-send {
    background: linear-gradient(135deg, #ecfdf5 0%, #d1fae5 100%);
    color: #059669;
    border: 1px solid #a7f3d0;
}
.saber-action-btn-send:hover {
    background: linear-gradient(135deg, #059669 0%, #047857 100%);
    color: #fff;
    border-color: #059669;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(5, 150, 105, 0.35);
}
.saber-action-btn-send:active {
    transform: translateY(0);
    box-shadow: 0 1px 4px rgba(5, 150, 105, 0.25);
}
.saber-action-btn-edit {
    background: linear-gradient(135deg, #eff6ff 0%, #dbeafe 100%);
    color: #2563eb;
    border: 1px solid #bfdbfe;
}
.saber-action-btn-edit:hover {
    background: linear-gradient(135deg, #2563eb 0%, #1d4ed8 100%);
    color: #fff;
    border-color: #2563eb;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.35);
}
.saber-action-btn-edit:active {
    transform: translateY(0);
    box-shadow: 0 1px 4px rgba(37, 99, 235, 0.25);
}
.saber-action-btn-locked {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 5px 12px;
    border-radius: 20px;
    background: #f1f5f9;
    color: #94a3b8;
    font-size: 0.75rem;
    font-weight: 500;
    font-family: 'Tajawal', sans-serif;
    border: 1px solid #e2e8f0;
    cursor: default;
}
.saber-action-btn-locked i {
    font-size: 0.7rem;
}

/* ===== Consignment Section (شهادات الإرسالية) ===== */
.saber-consignment-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 24px;
    border-bottom: 1px solid #e2e8f0;
}
.saber-consignment-header h3 {
    margin: 0;
    font-size: 1.1rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 10px;
    color: #0f172a;
}
.saber-consignment-header h3 i {
    color: var(--proc-primary);
    font-size: 1.15rem;
}
.saber-consignment-badge {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 5px 14px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
    background: linear-gradient(135deg, #eff6ff 0%, #dbeafe 100%);
    color: #2563eb;
    border: 1px solid #bfdbfe;
}
.saber-consignment-body {
    padding: 20px 24px;
}

/* Info alert box */
.saber-consignment-info {
    background: linear-gradient(135deg, #eff6ff 0%, #f0f7ff 100%);
    border: 1px solid #bfdbfe;
    border-radius: 12px;
    padding: 18px 20px;
    margin-bottom: 20px;
    display: flex;
    gap: 14px;
    align-items: flex-start;
}
.saber-consignment-info i {
    color: #3b82f6;
    font-size: 1.3rem;
    margin-top: 2px;
    flex-shrink: 0;
}
.saber-consignment-info-title {
    font-weight: 700;
    color: #1e40af;
    margin-bottom: 4px;
    font-size: 0.92rem;
}
.saber-consignment-info-desc {
    color: #3b82f6;
    font-size: 0.87rem;
    line-height: 1.6;
}

/* Subtitle */
.saber-consignment-subtitle {
    font-size: 0.92rem;
    margin-bottom: 16px;
    color: #475569;
    font-weight: 600;
}

/* Shipment row card */
.saber-shipment-row {
    border: 1px solid #e2e8f0;
    border-radius: 14px;
    padding: 18px 20px;
    display: flex;
    align-items: center;
    gap: 16px;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    background: #ffffff;
}
.saber-shipment-row:hover {
    border-color: #bfdbfe;
    box-shadow: 0 4px 16px rgba(37, 99, 235, 0.08);
}
.saber-shipment-row.urgent {
    border: 2px solid #f59e0b;
    background: linear-gradient(135deg, #fffbeb 0%, #ffffff 100%);
}
.saber-shipment-row.urgent:hover {
    border-color: #d97706;
    box-shadow: 0 4px 16px rgba(245, 158, 11, 0.12);
}

/* Shipment icon */
.saber-shipment-icon {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    flex-shrink: 0;
}
.saber-shipment-icon.normal {
    background: linear-gradient(135deg, #e0e7ff 0%, #c7d2fe 100%);
    color: #4f46e5;
}
.saber-shipment-icon.urgent {
    background: linear-gradient(135deg, #fef3c7 0%, #fde68a 100%);
    color: #d97706;
}

/* Shipment info */
.saber-shipment-info {
    flex: 1;
    min-width: 0;
}
.saber-shipment-link {
    font-weight: 700;
    color: #1e293b;
    text-decoration: none;
    cursor: pointer;
    font-size: 0.95rem;
    transition: color 0.2s;
}
.saber-shipment-link:hover {
    color: #2563eb;
    text-decoration: underline;
}
.saber-shipment-meta {
    font-size: 0.84rem;
    color: #64748b;
    margin-top: 3px;
}

/* Shipment actions */
.saber-shipment-actions {
    display: flex;
    gap: 10px;
    align-items: center;
    flex-shrink: 0;
}

/* Status badge (no cert / has cert) */
.saber-consign-status {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 0.78rem;
    font-weight: 600;
    white-space: nowrap;
}
.saber-consign-status.no-cert {
    background: #fef2f2;
    color: #dc2626;
    border: 1px solid #fecaca;
}
.saber-consign-status.has-cert {
    background: linear-gradient(135deg, #dcfce7 0%, #bbf7d0 100%);
    color: #16a34a;
    border: 1px solid #86efac;
}

/* Certificate detail status badge on shipment card */
.saber-consign-cert-status {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 5px 12px;
    border-radius: 16px;
    font-size: 0.75rem;
    font-weight: 600;
    white-space: nowrap;
}
.saber-consign-cert-status.cert-status-sent {
    background: #d1fae5;
    color: #059669;
    border: 1px solid #a7f3d0;
}
.saber-consign-cert-status.cert-status-waiting {
    background: #fff7ed;
    color: #ea580c;
    border: 1px solid #fed7aa;
}
.saber-consign-cert-status.cert-status-pending {
    background: #f0f9ff;
    color: #0284c7;
    border: 1px solid #bae6fd;
}
.saber-consign-cert-status.cert-status-valid {
    background: #f0fdf4;
    color: #16a34a;
    border: 1px solid #bbf7d0;
}
.saber-consign-cert-status.cert-status-expired {
    background: #fef2f2;
    color: #dc2626;
    border: 1px solid #fecaca;
}

/* Issue consignment button — pill shape like status badge */
.saber-consign-btn-issue {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 6px 14px;
    border-radius: 20px;
    font-family: 'Tajawal', inherit;
    font-size: 0.78rem;
    font-weight: 600;
    line-height: 1.4;
    cursor: pointer;
    border: 1px solid #fdba74;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    white-space: nowrap;
    background: #fff7ed;
    color: #c2410c;
}
.saber-consign-btn-issue:hover {
    background: #fed7aa;
    color: #9a3412;
    border-color: #fb923c;
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(234, 88, 12, 0.18);
}
.saber-consign-btn-issue.urgent {
    background: #fef3c7;
    color: #b45309;
    border-color: #fbbf24;
}
.saber-consign-btn-issue.urgent:hover {
    background: #fde68a;
    color: #92400e;
    border-color: #f59e0b;
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(245, 158, 11, 0.2);
}

/* View certificate button */
.saber-consign-btn-view {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 7px 14px;
    border-radius: 10px;
    font-size: 0.82rem;
    font-weight: 600;
    cursor: pointer;
    border: 1px solid #c7d2fe;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    white-space: nowrap;
    background: #e0e7ff;
    color: #4f46e5;
}
.saber-consign-btn-view:hover {
    background: #c7d2fe;
    color: #4338ca;
    border-color: #a5b4fc;
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(79, 70, 229, 0.15);
}

/* Edit button (card level) */
.saber-consign-btn-edit {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 7px 14px;
    border-radius: 10px;
    font-size: 0.82rem;
    font-weight: 600;
    cursor: pointer;
    border: 1px solid #bfdbfe;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    white-space: nowrap;
    background: #dbeafe;
    color: #2563eb;
}
.saber-consign-btn-edit:hover {
    background: #bfdbfe;
    color: #1d4ed8;
    border-color: #93c5fd;
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(37, 99, 235, 0.15);
}

/* Clearance link button */
.saber-consign-btn-clearance {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 10px;
    font-size: 0.92rem;
    cursor: pointer;
    border: 1px solid #e2e8f0;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    background: #f8fafc;
    color: #64748b;
    text-decoration: none;
    padding: 0;
}
.saber-consign-btn-clearance:hover {
    background: #f1f5f9;
    color: #475569;
    border-color: #cbd5e1;
    transform: translateY(-1px);
    box-shadow: 0 2px 6px rgba(100, 116, 139, 0.12);
}

@media (max-width: 768px) {
    .saber-shipment-row {
        flex-direction: column;
        align-items: stretch;
        gap: 14px;
        padding: 16px;
    }
    .saber-shipment-actions {
        flex-wrap: wrap;
        justify-content: flex-start;
    }
    .saber-consignment-header {
        padding: 16px 18px;
    }
    .saber-consignment-body {
        padding: 16px 18px;
    }
}

/* ===== 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 ===== */

/* --- Saber File Preview in Modal --- */
.saber-file-preview {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-top: 8px;
    padding: 10px 14px;
    background: #f0fdf4;
    border: 1px solid #bbf7d0;
    border-radius: 10px;
}

.saber-file-link {
    display: flex;
    align-items: center;
    gap: 6px;
    color: #16a34a;
    font-size: 0.85rem;
    font-weight: 500;
    text-decoration: none;
    overflow: hidden;
}

.saber-file-link i {
    font-size: 1.15rem;
    flex-shrink: 0;
}

.saber-file-link span {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.saber-file-remove {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 26px;
    height: 26px;
    border-radius: 50%;
    border: none;
    background: #fee2e2;
    color: #dc2626;
    font-size: 0.7rem;
    cursor: pointer;
    flex-shrink: 0;
    transition: all 0.2s;
}

.saber-file-remove:hover {
    background: #dc2626;
    color: #fff;
    transform: scale(1.1);
}

/* ===== 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: 0;
        align-items: flex-end;
    }

    .proc-modal {
        max-height: 92vh;
        border-radius: 20px 20px 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-body .row.g-3 {
        --bs-gutter-y: 0.6rem;
        --bs-gutter-x: 0.6rem;
    }

    .proc-modal .form-label {
        font-size: 0.82rem;
        margin-bottom: 4px;
    }

    .proc-modal .form-control,
    .proc-modal .form-select {
        padding: 8px 10px;
        font-size: 0.88rem;
        border-radius: 8px;
    }

    .proc-modal .modal-footer {
        padding: 12px 16px;
        flex-wrap: wrap;
    }

    .proc-modal .modal-footer .proc-btn {
        flex: 1;
        min-width: 120px;
        text-align: center;
        justify-content: center;
    }

    /* File preview compact on mobile */
    .proc-modal .saber-file-preview {
        padding: 8px 10px;
    }

    .proc-modal .saber-file-link {
        font-size: 0.82rem;
    }
}

/* ===== 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;
}

/* ============================================================
   Shipment Top-Page Alerts
   ============================================================ */
.shipment-alert {
    display: flex;
    align-items: center;
    gap: 16px;
    flex-wrap: wrap;
    padding: 16px 20px;
    border-radius: 14px;
    margin-bottom: 16px;
    border: 1px solid;
    animation: shipment-alert-fadein 0.3s ease;
}

@keyframes shipment-alert-fadein {
    from { opacity: 0; transform: translateY(-8px); }
    to { opacity: 1; transform: translateY(0); }
}

.shipment-alert-icon {
    width: 48px;
    height: 48px;
    min-width: 48px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
}

.shipment-alert-body {
    flex: 1;
    min-width: 200px;
}

.shipment-alert-title {
    display: block;
    font-size: 1rem;
    font-weight: 700;
    margin-bottom: 4px;
}

.shipment-alert-desc {
    margin: 0;
    font-size: 0.88rem;
    line-height: 1.5;
}

/* Danger - متأخرة */
.shipment-alert-danger {
    background: linear-gradient(135deg, #fef2f2, #fee2e2);
    border-color: #fca5a5;
}
.shipment-alert-danger .shipment-alert-icon {
    background: #fee2e2;
    color: #dc2626;
}
.shipment-alert-danger .shipment-alert-title {
    color: #991b1b;
}
.shipment-alert-danger .shipment-alert-desc {
    color: #b91c1c;
}

/* Warning - شهادة مطلوبة */
.shipment-alert-warning {
    background: linear-gradient(135deg, #fffbeb, #fef3c7);
    border-color: #fbbf24;
}
.shipment-alert-warning .shipment-alert-icon {
    background: #fef3c7;
    color: #d97706;
}
.shipment-alert-warning .shipment-alert-title {
    color: #92400e;
}
.shipment-alert-warning .shipment-alert-desc {
    color: #b45309;
}

/* Info - في الميناء */
.shipment-alert-info {
    background: linear-gradient(135deg, #eff6ff, #dbeafe);
    border-color: #60a5fa;
}
.shipment-alert-info .shipment-alert-icon {
    background: #dbeafe;
    color: #2563eb;
}
.shipment-alert-info .shipment-alert-title {
    color: #1e40af;
}
.shipment-alert-info .shipment-alert-desc {
    color: #3b82f6;
}

/* Success - تم التخليص */
.shipment-alert-success {
    background: linear-gradient(135deg, #f0fdf4, #dcfce7);
    border-color: #86efac;
}
.shipment-alert-success .shipment-alert-icon {
    background: #dcfce7;
    color: #16a34a;
}
.shipment-alert-success .shipment-alert-title {
    color: #15803d;
}
.shipment-alert-success .shipment-alert-desc {
    color: #22c55e;
}

/* Completed - تم الاستلام */
.shipment-alert-completed {
    background: linear-gradient(135deg, #f0fdf4, #ecfdf5);
    border-color: #bbf7d0;
}
.shipment-alert-completed .shipment-alert-icon {
    background: #dcfce7;
    color: #16a34a;
}
.shipment-alert-completed .shipment-alert-title {
    color: #15803d;
}
.shipment-alert-completed .shipment-alert-desc {
    color: #4ade80;
}

/* --- Shipment Timeline Types (additional to PO types) --- */
.po-timeline-shipped .po-timeline-dot {
    background: #eff6ff;
    color: #2563eb;
    border-color: #93c5fd;
}
.po-timeline-shipped .po-timeline-desc {
    border-inline-start-color: #93c5fd;
}

.po-timeline-port .po-timeline-dot {
    background: #fffbeb;
    color: #d97706;
    border-color: #fde68a;
}
.po-timeline-port .po-timeline-desc {
    border-inline-start-color: #fcd34d;
}

.po-timeline-cleared .po-timeline-dot {
    background: #f0fdf4;
    color: #16a34a;
    border-color: #bbf7d0;
}
.po-timeline-cleared .po-timeline-desc {
    border-inline-start-color: #86efac;
}

/* --- Shipment Alert Mobile --- */
@media (max-width: 768px) {
    .shipment-alert {
        padding: 12px 14px;
        gap: 10px;
    }
    .shipment-alert-icon {
        width: 40px;
        height: 40px;
        min-width: 40px;
        font-size: 1.2rem;
    }
    .shipment-alert-title {
        font-size: 0.9rem;
    }
    .shipment-alert-desc {
        font-size: 0.82rem;
    }
}
