/* ============================================================
   VOYANTA — styles.css
   Estética: Deep ocean luxury. Oscuro, profundo, con destellos
   dorados y turquesa. Fuentes editoriales. Glassmorphism real.
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Playfair+Display:wght@500;600;700&family=DM+Sans:wght@300;400;500;600;700&display=swap');

/* ============================================================
   VARIABLES
   ============================================================ */
:root {
  --bg:           #060d18;
  --bg-mid:       #081020;
  --bg-soft:      #0c1628;
  --surface:      rgba(10, 20, 40, 0.72);
  --surface-hi:   rgba(15, 30, 60, 0.80);
  --line:         rgba(255,255,255,0.07);
  --line-hi:      rgba(255,255,255,0.13);

  --text:         #e8f0fa;
  --muted:        #7a95b8;
  --muted-hi:     #a8bdd8;

  --gold:         #c9a84c;
  --gold-light:   #e8c97a;
  --teal:         #2dd4bf;
  --teal-dim:     #14b8a6;
  --blue:         #60a5fa;
  --blue-dim:     #3b82f6;
  --danger:       #f87171;
  --success:      #34d399;

  --primary:      var(--teal);
  --primary-2:    var(--blue);

  --shadow-sm:    0 4px 20px rgba(0,0,0,0.25);
  --shadow:       0 12px 48px rgba(0,0,0,0.45);
  --shadow-lg:    0 24px 80px rgba(0,0,0,0.6);
  --glow-teal:    0 0 40px rgba(45,212,191,0.12);
  --glow-gold:    0 0 60px rgba(201,168,76,0.10);

  --radius:       28px;
  --radius-sm:    18px;
  --radius-xs:    12px;
}

/* ============================================================
   RESET & BASE
   ============================================================ */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
  min-height: 100vh;
  font-family: 'DM Sans', system-ui, sans-serif;
  font-size: 15px;
  color: var(--text);
  background-color: var(--bg);
  background-image:
    radial-gradient(ellipse 80% 50% at 10% -10%, rgba(45,212,191,0.07) 0%, transparent 60%),
    radial-gradient(ellipse 60% 40% at 90% 5%,  rgba(96,165,250,0.08) 0%, transparent 55%),
    radial-gradient(ellipse 100% 60% at 50% 100%, rgba(201,168,76,0.04) 0%, transparent 70%);
  padding: 16px;
  -webkit-font-smoothing: antialiased;
}

/* Grain overlay sutil */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)' opacity='0.03'/%3E%3C/svg%3E");
  pointer-events: none;
  z-index: 0;
  opacity: 0.4;
}

a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; }
.hidden { display: none !important; }

/* ============================================================
   GLASS
   ============================================================ */
.glass {
  background: var(--surface);
  backdrop-filter: blur(24px) saturate(180%);
  -webkit-backdrop-filter: blur(24px) saturate(180%);
  border: 1px solid var(--line);
  box-shadow: var(--shadow), inset 0 1px 0 rgba(255,255,255,0.05);
}

/* ============================================================
   TIPOGRAFÍA
   ============================================================ */
h1, h2, h3 {
  font-family: 'Playfair Display', Georgia, serif;
  font-weight: 600;
  line-height: 1.1;
  letter-spacing: -0.01em;
}
h4, h5, strong { font-family: 'DM Sans', system-ui, sans-serif; font-weight: 700; }

.eyebrow {
  display: inline-flex; align-items: center; gap: 8px;
  font-family: 'DM Sans', sans-serif;
  font-size: 11px; font-weight: 600;
  letter-spacing: 0.18em; text-transform: uppercase;
  color: var(--teal);
}

.pill, .brand-badge {
  display: inline-flex; align-items: center; gap: 8px;
  background: rgba(45,212,191,0.08);
  border: 1px solid rgba(45,212,191,0.2);
  color: var(--teal);
  border-radius: 999px; padding: 6px 14px;
  font-size: 12px; font-weight: 600;
  width: fit-content; max-width: 100%;
  pointer-events: none;
}
.tabs { position: relative; z-index: 10; }
.tab { position: relative; z-index: 10; pointer-events: auto !important; }
.auth-card { position: relative; z-index: 20; isolation: isolate; }

.muted { color: var(--muted); }
.muted-hi { color: var(--muted-hi); }
.small { font-size: 12px; }
.full { width: 100%; }

/* ============================================================
   ANIMACIONES DE ENTRADA
   ============================================================ */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(16px); }
  to   { opacity: 1; transform: translateY(0); }
}
@keyframes fadeIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}
@keyframes shimmer {
  0%   { background-position: -200% center; }
  100% { background-position:  200% center; }
}
@keyframes pulse-glow {
  0%, 100% { box-shadow: 0 0 0 0 rgba(45,212,191,0.15); }
  50%       { box-shadow: 0 0 0 8px rgba(45,212,191,0); }
}

.page-section.active > * {
  animation: fadeUp 0.45s ease both;
}
.page-section.active > *:nth-child(2) { animation-delay: 0.07s; }
.page-section.active > *:nth-child(3) { animation-delay: 0.14s; }
.page-section.active > *:nth-child(4) { animation-delay: 0.21s; }

