:root {
  --primary-blue: #1CB5E0;
  --secondary-blue: #00B4D8;
  --dark-green: #0d7377;
  --icon-blue: #1CB5E0;
  --light-blue-bg: #e8f7fb;
  --light-blue-nav: #d4f2f9;
  --card-bg: #f0f9fd;
  --white: #ffffff;
  --progress-bar-bg: #eaf0f0;
  --accent-yellow: #D4FF00;
  --text-dark: #1a1a1a;
  --text-light: #ffffff;
  /* Reserve space for header when title is hidden */
  --no-brand-header-space: 56px;
  /* Layout helpers */
  /* Используем content-safe inset от Telegram, чтобы контент начинался под кнопками Close/⋯ */
  --app-top-offset: calc(10px + var(--tg-content-safe-area-inset-top, var(--tg-safe-area-inset-top, env(safe-area-inset-top, 0px))));
  --safe-bottom: var(--tg-content-safe-area-inset-bottom, var(--tg-safe-area-inset-bottom, env(safe-area-inset-bottom, 0px)));
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: 'Inter', sans-serif;
  background-color: var(--white);
  display: flex;
  justify-content: center;
  align-items: stretch;
  /* Растягиваем по вертикали, чтобы приложение могло упираться в низ */
  min-height: 100vh;
  margin: 0;
  /* Сверху оставляем безопасную зону, снизу убираем, чтобы нижняя навигация доходила до края */
  padding: 0;
  /* Убираем боковые отступы для полного экрана */
  overflow-x: hidden;
  /* ЗАПРЕТ ГОРИЗОНТАЛЬНОГО СКРОЛЛА: Нет мота влево-вправо, всё ровненько */
}

.app-screen {
  width: 100%;
  /* ПО БОКАМ: Полный размер экрана, без max-width для заполнения */
  max-width: 100%;
  /* По умолчанию на всю ширину */
  background-color: var(--white);
  border-radius: 0;
  /* Убираем скругления для полного экрана на мобильных */
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.1);
  /* Высота = высота окна, с верхним отступом для безопасной зоны */
  height: var(--tg-viewport-stable-height, 100vh);
  padding-top: var(--app-top-offset);
  max-height: none;
  /* Без искусственного ограничения */
  display: flex;
  flex-direction: column;
  overflow: hidden;
  margin: 0 auto;
  /* Центрирование по горизонтали без вертикальных отступов */
}

.app-content,
.map-page-container {
  flex-grow: 1;
  display: flex;
  flex-direction: column;
  padding: 0 28px;
  padding-bottom: 100px;
  /* Account for fixed bottom nav */
  gap: 16px;
  overflow-y: auto;
  overflow-x: hidden;
  /* Дополнительно: Нет горизонтального скролла внутри */
  /* Убрали верхний отступ - фото начинается сверху */
}

/* Общие стили */
.app-header {
  display: none !important;
  /* Полностью скрываем хедер - место займет фото велосипеда */
}

.app-header h1 {
  display: none !important;
}

.app-header.header-centered h1 {
  display: none !important;
}

/* Hide brand title on pages with no-brand */
body.no-brand .app-header h1 {
  display: none !important;
}

body.no-brand .app-header {
  display: none !important;
}

/* Center the secondary title on Telegram WebApp */
body.tg-webapp .app-main h2,
.app-main h2.tg-centered-title {
  text-align: center;
}

/* Стили для главной */
.bike-image {
  width: 100%;
  height: auto;
  object-fit: contain;
  /* Сохраняет пропорции изображения */
  display: block;
  margin: 0;
  padding: 0;
  transition: opacity 0.3s ease-in-out;
  max-width: 100%;
  /* Увеличиваем изображение - занимает место хедера */
  min-height: 320px;
  /* Увеличенная минимальная высота */
}



/* Контейнер для изображения велосипеда и динамической подписи. Делаем его позиционированным, чтобы можно было располагать текст поверх картинки. */
.bike-image-wrapper {
  position: relative;
  margin-top: 0;
  margin-left: -28px;
  margin-right: -28px;
  /* Выводим фото за пределы боковых отступов контента - на всю ширину */
  width: calc(100% + 56px);
  /* Компенсируем боковые отступы app-content */
}


/* Стилизуем подпись на багажнике велосипеда. Этот блок отображает либо номер велосипеда, либо выбранный тариф (Бронза, Серебро, Золото). */
.bike-label {
  position: absolute;
  /* Располагаем текст примерно в левом верхнем углу багажника */
  top: 12px;
  left: 20px;
  padding: 2px 8px;
  background-color: #0d0d0d;
  color: #ffffff;
  border-radius: 6px;
  font-size: 0.85rem;
  font-weight: 700;
  line-height: 1.2;
  pointer-events: none;
  /* чтобы клики проходили сквозь */
}

.progress-section {
  width: 100%;
}

.progress-bar-container {
  background-color: var(--progress-bar-bg);
  border-radius: 10px;
  height: 10px;
  overflow: hidden;
}

.progress-bar {
  width: 10%;
  height: 100%;
  background-color: var(--dark-green);
  border-radius: 10px;
  transition: width 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94), background-color 0.5s ease;
  /* Добавлено для плавности */
}

.progress-labels {
  display: flex;
  justify-content: space-between;
  margin-top: 8px;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--dark-green);
}

.app-main h2 {
  font-size: 1.6rem;
  font-weight: 700;
  color: var(--text-dark);
  line-height: 1.3;
  margin: 10px 0;
  text-align: center;
}

.info-cards {
  display: flex;
  gap: 15px;
  margin-top: 15px;
  /* Добавлено */
}

.card {
  flex: 1;
  background-color: var(--card-bg);
  border-radius: 20px;
  padding: 15px;
  display: flex;
  align-items: center;
  gap: 12px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.12);
}

.icon-wrapper {
  width: 45px;
  height: 45px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--primary-blue), var(--secondary-blue));
  display: flex;
  justify-content: center;
  box-shadow: 0 4px 12px rgba(28, 181, 224, 0.25);
  align-items: center;
  flex-shrink: 0;
}

.icon-wrapper svg {
  color: var(--white);
  width: 24px;
  height: 24px;
}

