/* HundredK — Design System */
:root {
  --gold: #c9a84c;
  --gold-light: #e4c97e;
  --gold-dark: #9a7a32;
  --black: #0a0a0a;
  --dark: #111111;
  --dark-2: #1a1a1a;
  --dark-3: #242424;
  --dark-4: #2e2e2e;
  --text: #f0ece4;
  --text-muted: #888880;
  --text-dim: #555550;
  --border: rgba(201, 168, 76, 0.15);
  --border-strong: rgba(201, 168, 76, 0.35);
  --success: #4caf7d;
  --danger: #e05252;
  --warning: #e0a052;
  --radius: 8px;
  --radius-lg: 14px;
  --shadow: 0 4px 24px rgba(0,0,0,0.4);
  --shadow-gold: 0 0 24px rgba(201,168,76,0.15);
  --font: 'Inter', system-ui, -apple-system, sans-serif;
  --font-serif: 'Playfair Display', Georgia, serif;
}

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

html { font-size: 16px; -webkit-text-size-adjust: 100%; }

body {
  font-family: var(--font);
  background: var(--black);
  color: var(--text);
  line-height: 1.6;
  min-height: 100dvh;
  overflow-x: hidden;
}

/* Typography */
h1, h2, h3, h4 { font-family: var(--font-serif); font-weight: 700; line-height: 1.2; }
h1 { font-size: clamp(1.8rem, 5vw, 3rem); }
h2 { font-size: clamp(1.4rem, 3.5vw, 2rem); }
h3 { font-size: clamp(1.1rem, 2.5vw, 1.4rem); }

a { color: var(--gold); text-decoration: none; }
a:hover { color: var(--gold-light); }

/* Layout */
.container { max-width: 1100px; margin: 0 auto; padding: 0 1.25rem; }
.page { min-height: 100dvh; display: flex; flex-direction: column; }
.content { flex: 1; padding: 1.5rem 0 4rem; }

/* Navbar */
.navbar {
  position: sticky; top: 0; z-index: 100;
  background: rgba(10,10,10,0.95);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
  padding: 0 1.25rem;
}
.navbar-inner {
  max-width: 1100px; margin: 0 auto;
  display: flex; align-items: center; gap: 1rem;
  height: 56px;
}
.navbar-brand {
  font-family: var(--font-serif);
  font-size: 1.25rem;
  color: var(--gold);
  letter-spacing: 0.05em;
  flex: 1;
}
.navbar-brand span { color: var(--text-muted); font-size: 0.75rem; font-family: var(--font); letter-spacing: 0.1em; display: block; }
.navbar-actions { display: flex; gap: 0.5rem; align-items: center; }

/* Bottom nav (mobile) */
.bottom-nav {
  position: fixed; bottom: 0; left: 0; right: 0; z-index: 100;
  background: rgba(17,17,17,0.97);
  backdrop-filter: blur(12px);
  border-top: 1px solid var(--border);
  display: flex;
  padding: 0 0 env(safe-area-inset-bottom);
}
.bottom-nav-item {
  flex: 1; display: flex; flex-direction: column; align-items: center;
  gap: 3px; padding: 0.6rem 0;
  color: var(--text-dim); font-size: 0.65rem; letter-spacing: 0.05em; text-transform: uppercase;
  cursor: pointer; border: none; background: none;
  transition: color 0.15s;
}
.bottom-nav-item svg { width: 22px; height: 22px; }
.bottom-nav-item.active, .bottom-nav-item:hover { color: var(--gold); }

/* Cards */
.card {
  background: var(--dark-2);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.25rem;
}
.card-gold {
  background: linear-gradient(135deg, rgba(201,168,76,0.08) 0%, rgba(201,168,76,0.03) 100%);
  border-color: var(--border-strong);
}
.card-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 1rem; }
.card-title { font-family: var(--font-serif); font-size: 1.1rem; color: var(--gold); }

/* Buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 0.4rem;
  padding: 0.6rem 1.2rem; border-radius: var(--radius);
  font-size: 0.875rem; font-weight: 500; font-family: var(--font);
  cursor: pointer; border: none; transition: all 0.15s;
  text-decoration: none; white-space: nowrap;
}
.btn:disabled { opacity: 0.45; cursor: not-allowed; }
.btn-primary { background: var(--gold); color: var(--black); }
.btn-primary:hover:not(:disabled) { background: var(--gold-light); color: var(--black); }
.btn-secondary { background: var(--dark-3); color: var(--text); border: 1px solid var(--border); }
.btn-secondary:hover:not(:disabled) { border-color: var(--border-strong); background: var(--dark-4); }
.btn-danger { background: rgba(224,82,82,0.15); color: var(--danger); border: 1px solid rgba(224,82,82,0.2); }
.btn-danger:hover:not(:disabled) { background: rgba(224,82,82,0.25); }
.btn-ghost { background: none; color: var(--text-muted); }
.btn-ghost:hover:not(:disabled) { color: var(--text); background: var(--dark-3); }
.btn-sm { padding: 0.35rem 0.75rem; font-size: 0.8rem; }
.btn-lg { padding: 0.85rem 2rem; font-size: 1rem; }
.btn-block { width: 100%; }

/* Forms */
.form-group { display: flex; flex-direction: column; gap: 0.4rem; margin-bottom: 1rem; }
.form-label { font-size: 0.8rem; color: var(--text-muted); letter-spacing: 0.06em; text-transform: uppercase; }
.form-control {
  background: var(--dark-3); border: 1px solid var(--border);
  border-radius: var(--radius); color: var(--text);
  padding: 0.65rem 0.85rem; font-size: 0.9rem; font-family: var(--font);
  transition: border-color 0.15s; width: 100%;
}
.form-control:focus { outline: none; border-color: var(--gold); }
.form-control::placeholder { color: var(--text-dim); }
.form-control option { background: var(--dark-3); }
textarea.form-control { resize: vertical; min-height: 80px; }

/* Badges */
.badge {
  display: inline-flex; align-items: center; gap: 0.3rem;
  padding: 0.2rem 0.55rem; border-radius: 100px;
  font-size: 0.7rem; font-weight: 600; letter-spacing: 0.05em;
  text-transform: uppercase;
}
.badge-gold { background: rgba(201,168,76,0.15); color: var(--gold); }
.badge-success { background: rgba(76,175,125,0.15); color: var(--success); }
.badge-danger { background: rgba(224,82,82,0.15); color: var(--danger); }
.badge-muted { background: var(--dark-3); color: var(--text-muted); }

/* Tables */
.table-wrap { overflow-x: auto; border-radius: var(--radius-lg); border: 1px solid var(--border); }
table { width: 100%; border-collapse: collapse; }
thead th {
  background: var(--dark-2); color: var(--text-muted);
  font-size: 0.75rem; letter-spacing: 0.08em; text-transform: uppercase;
  padding: 0.75rem 1rem; text-align: left; font-weight: 500;
  border-bottom: 1px solid var(--border);
}
tbody td { padding: 0.85rem 1rem; border-bottom: 1px solid rgba(255,255,255,0.04); font-size: 0.875rem; }
tbody tr:last-child td { border-bottom: none; }
tbody tr:hover td { background: rgba(255,255,255,0.02); }

/* Dividers */
.divider { height: 1px; background: var(--border); margin: 1.5rem 0; }
.section-title {
  font-size: 0.7rem; font-weight: 600; letter-spacing: 0.12em; text-transform: uppercase;
  color: var(--gold); margin-bottom: 1rem;
}

/* Alerts */
.alert { padding: 0.85rem 1rem; border-radius: var(--radius); font-size: 0.875rem; margin-bottom: 1rem; }
.alert-danger { background: rgba(224,82,82,0.1); border: 1px solid rgba(224,82,82,0.2); color: var(--danger); }
.alert-success { background: rgba(76,175,125,0.1); border: 1px solid rgba(76,175,125,0.2); color: var(--success); }
.alert-info { background: rgba(201,168,76,0.08); border: 1px solid var(--border); color: var(--text-muted); }

