:root {
  --text: #3D3D3D;
  --subtle: #8A817C;
  --accent: #B08968; /* Earthy Brown */
  --bg: #F7F3F0; /* Cream Background */
  --border: #E0DBD5;
  --white: #FFFFFF;
  --success: #2E7D32;
  --today-blue: #5C7CFA;
  --link-blue: #004a99;
  --alert-red: #D32F2F;
}

body { 
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif; 
  background: var(--bg); color: var(--text); margin: 0; line-height: 1.6; 
}

/* === LOGIN SCREEN === */
#login-screen {
  position: fixed; top: 0; left: 0; width: 100%; height: 100%;
  background: var(--bg); display: flex; flex-direction: column;
  align-items: center; justify-content: center; z-index: 9999;
}
#login-screen h1 { margin-bottom: 0.5rem; font-size: 2rem; color: var(--accent); }
#login-screen p { color: var(--subtle); margin-bottom: 2rem; }
.pin-input {
  padding: 1rem; font-size: 1.5rem; letter-spacing: 5px; text-align: center;
  border: 2px solid var(--border); border-radius: 8px; width: 150px;
  outline: none; background: var(--white);
}
.pin-input:focus { border-color: var(--accent); }
#login-error { color: var(--alert-red); margin-top: 1rem; font-size: 0.9rem; display: none; }

/* === NEW GLOBAL NAVIGATION === */
.sub-nav { 
  display: flex; justify-content: center; gap: 2rem; padding: 1.2rem; 
  background: var(--white); border-bottom: 1px solid var(--border); 
  position: sticky; top: 0; z-index: 1000; flex-wrap: wrap;
}
.sub-nav a { 
  text-decoration: none; color: var(--subtle); font-weight: 600; 
  font-size: 0.95rem; transition: color 0.3s; padding-bottom: 5px;
}
.sub-nav a:hover, .sub-nav a.active { color: var(--accent); }
.sub-nav a.active { border-bottom: 2px solid var(--accent); }

/* Header & Hero */
.hero { text-align: center; padding: 3rem 1rem 2rem; }
.bright-tag { font-size: 0.75rem; letter-spacing: 3px; color: var(--today-blue); font-weight: bold; margin-bottom: 1rem; text-transform: uppercase; }
h1 { font-size: 2.8rem; margin: 0; font-weight: 700; }
.hero p { color: var(--subtle); font-size: 1.1rem; font-weight: 500; margin-top: 0.5rem; }

/* MAIN CONTAINER & TYPOGRAPHY */
.dashboard-container { max-width: 1300px; margin: 0 auto; padding: 0 2rem 5rem; }
.section-title { margin-bottom: 1.5rem; border-bottom: 2px solid var(--border); padding-bottom: 0.5rem; display: flex; justify-content: space-between; align-items: flex-end;}
.section-title h2 { margin: 0; font-size: 1.8rem; }
.section-title p { margin: 0.5rem 0 0; color: var(--subtle); font-size: 0.95rem; }

/* UP NEXT BANNER CARDS */
.up-next-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.5rem; margin-bottom: 4rem; }
.up-next-card { background: var(--white); border-left: 5px solid var(--border); border-radius: 8px; padding: 1.5rem; box-shadow: 0 4px 12px rgba(0,0,0,0.03); display: block; }
.up-next-card.lexi { border-left-color: var(--today-blue); }
.up-next-card.anna { border-left-color: var(--accent); }
.up-next-card h4 { margin: 0 0 0.5rem 0; font-size: 1rem; color: var(--text); }
.up-next-card p { margin: 0; font-size: 0.85rem; color: var(--subtle); }
.up-next-card .date-badge { display: inline-block; background: var(--bg); color: var(--accent); font-weight: bold; font-size: 0.75rem; padding: 3px 8px; border-radius: 4px; margin-top: 10px; }