.icon-wrapper.dollar svg {
  width: 20px;
  height: 20px;
}

.text-content {
  display: flex;
  flex-direction: column;
}

.text-content span {
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--text-dark);
}

.text-content strong {
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--text-dark);
}

.action-buttons {
  display: flex;
  flex-direction: column;
  gap: 15px;
  margin-top: 10px;
}

.btn {
  border-radius: 18px;
  font-family: 'Inter', sans-serif;
  font-weight: 600;
  cursor: pointer;
  border: none;
  transition: transform 0.2s ease, opacity 0.2s ease;
  /* Добавлено */
  padding: 20px 10px;
}

.btn:hover {
  opacity: 0.9;
}

.btn:active {
  transform: scale(0.97);
  /* Легкое нажатие */
}

.btn-primary {
  background: linear-gradient(135deg, var(--primary-blue), var(--secondary-blue));
  color: var(--white);
  font-size: 1.1rem;
  width: 100%;
  box-shadow: 0 4px 15px rgba(28, 181, 224, 0.3);
}

.btn-primary:hover {
  box-shadow: 0 6px 20px rgba(28, 181, 224, 0.4);
}

/* Специальный класс для акцентных кнопок */
.btn-primary.btn-accent {
  background: var(--accent-yellow) !important;
  color: #1a1a1a !important;
  font-weight: 600;
  box-shadow: 0 4px 16px rgba(212, 255, 0, 0.4) !important;
}

.btn-primary.btn-accent:hover {
  background: #c4ef00 !important;
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(212, 255, 0, 0.5) !important;
}

.secondary-actions {
  display: grid;
  grid-template-columns: auto 1fr 1fr;
  gap: 15px;
}

.btn-secondary {
  background-color: var(--white);
  color: var(--primary-blue);
  font-size: 1rem;
  border: 2px solid var(--primary-blue);
  padding: 18px 10px;
}

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

.btn-secondary:first-child {
  padding: 18px 22px;
}

.btn-danger {
  background-color: var(--white);
  /* Белый фон */
  color: #e53e3e;
  /* Красный текст */
  font-size: 1rem;
  border: 2px solid #e53e3e;
  /* Красная рамка */
}

.btn-secondary svg {
  color: var(--dark-green);
  width: 22px;
  height: 22px;
  display: block;
  margin: 0 auto;
}

/* Стили для страницы статистики */
.stats-graph {
  display: flex;
  justify-content: space-around;
  align-items: flex-end;
  height: 180px;
  background-color: var(--card-bg);
  border-radius: 20px;
  padding: 20px 15px;
  margin-top: 10px;
}

.graph-bar-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  height: 100%;
  justify-content: flex-end;
}

.bar {
  width: 25px;
  background-color: var(--dark-green);
  border-radius: 6px;
  transition: height 0.4s ease;
}

.bar.active {
  background-color: var(--icon-blue);
  box-shadow: 0 2px 8px rgba(74, 123, 167, 0.4);
  transform: scaleY(1.1);
}

.day {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--dark-green);
}

.history-list {
  margin-top: 15px;
  display: flex;
  flex-direction: column;
  gap: 12px; /* Reduced gap between items */
}

.history-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background-color: var(--white);
  padding: 12px 15px; /* Adjusted padding */
  border-radius: 20px;
  border: 1px solid var(--progress-bar-bg); /* Lighter border */
  gap: 10px; /* Gap between info and cost */
}

.history-info {
    display: flex;
    align-items: center;
    gap: 15px; /* Space between icon and text */
    flex-grow: 1;
    min-width: 0;
}

.history-item-left {
  display: flex;
  align-items: center;
  gap: 15px;
}

