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

:root {
  --primary: #2563eb;
  --primary-hover: #1d4ed8;
  --secondary: #64748b;
  --success: #10b981;
  --danger: #ef4444;
  --border: #e5e7eb;
  --bg-gray: #f9fafb;
  --text-primary: #111827;
  --text-secondary: #6b7280;
  --shadow: 0 1px 3px 0 rgb(0 0 0 / 0.1);
  --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1);
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Hiragino Sans GB', sans-serif;
  background: var(--bg-gray);
  color: var(--text-primary);
  line-height: 1.6;
}

.app {
  max-width: 600px;
  margin: 0 auto;
  min-height: 100vh;
  background: white;
}

.page {
  display: none;
  min-height: 100vh;
}

.page.active {
  display: flex;
  flex-direction: column;
}

.header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px;
  background: white;
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 10;
}

.header h1 {
  font-size: 20px;
  font-weight: 600;
  flex: 1;
}

.header-actions {
  display: flex;
  gap: 8px;
}

.btn-primary {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 10px 20px;
  background: var(--primary);
  color: white;
  border: none;
  border-radius: 8px;
  font-size: 15px;
  font-weight: 500;
  cursor: pointer;
  transition: background 0.2s;
}

.btn-primary:hover {
  background: var(--primary-hover);
}

.btn-secondary {
  padding: 10px 20px;
  background: white;
  color: var(--text-primary);
  border: 1px solid var(--border);
  border-radius: 8px;
  font-size: 15px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s;
}

.btn-secondary:hover {
  background: var(--bg-gray);
}

.btn-back {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  background: none;
  border: none;
  color: var(--text-primary);
  cursor: pointer;
  border-radius: 8px;
  transition: background 0.2s;
  margin-right: 8px;
}

.btn-back:hover {
  background: var(--bg-gray);
}

.btn-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  background: none;
  border: none;
  color: var(--text-primary);
  cursor: pointer;
  border-radius: 8px;
  transition: background 0.2s;
}

.btn-icon:hover {
  background: var(--bg-gray);
}

.list-container {
  flex: 1;
  padding: 16px;
}

.empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 60px 20px;
  text-align: center;
}

.empty-state svg {
  margin-bottom: 16px;
  opacity: 0.5;
}

.empty-state p {
  color: var(--text-secondary);
  font-size: 15px;
  margin-bottom: 20px;
}

.itinerary-card {
  background: white;
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 16px;
  margin-bottom: 12px;
  cursor: pointer;
  transition: all 0.2s;
}

.itinerary-card:hover {
  box-shadow: var(--shadow-lg);
  transform: translateY(-2px);
}

.itinerary-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 12px;
}

.customer-info {
  flex: 1;
}

.customer-name {
  font-size: 18px;
  font-weight: 600;
  margin-bottom: 4px;
}

.customer-phone {
  font-size: 14px;
  color: var(--text-secondary);
}

.passenger-count {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 12px;
  background: var(--bg-gray);
  border-radius: 20px;
  font-size: 13px;
  color: var(--text-secondary);
}

.trip-info {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.trip-row {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
}

.trip-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  background: var(--bg-gray);
  border-radius: 6px;
  flex-shrink: 0;
}

.trip-time {
  color: var(--text-secondary);
  min-width: 120px;
}

.trip-route {
  flex: 1;
  color: var(--text-primary);
}

.form-container {
  flex: 1;
  padding: 20px;
  overflow-y: auto;
}

.form-section {
  margin-bottom: 32px;
}

.form-section h2 {
  font-size: 16px;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 16px;
  padding-bottom: 8px;
  border-bottom: 2px solid var(--primary);
}

.form-group {
  margin-bottom: 16px;
}

.form-group label {
  display: block;
  font-size: 14px;
  font-weight: 500;
  color: var(--text-primary);
  margin-bottom: 8px;
}

.form-group input,
.form-group textarea {
  width: 100%;
  padding: 12px;
  border: 1px solid var(--border);
  border-radius: 8px;
  font-size: 15px;
  font-family: inherit;
  transition: border-color 0.2s;
}

.form-group input:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--primary);
}

.form-group textarea {
  resize: vertical;
  min-height: 80px;
}

.form-actions {
  display: flex;
  gap: 12px;
  padding: 20px;
  background: white;
  border-top: 1px solid var(--border);
  position: sticky;
  bottom: 0;
}

.form-actions button {
  flex: 1;
}

.view-container {
  flex: 1;
  padding: 24px;
  overflow-y: auto;
}

.view-section {
  margin-bottom: 32px;
}

.view-section-title {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 12px;
}

.view-card {
  background: white;
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 20px;
  margin-bottom: 12px;
}

.view-field {
  margin-bottom: 16px;
}

.view-field:last-child {
  margin-bottom: 0;
}

.view-label {
  font-size: 13px;
  color: var(--text-secondary);
  margin-bottom: 4px;
}

.view-value {
  font-size: 16px;
  color: var(--text-primary);
  font-weight: 500;
}

.trip-card {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  border: none;
  padding: 24px;
}

.trip-card .view-label {
  color: rgba(255, 255, 255, 0.8);
}

.trip-card .view-value {
  color: white;
  font-size: 18px;
}

.trip-arrow {
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 12px 0;
}

.trip-arrow svg {
  opacity: 0.6;
}

.screenshot-tip {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 16px;
  background: var(--bg-gray);
  color: var(--text-secondary);
  font-size: 13px;
  text-align: center;
  border-top: 1px solid var(--border);
}

@media (max-width: 640px) {
  .header h1 {
    font-size: 18px;
  }
  
  .form-container {
    padding: 16px;
  }
  
  .view-container {
    padding: 16px;
  }
}
