/* 
 * LiveBus Warszawa — Etap 1A
 * Technical Panel Style System & Live Vehicles Extension
 */

/* Design Tokens & Theme Variables */
:root {
    --bg-primary: #0a0e17;
    --bg-secondary: #121826;
    --bg-card: #182235;
    --border-color: #26354e;
    
    --color-text-main: #f1f5f9;
    --color-text-muted: #94a3b8;
    
    --color-blue: #3b82f6;
    --color-blue-glow: rgba(59, 130, 246, 0.15);
    
    --color-success: #10b981;
    --color-success-bg: rgba(16, 185, 129, 0.1);
    --color-success-border: #14b8a6;
    
    --color-warning: #f59e0b;
    --color-warning-bg: rgba(245, 158, 11, 0.08);
    --color-warning-border: #d97706;
    
    --color-error: #ef4444;
    --color-error-bg: rgba(239, 68, 68, 0.1);
    --color-error-border: #dc2626;

    --font-sans: 'Outfit', system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    --font-mono: 'JetBrains Mono', SFMono-Regular, Consolas, "Liberation Mono", Menlo, Courier, monospace;
    
    --shadow-glow: 0 0 15px rgba(59, 130, 246, 0.25);
    --shadow-success: 0 0 15px rgba(16, 185, 129, 0.3);
    --shadow-warning: 0 0 15px rgba(245, 158, 11, 0.25);
    --shadow-error: 0 0 15px rgba(239, 68, 68, 0.35);
    
    --radius-sm: 6px;
    --radius-md: 10px;
    --radius-lg: 14px;
    --transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Global Reset & Base */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    background-color: var(--bg-primary);
    color: var(--color-text-main);
    font-family: var(--font-sans);
    line-height: 1.6;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    overflow-x: hidden;
    position: relative;
}

/* Technical Tech Background Grid */
.tech-grid-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: 
        linear-gradient(rgba(38, 53, 78, 0.07) 1px, transparent 1px),
        linear-gradient(90deg, rgba(38, 53, 78, 0.07) 1px, transparent 1px);
    background-size: 30px 30px;
    z-index: -1;
    pointer-events: none;
}

/* Layout Containers */
.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Header */
.app-header {
    background-color: rgba(18, 24, 38, 0.85);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--border-color);
    padding: 18px 0;
    position: sticky;
    top: 0;
    z-index: 100;
}

.header-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 15px;
}

.brand-wrapper {
    display: flex;
    align-items: center;
    gap: 12px;
}

.brand-title {
    font-size: 24px;
    font-weight: 700;
    letter-spacing: -0.5px;
    background: linear-gradient(135deg, #ffffff 0%, #a5b4fc 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.badge-stage {
    background-color: var(--color-blue-glow);
    border: 1px solid var(--color-blue);
    color: var(--color-blue);
    padding: 6px 14px;
    border-radius: 50px;
    font-size: 13px;
    font-weight: 600;
    letter-spacing: 0.5px;
    box-shadow: var(--shadow-glow);
}

/* Main Content Wrapper */
.main-content {
    flex: 1;
    padding-top: 40px;
    padding-bottom: 60px;
    display: flex;
    flex-direction: column;
    gap: 30px;
}

/* Intro Card */
.intro-card {
    background-color: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 30px;
    box-shadow: 0 10px 30px -15px rgba(0,0,0,0.5);
    position: relative;
    overflow: hidden;
}

.intro-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 4px;
    height: 100%;
    background-color: var(--color-blue);
}

/* Specific left border indicator for Live Vehicles panel */
.live-vehicles-card::before {
    background-color: var(--color-warning);
}

.section-title {
    font-size: 22px;
    font-weight: 600;
    margin-bottom: 12px;
}

.section-desc {
    color: var(--color-text-muted);
    font-size: 15px;
    margin-bottom: 24px;
    max-width: 900px;
}

.action-bar {
    display: flex;
    align-items: center;
    gap: 15px;
    flex-wrap: wrap;
}

