@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&display=swap');
body { font-family: 'Inter', sans-serif; overflow-y: hidden; }
.sidebar-icon { width: 24px; height: 24px; }

/* Unified Layout Styles */
.header-tab { border-bottom: 2px solid transparent; }
.header-tab.active { border-bottom-color: #3b82f6; color: #3b82f6; }

/* Left Panel Transition */
.panel-content { animation: fadeIn 0.3s ease-in-out; }
@keyframes fadeIn { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: translateY(0); } }

/* Timeline & Map markers (from previous files for consistency) */
.timeline { position: relative; padding-left: 30px; }
.timeline-line { position: absolute; left: 10px; top: 10px; bottom: 10px; width: 2px; background-color: #e5e7eb; }
.timeline-item { position: relative; }
.timeline-item:not(:last-child) { margin-bottom: 1.25rem; }
.timeline-marker { position: absolute; left: -20px; top: 5px; width: 12px; height: 12px; border-radius: 9999px; background-color: #fff; border: 2px solid; }
.timeline-marker-pending { border-color: #f97316; }
.timeline-marker-active { border-color: #3b82f6; background-color: #fff; }
.timeline-marker-completed { border-color: #16a34a; background-color: #16a34a; }

.leaflet-div-icon { background: transparent; border: none; }
.marker-icon-base { position: relative; width: 28px; height: 28px; border-radius: 50%; border: 3px solid white; box-shadow: 0 2px 5px rgba(0,0,0,0.2); display: flex; align-items: center; justify-content: center; }
.marker-icon-pending { background-color: #f97316; color: white; }
.marker-icon-active { background-color: #3b82f6; color: white; }
.marker-icon-completed { background-color: #16a34a; color: white; }
.delegate-marker { display: flex; align-items: center; justify-content: center; width: 32px; height: 32px; }
.delegate-marker .pulse { position: absolute; border-radius: 50%; border: 4px solid #3b82f6; width: 32px; height: 32px; animation: pulse-animation 1.5s infinite; }
.delegate-marker .dot { width: 16px; height: 16px; background-color: #3b82f6; border: 2px solid white; border-radius: 50%; z-index: 10; }
@keyframes pulse-animation { 0% { transform: scale(0.7); opacity: 1; } 100% { transform: scale(1.5); opacity: 0; } }

/* Day toggle for recurring schedule */
.day-toggle {
    width: 2.5rem; height: 2.5rem; border-radius: 9999px;
    display: flex; align-items: center; justify-content: center;
    border: 1px solid #d1d5db; background-color: white;
    font-weight: 500; color: #374151;
    transition: all 0.2s ease-in-out;
}
.day-toggle:hover { background-color: #f3f4f6; }
.day-toggle.active { background-color: #3b82f6; color: white; border-color: #3b82f6; }

/* Horizontal Route Timeline */
.h-timeline {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
}
.h-timeline-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    position: relative;
    flex-basis: 0;
    flex-grow: 1;
}
.h-timeline-item:not(:first-child)::before {
    content: '';
    position: absolute;
    right: 50%;
    top: 8px;
    height: 2px;
    width: 100%;
    background-image: linear-gradient(to right, #d1d5db 33%, rgba(255,255,255,0) 0%);
    background-position: center;
    background-size: 6px 2px;
    background-repeat: repeat-x;
    z-index: 0;
}
.h-timeline-node {
    width: 18px;
    height: 18px;
    border-radius: 50%;
    border: 3px solid;
    background-color: white;
    position: relative;
    z-index: 1;
}
.h-timeline-node.completed { border-color: #16a34a; }
.h-timeline-node.active { 
    border-color: #3b82f6;
    transform: scale(1.2);
    box-shadow: 0 0 0 4px rgba(59, 130, 246, 0.2);
}
.h-timeline-node.pending { border-color: #d1d5db; }

.h-timeline-label {
    font-size: 0.7rem;
    line-height: 1rem;
    margin-top: 0.5rem;
    font-weight: 500;
    color: #4b5563;
    height: 2rem;
    overflow: hidden;
}
.h-timeline-sublabel {
    font-size: 0.65rem;
    color: #6b7280;
}
.h-timeline-more {
     display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.7rem;
    color: #6b7280;
    padding: 0 0.5rem;
}

.route-card-footer {
    padding: 0.75rem;
    border-top: 1px solid #f3f4f6;
}
.h-timeline-item:not(:first-child)::before {
    content: '';
    position: absolute;
    right: 50%;
    top: 8px;
    height: 2px;
    width: 100%;
    background-image: linear-gradient(to right, #d1d5db 33%, rgba(255,255,255,0) 0%);
    background-position: center;
    background-size: 6px 2px;
    background-repeat: repeat-x;
    z-index: 0;
}
.h-timeline-item.line-completed:not(:first-child)::before {
    background-image: none;
    background-color: #16a34a;
}
.text-xxs {
    font-size: 0.625rem; /* 10px */
    line-height: 1rem;
}
.directions-info {
    position: absolute;
    left: -19px; /* Aligns center with timeline line */
    bottom: -1rem; /* Positions in the margin between items */
    transform: translateX(-50%);
    z-index: 1;
    background: #f9fafb;
    padding: 1px 6px;
    border-radius: 6px;
    border: 1px solid #e5e7eb;
    text-align: center;
    width: max-content;
}

/* Redesigned Stop Card in Timeline */
.stop-card {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
}
.stop-card-icon {
    flex-shrink: 0;
    width: 32px;
    height: 32px;
    border-radius: 9999px;
    display: flex;
    align-items: center;
    justify-content: center;
}
.stop-card-progress {
    height: 4px;
    background-color: #e5e7eb;
    border-radius: 2px;
    overflow: hidden;
}
.stop-card-progress-bar {
    height: 100%;
    background-color: #3b82f6;
    transition: width 0.3s ease;
}