/* Styles for Technical Laboratory Module (lab.css) */

.lab-modal-tabs {
  display: flex;
  gap: 0.5rem;
  border-bottom: 2px solid #cbd5e1;
  background: #f8fafc;
  padding: 0.75rem 1.25rem 0 1.25rem;
  border-top-left-radius: 12px;
  border-top-right-radius: 12px;
}

.lab-modal-tab-btn {
  padding: 0.7rem 1.25rem;
  font-weight: 700;
  font-size: 0.88rem;
  border: none;
  background: transparent;
  cursor: pointer;
  color: #64748b;
  border-bottom: 3px solid transparent;
  margin-bottom: -2px;
  transition: all 0.2s ease;
}

.lab-modal-tab-btn:hover {
  color: #0e4d91;
}

.lab-modal-tab-btn.active {
  color: #0e4d91;
  border-bottom: 3px solid #0e4d91;
  background: #ffffff;
  border-top-left-radius: 8px;
  border-top-right-radius: 8px;
}

.form-tab-content {
  text-align: left !important;
}

.form-tab-content .equip-card {
  text-align: left !important;
}

.form-tab-content .form-group {
  text-align: left !important;
}

.uppercase-input {
  text-transform: uppercase !important;
}

/* Custom Searchable Select for Brand */
.search-select-wrapper {
  position: relative;
  width: 100%;
}

.search-select-dropdown {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  max-height: 200px;
  overflow-y: auto;
  background: #ffffff;
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
  z-index: 999;
  margin-top: 4px;
}

.search-select-item {
  padding: 0.6rem 0.8rem;
  font-size: 0.85rem;
  font-weight: 600;
  color: #334155;
  cursor: pointer;
  transition: background 0.15s ease;
}

.search-select-item:hover {
  background: #f1f5f9;
  color: #0e4d91;
}

.search-select-item.new-brand-item {
  background: #eff6ff;
  color: #1d4ed8;
  font-weight: 700;
  border-top: 1px dashed #bfdbfe;
}

.search-select-item.new-brand-item:hover {
  background: #dbeafe;
}

.lab-drag-drop-zone {
  border: 2px dashed #94a3b8;
  border-radius: 10px;
  background: #f8fafc;
  padding: 1rem;
  text-align: center;
  transition: all 0.2s ease;
  position: relative;
}

.lab-drag-drop-zone.dragover {
  border-color: #0e4d91;
  background: #eff6ff;
}

.sortable-header {
  cursor: pointer;
  user-select: none;
  position: relative;
  padding-right: 1.2rem !important;
}

.sortable-header:hover {
  background-color: rgba(14, 77, 145, 0.08) !important;
}

.sort-icon {
  display: inline-block;
  margin-left: 4px;
  opacity: 0.5;
  font-size: 0.75rem;
}

.sortable-header.active-sort .sort-icon {
  opacity: 1;
  color: #0e4d91;
}

/* Single column BIN icons pill */
.bin-icons-pill {
  display: inline-flex;
  gap: 0.4rem;
  align-items: center;
}

.bin-icon-btn {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 8px;
  font-size: 0.72rem;
  font-weight: 700;
  border-radius: 6px;
  text-decoration: none;
  transition: transform 0.15s ease;
}

.bin-icon-btn:hover {
  transform: translateY(-1px);
}

.bin-icon-orig {
  background: #e0f2fe;
  color: #0369a1;
  border: 1px solid #bae6fd;
}

.bin-icon-fab {
  background: #ecfdf5;
  color: #047857;
  border: 1px solid #a7f3d0;
}

/* Compact the entire lab technical laboratory grid table to ~80% */
#lab-table {
  font-size: 0.8rem !important;
}

#lab-table th, 
#lab-table td {
  padding: 0.4rem 0.5rem !important;
}

#lab-tbody tr {
  transition: background-color 0.15s ease;
}

#lab-tbody tr:hover {
  background-color: #f1f5f9 !important;
}

