:root {
    --primary: #006aff;
    --primary-light: #e6f0ff;
    --text-dark: #1a1b25;
    --text-light: #6e7687;
    --bg-color: #f7f9fc;
    --white: #ffffff;
    --border: #eef0f6;
    
    --success: #10b981;
    --success-bg: #e6f8f0;
    --warning: #f59e0b;
    --warning-bg: #fef3c7;
    --danger: #ef4444;
    --danger-bg: #fee2e2;
    --info: #3b82f6;
    --info-bg: #eff6ff;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Inter', -apple-system, sans-serif;
    -webkit-tap-highlight-color: transparent;
}

body {
    background-color: var(--bg-color);
    color: var(--text-dark);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

#app {
    flex: 1;
    overflow-y: auto;
    padding-bottom: 80px; /* Space for bottom nav */
}

/* Utilities */
.hidden { display: none !important; }
.flex { display: flex; }
.flex-col { display: flex; flex-direction: column; }
.items-center { align-items: center; }
.justify-between { justify-content: space-between; }
.justify-center { justify-content: center; }
.gap-1 { gap: 4px; }
.gap-2 { gap: 8px; }
.gap-3 { gap: 12px; }
.gap-4 { gap: 16px; }
.w-full { width: 100%; }
.font-bold { font-weight: 700; }
.font-semibold { font-weight: 600; }
.text-sm { font-size: 14px; }
.text-xs { font-size: 12px; }
.text-light { color: var(--text-light); }
.mt-2 { margin-top: 8px; }
.mt-4 { margin-top: 16px; }
.mt-6 { margin-top: 24px; }
.mb-2 { margin-bottom: 8px; }
.mb-4 { margin-bottom: 16px; }

/* Bottom Navigation */
.bottom-nav {
    position: fixed;
    bottom: 24px;
    left: 50%;
    transform: translateX(-50%);
    width: 90%;
    max-width: 400px;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.7) 0%, rgba(255, 255, 255, 0.3) 100%);
    backdrop-filter: blur(20px) saturate(150%);
    -webkit-backdrop-filter: blur(20px) saturate(150%);
    display: flex;
    justify-content: space-around;
    padding: 16px 24px;
    border: 1px solid rgba(255, 255, 255, 0.8);
    border-bottom: 1px solid rgba(255, 255, 255, 0.3);
    border-right: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 40px;
    box-shadow: 0 8px 32px rgba(31, 38, 135, 0.1), inset 0 1px 2px rgba(255, 255, 255, 0.8);
    z-index: 100;
}

.nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-decoration: none;
    color: #a0a0a0;
    gap: 6px;
    position: relative;
    transition: all 0.3s ease;
}

.nav-item i {
    font-size: 26px;
    color: #a0a0a0;
    transition: all 0.3s ease;
}

.nav-item span {
    font-size: 12px;
    font-weight: 500;
    transition: all 0.3s ease;
}

.nav-item.active {
    color: #000000;
}

.nav-item.active i {
    color: #000000;
}

.nav-item.active span {
    font-weight: 700;
    color: #000000;
}

.nav-item .badge {
    position: absolute;
    top: -2px;
    right: 8px;
    width: 8px;
    height: 8px;
    background-color: var(--danger);
    border-radius: 50%;
    border: 2px solid var(--white);
}

/* Cards */
.card {
    background: var(--white);
    border-radius: 16px;
    padding: 16px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.02);
    border: 1px solid var(--border);
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 14px 24px;
    border-radius: 30px;
    font-weight: 600;
    font-size: 16px;
    border: none;
    cursor: pointer;
    transition: all 0.2s;
    text-decoration: none;
}

.btn-primary {
    background: var(--primary);
    color: var(--white);
    width: 100%;
}

.btn-primary:active {
    transform: scale(0.98);
}

.btn-outline {
    background: transparent;
    color: var(--primary);
    border: 1px solid var(--primary-light);
    background-color: var(--primary-light);
    padding: 8px 16px;
    border-radius: 8px;
    font-size: 13px;
}

/* Header */
.screen-header {
    padding: 24px 20px 16px;
    background: rgba(247, 249, 252, 0.82);
    backdrop-filter: blur(20px) saturate(180%);
    -webkit-backdrop-filter: blur(20px) saturate(180%);
    border-bottom: 1px solid rgba(238, 240, 246, 0.8);
    position: sticky;
    top: 0;
    z-index: 50;
}

.screen-header h1 {
    font-size: 28px;
    font-weight: 800;
    letter-spacing: -0.5px;
    line-height: 1.2;
    color: var(--text-dark);
    margin: 0;
}

.screen-header p {
    color: var(--text-light);
    font-size: 14px;
    font-weight: 500;
    line-height: 1.4;
    margin-top: 4px;
    margin-bottom: 0;
}

/* Inputs */
.input-group {
    position: relative;
    margin-bottom: 16px;
}

.input-group i {
    position: absolute;
    left: 16px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-light);
    font-size: 20px;
}

.input-group input {
    width: 100%;
    padding: 16px 16px 16px 48px;
    border-radius: 12px;
    border: 1px solid var(--border);
    background: var(--white);
    font-size: 15px;
    outline: none;
    color: var(--text-dark);
}

.input-group input::placeholder {
    color: #a0a5b1;
}

.input-group input:focus {
    border-color: var(--primary);
}

.input-group .right-icon {
    left: auto;
    right: 16px;
    cursor: pointer;
}

/* Search bar */
.search-bar {
    background: var(--white);
    padding: 12px 16px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    gap: 12px;
    border: 1px solid var(--border);
}
.search-bar i { color: var(--text-light); font-size: 20px; }
.search-bar input {
    border: none;
    outline: none;
    width: 100%;
    font-size: 15px;
}

/* Status Badges */
.status-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
}
.status-moving { background: var(--success-bg); color: var(--success); }
.status-idle { background: var(--warning-bg); color: var(--warning); }
.status-offline { background: var(--danger-bg); color: var(--danger); }
.status-info { background: var(--info-bg); color: var(--info); }

.status-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
}
.dot-moving { background: var(--success); }
.dot-idle { background: var(--warning); }
.dot-offline { background: var(--danger); }

