/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: #ffffff;
    color: #333;
    line-height: 1.6;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Header Styles */
header {
    background-color: #4da6ff;
    color: white;
    padding: 20px 0;
    margin-bottom: 30px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

header h1 {
    font-size: 2.2rem;
    margin-bottom: 5px;
}

header p {
    font-size: 1rem;
    opacity: 0.9;
}

header nav {
    float: right;
    margin-top: -40px;
}

header nav a {
    color: white;
    text-decoration: none;
    font-weight: 500;
    padding: 8px 15px;
    border-radius: 4px;
    background-color: rgba(255,255,255,0.2);
    transition: background-color 0.3s;
}

header nav a:hover {
    background-color: rgba(255,255,255,0.3);
}

/* Login Page Styles */
.login-container {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 70vh;
}

.login-form {
    background-color: #f9f9f9;
    padding: 30px;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    width: 100%;
    max-width: 400px;
}

.login-form h2 {
    margin-bottom: 20px;
    text-align: center;
    color: #4da6ff;
}

.form-group {
    margin-bottom: 20px;
}

label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
}

input, select {
    width: 100%;
    padding: 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 1rem;
}

.btn-primary {
    background-color: #4da6ff;
    color: white;
    border: none;
    padding: 12px 20px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 1rem;
    font-weight: 500;
    width: 100%;
    transition: background-color 0.3s;
}

.btn-primary:hover {
    background-color: #3d8cd9;
}

.login-links {
    margin-top: 20px;
    text-align: center;
}

.login-links a {
    color: #4da6ff;
    text-decoration: none;
}

/* Dashboard Styles */
.dashboard {
    padding-bottom: 40px;
}

.stats-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.stat-card {
    background-color: #f9f9f9;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.05);
    text-align: center;
}

.stat-card h3 {
    font-size: 1rem;
    color: #666;
    margin-bottom: 10px;
}

.stat-card p {
    font-size: 2rem;
    font-weight: bold;
    color: #4da6ff;
}

.charts-section {
    margin-bottom: 30px;
}

.chart-container {
    background-color: #f9f9f9;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.05);
    height: 300px;
}

.admin-actions {
    background-color: #f9f9f9;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.05);
    margin-bottom: 30px;
}

.form-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
    margin-bottom: 15px;
}

.parcels-list {
    background-color: #f9f9f9;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.05);
}

table {
    width: 100%;
    border-collapse: collapse;
}

th, td {
    padding: 12px 15px;
    text-align: left;
    border-bottom: 1px solid #ddd;
}

th {
    background-color: #f2f2f2;
    font-weight: 600;
}

/* Tracking Page Styles */
.tracking-container {
    padding-bottom: 40px;
}

.tracking-search {
    background-color: #f9f9f9;
    padding: 30px;
    border-radius: 8px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.05);
    margin-bottom: 30px;
    text-align: center;
}

.search-form {
    display: flex;
    max-width: 500px;
    margin: 20px auto 0;
}

.search-form input {
    flex: 1;
    border-top-right-radius: 0;
    border-bottom-right-radius: 0;
}

.search-form button {
    width: auto;
    border-top-left-radius: 0;
    border-bottom-left-radius: 0;
}

.tracking-result {
    background-color: #f9f9f9;
    padding: 30px;
    border-radius: 8px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.05);
}

.parcel-info {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.info-card {
    background-color: white;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.05);
}

.info-card h3 {
    margin-bottom: 15px;
    color: #4da6ff;
    border-bottom: 1px solid #eee;
    padding-bottom: 10px;
}

.tracking-timeline {
    margin-bottom: 30px;
}

.timeline {
    position: relative;
    max-width: 800px;
    margin: 20px auto;
}

.timeline::before {
    content: '';
    position: absolute;
    left: 30px;
    top: 0;
    bottom: 0;
    width: 2px;
    background-color: #4da6ff;
}

.timeline-item {
    position: relative;
    margin-bottom: 20px;
    padding-left: 60px;
}

.timeline-item::before {
    content: '';
    position: absolute;
    left: 24px;
    top: 5px;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background-color: #4da6ff;
    border: 2px solid white;
    box-shadow: 0 0 0 2px #4da6ff;
}

.timeline-item.active::before {
    background-color: white;
    border: 2px solid #4da6ff;
}

.timeline-content {
    background-color: white;
    padding: 15px;
    border-radius: 8px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.05);
}

.timeline-date {
    font-size: 0.85rem;
    color: #666;
    margin-bottom: 5px;
}

.timeline-status {
    font-weight: 600;
    color: #4da6ff;
}

.timeline-message {
    margin-top: 5px;
    font-size: 0.9rem;
    color: #555;
}

.progress-section {
    text-align: center;
}

