/* PMC Styles v2 a Plain CSS (Tailwind via CDN for utility classes) */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800&display=swap');

* {
  box-sizing: border-box;
}

body {
  font-family: 'Inter', sans-serif;
}

.hidden {
  display: none !important;
}

/* aa Animations aa */
.view-section {
  animation: fadeIn 0.2s ease-in;
}

.fade-in {
  animation: fadeIn 0.2s ease-in;
}

#app-navbar {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 70;
}

.nav-shell {
  display: grid;
  grid-template-columns: minmax(16rem, 22rem) minmax(0, 1fr);
  align-items: center;
  gap: 1rem;
  min-height: 4rem;
}

.nav-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex: 1 1 auto;
  min-width: 0;
}

.nav-brand-wrap {
  min-width: 0;
  padding-right: 0.5rem;
}

.nav-brand {
  display: block;
  line-height: 1.1;
  max-width: 21rem;
  font-size: 0.92rem;
}

.nav-mobile-actions {
  display: none;
}

.nav-mobile-panel {
  display: grid;
  grid-template-columns: minmax(0, 1fr) max-content;
  align-items: center;
  gap: 0.75rem;
  flex: 1 1 auto;
  min-width: 0;
}

#nav-links {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.2rem;
  flex-wrap: wrap;
  min-width: 0;
}

.nav-user-tools {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 0.4rem;
  flex-wrap: nowrap;
  min-width: 0;
}

.nav-mobile-toggle {
  display: inline-flex;
  flex-direction: column;
  justify-content: center;
  gap: 0.28rem;
  width: 2.75rem;
  height: 2.75rem;
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 0.9rem;
  background: rgba(15, 23, 42, 0.16);
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s;
}

.nav-mobile-toggle:hover {
  background: rgba(255, 255, 255, 0.12);
  border-color: rgba(255, 255, 255, 0.4);
}

.nav-mobile-toggle__line {
  display: block;
  width: 1.15rem;
  height: 2px;
  margin: 0 auto;
  border-radius: 9999px;
  background: #fff;
}

body {
  padding-top: 4rem;
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(6px);
  }

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

/* aa Card aa */
.card {
  background: #fff;
  border-radius: 1rem;
  box-shadow: 0 1px 4px rgba(0, 0, 0, .06);
  padding: 1.5rem;
  border: 1px solid #f1f5f9;
}

/* aa Labels & Inputs aa */
.label {
  display: block;
  font-size: 0.7rem;
  font-weight: 700;
  color: #64748b;
  margin-bottom: 0.25rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.input-field {
  display: block;
  width: 100%;
  border-radius: 0.5rem;
  border: 1px solid #e2e8f0;
  background: #f8fafc;
  padding: 0.55rem 0.75rem;
  font-size: 0.875rem;
  outline: none;
  transition: border-color 0.15s, box-shadow 0.15s;
  font-family: inherit;
}

.input-field:focus {
  border-color: #6366f1;
  box-shadow: 0 0 0 3px rgba(99, 102, 241, .15);
}

#req-descripcion-grupo-editor:empty::before {
  content: attr(data-placeholder);
  color: #94a3b8;
}

.requisition-shell {
  background:
    radial-gradient(circle at top right, rgba(99, 102, 241, 0.12), transparent 24rem),
    linear-gradient(180deg, #f8fbff 0%, #f8fafc 100%);
  border: 1px solid #dbeafe;
  border-radius: 1.5rem;
  padding: 1.25rem;
  box-shadow: 0 18px 42px rgba(15, 23, 42, 0.08);
  display: grid;
  gap: 1rem;
}

.requisition-shell__header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 1rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid rgba(148, 163, 184, 0.22);
}

.requisition-shell__eyebrow {
  margin: 0 0 0.35rem;
  font-size: 0.7rem;
  font-weight: 800;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: #4f46e5;
}

.requisition-shell__title {
  margin: 0;
  font-size: 1.15rem;
  line-height: 1.2;
  font-weight: 800;
  color: #0f172a;
}

.requisition-shell__subtitle {
  margin: 0.45rem 0 0;
  max-width: 58rem;
  font-size: 0.92rem;
  line-height: 1.55;
  color: #475569;
}

.requisition-kpis {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.85rem;
}

.requisition-kpi-card {
  background: rgba(255, 255, 255, 0.88);
  border: 1px solid #dbeafe;
  border-radius: 1rem;
  padding: 1rem;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.8);
}

