/* Базовый адаптивный мобильный контейнер */
.max-w-md {
    max-width: 440px;
    margin: 0 auto;
    min-height: 100vh;
    background: #ffffff;
    box-shadow: 0 0 20px rgba(0,0,0,0.05);
    position: relative;
    box-sizing: border-box;
}
main {
    padding: 20px 16px 100px 16px !important;
    position: relative;
    z-index: 10; /* Контент лежит НИЖЕ таб-бара по иерархии, но доступен для кликов */
}
body {
    background-color: #f8fafc;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    margin: 0;
    padding: 0;
}

/* Крупные заголовки */
.text-2xl {
    font-size: 24px;
    font-weight: 800;
    color: #0f172a;
    margin-bottom: 8px;
}

.text-sm {
    font-size: 14px;
    color: #64748b;
}

.text-xs {
    font-size: 12px;
    font-weight: 700;
    color: #94a3b8;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

/* Белая плашка формы поиска */
.bg-white-card {
    background: #ffffff;
    border: 1px solid #f1f5f9;
    border-radius: 24px;
    padding: 20px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.02);
    margin-bottom: 24px;
}

/* Поля ввода (Инпуты) */
.input-field {
    z-index: 1;
    width: 100%;
    padding: 14px 16px;
    background-color: #f8fafc;
    border-radius: 16px;
    border: 1px solid #e2e8f0;
    font-size: 14px;
    font-weight: 500;
    color: #334155;
    box-sizing: border-box;
    margin-bottom: 12px;
    transition: all 0.2s;
}

    .input-field:focus {
        outline: none;
        border-color: #4f46e5;
        background-color: #ffffff;
        box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.1);
    }

/* Кнопка Поиска */
.btn-primary {
    width: 100%;
    background-color: #4f46e5;
    color: #ffffff;
    padding: 16px;
    border-radius: 16px;
    font-size: 14px;
    font-weight: 700;
    border: none;
    cursor: pointer;
    transition: background 0.2s, transform 0.1s;
    margin-top: 4px;
    box-shadow: 0 4px 12px rgba(79, 70, 229, 0.2);
}

    .btn-primary:hover {
        background-color: #4338ca;
    }

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

/* Карточки поездок рейсов */
.ride-card {
    background: #ffffff;
    border: 1px solid #f1f5f9;
    border-radius: 20px;
    padding: 16px;
    margin-bottom: 12px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.01);
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
    transition: all 0.2s;
    border: 1px solid #e2e8f0;
}

    .ride-card:hover {
        border-color: #818cf8;
        transform: translateY(-1px);
        box-shadow: 0 4px 12px rgba(79, 70, 229, 0.05);
    }

.ride-info {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.ride-route {
    font-size: 15px;
    font-weight: 700;
    color: #1e293b;
}

.ride-meta {
    font-size: 12px;
    color: #64748b;
}

.ride-price-block {
    text-align: right;
}

.ride-price {
    font-size: 18px;
    font-weight: 900;
    color: #4f46e5;
}

.ride-seats {
    font-size: 11px;
    font-weight: 700;
    color: #4f46e5;
    background: #e0e7ff;
    padding: 2px 8px;
    border-radius: 6px;
    display: inline-block;
    margin-top: 4px;
}

/* Фикс нижнего Таб-бара: предотвращаем перекрытие кликов по карточкам */
.fixed-tabbar {
    position: fixed;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 100%;
    max-width: 440px;
    background: #ffffff;
    border-top: 1px solid #f1f5f9;
    height: 68px;
    display: flex;
    justify-content: space-around;
    align-items: center;
    z-index: 100; /* Таб-бар строго на своем месте */
    box-shadow: 0 -4px 12px rgba(0,0,0,0.03);
    pointer-events: auto; /* Разрешаем клики ТОЛЬКО по кнопкам таб-бара */
}

.tab-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-decoration: none;
    color: #94a3b8;
    font-size: 10px;
    font-weight: 700;
    gap: 4px;
    background: none;
    border: none;
    cursor: pointer;
    width: 30%; /* Сужаем долю кнопки, чтобы они не накладывались */
    height: 100%;
    justify-content: center;
    box-sizing: border-box;
}


    .tab-item.active {
        color: #4f46e5;
    }

.tab-icon {
    font-size: 20px;
}
