/* =========================================
   index.css - Estilos Específicos del Dashboard
========================================= */

/* Bloque Superior Búsqueda */
.search-box {
  flex: 1;
  max-width: 500px;
}

.search-box input {
  width: 100%;
  padding: 14px 16px;
  border-radius: 10px;
  border: none;
  outline: none;
  background: #1b1b1b;
  color: #fff;
  font-size: 15px;
}

/* Modulo Dropdown de Usuario */
.profile-dropdown {
  position: relative;
  display: inline-block;
}

.profile-trigger {
  display: flex;
  align-items: center;
  gap: 12px;
  cursor: pointer;
  padding: 6px 12px;
  border-radius: 12px;
  transition: background 0.3s;
}

.profile-trigger:hover {
  background: rgba(255, 255, 255, 0.05);
}

.avatar {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: #e50914;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
}

.profile-info {
  display: flex;
  flex-direction: column;
}

.profile-name {
  font-weight: bold;
  font-size: 15px;
  color: #fff;
}

.profile-role {
  font-size: 13px;
  color: #aaa;
}

.dropdown-icon {
  color: #aaa;
  margin-left: 4px;
  transition: transform 0.3s ease;
}

.profile-dropdown:hover .dropdown-icon {
  transform: rotate(180deg);
}

.dropdown-menu {
  position: absolute;
  top: calc(100% + 10px);
  right: 0;
  width: 240px;
  background: #18181b;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 12px;
  padding: 8px 0;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.5);
  visibility: hidden;
  opacity: 0;
  transform: translateY(-10px);
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  z-index: 100;
}

.dropdown-menu::before {
  content: '';
  position: absolute;
  top: -6px;
  right: 24px;
  width: 12px;
  height: 12px;
  background: #18181b;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  border-left: 1px solid rgba(255, 255, 255, 0.1);
  transform: rotate(45deg);
}

.profile-dropdown:hover .dropdown-menu {
  visibility: visible;
  opacity: 1;
  transform: translateY(0);
}

.dropdown-header {
  padding: 12px 16px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.user-real-name {
  font-weight: 600;
  font-size: 14px;
  color: #fff;
}

.user-email {
  font-size: 12px;
  color: #a1a1aa;
}

.dropdown-divider {
  height: 1px;
  background: rgba(255, 255, 255, 0.1);
  margin: 8px 0;
}

.dropdown-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 16px;
  color: #e4e4e7;
  text-decoration: none;
  font-size: 14px;
  transition: all 0.2s;
}

.dropdown-item:hover {
  background: rgba(229, 9, 20, 0.1);
  color: #ff4c57;
}

.dropdown-item svg {
  color: inherit;
}

/* Panel Hero Principal */
.hero {
  position: relative;
  min-height: 300px;
  border-radius: 20px;
  overflow: hidden;
  margin-bottom: 30px;
  background:
    linear-gradient(to right, rgba(0, 0, 0, 0.9), rgba(0, 0, 0, 0.35)),
    url('https://images.unsplash.com/photo-1516321318423-f06f85e504b3?auto=format&fit=crop&w=1400&q=80') center/cover no-repeat;
  display: flex;
  align-items: center;
  padding: 40px;
}

.hero-content {
  max-width: 560px;
}

.hero-tag {
  display: inline-block;
  background: rgba(229, 9, 20, 0.18);
  color: #ffb3b8;
  padding: 8px 12px;
  border-radius: 999px;
  font-size: 13px;
  margin-bottom: 14px;
}

.hero h1 {
  font-size: 42px;
  line-height: 1.1;
  margin-bottom: 14px;
}

.hero p {
  color: #d3d3d3;
  line-height: 1.6;
  margin-bottom: 22px;
}

.hero-actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.btn-primary {
  background: #e50914;
  color: #fff;
}

.btn-primary:hover {
  background: #ff1f2d;
}

.btn-secondary {
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
}

.btn-secondary:hover {
  background: rgba(255, 255, 255, 0.2);
}

/* Secciones Generales del Index */
.section {
  margin-bottom: 34px;
}

.section-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
}

.section-header h2 {
  font-size: 24px;
}

.section-header a {
  text-decoration: none;
  color: #e50914;
  font-size: 14px;
}

/* Cards de Viajes Destacados */
.card-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 18px;
}

.card {
  background: #181818;
  border-radius: 18px;
  overflow: hidden;
  transition: transform 0.3s, box-shadow 0.3s;
  border: 1px solid rgba(255, 255, 255, 0.05);
}

.card:hover {
  transform: translateY(-6px);
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.35);
}