/* Buttons and Links */
.btn-primary {
    background: linear-gradient(135deg, #3b82f6 0%, #1d4ed8 100%);
    border: none;
    color: white;
    font-family: var(--font-sans);
    font-size: 14px;
    font-weight: 600;
    padding: 12px 24px;
    border-radius: var(--radius-md);
    cursor: pointer;
    box-shadow: var(--shadow-glow);
    transition: var(--transition);
    display: inline-flex;
    align-items: center;
    gap: 10px;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 0 25px rgba(59, 130, 246, 0.45);
}

/* Tech panel actions secondary button style */
.btn-secondary {
    background-color: #1e293b;
    border: 1px solid var(--border-color);
    color: var(--color-text-main);
    font-family: var(--font-sans);
    font-size: 14px;
    font-weight: 600;
    padding: 12px 24px;
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: var(--transition);
    display: inline-flex;
    align-items: center;
    gap: 10px;
}

.btn-secondary:hover {
    background-color: #334155;
    border-color: #475569;
    transform: translateY(-2px);
}

/* Tech panel actions forced refresh button style */
.btn-accent {
    background: linear-gradient(135deg, #d97706 0%, #b45309 100%);
    border: none;
    color: white;
    font-family: var(--font-sans);
    font-size: 14px;
    font-weight: 600;
    padding: 12px 24px;
    border-radius: var(--radius-md);
    cursor: pointer;
    box-shadow: var(--shadow-warning);
    transition: var(--transition);
    display: inline-flex;
    align-items: center;
    gap: 10px;
}

.btn-accent:hover {
    transform: translateY(-2px);
    box-shadow: 0 0 25px rgba(245, 158, 11, 0.45);
}

.btn-tech {
    min-height: 46px;
}

.link-secondary {
    color: var(--color-text-muted);
    font-size: 14px;
    font-weight: 500;
    text-decoration: none;
    transition: var(--transition);
    border-bottom: 1px dashed var(--color-text-muted);
    padding-bottom: 2px;
}

.link-secondary:hover {
    color: white;
    border-bottom-color: white;
}

/* Status Banner */
.status-banner {
    background-color: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 15px 25px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 15px;
}

.status-badge {
    display: flex;
    align-items: center;
    gap: 12px;
    font-weight: 700;
    font-size: 16px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.status-timestamp {
    font-family: var(--font-mono);
    font-size: 13px;
    color: var(--color-text-muted);
}

/* Diagnostics Panels Grid */
.dashboard-section {
    display: flex;
    flex-direction: column;
    gap: 30px;
    animation: fadeIn 0.4s ease-out forwards;
}

.metrics-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 20px;
}

.metric-card {
    background-color: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    overflow: hidden;
    transition: var(--transition);
}

.metric-card:hover {
    border-color: #3b82f6aa;
    transform: translateY(-2px);
}

.card-header {
    background-color: rgba(38, 53, 78, 0.2);
    border-bottom: 1px solid var(--border-color);
    padding: 14px 20px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.card-icon {
    font-size: 18px;
}

.card-header h3 {
    font-size: 15px;
    font-weight: 600;
    color: #cbd5e1;
    letter-spacing: 0.25px;
}

.card-body {
    padding: 20px;
}

/* Key Value Lists inside cards */
.stats-list {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.stats-list li {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    font-size: 13px;
    gap: 10px;
}

.stats-list li span {
    color: var(--color-text-muted);
}

.stats-list li strong {
    font-family: var(--font-mono);
    color: var(--color-text-main);
    word-break: break-all;
    text-align: right;
}

.stats-list li strong.tech-path {
    font-size: 11px;
    color: #a5b4fc;
}

.stats-list li strong.tech-number {
    font-size: 16px;
    color: var(--color-blue);
    text-shadow: 0 0 10px rgba(59, 130, 246, 0.2);
}

/* Detailed Checks checklist Panel */
.checks-panel {
    background-color: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 25px;
}

.panel-subtitle {
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 1px solid var(--border-color);
}

.checklist {
    list-style: none;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 15px;
}

.checklist-item {
    background-color: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    padding: 12px 18px;
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 13.5px;
    transition: var(--transition);
}

.checklist-item.ok {
    border-left: 3px solid var(--color-success);
}

.checklist-item.warning {
    border-left: 3px solid var(--color-warning);
}

.checklist-item.error {
    border-left: 3px solid var(--color-error);
}

.check-icon {
    font-size: 15px;
    flex-shrink: 0;
}

.check-info {
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.check-name {
    font-weight: 600;
    color: var(--color-text-main);
}

.check-msg {
    font-size: 11px;
    color: var(--color-text-muted);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Vehicle Samples Grid and Cards */
.samples-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 15px;
}

.vehicle-sample-card {
    background-color: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 16px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    position: relative;
    overflow: hidden;
    transition: var(--transition);
}

.vehicle-sample-card:hover {
    transform: translateY(-3px);
}

.vehicle-sample-card.bus-card {
    border-left: 4px solid var(--color-blue);
    background-image: linear-gradient(135deg, var(--bg-card) 0%, rgba(59, 130, 246, 0.03) 100%);
}

.vehicle-sample-card.tram-card {
    border-left: 4px solid var(--color-warning);
    background-image: linear-gradient(135deg, var(--bg-card) 0%, rgba(245, 158, 11, 0.03) 100%);
}

.sample-badge {
    align-self: flex-start;
    font-size: 11px;
    font-weight: 700;
    padding: 3px 8px;
    border-radius: 4px;
    text-transform: uppercase;
}

.sample-badge.bus-badge {
    background-color: rgba(59, 130, 246, 0.15);
    color: #60a5fa;
    border: 1px solid rgba(59, 130, 246, 0.3);
}

.sample-badge.tram-badge {
    background-color: rgba(245, 158, 11, 0.15);
    color: #fbbf24;
    border: 1px solid rgba(245, 158, 11, 0.3);
}

.sample-headline {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.sample-line-chip {
    font-family: var(--font-mono);
    font-size: 20px;
    font-weight: 700;
    color: var(--color-text-main);
    background-color: rgba(255, 255, 255, 0.04);
    padding: 2px 10px;
    border-radius: 6px;
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.sample-brigade {
    font-size: 12px;
    color: var(--color-text-muted);
}

.sample-brigade span {
    font-family: var(--font-mono);
    color: #e2e8f0;
}

.sample-property {
    font-size: 11px;
    color: var(--color-text-muted);
    display: flex;
    flex-direction: column;
}

.sample-property span {
    font-family: var(--font-mono);
    color: #cbd5e1;
    word-break: break-all;
}

.sample-time {
    font-size: 10px;
    color: #64748b;
    border-top: 1px solid rgba(255, 255, 255, 0.04);
    padding-top: 6px;
    margin-top: 4px;
    font-family: var(--font-mono);
}

.sample-empty {
    grid-column: 1 / -1;
    text-align: center;
    color: var(--color-text-muted);
    padding: 30px 10px;
    font-size: 14px;
}

/* Alerts box */
.alerts-section {
    display: flex;
    flex-direction: column;
    gap: 12px;
    animation: fadeIn 0.4s ease-out forwards;
}

.alert-item {
    padding: 15px 20px;
    border-radius: var(--radius-md);
    display: flex;
    align-items: flex-start;
    gap: 12px;
    font-size: 14px;
    border: 1px solid transparent;
}

.alert-item.danger {
    background-color: var(--color-error-bg);
    border-color: var(--color-error-border);
    color: #fecaca;
}

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

.alert-icon {
    font-size: 16px;
    line-height: 1;
}

.alert-content {
    display: flex;
    flex-direction: column;
    gap: 4px;
    min-width: 0;
}

.alert-title {
    font-weight: 700;
    text-transform: uppercase;
    font-size: 12px;
    letter-spacing: 0.5px;
}

/* Placeholder box */
.placeholder-section {
    background-color: var(--bg-secondary);
    border: 1px dashed var(--border-color);
    border-radius: var(--radius-lg);
    padding: 60px 40px;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 15px;
}

.placeholder-icon {
    font-size: 40px;
    opacity: 0.6;
    animation: float 3s ease-in-out infinite;
}

.placeholder-section p {
    color: var(--color-text-muted);
    font-size: 15px;
    max-width: 450px;
}

/* Collapsible JSON debug drawer */
.debug-panel {
    background-color: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    overflow: hidden;
}

.debug-details {
    width: 100%;
}

.debug-summary {
    padding: 15px 25px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    background-color: rgba(38, 53, 78, 0.15);
    display: flex;
    justify-content: space-between;
    align-items: center;
    user-select: none;
    outline: none;
}

.debug-summary::-webkit-details-marker {
    display: none;
}

.btn-copy {
    background-color: var(--border-color);
    border: 1px solid rgba(255,255,255,0.05);
    color: var(--color-text-main);
    font-family: var(--font-sans);
    font-size: 12px;
    font-weight: 600;
    padding: 6px 14px;
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: var(--transition);
}

.btn-copy:hover {
    background-color: var(--color-blue);
    color: white;
}

.raw-code-container {
    border-top: 1px solid var(--border-color);
    background-color: #05070c;
    padding: 20px;
    overflow-x: auto;
    max-height: 400px;
}

.raw-code-container pre code {
    font-family: var(--font-mono);
    font-size: 12px;
    color: #e2e8f0;
}

/* Pulse status animations */
.pulse-indicator {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    display: inline-block;
    position: relative;
}

.pulse-indicator.green {
    background-color: var(--color-success);
    box-shadow: var(--shadow-success);
}
.pulse-indicator.green::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border-radius: 50%;
    border: 2px solid var(--color-success);
    animation: pulse 1.8s infinite ease-out;
}

.pulse-indicator.yellow {
    background-color: var(--color-warning);
    box-shadow: var(--shadow-warning);
}
.pulse-indicator.yellow::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border-radius: 50%;
    border: 2px solid var(--color-warning);
    animation: pulse 1.8s infinite ease-out;
}

.pulse-indicator.red {
    background-color: var(--color-error);
    box-shadow: var(--shadow-error);
}
.pulse-indicator.red::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border-radius: 50%;
    border: 2px solid var(--color-error);
    animation: pulse 1.8s infinite ease-out;
}

.pulse-indicator.info {
    background-color: var(--color-blue);
    box-shadow: var(--shadow-glow);
}
.pulse-indicator.info::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border-radius: 50%;
    border: 2px solid var(--color-blue);
    animation: pulse 1.8s infinite ease-out;
}

/* Spinner and Loaders */
.loader-spinner {
    width: 16px;
    height: 16px;
    border: 2px solid rgba(255, 255, 255, 0.2);
    border-top-color: white;
    border-radius: 50%;
    animation: rotate 0.8s linear infinite;
    display: inline-block;
}

.hidden {
    display: none !important;
}

/* Footer style */
.app-footer {
    background-color: #060910;
    border-top: 1px solid var(--border-color);
    padding: 25px 0;
    margin-top: auto;
    font-size: 13px;
    color: var(--color-text-muted);
}

.footer-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
}

.footer-meta {
    font-size: 12px;
    opacity: 0.8;
}

/* CSS Keyframes animations */
@keyframes pulse {
    0% {
        transform: scale(1);
        opacity: 1;
    }
    100% {
        transform: scale(2.8);
        opacity: 0;
    }
}

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

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(8px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-6px); }
}

