/* BusFleet Pro - Professional Corporate Theme */
@import url('landing.css');
:root {
    --primary-blue: #1e40af;
    --secondary-blue: #3b82f6;
    --accent-blue: #60a5fa;
    --dark-blue: #1e3a8a;
    --white: #ffffff;
    --light-gray: #f8fafc;
    --medium-gray: #e2e8f0;
    --dark-gray: #64748b;
    --text-dark: #0f172a;
    --success: #10b981;
    --warning: #f59e0b;
    --danger: #ef4444;
    --coach-gold: #d97706;
    --highway-blue: #1e40af;
    --comfort-green: #059669;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', 'Arial', sans-serif;
    background: var(--light-gray);
    color: var(--text-dark);
    min-height: 100vh;
    line-height: 1.6;
}

.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 20px;
}

/* Header */
.header {
    background: var(--white);
    padding: 25px 0;
    margin-bottom: 30px;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    border-left: 4px solid var(--primary-blue);
}

.header-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 20px;
}

.logo-section {
    display: flex;
    align-items: center;
    gap: 15px;
}

.company-logo {
    width: 60px;
    height: 60px;
    background: var(--primary-blue);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    color: var(--white);
    font-weight: bold;
}

.header h1 {
    font-size: 2rem;
    font-weight: 600;
    color: var(--primary-blue);
    margin: 0;
}

.header .tagline {
    font-size: 0.9rem;
    color: var(--dark-gray);
    margin: 0;
    font-weight: 400;
}

.header-info {
    text-align: right;
    font-size: 0.85rem;
    color: var(--dark-gray);
}

.header-info .company-reg {
    font-weight: 600;
    color: var(--primary-blue);
}

/* Navigation */
.nav {
    background: var(--white);
    padding: 0;
    margin: 0 0 30px 0;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    overflow: hidden;
}

.nav-container {
    display: flex;
    justify-content: center;
    max-width: 1400px;
    margin: 0 auto;
}

.nav-btn {
    background: transparent;
    color: var(--dark-gray);
    padding: 16px 32px;
    border: none;
    cursor: pointer;
    font-weight: 500;
    transition: all 0.2s ease;
    text-decoration: none;
    display: inline-block;
    border-bottom: 3px solid transparent;
    font-size: 0.95rem;
}

.nav-btn:hover {
    background: var(--light-gray);
    color: var(--primary-blue);
}

.nav-btn.active {
    background: var(--light-gray);
    color: var(--primary-blue);
    border-bottom-color: var(--primary-blue);
    font-weight: 600;
}

/* Cards */
.card {
    background: var(--white);
    border-radius: 8px;
    padding: 25px;
    margin-bottom: 25px;
    border: 1px solid var(--medium-gray);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.card h2 {
    color: var(--primary-blue);
    margin-bottom: 20px;
    font-size: 1.4rem;
    font-weight: 600;
    border-bottom: 2px solid var(--medium-gray);
    padding-bottom: 10px;
}

/* Grid Layout */
.grid {
    display: grid;
    gap: 25px;
    margin-bottom: 30px;
}

.grid-2 { grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); }
.grid-3 { grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); }
.grid-4 { grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); }

/* Stats Cards */
.stat-card {
    background: var(--white);
    color: var(--text-dark);
    padding: 25px;
    border-radius: 8px;
    text-align: center;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    border: 1px solid var(--medium-gray);
    border-left: 4px solid var(--secondary-blue);
}

.stat-value {
    font-size: 2.2rem;
    font-weight: 700;
    margin-bottom: 8px;
    color: var(--primary-blue);
}

.stat-label {
    font-size: 0.9rem;
    color: var(--dark-gray);
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Tables */
.table-container {
    overflow-x: auto;
    border-radius: 8px;
    background: var(--white);
    border: 1px solid var(--medium-gray);
}

table {
    width: 100%;
    border-collapse: collapse;
}

th, td {
    padding: 12px 15px;
    text-align: left;
    border-bottom: 1px solid var(--medium-gray);
}

th {
    background: var(--light-gray);
    font-weight: 600;
    color: var(--primary-blue);
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

tr:hover {
    background: var(--light-gray);
}

td {
    color: var(--text-dark);
    font-size: 0.9rem;
}

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

.status.active { 
    background: #dcfce7; 
    color: var(--success); 
    border: 1px solid var(--success);
}
.status.maintenance { 
    background: #fef3c7; 
    color: var(--warning); 
    border: 1px solid var(--warning);
}
.status.offline { 
    background: #f1f5f9; 
    color: var(--dark-gray); 
    border: 1px solid var(--dark-gray);
}

/* Progress Bars */
.progress {
    background: var(--medium-gray);
    border-radius: 4px;
    height: 6px;
    overflow: hidden;
    margin: 8px 0;
}

.progress-bar {
    background: var(--secondary-blue);
    height: 100%;
    border-radius: 4px;
    transition: width 0.3s ease;
}

/* Live Map */
.map-container {
    height: 400px;
    border-radius: 8px;
    overflow: hidden;
    background: var(--light-gray);
    position: relative;
    border: 1px solid var(--medium-gray);
}

#liveMap {
    width: 100%;
    height: 100%;
}

/* Achievements */
.achievement {
    display: inline-block;
    background: #fef3c7;
    color: var(--warning);
    border: 1px solid var(--warning);
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 600;
    margin: 2px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Search and Filter */
.search-container {
    margin-bottom: 20px;
}

.search-input {
    background: var(--white);
    border: 1px solid var(--medium-gray);
    border-radius: 6px;
    padding: 10px 16px;
    color: var(--text-dark);
    width: 100%;
    max-width: 300px;
    font-size: 0.9rem;
}

.search-input::placeholder {
    color: var(--dark-gray);
}

.search-input:focus {
    outline: none;
    border-color: var(--secondary-blue);
    box-shadow: 0 0 0 2px rgba(0, 102, 204, 0.1);
}

/* Professional Coach Service Cards */
.trip-card {
    background: var(--white);
    border: 1px solid var(--medium-gray);
    border-radius: 12px;
    padding: 25px;
    margin-bottom: 20px;
    border-left: 5px solid var(--highway-blue);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    transition: all 0.3s ease;
}

.trip-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.12);
}

