/* Logistics Tracking System Styles */
/* Compatible with older browsers for PHP 5.6 compatibility */

/* Reset and base styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: Arial, sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: #f4f4f4;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 15px;
}

/* Header styles */
header {
    background-color: #2c3e50;
    color: white;
    padding: 1rem 0;
    margin-bottom: 0;
}

header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

header h1 {
    font-size: 1.5rem;
}

header nav {
    display: flex;
    gap: 1rem;
}

header nav a {
    color: white;
    text-decoration: none;
    padding: 0.5rem 1rem;
    border-radius: 4px;
    transition: background-color 0.3s;
}

header nav a:hover {
    background-color: #34495e;
}

/* Main content */
main {
    min-height: calc(100vh - 120px);
    padding: 0;
}

/* Hero Section */
.hero {
    background: linear-gradient(135deg, #2c3e50 0%, #1a2530 100%);
    color: white;
    padding: 4rem 0 2rem;
    text-align: center;
}

.hero .container {
    max-width: 800px;
    margin: 0 auto;
}

.hero h1 {
    font-size: 2.5rem;
    margin-bottom: 1rem;
    font-weight: bold;
}

.hero p {
    font-size: 1.2rem;
    margin-bottom: 2rem;
    opacity: 0.9;
}

.tracking-card {
    background: white;
    padding: 2rem;
    border-radius: 10px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.2);
    max-width: 600px;
    margin: 0 auto;
}

.tracking-card h2 {
    color: #2c3e50;
    margin-bottom: 1.5rem;
    text-align: center;
}

/* Form styles */
.form-group {
    margin-bottom: 1rem;
    display: flex;
    gap: 0.5rem;
}

.form-group input {
    flex: 1;
    padding: 0.75rem;
    border: 2px solid #ddd;
    border-radius: 4px;
    font-size: 1rem;
}

.form-group input:focus {
    outline: none;
    border-color: #3498db;
}

.btn {
    display: inline-block;
    padding: 0.75rem 1.5rem;
    background-color: #3498db;
    color: white;
    text-decoration: none;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 1rem;
    transition: background-color 0.3s;
    text-align: center;
    min-width: 150px;
}

.btn:hover {
    background-color: #2980b9;
}

.btn-primary {
    background-color: #3498db;
}

.btn-secondary {
    background-color: #2ecc71;
    font-weight: bold;
}

.btn-success {
    background-color: #2ecc71;
}

.btn-danger {
    background-color: #e74c3c;
}

.btn-small {
    padding: 0.25rem 0.5rem;
    font-size: 0.9rem;
}

/* Features Section */
.features {
    padding: 4rem 0;
    background-color: white;
}

.feature-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
}

.feature-item {
    text-align: center;
    padding: 1.5rem;
}

.feature-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
}

.feature-item h3 {
    color: #2c3e50;
    margin-bottom: 0.5rem;
}

.feature-item p {
    color: #7f8c8d;
}

/* Tracking Results Section */
.tracking-results {
    padding: 2rem 0;
    background-color: #f8f9fa;
}

.package-details {
    background: white;
    padding: 2rem;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.package-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 2px solid #eee;
}

.package-header h2 {
    color: #2c3e50;
    margin: 0;
}

.status-badge {
    padding: 0.5rem 1rem;
    border-radius: 20px;
    font-weight: bold;
    text-transform: uppercase;
    font-size: 0.85rem;
}

.status-badge.pending {
    background-color: #f39c12;
    color: white;
}

.status-badge.in-transit {
    background-color: #3498db;
    color: white;
}

.status-badge.delivered {
    background-color: #2ecc71;
    color: white;
}

.status-badge.cancelled {
    background-color: #e74c3c;
    color: white;
}

.package-info-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1rem;
    margin-bottom: 2rem;
}

.info-item {
    background: #f8f9fa;
    padding: 1rem;
    border-radius: 4px;
    border-left: 4px solid #3498db;
}

.info-item label {
    display: block;
    font-weight: bold;
    color: #7f8c8d;
    margin-bottom: 0.25rem;
    font-size: 0.9rem;
    text-transform: uppercase;
}

.info-item span {
    display: block;
    color: #2c3e50;
    font-weight: 500;
}

/* Timeline Styles */
.timeline {
    position: relative;
    padding: 2rem 0;
}

.timeline::before {
    content: '';
    position: absolute;
    top: 0;
    bottom: 0;
    width: 2px;
    background: #3498db;
    left: 20px;
}