/* ============================================================
   BOTONES
   ============================================================ */
.btn {
  border: none; border-radius: var(--radius-xs);
  padding: 11px 18px;
  display: inline-flex; align-items: center; justify-content: center; gap: 9px;
  cursor: pointer; font-weight: 600; font-size: 14px;
  transition: transform 0.18s ease, opacity 0.18s ease, box-shadow 0.18s ease;
  position: relative; overflow: hidden;
}
.btn::after {
  content: '';
  position: absolute; inset: 0;
  background: linear-gradient(135deg, rgba(255,255,255,0.08), transparent);
  opacity: 0; transition: opacity 0.2s;
}
.btn:hover::after { opacity: 1; }
.btn:hover { transform: translateY(-1px); }
.btn:active { transform: translateY(0); }

.btn-primary {
  background: linear-gradient(135deg, var(--teal-dim), var(--teal));
  color: #061018;
  box-shadow: 0 4px 20px rgba(45,212,191,0.25);
}
.btn-primary:hover { box-shadow: 0 6px 28px rgba(45,212,191,0.38); }

.btn-secondary {
  background: rgba(255,255,255,0.06);
  color: var(--text);
  border: 1px solid var(--line-hi);
}
.btn-ghost {
  background: transparent;
  color: var(--muted-hi);
  border: 1px solid var(--line);
}
.btn.danger { color: var(--danger); border-color: rgba(248,113,113,0.2); }
.btn.danger:hover { background: rgba(248,113,113,0.08); }

.icon-btn {
  width: 40px; height: 40px; border-radius: var(--radius-xs);
  border: 1px solid var(--line);
  background: rgba(255,255,255,0.04);
  color: var(--muted); cursor: pointer;
  display: grid; place-items: center;
  transition: background 0.2s, color 0.2s;
}
.icon-btn:hover { background: rgba(255,255,255,0.08); color: var(--text); }

/* ============================================================
   TABS
   ============================================================ */
.tabs { display: flex; gap: 8px; flex-wrap: wrap; }

.tab {
  padding: 10px 16px; border-radius: var(--radius-xs);
  background: transparent;
  color: var(--muted);
  border: 1px solid transparent;
  cursor: pointer; font-weight: 600; font-size: 14px;
  transition: all 0.2s ease;
  pointer-events: auto;
}
.tab:hover { color: var(--text); background: rgba(255,255,255,0.04); }
.tab.active {
  background: rgba(45,212,191,0.10);
  color: var(--teal);
  border-color: rgba(45,212,191,0.22);
}

/* ============================================================
   INPUTS / FORMS
   ============================================================ */
.form-stack, .form-grid { display: grid; gap: 16px; }
.form-stack h2 { margin-bottom: 4px; }
.form-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.form-grid label, .form-stack label {
  display: grid; gap: 7px;
  color: var(--muted-hi); font-weight: 500; font-size: 13px;
}
label.full { grid-column: 1 / -1; }

