/* Guatemaltek Brand Colors - From REFERENCEWEB */
:root {
  /* Primary Brand Colors */
  --gtek-primary-blue: #2E86C1;
  --gtek-secondary-blue: #3498DB;
  --gtek-primary-orange: #F97316;
  --gtek-secondary-orange: #FB923C;
  --gtek-dark-blue: #0F172A;
  --gtek-secondary-dark: #1E293B;
  --gtek-accent-teal: #1ABC9C;

  /* Background Colors */
  --gtek-white: #FFFFFF;
  --gtek-light-gray: #F9FAFB;
  --gtek-card-dark: #1E293B;
  --gtek-glass-bg: rgba(46, 134, 193, 0.05);
  --gtek-glass-border: rgba(46, 134, 193, 0.1);
  --gtek-border: rgba(46, 134, 193, 0.25);

  /* Text Colors */
  --gtek-text-dark: #1F2937;
  --gtek-text-gray: #6B7280;
  --gtek-text-white: #FFFFFF;
  --gtek-text-primary: #F1F5F9;
  --gtek-text-secondary: #94A3B8;

  /* Gradients */
  --gradient-primary: linear-gradient(135deg, #2E86C1 0%, #F97316 100%);
  --gradient-blue: linear-gradient(135deg, #2E86C1 0%, #3498DB 100%);
  --gradient-orange: linear-gradient(135deg, #F97316 0%, #FB923C 100%);
  --gradient-dark: linear-gradient(135deg, #0F172A 0%, #1E293B 100%);
  
  /* Status Colors for Dashboard */
  --gtek-success: #22c55e;
  --gtek-error: #ef4444;
  --gtek-warning: #f97316;

  /* ---- Tokens semanticos (Fase 0 UI/UX — ver docs/uiux/README.md) --------------
     Los de arriba son los hues de marca y se quedan. Estos son los pares
     LISTOS PARA USAR, con su ratio WCAG ya calculado. No inventes un verde nuevo.

     -strong  = fill opaco, para texto BLANCO encima. Opaco a proposito: el mismo
                badge cae en un card oscuro y dentro de un grid DevExtreme blanco
                (ver CLAUDE.md: filas de grid claras con texto negro), asi que el
                contraste no puede depender del fondo.
     -soft    = fondo tenue para chips/alertas sobre superficie OSCURA unicamente.
                El texto va con -on-*-soft, que es el tono CLARO, no el hue puro:
                el hue puro sobre su propio soft da 3.3:1 en error y 4.1:1 en warn
                — no pasa AA. Con el tono claro da 6.1–6.8:1.                     */
  --gtek-success-strong: #15803D;   /* + #FFF = 5.02:1 AA */
  --gtek-warn-strong:    #B45309;   /* + #FFF = 5.02:1 AA */
  --gtek-error-strong:   #B91C1C;   /* + #FFF = 6.47:1 AA */
  --gtek-neutral-strong: #475569;   /* + #FFF = 7.58:1 AAA */
  /* Magnitude, NOT status. The neutral chart blue Finance Hub's ranked bars already use
     (topProcessesChart, crossChargingCostChart). A bigger bar is bigger, not healthier —
     never colour a magnitude with -success-strong. On the white chart body. */
  --gtek-chart-neutral:  #3B82F6;
  --gtek-on-strong:      #FFFFFF;   /* unico texto valido sobre cualquier -strong */

  --gtek-success-soft: rgba(34, 197, 94, 0.18);
  --gtek-warn-soft:    rgba(249, 115, 22, 0.18);
  --gtek-error-soft:   rgba(239, 68, 68, 0.18);
  --gtek-info-soft:    rgba(46, 134, 193, 0.18);
  --gtek-on-success-soft: #4ADE80;  /* sobre success-soft en card = 6.07:1 AA */
  --gtek-on-warn-soft:    #FDBA74;  /* 6.80:1 AA */
  --gtek-on-error-soft:   #FCA5A5;  /* 6.49:1 AA */
  --gtek-on-info-soft:    #93C5FD;

  /* Bordes: un solo juego. rgba blanco aclara el canto sobre fondo oscuro y
     desaparece sobre el grid blanco — donde el fill ya contrasta 5:1+ solo. */
  --gtek-border-subtle: rgba(255, 255, 255, 0.18);
  --gtek-border-strong: rgba(148, 163, 184, 0.30);
}

/* ---- Badge de estado unico -------------------------------------------------
   Reemplaza las 60 clases con "badge" y las 25 ".status-*" que hoy viven
   sueltas dentro de las vistas. Uso: <span class="gtek-badge gtek-badge--error">
   El significado lo carga el TEXTO, nunca solo el color (daltonismo).          */
.gtek-badge {
  display: inline-flex;
  align-items: center;
  gap: .35em;
  padding: .25em .65em;
  font-size: .78rem;
  font-weight: 600;
  line-height: 1.35;
  white-space: nowrap;
  border-radius: 999px;
  border: 1px solid var(--gtek-border-subtle);
  color: var(--gtek-on-strong);
}
.gtek-badge--success { background-color: var(--gtek-success-strong); }
.gtek-badge--warn    { background-color: var(--gtek-warn-strong); }
.gtek-badge--error   { background-color: var(--gtek-error-strong); }
.gtek-badge--neutral { background-color: var(--gtek-neutral-strong); }

html {
  font-size: 14px;
}

@media (min-width: 768px) {
  html {
    font-size: 16px;
  }
}

/* Global Guatemaltek Theme */
html {
  position: relative;
  min-height: 100%;
  font-size: 14px;
  overflow-x: clip; /* clip instead of hidden — preserves position:sticky in WebKit/Safari */
  background-color: var(--gtek-dark-blue);
}

@media (min-width: 768px) {
  html {
    font-size: 16px;
  }
}

body {
  background: linear-gradient(135deg, var(--gtek-dark-blue) 0%, #1E293B 100%);
  color: var(--gtek-text-white);
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  font-weight: 400;
  line-height: 1.6;
  margin: 0;
  padding: 0;
  margin-bottom: 80px; /* Height of the footer */
  min-height: 100vh;
  min-width: 320px; /* below 320px show scroll rather than break layout */
  /* No overflow-x here on purpose — html's overflow-x:clip above already suppresses
     the horizontal scrollbar, so this would just be redundant. */
}

body.modal-open {
  padding-right: 0 !important;
}

/* Dashboard specific styling - keep dark theme for monitoring interface */
.dashboard-page {
  background-color: var(--gtek-dark-blue);
  color: var(--gtek-text-white);
}

.dashboard-page .main-container {
  background-color: var(--gtek-dark-blue);
}

/* Navigation Styling */
.navbar-guatemaltek {
  background: rgba(255, 255, 255, 0.95) !important;
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--gtek-glass-border);
  box-shadow: 0 2px 20px rgba(0, 0, 0, 0.08);
  position: sticky;
  top: 0;
  z-index: 1000;
  transition: all 0.3s ease;
}

.navbar-guatemaltek .navbar-brand {
  color: var(--gtek-text-dark) !important;
  font-weight: 600;
  font-size: 1.5rem;
  display: flex;
  align-items: center;
}

.navbar-guatemaltek .navbar-brand img {
  height: 34px;
  max-width: 190px;
  width: auto;
  object-fit: contain;
  margin-right: 0.5rem;
}

.navbar-guatemaltek .navbar-brand:hover {
  color: var(--gtek-primary-blue) !important;
}

.navbar-guatemaltek .nav-link {
  color: var(--gtek-text-dark) !important;
  font-weight: 500;
  position: relative;
  padding: 0.5rem 1rem;
  transition: all 0.3s ease;
}

.navbar-guatemaltek .nav-link:hover {
  color: var(--gtek-primary-blue) !important;
}

.navbar-guatemaltek .nav-link::after {
  content: '';
  position: absolute;
  width: 0;
  height: 2px;
  bottom: 0;
  left: 50%;
  background: var(--gradient-primary);
  transition: all 0.3s ease;
}

.navbar-guatemaltek .nav-link:hover::after {
  width: 80%;
  left: 10%;
}

/* Dashboard Navigation - Keep dark for monitoring pages */
.dashboard-page .navbar-guatemaltek {
  background: rgba(15, 23, 42, 0.95) !important;
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
}

.dashboard-page .navbar-guatemaltek .navbar-brand,
.dashboard-page .navbar-guatemaltek .nav-link {
  color: var(--gtek-text-white) !important;
}

.dashboard-page .navbar-guatemaltek .nav-link:hover {
  color: var(--gtek-primary-orange) !important;
}

/* Container Styling */
.main-container {
  background-color: transparent;
  padding-top: 2rem;
  padding-bottom: 2rem;
}

/* Glass Morphism Cards */
.gtek-card, .glass-card {
  background: var(--gtek-white);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
  border: 1px solid var(--gtek-glass-border);
  border-radius: 15px;
  padding: 2rem;
  margin-bottom: 1rem;
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  transition: all 0.3s ease;
}

.gtek-card:hover, .glass-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 8px 25px rgba(46, 134, 193, 0.15);
}

.gtek-card-header {
  background-color: var(--gtek-secondary-dark);
  color: var(--gtek-text-primary);
  padding: 1rem 1.5rem;
  border-radius: 8px 8px 0 0;
  border-bottom: 1px solid var(--gtek-border);
  font-weight: 600;
}

.grid-card {
  background: #1E293B;
  border: 1px solid rgba(46, 134, 193, 0.2);
  border-radius: 12px;
  padding: 25px;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.5);
}

.grid-card .dx-datagrid-header-panel {
  background: #1E293B !important;
  border-bottom: 1px solid rgba(46, 134, 193, 0.2) !important;
}

.grid-card .dx-datagrid-header-panel .dx-toolbar {
  background: transparent !important;
}

/* Metric Cards */
.metric-card {
  background-color: var(--gtek-card-dark);
  border: 1px solid var(--gtek-border);
  border-radius: 8px;
  padding: 1.5rem;
  text-align: center;
  transition: transform 0.2s ease;
}

.metric-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
}

.metric-card.total { border-left: 4px solid var(--gtek-primary-blue); }
.metric-card.success { border-left: 4px solid var(--gtek-success); }
.metric-card.error { border-left: 4px solid var(--gtek-error); }
.metric-card.warning { border-left: 4px solid var(--gtek-warning); }

.metric-value {
  font-size: 2.5rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
}

.metric-value.total { color: var(--gtek-primary-blue); }
.metric-value.success { color: var(--gtek-success); }
.metric-value.error { color: var(--gtek-error); }
.metric-value.warning { color: var(--gtek-warning); }

.metric-label {
  color: var(--gtek-text-secondary);
  font-size: 0.9rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 1px;
}

/* Footer */
.footer {
  position: absolute;
  bottom: 0;
  width: 100%;
  height: 80px;
  background: linear-gradient(135deg, rgba(15, 23, 42, 0.95) 0%, rgba(30, 41, 59, 0.95) 100%);
  border-top: 1px solid rgba(46, 134, 193, 0.3);
  color: var(--gtek-text-white);
  padding: 1rem 0;
  display: flex;
  align-items: center;
  box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.2);
}

