:root {
  --bg-primary: #1a1a2e;
  --bg-secondary: #16213e;
  --text-primary: #ffffff;
  --text-secondary: #b8b8b8;
  --accent-color: #007aff;
  --border-color: rgba(255, 255, 255, 0.1);
  --radius: 12px;
  --radius-lg: 20px;
  --shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

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

body {
  font-family: -apple-system, BlinkMacSystemFont, 'SF Pro Display', 'Segoe UI', Roboto, sans-serif;
  background-color: var(--bg-secondary);
  color: var(--text-primary);
  height: 100vh;
  overflow: hidden;
  -webkit-font-smoothing: antialiased;
  font-size: 14px;
}

.app {
  height: 100vh;
  display: flex;
  flex-direction: column;
  padding: 8px;
  padding-bottom: env(safe-area-inset-bottom);
}

/* ========================================
   SKELETON LOADERS
   ======================================== */
.skeleton-container {
  height: 100vh;
  display: flex;
  flex-direction: column;
  padding: 8px;
  gap: 12px;
}

.skeleton-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px 0;
}

.skeleton-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: linear-gradient(90deg, #2a2a3a 0%, #3a3a4a 50%, #2a2a3a 100%);
  background-size: 200% 100%;
  animation: skeleton-loading 1.5s infinite;
}