input, select, textarea {
  width: 100%; padding: 12px 14px;
  border-radius: var(--radius-xs);
  border: 1px solid var(--line-hi);
  background: rgba(255,255,255,0.04);
  color: var(--text); outline: none;
  transition: border-color 0.2s, box-shadow 0.2s;
}
input:focus, select:focus, textarea:focus {
  border-color: rgba(45,212,191,0.4);
  box-shadow: 0 0 0 3px rgba(45,212,191,0.08);
}
input::placeholder, textarea::placeholder { color: #4a6080; }
textarea { resize: vertical; min-height: 100px; }

select option { background: #0c1628; }

.form-error {
  font-size: 13px; color: var(--danger);
  background: rgba(248,113,113,0.08);
  border: 1px solid rgba(248,113,113,0.2);
  border-radius: var(--radius-xs);
  padding: 10px 14px;
}

/* ============================================================
   AUTH
   ============================================================ */
.auth-view {
  min-height: calc(100vh - 32px);
  display: grid; place-items: center;
  animation: fadeIn 0.6s ease;
}

.auth-panel {
  width: min(1100px, 100%);
  padding: 20px; border-radius: 36px;
  display: grid; grid-template-columns: 1.2fr 0.8fr; gap: 20px;
}

.auth-brand {
  padding: 36px; border-radius: 28px;
  background: linear-gradient(145deg, rgba(45,212,191,0.06), rgba(96,165,250,0.04), rgba(201,168,76,0.04));
  border: 1px solid var(--line);
  display: flex; flex-direction: column; justify-content: space-between;
  min-height: 580px; position: relative; overflow: hidden;
}
.auth-brand::before {
  content: '';
  position: absolute; top: -80px; right: -80px;
  width: 300px; height: 300px;
  background: radial-gradient(circle, rgba(45,212,191,0.10), transparent 70%);
  pointer-events: none;
}

.auth-brand h1 {
  font-size: clamp(2.2rem, 4.5vw, 3.8rem);
  line-height: 1.0;
  margin: 20px 0 14px;
  background: linear-gradient(135deg, #e8f0fa 30%, var(--teal) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.auth-brand p { color: var(--muted); max-width: 520px; font-size: 1rem; line-height: 1.6; }

.auth-highlights {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin-top: auto;
}
.auth-highlights div {
  background: rgba(255,255,255,0.04);
  border: 1px solid var(--line);
  border-radius: 20px; padding: 18px;
  display: flex; flex-direction: column; gap: 12px;
  transition: border-color 0.2s, background 0.2s;
}
.auth-highlights div:hover {
  border-color: rgba(45,212,191,0.25);
  background: rgba(45,212,191,0.05);
}
.auth-highlights i { font-size: 20px; color: var(--teal); }
.auth-highlights span { font-size: 13px; font-weight: 600; color: var(--muted-hi); }

.auth-card {
  padding: 28px; border-radius: 28px;
  background: rgba(6, 14, 28, 0.70);
  border: 1px solid var(--line-hi);
  display: flex; flex-direction: column; gap: 20px;
  position: relative; z-index: 20;
}

/* ============================================================
   LAYOUT PRINCIPAL
   ============================================================ */
.main-layout {
  display: grid;
  grid-template-columns: 268px 1fr;
  gap: 16px;
  min-height: calc(100vh - 32px);
}

/* ============================================================
   SIDEBAR
   ============================================================ */
.sidebar {
  border-radius: var(--radius);
  padding: 20px 16px;
  display: flex; flex-direction: column; justify-content: space-between;
  position: sticky; top: 16px;
  height: calc(100vh - 32px);
  animation: fadeUp 0.5s ease both;
}

.brand-row {
  display: flex; align-items: center; gap: 14px;
  padding: 8px 8px 28px;
}
.brand-icon {
  width: 50px; height: 50px; border-radius: 16px;
  display: grid; place-items: center;
  background: linear-gradient(135deg, var(--teal-dim), var(--teal));
  color: #061018; font-size: 20px;
  box-shadow: 0 4px 16px rgba(45,212,191,0.3);
}
.brand-row h2 {
  font-family: 'Playfair Display', serif;
  font-size: 1.25rem; margin: 0;
}
.brand-row p { margin: 3px 0 0; color: var(--muted); font-size: 0.82rem; }

.side-nav { display: grid; gap: 6px; }

.nav-item {
  display: flex; align-items: center; gap: 12px;
  border: 1px solid transparent;
  background: transparent;
  color: var(--muted);
  padding: 13px 16px; border-radius: 16px;
  font-weight: 600; font-size: 14px;
  cursor: pointer; text-align: left;
  transition: all 0.2s ease;
}
.nav-item i { font-size: 16px; width: 18px; text-align: center; }
.nav-item:hover {
  background: rgba(255,255,255,0.05);
  color: var(--text);
  border-color: var(--line);
}
.nav-item.active {
  background: rgba(45,212,191,0.10);
  color: var(--teal);
  border-color: rgba(45,212,191,0.22);
}
.nav-item.active i { color: var(--teal); }

.sidebar-footer { display: grid; gap: 14px; }

.user-mini {
  display: flex; gap: 12px; align-items: center;
  padding: 12px; border-radius: 16px;
  background: rgba(255,255,255,0.03);
  border: 1px solid var(--line);
}
.user-mini strong { font-size: 14px; display: block; }
.user-mini p { margin: 3px 0 0; color: var(--muted); font-size: 0.8rem; }

.avatar {
  width: 42px; height: 42px; border-radius: 14px;
  display: grid; place-items: center;
  background: linear-gradient(135deg, rgba(45,212,191,0.3), rgba(96,165,250,0.2));
  border: 1px solid rgba(45,212,191,0.2);
  font-weight: 800; font-size: 1rem; color: var(--teal);
  flex-shrink: 0;
}
.avatar.xl {
  width: 80px; height: 80px;
  border-radius: 24px; font-size: 1.8rem;
}

/* ============================================================
   CONTENIDO / TOPBAR
   ============================================================ */
.content { display: grid; gap: 16px; align-content: start; }

.topbar {
  border-radius: var(--radius);
  padding: 18px 24px;
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  animation: fadeUp 0.4s ease both;
}
.topbar h1 {
  font-size: clamp(1.6rem, 3vw, 2.2rem);
  margin: 4px 0 0;
}
.topbar-actions { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }

.search-wrap {
  display: flex; align-items: center; gap: 10px;
  background: rgba(255,255,255,0.04);
  border: 1px solid var(--line-hi);
  border-radius: var(--radius-xs);
  padding: 0 14px; min-width: 260px;
  transition: border-color 0.2s;
}
.search-wrap:focus-within { border-color: rgba(45,212,191,0.35); }
.search-wrap i { color: var(--muted); }
.search-wrap input { border: none; background: transparent; padding: 11px 0; }

/* ============================================================
   SECCIONES
   ============================================================ */
.page-section { display: none; gap: 16px; }
.page-section.active { display: grid; }

/* ============================================================
   HERO BANNER
   ============================================================ */
.hero-banner {
  padding: 28px 32px; border-radius: var(--radius);
  display: grid; grid-template-columns: 1.3fr 0.7fr; gap: 28px;
  background: linear-gradient(135deg,
    rgba(10,25,50,0.85) 0%,
    rgba(8,20,42,0.90) 100%);
  border: 1px solid var(--line-hi);
  position: relative; overflow: hidden;
}
.hero-banner::before {
  content: '';
  position: absolute; top: -100px; right: -100px;
  width: 400px; height: 400px;
  background: radial-gradient(circle, rgba(45,212,191,0.07), transparent 65%);
  pointer-events: none;
}
.hero-banner::after {
  content: '';
  position: absolute; bottom: -60px; left: 30%;
  width: 300px; height: 200px;
  background: radial-gradient(ellipse, rgba(201,168,76,0.05), transparent 70%);
  pointer-events: none;
}
.hero-banner h2 {
  font-size: clamp(1.6rem, 2.5vw, 2.4rem);
  margin: 14px 0 10px;
  background: linear-gradient(135deg, #e8f0fa 50%, var(--teal-dim) 100%);
  -webkit-background-clip: text; -webkit-text-fill-color: transparent;
  background-clip: text;
}
.hero-banner p { color: var(--muted); line-height: 1.6; }
.hero-stats { display: grid; gap: 12px; }

/* ============================================================
   STAT CARDS
   ============================================================ */
.stat-card {
  background: rgba(255,255,255,0.04);
  border: 1px solid var(--line);
  border-radius: 20px; padding: 16px 20px;
  transition: border-color 0.25s;
}
.stat-card:hover { border-color: rgba(45,212,191,0.22); }
.stat-card span { color: var(--muted); display: block; margin-bottom: 6px; font-size: 13px; }
.stat-card strong { font-size: 1.5rem; font-weight: 800; }

/* ============================================================
   SECTION HEAD
   ============================================================ */
.section-head {
  display: flex; justify-content: space-between; align-items: end;
}
.section-head h3 { font-size: 1.3rem; }
.section-head p { color: var(--muted); font-size: 13px; margin-top: 4px; }

/* ============================================================
   TRIP GRID & CARDS
   ============================================================ */
.trip-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(290px, 1fr));
  gap: 16px;
}

.trip-card {
  position: relative; overflow: hidden;
  border-radius: var(--radius); min-height: 300px;
  display: flex; flex-direction: column; justify-content: flex-end;
  background-size: cover; background-position: center;
  border: 1px solid var(--line);
  cursor: pointer;
  transition: transform 0.28s ease, box-shadow 0.28s ease, border-color 0.28s;
}
.trip-card:hover {
  transform: translateY(-4px) scale(1.01);
  box-shadow: 0 20px 60px rgba(0,0,0,0.5), var(--glow-teal);
  border-color: rgba(45,212,191,0.25);
}
.trip-card::before {
  content: '';
  position: absolute; inset: 0;
  background: linear-gradient(180deg,
    rgba(6,13,24,0.1) 0%,
    rgba(6,13,24,0.5) 50%,
    rgba(6,13,24,0.96) 100%);
  transition: opacity 0.3s;
}
.trip-card-content {
  position: relative; z-index: 1;
  padding: 22px; display: grid; gap: 10px;
}
.trip-card-meta {
  display: flex; flex-wrap: wrap; gap: 10px;
  color: var(--muted-hi); font-size: 12px;
}
.trip-card h4 { font-size: 1.35rem; margin: 2px 0; }
.trip-card p { margin: 0; color: var(--muted-hi); font-size: 14px; }
.card-top { display: flex; justify-content: space-between; align-items: center; }

/* ============================================================
   EMPTY STATE
   ============================================================ */
.empty-state {
  border-radius: var(--radius); padding: 60px 24px;
  text-align: center; display: grid; place-items: center; gap: 14px;
  border: 1px dashed rgba(45,212,191,0.2);
  background: rgba(45,212,191,0.02);
}
.empty-state i { font-size: 2.5rem; color: var(--teal); opacity: 0.7; }
.empty-state h3 { font-size: 1.2rem; color: var(--muted-hi); }
.empty-state p { color: var(--muted); max-width: 360px; }

/* ============================================================
   TRIP DETAIL
   ============================================================ */
.trip-detail { display: grid; gap: 16px; }

.trip-cover {
  border-radius: var(--radius); overflow: hidden;
  display: grid; grid-template-columns: 320px 1fr;
  min-height: 280px; border: 1px solid var(--line);
}
.trip-cover-image {
  background-size: cover; background-position: center;
  min-height: 220px;
  background: linear-gradient(135deg, #0f2740, #1e3a5f);
}
.trip-cover-content {
  padding: 28px; display: grid; gap: 14px; align-content: center;
  background: var(--surface);
}
.trip-cover-top { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.trip-actions-inline { display: flex; gap: 10px; flex-wrap: wrap; }
.trip-cover h2 { font-size: clamp(1.8rem, 3vw, 2.6rem); margin: 0; }
.trip-meta-line { display: flex; flex-wrap: wrap; gap: 18px; color: var(--muted-hi); font-size: 14px; }

.trip-overview-grid {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px;
}
.overview-card {
  border-radius: 22px; padding: 18px;
  transition: border-color 0.2s;
}
.overview-card:hover { border-color: rgba(45,212,191,0.2); }
.overview-card span { color: var(--muted); display: block; margin-bottom: 8px; font-size: 12px; }
.overview-card strong { font-size: 1.1rem; }

.trip-tabs {
  background: rgba(255,255,255,0.03);
  padding: 8px; border-radius: 22px;
  border: 1px solid var(--line);
  display: flex; gap: 6px; flex-wrap: wrap;
}
.tab-panel { display: none; }
.tab-panel.active { display: block; }

/* ============================================================
   PANEL CARDS
   ============================================================ */
.panel-card { border-radius: var(--radius); padding: 24px; }
.panel-head {
  display: flex; align-items: flex-start; justify-content: space-between;
  gap: 14px; margin-bottom: 20px;
}
.panel-head h3 { font-size: 1.15rem; margin: 0; }
.panel-head p { margin: 5px 0 0; color: var(--muted); font-size: 13px; }
.between { justify-content: space-between; }

.summary-grid {
  display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px;
}
.summary-grid .wide { grid-column: 1 / -1; }

.summary-list { display: grid; gap: 10px; }
.summary-item {
  display: flex; justify-content: space-between; gap: 10px;
  padding: 13px 16px; border-radius: 16px;
  background: rgba(255,255,255,0.04);
  border: 1px solid var(--line);
  font-size: 14px;
}
.summary-item span { color: var(--muted); }

/* ============================================================
   ITEM CARDS (transport, stays, etc.)
   ============================================================ */
.stack-list { display: grid; gap: 12px; }

.item-card {
  display: grid; gap: 10px; padding: 18px;
  border-radius: 20px;
  background: rgba(255,255,255,0.04);
  border: 1px solid var(--line);
  transition: border-color 0.2s, background 0.2s;
}
.item-card:hover {
  border-color: rgba(45,212,191,0.18);
  background: rgba(45,212,191,0.03);
}
.item-card-top { display: flex; justify-content: space-between; gap: 12px; align-items: flex-start; }
.item-card h4 { margin: 0; font-size: 1rem; }
.item-meta { display: flex; flex-wrap: wrap; gap: 10px; color: var(--muted-hi); font-size: 13px; }
.item-notes { color: var(--muted); font-size: 13px; }

/* ============================================================
   BADGE
   ============================================================ */
.badge {
  display: inline-flex; align-items: center; gap: 6px;
  border-radius: 999px; padding: 5px 12px; font-size: 12px; font-weight: 600;
  background: rgba(255,255,255,0.07);
  border: 1px solid var(--line-hi);
  color: var(--muted-hi);
}

/* ============================================================
   ITINERARIO
   ============================================================ */
.itinerary-days { display: grid; gap: 16px; }
.day-block {
  border: 1px solid var(--line);
  border-radius: 22px; padding: 18px;
  background: rgba(255,255,255,0.02);
}
.day-header {
  display: flex; justify-content: space-between; align-items: center;
  gap: 12px; margin-bottom: 14px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--line);
}
.day-timeline { display: grid; gap: 10px; }
.timeline-item {
  display: grid; grid-template-columns: 72px 1fr;
  gap: 14px; padding: 14px;
  border-radius: 16px;
  background: rgba(8,15,29,0.6);
  border: 1px solid var(--line);
}
.timeline-time { font-weight: 800; color: var(--teal); font-size: 14px; }
.timeline-content h4 { margin: 0 0 6px; font-size: 0.95rem; }
.timeline-content p { margin: 0; color: var(--muted); font-size: 13px; }

/* ============================================================
   NOTAS
   ============================================================ */
.note-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 14px;
}
.note-card {
  padding: 18px; border-radius: 20px;
  background: linear-gradient(145deg, rgba(255,255,255,0.06), rgba(255,255,255,0.02));
  border: 1px solid var(--line);
  display: grid; gap: 10px;
  transition: border-color 0.2s;
}
.note-card:hover { border-color: rgba(201,168,76,0.25); }
.note-card h4 { font-size: 0.95rem; }

/* ============================================================
   MAPA
   ============================================================ */
.map-box {
  height: 300px; border-radius: 20px;
  overflow: hidden; border: 1px solid var(--line);
}
.map-box.large { height: 520px; }
.leaflet-container { font-family: 'DM Sans', sans-serif; }

/* ============================================================
   GASTOS
   ============================================================ */
.expense-layout {
  display: grid; grid-template-columns: 1.3fr 0.7fr; gap: 16px;
}

/* ============================================================
   FORO / COMUNIDAD
   ============================================================ */
.community-layout {
  display: grid; grid-template-columns: 1.3fr 0.7fr; gap: 16px;
}
.forum-list { display: grid; gap: 14px; }
.forum-card {
  padding: 20px; border-radius: 20px;
  background: rgba(255,255,255,0.04);
  border: 1px solid var(--line);
  display: grid; gap: 12px;
  transition: border-color 0.25s, background 0.25s;
}
.forum-card:hover {
  border-color: rgba(45,212,191,0.2);
  background: rgba(45,212,191,0.03);
}
.forum-card h4 { margin: 0; font-size: 1rem; }
.forum-card p { color: var(--muted-hi); font-size: 14px; line-height: 1.6; }
.forum-card-footer {
  display: flex; justify-content: space-between; gap: 10px;
  color: var(--muted); font-size: 12px; padding-top: 8px;
  border-top: 1px solid var(--line);
}

/* ============================================================
   PERFIL
   ============================================================ */
.profile-grid { display: grid; grid-template-columns: 1.2fr 0.8fr; gap: 16px; }
.profile-card-body { display: flex; align-items: center; gap: 20px; margin-top: 8px; }

.feature-roadmap {
  display: grid; gap: 10px;
  list-style: none; padding: 0; margin: 0;
}
.feature-roadmap li {
  padding: 12px 16px; border-radius: 14px;
  background: rgba(255,255,255,0.03);
  border: 1px solid var(--line);
  color: var(--muted-hi); font-size: 14px;
  display: flex; align-items: center; gap: 10px;
}
.feature-roadmap li::before {
  content: '→';
  color: var(--teal); font-weight: 700;
}

/* ============================================================
   MODALES
   ============================================================ */
.modal-backdrop {
  position: fixed; inset: 0;
  background: rgba(3, 8, 18, 0.75);
  backdrop-filter: blur(8px);
  z-index: 40;
  animation: fadeIn 0.2s ease;
}
.modal {
  position: fixed; inset: 0;
  display: grid; place-items: center;
  z-index: 50; padding: 20px;
}
.modal-card {
  width: min(720px, 100%); border-radius: var(--radius);
  padding: 24px; max-height: 92vh; overflow: auto;
  animation: fadeUp 0.3s ease;
}
.modal-head {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 20px;
}
.modal-head h3 { margin: 0; }

/* ============================================================
   SCROLLBAR
   ============================================================ */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb {
  background: rgba(45,212,191,0.25);
  border-radius: 999px;
}
::-webkit-scrollbar-thumb:hover { background: rgba(45,212,191,0.45); }

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 1180px) {
  .auth-panel, .hero-banner, .expense-layout,
  .community-layout, .profile-grid, .summary-grid, .trip-cover {
    grid-template-columns: 1fr;
  }
  .trip-overview-grid { grid-template-columns: repeat(2, 1fr); }
  .auth-highlights { grid-template-columns: repeat(3, 1fr); }
}

@media (max-width: 980px) {
  .main-layout { grid-template-columns: 1fr; }
  .sidebar { position: static; height: auto; }
  .auth-highlights { grid-template-columns: 1fr; }
}

@media (max-width: 760px) {
  body { padding: 10px; }
  .auth-panel, .trip-cover, .hero-banner, .topbar { padding: 16px; border-radius: 22px; }
  .auth-highlights, .trip-overview-grid, .form-grid { grid-template-columns: 1fr; }
  .trip-overview-grid, .summary-grid, .expense-layout,
  .community-layout, .profile-grid { grid-template-columns: 1fr; }
  .trip-cover-content, .panel-card, .auth-card, .auth-brand { padding: 18px; }
  .search-wrap { min-width: 100%; }
  .topbar { align-items: flex-start; flex-direction: column; }
  .topbar-actions { width: 100%; }
  .trip-tabs { overflow-x: auto; flex-wrap: nowrap; }
  .trip-tabs .tab { white-space: nowrap; }
  .timeline-item { grid-template-columns: 1fr; }
  .map-box.large { height: 360px; }
  .trip-grid { grid-template-columns: 1fr; }
  .note-grid { grid-template-columns: 1fr; }
}

/* ============================================================
   SUBTOTAL BAR
   ============================================================ */
.subtotal-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  margin-top: 16px;
  padding: 14px 18px;
  border-radius: 16px;
  background: rgba(45,212,191,0.07);
  border: 1px solid rgba(45,212,191,0.2);
  font-size: 13px;
  color: var(--muted-hi);
}
.subtotal-bar i { color: var(--teal); }
.subtotal-bar strong { color: var(--teal); font-size: 14px; }

/* ============================================================
   RANKING
   ============================================================ */
.ranking-header {
  padding: 28px 32px;
  border-radius: var(--radius);
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
  flex-wrap: wrap;
}
.ranking-header h2 { margin: 8px 0 4px; }
.ranking-period-tabs { display: flex; gap: 8px; }

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

.ranking-list { display: grid; gap: 10px; }

.ranking-row {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 18px;
  border-radius: 16px;
  background: rgba(255,255,255,0.04);
  border: 1px solid var(--line);
  transition: border-color 0.2s;
}
.ranking-row:hover { border-color: rgba(45,212,191,0.2); }
.ranking-row-me {
  background: rgba(45,212,191,0.08);
  border-color: rgba(45,212,191,0.3) !important;
}
.ranking-pos {
  font-size: 1.3rem;
  min-width: 36px;
  text-align: center;
  font-weight: 800;
  color: var(--muted);
}
.ranking-name {
  flex: 1;
  font-weight: 600;
  font-size: 14px;
}
.ranking-you {
  color: var(--teal);
  font-size: 12px;
  font-weight: 500;
}
.ranking-value {
  font-weight: 800;
  color: var(--teal);
  font-size: 15px;
}
.ranking-my-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
}

