/* ============================================
   Modern Minimal Design - Route Map Generator
   ============================================ */

:root {
  /* Color Palette - Eye-soothing */
  --primary-gradient: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  --primary-color: #667eea;
  --primary-dark: #5568d3;
  --secondary-color: #f6f8fb;
  --accent-color: #10b981;
  --text-primary: #1a202c;
  --text-secondary: #718096;
  --text-light: #a0aec0;
  --bg-primary: #ffffff;
  --bg-secondary: #f7fafc;
  --bg-tertiary: #edf2f7;
  --border-color: #e2e8f0;
  --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.05);
  --shadow-md: 0 4px 6px rgba(0, 0, 0, 0.05);
  --shadow-lg: 0 10px 25px rgba(0, 0, 0, 0.08);
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  background: var(--bg-secondary);
  color: var(--text-primary);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* ============================================
   Layout
   ============================================ */

.app-container {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* Header */
.header {
  background: var(--bg-primary);
  border-bottom: 1px solid var(--border-color);
  padding: 1.5rem 2rem;
  box-shadow: var(--shadow-sm);
}

.header-content {
  max-width: 1400px;
  margin: 0 auto;
}

.logo {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 0.5rem;
}

.logo h1 {
  font-size: 1.5rem;
  font-weight: 700;
  background: var(--primary-gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.subtitle {
  font-size: 0.875rem;
  color: var(--text-secondary);
  font-weight: 400;
  margin-left: 2.5rem;
}

/* Main Content */
.main-content {
  flex: 1;
  display: grid;
  grid-template-columns: 380px 1fr;
  gap: 0;
  max-width: 1400px;
  width: 100%;
  margin: 0 auto;
  padding: 2rem;
}

/* ============================================
   Sidebar
   ============================================ */

.sidebar {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
  padding-right: 1.5rem;
  overflow-y: auto;
  max-height: calc(100vh - 200px);
}

.sidebar::-webkit-scrollbar {
  width: 6px;
}

.sidebar::-webkit-scrollbar-track {
  background: transparent;
}

.sidebar::-webkit-scrollbar-thumb {
  background: var(--border-color);
  border-radius: 10px;
}

/* Card */
.card {
  background: var(--bg-primary);
  border-radius: var(--radius-md);
  padding: 1.5rem;
  box-shadow: var(--shadow-md);
  border: 1px solid var(--border-color);
  transition: all 0.2s ease;
}

.card:hover {
  box-shadow: var(--shadow-lg);
}

.card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1rem;
}

.card-header h3 {
  font-size: 1rem;
  font-weight: 600;
  color: var(--text-primary);
}

/* Badges */
.badge {
  font-size: 0.75rem;
  font-weight: 600;
  padding: 0.25rem 0.75rem;
  border-radius: 100px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.badge-red {
  background: #fee;
  color: #dc2626;
}

.badge-blue {
  background: #eff6ff;
  color: #2563eb;
}

/* Inputs */
.input-group-modern {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  margin-bottom: 1rem;
}

.input-group-modern:last-child {
  margin-bottom: 0;
}

.input-modern {
  width: 100%;
  padding: 0.75rem 1rem;
  font-size: 0.875rem;
  border: 1.5px solid var(--border-color);
  border-radius: var(--radius-sm);
  background: var(--bg-secondary);
  color: var(--text-primary);
  transition: all 0.2s ease;
  font-family: inherit;
}

.input-modern:focus {
  outline: none;
  border-color: var(--primary-color);
  background: var(--bg-primary);
  box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.input-modern::placeholder {
  color: var(--text-light);
}

.secondary-container {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  margin-bottom: 1rem;
}

/* Buttons */
.btn-primary {
  width: 100%;
  padding: 1rem;
  font-size: 0.95rem;
  font-weight: 600;
  color: white;
  background: var(--primary-gradient);
  border: none;
  border-radius: var(--radius-sm);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  transition: all 0.2s ease;
  box-shadow: var(--shadow-md);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg);
}

.btn-primary:active {
  transform: translateY(0);
}

.btn-primary:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none;
}

.btn-secondary {
  width: 100%;
  padding: 0.75rem;
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--primary-color);
  background: var(--bg-secondary);
  border: 1.5px solid var(--border-color);
  border-radius: var(--radius-sm);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  transition: all 0.2s ease;
}

.btn-secondary:hover {
  background: var(--bg-primary);
  border-color: var(--primary-color);
}

/* Info Card */
.info-card {
  display: flex;
  gap: 1rem;
  padding: 1rem;
  background: linear-gradient(135deg, #f0f4ff 0%, #f7f0ff 100%);
  border-radius: var(--radius-sm);
  border: 1px solid #e0e7ff;
}

.info-title {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--primary-color);
  margin-bottom: 0.25rem;
}

.info-text {
  font-size: 0.8rem;
  color: var(--text-secondary);
  line-height: 1.5;
}

/* ============================================
   Map Section
   ============================================ */

.map-section {
  position: relative;
}

.map-container {
  width: 100%;
  height: calc(100vh - 200px);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  border: 1px solid var(--border-color);
  overflow: hidden;
}

/* Leaflet Overrides */
.leaflet-container {
  font-family: 'Inter', sans-serif;
}

.leaflet-control-zoom a {
  border-radius: var(--radius-sm) !important;
  border: none !important;
  box-shadow: var(--shadow-md) !important;
}

.leaflet-control-fullscreen a {
  border-radius: var(--radius-sm) !important;
  border: none !important;
  box-shadow: var(--shadow-md) !important;
}

/* ============================================
   Footer
   ============================================ */

.footer {
  background: var(--bg-primary);
  border-top: 1px solid var(--border-color);
  padding: 1.5rem 2rem;
  text-align: center;
}

.footer p {
  font-size: 0.875rem;
  color: var(--text-secondary);
}

.footer a {
  color: var(--primary-color);
  text-decoration: none;
  font-weight: 500;
  transition: color 0.2s ease;
}

.footer a:hover {
  color: var(--primary-dark);
}

/* ============================================
   Responsive Design
   ============================================ */

@media (max-width: 1024px) {
  .main-content {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }

  .sidebar {
    padding-right: 0;
    max-height: none;
  }

  .map-container {
    height: 500px;
  }
}

@media (max-width: 640px) {
  .header {
    padding: 1rem;
  }

  .logo h1 {
    font-size: 1.25rem;
  }

  .subtitle {
    font-size: 0.8rem;
  }

  .main-content {
    padding: 1rem;
  }

  .card {
    padding: 1rem;
  }
}

/* ============================================
   Animations
   ============================================ */

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.card {
  animation: fadeIn 0.3s ease forwards;
}

.card:nth-child(1) { animation-delay: 0s; }
.card:nth-child(2) { animation-delay: 0.1s; }
.card:nth-child(3) { animation-delay: 0.2s; }
