/*
* demo.css
* File include item demo only specific css only
******************************************************************************/

.menu .app-brand.demo {
  height: 58px;
}

.app-brand-logo.demo svg {
  width: 22px;
  height: 38px;
}

.app-brand-text.demo {
  font-size: 1.75rem;
  letter-spacing: -0.5px;
  text-transform: lowercase;
}

/* ! For .layout-navbar-fixed added fix padding top tpo .layout-page */
/* Detached navbar */
.layout-navbar-fixed .layout-wrapper:not(.layout-horizontal):not(.layout-without-menu) .layout-page {
  padding-top: 76px !important;
}

/* Default navbar */
.layout-navbar-fixed .layout-wrapper:not(.layout-without-menu) .layout-page {
  padding-top: 34px !important;
}

/* Navbar page z-index issue solution */
.content-wrapper .navbar {
  z-index: auto;
}

/*
* Content
******************************************************************************/

.demo-blocks>* {
  display: block !important;
}

.demo-inline-spacing>* {
  margin: 1rem 0.375rem 0 0 !important;
}

/* ? .demo-vertical-spacing class is used to have vertical margins between elements. To remove margin-top from the first-child, use .demo-only-element class with .demo-vertical-spacing class. For example, we have used this class in forms-input-groups.html file. */
.demo-vertical-spacing>* {
  margin-top: 1rem !important;
  margin-bottom: 0 !important;
}

.demo-vertical-spacing.demo-only-element> :first-child {
  margin-top: 0 !important;
}

.demo-vertical-spacing-lg>* {
  margin-top: 1.875rem !important;
  margin-bottom: 0 !important;
}

.demo-vertical-spacing-lg.demo-only-element> :first-child {
  margin-top: 0 !important;
}

.demo-vertical-spacing-xl>* {
  margin-top: 5rem !important;
  margin-bottom: 0 !important;
}

.demo-vertical-spacing-xl.demo-only-element> :first-child {
  margin-top: 0 !important;
}

.rtl-only {
  display: none !important;
  text-align: left !important;
  direction: ltr !important;
}

[dir='rtl'] .rtl-only {
  display: block !important;
}

/*
* Layout demo
******************************************************************************/

.layout-demo-wrapper {
  display: -webkit-box;
  display: -ms-flexbox;
  display: flex;
  -webkit-box-align: center;
  -ms-flex-align: center;
  align-items: center;
  -webkit-box-orient: vertical;
  -webkit-box-direction: normal;
  -ms-flex-direction: column;
  flex-direction: column;
  margin-top: 1rem;
}

.layout-demo-placeholder img {
  width: 900px;
}

.layout-demo-info {
  text-align: center;
  margin-top: 1rem;
}

.notification-item {
  min-width: 300px;
}

/* Global Fix: SweetAlert2 z-index to show over Bootstrap Modals */
.swal2-container {
  z-index: 2000 !important;
}


.bg-label-warning {
  background-color: #fff8e1 !important;
  color: #ffab00 !important;
}

.bg-label-info {
  background-color: #e1f5fe !important;
  color: #03a9f4 !important;
}

.card {
  transition: all 0.3s ease;
}

.card:hover {
  transform: translateY(-2px);
  box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.08) !important;
}

.form-select:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px var(--primary-light);
}

#alert-count {
  background: red;
  position: absolute;
  top: 0;
  font-size: 8px;
  margin: 5px;
}

.notification-list {
  margin-right: 15px !important;
}



.message-bubble {
  transition: all 0.2s ease;
}

.message-bubble:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.05) !important;
}

#det-recaudos tr {
  transition: background-color 0.2s;
}

#det-recaudos tr:hover {
  background-color: var(--primary-light) !important;
}

.nav-tabs .nav-link.active {
  color: var(--primary) !important;
  background-color: transparent;
  border-bottom: 2px solid var(--primary);
}

/* ── Wizard Steps ─────────────────────────────────────────────── */
.wizard-steps {
  position: relative;
  display: flex;
  justify-content: space-between;
  margin-bottom: 2rem;
}