.requisition-kpi-card--highlight {
  background: linear-gradient(135deg, #0f766e, #0f766e 8%, #0f172a 100%);
  border-color: #0f766e;
}

.requisition-kpi-card__label {
  display: block;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #64748b;
}

.requisition-kpi-card--highlight .requisition-kpi-card__label {
  color: rgba(240, 253, 250, 0.74);
}

.requisition-kpi-card__value {
  display: block;
  margin-top: 0.45rem;
  font-size: 1.4rem;
  line-height: 1.1;
  font-weight: 800;
  color: #0f172a;
}

.requisition-kpi-card--highlight .requisition-kpi-card__value {
  color: #f8fafc;
}

.requisition-panel {
  background: rgba(255, 255, 255, 0.9);
  border: 1px solid rgba(148, 163, 184, 0.18);
  border-radius: 1.25rem;
  padding: 1rem;
  box-shadow: 0 10px 30px rgba(15, 23, 42, 0.05);
}

.requisition-panel__intro {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 0.75rem;
  margin-bottom: 0.9rem;
}

.requisition-panel__title {
  margin: 0;
  font-size: 0.98rem;
  font-weight: 800;
  color: #0f172a;
}

.requisition-panel__text {
  margin: 0.3rem 0 0;
  font-size: 0.84rem;
  line-height: 1.55;
  color: #64748b;
}

.quote-summary-panel {
  background: linear-gradient(180deg, #ffffff 0%, #f8fafc 100%);
  border: 1px solid #dbeafe;
  border-radius: 1.25rem;
  padding: 1rem;
  box-shadow: 0 16px 36px rgba(15, 23, 42, 0.08);
}

.quote-summary-panel--compact {
  align-self: start;
}

.quote-summary-panel__eyebrow {
  font-size: 0.72rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: #0f766e;
}

.quote-summary-panel__title {
  margin: 0.3rem 0 1rem;
  font-size: 1rem;
  line-height: 1.3;
  font-weight: 800;
  color: #0f172a;
}

.quote-summary-panel__note {
  margin: 0.85rem 0 0;
  font-size: 0.83rem;
  line-height: 1.6;
  color: #64748b;
}

.quote-summary-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  padding: 0.8rem 0;
  border-bottom: 1px solid #e2e8f0;
  font-size: 0.92rem;
  color: #334155;
}

.quote-summary-row strong {
  font-size: 1rem;
  color: #0f172a;
}

.quote-summary-row--total {
  border-bottom: none;
  padding-bottom: 0;
}

.quote-summary-row--total strong {
  font-size: 1.25rem;
  color: #0f766e;
}

.req-lines-stack {
  display: grid;
  gap: 0.95rem;
}

.req-line-card {
  position: relative;
  background: linear-gradient(180deg, #ffffff 0%, #f8fafc 100%);
  border: 1px solid #dbeafe;
  border-radius: 1.25rem;
  padding: 1rem;
  box-shadow: 0 10px 28px rgba(15, 23, 42, 0.06);
}

.req-line-card__head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 0.85rem;
}

.req-line-card__title {
  display: flex;
  align-items: center;
  gap: 0.6rem;
}

.req-line-number-badge {
  display: inline-flex;
  justify-content: center;
  align-items: center;
  width: 2rem;
  height: 2rem;
  border-radius: 9999px;
  background: #e0e7ff;
  color: #3730a3;
  font-size: 0.9rem;
  font-weight: 800;
}

.req-line-card__name {
  font-size: 0.95rem;
  font-weight: 800;
  color: #0f172a;
}

.req-line-mode-pill {
  display: inline-flex;
  align-items: center;
  padding: 0.3rem 0.7rem;
  border-radius: 9999px;
  background: #ecfeff;
  color: #0f766e;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.req-line-remove {
  border: 1px solid #fecaca;
  background: #fef2f2;
  color: #dc2626;
  border-radius: 0.85rem;
  padding: 0.55rem 0.8rem;
  font-size: 0.78rem;
  font-weight: 700;
  cursor: pointer;
  transition: background 0.15s, transform 0.15s;
}

.req-line-remove:hover {
  background: #fee2e2;
  transform: translateY(-1px);
}

.req-mini-label {
  display: block;
  margin-bottom: 0.3rem;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #64748b;
}

.req-line-card textarea.input-field {
  min-height: 5.8rem;
  resize: vertical;
}

.req-line-card .input-field[readonly],
.req-line-card .input-field:read-only {
  background: #eef2ff;
  color: #312e81;
  font-weight: 700;
}

.requisition-group-editor {
  min-height: 10rem;
  padding-top: 0.9rem;
  padding-bottom: 0.9rem;
  line-height: 1.65;
}

.procedure-setup-card {
  background: linear-gradient(180deg, #ffffff 0%, #f8fafc 100%);
  border: 1px solid #dbeafe;
  border-radius: 1.2rem;
  padding: 1rem;
  box-shadow: 0 10px 30px rgba(15, 23, 42, 0.06);
}

.procedure-setup-compact {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  background: linear-gradient(90deg, #eff6ff 0%, #ffffff 100%);
  border: 1px solid #bfdbfe;
  border-radius: 1rem;
  padding: 0.85rem 1rem;
}

.procedure-setup-compact__eyebrow {
  margin: 0 0 0.2rem;
  font-size: 0.7rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #1d4ed8;
}

.procedure-setup-compact__text {
  font-size: 0.88rem;
  color: #334155;
}

@media (min-width: 1280px) {
  #procedure-layout {
    grid-template-columns: minmax(0, 1fr) !important;
  }

  #procedure-sidebar,
  #procedure-main {
    grid-column: 1 / -1 !important;
  }

  #procedure-sidebar {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(220px, 300px) minmax(190px, 240px);
    gap: 1rem;
    align-items: end;
  }

  #procedure-setup-panel {
    grid-column: 1 / -1;
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 0.85rem 1rem;
    align-items: end;
  }

  #procedure-setup-panel > .flex,
  #procedure-setup-panel > .bg-amber-50,
  #workflow-preview {
    grid-column: 1 / -1;
  }

  .procedure-file-control,
  .procedure-submit-actions {
    align-self: end;
  }

  .procedure-file-control {
    grid-column: 1 / 3;
  }

  .procedure-submit-actions {
    grid-column: 3 / 4;
  }
}

/* aa Buttons aa */
.btn-primary {
  display: inline-flex;
  justify-content: center;
  align-items: center;
  padding: 0.6rem 1rem;
  border-radius: 0.5rem;
  font-size: 0.875rem;
  font-weight: 600;
  color: #fff;
  background: #4f46e5;
  border: none;
  cursor: pointer;
  transition: background 0.15s, box-shadow 0.15s;
}

.btn-primary:hover {
  background: #4338ca;
}

.btn-primary:active {
  background: #3730a3;
}

.btn-secondary {
  display: inline-flex;
  justify-content: center;
  align-items: center;
  padding: 0.6rem 1rem;
  border-radius: 0.5rem;
  font-size: 0.875rem;
  font-weight: 600;
  color: #4f46e5;
  background: #eef2ff;
  border: 1px solid #c7d2fe;
  cursor: pointer;
  transition: background 0.15s;
}

.btn-secondary:hover {
  background: #e0e7ff;
}

.btn-danger {
  display: inline-flex;
  justify-content: center;
  align-items: center;
  padding: 0.6rem 1rem;
  border-radius: 0.5rem;
  font-size: 0.875rem;
  font-weight: 600;
  color: #fff;
  background: #ef4444;
  border: none;
  cursor: pointer;
  transition: background 0.15s;
}

.btn-danger:hover {
  background: #dc2626;
}

/* aa Nav Buttons aa */
.nav-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 2.05rem;
  padding: 0.42rem 0.62rem;
  border-radius: 0.6rem;
  font-size: 0.78rem;
  line-height: 1;
  font-weight: 600;
  white-space: nowrap;
  color: #fff;
  background: transparent;
  border: none;
  cursor: pointer;
  transition: background 0.15s;
}

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

.nav-btn-danger {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 2.15rem;
  padding: 0.5rem 0.78rem;
  border-radius: 0.7rem;
  font-size: 0.78rem;
  line-height: 1;
  font-weight: 700;
  white-space: nowrap;
  color: #fff;
  background: rgba(239, 68, 68, 0.92);
  border: none;
  cursor: pointer;
  transition: background 0.15s;
}

.nav-btn-danger:hover {
  background: #ef4444;
}

#user-badge {
  display: inline-flex;
  align-items: center;
  min-width: 0;
  max-width: 11rem;
  padding: 0.48rem 0.75rem;
  border-radius: 9999px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  background: rgba(255, 255, 255, 0.16) !important;
  font-size: 0.75rem;
  line-height: 1;
}

#notif-bell {
  flex: 0 0 auto;
  width: 2rem;
  height: 2rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

@media (max-width: 1280px) {
  .nav-shell {
    grid-template-columns: minmax(12rem, 17rem) minmax(0, 1fr);
    gap: 0.65rem;
  }

  .nav-brand {
    max-width: 16rem;
    font-size: 0.84rem;
  }

  .nav-user-tools {
    gap: 0.45rem;
  }

  #user-badge {
    max-width: 9rem;
    font-size: 0.7rem;
  }
}

