:root {
  --bg-main: #f8fafc;
  --bg-card: #ffffff;
  --bg-card-hover: #f1f5f9;
  --bg-input: #ffffff;
  --border: #e2e8f0;
  --border-focus: #2563A6;
  --text-main: #0f172a;
  --text-muted: #64748b;
  --text-dim: #94a3b8;
  --primary: #2563A6;
  --primary-hover: #1d4e82;
  --primary-glow: rgba(37, 99, 166, 0.18);
  --brand-gold: #FFB502;
  --brand-gold-glow: rgba(255, 181, 2, 0.4);
  --accent: #FFB502;
  --success: #10b981;
  --warning: #f59e0b;
  --danger: #ef4444;
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-xl: 20px;
  --font-family: 'Roboto', 'Inter', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --shadow-card: 0 2px 8px -2px rgba(0, 0, 0, 0.06), 0 1px 3px rgba(0, 0, 0, 0.04);
  --shadow-modal: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: var(--font-family);
  background-color: var(--bg-main);
  color: var(--text-main);
  min-height: 100vh;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

/* Glass & Card styles */
.glass {
  background: var(--bg-card);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-card);
}

/* Auth Container con Cuadrícula Fiel a la Maqueta */
.auth-wrapper {
  display: flex;
  min-height: 100vh;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background-color: #0b1324;
  background-image: 
    radial-gradient(circle 500px at 50% 25%, rgba(37, 99, 166, 0.18), transparent 75%),
    linear-gradient(to right, rgba(70, 110, 170, 0.09) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(70, 110, 170, 0.09) 1px, transparent 1px);
  background-size: 100% 100%, 36px 36px, 36px 36px;
  background-position: center top, center center, center center;
}

/* Split Auth Card (Cabecera oscura + Cuerpo blanco) */
.split-auth-card {
  width: 100%;
  max-width: 440px;
  border-radius: 20px;
  overflow: hidden;
  box-shadow: 0 30px 60px -15px rgba(0, 0, 0, 0.75), 0 0 1px 1px rgba(255, 255, 255, 0.05);
  animation: fadeIn 0.35s ease-out;
}

/* Top Section (Dark Navy) */
.auth-card-top {
  background: #121c2e;
  padding: 34px 24px 26px 24px;
  text-align: center;
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
}

.auth-logo-box {
  margin-bottom: 12px;
}

.top-brand-logo {
  width: 60px;
  height: 60px;
  display: inline-block;
  filter: drop-shadow(0 0 14px rgba(253, 176, 0, 0.45));
}

.top-brand-title {
  color: #ffffff;
  font-size: 1.22rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  margin: 0;
  text-transform: uppercase;
}

.top-brand-sub {
  color: #FDB000;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  margin-top: 5px;
}

/* Bottom Section (Pure White) */
.auth-card-body {
  background: #ffffff;
  padding: 34px 30px 26px 30px;
  color: #1e293b;
}

.auth-body-header {
  text-align: center;
  margin-bottom: 24px;
}

.body-title {
  font-size: 1.45rem;
  font-weight: 800;
  color: #0f172a;
  margin: 0 0 6px 0;
}

.body-subtitle {
  font-size: 0.84rem;
  color: #64748b;
  margin: 0;
}

/* Form Fields */
.field-label {
  display: block;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  color: #475569;
  margin-bottom: 7px;
  text-transform: uppercase;
}

.input-with-icon {
  position: relative;
  display: flex;
  align-items: center;
  width: 100%;
}

.input-icon {
  position: absolute;
  left: 14px;
  color: #64748b;
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: none;
  user-select: none;
  z-index: 2;
}

.input-icon svg,
.input-svg-icon {
  width: 18px;
  height: 18px;
  stroke: #64748b;
  display: block;
}

.custom-input,
.form-group .input-with-icon input,
.input-with-icon .custom-input {
  width: 100% !important;
  padding: 12px 42px 12px 44px !important;
  border: 1.5px solid #e2e8f0 !important;
  border-radius: 9px !important;
  font-size: 0.92rem !important;
  color: #0f172a !important;
  background: #ffffff !important;
  transition: all 0.2s ease !important;
  font-family: inherit !important;
  box-sizing: border-box !important;
  height: 46px !important;
}

.custom-input:focus,
.form-group .input-with-icon input:focus,
.input-with-icon .custom-input:focus {
  outline: none !important;
  border-color: #0f172a !important;
  box-shadow: 0 0 0 3px rgba(15, 23, 42, 0.12) !important;
}

.eye-toggle {
  position: absolute;
  right: 12px;
  background: none;
  border: none;
  color: #64748b;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  padding: 6px;
  border-radius: 6px;
  z-index: 2;
  transition: all 0.15s ease;
}

.eye-toggle:hover {
  color: #0f172a;
  background: #f1f5f9;
}

.eye-toggle svg {
  width: 18px;
  height: 18px;
  stroke: currentColor;
}

/* Submit Button */
.btn-login-dark {
  width: 100%;
  padding: 13px;
  background: #142034;
  color: #ffffff;
  border: none;
  border-radius: 9px;
  font-size: 0.95rem;
  font-weight: 700;
  cursor: pointer;
  margin-top: 10px;
  transition: background 0.2s, transform 0.1s;
}

.btn-login-dark:hover {
  background: #0d1624;
  transform: translateY(-1px);
}

.quick-credentials {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-top: 18px;
  font-size: 0.78rem;
  color: #64748b;
}

.quick-link-btn {
  background: none;
  border: none;
  color: #2563A6;
  font-weight: 600;
  cursor: pointer;
  text-decoration: underline;
  font-size: 0.78rem;
  padding: 0;
}

.card-footer-notice {
  margin-top: 26px;
  text-align: center;
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  color: #94a3b8;
  text-transform: uppercase;
}

.btn-back-link {
  width: 100%;
  margin-top: 10px;
  padding: 10px;
  background: #f1f5f9;
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  color: #475569;
  font-weight: 600;
  font-size: 0.85rem;
  cursor: pointer;
}

.auth-brand h1 {
  font-size: 1.6rem;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.auth-brand p {
  color: var(--text-muted);
  font-size: 0.9rem;
  margin-top: 4px;
}

/* Forms & Inputs */
.form-group {
  margin-bottom: 14px;
}

.form-group label,
.form-label {
  display: block;
  font-size: 0.78rem;
  font-weight: 600;
  margin-bottom: 5px;
  color: #334155;
}

.form-group input,
.form-group select,
.form-group textarea,
.form-control {
  width: 100%;
  padding: 8px 12px;
  background-color: #ffffff;
  border: 1px solid #cbd5e1;
  border-radius: 6px;
  color: #0f172a;
  font-size: 0.88rem;
  font-family: inherit;
  transition: all 0.18s ease;
  box-sizing: border-box;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus,
.form-control:focus {
  outline: none;
  border-color: #0284c7;
  box-shadow: 0 0 0 3px rgba(2, 132, 199, 0.15);
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 20px;
  border-radius: var(--radius-sm);
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  border: none;
  transition: all 0.2s ease;
}

.btn-primary {
  background: linear-gradient(135deg, var(--primary), #1d4ed8);
  color: white;
  box-shadow: 0 4px 12px var(--primary-glow);
}

.btn-primary:hover {
  background: linear-gradient(135deg, #1d4ed8, #1e40af);
  transform: translateY(-1px);
}

.btn-secondary {
  background: #ffffff;
  color: #1e293b;
  border: 1px solid #cbd5e1;
}

.btn-secondary:hover {
  background: #f1f5f9;
  border-color: #94a3b8;
  color: #0f172a;
}

.btn-danger {
  background: var(--danger);
  color: white;
}

.btn-sm {
  padding: 6px 12px;
  font-size: 0.85rem;
  border-radius: var(--radius-sm);
}

.btn-block {
  width: 100%;
}

/* Dashboard Layout (Solo Parte Superior Oscura, Contenido Claro) */
.app-container {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  background-color: #f8fafc;
  color: #0f172a;
}
/* ========================================================
   MODERN ENTERPRISE LAYOUT CON SIDEBAR LATERAL RETRÁCTIL
   ======================================================== */

.app-layout {
  display: flex;
  min-height: 100vh;
  width: 100%;
  background: #f8fafc;
}

/* Backdrop oscurecido para móvil */
.sidebar-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.65);
  backdrop-filter: blur(4px);
  z-index: 1999;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease;
}

.sidebar-backdrop.active {
  opacity: 1;
  pointer-events: auto;
}

/* Sidebar Lateral */
.app-sidebar {
  width: 260px;
  background: #0b1324;
  color: #ffffff;
  display: flex;
  flex-direction: column;
  position: sticky;
  top: 0;
  height: 100vh;
  flex-shrink: 0;
  transition: width 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  border-right: 1px solid #1e293b;
  z-index: 1000;
  overflow-y: auto;
  overflow-x: hidden;
  box-shadow: 2px 0 12px rgba(0, 0, 0, 0.15);
}

.app-sidebar.collapsed {
  width: 72px;
}

/* Header del Sidebar */
.sidebar-header {
  padding: 14px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid #1e293b;
  min-height: 64px;
}

.sidebar-logo-box {
  display: flex;
  align-items: center;
  gap: 12px;
  overflow: hidden;
  white-space: nowrap;
}

.logo-icon-svg {
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  filter: drop-shadow(0 0 6px rgba(253, 176, 0, 0.4));
  flex-shrink: 0;
}

.header-logo-img {
  width: 100%;
  height: 100%;
  display: block;
}

.sidebar-brand-text {
  transition: opacity 0.2s ease, width 0.2s ease;
  overflow: hidden;
}

.app-sidebar.collapsed .sidebar-brand-text {
  opacity: 0;
  width: 0;
  pointer-events: none;
}

.logo-title {
  font-weight: 800;
  font-size: 0.98rem;
  line-height: 1.2;
  color: #ffffff;
  letter-spacing: 0.02em;
}

.logo-sub {
  font-size: 0.68rem;
  color: #FDB000;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.sidebar-toggle-btn {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: #94a3b8;
  width: 28px;
  height: 28px;
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 0.72rem;
  transition: all 0.15s ease;
  flex-shrink: 0;
}

.sidebar-toggle-btn:hover {
  background: rgba(255, 255, 255, 0.16);
  color: #ffffff;
  border-color: rgba(255, 255, 255, 0.25);
}

/* Menú de Navegación */
.sidebar-menu {
  flex: 1;
  padding: 16px 10px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.sidebar-section-title {
  font-size: 0.68rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #64748b;
  padding: 8px 12px 4px;
  white-space: nowrap;
  transition: opacity 0.2s ease;
}

.app-sidebar.collapsed .sidebar-section-title {
  opacity: 0;
  height: 0;
  padding: 0;
  margin: 0;
  overflow: hidden;
}

.nav-sidebar-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 11px 14px;
  border-radius: 8px;
  color: #94a3b8;
  background: transparent;
  border: none;
  width: 100%;
  text-align: left;
  font-size: 0.88rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s ease;
  white-space: nowrap;
  outline: none;
}

.nav-sidebar-item:hover {
  color: #f8fafc;
  background: rgba(255, 255, 255, 0.05);
}

.nav-sidebar-item:hover .sidebar-svg-icon {
  color: #f8fafc;
  transform: translateX(2px) scale(1.05);
}

.nav-sidebar-item.active {
  color: #ffffff;
  background: rgba(253, 176, 0, 0.09);
  box-shadow: inset 3px 0 0 #FDB000;
  font-weight: 700;
}

.nav-sidebar-item.active .sidebar-svg-icon {
  color: #FDB000;
  stroke: #FDB000;
  stroke-width: 2.1;
  filter: drop-shadow(0 0 6px rgba(253, 176, 0, 0.35));
}

.sidebar-item-icon {
  width: 24px;
  height: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.sidebar-svg-icon {
  width: 18px;
  height: 18px;
  color: #94a3b8;
  stroke: currentColor;
  stroke-width: 1.8;
  display: block;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.topbar-module-icon-wrap {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-right: 6px;
  vertical-align: middle;
}

.topbar-svg-icon {
  width: 18px;
  height: 18px;
  color: #FDB000;
  stroke: #FDB000;
  stroke-width: 1.9;
  display: block;
}

.sidebar-item-label {
  transition: opacity 0.2s ease;
}

.app-sidebar.collapsed .sidebar-item-label {
  opacity: 0;
  width: 0;
  display: none;
}

/* Footer del Sidebar */
.sidebar-footer {
  padding: 14px;
  border-top: 1px solid #1e293b;
  background: #090f1d;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.sidebar-user-card {
  display: flex;
  align-items: center;
  gap: 10px;
  overflow: hidden;
}

.user-avatar-circle {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: #1e293b;
  border: 1.5px solid #FDB000;
  color: #ffffff;
  font-weight: 700;
  font-size: 0.82rem;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  flex-shrink: 0;
}

.status-indicator {
  position: absolute;
  bottom: 0;
  right: 0;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--success);
  border: 2px solid #090f1d;
  box-shadow: 0 0 6px var(--success);
}

.sidebar-user-info {
  overflow: hidden;
  white-space: nowrap;
  transition: opacity 0.2s ease;
}

.app-sidebar.collapsed .sidebar-user-info {
  opacity: 0;
  width: 0;
  display: none;
}

.sidebar-user-name {
  font-size: 0.82rem;
  font-weight: 700;
  color: #ffffff;
  overflow: hidden;
  text-overflow: ellipsis;
}

.sidebar-user-role {
  font-size: 0.7rem;
  color: #94a3b8;
}

.sidebar-footer-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
}

.app-sidebar.collapsed .sidebar-footer-actions {
  flex-direction: column;
}

.btn-sidebar-logout {
  background: rgba(239, 68, 68, 0.12);
  border: 1px solid rgba(239, 68, 68, 0.25);
  color: #fca5a5;
  border-radius: 6px;
  padding: 6px 10px;
  font-size: 0.75rem;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 6px;
  transition: all 0.15s ease;
}

.btn-sidebar-logout:hover {
  background: rgba(239, 68, 68, 0.25);
  color: #ffffff;
}

.app-sidebar.collapsed .sidebar-logout-text {
  display: none;
}

/* Área Principal de Contenido (Derecha) */
.app-main-layout {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-width: 0;
  background: #f8fafc;
}

.app-topbar {
  background: #ffffff;
  border-bottom: 1px solid #e2e8f0;
  padding: 10px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: sticky;
  top: 0;
  z-index: 100;
  min-height: 56px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
}

.topbar-left {
  display: flex;
  align-items: center;
  gap: 12px;
}

.topbar-menu-toggle {
  display: none;
  background: #f1f5f9;
  border: 1px solid #cbd5e1;
  border-radius: 6px;
  padding: 6px 10px;
  font-size: 1rem;
  cursor: pointer;
  color: #334155;
}

.topbar-breadcrumb {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.98rem;
  font-weight: 700;
  color: #0f172a;
}

.topbar-right {
  display: flex;
  align-items: center;
  gap: 14px;
}

.tenant-selector-wrap {
  display: flex;
  align-items: center;
  gap: 8px;
}

.tenant-label {
  font-size: 0.78rem;
  font-weight: 600;
  color: #64748b;
}

.tenant-selector-wrap select {
  background: #f8fafc;
  border: 1px solid #cbd5e1;
  color: #0f172a;
  border-radius: 6px;
  padding: 6px 12px;
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  outline: none;
  transition: border-color 0.15s ease;
}

.tenant-selector-wrap select:focus {
  border-color: #2563A6;
}

/* Área de Contenido */
.app-content {
  flex: 1;
  padding: 24px 28px 36px;
  max-width: 1440px;
  margin: 0 auto;
  width: 100%;
  color: #0f172a;
}

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

/* ========================================================
   INSPIRED ENTERPRISE TI DASHBOARD (Clean, Modern, Pro)
   ======================================================== */

/* 1. KPI Top Metrics Grid */
.kpi-metrics-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  margin-bottom: 20px;
}

.kpi-card {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: var(--radius-md);
  padding: 18px 20px;
  box-shadow: 0 2px 8px -2px rgba(15, 23, 42, 0.05);
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.kpi-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 16px -2px rgba(15, 23, 42, 0.08);
}

.kpi-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 8px;
}

