/* =========================================================================
   MegaMinds 2027 · Megalabs Colombia — hoja de estilos
   Paleta oficial Megalabs (Manual de Identidad 2022 v06) — solo estos colores
   ========================================================================= */

:root{
  --verde-bandera:   #009045;
  --verde-brillante: #2DB34A;
  --verde-lima:      #8DC63F;
  --verde-menta:     #00A88A;
  --verde-esmeralda: #009385;
  --verde-petroleo:  #00857A;
  --verde-bosque:    #007C6B;

  --blanco:      #FFFFFF;
  --gris-slogan: #6E6E6E;
  --gris-texto:  #333333;
  --gris-ui:     #E8EEEB;
  --negro:       #000000;

  --radius: 14px;
  --radius-sm: 8px;
  --shadow: 0 2px 18px rgba(0,60,40,0.07);
  --shadow-lg: 0 12px 40px rgba(0,60,40,0.14);
  --maxw: 1180px;
}

*{ box-sizing: border-box; }
html{ scroll-behavior: smooth; }
body{
  margin:0;
  font-family:'Barlow', Helvetica, Arial, sans-serif;
  color: var(--gris-texto);
  background: var(--blanco);
  -webkit-font-smoothing: antialiased;
}
h1,h2,h3,h4{ font-family:'Barlow Condensed','Barlow',sans-serif; font-weight:700; margin:0; }
p{ margin:0; }
button{ font-family:inherit; cursor:pointer; }
input, textarea{ font-family:inherit; }

/* ---------------- HEADER ---------------- */
.site-header{
  background: var(--blanco);
  border-bottom: 3px solid var(--verde-esmeralda);
}
.header-inner{
  max-width: var(--maxw);
  margin:0 auto;
  padding: 18px 24px;
  display:flex;
  align-items:center;
  gap:22px;
  flex-wrap:wrap;
}
.logo-reserve{
  width:120px; height:64px;
  flex:0 0 auto;
  border:1.5px dashed var(--gris-ui);
  border-radius: var(--radius-sm);
  display:flex; align-items:center; justify-content:center;
  text-align:center;
  color:#B9C4BE;
  font-size:9px;
  font-weight:700;
  letter-spacing:.06em;
  line-height:1.3;
  background:#FBFDFC;
}
.logo-reserve.small{ width:74px; height:40px; font-size:7.5px; }
.logo-tc{
  flex:0 0 auto;
  display:flex; align-items:center; gap:9px;
}
.logo-tc-icon{ width:40px; height:40px; object-fit:contain; flex:0 0 auto; }
.logo-tc-text{
  font-family:'Barlow Condensed','Barlow',sans-serif;
  font-weight:800;
  font-size:15px;
  line-height:1.05;
  letter-spacing:.02em;
  color:#0A2540;
}
.header-title{ flex:1 1 340px; }
.eyebrow{
  color: var(--verde-bosque);
  font-weight:600;
  font-size:12.5px;
  letter-spacing:.03em;
  text-transform:uppercase;
  margin-bottom:2px;
}
.header-title h1{
  font-size: 34px;
  color: var(--verde-bandera);
  letter-spacing:.01em;
}
.header-title h1 span{ color: var(--verde-brillante); }
.header-sub{ color: var(--gris-slogan); font-size:13.5px; margin-top:2px; }

.header-meta{ display:flex; align-items:center; gap:10px; flex:0 0 auto; }
.meta-pill{
  background: var(--gris-ui);
  border-radius: 999px;
  padding:6px 14px;
  text-align:center;
  min-width:74px;
}
.meta-pill strong{ display:block; font-size:15px; color: var(--verde-bosque); line-height:1.1; }
.meta-pill span{ display:block; font-size:9.5px; color: var(--gris-slogan); text-transform:uppercase; letter-spacing:.03em; }