.footer a {
  color: var(--gtek-primary-blue);
  text-decoration: none;
  transition: color 0.3s ease;
}

.footer a:hover {
  color: var(--gtek-secondary-blue);
}

/* Form Controls */
.form-control {
  background-color: var(--gtek-card-dark);
  border: 1px solid var(--gtek-border);
  color: var(--gtek-text-primary);
}

.form-control:focus {
  background-color: var(--gtek-card-dark);
  border-color: var(--gtek-primary-blue);
  color: var(--gtek-text-primary);
  box-shadow: 0 0 0 0.2rem rgba(59, 130, 246, 0.25);
}

/* Password show/hide toggle - shared by every password field in the app
   (paired with initPasswordToggle() in site.js). Icon color assumes the dark
   .form-control default above; light-card forms (e.g. ChangePassword) override
   the color locally. */
.password-field-wrap {
  position: relative;
}
.password-field-wrap .form-control {
  padding-right: 3rem;
}
.password-toggle-btn {
  position: absolute;
  top: 0;
  right: 0;
  height: 100%;
  width: 3rem;
  display: flex;
  align-items: center;
  justify-content: center;
  background: transparent;
  border: none;
  color: rgba(255, 255, 255, 0.6);
  cursor: pointer;
  z-index: 5;
}
.password-toggle-btn:hover {
  color: #FFFFFF;
}