.history-icon-wrapper {
  width: 50px;
  height: 50px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.history-icon-wrapper.trip {
  background-color: var(--icon-blue);
}

.history-icon-wrapper.repair {
  background-color: #f5a623;
}

.history-icon-wrapper.topup,
.history-icon-wrapper.top-up {
  background-color: #23a2f5;
  /* Синий цвет для пополнений */
}

.history-icon-wrapper.rental,
.history-icon-wrapper.initial {
  background-color: var(--icon-blue);
  /* Синий для аренды */
}

.history-icon-wrapper.renewal {
  background-color: #7c3aed;
  /* Фиолетовый для продления */
}

.history-icon-wrapper.booking {
  background-color: #f59e0b;
  /* Оранжевый для бронирования */
}

.history-icon-wrapper.balance_debit {
  background-color: #ef4444;
  /* Красный для списания */
}

.history-icon-wrapper.refund_to_balance {
  background-color: #40A4DF;
  /* Лазурный для возврата */
}

.history-icon-wrapper.adjustment {
  background-color: #6b7280;
  /* Серый для корректировки */
}

.history-icon-wrapper svg {
  color: var(--white);
  width: 26px;
  height: 26px;
}

.history-details {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.history-title {
  font-weight: 600;
  color: var(--text-dark);
  font-size: 1.05rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.history-subtitle {
  font-weight: 500;
  color: #556f6b;
  font-size: 0.9rem;
  white-space: normal;
  line-height: 1.2;
}

.history-status {
  display: inline-block;
  padding: 2px 10px;
  border-radius: 999px;
  font-weight: 600;
  font-size: 0.75rem;
  width: max-content;
}

.history-status.success {
  background: #e6fffa;
  color: #0f766e;
  border: 1px solid #99f6e4;
}

.history-status.warning {
  background: #fff5e6;
  color: #8a5a00;
  border: 1px solid #ffd89a;
}

.history-status.error {
  background: #ffe4e6;
  color: #9f1239;
  border: 1px solid #fecdd3;
}

.history-status.neutral {
  background: #f1f5f9;
  color: #475569;
  border: 1px solid #cbd5e1;
}

.history-cost {
  font-weight: 700;
  font-size: 1.15rem;
  color: var(--text-dark);
  white-space: nowrap;
  /* Prevent wrapping */
  flex-shrink: 0;
  /* Prevent shrinking in flex container */
}

.history-cost.positive {
  color: var(--icon-blue);
}

.empty-history {
  text-align: center;
  color: #556f6b;
  font-size: 1rem;
  padding: 40px 20px;
}

/* Стили для страницы карты */
.map-page-container {
  position: relative;
  padding: 0;
  overflow: hidden;
}

#map {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
}

/* Full screen map for map.html */
body:has(.map-page-container) .app-screen {
  border-radius: 0 !important;
  max-width: 100% !important;
  height: 100vh !important;
  max-height: none !important;
  position: fixed !important;
  top: 0 !important;
  left: 0 !important;
  right: 0 !important;
  bottom: 0 !important;
}

body:has(.map-page-container) .map-page-container {
  height: 100vh !important;
  position: relative !important;
}

body:has(.map-page-container) #map {
  height: 100vh !important;
  position: absolute !important;
  top: 0 !important;
  left: 0 !important;
  right: 0 !important;
  bottom: 0 !important;
}


/* Более агрессивный и надежный способ скрыть панель с копирайтами и ссылками Яндекса */
[class*="copyrights-pane"],
[class*="gotoymaps"],
[class*="ymaps-2"][class*="-copyrights"] {
  display: none !important;
}

.recenter-btn {
  position: absolute;
  top: 25px;
  right: 25px;
  z-index: 10;
  width: 50px;
  height: 50px;
  border-radius: 50%;
  background-color: var(--white);
  border: none;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

.recenter-btn svg {
  color: var(--dark-green);
}

.info-card {
  position: absolute;
  bottom: -100%;
  left: 0;
  right: 0;
  background-color: var(--white);
  padding: 20px;
  padding-top: 35px;
  border-top-left-radius: 30px;
  border-top-right-radius: 30px;
  box-shadow: 0 -5px 30px rgba(0, 0, 0, 0.15);
  z-index: 1600;
  transition: bottom 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
  display: flex;
  flex-direction: column;
  gap: 15px;
}

.info-card.visible {
  bottom: 0;
}

.card-handle {
  position: absolute;
  top: 10px;
  left: 50%;
  transform: translateX(-50%);
  width: 40px;
  height: 5px;
  background-color: var(--progress-bar-bg);
  border-radius: 3px;
}

.info-card h3 {
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--text-dark);
  text-align: center;
}

.card-stats {
  display: flex;
  justify-content: space-around;
  gap: 15px;
}

.stat-item {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.95rem;
  color: #556f6b;
}

.stat-item strong {
  color: var(--text-dark);
  font-weight: 600;
}

.stat-item svg {
  color: var(--icon-blue);
}

.info-card .btn-primary {
  padding: 18px;
  font-size: 1rem;
}

/* Стили для страницы профиля */
.app-main.profile-main {
  display: flex;
  flex-direction: column;
  gap: 25px;
  align-items: center;
}

.profile-header {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  margin-top: 10px;
}

.avatar {
  width: 100px;
  height: 100px;
  border-radius: 50%;
  border: 4px solid var(--card-bg);
}

.user-name {
  font-size: 1.8rem;
  font-weight: 700;
  color: var(--text-dark);
  margin-top: 10px;
}

.user-id {
  font-size: 1rem;
  font-weight: 500;
  color: #556f6b;
}

.profile-menu {
  display: flex;
  flex-direction: column;
  width: 100%;
  margin-top: 20px;
}

.menu-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 0;
  text-decoration: none;
}

.menu-item-left {
  display: flex;
  align-items: center;
  gap: 20px;
}

.menu-item-icon {
  color: var(--dark-green);
}

.menu-item-text {
  font-size: 1rem;
  font-weight: 600;
  color: var(--text-dark);
}

.menu-item-chevron {
  color: #c8d3d1;
}

.menu-divider {
  border: none;
  height: 1px;
  background-color: #eaf0f0;
  margin: 0;
}

.logout-button {
  margin-top: auto;
  padding: 20px;
  background: none;
  border: none;
  font-family: 'Inter', sans-serif;
  font-size: 1rem;
  font-weight: 600;
  color: #e53e3e;
  cursor: pointer;
  width: 100%;
}

/* Общая навигация */
/* Общая навигация */
.bottom-nav {
  background-color: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(10px);
  border-radius: 25px;
  padding: 12px;
  box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.1);
  display: flex;
  justify-content: space-around;
  align-items: center;
  flex-shrink: 0;
  position: fixed;
  z-index: 12;

  /* === ИСПРАВЛЕНИЕ: Надёжное центрирование === */
  /* Привязываем к краям экрана с отступом в 20px */
  left: 20px;
  right: 20px;
  bottom: 20px;
  /* Ширина определяется автоматически на основе привязки к краям */
  width: auto;
  /* Задаем максимальную ширину для больших экранов */
  max-width: calc(420px - 40px);
  /* Автоматические отступы слева и справа центрируют элемент */
  margin-left: auto;
  margin-right: auto;

  /* Сохраняем исходный отступ для безопасной зоны снизу */
  padding-bottom: calc(12px + var(--safe-bottom));
}

/* stats.html bar chart zero value */
.stats-graph .bar.zero-value {
    background-color: var(--progress-bar-bg);
}

/* stats.html calendar */
.period-picker {
    display: flex;
    gap: 10px;
    align-items: center;
    margin-bottom: 20px;
}

.period-picker input[type="date"] {
    width: 100%;
    padding: 16px;
    background-color: var(--card-bg);
    border: 1px solid transparent;
    border-radius: 16px;
    font-size: 1rem;
    color: var(--dark-green);
    font-family: 'Inter', sans-serif;
    transition: all 0.2s ease;
}

.period-picker input[type="date"]:focus {
    outline: none;
    border-color: var(--icon-blue);
    background-color: var(--white);
    box-shadow: 0 0 0 3px rgba(74, 123, 167, 0.2);
}

.period-separator {
    font-weight: 600;
    color: var(--dark-green);
}


.nav-item {
  cursor: pointer;
  padding: 8px;
  border-radius: 50%;
  position: relative;
  display: flex;
  justify-content: center;
  align-items: center;
}

.nav-item.active {
  background: linear-gradient(135deg, var(--primary-blue), var(--secondary-blue));
  box-shadow: 0 4px 12px rgba(28, 181, 224, 0.3);
}

.nav-item svg {
  color: var(--primary-blue);
  width: 28px;
  height: 28px;
}

.nav-item.active svg {
  color: var(--white);
}

