:root {
  --navy-dark: #1a2744;
  --navy: #1e3a5f;
  --navy-light: #2d4a6f;
  --blue-primary: #0066cc;
  --blue-light: #3b82f6;
  --sky-blue: #e0f4ff;
  --sky-light: #f0f9ff;
  --white: #ffffff;
  --gray-100: #f8f9fa;
  --gray-200: #e9ecef;
  --gray-300: #dee2e6;
  --gray-500: #6c757d;
  --gray-700: #495057;
  --gray-900: #212529;
  --status-green: #22c55e;
  --status-red: #ef4444;
  --status-orange: #f97316;
  --status-blue: #3b82f6;
  --shadow-sm: 0 1px 2px rgba(0,0,0,0.05);
  --shadow-md: 0 4px 6px rgba(0,0,0,0.1);
  --shadow-lg: 0 10px 25px rgba(0,0,0,0.15);
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-xl: 24px;
  --radius-full: 9999px;
}

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

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, sans-serif;
  background: var(--sky-light);
  color: var(--gray-900);
  min-height: 100vh;
  line-height: 1.5;
}

.app-container {
  max-width: 430px;
  margin: 0 auto;
  min-height: 100vh;
  background: var(--white);
  position: relative;
  padding-bottom: 80px;
}

.navy-header {
  background: linear-gradient(135deg, var(--navy-dark) 0%, var(--navy) 100%);
  color: var(--white);
  padding: 20px;
  padding-top: 40px;
}

.navy-header h1 {
  font-size: 1.5rem;
  font-weight: 600;
  margin-bottom: 4px;
}

.navy-header p {
  opacity: 0.8;
  font-size: 0.9rem;
}

.logo-cloud {
  width: 48px;
  height: 48px;
}

.nubio-logo {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--navy-dark);
}

.nubio-logo svg {
  width: 40px;
  height: 40px;
}

.page-content {
  padding: 20px;
}

.card {
  background: var(--white);
  border-radius: var(--radius-lg);
  padding: 16px;
  margin-bottom: 16px;
  box-shadow: var(--shadow-md);
  border: 1px solid var(--gray-200);
}

.card-header {
  font-size: 1.1rem;
  font-weight: 600;
  margin-bottom: 12px;
  color: var(--gray-900);
}

.flight-card {
  background: var(--white);
  border-radius: var(--radius-lg);
  padding: 16px;
  margin-bottom: 12px;
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--gray-200);
  cursor: pointer;
  transition: all 0.2s ease;
}

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

.flight-route {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 8px;
}

.airport-code {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--gray-900);
}

.city-name {
  font-size: 0.8rem;
  color: var(--gray-500);
}

.route-line {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.route-line .line {
  flex: 1;
  height: 2px;
  background: var(--gray-300);
}

.plane-icon {
  color: var(--blue-primary);
  font-size: 1.2rem;
}

.plane-icon svg {
  width: 24px;
  height: 24px;
  fill: var(--blue-primary);
}

.status-badge {
  display: inline-block;
  padding: 4px 12px;
  border-radius: var(--radius-full);
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
}

.status-on-time, .status-landed {
  background: rgba(34, 197, 94, 0.15);
  color: var(--status-green);
}

.status-delayed {
  background: rgba(239, 68, 68, 0.15);
  color: var(--status-red);
}

.status-boarding, .status-on-the-way {
  background: rgba(59, 130, 246, 0.15);
  color: var(--status-blue);
}

.flight-times {
  display: flex;
  justify-content: space-between;
  font-size: 0.85rem;
  color: var(--gray-500);
  margin-top: 8px;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 24px;
  border-radius: var(--radius-md);
  font-size: 1rem;
  font-weight: 500;
  cursor: pointer;
  border: none;
  transition: all 0.2s ease;
  text-decoration: none;
}

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

.btn-primary:hover {
  background: #0052a3;
}

.btn-outline {
  background: transparent;
  color: var(--blue-primary);
  border: 2px solid var(--blue-primary);
}

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

.btn-secondary {
  background: var(--gray-200);
  color: var(--gray-700);
}

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

.btn-white {
  background: var(--white);
  color: var(--gray-900);
  box-shadow: var(--shadow-sm);
}

.btn-white:hover {
  box-shadow: var(--shadow-md);
}

.btn-full {
  width: 100%;
}

.search-bar {
  display: flex;
  align-items: center;
  background: var(--white);
  border-radius: var(--radius-md);
  padding: 12px 16px;
  gap: 12px;
  box-shadow: var(--shadow-sm);
}

.search-bar input {
  flex: 1;
  border: none;
  outline: none;
  font-size: 1rem;
  background: transparent;
}

.search-bar svg {
  color: var(--gray-500);
  width: 20px;
  height: 20px;
}

.bottom-nav {
  position: fixed;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 100%;
  max-width: 430px;
  background: var(--white);
  border-top: 1px solid var(--gray-200);
  display: flex;
  justify-content: space-around;
  padding: 12px 0;
  padding-bottom: calc(12px + env(safe-area-inset-bottom));
  z-index: 100;
}

.nav-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  color: var(--gray-500);
  text-decoration: none;
  font-size: 0.7rem;
  transition: color 0.2s ease;
}