.wizard-steps::before {
  content: "";
  position: absolute;
  top: 15px;
  left: 0;
  width: 100%;
  height: 2px;
  background: var(--border-color);
  z-index: 0;
}

.step-item {
  position: relative;
  z-index: 1;
  padding: 0 10px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 5px;
}

.step-number {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--border-color);
  color: #697a8d;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 600;
  border: 2px solid #fff;
  transition: all 0.3s ease;
}

.step-title {
  font-size: 0.75rem;
  font-weight: 600;
  color: #a1acb8;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.step-item.active .step-number {
  background: var(--primary);
  color: #fff;
  box-shadow: 0 0 0 3px rgba(105, 108, 255, 0.2);
}

.step-item.active .step-title {
  color: var(--primary);
}

.step-item.completed .step-number {
  background: var(--c-green);
  color: #fff;
}

.step-item.completed .step-title {
  color: var(--c-green);
}

/* ── Leyenda del Mapa (legacy - neutralizada, reemplazada por glass panels) ── */
#map-legend {
  display: none;
  /* El nuevo diseño usa #panel-legend flotante */
}

.legend-item {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  cursor: pointer;
  transition: all 0.2s ease;
  user-select: none;
}

/* El toggle se muestra dentro del glass-panel */
.layer-toggle {
  display: none;
}

/* Dentro del glass panel sí se muestran */
#panel-legend .form-check-input.layer-toggle {
  display: block;
}

.legend-swatch {
  width: 14px;
  height: 14px;
  border-radius: 3px;
  border: 1.5px solid rgba(0, 0, 0, 0.15);
  transition: all 0.2s ease;
  flex-shrink: 0;
}

/* ── Modal fullscreen: canvas step-2 borde a borde ───────────────── */
#modalDocumentos #step-2-canvas {
  border-radius: 0;
  height: calc(100vh - 120px);
  /* fullscreen modal minus header/footer */
}

/* El mapa cabe dentro del canvas: toolbar (~47px) + mapa = canvas.
   Si el mapa es más alto, su borde inferior queda recortado y las
   etiquetas de la gráticula de abajo no se ven. */
#modalDocumentos #map {
  height: calc(100vh - 300px);
}

#modalDocumentos #nav-informe>section#step-2 {
  margin: -1.5rem -1.5rem -1.5rem -1.5rem;
}

/* ── Hover animación cards: desactivar en el paso 2 (interfiere con el mapa) ─ */
#step-2-canvas .card,
#step-2-canvas .card:hover {
  transform: none !important;
  box-shadow: none !important;
}

/* Map */


/* ── STEP-2: IMMERSIVE MAP CANVAS ─────────────────────────── */
#step-2-canvas {
  position: relative;
  width: 100%;
  height: calc(100vh - 252px) !important;
  border-radius: 12px;
  overflow: hidden;
  background: #0f1923;
}



#tab-toast {
  position: absolute;
  bottom: 14px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 500;
  font-size: 0.8rem;
  font-weight: 600;
  padding: 6px 18px;
  border-radius: 20px;
  background: rgba(126, 200, 247, 0.85);
  color: #0f1923;
  opacity: 0;
  transition: opacity 0.3s;
  pointer-events: none;
  white-space: nowrap;
}

#tab-toast.show {
  opacity: 1;
}

#map {
  position: relative;
  width: 100%;
  height: calc(100vh - 250px);
  min-height: 400px;
  border-radius: 12px;
  margin: 0 auto;
}

.map-handle {
  position: absolute;
  top: 0;
  bottom: 0;
  width: 6px;
  background: rgba(255, 255, 255, 0.85);
  box-shadow: 0 0 8px rgba(0, 0, 0, 0.45);
  cursor: ew-resize;
  z-index: 20;
  touch-action: none;
}

.map-handle::before {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  width: 16px;
  height: 6px;
  transform: translate(-50%, -50%);
  background: radial-gradient(circle, rgba(15, 25, 35, 0.75) 1.5px, transparent 1.6px) center / 6px 6px;
}