/* Responsive Overrides */
@media (max-width: 768px) {
    .header-container {
        flex-direction: column;
        align-items: flex-start;
    }
    .badge-stage {
        align-self: flex-start;
    }
    .intro-card {
        padding: 20px;
    }
    .btn-tech {
        width: 100%;
        justify-content: center;
    }
    .action-bar {
        flex-direction: column;
        align-items: stretch;
        gap: 12px;
    }
    .link-secondary {
        text-align: center;
    }
    .status-banner {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }
    .footer-container {
        flex-direction: column;
        text-align: center;
    }
}

/* ----------------------------------------------------
 * PUBLIC TRANSIT STOPS EXTENSION (Etap 1B)
 * ---------------------------------------------------- */
:root {
    --color-purple: #8b5cf6;
    --color-purple-glow: rgba(139, 92, 246, 0.15);
    --shadow-purple: 0 0 15px rgba(139, 92, 246, 0.25);
}

.stops-card::before {
    background-color: var(--color-purple) !important;
}

.btn-purple {
    background: linear-gradient(135deg, #8b5cf6 0%, #6d28d9 100%) !important;
    box-shadow: var(--shadow-purple) !important;
}

.btn-purple:hover {
    box-shadow: 0 0 25px rgba(139, 92, 246, 0.45) !important;
    transform: translateY(-2px);
}

.card-purple:hover {
    border-color: #8b5cf6aa !important;
}

.text-purple {
    color: var(--color-purple) !important;
    text-shadow: 0 0 10px rgba(139, 92, 246, 0.2) !important;
}

/* Search utilities layout */
.search-utilities-bar {
    margin-top: 25px;
    border-top: 1px solid var(--border-color);
    padding-top: 20px;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 20px;
}

.search-form-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.search-form-group label {
    font-size: 13px;
    font-weight: 600;
    color: var(--color-text-muted);
}

.search-input-wrapper {
    display: flex;
    gap: 8px;
    width: 100%;
}

.input-tech {
    background-color: var(--bg-card);
    border: 1px solid var(--border-color);
    color: var(--color-text-main);
    font-family: var(--font-sans);
    font-size: 14px;
    padding: 10px 16px;
    border-radius: var(--radius-md);
    outline: none;
    flex: 1;
    min-width: 0;
    transition: var(--transition);
}

.input-tech:focus {
    border-color: var(--color-purple);
    box-shadow: 0 0 0 2px rgba(139, 92, 246, 0.2);
}

.btn-search {
    padding: 10px 18px !important;
    font-size: 13px !important;
    min-height: auto !important;
}

/* Stops samples and cards */
.stops-samples-panel {
    border-left: 3px solid var(--color-purple) !important;
}

.stops-samples-grid {
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)) !important;
}