.kpi-card-title {
  font-size: 0.72rem;
  font-weight: 700;
  color: #64748b;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.app-svg-icon {
  display: inline-block;
  vertical-align: middle;
  flex-shrink: 0;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
  fill: none;
  transition: transform 0.15s ease, stroke 0.15s ease;
}

.kpi-card-icon {
  width: 34px;
  height: 34px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  color: #475569;
  transition: all 0.2s ease;
}

.kpi-card-icon svg {
  width: 18px;
  height: 18px;
  stroke-width: 1.9;
}

.kpi-card-icon.blue {
  background: rgba(2, 132, 199, 0.09);
  border: 1px solid rgba(2, 132, 199, 0.22);
  color: #0284c7;
}

.kpi-card-icon.green {
  background: rgba(16, 185, 129, 0.09);
  border: 1px solid rgba(16, 185, 129, 0.22);
  color: #10b981;
}

.kpi-card-icon.amber {
  background: rgba(253, 176, 0, 0.12);
  border: 1px solid rgba(253, 176, 0, 0.3);
  color: #d97706;
}

.kpi-card-icon.purple {
  background: rgba(124, 58, 237, 0.09);
  border: 1px solid rgba(124, 58, 237, 0.22);
  color: #7c3aed;
}

.kpi-card:hover .kpi-card-icon {
  transform: scale(1.05);
}

.kpi-card-value {
  font-size: 1.9rem;
  font-weight: 800;
  color: #0f172a;
  line-height: 1.1;
  margin-bottom: 8px;
}

.text-green, .text-cyan, .text-amber {
  color: #0f172a !important;
}

.kpi-card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.74rem;
  color: #64748b;
}

.kpi-pill {
  font-weight: 600;
  color: #475569;
  background: #f1f5f9;
  padding: 2px 7px;
  border-radius: 4px;
}

.kpi-pill.green,
.kpi-pill.amber {
  color: #334155;
  background: #f1f5f9;
}

.kpi-trend {
  font-weight: 500;
}

/* 2. Main Split Grid (Map + Analytics) */
.dashboard-split-grid {
  display: grid;
  grid-template-columns: 2.1fr 1fr;
  gap: 18px;
  margin-bottom: 22px;
}

.dashboard-card {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: var(--radius-md);
  box-shadow: 0 4px 16px -2px rgba(15, 23, 42, 0.05);
  overflow: hidden;
  position: relative;
  z-index: 1;
}

.dashboard-card-header {
  padding: 16px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid #f1f5f9;
  background: #ffffff;
}

.map-title-row {
  display: flex;
  align-items: center;
  gap: 8px;
}

.brand-blue-icon {
  font-size: 1.15rem;
}

.main-card-title {
  font-size: 1rem;
  font-weight: 700;
  color: #0f172a;
  margin: 0;
}

.main-card-sub {
  font-size: 0.78rem;
  color: #64748b;
  margin: 2px 0 0 28px;
}

.map-actions-box {
  display: flex;
  align-items: center;
  gap: 8px;
}

.badge-national-sedes {
  background: #142034;
  color: #ffffff;
  font-size: 0.75rem;
  font-weight: 700;
  padding: 5px 12px;
  border-radius: 20px;
  letter-spacing: 0.02em;
}

.btn-centrar-colombia {
  background: #ffffff;
  border: 1px solid #cbd5e1;
  color: #334155;
  font-size: 0.75rem;
  font-weight: 600;
  padding: 5px 12px;
  border-radius: 20px;
  cursor: pointer;
  transition: all 0.15s ease;
  white-space: nowrap;
}

.btn-centrar-colombia:hover {
  background: #f1f5f9;
  color: #0f172a;
  border-color: #94a3b8;
}

.theme-switch-compact {
  display: inline-flex;
  background: #f1f5f9;
  padding: 2px;
  border-radius: 20px;
  border: 1px solid #e2e8f0;
}

.btn-mini-theme {
  background: transparent;
  border: none;
  color: #64748b;
  font-size: 0.72rem;
  font-weight: 600;
  padding: 3px 9px;
  border-radius: 14px;
  cursor: pointer;
  transition: all 0.15s ease;
}

.btn-mini-theme.active {
  background: #ffffff;
  color: #0f172a;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.12);
  font-weight: 700;
}

.leaflet-container {
  z-index: 1 !important;
}

.mapa-container-inspired {
  height: 440px;
  width: 100%;
  background: #f8fafc;
  position: relative;
  z-index: 1;
  overflow: hidden;
}

#mapa-sedes {
  height: 100%;
  width: 100%;
  position: relative;
  z-index: 1;
}

/* Right Column */
.dashboard-side-col {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.side-card-top, .side-card-bottom {
  padding: 16px 18px;
}

.side-card-bottom {
  flex: 1;
  display: flex;
  flex-direction: column;
}

.side-card-title-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
}

.side-title-left {
  display: flex;
  align-items: center;
  gap: 6px;
}

.side-title-text {
  font-size: 0.88rem;
  font-weight: 700;
  color: #0f172a;
}

.hardware-pill {
  font-size: 0.68rem;
  font-weight: 600;
  background: #f1f5f9;
  color: #475569;
  padding: 2px 8px;
  border-radius: 4px;
  border: 1px solid #e2e8f0;
}

.donut-chart-box {
  display: flex;
  align-items: center;
  gap: 16px;
}

.donut-svg-wrap {
  flex-shrink: 0;
}

.donut-legend-box {
  display: flex;
  flex-direction: column;
  gap: 7px;
}

.legend-row {
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: 0.74rem;
  color: #334155;
  font-weight: 500;
}

.legend-square {
  width: 10px;
  height: 10px;
  border-radius: 2px;
  flex-shrink: 0;
}

/* Puntos de operación list */
.puntos-operacion-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  flex: 1;
}

.punto-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 12px;
  background: #f8fafc;
  border: 1px solid #f1f5f9;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.15s ease;
}

.punto-item:hover {
  background: #f1f5f9;
  border-color: #cbd5e1;
  transform: translateX(3px);
}

.punto-left {
  display: flex;
  align-items: center;
  gap: 8px;
}

.punto-icon {
  font-size: 0.95rem;
}

.punto-name {
  font-size: 0.8rem;
  font-weight: 600;
  color: #1e293b;
}

.punto-badge {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  color: #2563eb;
  font-size: 0.76rem;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 12px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

/* 3. Filiales Bottom Section */
.filiales-card-wrap {
  padding: 20px 22px;
  margin-bottom: 24px;
}

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

.filiales-title {
  font-size: 0.95rem;
  font-weight: 700;
  color: #0f172a;
}

.filiales-sub {
  font-size: 0.78rem;
  color: #64748b;
}

.filiales-cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 14px;
}

/* Inspired Halo Marker Badge */
.ref-marker-wrap {
  position: relative;
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: transform 0.2s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.ref-marker-wrap:hover {
  transform: scale(1.25);
  z-index: 1000 !important;
}

.ref-marker-halo {
  position: absolute;
  inset: -3px;
  border-radius: 50%;
  background: rgba(15, 23, 42, 0.1);
  animation: haloPulse 2.6s infinite ease-in-out;
}

@keyframes haloPulse {
  0% { transform: scale(0.95); opacity: 0.5; }
  50% { transform: scale(1.2); opacity: 0.8; }
  100% { transform: scale(0.95); opacity: 0.5; }
}

.ref-marker-body {
  position: relative;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: #0f172a;
  border: 2px solid #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 3px 10px rgba(15, 23, 42, 0.25);
  color: #ffffff;
  font-size: 15px;
}

.ref-marker-body.hotel {
  background: #1e293b;
  border: 2px solid #ffffff;
  box-shadow: 0 3px 10px rgba(15, 23, 42, 0.25);
}

/* Custom Executive MarkerCluster */
.marker-cluster-custom {
  background: #0f172a;
  border: 2px solid #ffffff;
  border-radius: 50%;
  color: #ffffff;
  font-weight: 700;
  font-size: 0.82rem;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 12px rgba(15, 23, 42, 0.25);
  transition: transform 0.2s cubic-bezier(0.34, 1.56, 0.64, 1);
  cursor: pointer;
}

.marker-cluster-custom:hover {
  transform: scale(1.15);
  box-shadow: 0 6px 16px rgba(15, 23, 42, 0.35);
}

/* Modern Vector Pin Markers */
.pro-leaflet-icon {
  background: transparent !important;
  border: none !important;
}

.pro-pin-marker {
  cursor: pointer;
  transition: transform 0.2s cubic-bezier(0.34, 1.56, 0.64, 1);
  display: flex;
  align-items: center;
  justify-content: center;
}

.pro-pin-marker:hover {
  transform: translateY(-5px) scale(1.2);
  z-index: 1000 !important;
}

.leaflet-control-zoom {
  border: none !important;
  box-shadow: 0 4px 14px rgba(15, 23, 42, 0.12) !important;
  border-radius: 10px !important;
  overflow: hidden;
  margin-top: 60px !important;
}

.leaflet-control-zoom a {
  background: #ffffff !important;
  color: #1e293b !important;
  border-color: #f1f5f9 !important;
  width: 32px !important;
  height: 32px !important;
  line-height: 32px !important;
  font-size: 15px !important;
}

.leaflet-control-zoom a:hover {
  background: #f8fafc !important;
  color: #0f172a !important;
}

.leaflet-tooltip.sede-tooltip {
  background: #273142 !important;
  backdrop-filter: blur(10px) !important;
  -webkit-backdrop-filter: blur(10px) !important;
  color: #ffffff !important;
  border: 1px solid rgba(255, 255, 255, 0.14) !important;
  border-radius: 8px !important;
  padding: 8px 12px !important;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.45) !important;
  pointer-events: none !important;
}

.leaflet-tooltip-top.sede-tooltip:before {
  border-top-color: #273142 !important;
}

.sede-tooltip-card {
  display: flex;
  align-items: center;
  gap: 10px;
}

.sede-tooltip-card.no-photo {
  display: block;
  text-align: left;
}

.sede-tooltip-img-wrap {
  width: 58px;
  height: 44px;
  border-radius: 6px;
  overflow: hidden;
  flex-shrink: 0;
  border: 1px solid rgba(255, 255, 255, 0.2);
  background: #0f172a;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.35);
}

.sede-tooltip-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.sede-tooltip-content {
  display: flex;
  flex-direction: column;
  justify-content: center;
  line-height: 1.25;
}

.sede-tooltip-title {
  font-size: 0.82rem;
  font-weight: 700;
  color: #ffffff;
  letter-spacing: 0.3px;
  text-transform: uppercase;
  white-space: nowrap;
}

.sede-tooltip-city {
  font-size: 0.71rem;
  color: #94a3b8;
  font-weight: 600;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  margin-top: 2px;
  white-space: nowrap;
}

/* Enterprise Client Cards */
.client-card-pro {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: var(--radius-md);
  padding: 22px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  box-shadow: 0 4px 16px -2px rgba(15, 23, 42, 0.05);
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  position: relative;
}

.client-card-pro:hover {
  transform: translateY(-3px);
  box-shadow: 0 12px 24px -6px rgba(15, 23, 42, 0.1);
  border-color: #cbd5e1;
}

.client-card-header {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  margin-bottom: 14px;
}

.client-avatar {
  width: 44px;
  height: 44px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 0.95rem;
  letter-spacing: -0.02em;
  color: #ffffff;
  flex-shrink: 0;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.12);
}

