/* ==========================================
   ROTEIRO FÁCIL - MAIN CSS STYLESHEET
   ========================================== */

/* 1. Theme Variables & Reset */
:root {
  --font-main: 'Outfit', sans-serif;
  
  /* Dark Theme Default */
  --bg-app: #090d16;
  --bg-gradient: linear-gradient(135deg, #090d16 0%, #111827 100%);
  --bg-card: rgba(22, 28, 45, 0.7);
  --bg-card-hover: rgba(30, 41, 59, 0.85);
  --border-color: rgba(255, 255, 255, 0.08);
  --border-focus: #6366f1;
  
  --text-main: #f8fafc;
  --text-muted: #94a3b8;
  --text-inverse: #0f172a;
  
  --primary: #6366f1;
  --primary-glow: rgba(99, 102, 241, 0.15);
  --secondary: #ec4899;
  --secondary-glow: rgba(236, 72, 153, 0.15);
  
  --success: #10b981;
  --success-glow: rgba(16, 185, 129, 0.1);
  --warning: #f59e0b;
  --warning-glow: rgba(245, 158, 11, 0.1);
  --danger: #ef4444;
  --danger-glow: rgba(239, 68, 68, 0.1);

  --period-morning: rgba(245, 158, 11, 0.08);
  --period-afternoon: rgba(72, 149, 239, 0.08);
  --period-night: rgba(99, 102, 241, 0.08);
  
  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.2);
  --shadow-md: 0 8px 24px rgba(0, 0, 0, 0.3);
  --shadow-lg: 0 16px 40px rgba(0, 0, 0, 0.4);
  --glass-blur: blur(16px);
  --radius-sm: 8px;
  --radius-md: 16px;
  --radius-lg: 24px;
}

/* Light Theme Variables */
body.light-theme {
  --bg-app: #f4f6fa;
  --bg-gradient: linear-gradient(135deg, #f4f6fa 0%, #e2e8f0 100%);
  --bg-card: rgba(255, 255, 255, 0.75);
  --bg-card-hover: rgba(255, 255, 255, 0.95);
  --border-color: rgba(0, 0, 0, 0.06);
  --border-focus: #4f46e5;
  
  --text-main: #0f172a;
  --text-muted: #64748b;
  --text-inverse: #ffffff;
  
  --primary: #4f46e5;
  --primary-glow: rgba(79, 70, 229, 0.1);
  --secondary: #db2777;
  --secondary-glow: rgba(219, 39, 119, 0.1);
  
  --success: #059669;
  --success-glow: rgba(5, 150, 105, 0.08);
  --warning: #d97706;
  --warning-glow: rgba(217, 119, 6, 0.08);
  --danger: #dc2626;
  --danger-glow: rgba(220, 38, 38, 0.08);

  --period-morning: rgba(217, 119, 6, 0.06);
  --period-afternoon: rgba(79, 70, 229, 0.04);
  --period-night: rgba(124, 58, 237, 0.05);
  
  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.05);
  --shadow-md: 0 8px 24px rgba(148, 163, 184, 0.15);
  --shadow-lg: 0 16px 40px rgba(148, 163, 184, 0.25);
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  -webkit-tap-highlight-color: transparent;
}

body {
  font-family: var(--font-main);
  background: var(--bg-gradient);
  color: var(--text-main);
  min-height: 100vh;
  overflow-x: hidden;
  transition: background 0.3s ease, color 0.3s ease;
}

/* 2. Layout & Screen Manager */
#app-container {
  width: 100%;
  max-width: 600px; /* Estilo Celular Centralizado no Desktop */
  margin: 0 auto;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  position: relative;
  box-shadow: 0 0 50px rgba(0, 0, 0, 0.3);
  background-color: var(--bg-app);
}

.screen {
  display: none;
  width: 100%;
  flex-grow: 1;
}

.screen.active {
  display: flex;
  flex-direction: column;
  animation: fadeIn 0.3s ease;
}

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

/* 3. Button Styles & Badges */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-family: var(--font-main);
  font-size: 0.95rem;
  font-weight: 600;
  padding: 12px 24px;
  border-radius: var(--radius-md);
  border: none;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  text-decoration: none;
}