.card-cover {
  height: 150px;
  background: linear-gradient(135deg, #e50914, #7f0910);
  display: flex;
  align-items: end;
  justify-content: start;
  padding: 16px;
  font-size: 26px;
  font-weight: bold;
}

.card-body {
  padding: 16px;
}

.card-title {
  font-size: 18px;
  margin-bottom: 8px;
}

.card-text {
  font-size: 14px;
  color: #c7c7c7;
  line-height: 1.5;
  margin-bottom: 14px;
}

.card-meta {
  display: flex;
  justify-content: space-between;
  font-size: 13px;
  color: #9f9f9f;
}

/* Status en tabla del Index */
.status {
  padding: 6px 10px;
  border-radius: 999px;
  font-size: 12px;
  display: inline-block;
  font-weight: bold;
}

.status-ok {
  background: rgba(46, 204, 113, 0.15);
  color: #7dffb0;
}

.status-warn {
  background: rgba(241, 196, 15, 0.15);
  color: #ffd86b;
}

.status-danger {
  background: rgba(231, 76, 60, 0.15);
  color: #ff9b90;
}

.action-btn {
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: #fff;
  padding: 8px 12px;
  border-radius: 8px;
  cursor: pointer;
  font-size: 12px;
}

.action-btn:hover {
  border-color: #e50914;
  color: #e50914;
}

/* Media query especifico de Index */
@media (max-width: 900px) {
  .hero h1 {
    font-size: 32px;
  }
}

/* --- Bootstrap Polyfill for Fast-Quote Modal (index.html) --- */
#cotizacion-modal-overlay .d-flex { display: flex !important; }
#cotizacion-modal-overlay .justify-content-between { justify-content: space-between !important; }
#cotizacion-modal-overlay .align-items-center { align-items: center !important; }
#cotizacion-modal-overlay .text-center { text-align: center !important; }
#cotizacion-modal-overlay .text-start { text-align: left !important; }
#cotizacion-modal-overlay .text-white { color: #fff !important; }
#cotizacion-modal-overlay .text-muted { color: #6c757d !important; }
#cotizacion-modal-overlay .m-0 { margin: 0 !important; }
#cotizacion-modal-overlay .mb-1 { margin-bottom: 0.25rem !important; }
#cotizacion-modal-overlay .mb-3 { margin-bottom: 1rem !important; }
#cotizacion-modal-overlay .mb-4 { margin-bottom: 1.5rem !important; }
#cotizacion-modal-overlay .mt-2 { margin-top: 0.5rem !important; }
#cotizacion-modal-overlay .mt-3 { margin-top: 1rem !important; }
#cotizacion-modal-overlay .py-3 { padding-top: 1rem !important; padding-bottom: 1rem !important; }
#cotizacion-modal-overlay .w-100 { width: 100% !important; }
#cotizacion-modal-overlay .d-block { display: block !important; }
#cotizacion-modal-overlay .row { display: flex; flex-wrap: wrap; }
#cotizacion-modal-overlay .row.g-2 { margin-left: -0.25rem; margin-right: -0.25rem; }
#cotizacion-modal-overlay .row.g-2 > * { padding-left: 0.25rem; padding-right: 0.25rem; margin-top: 0.5rem; }
#cotizacion-modal-overlay .col-4 { flex: 0 0 auto; width: 33.333333%; }
#cotizacion-modal-overlay .btn-close {
  box-sizing: content-box;
  width: 1em; height: 1em;
  padding: 0.25em 0.25em;
  color: #000;
  background: transparent url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='%23000'%3e%3cpath d='M.293.293a1 1 0 0 1 1.414 0L8 6.586 14.293.293a1 1 0 1 1 1.414 1.414L9.414 8l6.293 6.293a1 1 0 0 1-1.414 1.414L8 9.414l-6.293 6.293a1 1 0 0 1-1.414-1.414L6.586 8 .293 1.707a1 1 0 0 1 0-1.414z'/%3e%3c/svg%3e") center/1em auto no-repeat;
  border: 0;
  border-radius: 0.375rem;
  opacity: 0.5;
  cursor: pointer;
}
#cotizacion-modal-overlay .btn-close:hover { opacity: 0.75; }
#cotizacion-modal-overlay .btn-close-white { filter: invert(1) grayscale(100%) brightness(200%); }

/* --- Panel Power BI Estilos --- */
.dashboard-container {
  display: flex;
  flex-direction: column;
  gap: 25px;
  margin-top: 10px;
}

/* --- Banner Viaje Activo --- */
.active-trip-banner {
  background: linear-gradient(135deg, rgba(20, 20, 25, 0.8) 0%, rgba(35, 35, 45, 0.9) 100%);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 20px;
  padding: 30px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 20px;
  box-shadow: 0 10px 30px rgba(0,0,0,0.3);
  position: relative;
  overflow: hidden;
}

