/* ARMA PWA Styles */

/* CSS Variables for consistent theming */
:root {
    --primary-color: #2196F3;
    --primary-dark: #0b7dda;
    --secondary-color: #f0f0f0;
    --success-color: #4CAF50;
    --error-color: #F44336;
    --warning-color: #FF9800;
    --text-color: #333;
    --text-light: #666;
    --border-color: #ddd;
    --background-color: #f5f5f5;
    --card-background: #ffffff;
    --shadow: 0 2px 4px rgba(0,0,0,0.1);
    --shadow-hover: 0 4px 8px rgba(0,0,0,0.15);
    --border-radius: 8px;
    --transition: all 0.3s ease;
}

/* Reset and base styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Roboto', 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: var(--background-color);
    color: var(--text-color);
    line-height: 1.6;
    min-height: 100vh;
}

/* Container styles */
.container {
    max-width: 800px;
    margin: 0 auto;
    padding: 20px;
    min-height: 100vh;
}

.container.hidden {
    display: none;
}

/* Logo styles */
.logo-container {
    text-align: center;
    margin-bottom: 30px;
}

.arma-logo {
    width: 120px;
    height: auto;
    margin-bottom: 20px;
}

/* Typography */
h1 {
    text-align: center;
    color: var(--primary-color);
    margin-bottom: 30px;
    font-size: 2rem;
    font-weight: 300;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

h2 {
    color: var(--text-color);
    margin-bottom: 20px;
    font-size: 1.5rem;
    font-weight: 400;
    display: flex;
    align-items: center;
    gap: 10px;
}

h3 {
    color: var(--text-color);
    margin-bottom: 15px;
    font-size: 1.2rem;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 8px;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 10px;
}

/* Card styles */
.card {
    background: var(--card-background);
    border-radius: var(--border-radius);
    box-shadow: var(--shadow);
    padding: 30px;
    margin-bottom: 20px;
    transition: var(--transition);
}

.card:hover {
    box-shadow: var(--shadow-hover);
}

/* Header styles */
header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    flex-wrap: wrap;
    gap: 15px;
}

.user-info {
    display: flex;
    align-items: center;
    gap: 15px;
    flex-wrap: wrap;
}

#user-name {
    display: flex;
    align-items: center;
    gap: 5px;
    color: var(--text-light);
    font-size: 0.9rem;
}

/* Form styles */
.form-group {
    margin-bottom: 20px;
}

label {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 8px;
    font-weight: 500;
    color: var(--text-color);
}

input[type="text"],
input[type="password"],
input[type="email"] {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid var(--border-color);
    border-radius: var(--border-radius);
    font-size: 16px;
    transition: var(--transition);
    background: var(--card-background);
}

input[type="text"]:focus,
input[type="password"]:focus,
input[type="email"]:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(33, 150, 243, 0.1);
}

input[readonly] {
    background-color: var(--secondary-color);
    cursor: not-allowed;
}

/* Button styles */
button {
    background: var(--primary-color);
    color: white;
    border: none;
    padding: 12px 20px;
    border-radius: var(--border-radius);
    cursor: pointer;
    font-size: 16px;
    font-weight: 500;
    transition: var(--transition);
    display: flex;
    align-items: center;
    gap: 8px;
    justify-content: center;
    min-height: 48px;
}

button:hover {
    background: var(--primary-dark);
    transform: translateY(-1px);
    box-shadow: var(--shadow-hover);
}

button:active {
    transform: translateY(0);
}

button:disabled {
    background: #ccc;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.back-button {
    background: var(--secondary-color);
    color: var(--text-color);
    padding: 8px 16px;
    font-size: 14px;
    min-height: auto;
}

.back-button:hover {
    background: #e0e0e0;
}

.location-action-button {
    background: var(--secondary-color);
    color: var(--text-color);
    padding: 8px 12px;
    font-size: 14px;
    margin-right: 10px;
    min-height: auto;
}

.location-action-button.primary {
    background: var(--primary-color);
    color: white;
}

.location-action-button:hover {
    opacity: 0.9;
}