.stop-sample-card {
    background-color: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 18px;
    display: flex;
    flex-direction: column;
    gap: 12px;
    position: relative;
    overflow: hidden;
    transition: var(--transition);
    border-left: 4px solid var(--color-purple);
    background-image: linear-gradient(135deg, var(--bg-card) 0%, rgba(139, 92, 246, 0.03) 100%);
}

.stop-sample-card:hover {
    transform: translateY(-3px);
    border-color: #8b5cf666;
}

.stop-sample-badge {
    background-color: rgba(139, 92, 246, 0.15);
    color: #a78bfa;
    border: 1px solid rgba(139, 92, 246, 0.3);
    align-self: flex-start;
    font-size: 10px;
    font-weight: 700;
    padding: 3px 8px;
    border-radius: 4px;
    text-transform: uppercase;
}

.stop-headline {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 10px;
}

.stop-title {
    font-size: 15px;
    font-weight: 700;
    color: var(--color-text-main);
    line-height: 1.35;
}

.stop-post-chip {
    font-family: var(--font-mono);
    font-size: 13px;
    font-weight: 700;
    color: #e2e8f0;
    background-color: rgba(139, 92, 246, 0.1);
    border: 1px solid rgba(139, 92, 246, 0.2);
    padding: 2px 8px;
    border-radius: 6px;
    flex-shrink: 0;
}

