/* Custom styles for the shipment management system */

/* Import Tajawal font */
@import url('https://fonts.googleapis.com/css2?family=Tajawal:wght@300;400;500;600;700&display=swap');

/* Global font and RTL support */
* {
    font-family: 'Tajawal', 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

[dir="rtl"] {
    text-align: right;
}

/* Global background and text styling */
body {
    background-color: #ffffff !important;
    color: #000000 !important;
}

.main-content {
    background-color: #ffffff !important;
}

/* Custom spacing */
.container {
    max-width: 1400px;
}

/* Global Form styling improvements */
.form-label {
    font-weight: 600;
    color: var(--bs-body-color);
}

/* Enhanced form controls with consistent styling */
.form-control,
.form-select {
    color: #000000 !important;
    background-color: #ffffff !important;
    border: 2px solid #e5e7eb;
    border-radius: 0.75rem;
    padding: 0.875rem 1.125rem;
    font-size: 1rem;
    line-height: 1.5;
    font-weight: 500;
    transition: all 0.2s ease-in-out;
}

.form-control::placeholder,
.form-select::placeholder {
    color: #999 !important;
    opacity: 1;
}

.form-control:focus,
.form-select:focus {
    color: #000 !important;
    background-color: #fff !important;
    border-color: #667eea;
    box-shadow: 0 0 0 0.2rem rgba(102, 126, 234, 0.25);
    outline: 0;
}

.form-control:disabled,
.form-select:disabled {
    background-color: #f8f9fa !important;
    color: #6c757d !important;
    border-color: #e9ecef;
}

/* Input group styling */
.input-group .form-control,
.input-group .form-select {
    border-radius: 0.5rem;
}

.input-group .form-control:not(:last-child),
.input-group .form-select:not(:last-child) {
    border-top-right-radius: 0;
    border-bottom-right-radius: 0;
}

.input-group .form-control:not(:first-child),
.input-group .form-select:not(:first-child) {
    border-top-left-radius: 0;
    border-bottom-left-radius: 0;
}

/* Textarea specific styling */
textarea.form-control {
    resize: vertical;
    min-height: 100px;
}

/* Select dropdown styling */
.form-select {
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3e%3cpath fill='none' stroke='%23343a40' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='m1 6 7 7 7-7'/%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right 0.75rem center;
    background-size: 16px 12px;
}

/* Modal form styling */
.modal .form-control,
.modal .form-select {
    border-radius: 0.375rem;
}

/* Unified Table Design */
.unified-table-container {
    background: white;
    border-radius: 15px;
    box-shadow: 0 2px 15px rgba(0, 0, 0, 0.08);
    margin-bottom: 25px;
    overflow: hidden;
    border: 1px solid #e5e7eb;
}

.unified-table {
    width: 100%;
    margin: 0;
    direction: rtl;
    font-family: 'Tajawal', 'Segoe UI', sans-serif;
    color: #000;
    background: white;
}

.unified-table thead th {
    background-color: #f8f9fa;
    color: #2d3748;
    font-weight: 600;
    font-size: 14px;
    padding: 15px 20px;
    text-align: right;
    border-bottom: 2px solid #e2e8f0;
    border-left: 1px solid #e2e8f0;
    white-space: nowrap;
}

.unified-table thead th:first-child {
    border-left: none;
}

.unified-table tbody td {
    padding: 15px 20px;
    border-bottom: 1px solid #e2e8f0;
    border-left: 1px solid #e2e8f0;
    vertical-align: middle;
    color: #2d3748;
    font-size: 14px;
}

.unified-table tbody td:first-child {
    border-left: none;
    font-weight: 500;
}

.unified-table tbody tr:hover {
    background-color: #f7fafc;
    transition: background-color 0.2s ease;
}

.unified-table tbody tr:last-child td {
    border-bottom: none;
}

/* Shipment table specific styling */
.shipment-table-container .unified-table {
    border-radius: 0 0 15px 15px;
    overflow: hidden;
}

.shipment-table-container .unified-table thead th {
    background-color: #f8f9fa;
    border-top: none;
}

/* Status badges */
.status-badge {
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 500;
}

.status-created {
    background: #e3f2fd;
    color: #1976d2;
}

.status-processing {
    background: #fff3e0;
    color: #f57c00;
}

.status-in_transit {
    background: #f3e5f5;
    color: #7b1fa2;
}

.status-delivered {
    background: #e8f5e8;
    color: #388e3c;
}

.status-cancelled {
    background: #ffebee;
    color: #d32f2f;
}

/* Type Management specific styling */
.type-card .unified-table tbody td {
    color: #2d3748 !important;
    font-size: 14px;
    font-weight: 500;
}

.type-card .unified-table thead th {
    background-color: #f8f9fa;
    color: #2d3748;
    font-weight: 600;
    border-bottom: 2px solid #e2e8f0;
}

.type-card .add-type-btn {
    background: #10b981;
    border: none;
    color: white;
    padding: 8px 16px;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.type-card .add-type-btn:hover {
    background: #059669;
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
}

/* Shipment table comprehensive styling */
.unified-table {
    width: 100%;
    table-layout: fixed;
    border-collapse: separate;
    border-spacing: 0;
    background: white;
}

.unified-table th {
    padding: 15px 20px !important;
    font-weight: 600;
    background: #f8f9fa;
    border-bottom: 2px solid #e9ecef;
    color: #000000;
    font-size: 14px;
}

.unified-table td {
    padding: 15px 20px !important;
    vertical-align: middle;
    border-bottom: 1px solid #e9ecef;
    color: #000000 !important;
    font-size: 14px;
    line-height: 1.5;
    background: inherit;
}

/* Type Management table text override for better visibility */
.unified-table-container .type-management-table td {
    color: #000000 !important;
    font-weight: normal !important;
}

.unified-table-container .type-management-table th {
    color: #2d3748 !important;
}

/* Shipments table specific styling with fixed visibility and spacing */
.shipments-table {
    background: white;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.shipments-table th {
    background: #f8f9fa !important;
    color: #000000 !important;
    font-weight: 600 !important;
    padding: 15px 20px !important;
    border-bottom: 2px solid #e9ecef !important;
    font-size: 14px !important;
}

.shipments-table td {
    color: #000000 !important;
    font-size: 14px !important;
    padding: 15px 20px !important;
    border-bottom: 1px solid #e9ecef !important;
    vertical-align: middle !important;
}

.shipments-table tbody tr:nth-child(even) {
    background: #f8f9fa;
}

.shipments-table tbody tr:hover {
    background: #e3f2fd;
}

/* Column widths and alignment */
.shipments-table th:nth-child(1), /* رقم التتبع */
.shipments-table td:nth-child(1) {
    width: 14%;
    text-align: center;
}

.shipments-table th:nth-child(2), /* المرسل */
.shipments-table td:nth-child(2) {
    width: 16%;
    text-align: right;
    padding-right: 25px !important;
}

.shipments-table th:nth-child(3), /* المستقبل */
.shipments-table td:nth-child(3) {
    width: 16%;
    text-align: right;
    padding-right: 25px !important;
}

.shipments-table th:nth-child(4), /* النوع */
.shipments-table td:nth-child(4) {
    width: 12%;
    text-align: center;
}

.shipments-table th:nth-child(5), /* الوزن */
.shipments-table td:nth-child(5) {
    width: 8%;
    text-align: center;
}

.shipments-table th:nth-child(6), /* السعر */
.shipments-table td:nth-child(6) {
    width: 10%;
    text-align: center;
}

.shipments-table th:nth-child(7), /* الحالة */
.shipments-table td:nth-child(7) {
    width: 12%;
    text-align: center;
}

.shipments-table th:nth-child(8), /* التاريخ */
.shipments-table td:nth-child(8) {
    width: 8%;
    text-align: center;
}

.shipments-table th:nth-child(9), /* الإجراءات */
.shipments-table td:nth-child(9) {
    width: 4%;
    text-align: center;
}

/* Enhanced text styling for shipments table */
.shipments-table strong {
    color: #1a202c !important;
    font-weight: 600 !important;
    font-size: 14px !important;
}

.shipments-table small {
    color: #718096 !important;
    font-size: 12px !important;
}

/* Status badge styling */
.status-badge {
    padding: 4px 12px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.status-created { background: #fed7d7; color: #c53030; }
.status-shipped { background: #bee3f8; color: #2b6cb0; }
.status-delivered { background: #c6f6d5; color: #2f855a; }
.status-pending { background: #feebc8; color: #c05621; }

/* Currency styling */
.shipments-table .currency-amount {
    color: #2d3748 !important;
    font-weight: 600 !important;
    font-size: 14px !important;
}

.shipments-table .currency-symbol {
    color: #2d3748 !important;
    font-size: 12px !important;
    margin-left: 4px;
}

/* Action buttons in shipments table */
.shipments-table .action-buttons {
    display: flex;
    gap: 4px;
    justify-content: center;
    align-items: center;
}

.shipments-table .btn-action {
    padding: 4px 8px !important;
    font-size: 12px !important;
    border-radius: 4px !important;
    min-width: auto !important;
}

/* Global table text color fix - black text for all tables */
.shipments-table th,
.shipments-table td {
    color: #000000 !important;
}

.unified-table th,
.unified-table td {
    color: #000000 !important;
}

.type-table th,
.type-table td {
    color: #000000 !important;
}

/* Override any light text colors */
table th,
table td,
table.unified-table th,
table.unified-table td,
table.shipments-table th,
table.shipments-table td,
table.type-table th,
table.type-table td {
    color: #000000 !important;
}

/* Ensure strong and small text within tables are also dark */
.shipments-table strong,
.unified-table strong,
.type-table strong {
    color: #000000 !important;
}

.shipments-table small,
.unified-table small,
.type-table small {
    color: #333333 !important;
}

/* Additional overrides for any remaining light text */
.unified-table-container .unified-table td,
.unified-table-container .unified-table th,
.unified-table-container .shipments-table td,
.unified-table-container .shipments-table th {
    color: #000000 !important;
}

/* Override Bootstrap or other framework text colors */
.table th,
.table td,
.table-dark th,
.table-dark td {
    color: #000000 !important;
}

/* Force black text on all table elements */
table * {
    color: #000000 !important;
}

/* Modern shipments table styling with enhanced headers */
.shipments-table {
    width: 100%;
    border-collapse: collapse;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.shipments-table th {
    background: linear-gradient(135deg, #4a5568, #2d3748);
    color: #ffffff !important;
    font-weight: 600;
    font-size: 14px;
    padding: 16px 12px;
    text-align: center;
    border-bottom: 3px solid #1a202c;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.shipments-table td {
    color: #2d3748 !important;
    padding: 14px 12px;
    text-align: center;
    vertical-align: middle;
    border-bottom: 1px solid #e2e8f0;
    font-size: 14px;
}

/* Specific column alignments */
.shipments-table td:nth-child(2),  /* Sender */
.shipments-table td:nth-child(3) { /* Receiver */
    text-align: right;
    padding-right: 20px;
}

.shipments-table td:nth-child(1) { /* Tracking number */
    text-align: center;
    font-weight: 600;
}

.shipments-table tbody tr:nth-child(even) {
    background-color: #f7fafc;
}

.shipments-table tbody tr:hover {
    background-color: #edf2f7;
    transform: translateY(-1px);
    transition: all 0.2s ease;
}

/* Print button styling */
.print-section {
    display: flex;
    justify-content: flex-end;
    margin-bottom: 20px;
    padding: 0 20px;
}

.print-btn {
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
    border: none;
    padding: 12px 24px;
    border-radius: 8px;
    font-weight: 600;
    font-size: 14px;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 8px;
}

.print-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.4);
}

.print-btn i {
    font-size: 16px;
}

/* Enhanced Table Cell Styling with Visibility Fix */
.shipments-table td {
    padding: 16px 12px !important;
    border-bottom: 1px solid #e2e8f0;
    vertical-align: middle;
    transition: all 0.2s ease;
    color: #1a202c !important;
    font-weight: 500;
}

.shipments-table .tracking-column {
    text-align: center;
    font-family: 'Courier New', monospace;
    font-weight: 600;
    min-width: 140px;
}

.shipments-table .contact-column {
    text-align: right;
    padding-right: 20px !important;
    min-width: 180px;
}

.shipments-table .weight-column {
    text-align: center;
    font-weight: 600;
    min-width: 90px;
}

.shipments-table .price-column {
    text-align: center;
    min-width: 100px;
}

.shipments-table .status-column {
    text-align: center;
    min-width: 140px;
    vertical-align: middle;
    padding: 16px 12px !important;
}

.shipments-table .actions-column {
    text-align: center;
    min-width: 120px;
}

.shipments-table .date-column {
    text-align: center;
    font-family: 'Courier New', monospace;
    min-width: 120px;
}

/* Enhanced status badges with colors */
.shipments-table .status-badge {
    padding: 10px 16px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 700;
    text-transform: none;
    letter-spacing: 0.3px;
    white-space: nowrap;
    border: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    min-width: 120px;
    text-align: center;
    transition: all 0.2s ease;
}

.shipments-table .status-badge:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2) !important;
}

.status-created { 
    background: linear-gradient(135deg, #fbbf24, #f59e0b);
    color: #ffffff !important; 
    font-weight: 700;
    box-shadow: 0 2px 4px rgba(251, 191, 36, 0.3);
}

.status-processing { 
    background: linear-gradient(135deg, #f97316, #ea580c);
    color: #ffffff !important; 
    font-weight: 700;
    box-shadow: 0 2px 4px rgba(249, 115, 22, 0.3);
}

.status-in_transit { 
    background: linear-gradient(135deg, #3b82f6, #2563eb);
    color: #ffffff !important; 
    font-weight: 700;
    box-shadow: 0 2px 4px rgba(59, 130, 246, 0.3);
}

.status-delivered { 
    background: linear-gradient(135deg, #10b981, #059669);
    color: #ffffff !important; 
    font-weight: 700;
    box-shadow: 0 2px 4px rgba(16, 185, 129, 0.3);
}

.status-cancelled { 
    background: linear-gradient(135deg, #ef4444, #dc2626);
    color: #ffffff !important; 
    font-weight: 700;
    box-shadow: 0 2px 4px rgba(239, 68, 68, 0.3);
}

/* Enhanced row interactions with improved hover effects */
.shipments-table tbody tr {
    transition: all 0.3s ease;
    border-bottom: 1px solid #e2e8f0;
    background-color: #ffffff;
}

.shipments-table tbody tr:nth-child(even) {
    background-color: #f8f9fa;
}

.shipments-table tbody tr:hover {
    background-color: #e3f2fd !important;
    transform: translateY(-1px);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    cursor: pointer;
}

.shipments-table tbody tr:hover td {
    color: #1a202c !important;
}

/* Responsive design for mobile */
@media (max-width: 768px) {
    .print-section {
        padding: 0 10px;
        margin-bottom: 15px;
    }
    
    .print-btn {
        padding: 10px 20px;
        font-size: 13px;
    }
    
    .shipments-table .contact-column {
        text-align: center;
        padding: 10px 8px !important;
        min-width: 140px;
    }
    
    .shipments-table .contact-info {
        text-align: center;
    }
    
    .shipments-table .contact-phone {
        text-align: center;
        direction: inherit;
    }
    
    .shipments-table th,
    .shipments-table td {
        padding: 10px 6px !important;
        font-size: 12px;
    }
    
    .shipments-table .tracking-column {
        min-width: 100px;
    }
    
    .shipments-table .actions-column {
        min-width: 80px;
    }
    
    .shipments-table .actions-column .d-flex {
        flex-direction: column;
        gap: 2px;
    }
    
    .shipments-table .btn {
        padding: 4px 8px !important;
        font-size: 11px !important;
    }
    
    /* Mobile adjustments for enhanced elements */
    .shipments-table .currency-amount {
        font-size: 13px;
    }
    
    .shipments-table .contact-name {
        font-size: 12px;
    }
    
    .shipments-table .contact-phone {
        font-size: 11px;
    }
    
    .shipments-table .date-main {
        font-size: 11px;
    }
    
    .shipments-table .date-time {
        font-size: 10px;
    }
    
    /* Mobile status badge adjustments */
    .shipments-table .status-badge {
        padding: 8px 12px;
        font-size: 11px;
        min-width: 100px;
        gap: 4px;
    }
}

@media (max-width: 576px) {
    .unified-table-container {
        margin: 10px;
        border-radius: 8px;
    }
    
    .shipments-table th {
        padding: 12px 6px !important;
        font-size: 11px;
        text-transform: none;
        letter-spacing: 0;
    }
    
    .shipments-table td {
        padding: 8px 4px !important;
        font-size: 11px;
    }
    
    .action-buttons {
        flex-direction: column;
        gap: 4px;
    }
    
    .print-btn-bottom {
        padding: 12px 20px;
        font-size: 12px;
    }
}

/* Dark mode support */
@media (prefers-color-scheme: dark) {
    .unified-table-container {
        background: #1a202c;
        color: #e2e8f0;
    }
    
    .shipments-table th {
        background: linear-gradient(135deg, #2d3748, #1a202c) !important;
        color: #ffffff !important;
    }
    
    .shipments-table td {
        border-bottom: 1px solid #2d3748;
        color: #e2e8f0 !important;
    }
    
    .shipments-table tbody tr:nth-child(even) {
        background-color: #2d3748;
    }
    
    .shipments-table tbody tr:hover {
        background-color: #4a5568 !important;
    }
    
    .contact-name {
        color: #e2e8f0 !important;
    }
    
    .contact-phone {
        color: #a0aec0 !important;
    }
    
    .currency-amount, .weight-text {
        color: #e2e8f0 !important;
    }
    
    .date-main {
        color: #e2e8f0 !important;
    }
    
    .date-time {
        color: #a0aec0 !important;
    }
    
    .print-btn-bottom {
        background: linear-gradient(135deg, #2d3748, #1a202c);
        color: #e2e8f0;
    }
    
    .print-btn-bottom:hover {
        color: #ffffff;
    }
    
    /* Dark mode status badge adjustments - keep bright colors for visibility */
    .status-created { 
        background: linear-gradient(135deg, #fbbf24, #f59e0b);
        color: #000000 !important; 
    }
    
    .status-processing { 
        background: linear-gradient(135deg, #f97316, #ea580c);
        color: #ffffff !important; 
    }
    
    .status-in_transit { 
        background: linear-gradient(135deg, #3b82f6, #2563eb);
        color: #ffffff !important; 
    }
    
    .status-delivered { 
        background: linear-gradient(135deg, #10b981, #059669);
        color: #ffffff !important; 
    }
    
    .status-cancelled { 
        background: linear-gradient(135deg, #ef4444, #dc2626);
        color: #ffffff !important; 
    }
}

/* Enhanced contact information styling with clear formatting */
.shipments-table .contact-info {
    text-align: right;
    line-height: 1.3;
}

.shipments-table .contact-name {
    color: #1a202c !important;
    font-weight: 600;
    font-size: 14px;
    margin-bottom: 6px;
    display: block;
}

.shipments-table .contact-phone {
    color: #4a5568 !important;
    font-size: 12px;
    font-weight: 500;
    direction: ltr;
    text-align: right;
    display: block;
}

/* Enhanced price display */
.shipments-table .price-display {
    text-align: center;
}

.shipments-table .currency-amount {
    font-weight: 700;
    color: #1a202c !important;
    font-size: 15px;
}

.shipments-table .currency-symbol {
    color: #4a5568 !important;
    font-size: 13px;
    margin-right: 3px;
    font-weight: 500;
}

/* Enhanced date display */
.shipments-table .date-display {
    text-align: center;
    line-height: 1.3;
}

.shipments-table .date-main {
    color: #1a202c !important;
    font-weight: 600;
    font-size: 14px;
    font-family: 'Courier New', monospace;
    line-height: 1.2;
}

.shipments-table .date-time {
    color: #6c757d !important;
    font-size: 11px;
    font-family: 'Courier New', monospace;
    margin-top: 3px;
    font-weight: 400;
}

/* Weight and type badge styling */
.shipments-table .weight-text {
    color: #1a202c !important;
    font-weight: 600;
    font-size: 14px;
}

/* Enhanced tracking link styling */
.shipments-table .tracking-link {
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white !important;
    padding: 8px 12px;
    border-radius: 8px;
    font-family: 'Courier New', monospace;
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.5px;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    transition: all 0.2s ease;
}

.shipments-table .tracking-link:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(102, 126, 234, 0.3);
    color: white !important;
}

/* Enhanced type badge styling with icons */
.shipments-table .type-badge {
    background: linear-gradient(135deg, #6b7280, #4b5563);
    color: #ffffff !important;
    padding: 6px 12px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 600;
    border: 1px solid #374151;
    display: inline-flex;
    align-items: center;
    white-space: nowrap;
}

.shipments-table .type-column {
    text-align: center;
}

/* Print button styling - moved below table */
.print-btn-bottom {
    background: linear-gradient(135deg, #ffffff, #f8f9fa);
    border: 2px solid transparent;
    background-clip: padding-box;
    border-radius: 12px;
    padding: 14px 28px;
    font-size: 14px;
    font-weight: 600;
    color: #2d3748;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.print-btn-bottom::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, #667eea, #764ba2);
    border-radius: 10px;
    z-index: -1;
    padding: 2px;
    margin: -2px;
}

.print-btn-bottom:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(102, 126, 234, 0.3);
    color: #1a202c;
}

.print-btn-bottom:active {
    transform: translateY(0);
}

/* Action buttons styling */
.action-buttons {
    display: flex;
    gap: 6px;
    justify-content: center;
    align-items: center;
}

.btn-action {
    padding: 8px 10px;
    border-radius: 8px;
    border: none;
    font-size: 12px;
    cursor: pointer;
    transition: all 0.2s ease;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.btn-edit {
    background: #e3f2fd;
    color: #1976d2;
}

.btn-edit:hover {
    background: #bbdefb;
    transform: scale(1.05);
}

.btn-info {
    background: #e0f2f1;
    color: #00796b;
}

.btn-info:hover {
    background: #b2dfdb;
    transform: scale(1.05);
}

.btn-delete {
    background: #ffebee;
    color: #d32f2f;
}

.btn-delete:hover {
    background: #ffcdd2;
    transform: scale(1.05);
}

/* Action buttons spacing in shipment table */
.action-buttons {
    display: flex;
    gap: 4px;
    justify-content: flex-start;
    align-items: center;
}

.action-buttons .btn-action {
    margin: 0;
}

/* Type Management table improvements */
.type-management-table {
    width: 100%;
    table-layout: fixed;
    border-collapse: separate;
    border-spacing: 0;
}

.type-management-table th,
.type-management-table td {
    padding: 15px 20px !important;
    border-bottom: 1px solid #e2e8f0;
    vertical-align: middle;
}

.type-management-table th:nth-child(1),
.type-management-table td:nth-child(1) {
    width: 30%;
    text-align: right;
    padding-right: 25px !important;
}

.type-management-table th:nth-child(2),
.type-management-table td:nth-child(2) {
    width: 35%;
    text-align: left;
    padding-left: 25px !important;
    direction: ltr;
}

.type-management-table th:nth-child(3),
.type-management-table td:nth-child(3) {
    width: 20%;
    text-align: center;
}

.type-management-table th:nth-child(4),
.type-management-table td:nth-child(4) {
    width: 15%;
    text-align: center;
}

.type-management-table .type-actions {
    display: flex;
    gap: 8px;
    justify-content: center;
    align-items: center;
}

.type-management-table .type-actions .btn-action {
    padding: 6px 10px;
    font-size: 12px;
    border-radius: 4px;
    border: none;
    cursor: pointer;
    transition: all 0.2s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 35px;
    height: 30px;
}

.type-management-table .type-actions .btn-edit {
    background-color: #8b5cf6;
    color: white;
}

.type-management-table .type-actions .btn-edit:hover {
    background-color: #7c3aed;
    transform: translateY(-1px);
}

.type-management-table .type-actions .btn-delete {
    background-color: #ef4444;
    color: white;
}

.type-management-table .type-actions .btn-delete:hover {
    background-color: #dc2626;
    transform: translateY(-1px);
}

/* Enhanced responsive design for type management */
@media (max-width: 768px) {
    .type-management-table th:nth-child(1),
    .type-management-table td:nth-child(1) {
        width: 40%;
    }
    
    .type-management-table th:nth-child(2),
    .type-management-table td:nth-child(2) {
        width: 25%;
    }
    
    .type-management-table th:nth-child(3),
    .type-management-table td:nth-child(3) {
        width: 20%;
    }
    
    .type-management-table th:nth-child(4),
    .type-management-table td:nth-child(4) {
        width: 15%;
    }
}

/* Improved button styling for type management */
.type-actions .btn-action {
    padding: 4px 8px;
    font-size: 12px;
    min-width: auto;
}

.type-actions form {
    margin: 0;
    display: inline;
}

/* Global responsive table design */
.table-responsive-mobile {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

/* Mobile-first responsive breakpoints */
@media (max-width: 992px) {
    .unified-table-container {
        overflow-x: auto;
        border-radius: 8px;
        box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    }
    
    .unified-table {
        min-width: 700px;
        font-size: 13px;
    }
    
    .unified-table th,
    .unified-table td {
        padding: 8px 12px;
        white-space: nowrap;
    }
    
    /* Compact action buttons for mobile */
    .btn-action {
        padding: 4px 6px !important;
        font-size: 11px !important;
        min-width: auto !important;
    }
    
    .action-buttons {
        gap: 2px !important;
    }
    
    .type-actions {
        gap: 2px !important;
    }
}

@media (max-width: 768px) {
    /* Mobile table optimizations */
    .unified-table {
        min-width: 600px;
        font-size: 12px;
    }
    
    .unified-table th,
    .unified-table td {
        padding: 6px 8px;
    }
    
    /* Hide less critical columns on small screens */
    .hide-mobile {
        display: none;
    }
    
    /* Responsive status badges */
    .status-badge {
        font-size: 10px !important;
        padding: 2px 6px !important;
    }
    
    /* Mobile-friendly currency display */
    .currency-amount {
        font-size: 12px;
        font-weight: 600;
    }
    
    .currency-symbol {
        font-size: 10px;
        margin-left: 2px;
    }
    
    /* Compact tracking numbers */
    .unified-table a[style*="background: linear-gradient"] {
        font-size: 10px !important;
        padding: 2px 4px !important;
    }
}

@media (max-width: 576px) {
    /* Extra small mobile screens */
    .unified-table {
        min-width: 500px;
        font-size: 11px;
    }
    
    .unified-table th,
    .unified-table td {
        padding: 4px 6px;
    }
    
    /* Stack action buttons vertically on very small screens */
    .action-buttons {
        flex-direction: column !important;
        gap: 1px !important;
    }
    
    .type-actions {
        flex-direction: column !important;
        gap: 1px !important;
    }
    
    .btn-action {
        width: 100% !important;
        justify-content: center !important;
    }
}

/* Responsive pricing table */
@media (max-width: 768px) {
    .pricing-table-container {
        overflow-x: auto;
    }
    
    .pricing-table {
        min-width: 500px;
    }
    
    .price-input {
        width: 80px !important;
    }
}

/* Mobile navigation improvements */
@media (max-width: 768px) {
    .sidebar {
        transform: translateX(-100%);
        transition: transform 0.3s ease;
    }
    
    .sidebar.show {
        transform: translateX(0);
    }
    
    .content {
        margin-right: 0 !important;
    }
    
    .mobile-toggle {
        display: block !important;
    }
}

/* Card layout improvements for mobile */
@media (max-width: 768px) {
    .type-card,
    .unified-table-container {
        margin-bottom: 15px;
        border-radius: 6px;
    }
    
    .type-card h4 {
        font-size: 16px;
    }
    
    .btn-action.btn-save {
        font-size: 12px;
        padding: 6px 12px;
    }
}

/* Form responsive design */
@media (max-width: 768px) {
    .form-control {
        font-size: 14px;
        padding: 8px 12px;
    }
    
    .form-label {
        font-size: 13px;
        margin-bottom: 4px;
    }
    
    .row .col-md-6 {
        margin-bottom: 10px;
    }
}

/* Table Input Fields */
.table-input {
    width: 100px;
    padding: 8px 12px;
    border: 1px solid #cbd5e0;
    border-radius: 6px;
    font-size: 14px;
    color: #000 !important;
    background: white !important;
    text-align: center;
    direction: ltr;
}

.table-input:focus {
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
    outline: none;
}

/* Action Buttons */
.btn-action {
    padding: 6px 12px;
    border: none;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 500;
    margin: 0 2px;
    cursor: pointer;
    transition: all 0.2s ease;
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.btn-action:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
}

.btn-save {
    background: #10b981;
    color: white;
}

.btn-save:hover {
    background: #059669;
    color: white;
}

.btn-edit {
    background: #8b5cf6;
    color: white;
}

.btn-edit:hover {
    background: #7c3aed;
    color: white;
}

.btn-delete {
    background: #ef4444;
    color: white;
}

.btn-delete:hover {
    background: #dc2626;
    color: white;
}

/* Currency Display */
.currency-amount {
    font-weight: 500;
    color: #2d3748;
}

.currency-symbol {
    color: #718096;
    font-size: 12px;
    margin-left: 4px;
}

/* Card styling */
.card {
    border: none;
    box-shadow: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.075);
    transition: box-shadow 0.15s ease-in-out;
}

.card:hover {
    box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.15);
}

.card-header {
    background-color: var(--bs-light);
    border-bottom: 1px solid var(--bs-border-color);
}

/* Unified table styling */
.table,
.pricing-table {
    width: 100%;
    border-collapse: collapse;
    background-color: #ffffff !important;
    color: #000000 !important;
    border-radius: 0.75rem;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    margin-bottom: 0;
}

.table th,
.pricing-table th,
.table td,
.pricing-table td {
    padding: 1rem 1.25rem;
    vertical-align: middle;
    border-bottom: 1px solid #f1f3f4;
    color: #000000 !important;
    background-color: #ffffff !important;
}

.table th,
.pricing-table th {
    background-color: #f8f9fa !important;
    font-weight: 700;
    font-size: 0.95rem;
    text-transform: none;
    color: #2d3748 !important;
    border-bottom: 2px solid #e2e8f0;
    letter-spacing: 0.05em;
}

.table-hover tbody tr:hover {
    background-color: rgba(var(--bs-primary-rgb), 0.05);
}

/* Badge styling */
.badge {
    font-size: 0.75em;
    padding: 0.35em 0.65em;
}

/* Button improvements */
.btn {
    font-weight: 600;
    border-radius: 0.375rem;
    transition: all 0.15s ease-in-out;
}

.btn-primary {
    background-color: var(--bs-primary);
    border-color: var(--bs-primary);
}

.btn-primary:hover {
    background-color: var(--bs-primary);
    border-color: var(--bs-primary);
    transform: translateY(-1px);
    box-shadow: 0 0.25rem 0.5rem rgba(0, 0, 0, 0.1);
}

/* Alert improvements */
.alert {
    border-radius: 0.5rem;
    border: none;
    box-shadow: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.075);
}

.alert-success {
    background-color: rgba(var(--bs-success-rgb), 0.1);
    color: var(--bs-success);
}

.alert-danger {
    background-color: rgba(var(--bs-danger-rgb), 0.1);
    color: var(--bs-danger);
}

/* Header styling */
header {
    background: linear-gradient(135deg, var(--bs-primary) 0%, var(--bs-info) 100%);
    color: white;
    margin-bottom: 2rem;
}

header h1 {
    margin: 0;
    font-weight: 700;
    font-size: 2rem;
}

/* Footer styling */
footer {
    margin-top: auto;
    background-color: var(--bs-dark) !important;
}

/* Responsive improvements */
@media (max-width: 768px) {
    .container-fluid {
        padding-left: 0.75rem;
        padding-right: 0.75rem;
    }
    
    header h1 {
        font-size: 1.5rem;
    }
    
    .card-body {
        padding: 1rem;
    }
    
    .table-responsive {
        font-size: 0.875rem;
    }
    
    .btn-lg {
        font-size: 1rem;
        padding: 0.75rem 1rem;
    }
}

/* Loading states */
.btn:disabled {
    opacity: 0.7;
    cursor: not-allowed;
}

/* Empty state styling */
.text-center .fa-inbox {
    opacity: 0.6;
}

/* Form section headers */
.text-secondary {
    border-bottom: 2px solid var(--bs-border-color);
    padding-bottom: 0.5rem;
    margin-bottom: 1rem;
}

/* Tracking number badge */
.badge.bg-info {
    font-family: 'Courier New', monospace;
    font-size: 0.8em;
    letter-spacing: 0.5px;
}

/* Animation for form submission */
@keyframes pulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.05); }
    100% { transform: scale(1); }
}

.btn-primary:active {
    animation: pulse 0.2s;
}

/* Sticker button styling */
.sticker-btn {
    background: linear-gradient(135deg, #ff6b6b, #ee5a24) !important;
    color: white !important;
    border: none !important;
    transition: all 0.2s ease;
}

.sticker-btn:hover {
    background: linear-gradient(135deg, #ee5a24, #ff6b6b) !important;
    transform: scale(1.05);
    color: white !important;
}

/* Unified Status Badge Styling for Tracking Stages */
.status-badge {
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    text-transform: none;
    letter-spacing: 0.3px;
    white-space: nowrap;
    border: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 100px;
    text-align: center;
    transition: all 0.2s ease;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.status-badge:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
}

/* Status Colors - Tracking Stage Progression */
.status-created { 
    background: linear-gradient(135deg, #fbbf24, #f59e0b);
    color: #ffffff !important; 
}

.status-packaged { 
    background: linear-gradient(135deg, #fb923c, #f97316);
    color: #ffffff !important; 
}

.status-dispatching { 
    background: linear-gradient(135deg, #38bdf8, #0ea5e9);
    color: #ffffff !important; 
}

.status-shipped { 
    background: linear-gradient(135deg, #3b82f6, #2563eb);
    color: #ffffff !important; 
}

.status-in-transit { 
    background: linear-gradient(135deg, #8b5cf6, #7c3aed);
    color: #ffffff !important; 
}

.status-received { 
    background: linear-gradient(135deg, #06b6d4, #0891b2);
    color: #ffffff !important; 
}

.status-delivered { 
    background: linear-gradient(135deg, #10b981, #059669);
    color: #ffffff !important; 
}

.status-cancelled { 
    background: linear-gradient(135deg, #ef4444, #dc2626);
    color: #ffffff !important; 
}

/* Legacy status support */
.status-processing { 
    background: linear-gradient(135deg, #f97316, #ea580c);
    color: #ffffff !important; 
}

.status-pending { 
    background: linear-gradient(135deg, #64748b, #475569);
    color: #ffffff !important; 
}