.btn-primary {
  background: linear-gradient(135deg, var(--primary) 0%, #4338ca 100%);
  color: var(--text-inverse);
  box-shadow: 0 4px 14px rgba(99, 102, 241, 0.35);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(99, 102, 241, 0.5);
}

.btn-secondary {
  background-color: var(--bg-card);
  color: var(--text-main);
  border: 1px solid var(--border-color);
}

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

.btn-danger-outline {
  background-color: transparent;
  color: var(--danger);
  border: 1px solid rgba(239, 68, 68, 0.3);
}

.btn-danger-outline:hover {
  background-color: var(--danger-glow);
  border-color: var(--danger);
}

.btn-sm {
  padding: 6px 12px;
  font-size: 0.85rem;
  border-radius: var(--radius-sm);
}

.btn-block {
  width: 100%;
}

.btn-icon {
  background: none;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  padding: 8px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: background-color 0.2s, color 0.2s;
}

.btn-icon:hover {
  background-color: var(--border-color);
  color: var(--text-main);
}

.btn-float {
  position: fixed;
  bottom: 85px; /* Acima da Nav */
  left: 50%;
  transform: translateX(-50%);
  z-index: 99;
  border-radius: 30px;
  padding: 14px 28px;
  box-shadow: 0 8px 32px rgba(99, 102, 241, 0.4);
}

.badge-dates {
  background-color: var(--primary-glow);
  color: var(--primary);
  border: 1px solid rgba(99, 102, 241, 0.2);
  padding: 4px 10px;
  font-size: 0.8rem;
  font-weight: 600;
  border-radius: 20px;
}

/* 4. Inputs & Forms */
.form-group {
  margin-bottom: 16px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-width: 0; /* Prevents grid blowout */
}

.form-group label {
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--text-muted);
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.form-group label i {
  width: 16px;
  height: 16px;
}

input[type="text"],
input[type="number"],
input[type="date"],
input[type="time"],
input[type="datetime-local"],
select,
textarea {
  font-family: var(--font-main);
  font-size: 0.95rem;
  background-color: rgba(15, 23, 42, 0.4);
  color: var(--text-main);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  padding: 12px 16px;
  transition: all 0.2s ease;
  outline: none;
  box-sizing: border-box;
  height: 44px; /* Ensure uniform height for all inputs and selects */
  width: 100%;
  max-width: 100%;
}

body.light-theme input,
body.light-theme select,
body.light-theme textarea {
  background-color: rgba(255, 255, 255, 0.8);
}

input:focus, select:focus, textarea:focus {
  border-color: var(--border-focus);
  box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.15);
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.flex-row-align {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 8px;
  margin-top: 10px;
}

.checkbox-label {
  cursor: pointer;
  font-size: 0.9rem !important;
  color: var(--text-main) !important;
}

input[type="checkbox"] {
  width: 18px;
  height: 18px;
  accent-color: var(--success);
  cursor: pointer;
}

/* 5. Welcome & Onboarding Screen */
.welcome-container {
  padding: 40px 24px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  min-height: 100vh;
  text-align: center;
}

.logo-area {
  margin-bottom: 32px;
}

.logo-icon-wrapper {
  background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
  width: 72px;
  height: 72px;
  border-radius: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 16px;
  box-shadow: 0 8px 30px rgba(99, 102, 241, 0.4);
}

.logo-icon {
  color: #fff;
  width: 36px;
  height: 36px;
}

.welcome-container h1 {
  font-size: 2.2rem;
  font-weight: 800;
  margin-bottom: 8px;
  background: linear-gradient(to right, var(--text-main), #818cf8);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.welcome-container p {
  color: var(--text-muted);
  font-size: 1rem;
  max-width: 320px;
  margin: 0 auto;
}

.card-form {
  background: var(--bg-card);
  backdrop-filter: var(--glass-blur);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 24px;
  width: 100%;
  text-align: left;
  box-shadow: var(--shadow-lg);
}

/* 6. Sticky Header & CountDown */
.app-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--bg-card);
  backdrop-filter: var(--glass-blur);
  border-bottom: 1px solid var(--border-color);
  padding: 14px 20px 10px;
}

.header-main {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px;
}

.trip-info-header h2 {
  font-size: 1.3rem;
  font-weight: 700;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 220px;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 6px;
}

.countdown-bar {
  font-size: 0.8rem;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: 4px;
}

.countdown-bar i {
  width: 12px;
  height: 12px;
}

/* Theme Toggle styles */
#theme-toggle-btn .sun-icon {
  display: none;
}
body.light-theme #theme-toggle-btn .sun-icon {
  display: inline-flex;
}
body.light-theme #theme-toggle-btn .moon-icon {
  display: none;
}

/* 7. Bottom Tab Navigation */
.bottom-nav {
  position: fixed;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 100%;
  max-width: 600px;
  background: var(--bg-card);
  backdrop-filter: var(--glass-blur);
  border-top: 1px solid var(--border-color);
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  height: 65px;
  z-index: 100;
  box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.15);
}

.nav-item {
  background: none;
  border: none;
  color: var(--text-muted);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  font-family: var(--font-main);
  font-size: 0.75rem;
  font-weight: 500;
  cursor: pointer;
  transition: color 0.2s;
}