.stop-direction {
    font-size: 12px;
    color: var(--color-text-muted);
    background-color: rgba(255, 255, 255, 0.03);
    padding: 6px 10px;
    border-radius: 6px;
    border: 1px solid rgba(255, 255, 255, 0.04);
}

.stop-direction span {
    color: var(--color-text-main);
    font-weight: 600;
}

.stop-properties {
    display: flex;
    flex-direction: column;
    gap: 6px;
    font-size: 11.5px;
}

.stop-prop-item {
    display: flex;
    justify-content: space-between;
    color: var(--color-text-muted);
}

.stop-prop-item span {
    font-family: var(--font-mono);
    color: #e2e8f0;
}

.stop-validity {
    font-size: 10px;
    color: #64748b;
    border-top: 1px solid rgba(255, 255, 255, 0.04);
    padding-top: 8px;
    margin-top: 4px;
    font-family: var(--font-mono);
}

/* ----------------------------------------------------
 * STOP LINES EXTENSION (Etap 1C)
 * ---------------------------------------------------- */
:root {
    --color-purple-line: #a78bfa;
    --color-purple-line-glow: rgba(167, 139, 250, 0.15);
    --shadow-purple-line: 0 0 15px rgba(167, 139, 250, 0.25);
}

.stop-lines-card::before {
    background-color: var(--color-purple-line) !important;
}