.timeline-item {
    position: relative;
    margin-bottom: 2rem;
    padding-left: 50px;
}

.timeline-item.current .timeline-content {
    background: #e3f2fd;
    border-left: 4px solid #2196f3;
}

.timeline-marker {
    position: absolute;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: #3498db;
    left: 11px;
    top: 5px;
    z-index: 1;
}

.timeline-content {
    background: white;
    padding: 1rem;
    border-radius: 4px;
    border: 1px solid #eee;
}

.timeline-date {
    font-weight: bold;
    color: #2c3e50;
    margin-bottom: 0.5rem;
}

.timeline-status {
    color: #3498db;
    font-weight: bold;
    margin-bottom: 0.25rem;
}

.timeline-location {
    color: #7f8c8d;
    font-style: italic;
    margin-bottom: 0.5rem;
}

.timeline-notes {
    color: #555;
}

/* CTA Section */
.cta {
    background: linear-gradient(135deg, #3498db 0%, #2980b9 100%);
    color: white;
    padding: 4rem 0;
    text-align: center;
}

.cta-content h2 {
    font-size: 2rem;
    margin-bottom: 1rem;
}

.cta-content p {
    font-size: 1.2rem;
    margin-bottom: 2rem;
    opacity: 0.9;
}

/* Login section */
.login-section {
    background: white;
    padding: 2rem;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    max-width: 500px;
    margin: 2rem auto;
}

.login-form {
    margin-top: 1.5rem;
}

/* Other sections */
.create-package-section,
.packages-list-section,
.edit-package-section {
    background: white;
    padding: 1.5rem;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    margin: 2rem 0;
}

/* Tables */
.packages-table,
.history-table {
    width: 100%;
    border-collapse: collapse;
    margin: 1rem 0;
}

.packages-table th,
.packages-table td,
.history-table th,
.history-table td {
    padding: 0.75rem;
    text-align: left;
    border-bottom: 1px solid #ddd;
}

.packages-table th,
.history-table th {
    background-color: #ecf0f1;
    font-weight: bold;
}

.packages-table tr:hover,
.history-table tr:hover {
    background-color: #f8f9fa;
}

.active-status {
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    font-size: 0.85rem;
}

.active-status.active {
    background-color: #2ecc71;
    color: white;
}

.active-status.inactive {
    background-color: #95a5a6;
    color: white;
}

/* Stats container */
.stats-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
    margin-bottom: 2rem;
}

.stat-card {
    background: white;
    padding: 1.5rem;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    text-align: center;
}

.stat-card h3 {
    margin-bottom: 0.5rem;
    color: #7f8c8d;
    font-size: 1rem;
}

.stat-number {
    font-size: 2rem;
    font-weight: bold;
    color: #2c3e50;
}

.stat-number.pending {
    color: #f39c12;
}

.stat-number.in-transit {
    color: #3498db;
}

.stat-number.delivered {
    color: #2ecc71;
}

.stat-number.cancelled {
    color: #e74c3c;
}

/* Messages */
.error {
    background-color: #e74c3c;
    color: white;
    padding: 0.75rem;
    border-radius: 4px;
    margin: 1rem 0;
    text-align: center;
}

.success {
    background-color: #2ecc71;
    color: white;
    padding: 0.75rem;
    border-radius: 4px;
    margin: 1rem 0;
    text-align: center;
}

.warning {
    background-color: #f39c12;
    color: white;
    padding: 0.75rem;
    border-radius: 4px;
    margin: 1rem 0;
    text-align: center;
}

/* Footer */
footer {
    background-color: #2c3e50;
    color: white;
    text-align: center;
    padding: 2rem 0;
    margin-top: 2rem;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    header .container {
        flex-direction: column;
        gap: 1rem;
    }
    
    .hero h1 {
        font-size: 2rem;
    }
    
    .form-group {
        flex-direction: column;
    }
    
    .package-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
    }
    
    .stats-container {
        grid-template-columns: 1fr;
    }
    
    .packages-table,
    .history-table {
        font-size: 0.9rem;
    }
    
    .packages-table,
    .history-table {
        display: block;
        overflow-x: auto;
    }
    
    .timeline::before {
        left: 10px;
    }
    
    .timeline-item {
        padding-left: 35px;
    }
    
    .timeline-marker {
        left: 6px;
    }
}