.active-trip-banner::before {
  content: '';
  position: absolute;
  top: -50%; left: -50%;
  width: 200%; height: 200%;
  background: radial-gradient(circle, rgba(49, 214, 123, 0.05) 0%, transparent 50%);
  pointer-events: none;
}

.active-trip-info {
  display: flex;
  flex-direction: column;
  gap: 8px;
  z-index: 1;
}

.active-trip-badge {
  background: rgba(49, 214, 123, 0.2);
  color: #31d67b;
  padding: 6px 14px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
  width: fit-content;
  border: 1px solid rgba(49, 214, 123, 0.3);
}

.active-trip-info h2 {
  font-size: 28px;
  font-weight: 800;
  color: #fff;
  margin: 0;
  letter-spacing: -0.5px;
}

.active-trip-info p {
  color: #a1a1aa;
  margin: 0;
  font-size: 14px;
}

.active-trip-actions {
  display: flex;
  gap: 15px;
  z-index: 1;
  flex-wrap: wrap;
  align-items: center;
}

.btn-glow {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 20px;
  border-radius: 12px;
  font-weight: 600;
  font-size: 14px;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  border: none;
}

.btn-glow-green {
  background: #31d67b;
  color: #000;
  box-shadow: 0 4px 15px rgba(49, 214, 123, 0.3);
}

.btn-glow-green:hover {
  background: #2bcc70;
  box-shadow: 0 6px 20px rgba(49, 214, 123, 0.5);
  transform: translateY(-2px);
}

.btn-glow-orange {
  background: rgba(255, 184, 77, 0.15);
  color: #ffb84d;
  border: 1px solid rgba(255, 184, 77, 0.3);
}

.btn-glow-orange:hover {
  background: rgba(255, 184, 77, 0.25);
  box-shadow: 0 6px 20px rgba(255, 184, 77, 0.2);
  transform: translateY(-2px);
}

.btn-glow-outline {
  background: transparent;
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.2);
}

.btn-glow-outline:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.4);
  transform: translateY(-2px);
}

.dash-cards-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 20px;
}

.dash-card {
  background: #18181b;
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 16px;
  padding: 20px;
  display: flex;
  align-items: center;
  gap: 15px;
  box-shadow: 0 4px 20px rgba(0,0,0,0.2);
  transition: transform 0.2s, box-shadow 0.2s;
}

.dash-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 8px 30px rgba(0,0,0,0.4);
}

.dash-icon {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  background: rgba(229, 9, 20, 0.15);
  color: #e50914;
  display: flex;
  align-items: center;
  justify-content: center;
}

.dash-info {
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.dash-info h3 {
  font-size: 13px;
  color: #a1a1aa;
  margin: 0;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.dash-info p {
  font-size: 24px;
  font-weight: 700;
  color: #fff;
  margin: 0;
}

.dash-main-row {
  display: flex;
  gap: 25px;
  flex-wrap: wrap;
}

.dash-chart-col {
  flex: 1.5;
  min-width: 400px;
}

.dash-cal-col {
  flex: 1;
  min-width: 350px;
}

.dash-widget {
  background: #18181b;
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 4px 20px rgba(0,0,0,0.2);
  display: flex;
  flex-direction: column;
  height: 100%;
}

.dash-widget-header {
  padding: 16px 20px;
  border-bottom: 1px solid rgba(255,255,255,0.05);
}

.dash-widget-header h4 {
  margin: 0;
  font-size: 16px;
  font-weight: 600;
  color: #fff;
}

.dash-widget-body {
  padding: 20px;
}

/* FullCalendar Customization */
.fc-theme-standard td, .fc-theme-standard th {
  border-color: rgba(255,255,255,0.03);
}
.fc-theme-standard .fc-scrollgrid {
  border: none; 
}
.fc .fc-toolbar.fc-header-toolbar {
  margin-bottom: 12px; 
}
.fc .fc-toolbar-title {
  font-size: 1.15em;
  color: #fff;
  font-weight: 700;
  text-transform: capitalize;
}
.fc-button-primary {
  background-color: #e50914 !important;
  border: none !important;
  border-radius: 50% !important;
  width: 32px;
  height: 32px;
  display: inline-flex !important;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 6px rgba(229, 9, 20, 0.3);
  transition: all 0.3s !important;
  padding: 0 !important;
}
.fc-button-primary:hover {
  background-color: #ff1f2d !important;
  transform: scale(1.05);
}
.fc-button-primary:disabled {
  opacity: 0.5 !important;
  cursor: not-allowed;
}
.fc-button-primary .fc-icon {
  font-size: 1em;
  margin: auto;
}
.fc .fc-button-group > .fc-button {
  border-radius: 50% !important;
}
.fc .fc-button-group {
  gap: 8px;
}
.fc-today-button {
  background: #242429 !important;
  color: #fff !important;
  border-radius: 999px !important;
  padding: 0 14px !important;
  width: auto !important;
  font-size: 12px !important;
  font-weight: 600 !important;
  text-transform: capitalize !important;
}
.fc-col-header-cell-cushion {
  color: #a1a1aa;
  text-decoration: none;
  font-weight: 600;
  font-size: 11px;
  text-transform: uppercase;
}
.fc-daygrid-day-number {
  color: #71717a;
  text-decoration: none;
  font-size: 12px;
  font-weight: 600;
  padding: 6px !important;
}
.fc-daygrid-day {
  background: transparent;
  transition: background 0.2s;
  cursor: pointer;
}
.fc-daygrid-day:hover {
  background: rgba(255,255,255,0.03);
}
.fc-day-today {
  background: rgba(229, 9, 20, 0.05) !important;
}
.fc-day-today .fc-daygrid-day-number {
  background: #e50914;
  color: #fff !important;
  border-radius: 50%;
  width: 22px;
  height: 22px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 4px;
}
.fc-daygrid-body, .fc-scrollgrid-sync-table {
  border: none !important;
}
.fc-h-event {
  background-color: #242429;
  border: 1px solid rgba(229, 9, 20, 0.5);
  border-radius: 4px;
  padding: 2px 4px;
  margin: 1px 4px;
  font-weight: 600;
  font-size: 10px;
  box-shadow: 0 2px 6px rgba(0,0,0,0.4);
  border-left: 3px solid #e50914;
}
.fc-event-title-container {
  display: flex;
  align-items: center;
}
.fc-event-title {
  color: #fff;
}

/* Custom Scrollbar for FullCalendar to prevent overlapping rightmost dates */
.fc-scroller::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}
.fc-scroller::-webkit-scrollbar-track {
  background: rgba(255, 255, 255, 0.02);
  border-radius: 4px;
}
.fc-scroller::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.15);
  border-radius: 4px;
}
.fc-scroller::-webkit-scrollbar-thumb:hover {
  background: rgba(255, 255, 255, 0.3);
}
.fc-scroller {
  padding-right: 4px;
}