.btn-purple-line {
    background: linear-gradient(135deg, #a78bfa 0%, #7c3aed 100%) !important;
    box-shadow: var(--shadow-purple-line) !important;
}

.btn-purple-line:hover {
    box-shadow: 0 0 25px rgba(167, 139, 250, 0.45) !important;
    transform: translateY(-2px);
}

.card-purple-line:hover {
    border-color: #a78bfaaa !important;
}

.text-purple-line {
    color: var(--color-purple-line) !important;
    text-shadow: 0 0 10px rgba(167, 139, 250, 0.2) !important;
}

/* Stop lines inputs alignment */
.stop-lines-inputs-bar {
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)) !important;
}

/* Chips layout for stop lines */
.stop-lines-samples-panel {
    border-left: 3px solid var(--color-purple-line) !important;
}

.stop-lines-chips-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    padding: 10px 0;
}

/* Premium stop line chip styled dynamically */
.line-chip {
    font-family: var(--font-mono);
    font-size: 15px;
    font-weight: 700;
    padding: 6px 16px;
    border-radius: 30px;
    border: 1px solid var(--border-color);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
    cursor: pointer;
    user-select: none;
    min-width: 50px;
}

.line-chip:hover {
    transform: scale(1.08);
}

/* Dynamic line classes styling */
/* Trams: 1-79 */
.line-chip.type-tram {
    background-color: rgba(245, 158, 11, 0.1);
    color: #fbbf24;
    border-color: rgba(245, 158, 11, 0.3);
    box-shadow: 0 0 8px rgba(245, 158, 11, 0.05);
}

/* Regular buses: 100-399 */
.line-chip.type-bus-reg {
    background-color: rgba(59, 130, 246, 0.1);
    color: #60a5fa;
    border-color: rgba(59, 130, 246, 0.3);
    box-shadow: 0 0 8px rgba(59, 130, 246, 0.05);
}

/* Express / Fast buses: 400-599, E-X */
.line-chip.type-bus-exp {
    background-color: rgba(239, 68, 68, 0.1);
    color: #f87171;
    border-color: rgba(239, 68, 68, 0.3);
    box-shadow: 0 0 8px rgba(239, 68, 68, 0.05);
}

/* Night buses: N00-N99 */
.line-chip.type-bus-night {
    background-color: rgba(139, 92, 246, 0.1);
    color: #c084fc;
    border-color: rgba(139, 92, 246, 0.3);
    box-shadow: 0 0 8px rgba(139, 92, 246, 0.05);
}

/* Zone / Special buses: 700-899 */
.line-chip.type-bus-zone {
    background-color: rgba(16, 185, 129, 0.1);
    color: #34d399;
    border-color: rgba(16, 185, 129, 0.3);
    box-shadow: 0 0 8px rgba(16, 185, 129, 0.05);
}

/* Quick shortcut button styled in Stop card Section 3 */
.btn-show-lines-shortcut {
    background-color: rgba(167, 139, 250, 0.1);
    border: 1px solid rgba(167, 139, 250, 0.2);
    color: #c084fc;
    font-family: var(--font-sans);
    font-size: 11px;
    font-weight: 600;
    padding: 6px 12px;
    border-radius: 6px;
    cursor: pointer;
    transition: var(--transition);
    align-self: flex-start;
    margin-top: 8px;
    outline: none;
    text-transform: uppercase;
}

