/* =========================================
   1. VARIABLES Y BASE
   ========================================= */
:root {
    --color-base: #11173d;
    --color-acento: #ef5a1a;
    --color-secundario: #56DDE0;
    --color-fondo: #f4f7f9;
    --color-tarjeta: #ffffff;
    --borde-radio: 12px;
    --sombra-suave: 0 4px 15px rgba(0,0,0,0.05);
}

body {
    font-family: 'Poppins', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    background-color: var(--color-fondo);
    color: #333;
    margin: 0;
    line-height: 1.6;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.container { max-width: 1300px; margin: 20px auto; padding: 0 20px; }

/* ESTRUCTURA PRINCIPAL */
#app-container { flex: 1; width: 100%; }

/* LOGIN */
.login-container {
    display: flex; justify-content: center; align-items: center;
    flex: 1; padding: 40px 0;
}
.login-box {
    background: var(--color-tarjeta); padding: 40px; border-radius: var(--borde-radio);
    box-shadow: 0 10px 30px rgba(0,0,0,0.1); text-align: center; max-width: 400px; width: 90%;
}
.login-box h2 { color: var(--color-base); margin-bottom: 20px; }

/* HEADER */
.main-header {
    background-color: #fff; padding: 10px 40px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05); position: sticky; top: 0; z-index: 100;
}
.header-content { display: flex; justify-content: space-between; align-items: center; max-width: 1400px; margin: 0 auto; position: relative; }
.logo img { height: 90px; width: auto; transition: transform 0.3s; cursor: pointer; filter: drop-shadow(0 4px 6px rgba(0,0,0,0.1)); }
.logo img:hover { transform: scale(1.05); }

/* NAVEGACIÓN */
.app-nav { position: absolute; left: 50%; transform: translateX(-50%); display: flex; gap: 15px; }
.nav-button {
    background: none; border: none; padding: 10px 15px;
    font-size: 1em; font-weight: 600; color: #777; cursor: pointer;
    border-bottom: 3px solid transparent; transition: 0.2s; position: relative;
}
.nav-button:hover { color: var(--color-base); }
.nav-button.active { color: var(--color-acento); border-bottom-color: var(--color-acento); }

/* BADGE */
.nav-badge {
    position: absolute; top: 2px; right: 0;
    background-color: #ff3b30; color: white; font-size: 0.7em; font-weight: 700;
    padding: 2px 6px; border-radius: 50%; min-width: 14px; text-align: center;
    line-height: 1; transform: translateX(10%); box-shadow: 0 2px 4px rgba(0,0,0,0.2);
    display: none;
}

/* USER INFO */
.user-info { display: flex; align-items: center; gap: 20px; }
.user-info span { text-align: right; font-size: 0.9em; color: var(--color-base); line-height: 1.3; }

/* FILTROS */
.panel-filtros {
    background: #fff; border-radius: var(--borde-radio); padding: 15px 20px;
    margin-bottom: 30px; box-shadow: var(--sombra-suave);
    display: flex; align-items: flex-end; gap: 15px;
}
.filtro-group { flex: 1; display: flex; flex-direction: column; }
.filtro-group.large { flex: 2; }
.filtro-group label { font-size: 0.85em; font-weight: 600; margin-bottom: 5px; color: var(--color-base); }
.panel-filtros input, .panel-filtros select { width: 100%; margin: 0; }
.panel-actions { display: flex; gap: 10px; padding-bottom: 2px; }

/* FORMULARIOS */
.upload-form-container {
    background: #fff; padding: 40px; border-radius: var(--borde-radio);
    max-width: 900px; margin: 0 auto; box-shadow: var(--sombra-suave);
}
.section-title { color: var(--color-base); border-bottom: 2px solid #eee; padding-bottom: 10px; margin: 30px 0 20px 0; }
.form-group-row { display: flex; gap: 20px; margin-bottom: 15px; }
.form-group { flex: 1; display: flex; flex-direction: column; }
label { font-weight: 600; font-size: 0.9em; margin-bottom: 5px; color: var(--color-base); }
input, select, textarea {
    padding: 12px; border: 1px solid #ddd; border-radius: 8px;
    font-family: 'Poppins', sans-serif; font-size: 1em; width: 100%; box-sizing: border-box;
}
input:focus, select:focus, textarea:focus { border-color: var(--color-secundario); outline: none; }
input[type="date"] { appearance: none; -webkit-appearance: none; height: 47px; }

/* Checkboxes */
.checkbox-group { display: flex; gap: 15px; margin-top: 5px; flex-wrap: wrap; }
.checkbox-label {
    display: flex; align-items: center; gap: 8px;
    background: #f9f9f9; padding: 8px 12px; border-radius: 6px; border: 1px solid #eee;
    cursor: pointer; font-size: 0.9em; font-weight: 500;
}
.checkbox-label:hover { background: #f0f0f0; }
.checkbox-label input { width: auto; margin: 0; cursor: pointer; }

/* SERVICIOS */
.servicio-card {
    background: #fff; border: 1px solid #e0e0e0; border-radius: 10px;
    padding: 20px; margin-bottom: 15px; position: relative;
    box-shadow: 0 2px 5px rgba(0,0,0,0.02); border-left: 5px solid #ccc;
}
.servicio-card.aereo { border-left-color: #3498db; background: #fbfdff; }
.servicio-card.hotel { border-left-color: #9b59b6; background: #fcfaff; }
.servicio-card.traslado { border-left-color: #f1c40f; background: #fffff9; }
.servicio-card.seguro { border-left-color: #2ecc71; background: #fafffc; }
.servicio-card.bus { border-left-color: #e67e22; background: #fffaf6; }
.servicio-card.crucero { border-left-color: #34495e; background: #f4f6f7; }
.servicio-card.adicional { border-left-color: #95a5a6; }
.servicio-card h4 { margin-top: 0; color: #555; font-size: 1em; text-transform: uppercase; letter-spacing: 1px; }
.btn-eliminar-servicio {
    position: absolute; top: 15px; right: 15px; background: none; border: none;
    color: #e74c3c; font-weight: bold; font-size: 1.2em; cursor: pointer;
}
.add-service-bar {
    display: flex; gap: 10px; margin-top: 20px; padding: 15px;
    background: #f8f9fa; border-radius: 8px; border: 1px dashed #ccc;
    justify-content: center; align-items: center;
}

/* CONTADORES */
.counter-wrapper {
    display: flex; align-items: center; border: 1px solid #ddd; border-radius: 8px;
    overflow: hidden; width: 120px;
}
.counter-btn {
    background: #f0f0f0; border: none; width: 40px; height: 43px;
    font-size: 1.2em; font-weight: bold; color: var(--color-base); cursor: pointer;
}
.counter-btn:hover { background: #e0e0e0; }
.counter-value { flex: 1; text-align: center; font-weight: 600; }

/* TOTALES */
.totals-section { background: #11173d; color: white; padding: 25px; border-radius: 12px; margin-top: 30px; }
.totals-section label { color: #ccc; }
.totals-section input { background: rgba(255,255,255,0.1); border: 1px solid rgba(255,255,255,0.2); color: white; font-weight: bold; }
.totals-section input#upload-tarifa-total { background: #fff; color: #11173d; border: none; font-size: 1.3em; }
.finance-section { margin-top: 20px; padding: 20px; background: #fff8e1; border: 1px solid #ffe082; border-radius: 12px; }
.finance-section label { color: #d35400; }

/* USERS */
.user-create-card { background: #f9fbfd; padding: 20px; border-radius: 12px; border: 1px solid #eef2f5; margin-bottom: 30px; }
.user-list-card { background: #fff; }
.user-item {
    display: flex; justify-content: space-between; align-items: center;
    padding: 15px; border-bottom: 1px solid #eee; transition: background 0.2s;
}
.user-item:hover { background: #fcfcfc; }

/* MODAL */
.modal-overlay {
    position: fixed; top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(17, 23, 61, 0.7); z-index: 5000;
    display: none; justify-content: center; align-items: center; backdrop-filter: blur(3px);
}
.modal-contenido {
    background: #fff; width: 95%; max-width: 900px; border-radius: 12px;
    max-height: 90vh; overflow-y: auto; position: relative;
    box-shadow: 0 20px 50px rgba(0,0,0,0.3); animation: slideUp 0.3s;
}
@keyframes slideUp { from { transform: translateY(20px); opacity:0; } to { transform: translateY(0); opacity:1; } }
.modal-detalle-header { background-color: var(--color-base); padding: 25px 30px; border-radius: 12px 12px 0 0; color: white; }
.modal-cerrar-btn {
    position: absolute; top: 15px; right: 15px; background: rgba(255,255,255,0.2);
    color: white; border: none; font-size: 1.5em; width: 35px; height: 35px;
    border-radius: 50%; cursor: pointer; transition: 0.2s; z-index: 100;
}
.modal-cerrar-btn:hover { background: rgba(255,255,255,0.4); }

/* TARJETAS */
.paquete-card {
    background: #fff; border-radius: 12px; box-shadow: var(--sombra-suave);
    overflow: hidden; transition: transform 0.2s; cursor: pointer;
    display: flex; flex-direction: column;
}
.paquete-card:hover { transform: translateY(-5px); box-shadow: 0 10px 25px rgba(0,0,0,0.1); }
.card-clickable { display: flex; flex-direction: column; height: 100%; flex-grow: 1; }
.card-header { padding: 20px 20px 10px 20px; }
.card-header h3 { margin: 0; color: var(--color-base); font-size: 1.4em; }
.card-header .fecha { font-size: 0.9em; color: #666; font-weight: 500; margin-top: 5px; }
.card-body { padding: 10px 20px 20px 20px; flex-grow: 1; display: flex; align-items: flex-end; }
.card-footer {
    background: #fafafa; padding: 15px 20px; border-top: 1px solid #eee;
    display: flex; justify-content: space-between; align-items: center;
}
.precio-valor { color: var(--color-acento); font-weight: 700; font-size: 1.6em; margin: 0; }
.grilla-resultados { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 25px; }
.view { display: none; }
.view.active { display: block; animation: fadeIn 0.3s; }
@keyframes fadeIn { from{opacity:0}to{opacity:1} }

/* BOTONES */
.btn { padding: 10px 20px; border: none; border-radius: 8px; font-weight: 600; cursor: pointer; transition: 0.2s; }
.btn-primario { background: var(--color-acento); color: white; } .btn-primario:hover { background: #d34e15; }
.btn-secundario { background: #eee; color: #333; } .btn-secundario:hover { background: #ddd; }

/* BOTÓN LOGOUT */
.Btn {
  display: flex; align-items: center; justify-content: flex-start;
  width: 45px; height: 45px; border: none; border-radius: 50%;
  cursor: pointer; position: relative; overflow: hidden;
  transition-duration: .3s; box-shadow: 2px 2px 10px rgba(0, 0, 0, 0.199);
  background-color: #ef5a1a;
}
.sign { width: 100%; transition-duration: .3s; display: flex; align-items: center; justify-content: center; }
.sign svg { width: 17px; } .sign svg path { fill: white; }
.text { position: absolute; right: 0%; width: 0%; opacity: 0; color: white; font-size: 1.2em; font-weight: 600; transition-duration: .3s; }
.Btn:hover { width: 125px; border-radius: 40px; transition-duration: .3s; }
.Btn:hover .sign { width: 30%; transition-duration: .3s; padding-left: 20px; }
.Btn:hover .text { opacity: 1; width: 70%; transition-duration: .3s; padding-right: 10px; }
.Btn:active { transform: translate(2px ,2px); }

/* LOADER */
#loader-overlay {
    position: fixed; top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(255,255,255,0.9); z-index: 99999;
    display: none; justify-content: center; align-items: center;
    flex-direction: column;
}
.hourglassBackground { position: relative; background-color: #ef5a1a; height: 130px; width: 130px; border-radius: 50%; margin: 30px auto; }
.hourglassContainer { position: absolute; top: 30px; left: 40px; width: 50px; height: 70px; animation: hourglassRotate 2s ease-in 0s infinite; transform-style: preserve-3d; perspective: 1000px; }
.hourglassContainer div, .hourglassContainer div:before, .hourglassContainer div:after { transform-style: preserve-3d; }
@keyframes hourglassRotate { 0% { transform: rotateX(0deg); } 50% { transform: rotateX(180deg); } 100% { transform: rotateX(180deg); } }
.hourglassCapTop { top: 0; } .hourglassCapTop:before { top: -25px; } .hourglassCapTop:after { top: -20px; }
.hourglassCapBottom { bottom: 0; } .hourglassCapBottom:before { bottom: -25px; } .hourglassCapBottom:after { bottom: -20px; }
.hourglassGlassTop { transform: rotateX(90deg); position: absolute; top: -16px; left: 3px; border-radius: 50%; width: 44px; height: 44px; background-color: #999999; }
.hourglassGlass { perspective: 100px; position: absolute; top: 32px; left: 20px; width: 10px; height: 6px; background-color: #999999; opacity: 0.5; }
.hourglassGlass:before, .hourglassGlass:after { content: ''; display: block; position: absolute; background-color: #999999; left: -17px; width: 44px; height: 28px; }
.hourglassGlass:before { top: -27px; border-radius: 0 0 25px 25px; } .hourglassGlass:after { bottom: -27px; border-radius: 25px 25px 0 0; }
.hourglassCurves:before, .hourglassCurves:after { content: ''; display: block; position: absolute; top: 32px; width: 6px; height: 6px; border-radius: 50%; background-color: #555; animation: hideCurves 2s ease-in 0s infinite; }
.hourglassCurves:before { left: 15px; } .hourglassCurves:after { left: 29px; }
@keyframes hideCurves { 0% { opacity: 1; } 25% { opacity: 0; } 30% { opacity: 0; } 40% { opacity: 1; } 100% { opacity: 1; } }
.hourglassSandStream:before { content: ''; display: block; position: absolute; left: 24px; width: 3px; background-color: white; animation: sandStream1 2s ease-in 0s infinite; }
.hourglassSandStream:after { content: ''; display: block; position: absolute; top: 36px; left: 19px; border-left: 6px solid transparent; border-right: 6px solid transparent; border-bottom: 6px solid #fff; animation: sandStream2 2s ease-in 0s infinite; }
@keyframes sandStream1 { 0% { height: 0; top: 35px; } 50% { height: 0; top: 45px; } 60% { height: 35px; top: 8px; } 85% { height: 35px; top: 8px; } 100% { height: 0; top: 8px; } }
@keyframes sandStream2 { 0% { opacity: 0; } 50% { opacity: 0; } 51% { opacity: 1; } 90% { opacity: 1; } 91% { opacity: 0; } 100% { opacity: 0; } }
.hourglassSand:before, .hourglassSand:after { content: ''; display: block; position: absolute; left: 6px; background-color: white; perspective: 500px; }
.hourglassSand:before { top: 8px; width: 39px; border-radius: 3px 3px 30px 30px; animation: sandFillup 2s ease-in 0s infinite; }
.hourglassSand:after { border-radius: 30px 30px 3px 3px; animation: sandDeplete 2s ease-in 0s infinite; }
@keyframes sandFillup { 0% { opacity: 0; height: 0; } 60% { opacity: 1; height: 0; } 100% { opacity: 1; height: 17px; } }
@keyframes sandDeplete { 0% { opacity: 0; top: 45px; height: 17px; width: 38px; left: 6px; } 1% { opacity: 1; top: 45px; height: 17px; width: 38px; left: 6px; } 24% { opacity: 1; top: 45px; height: 17px; width: 38px; left: 6px; } 25% { opacity: 1; top: 41px; height: 17px; width: 38px; left: 6px; } 50% { opacity: 1; top: 41px; height: 17px; width: 38px; left: 6px; } 90% { opacity: 1; top: 41px; height: 0; width: 10px; left: 20px; } }

/* ALERTAS */
.custom-alert-overlay { position: fixed; top: 0; left: 0; width: 100%; height: 100%; background: rgba(0,0,0,0.5); z-index: 6000; display: none; justify-content: center; align-items: center; }
.custom-alert-box { background: #fff; padding: 30px; border-radius: 16px; text-align: center; max-width: 400px; width: 90%; }

/* FOOTER */
.main-footer {
    text-align: center; padding: 20px 20px; color: #b0b0b0; font-size: 0.7em;
    font-weight: 400; letter-spacing: 0.5px; margin-top: auto;
    width: 100%; box-sizing: border-box; font-family: 'Poppins', sans-serif; opacity: 0.8;
}
@media (max-width: 768px) {
    .header-content { flex-direction: column; gap: 10px; }
    .app-nav { position: static; transform: none; order: 2; margin: 10px 0; }
    .user-info { order: 3; align-self: flex-end; }
    .logo { order: 1; align-self: center; }
}
/* =========================================
   13. ESTRELLAS HOTEL
   ========================================= */
.star-rating {
    display: flex;
    gap: 5px;
    font-size: 1.5em;
    cursor: pointer;
    margin-top: 5px;
    margin-bottom: 10px;
}
.star-rating span {
    color: #ccc; /* Gris (vacía) */
    transition: color 0.2s;
}
.star-rating span.filled {
    color: #ef5a1a; /* Naranja Marca (llena) */
}
/* =========================================
   14. PLANIFICADOR SEMANAL (WEEKLY PLANNER)
   ========================================= */
.planner-wrapper {
    background: #fff;
    border-radius: var(--borde-radio);
    box-shadow: var(--sombra-suave);
    margin-bottom: 20px; /* Separación de los filtros */
    overflow: hidden;
    transition: all 0.3s ease;
}

.planner-header {
    background-color: #fff; /* O gris muy suave si prefieres */
    padding: 15px 25px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
    border-bottom: 1px solid transparent;
    transition: 0.2s;
}

.planner-header:hover {
    background-color: #fcfcfc;
}

.planner-title {
    font-weight: 700;
    color: var(--color-base);
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 1.1em;
}

.planner-toggle-icon {
    font-size: 1.2em;
    color: #777;
    transition: transform 0.3s ease;
}

.planner-header.open .planner-toggle-icon {
    transform: rotate(180deg);
}

.planner-header.open {
    border-bottom: 1px solid #eee;
}

.planner-body {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s ease-out;
    background-color: #f8f9fa; /* Fondo gris suave general */
    padding: 0 25px; /* Padding lateral, el vertical lo maneja la transición */
}

.planner-body.open {
    max-height: 1000px; /* Altura suficiente para mostrar contenido */
    padding: 25px;
}

.planner-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
}

.day-card {
    background: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    padding: 15px;
    display: flex;
    flex-direction: column;
    transition: 0.2s;
}

/* El día actual */
.day-card.today {
    border: 2px solid var(--color-acento); /* Naranja */
    background: #fff5f0; /* Fondo naranja muy tenue */
    box-shadow: 0 5px 15px rgba(239, 90, 26, 0.15);
    transform: translateY(-2px);
}

.day-title {
    font-weight: 700;
    font-size: 0.9em;
    color: #555;
    margin-bottom: 10px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    display: flex;
    justify-content: space-between;
}

.day-card.today .day-title {
    color: var(--color-acento);
}

.day-textarea {
    width: 100%;
    border: none; 
    background: transparent; 
    border-radius: 6px;
    resize: vertical;
    padding: 10px;
    font-family: 'Poppins', sans-serif;
    font-size: 0.95em;
    min-height: 150px;
    color: #11173d; 
    font-weight: 600; 
    line-height: 1.5;
}

.day-textarea:focus {
    outline: none;
    background: rgba(0,0,0,0.02); 
}
.day-textarea:disabled {
    background-color: transparent;
    color: #555;
    cursor: default;
    font-weight: 500; 
}
.day-card.today .day-title {
    color: var(--color-acento); 
    font-weight: 800; 
    font-size: 1.1em;
    text-shadow: 0px 0px 1px rgba(239, 90, 26, 0.2);
}

.planner-actions {
    margin-top: 15px;
    display: flex;
    justify-content: flex-end;
    padding-top: 10px;
    border-top: 1px solid #eee;
}

/* Ocultar en móviles si se desea ahorrar espacio, o apilar */
@media (max-width: 768px) {
    .planner-grid {
        grid-template-columns: 1fr;
    }
}



