.ride-container {
    max-width: 900px;
    margin: 0 auto;
    font-family: 'Arial', sans-serif;
}

.ride-title {
    text-align: center;
    font-size: 32px;
}

.ride-add-button {
    margin-bottom: 20px;
}

.ride-add-button a {
    text-decoration: none;
    background-color: #007bff;
    color: white;
    padding: 8px 14px;
    border-radius: 6px;
    font-weight: bold;
}

.ride-list {
    list-style: none;
    padding: 0;
}

.ride-item {
    background-color: #f8f9fa;
    border: 1px solid #ccc;
    margin-bottom: 25px;
    border-radius: 10px;
    padding: 20px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.05);
}

.ride-main {
    padding: 5px;
}

/* Верхняя часть: время, стрелка, дата */
.ride-route-block {
    text-align: center;
    margin-bottom: 20px;
}

.ride-time {
    font-size: 25px;
    font-weight: bold;
    margin-bottom: 5px;
}

.ride-date {
    font-size: 18px;
    margin-top: 5px;
    margin-bottom: 5px;
}

.ride-arrow {
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
    font-weight: bold;
    flex-wrap: wrap;
}

.ride-line {
    margin: 0 10px;
    color: #28a745;
    font-size: 24px;
}

.ride-origin,
.ride-destination {
    font-weight: bold;
}

/* Нижняя часть — текст и фото рядом */
.ride-content-flex {
    display: flex;
    gap: 20px;
    align-items: flex-start;
}

/* Текст слева */
.ride-content {
    flex: 1 1 500px;
    min-width: 280px;
    max-width: calc(100% - 340px); /* 320px фото + 20px отступ */
    word-wrap: break-word; /* перенос длинных слов */
    overflow-wrap: break-word;
}

.ride-info-box {
    background-color: #fff;
    padding: 12px;
    border-left: 4px solid #007bff;
    border-radius: 6px;
}

.ride-info-box p {
    margin: 4px 0;
    font-size: 15px;
}

.ride-options {
    list-style: none;
    padding-left: 0;
    margin-top: 15px;
}

.ride-options li {
    font-size: 14px;
    padding-left: 1em;
    margin-bottom: 2px;
}

.ride-photo-container {
    max-width: 320px;
}

.ride-photo {
    border-radius: 8px;
    object-fit: cover;
    width: clamp(280px, 45vw, 300px);
    height: clamp(100px, 20vh, 120px);
}

.ride-actions {
    margin-top: 15px;
    z-index:1000;
}

.ride-edit {
    display: inline-block;
    margin-right: 10px;
    text-decoration: none;
    color: #333;
    font-weight: bold;
}

.ride-book-button {
    padding: 6px 14px;
    background-color: #007bff;
    color: white;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 14px;
}

.ride-full {
    color: red;
    font-weight: bold;
    margin-top: 10px;
}

.ride-notes {
    margin-top: 10px;
    font-style: italic;
    color: #555;
}
.ride-request {
    background-color: #fdf6e3;
    border-left: 5px solid #f0ad4e;
}
.ride-toggle-buttons {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin-bottom: 20px;
}
.toggle-btn {
    background: #ddd;
    padding: 10px 25px;
    border-radius: 8px;
    text-decoration: none;
    font-weight: bold;
    color: #333;
}
.toggle-btn.active {
    background-color: #007bff;
    color: #fff;
}



/* Фильтр */


.ride-filter-form select,
.ride-filter-form input[type="date"] {
    padding: 6px;
    border-radius: 5px;
    border: 1px solid #ccc;
    min-width: 150px;
}

.btn-filter {
    background-color: #17a2b8;
    color: white;
    border: none;
    padding: 8px 20px;
    border-radius: 6px;
    cursor: pointer;
    font-weight: bold;
}

.btn-filter:hover {
    background-color: #138496;
}




.btn-submit {
    background-color: #28a745;
    color: white;
    padding: 10px 18px;
    border: none;
    border-radius: 6px;
    font-size: 16px;
    cursor: pointer;
    margin-top: 15px;
    transition: background-color 0.3s ease;
}

.btn-submit:hover {
    background-color: #218838;
}


.ride-form {
    max-width: 600px;
    margin: 0 auto;
    background: #fefefe;
    padding: 25px 30px;
    border-radius: 12px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
    font-family: 'Arial', sans-serif;
}

.ride-form h2 {
    text-align: center;
    margin-bottom: 20px;
    color: #007bff;
}
.ride-request-form label,
.ride-form label {
    display: block;
    margin-top: 10px;
    margin-bottom: 6px;
    font-weight: 600;
    color: #333;
}

.ride-form input[type="text"],
.ride-form input[type="date"],
.ride-form input[type="time"],
.ride-form input[type="number"],
.ride-form select,
.ride-form textarea {
    width: 100%;
    padding: 10px 12px;
    border: 1.5px solid #ccc;
    border-radius: 8px;
    font-size: 15px;
    transition: border-color 0.3s ease;
    box-sizing: border-box;
}

.ride-form input[type="text"]:focus,
.ride-form input[type="date"]:focus,
.ride-form input[type="time"]:focus,
.ride-form input[type="number"]:focus,
.ride-form select:focus,
.ride-form textarea:focus {
    outline: none;
    border-color: #007bff;
    box-shadow: 0 0 5px rgba(0, 123, 255, 0.5);
}