.btn-show-lines-shortcut:hover {
    background-color: var(--color-purple-line);
    color: var(--bg-primary);
    border-color: var(--color-purple-line);
    transform: translateY(-1px);
    box-shadow: var(--shadow-purple-line);
}

/* ----------------------------------------------------
 * PUBLIC TRANSIT DEPARTURES EXTENSION (Etap 1D)
 * ---------------------------------------------------- */
.departures-card::before {
    background-color: var(--color-blue) !important;
}

.departures-inputs-bar {
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)) !important;
}

.departures-samples-panel {
    border-left: 3px solid var(--color-blue) !important;
}

.departures-table-wrapper {
    width: 100%;
    overflow-x: auto;
    background-color: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    margin-top: 15px;
}

.departures-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
    text-align: left;
}

.departures-table th {
    background-color: rgba(38, 53, 78, 0.25);
    border-bottom: 1px solid var(--border-color);
    padding: 14px 18px;
    font-weight: 600;
    color: #94a3b8;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.departures-table td {
    padding: 14px 18px;
    border-bottom: 1px solid rgba(38, 53, 78, 0.2);
    color: var(--color-text-main);
    vertical-align: middle;
}

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

.departures-table tr:hover td {
    background-color: rgba(255, 255, 255, 0.02);
}

/* Time and brigade monospaced styling */
.dep-time-cell {
    font-family: var(--font-mono);
    font-size: 15px;
    font-weight: 700;
    text-align: center;
    color: #f8fafc;
}

.dep-brigade-cell {
    font-family: var(--font-mono);
    font-size: 13px;
    color: var(--color-text-muted);
}

.dep-line-cell {
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

/* Countdown badge styles */
.countdown-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 6px 14px;
    border-radius: 30px;
    font-size: 12px;
    font-weight: 700;
    font-family: var(--font-sans);
    text-transform: uppercase;
    letter-spacing: 0.25px;
    min-width: 90px;
    text-align: center;
}

.countdown-badge.time-critical {
    background-color: var(--color-success-bg);
    color: var(--color-success-border);
    border: 1px solid var(--color-success-border);
    box-shadow: var(--shadow-success);
}

.countdown-badge.time-warning {
    background-color: var(--color-warning-bg);
    color: var(--color-warning-border);
    border: 1px solid var(--color-warning-border);
    box-shadow: var(--shadow-warning);
}

.countdown-badge.time-standard {
    background-color: var(--color-blue-glow);
    color: var(--color-blue);
    border: 1px solid var(--color-blue);
    box-shadow: var(--shadow-glow);
}

.countdown-badge.time-past {
    background-color: rgba(148, 163, 184, 0.05);
    color: #64748b;
    border: 1px solid #475569;
}

/* ----------------------------------------------------
 * PUBLIC TRANSIT FLEET EXTENSION (Etap 1E)
 * ---------------------------------------------------- */
:root {
    --color-fleet: #14b8a6;
    --color-fleet-glow: rgba(20, 184, 166, 0.15);
    --shadow-fleet: 0 0 15px rgba(20, 184, 166, 0.25);
}

.fleet-card::before {
    background-color: var(--color-fleet) !important;
}

.btn-fleet {
    background: linear-gradient(135deg, #14b8a6 0%, #0d9488 100%) !important;
    box-shadow: var(--shadow-fleet) !important;
}

.btn-fleet:hover {
    box-shadow: 0 0 25px rgba(20, 184, 166, 0.45) !important;
    transform: translateY(-2px);
}

.card-fleet:hover {
    border-color: #14b8a6aa !important;
}

.text-fleet {
    color: var(--color-fleet) !important;
    text-shadow: 0 0 10px rgba(20, 184, 166, 0.2) !important;
}

.fleet-samples-panel {
    border-left: 3px solid var(--color-fleet) !important;
}

.fleet-samples-grid {
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)) !important;
}