@media (max-width: 1120px) {
  .nav-shell {
    grid-template-columns: minmax(10rem, 14rem) minmax(0, 1fr);
  }

  .nav-mobile-panel {
    grid-template-columns: 1fr;
    align-items: stretch;
  }

  #nav-links {
    justify-content: flex-start;
  }

  .nav-user-tools {
    justify-content: space-between;
  }

  #user-badge {
    max-width: 12rem;
    flex: 1 1 auto;
  }
}

.ctrl-important-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.25rem;
  height: 2.25rem;
  border-radius: 9999px;
  border: 1px solid #cbd5e1;
  background: #fff;
  color: #94a3b8;
  cursor: pointer;
  transition: transform 0.15s, background 0.15s, color 0.15s, border-color 0.15s, box-shadow 0.15s;
}

.ctrl-important-btn:hover {
  transform: translateY(-1px);
  border-color: #f59e0b;
  color: #f59e0b;
  box-shadow: 0 8px 20px rgba(245, 158, 11, 0.18);
}

.ctrl-important-btn.is-active {
  background: linear-gradient(135deg, #fff7cc 0%, #fef08a 100%);
  border-color: #f59e0b;
  color: #b45309;
  box-shadow: 0 10px 22px rgba(245, 158, 11, 0.22);
}

.ctrl-important-btn__icon {
  font-size: 1rem;
  line-height: 1;
}

.ctrl-row-important {
  background: linear-gradient(90deg, rgba(254, 249, 195, 0.55) 0%, rgba(255, 255, 255, 0) 16rem);
}

.ctrl-title-row {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  flex-wrap: wrap;
}

.ctrl-important-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  padding: 0.15rem 0.5rem;
  border-radius: 9999px;
  background: #fef3c7;
  color: #92400e;
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

/* aa Admin Tabs aa */
.tab-btn {
  padding: 0.5rem 1rem;
  border-radius: 0.5rem;
  font-size: 0.875rem;
  font-weight: 600;
  color: #64748b;
  background: transparent;
  border: none;
  cursor: pointer;
  transition: background 0.15s, color 0.15s;
}

.tab-btn:hover {
  background: #f1f5f9;
  color: #334155;
}

.tab-btn.active {
  background: #4f46e5;
  color: #fff;
}

.workflow-studio {
  height: calc(100vh - 120px);
  min-height: 800px;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border: 1px solid #dbeafe;
  border-radius: 1.25rem;
  background: #fff;
  box-shadow: 0 24px 70px rgba(15, 23, 42, 0.08);
}

.workflow-studio__bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1rem 1.25rem;
  background: linear-gradient(135deg, #f8fbff 0%, #eef5ff 55%, #fff7ed 100%);
  border-bottom: 1px solid #dbeafe;
}

.workflow-studio__title h3 {
  margin: 0;
  font-size: 1.05rem;
  font-weight: 900;
  color: #0f172a;
}

.workflow-studio__eyebrow {
  display: block;
  margin-bottom: 0.1rem;
  color: #2563eb;
  font-size: 0.68rem;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0.14em;
}

.workflow-studio__actions {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  flex-wrap: wrap;
}

.workflow-danger-btn {
  padding: 0.45rem 0.8rem;
  border-radius: 0.65rem;
  background: #fff1f2;
  color: #be123c;
  border: 1px solid #fecdd3;
  font-size: 0.78rem;
  font-weight: 800;
}

.workflow-studio__body {
  display: grid;
  grid-template-columns: 250px minmax(0, 1fr) 310px;
  min-height: 0;
  flex: 1;
}

.workflow-toolbox {
  padding: 1rem;
  background: #f8fafc;
  border-right: 1px solid #e2e8f0;
}

.workflow-toolbox h4,
.workflow-inspector__section h5 {
  margin: 0 0 0.75rem;
  color: #475569;
  font-size: 0.7rem;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0.12em;
}

.workflow-drag-card {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  padding: 1rem;
  border: 2px dashed #60a5fa;
  border-radius: 1rem;
  background: linear-gradient(135deg, #eff6ff, #fff);
  color: #1d4ed8;
  cursor: grab;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .7);
}

.workflow-drag-card span {
  font-weight: 900;
}

.workflow-drag-card small,
.workflow-help-card {
  color: #64748b;
  font-size: 0.74rem;
}

.workflow-help-card {
  margin-top: 1rem;
  padding: 1rem;
  border-radius: 1rem;
  background: #fff;
  border: 1px solid #e2e8f0;
}

.workflow-help-card strong {
  display: block;
  margin-bottom: 0.5rem;
  color: #0f172a;
}

.workflow-help-card ul {
  margin: 0;
  padding-left: 1rem;
}

.workflow-help-card li + li {
  margin-top: 0.45rem;
}

.workflow-canvas-wrap {
  min-width: 0;
  min-height: 0;
  background: #f8fafc;
}

.workflow-inspector {
  padding: 1rem;
  background: #ffffff;
  border-left: 1px solid #e2e8f0;
  overflow-y: auto;
}

.workflow-inspector__empty {
  min-height: 100%;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 0.5rem;
  text-align: center;
  color: #64748b;
}

.workflow-inspector__icon {
  width: 3rem;
  height: 3rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 1rem;
  background: #eef2ff;
  color: #4f46e5;
  font-weight: 900;
}

.workflow-inspector__empty h4 {
  color: #0f172a;
  font-weight: 900;
}

.workflow-inspector__header {
  padding: 1rem;
  border-radius: 1rem;
  background: linear-gradient(135deg, #0f172a, #1e3a8a);
  color: #fff;
}

.workflow-inspector__header span,
.workflow-inspector__header small {
  display: block;
  color: #bfdbfe;
  font-size: 0.75rem;
}

.workflow-inspector__header strong {
  display: block;
  margin: 0.2rem 0;
  font-size: 1.05rem;
}

.workflow-inspector__section {
  margin-top: 1rem;
}

.workflow-mini-list {
  display: grid;
  gap: 0.65rem;
}

.workflow-mini-item {
  padding: 0.75rem;
  border: 1px solid #e2e8f0;
  border-radius: 0.9rem;
  background: #f8fafc;
}

.workflow-mini-item strong {
  display: block;
  color: #0f172a;
  font-size: 0.84rem;
}

.workflow-mini-item small {
  display: block;
  margin-top: 0.15rem;
  color: #64748b;
}

.workflow-mini-actions {
  display: flex;
  gap: 0.45rem;
  margin-top: 0.65rem;
}

.workflow-mini-actions button {
  padding: 0.35rem 0.55rem;
  border-radius: 0.55rem;
  border: 1px solid #cbd5e1;
  background: #fff;
  color: #334155;
  font-size: 0.72rem;
  font-weight: 800;
}

.workflow-mini-actions .danger {
  border-color: #fecdd3;
  background: #fff1f2;
  color: #be123c;
}

.drawflow-node.step {
  width: 260px;
  min-height: 130px;
  height: auto !important;
  border: 1px solid #bae6fd;
  border-radius: 1rem;
  background: #ecfeff;
  box-shadow: 0 18px 35px rgba(8, 145, 178, 0.16);
}

.workflow-node-card__top {
  padding: 0.65rem 0.75rem;
  border-radius: 0.95rem 0.95rem 0 0;
  background: linear-gradient(135deg, #4f46e5, #2563eb);
  color: #fff;
  display: flex;
  justify-content: space-between;
  gap: 0.75rem;
  font-size: 0.72rem;
  font-weight: 900;
}

.workflow-node-card__body {
  padding: 0.8rem;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.workflow-node-card__name {
  margin: 0;
  color: #0f172a;
  font-size: 0.9rem;
  font-weight: 900;
}

.workflow-node-card__entity {
  margin: 0;
  color: #0891b2;
  font-size: 0.75rem;
}

.workflow-node-card__chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  margin-top: 0.4rem;
  margin-bottom: 0.4rem;
}

.workflow-node-card__chips span {
  padding: 0.2rem 0.45rem;
  border-radius: 999px;
  background: #e0f2fe;
  color: #075985;
  font-size: 0.65rem;
  font-weight: 900;
}

.workflow-node-card__edit {
  margin-top: auto;
  width: 100%;
  padding: 0.4rem;
  border-radius: 0.6rem;
  background: #0f172a;
  color: #fff;
  font-size: 0.72rem;
  font-weight: 900;
}

.company-settings-card {
  overflow: hidden;
  border-radius: 1.25rem;
  background: #fff;
  border: 1px solid #dbeafe;
  box-shadow: 0 24px 70px rgba(15, 23, 42, 0.08);
}

.company-settings-card__hero {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  padding: 1.5rem;
  background: linear-gradient(135deg, #f8fbff, #eef2ff);
  border-bottom: 1px solid #dbeafe;
}

.company-settings-card__hero h3 {
  margin: 0;
  font-size: 1.4rem;
  font-weight: 900;
  color: #0f172a;
}

.company-settings-card__hero p {
  margin-top: 0.35rem;
  color: #64748b;
}

.company-settings-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
  padding: 1.5rem;
}

.company-settings-panel {
  padding: 1rem;
  border: 1px solid #e2e8f0;
  border-radius: 1rem;
  background: #f8fafc;
}

.company-settings-panel h4 {
  margin: 0 0 1rem;
  font-size: 0.95rem;
  font-weight: 900;
  color: #0f172a;
}

.company-settings-actions {
  grid-column: 1 / -1;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 0.5rem;
}

@media (max-width: 1180px) {
  .workflow-studio__body,
  .company-settings-grid {
    grid-template-columns: 1fr;
  }

  .workflow-inspector,
  .workflow-toolbox {
    border: 0;
    border-bottom: 1px solid #e2e8f0;
  }
}

/* aa Badges aa */
.badge-green {
  display: inline-flex;
  align-items: center;
  padding: 0.1rem 0.5rem;
  border-radius: 9999px;
  font-size: 0.7rem;
  font-weight: 700;
  background: #dcfce7;
  color: #15803d;
}

.badge-red {
  display: inline-flex;
  align-items: center;
  padding: 0.1rem 0.5rem;
  border-radius: 9999px;
  font-size: 0.7rem;
  font-weight: 700;
  background: #fee2e2;
  color: #b91c1c;
}

.badge-amber {
  display: inline-flex;
  align-items: center;
  padding: 0.1rem 0.5rem;
  border-radius: 9999px;
  font-size: 0.7rem;
  font-weight: 700;
  background: #fef9c3;
  color: #92400e;
}

.badge-indigo {
  display: inline-flex;
  align-items: center;
  padding: 0.1rem 0.5rem;
  border-radius: 9999px;
  font-size: 0.7rem;
  font-weight: 700;
  background: #e0e7ff;
  color: #3730a3;
}

/* aa Table aa */
.th {
  padding: 0.75rem 1rem;
  text-align: left;
  font-size: 0.7rem;
  font-weight: 700;
  color: #64748b;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.td {
  padding: 0.75rem 1rem;
  font-size: 0.875rem;
  color: #334155;
  vertical-align: middle;
}

tbody tr:hover {
  background: #f8fafc;
}

/* aa Section Title aa */
.section-title {
  font-size: 1rem;
  font-weight: 700;
  color: #1e293b;
  margin-bottom: 1rem;
}

/* aa Admin Tab Panels aa */
.admin-tab {
  animation: fadeIn 0.15s ease-in;
}

/* aa Modal Overlay aa */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.45);
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  animation: fadeIn 0.15s ease-in;
}

.modal-overlay.hidden {
  display: none !important;
}

.modal-box {
  background: #fff;
  border-radius: 1rem;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.2);
  padding: 1.75rem;
  width: 100%;
  max-width: 520px;
  max-height: 90vh;
  overflow-y: auto;
}

