* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    line-height: 1.6;
    color: #333;
    background: #f8f9fa;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    width: 100%;
}

/* Навигация */
.navbar {
    background: #2c3e50;
    color: white;
    padding: 0.8rem 0;
    box-shadow: 0 2px 15px rgba(0,0,0,0.1);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.navbar .container {
    display: flex;
    flex-direction: column;
    align-items: stretch;
}

/* Верхняя панель с логотипом и кнопкой */
.navbar-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
}

/* Логотип */
.logo {
    display: flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
    transition: transform 0.3s;
}

.logo:hover {
    transform: scale(1.02);
}

.logo img {
    width: 45px;
    height: 45px;
    display: block;
    transition: transform 0.3s;
}

.logo:hover img {
    transform: rotate(5deg);
}

.logo-text {
    font-size: 1.8rem;
    font-weight: bold;
    color: white;
    line-height: 1;
    letter-spacing: 0.5px;
}

.logo-text span {
    color: #e74c3c;
}

/* Десктопная навигация */
.nav-links {
    display: flex;
    align-items: center;
    gap: 5px;
}

.nav-links a {
    color: white;
    text-decoration: none;
    padding: 10px 18px;
    border-radius: 30px;
    font-size: 1rem;
    font-weight: 500;
    transition: all 0.3s ease;
    position: relative;
    white-space: nowrap;
}

/* Эффект подчеркивания при наведении */
.nav-links a::after {
    content: '';
    position: absolute;
    bottom: 5px;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 2px;
    background: #e74c3c;
    transition: width 0.3s ease;
}

.nav-links a:hover::after {
    width: 70%;
}

.nav-links a:hover {
    background: rgba(255, 255, 255, 0.1);
    color: #e74c3c;
}

/* Активная ссылка */
.nav-links a.active {
    background: #e74c3c;
    color: white;
}

.nav-links a.active::after {
    display: none;
}

.nav-links a.active:hover {
    background: #c0392b;
    color: white;
}

/* Кнопки в навигации */
.nav-links .btn {
    padding: 8px 20px;
    border-radius: 30px;
    font-weight: 600;
    margin-left: 10px;
    background: #e74c3c;
    color: white;
    border: 2px solid transparent;
    transition: all 0.3s ease;
}

.nav-links .btn:hover {
    background: #c0392b;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(231, 76, 60, 0.3);
}

.nav-links .btn::after {
    display: none;
}

.nav-links .btn-primary {
    background: #e74c3c;
}

.nav-links .btn-secondary {
    background: transparent;
    border: 2px solid white;
}

.nav-links .btn-secondary:hover {
    background: white;
    color: #2c3e50;
}

/* Бейдж уведомлений */
#notificationBadge {
    background: #e74c3c;
    color: white;
    padding: 2px 8px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: bold;
    margin-left: 5px;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.1); }
    100% { transform: scale(1); }
}

/* Навигационные ссылки - ВЕРТИКАЛЬНЫЙ СПИСОК */
.nav-links {
    display: flex;
    flex-direction: column;
    width: 100%;
    gap: 5px;
}

.nav-links a {
    color: white;
    text-decoration: none;
    padding: 12px 20px;
    border-radius: 8px;
    transition: all 0.3s;
    font-weight: 500;
    width: 100%;
    text-align: left;
    border-bottom: 1px solid #34495e;
    font-size: 1.1rem;
}

.nav-links a:last-child {
    border-bottom: none;
}

.nav-links a:hover {
    background: #34495e;
    padding-left: 30px;
}

/* Кнопки в навигации */
.nav-links .btn {
    margin-top: 10px;
    text-align: center;
    background: #e74c3c;
    color: white;
    border: none;
}

.nav-links .btn:hover {
    background: #c0392b;
    padding-left: 20px;
}

/* Скрываем гамбургер (не нужен для вертикального меню) */
.menu-toggle {
    display: block;
    background: none;
    border: none;
    color: white;
    font-size: 2rem;
    cursor: pointer;
    padding: 10px;
    position: absolute;
    right: 15px;
    top: 50%;
    transform: translateY(-50%);
    z-index: 1001;
}

/* Кнопки */
.btn {
    display: inline-block;
    padding: 12px 25px;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-size: 1rem;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.3s;
}

.btn-primary {
    background: #e74c3c;
    color: white;
}

.btn-primary:hover {
    background: #c0392b;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(231, 76, 60, 0.3);
}

.btn-secondary {
    background: #3498db;
    color: white;
}

.btn-secondary:hover {
    background: #2980b9;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(52, 152, 219, 0.3);
}

.btn-success {
    background: #27ae60;
    color: white;
}

