@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;500;600;700;800&display=swap');

.hidden { display: none !important; }

:root {
  /* Colors */
  --primary: #FF6B00;
  /* Vibrant Orange */
  --primary-dark: #E65C00;
  --primary-light: #FFF0E6;

  --secondary: #0B132B;
  /* Deep Navy */
  --secondary-light: #1C2541;

  --accent: #FF6B00;
  /* Electric Green for success/alerts */

  --bg-color: #F8FAFC;
  /* Light gray background */
  --surface: #FFFFFF;
  /* White cards */
  --surface-hover: #F1F5F9;

  --text-main: #1E293B;
  --text-muted: #64748B;
  --text-light: #94A3B8;

  --border-color: #E2E8F0;

  /* Typography */
  --font-main: 'Outfit', sans-serif;

  /* Spacing */
  --s-1: 0.25rem;
  /* 4px */
  --s-2: 0.5rem;
  /* 8px */
  --s-3: 0.75rem;
  /* 12px */
  --s-4: 1rem;
  /* 16px */
  --s-5: 1.25rem;
  /* 20px */
  --s-6: 1.5rem;
  /* 24px */
  --s-8: 2rem;
  /* 32px */
  --s-10: 2.5rem;
  /* 40px */
  --s-12: 3rem;
  /* 48px */

  /* Radii */
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-xl: 24px;
  --radius-full: 9999px;

  /* Shadows */
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.05);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
  --shadow-nav: 0 -4px 20px rgba(0, 0, 0, 0.05);

  /* Transitions */
  --transition-fast: 0.15s ease;
  --transition-normal: 0.3s ease;
}

/* Reset & Base Styles */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: var(--font-main);
  background-color: #E2E8F0;
  /* Darker bg for desktop to contrast the mobile app */
  color: var(--text-main);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

a {
  text-decoration: none;
  color: inherit;
}

ul {
  list-style: none;
}

button {
  font-family: inherit;
  cursor: pointer;
  border: none;
  background: none;
  outline: none;
}

input,
textarea,
select {
  font-family: inherit;
  outline: none;
}

/* PWA App Container */
.app-container {
  width: 100%;
  height: 100vh;
  height: 100dvh;
  margin: 0 auto;
  background-color: var(--bg-color);
  position: relative;
  overflow: hidden;
  box-shadow: var(--shadow-lg);
  display: flex;
  flex-direction: column;
}

/* Typography Utility Classes */
.text-h1 {
  font-size: 2rem;
  font-weight: 800;
  line-height: 1.2;
  letter-spacing: -0.02em;
}

.text-h2 {
  font-size: 1.5rem;
  font-weight: 700;
  line-height: 1.3;
}

.text-h3 {
  font-size: 1.25rem;
  font-weight: 600;
  line-height: 1.4;
}

.text-body {
  font-size: 1rem;
  font-weight: 400;
  line-height: 1.5;
}

.text-sm {
  font-size: 0.875rem;
  font-weight: 400;
  line-height: 1.5;
}

.text-xs {
  font-size: 0.75rem;
  font-weight: 500;
}

.text-primary {
  color: var(--primary);
}

.text-secondary {
  color: var(--secondary);
}

.text-muted {
  color: var(--text-muted);
}

.text-center {
  text-align: center;
}

.font-bold {
  font-weight: 700;
}

.font-semibold {
  font-weight: 600;
}

.font-medium {
  font-weight: 500;
}

/* Spacing Utilities */
.mt-2 {
  margin-top: var(--s-2);
}

.mt-4 {
  margin-top: var(--s-4);
}

.mt-6 {
  margin-top: var(--s-6);
}

.mb-2 {
  margin-bottom: var(--s-2);
}

.mb-4 {
  margin-bottom: var(--s-4);
}

.mb-6 {
  margin-bottom: var(--s-6);
}

/* Layout Utilities */
.flex {
  display: flex;
}

.flex-col {
  display: flex;
  flex-direction: column;
}

.items-center {
  align-items: center;
}

.justify-center {
  justify-content: center;
}

.justify-between {
  justify-content: space-between;
}

.gap-2 {
  gap: var(--s-2);
}

.gap-3 {
  gap: var(--s-3);
}

.gap-4 {
  gap: var(--s-4);
}

.w-full {
  width: 100%;
}

.h-full {
  height: 100%;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: var(--s-3) var(--s-5);
  border-radius: var(--radius-xl);
  font-weight: 600;
  font-size: 1rem;
  transition: all var(--transition-fast);
  width: 100%;
}