.add-passenger-button {
    background: var(--primary-color);
    color: white;
    padding: 8px 15px;
    font-size: 14px;
    margin-top: 10px;
    min-height: auto;
}

.boarding-record-button {
    background: var(--success-color);
    color: white;
    padding: 12px 24px;
    font-size: 16px;
    font-weight: 600;
}

.boarding-record-button:hover {
    background: #45a049;
}

/* Loading and status styles */
.loading {
    text-align: center;
    padding: 40px 20px;
    color: var(--text-light);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.loading .material-icons {
    animation: spin 1s linear infinite;
}

@keyframes spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

.error-message {
    background: #ffebee;
    color: var(--error-color);
    padding: 12px 16px;
    border-radius: var(--border-radius);
    border-left: 4px solid var(--error-color);
    margin-top: 10px;
    display: none;
}

.error-message.show {
    display: block;
}

.status-message {
    padding: 12px 16px;
    border-radius: var(--border-radius);
    margin-top: 10px;
    display: none;
}

.status-message.show {
    display: block;
}

.status-message.success {
    background: #e8f5e8;
    color: var(--success-color);
    border-left: 4px solid var(--success-color);
}

.status-message.info {
    background: #e3f2fd;
    color: var(--primary-color);
    border-left: 4px solid var(--primary-color);
}

.status-message.warning {
    background: #fff3e0;
    color: var(--warning-color);
    border-left: 4px solid var(--warning-color);
}

/* Trip list styles */
#trips-list {
    list-style: none;
}

.trip-item {
    background: var(--card-background);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    padding: 20px;
    margin-bottom: 15px;
    cursor: pointer;
    transition: var(--transition);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.trip-item:hover {
    border-color: var(--primary-color);
    box-shadow: var(--shadow-hover);
    transform: translateY(-2px);
}

.trip-info h4 {
    color: var(--primary-color);
    margin-bottom: 8px;
    font-size: 1.1rem;
}

.trip-info p {
    color: var(--text-light);
    margin-bottom: 4px;
    font-size: 0.9rem;
}

.trip-status {
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
}

.trip-status.open {
    background: #e8f5e8;
    color: var(--success-color);
}

.trip-status.in-progress {
    background: #fff3e0;
    color: var(--warning-color);
}

.trip-status.completed {
    background: #e3f2fd;
    color: var(--primary-color);
}

/* Trip details styles */
.trip-details-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.detail-item {
    background: var(--secondary-color);
    padding: 15px;
    border-radius: var(--border-radius);
}

.detail-item h4 {
    color: var(--text-color);
    margin-bottom: 8px;
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.detail-item p {
    color: var(--text-light);
    font-size: 1rem;
    font-weight: 500;
}

.trip-actions {
    display: flex;
    gap: 15px;
    margin-top: 20px;
    flex-wrap: wrap;
}

/* Boarding record styles */
.boarding-record-fields {
    margin-bottom: 30px;
}

.boarding-record-field {
    margin-bottom: 20px;
}

.location-field-container {
    position: relative;
}

.location-actions {
    display: flex;
    margin-top: 10px;
    flex-wrap: wrap;
    gap: 10px;
}

.geolocation-status {
    margin-top: 5px;
    font-size: 12px;
    color: var(--text-light);
}

.location-options {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: white;
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    max-height: 200px;
    overflow-y: auto;
    z-index: 10;
    display: none;
    box-shadow: var(--shadow-hover);
}

.location-option {
    padding: 10px;
    cursor: pointer;
    border-bottom: 1px solid #eee;
    transition: var(--transition);
}

.location-option:hover {
    background-color: var(--secondary-color);
}

.location-option:last-child {
    border-bottom: none;
}

.boarding-list-section,
.unboarding-list-section {
    margin-bottom: 30px;
}

.passenger-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 10px;
    background: var(--card-background);
    border-radius: var(--border-radius);
    overflow: hidden;
    box-shadow: var(--shadow);
}

.passenger-table th,
.passenger-table td {
    padding: 12px;
    text-align: left;
    border-bottom: 1px solid var(--border-color);
}

.passenger-table th {
    background-color: var(--secondary-color);
    font-weight: 600;
    color: var(--text-color);
}

.passenger-table tr:hover {
    background-color: #f9f9f9;
}

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

.passenger-status {
    display: inline-block;
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
}

.passenger-status.boarding {
    background-color: var(--success-color);
    color: white;
}

.passenger-status.unboarding {
    background-color: var(--error-color);
    color: white;
}

.passenger-status.absent {
    background-color: #9E9E9E;
    color: white;
}

.boarding-record-actions {
    margin-top: 30px;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 15px;
}

.save-status {
    font-size: 14px;
}

.save-status.success {
    color: var(--success-color);
}

.save-status.error {
    color: var(--error-color);
}

.save-status.pending {
    color: var(--primary-color);
}

/* Offline notification */
.offline-notification {
    position: fixed;
    top: 20px;
    left: 50%;
    transform: translateX(-50%);
    background: var(--warning-color);
    color: white;
    padding: 12px 20px;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-hover);
    z-index: 1000;
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 500;
    animation: slideDown 0.3s ease;
}