.process-route-preview {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: stretch;
  gap: 0.75rem;
  padding: 0.85rem;
  border: 1px solid #dbeafe;
  border-radius: 0.875rem;
  background: #f8fbff;
}

.process-route-card {
  display: flex;
  gap: 0.75rem;
  align-items: center;
  min-width: 0;
  padding: 0.75rem;
  border-radius: 0.75rem;
  border: 1px solid #e2e8f0;
  background: #ffffff;
}

.process-route-card--current {
  border-color: #c7d2fe;
  background: #eef2ff;
}

.process-route-card--next {
  border-color: #bbf7d0;
  background: #f0fdf4;
}

.process-route-icon,
.process-return-icon {
  flex: 0 0 auto;
  width: 2rem;
  height: 2rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 9999px;
  font-weight: 900;
}

.process-route-card--current .process-route-icon {
  background: #4338ca;
  color: #ffffff;
}

.process-route-card--next .process-route-icon {
  background: #16a34a;
  color: #ffffff;
}

.process-route-label {
  display: block;
  margin-bottom: 0.15rem;
  font-size: 0.68rem;
  font-weight: 900;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #64748b;
}

.process-route-card strong,
.process-return-preview strong {
  display: block;
  color: #0f172a;
  font-size: 0.9rem;
  line-height: 1.2;
  overflow-wrap: anywhere;
}

.process-route-card small {
  display: block;
  margin-top: 0.15rem;
  color: #64748b;
  font-size: 0.75rem;
  overflow-wrap: anywhere;
}

.process-route-connector {
  display: flex;
  align-items: center;
  justify-content: center;
  color: #2563eb;
  font-weight: 900;
  font-size: 1.25rem;
}

.process-return-preview {
  display: flex;
  gap: 0.75rem;
  align-items: center;
  padding: 0.85rem;
  border-radius: 0.875rem;
  border: 1px solid #fecaca;
  background: #fff7ed;
}

.process-return-preview.hidden {
  display: none !important;
}