.nav-item a {
  text-decoration: none;
  display: flex;
}

/* Анимация колокольчика */
.nav-item.bell-animation {
  animation: bellAnimation 0.5s ease-in-out;
}

@keyframes bellAnimation {
  0% { transform: rotate(0); }
  25% { transform: rotate(15deg); }
  50% { transform: rotate(-15deg); }
  75% { transform: rotate(15deg); }
  100% { transform: rotate(0); }
}

.app-main.registration-main {
  gap: 0;
}

#registration-form {
  display: flex;
  flex-direction: column;
  width: 100%;
  text-align: left;
  gap: 20px;
  margin-top: 20px;
}

.form-group {
  position: relative;
}

.form-group label {
  display: block;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--dark-green);
  margin-bottom: 8px;
}

#registration-form input[type="text"],
#registration-form input[type="tel"] {
  width: 100%;
  padding: 16px;
  background-color: var(--card-bg);
  border: 1px solid transparent;
  border-radius: 16px;
  font-size: 1rem;
  color: var(--dark-green);
  font-family: 'Inter', sans-serif;
  transition: all 0.2s ease;
}

#registration-form input::placeholder {
  color: #a0b5b1;
}

#registration-form input:focus {
  outline: none;
  border-color: var(--icon-blue);
  background-color: var(--white);
  box-shadow: 0 0 0 3px rgba(74, 123, 167, 0.2);
}

#registration-form input.error {
  border-color: #e53e3e !important;
}

.options-group {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 10px;
}

.option-btn {
  padding: 14px 5px;
  background-color: var(--card-bg);
  color: var(--dark-green);
  border: 1px solid transparent;
  border-radius: 12px;
  font-size: 0.9rem;
  font-weight: 600;
  font-family: 'Inter', sans-serif;
  cursor: pointer;
  text-align: center;
  transition: all 0.2s ease;
}

.option-btn.selected {
  background-color: var(--dark-green);
  color: var(--white);
  border-color: var(--dark-green);
}

.option-btn.error-border {
  border-color: #e53e3e !important;
}

.form-divider {
  border: none;
  height: 1px;
  background-color: #eaf0f0;
  margin: 10px 0;
}

.validation-message {
  color: #e53e3e;
  font-size: 0.9rem;
  text-align: center;
  margin-top: 15px;
  display: none;
  font-weight: 500;
}

/* === СТИЛИ ДЛЯ КНОПОК ВХОДА ЧЕРЕЗ СТОРОННИЕ СЕРВИСЫ (SSO) === */
.sso-container {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-top: 10px;
}

.separator {
  display: flex;
  align-items: center;
  text-align: center;
  color: #a0b5b1;
  margin: 10px 0;
  font-size: 0.9rem;
  font-weight: 500;
}

.separator::before,
.separator::after {
  content: '';
  flex: 1;
  border-bottom: 1px solid #eaf0f0;
}

.separator:not(:empty)::before {
  margin-right: .75em;
}

.separator:not(:empty)::after {
  margin-left: .75em;
}

.sso-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 14px;
  border-radius: 16px;
  text-decoration: none;
  font-weight: 600;
  font-size: 1rem;
  font-family: 'Inter', sans-serif;
  transition: opacity 0.2s ease;
  border: none;
}

.sso-btn:hover {
  opacity: 0.9;
}

.sso-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  margin-right: 12px;
  height: 24px;
}

.sso-icon svg {
  height: 100%;
  width: auto;
}

.sso-text {
  line-height: 1;
}

/* --- Фирменные стили для каждой кнопки --- */

/* 1. Госуслуги */
.sso-btn--gosuslugi {
  background-color: #0d4cd3;
  color: white;
}

.sso-btn--gosuslugi .sso-icon svg {
  height: 28px;
}

/* 2. Яндекс ID */
.sso-btn--yandex {
  background-color: #000000;
  color: white;
}

/* 3. Tinkoff ID */
.sso-btn--tinkoff {
  background-color: #ffdd2d;
  color: #333333;
}

.sso-btn--tinkoff .sso-icon svg {
  height: 26px;
  width: 50px;
}

/* === СТИЛИ ДЛЯ МОДАЛЬНОГО ОКНА QR-КОДА === */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.6);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 1000;
  opacity: 1;
  transition: opacity 0.3s ease;
}

.modal-overlay.hidden {
  opacity: 0;
  pointer-events: none;
}

.modal-content {
  background-color: var(--white);
  padding: 25px;
  border-radius: 24px;
  width: 90%;
  max-width: 380px;
  /* Вернули ближе к оригиналу, но с отступами */
  text-align: center;
  position: relative;
  transform: scale(1);
  transition: transform 0.3s ease;
}

.modal-overlay.hidden .modal-content {
  transform: scale(0.9);
}

.modal-content h2 {
  color: var(--text-dark);
  font-size: 1.5rem;
  margin-bottom: 20px;
  line-height: 1.3;
}

/* ОБНОВЛЕННЫЕ СТИЛИ */
.bike-specs {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-bottom: 20px;
  text-align: left;
}

.spec-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 1rem;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--progress-bar-bg);
}

.spec-item:last-child {
  border-bottom: none;
}

.spec-label {
  color: #556f6b;
}

.spec-value {
  color: var(--dark-green);
  font-weight: 600;
}

/* КОНЕЦ ОБНОВЛЕНИЯ */

.modal-info {
  display: flex;
  justify-content: space-around;
  background-color: var(--card-bg);
  padding: 15px;
  border-radius: 16px;
  margin-bottom: 25px;
}

.modal-info span {
  font-size: 1rem;
  color: var(--dark-green);
}

.modal-info span strong {
  font-weight: 700;
}

.modal-close {
  position: absolute;
  top: 10px;
  right: 15px;
  background: none;
  border: none;
  font-size: 2rem;
  color: #c8d3d1;
  cursor: pointer;
}

.modal-content .btn-primary {
  width: 100%;
  padding: 18px;
}