/* MINI TRACKERS (FLIGHTS & HOUSING) */
.tracker-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 2rem; margin-bottom: 4rem; }
.tracker-card { background: var(--white); border: 1px solid var(--border); border-radius: 12px; padding: 2rem; box-shadow: 0 4px 12px rgba(0,0,0,0.03); }
.tracker-card h3 { margin-top: 0; display: flex; justify-content: space-between; align-items: center; border-bottom: 1px solid var(--border); padding-bottom: 1rem;}
.tracker-card h3 a { font-size: 0.8rem; color: var(--link-blue); text-decoration: none; font-weight: normal; }
.tracker-stat { font-size: 2rem; font-weight: bold; color: var(--text); margin: 1rem 0 0.5rem; }
.tracker-trend { font-size: 0.85rem; color: var(--subtle); }

/* Calendar UI (Kept from before) */
.calendar-wrapper { background: var(--white); border: 1px solid var(--border); padding: 1.5rem; margin-bottom: 4rem; box-shadow: 0 4px 15px rgba(0,0,0,0.03); border-radius: 8px; }
.calendar-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 2rem; }
.calendar-header h2 { font-size: 1.6rem; font-weight: 700; margin: 0; }
.nav-btn { background: #E9E4E0; border: 1px solid #D6CCC5; padding: 6px 14px; cursor: pointer; border-radius: 4px; font-size: 1rem; color: var(--text); transition: all 0.2s;}
.nav-btn:hover { background: #D6CCC5; transform: translateY(-1px); }
.calendar-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 1px; background: var(--border); border: 1px solid var(--border); }
.weekday-header { background: #E9E4E0; padding: 0.8rem; text-align: center; font-size: 0.75rem; font-weight: 600; color: var(--subtle); text-transform: uppercase; }
.calendar-day { background: white; min-height: 100px; padding: 0.6rem; position: relative; }
.calendar-day.today { outline: 2px solid var(--today-blue); background: #f0f4ff; z-index: 1; }
.calendar-day.today::after { content: 'TODAY'; position: absolute; top: 5px; right: 5px; font-size: 0.55rem; font-weight: bold; color: var(--today-blue); }
.date-num { font-size: 0.85rem; font-weight: bold; color: #888; }
.event-tag { background: var(--accent); color: white; font-size: 0.65rem; padding: 5px 8px; border-radius: 4px; margin-top: 8px; line-height: 1.3; }
.event-tag.critical { background-color: #D32F2F; } 
.event-tag.departure { background-color: #2E7D32; } 
.event-tag.human { background-color: #795548; } 

/* Tables */
.budget-table { width: 100%; border-collapse: separate; border-spacing: 0; margin-top: 1rem; table-layout: fixed; background: var(--white); border: 1px solid var(--border); border-radius: 8px; overflow: hidden; }
.budget-table th { text-align: left; padding: 1.2rem; font-size: 0.85rem; color: var(--text); font-weight: 700; border-bottom: 2px solid var(--border); background: #fbf9f8; }
.budget-table td { padding: 1.5rem 1.2rem; border-bottom: 1px solid #eee; font-size: 0.9rem; vertical-align: middle; line-height: 1.5; }

/* FAQ Section */
.faq-section { margin-top: 5rem; padding-top: 3rem; border-top: 2px solid var(--border); }
.faq-item { background: var(--white); border: 1px solid var(--border); border-radius: 8px; margin-bottom: 1rem; padding: 1.5rem; }
.faq-item h3 { margin: 0 0 0.5rem 0; color: var(--accent); font-size: 1.1rem; }
.faq-item p { margin: 0; font-size: 0.95rem; color: var(--text); line-height: 1.5; }
.faq-item strong { color: var(--today-blue); }

/* Search Bar (Now inside FAQ area) */
.global-search-container { max-width: 100%; margin-bottom: 2rem; position: relative; }
.global-search { 
  width: 100%; padding: 12px 20px; border-radius: 30px; 
  border: 2px solid var(--border); font-size: 0.95rem; outline: none; 
  transition: 0.3s; background: var(--white); box-sizing: border-box;
}
.global-search:focus { border-color: var(--today-blue); box-shadow: 0 4px 12px rgba(0,0,0,0.05); }