.nav-item i {
  width: 20px;
  height: 20px;
  transition: transform 0.2s;
}

.nav-item.active {
  color: var(--primary);
  font-weight: 700;
}

.nav-item.active i {
  transform: translateY(-2px);
}

/* Content Area spacing */
.app-content {
  flex-grow: 1;
  padding: 20px 20px 100px; /* Espaço para nav inferior e floating button */
  overflow-y: auto;
}

/* 8. Dashboard View Components */
.dashboard-grid {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

/* Finance Cards Row */
.finance-cards {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
}

.finance-card {
  background: var(--bg-card);
  backdrop-filter: var(--glass-blur);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 12px 8px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 6px;
}

.finance-card .card-icon {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.9rem;
}

.budget-limit .card-icon { background: rgba(99, 102, 241, 0.15); color: var(--primary); }
.budget-spent .card-icon { background: rgba(236, 72, 153, 0.15); color: var(--secondary); }
.budget-remaining .card-icon { background: rgba(16, 185, 129, 0.15); color: var(--success); }

.finance-card h3 {
  font-size: 0.65rem;
  text-transform: uppercase;
  color: var(--text-muted);
  letter-spacing: 0.5px;
}

.finance-card .value {
  font-size: 0.85rem;
  font-weight: 700;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  width: 100%;
}

/* Standard Dashboard Cards */
.dashboard-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 18px;
  box-shadow: var(--shadow-sm);
}

.dashboard-card h3 {
  font-size: 0.95rem;
  font-weight: 700;
  margin-bottom: 12px;
  display: flex;
  align-items: center;
  gap: 8px;
}

/* Progress bar inside dashboard */
.progress-container {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 8px;
}

.progress-bar-wrapper {
  background: rgba(255, 255, 255, 0.05);
  border-radius: 10px;
  height: 10px;
  flex-grow: 1;
  overflow: hidden;
}

body.light-theme .progress-bar-wrapper {
  background: rgba(0, 0, 0, 0.05);
}

.progress-bar {
  background: linear-gradient(95deg, var(--primary) 0%, var(--success) 100%);
  height: 100%;
  border-radius: 10px;
  transition: width 0.4s ease;
}

.progress-percentage {
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--success);
  min-width: 40px;
  text-align: right;
}

.card-subtitle {
  font-size: 0.75rem;
  color: var(--text-muted);
}

/* Progress drawer styling */
.progress-details {
  margin-top: 15px;
  border-top: 1px solid var(--border-color);
  padding-top: 10px;
  max-height: 200px;
  overflow-y: auto;
}

.progress-details.hidden {
  display: none;
}

.progress-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.drawer-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 6px 0;
  font-size: 0.85rem;
  color: var(--text-color);
  transition: opacity 0.2s;
}

.drawer-item.resolved {
  opacity: 0.6;
  text-decoration: line-through;
}

.drawer-check {
  cursor: pointer;
  width: 16px;
  height: 16px;
  accent-color: var(--success);
}