.skeleton-location {
  width: 120px;
  height: 16px;
  border-radius: 8px;
  background: linear-gradient(90deg, #2a2a3a 0%, #3a3a4a 50%, #2a2a3a 100%);
  background-size: 200% 100%;
  animation: skeleton-loading 1.5s infinite;
}

.skeleton-route-card {
  background: var(--bg-primary);
  border-radius: var(--radius-lg);
  padding: 12px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.skeleton-input {
  height: 40px;
  border-radius: 8px;
  background: linear-gradient(90deg, #2a2a3a 0%, #3a3a4a 50%, #2a2a3a 100%);
  background-size: 200% 100%;
  animation: skeleton-loading 1.5s infinite;
}

.skeleton-car-types {
  display: flex;
  gap: 8px;
}

.skeleton-car-type {
  min-width: 100px;
  height: 70px;
  border-radius: var(--radius);
  background: linear-gradient(90deg, #2a2a3a 0%, #3a3a4a 50%, #2a2a3a 100%);
  background-size: 200% 100%;
  animation: skeleton-loading 1.5s infinite;
}

.skeleton-price-card {
  height: 100px;
  border-radius: var(--radius);
  background: linear-gradient(90deg, #2a2a3a 0%, #3a3a4a 50%, #2a2a3a 100%);
  background-size: 200% 100%;
  animation: skeleton-loading 1.5s infinite;
}

@keyframes skeleton-loading {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

/* ========================================
   HEADER (ОБЩИЙ ДЛЯ ВСЕХ ВКЛАДОК)
   ======================================== */
.header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px 0;
  margin-bottom: 10px;
  animation: fadeInDown 0.4s ease;
}

.location {
  display: flex;
  align-items: center;
  gap: 6px;
  color: var(--text-secondary);
  font-size: 13px;
  animation: fadeIn 0.4s ease;
}

.location i {
  font-size: 16px;
}

.profile-btn {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background-color: var(--bg-primary);
  border: 1px solid var(--border-color);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: transform 0.2s ease;
}

.profile-btn:active {
  transform: scale(0.95);
}

.avatar {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: linear-gradient(135deg, #6a11cb 0%, #2575fc 100%);
}

/* ========================================
   MAIN CONTENT & TABS (ОБЩИЕ)
   ======================================== */
  
.main {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 12px;
  overflow-y: auto;
  padding-bottom: 76px; /* ВОЗВРАЩАЕМ ОРИГИНАЛЬНОЕ ЗНАЧЕНИЕ */
  animation: fadeIn 0.5s ease;
}

.tab-content {
  display: none;
  animation: fadeIn 0.3s ease;
}

.tab-content.active {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

/* ========================================
   НИЖНЯЯ НАВИГАЦИЯ (ОБЩАЯ)
   ======================================== */
.bottom-nav {
  display: flex;
  justify-content: space-around;
  align-items: center;
  background: var(--bg-primary);
  border-top: 1px solid var(--border-color);
  padding: 8px 0;
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 100;
  box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.1);
}

.nav-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  background: none;
  border: none;
  color: var(--text-secondary);
  font-size: 11px;
  cursor: pointer;
  padding: 6px 0;
  transition: all 0.2s ease;
}

.nav-item i {
  font-size: 18px;
}

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

.nav-item.active i {
  font-size: 20px;
}

.nav-item:active {
  transform: scale(0.95);
}

/* ========================================
   МОДАЛЬНЫЕ ОКНА (ОБЩИЕ СТИЛИ)
   ======================================== */
  



.modal {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: rgba(0, 0, 0, 0.6);
  z-index: 1000;
  animation: fadeIn 0.3s ease;
}

.modal.show {
  display: flex;
  align-items: flex-end;
  justify-content: center; 
  padding: 20px;
}

 

.service-modal,
.payment-modal,
.comment-modal {
  background: var(--bg-primary);
  border-radius: var(--radius-lg) var(--radius-lg) 0 0;
  width: 100%;
  max-width: 500px;
  max-height: calc(100vh - 160px);
  margin-bottom: 84px;
  overflow-y: auto;
  animation: slideUp 0.4s ease;
  box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.3);
}

/* Для мобилок */
@media (max-width: 480px) {
  .service-modal,
  .payment-modal,
  .comment-modal {
    max-height: calc(100vh - 180px);
    margin-bottom: 94px;
  }
}

@keyframes slideUp {
  from { transform: translateY(100%); }
  to { transform: translateY(0); }
}

.modal-header,
.comment-modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px 20px;
  border-bottom: 1px solid var(--border-color);
}

.modal-header h3,
.comment-modal-header h3 {
  font-size: 18px;
  font-weight: 600;
  color: var(--text-primary);
}

.modal-close,
.comment-modal-close {
  background: none;
  border: none;
  color: var(--text-secondary);
  font-size: 20px;
  cursor: pointer;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  transition: all 0.2s ease;
}

.modal-close:hover,
.comment-modal-close:hover {
  background: rgba(255, 255, 255, 0.1);
  color: var(--text-primary);
}

/* ========================================
   УВЕДОМЛЕНИЯ (ОБЩИЕ)
   ======================================== */
.notifications-container {
  position: fixed;
  top: 16px;
  right: 16px;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  gap: 10px;
  max-width: 340px;
  pointer-events: none;
}

.notification {
  background: var(--bg-primary);
  border-radius: var(--radius-lg);
  padding: 14px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3);
  display: flex;
  align-items: flex-start;
  gap: 10px;
  min-width: 280px;
  pointer-events: all;
  animation: slideIn 0.3s ease forwards;
  position: relative;
  overflow: hidden;
  border: 1px solid var(--border-color);
}

.notification::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 4px;
  background: linear-gradient(to bottom, #007aff, #0051e0);
  opacity: 0;
  transition: opacity 0.3s ease;
}

.notification.show::before {
  opacity: 1;
}

.notification.success::before {
  background: linear-gradient(to bottom, #34c759, #28a745);
}

.notification.error::before {
  background: linear-gradient(to bottom, #ff3b30, #e52d27);
}

.notification.info::before {
  background: linear-gradient(to bottom, #5ac8fa, #007aff);
}

.notification.warning::before {
  background: linear-gradient(to bottom, #ffcc00, #ff9500);
}

.notification-icon {
  width: 22px;
  height: 22px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  flex-shrink: 0;
}

.notification.success .notification-icon {
  color: #34c759;
}

.notification.error .notification-icon {
  color: #ff3b30;
}

.notification.info .notification-icon {
  color: #007aff;
}

.notification.warning .notification-icon {
  color: #ff9500;
}

.notification-content {
  flex: 1;
}

.notification-title {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 4px;
}

.notification-message {
  font-size: 12px;
  color: var(--text-secondary);
  line-height: 1.4;
  white-space: pre-line;
}

.notification-close {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.1);
  border: none;
  color: var(--text-secondary);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  flex-shrink: 0;
  opacity: 0.6;
  transition: all 0.2s ease;
  pointer-events: all;
}

.notification-close:hover {
  opacity: 1;
  background: rgba(255, 255, 255, 0.2);
  transform: scale(1.1);
}

.notification-progress {
  position: absolute;
  bottom: 0;
  left: 0;
  height: 3px;
  background: rgba(255, 255, 255, 0.3);
  width: 100%;
  animation: progress 5s linear forwards;
}

.notification.hide {
  animation: slideOut 0.3s ease forwards;
}

/* ========================================
   АКТИВНЫЕ ЗАКАЗЫ В ШАПКЕ (ОБЩИЕ)
   ======================================== */
.active-orders-section {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 8px;
  overflow-y: auto;
  max-height: 120px;
  padding-right: 8px;
}

.order-card-mini {
  background: rgba(0, 122, 255, 0.1);
  border: 1px solid rgba(0, 122, 255, 0.3);
  border-radius: 10px;
  padding: 10px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.order-card-mini:hover {
  background: rgba(0, 122, 255, 0.15);
  border-color: var(--accent-color);
  transform: translateX(4px);
}

.order-card-mini:active {
  transform: scale(0.98);
}

.order-route {
  display: flex;
  flex-direction: column;
  gap: 2px;
  margin-bottom: 4px;
}

.order-from,
.order-to {
  font-size: 12px;
  color: var(--text-primary);
  font-weight: 500;
}

.order-to {
  color: var(--accent-color);
}

.order-status {
  font-size: 11px;
  font-weight: 600;
  padding: 4px 6px;
  border-radius: 6px;
  display: inline-block;
}

.status-searching {
  background: rgba(255, 149, 0, 0.2);
  color: #ff9500;
}

.status-driving {
  background: rgba(0, 122, 255, 0.2);
  color: #007aff;
}

.status-arrived {
  background: rgba(52, 199, 89, 0.2);
  color: #34c759;
}

.status-inprogress {
  background: rgba(88, 86, 214, 0.2);
  color: #5856d6;
}

.status-completed {
  background: rgba(135, 135, 135, 0.2);
  color: #878787;
}

.status-cancelled {
  background: rgba(255, 59, 48, 0.2);
  color: #ff3b30;
}

.clickable {
  position: relative;
}

.clickable::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(255, 255, 255, 0.05);
  opacity: 0;
  transition: opacity 0.2s;
  border-radius: 10px;
}

.clickable:active::after {
  opacity: 1;
}

/* ========================================
   АНИМАЦИИ (ОБЩИЕ)
   ======================================== */
@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes fadeInDown {
  from {
    opacity: 0;
    transform: translateY(-20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

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

@keyframes slideIn {
  from {
    transform: translateX(400px) scale(0.9);
    opacity: 0;
  }
  to {
    transform: translateX(0) scale(1);
    opacity: 1;
  }
}

@keyframes slideOut {
  from {
    transform: translateX(0) scale(1);
    opacity: 1;
  }
  to {
    transform: translateX(200px) scale(0.9);
    opacity: 0;
  }
}

@keyframes progress {
  from { width: 100%; }
  to { width: 0%; }
}

@keyframes pulse {
  0% { transform: scale(1); }
  50% { transform: scale(1.02); }
  100% { transform: scale(1); }
}

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

/* ========================================
   АДАПТИВНОСТЬ (ОБЩАЯ)
   ======================================== */
@media (max-width: 480px) {
  .notifications-container {
    max-width: 100%;
  }
  
  .notification {
    max-width: calc(100vw - 32px);
  }
}