.ride-form textarea {
    resize: vertical;
    min-height: 80px;
}

.ride-form .checkbox-group {
    display: flex;
    gap: 15px;
    margin-top: 15px;
    flex-wrap: wrap;
}

.ride-form .checkbox-group label {
    font-weight: normal;
    color: #555;
    display: flex;
    align-items: center;
    gap: 6px;
    cursor: pointer;
}

.ride-form button[type="submit"] {
    margin-top: 25px;
    background-color: #007bff;
    border: none;
    color: white;
    padding: 12px 18px;
    font-size: 16px;
    border-radius: 8px;
    cursor: pointer;
    width: 100%;
    transition: background-color 0.3s ease;
}

.ride-form button[type="submit"]:hover {
    background-color: #0056b3;
}



/* Форма поиска */
.ride-request-form-container {
    max-width: 600px;
    margin: 20px auto;
    padding: 20px;
    background-color: #fafafa;
    border-radius: 12px;
    box-shadow: 0 0 10px rgba(0,0,0,0.1);
}

.ride-request-form p {
    margin-bottom: 10px;
}

.ride-request-form input,
.ride-request-form textarea,
.ride-request-form select {
    width: 100%;
    padding: 10px 12px;
    border: 1.5px solid #ccc;
    border-radius: 8px;
    font-size: 15px;
    transition: border-color 0.3s ease;
    box-sizing: border-box;
}

.btn-submit-request {
    background-color: #4CAF50;
    color: white;
    padding: 10px 20px;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-size: 1em;
    width: 100%;
}

.ride-filter-add-wrapper {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;

    margin-bottom: 20px;
}

.ride-filter-form {
    display: flex;
    gap: 1px;
    flex-wrap: wrap;
    align-items: center;
    margin: 0; /* убираем отступ снизу */
    flex: 1;
}

.ride-add-inline {
    white-space: nowrap;
}

.btn-add-inline {
    text-decoration: none;
    background-color: #007bff;
    color: white;
    padding: 8px 14px;
    border-radius: 6px;
    font-weight: bold;
    display: inline-block;
}

.ride-filter-input {
    padding: 6px 10px;
    border-radius: 6px;
    border: 1px solid #ccc;
    font-size: 14px;
    background-color: #fff;
    box-shadow: inset 0 1px 2px rgba(0,0,0,0.05);
    transition: border-color 0.2s ease;
}

.ride-filter-input:focus {
    border-color: #007bff;
    outline: none;
    box-shadow: 0 0 5px rgba(0, 123, 255, 0.25);
}

.stop-row {
    margin-bottom: 8px;
    display: flex;
    align-items: center;
}

.ride-stop {
    font-weight: bold;
    margin: 0 5px;
}



.ride-labels-spaced {
    display: flex;
    justify-content: space-between;
    margin-bottom: 4px;
}

.label-gray {
    color: #888;
    font-size: 16px;
}

.label-gray.left {
    text-align: left;
}

.label-gray.right {
    text-align: right;
}

.filter-title {
    display: inline-block;
    font-size: 1.1rem;
    font-weight: bold;
    color: #2c3e50;
    margin-bottom: 8px;
    padding: 4px 8px;
    background: #eef5ff;
    border-left: 4px solid #4a90e2;
    border-radius: 4px;
}
.btn-pending {
    background-color: #f0ad4e; /* оранжевый */
    color: white;
    border: none;
    padding: 6px 12px;
    border-radius: 4px;
    cursor: default;
}

.btn-confirmed {
    background-color: #4caf50; /* зелёный */
    color: white;
    border: none;
    padding: 6px 12px;
    border-radius: 4px;
    cursor: default;
}

.btn-rejected {
    background-color: #d9534f; /* красный */
    color: white;
    border: none;
    padding: 6px 12px;
    border-radius: 4px;
    cursor: default;
}
.btn-booked {
        background-color: #4caf50;
        color: white;
        border: none;
        padding: 6px 12px;
        border-radius: 4px;
        cursor: default;
    }

.ride-actions {
    display: flex;
    gap: 10px;
    align-items: center;
}

.booking-modal-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.5);
    z-index: 9999;
    overflow: auto;
}


.booking-modal-content {
    background: white;
    padding: 10px;
    border-radius: 8px;
    max-width: 600px;
    width: 95%;
    margin: auto;
    position: fixed;      /* было relative — поменять на fixed */
    top: 50%;
    left: 50%;            /* добавить для центрирования по горизонтали */
    transform: translate(-50%, -50%);
    z-index: 10000;       /* чтобы точно поверх всего */
}

.booking-modal-close {
    position: absolute;
    top: 12px;
    right: 15px;
    font-size: 24px;
    font-weight: bold;
    cursor: pointer;
    color: #999;
    transition: color 0.3s;
}
.booking-modal-close:hover {
    color: #333;
}

.booking-modal-header {
    margin-bottom: 20px;
    font-size: 1.3em;
    color: #333;
}