.btn:active {
  transform: scale(0.98);
}

.btn-primary {
  background-color: var(--primary);
  color: #FFFFFF;
  box-shadow: 0 4px 14px rgba(255, 107, 0, 0.3);
}

.btn-primary:hover {
  background-color: var(--primary-dark);
}

.btn-secondary {
  background-color: var(--secondary);
  color: white;
}

.btn-secondary:hover {
  background-color: var(--secondary-light);
}

.btn-outline {
  background-color: transparent;
  border: 2px solid var(--border-color);
  color: var(--text-main);
}

.btn-outline:hover {
  border-color: var(--text-muted);
  background-color: var(--surface-hover);
}

.btn-ghost {
  background-color: transparent;
  color: var(--text-muted);
}

.btn-ghost:hover {
  background-color: var(--surface-hover);
  color: var(--text-main);
}

/* Forms */
.form-group {
  margin-bottom: var(--s-4);
  width: 100%;
}

.form-label {
  display: block;
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--text-muted);
  margin-bottom: var(--s-2);
}

.form-input {
  width: 100%;
  padding: var(--s-3) var(--s-4);
  border-radius: var(--radius-md);
  border: 1px solid var(--border-color);
  background-color: var(--surface);
  font-size: 1rem;
  color: var(--text-main);
  transition: border-color var(--transition-fast);
}

.form-input:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px var(--primary-light);
}

.form-input::placeholder {
  color: var(--text-light);
}

/* Viewport specific to screens */
.view-content {
  flex: 1;
  overflow-y: auto;
  padding: var(--s-4);
  padding-bottom: calc(var(--s-4) + 80px);
  /* Space for bottom nav */
}

.view-content.no-nav {
  padding-bottom: var(--s-4);
}

/* Header */
.app-header {
  padding: var(--s-4);
  background-color: var(--surface);
  position: sticky;
  top: 0;
  z-index: 10;
  border-bottom: 1px solid var(--border-color);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.header-title {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--secondary);
}

/* Bottom Navigation */
.bottom-nav {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  background-color: var(--surface);
  box-shadow: var(--shadow-nav);
  display: flex;
  justify-content: space-around;
  align-items: center;
  height: 70px;
  z-index: 20;
  border-top-left-radius: var(--radius-lg);
  border-top-right-radius: var(--radius-lg);
}

.nav-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
  flex: 1;
  height: 100%;
  transition: color var(--transition-fast);
  position: relative;
}

.nav-item i,
.nav-item svg {
  width: 24px;
  height: 24px;
  margin-bottom: 4px;
  stroke-width: 2;
  stroke: currentColor;
  fill: none;
}

.nav-item.active i,
.nav-item.active svg {
  fill: currentColor;
}

.nav-label {
  font-size: 0.65rem;
  font-weight: 600;
}

.nav-item.active {
  color: var(--primary-dark);
}

.nav-fab {
  position: relative;
  top: -15px;
  background: var(--primary);
  width: 50px;
  height: 50px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #FFFFFF;
  box-shadow: 0 4px 10px rgba(255, 107, 0, 0.4);
  transform: translateY(0);
  transition: transform var(--transition-fast);
}

.nav-fab:active {
  transform: translateY(2px);
}

.nav-fab svg {
  width: 28px;
  height: 28px;
  margin-bottom: 0;
}

/* Cards */
.card {
  background-color: var(--surface);
  border-radius: var(--radius-lg);
  padding: var(--s-4);
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--border-color);
  margin-bottom: var(--s-4);
}

/* Badges */
.badge {
  display: inline-block;
  padding: 0.25em 0.75em;
  border-radius: var(--radius-full);
  font-size: 0.75rem;
  font-weight: 600;
}

.badge-primary {
  background: var(--primary-light);
  color: var(--primary-dark);
}

.badge-secondary {
  background: var(--secondary-light);
  color: white;
}

.badge-muted {
  background: var(--bg-color);
  color: var(--text-muted);
}

/* Avatar */
.avatar {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  object-fit: cover;
  background-color: var(--border-color);
}

.avatar-sm {
  width: 32px;
  height: 32px;
}

.avatar-lg {
  width: 80px;
  height: 80px;
}

/* Micro-animations & utilities */
.animate-fade-in {
  animation: fadeIn 0.4s ease forwards;
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(10px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.hide {
  display: none !important;
}