/* === СТИЛИ ДЛЯ УВЕДОМЛЕНИЯ (ТОСТА) === */
.toast-container {
  position: fixed;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%);
  width: 90%;
  max-width: 400px;
  /* Вернули оригинал, полный размер */
  background-color: var(--dark-green);
  color: var(--white);
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 15px 20px;
  border-radius: 16px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.25);
  z-index: 2000;
  transition: transform 0.4s ease, opacity 0.4s ease;
  opacity: 1;
}

.toast-container.hidden {
  opacity: 0;
  transform: translate(-50%, 100px);
  pointer-events: none;
}

.toast-container.toast-success {
  background-color: var(--icon-blue);
  /* Используем фирменный синий цвет */
}

.toast-message {
  font-size: 0.9rem;
  line-height: 1.4;
  font-weight: 500;
  text-align: center;
}

.toast-message strong {
  font-weight: 700;
}

/* === СТИЛИ ДЛЯ КЛИКАБЕЛЬНОЙ КАРТОЧКИ БАЛАНСА === */
#balance-card {
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

#balance-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 15px rgba(0, 0, 0, 0.05);
}

/* === СТИЛИ ДЛЯ МОДАЛЬНОГО ОКНА ПОПОЛНЕНИЯ === */
.modal-content .modal-form-group {
  text-align: left;
  margin-bottom: 25px;
  margin-top: 10px;
}

.modal-content .modal-form-group label {
  display: block;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--dark-green);
  margin-bottom: 8px;
}

.modal-content input[type="number"] {
  width: 100%;
  padding: 16px;
  background-color: var(--card-bg);
  border: 2px solid var(--card-bg);
  border-radius: 16px;
  font-size: 1.1rem;
  font-weight: 500;
  color: var(--dark-green);
  font-family: 'Inter', sans-serif;
  transition: all 0.2s ease;
  appearance: textfield;
  -moz-appearance: textfield;
}

.modal-content input::-webkit-outer-spin-button,
.modal-content input::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

.modal-content input[type="number"]::placeholder {
  color: #a0b5b1;
}

.modal-content input[type="number"]:focus {
  outline: none;
  border-color: var(--icon-blue);
  background-color: var(--white);
}

/* === СТИЛИ ДЛЯ ВЫБОРА ГОРОДА === */
.city-selection-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.city-option {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px 18px;
  background: #f7fafb;
  border-radius: 12px;
  cursor: pointer;
  transition: all 0.2s ease;
  border: 2px solid transparent;
}

.city-option:hover {
  background: #e8f3f7;
  transform: translateX(4px);
}

.city-option.selected {
  background: #e8f3f7;
  border-color: var(--icon-blue);
}

.city-option svg:first-child {
  color: var(--icon-blue);
  flex-shrink: 0;
}

.city-option span {
  flex: 1;
  font-size: 1.05rem;
  font-weight: 500;
  color: var(--dark-green);
}

.city-option .city-check {
  color: var(--icon-blue);
  flex-shrink: 0;
}

.city-option .city-check.hidden {
  display: none;
}

.btn-sbp {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 10px;
  padding: 12px 10px;
}

.btn-sbp svg {
  width: 85px;
  /* Размер логотипа */
  height: auto;
}

.btn-sbp span {
  font-size: 1.1rem;
  line-height: 1;
}

/* === СТИЛИ ДЛЯ ТЕКСТА-ДИСКЛЕЙМЕРА В МОДАЛКЕ === */
.disclaimer-text {
  font-size: 0.8rem;
  color: #889996;
  /* Слегка приглушенный цвет */
  margin-top: -5px;
  /* Чуть ближе к блоку "Цена/Срок" */
  margin-bottom: 20px;
  text-align: center;
  line-height: 1.4;
}

/* === СТИЛИ ДЛЯ ВТОРИЧНЫХ ДЕЙСТВИЙ === */

/* Стили для модального окна ввода ID */
#id-input-modal input[type="text"] {
  width: 100%;
  padding: 16px;
  background-color: var(--card-bg);
  border: 2px solid var(--card-bg);
  border-radius: 16px;
  font-size: 1.1rem;
  font-weight: 500;
  color: var(--dark-green);
  font-family: 'Inter', sans-serif;
  transition: all 0.2s ease;
  text-align: center;
}

#id-input-modal input[type="text"]::placeholder {
  color: #a0b5b1;
}

#id-input-modal input[type="text"]:focus {
  outline: none;
  border-color: var(--icon-blue);
  background-color: var(--white);
}

/* Стили для модального окна списка бронирования */
.bike-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-top: 20px;
  width: 100%;
}

.bike-list-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 18px 20px;
  background-color: var(--card-bg);
  border-radius: 16px;
  cursor: pointer;
  transition: background-color 0.2s ease, transform 0.2s ease;
}

.bike-list-item:hover {
  background-color: var(--light-blue-bg);
  transform: scale(1.03);
}

.bike-list-item strong {
  font-weight: 600;
  color: var(--dark-green);
}

.bike-list-item span {
  font-weight: 500;
  color: var(--icon-blue);
}

/* === СТИЛИ ДЛЯ ДИНАМИЧЕСКОЙ СТРАНИЦЫ ИСТОРИИ === */

/* Специальный отступ для списка тарифов PRIZMATIC */
#tariff-modal .bike-list {
  margin-bottom: 40px;
  /* Увеличиваем нижний отступ списка тарифов */
}

#tariff-modal .disclaimer-text {
  margin-top: 0;
  /* Убираем верхний отступ для текста с условиями */
}

/* ===== СТИЛИ ДЛЯ ЭКРАНА ВЕРИФИКАЦИИ ===== */

/* Добавляем класс для центрирования заголовка */
.header-centered {
  text-align: center;
}

.verification-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding-top: 20px;
  gap: 25px;
  width: 100%;
}

.verification-header {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--dark-green);
}

.verification-status-card {
  background-color: var(--card-bg);
  border-radius: 20px;
  padding: 20px;
  width: 100%;
}

.verification-status-info {
  text-align: left;
  width: 100%;
}

.verification-status-info h3 {
  font-size: 1.2rem;
  font-weight: 600;
  color: var(--dark-green);
}

.verification-status-info .progress-bar-container {
  margin: 8px 0;
}

.verification-status-info .progress-bar {
  width: 66%;
  background-color: var(--dark-green);
}

.verification-status-info p {
  font-size: 0.9rem;
  color: #556f6b;
}