.offline-notification.hidden {
    display: none;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateX(-50%) translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateX(-50%) translateY(0);
    }
}

/* Responsive design */
@media (max-width: 768px) {
    .container {
        padding: 15px;
    }
    
    h1 {
        font-size: 1.5rem;
    }
    
    .card {
        padding: 20px;
    }
    
    header {
        flex-direction: column;
        align-items: stretch;
        gap: 10px;
    }
    
    .user-info {
        justify-content: space-between;
    }
    
    .trip-item {
        flex-direction: column;
        align-items: stretch;
        gap: 15px;
    }
    
    .trip-actions {
        flex-direction: column;
    }
    
    .trip-details-grid {
        grid-template-columns: 1fr;
    }
    
    .location-actions {
        flex-direction: column;
    }
    
    .boarding-record-actions {
        align-items: stretch;
    }
    
    .passenger-table {
        font-size: 14px;
    }
    
    .passenger-table th,
    .passenger-table td {
        padding: 8px;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 10px;
    }
    
    .card {
        padding: 15px;
    }
    
    h1 {
        font-size: 1.3rem;
    }
    
    button {
        padding: 10px 16px;
        font-size: 14px;
    }
    
    input[type="text"],
    input[type="password"],
    input[type="email"] {
        padding: 10px 12px;
        font-size: 14px;
    }
}

/* Utility classes */
.hidden {
    display: none !important;
}

.text-center {
    text-align: center;
}

.text-left {
    text-align: left;
}

.text-right {
    text-align: right;
}

.mb-10 {
    margin-bottom: 10px;
}

.mb-20 {
    margin-bottom: 20px;
}

.mt-10 {
    margin-top: 10px;
}

.mt-20 {
    margin-top: 20px;
}

/* Material Icons adjustments */
.material-icons {
    font-size: inherit;
    vertical-align: middle;
}

/* Focus styles for accessibility */
button:focus,
input:focus {
    outline: 2px solid var(--primary-color);
    outline-offset: 2px;
}

/* Print styles */
@media print {
    .back-button,
    .add-passenger-button,
    .boarding-record-button,
    #logout-button {
        display: none;
    }
    
    .card {
        box-shadow: none;
        border: 1px solid var(--border-color);
    }
}


/* Pre-filled form fields styling */
.pre-filled {
    background-color: #f0f8ff !important;
    border-color: #4CAF50 !important;
    color: #2e7d32 !important;
}

.pre-filled::placeholder {
    color: #81c784 !important;
}

/* Add a small icon to indicate pre-filled fields */
.pre-filled::after {
    content: "✓";
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    color: #4CAF50;
    font-weight: bold;
}

/* Enhanced offline notification */
#offline-notification {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    background: linear-gradient(135deg, #ff9800, #f57c00);
    color: white;
    padding: 12px;
    text-align: center;
    z-index: 1000;
    box-shadow: 0 2px 8px rgba(0,0,0,0.2);
    transform: translateY(-100%);
    transition: transform 0.3s ease;
}