/* Daily Spend Analysis card */
.daily-spend-metrics {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.metric {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.85rem;
  padding-bottom: 8px;
  border-bottom: 1px dashed var(--border-color);
}

.metric:last-child {
  border: none;
  padding: 0;
}

.metric-label {
  color: var(--text-muted);
}

.metric-val {
  font-weight: 700;
}

.text-warning {
  color: var(--warning);
}

.spend-warning {
  margin-top: 12px;
  background-color: var(--warning-glow);
  border: 1px solid rgba(245, 158, 11, 0.2);
  color: var(--warning);
  padding: 8px 12px;
  font-size: 0.75rem;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  gap: 8px;
}

.spend-warning i {
  width: 14px;
  height: 14px;
}

/* Quick checklist on dashboard */
.quick-booking-status {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.booking-status-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  cursor: pointer;
}

.booking-status-item:hover {
  background: rgba(99, 102, 241, 0.05);
  border-color: rgba(99, 102, 241, 0.3);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

body.light-theme .booking-status-item {
  background: rgba(0, 0, 0, 0.01);
}

body.light-theme .booking-status-item:hover {
  background: rgba(99, 102, 241, 0.03);
}

.status-indicator {
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.2s ease;
}

.status-indicator.clickable-indicator:hover {
  transform: scale(1.2);
  color: var(--primary) !important;
}

.status-indicator.pending { color: var(--text-muted); }
.status-indicator.done { color: var(--success); }

.status-indicator i {
  width: 18px;
  height: 18px;
}

.status-content {
  flex-grow: 1;
}

.status-title {
  display: block;
  font-size: 0.85rem;
  font-weight: 600;
}

.status-desc {
  display: block;
  font-size: 0.75rem;
  color: var(--text-muted);
}

.btn-go-to-tab {
  background: none;
  border: none;
  color: var(--primary);
  cursor: pointer;
}

/* Expenses Category Progress List */
.category-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.category-spend-item {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.cat-info-row {
  display: flex;
  justify-content: space-between;
  font-size: 0.8rem;
}

.cat-name {
  font-weight: 500;
}

.cat-amount {
  font-weight: 700;
}

.cat-bar-wrapper {
  background-color: var(--border-color);
  height: 6px;
  border-radius: 3px;
  overflow: hidden;
}

.cat-bar {
  height: 100%;
  border-radius: 3px;
}

/* 9. Day Scheduler Navigation (Itinerary View) */
.day-navigation {
  display: flex;
  align-items: center;
  background-color: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 8px 6px;
  margin-bottom: 16px;
}

.day-nav-arrow {
  background: none;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  padding: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.day-scroll {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  scroll-behavior: smooth;
  flex-grow: 1;
  scrollbar-width: none; /* Firefox */
  padding: 2px 4px;
}

.day-scroll::-webkit-scrollbar {
  display: none; /* Chrome/Safari */
}

.day-tab {
  flex-shrink: 0;
  flex-grow: 1;
  padding: 8px 12px;
  background-color: transparent;
  color: var(--text-muted);
  border: 1px solid transparent;
  border-radius: 12px;
  font-family: var(--font-main);
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.day-tab.active {
  background-color: var(--primary-glow);
  color: var(--primary);
  border-color: rgba(99, 102, 241, 0.2);
}

.active-day-info {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px;
  padding: 0 4px;
}

.active-day-info h3 {
  font-size: 1.2rem;
  font-weight: 800;
}

.active-day-date {
  font-size: 0.85rem;
  color: var(--text-muted);
  font-weight: 500;
}

.active-day-summary-banner {
  background-color: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  padding: 10px 14px;
  margin-bottom: 16px;
  font-size: 0.85rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.active-day-summary-banner div {
  display: flex;
  align-items: center;
  gap: 6px;
}

.active-day-summary-banner i {
  color: var(--success);
  width: 16px;
  height: 16px;
}

/* Timeline Cards */
.timeline-container {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.period-section {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.period-title {
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: 6px;
  padding-bottom: 4px;
  border-bottom: 1px solid var(--border-color);
}

.period-title i {
  width: 14px;
  height: 14px;
}

.activities-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.empty-period {
  font-size: 0.75rem;
  color: var(--text-muted);
  font-style: italic;
  padding: 8px;
  text-align: center;
  background-color: rgba(255, 255, 255, 0.01);
  border: 1px dashed var(--border-color);
  border-radius: var(--radius-sm);
}

/* Activity Card Item */
.activity-card {
  background-color: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 12px 14px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  transition: transform 0.2s, background-color 0.2s;
  position: relative;
  overflow: hidden;
}

.activity-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 4px;
  height: 100%;
}

.period-section[data-period="manha"] .activity-card::before { background-color: var(--warning); }
.period-section[data-period="tarde"] .activity-card::before { background-color: #3b82f6; }
.period-section[data-period="noite"] .activity-card::before { background-color: var(--primary); }

.activity-main-info {
  display: flex;
  align-items: center;
  gap: 12px;
  cursor: pointer;
}

.activity-checkbox-wrapper {
  display: flex;
  align-items: center;
  justify-content: center;
}

.activity-time-badge {
  background-color: var(--border-color);
  padding: 4px 8px;
  border-radius: 8px;
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--text-main);
  white-space: nowrap;
}

.activity-text-info {
  flex-grow: 1;
}

.activity-title {
  font-size: 0.9rem;
  font-weight: 600;
  line-height: 1.3;
}

.activity-card.resolved .activity-title {
  text-decoration: line-through;
  color: var(--text-muted);
}

.activity-meta-pills {
  display: flex;
  gap: 6px;
  margin-top: 4px;
  flex-wrap: wrap;
}

.pill {
  font-size: 0.65rem;
  padding: 2px 6px;
  border-radius: 4px;
  font-weight: 600;
}

.pill-category {
  background-color: rgba(99, 102, 241, 0.1);
  color: var(--primary);
}

.pill-cost {
  background-color: var(--success-glow);
  color: var(--success);
}

.activity-cost-val {
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--text-main);
}

.activity-card.resolved .activity-cost-val {
  color: var(--text-muted);
}

/* Expanded Card Details */
.activity-expanded-details {
  border-top: 1px solid var(--border-color);
  padding-top: 10px;
  margin-top: 4px;
  font-size: 0.8rem;
  display: flex;
  flex-direction: column;
  gap: 8px;
  animation: slideDown 0.2s ease-out;
}

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

.detail-row {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  color: var(--text-muted);
}

.detail-row i {
  width: 14px;
  height: 14px;
  margin-top: 2px;
}

.detail-row strong {
  color: var(--text-main);
}

.detail-actions-row {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  margin-top: 4px;
}

/* 10. Reservations Screen Components */
.reservas-container {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.reservation-card-group {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.group-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-bottom: 4px;
  border-bottom: 1px solid var(--border-color);
}

.group-header h2 {
  font-size: 1.05rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 8px;
}

.group-header h2 i {
  width: 18px;
  height: 18px;
  color: var(--primary);
}

/* Booking Card Expandable */
.booking-card {
  background-color: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 18px;
  box-shadow: var(--shadow-sm);
  transition: all 0.2s ease;
}

.booking-card-header {
  display: flex;
  align-items: center;
  gap: 14px;
  cursor: pointer;
}

.booking-tag {
  font-size: 0.65rem;
  font-weight: 800;
  padding: 4px 8px;
  border-radius: 6px;
  letter-spacing: 0.5px;
  display: flex;
  align-items: center;
  gap: 4px;
  white-space: nowrap;
}

.booking-tag.outward {
  background-color: rgba(99, 102, 241, 0.15);
  color: var(--primary);
}

.booking-tag.return {
  background-color: rgba(236, 72, 153, 0.15);
  color: var(--secondary);
}

.booking-title-area {
  flex-grow: 1;
}

.booking-title-area h3 {
  font-size: 0.95rem;
  font-weight: 600;
  margin-bottom: 2px;
}

.booking-title-area p {
  font-size: 0.8rem;
  color: var(--text-muted);
}

.booking-card-details {
  border-top: 1px solid var(--border-color);
  margin-top: 16px;
  padding-top: 16px;
  font-size: 0.85rem;
  display: flex;
  flex-direction: column;
  gap: 10px;
  animation: slideDown 0.2s ease;
}

.booking-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.booking-info-block {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.booking-info-block span {
  font-size: 0.7rem;
  color: var(--text-muted);
  text-transform: uppercase;
}

.booking-info-block strong {
  font-size: 0.8rem;
  color: var(--text-main);
}

.booking-note-block {
  background-color: rgba(255, 255, 255, 0.02);
  border: 1px solid var(--border-color);
  padding: 8px 10px;
  border-radius: var(--radius-sm);
  font-size: 0.75rem;
  color: var(--text-muted);
}

body.light-theme .booking-note-block {
  background-color: rgba(0, 0, 0, 0.01);
}

.booking-action-btn-row {
  display: flex;
  gap: 10px;
  margin-top: 4px;
}

.booking-action-btn-row .btn {
  flex-grow: 1;
}

/* Lodgings Specific style */
.lodgings-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.lodging-card {
  position: relative;
}

.lodging-card.resolved::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 4px;
  height: 100%;
  background-color: var(--success);
  border-top-left-radius: var(--radius-md);
  border-bottom-left-radius: var(--radius-md);
}

/* Car Rental specific style */
.cars-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.car-card {
  position: relative;
}

.car-card.resolved::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 4px;
  height: 100%;
  background-color: var(--warning);
  border-top-left-radius: var(--radius-md);
  border-bottom-left-radius: var(--radius-md);
}

/* 11. Checklist & Expenses View Components */
.checklist-expenses-grid {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.checklist-section, .expenses-section {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.section-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid var(--border-color);
  padding-bottom: 6px;
}

.section-header h2 {
  font-size: 1.05rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 8px;
}

.section-header h2 i {
  color: var(--primary);
  width: 18px;
  height: 18px;
}

/* Inline checklist task form */
.task-input-bar {
  display: flex;
  gap: 8px;
  animation: slideDown 0.2s ease;
}

.task-input-bar input {
  flex-grow: 1;
  padding: 10px 14px;
}

/* Task Item */
.tasks-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.task-item {
  background-color: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 12px 14px;
  display: flex;
  align-items: center;
  gap: 12px;
  transition: all 0.2s;
}

.task-item.resolved {
  opacity: 0.7;
}

.task-item-checkbox {
  display: flex;
  align-items: center;
}

.task-item-text {
  flex-grow: 1;
  font-size: 0.85rem;
  font-weight: 500;
}

.task-item.resolved .task-item-text {
  text-decoration: line-through;
  color: var(--text-muted);
}

/* Expenses summary card */
.expenses-summary-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  box-shadow: var(--shadow-sm);
}

.summary-line {
  display: flex;
  justify-content: space-between;
  font-size: 0.85rem;
  color: var(--text-muted);
}

.summary-line.total {
  border-top: 1px solid var(--border-color);
  padding-top: 8px;
  margin-top: 4px;
  font-size: 0.95rem;
  color: var(--text-main);
}

.summary-line.total strong {
  color: var(--primary);
  font-weight: 800;
}

.all-expenses-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  max-height: 250px;
  overflow-y: auto;
  padding-right: 2px;
}

.expense-row-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px 10px;
  background-color: rgba(255, 255, 255, 0.01);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  font-size: 0.8rem;
}

.expense-name-area {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.expense-cat-badge {
  font-size: 0.6rem;
  color: var(--text-muted);
}

.expense-val-area {
  font-weight: 700;
  color: var(--text-main);
}

/* Empty states */
.empty-state {
  text-align: center;
  padding: 24px 16px;
  color: var(--text-muted);
  font-size: 0.85rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
}

.empty-state i.large-icon {
  width: 36px;
  height: 36px;
  color: var(--text-muted);
  opacity: 0.5;
}

/* 12. Modals Structure */
.modal {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(9, 13, 22, 0.8);
  backdrop-filter: blur(8px);
  z-index: 200;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.modal.active {
  display: flex;
  animation: modalFadeIn 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

@keyframes modalFadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

.modal-content {
  background-color: var(--bg-app);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  width: 100%;
  max-width: 480px;
  max-height: 85vh;
  overflow-y: auto;
  box-shadow: var(--shadow-lg);
  animation: modalScaleUp 0.25s cubic-bezier(0.34, 1.56, 0.64, 1);
  display: flex;
  flex-direction: column;
}

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

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

.modal-header h3 {
  font-size: 1.1rem;
  font-weight: 700;
}

.btn-close-modal {
  background: none;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  display: flex;
}

.btn-close-modal i {
  width: 20px;
  height: 20px;
}

#activity-form, #lodging-form, #transport-form, #car-form, #edit-trip-form {
  padding: 24px;
  padding-bottom: 36px;
}

/* ========================================================
   13. PDF EXPORT-ONLY TEMPLATE STYLING
   ======================================================== */
.pdf-only {
  display: none; /* Hide in general browser rendering */
}

/* Under print media/html2pdf target, render beautifully */
#pdf-export-template {
  background-color: #ffffff !important;
  color: #0f172a !important;
  padding: 30px;
  font-family: var(--font-main);
  box-sizing: border-box;
}

.pdf-header {
  border-bottom: 3px solid #6366f1;
  padding-bottom: 20px;
  margin-bottom: 25px;
}

.pdf-header-main {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
}

.pdf-header h1 {
  font-size: 2.2rem;
  font-weight: 800;
  color: #1e1b4b !important;
}

.pdf-dates-sub {
  font-size: 1rem;
  color: #4b5563 !important;
  margin-top: 4px;
}

.pdf-budget-summary {
  text-align: right;
  font-size: 0.95rem;
  color: #374151 !important;
}

.pdf-budget-summary strong {
  font-size: 1.1rem;
  color: #6366f1 !important;
}

.pdf-section {
  margin-bottom: 30px;
  page-break-inside: avoid;
}

.pdf-section h2 {
  font-size: 1.3rem;
  color: #1e1b4b !important;
  border-bottom: 1px solid #e5e7eb;
  padding-bottom: 8px;
  margin-bottom: 15px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.pdf-grid-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 15px;
}

.pdf-subcard {
  background-color: #f9fafb !important;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  padding: 14px;
}

.pdf-subcard h3 {
  font-size: 1rem;
  color: #4f46e5 !important;
  margin-bottom: 8px;
  border-bottom: 1px solid #f3f4f6;
  padding-bottom: 4px;
}

.pdf-details-list {
  font-size: 0.85rem;
  line-height: 1.5;
  color: #4b5563 !important;
}

.pdf-details-list div {
  margin-bottom: 4px;
}

.pdf-details-list strong {
  color: #111827 !important;
}

.pdf-item-row {
  border-bottom: 1px solid #f3f4f6;
  padding: 10px 0;
}

.pdf-item-row:last-child {
  border: none;
}

.pdf-day-block {
  margin-bottom: 25px;
  page-break-inside: avoid;
}

.pdf-day-header {
  background-color: #f3f4f6 !important;
  padding: 8px 12px;
  border-radius: 6px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 10px;
}

.pdf-day-header h3 {
  font-size: 1.05rem;
  color: #1e1b4b !important;
}

.pdf-day-cost-sub {
  font-size: 0.85rem;
  font-weight: 700;
  color: #059669 !important;
}

.pdf-day-activities {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.pdf-activity-row {
  display: grid;
  grid-template-columns: 70px 1fr 100px;
  gap: 10px;
  font-size: 0.85rem;
  padding: 6px 8px;
  border-bottom: 1px solid #f3f4f6;
  align-items: center;
}

.pdf-activity-time {
  font-weight: 700;
  color: #4f46e5 !important;
}

.pdf-activity-title {
  color: #111827 !important;
}

.pdf-activity-cost {
  text-align: right;
  font-weight: 700;
  color: #374151 !important;
}

.pdf-activity-details-text {
  grid-column: 2 / 4;
  font-size: 0.75rem;
  color: #6b7280 !important;
  margin-top: -4px;
}

/* Custom Scrollbar for desktop browser view comfort */
.app-content::-webkit-scrollbar {
  width: 6px;
}
.app-content::-webkit-scrollbar-track {
  background: transparent;
}
.app-content::-webkit-scrollbar-thumb {
  background: var(--border-color);
  border-radius: 3px;
}
.app-content::-webkit-scrollbar-thumb:hover {
  background: var(--text-muted);
}

/* ==========================================
   14. UTILITY CLASSES
   ========================================== */
.hidden {
  display: none !important;
}

/* ==========================================
   15. MICRO-ANIMATIONS & TRANSITIONS
   ========================================== */
.finance-card {
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

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

.dashboard-card {
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.dashboard-card:hover {
  box-shadow: var(--shadow-md);
}

.activity-card:hover {
  background-color: var(--bg-card-hover);
}

.booking-card {
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.booking-card:hover {
  box-shadow: var(--shadow-md);
}

.task-item {
  transition: transform 0.15s ease, opacity 0.3s ease;
}

.task-item:hover {
  transform: translateX(4px);
}

.nav-item {
  transition: color 0.2s ease, transform 0.15s ease;
}

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

/* Subtle pulse for floating action button */
@keyframes subtlePulse {
  0%, 100% { box-shadow: 0 8px 32px rgba(99, 102, 241, 0.4); }
  50% { box-shadow: 0 8px 40px rgba(99, 102, 241, 0.6); }
}

.btn-float {
  animation: subtlePulse 2.5s ease-in-out infinite;
}

.btn-float:hover {
  animation: none;
  transform: translateX(-50%) translateY(-3px);
  box-shadow: 0 12px 40px rgba(99, 102, 241, 0.5);
}

/* Smooth Tab switch animation */
.tab-content {
  display: none;
}

.tab-content.active {
  display: block;
  animation: fadeInTab 0.25s ease-out;
}

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

/* Transition for card coloring on booking-status */
.booking-status-item {
  transition: background-color 0.2s ease, border-color 0.2s ease;
}

.booking-status-item:hover {
  background-color: var(--bg-card-hover);
  border-color: rgba(99, 102, 241, 0.15);
}

/* Toggle icon rotation */
.toggle-icon {
  transition: transform 0.25s ease;
}

/* Logo icon floating animation */
@keyframes logoFloat {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-6px); }
}

.logo-icon-wrapper {
  animation: logoFloat 3s ease-in-out infinite;
}

/* ==========================================
   16. TIMELINE (RESUMO ILUSTRATIVO)
   ========================================== */
.timeline-wrapper {
  padding: 16px 4px;
}

.timeline-hero-header {
  position: relative;
  border-radius: var(--radius-lg);
  overflow: hidden;
  margin-bottom: 32px;
  background-image: url('https://images.unsplash.com/photo-1436491865332-7a61a109cc05?auto=format&fit=crop&w=800&q=80');
  background-size: cover;
  background-position: center;
  box-shadow: var(--shadow-md);
}

.timeline-hero-header .hero-overlay {
  position: absolute;
  top: 0; left: 0; width: 100%; height: 100%;
  background: linear-gradient(135deg, rgba(79, 70, 229, 0.85) 0%, rgba(236, 72, 153, 0.7) 100%);
  z-index: 1;
}

.timeline-hero-header .hero-content {
  position: relative;
  z-index: 2;
  padding: 32px 20px;
  color: #fff;
  text-align: center;
}

.timeline-hero-header .hero-content h2 {
  font-size: 1.5rem;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  margin-bottom: 8px;
  text-shadow: 0 2px 4px rgba(0,0,0,0.3);
}

.timeline-hero-header .hero-content p {
  font-size: 0.9rem;
  opacity: 0.9;
}

.timeline-container {
  position: relative;
  padding-left: 32px; /* Espaço para a linha e ícones */
  margin-top: 16px;
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.timeline-container::before {
  content: '';
  position: absolute;
  top: 16px;
  bottom: 16px;
  left: 15px; /* Centralizado com o ícone */
  width: 2px;
  background: linear-gradient(to bottom, var(--primary-glow), var(--primary), var(--secondary), var(--primary-glow));
  opacity: 0.6;
  border-radius: 2px;
}

.timeline-node {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 8px;
  animation: fadeInUp 0.4s ease-out forwards;
  opacity: 0;
  transform: translateY(16px);
}

.timeline-node:nth-child(1) { animation-delay: 0.1s; }
.timeline-node:nth-child(2) { animation-delay: 0.2s; }
.timeline-node:nth-child(3) { animation-delay: 0.3s; }
.timeline-node:nth-child(4) { animation-delay: 0.4s; }
.timeline-node:nth-child(5) { animation-delay: 0.5s; }
.timeline-node:nth-child(n+6) { animation-delay: 0.6s; }

.timeline-icon-wrapper {
  position: absolute;
  left: -32px; /* Puxa para a esquerda sobre a linha */
  top: 0;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg-card);
  border: 2px solid var(--primary);
  color: var(--primary);
  z-index: 2;
  box-shadow: 0 4px 10px rgba(0,0,0,0.2);
}

.timeline-node.flight-node .timeline-icon-wrapper {
  background: linear-gradient(135deg, var(--primary), #3730a3);
  color: #fff;
  border: none;
}

.timeline-node.hotel-node .timeline-icon-wrapper {
  background: linear-gradient(135deg, var(--secondary), #be185d);
  color: #fff;
  border: none;
}

.timeline-node.activity-node .timeline-icon-wrapper {
  background: var(--bg-card);
  border: 2px solid var(--primary);
  color: var(--text-main);
  width: 24px;
  height: 24px;
  left: -28px;
  top: 4px;
}

.timeline-content {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  display: flex;
  flex-direction: row;
  overflow: hidden;
}

.timeline-content:hover {
  transform: translateY(-2px) translateX(2px);
  box-shadow: var(--shadow-md);
  border-color: rgba(99, 102, 241, 0.3);
}

.timeline-content-body {
  padding: 16px;
  flex: 1;
}

.timeline-card-image {
  width: 100px;
  min-width: 100px;
  background-size: cover;
  background-position: center;
  border-right: 1px solid var(--border-color);
}

.timeline-date-badge {
  display: inline-block;
  background: var(--primary-glow);
  color: var(--primary);
  font-size: 0.7rem;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 12px;
  margin-bottom: 8px;
}

.timeline-title {
  font-size: 1rem;
  font-weight: 600;
  color: var(--text-main);
  margin-bottom: 4px;
}

.timeline-details {
  font-size: 0.85rem;
  color: var(--text-muted);
  line-height: 1.4;
}

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

/* ==========================================
   17. RESPONSIVE BREAKPOINTS
   ========================================== */

/* Small phones (<=360px) */
@media screen and (max-width: 360px) {
  .finance-cards {
    grid-template-columns: 1fr;
    gap: 8px;
  }

  .finance-card {
    flex-direction: row;
    text-align: left;
    padding: 10px 14px;
  }

  .finance-card .card-icon {
    flex-shrink: 0;
  }

  .finance-card .card-info {
    flex-grow: 1;
  }

  .form-row {
    grid-template-columns: 1fr;
    gap: 0;
  }

  .booking-grid {
    grid-template-columns: 1fr;
  }

  .pdf-grid-2 {
    grid-template-columns: 1fr;
  }

  .trip-info-header h2 {
    max-width: 150px;
    font-size: 1.1rem;
  }

  .welcome-container h1 {
    font-size: 1.8rem;
  }

  .btn-float {
    padding: 12px 20px;
    font-size: 0.85rem;
  }
}

/* Tablets and Larger Phones (>600px) */
@media screen and (min-width: 601px) {
  #app-container {
    margin-top: 20px;
    margin-bottom: 20px;
    border-radius: var(--radius-lg);
    min-height: calc(100vh - 40px);
    overflow: hidden;
  }

  .bottom-nav {
    border-bottom-left-radius: var(--radius-lg);
    border-bottom-right-radius: var(--radius-lg);
  }
}

/* Desktop (>900px) */
@media screen and (min-width: 900px) {
  body {
    display: flex;
    justify-content: center;
    align-items: flex-start;
    padding: 0;
  }

  #app-container {
    box-shadow: 0 0 80px rgba(0, 0, 0, 0.4);
  }
}

/* Print Overrides */
@media print {
  body {
    background: #fff !important;
    color: #000 !important;
  }

  .bottom-nav,
  .app-header,
  .btn-float,
  .modal {
    display: none !important;
  }

  #app-container {
    max-width: 100%;
    box-shadow: none;
  }
}