/* Ключевое изменение: сетка действий */
.actions-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  /* Всегда 2 колонки */
  gap: 15px;
  width: 100%;
}

.action-card {
  background-color: var(--card-bg);
  border: none;
  border-radius: 20px;
  padding: 15px;
  /* Уменьшаем паддинг для компактности */
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  /* Центрируем контент */
  gap: 10px;
  font-weight: 600;
  color: var(--dark-green);
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  aspect-ratio: 1 / 0.8;
  /* Делаем карточки пропорциональными */
  outline: none;
}

.action-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 15px rgba(0, 0, 0, 0.05);
}

.action-card .icon-wrapper {
  background-color: var(--icon-blue);
}

/* ===== НОВЫЕ СТИЛИ ДЛЯ КРАСИВОЙ ФОРМЫ РЕГИСТРАЦИИ ===== */

.client-photo-wrapper {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px;
  background-color: var(--card-bg);
  border-radius: 16px;
}

.client-photo-thumb {
  max-width: 100%;
  border-radius: 12px;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.08);
}

.client-photo-caption {
  font-size: 0.85rem;
  color: #556f6b;
  text-align: center;
}

.verification-animation {
  display: flex;
  justify-content: center;
  margin-bottom: 18px;
}

.verification-loader {
  position: relative;
  width: 72px;
  height: 72px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.verification-loader span {
  position: absolute;
  width: 100%;
  height: 100%;
  border-radius: 50%;
  border: 3px solid rgba(20, 255, 236, 0.22);
  animation: verification-pulse 1.9s infinite;
}

.verification-loader span.delay {
  animation-delay: 0.25s;
}

.verification-loader span.delay-2 {
  animation-delay: 0.5s;
}

.verification-loader.warning span {
  border-color: rgba(229, 62, 62, 0.28);
}

.verification-icon {
  width: 46px;
  height: 46px;
  border-radius: 50%;
  background: radial-gradient(circle at top, #14FFEC 0%, #0d7377 65%);
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  box-shadow: 0 10px 25px rgba(13, 115, 119, 0.25);
  position: relative;
  z-index: 1;
}

.verification-loader.warning .verification-icon {
  background: radial-gradient(circle at top, #ffd7d7 0%, #e53e3e 65%);
  box-shadow: 0 10px 25px rgba(229, 62, 62, 0.25);
}

@keyframes verification-pulse {
  0% {
    transform: scale(0.6);
    opacity: 0.6;
  }
  50% {
    transform: scale(1);
    opacity: 0.15;
  }
  100% {
    transform: scale(1.2);
    opacity: 0;
  }
}

/* 1. Стилизация выпадающих списков (select) */
select.form-control {
  width: 100%;
  padding: 16px;
  background-color: var(--card-bg);
  border: 2px solid var(--card-bg);
  border-radius: 16px;
  font-size: 1rem;
  color: var(--dark-green);
  font-family: 'Inter', sans-serif;
  transition: all 0.2s ease;
  -webkit-appearance: none;
  /* Убираем стандартную стрелку в Chrome/Safari */
  -moz-appearance: none;
  /* Убираем стандартную стрелку в Firefox */
  appearance: none;
  /* Убираем стандартную стрелку в современных браузерах */
  /* Добавляем свою кастомную стрелку */
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='%23083830' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 16px center;
  background-size: 1.2em;
  cursor: pointer;
}

select.form-control:focus {
  outline: none;
  border-color: var(--icon-blue);
  background-color: var(--white);
}

/* 2. Стилизация кнопок выбора файла (input[type="file"]) */
.file-upload-wrapper {
  position: relative;
  display: flex;
  align-items: center;
  width: 100%;
}

.file-upload-label {
  display: inline-block;
  padding: 10px 16px;
  background-color: var(--icon-blue);
  color: var(--white);
  border-radius: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: background-color 0.2s ease;
  flex-shrink: 0;
}

.file-upload-label:hover {
  background-color: var(--dark-green);
}

.file-upload-input {
  /* Полностью прячем стандартный инпут */
  display: none;
}

.file-name {
  margin-left: 15px;
  color: #556f6b;
  font-size: 0.9rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* 3. Стилизация чекбокса */
.custom-checkbox {
  display: flex;
  align-items: center;
  cursor: pointer;
  user-select: none;
}

.custom-checkbox input[type="checkbox"] {
  display: none;
  /* Прячем стандартный чекбокс */
}

.custom-checkbox .checkbox-visual {
  display: inline-block;
  width: 22px;
  height: 22px;
  background-color: var(--card-bg);
  border: 2px solid var(--card-bg);
  border-radius: 6px;
  margin-right: 12px;
  position: relative;
  transition: all 0.2s ease;
  flex-shrink: 0;
}

/* Галочка внутри чекбокса (появляется при выборе) */
.custom-checkbox .checkbox-visual::after {
  content: '';
  position: absolute;
  top: 2px;
  left: 6px;
  width: 6px;
  height: 12px;
  border: solid var(--white);
  border-width: 0 3px 3px 0;
  transform: rotate(45deg);
  opacity: 0;
  transition: opacity 0.2s ease;
}

/* Стили для выбранного состояния */
.custom-checkbox input[type="checkbox"]:checked+.checkbox-visual {
  background-color: var(--icon-blue);
  border-color: var(--icon-blue);
}

.custom-checkbox input[type="checkbox"]:checked+.checkbox-visual::after {
  opacity: 1;
}

/* 4. Более красивый разделитель */
.form-separator {
  text-align: center;
  color: #a0b5b1;
  font-weight: 500;
  margin: 20px 0 10px;
  border: 0;
  border-top: 1px solid #eaf0f0;
}

.form-separator p {
  background: var(--white);
  padding: 0 10px;
  transform: translateY(-50%);
  display: inline-block;
}

/* ------------------------------------------------------------------ PRIZMATIC Main Menu Overlay При выборе провайдера PRIZMATIC отображается полноэкранное меню‑оверлей. Оно фиксируется поверх всего контента, затемняет фон и размывает его, а само меню выезжает снизу. Используются существующие переменные для цветов, чтобы сохранить фирменный стиль. Кнопки имеют два состояния: primary (главная — «Тарифы PRIZMATIC») и secondary для остальных действий. Активное нажатие смещает элемент на пару пикселей вниз, создавая ощущение нажатия. */
.menu-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.3);
  backdrop-filter: blur(16px);
  display: flex;
  justify-content: center;
  align-items: flex-end;
  z-index: 2000;
  padding: 20px;
}

.menu-overlay.hidden {
  display: none;
}

.menu-container {
  width: 100%;
  max-width: 420px;
  /* Вернули полный размер */
  background: var(--white);
  border-radius: 30px 30px 0 0;
  padding: 24px;
  box-shadow: 0 -10px 30px rgba(0, 0, 0, 0.1);
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.menu-close-btn {
  align-self: flex-end;
  background: none;
  border: none;
  font-size: 1.8rem;
  line-height: 1;
  color: var(--dark-green);
  cursor: pointer;
}

.menu-items {
  display: flex;
  flex-direction: column;
  gap: 15px;
}

.menu-item-btn {
  width: 100%;
  border: none;
  border-radius: 20px;
  padding: 18px;
  font-size: 1.1rem;
  font-weight: 600;
  font-family: 'Inter', sans-serif;
  cursor: pointer;
  transition: transform 0.2s;
}

.menu-item-btn.primary {
  background: linear-gradient(135deg, var(--primary-blue) 0%, var(--icon-blue) 100%);
  color: var(--white);
}

.menu-item-btn.secondary {
  background: var(--card-bg);
  color: var(--dark-green);
}

.menu-item-btn:active {
  transform: translateY(2px);
}

/* === Продления и списки вариантов для тарифов === */
.tariff-detail-ext-list,
.extend-options-list {
  list-style: none;
  margin: 1rem 0 0;
  padding: 0;
}

.tariff-detail-ext-list li,
.extend-options-list li {
  display: flex;
  align-items: center;
  margin-bottom: 0.5rem;
  font-size: 0.9rem;
}

.extend-options-list li {
  justify-content: space-between;
  gap: 12px;
  padding: 10px 14px;
  border-radius: 14px;
  background: rgba(64, 164, 223, 0.06);
  transition: background-color 0.2s ease, border-color 0.2s ease;
}

.extend-options-list li.selected {
  border: 1.5px solid var(--icon-blue);
  background: rgba(64, 164, 223, 0.16);
}

.tariff-detail-ext-list input[type="radio"],
.extend-options-list input[type="radio"] {
  margin-right: 8px;
  accent-color: var(--dark-green);
}

.extend-options-list label {
  width: 100%;
  cursor: pointer;
}

/* Контейнер для кнопки продления аренды на главной странице */
.extend-container {
  margin-top: 20px;
  text-align: center;
}

.extend-container.hidden {
  display: none;
}

/* Плавное исчезновение/появление главного изображения */
.bike-image.fade-out {
  opacity: 0;
  /* Вспомогательный класс для JS */
}

/* Текст-соглашение в модальном окне аренды */
.disclaimer-text {
  font-size: 0.8rem;
  color: #889996;
  margin-top: -5px;
  margin-bottom: 20px;
  text-align: center;
  line-height: 1.4;
}

/* Media для компактных экранов (мобильные браузеры) */
@media (max-width: 480px) {
  .bike-image-wrapper .bike-image {
    width: 128%;
    /* Увеличиваем ширину картинки */
    max-width: 128%;
    /* Разрешаем ей быть шире родителя */
    margin-left: -14%;
    /* Сдвигаем влево на половину от добавленной ширины (28% / 2 = 14%) */
  }
}

.app-content {
  padding: 20px;
  padding-bottom: 100px;
  /* Account for fixed bottom nav */
}

/* (duplicate .bottom-nav block removed to keep single source of truth) */

@media (min-height: 850px) and (min-width: 420px) {
  .app-screen {
    height: 850px;
    /* Фиксированная высота для больших экранов */
  }

  body {
    padding: 0;
    /* Убираем отступы, так как теперь в app-screen */
    align-items: center;
    /* Возвращаем центрирование для десктопа */
  }
}

@media (min-width: 421px) {

  /* Для экранов больше мобильных (планшеты, десктоп) — возвращаем оригинал */
  .app-screen {
    max-width: 420px;
    height: 100vh;
    max-height: 850px;
    border-radius: 40px;
    padding-top: var(--app-top-offset);
  }
}

/* Убираем лишний верхний отступ на странице с картой */
body:has(.map-page-container) .app-screen {
  padding-top: 0 !important;
}

.user-greeting {
  display: none;
}

.bike-display {
  margin-top: 0;
}

/* --- Стили для нового окна деталей тарифа --- */

#tariff-detail-modal .modal-content {
  max-width: 380px;
}

.tariff-description {
  font-size: 0.95rem;
  color: var(--text-secondary, #556f6b);
  margin-bottom: 20px;
  text-align: center;
  line-height: 1.5;
}

.tariff-options-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-bottom: 24px;
}

.tariff-option-item {
  display: flex;
  align-items: center;
  padding: 14px 16px;
  border: 2px solid var(--card-bg, #f0fdf9);
  border-radius: 12px;
  cursor: pointer;
  transition: all 0.2s ease-in-out;
}

.tariff-option-item:hover {
  border-color: var(--light-blue-nav, #d4e4f0);
}

/* Скрываем стандартный радио-кружок */
.tariff-option-item input[type="radio"] {
  display: none;
}

.tariff-option-item .option-details {
  flex-grow: 1;
}

.tariff-option-item .option-duration {
  font-weight: 600;
  font-size: 1rem;
  color: var(--dark-green, #083830);
}

.tariff-option-item .option-price {
  font-weight: 700;
  font-size: 1.1rem;
  color: var(--text-dark);
  /* Черный текст для цены */
  margin-left: auto;
  /* Прижимаем цену вправо */
}

/* Стиль для ВЫБРАННОГО элемента */
.tariff-option-item.selected {
  border-color: var(--icon-blue, #4A7BA7);
  background-color: var(--light-blue-bg, #e8f0f7);
  box-shadow: 0 4px 12px rgba(74, 123, 167, 0.1);
}

.stats-graph .bar {
  /* Скругляем только верхние углы, а нижние оставляем прямыми (0) */
  border-radius: 6px 6px 0 0;

}

/* Блок с АКБ - упрощенный, без фона */
.battery-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  justify-content: center;
  margin: 12px 0 20px 0;
}

.battery-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 14px;
  background: var(--white);
  border: 1.5px solid var(--icon-blue);
  border-radius: 20px;
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--dark-green);
  box-shadow: 0 2px 6px rgba(74, 123, 167, 0.12);
  transition: all 0.2s ease;
}

.battery-chip:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 8px rgba(74, 123, 167, 0.18);
}

.battery-chip svg {
  width: 16px;
  height: 16px;
  color: var(--icon-blue);
  flex-shrink: 0;
}

.battery-chips .empty-message {
  color: #7a9a95;
  font-size: 0.8125rem;
  font-style: italic;
  padding: 4px 0;
}

/* Стили для экрана подписания договора */
.contract-signing-screen {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 100%;
  padding: 24px;
  text-align: center;
}

.contract-content h2 {
  margin-top: 18px;
  margin-bottom: 8px;
  font-size: 1.5rem;
  color: var(--dark-green);
}

.contract-content p {
  color: #3f4d49;
  line-height: 1.5;
  max-width: 320px;
  margin: 0 auto 20px auto;
}

.contract-animation {
  position: relative;
  width: 120px;
  height: 160px;
  margin: 0 auto 20px;
}

.contract-document {
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, var(--card-bg) 0%, var(--light-blue-bg) 100%);
  border: 2px solid var(--icon-blue);
  border-radius: 8px;
  position: relative;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
}

.contract-document::before {
  content: "";
  position: absolute;
  top: 10px;
  left: 10px;
  right: 10px;
  height: 8px;
  background-color: var(--icon-blue);
  border-radius: 4px;
}

.contract-document::after {
  content: "";
  position: absolute;
  top: 30px;
  left: 10px;
  right: 10px;
  height: 4px;
  background-color: var(--icon-blue);
  border-radius: 2px;
}

.signature-animation {
  position: absolute;
  bottom: 20px;
  left: 10px;
  right: 10px;
}

/* === QR SCANNER MODAL === */
#qr-scanner-modal .modal-content {
    padding: 26px 24px 32px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    gap: 20px;
    background: linear-gradient(135deg, rgba(28, 181, 224, 0.96), rgba(24, 95, 202, 0.96));
    color: #ffffff;
    width: min(92vw, 420px);
    max-width: 420px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    box-shadow: 0 22px 48px rgba(6, 40, 94, 0.35);
}

.qr-scanner-container {
    position: relative;
    width: 100%;
    height: clamp(300px, 60vh, 560px);
    background-color: #000;
    border-radius: 24px;
    overflow: hidden;
    box-shadow: 0 18px 38px rgba(0, 0, 0, 0.45);
}

#qr-video {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    background-color: #000;
}