.progress-bar {
    height: 10px;
    background-color: #e0e0e0;
    border-radius: 5px;
    margin: 20px 0;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    background-color: #4da6ff;
    width: 0%;
    transition: width 0.5s ease;
}

.progress-labels {
    display: flex;
    justify-content: space-between;
    font-size: 0.8rem;
    color: #666;
}

/* Utility Classes */
.hidden {
    display: none;
}

/* Responsive Design */
@media (max-width: 768px) {
    .stats-cards {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .form-row {
        grid-template-columns: 1fr;
    }
    
    header nav {
        float: none;
        margin-top: 15px;
    }
    
    .progress-labels {
        flex-wrap: wrap;
    }
    
    .progress-labels span {
        margin-bottom: 5px;
        width: 33.33%;
    }
}

@media (max-width: 480px) {
    .stats-cards {
        grid-template-columns: 1fr;
    }
    
    .search-form {
        flex-direction: column;
    }
    
    .search-form input {
        border-radius: 4px;
        margin-bottom: 10px;
    }
    
    .search-form button {
        border-radius: 4px;
        width: 100%;
    }
}

/* Add these new styles to the existing CSS file */

/* Status badges */
.status-badge {
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 0.8rem;
    font-weight: 500;
}

.status-order-received { background-color: #e3f2fd; color: #1976d2; }
.status-processing { background-color: #fff3e0; color: #f57c00; }
.status-shipped { background-color: #e8f5e8; color: #388e3c; }
.status-in-transit { background-color: #e3f2fd; color: #1976d2; }
.status-out-for-delivery { background-color: #fff3e0; color: #f57c00; }
.status-delivered { background-color: #e8f5e8; color: #388e3c; }

/* Small buttons */
.btn-small {
    background-color: #4da6ff;
    color: white;
    border: none;
    padding: 6px 12px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.8rem;
    transition: background-color 0.3s;
}

.btn-small:hover {
    background-color: #3d8cd9;
}

/* Modal styles */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.5);
}

.modal-content {
    background-color: white;
    margin: 5% auto;
    padding: 0;
    border-radius: 8px;
    width: 90%;
    max-width: 700px;
    max-height: 80vh;
    overflow-y: auto;
    box-shadow: 0 4px 20px rgba(0,0,0,0.2);
}

.modal-header {
    padding: 20px;
    border-bottom: 1px solid #eee;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-header h3 {
    margin: 0;
    color: #4da6ff;
}

.close-modal {
    font-size: 1.5rem;
    font-weight: bold;
    cursor: pointer;
    color: #999;
}

.close-modal:hover {
    color: #333;
}

.modal-body {
    padding: 20px;
}

/* History items */
.history-item {
    padding: 15px;
    border-bottom: 1px solid #f0f0f0;
    margin-bottom: 10px;
}

.history-item:last-child {
    border-bottom: none;
}

.history-status {
    font-weight: 600;
    color: #4da6ff;
    margin-bottom: 5px;
}

.history-date {
    font-size: 0.85rem;
    color: #666;
    margin-bottom: 8px;
}

.history-message {
    background-color: #f9f9f9;
    padding: 10px;
    border-radius: 4px;
    position: relative;
}

.custom-message {
    border-left: 3px solid #4da6ff;
}

.custom-badge {
    background-color: #4da6ff;
    color: white;
    padding: 2px 6px;
    border-radius: 8px;
    font-size: 0.7rem;
    margin-left: 8px;
}

/* Custom update indicators in timeline */
.custom-update {
    border-left: 3px solid #4da6ff;
}

.custom-indicator {
    background-color: #4da6ff;
    color: white;
    padding: 2px 6px;
    border-radius: 8px;
    font-size: 0.7rem;
    margin-left: 8px;
}

/* Admin actions enhancements */
.admin-actions .form-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
    margin-bottom: 15px;
}

.message-templates {
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid #eee;
}

.message-templates h4 {
    margin-bottom: 10px;
    color: #4da6ff;
}

.action-buttons {
    display: flex;
    gap: 10px;
    margin-top: 15px;
}

.action-buttons button {
    flex: 1;
}

/* Enhanced progress section */
.progress-section {
    background-color: white;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.05);
    margin-top: 20px;
}

.progress-milestones {
    display: flex;
    justify-content: space-between;
    margin-top: 15px;
    position: relative;
}

.progress-milestone {
    text-align: center;
    flex: 1;
    position: relative;
}

.progress-milestone::before {
    content: '';
    position: absolute;
    top: -25px;
    left: 50%;
    transform: translateX(-50%);
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background-color: #e0e0e0;
    border: 2px solid white;
    z-index: 2;
}

.progress-milestone.active::before {
    background-color: #4da6ff;
}

.progress-milestone.completed::before {
    background-color: #4da6ff;
}

.progress-milestone span {
    font-size: 0.8rem;
    color: #666;
    display: block;
    margin-top: 5px;
}

/* Enhanced timeline with more details */
.timeline-item.active .timeline-content {
    background-color: #f0f7ff;
    border: 1px solid #4da6ff;
}

.timeline-message {
    line-height: 1.4;
}

/* Responsive improvements */
@media (max-width: 768px) {
    .modal-content {
        width: 95%;
        margin: 10% auto;
    }
    
    .action-buttons {
        flex-direction: column;
    }
    
    .progress-milestones {
        flex-wrap: wrap;
    }
    
    .progress-milestone {
        flex: 0 0 33.33%;
        margin-bottom: 15px;
    }
}

@media (max-width: 480px) {
    .progress-milestone {
        flex: 0 0 50%;
    }
    
    .admin-actions .form-row {
        grid-template-columns: 1fr;
    }
}

/* Add these new styles to the existing CSS file */

/* Action buttons in table */
.action-buttons-small {
    display: flex;
    gap: 5px;
    flex-wrap: wrap;
}

.btn-view {
    background-color: #4da6ff !important;
}

.btn-delete {
    background-color: #ff6b6b !important;
}

.btn-delete:hover {
    background-color: #ff5252 !important;
}

/* Modal close button fixes */
.close-modal {
    font-size: 1.5rem;
    font-weight: bold;
    cursor: pointer;
    color: #999;
    background: none;
    border: none;
    padding: 0;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.close-modal:hover {
    color: #333;
    background-color: #f5f5f5;
    border-radius: 50%;
}

/* Parcel header info in modal */
.parcel-header-info {
    background-color: #f8f9fa;
    padding: 15px;
    border-radius: 6px;
    margin-bottom: 20px;
    border-left: 4px solid #4da6ff;
}

.parcel-header-info h4 {
    margin: 0 0 10px 0;
    color: #333;
}

.parcel-header-info p {
    margin: 5px 0;
    font-size: 0.9rem;
    color: #666;
}

/* Enhanced history items */
.history-item {
    padding: 15px;
    border-bottom: 1px solid #f0f0f0;
    margin-bottom: 10px;
    transition: background-color 0.2s;
}

.history-item:hover {
    background-color: #f8f9fa;
}

.history-item:last-child {
    border-bottom: none;
}

.history-status {
    font-weight: 600;
    color: #4da6ff;
    margin-bottom: 5px;
    font-size: 1rem;
}

.history-date {
    font-size: 0.85rem;
    color: #666;
    margin-bottom: 8px;
}

.history-message {
    background-color: #f9f9f9;
    padding: 12px;
    border-radius: 6px;
    position: relative;
    line-height: 1.5;
}

.custom-message {
    border-left: 4px solid #4da6ff;
    background-color: #f0f7ff;
}

.custom-badge {
    background-color: #4da6ff;
    color: white;
    padding: 3px 8px;
    border-radius: 10px;
    font-size: 0.7rem;
    margin-left: 8px;
    font-weight: 500;
}

/* Table responsive improvements */
@media (max-width: 768px) {
    .action-buttons-small {
        flex-direction: column;
    }
    
    .btn-small {
        font-size: 0.7rem;
        padding: 4px 8px;
    }
    
    table {
        font-size: 0.8rem;
    }
    
    th, td {
        padding: 8px 10px;
    }
}

/* Delete confirmation styles */
.delete-confirmation {
    background-color: #fff3f3;
    border: 1px solid #ffcdd2;
    border-radius: 6px;
    padding: 15px;
    margin: 10px 0;
}

.delete-confirmation h4 {
    color: #d32f2f;
    margin-top: 0;
}

.delete-actions {
    display: flex;
    gap: 10px;
    margin-top: 10px;
}

.btn-confirm-delete {
    background-color: #d32f2f !important;
}

.btn-cancel-delete {
    background-color: #757575 !important;
}

/* Enhanced modal scrolling */
.modal-body {
    max-height: 60vh;
    overflow-y: auto;
}

/* Status filter for admin */
.status-filter {
    margin-bottom: 20px;
}

.filter-buttons {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.filter-btn {
    padding: 8px 16px;
    border: 1px solid #ddd;
    background-color: white;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.3s;
}

.filter-btn.active {
    background-color: #4da6ff;
    color: white;
    border-color: #4da6ff;
}

.filter-btn:hover {
    background-color: #f0f0f0;
}

.filter-btn.active:hover {
    background-color: #3d8cd9;
}
/* Add these chart-specific styles to the existing CSS file */

/* Chart container fixes */
.charts-section {
    margin-bottom: 30px;
    background-color: #f9f9f9;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.05);
}

.chart-container {
    position: relative;
    height: 400px; /* Fixed height for better display */
    width: 100%;
    margin: 0 auto;
}

/* Ensure chart canvas is properly sized */
#statusChart {
    width: 100% !important;
    height: 100% !important;
    max-height: 400px;
}

/* Chart responsive fixes */
@media (max-width: 768px) {
    .chart-container {
        height: 300px;
    }
    
    #statusChart {
        max-height: 300px;
    }
}

@media (max-width: 480px) {
    .chart-container {
        height: 250px;
    }
    
    #statusChart {
        max-height: 250px;
    }
}

/* Chart legend improvements */
.chart-legend {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 20px;
}

.legend-item {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.9rem;
}

.legend-color {
    width: 12px;
    height: 12px;
    border-radius: 50%;
}

/* Alternative chart layout for small screens */
.chart-container.horizontal {
    height: 500px;
}

@media (max-width: 768px) {
    .chart-container.horizontal {
        height: 600px;
    }
}

/* Add these enhanced styles to the existing CSS file */

/* Message Templates Styling */
.message-templates {
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid #eee;
}

.message-templates h4 {
    margin-bottom: 10px;
    color: #4da6ff;
    font-size: 1rem;
}

.message-templates select {
    width: 100%;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
    background-color: white;
    font-size: 0.9rem;
}

.message-templates select optgroup {
    font-weight: bold;
    color: #4da6ff;
    background-color: #f8f9fa;
}

.message-templates select option {
    padding: 8px;
    border-bottom: 1px solid #f0f0f0;
}

.message-templates select option:hover {
    background-color: #f0f7ff;
}

/* Enhanced Modal Styling */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.5);
    backdrop-filter: blur(2px);
}