.process-return-icon {
  background: #dc2626;
  color: #ffffff;
}

@media (max-width: 640px) {
  .process-route-preview {
    grid-template-columns: 1fr;
  }

  .process-route-connector {
    transform: rotate(90deg);
    min-height: 1.25rem;
  }
}

.ctrl-detail-modal {
  max-width: 1120px;
  padding: 1.25rem;
  background:
    radial-gradient(circle at top right, rgba(14, 165, 233, 0.12), transparent 18rem),
    linear-gradient(180deg, #f8fbff 0%, #ffffff 24%);
}

.ctrl-detail-hero {
  border: 1px solid #dbeafe;
  border-radius: 1.5rem;
  padding: 1.2rem;
  background: linear-gradient(135deg, #0f172a 0%, #1d4ed8 58%, #f8fafc 160%);
  color: #fff;
  box-shadow: 0 20px 48px rgba(15, 23, 42, 0.16);
}

.ctrl-detail-hero__eyebrow {
  margin: 0 0 0.35rem;
  font-size: 0.68rem;
  font-weight: 900;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: rgba(191, 219, 254, 0.96);
}

.ctrl-detail-close {
  width: 2.5rem;
  height: 2.5rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 9999px;
  border: 1px solid rgba(255, 255, 255, 0.22);
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
  font-size: 1.6rem;
  line-height: 1;
}

.ctrl-detail-close:hover {
  background: rgba(255, 255, 255, 0.22);
}

.ctrl-summary-strip,
.ctrl-info-grid,
.ctrl-detail-layout {
  display: grid;
  gap: 1rem;
}

.ctrl-summary-strip {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.ctrl-summary-card,
.ctrl-info-card,
.ctrl-surface-panel {
  border-radius: 1.25rem;
}

.ctrl-summary-card {
  padding: 1rem;
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.16);
  backdrop-filter: blur(10px);
}

.ctrl-summary-card--emphasis {
  background: rgba(15, 23, 42, 0.32);
  border-color: rgba(191, 219, 254, 0.32);
}

.ctrl-summary-card__label {
  display: block;
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: rgba(219, 234, 254, 0.86);
}

.ctrl-summary-card__value {
  display: block;
  margin-top: 0.55rem;
  font-size: 1.05rem;
  line-height: 1.25;
  font-weight: 800;
  color: #fff;
}

.ctrl-summary-card__meta {
  display: block;
  margin-top: 0.4rem;
  font-size: 0.78rem;
  color: rgba(226, 232, 240, 0.88);
}

.ctrl-detail-layout {
  grid-template-columns: minmax(0, 1.45fr) minmax(320px, 0.95fr);
  margin-top: 1rem;
  align-items: start;
}

.ctrl-detail-main,
.ctrl-detail-side {
  display: grid;
  gap: 1rem;
}

.ctrl-surface-panel {
  padding: 1rem;
  background: rgba(255, 255, 255, 0.95);
  border: 1px solid #dbe7f5;
  box-shadow: 0 14px 34px rgba(15, 23, 42, 0.06);
}

.ctrl-section-heading {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 0.75rem;
  margin-bottom: 1rem;
}

.ctrl-section-heading h4 {
  margin: 0;
  font-size: 0.92rem;
  font-weight: 900;
  color: #0f172a;
}

.ctrl-section-heading p {
  margin: 0.25rem 0 0;
  font-size: 0.82rem;
  color: #64748b;
}

.ctrl-info-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.ctrl-info-card {
  min-width: 0;
  padding: 0.9rem 1rem;
  background: linear-gradient(180deg, #ffffff 0%, #f8fafc 100%);
  border: 1px solid #e2e8f0;
}

.ctrl-info-card__label {
  display: block;
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #64748b;
}

.ctrl-info-card__value {
  display: block;
  margin-top: 0.45rem;
  font-size: 0.98rem;
  line-height: 1.45;
  font-weight: 700;
  color: #0f172a;
  word-break: break-word;
}

.ctrl-info-card__value--muted {
  color: #64748b;
}

.ctrl-notes-panel {
  background: linear-gradient(180deg, #eef4ff 0%, #ffffff 100%);
  border-color: #c7d2fe;
}

.ctrl-history-panel table td,
.ctrl-history-panel table th {
  vertical-align: top;
}

@media (max-width: 980px) {
  .ctrl-detail-layout,
  .ctrl-summary-strip,
  .ctrl-info-grid {
    grid-template-columns: 1fr;
  }

  .ctrl-detail-modal {
    padding: 1rem;
  }

  .ctrl-detail-hero {
    padding: 1rem;
  }
}

/* aa Timeline (Control de Proyectos) aa */
.timeline-dot {
  width: 2.3rem;
  height: 2.3rem;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.62rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  cursor: default;
  transition: transform 0.2s, box-shadow 0.2s;
  position: relative;
  z-index: 1;
}

.timeline-dot:hover {
  transform: scale(1.15);
  box-shadow: 0 4px 16px rgba(99, 102, 241, .3);
}

.timeline-dot.visited {
  background: #22c55e;
  color: #fff;
  box-shadow: 0 2px 8px rgba(34, 197, 94, .4);
}

.timeline-dot.current {
  background: #4f46e5;
  color: #fff;
  box-shadow: 0 0 0 4px #e0e7ff, 0 2px 8px rgba(79, 70, 229, .5);
  animation: pulse-dot 1.5s infinite;
}

.timeline-dot.pending {
  background: #e2e8f0;
  color: #94a3b8;
  border: 2px solid #cbd5e1;
}

@keyframes pulse-dot {

  0%,
  100% {
    box-shadow: 0 0 0 4px #e0e7ff, 0 2px 8px rgba(79, 70, 229, .5);
  }

  50% {
    box-shadow: 0 0 0 8px #c7d2fe, 0 2px 8px rgba(79, 70, 229, .5);
  }
}

.timeline-line {
  height: 4px;
  width: 3rem;
  flex-shrink: 0;
}

.timeline-line.done {
  background: linear-gradient(90deg, #22c55e, #4f46e5);
}

.timeline-line.pending {
  background: #e2e8f0;
}

.timeline-label {
  font-size: 0.55rem;
  max-width: 3rem;
  text-align: center;
  color: #64748b;
  margin-top: 0.35rem;
  line-height: 1.2;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

@media print {
  nav,
  .no-print,
  #notif-panel,
  #modal-process,
  #modal-notes,
  #modal-ctrl-detail {
    display: none !important;
  }

  body,
  main {
    background: #fff !important;
  }

  .view-section.hidden {
    display: none !important;
  }

  #report-view {
    display: block !important;
  }

  .card,
  .report-group {
    box-shadow: none !important;
    border-color: #cbd5e1 !important;
  }
}

/* aa Control Filter Pills aa */
.ctrl-filter-btn {
  padding: 0.3rem 0.8rem;
  border-radius: 9999px;
  font-size: 0.75rem;
  font-weight: 600;
  color: #64748b;
  background: #f1f5f9;
  border: 1px solid #e2e8f0;
  cursor: pointer;
  transition: all 0.15s;
}

.ctrl-filter-btn:hover {
  background: #e0e7ff;
  color: #4f46e5;
  border-color: #a5b4fc;
}

.ctrl-filter-btn.active {
  background: #4f46e5;
  color: #fff;
  border-color: #4f46e5;
}

@media (max-width: 1024px) {
  .requisition-kpis {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 768px) {
  body {
    padding-top: 4.5rem;
  }

  .nav-shell {
    display: block;
    padding: 0.45rem 0;
  }

  .nav-brand {
    font-size: 0.92rem;
  }

  .nav-mobile-actions {
    display: flex;
    align-items: center;
  }

  .nav-mobile-panel {
    display: none;
    margin-top: 0.75rem;
    padding: 0.85rem;
    border-radius: 1rem;
    background: rgba(15, 23, 42, 0.24);
    border: 1px solid rgba(255, 255, 255, 0.14);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
  }

  .nav-mobile-panel.is-open {
    display: grid;
    gap: 0.85rem;
  }

  #nav-links,
  .nav-user-tools {
    display: grid;
    gap: 0.55rem;
  }

  .nav-btn,
  .nav-btn-danger {
    width: 100%;
    justify-content: flex-start;
    text-align: left;
    padding: 0.8rem 0.95rem;
    border: 1px solid rgba(255, 255, 255, 0.12);
    background: rgba(255, 255, 255, 0.08);
  }

  .nav-user-tools #user-badge {
    width: 100%;
    text-align: center;
    padding: 0.65rem 0.85rem;
  }

  .requisition-shell {
    padding: 1rem;
    border-radius: 1.1rem;
  }

  .requisition-shell__header {
    flex-direction: column;
  }

  .requisition-kpis {
    grid-template-columns: 1fr;
  }

  .quote-summary-panel,
  .requisition-panel,
  .req-line-card {
    padding: 0.95rem;
  }

  .req-line-card__head {
    flex-direction: column;
    align-items: flex-start;
  }

  .req-line-remove {
    width: 100%;
    justify-content: center;
  }

  #control-table {
    min-width: 900px;
  }
}

/* =====================================================
   WORKFLOW EDITOR — UX IMPROVEMENTS
   ===================================================== */

/* -- Zoom controls floating over canvas -- */
.workflow-canvas-wrap {
  position: relative;
}

.wf-zoom-controls {
  position: absolute;
  top: 12px;
  right: 12px;
  z-index: 20;
  display: flex;
  flex-direction: column;
  gap: 4px;
  background: rgba(255,255,255,0.92);
  border: 1px solid #e2e8f0;
  border-radius: 0.75rem;
  padding: 6px;
  box-shadow: 0 4px 16px rgba(15,23,42,0.10);
  backdrop-filter: blur(4px);
}

.wf-zoom-btn {
  width: 2rem;
  height: 2rem;
  border-radius: 0.5rem;
  border: 1px solid #e2e8f0;
  background: #fff;
  color: #475569;
  font-size: 1rem;
  font-weight: 700;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.15s, color 0.15s, border-color 0.15s;
  line-height: 1;
}

.wf-zoom-btn:hover {
  background: #4f46e5;
  color: #fff;
  border-color: #4f46e5;
}

/* -- Quick Connect Menu (choose: direct vs condition) -- */
#quick-connect-menu {
  position: fixed;
  z-index: 9999;
  background: #fff;
  border-radius: 1rem;
  box-shadow: 0 20px 60px rgba(15,23,42,0.18), 0 2px 8px rgba(15,23,42,0.08);
  border: 1px solid #e2e8f0;
  padding: 0.5rem;
  width: 240px;
  animation: fadeIn 0.15s ease-out;
  pointer-events: all;
}

#quick-connect-menu .qcm-header {
  padding: 0.4rem 0.75rem 0.5rem;
  font-size: 0.65rem;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: #94a3b8;
  border-bottom: 1px solid #f1f5f9;
  margin-bottom: 0.35rem;
}

.qcm-btn {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.55rem 0.75rem;
  border-radius: 0.65rem;
  border: none;
  background: transparent;
  cursor: pointer;
  font-size: 0.84rem;
  font-weight: 700;
  text-align: left;
  transition: background 0.12s;
}

.qcm-btn:hover {
  background: #f1f5f9;
}

.qcm-btn.qcm-direct {
  color: #1d4ed8;
}

.qcm-btn.qcm-direct:hover {
  background: #eff6ff;
}

.qcm-btn.qcm-condition {
  color: #b45309;
}

.qcm-btn.qcm-condition:hover {
  background: #fffbeb;
}

.qcm-btn.qcm-cancel {
  color: #dc2626;
  font-size: 0.78rem;
  font-weight: 600;
}

.qcm-btn.qcm-cancel:hover {
  background: #fff1f2;
}

.qcm-icon {
  width: 1.6rem;
  height: 1.6rem;
  border-radius: 0.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.8rem;
  flex-shrink: 0;
}

.qcm-btn.qcm-direct .qcm-icon {
  background: #dbeafe;
  color: #2563eb;
}

.qcm-btn.qcm-condition .qcm-icon {
  background: #fef3c7;
  color: #d97706;
}

.qcm-btn.qcm-cancel .qcm-icon {
  background: #fee2e2;
  color: #dc2626;
}

.qcm-btn small {
  display: block;
  font-size: 0.65rem;
  font-weight: 500;
  opacity: 0.65;
  line-height: 1.2;
}

/* -- Connection Context Menu (click on a line) -- */
#conn-context-menu {
  position: fixed;
  z-index: 9999;
  background: #fff;
  border-radius: 0.85rem;
  box-shadow: 0 12px 40px rgba(15,23,42,0.16), 0 2px 6px rgba(15,23,42,0.06);
  border: 1px solid #e2e8f0;
  padding: 0.4rem;
  min-width: 200px;
  animation: fadeIn 0.12s ease-out;
  pointer-events: all;
}