.nav-item svg {
  width: 24px;
  height: 24px;
}

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

.nav-item:hover {
  color: var(--blue-primary);
}

.section-title {
  font-size: 1.1rem;
  font-weight: 600;
  margin-bottom: 16px;
  color: var(--gray-900);
}

.contact-chips {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 16px;
}

.contact-chip {
  padding: 8px 16px;
  background: var(--gray-100);
  border-radius: var(--radius-full);
  font-size: 0.9rem;
  color: var(--gray-700);
  cursor: pointer;
  transition: all 0.2s ease;
  border: 1px solid var(--gray-200);
}

.contact-chip:hover, .contact-chip.active {
  background: var(--navy-dark);
  color: var(--white);
  border-color: var(--navy-dark);
}

.share-icons {
  display: flex;
  gap: 16px;
  margin-top: 16px;
}

.share-icon {
  width: 48px;
  height: 48px;
  border-radius: var(--radius-md);
  background: var(--gray-100);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s ease;
}

.share-icon:hover {
  background: var(--gray-200);
}

.share-icon svg {
  width: 24px;
  height: 24px;
  color: var(--gray-700);
}

.greeting-sign {
  background: var(--white);
  border-radius: var(--radius-xl);
  padding: 40px 24px;
  text-align: center;
  box-shadow: var(--shadow-lg);
}

.greeting-sign .plane-icon-large {
  font-size: 4rem;
  color: var(--blue-primary);
  margin-bottom: 16px;
}

.greeting-sign .welcome-text {
  font-size: 2.5rem;
  font-weight: 700;
  color: var(--navy-dark);
  line-height: 1.2;
  margin-bottom: 24px;
}

.greeting-sign .flight-info {
  font-size: 1rem;
  color: var(--gray-500);
}

.stat-card {
  background: var(--white);
  border-radius: var(--radius-lg);
  padding: 20px;
  text-align: center;
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--gray-200);
}

.stat-number {
  font-size: 2rem;
  font-weight: 700;
  color: var(--navy-dark);
}

.stat-label {
  font-size: 0.85rem;
  color: var(--gray-500);
  margin-top: 4px;
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  margin-bottom: 24px;
}

.bar-chart {
  display: flex;
  align-items: flex-end;
  gap: 8px;
  height: 120px;
  padding: 16px;
  background: var(--gray-100);
  border-radius: var(--radius-md);
}

.bar {
  flex: 1;
  background: var(--gray-300);
  border-radius: 4px 4px 0 0;
  min-height: 20px;
}

.bar.active {
  background: var(--navy-dark);
}

.user-menu {
  display: flex;
  align-items: center;
  gap: 10px;
}

.user-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid var(--white);
}

.login-btn {
  background: var(--blue-primary);
  color: var(--white);
  padding: 8px 16px;
  border-radius: var(--radius-md);
  text-decoration: none;
  font-size: 0.9rem;
  font-weight: 500;
}

.logout-btn {
  background: rgba(255,255,255,0.2);
  color: var(--white);
  padding: 6px 12px;
  border-radius: var(--radius-sm);
  text-decoration: none;
  font-size: 0.8rem;
}

.back-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--gray-500);
  text-decoration: none;
  font-size: 0.9rem;
  margin-bottom: 16px;
}

.back-btn:hover {
  color: var(--blue-primary);
}

.input-field {
  width: 100%;
  padding: 14px 16px;
  border: 1px solid var(--gray-300);
  border-radius: var(--radius-md);
  font-size: 1rem;
  outline: none;
  transition: border-color 0.2s ease;
}

.input-field:focus {
  border-color: var(--blue-primary);
}

.airplane-illustration {
  width: 100%;
  max-width: 280px;
  margin: 24px auto;
  display: block;
}

.progress-bar {
  width: 100%;
  height: 6px;
  background: var(--gray-200);
  border-radius: var(--radius-full);
  overflow: hidden;
  margin: 16px 0;
}

.progress-fill {
  height: 100%;
  background: var(--blue-primary);
  border-radius: var(--radius-full);
  transition: width 0.3s ease;
}

.flight-info-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  margin: 16px 0;
}

.flight-info-item {
  text-align: center;
}

.flight-info-item .label {
  font-size: 0.75rem;
  color: var(--gray-500);
  margin-bottom: 4px;
}

.flight-info-item .value {
  font-size: 1rem;
  font-weight: 600;
  color: var(--gray-900);
}

.action-buttons {
  display: flex;
  gap: 12px;
  margin-top: 20px;
}

.action-buttons .btn {
  flex: 1;
}

.shared-via {
  text-align: center;
  color: var(--gray-500);
  font-size: 0.85rem;
  margin-top: 24px;
}

.contacts-list {
  margin-top: 16px;
}

.contact-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 0;
  border-bottom: 1px solid var(--gray-200);
}

.contact-row:last-child {
  border-bottom: none;
}

.contact-name {
  font-weight: 500;
  color: var(--gray-900);
}

@media (max-width: 430px) {
  .app-container {
    max-width: 100%;
  }
  
  .bottom-nav {
    max-width: 100%;
  }
}