.btn-success:hover {
    background: #229954;
}

/* Главная страница */
.hero {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 120px 0;
    text-align: center;
    clip-path: polygon(0 0, 100% 0, 100% 85%, 0 100%);
}

.hero h1 {
    font-size: 3,5rem;
    margin-bottom: 10px;
    font-weight: 900;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.2);
}

.hero p {
    font-size: 1.3rem;
    margin-bottom: 20px;
    opacity: 0.95;
}

/* Поиск */
.search-box {
    background: white;
    padding: 40px;
    border-radius: 15px;
    max-width: 900px;
    margin: 0 auto;
    box-shadow: 0 20px 40px rgba(0,0,0,0.2);
}

.search-form {
    display: grid;
    grid-template-columns: 1fr 1fr auto auto;
    gap: 15px;
}

.search-form input {
    padding: 15px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-size: 1rem;
    transition: border-color 0.3s;
}

.search-form input:focus {
    outline: none;
    border-color: #667eea;
}

.search-form input[type="date"]::-webkit-datetime-edit-text {
    padding: 0 2px;
}

.search-form input[type="date"]::-webkit-datetime-edit-month-field,
.search-form input[type="date"]::-webkit-datetime-edit-day-field,
.search-form input[type="date"]::-webkit-datetime-edit-year-field {
    padding: 0 2px;
}

.search-form input[type="date"]::-webkit-calendar-picker-indicator {
    background: transparent;
    color: #667eea;
    cursor: pointer;
    padding: 5px;
}

/* Формы */
.form-container {
    max-width: 500px;
    margin: 50px auto;
    padding: 40px;
    background: white;
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
}

.form-container h2 {
    text-align: center;
    margin-bottom: 30px;
    color: #2c3e50;
    font-size: 2rem;
}

.form-group {
    margin-bottom: 25px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #2c3e50;
}

.form-group input,
.form-group textarea,
.form-group select {
    width: 100%;
    padding: 12px 15px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-size: 1rem;
    transition: all 0.3s;
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

/* Карточки поездок */
.trips-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 25px;
    margin: 30px 0;
}

.trip-card {
    background: white;
    border-radius: 15px;
    padding: 25px;
    box-shadow: 0 5px 20px rgba(0,0,0,0.05);
    transition: all 0.3s;
    border: 1px solid #e0e0e0;
}

.trip-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 30px rgba(0,0,0,0.1);
}

.trip-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 2px solid #f0f0f0;
}

.trip-route {
    font-size: 1.3rem;
    font-weight: bold;
    color: #2c3e50;
}

.trip-price {
    font-size: 1.5rem;
    color: #27ae60;
    font-weight: bold;
}

.trip-driver {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 15px;
    padding: 10px;
    background: #f8f9fa;
    border-radius: 10px;
}

.driver-avatar {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-size: 1.2rem;
}

.trip-info {
    margin-bottom: 15px;
    color: #666;
    line-height: 1.8;
}

.trip-info div {
    margin-bottom: 8px;
}

.trip-seats {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-top: 20px;
}

.seats-badge {
    background: #e74c3c;
    color: white;
    padding: 5px 15px;
    border-radius: 20px;
    font-size: 0.9rem;
    font-weight: 600;
}

/* Профиль */
.profile-header {
    background: white;
    padding: 40px;
    border-radius: 15px;
    margin: 30px 0;
    box-shadow: 0 5px 20px rgba(0,0,0,0.05);
}

.profile-info {
    display: flex;
    align-items: center;
    gap: 40px;
    flex-wrap: wrap;
}

.profile-avatar {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 3rem;
    font-weight: bold;
}

.profile-details {
    flex: 1;
}

.profile-details h2 {
    margin-bottom: 10px;
    color: #2c3e50;
}

.rating {
    color: #f39c12;
    font-size: 1.3rem;
    font-weight: 600;
}

/* Уведомления и алерты */
.alert {
    padding: 15px 20px;
    border-radius: 10px;
    margin-bottom: 20px;
    font-weight: 500;
}