#conn-context-menu .ccm-label {
  padding: 0.35rem 0.75rem 0.4rem;
  font-size: 0.65rem;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: #94a3b8;
  border-bottom: 1px solid #f1f5f9;
  margin-bottom: 0.3rem;
}

#conn-context-menu .ccm-from-to {
  padding: 0.4rem 0.75rem;
  font-size: 0.78rem;
  font-weight: 700;
  color: #1e293b;
  display: flex;
  align-items: center;
  gap: 0.4rem;
  background: #f8fafc;
  border-radius: 0.55rem;
  margin-bottom: 0.35rem;
}

#conn-context-menu .ccm-from-to .arrow {
  color: #94a3b8;
}

.ccm-btn {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.5rem 0.75rem;
  border-radius: 0.6rem;
  border: none;
  background: transparent;
  cursor: pointer;
  font-size: 0.82rem;
  font-weight: 700;
  text-align: left;
  transition: background 0.12s;
}

.ccm-btn.ccm-edit {
  color: #b45309;
}

.ccm-btn.ccm-edit:hover {
  background: #fffbeb;
}

.ccm-btn.ccm-delete {
  color: #dc2626;
}

.ccm-btn.ccm-delete:hover {
  background: #fff1f2;
}

/* -- Connection hover cursor -- */
.drawflow .connection .main-path {
  cursor: pointer;
  transition: stroke-width 0.15s;
}