.client-avatar.lemco {
  background: linear-gradient(135deg, #1e3a8a 0%, #2563eb 100%);
}

.client-avatar.opera {
  background: linear-gradient(135deg, #78350f 0%, #d97706 100%);
}

.client-avatar.key33 {
  background: linear-gradient(135deg, #065f46 0%, #059669 100%);
}

.client-avatar.default {
  background: linear-gradient(135deg, #142034 0%, #334155 100%);
}

.client-header-info {
  flex: 1;
}

.client-name-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.client-name-title {
  font-size: 1.05rem;
  font-weight: 700;
  color: #0f172a;
}

.client-nit-badge {
  font-size: 0.72rem;
  font-weight: 600;
  background: #f1f5f9;
  color: #475569;
  padding: 2px 8px;
  border-radius: 6px;
  border: 1px solid #e2e8f0;
}

.client-status-dot {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 0.72rem;
  color: #059669;
  font-weight: 600;
  margin-top: 3px;
}

.client-status-dot:before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #10b981;
}

.client-stats-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  background: #f8fafc;
  border: 1px solid #f1f5f9;
  border-radius: 8px;
  padding: 10px 12px;
  margin-bottom: 16px;
}

.stat-item {
  display: flex;
  flex-direction: column;
}

.stat-item-label {
  font-size: 0.68rem;
  color: #64748b;
  text-transform: uppercase;
  font-weight: 600;
  letter-spacing: 0.04em;
}

.stat-item-value {
  font-size: 0.95rem;
  font-weight: 700;
  color: #0f172a;
  margin-top: 2px;
}

.client-location-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.78rem;
  color: #64748b;
  margin-bottom: 16px;
  padding: 0 2px;
}

.client-actions-row {
  display: flex;
  gap: 8px;
}

.btn-card-primary {
  flex: 1;
  padding: 8px 12px;
  background: #142034;
  color: #ffffff;
  border: none;
  border-radius: 7px;
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
}

.btn-card-primary:hover {
  background: #0f172a;
  transform: translateY(-1px);
}

.btn-card-map {
  padding: 8px 12px;
  background: #f8fafc;
  color: #334155;
  border: 1px solid #cbd5e1;
  border-radius: 7px;
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s ease;
  display: flex;
  align-items: center;
  gap: 4px;
}

.btn-card-map:hover {
  background: #f1f5f9;
  color: #0f172a;
  border-color: #94a3b8;
}

/* ========================================================
   DIRECTORIO CLIENTES - LISTADO CORPORATIVO (LIST VIEW)
   ======================================================== */
.clientes-list-container {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 14px;
}

.client-list-item {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  padding: 14px 18px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.04);
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  cursor: pointer;
}

.client-list-item:hover {
  border-color: #cbd5e1;
  box-shadow: 0 6px 18px -3px rgba(15, 23, 42, 0.09);
  transform: translateY(-1px);
}