.alert-success {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.alert-error {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

.alert-info {
    background: #d1ecf1;
    color: #0c5460;
    border: 1px solid #bee5eb;
}

/* Загрузка */
.loading {
    text-align: center;
    padding: 50px;
    font-size: 1.2rem;
    color: #666;
}

.loading::after {
    content: '';
    display: inline-block;
    width: 20px;
    height: 20px;
    margin-left: 10px;
    border: 3px solid #f3f3f3;
    border-top: 3px solid #667eea;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Табы */
.tabs {
    display: flex;
    gap: 10px;
    margin-bottom: 30px;
    border-bottom: 2px solid #e0e0e0;
    padding-bottom: 10px;
}

.tab {
    padding: 10px 25px;
    background: none;
    border: none;
    cursor: pointer;
    font-size: 1.1rem;
    font-weight: 600;
    color: #666;
    transition: all 0.3s;
    position: relative;
}

.tab:hover {
    color: #667eea;
}

.tab.active {
    color: #667eea;
}

.tab.active::after {
    content: '';
    position: absolute;
    bottom: -12px;
    left: 0;
    right: 0;
    height: 3px;
    background: #667eea;
    border-radius: 3px 3px 0 0;
}

/* Заголовки секций */
.section-title {
    font-size: 1.3rem;
    color: #2c3e50;
    margin: 30px 0 20px;
    padding-bottom: 10px;
    border-bottom: 2px solid #e0e0e0;
}

/* Карточки бронирований */
.booking-item {
    background: white;
    border-radius: 15px;
    padding: 20px;
    margin-bottom: 20px;
    box-shadow: 0 5px 20px rgba(0,0,0,0.05);
    border-left: 5px solid #f39c12;
    word-wrap: break-word;
}

.booking-item.confirmed {
    border-left-color: #27ae60;
}

.booking-item.contacted {
    border-left-color: #3498db;
}

.booking-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 15px;
    flex-wrap: wrap;
    gap: 10px;
}

.booking-route {
    font-size: 1.2rem;
    font-weight: bold;
    color: #2c3e50;
}

.booking-status {
    padding: 5px 12px;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 600;
    white-space: nowrap;
}

.status-pending {
    background: #fff3cd;
    color: #856404;
}

.status-confirmed {
    background: #d4edda;
    color: #155724;
}

.booking-details {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 12px;
    margin-bottom: 15px;
}

.booking-detail {
    background: #f8f9fa;
    padding: 12px;
    border-radius: 10px;
}

.booking-detail label {
    display: block;
    font-size: 0.8rem;
    color: #666;
    margin-bottom: 5px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.booking-detail .value {
    font-size: 1rem;
    font-weight: 600;
    color: #2c3e50;
}

.booking-actions {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    margin-top: 15px;
}

.booking-actions button {
    flex: 1 1 auto;
    min-width: 150px;
    padding: 12px 20px;
    border: none;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    font-size: 0.95rem;
}

/* Секция уведомлений */
.notifications-section {
    background: white;
    border-radius: 15px;
    padding: 20px;
    margin-bottom: 30px;
    box-shadow: 0 5px 20px rgba(0,0,0,0.05);
}

.notifications-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    flex-wrap: wrap;
    gap: 10px;
}

.notifications-header h2 {
    color: #2c3e50;
    font-size: 1.3rem;
}

.refresh-btn {
    background: #f8f9fa;
    border: 1px solid #ddd;
    padding: 8px 15px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 0.9rem;
    transition: all 0.3s;
}

.refresh-btn:hover {
    background: #e9ecef;
}

.notifications-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.notification-item {
    background: #f8f9fa;
    border-radius: 12px;
    padding: 15px;
    border-left: 4px solid;
    transition: transform 0.2s;
}

.notification-item.unread {
    background: #f0f7ff;
    border-left-color: #3498db;
}

.notification-content {
    display: flex;
    gap: 15px;
    width: 100%;
}

.notification-icon {
    font-size: 1.8rem;
    min-width: 40px;
    text-align: center;
    flex-shrink: 0;
}

.notification-main {
    flex: 1;
    min-width: 0;
}

.notification-title {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 8px;
    color: #2c3e50;
}

.notification-message {
    color: #666;
    margin-bottom: 10px;
    line-height: 1.5;
    font-size: 0.95rem;
}

.notification-time {
    font-size: 0.8rem;
    color: #999;
    margin-bottom: 10px;
}

.btn-sm {
    padding: 8px 16px;
    font-size: 0.9rem;
    background: #e9ecef;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    transition: background 0.3s;
}

.btn-sm:hover {
    background: #dee2e6;
}

.no-notifications, .no-data {
    text-align: center;
    padding: 40px 20px;
    color: #666;
    font-size: 1rem;
}

.warning-message {
    background: #fff3cd;
    color: #856404;
    padding: 15px;
    border-radius: 10px;
    margin-bottom: 25px;
    display: flex;
    align-items: flex-start;
    gap: 12px;
}

/* Дашборд */
.dashboard-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 30px 0;
    margin-bottom: 30px;
}

.dashboard-header h1 {
    font-size: 1.8rem;
    margin-bottom: 10px;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 15px;
    margin-bottom: 30px;
}

.stat-card {
    background: white;
    padding: 20px 15px;
    border-radius: 12px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.05);
    text-align: center;
}