@media (max-width: 980px) {
  .ranking-grid { grid-template-columns: 1fr; }
  .ranking-my-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 600px) {
  .ranking-my-grid { grid-template-columns: 1fr 1fr; }
  .ranking-header { flex-direction: column; align-items: flex-start; }
}

/* ============================================================
   MAP LINKS (Google Maps / Waze)
   ============================================================ */
.map-links { display: flex; gap: 10px; margin-top: 8px; flex-wrap: wrap; }
.map-link {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 6px 12px; border-radius: 10px; font-size: 12px; font-weight: 600;
  background: rgba(45,212,191,0.08); border: 1px solid rgba(45,212,191,0.2);
  color: var(--teal); text-decoration: none;
  transition: background 0.2s, transform 0.15s;
}
.map-link:hover { background: rgba(45,212,191,0.16); transform: translateY(-1px); }

/* ============================================================
   ITINERARIO — PASADO / HOY
   ============================================================ */
.day-block { border: 1px solid var(--line); border-radius: 22px; padding: 18px; background: rgba(255,255,255,0.02); }
.day-past { opacity: 0.6; border-color: rgba(255,255,255,0.04); }
.day-today { border-color: rgba(45,212,191,0.35) !important; background: rgba(45,212,191,0.04) !important; }
.timeline-past .timeline-time { color: var(--muted); }
.item-past { opacity: 0.55; }
.item-past .badge { background: rgba(255,255,255,0.04); }