.client-avatar.rancho {
  background: linear-gradient(135deg, #0f172a 0%, #1e293b 100%);
  border: 1px solid rgba(253, 176, 0, 0.4);
  color: #FDB000;
}

.cli-col-identity {
  display: flex;
  align-items: center;
  gap: 14px;
  flex: 1.4;
  min-width: 250px;
}

.cli-info-block {
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.cli-name-wrap {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.cli-name-title {
  font-size: 0.96rem;
  font-weight: 700;
  color: #0f172a;
  letter-spacing: -0.01em;
}

.cli-nit-badge {
  font-size: 0.72rem;
  font-weight: 600;
  background: #f1f5f9;
  color: #475569;
  padding: 2px 8px;
  border-radius: 6px;
  border: 1px solid #e2e8f0;
  font-family: monospace;
}

.cli-status-row {
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: 0.75rem;
  color: #64748b;
  flex-wrap: wrap;
}

.cli-status-indicator {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #10b981;
  box-shadow: 0 0 0 2px rgba(16, 185, 129, 0.2);
}

.cli-status-text {
  color: #059669;
  font-weight: 600;
}

.cli-divider {
  color: #cbd5e1;
  font-size: 0.7rem;
}

.cli-meta-item {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  color: #64748b;
}

.cli-svg-mini {
  width: 13px;
  height: 13px;
  stroke: #64748b;
  flex-shrink: 0;
}

.cli-col-metrics {
  display: flex;
  align-items: center;
  gap: 8px;
  flex: 1;
  justify-content: center;
}

.cli-metric-chip {
  display: flex;
  align-items: center;
  gap: 6px;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 7px;
  padding: 5px 11px;
  font-size: 0.77rem;
}

.cli-chip-icon {
  width: 14px;
  height: 14px;
  stroke: #64748b;
  flex-shrink: 0;
}

.cli-chip-num {
  font-weight: 700;
  color: #0f172a;
}

.cli-chip-label {
  color: #64748b;
  font-size: 0.73rem;
}

.cli-col-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

.btn-cli-dashboard {
  background: #0f172a;
  color: #ffffff;
  border: 1px solid #0f172a;
  padding: 7px 14px;
  border-radius: 7px;
  font-size: 0.81rem;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 6px;
  transition: all 0.15s ease;
}

.btn-cli-dashboard:hover {
  background: #1e293b;
  box-shadow: 0 2px 6px rgba(15, 23, 42, 0.2);
  transform: translateY(-1px);
}

.btn-cli-secondary {
  background: #ffffff;
  color: #334155;
  border: 1px solid #cbd5e1;
  padding: 7px 13px;
  border-radius: 7px;
  font-size: 0.81rem;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 6px;
  transition: all 0.15s ease;
}

.btn-cli-secondary:hover {
  background: #f8fafc;
  border-color: #94a3b8;
  color: #0f172a;
}

.btn-cli-icon {
  width: 32px;
  height: 32px;
  border-radius: 7px;
  border: 1px solid #e2e8f0;
  background: #ffffff;
  color: #64748b;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.15s ease;
}

.btn-cli-icon.edit:hover {
  background: #eff6ff;
  border-color: #93c5fd;
  color: #1d4ed8;
  transform: translateY(-1px);
}

.btn-cli-icon.delete:hover {
  background: #fef2f2;
  border-color: #fca5a5;
  color: #dc2626;
  transform: translateY(-1px);
}

.btn-action-svg {
  width: 14px;
  height: 14px;
  stroke: currentColor;
  display: block;
}

@media (max-width: 992px) {
  .client-list-item {
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
  }
  .cli-col-metrics {
    width: 100%;
    justify-content: flex-start;
    flex-wrap: wrap;
  }
  .cli-col-actions {
    width: 100%;
    justify-content: flex-end;
  }
}

.leaflet-popup-content-wrapper {
  border-radius: 10px !important;
  box-shadow: 0 8px 25px -4px rgba(0, 0, 0, 0.18) !important;
  padding: 0 !important;
  overflow: hidden;
}

.leaflet-popup-content {
  margin: 0 !important;
  min-width: 240px;
}

/* Sede Popup Card & Portal to Activos TI */
.sede-popup-card {
  font-family: 'Roboto', 'Inter', system-ui, sans-serif;
  color: #0f172a;
}

.sede-popup-img-wrap {
  width: 100%;
  height: 125px;
  overflow: hidden;
  background: #0f172a;
}

.sede-popup-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.sede-popup-body {
  padding: 14px 16px;
}

.sede-popup-top-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 8px;
}

.sede-popup-city-tag {
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  background: #f1f5f9;
  color: #475569;
  padding: 2px 7px;
  border-radius: 4px;
}

.sede-popup-badge-assets {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 0.74rem;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: 6px;
}

.sede-popup-badge-assets.has-assets {
  background: rgba(16, 185, 129, 0.12);
  color: #059669;
  border: 1px solid rgba(16, 185, 129, 0.25);
}

.sede-popup-badge-assets.no-assets {
  background: #f8fafc;
  color: #94a3b8;
  border: 1px solid #e2e8f0;
}

.mini-asset-svg {
  width: 13px;
  height: 13px;
}

.sede-popup-name {
  font-size: 1rem;
  font-weight: 800;
  color: #0f172a;
  line-height: 1.25;
  margin-bottom: 3px;
}

.sede-popup-filial {
  font-size: 0.78rem;
  font-weight: 700;
  color: #FDB000;
  margin-bottom: 3px;
}

.sede-popup-client {
  font-size: 0.73rem;
  font-weight: 600;
  color: #2563eb;
  margin-bottom: 6px;
}

.sede-popup-meta {
  display: flex;
  flex-direction: column;
  gap: 4px;
  font-size: 0.78rem;
  color: #64748b;
  margin: 8px 0 12px 0;
  padding: 8px 10px;
  background: #f8fafc;
  border-radius: 6px;
  border: 1px solid #e2e8f0;
}

.sede-meta-row {
  display: flex;
  align-items: flex-start;
  gap: 6px;
  line-height: 1.35;
}

.meta-icon {
  font-size: 0.82rem;
  flex-shrink: 0;
}

/* Novedoso & Elegante Botón Portal a Activos TI */
.btn-portal-activos {
  width: 100%;
  border: none;
  background: linear-gradient(135deg, #091225 0%, #1e293b 100%);
  border: 1px solid rgba(253, 176, 0, 0.5);
  border-radius: 8px;
  padding: 10px 12px;
  cursor: pointer;
  box-shadow: 0 4px 14px -2px rgba(11, 19, 43, 0.3), inset 0 1px 0 rgba(255, 255, 255, 0.1);
  transition: all 0.22s cubic-bezier(0.16, 1, 0.3, 1);
  display: block;
  text-align: left;
}

.btn-portal-activos:hover {
  transform: translateY(-2px);
  border-color: #FDB000;
  background: linear-gradient(135deg, #0f1c3d 0%, #1e293b 100%);
  box-shadow: 0 6px 20px rgba(253, 176, 0, 0.35);
}

.btn-portal-activos:active {
  transform: translateY(0);
}

.portal-btn-inner {
  display: flex;
  align-items: center;
  gap: 10px;
}

.portal-icon-box {
  width: 32px;
  height: 32px;
  border-radius: 6px;
  background: rgba(253, 176, 0, 0.15);
  border: 1px solid rgba(253, 176, 0, 0.4);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #FDB000;
  flex-shrink: 0;
  transition: transform 0.2s ease;
}

.btn-portal-activos:hover .portal-icon-box {
  transform: scale(1.08);
  background: rgba(253, 176, 0, 0.25);
}

.portal-icon-box svg {
  width: 17px;
  height: 17px;
}

.portal-text-box {
  display: flex;
  flex-direction: column;
  gap: 2px;
  overflow: hidden;
}

.portal-headline {
  font-size: 0.74rem;
  font-weight: 800;
  color: #FDB000;
  letter-spacing: 0.6px;
  text-transform: uppercase;
}

.portal-subline {
  font-size: 0.72rem;
  color: #cbd5e1;
  font-weight: 500;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  transition: color 0.2s ease, transform 0.2s ease;
}

.btn-portal-activos:hover .portal-subline {
  color: #ffffff;
}

/* Micro botón en lista lateral de sedes */
.btn-micro-activos {
  background: #f1f5f9;
  border: 1px solid #cbd5e1;
  border-radius: 6px;
  padding: 3px 8px;
  font-size: 0.72rem;
  font-weight: 700;
  color: #1e293b;
  cursor: pointer;
  transition: all 0.2s ease;
  white-space: nowrap;
}

.btn-micro-activos:hover {
  background: #0f172a;
  color: #FDB000;
  border-color: #FDB000;
  transform: translateY(-1px);
}

/* KPI Card Clickable en Dashboard */
.kpi-card.kpi-card-clickable {
  cursor: pointer;
  position: relative;
  transition: all 0.22s cubic-bezier(0.16, 1, 0.3, 1);
}

.kpi-card.kpi-card-clickable:hover {
  transform: translateY(-2px);
  border-color: #FDB000;
  box-shadow: 0 8px 24px -4px rgba(253, 176, 0, 0.2);
}

.kpi-card.kpi-card-clickable:hover .kpi-trend {
  color: #b45309;
  font-weight: 700;
}

/* Barra de Contexto en Tab Activos */
.activos-context-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 16px;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  margin-bottom: 16px;
}

.activos-context-left {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.sede-filter-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: #0f172a;
  color: #ffffff;
  padding: 6px 12px;
  border-radius: 20px;
  font-size: 0.78rem;
  font-weight: 600;
  border: 1px solid rgba(253, 176, 0, 0.4);
}

.chip-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #FDB000;
  box-shadow: 0 0 6px #FDB000;
}

.chip-remove-btn {
  background: rgba(255, 255, 255, 0.15);
  border: none;
  color: #FDB000;
  border-radius: 12px;
  padding: 2px 7px;
  font-size: 0.7rem;
  font-weight: 700;
  cursor: pointer;
  transition: background 0.15s ease;
}

.chip-remove-btn:hover {
  background: rgba(255, 255, 255, 0.28);
}

.badge-client-indicator {
  font-size: 0.78rem;
  font-weight: 700;
  color: #2563eb;
  background: #eff6ff;
  border: 1px solid #bfdbfe;
  padding: 4px 10px;
  border-radius: 6px;
}

.section-title {
  font-size: 1.45rem;
  font-weight: 800;
  color: #0f172a;
}

.section-desc {
  font-size: 0.88rem;
  color: #64748b;
  margin-top: 2px;
}

/* Tarjetas Claras */
.grid-cards {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 20px;
  margin-bottom: 28px;
}

.card {
  border-radius: var(--radius-md);
  padding: 24px;
  background: #ffffff;
  border: 1px solid #e2e8f0;
  color: #0f172a;
  box-shadow: 0 4px 16px -2px rgba(0, 0, 0, 0.05);
  transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

.card:hover {
  border-color: var(--primary);
  box-shadow: 0 10px 25px -4px rgba(37, 99, 166, 0.15);
  transform: translateY(-2px);
}

.card-title {
  font-size: 1.18rem;
  font-weight: 800;
  color: #0f172a;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

/* Tablas Claras */
.table-wrap {
  width: 100%;
  overflow-x: auto;
  border-radius: var(--radius-md);
  border: 1px solid #e2e8f0;
  background: #ffffff;
  box-shadow: 0 2px 10px -2px rgba(0, 0, 0, 0.04);
}

table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
  font-size: 0.9rem;
  color: #1e293b;
}

th {
  background: #f8fafc;
  padding: 14px 16px;
  color: #475569;
  font-weight: 700;
  border-bottom: 1px solid #e2e8f0;
  text-transform: uppercase;
  font-size: 0.75rem;
  letter-spacing: 0.05em;
}

td {
  padding: 14px 16px;
  border-bottom: 1px solid #f1f5f9;
  color: #1e293b;
}

tr:last-child td {
  border-bottom: none;
}

tr:hover td {
  background: #f8fafc;
}

/* Badges */
.badge {
  display: inline-flex;
  align-items: center;
  padding: 3px 9px;
  border-radius: 9999px;
  font-size: 0.75rem;
  font-weight: 600;
}

.badge-success { background: #ecfdf5; color: #047857; border: 1px solid #a7f3d0; }
.badge-warning { background: #fffbeb; color: #b45309; border: 1px solid #fde68a; }
.badge-danger { background: #fef2f2; color: #b91c1c; border: 1px solid #fecaca; }
.badge-primary { background: #eff6ff; color: #1d4ed8; border: 1px solid #bfdbfe; }

/* Modals */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.7);
  backdrop-filter: blur(8px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 99999 !important;
  padding: 20px;
  animation: fadeIn 0.2s ease-out;
}

.modal-content {
  position: relative;
  width: 100%;
  max-width: 650px;
  max-height: 90vh;
  overflow-y: auto;
  border-radius: var(--radius-lg);
  padding: 28px;
  background: #ffffff;
  color: #0f172a;
  border: 1px solid #e2e8f0;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.35);
}

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
  border-bottom: 1px solid #f1f5f9;
  padding-bottom: 14px;
}

.modal-header h3 {
  color: #0f172a;
  font-size: 1.25rem;
  font-weight: 700;
  margin: 0;
}

.modal-close {
  background: #f1f5f9;
  border: 1px solid #e2e8f0;
  color: #475569;
  font-size: 1.35rem;
  font-weight: 700;
  cursor: pointer;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
  transition: all 0.2s ease;
}

.modal-close:hover {
  background: #fee2e2;
  color: #dc2626;
  border-color: #fca5a5;
  transform: scale(1.08);
}

/* 2FA Boxes */
.qr-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 20px;
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: var(--radius-md);
  margin: 16px auto;
  max-width: 240px;
}

.backup-codes-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  background: #f8fafc;
  padding: 16px;
  border-radius: var(--radius-sm);
  font-family: monospace;
  font-size: 0.95rem;
  margin: 16px 0;
  border: 1px solid #e2e8f0;
  color: #0f172a;
}

/* Permisos Matrix */
.permissions-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 16px;
  margin: 16px 0;
}

.permission-module {
  background: #f8fafc;
  padding: 16px;
  border-radius: var(--radius-sm);
  border: 1px solid #e2e8f0;
}

.permission-module h4 {
  font-size: 0.85rem;
  text-transform: uppercase;
  color: #2563A6;
  margin-bottom: 10px;
  letter-spacing: 0.05em;
  font-weight: 700;
}

.permission-item {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin-bottom: 8px;
  font-size: 0.85rem;
  color: #1e293b;
}

.permission-item input {
  margin-top: 3px;
  accent-color: var(--primary);
  width: 16px;
  height: 16px;
}

/* Animations */
@keyframes fadeIn {
  from { opacity: 0; transform: scale(0.98); }
  to { opacity: 1; transform: scale(1); }
}

.hidden {
  display: none !important;
}

/* Alerts */
.alert {
  padding: 12px 16px;
  border-radius: var(--radius-sm);
  font-size: 0.9rem;
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  gap: 10px;
}
.alert-danger { background: #fef2f2; border: 1px solid #fecaca; color: #991b1b; }
.alert-success { background: #ecfdf5; border: 1px solid #a7f3d0; color: #065f46; }
.alert-info { background: #eff6ff; border: 1px solid #bfdbfe; color: #1e40af; }
.alert-warning { background: #fffbeb; border: 1px solid #fde68a; color: #92400e; }

/* Contenedor de Alertas de Activos y Hardware */
.activos-alerts-container {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.alerta-reactivacion-card {
  background: linear-gradient(135deg, #fffbeb 0%, #fef3c7 100%);
  border: 1.5px solid #f59e0b;
  border-radius: 10px;
  padding: 14px 18px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  box-shadow: 0 4px 12px rgba(245, 158, 11, 0.12);
}

.alerta-hardware-card {
  background: linear-gradient(135deg, #f5f3ff 0%, #ede9fe 100%);
  border: 1.5px solid #8b5cf6;
  border-radius: 10px;
  padding: 14px 18px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  box-shadow: 0 4px 12px rgba(139, 92, 246, 0.1);
}

/* Timeline Hoja de Vida */
.hoja-vida-timeline {
  position: relative;
  padding-left: 28px;
  margin-top: 14px;
}
.hoja-vida-timeline::before {
  content: "";
  position: absolute;
  top: 6px;
  bottom: 6px;
  left: 9px;
  width: 2px;
  background: #cbd5e1;
}
.hoja-vida-item {
  position: relative;
  margin-bottom: 20px;
}
.hoja-vida-item:last-child {
  margin-bottom: 0;
}
.hoja-vida-dot {
  position: absolute;
  left: -28px;
  top: 4px;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: #ffffff;
  border: 3px solid #0284c7;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 0 0 3px rgba(2, 132, 199, 0.15);
}
.hoja-vida-dot.hardware {
  border-color: #8b5cf6;
  box-shadow: 0 0 0 3px rgba(139, 92, 246, 0.2);
}
.hoja-vida-dot.alta {
  border-color: #10b981;
  box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.2);
}
.hoja-vida-content {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  padding: 12px 16px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
}
.hoja-vida-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  margin-bottom: 6px;
  flex-wrap: wrap;
}
.hoja-vida-title {
  font-weight: 700;
  font-size: 0.88rem;
  color: #0f172a;
}
.hoja-vida-date {
  font-size: 0.74rem;
  color: #64748b;
  font-weight: 600;
}
.hoja-vida-desc {
  font-size: 0.82rem;
  color: #334155;
  line-height: 1.4;
  margin-bottom: 6px;
}
.hoja-vida-box {
  background: #f8fafc;
  border-left: 3px solid #0284c7;
  padding: 8px 12px;
  border-radius: 4px;
  font-size: 0.78rem;
  color: #334155;
  white-space: pre-wrap;
  font-family: inherit;
  margin-top: 6px;
}
.hoja-vida-box.hardware {
  border-left-color: #8b5cf6;
  background: #faf5ff;
}

/* ========================================================
   RESPONSIVE DESIGN COMPREHENSIVO (TODOS LOS DISPOSITIVOS)
   ======================================================== */

/* 1. Laptops y Pantallas Medianas (<= 1024px) */
@media (max-width: 1024px) {
  .dashboard-split-grid {
    grid-template-columns: 1fr;
    gap: 16px;
  }

  .dashboard-side-col {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
  }

  .kpi-metrics-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
  }
}

/* 2. Tablets y Móviles en Horizontal (<= 768px) */
@media (max-width: 768px) {
  .topbar-menu-toggle {
    display: flex !important;
  }

  .app-sidebar {
    position: fixed;
    top: 0;
    left: -280px;
    width: 260px !important;
    height: 100vh;
    z-index: 2000;
    box-shadow: 10px 0 30px rgba(0, 0, 0, 0.5);
    transition: left 0.28s cubic-bezier(0.4, 0, 0.2, 1);
  }

  .app-sidebar.open {
    left: 0;
  }

  .sidebar-toggle-btn {
    display: none;
  }

  .app-content {
    padding: 18px 16px 36px;
  }

  .dashboard-side-col {
    grid-template-columns: 1fr;
  }

  .dashboard-card-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
    padding: 14px 16px;
  }

  .main-card-sub {
    margin-left: 0;
  }

  .map-actions-box {
    width: 100%;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 8px;
  }

  .mapa-container-inspired {
    height: 340px;
  }

  .filiales-card-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
  }

  .filiales-card-header .btn {
    width: 100%;
    justify-content: center;
  }

  .table-wrap {
    width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    border-radius: var(--radius-md);
    border: 1px solid #e2e8f0;
  }

  .table-wrap table {
    min-width: 600px;
  }
}

/* 3. Teléfonos Móviles Estándar (<= 640px) */
@media (max-width: 640px) {
  .auth-wrapper {
    padding: 16px;
  }

  .split-auth-card {
    border-radius: 16px;
  }

  .auth-card-top {
    padding: 26px 18px 20px;
  }

  .top-brand-logo {
    width: 48px;
    height: 48px;
  }

  .top-brand-title {
    font-size: 1.05rem;
  }

  .auth-card-body {
    padding: 24px 18px 20px;
  }

  .app-topbar {
    padding: 8px 14px;
    min-height: 50px;
  }

  .topbar-breadcrumb {
    font-size: 0.88rem;
  }

  .tenant-label {
    display: none;
  }

  .tenant-selector-wrap select {
    padding: 4px 8px;
    font-size: 0.78rem;
    max-width: 140px;
  }

  .kpi-metrics-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 8px;
    margin-bottom: 16px;
  }

  .kpi-card {
    padding: 12px 14px;
  }

  .kpi-card-value {
    font-size: 1.45rem;
    margin-bottom: 4px;
  }

  .kpi-card-title {
    font-size: 0.65rem;
  }

  .kpi-card-icon {
    width: 26px;
    height: 26px;
    font-size: 0.85rem;
  }

  .filiales-cards-grid {
    grid-template-columns: 1fr;
  }

  .modal-overlay {
    padding: 10px;
    align-items: flex-end;
  }

  .modal-content {
    max-height: 90vh;
    border-radius: 16px 16px 0 0;
    padding: 18px 16px;
  }

  .modal-header {
    margin-bottom: 12px;
  }

  form div[style*="grid-template-columns"] {
    grid-template-columns: 1fr !important;
    gap: 8px !important;
  }
}

/* 4. Teléfonos Pequeños (<= 420px) */
@media (max-width: 420px) {
  .kpi-metrics-grid {
    grid-template-columns: 1fr;
  }

  .mapa-container-inspired {
    height: 280px;
  }

  .badge-national-sedes,
  .btn-centrar-colombia {
    font-size: 0.68rem;
    padding: 3px 8px;
  }

  .btn-mini-theme {
    font-size: 0.68rem;
    padding: 2px 7px;
  }

  .donut-chart-box {
    flex-direction: column;
    align-items: center;
    gap: 12px;
  }
}

/* ========================================================
   FUNCIONALIDADES CORPORATIVAS PRO (USB INGENIERÍA)
   ======================================================== */

/* 1. Botón Buscador Global (Topbar Search Trigger) */
.topbar-search-trigger {
  display: flex;
  align-items: center;
  gap: 10px;
  background: #f1f5f9;
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  padding: 6px 12px;
  font-size: 0.82rem;
  color: #64748b;
  cursor: pointer;
  transition: all 0.18s ease;
  min-width: 220px;
}

.topbar-search-trigger:hover {
  background: #e2e8f0;
  border-color: #94a3b8;
  color: #1e293b;
}

.search-trigger-text {
  flex: 1;
  text-align: left;
}

.search-trigger-kbd {
  background: white;
  border: 1px solid #cbd5e1;
  border-radius: 4px;
  padding: 2px 6px;
  font-size: 0.72rem;
  font-family: inherit;
  font-weight: 700;
  color: #475569;
  box-shadow: 0 1px 1px rgba(0, 0, 0, 0.06);
}

@media (max-width: 768px) {
  .topbar-search-trigger {
    min-width: unset;
    padding: 6px 10px;
  }
  .search-trigger-text,
  .search-trigger-kbd {
    display: none;
  }
}

/* 2. Spotlight Command Palette (Ctrl + K) */
.spotlight-overlay {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.65);
  backdrop-filter: blur(6px);
  z-index: 3000;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding: 60px 16px 20px;
  animation: fadeIn 0.18s ease;
}

.spotlight-overlay.hidden {
  display: none;
}

.spotlight-dialog {
  background: white;
  width: 100%;
  max-width: 620px;
  border-radius: 14px;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.35), 0 0 0 1px rgba(0, 0, 0, 0.05);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  animation: slideDown 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes slideDown {
  from { opacity: 0; transform: translateY(-16px) scale(0.98); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

.spotlight-search-header {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px 20px;
  border-bottom: 1px solid #e2e8f0;
}

.spotlight-search-icon {
  font-size: 1.3rem;
  color: #64748b;
}

.spotlight-search-header input {
  flex: 1;
  border: none;
  outline: none;
  font-size: 1.05rem;
  color: #0f172a;
  background: transparent;
  font-family: inherit;
}

.spotlight-badge-esc {
  background: #f1f5f9;
  border: 1px solid #cbd5e1;
  border-radius: 4px;
  padding: 3px 8px;
  font-size: 0.72rem;
  font-weight: 700;
  color: #64748b;
  cursor: pointer;
}

.spotlight-results-container {
  max-height: 380px;
  overflow-y: auto;
  padding: 10px;
}

.spotlight-group-title {
  font-size: 0.72rem;
  font-weight: 700;
  color: #94a3b8;
  text-transform: uppercase;
  letter-spacing: 0.6px;
  padding: 8px 12px 4px;
}

.spotlight-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 14px;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.14s ease;
}

.spotlight-item:hover,
.spotlight-item.active {
  background: #f1f5f9;
}

.spotlight-item-icon {
  font-size: 1.25rem;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: white;
  border-radius: 6px;
  border: 1px solid #e2e8f0;
  flex-shrink: 0;
}

.spotlight-item-text {
  flex: 1;
  overflow: hidden;
}

.spotlight-item-title {
  font-size: 0.92rem;
  font-weight: 600;
  color: #0f172a;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.spotlight-item-sub {
  font-size: 0.78rem;
  color: #64748b;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.spotlight-footer {
  display: flex;
  justify-content: space-between;
  padding: 10px 18px;
  background: #f8fafc;
  border-top: 1px solid #e2e8f0;
  font-size: 0.75rem;
  color: #64748b;
}

/* 3. Semáforos de Garantía */
.warranty-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border-radius: 20px;
  font-size: 0.76rem;
  font-weight: 700;
  white-space: nowrap;
}

.warranty-badge.vigente {
  background: #ecfdf5;
  color: #059669;
  border: 1px solid #a7f3d0;
}

.warranty-badge.por_vencer {
  background: #fffbeb;
  color: #d97706;
  border: 1px solid #fde68a;
  animation: pulseWarning 2s infinite ease-in-out;
}

.warranty-badge.vencida {
  background: #fef2f2;
  color: #dc2626;
  border: 1px solid #fecaca;
}

.warranty-badge.sin_garantia {
  background: #f8fafc;
  color: #64748b;
  border: 1px solid #e2e8f0;
}

@keyframes pulseWarning {
  0% { transform: scale(1); }
  50% { transform: scale(1.03); }
  100% { transform: scale(1); }
}

/* 4. Etiqueta QR Corporativa Imprimible */
.qr-sticker-card {
  background: white;
  border: 2px solid #001833;
  border-radius: 10px;
  padding: 16px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  color: #0f172a;
}

.qr-sticker-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 2px solid #001833;
  padding-bottom: 8px;
  margin-bottom: 12px;
}

.qr-sticker-logo-box {
  display: flex;
  align-items: center;
  gap: 8px;
}

.qr-sticker-logo-img {
  width: 28px;
  height: 28px;
}

.qr-sticker-company {
  font-size: 0.82rem;
  font-weight: 800;
  color: #001833;
  letter-spacing: 0.5px;
}

.qr-sticker-tag {
  font-size: 0.65rem;
  font-weight: 700;
  background: #001833;
  color: white;
  padding: 2px 6px;
  border-radius: 4px;
}

.qr-sticker-body {
  display: flex;
  gap: 16px;
  align-items: center;
}

.qr-sticker-img {
  width: 120px;
  height: 120px;
  border: 1px solid #e2e8f0;
  border-radius: 6px;
  padding: 4px;
  background: white;
  flex-shrink: 0;
}

.qr-sticker-info {
  flex: 1;
}

.qr-sticker-placa {
  font-size: 1.3rem;
  font-weight: 900;
  color: #001833;
  letter-spacing: 0.8px;
  margin-bottom: 4px;
}

.qr-sticker-line {
  font-size: 0.8rem;
  color: #334155;
  margin-bottom: 3px;
}

.qr-sticker-line b {
  color: #0f172a;
}

.qr-sticker-footer {
  border-top: 1px dashed #cbd5e1;
  margin-top: 12px;
  padding-top: 8px;
  display: flex;
  justify-content: space-between;
  font-size: 0.68rem;
  color: #64748b;
}

/* 5. Acta de Entrega Oficial de Equipos TI */
.acta-corporate-document {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  color: #1e293b;
  line-height: 1.5;
}

.acta-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  border-bottom: 2px solid #001833;
  padding-bottom: 14px;
  margin-bottom: 18px;
}