.qr-scanner-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border-radius: 24px;
    pointer-events: none;
    border: 3px solid rgba(255, 255, 255, 0.55);
    background: rgba(255, 255, 255, 0.05);
    box-shadow: 0 0 24px rgba(28, 181, 224, 0.25);
}

#qr-scanner-modal h2 {
    position: static;
    margin: 0;
    color: #ffffff;
    font-size: 1.35rem;
    text-align: center;
    letter-spacing: 0.01em;
}

#qr-scanner-modal .disclaimer-text {
    position: static;
    margin: 0;
    color: rgba(255, 255, 255, 0.82);
    font-size: 0.95rem;
    text-align: center;
}

#qr-scanner-close-btn {
    z-index: 3;
    position: absolute;
    top: 14px;
    right: 14px;
    background: rgba(0, 0, 0, 0.35);
    color: #fff;
    border: none;
    font-size: 1.4rem;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: grid;
    place-items: center;
    box-shadow: 0 6px 14px rgba(5, 28, 66, 0.25);
    transition: transform 0.2s ease, background 0.2s ease;
}

#qr-scanner-close-btn:hover {
    background: rgba(0, 0, 0, 0.55);
    transform: translateY(-1px);
}

.secondary-actions-split {
  display: flex;
  gap: 15px;
  width: 100%;
}