.drawflow .connection .main-path:hover {
  stroke-width: 5px !important;
}

/* -- Improved variation items in inspector -- */
.wf-var-item {
  padding: 0.75rem;
  border: 1px solid #fde68a;
  border-radius: 0.9rem;
  background: linear-gradient(135deg, #fffbeb, #fff);
  position: relative;
}

.wf-var-item__route {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.78rem;
  font-weight: 800;
  color: #1e293b;
  margin-bottom: 0.45rem;
}

.wf-var-item__route .step-pill {
  padding: 0.15rem 0.5rem;
  border-radius: 9999px;
  background: #e0e7ff;
  color: #3730a3;
  font-size: 0.7rem;
  font-weight: 800;
  white-space: nowrap;
}

.wf-var-item__route .arrow-pill {
  color: #f59e0b;
  font-size: 1rem;
  font-weight: 900;
}

.wf-var-item__condition {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  padding: 0.2rem 0.55rem;
  border-radius: 9999px;
  background: #fef3c7;
  color: #92400e;
  font-size: 0.68rem;
  font-weight: 800;
  margin-bottom: 0.5rem;
}

.wf-var-item__name {
  font-size: 0.8rem;
  font-weight: 700;
  color: #0f172a;
  margin-bottom: 0.2rem;
}

.wf-var-item__actions {
  display: flex;
  gap: 0.4rem;
  margin-top: 0.55rem;
}

.wf-var-item__actions button {
  flex: 1;
  padding: 0.35rem 0.5rem;
  border-radius: 0.55rem;
  border: 1px solid #e2e8f0;
  background: #fff;
  color: #334155;
  font-size: 0.72rem;
  font-weight: 800;
  cursor: pointer;
  transition: all 0.12s;
}

.wf-var-item__actions button:hover {
  background: #f1f5f9;
}

.wf-var-item__actions button.del {
  border-color: #fecdd3;
  color: #be123c;
  background: #fff1f2;
}

.wf-var-item__actions button.del:hover {
  background: #fee2e2;
}

/* -- Drawflow connection highlight on hover -- */
.drawflow .connection:hover .main-path {
  filter: brightness(0.85) saturate(1.5);
}

/* -- Priority badge on variation -- */
.wf-prio-badge {
  position: absolute;
  top: 0.5rem;
  right: 0.5rem;
  width: 1.4rem;
  height: 1.4rem;
  border-radius: 50%;
  background: #4f46e5;
  color: #fff;
  font-size: 0.65rem;
  font-weight: 900;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* ============================================================
   MÓDULO GERENCIAL EJECUTIVO
   ============================================================ */

.ger-tab-btn {
  padding: 0.45rem 0.9rem;
  border-radius: 0.55rem;
  font-size: 0.78rem;
  font-weight: 700;
  color: #94a3b8;
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.1);
  cursor: pointer;
  transition: all 0.18s;
  white-space: nowrap;
}
.ger-tab-btn:hover {
  background: rgba(99,102,241,0.25);
  color: #c7d2fe;
}
.ger-tab-active {
  background: #4f46e5 !important;
  color: #fff !important;
  border-color: #6366f1 !important;
  box-shadow: 0 2px 10px rgba(99,102,241,0.4);
}

.ger-tab-panel {
  animation: fadeIn 0.2s ease-in;
}

.ger-kpi-card {
  background: #fff;
  border-radius: 0.9rem;
  border: 1px solid #e2e8f0;
  padding: 1rem 1.1rem 0.85rem;
  box-shadow: 0 2px 12px rgba(0,0,0,0.05);
  position: relative;
  overflow: hidden;
  transition: transform 0.18s, box-shadow 0.18s;
}
.ger-kpi-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(0,0,0,0.09);
}
.ger-kpi-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 3px;
  background: var(--accent, #6366f1);
  border-radius: 0.9rem 0.9rem 0 0;
}
.ger-kpi-danger {
  background: linear-gradient(135deg, #fff5f5 0%, #fff 100%);
  border-color: #fecaca;
}
.ger-kpi-warning {
  background: linear-gradient(135deg, #fff7ed 0%, #fff 100%);
  border-color: #fed7aa;
}
.ger-kpi-label {
  font-size: 0.65rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: #64748b;
  margin-bottom: 0.3rem;
}
.ger-kpi-val {
  font-size: 1.7rem;
  font-weight: 900;
  line-height: 1;
  color: var(--accent, #0f172a);
  font-variant-numeric: tabular-nums;
}
.ger-kpi-sub {
  font-size: 0.65rem;
  color: #94a3b8;
  margin-top: 0.25rem;
}

.ger-card {
  background: #fff;
  border-radius: 0.9rem;
  border: 1px solid #e2e8f0;
  padding: 1.1rem 1.25rem;
  box-shadow: 0 1px 6px rgba(0,0,0,0.04);
}
.ger-card-title {
  font-size: 0.78rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #475569;
  margin-bottom: 0.85rem;
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

/* Trend chart bar */
.ger-trend-bar-wrap {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  flex: 1;
  min-width: 18px;
  max-width: 38px;
}
.ger-trend-bar-total {
  width: 100%;
  border-radius: 3px 3px 0 0;
  background: #6366f1;
  min-height: 2px;
  transition: height 0.4s;
}
.ger-trend-bar-done {
  width: 100%;
  border-radius: 3px 3px 0 0;
  background: #10b981;
  min-height: 2px;
}
.ger-trend-label {
  font-size: 0.55rem;
  color: #94a3b8;
  transform: rotate(-45deg);
  transform-origin: center;
  white-space: nowrap;
}

/* Carga bar */
.ger-carga-bar-wrap {
  display: flex;
  align-items: center;
  gap: 0.6rem;
}
.ger-carga-bar-bg {
  flex: 1;
  height: 10px;
  border-radius: 99px;
  background: #f1f5f9;
  overflow: hidden;
}
.ger-carga-bar-fill {
  height: 100%;
  border-radius: 99px;
  background: linear-gradient(90deg, #6366f1, #8b5cf6);
  transition: width 0.5s ease;
}

/* SLA alert row */
.ger-alert-row {
  padding: 0.6rem 0.75rem;
  border-radius: 0.6rem;
  border: 1px solid #fee2e2;
  background: #fff5f5;
  margin-bottom: 0.35rem;
}
.ger-stopped-row {
  padding: 0.6rem 0.75rem;
  border-radius: 0.6rem;
  border: 1px solid #fed7aa;
  background: #fff7ed;
  margin-bottom: 0.35rem;
}
.ger-multi-row {
  padding: 0.6rem 0.75rem;
  border-radius: 0.6rem;
  border: 1px solid #fde68a;
  background: #fffbeb;
  margin-bottom: 0.35rem;
}

/* Tiempos per step */
.ger-step-bar-bg {
  flex: 1;
  height: 8px;
  border-radius: 99px;
  background: #f1f5f9;
  overflow: hidden;
}
.ger-step-bar-fill {
  height: 100%;
  border-radius: 99px;
  background: linear-gradient(90deg, #10b981, #06b6d4);
}
.ger-step-bar-fill-warn {
  background: linear-gradient(90deg, #f59e0b, #ef4444);
}

@keyframes gerCountUp {
  from { opacity: 0; transform: scale(0.85); }
  to   { opacity: 1; transform: scale(1); }
}
.ger-kpi-val {
  animation: gerCountUp 0.35s ease-out;
}

/* ── Mapa Regional Tab ─────────────────────────────────────── */
.map-filter-btn {
  font-size: 0.72rem;
  padding: 0.3rem 0.85rem;
  border-radius: 999px;
  border: 1.5px solid #cbd5e1;
  background: #f8fafc;
  color: #475569;
  cursor: pointer;
  font-weight: 600;
  transition: all 0.18s ease;
  white-space: nowrap;
}
.map-filter-btn:hover {
  border-color: #6366f1;
  color: #4f46e5;
  background: #eef2ff;
}
.map-filter-btn.map-filter-active {
  background: #6366f1;
  color: #fff;
  border-color: #6366f1;
  box-shadow: 0 2px 8px rgba(99,102,241,0.3);
}

/* Leaflet popup override for PMC theme */
.leaflet-popup-content-wrapper {
  border-radius: 0.85rem !important;
  box-shadow: 0 8px 28px rgba(15,23,42,0.14) !important;
  font-family: Inter, sans-serif !important;
  border: 1px solid #e2e8f0;
}
.leaflet-popup-content {
  margin: 12px 14px !important;
}
.leaflet-popup-tip {
  background: #fff !important;
}

/* ── User Management Table ────────────────────────────────── */
.users-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-bottom: 1rem;
  padding: 1rem 1.25rem;
  background: #fff;
  border-radius: 1rem;
  border: 1px solid #e2e8f0;
  box-shadow: 0 2px 8px rgba(15,23,42,0.04);
}
.users-toolbar__left {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.5rem;
  flex: 1 1 auto;
}
.users-toolbar__right {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex-shrink: 0;
}
.users-search-wrap {
  position: relative;
  min-width: 180px;
  flex: 1 1 200px;
  max-width: 280px;
}
.users-search-icon {
  position: absolute;
  left: 0.65rem;
  top: 50%;
  transform: translateY(-50%);
  font-size: 0.85rem;
  color: #94a3b8;
  pointer-events: none;
}
.users-search-input {
  display: block;
  width: 100%;
  border-radius: 0.5rem;
  border: 1px solid #e2e8f0;
  background: #f8fafc;
  padding: 0.45rem 0.75rem 0.45rem 2rem;
  font-size: 0.83rem;
  outline: none;
  transition: border-color 0.15s;
  font-family: inherit;
}
.users-search-input:focus { border-color: #6366f1; }
.users-filter-select {
  border-radius: 0.5rem;
  border: 1px solid #e2e8f0;
  background: #f8fafc;
  padding: 0.45rem 0.65rem;
  font-size: 0.78rem;
  font-weight: 600;
  color: #475569;
  outline: none;
  cursor: pointer;
  font-family: inherit;
}
.users-count-label {
  font-size: 0.75rem;
  color: #94a3b8;
  font-weight: 600;
  white-space: nowrap;
}
.users-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.82rem;
}
.users-table thead tr {
  background: linear-gradient(135deg, #f8fafc, #eef2ff);
}
.users-table th {
  padding: 0.7rem 1rem;
  text-align: left;
  font-size: 0.68rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #475569;
  border-bottom: 1px solid #e2e8f0;
}
.users-table td {
  padding: 0.65rem 1rem;
  border-bottom: 1px solid #f1f5f9;
  vertical-align: middle;
}
.users-table__row:hover {
  background: #f8fafc;
}
.users-table__row:last-child td { border-bottom: none; }

@media (max-width: 768px) {
  .users-table .hide-sm { display: none !important; }
}
@media (max-width: 1024px) {
  .users-table .hide-md { display: none !important; }
}

/* Pagination */
.users-pagination { margin-top: 0.75rem; }
.users-pag-inner {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.25rem;
  flex-wrap: wrap;
}
.users-pag-btn {
  padding: 0.35rem 0.7rem;
  border-radius: 0.4rem;
  border: 1px solid #e2e8f0;
  background: #fff;
  color: #475569;
  font-size: 0.78rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s;
  font-family: inherit;
}
.users-pag-btn:hover:not(:disabled) { background: #eef2ff; border-color: #6366f1; color: #4f46e5; }
.users-pag-btn:disabled { opacity: 0.4; cursor: default; }
.users-pag-btn--active { background: #6366f1 !important; color: #fff !important; border-color: #6366f1 !important; }
.users-pag-dots { padding: 0 0.2rem; color: #94a3b8; font-size: 0.75rem; }
.users-pag-info { font-size: 0.72rem; color: #94a3b8; margin-left: 0.5rem; }

/* User Modal Sections */
.user-modal-section {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 0.75rem;
  padding: 0.9rem 1rem;
  margin-bottom: 0.75rem;
}
.user-modal-section__title {
  font-size: 0.68rem;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: #4f46e5;
  margin: 0 0 0.7rem;
}
.user-perms-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.5rem;
}
.user-perm-item {
  display: flex;
  align-items: flex-start;
  gap: 0.5rem;
  padding: 0.5rem 0.65rem;
  border-radius: 0.5rem;
  border: 1px solid #e2e8f0;
  background: #fff;
  cursor: pointer;
  transition: border-color 0.15s, background 0.15s;
}
.user-perm-item:hover { background: #eef2ff; border-color: #c7d2fe; }
.user-perm-item:has(.user-perm-check:checked) { background: #eef2ff; border-color: #6366f1; }
.user-perm-check { width: 1rem; height: 1rem; accent-color: #4f46e5; margin-top: 0.1rem; flex-shrink: 0; }
.user-perm-body { display: flex; flex-direction: column; gap: 1px; }
.user-perm-name { font-size: 0.78rem; font-weight: 700; color: #1e293b; }
.user-perm-desc { font-size: 0.65rem; color: #94a3b8; }