/* ============================================================
   SUBTOTAL BAR
   ============================================================ */
.subtotal-bar {
  display: flex; justify-content: space-between; align-items: center; gap: 12px;
  margin-top: 16px; padding: 14px 18px; border-radius: 16px;
  background: rgba(45,212,191,0.07); border: 1px solid rgba(45,212,191,0.2);
  font-size: 13px; color: var(--muted-hi);
}
.subtotal-bar i { color: var(--teal); }
.subtotal-bar strong { color: var(--teal); font-size: 14px; }

/* ============================================================
   AUTOCOMPLETE
   ============================================================ */
.autocomplete-wrap { position: relative; width: 100%; }
.autocomplete-list {
  position: absolute; top: calc(100% + 4px); left: 0; right: 0;
  background: #0c1628; border: 1px solid rgba(45,212,191,0.25);
  border-radius: 14px; list-style: none; padding: 6px; margin: 0;
  z-index: 9999; max-height: 200px; overflow-y: auto;
  box-shadow: 0 12px 40px rgba(0,0,0,0.5);
}
.autocomplete-list li {
  padding: 10px 14px; border-radius: 10px; cursor: pointer;
  font-size: 13px; color: var(--muted-hi);
  transition: background 0.15s, color 0.15s;
  display: flex; align-items: center; gap: 8px;
}
.autocomplete-list li::before { content: '📍'; font-size: 13px; flex-shrink: 0; }
.autocomplete-list li:hover { background: rgba(45,212,191,0.10); color: var(--teal); }