/* Custom Technical Consultation View (TASK-017) */
.consult-view-tab-btn:hover {
  color: #38bdf8 !important;
  background: rgba(56, 189, 248, 0.05) !important;
}

.consult-view-tab-btn.active {
  background: #0f172a !important;
}

/* Custom Scrollbar styling for thumbnails and lists */
#consult-view-thumbnails::-webkit-scrollbar,
#consult-view-errors-list::-webkit-scrollbar,
#consult-view-grid-gallery::-webkit-scrollbar {
  height: 4px;
  width: 4px;
}

#consult-view-thumbnails::-webkit-scrollbar-thumb,
#consult-view-errors-list::-webkit-scrollbar-thumb,
#consult-view-grid-gallery::-webkit-scrollbar-thumb {
  background: #334155;
  border-radius: 4px;
}

#consult-view-thumbnails::-webkit-scrollbar-track,
#consult-view-errors-list::-webkit-scrollbar-track,
#consult-view-grid-gallery::-webkit-scrollbar-track {
  background: transparent;
}

/* Custom Technical Standalone Consultation View (TASK-018 / FULLSCREEN FIX) */
html.consult-window-active,
body.consult-window-active {
  margin: 0 !important;
  padding: 0 !important;
  border: 0 !important;
  width: 100vw !important;
  height: 100vh !important;
  height: 100dvh !important;
  max-width: 100vw !important;
  max-height: 100vh !important;
  overflow: hidden !important;
  background: #090d16 !important;
}

body.consult-window-active #app-sidebar,
body.consult-window-active .top-bar,
body.consult-window-active #tenant-filter-container,
body.consult-window-active > header,
body.consult-window-active > footer,
body.consult-window-active #saas-layout > header,
body.consult-window-active #saas-layout > footer,
body.consult-window-active .main-layout > header,
body.consult-window-active .main-layout > footer {
  display: none !important;
}

body.consult-window-active .technical-consult-container header,
body.consult-window-active .vtl-modal header,
body.consult-window-active #lab-modal .modal-header,
body.consult-window-active #lab-modal .modal-footer,
body.consult-window-active .modal-header,
body.consult-window-active .modal-footer,
body.consult-window-active .annot-editor-overlay header {
  display: flex !important;
}

body.consult-window-active #app,
body.consult-window-active .app-container,
body.consult-window-active #saas-layout {
  width: 100vw !important;
  height: 100vh !important;
  height: 100dvh !important;
  min-height: 100vh !important;
  margin: 0 !important;
  padding: 0 !important;
  border: 0 !important;
  max-width: 100vw !important;
  background: #090d16 !important;
  overflow: hidden !important;
}

body.consult-window-active .main-layout {
  margin: 0 !important;
  padding: 0 !important;
  border: 0 !important;
  width: 100vw !important;
  height: 100vh !important;
  height: 100dvh !important;
  display: flex !important;
  flex-direction: column !important;
  background: #090d16 !important;
  overflow: hidden !important;
}

body.consult-window-active .content-wrapper {
  margin: 0 !important;
  padding: 0 !important;
  border: 0 !important;
  gap: 0 !important;
  width: 100vw !important;
  height: 100vh !important;
  height: 100dvh !important;
  max-height: 100vh !important;
  display: flex !important;
  flex-direction: column !important;
  overflow: hidden !important;
  background: #090d16 !important;
}

body.consult-window-active #main-view-container {
  padding: 0 !important;
  margin: 0 !important;
  border: 0 !important;
  width: 100vw !important;
  height: 100vh !important;
  height: 100dvh !important;
  max-height: 100vh !important;
  overflow: hidden !important;
  background: #090d16 !important;
  display: flex !important;
  flex-direction: column !important;
}

body.consult-window-active .technical-consult-container {
  width: 100vw !important;
  height: 100vh !important;
  height: 100dvh !important;
  margin: 0 !important;
  padding: 0 !important;
  border: 0 !important;
  overflow: hidden !important;
  background: #090d16 !important;
}

