@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@300;400;500;600;700;800&family=Playfair+Display:ital,wght@0,600;0,700;1,400&display=swap');

:root {
  --primary: #1e3a2b;         /* Safari Deep Green */
  --primary-hover: #15291e;
  --secondary: #c59b27;       /* Safari Gold */
  --secondary-hover: #b08920;
  --accent: #d97706;          /* African Sunset Amber */
  --bg-main: #f8faf9;
  --bg-card: #ffffff;
  --text-dark: #111827;
  --text-muted: #6b7280;
  --border: #e5e7eb;
  --border-focus: #c59b27;
  --success: #10b981;
  --warning: #f59e0b;
  --danger: #ef4444;
  --radius: 12px;
  --radius-sm: 8px;
  --shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05), 0 2px 4px -2px rgba(0, 0, 0, 0.05);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.08), 0 4px 6px -4px rgba(0, 0, 0, 0.05);
}

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

body {
  font-family: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, sans-serif;
  background-color: var(--bg-main);
  color: var(--text-dark);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, .font-serif {
  font-family: 'Playfair Display', Georgia, serif;
}

/* App Layout */
.app-container {
  display: flex;
  min-height: 100vh;
}

/* Sidebar */
.sidebar {
  width: 280px;
  background: var(--primary);
  color: #fff;
  display: flex;
  flex-direction: column;
  flex-shrink: 0;
  transition: all 0.3s ease;
}

.sidebar-header {
  padding: 24px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.brand-badge {
  display: inline-block;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  color: var(--secondary);
  font-weight: 700;
  margin-bottom: 4px;
}

.brand-title {
  font-size: 19px;
  color: #fff;
  letter-spacing: -0.5px;
}

.sidebar-nav {
  padding: 20px 16px;
  flex: 1;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  color: rgba(255, 255, 255, 0.75);
  text-decoration: none;
  font-size: 14px;
  font-weight: 500;
  border-radius: var(--radius-sm);
  margin-bottom: 6px;
  transition: all 0.2s ease;
}

.nav-item:hover, .nav-item.active {
  color: #fff;
  background: rgba(255, 255, 255, 0.12);
}

.nav-item.active {
  background: var(--secondary);
  color: #1a1a1a;
  font-weight: 600;
}

.sidebar-footer {
  padding: 20px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  font-size: 13px;
}

/* Main Content Area */
.main-wrapper {
  flex: 1;
  display: flex;
  flex-direction: column;
  overflow-x: hidden;
}

.top-bar {
  background: #fff;
  border-bottom: 1px solid var(--border);
  padding: 16px 32px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

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

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 20px;
  border-radius: var(--radius-sm);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  text-decoration: none;
  border: 1px solid transparent;
  transition: all 0.2s ease;
}

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

.btn-secondary {
  background: var(--secondary);
  color: #111;
}
.btn-secondary:hover {
  background: var(--secondary-hover);
}

.btn-outline {
  border-color: var(--border);
  color: var(--text-dark);
  background: #fff;
}
.btn-outline:hover {
  background: #f3f4f6;
}

.btn-sm {
  padding: 6px 12px;
  font-size: 13px;
}

/* Cards & Stats */
.card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 24px;
  margin-bottom: 24px;
}

.grid-cols-4 {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 20px;
  margin-bottom: 28px;
}

.stat-card {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
  display: flex;
  flex-direction: column;
  box-shadow: var(--shadow);
}

.stat-label {
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  color: var(--text-muted);
  letter-spacing: 0.5px;
}

.stat-value {
  font-size: 26px;
  font-weight: 700;
  color: var(--text-dark);
  margin-top: 6px;
}

/* Tables */
.table-responsive {
  overflow-x: auto;
}

.table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
  font-size: 14px;
}

.table th {
  background: #f9fafb;
  padding: 12px 16px;
  font-weight: 600;
  color: var(--text-muted);
  border-bottom: 1px solid var(--border);
  text-transform: uppercase;
  font-size: 12px;
  letter-spacing: 0.5px;
}

.table td {
  padding: 14px 16px;
  border-bottom: 1px solid var(--border);
}

.table tbody tr:hover {
  background: #fafbfb;
}

/* Status Badges */
.badge {
  display: inline-flex;
  padding: 4px 10px;
  border-radius: 9999px;
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.badge-draft { background: #e5e7eb; color: #374151; }
.badge-sent { background: #dbeafe; color: #1d4ed8; }
.badge-viewed { background: #fef3c7; color: #b45309; }
.badge-accepted { background: #d1fae5; color: #065f46; }
.badge-invoiced { background: #ede9fe; color: #5b21b6; }
.badge-paid { background: #d1fae5; color: #065f46; }
.badge-partially_paid { background: #fef3c7; color: #b45309; }
.badge-unpaid { background: #fee2e2; color: #b91c1c; }

/* Forms */
.form-group {
  margin-bottom: 20px;
}

.form-label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  margin-bottom: 6px;
  color: #374151;
}

.form-control {
  width: 100%;
  padding: 10px 14px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-family: inherit;
  font-size: 14px;
  background: #fff;
  transition: border-color 0.2s;
}

.form-control:focus {
  outline: none;
  border-color: var(--border-focus);
  box-shadow: 0 0 0 3px rgba(197, 155, 39, 0.15);
}

/* Flash alerts */
.alert {
  padding: 14px 18px;
  border-radius: var(--radius-sm);
  margin-bottom: 20px;
  font-size: 14px;
  display: flex;
  align-items: center;
  gap: 10px;
}
.alert-success { background: #ecfdf5; color: #065f46; border: 1px solid #a7f3d0; }
.alert-error { background: #fef2f2; color: #991b1b; border: 1px solid #fecaca; }

/* Public Client View (Traveler Itinerary) */
.itinerary-hero {
  position: relative;
  background-size: cover;
  background-position: center;
  color: #fff;
  padding: 100px 30px;
  text-align: center;
  border-radius: 0 0 24px 24px;
}
.itinerary-hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(0,0,0,0.4) 0%, rgba(30,58,43,0.9) 100%);
  border-radius: 0 0 24px 24px;
}
.itinerary-hero-content {
  position: relative;
  z-index: 2;
  max-width: 900px;
  margin: 0 auto;
}

.day-card {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  margin-bottom: 28px;
  box-shadow: var(--shadow);
  display: grid;
  grid-template-columns: 320px 1fr;
}

.day-card img {
  width: 100%;
  height: 100%;
  min-height: 240px;
  object-fit: cover;
}

.day-card-body {
  padding: 24px 28px;
}

@media (max-width: 768px) {
  .app-container { flex-direction: column; }
  .sidebar { width: 100%; }
  .day-card { grid-template-columns: 1fr; }
  .day-card img { height: 200px; }
  .content-body { padding: 16px; }
}

@media print {
  .sidebar, .top-bar, .no-print { display: none !important; }
  .main-wrapper, .content-body { padding: 0 !important; }
  .card, .day-card { box-shadow: none !important; border: 1px solid #ddd !important; }
}