#map-handle-izq {
  left: 0;
  border-radius: 6px 0 0 6px;
}

#map-handle-der {
  right: 0;
  border-radius: 0 6px 6px 0;
}

#scale-display {
  position: absolute;
  bottom: 24px;
  left: 12px;
  background: rgba(15, 25, 35, 0.72);
  backdrop-filter: blur(14px) saturate(160%);
  -webkit-backdrop-filter: blur(14px) saturate(160%);
  border: 1px solid rgba(255, 255, 255, 0.10);
  border-radius: 10px;
  padding: 8px 14px;
  display: flex;
  align-items: center;
  gap: 14px;
  z-index: 350;
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  user-select: none;
  pointer-events: none;
  white-space: nowrap;
}

#scale-display .scale-graphic {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

#scale-display .scale-bar {
  display: flex;
  height: 8px;
  border: 1px solid rgba(255, 255, 255, 0.6);
  border-radius: 2px;
  overflow: hidden;
}

#scale-display .scale-bar-seg {
  flex: 1;
}

#scale-display .scale-bar-seg:nth-child(odd) {
  background: rgba(255, 255, 255, 0.85);
}

#scale-display .scale-bar-seg:nth-child(even) {
  background: transparent;
}

#scale-display .scale-bar-labels {
  display: flex;
  justify-content: space-between;
  font-size: 10px;
  color: rgba(255, 255, 255, 0.75);
  font-variant-numeric: tabular-nums;
}

#scale-display .scale-label {
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 1.2px;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.50);
}

#scale-display .scale-value {
  font-size: 13px;
  font-weight: 600;
  color: #e0e6ed;
  font-variant-numeric: tabular-nums;
}

#scale-display .scale-warning {
  font-size: 10px;
  font-weight: 500;
  color: #ff6b6b;
  letter-spacing: 0.3px;
  padding-left: 12px;
  border-left: 1px solid rgba(255, 255, 255, 0.10);
}

/* ── GLASSMORPHISM BASE ───────────────────────────────────── */
.glass-panel {
  background: rgba(15, 25, 35, 0.72);
  backdrop-filter: blur(16px) saturate(180%);
  -webkit-backdrop-filter: blur(16px) saturate(180%);
  border: 1px solid rgba(255, 255, 255, 0.10);
  border-radius: 14px;
  color: #e8edf2;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.45);
}

/* ── PANEL LATERAL DERECHO ────────────────────────────────── */
#panel-coords, #panel-coords-traspasar {
  position: absolute;
  top: 10%;
  right: 12px;
  width: 370px;
  max-height: calc(100% - 24px);
  overflow-y: auto;
  z-index: 400;
  padding: 14px;
  scrollbar-width: thin;
  scrollbar-color: rgba(255, 255, 255, 0.2) transparent;
}

#panel-coords::-webkit-scrollbar, #panel-coords-traspasar::-webkit-scrollbar {
  width: 4px;
}

#panel-coords::-webkit-scrollbar-thumb, #panel-coords-traspasar::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.2);
  border-radius: 4px;
}

#panel-coords .input-group .form-control, #panel-coords-traspasar .input-group .form-control,
#panel-coords .input-group .input-group-text, #panel-coords-traspasar .input-group .input-group-text {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.15);
  color: #e8edf2;
  font-size: 0.82rem;
}

#panel-coords .form-control::placeholder, #panel-coords-traspasar .form-control::placeholder {
  color: rgba(255, 255, 255, 0.35);
}

#panel-coords .btn-outline-primary, #panel-coords-traspasar .btn-outline-primary {
  border-color: rgba(126, 200, 247, 0.5);
  color: #7ec8f7;
}

#panel-coords .btn-outline-primary:hover, #panel-coords-traspasar .btn-outline-primary:hover {
  background: rgba(126, 200, 247, 0.15);
  border-color: #7ec8f7;
}