.acta-brand-wrap {
  display: flex;
  align-items: center;
  gap: 12px;
}

.acta-logo-img {
  width: 46px;
  height: 46px;
}

.acta-brand-name {
  font-size: 1.2rem;
  font-weight: 800;
  color: #001833;
}

.acta-brand-nit {
  font-size: 0.78rem;
  color: #64748b;
}

.acta-meta-right {
  text-align: right;
}

.acta-number-badge {
  display: inline-block;
  background: #001833;
  color: white;
  font-weight: 800;
  font-size: 0.82rem;
  padding: 4px 10px;
  border-radius: 4px;
  margin-bottom: 4px;
}

.acta-title {
  text-align: center;
  font-size: 1.15rem;
  font-weight: 800;
  color: #0f172a;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin: 16px 0 20px;
}

.acta-grid-info {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
  margin-bottom: 18px;
}

.acta-info-box {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  padding: 12px 14px;
}

.acta-info-box-title {
  font-size: 0.76rem;
  font-weight: 800;
  text-transform: uppercase;
  color: #001833;
  margin-bottom: 8px;
  border-bottom: 1px solid #e2e8f0;
  padding-bottom: 4px;
}

.acta-row {
  font-size: 0.82rem;
  margin-bottom: 4px;
}

.acta-row b {
  color: #0f172a;
}

.acta-specs-table {
  width: 100%;
  border-collapse: collapse;
  margin: 14px 0 20px;
  font-size: 0.82rem;
}

.acta-specs-table th {
  background: #001833;
  color: white;
  padding: 8px 10px;
  text-align: left;
  font-weight: 700;
}

.acta-specs-table td {
  border: 1px solid #e2e8f0;
  padding: 8px 10px;
}

.acta-terms-box {
  background: #f8fafc;
  border-left: 3px solid #001833;
  padding: 12px 16px;
  font-size: 0.78rem;
  color: #334155;
  margin-bottom: 26px;
  border-radius: 0 8px 8px 0;
}

.acta-terms-box p {
  margin-bottom: 6px;
}

.acta-signatures-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 40px;
  margin-top: 36px;
  padding-top: 10px;
}

.acta-signature-box {
  text-align: center;
}

.acta-signature-line {
  border-bottom: 1px solid #0f172a;
  margin-bottom: 8px;
  height: 50px;
}

.acta-signature-role {
  font-weight: 700;
  font-size: 0.85rem;
  color: #0f172a;
}

.acta-signature-sub {
  font-size: 0.75rem;
  color: #64748b;
}

/* ========================================================
   REGLAS DE IMPRESIÓN OFICIAL (PDF & ETIQUETA QR)
   ======================================================== */
@media print {
  /* Ocultar toda la interfaz interactiva */
  body * {
    visibility: hidden;
  }

  /* Si imprimimos el Acta de Entrega Individual */
  body.printing-acta #modal-acta-entrega,
  body.printing-acta #modal-acta-entrega *,
  body.printing-acta #acta-document-render,
  body.printing-acta #acta-document-render * {
    visibility: visible !important;
  }

  body.printing-acta #modal-acta-entrega {
    position: absolute;
    left: 0;
    top: 0;
    width: 100% !important;
    max-width: 100% !important;
    background: white !important;
    padding: 0 !important;
    margin: 0 !important;
  }

  body.printing-acta .modal-content {
    box-shadow: none !important;
    border: none !important;
    padding: 0 !important;
    margin: 0 !important;
    max-width: 100% !important;
  }

  body.printing-acta .modal-header,
  body.printing-acta .modal-close {
    display: none !important;
  }

  /* Si imprimimos el Acta de Entrega de Inventario General */
  body.printing-acta-inventario #modal-acta-inventario,
  body.printing-acta-inventario #modal-acta-inventario *,
  body.printing-acta-inventario #acta-inventario-render,
  body.printing-acta-inventario #acta-inventario-render * {
    visibility: visible !important;
  }

  body.printing-acta-inventario #modal-acta-inventario {
    position: absolute !important;
    left: 0 !important;
    top: 0 !important;
    width: 100% !important;
    max-width: 100% !important;
    background: white !important;
    padding: 0 !important;
    margin: 0 !important;
    z-index: 99999 !important;
  }

  body.printing-acta-inventario .modal-content {
    box-shadow: none !important;
    border: none !important;
    padding: 0 !important;
    margin: 0 !important;
    max-width: 100% !important;
    width: 100% !important;
  }

  body.printing-acta-inventario .no-print,
  body.printing-acta-inventario .modal-header,
  body.printing-acta-inventario .modal-close,
  body.printing-acta-inventario .saas-modal-close-circle {
    display: none !important;
  }

  /* Si imprimimos la Etiqueta QR */
  body.printing-qr #modal-qr-label,
  body.printing-qr #modal-qr-label *,
  body.printing-qr #qr-label-preview-wrap,
  body.printing-qr #qr-label-preview-wrap * {
    visibility: visible !important;
  }

  body.printing-qr #modal-qr-label {
    position: absolute;
    left: 0;
    top: 0;
    width: 100% !important;
    background: white !important;
    padding: 0 !important;
  }

  body.printing-qr .modal-content {
    box-shadow: none !important;
    border: none !important;
    padding: 0 !important;
  }

  body.printing-qr .modal-header,
  body.printing-qr .modal-footer {
    display: none !important;
  }

  body.printing-qr .qr-sticker-card {
    border: 2px solid black !important;
    box-shadow: none !important;
    width: 85mm !important;
    max-width: 85mm !important;
    margin: 10mm auto !important;
  }

  /* Si imprimimos el Cronograma para el Técnico */
  body.printing-cronograma #modal-cronograma-imprimir,
  body.printing-cronograma #modal-cronograma-imprimir *,
  body.printing-cronograma #cronograma-print-document,
  body.printing-cronograma #cronograma-print-document * {
    visibility: visible !important;
  }

  body.printing-cronograma #modal-cronograma-imprimir {
    position: absolute !important;
    left: 0 !important;
    top: 0 !important;
    width: 100% !important;
    max-width: 100% !important;
    background: white !important;
    padding: 0 !important;
    margin: 0 !important;
    z-index: 99999 !important;
  }

  body.printing-cronograma .modal-content {
    box-shadow: none !important;
    border: none !important;
    padding: 0 !important;
    margin: 0 !important;
    max-width: 100% !important;
    width: 100% !important;
  }

  body.printing-cronograma .no-print {
    display: none !important;
  }

  /* Si imprimimos el Reporte Completo de Inventario (PDF & Dossier con Fotos) */
  body.printing-inventory #modal-reporte-inventario,
  body.printing-inventory #modal-reporte-inventario *,
  body.printing-inventory #inventory-printable-content,
  body.printing-inventory #inventory-printable-content * {
    visibility: visible !important;
  }

  body.printing-inventory #modal-reporte-inventario {
    position: absolute !important;
    left: 0 !important;
    top: 0 !important;
    width: 100% !important;
    max-width: 100% !important;
    height: auto !important;
    overflow: visible !important;
    display: block !important;
    background: white !important;
    padding: 0 !important;
    margin: 0 !important;
    z-index: 99999 !important;
    box-shadow: none !important;
  }

  body.printing-inventory .modal-content {
    box-shadow: none !important;
    border: none !important;
    padding: 0 !important;
    margin: 0 !important;
    max-width: 100% !important;
    width: 100% !important;
    height: auto !important;
    max-height: none !important;
    overflow: visible !important;
    display: block !important;
    border-radius: 0 !important;
  }

  body.printing-inventory .report-studio-grid,
  body.printing-inventory .report-preview-canvas {
    display: block !important;
    width: 100% !important;
    height: auto !important;
    overflow: visible !important;
    padding: 0 !important;
    margin: 0 !important;
    background: #ffffff !important;
  }

  body.printing-inventory #inventory-printable-content {
    max-width: 100% !important;
    width: 100% !important;
    min-height: auto !important;
    padding: 0 !important;
    margin: 0 !important;
    box-shadow: none !important;
    border-radius: 0 !important;
  }

  body.printing-inventory .no-print {
    display: none !important;
  }

  /* Si imprimimos la Ficha Técnica Individual (PDF) */
  body.printing-ficha #modal-ficha-tecnica,
  body.printing-ficha #modal-ficha-tecnica *,
  body.printing-ficha .saas-modal-tech-sheet,
  body.printing-ficha .saas-modal-tech-sheet * {
    visibility: visible !important;
  }

  body.printing-ficha #modal-ficha-tecnica {
    position: absolute !important;
    left: 0 !important;
    top: 0 !important;
    width: 100% !important;
    max-width: 100% !important;
    background: white !important;
    padding: 0 !important;
    margin: 0 !important;
    z-index: 99999 !important;
    box-shadow: none !important;
  }

  body.printing-ficha .saas-modal-tech-sheet {
    box-shadow: none !important;
    border: none !important;
    padding: 0 !important;
    margin: 0 !important;
    max-width: 100% !important;
    width: 100% !important;
    max-height: none !important;
    overflow: visible !important;
  }

  body.printing-ficha .no-print,
  body.printing-ficha .saas-modal-close-circle,
  body.printing-ficha footer {
    display: none !important;
  }
}

.print-inventory-card {
  page-break-inside: avoid;
  break-inside: avoid;
  -webkit-print-color-adjust: exact;
  print-color-adjust: exact;
}

.print-photo-thumb {
  width: 110px;
  height: 85px;
  object-fit: cover;
  border-radius: 6px;
  border: 1px solid #cbd5e1;
  background: #f8fafc;
  -webkit-print-color-adjust: exact;
  print-color-adjust: exact;
}

/* ============================================================
   CLIENT DIRECTORY & CLIENT DASHBOARD ARCHITECTURE
   ============================================================ */

.clientes-directory-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 16px;
  background: #ffffff;
  padding: 20px 24px;
  border-radius: 12px;
  border: 1px solid #e2e8f0;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
  margin-bottom: 24px;
}

.client-dashboard-banner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 16px;
  background: linear-gradient(135deg, #0f172a 0%, #1e293b 100%);
  color: #ffffff;
  padding: 18px 24px;
  border-radius: 14px;
  box-shadow: 0 4px 14px rgba(15, 23, 42, 0.12);
  margin-bottom: 22px;
}

.banner-left {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
}

.banner-client-logo-wrap {
  width: 48px;
  height: 48px;
  border-radius: 10px;
  background: #ffffff;
  padding: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.25);
  overflow: hidden;
  flex-shrink: 0;
  border: 1px solid rgba(255, 255, 255, 0.2);
}

.banner-client-logo-img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.client-avatar.has-logo {
  background: #ffffff !important;
  border: 1px solid #e2e8f0;
  padding: 3px;
}

.btn-back-dir {
  background: rgba(255, 255, 255, 0.12);
  color: #ffffff;
  border: 1px solid rgba(255, 255, 255, 0.2);
  padding: 8px 14px;
  border-radius: 8px;
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  gap: 6px;
}

.btn-back-dir:hover {
  background: rgba(255, 255, 255, 0.22);
  transform: translateX(-2px);
}

.banner-client-name {
  font-size: 1.25rem;
  font-weight: 700;
  letter-spacing: -0.01em;
  color: #ffffff;
}