/* List Item */
.list-item {
    display: flex;
    align-items: center;
    padding: 16px 20px;
    background: var(--white);
    border-bottom: 1px solid var(--border);
    gap: 16px;
    cursor: pointer;
    transition: background-color 0.15s ease;
}
.list-item:hover { background-color: #f8fafc; }
.list-item:active { background: var(--bg-color); }
.list-icon-bg {
    width: 50px;
    height: 50px;
    border-radius: 12px;
    background: var(--bg-color);
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid var(--border);
}
.list-icon-bg img { width: 36px; height: 36px; object-fit: contain; }
.list-content { flex: 1; }
.list-title { font-weight: 600; font-size: 15px; color: var(--text-dark); display: flex; align-items: center; justify-content: space-between; }
.list-subtitle { font-size: 13px; color: var(--text-light); margin-top: 4px; display: flex; align-items: center; gap: 4px; }
.list-right { display: flex; flex-direction: column; align-items: flex-end; gap: 4px; }

/* Filter Chips */
.filter-scroll {
    display: flex;
    gap: 10px;
    overflow-x: auto;
    padding: 16px 20px;
    scrollbar-width: none;
}
.filter-scroll::-webkit-scrollbar { display: none; }
.chip {
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 500;
    white-space: nowrap;
    border: 1px solid var(--border);
    background: var(--white);
    color: var(--text-light);
    display: flex;
    align-items: center;
    gap: 6px;
}
.chip.active {
    background: var(--primary);
    color: var(--white);
    border-color: var(--primary);
}
.chip .dot { width: 8px; height: 8px; border-radius: 50%; }

/* Stats grid */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 12px;
    padding: 0 20px;
}
.stat-card {
    position: relative;
    border-radius: 12px;
    padding: 12px 10px;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    border: 1px solid rgba(255,255,255,0.6);
    overflow: hidden;
    box-shadow: 0 4px 12px rgba(0,0,0,0.02);
}