/* Fleet specs card */
.fleet-sample-card {
    background-color: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 18px;
    display: flex;
    flex-direction: column;
    gap: 12px;
    position: relative;
    overflow: hidden;
    transition: var(--transition);
    border-left: 4px solid var(--color-fleet);
    background-image: linear-gradient(135deg, var(--bg-card) 0%, rgba(20, 184, 166, 0.03) 100%);
}

.fleet-sample-card:hover {
    transform: translateY(-3px);
    border-color: #14b8a666;
}

.fleet-sample-card.type-bus {
    border-left-color: #3b82f6;
}

.fleet-sample-card.type-tram {
    border-left-color: #fbbf24;
}

.fleet-sample-card.type-metro {
    border-left-color: #cbd5e1;
}

.fleet-sample-card.type-rail {
    border-left-color: #10b981;
}

.fleet-sample-badge {
    background-color: rgba(20, 184, 166, 0.15);
    color: #2dd4bf;
    border: 1px solid rgba(20, 184, 166, 0.3);
    align-self: flex-start;
    font-size: 10px;
    font-weight: 700;
    padding: 3px 8px;
    border-radius: 4px;
    text-transform: uppercase;
}

.fleet-sample-badge.badge-bus {
    background-color: rgba(59, 130, 246, 0.15);
    color: #60a5fa;
    border-color: rgba(59, 130, 246, 0.3);
}

.fleet-sample-badge.badge-tram {
    background-color: rgba(245, 158, 11, 0.15);
    color: #fbbf24;
    border-color: rgba(245, 158, 11, 0.3);
}

.fleet-sample-badge.badge-rail {
    background-color: rgba(16, 185, 129, 0.15);
    color: #34d399;
    border-color: rgba(16, 185, 129, 0.3);
}

.fleet-headline {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 10px;
}

.fleet-title {
    font-size: 15px;
    font-weight: 700;
    color: var(--color-text-main);
    line-height: 1.35;
}

.fleet-post-chip {
    font-family: var(--font-mono);
    font-size: 13px;
    font-weight: 700;
    color: #e2e8f0;
    background-color: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border-color);
    padding: 2px 8px;
    border-radius: 6px;
    flex-shrink: 0;
}

.fleet-description-box {
    font-size: 12px;
    color: var(--color-text-muted);
    background-color: rgba(255, 255, 255, 0.03);
    padding: 6px 10px;
    border-radius: 6px;
    border: 1px solid rgba(255, 255, 255, 0.04);
}

.fleet-description-box span {
    color: var(--color-text-main);
    font-weight: 600;
}

.fleet-properties {
    display: flex;
    flex-direction: column;
    gap: 6px;
    font-size: 11.5px;
}

.fleet-prop-item {
    display: flex;
    justify-content: space-between;
    color: var(--color-text-muted);
}

.fleet-prop-item span {
    font-family: var(--font-mono);
    color: #e2e8f0;
}

.fleet-ac-badge {
    font-size: 9px;
    font-weight: 700;
    padding: 1px 6px;
    border-radius: 3px;
    text-transform: uppercase;
}

.fleet-ac-badge.ac-yes {
    background-color: rgba(16, 185, 129, 0.15);
    color: #34d399;
    border: 1px solid rgba(16, 185, 129, 0.3);
}

.fleet-ac-badge.ac-no {
    background-color: rgba(239, 68, 68, 0.15);
    color: #f87171;
    border: 1px solid rgba(239, 68, 68, 0.3);
}

.fleet-validity {
    font-size: 10px;
    color: #64748b;
    border-top: 1px solid rgba(255, 255, 255, 0.04);
    padding-top: 8px;
    margin-top: 4px;
    font-family: var(--font-mono);
}

/* live card fleet matched styling */
.live-fleet-badge {
    font-size: 10px;
    color: var(--color-fleet);
    border-top: 1px dashed rgba(20, 184, 166, 0.2);
    padding-top: 6px;
    margin-top: 4px;
}