.trip-header {
    display: flex;
    justify-content: between;
    align-items: center;
    margin-bottom: 15px;
}

.trip-title {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--primary-blue);
}

.trip-status {
    font-size: 0.8rem;
    padding: 4px 8px;
    border-radius: 4px;
    background: #dcfce7;
    color: var(--success);
    font-weight: 600;
}

/* Responsive Design */
@media (max-width: 768px) {
    .container {
        padding: 15px;
    }
    
    .header-content {
        flex-direction: column;
        gap: 15px;
        text-align: center;
    }
    
    .nav-container {
        flex-direction: column;
    }
    
    .nav-btn {
        border-bottom: none;
        border-left: 3px solid transparent;
    }
    
    .nav-btn.active {
        border-left-color: var(--primary-blue);
    }
    
    .grid-2, .grid-3, .grid-4 {
        grid-template-columns: 1fr;
    }
    
    th, td {
        padding: 8px;
        font-size: 0.85rem;
    }
}

/* Loading Animation */
.loading {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid var(--medium-gray);
    border-radius: 50%;
    border-top-color: var(--secondary-blue);
    animation: spin 1s ease-in-out infinite;
}

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

/* Alert Messages */
.alert {
    padding: 15px;
    border-radius: 6px;
    margin-bottom: 20px;
    font-weight: 500;
    border-left: 4px solid;
}

.alert.success {
    background: #dcfce7;
    border-left-color: var(--success);
    color: var(--success);
}

.alert.warning {
    background: #fef3c7;
    border-left-color: var(--warning);
    color: var(--warning);
}

.alert.danger {
    background: #fee2e2;
    border-left-color: var(--danger);
    color: var(--danger);
}

/* Telemetry Status Indicators */
.connection-status {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.9rem;
    font-weight: 500;
}

.status-indicator {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    display: inline-block;
    position: relative;
}

.status-indicator.online {
    background: var(--success);
    box-shadow: 0 0 0 2px rgba(5, 150, 105, 0.2);
}

.status-indicator.offline {
    background: var(--dark-gray);
    box-shadow: 0 0 0 2px rgba(71, 85, 105, 0.2);
}

.status-indicator.error {
    background: var(--danger);
    box-shadow: 0 0 0 2px rgba(220, 38, 38, 0.2);
}

.status-indicator.online::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 6px;
    height: 6px;
    background: var(--success);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% {
        transform: translate(-50%, -50%) scale(1);
        opacity: 1;
    }
    70% {
        transform: translate(-50%, -50%) scale(1.4);
        opacity: 0;
    }
    100% {
        transform: translate(-50%, -50%) scale(1);
        opacity: 0;
    }
}

/* Telemetry Stats */
.telemetry-stat {
    text-align: center;
    padding: 15px;
    background: var(--light-gray);
    border-radius: 6px;
    border: 1px solid var(--medium-gray);
}

.telemetry-stat .stat-value {
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--primary-blue);
    margin-bottom: 5px;
}

.telemetry-stat .stat-label {
    font-size: 0.8rem;
    color: var(--dark-gray);
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Trip Status Variations */
.trip-status.idle {
    background: #fef3c7;
    color: var(--warning);
    border: 1px solid var(--warning);
}

.trip-status.driving {
    background: #dcfce7;
    color: var(--success);
    border: 1px solid var(--success);
}

/* Text Color Utilities */
.text-success { color: var(--success) !important; }
.text-warning { color: var(--warning) !important; }
.text-danger { color: var(--danger) !important; }

/* Coach-Specific Styles */
.coach-route {
    background: linear-gradient(135deg, var(--highway-blue) 0%, var(--secondary-blue) 100%);
    color: white;
    padding: 8px 16px;
    border-radius: 20px;
    font-weight: 600;
    font-size: 0.9rem;
    display: inline-block;
    margin: 2px;
}

.comfort-badge {
    background: var(--comfort-green);
    color: white;
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 600;
    display: inline-block;
    margin: 2px;
}

.highway-indicator {
    background: var(--dark-blue);
    color: white;
    padding: 2px 8px;
    border-radius: 4px;
    font-family: monospace;
    font-weight: bold;
    font-size: 0.8rem;
}

.service-class {
    background: var(--coach-gold);
    color: white;
    padding: 3px 10px;
    border-radius: 15px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.amenity-icon {
    display: inline-block;
    margin: 0 3px;
    font-size: 1.1rem;
    opacity: 0.8;
}

/* Telemetry Controls */
.telemetry-controls {
    background: var(--light-gray);
    padding: 15px;
    border-radius: 6px;
    border: 1px solid var(--medium-gray);
}