.booking-modal-list li {
    margin-bottom: 15px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.booking-modal-buttons {
    display: flex;
    flex-direction: column;
    margin-top: 8px;
}


.btn-confirm {
    background-color: #4CAF50;
    color: white;
    border-radius: 12px;
    padding: 5px;
}
.btn-confirm:hover {
    background-color: #45a049;
}

.btn-reject {
    margin-top: 10px;
    background-color: #f44336; /* красная */
    color: white;
    border-radius: 12px;
    padding: 5px;
}
.btn-reject:hover {
    background-color: #da190b;
}
.checkbox-row {
    display: flex;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 15px;
}

.checkbox-row label {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 15px;
    color: #333;
    white-space: nowrap;
}

.ride-filter-row {
    flex-shrink: 1;

    display: flex;
    gap: 10px;
    flex-wrap: nowrap;
}

.ride-filter-row input {
    flex: 1 1 0;
    min-width: 100px;
}

.cal-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 6px;
    user-select: none;
  }
  .cal-head {
    font-weight: 600;
    text-align: center;
    padding: 6px 0;
    opacity: 0.7;
  }
  .cal-cell {
    height: 38px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 10px;
    border: 1px solid #e6e6e6;
    cursor: pointer;
    background: #fff;
  }
  .cal-cell:hover { filter: brightness(0.97); }
  .cal-cell.is-empty {
    border: none;
    background: transparent;
    cursor: default;
  }
  .cal-cell.is-disabled {
    opacity: 0.35;
    cursor: default;
  }
  .cal-cell.is-selected {
    background: #e6f7ec;
    border-color: #9ad3b0;
    font-weight: 700;
  }

.autopost-modal-content {
    background-color: white;
}

.phone-number {
    font-variant-numeric: tabular-nums;
    letter-spacing: 0.5px;
    text-decoration: none;
}


.phone-value {
    display: flex;
    align-items: center;
    gap: 8px;                    /* расстояние до иконки копирования */
    font-size: 15px;
    font-weight: 500;
}

.phone-number {
    color: inherit;
}

#call-modal .phone-value{
  display: inline-flex;            /* важно: inline-flex, чтобы не растягивалось на всю ширину */
  align-items: center;
  justify-content: center;
  gap: 10px;
}

/* Чтобы ссылка не ломала центрирование */
#call-modal .phone-number{
  display: inline-block;
  font-weight: 700;
  text-decoration: none;
}

.ride-header-row{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;
  flex-wrap:wrap;
}

.ride-author{
  display:flex;
  align-items:center;
  gap:8px;
  text-decoration:none;
  justify-content: center;
}

.ride-author-avatar{
  width:32px;
  height:32px;
  border-radius:50%;
  object-fit:cover;
  flex:0 0 auto;
}

.ride-author-name{
  font-weight:600;
  font-size:14px;
  opacity:.95;
  white-space:nowrap;
}

.ride-author--deleted{
  opacity:.7;
}

.ride-author-rating{
  font-size:13px;
  margin-left:8px;
  opacity:.95;
}

.ride-author-rating .muted{
  opacity:.7;
}

.ride-author-text{
  display:flex;
  flex-direction:column;
  align-items:flex-start;
  line-height:1.1;
}