#offline-notification:not(.hidden) {
    transform: translateY(0);
}

#offline-notification .material-icons {
    vertical-align: middle;
    margin-right: 8px;
}

/* Enhanced status messages */
.status-message {
    position: fixed;
    top: 20px;
    right: 20px;
    padding: 12px 20px;
    border-radius: 8px;
    color: white;
    font-weight: 500;
    z-index: 1001;
    max-width: 300px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.2);
    transform: translateX(100%);
    transition: transform 0.3s ease;
}

.status-message.show {
    transform: translateX(0);
}

.status-message.success {
    background: linear-gradient(135deg, #4CAF50, #45a049);
}

.status-message.error {
    background: linear-gradient(135deg, #f44336, #d32f2f);
}

.status-message.warning {
    background: linear-gradient(135deg, #ff9800, #f57c00);
}

.status-message.info {
    background: linear-gradient(135deg, #2196F3, #1976D2);
}

/* Loading states for enhanced UX */
.loading-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255, 255, 255, 0.9);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 100;
}

.loading-spinner {
    width: 40px;
    height: 40px;
    border: 4px solid #f3f3f3;
    border-top: 4px solid #2196F3;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Enhanced trip cards */
.trip-item {
    position: relative;
    overflow: hidden;
}

.trip-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 4px;
    height: 100%;
    background: var(--status-color, #4CAF50);
}

.trip-item.status-open::before {
    background: #4CAF50;
}

.trip-item.status-in-progress::before {
    background: #ff9800;
}

.trip-item.status-completed::before {
    background: #9e9e9e;
}

/* Responsive enhancements */
@media (max-width: 768px) {
    .status-message {
        right: 10px;
        left: 10px;
        max-width: none;
    }
    
    .pre-filled {
        font-size: 16px; /* Prevent zoom on iOS */
    }
}



/* Enhanced Trip Details Styles */
.trip-header {
    background: linear-gradient(135deg, #2196F3, #1976D2);
    color: white;
    padding: 20px;
    border-radius: 12px;
    margin-bottom: 20px;
    box-shadow: 0 4px 12px rgba(33, 150, 243, 0.3);
}

.trip-header h2 {
    margin: 0;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 10px;
}

.trip-header h2 i {
    margin-right: 10px;
}

.trip-status {
    display: flex;
    align-items: center;
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 0.9em;
    font-weight: 500;
}

.status-approved {
    background-color: rgba(76, 175, 80, 0.2);
    color: #4CAF50;
}

.status-cancelled {
    background-color: rgba(244, 67, 54, 0.2);
    color: #F44336;
}

.status-completed {
    background-color: rgba(76, 175, 80, 0.2);
    color: #4CAF50;
}

.status-in-progress {
    background-color: rgba(255, 152, 0, 0.2);
    color: #FF9800;
}

.status-draft {
    background-color: rgba(158, 158, 158, 0.2);
    color: #9E9E9E;
}

.status-unknown {
    background-color: rgba(158, 158, 158, 0.2);
    color: #9E9E9E;
}

.trip-metadata {
    background: white;
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 20px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.metadata-grid {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.metadata-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

.metadata-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px;
    background: #f8f9fa;
    border-radius: 8px;
    border-left: 4px solid #2196F3;
}

.metadata-item i {
    color: #2196F3;
    font-size: 20px;
}

.metadata-item .label {
    font-weight: 600;
    color: #666;
    min-width: 60px;
}

.metadata-item .value {
    color: #333;
    font-weight: 500;
}

.trip-section {
    background: white;
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 20px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.trip-section h3 {
    margin: 0 0 20px 0;
    color: #333;
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 1.2em;
    border-bottom: 2px solid #f0f0f0;
    padding-bottom: 10px;
}

.trip-section h3 i {
    color: #2196F3;
}

/* Table Styles */
.waypoints-table-container,
.cargo-table-container,
.passenger-table-container {
    overflow-x: auto;
    border-radius: 8px;
    border: 1px solid #e0e0e0;
}

.waypoints-table,
.cargo-table,
.passenger-table {
    width: 100%;
    border-collapse: collapse;
    background: white;
}

.waypoints-table th,
.cargo-table th,
.passenger-table th {
    background: #f5f5f5;
    color: #333;
    font-weight: 600;
    padding: 12px;
    text-align: left;
    border-bottom: 2px solid #e0e0e0;
}

.waypoints-table td,
.cargo-table td,
.passenger-table td {
    padding: 12px;
    border-bottom: 1px solid #f0f0f0;
    color: #666;
}

.waypoints-table tr:hover,
.cargo-table tr:hover,
.passenger-table tr:hover {
    background-color: #f8f9fa;
}

.waypoints-table td i,
.cargo-table td i,
.passenger-table td i {
    color: #2196F3;
    margin-right: 5px;
    font-size: 16px;
}

/* Route Map Styles */
.route-map-container {
    border-radius: 8px;
    overflow: hidden;
    border: 1px solid #e0e0e0;
}

.route-map-placeholder {
    background: linear-gradient(135deg, #f8f9fa, #e9ecef);
    padding: 40px;
    text-align: center;
    color: #666;
}

.route-map-placeholder i {
    font-size: 48px;
    color: #2196F3;
    margin-bottom: 10px;
    display: block;
}

.route-map-placeholder p {
    margin: 5px 0;
    font-size: 1.1em;
}

.route-info {
    font-weight: 600;
    color: #333 !important;
}

/* Responsive Design */
@media (max-width: 768px) {
    .metadata-row {
        grid-template-columns: 1fr;
        gap: 10px;
    }
    
    .metadata-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 5px;
    }
    
    .metadata-item .label {
        min-width: auto;
    }
    
    .trip-header h2 {
        flex-direction: column;
        align-items: flex-start;
        gap: 15px;
    }
    
    .trip-status {
        align-self: flex-start;
    }
    
    .waypoints-table-container,
    .cargo-table-container,
    .passenger-table-container {
        font-size: 0.9em;
    }
    
    .waypoints-table th,
    .cargo-table th,
    .passenger-table th,
    .waypoints-table td,
    .cargo-table td,
    .passenger-table td {
        padding: 8px;
    }
}

@media (max-width: 480px) {
    .trip-section {
        padding: 15px;
        margin-bottom: 15px;
    }
    
    .trip-metadata {
        padding: 15px;
    }
    
    .trip-header {
        padding: 15px;
    }
    
    .metadata-item {
        padding: 10px;
    }
    
    .route-map-placeholder {
        padding: 30px 20px;
    }
    
    .route-map-placeholder i {
        font-size: 36px;
    }
}


/* Enhanced Table Styles for Trip Details */
.data-table-container {
    margin: 20px 0;
    overflow-x: auto;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow);
    background: var(--card-background);
}

.data-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
    background: var(--card-background);
}

.data-table thead {
    background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
    color: white;
}

.data-table thead th {
    padding: 16px 12px;
    text-align: left;
    font-weight: 600;
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border: none;
    position: relative;
}

.data-table thead th i.material-icons {
    font-size: 16px;
    margin-right: 6px;
    vertical-align: middle;
    opacity: 0.9;
}

.data-table tbody tr {
    border-bottom: 1px solid var(--border-color);
    transition: var(--transition);
}

.data-table tbody tr:hover {
    background-color: #f8f9fa;
    transform: translateY(-1px);
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}

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

.data-table tbody td {
    padding: 14px 12px;
    vertical-align: middle;
    border: none;
}

.data-table tbody td i.material-icons {
    font-size: 18px;
    margin-right: 8px;
    vertical-align: middle;
    color: var(--primary-color);
}

/* Badge Styles */
.type-badge, .status-badge {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.type-badge {
    background: linear-gradient(135deg, #e3f2fd, #bbdefb);
    color: var(--primary-color);
    border: 1px solid var(--primary-color);
}

.status-badge {
    background: var(--success-color);
    color: white;
}

.status-badge.status-confirmed {
    background: var(--success-color);
}

.status-badge.status-pending {
    background: var(--warning-color);
}

.status-badge.status-cancelled {
    background: var(--error-color);
}

/* Trip Section Styles */
.trip-section {
    margin: 30px 0;
    background: var(--card-background);
    border-radius: var(--border-radius);
    box-shadow: var(--shadow);
    overflow: hidden;
    transition: var(--transition);
}

.trip-section:hover {
    box-shadow: var(--shadow-hover);
}

.trip-section h3 {
    background: linear-gradient(135deg, #f8f9fa, #e9ecef);
    color: var(--text-color);
    padding: 16px 20px;
    margin: 0;
    font-size: 18px;
    font-weight: 600;
    border-bottom: 2px solid var(--primary-color);
    display: flex;
    align-items: center;
}

.trip-section h3 i.material-icons {
    margin-right: 10px;
    color: var(--primary-color);
    font-size: 22px;
}

/* Trip Metadata Section */
.trip-metadata-section {
    background: var(--card-background);
    border-radius: var(--border-radius);
    box-shadow: var(--shadow);
    margin: 20px 0;
    overflow: hidden;
}

.trip-metadata-section h3 {
    background: linear-gradient(135deg, #f8f9fa, #e9ecef);
    color: var(--text-color);
    padding: 16px 20px;
    margin: 0;
    font-size: 18px;
    font-weight: 600;
    border-bottom: 2px solid var(--primary-color);
    display: flex;
    align-items: center;
}

.metadata-grid {
    padding: 20px;
}

.metadata-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-bottom: 16px;
}

.metadata-row:last-child {
    margin-bottom: 0;
}

.metadata-item {
    display: flex;
    align-items: center;
    padding: 12px;
    background: #f8f9fa;
    border-radius: var(--border-radius);
    border-left: 4px solid var(--primary-color);
    transition: var(--transition);
}

.metadata-item:hover {
    background: #e9ecef;
    transform: translateX(2px);
}

.metadata-item i.material-icons {
    color: var(--primary-color);
    margin-right: 10px;
    font-size: 20px;
}

.metadata-item .label {
    font-weight: 600;
    color: var(--text-color);
    margin-right: 8px;
    min-width: 60px;
}

.metadata-item .value {
    color: var(--text-light);
    font-weight: 500;
}

/* Trip Header Enhancements */
.trip-header {
    background: var(--card-background);
    border-radius: var(--border-radius);
    box-shadow: var(--shadow);
    padding: 20px;
    margin-bottom: 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 15px;
}

.trip-header h2 {
    display: flex;
    align-items: center;
    margin: 0;
    font-size: 24px;
    color: var(--text-color);
    flex: 1;
}

.trip-header h2 i.material-icons {
    margin-right: 12px;
    color: var(--primary-color);
    font-size: 28px;
}

.trip-status {
    display: inline-flex;
    align-items: center;
    padding: 8px 16px;
    border-radius: 25px;
    font-size: 14px;
    font-weight: 600;
    margin-left: 15px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.trip-status i.material-icons {
    margin-right: 6px;
    font-size: 16px;
}

.trip-status.status-approved {
    background: linear-gradient(135deg, #e8f5e8, #c8e6c9);
    color: var(--success-color);
    border: 2px solid var(--success-color);
}

.trip-status.status-in-progress {
    background: linear-gradient(135deg, #fff3e0, #ffcc02);
    color: #f57c00;
    border: 2px solid #f57c00;
}

.trip-status.status-completed {
    background: linear-gradient(135deg, #e8f5e8, #c8e6c9);
    color: var(--success-color);
    border: 2px solid var(--success-color);
}

.trip-status.status-cancelled {
    background: linear-gradient(135deg, #ffebee, #ffcdd2);
    color: var(--error-color);
    border: 2px solid var(--error-color);
}

.trip-status.status-draft {
    background: linear-gradient(135deg, #f3e5f5, #e1bee7);
    color: #7b1fa2;
    border: 2px solid #7b1fa2;
}

/* Action Buttons */
.trip-action-buttons {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

.boarding-record-button, .loading-record-button {
    display: inline-flex;
    align-items: center;
    padding: 12px 20px;
    border: none;
    border-radius: var(--border-radius);
    font-size: 14px;
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
    transition: var(--transition);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.boarding-record-button {
    background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
    color: white;
    box-shadow: 0 2px 8px rgba(33, 150, 243, 0.3);
}

.boarding-record-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(33, 150, 243, 0.4);
}

.loading-record-button {
    background: linear-gradient(135deg, #ff9800, #f57c00);
    color: white;
    box-shadow: 0 2px 8px rgba(255, 152, 0, 0.3);
}

.loading-record-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(255, 152, 0, 0.4);
}

.boarding-record-button i.material-icons,
.loading-record-button i.material-icons {
    margin-right: 8px;
    font-size: 18px;
}

/* Route Map Section */
.route-map-section .route-map-container {
    padding: 20px;
}

.route-map-placeholder {
    background: linear-gradient(135deg, #f8f9fa, #e9ecef);
    border: 2px dashed var(--border-color);
    border-radius: var(--border-radius);
    padding: 40px 20px;
    text-align: center;
    color: var(--text-light);
}

.route-map-placeholder i.material-icons {
    font-size: 48px;
    color: var(--primary-color);
    margin-bottom: 10px;
    display: block;
}

.route-map-placeholder p {
    margin: 10px 0;
    font-size: 16px;
    font-weight: 500;
}

.route-details {
    display: flex;
    justify-content: center;
    gap: 30px;
    margin-top: 15px;
    flex-wrap: wrap;
}

.route-details span {
    display: flex;
    align-items: center;
    font-size: 14px;
    color: var(--text-color);
}

.route-details span i.material-icons {
    margin-right: 6px;
    font-size: 16px;
    color: var(--primary-color);
}

/* Responsive Design */
@media (max-width: 768px) {
    .metadata-row {
        grid-template-columns: 1fr;
        gap: 10px;
    }
    
    .trip-header {
        flex-direction: column;
        align-items: stretch;
        text-align: center;
    }
    
    .trip-action-buttons {
        justify-content: center;
    }
    
    .data-table {
        font-size: 12px;
    }
    
    .data-table thead th,
    .data-table tbody td {
        padding: 10px 8px;
    }
    
    .route-details {
        flex-direction: column;
        gap: 10px;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 10px;
    }
    
    .trip-section h3 {
        font-size: 16px;
        padding: 12px 15px;
    }
    
    .metadata-grid {
        padding: 15px;
    }
    
    .metadata-item {
        padding: 10px;
    }
    
    .boarding-record-button, .loading-record-button {
        padding: 10px 16px;
        font-size: 13px;
    }
}


/* Connection and Sync Indicators */
.connection-indicator {
    position: fixed;
    top: 20px;
    right: 20px;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    z-index: 1000;
    transition: all 0.3s ease;
    cursor: pointer;
}

.connection-indicator.online {
    background-color: #4CAF50;
    box-shadow: 0 0 8px rgba(76, 175, 80, 0.4);
}

.connection-indicator.offline {
    background-color: #FF9800;
    box-shadow: 0 0 8px rgba(255, 152, 0, 0.4);
}

#sync-indicator {
    position: fixed;
    top: 20px;
    right: 40px;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background-color: #2196F3;
    opacity: 0;
    z-index: 999;
    transition: all 0.3s ease;
    transform: scale(1);
}

/* Seamless update animations */
.trip-item {
    transition: all 0.3s ease;
}

.trip-item.updating {
    opacity: 0.8;
    transform: translateX(2px);
}

/* Subtle loading states */
.silent-loading {
    position: relative;
}

.silent-loading::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(90deg, transparent, #2196F3, transparent);
    animation: silent-progress 2s infinite;
    opacity: 0.3;
}

@keyframes silent-progress {
    0% { transform: translateX(-100%); }
    100% { transform: translateX(100%); }
}

/* Mobile optimizations */
@media (max-width: 768px) {
    .connection-indicator {
        top: 15px;
        right: 15px;
        width: 10px;
        height: 10px;
    }
    
    #sync-indicator {
        top: 15px;
        right: 30px;
        width: 6px;
        height: 6px;
    }
}