#panel-coords #coord-list, #panel-coords-traspasar #coord-list,
#panel-coords #coord-list-constr, #panel-coords-traspasar #coord-list-constr {
  overflow-y: auto;
  scrollbar-width: thin;
  scrollbar-color: rgba(255, 255, 255, 0.2) transparent;
}

#panel-coords .list-group-item, #panel-coords-traspasar .list-group-item {
  background: rgba(255, 255, 255, 0.06);
  border-color: rgba(255, 255, 255, 0.1);
  color: #d0dae4;
  font-size: 0.78rem;
  padding: 5px 10px;
}

#panel-coords .btn-danger.btn-sm, #panel-coords-traspasar .btn-danger.btn-sm {
  padding: 2px 6px;
  font-size: 0.72rem;
}

/* ── Tarjeta de coordenada (Punto N + acciones + N/E) ─────────── */
#panel-coords .coord-row, #panel-coords-traspasar .coord-row {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 8px;
  padding: 6px 10px;
}

#panel-coords .coord-row-header, #panel-coords-traspasar .coord-row-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

#panel-coords .coord-dot, #panel-coords-traspasar .coord-dot {
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #f1c40f;
  margin-right: 6px;
  vertical-align: 1px;
}

#panel-coords .coord-label, #panel-coords-traspasar .coord-label {
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.4px;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.85);
}

#panel-coords .coord-row-body, #panel-coords-traspasar .coord-row-body {
  margin-top: 4px;
  font-family: monospace;
  font-size: 0.72rem;
  line-height: 1.6;
  color: rgba(255, 255, 255, 0.55);
}

#panel-coords .coord-row-body .coord-val, #panel-coords-traspasar .coord-row-body .coord-val {
  color: #fff;
}

#panel-coords .coord-row-actions, #panel-coords-traspasar .coord-row-actions {
  display: flex;
  align-items: center;
  gap: 2px;
  flex-shrink: 0;
}

#panel-coords .coord-row-actions .btn, #panel-coords-traspasar .coord-row-actions .btn {
  padding: 2px 6px;
  font-size: 0.85rem;
  line-height: 1.2;
  border: none;
  background: transparent;
  border-radius: 6px;
}

#panel-coords .coord-row-actions .btn:hover, #panel-coords-traspasar .coord-row-actions .btn:hover {
  background: rgba(255, 255, 255, 0.12);
}

#panel-coords .coord-row-actions .btn-locate-cord, #panel-coords-traspasar .coord-row-actions .btn-locate-cord {
  color: #f1c40f;
}

#panel-coords .coord-row-actions .btn-edit-cord, #panel-coords-traspasar .coord-row-actions .btn-edit-cord {
  color: #7ec8f7;
}

#panel-coords .coord-row-actions .btn-delete-cord, #panel-coords-traspasar .coord-row-actions .btn-delete-cord {
  color: #ea5455;
}

/* ── TABS DARK GLASS ───────────────────────────────────────── */
#panel-coords .nav-tabs, #panel-coords-traspasar .nav-tabs {
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

#panel-coords .nav-tabs .nav-link, #panel-coords-traspasar .nav-tabs .nav-link {
  color: rgba(255, 255, 255, 0.5);
  border: none;
  border-bottom: 2px solid transparent;
  background: transparent;
  font-size: 0.78rem;
  font-weight: 600;
  padding: 6px 8px;
  transition: all 0.2s;
}

#panel-coords .nav-tabs .nav-link:hover, #panel-coords-traspasar .nav-tabs .nav-link:hover {
  color: #7ec8f7;
  border-color: transparent;
}

#panel-coords .nav-tabs .nav-link.active, #panel-coords-traspasar .nav-tabs .nav-link.active {
  color: #7ec8f7;
  background: transparent;
  border-bottom-color: #7ec8f7;
}

#panel-coords .tab-content, #panel-coords-traspasar .tab-content {
  min-height: 100px;
}

#panel-coords .tab-pane, #panel-coords-traspasar .tab-pane {
  padding-top: 8px;
}


#legend-body {
  overflow: hidden;
  transition: max-height 0.3s ease, opacity 0.25s ease;
  max-height: 350px;
  opacity: 1;
}