.banner-client-meta {
  font-size: 0.82rem;
  color: #94a3b8;
  margin-top: 3px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.banner-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.btn-banner-action {
  background: #2563eb;
  color: #ffffff;
  border: none;
  padding: 8px 16px;
  border-radius: 8px;
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  gap: 6px;
}

.btn-banner-action:hover {
  background: #1d4ed8;
  box-shadow: 0 2px 8px rgba(37, 99, 235, 0.35);
}

.btn-banner-action.secondary {
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.2);
}

.btn-banner-action.secondary:hover {
  background: rgba(255, 255, 255, 0.18);
}

/* Onboarding Hero Card */
.onboarding-hero-card {
  grid-column: 1 / -1;
  background: #ffffff;
  border: 1.5px dashed #cbd5e1;
  border-radius: 16px;
  padding: 48px 32px;
  text-align: center;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.02);
  margin-top: 6px;
}

.onboarding-icon-wrap {
  width: 72px;
  height: 72px;
  background: #f1f5f9;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2.4rem;
  margin: 0 auto 18px;
}

.onboarding-title {
  font-size: 1.35rem;
  font-weight: 700;
  color: #0f172a;
  margin-bottom: 8px;
}

.onboarding-desc {
  font-size: 0.92rem;
  color: #64748b;
  max-width: 580px;
  margin: 0 auto 28px;
  line-height: 1.5;
}

.onboarding-steps-flow {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 12px;
  max-width: 680px;
  margin: 0 auto 32px;
  flex-wrap: wrap;
}

.flow-step-item {
  display: flex;
  align-items: center;
  gap: 8px;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  padding: 8px 14px;
  border-radius: 8px;
  font-size: 0.8rem;
  font-weight: 600;
  color: #334155;
}

.flow-step-num {
  width: 20px;
  height: 20px;
  background: #0f172a;
  color: #ffffff;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.7rem;
}

.flow-step-arrow {
  color: #94a3b8;
  font-size: 0.85rem;
}

.btn-card-enter {
  background: #0f172a;
  color: #ffffff;
  border: none;
  padding: 8px 14px;
  border-radius: 6px;
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  gap: 6px;
  flex: 1.3;
  justify-content: center;
}

.btn-card-enter:hover {
  background: #1e293b;
  box-shadow: 0 2px 6px rgba(15, 23, 42, 0.25);
}

.btn-card-edit,
.btn-card-delete {
  padding: 8px 10px;
  border-radius: 6px;
  font-size: 0.85rem;
  cursor: pointer;
  border: 1px solid #e2e8f0;
  background: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.15s ease;
}

.btn-card-edit:hover {
  background: #eff6ff;
  border-color: #93c5fd;
  transform: translateY(-1px);
}

.btn-card-delete:hover {
  background: #fef2f2;
  border-color: #fca5a5;
  transform: translateY(-1px);
}

.btn-icon-subtle {
  background: transparent;
  border: none;
  cursor: pointer;
  padding: 4px;
  border-radius: 4px;
  font-size: 0.85rem;
  line-height: 1;
  transition: background 0.15s ease;
}

.btn-icon-subtle:hover {
  background: #f1f5f9;
}

.btn-icon-subtle.danger:hover {
  background: #fee2e2;
}

/* 3-Level Hierarchy Visual Tree Modal */
.hierarchy-level-1-card {
  background: linear-gradient(135deg, #0f172a 0%, #1e293b 100%);
  color: #ffffff;
  padding: 16px 20px;
  border-radius: 12px;
  box-shadow: 0 4px 14px rgba(15, 23, 42, 0.12);
  margin-bottom: 12px;
}

.badge-hierarchy-lvl {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px 8px;
  border-radius: 4px;
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.badge-hierarchy-lvl.lvl-1 {
  background: #38bdf8;
  color: #0f172a;
}

.badge-hierarchy-lvl.lvl-2 {
  background: #e0e7ff;
  color: #3730a3;
  border: 1px solid #c7d2fe;
}

.badge-hierarchy-lvl.lvl-3 {
  background: #dcfce7;
  color: #166534;
  border: 1px solid #bbf7d0;
}

.hierarchy-tree-line {
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 14px 0 10px;
  position: relative;
}

.hierarchy-tree-line::before {
  content: "";
  position: absolute;
  top: 50%;
  left: 0;
  right: 0;
  height: 1px;
  background: #cbd5e1;
  z-index: 1;
}

.hierarchy-tree-line span {
  position: relative;
  z-index: 2;
  background: #ffffff;
  padding: 2px 14px;
  font-size: 0.72rem;
  font-weight: 700;
  color: #64748b;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.hierarchy-cadena-card {
  background: #ffffff;
  border: 1.5px solid #cbd5e1;
  border-radius: 10px;
  padding: 14px 16px;
  margin-bottom: 14px;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.04);
}

.hierarchy-cadena-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-bottom: 10px;
  border-bottom: 1px solid #f1f5f9;
  margin-bottom: 10px;
}

.cadena-name {
  margin: 0;
  font-size: 1.05rem;
  font-weight: 700;
  color: #1e293b;
}

.cadena-count-badge {
  background: #f1f5f9;
  color: #475569;
  font-size: 0.75rem;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: 12px;
}

.hierarchy-sedes-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding-left: 14px;
  border-left: 2px dashed #93c5fd;
  margin-left: 8px;
}

.hierarchy-sede-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  padding: 10px 14px;
  transition: all 0.15s ease;
}

.hierarchy-sede-item:hover {
  background: #ffffff;
  border-color: #3b82f6;
  box-shadow: 0 2px 8px rgba(59, 130, 246, 0.08);
}

.sede-info-col {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.sede-title {
  font-size: 0.88rem;
  color: #0f172a;
  font-weight: 700;
}

.sede-meta {
  display: flex;
  gap: 12px;
  font-size: 0.74rem;
  color: #64748b;
}

.sedes-empty-notice {
  padding: 12px;
  background: #f8fafc;
  border-radius: 6px;
  font-size: 0.8rem;
  color: #64748b;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.btn-outline-primary {
  background: #ffffff;
  color: #2563eb;
  border: 1px solid #bfdbfe;
  padding: 6px 12px;
  border-radius: 6px;
  font-size: 0.78rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s ease;
}

.btn-outline-primary:hover {
  background: #eff6ff;
  border-color: #2563eb;
}

.btn-outline-danger {
  background: #ffffff;
  color: #dc2626;
  border: 1px solid #fecaca;
  padding: 6px 10px;
  border-radius: 6px;
  font-size: 0.78rem;
  cursor: pointer;
  transition: all 0.15s ease;
}

.btn-outline-danger:hover {
  background: #fef2f2;
  border-color: #dc2626;
}

.btn-xs {
  padding: 4px 8px !important;
  font-size: 0.74rem !important;
}

/* ==========================================================
   SISTEMA DE NOTIFICACIONES TOAST & CONFIRM MODAL (PREMIUM)
   ========================================================== */
.toast-container {
  position: fixed;
  top: 24px;
  right: 24px;
  z-index: 99999;
  display: flex;
  flex-direction: column;
  gap: 12px;
  pointer-events: none;
  max-width: 440px;
  width: calc(100vw - 32px);
}

.toast-item {
  pointer-events: auto;
  display: flex;
  align-items: flex-start;
  gap: 14px;
  padding: 15px 18px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.96);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  box-shadow: 0 10px 30px -5px rgba(0, 0, 0, 0.12), 0 4px 10px -2px rgba(0, 0, 0, 0.05);
  border: 1px solid rgba(226, 232, 240, 0.85);
  position: relative;
  overflow: hidden;
  animation: toastSlideIn 0.35s cubic-bezier(0.16, 1, 0.3, 1) forwards;
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.toast-item.removing {
  animation: toastSlideOut 0.28s ease-in forwards;
}

@keyframes toastSlideIn {
  from {
    opacity: 0;
    transform: translateX(60px) scale(0.95);
  }
  to {
    opacity: 1;
    transform: translateX(0) scale(1);
  }
}

@keyframes toastSlideOut {
  from {
    opacity: 1;
    transform: translateX(0) scale(1);
  }
  to {
    opacity: 0;
    transform: translateX(50px) scale(0.9);
  }
}

.toast-icon-wrap {
  flex-shrink: 0;
  width: 34px;
  height: 34px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.15rem;
}

.toast-body {
  flex: 1;
  min-width: 0;
}

.toast-title {
  font-size: 0.88rem;
  font-weight: 700;
  color: #0f172a;
  margin-bottom: 2px;
  line-height: 1.3;
}

.toast-message {
  font-size: 0.82rem;
  color: #475569;
  line-height: 1.45;
  word-break: break-word;
}

.toast-close-btn {
  background: transparent;
  border: none;
  color: #94a3b8;
  cursor: pointer;
  padding: 4px;
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
  line-height: 1;
  transition: all 0.15s ease;
  margin-left: -4px;
}

.toast-close-btn:hover {
  color: #0f172a;
  background: #f1f5f9;
}

/* Toast Variants */
.toast-success {
  border-left: 4px solid #10b981;
}
.toast-success .toast-icon-wrap {
  background: #ecfdf5;
  color: #059669;
}

.toast-error {
  border-left: 4px solid #ef4444;
}
.toast-error .toast-icon-wrap {
  background: #fef2f2;
  color: #dc2626;
}

.toast-warning {
  border-left: 4px solid #f59e0b;
}
.toast-warning .toast-icon-wrap {
  background: #fffbeb;
  color: #d97706;
}

.toast-info {
  border-left: 4px solid #2563eb;
}
.toast-info .toast-icon-wrap {
  background: #eff6ff;
  color: #2563eb;
}

.toast-progress {
  position: absolute;
  bottom: 0;
  left: 0;
  height: 3px;
  background: rgba(0, 0, 0, 0.08);
  width: 100%;
}
.toast-success .toast-progress-bar { background: #10b981; }
.toast-error .toast-progress-bar { background: #ef4444; }
.toast-warning .toast-progress-bar { background: #f59e0b; }
.toast-info .toast-progress-bar { background: #2563eb; }

.toast-progress-bar {
  height: 100%;
  width: 100%;
  animation: toastCountdown linear forwards;
}

@keyframes toastCountdown {
  from { width: 100%; }
  to { width: 0%; }
}

/* Confirm Dialog Modal */
.confirm-modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.6);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  z-index: 100000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  animation: fadeIn 0.2s ease-out;
}

.confirm-modal-box {
  background: #ffffff;
  border-radius: 16px;
  max-width: 440px;
  width: 100%;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
  border: 1px solid #e2e8f0;
  overflow: hidden;
  animation: scaleUp 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

.confirm-modal-header {
  padding: 22px 24px 12px 24px;
  display: flex;
  align-items: center;
  gap: 14px;
}

.confirm-modal-icon {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.3rem;
  flex-shrink: 0;
}
.confirm-modal-icon.danger {
  background: #fef2f2;
  color: #dc2626;
  border: 1px solid #fecaca;
}
.confirm-modal-icon.warning {
  background: #fffbeb;
  color: #d97706;
  border: 1px solid #fde68a;
}
.confirm-modal-icon.info {
  background: #eff6ff;
  color: #2563eb;
  border: 1px solid #bfdbfe;
}

.confirm-modal-title {
  font-size: 1.05rem;
  font-weight: 700;
  color: #0f172a;
}

.confirm-modal-body {
  padding: 0 24px 20px 24px;
  font-size: 0.88rem;
  color: #475569;
  line-height: 1.5;
}

.confirm-modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  padding: 16px 24px;
  background: #f8fafc;
  border-top: 1px solid #e2e8f0;
}

/* ==========================================================
   ESPECIFICACIONES TI & FICHA TÉCNICA (USBING.BOT AUDIT)
   ========================================================== */
.spec-chips-container {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  margin-top: 5px;
}

.spec-chips-container {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  margin-top: 6px;
  align-items: center;
}

.spec-chip {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 0.72rem;
  font-weight: 500;
  padding: 3px 8px;
  border-radius: 6px;
  line-height: 1.25;
  white-space: nowrap;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  color: #334155;
  transition: all 0.15s ease;
}

.spec-chip:hover {
  background: #f1f5f9;
  border-color: #cbd5e1;
}

.spec-chip-cpu {
  background: #f0fdf4;
  color: #15803d;
  border: 1px solid #bbf7d0;
}
.spec-chip-cpu svg {
  color: #16a34a;
}

.spec-chip-ram {
  background: #eff6ff;
  color: #1d4ed8;
  border: 1px solid #bfdbfe;
}
.spec-chip-ram svg {
  color: #2563eb;
}

.spec-chip-disk {
  background: #faf5ff;
  color: #6d28d9;
  border: 1px solid #e9d5ff;
}
.spec-chip-disk svg {
  color: #7c3aed;
}

.spec-chip-gpu {
  background: #fff7ed;
  color: #c2410c;
  border: 1px solid #fed7aa;
}
.spec-chip-gpu svg {
  color: #ea580c;
}

.spec-chip-anydesk {
  background: #fef2f2;
  color: #b91c1c;
  border: 1px solid #fecaca;
  font-family: ui-monospace, SFMono-Regular, monospace;
  font-weight: 600;
}
.spec-chip-anydesk svg {
  color: #dc2626;
}

.spec-chip-battery {
  background: #ecfdf5;
  color: #047857;
  border: 1px solid #a7f3d0;
}
.spec-chip-battery svg {
  color: #059669;
}

.spec-chip-battery.warning {
  background: #fffbeb;
  color: #b45309;
  border: 1px solid #fde68a;
}
.spec-chip-battery.warning svg {
  color: #d97706;
}

.spec-chip-battery.danger {
  background: #fef2f2;
  color: #b91c1c;
  border: 1px solid #fecaca;
}
.spec-chip-battery.danger svg {
  color: #dc2626;
}

.btn-ficha-tecnica {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  margin-top: 6px;
  padding: 3px 9px;
  font-size: 0.72rem;
  font-weight: 600;
  color: #0284c7;
  background: #f0f9ff;
  border: 1px solid #bae6fd;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  text-decoration: none;
}

.btn-ficha-tecnica:hover {
  background: #0284c7;
  color: #ffffff;
  border-color: #0284c7;
  box-shadow: 0 2px 6px rgba(2, 132, 199, 0.25);
  transform: translateY(-1px);
}

.ficha-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 14px;
  margin-bottom: 16px;
}

.ficha-card {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  padding: 14px 16px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.04);
}

.ficha-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 10px;
  padding-bottom: 6px;
  border-bottom: 1px solid #f1f5f9;
}