.stat-card h3 {
    color: #666;
    font-size: 0.9rem;
    margin-bottom: 8px;
    text-transform: uppercase;
}

.stat-card .stat-value {
    font-size: 1.8rem;
    font-weight: bold;
    color: #2c3e50;
}

/* Адаптивность */
@media (max-width: 768px) {
    .navbar .container {
        flex-direction: row;
        justify-content: space-between;
        align-items: center;
        position: relative;
        min-height: 50px;
    }

    h1 {
        font-size: 1.8rem;
    }

    h2 {
        font-size: 1.3rem;
    }

    .logo {
        padding: 5px 0;
    }

    .logo img {
        width: 40px;
        height: 40px;
    }

    .logo-text {
        font-size: 1.5rem;
    }

        /* Показываем кнопку гамбургер на мобильных */
    /* Кнопка гамбургер - только для мобильных */
    .menu-toggle {
        display: block;
        background: none;
        border: none;
        color: white;
        font-size: 2rem;
        cursor: pointer;
        padding: 10px;
        transition: color 0.3s;
    }

    .menu-toggle:hover {
    color: #e74c3c;
    }

        /* Скрываем меню на мобильных по умолчанию */
    .nav-links {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: #2c3e50;
        flex-direction: column;
        padding: 20px;
        gap: 5px;
        box-shadow: 0 10px 20px rgba(0,0,0,0.2);
        z-index: 1000;
        border-top: 2px solid #34495e;
        max-height: 80vh;
        overflow-y: auto;
    }

        /* Показываем меню при добавлении класса show */
    .nav-links.show {
        display: flex;
    }

    .nav-links a {
        padding: 15px 20px;
        font-size: 1.1rem;
    }

    .nav-links .btn {
        width: 100%;
        margin: 5px 0;
    }

    .search-form {
        grid-template-columns: 1fr;
    }

    .hero {
        padding: 60px 0;
    }

    .hero h1 {
        font-size: 2rem;
    }

    .hero p {
        font-size: 1rem;
    }

    .trips-grid {
        grid-template-columns: 1fr;
        gap: 15px;
    }

    .trip-card {
        padding: 15px;
    }

    .trip-route {
        font-size: 1.1rem;
    }

    .trip-price {
        font-size: 1.2rem;
    }

    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 12px;
    }

    .profile-info {
        flex-direction: column;
        text-align: center;
        gap: 20px;
    }

    .profile-avatar {
        margin: 0 auto;
    }

    .tabs {
        flex-wrap: wrap;
    }

    .tab {
        flex: 1 1 auto;
        text-align: center;
        padding: 10px;
        font-size: 0.9rem;
    }

    .booking-header {
        flex-direction: column;
        align-items: flex-start;
    }

    .booking-details {
        grid-template-columns: 1fr;
    }

    .booking-actions {
        flex-direction: column;
    }

    .booking-actions button {
        width: 100%;
    }

    .notification-content {
        flex-direction: column;
        gap: 10px;
    }

    .notification-icon {
        font-size: 1.5rem;
        min-width: 35px;
    }
}

@media (max-width: 480px) {
    .hero h1 {
        font-size: 1.5rem;
    }

    .btn {
        padding: 10px 15px;
        font-size: 0.9rem;
    }

    .stats-grid {
        grid-template-columns: 1fr;
        gap: 10px;
    }

    .stat-card {
        display: flex;
        justify-content: space-between;
        align-items: center;
        text-align: left;
        padding: 12px 15px;
    }

    .stat-card h3 {
        margin-bottom: 0;
        font-size: 0.9rem;
    }

    .stat-card .stat-value {
        font-size: 1.3rem;
    }

    .notification-item {
        padding: 12px;
    }

    .notification-title {
        font-size: 1rem;
    }

    .notification-message {
        font-size: 0.9rem;
    }

    .booking-item {
        padding: 15px;
    }

    .booking-route {
        font-size: 1.1rem;
    }

    .booking-detail {
        padding: 10px;
    }

    .booking-detail .value {
        font-size: 0.95rem;
    }

    .warning-message {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }
}

.btn-danger {
    background: #e74c3c;
    color: white;
    padding: 8px 12px;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    transition: all 0.3s;
}

.btn-danger:hover {
    background: #c0392b;
    transform: scale(1.05);
}

.trip-seats {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-top: 20px;
}

.seats-badge {
    background: #e74c3c;
    color: white;
    padding: 5px 15px;
    border-radius: 20px;
    font-size: 0.9rem;
    font-weight: 600;
    white-space: nowrap;
}