/* Flatpickr dark overrides */
.flatpickr-calendar {
  background: #0c1628 !important; border: 1px solid rgba(45,212,191,0.2) !important;
  border-radius: 18px !important; box-shadow: 0 20px 60px rgba(0,0,0,0.5) !important;
  font-family: 'DM Sans', sans-serif !important;
}
.flatpickr-day.selected, .flatpickr-day.selected:hover {
  background: var(--teal-dim) !important; border-color: var(--teal-dim) !important; color: #061018 !important;
}
.flatpickr-day:hover { background: rgba(45,212,191,0.12) !important; color: var(--teal) !important; }
.flatpickr-months .flatpickr-month, .flatpickr-weekdays, span.flatpickr-weekday {
  background: transparent !important; color: var(--muted-hi) !important;
}
.flatpickr-current-month .flatpickr-monthDropdown-months,
.flatpickr-current-month input.cur-year { color: var(--text) !important; }
.flatpickr-time input { color: var(--text) !important; background: transparent !important; }
.flatpickr-day { color: var(--muted-hi) !important; }
.flatpickr-day.today { border-color: var(--teal) !important; }

/* ============================================================
   RANKING
   ============================================================ */
.ranking-header {
  padding: 28px 32px; border-radius: var(--radius);
  display: flex; justify-content: space-between; align-items: center; gap: 20px; flex-wrap: wrap;
}
.ranking-header h2 { margin: 8px 0 4px; }
.ranking-period-tabs { display: flex; gap: 8px; }
.ranking-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.ranking-list { display: grid; gap: 10px; }
.ranking-row {
  display: flex; align-items: center; gap: 14px; padding: 14px 18px;
  border-radius: 16px; background: rgba(255,255,255,0.04); border: 1px solid var(--line);
  transition: border-color 0.2s;
}
.ranking-row:hover { border-color: rgba(45,212,191,0.2); }
.ranking-row-me { background: rgba(45,212,191,0.08); border-color: rgba(45,212,191,0.3) !important; }
.ranking-pos { font-size: 1.3rem; min-width: 36px; text-align: center; font-weight: 800; color: var(--muted); }
.ranking-name { flex: 1; font-weight: 600; font-size: 14px; }
.ranking-you { color: var(--teal); font-size: 12px; }
.ranking-value { font-weight: 800; color: var(--teal); font-size: 15px; }
.ranking-my-grid { display: grid; grid-template-columns: repeat(4,1fr); gap: 14px; }