@media (max-width: 800px) {
  .dash-chart-col, .dash-cal-col {
    flex: 100%;
    min-width: 100%;
  }
}

/* --- Premium Modal (Crear Viaje) --- */
.premium-modal {
  width: 100%;
  max-width: 420px;
  background: linear-gradient(145deg, #1e1e24 0%, #15151a 100%);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 24px;
  padding: 32px;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
  transform: translateY(20px);
  animation: slideUpFade 0.4s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes slideUpFade {
  to { transform: translateY(0); opacity: 1; }
}

.premium-modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 24px;
}

.premium-modal-header h3 {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 22px;
  font-weight: 700;
  color: #fff;
  margin: 0;
  letter-spacing: -0.5px;
}

.premium-modal-header .icon-wrap {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  background: rgba(229, 9, 20, 0.15);
  color: #e50914;
  border-radius: 12px;
}

.btn-close-custom {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: #a1a1aa;
  width: 36px;
  height: 36px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s;
}

.btn-close-custom:hover {
  background: rgba(229, 9, 20, 0.15);
  color: #ff4c57;
  border-color: rgba(229, 9, 20, 0.3);
  transform: rotate(90deg);
}

.premium-form {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.form-group-custom label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: #a1a1aa;
  margin-bottom: 8px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.input-glass, .textarea-glass {
  background: rgba(0, 0, 0, 0.2);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 14px;
  display: flex;
  align-items: center;
  padding: 0 16px;
  transition: all 0.3s;
}

.input-glass:focus-within, .textarea-glass:focus-within {
  border-color: #e50914;
  box-shadow: 0 0 0 3px rgba(229, 9, 20, 0.2);
  background: rgba(0, 0, 0, 0.4);
}

.input-glass svg {
  color: #636366;
  margin-right: 12px;
}

.input-glass input, .textarea-glass textarea {
  width: 100%;
  background: transparent;
  border: none;
  color: #fff;
  font-size: 15px;
  outline: none;
  padding: 16px 0;
}

.textarea-glass {
  padding: 12px 16px;
}

.textarea-glass textarea {
  padding: 0;
  resize: vertical;
  min-height: 80px;
}

.btn-premium-submit {
  background: linear-gradient(135deg, #e50914 0%, #b20710 100%);
  color: #fff;
  border: none;
  border-radius: 14px;
  padding: 16px;
  font-size: 16px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.3s;
  box-shadow: 0 8px 20px rgba(229, 9, 20, 0.3);
  margin-top: 10px;
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 8px;
}

.btn-premium-submit:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 25px rgba(229, 9, 20, 0.5);
  background: linear-gradient(135deg, #b20710 0%, #83050c 100%);
}

.btn-premium-submit:active {
  transform: translateY(0);
}