.booking-modal-list li.text-ride-confirm {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

/* левая часть должна уметь сжиматься */
.booking-left {
  flex: 1;
  min-width: 0;
  margin-top: 15px;
}

/* имя+телефон+статус — в ОДНУ СТРОКУ, но с переносом при нехватке места */
.booking-line {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 15px;
  min-width: 0;
}

/* имя не переносим по буквам */
.booking-name a {
  white-space: nowrap;
  font-weight: 600;
}

/* телефон можно переносить, если длинный */
.booking-line .phone-number {
  white-space: normal;
  overflow-wrap: anywhere;
  word-break: break-word;
  font-variant-numeric: tabular-nums;
}

/* статус в одну "таблетку" */
.booking-status {
  white-space: nowrap;
  color: #666;
  font-style: italic;
}

  .ride-photo-thumb-wrap{
    position:relative;
    width:120px;
    height:120px;
    border-radius:6px;
    overflow:hidden;
    display:inline-block;
  }
  .ride-photo-thumb{
    width:120px;
    height:120px;
    object-fit:cover;
    cursor:pointer;
    display:block;
  }
  .ride-photo-remove-btn{
    position:absolute;
    top:6px;
    right:6px;
    width:28px;
    height:28px;
    border:none;
    border-radius:999px;
    cursor:pointer;
    background:rgba(0,0,0,0.65);
    color:#fff;
    font-size:20px;
    line-height:28px;
    display:flex;
    align-items:center;
    justify-content:center;
  }
  .ride-photo-remove-btn:hover{ background:rgba(0,0,0,0.8); }

  .ride-photo-delete-hint{
    margin-top:10px;
    font-size:14px;
    opacity:.85;
    display:flex;
    align-items:center;
    gap:10px;
  }
  .ride-photo-undo-btn{
    border:1px solid #ddd;
    background:transparent;
    padding:6px 10px;
    border-radius:10px;
    cursor:pointer;
  }

  .ride-new-photo-thumb-wrap{
    position:relative;
    width:120px;
    height:120px;
    border-radius:6px;
    overflow:hidden;
    display:inline-block;
  }
  .ride-new-photo-thumb{
    width:120px;
    height:120px;
    object-fit:cover;
    cursor:pointer;
    display:block;
  }
  .ride-new-photo-remove-btn{
    position:absolute;
    top:6px;
    right:6px;
    width:28px;
    height:28px;
    border:none;
    border-radius:999px;
    cursor:pointer;
    background:rgba(0,0,0,0.65);
    color:#fff;
    font-size:20px;
    line-height:28px;
    display:flex;
    align-items:center;
    justify-content:center;
  }
  .ride-new-photo-remove-btn:hover{ background:rgba(0,0,0,0.8); }

  .ride-new-photo-delete-hint{
    margin-top:10px;
    font-size:14px;
    opacity:.85;
    display:flex;
    align-items:center;
    gap:10px;
  }
.ride-topbar-name,
.ride-topbar-name {
      font-size: 17px;
      font-weight: 600;
}

@media screen and (min-width: 768px) {
    .page-title {
        display: block;
        font-size: 32px;
        font-weight: bold;
        margin-bottom: 25px;
        color: #007bff;
        text-align: center;
    }

    .btn-back-ride {
        display: inline-block;
        margin-top: 20px;
        text-decoration: none;
        color: #007bff;
        font-weight: 600;
        padding: 8px 12px;
        border: 1.5px solid #007bff;
        border-radius: 6px;
        transition: background-color 0.3s ease, color 0.3s ease;
    }

    .btn-back-ride:hover {
        background-color: #007bff;
        color: white;
    }

    .ride-topbar {
      display: none;
    }

    /* Кнопка назад слева, не влияет на центрирование заголовка */
    .ride-back-btn {
      display: none;
    }

    /* Заголовок строго по центру экрана */
    .ride-topbar-title {
      display: none;
    }

}

@media screen and (max-width: 768px) {
    .btn-back-ride {
        display: none;
    }
    .ride-form {
        padding: 20px;
        font-size: 14px;
    }
    .booking-modal-header {
        font-size: 16px;
    }

    .text-ride-confirm span {
        font-size: 14px;
    }

    .btn-add-inline {
        font-size: 14px;
        padding: 8px 10px;
    }
    .booking-modal-content {
        width: 100%;
    }
    .booking-modal-list {
        padding: 0px;
    }

    .ride-form input,
    .ride-form select,
    .ride-form textarea {
        font-size: 14px;
        padding: 8px 10px;
    }

    .checkbox-row {
        gap: 8px;
        justify-content: flex-start;
    }

    .checkbox-row label {
        flex: 1 1 45%; /* по два в ряд на мобильных */
        font-size: 14px;
    }



    .ride-info-box {
        background-color: #fff;
        padding: 12px;
        margin-top: 0px;
        border-left: 4px solid #007bff;
        border-radius: 6px;
    }
    .ride-info-box p {
        margin: 4px 0;
        font-size: 15px;
    }
    .filter-title {
        display: inline-block;
        font-size: 0.9rem;
        font-weight: bold;
        color: #2c3e50;
        margin-bottom: 8px;
        padding: 4px 8px;
        background: #eef5ff;
        border-left: 4px solid #4a90e2;
        border-radius: 4px;
    }
    .ride-form {
        max-width: 600px;

        padding: 5px 10px;

    }
    .ride-arrow {
        font-size: 18px; /* чуть меньше шрифт */
        gap: 4px;
        flex-wrap: wrap;
    }
    .ride-content {
        flex: 1 1 500px;
        min-width: 150px;
        max-width: 100%;
        word-wrap: break-word; /* перенос длинных слов */
        overflow-wrap: break-word;
    }
    .ride-content p {
        margin: 0px;
    }
    .ride-item {
        border: 1px solid #ccc;
        margin-bottom: 15px;
        border-radius: 10px;
        padding: 10px;
        box-shadow: 0 2px 5px rgba(0,0,0,0.05);
    }
    .label-gray {
        color: #888;
        font-size: 12px;
    }
    .ride-time {
        font-size: 20px;
        font-weight: bold;
        margin-bottom: 5px;
    }
    .ride-container {
        max-width: 900px;
        margin: 0 auto;
        padding: 5px;
        font-family: 'Arial', sans-serif;
    }
    .ride-title {
        text-align: center;
        font-size: 22px;
    }
    .btn-filter {
        font-size: 12px;
    }
    .ride-photo-container {
        max-width: 320px;
        width: 100%;
        display: flex;
        flex-direction: column;
        align-items: stretch;
        justify-content: flex-start;
    }

    .ride-photo {
        width: 100%;
        border-radius: 8px;
        object-fit: cover;
        margin-bottom: 10px;
    }

    .ride-options {
        display: grid;
        grid-template-columns: repeat(2, 1fr);
        gap: 6px;
        list-style: none;
        padding: 0;
        margin: 0;
        border-radius: 6px;
        padding: 8px;
    }

    .ride-options li {
        background: #fff;
        border: 1px solid #ddd;
        border-radius: 4px;
        padding: 6px;
        font-size: 12px;
        text-align: center;
        word-break: break-word;
    }

    /* Если нет фото, чтобы опции заняли место */
    .ride-photo-container:not(:has(img)) {
        justify-content: center;
    }

    .ride-header-row{
        justify-content:center;
    }

    .ride-author{
        width:100%;
        justify-content:center;
    }

    .ride-topbar {
      display: block;
      position: sticky;
      top: 0;
      z-index: 1000;

      height: 56px;
      display: flex;
      align-items: center;
      padding: 0 12px;

      background: #fff;
      border-bottom: 1px solid rgba(0,0,0,0.08);
    }

    /* Кнопка назад слева, не влияет на центрирование заголовка */
    .ride-back-btn {
      display: block;
      position: absolute;
      left: 12px;
      top: 50%;
      transform: translateY(-50%);
      border: none;
      background: transparent;
      cursor: pointer;
    }

    /* Заголовок строго по центру экрана */
    .ride-topbar-title {
      display: block;
      position: absolute;
      left: 50%;
      transform: translateX(-50%);
      text-align: center;
      max-width: 70%;
      white-space: nowrap;
      overflow: hidden;
      text-overflow: ellipsis;
      pointer-events: none; /* чтобы клики не блокировались */
    }

    .page-title {
        display: none;
    }

    .btn-back-ride {
        display: none;
    }
}

.ride-empty {
    display: none;
}

.ride-empty-card {
    list-style: none;
    margin: 10px 0 0;
    padding: 34px 22px;
    border-radius: 22px;
    background: linear-gradient(180deg, #ffffff 0%, #f8fbff 100%);
    border: 1px solid #e4ebf3;
    box-shadow:
        0 12px 28px rgba(15, 23, 42, 0.06),
        0 4px 10px rgba(15, 23, 42, 0.04);
    text-align: center;
}

.ride-empty-card__icon {
    width: 76px;
    height: 76px;
    margin: 0 auto 16px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 30px;
    box-shadow: 0 10px 24px rgba(0,0,0,.14);
    background: linear-gradient(135deg, #2f80ed, #1f5fd1);
}

.ride-empty-card--mine .ride-empty-card__icon {
    background: linear-gradient(135deg, #4da3ff, #2563eb);
}

.ride-empty-card--requests .ride-empty-card__icon {
    background: linear-gradient(135deg, #f2994a, #e46b1f);
}

.ride-empty-card__title {
    margin: 0 0 10px;
    font-size: 25px;
    line-height: 1.2;
    font-weight: 800;
    color: #182230;
}

.ride-empty-card__text {
    max-width: 560px;
    margin: 0 auto;
    font-size: 15px;
    line-height: 1.6;
    color: #667085;
}

.ride-empty-card__actions {
    margin-top: 22px;
    display: flex;
    justify-content: center;
    gap: 12px;
    flex-wrap: wrap;
}

.ride-empty-card__btn {
    min-height: 44px;
    padding: 11px 18px;
    border-radius: 12px;
    border: none;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
    transition: transform .18s ease, box-shadow .18s ease, background .18s ease;
}

.ride-empty-card__btn:hover {
    transform: translateY(-1px);
}

.ride-empty-card__btn--primary {
    color: #fff;
    background: linear-gradient(135deg, #2f80ed, #1f5fd1);
    box-shadow: 0 10px 22px rgba(47, 128, 237, 0.22);
}

.ride-empty-card__btn--secondary {
    color: #fff;
    background: linear-gradient(135deg, #f2994a, #e46b1f);
    box-shadow: 0 10px 22px rgba(228, 107, 31, 0.22);
}

.ride-empty-card__btn--ghost {
    color: #344054;
    background: #fff;
    border: 1px solid #dfe3e8;
}

.ride-empty-card__btn--ghost:hover {
    background: #f8fafc;
}

@media screen and (max-width: 768px) {
    .ride-empty-card {
        padding: 26px 16px;
        border-radius: 18px;
        margin-top: 6px;
    }

    .ride-empty-card__icon {
        width: 66px;
        height: 66px;
        font-size: 26px;
        margin-bottom: 14px;
    }

    .ride-empty-card__title {
        font-size: 21px;
    }

    .ride-empty-card__text {
        font-size: 14px;
    }

    .ride-empty-card__actions {
        gap: 10px;
    }

    .ride-empty-card__btn {
        width: 100%;
    }
}

.ride-view-switch {
    position: relative;
    display: grid;
    grid-template-columns: 1fr 1fr;
    align-items: center;
    gap: 0;
    max-width: 560px;
    padding: 5px;
    border-radius: 18px;
    background: linear-gradient(180deg, #eef3f8 0%, #e5ebf3 100%);
    box-shadow:
        inset 0 1px 0 rgba(255,255,255,0.75),
        0 8px 24px rgba(15, 23, 42, 0.08);
    overflow: hidden;
}

.ride-view-switch__thumb {
    position: absolute;
    top: 5px;
    left: 5px;
    width: calc(50% - 5px);
    height: calc(100% - 10px);
    border-radius: 14px;
    background: linear-gradient(135deg, #2f80ed, #1f5fd1);
    box-shadow:
        0 8px 20px rgba(47, 128, 237, 0.28),
        inset 0 1px 0 rgba(255,255,255,0.25);
    transition: transform 0.28s ease;
    z-index: 1;
}

.ride-view-switch.is-requests .ride-view-switch__thumb {
    transform: translateX(100%);
}

.ride-view-switch__item {
    position: relative;
    z-index: 2;
    min-height: 54px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 12px 16px;
    text-decoration: none;
    text-align: center;
    font-size: 15px;
    font-weight: 800;
    line-height: 1.2;
    color: #334155;
    transition: color 0.25s ease, transform 0.2s ease;
    -webkit-tap-highlight-color: transparent;
}

.ride-view-switch__item:hover {
    transform: translateY(-1px);
}

.ride-view-switch__item.is-active {
    color: #fff;
}

@media screen and (max-width: 768px) {
    .ride-view-switch {
        max-width: 100%;
        margin-bottom: 16px;
        border-radius: 16px;
        padding: 4px;
    }

    .ride-view-switch__thumb {
        top: 4px;
        left: 4px;
        width: calc(50% - 4px);
        height: calc(100% - 8px);
        border-radius: 12px;
    }

    .ride-view-switch__item {
        min-height: 48px;
        padding: 10px 8px;
        font-size: 16px;
        font-weight: 700;
    }
}

.ride-top-panel {
    display: flex;
    flex-direction: column;
    gap: 14px;
    margin-bottom: 16px;
}

.ride-search-card {
    background: linear-gradient(180deg, rgba(255,255,255,0.04), rgba(255,255,255,0.02));
    border: 1px solid rgba(255,255,255,0.10);
    border-radius: 18px;
    padding: 14px;
    box-shadow: 0 10px 24px rgba(0,0,0,0.18);
}

.ride-search-card__title {
    font-size: 15px;
    font-weight: 700;
    margin-bottom: 12px;
    color: #fff;
}

.ride-search-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 10px;
}

.ride-field {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.ride-field--full {
    grid-column: 1 / -1;
}

.ride-field__label {
    font-size: 12px;
    color: rgba(255,255,255,0.68);
    padding-left: 2px;
}

.ride-search-grid input,
.ride-search-grid select {
    width: 100%;
    min-height: 44px;
    border-radius: 12px;
    border: 1px solid rgba(255,255,255,0.12);
    background: rgba(255,255,255,0.04);
    color: #fff;
    padding: 0 14px;
    outline: none;
    box-sizing: border-box;
}

.ride-search-grid input:focus,
.ride-search-grid select:focus {
    border-color: rgba(58,134,255,0.85);
    box-shadow: 0 0 0 3px rgba(58,134,255,0.16);
}

.ride-search-actions {
    display: grid;
    grid-template-columns: 1fr;
    gap: 10px;
    margin-top: 12px;
}

.ride-quick-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
}

.ride-btn {
    min-height: 46px;
    border-radius: 14px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 0 14px;
    text-decoration: none;
    border: none;
    cursor: pointer;
    font-weight: 700;
    transition: .18s ease;
    box-sizing: border-box;
}

.ride-btn--primary {
    background: linear-gradient(135deg, #1ea7ff, #2f6bff);
    color: #fff;
}

.ride-btn--accent {
    background: linear-gradient(135deg, #2f80ff, #1b5fe0);
    color: #fff;
}

.ride-btn--ghost {
    background: rgba(255,255,255,0.05);
    color: #d8e5ff;
    border: 1px solid rgba(255,255,255,0.10);
}

.ride-btn--dark {
    background: rgba(255,255,255,0.04);
    color: #fff;
    border: 1px solid rgba(255,255,255,0.10);
}

.ride-btn--dark.is-active {
    border-color: rgba(58,134,255,0.85);
    box-shadow: 0 0 0 2px rgba(58,134,255,0.14) inset;
}

.ride-btn:hover {
    transform: translateY(-1px);
}

@media (min-width: 640px) {
    .ride-search-grid {
        grid-template-columns: 1fr 1fr;
    }

    .ride-search-actions {
        grid-template-columns: 1fr auto;
    }
}
/* =========================================================
   ТОЛЬКО ДЛЯ ride-top-panel
   Светлая тема по умолчанию
   Тёмная тема: body.dark-theme
   ========================================================= */

.ride-top-panel {
    --rt-text: #182230;
    --rt-muted: #667085;
    --rt-soft: #98a2b3;

    --rt-panel-bg: linear-gradient(180deg, #ffffff 0%, #f8fbff 100%);
    --rt-panel-border: #e4ebf3;
    --rt-panel-shadow:
        0 12px 28px rgba(15, 23, 42, 0.06),
        0 4px 10px rgba(15, 23, 42, 0.04);

    --rt-switch-bg: linear-gradient(180deg, #eef3f8 0%, #e5ebf3 100%);
    --rt-switch-text: #334155;
    --rt-switch-shadow:
        inset 0 1px 0 rgba(255,255,255,0.75),
        0 8px 24px rgba(15, 23, 42, 0.08);

    --rt-thumb-bg: linear-gradient(135deg, #2f80ed, #1f5fd1);
    --rt-thumb-shadow:
        0 8px 20px rgba(47, 128, 237, 0.28),
        inset 0 1px 0 rgba(255,255,255,0.25);

    --rt-input-bg: #ffffff;
    --rt-input-border: #d9e2ec;
    --rt-input-text: #182230;
    --rt-input-placeholder: #98a2b3;
    --rt-input-focus: 0 0 0 4px rgba(47, 128, 237, 0.14);

    --rt-summary-icon: #67a6ff;
    --rt-summary-hover: rgba(47, 128, 237, 0.05);

    --rt-btn-primary: linear-gradient(135deg, #1ea7ff, #2f6bff);
    --rt-btn-accent: linear-gradient(135deg, #2f80ff, #1b5fe0);
    --rt-btn-on: #ffffff;

    --rt-btn-ghost-bg: #ffffff;
    --rt-btn-ghost-text: #344054;
    --rt-btn-ghost-border: #dfe3e8;

    --rt-btn-dark-bg: #f8fafc;
    --rt-btn-dark-text: #182230;
    --rt-btn-dark-border: #dfe3e8;
    --rt-btn-dark-active-border: #6aa8ff;
    --rt-btn-dark-active-shadow: 0 0 0 2px rgba(47, 128, 237, 0.12) inset;
}

body.dark-theme .ride-top-panel {
    --rt-text: #f5f7fb;
    --rt-muted: #b3bfd1;
    --rt-soft: #8f9bb0;

    --rt-panel-bg: linear-gradient(180deg, #171c24 0%, #11161d 100%);
    --rt-panel-border: rgba(255,255,255,0.08);
    --rt-panel-shadow:
        0 16px 32px rgba(0,0,0,0.32),
        0 4px 12px rgba(0,0,0,0.20);

    --rt-switch-bg: linear-gradient(180deg, #212936 0%, #1a2230 100%);
    --rt-switch-text: #d5deea;
    --rt-switch-shadow:
        inset 0 1px 0 rgba(255,255,255,0.05),
        0 10px 24px rgba(0,0,0,0.28);

    --rt-thumb-bg: linear-gradient(135deg, #2f80ed, #1f5fd1);
    --rt-thumb-shadow:
        0 10px 24px rgba(31,95,209,0.38),
        inset 0 1px 0 rgba(255,255,255,0.12);

    --rt-input-bg: rgba(255,255,255,0.04);
    --rt-input-border: rgba(255,255,255,0.10);
    --rt-input-text: #ffffff;
    --rt-input-placeholder: rgba(255,255,255,0.36);
    --rt-input-focus: 0 0 0 4px rgba(58, 134, 255, 0.16);

    --rt-summary-icon: #8ec5ff;
    --rt-summary-hover: rgba(255,255,255,0.03);

    --rt-btn-ghost-bg: rgba(255,255,255,0.04);
    --rt-btn-ghost-text: #d8e5ff;
    --rt-btn-ghost-border: rgba(255,255,255,0.10);

    --rt-btn-dark-bg: rgba(255,255,255,0.04);
    --rt-btn-dark-text: #ffffff;
    --rt-btn-dark-border: rgba(255,255,255,0.10);
    --rt-btn-dark-active-border: rgba(58,134,255,0.85);
    --rt-btn-dark-active-shadow: 0 0 0 2px rgba(58,134,255,0.14) inset;
}

/* контейнер верхней части */
.ride-top-panel {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-bottom: 14px;
    color: var(--rt-text);
}

/* переключатель поездки / заявки */
.ride-view-switch {
    position: relative;
    display: grid;
    grid-template-columns: 1fr 1fr;
    align-items: center;
    gap: 0;
    max-width: 560px;
    padding: 5px;
    border-radius: 18px;
    background: var(--rt-switch-bg);
    border: 1px solid var(--rt-panel-border);
    box-shadow: var(--rt-switch-shadow);
    overflow: hidden;
}

.ride-view-switch__thumb {
    position: absolute;
    top: 5px;
    left: 5px;
    width: calc(50% - 5px);
    height: calc(100% - 10px);
    border-radius: 14px;
    background: var(--rt-thumb-bg);
    box-shadow: var(--rt-thumb-shadow);
    transition: transform 0.28s ease;
    z-index: 1;
}

.ride-view-switch.is-requests .ride-view-switch__thumb {
    transform: translateX(100%);
}

.ride-view-switch__item {
    position: relative;
    z-index: 2;
    min-height: 54px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 12px 16px;
    text-decoration: none;
    text-align: center;
    font-size: 15px;
    font-weight: 800;
    line-height: 1.2;
    color: var(--rt-switch-text);
    transition: color 0.25s ease, transform 0.2s ease;
    -webkit-tap-highlight-color: transparent;
}

.ride-view-switch__item:hover {
    transform: translateY(-1px);
}

.ride-view-switch__item.is-active {
    color: #fff;
}

/* быстрые кнопки */
.ride-quick-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
}

.ride-btn {
    min-height: 46px;
    border-radius: 14px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 0 14px;
    text-decoration: none;
    border: none;
    cursor: pointer;
    font-weight: 700;
    transition: .18s ease;
    box-sizing: border-box;
}

.ride-btn:hover {
    transform: translateY(-1px);
}

.ride-btn--primary {
    background: var(--rt-btn-primary);
    color: var(--rt-btn-on);
}

.ride-btn--accent {
    background: var(--rt-btn-accent);
    color: var(--rt-btn-on);
}

.ride-btn--ghost {
    background: var(--rt-btn-ghost-bg);
    color: var(--rt-btn-ghost-text);
    border: 1px solid var(--rt-btn-ghost-border);
}

.ride-btn--dark {
    background: var(--rt-btn-dark-bg);
    color: var(--rt-btn-dark-text);
    border: 1px solid var(--rt-btn-dark-border);
}

.ride-btn--dark.is-active {
    border-color: var(--rt-btn-dark-active-border);
    box-shadow: var(--rt-btn-dark-active-shadow);
}

/* панель фильтра */
.ride-search-panel {
    border-radius: 18px;
    background: var(--rt-panel-bg);
    border: 1px solid var(--rt-panel-border);
    box-shadow: var(--rt-panel-shadow);
    overflow: hidden;
}

.ride-search-summary {
    list-style: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 14px 16px;
    user-select: none;
    -webkit-tap-highlight-color: transparent;
    transition: background-color .18s ease;
}

.ride-search-summary:hover {
    background: var(--rt-summary-hover);
}

.ride-search-summary::-webkit-details-marker {
    display: none;
}

.ride-search-summary__left {
    display: flex;
    align-items: center;
    gap: 12px;
    min-width: 0;
}

.ride-search-summary__left i {
    width: 18px;
    flex: 0 0 18px;
    color: var(--rt-summary-icon);
}

.ride-search-summary__text {
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.ride-search-summary__text strong {
    font-size: 14px;
    color: var(--rt-text);
    line-height: 1.2;
}

.ride-search-summary__text span {
    font-size: 12px;
    color: var(--rt-muted);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.ride-search-summary__arrow {
    color: var(--rt-soft);
    transition: transform 0.22s ease;
    flex: 0 0 auto;
}

.ride-search-panel[open] .ride-search-summary__arrow {
    transform: rotate(180deg);
}

/* внутренняя форма */
.ride-search-card {
    background: transparent;
    border: none;
    box-shadow: none;
}

.ride-search-card--compact {
    margin: 0;
    padding: 0 14px 14px;
    background: transparent;
    border: none;
    box-shadow: none;
    border-radius: 0;
}

.ride-search-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 10px;
}

.ride-field {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.ride-field--full {
    grid-column: 1 / -1;
}

.ride-field__label {
    font-size: 12px;
    color: var(--rt-muted);
    padding-left: 2px;
}

.ride-search-grid input,
.ride-search-grid select {
    width: 100%;
    min-height: 44px;
    border-radius: 12px;
    border: 1px solid var(--rt-input-border);
    background: var(--rt-input-bg);
    color: var(--rt-input-text);
    padding: 0 14px;
    outline: none;
    box-sizing: border-box;
    color-scheme: light;
}

body.dark-theme .ride-search-grid input,
body.dark-theme .ride-search-grid select {
    color-scheme: dark;
}

.ride-search-grid input::placeholder {
    color: var(--rt-input-placeholder);
}

.ride-search-grid input:focus,
.ride-search-grid select:focus {
    border-color: #3a86ff;
    box-shadow: var(--rt-input-focus);
}

body.dark-theme .ride-search-grid input[type="date"]::-webkit-calendar-picker-indicator {
    filter: invert(1) brightness(1.2);
}

.ride-search-actions {
    display: grid;
    grid-template-columns: 1fr;
    gap: 10px;
    margin-top: 12px;
}

/* мобильная подстройка */
@media (min-width: 640px) {
    .ride-search-grid {
        grid-template-columns: 1fr 1fr;
    }

    .ride-search-actions {
        grid-template-columns: 1fr auto;
    }
    .ride-view-switch {
        width: 100%;
        max-width: 560px;
        margin-left: auto;
        margin-right: auto;
    }
}

@media (max-width: 768px) {
    .ride-top-panel {
        gap: 10px;
        margin-bottom: 12px;
    }

    .ride-view-switch {
        max-width: 100%;
        border-radius: 16px;
        padding: 4px;
    }

    .ride-view-switch__thumb {
        top: 4px;
        left: 4px;
        width: calc(50% - 4px);
        height: calc(100% - 8px);
        border-radius: 12px;
    }

    .ride-view-switch__item {
        min-height: 48px;
        padding: 10px 8px;
        font-size: 16px;
        font-weight: 700;
    }

    .ride-search-summary {
        padding: 12px 14px;
    }

    .ride-search-card--compact {
        padding: 0 12px 12px;
    }

    .ride-search-grid {
        grid-template-columns: 1fr;
        gap: 8px;
    }

    .ride-field {
        gap: 4px;
    }

    .ride-field__label {
        font-size: 11px;
    }

    .ride-search-grid input,
    .ride-search-grid select {
        min-height: 42px;
        border-radius: 11px;
        padding: 0 12px;
        font-size: 14px;
    }

    .ride-search-actions {
        grid-template-columns: 1fr;
        gap: 8px;
        margin-top: 10px;
    }

    .ride-quick-actions {
        grid-template-columns: 1fr 1fr;
        gap: 8px;
    }

    .ride-btn {
        min-height: 44px;
        border-radius: 12px;
        font-size: 14px;
        padding: 0 12px;
    }
}