.ficha-card-title {
  font-size: 0.82rem;
  font-weight: 700;
  color: #0f172a;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  display: flex;
  align-items: center;
  gap: 6px;
}

.ficha-prop-row {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  padding: 4px 0;
  font-size: 0.8rem;
  border-bottom: 1px dashed #f8fafc;
}

.ficha-prop-label {
  color: #64748b;
  font-weight: 500;
}

.ficha-prop-value {
  color: #0f172a;
  font-weight: 600;
  text-align: right;
  max-width: 65%;
  word-break: break-word;
}

/* ==========================================================================
   5. TABLA DE ACTIVOS — DISEÑO PROFESIONAL & ELEGANTE
   ========================================================================== */

/* Grupo de Acciones Moderno & Cohesivo */
.asset-actions-group {
  display: inline-flex;
  align-items: center;
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  padding: 2px;
  gap: 2px;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
}

.btn-action-icon {
  width: 30px;
  height: 30px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid transparent;
  border-radius: 6px;
  background: transparent;
  color: #64748b;
  cursor: pointer;
  transition: all 0.15s cubic-bezier(0.4, 0, 0.2, 1);
  padding: 0;
  position: relative;
}

.btn-action-icon:hover {
  background: #f8fafc;
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.08);
  transform: translateY(-1px);
}

/* Hover Temático por Tipo de Acción */
.btn-action-icon.btn-action-acta:hover {
  color: #2563eb;
  border-color: #bfdbfe;
  background: #eff6ff;
}

.btn-action-icon.btn-action-maint:hover {
  color: #d97706;
  border-color: #fde68a;
  background: #fffbeb;
}

.btn-action-icon.btn-action-edit:hover {
  color: #0284c7;
  border-color: #bae6fd;
  background: #f0f9ff;
}

.btn-action-icon.btn-action-delete:hover {
  color: #dc2626;
  border-color: #fecaca;
  background: #fef2f2;
}

.btn-action-icon:active {
  transform: translateY(0) scale(0.95);
}

/* Botón Placa / QR */
.btn-qr-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3px 8px;
  font-size: 0.73rem;
  font-weight: 700;
  color: #0f172a;
  background: #f8fafc;
  border: 1px solid #cbd5e1;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.15s ease;
  line-height: 1.2;
}

.btn-qr-badge:hover {
  background: #001833;
  color: #ffffff;
  border-color: #001833;
  box-shadow: 0 2px 6px rgba(0, 24, 51, 0.2);
}

.btn-qr-badge svg {
  color: inherit;
}

.placa-text {
  font-size: 0.88rem;
  color: #001833;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-weight: 700;
  letter-spacing: 0.3px;
}

/* Badges de Tipo y Serial */
.badge-device-type {
  display: inline-flex;
  align-items: center;
  background: #f1f5f9;
  color: #475569;
  border: 1px solid #e2e8f0;
  font-size: 0.68rem;
  font-weight: 600;
  padding: 2px 6px;
  border-radius: 4px;
  text-transform: capitalize;
}

.serial-badge {
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: 0.78rem;
  font-weight: 600;
  color: #334155;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  padding: 2px 7px;
  border-radius: 5px;
  letter-spacing: 0.3px;
  display: inline-block;
}

/* Badges de Estado con Indicador de Punto */
.badge-estado {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.75rem;
  font-weight: 600;
  padding: 3px 9px;
  border-radius: 20px;
  line-height: 1.2;
  white-space: nowrap;
}

.badge-estado .status-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  flex-shrink: 0;
}

.badge-estado-operativo,
.badge-estado-asignado {
  background: #ecfdf5;
  color: #065f46;
  border: 1px solid #a7f3d0;
}
.badge-estado-operativo .status-dot,
.badge-estado-asignado .status-dot {
  background: #10b981;
  box-shadow: 0 0 0 2px rgba(16, 185, 129, 0.2);
}

.badge-estado-en-mantenimiento {
  background: #fffbeb;
  color: #92400e;
  border: 1px solid #fde68a;
}
.badge-estado-en-mantenimiento .status-dot {
  background: #f59e0b;
  box-shadow: 0 0 0 2px rgba(245, 158, 11, 0.2);
}

.badge-estado-en-bodega {
  background: #f1f5f9;
  color: #475569;
  border: 1px solid #cbd5e1;
}
.badge-estado-en-bodega .status-dot {
  background: #94a3b8;
}

.badge-estado-de-baja {
  background: #fef2f2;
  color: #991b1b;
  border: 1px solid #fecaca;
}
.badge-estado-de-baja .status-dot {
  background: #ef4444;
}

/* Modal Selector GPS Interactivo (Leaflet Map Picker) */
#modal-map-picker {
  z-index: 100005 !important;
}

#modal-map-picker .modal-content {
  max-width: 780px;
  background: #ffffff;
  border-radius: 14px;
  box-shadow: 0 25px 50px -12px rgba(15, 23, 42, 0.45);
}

.custom-picker-pin {
  filter: drop-shadow(0 4px 6px rgba(0, 0, 0, 0.3));
  transition: transform 0.15s ease;
}

.custom-picker-pin:hover {
  transform: scale(1.12);
}

/* ==========================================================
   CONSOLA DE ÓRDENES REMOTAS (USBING.BOT) - ESTILO CORPORATIVO
   ========================================================== */
.orders-console-wrap {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.orders-top-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: linear-gradient(135deg, #121c2e 0%, #1e293b 100%);
  padding: 12px 16px;
  border-radius: 12px;
  color: #ffffff;
  flex-wrap: wrap;
  gap: 12px;
  box-shadow: 0 4px 12px rgba(15, 23, 42, 0.12);
}

.orders-segment-nav {
  display: inline-flex;
  background: rgba(255, 255, 255, 0.08);
  padding: 4px;
  border-radius: 10px;
  gap: 4px;
  flex-wrap: wrap;
}

.orders-segment-btn {
  border: none;
  background: transparent;
  color: #cbd5e1;
  font-size: 0.8rem;
  font-weight: 600;
  padding: 7px 14px;
  border-radius: 7px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  transition: all 0.18s ease;
}

.orders-segment-btn:hover {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.06);
}

.orders-segment-btn.active {
  background: #2563A6;
  color: #ffffff;
  box-shadow: 0 2px 8px rgba(37, 99, 166, 0.45);
}

.orders-panel-card {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  padding: 18px 20px;
  box-shadow: 0 2px 6px rgba(15, 23, 42, 0.04);
}

.orders-layout-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  margin-bottom: 16px;
}

@media (max-width: 720px) {
  .orders-layout-grid {
    grid-template-columns: 1fr;
  }
}

.orders-layout-option {
  border: 1.5px solid #e2e8f0;
  border-radius: 10px;
  padding: 11px 13px;
  cursor: pointer;
  background: #f8fafc;
  transition: all 0.16s ease;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.orders-layout-option:hover {
  border-color: #93c5fd;
  background: #ffffff;
}

.orders-layout-option.selected {
  border-color: #2563A6;
  background: #eff6ff;
  box-shadow: 0 0 0 3px rgba(37, 99, 166, 0.12);
}

.orders-layout-option-title {
  font-size: 0.82rem;
  font-weight: 700;
  color: #0f172a;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.orders-layout-option-desc {
  font-size: 0.73rem;
  color: #64748b;
  line-height: 1.35;
}

.orders-field-label {
  display: block;
  font-size: 0.73rem;
  font-weight: 700;
  color: #334155;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  margin-bottom: 5px;
}

.orders-quick-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 12px;
}

.orders-quick-card {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  padding: 13px 15px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  transition: all 0.18s ease;
}

.orders-quick-card:hover {
  background: #ffffff;
  border-color: #cbd5e1;
  box-shadow: 0 4px 12px rgba(15, 23, 42, 0.06);
  transform: translateY(-1px);
}

.orders-quick-icon {
  width: 36px;
  height: 36px;
  border-radius: 9px;
  background: #eff6ff;
  color: #2563A6;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.orders-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.8rem;
}

.orders-table th {
  background: #f8fafc;
  color: #475569;
  font-size: 0.71rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  padding: 10px 12px;
  border-bottom: 1px solid #e2e8f0;
  text-align: left;
  white-space: nowrap;
}

.orders-table td {
  padding: 10px 12px;
  border-bottom: 1px solid #f1f5f9;
  vertical-align: middle;
  color: #1e293b;
}

.orders-table tr:last-child td {
  border-bottom: none;
}

.orders-table tr:hover td {
  background: #f8fafc;
}




/* ==========================================================================
   VISTA DUAL: PERSPECTIVA EQUIPOS VS PERSONAS (DOTACIÓN) & TARJETAS CUSTODIO
   ========================================================================== */
.view-mode-toggle {
  display: inline-flex;
  background: #f1f5f9;
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  padding: 3px;
  gap: 3px;
}

.btn-toggle-view {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  font-size: 0.82rem;
  font-weight: 600;
  color: #64748b;
  background: transparent;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.15s ease-in-out;
  white-space: nowrap;
}

.btn-toggle-view:hover {
  color: #1e293b;
  background: rgba(255, 255, 255, 0.6);
}

.btn-toggle-view.active {
  color: #0284c7;
  background: #ffffff;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
  font-weight: 700;
}

.custodio-card-mini {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 6px;
  padding: 6px 8px;
  font-size: 0.75rem;
  margin-top: 4px;
  transition: border-color 0.15s;
}

.custodio-card-mini:hover {
  border-color: #cbd5e1;
  background: #f1f5f9;
}

.badge-mini-cargo {
  background: #e0f2fe;
  color: #0369a1;
  padding: 1px 5px;
  border-radius: 4px;
  font-size: 0.68rem;
  font-weight: 600;
  display: inline-block;
}

.badge-mini-area {
  background: #fef3c7;
  color: #92400e;
  padding: 1px 5px;
  border-radius: 4px;
  font-size: 0.68rem;
  font-weight: 600;
  display: inline-block;
}

.people-grid-wrap {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.person-card {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  box-shadow: 0 2px 6px rgba(15, 23, 42, 0.04);
  overflow: hidden;
  transition: box-shadow 0.2s, border-color 0.2s;
}

.person-card:hover {
  border-color: #cbd5e1;
  box-shadow: 0 4px 12px rgba(15, 23, 42, 0.08);
}

.person-header {
  padding: 14px 18px;
  background: #f8fafc;
  border-bottom: 1px solid #e2e8f0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  flex-wrap: wrap;
}

.person-identity {
  display: flex;
  align-items: center;
  gap: 12px;
}

.person-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: #e0f2fe;
  color: #0284c7;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 1rem;
  flex-shrink: 0;
  border: 1px solid #bae6fd;
}

.person-avatar.unassigned {
  background: #f1f5f9;
  color: #64748b;
  border-color: #cbd5e1;
}

.person-name-box {
  display: flex;
  flex-direction: column;
}

.person-name {
  font-size: 0.96rem;
  font-weight: 700;
  color: #0f172a;
}

.person-meta {
  display: flex;
  gap: 8px;
  align-items: center;
  flex-wrap: wrap;
  font-size: 0.74rem;
  color: #64748b;
  margin-top: 3px;
}

.person-meta-item {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.person-assets-count {
  font-size: 0.75rem;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: 20px;
  background: #eff6ff;
  color: #1d4ed8;
  border: 1px solid #bfdbfe;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.person-assets-count.zero {
  background: #f8fafc;
  color: #64748b;
  border-color: #e2e8f0;
}

.person-assets-table {
  width: 100%;
  border-collapse: collapse;
}

.person-assets-table th {
  background: #ffffff;
  color: #64748b;
  font-size: 0.70rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  padding: 8px 16px;
  border-bottom: 1px solid #f1f5f9;
  text-align: left;
}

.person-assets-table td {
  padding: 10px 16px;
  border-bottom: 1px solid #f8fafc;
  vertical-align: middle;
  font-size: 0.82rem;
}

.person-assets-table tr:last-child td {
  border-bottom: none;
}

.person-assets-table tr:hover td {
  background: #f8fafc;
}


/* ==========================================================================
   DISEÑO SAAS EXACTO AL MOCKUP: CATEGORY PILLS, TABLA ELEGANTE Y AVATARES
   ========================================================================== */
.saas-controls-row {
  display: flex;
  flex-direction: column;
  gap: 16px;
  margin-bottom: 16px;
}
@media (min-width: 1024px) {
  .saas-controls-row {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
  }
}

.saas-view-switcher {
  display: inline-flex;
  align-items: center;
  border-radius: 12px;
  border: 1px solid #e2e8f0;
  background: #f1f5f9;
  padding: 4px;
  gap: 4px;
}

.saas-view-tab {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border-radius: 8px;
  padding: 8px 16px;
  font-size: 0.85rem;
  font-weight: 500;
  color: #475569;
  background: transparent;
  border: none;
  cursor: pointer;
  transition: all 0.15s ease-in-out;
}
.saas-view-tab:hover {
  color: #0f172a;
}
.saas-view-tab.active {
  background: #ffffff;
  color: #2563eb;
  font-weight: 600;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
}

.saas-category-pills {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}

.cat-pill {
  display: inline-flex;
  align-items: center;
  border-radius: 9999px;
  border: 1px solid #e2e8f0;
  background: #ffffff;
  padding: 6px 14px;
  font-size: 0.75rem;
  font-weight: 500;
  color: #475569;
  cursor: pointer;
  transition: all 0.15s;
  white-space: nowrap;
}
.cat-pill:hover {
  border-color: #cbd5e1;
  background: #f8fafc;
}
.cat-pill.active {
  background: #2563eb;
  border-color: #2563eb;
  color: #ffffff;
  font-weight: 600;
  box-shadow: 0 1px 3px rgba(37, 99, 235, 0.25);
}

.saas-search-filter-card {
  display: flex;
  flex-direction: column;
  gap: 12px;
  border-radius: 16px;
  border: 1px solid #e2e8f0;
  background: #ffffff;
  padding: 16px;
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.04);
  margin-bottom: 20px;
}
@media (min-width: 768px) {
  .saas-search-filter-card {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
  }
}