/* Validation messages - asp-validation-for always renders field-validation-valid/
   -error regardless of view, so this one rule reserves the line height everywhere
   an error can appear/disappear, instead of every form shifting its layout. */
.field-validation-valid,
.field-validation-error {
  display: block;
  min-height: 18px;
  font-size: 0.8rem;
  line-height: 1.3;
  margin-top: 6px;
}

/* Guatemaltek Button Styles */
.btn-primary {
  background: var(--gradient-primary);
  border: none;
  color: var(--gtek-text-white);
  font-weight: 600;
  padding: 0.75rem 2rem;
  border-radius: 50px;
  transition: all 0.3s ease;
  text-transform: none;
}

.btn-primary:hover {
  background: var(--gradient-blue);
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(46, 134, 193, 0.3);
}

.btn-outline-light {
  background: transparent;
  border: 2px solid var(--gtek-primary-blue);
  color: var(--gtek-primary-blue);
  font-weight: 600;
  padding: 0.75rem 2rem;
  border-radius: 50px;
  transition: all 0.3s ease;
}

.btn-outline-light:hover {
  background: var(--gtek-primary-blue);
  color: var(--gtek-text-white);
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(46, 134, 193, 0.3);
}

.btn:focus, .btn:active:focus, .btn-link.nav-link:focus, .form-control:focus, .form-check-input:focus {
  box-shadow: 0 0 0 0.1rem white, 0 0 0 0.25rem var(--gtek-primary-blue);
}

/* Home Page Styles */

/* Hero Section */
.hero-section {
  padding: 4rem 0;
  background: var(--gtek-light-gray);
  position: relative;
  overflow: hidden;
}

.hero-section::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: var(--gtek-glass-bg);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  z-index: 0;
}

.hero-section .container {
  position: relative;
  z-index: 1;
}

.hero-title {
  font-size: 3.5rem;
  font-weight: 700;
  line-height: 1.2;
  margin-bottom: 1.5rem;
}

.hero-subtitle {
  font-size: 1.2rem;
  line-height: 1.6;
}

.min-vh-75 {
  min-height: 75vh;
}

/* Dashboard Preview */
.dashboard-preview {
  max-width: 400px;
  margin: 0 auto;
  background-color: var(--gtek-card-dark);
  overflow: hidden;
}

.preview-header {
  background-color: var(--gtek-secondary-dark);
  padding: 0.75rem 1rem;
  border-bottom: 1px solid var(--gtek-border);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.preview-dots {
  display: flex;
  gap: 0.25rem;
}

.dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  display: inline-block;
}