/* Scaling text to 70% in the info panel */
.info-panel {
  font-size: 0.82rem;
}

.info-card {
  background: #111a2e;
  border: 1px solid #1e293b;
  border-radius: 10px;
  padding: 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
}

.info-card-header {
  font-size: 0.9rem;
  font-weight: 800;
  color: #38bdf8;
  text-transform: uppercase;
  border-bottom: 1px solid #1e293b;
  padding-bottom: 0.4rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.info-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
  gap: 0.75rem;
}

.info-item {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
}

.info-label {
  font-size: 0.7rem;
  font-weight: 700;
  color: #94a3b8;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.info-value {
  font-size: 0.88rem;
  font-weight: 600;
  color: #f1f5f9;
  letter-spacing: 0.025em;
}

/* TASK-017: Variantes compactas para el visor VTL (auditoría + GRAL en 2 columnas) */
.info-card--compact {
  padding: 0.75rem;
  gap: 0.5rem;
}
.info-card--compact .info-card-header {
  font-size: 0.68rem;
  padding-bottom: 0.35rem;
}
.info-card--compact .info-label {
  font-size: 0.6rem;
}
.info-card--compact .info-value {
  font-size: 0.8rem;
}
.info-grid--compact {
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
  gap: 0.5rem;
}
.info-grid--audit {
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 0.5rem;
}

/* VTL Inline Editing */
.vtl-editable-container {
  display: inline-block;
  width: 100%;
}
.vtl-editable-container:hover .vtl-pencil-icon {
  opacity: 1 !important;
}
.vtl-editable-container:hover .vtl-display-span {
  color: #38bdf8 !important;
  border-bottom: 1px dashed #38bdf8 !important;
}

/* Thumbnails hover micro-animations */
.thumb-card {
  transition: transform 0.2s ease;
}

.thumb-card:hover {
  transform: translateY(-2px);
}

.thumb-card:hover img {
  opacity: 1 !important;
}


/* Navigation overlay buttons (TASK-019) */
.viewer-nav-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(15, 23, 42, 0.65);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: #f8fafc;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  font-size: 1.2rem;
  font-weight: bold;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 90;
  transition: all 0.2s ease;
  backdrop-filter: blur(4px);
  user-select: none;
}

.viewer-nav-btn:hover {
  background: #38bdf8;
  color: #0f172a;
  border-color: #38bdf8;
  box-shadow: 0 0 12px rgba(56, 189, 248, 0.5);
  transform: translateY(-50%) scale(1.1);
}

.viewer-nav-btn.prev {
  left: 1.25rem;
}

.viewer-nav-btn.next {
  right: 1.25rem;
}

/* Float Edit Photo Button */
.btn-edit-photo-float {
  position: absolute;
  top: 1.25rem;
  right: 1.25rem;
  background: rgba(15, 23, 42, 0.85);
  border: 1px solid #334155;
  color: #38bdf8;
  padding: 0.4rem 1rem;
  border-radius: 30px;
  font-size: 0.75rem;
  font-weight: 700;
  cursor: pointer;
  z-index: 90;
  transition: all 0.2s ease;
  backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  gap: 0.4rem;
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
}

.btn-edit-photo-float:hover {
  background: #38bdf8;
  color: #0f172a;
  border-color: #38bdf8;
  transform: scale(1.05);
}

/* Lightbox full screen style modifications */
#dynamic-lightbox-view {
  transition: opacity 0.25s ease-out;
}

#dynamic-lightbox-view img {
  user-select: none;
  -webkit-user-drag: none;
  will-change: transform;
}

/* Modern Annotations Modal Styling */
.annotations-modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(2, 6, 23, 0.8);
  backdrop-filter: blur(8px);
  z-index: 20000;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.2s ease;
}

.annotations-modal-card {
  background: #0f172a;
  border: 1px solid #1e293b;
  border-radius: 12px;
  width: 500px;
  max-width: 90vw;
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
  transform: translateY(20px);
  transition: transform 0.2s ease;
}