@media (max-width: 980px) {
  .ranking-grid { grid-template-columns: 1fr; }
  .ranking-my-grid { grid-template-columns: repeat(2,1fr); }
}

/* Item action buttons */
.item-actions {
  display: flex;
  gap: 8px;
  margin-top: 8px;
  padding-top: 10px;
  border-top: 1px solid var(--line);
}

/* ============================================================
   GANTT
   ============================================================ */
.gantt-wrap {
  width: 100%;
  overflow-x: auto;
  min-width: 0;
}
.gantt-header {
  display: flex;
  border-bottom: 1px solid var(--line);
  padding-bottom: 8px;
  margin-bottom: 8px;
  position: sticky;
  top: 0;
  background: var(--surface);
  z-index: 2;
}
.gantt-label-head {
  min-width: 180px;
  width: 180px;
  font-size: 12px;
  font-weight: 700;
  color: var(--muted);
  padding-right: 12px;
  flex-shrink: 0;
}
.gantt-days-head {
  flex: 1;
  display: flex;
  gap: 0;
}
.gantt-day-label {
  flex: 1;
  font-size: 11px;
  color: var(--muted);
  text-align: center;
  white-space: nowrap;
  min-width: 48px;
}
.gantt-today-label {
  color: var(--teal);
  font-weight: 700;
}
.gantt-body { display: grid; gap: 6px; position: relative; }