.saas-search-box {
  display: flex;
  flex: 1;
  flex-direction: column;
  gap: 10px;
}
@media (min-width: 640px) {
  .saas-search-box {
    flex-direction: row;
    align-items: center;
  }
}

.saas-input-wrap {
  position: relative;
  flex: 1;
}
.saas-input-wrap svg {
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  color: #94a3b8;
  pointer-events: none;
}
.saas-input-wrap input {
  width: 100%;
  border-radius: 12px;
  border: 1px solid #e2e8f0;
  background: #f8fafc;
  padding: 10px 14px 10px 38px;
  font-size: 0.86rem;
  color: #0f172a;
  outline: none;
  transition: all 0.15s;
}
.saas-input-wrap input:focus {
  background: #ffffff;
  border-color: #2563eb;
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.saas-btn-qr {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border-radius: 12px;
  border: 1px solid #e2e8f0;
  background: #ffffff;
  padding: 10px 16px;
  font-size: 0.86rem;
  font-weight: 500;
  color: #334155;
  cursor: pointer;
  transition: all 0.15s;
  white-space: nowrap;
}
.saas-btn-qr:hover {
  background: #f8fafc;
  color: #0f172a;
  border-color: #cbd5e1;
}

.saas-select-wrap {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
}
.saas-select {
  border-radius: 12px;
  border: 1px solid #e2e8f0;
  background: #ffffff;
  padding: 9px 34px 9px 14px;
  font-size: 0.85rem;
  font-weight: 500;
  color: #334155;
  cursor: pointer;
}
.saas-select:focus {
  border-color: #2563eb;
  outline: none;
}

/* Tabla SaaS Rediseñada */
.saas-table-card {
  border-radius: 16px;
  border: 1px solid #e2e8f0;
  background: #ffffff;
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.04);
  overflow: hidden;
}

.saas-table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
}

.saas-table thead tr {
  border-bottom: 1px solid #e2e8f0;
  background: #f8fafc;
}

.saas-table th {
  padding: 14px 20px;
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: #64748b;
  white-space: nowrap;
}

.saas-table tbody tr {
  border-bottom: 1px solid #f1f5f9;
  transition: background-color 0.15s;
}
.saas-table tbody tr:hover {
  background-color: #f8fafc;
}

.saas-table td {
  padding: 16px 20px;
  font-size: 0.86rem;
  vertical-align: middle;
}

/* Celdas específicas */
.saas-device-box {
  display: flex;
  align-items: flex-start;
  gap: 12px;
}
.saas-device-icon {
  width: 38px;
  height: 38px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  margin-top: 2px;
}
.saas-device-icon.indigo { background: #e0e7ff; color: #4f46e5; }
.saas-device-icon.blue { background: #eff6ff; color: #2563eb; }
.saas-device-icon.amber { background: #fef3c7; color: #d97706; }
.saas-device-icon.emerald { background: #ecfdf5; color: #059669; }
.saas-device-icon.purple { background: #f5f3ff; color: #7c3aed; }
.saas-device-icon.slate { background: #f1f5f9; color: #475569; }

.saas-device-title {
  font-weight: 600;
  color: #0f172a;
  cursor: pointer;
  transition: color 0.15s;
}
.saas-device-title:hover {
  color: #2563eb;
}
.saas-device-sub {
  font-size: 0.75rem;
  color: #64748b;
  margin-top: 2px;
}

.saas-serial-code {
  display: inline-flex;
  padding: 3px 8px;
  border-radius: 6px;
  background: #f1f5f9;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: 0.74rem;
  font-weight: 500;
  color: #334155;
}

.saas-sede-name {
  font-weight: 500;
  color: #1e293b;
}
.saas-cost-center {
  font-size: 0.72rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: #94a3b8;
  margin-top: 2px;
}

.saas-custodio-box {
  display: flex;
  align-items: center;
  gap: 10px;
}
.saas-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.75rem;
  font-weight: 600;
  flex-shrink: 0;
}
.saas-avatar.blue { background: #dbeafe; color: #1d4ed8; }
.saas-avatar.emerald { background: #d1fae5; color: #047857; }
.saas-avatar.violet { background: #ede9fe; color: #6d28d9; }
.saas-avatar.amber { background: #fef3c7; color: #b45309; }
.saas-avatar.rose { background: #ffe4e6; color: #be123c; }
.saas-avatar.unassigned { background: #f1f5f9; color: #94a3b8; }

.saas-custodio-name {
  font-weight: 500;
  color: #334155;
}

.saas-pill-status {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border-radius: 9999px;
  font-size: 0.75rem;
  font-weight: 500;
}
.saas-pill-status .dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
}
.saas-pill-status.operativo { background: #ecfdf5; color: #047857; }
.saas-pill-status.operativo .dot { background: #10b981; }
.saas-pill-status.bodega { background: #f1f5f9; color: #475569; }
.saas-pill-status.bodega .dot { background: #64748b; }
.saas-pill-status.mantenimiento { background: #f5f3ff; color: #6d28d9; }
.saas-pill-status.mantenimiento .dot { background: #8b5cf6; }
.saas-pill-status.sin_garantia { background: #f1f5f9; color: #64748b; }
.saas-pill-status.sin_garantia .dot { background: #94a3b8; }
.saas-pill-status.vigente { background: #ecfdf5; color: #047857; }
.saas-pill-status.vigente .dot { background: #10b981; }
.saas-pill-status.por_vencer { background: #fffbeb; color: #b45309; }
.saas-pill-status.por_vencer .dot { background: #f59e0b; }

.saas-actions-cell {
  text-align: right;
  white-space: nowrap;
}
.saas-action-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: 8px;
  border: none;
  background: transparent;
  color: #94a3b8;
  cursor: pointer;
  transition: all 0.15s;
}
.saas-action-btn:hover {
  background: #f1f5f9;
  color: #1e293b;
}
.saas-action-btn.view:hover { background: #eff6ff; color: #2563eb; }
.saas-action-btn.edit:hover { background: #f8fafc; color: #334155; }
.saas-action-btn.delete:hover { background: #fff1f2; color: #e11d48; }

/* ==========================================================================
   MODAL FICHA TÉCNICA SAAS (FIEL A LA MAQUETA)
   ========================================================================== */
.saas-modal-tech-sheet {
  max-width: 1040px !important;
  width: 95% !important;
  border-radius: 20px !important;
  overflow: hidden !important;
  background: #f8fafc !important;
  border: 1px solid #e2e8f0 !important;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25) !important;
  max-height: 92vh !important;
  display: flex !important;
  flex-direction: column !important;
  padding: 0 !important;
}
.saas-modal-header {
  background: #ffffff !important;
  border-bottom: 1px solid #e2e8f0 !important;
  padding: 20px 24px 16px 24px !important;
  flex-shrink: 0 !important;
}
.saas-device-badge {
  display: inline-flex !important;
  align-items: center !important;
  gap: 6px !important;
  padding: 3px 10px !important;
  border-radius: 9999px !important;
  font-size: 0.74rem !important;
  font-weight: 600 !important;
  background: #eff6ff !important;
  color: #1d4ed8 !important;
  border: 1px solid #bfdbfe !important;
}
.saas-device-badge .dot {
  width: 6px !important;
  height: 6px !important;
  border-radius: 50% !important;
  background: #2563eb !important;
}
.saas-modal-close-circle {
  width: 36px !important;
  height: 36px !important;
  border-radius: 50% !important;
  background: #f1f5f9 !important;
  color: #64748b !important;
  border: none !important;
  outline: none !important;
  cursor: pointer !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  transition: all 0.15s !important;
  flex-shrink: 0 !important;
}
.saas-modal-close-circle:hover {
  background: #e2e8f0 !important;
  color: #0f172a !important;
}
.saas-modal-tabs {
  display: flex !important;
  flex-wrap: wrap !important;
  align-items: center !important;
  gap: 8px !important;
  margin-top: 18px !important;
  padding-top: 12px !important;
  border-top: 1px solid #f1f5f9 !important;
}
.saas-modal-tab-btn {
  display: inline-flex !important;
  align-items: center !important;
  gap: 8px !important;
  padding: 8px 16px !important;
  border-radius: 8px !important;
  font-size: 0.85rem !important;
  font-weight: 500 !important;
  border: 1px solid #e2e8f0 !important;
  background: #ffffff !important;
  color: #475569 !important;
  cursor: pointer !important;
  outline: none !important;
  transition: all 0.15s !important;
}
.saas-modal-tab-btn:hover {
  background: #f8fafc !important;
  color: #0f172a !important;
}
.saas-modal-tab-btn.active {
  background: #2563eb !important;
  color: #ffffff !important;
  border-color: #2563eb !important;
  font-weight: 600 !important;
  box-shadow: 0 1px 3px rgba(37, 99, 235, 0.25) !important;
}
.saas-modal-tab-btn.active svg {
  color: #ffffff !important;
  stroke: #ffffff !important;
}
.saas-modal-tab-btn .tab-badge {
  padding: 2px 7px !important;
  border-radius: 6px !important;
  font-size: 0.72rem !important;
  font-weight: 700 !important;
  background: #f1f5f9 !important;
  color: #475569 !important;
  margin-left: 2px !important;
}
.saas-modal-tab-btn.active .tab-badge {
  background: rgba(255, 255, 255, 0.22) !important;
  color: #ffffff !important;
}
.saas-modal-tab-btn .tab-badge.green {
  background: #ecfdf5 !important;
  color: #047857 !important;
}
.saas-modal-tab-btn.active .tab-badge.green {
  background: rgba(255, 255, 255, 0.25) !important;
  color: #ffffff !important;
}

/* Custodian Card */
.saas-ft-custodian-card {
  background: #ffffff !important;
  border-radius: 16px !important;
  border: 1px solid #bfdbfe !important;
  box-shadow: 0 1px 3px rgba(37, 99, 235, 0.06) !important;
  overflow: hidden !important;
  margin-bottom: 24px !important;
}
.saas-ft-custodian-header {
  background: linear-gradient(90deg, #eff6ff 0%, #eef2ff 60%, #ffffff 100%) !important;
  padding: 12px 20px !important;
  border-bottom: 1px solid #dbeafe !important;
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
}
.saas-ft-custodian-body {
  padding: 20px !important;
  display: flex !important;
  flex-direction: row !important;
  align-items: center !important;
  gap: 24px !important;
  flex-wrap: wrap !important;
}

/* Technical Specs Grid & Cards */
.saas-ft-grid {
  display: grid !important;
  grid-template-columns: repeat(auto-fit, minmax(360px, 1fr)) !important;
  gap: 20px !important;
}
.saas-ft-card {
  background: #ffffff !important;
  border-radius: 14px !important;
  border: 1px solid #e2e8f0 !important;
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.04) !important;
  padding: 18px 20px !important;
  display: flex !important;
  flex-direction: column !important;
}
.saas-ft-card-header {
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  padding-bottom: 12px !important;
  margin-bottom: 12px !important;
  border-bottom: 1px solid #f1f5f9 !important;
}
.saas-ft-card-header .header-left {
  display: flex !important;
  align-items: center !important;
  gap: 10px !important;
}
.saas-ft-card-header .header-left svg {
  width: 18px !important;
  height: 18px !important;
  color: #64748b !important;
}
.saas-ft-card-header h3 {
  margin: 0 !important;
  font-size: 0.75rem !important;
  font-weight: 700 !important;
  text-transform: uppercase !important;
  letter-spacing: 0.05em !important;
  color: #1e293b !important;
}
.badge-audit {
  padding: 3px 9px !important;
  border-radius: 9999px !important;
  font-size: 0.72rem !important;
  font-weight: 600 !important;
  background: #ecfdf5 !important;
  color: #047857 !important;
  border: 1px solid #a7f3d0 !important;
}
.badge-smart {
  padding: 3px 9px !important;
  border-radius: 9999px !important;
  font-size: 0.72rem !important;
  font-weight: 600 !important;
  background: #fffbeb !important;
  color: #b45309 !important;
  border: 1px solid #fde68a !important;
}
.badge-prot {
  padding: 3px 9px !important;
  border-radius: 9999px !important;
  font-size: 0.72rem !important;
  font-weight: 600 !important;
  background: #eff6ff !important;
  color: #1d4ed8 !important;
  border: 1px solid #bfdbfe !important;
}
.badge-alert {
  padding: 3px 9px !important;
  border-radius: 9999px !important;
  font-size: 0.72rem !important;
  font-weight: 700 !important;
  background: #fef3c7 !important;
  color: #92400e !important;
  border: 1px solid #f59e0b !important;
}

.saas-ft-list {
  margin: 0 !important;
  padding: 0 !important;
  display: flex !important;
  flex-direction: column !important;
}
.saas-ft-list .row {
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  padding: 10px 0 !important;
  border-bottom: 1px solid #f8fafc !important;
  font-size: 0.85rem !important;
  gap: 16px !important;
}
.saas-ft-list .row:last-child {
  border-bottom: none !important;
  padding-bottom: 2px !important;
}
.saas-ft-list dt {
  color: #64748b !important;
  font-weight: 400 !important;
}
.saas-ft-list dd {
  margin: 0 !important;
  font-weight: 600 !important;
  color: #0f172a !important;
  text-align: right !important;
}
.saas-ft-list dd.text-blue { color: #2563eb !important; }
.saas-ft-list dd.text-amber { color: #b45309 !important; }
.saas-ft-list dd.text-emerald { color: #059669 !important; }
.saas-ft-list dd.text-slate { color: #64748b !important; font-weight: 500 !important; }