.stat-card.blue { background: linear-gradient(135deg, #f0f7ff 0%, #e0f0ff 100%); border-color: #dbeafe; }
.stat-card.green { background: linear-gradient(135deg, #f0fdf4 0%, #dcfce7 100%); border-color: #bbf7d0; }
.stat-card.orange { background: linear-gradient(135deg, #fffbeb 0%, #fef3c7 100%); border-color: #fde68a; }
.stat-card.red { background: linear-gradient(135deg, #fef2f2 0%, #fee2e2 100%); border-color: #fecaca; }

.stat-icon-wrap {
    width: 28px;
    height: 28px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 10px;
    color: white;
    z-index: 2;
    box-shadow: 0 4px 10px rgba(0,0,0,0.1);
}

.stat-card.blue .stat-icon-wrap { background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%); }
.stat-card.green .stat-icon-wrap { background: linear-gradient(135deg, #22c55e 0%, #16a34a 100%); }
.stat-card.orange .stat-icon-wrap { background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%); }
.stat-card.red .stat-icon-wrap { background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%); }

.stat-icon-wrap i { font-size: 14px; }

.stat-val {
    font-size: 20px;
    font-weight: 800;
    color: #111827;
    z-index: 2;
    line-height: 1.1;
    margin-bottom: 2px;
}

.stat-label {
    font-size: 11px;
    font-weight: 600;
    color: #6b7280;
    z-index: 2;
    line-height: 1.2;
}

.stat-bg-icon {
    position: absolute;
    bottom: -8px;
    right: -8px;
    font-size: 56px;
    opacity: 0.1;
    z-index: 1;
    transform: rotate(-15deg);
}

.stat-card.blue .stat-bg-icon { color: #2563eb; }
.stat-card.green .stat-bg-icon { color: #16a34a; }
.stat-card.orange .stat-bg-icon { color: #d97706; }
.stat-card.red .stat-bg-icon { color: #dc2626; }
.stat-green .stat-badge { background: #dcfce7; color: var(--success); }
.stat-orange .stat-badge { background: #fef3c7; color: var(--warning); }
.stat-red .stat-badge { background: #fee2e2; color: var(--danger); }

/* Tabs */
.tabs-container {
    display: flex;
    background: var(--white);
    border-radius: 12px;
    padding: 4px;
    margin: 20px;
    border: 1px solid var(--border);
}
.tab {
    flex: 1;
    text-align: center;
    padding: 10px;
    border-radius: 8px;
    font-weight: 600;
    font-size: 14px;
    color: var(--text-light);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}
.tab.active {
    background: var(--primary);
    color: var(--white);
}

/* Home Header Graphics */
.home-header {
    background-color: #ffffff;
    background-image: linear-gradient(90deg, rgba(255, 255, 255, 0.94) 0%, rgba(255, 255, 255, 0.72) 40%, rgba(255, 255, 255, 0) 80%), url('Minimalist%203D%20Navigation%20Roadscape.png');
    background-position: right bottom;
    background-repeat: no-repeat;
    background-size: cover;
    padding: 38px 24px 34px;
    position: relative;
    overflow: hidden;
    border-bottom: 1px solid var(--border);
}

.header-top { display: flex; justify-content: space-between; align-items: flex-start; position: relative; z-index: 2; }
.header-title { font-size: 28px; font-weight: 800; color: var(--text-dark); margin-top: 4px; }
.header-greeting { font-size: 18px; color: var(--text-light); font-weight: 500; }
.header-subtitle { font-size: 12px; color: var(--text-light); margin-top: 8px; letter-spacing: 0.5px; }
.notif-btn { width: 44px; height: 44px; border-radius: 50%; background: var(--white); display: flex; align-items: center; justify-content: center; box-shadow: 0 4px 12px rgba(0,0,0,0.05); position: relative; border: none; }
.notif-btn i { font-size: 24px; color: var(--text-dark); }
.notif-btn .badge { position: absolute; top: 10px; right: 12px; width: 8px; height: 8px; background: var(--danger); border-radius: 50%; border: 2px solid var(--white); }

/* Login Screen */
.login-screen {
    min-height: 100vh;
    background: linear-gradient(180deg, #ffffff 0%, #f0f7ff 100%);
    display: flex;
    flex-direction: column;
    padding: 0 24px;
    position: relative;
    overflow: hidden;
}
.login-screen::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 30vh;
    background-image: url('Smart%20City%20Transit%20Tracking.png');
    background-size: cover;
    background-position: bottom;
    z-index: 0;
    pointer-events: none;
    mix-blend-mode: multiply;
    -webkit-mask-image: linear-gradient(to top, rgba(0,0,0,1) 0%, rgba(0,0,0,0) 100%);
    mask-image: linear-gradient(to top, rgba(0,0,0,1) 0%, rgba(0,0,0,0) 100%);
}
.login-content {
    position: relative;
    z-index: 10;
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding-bottom: 20vh;
}
.logo-container {
    text-align: center;
    margin-bottom: 40px;
}
.logo-icon {
    width: 80px;
    margin: 0 auto 16px;
    color: var(--primary);
}
.logo-text {
    font-size: 36px;
    font-weight: 800;
    letter-spacing: -1px;
}
.logo-text .blue { color: var(--primary); }
.logo-text .dark { color: #1a1a24; }
.logo-subtitle {
    font-size: 11px;
    font-weight: 600;
    color: var(--text-light);
    letter-spacing: 2px;
    margin-top: 8px;
    text-transform: uppercase;
}
.login-links {
    display: flex;
    justify-content: space-between;
    margin: 16px 0 32px;
}
.login-links a {
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
}
.link-primary { color: var(--primary); font-weight: 600; }
.link-secondary { color: var(--text-light); }

/* Profile Screen & School Institution Styles */
.profile-screen-container {
    padding-bottom: 24px;
}

/* Modern Native Profile Card Component */
.profile-card {
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 18px 20px;
    margin: 0 20px 16px;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.02);
}

.profile-card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 14px;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--border);
}

.profile-card-title {
    font-size: 14px;
    font-weight: 700;
    color: var(--text-dark);
    display: flex;
    align-items: center;
    gap: 8px;
}

.profile-card-title i {
    color: var(--primary);
    font-size: 18px;
}

.profile-info-row {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    padding: 9px 0;
    border-bottom: 1px solid #f8fafc;
    font-size: 13px;
    gap: 16px;
}

.profile-info-row:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

.profile-info-label {
    color: var(--text-light);
    font-weight: 500;
    flex-shrink: 0;
}

.profile-info-value {
    color: var(--text-dark);
    font-weight: 600;
    text-align: right;
    word-break: break-word;
}

.profile-avatar {
    width: 52px;
    height: 52px;
    border-radius: 50%;
    background: #e6f0ff;
    color: var(--primary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    font-weight: 800;
    flex-shrink: 0;
    border: 1px solid #cce0ff;
}

.school-hero-card {
    background: linear-gradient(135deg, #1e293b 0%, #0f172a 100%);
    color: var(--white);
    border-radius: 20px;
    margin: 0 20px 20px;
    padding: 24px 20px;
    position: relative;
    overflow: hidden;
    box-shadow: 0 10px 25px -5px rgba(15, 23, 42, 0.25);
}

.school-hero-card::before {
    content: '';
    position: absolute;
    top: -40px;
    right: -40px;
    width: 140px;
    height: 140px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(16, 185, 129, 0.25) 0%, rgba(16, 185, 129, 0) 70%);
    pointer-events: none;
}

.school-hero-header {
    display: flex;
    align-items: flex-start;
    gap: 16px;
    margin-bottom: 18px;
}

.school-crest-icon {
    width: 58px;
    height: 58px;
    border-radius: 16px;
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 32px;
    color: #ffffff;
    box-shadow: 0 6px 16px rgba(16, 185, 129, 0.35);
    flex-shrink: 0;
}

.school-hero-meta {
    flex: 1;
}

.school-name-title {
    font-size: 20px;
    font-weight: 800;
    line-height: 1.25;
    color: #ffffff;
    margin-bottom: 6px;
}

.school-sub-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: rgba(255, 255, 255, 0.12);
    backdrop-filter: blur(8px);
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 600;
    color: #94a3b8;
    letter-spacing: 0.3px;
}

.school-sub-badge .dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: #10b981;
    display: inline-block;
    box-shadow: 0 0 8px #10b981;
}

.school-stats-row {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
    padding-top: 16px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.school-stat-pill {
    background: rgba(255, 255, 255, 0.07);
    border-radius: 12px;
    padding: 10px 12px;
    display: flex;
    align-items: center;
    gap: 10px;
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.school-stat-pill i {
    font-size: 20px;
    color: #38bdf8;
}

.school-stat-pill.emerald i { color: #34d399; }
.school-stat-pill.amber i { color: #fbbf24; }
.school-stat-pill.purple i { color: #c084fc; }

.school-stat-content {
    display: flex;
    flex-direction: column;
}

.school-stat-val {
    font-size: 14px;
    font-weight: 700;
    color: #ffffff;
}

.school-stat-lbl {
    font-size: 11px;
    color: #94a3b8;
    font-weight: 500;
}

/* Campus Switcher */
.campus-switcher-section {
    padding: 0 20px;
    margin-bottom: 20px;
}

.campus-switcher-label {
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--text-light);
    margin-bottom: 8px;
    display: flex;
    align-items: center;
    gap: 6px;
}

.campus-pills-row {
    display: flex;
    gap: 8px;
    overflow-x: auto;
    padding-bottom: 4px;
    scrollbar-width: none;
}

.campus-pills-row::-webkit-scrollbar {
    display: none;
}

.campus-pill-btn {
    padding: 8px 14px;
    border-radius: 20px;
    background: var(--white);
    border: 1.5px solid var(--border);
    color: var(--text-dark);
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    white-space: nowrap;
    display: flex;
    align-items: center;
    gap: 6px;
    transition: all 0.2s ease;
}

.campus-pill-btn:hover {
    border-color: #cbd5e1;
    background: #f8fafc;
}

.campus-pill-btn.active {
    background: var(--primary);
    color: #ffffff;
    border-color: var(--primary);
    box-shadow: 0 4px 12px rgba(0, 102, 255, 0.2);
}

.campus-pill-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
}

/* Section Cards */
.profile-section-card {
    background: var(--white);
    border-radius: 18px;
    padding: 20px;
    margin: 0 20px 20px;
    border: 1px solid var(--border);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.02);
}

.profile-section-card:hover {
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.04);
}

.section-card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 16px;
    padding-bottom: 12px;
    border-bottom: 1px solid #f1f5f9;
}

.section-card-title-wrap {
    display: flex;
    align-items: center;
    gap: 10px;
}

.section-card-icon {
    width: 36px;
    height: 36px;
    border-radius: 10px;
    background: #f1f5f9;
    color: #0f172a;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
}

.section-card-icon.blue { background: #eff6ff; color: #2563eb; }
.section-card-icon.emerald { background: #ecfdf5; color: #059669; }
.section-card-icon.amber { background: #fffbeb; color: #d97706; }
.section-card-icon.purple { background: #faf5ff; color: #9333ea; }
.section-card-icon.rose { background: #fff1f2; color: #e11d48; }

.section-card-title {
    font-size: 16px;
    font-weight: 700;
    color: var(--text-dark);
}

.section-badge {
    font-size: 11px;
    font-weight: 700;
    padding: 3px 8px;
    border-radius: 6px;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

.section-badge.live {
    background: #dcfce7;
    color: #15803d;
}

.details-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

.details-grid.single-col {
    grid-template-columns: 1fr;
}

.detail-field {
    display: flex;
    flex-direction: column;
    gap: 3px;
}

.detail-label {
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.4px;
    color: var(--text-light);
}

.detail-value {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-dark);
    word-break: break-word;
}

.detail-link {
    color: var(--primary);
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-weight: 600;
    transition: color 0.15s;
}

.detail-link:hover {
    color: #0050cc;
    text-decoration: underline;
}

/* Emergency Box */
.emergency-sos-box {
    margin-top: 14px;
    background: #fef2f2;
    border: 1.5px solid #fee2e2;
    border-radius: 14px;
    padding: 12px 14px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.emergency-sos-left {
    display: flex;
    align-items: center;
    gap: 10px;
}

.emergency-icon-wrap {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: #fee2e2;
    color: #dc2626;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    flex-shrink: 0;
}

.emergency-title {
    font-size: 12px;
    font-weight: 700;
    color: #991b1b;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

.emergency-phone {
    font-size: 14px;
    font-weight: 700;
    color: #dc2626;
    text-decoration: none;
    margin-top: 1px;
    display: block;
}

.btn-emergency-call {
    background: #dc2626;
    color: #ffffff;
    text-decoration: none;
    padding: 8px 14px;
    border-radius: 8px;
    font-size: 12px;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 6px;
    box-shadow: 0 2px 8px rgba(220, 38, 38, 0.25);
    white-space: nowrap;
}

/* Assigned Buses Grid */
.assigned-buses-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-top: 10px;
}

.assigned-bus-item {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 12px 14px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    transition: all 0.2s;
    cursor: pointer;
}

.assigned-bus-item:hover {
    background: #f1f5f9;
    border-color: #cbd5e1;
    transform: translateY(-1px);
}

.bus-left-info {
    display: flex;
    align-items: center;
    gap: 12px;
}

.bus-badge-icon {
    width: 38px;
    height: 38px;
    border-radius: 10px;
    background: #fef3c7;
    color: #d97706;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
}

.bus-reg-name {
    font-size: 14px;
    font-weight: 700;
    color: var(--text-dark);
}

.bus-sub-route {
    font-size: 12px;
    color: var(--text-light);
    margin-top: 2px;
    display: flex;
    align-items: center;
    gap: 4px;
}

.bus-right-telemetry {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 4px;
}

/* User Account Profile Card */
.user-account-header {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-bottom: 16px;
}

.user-avatar-lg {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: linear-gradient(135deg, #3b82f6 0%, #1d4ed8 100%);
    color: #ffffff;
    font-size: 20px;
    font-weight: 800;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.25);
    flex-shrink: 0;
}

.user-info-text h3 {
    font-size: 17px;
    font-weight: 700;
    color: var(--text-dark);
    margin-bottom: 4px;
}

.user-role-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 11px;
    font-weight: 700;
    padding: 3px 8px;
    border-radius: 6px;
    background: #eff6ff;
    color: #2563eb;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Logout Container & Button */
.logout-container-card {
    background: #ffffff;
    border-radius: 18px;
    margin: 0 20px 24px;
    padding: 20px;
    border: 1px solid #fee2e2;
    box-shadow: 0 4px 15px rgba(239, 68, 68, 0.05);
}

.logout-info-text {
    font-size: 13px;
    color: #64748b;
    margin-bottom: 16px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.logout-info-text i {
    font-size: 18px;
    color: #ef4444;
}

.btn-logout-main {
    width: 100%;
    background: #ffffff;
    color: #ef4444;
    border: 1.5px solid #fee2e2;
    border-radius: 14px;
    padding: 14px 20px;
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: all 0.2s ease;
    box-shadow: 0 1px 3px rgba(239, 68, 68, 0.05);
}

.btn-logout-main:hover {
    background: #fef2f2;
    border-color: #fecaca;
}

.btn-logout-main:active {
    transform: translateY(1px);
    box-shadow: 0 2px 8px rgba(220, 38, 38, 0.2);
}

.btn-logout-main i {
    font-size: 20px;
}

/* Logout Confirmation Modal */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(15, 23, 42, 0.6);
    backdrop-filter: blur(4px);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    z-index: 9999;
    animation: fadeIn 0.2s ease;
}

.modal-content-card {
    background: #ffffff;
    border-radius: 20px;
    width: 100%;
    max-width: 360px;
    padding: 24px;
    text-align: center;
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.2), 0 10px 10px -5px rgba(0, 0, 0, 0.1);
    animation: scaleIn 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.modal-icon-circle {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: #fee2e2;
    color: #dc2626;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 28px;
    margin: 0 auto 16px;
}

.modal-title {
    font-size: 18px;
    font-weight: 800;
    color: #1e293b;
    margin-bottom: 8px;
}

.modal-message {
    font-size: 14px;
    color: #64748b;
    line-height: 1.5;
    margin-bottom: 24px;
}

.modal-actions-row {
    display: flex;
    gap: 12px;
}

.modal-btn-cancel {
    flex: 1;
    background: #f1f5f9;
    color: #475569;
    border: none;
    border-radius: 12px;
    padding: 12px;
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
    transition: background 0.15s;
}

.modal-btn-cancel:hover {
    background: #e2e8f0;
}

.modal-btn-confirm {
    flex: 1;
    background: #dc2626;
    color: #ffffff;
    border: none;
    border-radius: 12px;
    padding: 12px;
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
    transition: background 0.15s;
}

.modal-btn-confirm:hover {
    background: #b91c1c;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes scaleIn {
    from { opacity: 0; transform: scale(0.95); }
    to { opacity: 1; transform: scale(1); }
}

/* Management Modal Forms */
.modal-form-card {
    background: #ffffff;
    border-radius: 20px;
    width: 100%;
    max-width: 440px;
    max-height: 90vh;
    overflow-y: auto;
    padding: 24px;
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.2), 0 10px 10px -5px rgba(0, 0, 0, 0.1);
    animation: scaleIn 0.2s cubic-bezier(0.16, 1, 0.3, 1);
    text-align: left;
}

.modal-form-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 16px;
    padding-bottom: 14px;
    border-bottom: 1px solid var(--border);
}

.modal-form-title {
    font-size: 17px;
    font-weight: 800;
    color: var(--text-dark);
    display: flex;
    align-items: center;
    gap: 8px;
}

.modal-form-close {
    background: #f1f5f9;
    border: none;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: var(--text-dark);
    font-size: 18px;
    transition: background 0.15s;
}

.modal-form-close:hover {
    background: #e2e8f0;
}

.modal-form-group {
    margin-bottom: 13px;
}

.modal-form-label {
    display: block;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.4px;
    color: var(--text-dark);
    margin-bottom: 5px;
}

.modal-form-input, .modal-form-select {
    width: 100%;
    padding: 10px 13px;
    border-radius: 10px;
    border: 1.5px solid var(--border);
    font-size: 13px;
    color: var(--text-dark);
    background: #f8fafc;
    outline: none;
    transition: all 0.15s ease;
    box-sizing: border-box;
    font-family: inherit;
}

.modal-form-input:focus, .modal-form-select:focus {
    border-color: var(--primary);
    background: #ffffff;
    box-shadow: 0 0 0 3px rgba(0, 102, 255, 0.1);
}

.modal-form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
}

.modal-form-hint {
    font-size: 11px;
    color: var(--text-light);
    margin-top: 4px;
}

/* Legacy Support */
.btn-logout {
    margin: 0 20px 24px;
    background: #fee2e2;
    color: var(--danger);
    width: calc(100% - 40px);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 16px;
    border-radius: 12px;
    border: none;
    font-weight: 700;
    font-size: 16px;
    cursor: pointer;
}

/* Fleet additional info */
.fleet-meta {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px dashed var(--border);
}
.meta-item {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 12px;
    font-weight: 600;
}
.meta-item i { font-size: 16px; color: var(--success); }
.meta-item.off i { color: var(--text-light); }
.meta-item.weak i { color: var(--danger); }
.meta-col { display: flex; flex-direction: column; gap: 2px; }
.meta-val { font-size: 12px; font-weight: 600; }
.meta-lbl { font-size: 10px; color: var(--text-light); font-weight: 400; }

/* Map UI Elements */
.map-container {
    position: relative;
    height: 100vh;
    width: 100%;
    background-color: #f0f2f5;
    overflow: hidden;
}
.map-iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: none;
    z-index: 0;
}

/* Liquid Glass Header for Maps */
.map-glass-header {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(20px) saturate(180%);
    -webkit-backdrop-filter: blur(20px) saturate(180%);
    border-bottom: 1px solid rgba(255, 255, 255, 0.65);
    box-shadow: 0 10px 30px -5px rgba(15, 23, 42, 0.08), 0 2px 6px rgba(15, 23, 42, 0.04);
    padding: 22px 20px 14px;
    border-radius: 0 0 26px 26px;
}

.map-header-title {
    font-size: 28px;
    font-weight: 800;
    letter-spacing: -0.5px;
    line-height: 1.2;
    color: var(--text-dark);
    margin: 0;
}

.map-header-subtitle {
    color: var(--text-light);
    font-size: 14px;
    font-weight: 500;
    line-height: 1.4;
    margin-top: 4px;
    margin-bottom: 0;
}

.map-search-bar {
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    padding: 11px 16px;
    border-radius: 14px;
    box-shadow: 0 3px 12px rgba(0, 0, 0, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.9);
    display: flex;
    align-items: center;
    gap: 10px;
    margin-top: 14px;
    margin-bottom: 10px;
    transition: all 0.2s ease;
}

.map-search-bar:focus-within {
    background: #ffffff;
    box-shadow: 0 6px 20px rgba(0, 102, 255, 0.12);
    border-color: rgba(0, 102, 255, 0.35);
}

.map-search-bar input {
    border: none;
    outline: none;
    width: 100%;
    font-size: 14px;
    font-weight: 500;
    background: transparent;
    color: var(--text-dark);
}

.map-overlay-header {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 10;
    padding: 12px 20px 0;
}

.map-controls {
    position: absolute;
    right: 20px;
    bottom: 100px; /* Above floating bottom nav */
    display: flex;
    flex-direction: column;
    gap: 12px;
    z-index: 1000;
}
.map-control-group {
    background: var(--white);
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    display: flex;
    flex-direction: column;
    overflow: hidden;
}
.map-btn {
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: transparent;
    border: none;
    color: var(--text-dark);
    font-size: 20px;
    cursor: pointer;
}
.map-btn:not(:last-child) {
    border-bottom: 1px solid var(--border);
}
.map-btn-standalone {
    background: var(--white);
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

/* Map Markers */
.map-marker {
    position: absolute;
    display: flex;
    flex-direction: column;
    align-items: center;
    transform: translate(-50%, -100%);
    z-index: 5;
    cursor: pointer;
    transition: transform 0.2s;
}
.map-marker:active {
    transform: translate(-50%, -100%) scale(0.95);
}
.marker-pin {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--white);
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 8px rgba(0,0,0,0.15);
    position: relative;
    border: 2px solid white;
}
.marker-pin i {
    font-size: 24px;
    color: #f59e0b;
}
.marker-status-dot {
    position: absolute;
    top: -2px;
    right: -2px;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    border: 2px solid var(--white);
}
.marker-label {
    background: var(--white);
    padding: 4px 8px;
    border-radius: 8px;
    font-size: 11px;
    font-weight: 600;
    box-shadow: 0 2px 6px rgba(0,0,0,0.1);
    margin-top: 4px;
    white-space: nowrap;
    display: flex;
    align-items: center;
    gap: 4px;
}
.marker-label span { color: var(--text-light); font-weight: 500; }

/* User Location Marker */
.user-marker {
    position: absolute;
    width: 24px;
    height: 24px;
    background: #cce4ff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transform: translate(-50%, -50%);
    z-index: 4;
}
.user-marker::after {
    content: '';
    width: 12px;
    height: 12px;
    background: var(--primary);
    border-radius: 50%;
    border: 2px solid white;
}

/* Bottom Sheet / Dialog */
.bottom-sheet {
    display: none;
}
.bottom-sheet.open {
    display: block;
}
.sheet-close {
    position: absolute;
    top: 20px;
    right: 20px;
    font-size: 20px;
    color: var(--text-light);
    cursor: pointer;
}

/* Quick Role Selector on Login */
.demo-roles-container {
    margin-top: 28px;
    padding-top: 20px;
    border-top: 1px dashed #e2e8f0;
    text-align: center;
}

.demo-roles-title {
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--text-light);
    margin-bottom: 12px;
}

.demo-roles-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 8px;
}

.demo-role-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px 12px;
    border-radius: 12px;
    border: 1px solid #e2e8f0;
    background: #ffffff;
    color: var(--text-dark);
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: 0 2px 6px rgba(0,0,0,0.03);
}

.demo-role-btn:hover {
    transform: translateY(-1px);
    border-color: #0066FF;
    background: #f0f7ff;
    color: #0066FF;
    box-shadow: 0 4px 10px rgba(0, 102, 255, 0.12);
}

.demo-role-btn i {
    font-size: 18px;
}

/* Vendor Specific Profile Styles */
.vendor-hero-card {
    background: linear-gradient(135deg, #0f172a 0%, #1e1b4b 60%, #312e81 100%);
    color: var(--white);
    border-radius: 20px;
    margin: 0 20px 20px;
    padding: 24px 20px;
    position: relative;
    overflow: hidden;
    box-shadow: 0 10px 25px -5px rgba(30, 27, 75, 0.35);
}

.vendor-hero-card::before {
    content: '';
    position: absolute;
    top: -50px;
    right: -50px;
    width: 160px;
    height: 160px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(99, 102, 241, 0.3) 0%, rgba(99, 102, 241, 0) 70%);
    pointer-events: none;
}

.partner-contracts-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-top: 10px;
}

.partner-contract-item {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 14px;
    padding: 14px 16px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    transition: all 0.2s ease;
}

.partner-contract-item:hover {
    border-color: #cbd5e1;
    background: #f1f5f9;
}

.contract-left {
    display: flex;
    align-items: center;
    gap: 12px;
}

.contract-school-icon {
    width: 42px;
    height: 42px;
    border-radius: 12px;
    background: #eef2ff;
    color: #4f46e5;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
    flex-shrink: 0;
}

.contract-title {
    font-size: 15px;
    font-weight: 700;
    color: var(--text-dark);
}

.contract-sub {
    font-size: 12px;
    color: var(--text-light);
    margin-top: 2px;
}

/* Driver Specific Profile & Cockpit Styles */
.driver-hero-card {
    background: linear-gradient(135deg, #451a03 0%, #78350f 50%, #b45309 100%);
    color: var(--white);
    border-radius: 20px;
    margin: 0 20px 20px;
    padding: 24px 20px;
    position: relative;
    overflow: hidden;
    box-shadow: 0 10px 25px -5px rgba(120, 53, 15, 0.35);
}

.driver-hero-card::before {
    content: '';
    position: absolute;
    top: -40px;
    right: -40px;
    width: 150px;
    height: 150px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(245, 158, 11, 0.3) 0%, rgba(245, 158, 11, 0) 70%);
    pointer-events: none;
}

.driver-license-card {
    background: linear-gradient(135deg, #fffbeb 0%, #fef3c7 100%);
    border: 1.5px solid #fde68a;
    border-radius: 16px;
    padding: 16px;
    margin-top: 14px;
    position: relative;
    overflow: hidden;
}

.driver-license-card::after {
    content: 'OFFICIAL DRIVING PERMIT';
    position: absolute;
    right: 12px;
    bottom: 8px;
    font-size: 9px;
    font-weight: 800;
    color: rgba(180, 83, 9, 0.25);
    letter-spacing: 1px;
}

.checklist-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 8px;
    margin-top: 10px;
}

.checklist-item {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    padding: 10px 14px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.checklist-name {
    font-size: 13px;
    font-weight: 600;
    color: var(--text-dark);
    display: flex;
    align-items: center;
    gap: 8px;
}

.checklist-status {
    font-size: 11px;
    font-weight: 700;
    color: #15803d;
    background: #dcfce7;
    padding: 3px 8px;
    border-radius: 6px;
    display: flex;
    align-items: center;
    gap: 4px;
}

/* Route Timeline for Driver */
.route-timeline {
    position: relative;
    padding-left: 24px;
    margin-top: 16px;
}

.route-timeline::before {
    content: '';
    position: absolute;
    left: 8px;
    top: 12px;
    bottom: 20px;
    width: 2px;
    background: #e2e8f0;
}

.timeline-stop {
    position: relative;
    margin-bottom: 16px;
}

.timeline-dot {
    position: absolute;
    left: -24px;
    top: 4px;
    width: 14px;
    height: 14px;
    border-radius: 50%;
    background: #ffffff;
    border: 3px solid #94a3b8;
    z-index: 2;
}

.timeline-stop.done .timeline-dot {
    border-color: #10b981;
    background: #10b981;
}

.timeline-stop.active .timeline-dot {
    border-color: #f59e0b;
    background: #f59e0b;
    box-shadow: 0 0 8px rgba(245, 158, 11, 0.6);
}

.timeline-stop-card {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 10px 14px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.stop-name {
    font-size: 13px;
    font-weight: 700;
    color: var(--text-dark);
}

.stop-time {
    font-size: 11px;
    color: var(--text-light);
    margin-top: 2px;
}

/* Admin Specific Profile Styles */
.admin-hero-card {
    background: linear-gradient(135deg, #09090b 0%, #18181b 50%, #27272a 100%);
    color: var(--white);
    border-radius: 20px;
    margin: 0 20px 20px;
    padding: 24px 20px;
    position: relative;
    overflow: hidden;
    box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.35);
}

.admin-hero-card::before {
    content: '';
    position: absolute;
    top: -40px;
    right: -40px;
    width: 150px;
    height: 150px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(59, 130, 246, 0.25) 0%, rgba(59, 130, 246, 0) 70%);
    pointer-events: none;
}

/* Fleet Filter Bar */
.fleet-filter-bar {
    display: flex;
    gap: 8px;
    overflow-x: auto;
    padding: 0 20px 12px;
    scrollbar-width: none;
}

.fleet-filter-bar::-webkit-scrollbar {
    display: none;
}

.fleet-filter-chip {
    padding: 6px 14px;
    border-radius: 20px;
    background: var(--white);
    border: 1px solid var(--border);
    color: var(--text-dark);
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    white-space: nowrap;
    transition: all 0.15s ease;
}

.fleet-filter-chip.active {
    background: var(--primary);
    color: white;
    border-color: var(--primary);
}

/* ========================================================
   LEAFLET LIVE GPS MAP & TELEMETRY STYLES
   ======================================================== */
.leaflet-map-wrapper {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
}

/* Custom Marker Styling & Smooth Live Interpolation */
.custom-leaflet-marker {
    background: transparent !important;
    border: none !important;
}

/* Smooth pin translation when coordinates change */
.leaflet-marker-pane .leaflet-marker-icon {
    transition: transform 0.85s cubic-bezier(0.25, 1, 0.5, 1) !important;
}

.map-marker.leaflet-pinned-marker {
    position: static;
    transform: none;
    cursor: pointer;
    transition: transform 0.2s ease;
}

.map-marker.leaflet-pinned-marker:hover {
    transform: scale(1.08);
}

.marker-pin.moving-pulse {
    animation: marker-glow 2s infinite ease-in-out;
}

@keyframes marker-glow {
    0% {
        box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.7), 0 4px 12px rgba(0, 0, 0, 0.15);
    }
    70% {
        box-shadow: 0 0 0 14px rgba(16, 185, 129, 0), 0 4px 12px rgba(0, 0, 0, 0.15);
    }
    100% {
        box-shadow: 0 0 0 0 rgba(16, 185, 129, 0), 0 4px 12px rgba(0, 0, 0, 0.15);
    }
}

.marker-pin.idle-pulse {
    border-color: #f59e0b;
}

.marker-pin.offline-pin {
    filter: grayscale(0.8);
    opacity: 0.85;
}

/* Live Auto-Refresh Badges & Indicators */
.map-live-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: rgba(16, 185, 129, 0.12);
    border: 1px solid rgba(16, 185, 129, 0.3);
    color: #059669;
    font-size: 11px;
    font-weight: 700;
    padding: 4px 10px;
    border-radius: 20px;
    backdrop-filter: blur(8px);
    transition: all 0.3s ease;
}

.map-live-badge.paused {
    background: rgba(100, 116, 139, 0.12);
    border-color: rgba(100, 116, 139, 0.3);
    color: #475569;
}

.map-live-pulse-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #10b981;
    box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.7);
    animation: live-pulse-anim 1.8s infinite;
}

.map-live-pulse-dot.paused {
    background: #94a3b8;
    animation: none;
    box-shadow: none;
}

@keyframes live-pulse-anim {
    0% {
        box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.7);
    }
    70% {
        box-shadow: 0 0 0 10px rgba(16, 185, 129, 0);
    }
    100% {
        box-shadow: 0 0 0 0 rgba(16, 185, 129, 0);
    }
}

.pin-updated-flash {
    animation: pin-flash 0.9s ease-out;
}

@keyframes pin-flash {
    0% {
        filter: drop-shadow(0 0 12px #3b82f6) brightness(1.3);
    }
    100% {
        filter: none;
    }
}

/* Custom Leaflet Popups */
.leaflet-popup-content-wrapper {
    background: rgba(255, 255, 255, 0.96) !important;
    backdrop-filter: blur(16px) !important;
    -webkit-backdrop-filter: blur(16px) !important;
    border-radius: 18px !important;
    box-shadow: 0 16px 36px -4px rgba(15, 23, 42, 0.22), 0 4px 12px rgba(0, 0, 0, 0.08) !important;
    border: 1px solid rgba(255, 255, 255, 0.8) !important;
    padding: 0 !important;
    overflow: hidden !important;
}

.leaflet-popup-content {
    margin: 14px 18px !important;
    font-family: 'Inter', sans-serif !important;
    line-height: 1.4 !important;
}

.leaflet-popup-tip {
    background: #ffffff !important;
}

.popup-device-title {
    font-size: 15px;
    font-weight: 800;
    color: var(--text-dark);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
}

.popup-device-imei {
    font-size: 11px;
    color: var(--text-light);
    font-family: monospace;
    margin-top: 2px;
}

.popup-metric-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-top: 10px;
    padding-top: 8px;
    border-top: 1px solid #f1f5f9;
}

.popup-metric {
    display: flex;
    flex-direction: column;
}

.popup-metric-val {
    font-size: 13px;
    font-weight: 700;
    color: var(--text-dark);
}

.popup-metric-lbl {
    font-size: 10px;
    color: var(--text-light);
    text-transform: uppercase;
    font-weight: 600;
}

.popup-btn {
    display: block;
    width: 100%;
    margin-top: 12px;
    padding: 8px 12px;
    background: var(--primary);
    color: white;
    font-size: 12px;
    font-weight: 700;
    border-radius: 10px;
    text-align: center;
    cursor: pointer;
    border: none;
    transition: background 0.15s ease;
}

.popup-btn:hover {
    background: #0052cc;
}

/* Tracker Device Specification Badges */
.tracker-spec-badge {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 3px 9px;
    border-radius: 8px;
    font-size: 11px;
    font-weight: 600;
    background: #f1f5f9;
    color: #475569;
}

.tracker-imei-tag {
    font-family: 'SFMono-Regular', Consolas, 'Liberation Mono', Menlo, monospace;
    background: #eff6ff;
    color: #1d4ed8;
    border: 1px solid #dbeafe;
    padding: 2px 8px;
    border-radius: 6px;
    font-size: 11px;
    font-weight: 600;
}

.tracker-coord-pill {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 11px;
    font-weight: 600;
    color: #0369a1;
    background: #f0f9ff;
    border: 1px solid #e0f2fe;
    padding: 3px 8px;
    border-radius: 6px;
    font-family: monospace;
}

.api-status-banner {
    margin: 12px 20px;
    padding: 14px 16px;
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    font-size: 13px;
    font-weight: 600;
    animation: fadeIn 0.3s ease;
}

.api-status-banner.waiting {
    background: #fffbeb;
    color: #b45309;
    border: 1px solid #fde68a;
}

.api-status-banner.active {
    background: #ecfdf5;
    color: #047857;
    border: 1px solid #a7f3d0;
}

.api-status-banner.error {
    background: #fef2f2;
    color: #b91c1c;
    border: 1px solid #fecaca;
}

.empty-tracker-state {
    text-align: center;
    padding: 40px 24px;
    background: #ffffff;
    border-radius: 20px;
    margin: 20px;
    border: 1px dashed #cbd5e1;
    box-shadow: 0 4px 16px rgba(0,0,0,0.03);
}

.empty-tracker-icon {
    width: 68px;
    height: 68px;
    border-radius: 20px;
    background: #eff6ff;
    color: #0066ff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 34px;
    margin: 0 auto 16px;
}

/* ==========================================================================
   TRACKO by TransportX - Official Brand & PC Desktop Layout Optimization
   ========================================================================== */

/* Logo & Branding Styles */
.login-brand-logo {
    max-width: 310px;
    width: 100%;
    height: auto;
    margin-bottom: 8px;
    filter: drop-shadow(0 4px 14px rgba(5, 150, 105, 0.12));
    display: inline-block;
}

/* Desktop Top Navigation Bar (PC) */
.pc-top-navbar {
    display: none;
    position: sticky;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    background: rgba(255, 255, 255, 0.94);
    backdrop-filter: blur(20px) saturate(180%);
    -webkit-backdrop-filter: blur(20px) saturate(180%);
    border-bottom: 1px solid #e2e8f0;
    box-shadow: 0 4px 20px -4px rgba(15, 23, 42, 0.05);
}

.pc-nav-inner {
    max-width: 1440px;
    margin: 0 auto;
    padding: 0 28px;
    height: 72px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
}

.pc-brand-group {
    display: flex;
    align-items: center;
    gap: 14px;
    cursor: pointer;
    user-select: none;
}

.pc-brand-logo {
    height: 44px;
    width: auto;
    object-fit: contain;
    transition: transform 0.18s ease;
}

.pc-brand-logo:hover {
    transform: scale(1.02);
}

.pc-telemetry-badge {
    display: flex;
    align-items: center;
    gap: 7px;
    padding: 5px 12px;
    border-radius: 20px;
    background: #ecfdf5;
    border: 1px solid #a7f3d0;
    color: #065f46;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.2px;
}

.pc-live-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #10b981;
    box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.25);
    animation: pcPulse 2s infinite;
}

@keyframes pcPulse {
    0% { box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.7); }
    70% { box-shadow: 0 0 0 6px rgba(16, 185, 129, 0); }
    100% { box-shadow: 0 0 0 0 rgba(16, 185, 129, 0); }
}

.pc-nav-links {
    display: flex;
    align-items: center;
    gap: 6px;
    background: #f1f5f9;
    padding: 6px 8px;
    border-radius: 14px;
}

.pc-nav-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 18px;
    border-radius: 10px;
    font-size: 13px;
    font-weight: 600;
    color: #475569;
    text-decoration: none;
    transition: all 0.18s cubic-bezier(0.16, 1, 0.3, 1);
    white-space: nowrap;
}

.pc-nav-link i {
    font-size: 17px;
}

.pc-nav-link:hover {
    color: #0f172a;
    background: rgba(255, 255, 255, 0.75);
}

.pc-nav-link.active {
    color: #059669;
    background: #ffffff;
    font-weight: 700;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
}

.pc-nav-actions {
    display: flex;
    align-items: center;
    gap: 12px;
}

.pc-sync-btn {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 8px 16px;
    border-radius: 10px;
    background: #ffffff;
    border: 1px solid #cbd5e1;
    color: #0f172a;
    font-size: 12px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.18s ease;
}

.pc-sync-btn:hover {
    background: #f8fafc;
    border-color: #059669;
    color: #059669;
    transform: translateY(-1px);
    box-shadow: 0 3px 10px rgba(5, 150, 105, 0.12);
}

.pc-sync-btn:active i {
    animation: pcSpin 0.6s linear infinite;
}

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

.pc-user-pill {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 5px 14px 5px 6px;
    border-radius: 40px;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    cursor: pointer;
    transition: all 0.18s ease;
}

.pc-user-pill:hover {
    border-color: #cbd5e1;
    background: #f1f5f9;
}

.pc-user-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: #ecfdf5;
    color: #059669;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
}