.secondary-actions-split #id-input-btn {
  flex: 0 0 auto; /* Don't grow, don't shrink, base size on content */
}

.secondary-actions-split #scan-btn {
  flex: 1 1 auto; /* Grow to fill space */
}

.signature-line {
  height: 3px;
  background-color: var(--dark-green);
  border-radius: 2px;
  width: 0;
  animation: signatureDraw 2.5s infinite;
}

@keyframes signatureDraw {
  0% { width: 0; }
  50% { width: 100%; }
  70% { width: 100%; }
  100% { width: 100%; }
}

/* Стили для уведомлений с анимированным колокольчиком */
.notification-item {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 15px;
  background-color: var(--card-bg);
  border-radius: 16px;
  margin-bottom: 12px;
}

/* Стили для уведомлений без анимации */
.notification-item-alt {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 15px;
  background-color: var(--card-bg);
  border-radius: 16px;
  margin-bottom: 12px;
}

/* Анимация только для иконки колокольчика в элементах с уведомлениями подписания */
.notification-item .notification-bell-icon {
  animation: bellShake 3s infinite;
  flex-shrink: 0;
  margin-top: 2px;
}

/* Убедимся, что иконка в элементах без анимации не анимируется */
.notification-item-alt .notification-bell-icon {
  flex-shrink: 0;
  margin-top: 2px;
}

@keyframes bellShake {
  0%, 100% { transform: rotate(0deg); }
  10% { transform: rotate(-15deg); }
  20% { transform: rotate(15deg); }
  30% { transform: rotate(-15deg); }
  40% { transform: rotate(15deg); }
  50% { transform: rotate(-5deg); }
  60% { transform: rotate(5deg); }
  70% { transform: rotate(-2deg); }
  80% { transform: rotate(2deg); }
  90% { transform: rotate(0deg); }
}

.notification-content {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.notification-content p {
  margin: 0;
  color: var(--dark-green);
  font-weight: 500;
  text-align: left;
}

.notification-content .btn {
  align-self: flex-start;
  margin-top: 4px;
}