.gantt-today-line {
  position: absolute;
  top: 0; bottom: 0;
  width: 2px;
  background: var(--teal);
  opacity: 0.6;
  z-index: 3;
  pointer-events: none;
}
.gantt-today-line::before {
  content: 'Hoy';
  position: absolute;
  top: -20px;
  left: 50%;
  transform: translateX(-50%);
  font-size: 10px;
  color: var(--teal);
  font-weight: 700;
  white-space: nowrap;
}

.gantt-row {
  display: flex;
  align-items: center;
  gap: 0;
  min-height: 34px;
}
.gantt-label {
  min-width: 180px;
  width: 180px;
  font-size: 12px;
  color: var(--muted-hi);
  padding-right: 12px;
  flex-shrink: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  display: flex;
  align-items: center;
  gap: 6px;
}
.gantt-time {
  font-size: 11px;
  color: var(--teal);
  font-weight: 700;
  flex-shrink: 0;
}
.gantt-bar-track {
  flex: 1;
  height: 26px;
  position: relative;
  background: rgba(255,255,255,0.03);
  border-radius: 8px;
}
.gantt-bar {
  position: absolute;
  height: 100%;
  border-radius: 8px;
  min-width: 6px;
  opacity: 0.85;
  transition: opacity 0.2s;
}
.gantt-bar:hover { opacity: 1; }
.gantt-bar-past {
  opacity: 0.35 !important;
  filter: grayscale(0.4);
}

.gantt-legend {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
  margin-top: 14px;
  padding-top: 12px;
  border-top: 1px solid var(--line);
  font-size: 12px;
  color: var(--muted);
}
.gantt-legend span { display: flex; align-items: center; gap: 6px; }

/* ============================================================
   MAPA — leyenda y pins
   ============================================================ */
.map-legend {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
  padding: 10px 0 4px;
  font-size: 12px;
  color: var(--muted);
}
.map-legend span { display: flex; align-items: center; gap: 6px; }
.legend-dot {
  width: 10px; height: 10px;
  border-radius: 50%;
  display: inline-block;
  flex-shrink: 0;
}

/* Leaflet popup dark style */
.leaflet-popup-content-wrapper {
  background: #0c1628 !important;
  border: 1px solid rgba(45,212,191,0.2) !important;
  border-radius: 12px !important;
  box-shadow: 0 8px 30px rgba(0,0,0,0.5) !important;
  color: var(--text) !important;
}
.leaflet-popup-tip { background: #0c1628 !important; }
.leaflet-popup-content { color: #e8f0fa !important; }