.dot-red { background-color: #ef4444; }
.dot-yellow { background-color: #f59e0b; }
.dot-green { background-color: #10b981; }

.preview-content {
  padding: 1rem;
}

.mini-metric-card {
  background-color: var(--gtek-secondary-dark);
  border-radius: 6px;
  padding: 0.75rem;
  text-align: center;
  border-left: 3px solid;
}

.mini-metric-card.total { border-left-color: var(--gtek-primary-blue); }
.mini-metric-card.success { border-left-color: var(--gtek-success); }

.mini-value {
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--gtek-text-primary);
}

.mini-label {
  font-size: 0.75rem;
  color: var(--gtek-text-secondary);
  text-transform: uppercase;
}

.preview-chart {
  display: flex;
  align-items: end;
  justify-content: space-between;
  height: 60px;
  gap: 4px;
  margin-top: 1rem;
}

.chart-bar {
  background: linear-gradient(to top, var(--gtek-primary-blue), var(--gtek-accent-teal));
  width: 100%;
  border-radius: 2px 2px 0 0;
  opacity: 0.8;
}

/* Solutions Section */
.solution-card {
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  text-align: center;
}

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

.solution-icon {
  width: 120px;
  height: 120px;
  background: linear-gradient(135deg, rgba(46, 134, 193, 0.1) 0%, rgba(249, 115, 22, 0.1) 100%);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 1.5rem;
  border: 2px solid rgba(46, 134, 193, 0.2);
  transition: all 0.3s ease;
}

.solution-card:hover .solution-icon {
  transform: scale(1.1);
  border-color: rgba(46, 134, 193, 0.4);
  background: linear-gradient(135deg, rgba(46, 134, 193, 0.2) 0%, rgba(249, 115, 22, 0.2) 100%);
}

.solution-features {
  list-style: none;
  padding: 0;
  text-align: left;
}

.solution-features li {
  padding: 0.25rem 0;
  position: relative;
  padding-left: 1.5rem;
}

.solution-features li:before {
  content: "✓";
  color: var(--gtek-success);
  font-weight: bold;
  position: absolute;
  left: 0;
}

/* Statistics Section */
.stat-item {
  padding: 1rem 0.5rem;
}

.stat-number {
  font-size: 2.5rem;
  font-weight: 700;
  line-height: 1;
  margin-bottom: 0.25rem;
}

.stat-label {
  font-size: 0.85rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

/* Section Styling */
.section-title {
  font-size: 2.5rem;
  font-weight: 700;
}

.section-subtitle {
  font-size: 1.1rem;
  max-width: 600px;
  margin: 0 auto;
}

/* Responsive Design */
@media (max-width: 768px) {
  .hero-title {
    font-size: 2.5rem;
  }
  
  .hero-subtitle {
    font-size: 1.1rem;
  }
  
  .stat-number {
    font-size: 2.5rem;
  }
  
  .section-title {
    font-size: 2rem;
  }
}

/* Ultra-narrow screens (< 400px) */
@media (max-width: 399px) {
  .gtek-card, .glass-card {
    padding: 0.75rem;
  }
  .contact-info-card {
    padding: 0.75rem !important;
  }
}

/* Mobile layout fixes — sidebar pages + data grid overflow */
@media (max-width: 767px) {
  /* Prevent DevExtreme DataGrid (and any wide data table) from scrolling
     the whole page on mobile — the grid keeps its own internal scroll */
  .main-container {
    overflow-x: hidden;
  }

  /* Footer tagline: allow wrapping on narrow screens */
  .footer .text-muted,
  .footer small {
    white-space: normal;
  }
}

/* Drag-and-drop chart reordering — shared by every dashboard-style page
   (Dashboard, MainDashboard, HistoryDashboard). See wwwroot/js/chart-dnd.js */
/* Rows are flex (Bootstrap 5 default) so columns already stretch to equal
   height — but .gtek-card itself has no height rule, so it only takes its
   own content's natural height, leaving uneven-looking card boxes in a
   row where charts have different fixed pixel heights. Force the card to
   fill its stretched column. */
.chart-card-wrapper {
  display: flex;
}
.chart-card-wrapper .gtek-card {
  width: 100%;
  display: flex;
  flex-direction: column;
}
.chart-card-wrapper .card-body {
  flex: 1;
}
.chart-drag-handle {
  cursor: grab;
  user-select: none;
}
.chart-drag-handle:active {
  cursor: grabbing;
}
.drag-grip {
  opacity: 0.5;
}
.chart-card-wrapper.dragging .gtek-card {
  opacity: 0.4;
}
.chart-card-wrapper.drag-over .gtek-card {
  box-shadow: 0 0 0 2px var(--gtek-primary-orange, #F97316) inset;
}

/* Per-card hide + size-toggle controls, wired up by chart-dnd.js. Hiding a
   card removes it from layout flow entirely (no empty gap left behind);
   toggling "full" forces the card to span its whole row regardless of
   whether the page uses Bootstrap's flex grid or a plain CSS grid. */
.chart-card-wrapper.chart-hidden {
  display: none !important;
}
.chart-card-wrapper.chart-size-full {
  flex: 0 0 100% !important;
  max-width: 100% !important;
  width: 100% !important;
  grid-column: 1 / -1 !important;
}
/* Shrink target for cards that are already full-width by default (col-12,
   col-lg-12, or an inline grid-column: 1 / -1) — "full" would be a no-op
   for these, so the size button's other direction needs its own class
   instead of just removing chart-size-full. */
.chart-card-wrapper.chart-size-half {
  flex: 0 0 50% !important;
  max-width: 50% !important;
  width: 50% !important;
  grid-column: auto !important;
}
.chart-header-actions {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 4px;
  flex-shrink: 0;
}
.chart-header-btn {
  background: transparent;
  border: none;
  color: inherit;
  opacity: 0.6;
  cursor: pointer;
  padding: 2px 5px;
  font-size: 12px;
  line-height: 1;
  border-radius: 4px;
}
.chart-header-btn:hover {
  opacity: 1;
  background: rgba(255, 255, 255, 0.1);
}

/* ============================================================================
   Centralized overlay filter panel — shared by every screen with a left
   filter sidebar (MainDashboard, SlaDashboard, Transactions,
   TransactionsDevExtreme, FinanceHub, IntegrationMap, IntegrationCatalogue).
   Paired with initGtekFilterPanel() in site.js.

   Mirrors the nav-drawer-backdrop pattern in _Layout.cshtml/site.js:
   position:fixed panel + backdrop, both entirely out of page flow, so the
   page's own content wrapper needs ZERO push-related CSS (no margin-left,
   no .expanded/.collapsed pair) — there is nothing to push in the first
   place. CLOSED is the unconditional base state (no ".open" class needed),
   so the panel starts closed even if JS never runs.
   z-index 1050/1051 sit just above the nav drawer's 1044/1045, so the two
   can never visually collide if both happen to be open at once.
   ============================================================================ */
.gtek-filter-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
  z-index: 1050;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0.3s ease;
}
.gtek-filter-backdrop.visible {
  opacity: 1;
  visibility: visible;
}

.gtek-filter-panel {
  position: fixed;
  left: 0;
  top: 140px;
  bottom: 80px;
  width: 320px;
  z-index: 1051;
  background: linear-gradient(180deg, #0F172A 0%, #1E293B 50%, #0F172A 100%);
  padding: 24px;
  padding-bottom: 100px;
  overflow-y: auto;
  overflow-x: hidden;
  box-shadow: 4px 0 30px rgba(0, 0, 0, 0.5), inset -1px 0 0 rgba(46, 134, 193, 0.15);
  border-right: 2px solid rgba(46, 134, 193, 0.25);
  backdrop-filter: blur(10px);
  transform: translateX(-100%);
  transition: transform 0.3s ease;
}
.gtek-filter-panel.open {
  transform: translateX(0);
}

.gtek-filter-open-btn {
  position: fixed;
  left: 10px;
  top: 154px;
  z-index: 1001;
  width: 48px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--gtek-primary-blue);
  border: 1px solid var(--gtek-primary-blue);
  color: #fff;
  border-radius: 0.375rem;
  cursor: pointer;
  transition: all 0.3s ease;
}
.gtek-filter-open-btn:hover {
  background: var(--gtek-secondary-blue);
  border-color: var(--gtek-secondary-blue);
}
.gtek-filter-open-btn.is-hidden {
  display: none;
}

.gtek-filter-close-btn {
  background: var(--gtek-primary-blue);
  border: 1px solid var(--gtek-primary-blue);
  color: #fff;
  width: 36px;
  height: 36px;
  border-radius: 0.375rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s ease;
}
.gtek-filter-close-btn:hover {
  background: var(--gtek-secondary-blue);
  border-color: var(--gtek-secondary-blue);
}

/* .dashboard-layout / .filters-sidebar / .dashboard-content / .expand-sidebar-btn used to
   live here, shared by MainDashboard and FinanceHub. Both pages now define their own
   .dashboard-content locally (FinanceHub not yet migrated to .gtek-filter-panel — its own
   local rule is self-contained and does not depend on anything in this file), and the
   filter sidebar itself is the shared overlay panel (.gtek-filter-panel, above /
   initGtekFilterPanel() in site.js) — no push/collapse CSS needed here anymore. */

/* ============================================================
   Shared tab-bar template — the dark, underline-style look for
   Bootstrap nav-tabs. Used by Finance Hub, Data Management Hub and
   SLA Configuration; reuse this instead of styling nav-tabs locally
   whenever a new screen needs the same look.

   Usage:
     <div class="gtek-tabs">
       <ul class="nav nav-tabs gtek-tabs-scroll" role="tablist">
         <li class="nav-item" role="presentation">
           <button class="nav-link active" data-bs-toggle="tab" data-bs-target="#somePane" type="button" role="tab">
             <i class="fas fa-icon"></i>Tab label
           </button>
         </li>
         ...
       </ul>
     </div>

   .gtek-tabs-scroll on the <ul> makes the row scroll horizontally instead of
   wrapping onto a second line when the tabs don't fit — thin, barely-there
   scrollbar, no left/right arrow buttons (tried that, it read as clunky).
   ============================================================ */
.gtek-tabs {
  margin-bottom: 20px;
}
.gtek-tabs .nav-tabs {
  border-bottom: 2px solid rgba(46, 134, 193, 0.3);
}
.gtek-tabs .nav-link {
  color: rgba(255, 255, 255, 0.7);
  border: none;
  padding: 12px 24px;
  font-weight: 600;
  transition: all 0.3s ease;
  position: relative;
  background: transparent;
}
.gtek-tabs .nav-link:hover {
  color: #fff;
  background: rgba(46, 134, 193, 0.1);
}
.gtek-tabs .nav-link.active {
  color: #fff;
  background: transparent;
  border-bottom: 3px solid var(--gtek-primary-blue);
}
.gtek-tabs .nav-link i {
  margin-right: 8px;
}
.gtek-tabs-scroll {
  display: flex;
  flex-wrap: nowrap;
  overflow-x: auto;
  /* Scrolls, but the scrollbar itself is fully invisible — even the thin
     version sat right on top of the active tab's underline on narrow
     screens. Still scrolls fine via touch/trackpad/drag with nothing shown. */
  scrollbar-width: none;
  -ms-overflow-style: none;
}
.gtek-tabs-scroll::-webkit-scrollbar { display: none; }
.gtek-tabs-scroll .nav-item { flex-shrink: 0; }

/* ═══════════════════════════════════════════════════════════════════════════
   SHARED ENTERPRISE COMPONENTS — promoted from Finance Hub (Transactions V2, Phase 1)
   ═══════════════════════════════════════════════════════════════════════════
   These were local to Views/FinanceHub/Index.cshtml. They are patterns every Aqabal
   surface needs, so ONE definition lives here and Finance Hub, Transactions V2 and later
   Integration Map V2 share it instead of keeping three copies.

   MOVED VERBATIM — the declarations are byte-for-byte what Finance Hub had. Only the
   selectors changed: each gained a generic gtek- form, with the legacy Finance Hub
   selector kept alongside as a TRANSITIONAL ALIAS. That alias is what guarantees Finance
   Hub is visually unchanged without editing a line of its markup; drop it once Finance
   Hub adopts the gtek- names. New surfaces use the gtek- names only.

   Aliasing is done per SELECTOR, never per class token: `.coverage-fill.warn` is one
   compound selector, and rewriting the token alone would split it and apply the warn
   colour to every fill.

   Two principles travel with these, documented where they were written:
     - Bars are STRICTLY PROPORTIONAL. No minimum slice width: at 99.6/0.4 the second
       segment is about four pixels, and that IS what 0.43% looks like. Widening it makes
       the picture disagree with the number beside it.
     - The prop-bar family was written for a WHITE card body, not the dark page; its
       colours are the pre-computed contrast pairs. Check the surface before recolouring.
   ═══════════════════════════════════════════════════════════════════════════ */

/* ── KPI card ─────────────────────────────────────────────────────────────── */
.gtek-kpi-card,
.pain-card {
            background: linear-gradient(135deg, rgba(239, 68, 68, 0.15) 0%, rgba(220, 38, 38, 0.25) 100%);
            border: 1px solid rgba(239, 68, 68, 0.4);
            border-radius: 12px;
            padding: 20px;
            text-align: center;
            position: relative;
            overflow: hidden;
            transition: all 0.3s ease;
        }.gtek-kpi-card:hover,
.pain-card:hover {
            transform: translateY(-2px);
            box-shadow: 0 8px 25px rgba(239, 68, 68, 0.3);
        }.gtek-kpi-card::before,
.pain-card::before {
            content: '';
            position: absolute;
            left: 0;
            top: 0;
            width: 4px;
            height: 100%;
            background: linear-gradient(180deg, #EF4444 0%, #DC2626 100%);
        }.gtek-kpi-card.success,
.pain-card.success {
            background: linear-gradient(135deg, rgba(34, 197, 94, 0.15) 0%, rgba(22, 163, 74, 0.25) 100%);
            border-color: rgba(34, 197, 94, 0.4);
        }.gtek-kpi-card.success::before,
.pain-card.success::before {
            background: linear-gradient(180deg, #22C55E 0%, #16A34A 100%);
        }.gtek-kpi-card.success:hover,
.pain-card.success:hover {
            box-shadow: 0 8px 25px rgba(34, 197, 94, 0.3);
        }.gtek-kpi-card.purple,
.pain-card.purple {
            background: linear-gradient(135deg, rgba(139, 92, 246, 0.15) 0%, rgba(124, 58, 237, 0.25) 100%);
            border-color: rgba(139, 92, 246, 0.4);
        }.gtek-kpi-card.purple::before,
.pain-card.purple::before {
            background: linear-gradient(180deg, #8B5CF6 0%, #7C3AED 100%);
        }.gtek-kpi-card.purple:hover,
.pain-card.purple:hover {
            box-shadow: 0 8px 25px rgba(139, 92, 246, 0.3);
        }.gtek-kpi-value,
.pain-value {
            font-size: 36px;
            font-weight: 700;
            margin-bottom: 4px;
            line-height: 1;
        }.gtek-kpi-value.red,
.pain-value.red { color: #EF4444; }.gtek-kpi-value.green,
.pain-value.green { color: #22C55E; }.gtek-kpi-value.purple,
.pain-value.purple { color: #8B5CF6; }.gtek-kpi-label,
.pain-label {
            font-size: 11px;
            color: rgba(255, 255, 255, 0.7);
            font-weight: 600;
            text-transform: uppercase;
            letter-spacing: 0.5px;
        }.gtek-kpi-sublabel,
.pain-sublabel {
            font-size: 10px;
            color: rgba(255, 255, 255, 0.5);
            margin-top: 4px;
        }

/* ── Coverage meter ───────────────────────────────────────────────────────── */
.gtek-coverage-meters,
.coverage-meters { display: flex; gap: 28px; flex: 1 1 520px; flex-wrap: wrap; }.gtek-coverage-meter,
.coverage-meter { flex: 1 1 160px; min-width: 160px; }.gtek-coverage-meter-head,
.coverage-meter-head { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; }.gtek-coverage-meter-label,
.coverage-meter-label { color: #94A3B8; font-size: .78rem; letter-spacing: .02em; }.gtek-coverage-meter-value,
.coverage-meter-value { color: #F1F5F9; font-weight: 700; font-size: 1rem; }.gtek-coverage-track,
.coverage-track { height: 6px; border-radius: 3px; background: rgba(148,163,184,.22); margin-top: 6px; overflow: hidden; }.gtek-coverage-fill,
.coverage-fill { height: 100%; width: 0; border-radius: 3px; background: #3B82F6; transition: width .4s ease; }.gtek-coverage-fill.warn,
.coverage-fill.warn { background: #B45309; }.gtek-coverage-fill.good,
.coverage-fill.good { background: #15803D; }.gtek-coverage-meter-sub,
.coverage-meter-sub { color: #64748B; font-size: .72rem; margin-top: 4px; }
.gtek-coverage-gaps,
.coverage-gaps {
    display: inline-flex; align-items: center; gap: 8px; text-decoration: none;
    color: #FDBA74; background: rgba(249,115,22,.18);
    border: 1px solid rgba(249,115,22,.35); border-radius: 8px; padding: 8px 12px;
    font-size: .82rem; white-space: nowrap;
}
.gtek-coverage-gaps:hover,
.coverage-gaps:hover { color: #FFFFFF; background: rgba(249,115,22,.3); }

/* ── Proportional bar ─────────────────────────────────────────────────────── */
.gtek-prop-bar,
.prop-bar { display: flex; height: 14px; border-radius: 7px; overflow: hidden; background: #E2E8F0; }.gtek-prop-seg,
.prop-seg { height: 100%; }.gtek-prop-seg.realized,
.prop-seg.realized,
.gtek-prop-seg.attributed,
.prop-seg.attributed { background: #15803D; }.gtek-prop-seg.unrealized,
.prop-seg.unrealized { background: #B91C1C; }.gtek-prop-seg.unattributed,
.prop-seg.unattributed { background: #B45309; }.gtek-prop-legend,
.prop-legend { display: flex; gap: 18px; flex-wrap: wrap; margin-top: 10px; color: var(--gtek-neutral-strong); font-size: .8rem; }.gtek-prop-legend b,
.prop-legend b { color: var(--gtek-text-dark); font-weight: 600; margin-left: 4px; }.gtek-prop-legend .dot,
.prop-legend .dot { width: 9px; height: 9px; border-radius: 50%; display: inline-block; margin-right: 6px; }.gtek-prop-legend .dot.realized,
.prop-legend .dot.realized,
.gtek-prop-legend .dot.attributed,
.prop-legend .dot.attributed { background: #15803D; }.gtek-prop-legend .dot.unrealized,
.prop-legend .dot.unrealized { background: #B91C1C; }.gtek-prop-legend .dot.unattributed,
.prop-legend .dot.unattributed { background: #B45309; }.gtek-prop-note,
.prop-note { color: var(--gtek-neutral-strong); font-size: .76rem; margin-top: 8px; }


/* ── Chart card ───────────────────────────────────────────────────────────────
   The Aqabal analytical chart surface: an Aqabal-dark header over a WHITE plotting body.

   PROMOTED FROM FINANCE HUB, whose eight dxCharts are the visual benchmark. The
   declarations are what Views/FinanceHub/Index.cshtml already had; only the selectors are
   new.

   DELIBERATELY NOT ALIASED TO `.chart-card`. Every other component in this block carries
   its legacy selector alongside, but `.chart-card` is a generic name that several screens
   already use for surfaces that are NOT analytical charts — Transactions V2 alone applies
   it to twenty containers, among them the investigation drawer's Overview, Sequence,
   Timeline and Evidence panels and the observations table. A blanket alias would give all
   of those a white plotting body, which is a redesign nobody asked for. So this family is
   opt-in by name: a surface adopts it when it is genuinely a chart.

   THE WHITE BODY IS THE THEMING STRATEGY, not decoration. dx.light.css is loaded globally
   and on purpose, so a DevExtreme chart is light-themed; putting it on white is what makes
   its axes, labels and gridlines legible without a single .dx-chart override — and there
   is not one such override anywhere in this repo. It is also the surface the prop-bar
   colours above were computed against.

   `overflow-x: auto` on the body is the narrow-screen answer: a chart keeps a legible
   min-width and the card scrolls, rather than the labels being abbreviated to fit. */
.gtek-chart-card {
  background: linear-gradient(135deg, rgba(30, 41, 59, 0.8) 0%, rgba(15, 23, 42, 0.9) 100%);
  border: 1px solid rgba(46, 134, 193, 0.2);
  border-radius: 12px;
  overflow: hidden;
  margin-bottom: 20px;
  width: 100%;
  box-sizing: border-box;
}
.gtek-chart-card-header {
  background: linear-gradient(90deg, rgba(46, 134, 193, 0.2) 0%, transparent 100%);
  padding: 12px 16px;
  border-bottom: 1px solid rgba(46, 134, 193, 0.2);
  font-weight: 600;
  font-size: 14px;
  color: #fff;
  display: flex;
  align-items: center;
}
.gtek-chart-card-header i { margin-right: 8px; color: var(--gtek-primary-blue); }

/* margin-left:auto is what right-aligns the note against the title. */
.gtek-chart-scope-note {
  color: #94A3B8;
  font-size: .74rem;
  font-weight: 400;
  margin-left: auto;
  padding-left: 12px;
  text-align: right;
}

.gtek-chart-card-body {
  padding: 16px;
  background: #FFFFFF;
  overflow-x: auto;
  scrollbar-width: thin;
  scrollbar-color: rgba(46, 134, 193, 0.35) transparent;
}
.gtek-chart-card-body::-webkit-scrollbar { height: 6px; }
.gtek-chart-card-body::-webkit-scrollbar-track { background: transparent; }
.gtek-chart-card-body::-webkit-scrollbar-thumb {
  background: rgba(46, 134, 193, 0.35);
  border-radius: 3px;
}

/* ── KPI group ────────────────────────────────────────────────────────────────
   NEW, and shared from the outset. A titled group binding a headline rate to its coverage
   meter, so "a rate is never shown without its coverage" is structural rather than a
   convention each screen must remember. Transactions V2 uses it for Technical Reliability
   (Success Rate + Outcome Coverage) and SLA Performance (Compliance + Coverage). */
.gtek-kpi-group {
    background: linear-gradient(135deg, rgba(30, 41, 59, 0.8) 0%, rgba(15, 23, 42, 0.9) 100%);
    border: 1px solid rgba(46, 134, 193, 0.2);
    border-radius: 12px;
    padding: 16px 20px;
    display: flex;
    flex-direction: column;
    gap: 12px;
    height: 100%;
}
.gtek-kpi-group-title {
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: .5px;
    color: rgba(255, 255, 255, .7);
}
.gtek-kpi-group-body { display: flex; flex-direction: column; gap: 14px; }

/* ── Enterprise detail drawer ─────────────────────────────────────────────────
   A GENERIC right-side detail panel. Transactions V2 needs it now and Integration
   Map V2 is expected to want the same interaction, so it carries no product
   semantics whatsoever — no Transactions class names, no investigation vocabulary.
   Callers supply the content.

   LAYERING. Sits above the filter panel (1050/1051), which itself sits above the
   nav drawer (1044/1045). Both can legitimately be open at once, so the order is
   fixed rather than incidental. Scroll locking goes through the shared
   reference-counted helpers in site.js — never document.body.style.overflow
   directly, or closing one overlay would re-enable scrolling under another.

   WIDTH. Default 640px, resizable 480px..75vw, and the chosen width persists per
   user. 640 rather than something narrower because the panel is expected to carry
   a sequence diagram, not just a field list; sizing it for its emptiest content
   would be a decision to regret later. Below the 768px breakpoint — the same one
   the rest of site.css uses — it goes full width and the drag handle is hidden,
   because there is nothing to resize against. */
.gtek-drawer-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.55);
  z-index: 1060;
  opacity: 0;
  visibility: hidden;
  transition: opacity .2s ease, visibility .2s ease;
}
.gtek-drawer-backdrop.open { opacity: 1; visibility: visible; }

.gtek-drawer {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  width: 820px;
  max-width: 85vw;
  min-width: 560px;
  z-index: 1061;
  display: flex;
  flex-direction: column;
  background: linear-gradient(180deg, #0F172A 0%, #1E293B 50%, #0F172A 100%);
  border-left: 1px solid rgba(46, 134, 193, 0.3);
  box-shadow: -8px 0 32px rgba(0, 0, 0, 0.45);
  transform: translateX(100%);
  transition: transform .25s ease;
  overflow: hidden;
}
.gtek-drawer.open { transform: translateX(0); }

.gtek-drawer-header {
  flex: 0 0 auto;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  padding: 16px 20px;
  border-bottom: 1px solid rgba(46, 134, 193, 0.2);
  background: linear-gradient(90deg, rgba(46, 134, 193, 0.18) 0%, transparent 100%);
}
.gtek-drawer-title { font-size: 14px; font-weight: 600; color: #fff; margin: 0; }
.gtek-drawer-subtitle { font-size: 11px; color: rgba(255, 255, 255, .55); margin-top: 2px; }

.gtek-drawer-close {
  flex: 0 0 auto;
  background: transparent;
  border: 1px solid rgba(255, 255, 255, .2);
  color: rgba(255, 255, 255, .75);
  border-radius: 8px;
  width: 32px;
  height: 32px;
  line-height: 1;
  cursor: pointer;
}
.gtek-drawer-close:hover { color: #fff; border-color: rgba(255, 255, 255, .45); }
.gtek-drawer-close:focus-visible { outline: 2px solid var(--gtek-primary-blue); outline-offset: 2px; }

.gtek-drawer-body { flex: 1 1 auto; overflow-y: auto; padding: 16px 20px 28px; }

/* The drag handle is a real focusable control, not a decorative strip: resizing
   must not be mouse-only, and a keyboard user must be able to leave it again. */
.gtek-drawer-resize {
  position: absolute;
  top: 0;
  left: 0;
  bottom: 0;
  width: 6px;
  cursor: col-resize;
  background: transparent;
  border: 0;
  padding: 0;
}
.gtek-drawer-resize:hover,
.gtek-drawer-resize:focus-visible { background: rgba(46, 134, 193, .45); outline: none; }
.gtek-drawer.resizing { transition: none; user-select: none; }


/* Expanded viewing mode. A TEMPORARY state, deliberately not persisted: a user who expands one
   panel to read a wide table has not asked for every future drawer to open that way. The
   resized width still persists, so reopening returns to the width they chose. */
.gtek-drawer.expanded {
  width: min(1600px, 96vw);
  max-width: 96vw;
}

/* Inline width from a drag/keyboard resize must not fight the expanded state. */
.gtek-drawer.expanded[style*="width"] { width: min(1600px, 96vw) !important; }

.gtek-drawer.expanded .gtek-drawer-resize { display: none; }

/* Two glyphs (⇤⇥) in a 26px box: with the browser's default button padding they only fit if the
   button keeps its width. In a flex header without `flex: 0 0 auto` a long title/subtitle (System
   Registry's "New system" drawer) shrank it and the icon spilled outside the border (QA, Alex
   Matzar, 12-oct-2026). No shrink, no padding, glyphs centered and never wrapped. */
.gtek-drawer-expand {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  white-space: nowrap;
  background: none;
  border: 1px solid rgba(255, 255, 255, .25);
  color: rgba(255, 255, 255, .7);
  border-radius: 4px;
  width: 26px;
  height: 26px;
  cursor: pointer;
  font-size: 11px;
  line-height: 1;
  margin-right: 6px;
}
.gtek-drawer-expand:hover { color: #fff; border-color: rgba(255, 255, 255, .45); }
.gtek-drawer-expand:focus-visible { outline: 2px solid var(--gtek-primary-blue); outline-offset: 2px; }

/* THE TITLE IS A HEADING, NOT AN INPUT.
   The drawer moves focus here on open so screen readers announce the panel. The browser's default
   ring on a tabindex="-1" heading reads as an editable box, so it is suppressed for programmatic
   focus only — :focus-visible still fires for keyboard users, who keep a clear indicator. */
.gtek-drawer-title:focus { outline: none; }
.gtek-drawer-title:focus-visible {
  outline: 2px solid var(--gtek-primary-blue);
  outline-offset: 3px;
  border-radius: 3px;
}

/* Panel navigation. Not position:sticky — the drawer is a flex column and the body is the only
   scroll container, so a non-growing sibling above it simply never moves. */
.gtek-drawer-tabs {
  display: flex;
  gap: 2px;
  padding: 0 16px;
  border-bottom: 1px solid rgba(148, 163, 184, .2);
  background: rgba(15, 23, 42, .96);
  flex: 0 0 auto;
}
.gtek-drawer-tab {
  background: none;
  border: none;
  border-bottom: 2px solid transparent;
  color: #94A3B8;
  font-size: 12.5px;
  font-weight: 600;
  padding: 10px 14px;
  cursor: pointer;
}
.gtek-drawer-tab:hover { color: #E2E8F0; }
.gtek-drawer-tab[aria-selected="true"] { color: #fff; border-bottom-color: var(--gtek-primary-blue); }
.gtek-drawer-tab:focus-visible { outline: 2px solid var(--gtek-primary-blue); outline-offset: -2px; }

@media (max-width: 768px) {
  .gtek-drawer { width: 100%; min-width: 0; max-width: 100%; }
  .gtek-drawer-resize { display: none; }
  .gtek-drawer-expand { display: none; }   /* already full width */
}