.admin-btn{
  display:flex; align-items:center; gap:6px;
  background: var(--verde-bandera);
  color:#fff;
  border:none;
  border-radius:999px;
  padding:9px 16px;
  font-size:12.5px;
  font-weight:600;
  transition: background .15s;
}
.admin-btn:hover{ background: var(--verde-petroleo); }
.admin-btn.is-active{ background: var(--verde-lima); color:#1c3a1f; }

/* ---------------- TABS ---------------- */
.tabs{
  position: sticky; top:0; z-index: 40;
  background: var(--blanco);
  border-bottom: 1px solid var(--gris-ui);
  display:flex;
  gap:6px;
  max-width: var(--maxw);
  margin:0 auto;
  padding: 10px 24px 0;
  overflow-x:auto;
}
.tab-btn{
  background: transparent;
  border: none;
  padding: 11px 18px;
  font-size: 13.5px;
  font-weight:600;
  color: var(--gris-slogan);
  border-radius: 10px 10px 0 0;
  white-space:nowrap;
  border-bottom: 3px solid transparent;
  transition: all .15s;
}
.tab-btn:hover{ color: var(--verde-bosque); background: var(--gris-ui); }
.tab-btn.active{
  color: var(--verde-bandera);
  border-bottom: 3px solid var(--verde-bandera);
  background: linear-gradient(180deg, #F4FAF6, transparent);
}

.admin-bar{
  background: linear-gradient(90deg, var(--verde-bandera), var(--verde-esmeralda));
  color:#fff;
  font-size:13px;
  font-weight:600;
  padding:8px 24px;
  display:flex;
  align-items:center;
  justify-content:center;
  gap:18px;
}
.admin-bar button{
  background: rgba(255,255,255,.18);
  border:1px solid rgba(255,255,255,.5);
  color:#fff;
  border-radius:999px;
  padding:4px 12px;
  font-size:11.5px;
  font-weight:700;
}
.admin-bar button:hover{ background: rgba(255,255,255,.3); }
.hidden{ display:none !important; }

/* ---------------- MAIN / PANELS ---------------- */
main#app{ max-width: var(--maxw); margin:0 auto; padding: 30px 24px 70px; }
.tab-panel{ display:none; }
.tab-panel.active{ display:block; animation: fadein .25s ease; }
@keyframes fadein{ from{opacity:0; transform:translateY(4px);} to{opacity:1; transform:translateY(0);} }

.panel-head{ margin-bottom: 22px; }
.panel-head h2{ font-size:26px; color: var(--verde-bosque); }
.panel-lead{ color: var(--gris-slogan); font-size:14.5px; margin-top:6px; max-width: 800px; line-height:1.5; }

/* ---------------- TABLE (resumen) ---------------- */
.table-wrap{ overflow-x:auto; border-radius: var(--radius); box-shadow: var(--shadow); }
table.cmp-table{ width:100%; border-collapse:collapse; min-width:720px; background:#fff; }
table.cmp-table thead th{
  background: var(--verde-bandera);
  color:#fff;
  font-size:12.5px;
  text-transform:uppercase;
  letter-spacing:.02em;
  font-weight:700;
  padding:14px 16px;
  text-align:left;
}
table.cmp-table thead th:first-child{ border-radius: var(--radius) 0 0 0; }
table.cmp-table thead th:last-child{ border-radius: 0 var(--radius) 0 0; }
table.cmp-table tbody td{
  padding:14px 16px;
  font-size:14px;
  border-bottom:1px solid var(--gris-ui);
}
table.cmp-table tbody tr:nth-child(even){ background:#F7FBF8; }
table.cmp-table tbody tr:hover{ background:#EEF7F1; }
table.cmp-table td.dest-name{ font-weight:700; color: var(--verde-bosque); }
table.cmp-table td.num{ text-align:right; font-variant-numeric: tabular-nums; }
table.cmp-table tr.total-row td{ font-weight:800; color: var(--verde-bandera); }
.flag{ margin-right:6px; }

.resumen-cards{ display:grid; grid-template-columns: repeat(auto-fit, minmax(230px,1fr)); gap:16px; margin-top:22px; }
.resumen-card{
  background:#fff; border:1px solid var(--gris-ui); border-radius: var(--radius);
  padding:18px; box-shadow: var(--shadow);
}
.resumen-card h4{ color: var(--verde-bosque); font-size:16px; margin-bottom:8px; }
.resumen-card .big{ font-size:22px; font-weight:800; color: var(--verde-bandera); }
.resumen-card .lbl{ font-size:11.5px; color: var(--gris-slogan); text-transform:uppercase; letter-spacing:.03em; }

/* ---------------- DESTINO HERO ---------------- */
.dest-hero{
  background: linear-gradient(120deg, var(--verde-bandera), var(--verde-esmeralda) 65%, var(--verde-menta));
  color:#fff; border-radius: var(--radius); margin-bottom:26px;
  box-shadow: var(--shadow-lg);
  position:relative; overflow:hidden;
  min-height: 400px;
  display:flex; align-items:flex-end;
}
.dest-hero::after{
  content:""; position:absolute; right:-60px; top:-60px; width:220px; height:220px;
  border-radius:50%; background: rgba(255,255,255,0.08); pointer-events:none; z-index:1;
}

.hero-slider{ position:absolute; inset:0; z-index:0; overflow:hidden; }
.hero-slide{
  position:absolute; inset:0; width:100%; height:100%; object-fit:cover;
  opacity:0; transition: opacity 1.4s ease;
}
.hero-slide.active{ opacity:1; }
.hero-slider-overlay{
  position:absolute; inset:0;
  background: linear-gradient(180deg, rgba(0,60,35,.45) 0%, rgba(0,80,55,.55) 45%, rgba(0,45,30,.88) 100%),
              linear-gradient(120deg, rgba(0,144,69,.55), rgba(0,147,133,.35) 65%, rgba(0,168,138,.3));
}

.dest-hero-content{ position:relative; z-index:2; padding: 26px 32px 44px; width:100%; }
.dest-hero .code{ font-size:11px; letter-spacing:.08em; opacity:.9; text-transform:uppercase; text-shadow:0 1px 3px rgba(0,0,0,.35); }
.dest-hero h2{ font-size:32px; margin:6px 0 2px; text-shadow:0 2px 6px rgba(0,0,0,.35); }
.dest-hero .subt{ font-size:15px; opacity:.95; margin-bottom:10px; text-shadow:0 1px 4px rgba(0,0,0,.35); }
.dest-hero .desc{ font-size:14px; line-height:1.55; max-width:720px; opacity:.97; text-shadow:0 1px 4px rgba(0,0,0,.35); }
.dest-hero .chips{ display:flex; gap:10px; flex-wrap:wrap; margin-top:16px; }
.dest-hero .chip{ background: rgba(255,255,255,.18); border:1px solid rgba(255,255,255,.4); border-radius:999px; padding:6px 14px; font-size:12.5px; backdrop-filter: blur(2px); }

.hero-dots{
  position:absolute; right:20px; bottom:16px; z-index:3;
  display:flex; gap:7px;
}
.hero-dot{
  width:8px; height:8px; border-radius:50%; padding:0;
  background: rgba(255,255,255,.4); border:1.5px solid rgba(255,255,255,.7);
  cursor:pointer; transition: all .2s;
}
.hero-dot:hover{ background: rgba(255,255,255,.7); }
.hero-dot.active{ background:#fff; width:20px; border-radius:5px; }

/* section sub-nav inside destino */
.dest-subnav{ display:flex; gap:8px; margin-bottom:20px; flex-wrap:wrap; }
.dest-subnav button{
  background: var(--gris-ui); border:none; border-radius:999px; padding:8px 16px;
  font-size:12.5px; font-weight:700; color: var(--gris-texto);
}
.dest-subnav button.active{ background: var(--verde-bandera); color:#fff; }

.dest-section{ display:none; }
.dest-section.active{ display:block; animation: fadein .2s ease; }

/* ---------------- PRESUPUESTO ---------------- */
.budget-grid{ display:grid; grid-template-columns: 1.4fr 1fr; gap:22px; margin-bottom:26px; }
@media (max-width: 860px){ .budget-grid{ grid-template-columns: 1fr; } }

.budget-table{ width:100%; border-collapse:collapse; background:#fff; border-radius: var(--radius); overflow:hidden; box-shadow: var(--shadow); }
.budget-table th{ background: var(--verde-petroleo); color:#fff; text-align:left; font-size:12px; text-transform:uppercase; padding:11px 14px; }
.budget-table td{ padding:11px 14px; font-size:13.5px; border-bottom:1px solid var(--gris-ui); }
.budget-table tr:last-child td{ border-bottom:none; }
.budget-table td.num{ text-align:right; font-variant-numeric: tabular-nums; }
.budget-table tr.calc td{ background:#F7FBF8; font-weight:700; color: var(--verde-bosque); }
.budget-table tr.grand td{ background: var(--verde-bandera); color:#fff; font-weight:800; font-size:14.5px; }

.total-card{
  background: #F4FAF6; border:1.5px solid var(--verde-lima); border-radius: var(--radius);
  padding:22px; display:flex; flex-direction:column; gap:14px; justify-content:center;
}
.total-card .row{ display:flex; justify-content:space-between; align-items:baseline; }
.total-card .row .lbl{ font-size:12.5px; color: var(--gris-slogan); text-transform:uppercase; letter-spacing:.02em; }
.total-card .row .val{ font-size:15px; font-weight:700; color: var(--gris-texto); }
.total-card .row.grand .val{ font-size:26px; color: var(--verde-bandera); font-weight:800; }
.total-card .row.grand .lbl{ color: var(--verde-bosque); font-weight:700; }
.total-card hr{ border:none; border-top:1px dashed var(--gris-ui); margin:0; }

/* ---------------- INTRO / CIERRE DE PROPUESTA ---------------- */
.propuesta-intro{
  background:#F4FAF6; border:1.5px solid var(--verde-lima); border-radius: var(--radius);
  padding:20px 24px; margin-bottom:24px;
}
.propuesta-intro h3{
  font-size:14.5px; color: var(--verde-bosque); text-transform:uppercase; letter-spacing:.02em;
  margin-bottom:10px;
}
.propuesta-intro p{
  font-size:13.5px; line-height:1.65; color: var(--gris-texto); margin-bottom:10px;
}
.propuesta-intro p:last-child{ margin-bottom:0; }

.propuesta-nota-cierre{
  background:#FBFDFC; border:1px dashed var(--gris-ui); border-left:3px solid var(--verde-esmeralda);
  border-radius: var(--radius-sm); padding:15px 20px; margin-top:26px;
}
.propuesta-nota-cierre p{ font-size:12px; line-height:1.6; color: var(--gris-slogan); margin:0; }

/* editable inputs */
.edit-input{
  width: 100%; max-width:150px;
  border:1.5px solid var(--verde-lima);
  border-radius:6px;
  padding:4px 7px;
  font-size:13px;
  text-align:right;
  background:#FFFDF4;
  font-variant-numeric: tabular-nums;
}
.edit-input:focus{ outline:2px solid var(--verde-brillante); outline-offset:1px; }
.num-display{ font-variant-numeric: tabular-nums; }
textarea.edit-input{ text-align:left; max-width:none; width:100%; resize:vertical; font-family:inherit; }
.editable-text[contenteditable="true"]{
  border:1.5px dashed var(--verde-lima);
  border-radius:6px; padding:4px 8px; background:#FFFDF4;
}
.editable-text[contenteditable="true"]:focus{ outline:2px solid var(--verde-brillante); background:#fff; }
.add-item-btn{
  margin-top:8px; background:none; border:1.5px dashed var(--verde-menta); color: var(--verde-petroleo);
  border-radius:8px; padding:6px 12px; font-size:12px; font-weight:700;
}
.remove-item-btn{
  background:none; border:none; color:#b23b3b; opacity:.55; font-size:15px; padding:0 4px; line-height:1;
}
.remove-item-btn:hover{ opacity:1; }

/* ---------------- INCLUYE (package) ---------------- */
.incluye-grid{ display:grid; grid-template-columns: repeat(auto-fit, minmax(280px,1fr)); gap:18px; }
.incluye-card{ background:#fff; border:1px solid var(--gris-ui); border-radius: var(--radius); padding:20px; box-shadow: var(--shadow); }
.incluye-card h4{
  color:#fff; background: var(--verde-esmeralda); display:inline-block;
  padding:5px 13px; border-radius:999px; font-size:12.5px; text-transform:uppercase; letter-spacing:.02em; margin-bottom:12px;
}
.incluye-card ul{ margin:0; padding-left:0; list-style:none; display:flex; flex-direction:column; gap:9px; }
.incluye-card li{ display:flex; gap:9px; font-size:13.5px; line-height:1.5; align-items:flex-start; }
.incluye-card li::before{ content:"✓"; color: var(--verde-brillante); font-weight:800; flex:0 0 auto; margin-top:1px; }
.incluye-card li .editable-text{ flex:1; }

/* ---------------- ITINERARIO ---------------- */
.itin-day{ margin-bottom: 30px; }
.itin-day-head{ display:flex; align-items:baseline; gap:12px; margin-bottom:14px; flex-wrap:wrap; }
.itin-day-head .day-num{
  background: var(--verde-bandera); color:#fff; font-weight:800; font-size:14px;
  border-radius:999px; width:34px; height:34px; display:flex; align-items:center; justify-content:center; flex:0 0 auto;
}
.itin-day-head h3{ font-size:19px; color: var(--verde-bosque); }
.itin-day-head .day-meta{ font-size:12.5px; color: var(--gris-slogan); font-weight:600; }
.itin-day-head .day-meta .editable-text{ display:inline-block; }

.timeline{ position:relative; padding-left:28px; border-left:2.5px solid var(--gris-ui); margin-left:16px; }
.timeline-item{ position:relative; padding-bottom:20px; }
.timeline-item:last-child{ padding-bottom:0; }
.timeline-item::before{
  content:""; position:absolute; left:-34.5px; top:3px; width:11px; height:11px; border-radius:50%;
  background: var(--verde-brillante); border:2px solid #fff; box-shadow:0 0 0 2px var(--verde-brillante);
}
.timeline-hora{ font-weight:800; color: var(--verde-bandera); font-size:13px; margin-bottom:3px; }
.timeline-texto{ font-size:14px; line-height:1.6; color: var(--gris-texto); }
.timeline-item .row-flex{ display:flex; gap:10px; align-items:flex-start; }
.timeline-item .remove-item-btn{ margin-top:2px; }

/* ---------------- VUELOS ---------------- */
.vuelo-card{ background:#fff; border:1px solid var(--gris-ui); border-radius: var(--radius); box-shadow: var(--shadow); margin-bottom:24px; overflow:hidden; }
.vuelo-head{ display:flex; align-items:center; gap:14px; padding:18px 22px; color:#fff; }
.vuelo-head .airline-badge{
  width:46px; height:46px; border-radius:50%; background: rgba(255,255,255,.22);
  display:flex; align-items:center; justify-content:center; font-weight:800; font-size:14px; flex:0 0 auto;
}
.vuelo-head h3{ font-size:19px; }
.vuelo-head .ruta{ font-size:12.5px; opacity:.9; }
.vuelo-body{ padding:20px 22px; }
.vuelo-tramo{ margin-bottom:20px; }
.vuelo-tramo:last-child{ margin-bottom:0; }
.vuelo-tramo h4{ font-size:13.5px; color: var(--verde-bosque); text-transform:uppercase; letter-spacing:.02em; margin-bottom:12px; }
.segs{ display:flex; align-items:stretch; gap:0; flex-wrap:wrap; }
.seg-card{
  flex:1 1 200px; background:#F7FBF8; border:1px solid var(--gris-ui); border-radius:10px; padding:12px 14px; min-width:170px;
}
.seg-card .flight-no{ font-size:11px; font-weight:700; color: var(--verde-menta); text-transform:uppercase; }
.seg-card .route{ font-weight:800; font-size:14.5px; margin:3px 0; }
.seg-card .times{ font-size:12.5px; color: var(--gris-slogan); }
.seg-card .dur{ font-size:11.5px; color: var(--verde-bosque); font-weight:700; margin-top:4px; }
.seg-card .plane{ font-size:11px; color: var(--gris-slogan); margin-top:2px; }
.seg-stop{
  flex:0 0 130px; display:flex; flex-direction:column; align-items:center; justify-content:center;
  text-align:center; padding:8px; position:relative;
}
.seg-stop .dot-line{ width:100%; height:2px; background: repeating-linear-gradient(90deg, var(--verde-lima) 0 6px, transparent 6px 12px); margin-bottom:6px; }
.seg-stop .lugar{ font-size:11.5px; font-weight:700; color: var(--verde-bosque); }
.seg-stop .esc-dur{ font-size:10.5px; color: var(--gris-slogan); }
.seg-stop .esc-nota{ font-size:9.5px; color:#9AA79F; margin-top:2px; font-style:italic; }
.vuelo-baggage{ display:flex; gap:10px; align-items:center; font-size:12.5px; color: var(--gris-texto); background: var(--gris-ui); border-radius:10px; padding:10px 14px; margin-top:6px; }
.vuelo-nota{ font-size:11.5px; color: var(--gris-slogan); font-style:italic; margin-top:12px; line-height:1.5; }

/* ---------------- MODAL ---------------- */
.modal-overlay{
  position:fixed; inset:0; background: rgba(0,30,15,.45); z-index:100;
  display:flex; align-items:center; justify-content:center; padding:20px;
}
.modal-box{
  background:#fff; border-radius: var(--radius); padding:28px 26px; max-width:360px; width:100%;
  box-shadow: var(--shadow-lg); position:relative;
}
.modal-box h3{ color: var(--verde-bandera); font-size:20px; margin-bottom:8px; }
.modal-box p{ font-size:13px; color: var(--gris-slogan); line-height:1.5; margin-bottom:16px; }
.modal-close{ position:absolute; top:12px; right:14px; border:none; background:none; font-size:22px; color: var(--gris-slogan); }
#admin-form{ display:flex; flex-direction:column; gap:12px; }
#admin-password{ padding:10px 12px; border:1.5px solid var(--gris-ui); border-radius:8px; font-size:14px; }
#admin-password:focus{ outline:none; border-color: var(--verde-brillante); }
.btn-primary{ background: var(--verde-bandera); color:#fff; border:none; border-radius:8px; padding:11px; font-weight:700; font-size:14px; }
.btn-primary:hover{ background: var(--verde-petroleo); }
.admin-error{ color:#b23b3b; font-size:12.5px; margin-top:10px; }

/* ---------------- FOOTER ---------------- */
.site-footer{ background: var(--verde-bosque); color:#fff; margin-top:40px; }
.footer-inner{ max-width: var(--maxw); margin:0 auto; padding:22px 24px; display:flex; align-items:center; gap:18px; flex-wrap:wrap; }
.footer-inner .logo-reserve{ background: rgba(255,255,255,.08); border-color: rgba(255,255,255,.35); color: rgba(255,255,255,.7); }
.footer-text{ font-size:12px; line-height:1.6; opacity:.92; }

/* ---------------- TOAST ---------------- */
.toast{
  position:fixed; bottom:22px; left:50%; transform: translateX(-50%) translateY(20px);
  background: var(--verde-bandera); color:#fff; padding:11px 22px; border-radius:999px;
  font-size:13px; font-weight:600; box-shadow: var(--shadow-lg); z-index:200;
  opacity:0; pointer-events:none; transition: all .25s ease;
}
.toast.show{ opacity:1; transform: translateX(-50%) translateY(0); }
.toast.error{ background:#b23b3b; }

@media (max-width: 640px){
  .header-inner{ flex-direction:column; align-items:flex-start; }
  .header-meta{ width:100%; justify-content:space-between; }
  .dest-hero{ min-height:320px; }
  .dest-hero-content{ padding:20px 20px 36px; }
  .dest-hero h2{ font-size:26px; }
}