/* Tabs */
.tabs { display: flex; gap: 0; border-bottom: 1px solid var(--border); margin-bottom: 1.5rem; overflow-x: auto; }
.tab-btn {
  padding: 0.75rem 1.25rem; font-size: 0.875rem; color: var(--text-muted);
  background: none; border: none; border-bottom: 2px solid transparent;
  cursor: pointer; white-space: nowrap; transition: all 0.15s; font-family: var(--font);
  margin-bottom: -1px;
}
.tab-btn.active { color: var(--gold); border-bottom-color: var(--gold); }
.tab-btn:hover:not(.active) { color: var(--text); }
.tab-panel { display: none; }
.tab-panel.active { display: block; }

/* Modals */
.modal-overlay {
  position: fixed; inset: 0; z-index: 200;
  background: rgba(0,0,0,0.7); backdrop-filter: blur(4px);
  display: flex; align-items: flex-end; justify-content: center;
  padding: 0;
}
@media (min-width: 640px) {
  .modal-overlay { align-items: center; padding: 1rem; }
}
.modal {
  background: var(--dark-2); border: 1px solid var(--border);
  border-radius: var(--radius-lg) var(--radius-lg) 0 0;
  width: 100%; max-width: 540px; max-height: 90dvh;
  overflow-y: auto; padding: 1.5rem;
}
@media (min-width: 640px) {
  .modal { border-radius: var(--radius-lg); }
}
.modal-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 1.5rem; }
.modal-title { font-family: var(--font-serif); font-size: 1.2rem; color: var(--gold); }
.modal-close { background: none; border: none; color: var(--text-muted); cursor: pointer; font-size: 1.5rem; line-height: 1; padding: 0; }
.modal-close:hover { color: var(--text); }