.pc-user-details {
    display: flex;
    flex-direction: column;
}

.pc-user-name {
    font-size: 12px;
    font-weight: 700;
    color: #0f172a;
    line-height: 1.2;
}

.pc-user-role {
    font-size: 10px;
    font-weight: 600;
    color: #64748b;
    text-transform: capitalize;
}

.pc-logout-btn {
    width: 38px;
    height: 38px;
    border-radius: 10px;
    border: 1px solid #fee2e2;
    background: #fef2f2;
    color: #dc2626;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 17px;
    cursor: pointer;
    transition: all 0.18s ease;
}

.pc-logout-btn:hover {
    background: #dc2626;
    color: #ffffff;
    border-color: #dc2626;
    transform: translateY(-1px);
}

/* ==========================================================================
   Desktop / PC Responsive Media Queries (min-width: 992px)
   ========================================================================== */
@media (min-width: 992px) {
    /* Top navbar active, mobile bottom nav hidden */
    .pc-top-navbar {
        display: block !important;
    }
    .bottom-nav {
        display: none !important;
    }
    #app {
        padding-bottom: 40px !important;
    }

    /* Widescreen Containers */
    .home-header,
    .screen-header,
    .stats-grid,
    .tabs-container,
    .api-status-banner,
    .profile-screen-container,
    .flex.justify-between.items-center {
        max-width: 1400px !important;
        margin-left: auto !important;
        margin-right: auto !important;
    }

    .screen-header, .home-header {
        padding: 24px 32px 18px !important;
    }

    /* Stats Grid on PC: 4 columns with enhanced hover cards */
    .stats-grid {
        grid-template-columns: repeat(4, 1fr) !important;
        gap: 20px !important;
        padding: 0 32px !important;
    }
    .stat-card {
        padding: 20px 18px !important;
        border-radius: 16px !important;
        transition: transform 0.2s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.2s ease !important;
        cursor: pointer;
    }
    .stat-card:hover {
        transform: translateY(-4px) !important;
        box-shadow: 0 14px 30px -6px rgba(0, 0, 0, 0.08) !important;
    }
    .stat-val {
        font-size: 28px !important;
    }
    .stat-label {
        font-size: 13px !important;
        line-height: 1.3 !important;
    }

    /* Vehicle Fleet List on PC: Responsive 2-3 Column Card Grid */
    .vehicle-list {
        display: grid !important;
        grid-template-columns: repeat(auto-fill, minmax(390px, 1fr)) !important;
        gap: 18px !important;
        max-width: 1400px !important;
        margin: 0 auto !important;
        padding: 0 32px 40px !important;
    }
    .list-item {
        margin: 0 !important;
        border-radius: 16px !important;
        border: 1px solid #e2e8f0 !important;
        box-shadow: 0 2px 10px rgba(0, 0, 0, 0.02) !important;
        transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1) !important;
        background: #ffffff !important;
        padding: 18px !important;
    }
    .list-item:hover {
        transform: translateY(-3px) !important;
        box-shadow: 0 14px 30px -8px rgba(15, 23, 42, 0.1) !important;
        border-color: #059669 !important;
    }

    /* Fleet Filter Bar on PC */
    .fleet-filter-bar {
        max-width: 1400px !important;
        margin: 0 auto !important;
        padding: 0 32px 18px !important;
        gap: 12px !important;
    }
    .fleet-filter-chip {
        padding: 8px 18px !important;
        font-size: 13px !important;
    }

    /* Search Bar on PC */
    .fleet-header {
        max-width: 1400px !important;
        margin: 0 auto !important;
        padding: 24px 32px 18px !important;
    }
    .search-bar {
        max-width: 650px !important;
    }

    /* Live Map on PC: High-resolution Widescreen viewport */
    #vendorLiveMap, #schoolLiveMap, #map {
        height: calc(100vh - 120px) !important;
        border-radius: 20px !important;
        max-width: 1400px !important;
        margin: 0 auto 32px !important;
        box-shadow: 0 8px 32px rgba(15, 23, 42, 0.08) !important;
        border: 1px solid #e2e8f0 !important;
    }

    /* Login Screen on PC: Centered modern card with subtle backdrop */
    .login-screen {
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
        min-height: 100vh !important;
        background: radial-gradient(circle at 30% 20%, #f8fafc 0%, #e2e8f0 100%) !important;
        padding: 40px 20px !important;
    }
    .login-content {
        max-width: 480px !important;
        width: 100% !important;
        padding: 44px 40px !important;
        background: #ffffff !important;
        border-radius: 24px !important;
        box-shadow: 0 25px 50px -12px rgba(15, 23, 42, 0.12), 0 0 0 1px rgba(0, 0, 0, 0.05) !important;
    }

    /* Profile Screen on PC */
    .profile-screen-container {
        display: grid !important;
        grid-template-columns: repeat(auto-fit, minmax(420px, 1fr)) !important;
        gap: 20px !important;
        padding: 24px 32px !important;
    }
}

/* Fast-Scroll Custom Scrollbars for PC */
@media (min-width: 768px) {
    ::-webkit-scrollbar {
        width: 8px;
        height: 8px;
    }
    ::-webkit-scrollbar-track {
        background: #f1f5f9;
    }
    ::-webkit-scrollbar-thumb {
        background: #cbd5e1;
        border-radius: 4px;
    }
    ::-webkit-scrollbar-thumb:hover {
        background: #94a3b8;
    }
}