.modal-content {
    background-color: white;
    margin: 5% auto;
    padding: 0;
    border-radius: 12px;
    width: 90%;
    max-width: 800px;
    max-height: 85vh;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0,0,0,0.3);
    animation: modalSlideIn 0.3s ease-out;
}

@keyframes modalSlideIn {
    from {
        opacity: 0;
        transform: translateY(-50px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.modal-header {
    padding: 20px 25px;
    border-bottom: 1px solid #eee;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background-color: #f8f9fa;
    border-radius: 12px 12px 0 0;
}

.modal-header h3 {
    margin: 0;
    color: #4da6ff;
    font-size: 1.3rem;
}

.close-modal {
    font-size: 1.5rem;
    font-weight: bold;
    cursor: pointer;
    color: #999;
    background: none;
    border: none;
    padding: 5px;
    width: 35px;
    height: 35px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.3s ease;
}

.close-modal:hover {
    color: #333;
    background-color: #e9ecef;
    transform: scale(1.1);
}

.modal-body {
    padding: 25px;
    max-height: 60vh;
    overflow-y: auto;
}

/* Enhanced History Items */
.parcel-header-info {
    background: linear-gradient(135deg, #f0f7ff 0%, #e3f2fd 100%);
    padding: 20px;
    border-radius: 8px;
    margin-bottom: 25px;
    border-left: 4px solid #4da6ff;
    box-shadow: 0 2px 10px rgba(77, 166, 255, 0.1);
}

.parcel-header-info h4 {
    margin: 0 0 10px 0;
    color: #333;
    font-size: 1.2rem;
}

.parcel-header-info p {
    margin: 8px 0;
    font-size: 0.95rem;
    color: #555;
}

.history-item {
    padding: 18px;
    border-bottom: 1px solid #f0f0f0;
    margin-bottom: 12px;
    transition: all 0.3s ease;
    border-radius: 8px;
    background-color: white;
}

.history-item:hover {
    background-color: #f8f9fa;
    transform: translateX(5px);
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.history-item:last-child {
    border-bottom: none;
    margin-bottom: 0;
}

.history-status {
    font-weight: 600;
    color: #4da6ff;
    margin-bottom: 8px;
    font-size: 1.05rem;
    display: flex;
    align-items: center;
    gap: 8px;
}

.history-date {
    font-size: 0.85rem;
    color: #666;
    margin-bottom: 10px;
    font-family: 'Courier New', monospace;
}

.history-message {
    background-color: #f9f9f9;
    padding: 15px;
    border-radius: 6px;
    position: relative;
    line-height: 1.5;
    border: 1px solid #eee;
}

.custom-message {
    border-left: 4px solid #4da6ff;
    background: linear-gradient(135deg, #f0f7ff 0%, #ffffff 100%);
    border-color: #4da6ff;
}

.custom-badge {
    background-color: #4da6ff;
    color: white;
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 0.75rem;
    margin-left: 10px;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Form enhancements */
.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    color: #333;
}

.form-group input, 
.form-group select {
    width: 100%;
    padding: 12px;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 1rem;
    transition: border-color 0.3s, box-shadow 0.3s;
}

.form-group input:focus, 
.form-group select:focus {
    outline: none;
    border-color: #4da6ff;
    box-shadow: 0 0 0 3px rgba(77, 166, 255, 0.1);
}

/* Action buttons enhancements */
.action-buttons {
    display: flex;
    gap: 12px;
    margin-top: 20px;
}

.btn-primary {
    background-color: #4da6ff;
    color: white;
    border: none;
    padding: 12px 24px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 1rem;
    font-weight: 500;
    transition: all 0.3s ease;
    flex: 1;
}

.btn-primary:hover {
    background-color: #3d8cd9;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(77, 166, 255, 0.3);
}

.btn-secondary {
    background-color: #6c757d;
    color: white;
    border: none;
    padding: 12px 24px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 1rem;
    font-weight: 500;
    transition: all 0.3s ease;
    flex: 1;
}

.btn-secondary:hover {
    background-color: #5a6268;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(108, 117, 125, 0.3);
}

/* Responsive improvements for modal */
@media (max-width: 768px) {
    .modal-content {
        width: 95%;
        margin: 10% auto;
        max-height: 90vh;
    }
    
    .modal-header {
        padding: 15px 20px;
    }
    
    .modal-body {
        padding: 20px;
        max-height: 70vh;
    }
    
    .action-buttons {
        flex-direction: column;
    }
    
    .history-item {
        padding: 15px;
    }
}

/* Scrollbar styling for modal */
.modal-body::-webkit-scrollbar {
    width: 6px;
}

.modal-body::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 3px;
}

.modal-body::-webkit-scrollbar-thumb {
    background: #c1c1c1;
    border-radius: 3px;
}

.modal-body::-webkit-scrollbar-thumb:hover {
    background: #a8a8a8;
}

/* Add these new styles to the existing CSS file */

/* New Parcel Modal Styling */
.new-parcel-form {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-bottom: 20px;
}

.form-section {
    margin-bottom: 25px;
}

.form-section h4 {
    color: #4da6ff;
    margin-bottom: 15px;
    padding-bottom: 8px;
    border-bottom: 2px solid #f0f0f0;
}

.form-full-width {
    grid-column: 1 / -1;
}

.required-field::after {
    content: " *";
    color: #ff6b6b;
}

/* Enhanced info cards for tracking page */
.parcel-details-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.info-card {
    background-color: white;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    border-left: 4px solid #4da6ff;
}

.info-card h3 {
    margin-bottom: 15px;
    color: #4da6ff;
    border-bottom: 1px solid #eee;
    padding-bottom: 10px;
}

.info-line {
    margin-bottom: 8px;
    padding: 5px 0;
    border-bottom: 1px solid #f8f9fa;
}

.info-line:last-child {
    border-bottom: none;
    margin-bottom: 0;
}

.info-line strong {
    color: #555;
    min-width: 120px;
    display: inline-block;
}

/* Progress milestones enhancement */
.progress-milestones {
    display: flex;
    justify-content: space-between;
    margin-top: 20px;
    position: relative;
}

.progress-milestone {
    text-align: center;
    flex: 1;
    position: relative;
    z-index: 2;
}

.progress-milestone::before {
    content: '';
    position: absolute;
    top: -25px;
    left: 50%;
    transform: translateX(-50%);
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background-color: #e0e0e0;
    border: 3px solid white;
    z-index: 2;
    transition: all 0.3s ease;
}

.progress-milestone.completed::before {
    background-color: #4da6ff;
    box-shadow: 0 0 0 3px rgba(77, 166, 255, 0.2);
}

.progress-milestone.active::before {
    background-color: #4da6ff;
    box-shadow: 0 0 0 3px rgba(77, 166, 255, 0.4);
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% {
        box-shadow: 0 0 0 0 rgba(77, 166, 255, 0.4);
    }
    70% {
        box-shadow: 0 0 0 10px rgba(77, 166, 255, 0);
    }
    100% {
        box-shadow: 0 0 0 0 rgba(77, 166, 255, 0);
    }
}

.progress-milestone span {
    font-size: 0.8rem;
    color: #666;
    display: block;
    margin-top: 5px;
    font-weight: 500;
}

.progress-milestone.completed span {
    color: #4da6ff;
    font-weight: 600;
}

.progress-milestone.active span {
    color: #4da6ff;
    font-weight: 700;
}

/* Form enhancements */
.form-row-2 {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
}

.form-group textarea {
    width: 100%;
    padding: 12px;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 1rem;
    font-family: inherit;
    resize: vertical;
    min-height: 80px;
}

.form-group textarea:focus {
    outline: none;
    border-color: #4da6ff;
    box-shadow: 0 0 0 3px rgba(77, 166, 255, 0.1);
}

/* Action buttons in header */
.header-actions {
    display: flex;
    gap: 15px;
    align-items: center;
}

.btn-success {
    background-color: #28a745;
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.9rem;
    font-weight: 500;
    transition: all 0.3s ease;
}

.btn-success:hover {
    background-color: #218838;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(40, 167, 69, 0.3);
}

/* Responsive design for new parcel form */
@media (max-width: 768px) {
    .new-parcel-form {
        grid-template-columns: 1fr;
    }
    
    .form-row-2 {
        grid-template-columns: 1fr;
    }
    
    .parcel-details-grid {
        grid-template-columns: 1fr;
    }
    
    .progress-milestones {
        flex-wrap: wrap;
    }
    
    .progress-milestone {
        flex: 0 0 33.33%;
        margin-bottom: 15px;
    }
}

@media (max-width: 480px) {
    .progress-milestone {
        flex: 0 0 50%;
    }
    
    .header-actions {
        flex-direction: column;
        gap: 10px;
    }
    
    .btn-success {
        width: 100%;
    }
}

/* Cost calculation display */
.cost-preview {
    background-color: #f8f9fa;
    padding: 15px;
    border-radius: 6px;
    margin-top: 10px;
    border-left: 4px solid #28a745;
}

.cost-preview h5 {
    margin: 0 0 8px 0;
    color: #28a745;
}

.cost-preview p {
    margin: 0;
    font-size: 1.1rem;
    font-weight: 600;
}

/* Item type badges */
.item-type-badge {
    display: inline-block;
    padding: 4px 8px;
    background-color: #e3f2fd;
    color: #1976d2;
    border-radius: 12px;
    font-size: 0.8rem;
    font-weight: 500;
    margin-left: 8px;
}

/* Add these fixes to the existing CSS file */

/* Ensure tracking result is properly styled */
.tracking-result {
    background-color: #f9f9f9;
    padding: 30px;
    border-radius: 8px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.05);
    margin-top: 20px;
}

.tracking-result.hidden {
    display: none;
}

/* Enhanced info line styling */
.info-line {
    margin-bottom: 12px;
    padding: 8px 0;
    border-bottom: 1px solid #f0f0f0;
    display: flex;
    align-items: flex-start;
}

.info-line:last-child {
    border-bottom: none;
    margin-bottom: 0;
}

.info-line strong {
    color: #333;
    min-width: 160px;
    display: inline-block;
    font-weight: 600;
}

/* Timeline fixes */
.timeline {
    position: relative;
    max-width: 800px;
    margin: 20px auto;
    padding-left: 0;
}

.timeline::before {
    content: '';
    position: absolute;
    left: 30px;
    top: 0;
    bottom: 0;
    width: 2px;
    background-color: #4da6ff;
}

.timeline-item {
    position: relative;
    margin-bottom: 25px;
    padding-left: 60px;
}

.timeline-item::before {
    content: '';
    position: absolute;
    left: 24px;
    top: 8px;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background-color: #4da6ff;
    border: 3px solid white;
    box-shadow: 0 0 0 2px #4da6ff;
    z-index: 2;
}

.timeline-item.active::before {
    background-color: white;
    border: 3px solid #4da6ff;
    animation: pulse 2s infinite;
}

.timeline-content {
    background-color: white;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    border-left: 4px solid #4da6ff;
    transition: all 0.3s ease;
}

.timeline-content:hover {
    transform: translateX(5px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

.timeline-content.custom-update {
    border-left-color: #ff6b6b;
    background: linear-gradient(135deg, #fff5f5 0%, #ffffff 100%);
}

.timeline-date {
    font-size: 0.85rem;
    color: #666;
    margin-bottom: 8px;
    font-family: 'Courier New', monospace;
}

.timeline-status {
    font-weight: 600;
    color: #4da6ff;
    margin-bottom: 8px;
    font-size: 1.1rem;
}

.timeline-message {
    color: #555;
    line-height: 1.5;
}

.custom-indicator {
    background-color: #ff6b6b;
    color: white;
    padding: 3px 8px;
    border-radius: 10px;
    font-size: 0.7rem;
    margin-left: 8px;
    font-weight: 500;
    text-transform: uppercase;
}

/* No history message */
.no-history {
    text-align: center;
    padding: 40px;
    color: #666;
    font-style: italic;
    background-color: white;
    border-radius: 8px;
    border: 2px dashed #ddd;
}

/* Progress bar enhancements */
.progress-section {
    background-color: white;
    padding: 25px;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    margin-top: 30px;
}

.progress-section h3 {
    margin-bottom: 20px;
    color: #4da6ff;
    text-align: center;
}

.progress-bar {
    height: 12px;
    background-color: #e9ecef;
    border-radius: 6px;
    margin: 25px 0;
    overflow: hidden;
    position: relative;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #4da6ff, #66b3ff);
    width: 0%;
    transition: width 0.8s ease-in-out;
    border-radius: 6px;
}

/* Search form enhancements */
.search-form {
    display: flex;
    max-width: 500px;
    margin: 25px auto 0;
    gap: 0;
}

.search-form input {
    flex: 1;
    border: 2px solid #4da6ff;
    border-right: none;
    border-radius: 6px 0 0 6px;
    padding: 15px;
    font-size: 1rem;
    transition: all 0.3s ease;
}

.search-form input:focus {
    outline: none;
    border-color: #3d8cd9;
    box-shadow: 0 0 0 3px rgba(77, 166, 255, 0.1);
}

.search-form button {
    border-radius: 0 6px 6px 0;
    padding: 15px 25px;
    font-size: 1rem;
    font-weight: 600;
}

/* Debug info (remove in production) */
.debug-info {
    background-color: #f8f9fa;
    padding: 10px;
    border-radius: 4px;
    margin: 10px 0;
    font-family: monospace;
    font-size: 0.8rem;
    color: #666;
}

/* Responsive fixes */
@media (max-width: 768px) {
    .info-line {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .info-line strong {
        min-width: auto;
        margin-bottom: 4px;
    }
    
    .timeline::before {
        left: 20px;
    }
    
    .timeline-item {
        padding-left: 50px;
    }
    
    .timeline-item::before {
        left: 14px;
    }
    
    .search-form {
        flex-direction: column;
        gap: 10px;
    }
    
    .search-form input {
        border: 2px solid #4da6ff;
        border-radius: 6px;
    }
    
    .search-form button {
        border-radius: 6px;
        width: 100%;
    }
}

/* Animation for progress fill */
@keyframes progressFill {
    0% {
        width: 0%;
    }
    100% {
        width: var(--progress-width);
    }
}

.progress-fill.animated {
    animation: progressFill 1.5s ease-out;
}

/* Add these modern styles to the existing CSS file */

/* Modern Tracking Header */
.tracking-header {
    background: linear-gradient(135deg, #4da6ff 0%, #3d8cd9 100%);
    color: white;
    padding: 30px;
    border-radius: 12px;
    margin-bottom: 30px;
    text-align: center;
    box-shadow: 0 8px 25px rgba(77, 166, 255, 0.3);
}

.tracking-header h2 {
    margin: 0 0 15px 0;
    font-size: 1.8rem;
    font-weight: 600;
}

.current-status {
    display: inline-block;
}

.status-badge-large {
    background: rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(10px);
    padding: 12px 24px;
    border-radius: 25px;
    font-weight: 600;
    font-size: 1.1rem;
    border: 2px solid rgba(255, 255, 255, 0.3);
}

/* Modern Detail Cards Grid */
.details-grid-modern {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 25px;
    margin-bottom: 40px;
}

.detail-card {
    background: white;
    border-radius: 16px;
    padding: 0;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    border: 1px solid #f0f0f0;
    transition: all 0.3s ease;
    overflow: hidden;
}

.detail-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.12);
}

.detail-card.highlight-card {
    border: 2px solid #4da6ff;
    background: linear-gradient(135deg, #f8fbff 0%, #f0f7ff 100%);
}

.card-header {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    padding: 20px 25px;
    border-bottom: 1px solid #eee;
    display: flex;
    align-items: center;
    gap: 12px;
}

.highlight-card .card-header {
    background: linear-gradient(135deg, #4da6ff 0%, #3d8cd9 100%);
    color: white;
}

.card-header h3 {
    margin: 0;
    font-size: 1.2rem;
    font-weight: 600;
}

.card-icon {
    font-size: 1.5rem;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.9);
    border-radius: 10px;
}

.highlight-card .card-icon {
    background: rgba(255, 255, 255, 0.2);
    color: white;
}

.card-content {
    padding: 25px;
}

.info-group {
    margin-bottom: 20px;
}

.info-group:last-child {
    margin-bottom: 0;
}

.info-group label {
    display: block;
    font-weight: 600;
    color: #555;
    margin-bottom: 6px;
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.info-group p {
    margin: 0;
    color: #333;
    font-size: 1rem;
    line-height: 1.5;
}

.info-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

/* Special value styles */
.value-amount, .cost-amount {
    font-weight: 700;
    color: #28a745;
    font-size: 1.1rem;
}

.tracking-number {
    font-family: 'Courier New', monospace;
    font-weight: 600;
    color: #4da6ff;
    background: #f0f7ff;
    padding: 8px 12px;
    border-radius: 6px;
    display: inline-block;
}

.shipping-method {
    font-weight: 600;
    color: #4da6ff;
    text-transform: capitalize;
}

.delivery-date {
    font-weight: 600;
    color: #ff6b6b;
}

.item-type-badge {
    background: linear-gradient(135deg, #4da6ff, #66b3ff);
    color: white;
    padding: 6px 12px;
    border-radius: 15px;
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Enhanced Timeline */
.timeline-modern {
    position: relative;
    max-width: 900px;
    margin: 0 auto;
    padding: 20px 0;
}

.timeline-modern::before {
    content: '';
    position: absolute;
    left: 30px;
    top: 0;
    bottom: 0;
    width: 3px;
    background: linear-gradient(to bottom, #4da6ff, #66b3ff, #80c1ff);
    border-radius: 3px;
}

.timeline-item {
    position: relative;
    margin-bottom: 30px;
    padding-left: 70px;
}

.timeline-marker {
    position: absolute;
    left: 22px;
    top: 5px;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: #4da6ff;
    border: 4px solid white;
    box-shadow: 0 0 0 3px #4da6ff;
    z-index: 2;
    transition: all 0.3s ease;
}

.timeline-item.active .timeline-marker {
    background: white;
    border: 4px solid #4da6ff;
    box-shadow: 0 0 0 3px #4da6ff, 0 0 20px rgba(77, 166, 255, 0.5);
    animation: pulse 2s infinite;
}

.timeline-content {
    background: white;
    padding: 25px;
    border-radius: 12px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
    border-left: 4px solid #4da6ff;
    transition: all 0.3s ease;
}

.timeline-content:hover {
    transform: translateX(5px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.12);
}

.timeline-content.custom-update {
    border-left-color: #ff6b6b;
    background: linear-gradient(135deg, #fff5f5 0%, #ffffff 100%);
}

.timeline-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
    flex-wrap: wrap;
    gap: 10px;
}

.timeline-status {
    font-weight: 700;
    color: #4da6ff;
    font-size: 1.1rem;
}

.timeline-date {
    font-size: 0.85rem;
    color: #666;
    font-family: 'Courier New', monospace;
    background: #f8f9fa;
    padding: 4px 8px;
    border-radius: 4px;
}

.timeline-message {
    color: #555;
    line-height: 1.6;
    font-size: 0.95rem;
}

/* Enhanced Progress Section */
.progress-section-modern {
    background: white;
    padding: 30px;
    border-radius: 16px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    margin-top: 40px;
}

.progress-section-modern h3 {
    text-align: center;
    margin-bottom: 30px;
    color: #333;
    font-size: 1.4rem;
    font-weight: 600;
}

.progress-visual {
    position: relative;
    margin: 40px 0;
}

.progress-bar-modern {
    height: 16px;
    background: linear-gradient(135deg, #e9ecef, #f8f9fa);
    border-radius: 8px;
    overflow: hidden;
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.1);
}

.progress-fill-modern {
    height: 100%;
    background: linear-gradient(90deg, #4da6ff, #66b3ff, #80c1ff);
    width: 0%;
    transition: width 1s ease-in-out;
    border-radius: 8px;
    position: relative;
    overflow: hidden;
}

.progress-fill-modern::after {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.4), transparent);
    animation: shimmer 2s infinite;
}

@keyframes shimmer {
    0% { left: -100%; }
    100% { left: 100%; }
}

/* Enhanced Shipping Cost Input */
.cost-input-group {
    position: relative;
}

.cost-input-group::before {
    content: '$';
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    color: #666;
    font-weight: 600;
    z-index: 2;
}

.cost-input-group input {
    padding-left: 30px !important;
}

.cost-preview {
    background: linear-gradient(135deg, #e8f5e8, #f0f9f0);
    border: 1px solid #d4edda;
    border-radius: 8px;
    padding: 12px 15px;
    margin-top: 10px;
    font-size: 0.9rem;
    color: #155724;
}

.cost-preview h5 {
    margin: 0 0 5px 0;
    font-size: 0.9rem;
    font-weight: 600;
}

/* Responsive Design */
@media (max-width: 768px) {
    .details-grid-modern {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .info-row {
        grid-template-columns: 1fr;
        gap: 15px;
    }
    
    .timeline-header {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .timeline-modern::before {
        left: 20px;
    }
    
    .timeline-item {
        padding-left: 50px;
    }
    
    .timeline-marker {
        left: 12px;
        width: 16px;
        height: 16px;
    }
    
    .tracking-header {
        padding: 20px;
    }
    
    .tracking-header h2 {
        font-size: 1.4rem;
    }
}

@media (max-width: 480px) {
    .card-content {
        padding: 20px;
    }
    
    .progress-section-modern {
        padding: 20px;
    }
    
    .progress-milestones {
        flex-wrap: wrap;
        gap: 10px;
    }
    
    .progress-milestone {
        flex: 0 0 calc(50% - 10px);
    }
}

/* Animation enhancements */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.detail-card {
    animation: fadeInUp 0.6s ease-out;
}

.detail-card:nth-child(2) { animation-delay: 0.1s; }
.detail-card:nth-child(3) { animation-delay: 0.2s; }
.detail-card:nth-child(4) { animation-delay: 0.3s; }