/* Loading */
.loading { display: flex; align-items: center; justify-content: center; padding: 3rem; gap: 0.75rem; color: var(--text-muted); }
.spinner {
  width: 24px; height: 24px; border: 2px solid var(--dark-4);
  border-top-color: var(--gold); border-radius: 50%;
  animation: spin 0.7s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* Itinerary */
.itinerary-day { margin-bottom: 2rem; }
.itinerary-day-header {
  display: flex; align-items: center; gap: 1rem;
  margin-bottom: 1rem; padding-bottom: 0.75rem;
  border-bottom: 1px solid var(--border);
}
.day-number {
  width: 40px; height: 40px; border-radius: 50%;
  background: var(--gold); color: var(--black);
  display: flex; align-items: center; justify-content: center;
  font-family: var(--font-serif); font-weight: 700; font-size: 1rem;
  flex-shrink: 0;
}
.day-title { font-family: var(--font-serif); font-size: 1.1rem; }
.day-date { font-size: 0.8rem; color: var(--text-muted); }

.itinerary-item {
  display: flex; gap: 1rem; padding: 0.85rem 0;
  border-bottom: 1px solid rgba(255,255,255,0.04);
}
.itinerary-item:last-child { border-bottom: none; }
.item-time { font-size: 0.8rem; color: var(--gold); min-width: 48px; padding-top: 2px; font-weight: 500; }
.item-icon { width: 32px; height: 32px; border-radius: var(--radius); flex-shrink: 0; display: flex; align-items: center; justify-content: center; }
.item-icon-venue { background: rgba(201,168,76,0.12); color: var(--gold); }
.item-icon-hotel { background: rgba(76,175,125,0.12); color: var(--success); }
.item-icon-transport { background: rgba(100,149,237,0.12); color: #6495ed; }
.item-icon-flight { background: rgba(224,160,82,0.12); color: var(--warning); }
.item-icon-note { background: rgba(136,136,128,0.12); color: var(--text-muted); }
.item-body { flex: 1; }
.item-title { font-weight: 500; margin-bottom: 0.2rem; }
.item-desc { font-size: 0.825rem; color: var(--text-muted); }
.item-tags { display: flex; flex-wrap: wrap; gap: 0.35rem; margin-top: 0.5rem; }
.item-tag { font-size: 0.7rem; color: var(--text-dim); background: var(--dark-3); padding: 0.15rem 0.5rem; border-radius: 4px; }

/* Venue card */
.venue-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 1rem; }
.venue-card {
  background: var(--dark-2); border: 1px solid var(--border);
  border-radius: var(--radius-lg); overflow: hidden;
  transition: border-color 0.15s, transform 0.15s;
}
.venue-card:hover { border-color: var(--border-strong); transform: translateY(-2px); }
.venue-card-img { width: 100%; height: 160px; object-fit: cover; background: var(--dark-3); display: flex; align-items: center; justify-content: center; color: var(--text-dim); font-size: 2rem; }
.venue-card-body { padding: 1rem; }
.venue-card-name { font-family: var(--font-serif); font-size: 1.05rem; margin-bottom: 0.4rem; }
.venue-card-area { font-size: 0.8rem; color: var(--text-muted); margin-bottom: 0.6rem; }
.venue-card-desc { font-size: 0.825rem; color: var(--text-muted); line-height: 1.5; margin-bottom: 0.75rem; }
.venue-card-footer { display: flex; align-items: center; justify-content: space-between; }

/* Auth screen */
.auth-screen {
  min-height: 100dvh; display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  padding: 2rem 1.25rem;
  background: radial-gradient(ellipse at 50% 0%, rgba(201,168,76,0.06) 0%, transparent 70%);
}
.auth-logo { text-align: center; margin-bottom: 2.5rem; }
.auth-logo h1 { font-family: var(--font-serif); font-size: 2.5rem; color: var(--gold); letter-spacing: 0.05em; }
.auth-logo p { color: var(--text-muted); font-size: 0.875rem; margin-top: 0.4rem; }
.auth-card {
  background: var(--dark-2); border: 1px solid var(--border);
  border-radius: var(--radius-lg); padding: 2rem;
  width: 100%; max-width: 400px;
}

/* Stats grid */
.stats-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 1rem; margin-bottom: 1.5rem; }
.stat-card {
  background: var(--dark-2); border: 1px solid var(--border);
  border-radius: var(--radius-lg); padding: 1.25rem;
  text-align: center;
}
.stat-value { font-family: var(--font-serif); font-size: 2rem; color: var(--gold); line-height: 1; }
.stat-label { font-size: 0.75rem; color: var(--text-muted); margin-top: 0.4rem; letter-spacing: 0.06em; text-transform: uppercase; }

/* Grid / Flex utils */
.flex { display: flex; }
.flex-col { flex-direction: column; }
.items-center { align-items: center; }
.justify-between { justify-content: space-between; }
.gap-1 { gap: 0.5rem; }
.gap-2 { gap: 1rem; }
.gap-3 { gap: 1.5rem; }
.mt-1 { margin-top: 0.5rem; }
.mt-2 { margin-top: 1rem; }
.mt-3 { margin-top: 1.5rem; }
.mb-1 { margin-bottom: 0.5rem; }
.mb-2 { margin-bottom: 1rem; }
.text-gold { color: var(--gold); }
.text-muted { color: var(--text-muted); }
.text-sm { font-size: 0.85rem; }
.text-xs { font-size: 0.75rem; }
.hidden { display: none !important; }
.w-full { width: 100%; }

/* Responsive */
@media (max-width: 640px) {
  .hide-mobile { display: none !important; }
  .container { padding: 0 1rem; }
}
@media (min-width: 641px) {
  .bottom-nav { display: none; }
  .hide-desktop { display: none !important; }
  .content { padding-bottom: 2rem; }
}