.annotations-modal-overlay.active {
  opacity: 1;
}

.annotations-modal-overlay.active .annotations-modal-card {
  transform: translateY(0);
}

/* Annotation Editor Custom Styles */
.annot-tool-btn {
  background: #1e293b;
  border: 1px solid #334155;
  color: #cbd5e1;
  width: 38px;
  height: 38px;
  border-radius: 8px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
  transition: all 0.2s ease;
  user-select: none;
}

.annot-tool-btn:hover {
  background: #334155;
  color: white;
  border-color: #475569;
}

.annot-tool-btn.active {
  background: #38bdf8;
  color: #020617;
  border-color: #38bdf8;
  box-shadow: 0 0 10px rgba(56, 189, 248, 0.4);
}

.annot-color-btn {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  border: 2px solid #0f172a;
  cursor: pointer;
  outline: 2px solid transparent;
  transition: all 0.2s ease;
}

.annot-color-btn:hover {
  transform: scale(1.15);
}

.annot-color-btn.active {
  outline-color: #38bdf8;
}

.measure-pin:hover circle {
  fill: #f43f5e !important;
  stroke: #38bdf8 !important;
  stroke-width: 3px !important;
}

.annot-help-card {
  background: #0f172a;
  border: 1px solid #1e293b;
  border-radius: 12px;
  padding: 1.5rem;
  box-shadow: 0 20px 25px -5px rgba(0,0,0,0.5);
  max-width: 480px;
  color: #f8fafc;
}

.annot-help-card h4 {
  color: #38bdf8;
  margin-top: 0;
  border-bottom: 1px solid #1e293b;
  padding-bottom: 0.5rem;
}

.annot-help-card ul {
  padding-left: 1.25rem;
  margin: 0.75rem 0;
}

.annot-help-card li {
  margin-bottom: 0.4rem;
  font-size: 0.75rem;
  color: #cbd5e1;
}

/* TASK-021 Extended Annotation Editor Styles */
.ed-list-item {
  transition: all 0.2s ease;
  border: 1px solid #1e293b;
  border-radius: 6px;
  background: #090d16;
}

.ed-list-item:hover {
  background: #0f172a;
  border-color: #334155;
}

.ed-list-item.active {
  background: #1e293b !important;
  border-color: #38bdf8 !important;
  box-shadow: 0 0 8px rgba(56, 189, 248, 0.2);
}

.annot-svg-highlight {
  stroke-dasharray: 4,4;
  animation: svg-dash-spin 1.5s linear infinite;
}

@keyframes svg-dash-spin {
  to {
    stroke-dashoffset: -20;
  }
}

input[type="range"]::-webkit-slider-runnable-track {
  background: #1e293b;
  border-radius: 2px;
  height: 4px;
}

input[type="range"]::-webkit-slider-thumb {
  background: #38bdf8;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  cursor: pointer;
  margin-top: -4px;
}

/* Shimmer loader animation (Requirement 9.8) */
@keyframes pulse-shimmer {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

.pulse-shimmer {
  background: linear-gradient(90deg, #020617 25%, #1e293b 50%, #020617 75%) !important;
  background-size: 200% 100% !important;
  animation: pulse-shimmer 1.5s infinite linear !important;
}

/* TASK-020.1: Logo Oficial IS4 ERP - FTE / VTL Header Branding */
.is4-header-brand-logo {
  height: 32px;
  max-height: 36px;
  width: auto;
  max-width: 140px;
  object-fit: contain;
  vertical-align: middle;
  flex-shrink: 0;
  display: block;
  user-select: none;
  -webkit-user-drag: none;
  transition: max-height 0.2s ease, max-width 0.2s ease;
}

@media (max-width: 900px) {
  .is4-header-brand-logo {
    height: 26px;
    max-height: 28px;
    max-width: 110px;
  }
}

@media (max-width: 600px) {
  .is4-header-brand-logo {
    height: 22px;
    max-height: 24px;
    max-width: 85px;
  }
}