#legend-body.collapsed {
  max-height: 0;
  opacity: 0;
  margin: 0;
  padding: 0;
}

/* ── SHORTCUTS TOAST (parte superior centro) ──────────────── */
#shortcuts-toast {
  padding: 6px 14px;
  font-size: 0.73rem;
  white-space: nowrap;
  pointer-events: auto;
  border-radius: 4px;
  display: flex;
  align-items: center;
  gap: 8px;
}

#shortcuts-toast kbd {
  background: rgba(230, 230, 230, 0.74);
  border: 1px solid rgba(66, 66, 66, 0.25);
  border-radius: 4px;
  padding: 1px 5px;
  font-size: 0.7rem;
  color: #535353;
}

#shortcut-text {
  transition: opacity 0.5s ease;
  pointer-events: none;
}

#shortcut-text.fade-out {
  opacity: 0;
}

#shortcut-text.fade-in {
  opacity: 1;
}

#shortcuts-close-btn {
  font-size: 0.55rem;
  opacity: 0.6;
  cursor: pointer;
  flex-shrink: 0;
}

#shortcuts-close-btn:hover {
  opacity: 1;
}

/* ── COORD TOOLTIP ────────────────────────────────────────── */
#coord-tooltip {
  position: absolute;
  bottom: 48px;
  right: 310px;
  z-index: 600;
  background: rgba(0, 0, 0, 0.78);
  color: #fff;
  border-radius: 8px;
  padding: 5px 12px;
  font-size: 0.78rem;
  pointer-events: none;
  display: none;
  backdrop-filter: blur(8px);
  white-space: nowrap;
}

/* ── MOUSE COORDS (esquina inferior derecha) ─────────────── */
#mouse-coords {
  position: absolute;
  bottom: 8px;
  right: 8px;
  z-index: 700;
  background: rgba(0, 0, 0, 0.78);
  color: #fff;
  border-radius: 8px;
  padding: 4px 10px;
  font-size: 0.75rem;
  font-family: monospace;
  pointer-events: none;
  white-space: nowrap;
}

/* ── SCROLLBAR OL controls visibility ────────────────────── */
.ol-zoom,
.ol-rotate,
.ol-scale-line,
.ol-full-screen {
  filter: drop-shadow(0 2px 6px rgba(0, 0, 0, 0.5));
}

#top-toolbar {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
  padding: 0.75rem 1.25rem;
  background-color: #f5f5f9;
  border-bottom: 1px solid #d9dee3;
}

.btn-toolbar {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.85rem;
  font-weight: 500;
  padding: 0.45rem 0.85rem;
  border-radius: 0.375rem;
  border: 1px solid #d9dee3;
  background-color: #fff;
  color: #697a8d;
  cursor: pointer;
  transition: all 0.2s ease;
}

.toolbar-consejos {
  color: #4c4c4d;
  font-size: 0.85rem !important;
  font-style: italic;
}

.legend-item {
  gap: 4px;
  place-items: center;
  width: 100%;
  height: 33px;
  margin: 0 11px;
}

.layer-toggle:not(:checked)~span {
  text-decoration: line-through;
  opacity: 0.6;
}

#validar-plano-body code {
  display: block;
  font-family: 'Consolas', 'Courier New', monospace;
  font-size: 13px;
  background: #1e1e1e;
  color: #d4d4d4;
  padding: 20px 24px;
  border-radius: 8px;
  line-height: 1.7;
  white-space: pre-wrap;
  word-break: break-all;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .06);
}

#validar-plano-body .kv {
  color: #9cdcfe
}

/* keys */
#validar-plano-body .str {
  color: #ce9178
}

/* string values */
#validar-plano-body .num {
  color: #b5cea8
}

/* numbers */
#validar-plano-body .pun {
  color: #808080
}

/* punctuation */
#validar-plano-body .alert-txt {
  color: #f14c4c;
  font-weight: 700
}

#validar-plano-body .brace {
  color: #dcdcaa
}

#validar-plano-body .label {
  color: #6a9955
}