:root {
  --neo-primary: #0d6efd;
  --neo-primary-soft: #eaf1ff;
  --neo-sidebar: #101827;
  --neo-bg: #f4f6f8;
  --neo-card: #ffffff;
  --neo-text: #182231;
  --neo-muted: #5f6b7a;
  --neo-border: #d8dee7;
  --neo-success: #198754;
  --neo-danger: #dc3545;
  --neo-warning: #ffc107;
  --neo-shadow: none;
  --neo-shadow-lg: 0 18px 48px rgba(0, 0, 0, .2);
  --neo-transition: all .16s ease;
}

* {
  box-sizing: border-box;
}

body {
  min-height: 100vh;
  margin: 0;
  background: var(--neo-bg);
  color: var(--neo-text);
  font-family: Arial, "Segoe UI", system-ui, -apple-system, sans-serif;
  font-size: 14px;
}

a {
  text-decoration: none;
}

.login-bg {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background:
    linear-gradient(135deg, rgba(17, 24, 39, .92), rgba(37, 99, 235, .82)),
    url("../img/web.jpg") center / cover no-repeat fixed;
}

.login-wrap {
  width: 100%;
  max-width: 980px;
}

.login-shell {
  display: grid;
  grid-template-columns: 1.1fr .9fr;
  overflow: hidden;
  border-radius: 28px;
  background: rgba(255, 255, 255, .96);
  box-shadow: 0 25px 80px rgba(0, 0, 0, .35);
  backdrop-filter: blur(10px);
}

.login-hero {
  position: relative;
  min-height: 560px;
  padding: 34px;
  color: #ffffff;
  background:
    linear-gradient(145deg, rgba(15, 23, 42, .94), rgba(29, 78, 216, .78)),
    url("../img/imu.png") center / cover no-repeat;
}

.login-hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 20% 20%, rgba(255, 255, 255, .18), transparent 30%);
  pointer-events: none;
}

.login-hero-top,
.login-hero-content {
  position: relative;
  z-index: 1;
}

.login-hero-top {
  display: flex;
  align-items: center;
  gap: 14px;
}

.login-logo {
  width: 58px;
  height: 58px;
  object-fit: contain;
  padding: 8px;
  border-radius: 18px;
  background: #ffffff;
  box-shadow: 0 10px 25px rgba(0, 0, 0, .25);
}

.login-brand-name {
  font-size: 1.65rem;
  font-weight: 800;
}

.login-brand-sub {
  font-size: .9rem;
  opacity: .86;
}

.login-hero-content {
  margin-top: 110px;
}

.login-hero-title {
  margin-bottom: 16px;
  font-size: 3rem;
  font-weight: 900;
  line-height: 1;
}

.login-hero-text {
  max-width: 430px;
  margin-bottom: 24px;
  opacity: .9;
}

.login-hero-bullets {
  display: grid;
  gap: 12px;
}

.login-bullet {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  border: 1px solid rgba(255, 255, 255, .18);
  border-radius: 16px;
  background: rgba(255, 255, 255, .12);
}

.login-bullet i {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border-radius: 12px;
  background: rgba(255, 255, 255, .18);
}

.login-form {
  padding: 52px 42px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.login-form-title {
  font-size: 2rem;
  font-weight: 800;
}

.login-input .input-group-text {
  border-right: 0;
  color: var(--neo-primary);
  background: #ffffff;
}

.login-input .form-control {
  border-left: 0;
}

.login-input .btn {
  border-color: var(--neo-border);
  border-left: 0;
  background: #ffffff;
  color: var(--neo-muted);
  box-shadow: none;
}

.login-alert {
  border: 0;
  border-radius: 16px;
  background: rgba(239, 68, 68, .1);
  color: #b91c1c;
  font-weight: 700;
}

.sidebar {
  position: fixed;
  inset: 0 auto 0 0;
  width: 236px;
  padding: 18px 14px;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  background: var(--neo-sidebar);
  color: #ffffff;
  z-index: 1040;
}

.sidebar > ul.nav {
  flex: 1 1 auto;
  min-height: 0;
  overflow-x: hidden;
  overflow-y: auto;
}

.sidebar-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 16px;
  color: #ffffff;
}

.sidebar-brand img {
  width: 30px;
  height: 30px;
  object-fit: contain;
}

.sidebar-brand span {
  font-size: .95rem;
  font-weight: 800;
}

.sidebar .nav-link,
.sidebar .submenu-toggle {
  width: 100%;
  margin: 3px 0;
  border: 0;
  border-radius: 8px;
  color: #f8fafc;
  background: transparent;
  font-size: .95rem;
  font-weight: 400;
  transition: .18s ease;
}

.sidebar .nav-link:hover,
.sidebar .submenu-toggle:hover {
  color: #ffffff;
  background: rgba(255, 255, 255, .09);
}

.sidebar .nav-link.active {
  color: #ffffff !important;
  background: #242b3d !important;
  font-weight: 700;
}

.sidebar .nav-link i,
.sidebar .submenu-toggle i:first-child {
  width: 20px;
  color: #bfdbfe;
  text-align: center;
}

.sidebar .submenu-toggle.active-parent {
  color: #ffffff !important;
  background: rgba(255, 255, 255, .08) !important;
}

.submenu-wrap {
  margin: 2px 0 6px 12px;
  padding-left: 10px;
  border-left: 1px solid rgba(255, 255, 255, .12);
}

.submenu-wrap .nav-link {
  min-height: 34px;
  margin: 1px 0;
  padding: 6px 10px;
  border-radius: 7px;
  color: #d7e2f2;
  font-size: .86rem;
}

.submenu-wrap .nav-link i {
  width: 18px;
  font-size: .8rem;
}

.submenu-wrap .nav-link.active {
  background: #242b3d !important;
}

.submenu-chevron {
  transition: .2s ease;
}

.submenu-toggle[aria-expanded="true"] .submenu-chevron {
  transform: rotate(180deg);
}

.sidebar-footer {
  flex: 0 0 auto;
  margin-top: 12px;
  padding-top: 10px;
  border-top: 1px solid rgba(255, 255, 255, .12);
  color: #7d899a;
  font-size: .78rem;
}

.content {
  min-height: 100vh;
  margin-left: 236px;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 1030;
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 72px;
  padding: 14px 18px;
  border-bottom: 1px solid var(--neo-border);
  background: #f8fafc;
}

.page-title {
  margin: 0;
  font-size: .95rem;
  font-weight: 700;
  color: #182231;
}

.topbar-profile {
  position: relative;
  display: flex;
  align-items: center;
  gap: 8px;
}

.user-profile-card {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 40px;
  padding: 5px 9px 5px 6px;
  border: 1px solid #d9e2ef;
  border-radius: 999px;
  background: #ffffff;
  box-shadow: 0 4px 12px rgba(15, 23, 42, .05);
  cursor: pointer;
  user-select: none;
}

.user-avatar {
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  flex: 0 0 28px;
  border-radius: 50%;
  background: #eaf1ff;
  color: #2563eb;
  font-size: .88rem;
}

.user-profile-text {
  display: grid;
  gap: 0;
  line-height: 1.02;
}

.user-profile-name {
  max-width: 180px;
  overflow: hidden;
  color: #020617;
  font-size: .78rem;
  font-weight: 700;
  text-overflow: ellipsis;
  white-space: nowrap;
  text-transform: uppercase;
}

.user-profile-role {
  color: #64748b;
  font-size: .74rem;
  font-weight: 400;
}

.user-profile-chevron {
  display: grid;
  place-items: center;
  width: 18px;
  height: 18px;
  color: #334155;
  font-size: .72rem;
}

.profile-menu {
  position: absolute;
  top: calc(100% + 6px);
  right: 52px;
  z-index: 1090;
  width: 160px;
  overflow: hidden;
  border: 1px solid #d8dee7;
  border-radius: 8px;
  background: #ffffff;
  box-shadow: 0 12px 28px rgba(15, 23, 42, .14);
}

.profile-menu-item {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  min-height: 40px;
  padding: 10px 12px;
  border: 0;
  background: #ffffff;
  color: #1f2937;
  font-size: .88rem;
  text-align: left;
}

.profile-menu-item:hover {
  background: #f1f5f9;
}

.profile-menu-item i {
  width: 18px;
  color: #64748b;
  text-align: center;
}

.password-edit-group .btn {
  min-width: 42px;
  border-color: #d6dce4;
  background: #ffffff;
  color: #475569;
}

.profile-update-note {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin-bottom: 14px;
  padding: 10px 12px;
  border: 1px solid #dbeafe;
  border-radius: 8px;
  background: #eff6ff;
  color: #334155;
  font-size: .86rem;
}

.profile-update-note i {
  margin-top: 2px;
  color: #2563eb;
}

.topbar-logout.btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 40px;
  padding: 0 11px;
  border-radius: 6px;
  color: #ffffff;
  background: #2563eb;
  box-shadow: 0 4px 12px rgba(37, 99, 235, .22);
  font-size: .85rem;
}

.main-content {
  padding: 16px 20px;
}

.input-group {
  max-width: 100%;
}

.input-group-text {
  min-height: 31px;
  border-color: #d6dce4;
  border-radius: 5px 0 0 5px;
  background: #ffffff;
  color: #0f172a;
}

.input-group .form-control {
  min-height: 31px;
  border-radius: 0 5px 5px 0;
}

.segment-toolbar {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}

.segment-toolbar .input-group {
  flex: 1 1 auto;
  margin-bottom: 0 !important;
}

.segment-toolbar-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  white-space: nowrap;
}

.segment-toolbar-actions .btn {
  min-height: 31px;
  padding: 4px 10px;
  font-size: .82rem;
}

.segment-filter-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.segment-filter-button.is-active {
  border-color: #2563eb;
  color: #1d4ed8;
  background: #eff6ff;
}

.segment-filter-count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 20px;
  height: 20px;
  margin-left: 7px;
  padding: 0 6px;
  border-radius: 999px;
  color: #ffffff;
  background: #2563eb;
  font-size: .7rem;
  font-weight: 700;
  line-height: 1;
}

.segment-filter-panel {
  position: fixed;
  z-index: 1065;
  display: flex;
  width: min(360px, calc(100vw - 24px));
  height: min(540px, calc(100vh - 24px));
  overflow: hidden;
  flex-direction: column;
  box-sizing: border-box;
  border: 1px solid #dbe3ef;
  border-radius: 12px;
  background: #ffffff;
  box-shadow: 0 14px 38px rgba(15, 23, 42, .18);
}

.segment-filter-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  padding: 13px 14px 11px;
  border-bottom: 1px solid #e7ecf3;
}

.segment-filter-header strong {
  display: block;
  color: #172033;
  font-size: .94rem;
}

.segment-filter-header small {
  display: block;
  margin-top: 2px;
  color: #64748b;
  font-size: .72rem;
}

.segment-filter-close {
  display: inline-flex;
  width: 30px;
  height: 30px;
  flex: 0 0 30px;
  align-items: center;
  justify-content: center;
  border: 0;
  border-radius: 7px;
  color: #64748b;
  background: transparent;
  transition: var(--neo-transition);
}

.segment-filter-close:hover,
.segment-filter-close:focus-visible {
  color: #172033;
  background: #eef2f7;
  outline: none;
}

.segment-filter-body {
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: 2px 14px 8px;
  scrollbar-width: thin;
}

.segment-filter-group {
  padding: 10px 0;
  border-bottom: 1px solid #edf1f6;
}

.segment-filter-group:last-child {
  border-bottom: 0;
}

.segment-filter-group h6 {
  margin: 0 0 6px;
  color: #334155;
  font-size: .7rem;
  font-weight: 800;
  letter-spacing: .045em;
  text-transform: uppercase;
}

.segment-filter-options {
  display: grid;
  gap: 1px;
}

.segment-filter-option {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  margin: 0;
  padding: 4px 5px;
  border-radius: 6px;
  color: #334155;
  cursor: pointer;
  font-size: .81rem;
  line-height: 1.3;
}

.segment-filter-option:hover {
  background: #f5f8fc;
}

.segment-filter-option input {
  width: 15px;
  height: 15px;
  margin-top: 1px;
  flex: 0 0 15px;
  accent-color: #2563eb;
}

.segment-filter-too-many {
  margin: 0;
  color: #64748b;
  font-size: .8rem;
}

.btn-success {
  border-color: #198754;
  background: #198754;
}

.btn-outline-secondary {
  border-color: #6c757d;
  color: #6c757d;
  background: #ffffff;
}

.form-label {
  margin-bottom: 8px;
  color: #172033;
  font-size: .95rem;
  font-weight: 400;
}

.form-control,
.form-select {
  min-height: 38px;
  border: 1px solid #d6dce4;
  border-radius: 5px;
  color: var(--neo-text);
  background-color: #ffffff;
  transition: var(--neo-transition);
}

.form-control:disabled,
.form-select:disabled,
.form-control[readonly] {
  background-color: #e9ecef;
  opacity: 1;
}

.form-control:focus,
.form-select:focus {
  border-color: rgba(13, 110, 253, .65);
  box-shadow: 0 0 0 3px rgba(13, 110, 253, .14);
}

textarea.form-control {
  min-height: 84px;
}

textarea.form-control.textarea-fixed {
  resize: none;
}

.import-result {
  border: 1px solid #dbe3ef;
  border-radius: 8px;
  background: #f8fafc;
  padding: 12px;
  font-size: .86rem;
}

.modal-import-csv {
  max-width: 760px;
}

.modal-import-csv .import-csv-card {
  border: 0;
  border-radius: 16px;
  box-shadow: 0 20px 52px rgba(15, 23, 42, .18);
}

.import-csv-header {
  align-items: flex-start;
  min-height: auto;
  padding: 22px 18px 8px;
  border-bottom: 0;
  background: #ffffff;
}

.import-csv-header .modal-title {
  margin-bottom: 10px;
  color: #20242a;
  font-size: 1.2rem;
  font-weight: 700;
}

.import-csv-header .modal-title::before {
  display: none;
}

.import-csv-header p {
  max-width: 660px;
  margin: 0;
  color: #5f6368;
  font-size: .96rem;
  line-height: 1.5;
}

.import-csv-body {
  padding: 12px 18px 22px;
}

.import-file-row {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 12px;
}

.import-file-row .form-control {
  max-width: 420px;
  min-height: 39px;
}

.import-file-row .btn {
  min-height: 39px;
  padding: 0 14px;
  white-space: nowrap;
}

.import-result.import-result-empty {
  padding: 0;
  border: 0;
  background: transparent;
  color: #5f6368;
  font-size: .96rem;
}

.import-result-head {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 12px;
}

.import-result-head strong,
.import-result-head small {
  display: block;
}

.import-result-head small {
  margin-top: 2px;
  color: #64748b;
}

.import-result-icon {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  flex: 0 0 34px;
  border-radius: 8px;
  background: #eaf1ff;
  color: #2563eb;
}

.import-summary {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

.import-metric {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 7px;
  min-height: 38px;
  padding: 7px 9px;
  border: 1px solid #d8dee7;
  border-radius: 7px;
  background: #ffffff;
}

.import-metric span {
  color: #64748b;
  font-size: .78rem;
}

.import-metric strong {
  color: #111827;
  font-size: .95rem;
}

.import-metric.is-success i {
  color: #198754;
}

.import-metric.is-muted i {
  color: #64748b;
}

.import-metric.is-danger i {
  color: #dc3545;
}

.import-errors {
  margin-top: 12px;
  padding-top: 10px;
  border-top: 1px dashed #cbd5e1;
}

.import-errors ul {
  margin: 8px 0 0;
  padding-left: 18px;
}

.import-errors small {
  display: block;
  margin-top: 6px;
  color: #64748b;
}

.import-omitted-head,
.import-omitted-toolbar,
.import-omitted-pagination,
.import-omitted-pagination > div {
  display: flex;
  align-items: center;
}

.import-omitted-head {
  justify-content: space-between;
  gap: 10px;
}

.import-omitted-head > span {
  display: inline-grid;
  place-items: center;
  min-width: 30px;
  height: 24px;
  padding: 0 8px;
  border-radius: 12px;
  background: #e2e8f0;
  color: #334155;
  font-size: .72rem;
  font-weight: 800;
}

.import-omitted-toolbar {
  gap: 10px;
  margin-top: 9px;
}

.import-omitted-search {
  position: relative;
  flex: 1 1 auto;
}

.import-omitted-search i {
  position: absolute;
  top: 50%;
  left: 10px;
  color: #8190a4;
  font-size: .72rem;
  transform: translateY(-50%);
  pointer-events: none;
}

.import-omitted-search input {
  padding-left: 30px;
}

.import-omitted-size {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin: 0;
  color: #64748b;
  font-size: .72rem;
  white-space: nowrap;
}

.import-omitted-size select {
  width: 72px;
}

.import-omitted-table-wrap {
  max-height: 250px;
  margin-top: 8px;
  overflow: auto;
  border: 1px solid #dce3ec;
  border-radius: 7px;
  background: #ffffff;
  scrollbar-width: thin;
}

.import-omitted-table {
  width: 100%;
  min-width: 390px;
  border-collapse: collapse;
}

.import-omitted-table th,
.import-omitted-table td {
  padding: 8px 10px;
  border-bottom: 1px solid #edf1f5;
  color: #334155;
  font-size: .76rem;
  text-align: left;
}

.import-omitted-table th {
  position: sticky;
  top: 0;
  z-index: 1;
  background: #f1f5f9;
  color: #475569;
  font-size: .68rem;
  letter-spacing: .02em;
  text-transform: uppercase;
}

.import-omitted-table tr:last-child td {
  border-bottom: 0;
}

.import-omitted-table code {
  color: #1e3a5f;
  font-size: .75rem;
  white-space: nowrap;
}

.import-omitted-pagination {
  justify-content: space-between;
  gap: 10px;
  margin-top: 8px;
}

.import-omitted-pagination > div {
  gap: 7px;
}

.import-omitted-pagination .btn {
  display: inline-grid;
  place-items: center;
  width: 29px;
  height: 29px;
  padding: 0;
}

.import-omitted-pagination [data-omitted-page-label] {
  min-width: 88px;
  color: #475569;
  font-size: .72rem;
  text-align: center;
}

.required-network-dialog {
  width: min(96vw, 1440px);
  max-width: none;
  height: min(92vh, 980px);
}

.required-network-content {
  min-height: 72vh;
  overflow: hidden;
}

.required-network-toolbar {
  display: grid;
  grid-template-columns: minmax(260px, 1fr) auto;
  gap: 12px;
  align-items: center;
  margin-bottom: 14px;
}

.required-network-table-wrap {
  min-height: 320px;
  max-height: calc(92vh - 285px);
  border: 1px solid var(--border-color, #dee2e6);
  border-radius: 12px;
}

.required-network-table-wrap thead th {
  position: sticky;
  top: 0;
  z-index: 2;
  background: var(--bs-body-bg, #fff);
}

.required-filter-panel {
  position: absolute;
  z-index: 1065;
  top: 68px;
  right: 18px;
  width: min(360px, calc(100% - 36px));
  max-height: min(560px, calc(100% - 90px));
  overflow: auto;
  border: 1px solid rgba(15, 23, 42, .14);
  border-radius: 14px;
  background: var(--bs-body-bg, #fff);
  box-shadow: 0 18px 44px rgba(15, 23, 42, .18);
}

.required-filter-head {
  position: sticky;
  top: 0;
  z-index: 1;
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 16px;
  background: inherit;
  border-bottom: 1px solid rgba(15, 23, 42, .1);
}

.required-filter-head small {
  display: block;
  color: var(--bs-secondary-color);
}

.required-filter-body {
  display: grid;
  gap: 18px;
  padding: 16px;
}

.required-filter-body section {
  display: grid;
  gap: 7px;
}

.required-filter-body h6 {
  margin: 0 0 3px;
  font-size: .79rem;
  letter-spacing: .04em;
  text-transform: uppercase;
}

.required-filter-body label {
  display: flex;
  gap: 9px;
  align-items: center;
  padding: 4px 2px;
  cursor: pointer;
}

.required-subdialog-backdrop {
  position: absolute;
  z-index: 1070;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 18px;
  background: rgba(15, 23, 42, .48);
  backdrop-filter: blur(2px);
}

.required-subdialog {
  display: flex;
  flex-direction: column;
  width: min(720px, 100%);
  max-height: calc(100% - 20px);
  overflow: hidden;
  border-radius: 16px;
  background: var(--bs-body-bg, #fff);
  box-shadow: 0 24px 65px rgba(15, 23, 42, .28);
}

.required-subdialog-header,
.required-subdialog-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 15px 18px;
  border-bottom: 1px solid rgba(15, 23, 42, .1);
}

.required-subdialog-body {
  overflow: auto;
  padding: 18px;
}

.required-subdialog-footer {
  justify-content: flex-end;
  border-top: 1px solid rgba(15, 23, 42, .1);
  border-bottom: 0;
}

.btn {
  border-radius: 5px;
  font-weight: 500;
  transition: var(--neo-transition);
}

.btn:hover {
  transform: none;
}

.btn-primary {
  border-color: var(--neo-primary);
  background: var(--neo-primary);
  box-shadow: none;
}

.btn-secondary {
  border-color: #6c757d;
  background: #ffffff;
  color: #6c757d;
}

.card-soft {
  overflow: hidden;
  border: 0;
  border-radius: 18px;
  background: #ffffff;
  box-shadow: var(--neo-shadow);
  transition: var(--neo-transition);
}

.card-soft .card-body {
  padding: 16px;
}

.card-soft h4,
.card-soft h5 {
  margin-bottom: 8px;
  color: #20242a;
  font-size: 1.15rem;
  font-weight: 700;
}

.card-soft h4 i {
  display: none;
}

.kpi-card {
  border: 1px solid #e2e8f0;
}

.kpi-card:hover {
  transform: none;
}

.kpi-card .icon {
  display: grid;
  place-items: center;
  width: 52px;
  height: 52px;
  border-radius: 10px;
  font-size: 1.25rem;
  background: var(--neo-primary-soft);
  color: var(--neo-primary);
}

.kpi-card .value {
  font-size: 1.75rem;
  font-weight: 800;
  color: #0f172a;
}

.kpi-card .label {
  margin-top: 5px;
  color: var(--neo-muted);
  font-size: .88rem;
}

.dashboard-section {
  margin-top: 16px;
}

.dashboard-section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 10px;
}

.dashboard-section-head h5 {
  margin: 0;
}

.dashboard-section-head small {
  color: #64748b;
}

.mini-kpi-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  margin-bottom: 12px;
}

.mini-kpi {
  padding: 10px;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  background: #f8fafc;
}

.mini-kpi strong {
  display: block;
  color: #111827;
  font-size: 1.15rem;
}

.mini-kpi span {
  display: block;
  margin-top: 2px;
  color: #64748b;
  font-size: .78rem;
}

.segment-chart-box {
  height: 100%;
  padding: 12px;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  background: #ffffff;
}

.segment-chart-title {
  margin-bottom: 10px;
  color: #1f2937;
  font-size: .86rem;
  font-weight: 800;
}

.dashboard-accordion {
  margin-top: 12px;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  background: #ffffff;
  overflow: hidden;
}

.dashboard-accordion-head {
  display: grid;
  grid-template-columns: 1fr auto auto;
  align-items: center;
  gap: 12px;
  width: 100%;
  min-height: 56px;
  padding: 12px 14px;
  border: 0;
  background: #ffffff;
  color: #111827;
  text-align: left;
}

.dashboard-accordion-head span {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: .98rem;
  font-weight: 800;
}

.dashboard-accordion-head span i {
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  border-radius: 8px;
  background: #eef2f7;
  color: #2563eb;
}

.dashboard-accordion-head small {
  color: #64748b;
  font-size: .78rem;
}

.dashboard-chevron {
  color: #64748b;
  transition: transform .18s ease;
}

.dashboard-accordion.is-open .dashboard-chevron {
  transform: rotate(180deg);
}

.dashboard-accordion-body {
  display: none;
  padding: 0 14px 14px;
  border-top: 1px solid #edf2f7;
}

.dashboard-accordion.is-open .dashboard-accordion-body {
  display: block;
}

.insight-grid {
  column-count: 2;
  column-gap: 12px;
}

.insight-card {
  display: inline-block;
  width: 100%;
  min-width: 0;
  margin: 0 0 12px;
  padding: 12px;
  border: 1px solid #e2e8f0;
  border-radius: 9px;
  background: #ffffff;
  break-inside: avoid;
}

.insight-card.is-wide {
  column-span: all;
  display: block;
}

.insight-card-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 10px;
}

.insight-card h6 {
  margin: 0;
  color: #111827;
  font-size: .92rem;
  font-weight: 800;
}

.insight-card p {
  margin: 4px 0 0;
  color: #64748b;
  font-size: .78rem;
}

.insight-total {
  flex: 0 0 auto;
  padding: 4px 8px;
  border: 1px solid #dbe3ef;
  border-radius: 999px;
  background: #f8fafc;
  color: #334155;
  font-size: .76rem;
  font-weight: 700;
}

.insight-subtable-title {
  margin: 12px 0 7px;
  color: #334155;
  font-size: .8rem;
  font-weight: 800;
}

.insight-table {
  display: grid;
  gap: 8px;
}

.insight-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 44px;
  gap: 5px 10px;
  align-items: center;
}

.insight-row-main {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  min-width: 0;
  color: #1f2937;
  font-size: .82rem;
}

.insight-row-main span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.insight-row-main strong {
  flex: 0 0 auto;
}

.insight-bar {
  overflow: hidden;
  height: 7px;
  border-radius: 999px;
  background: #e5e7eb;
}

.insight-bar span {
  display: block;
  height: 100%;
  min-width: 3px;
  border-radius: inherit;
  background: #2563eb;
}

.insight-row small {
  grid-column: 2;
  grid-row: 1 / span 2;
  color: #64748b;
  font-size: .76rem;
  text-align: right;
}

.mini-table-wrap {
  max-height: 260px;
  overflow: auto;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
}

.mini-table {
  width: 100%;
  min-width: 420px;
  border-collapse: collapse;
}

.mini-table th,
.mini-table td {
  padding: 7px 9px;
  border-bottom: 1px solid #edf2f7;
  color: #334155;
  font-size: .78rem;
  vertical-align: top;
}

.mini-table th {
  position: sticky;
  top: 0;
  background: #f8fafc;
  color: #1f2937;
  font-weight: 800;
  z-index: 1;
}

.mini-table tr:last-child td {
  border-bottom: 0;
}

.mini-table-pagination {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-top: 8px;
  color: #64748b;
  font-size: .8rem;
}

.mini-table-pagination div {
  display: flex;
  gap: 6px;
}

.mini-table-pagination .btn {
  display: inline-grid;
  place-items: center;
  width: 30px;
  height: 30px;
  padding: 0;
}

.table-responsive {
  width: 100%;
  overflow-x: auto;
  border: 1px solid #dbe1e8;
  border-radius: 8px;
}

.table-responsive .table {
  min-width: 760px;
}

.table-pagination {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 2px 0;
  color: #475569;
  font-size: .84rem;
}

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

.pagination-size {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin: 0;
  color: #64748b;
  white-space: nowrap;
}

.pagination-size .form-select {
  width: 78px;
  min-width: 78px;
  padding-right: 25px;
}

.pagination-actions .btn {
  display: inline-grid;
  place-items: center;
  width: 31px;
  height: 31px;
  padding: 0;
}

.document-modal .modal-header,
.document-modal .modal-footer {
  background: #f8fafc;
}

.document-modal-body {
  background: #e5e7eb;
}

.pdf-sheet {
  width: min(100%, 880px);
  min-height: 1120px;
  margin: 0 auto;
  padding: 36px 42px;
  border: 1px solid #cbd5e1;
  border-radius: 4px;
  background: #ffffff;
  color: #111827;
  box-shadow: 0 16px 42px rgba(15, 23, 42, .14);
}

.pdf-sheet-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 24px;
  padding-bottom: 18px;
  border-bottom: 2px solid #1f2937;
}

.pdf-sheet-kicker {
  margin-bottom: 6px;
  color: #64748b;
  font-size: .76rem;
  font-weight: 800;
  letter-spacing: .04em;
  text-transform: uppercase;
}

.pdf-sheet h2 {
  margin: 0;
  color: #111827;
  font-size: 1.28rem;
  font-weight: 900;
}

.pdf-sheet-header p {
  margin: 8px 0 0;
  color: #64748b;
}

.pdf-status {
  flex: 0 0 auto;
  min-width: 100px;
  padding: 8px 12px;
  border-radius: 4px;
  background: #1f2937;
  color: #ffffff;
  font-size: .82rem;
  font-weight: 800;
  text-align: center;
}

.pdf-section {
  margin-bottom: 18px;
}

.pdf-section h3 {
  margin: 0 0 8px;
  color: #1f2937;
  font-size: .9rem;
  font-weight: 900;
}

.pdf-data-table {
  width: 100%;
  border-collapse: collapse;
  table-layout: fixed;
  border: 1px solid #d8dee7;
}

.pdf-data-table th,
.pdf-data-table td {
  padding: 8px 10px;
  border: 1px solid #d8dee7;
  vertical-align: top;
  font-size: .84rem;
  word-break: break-word;
}

.pdf-data-table th {
  width: 34%;
  background: #eef2f7;
  color: #1f2937;
  font-weight: 800;
}

.pdf-data-table td {
  background: #ffffff;
  color: #334155;
}

.pdf-data-table tr:nth-child(even) td {
  background: #f8fafc;
}

.table {
  margin-bottom: 0;
}

.table th {
  padding: 7px 10px;
  border-bottom: 1px solid var(--neo-border);
  color: #334155;
  font-size: .74rem;
  font-weight: 800;
  letter-spacing: .04em;
  text-transform: uppercase;
  white-space: nowrap;
  background: #f1f3f5;
}

.table td {
  padding: 7px 10px;
  border-bottom: 1px solid #dbe1e8;
  vertical-align: middle;
  color: #1f2937;
  font-size: .83rem;
}

.table th:last-child,
.table td:last-child {
  text-align: right;
}

.table-hover tbody tr:hover {
  background: #e9ecef;
}

.actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  white-space: nowrap;
}

.actions .btn {
  display: inline-grid;
  place-items: center;
  width: 32px;
  height: 32px;
  padding: 0;
  border-radius: 4px;
}

.actions .btn i {
  font-size: .82rem;
}

.btn-outline-primary,
.btn-outline-warning {
  border-color: #6c757d;
  color: #6c757d;
  background: #ffffff;
}

.btn-outline-primary:hover,
.btn-outline-warning:hover {
  border-color: #6c757d;
  background: #6c757d;
  color: #ffffff;
}

.estado-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 32px;
  padding: 0 10px;
  border: 1px solid #0d6efd;
  border-radius: 5px;
  color: #0d6efd;
  background: #ffffff;
  font-size: .82rem;
  font-weight: 500;
}

.modal-title .estado-pill {
  min-height: 22px;
  padding: 0 8px;
  border: 0;
  border-radius: 5px;
  color: #ffffff;
  background: #0d6efd;
  font-size: .78rem;
  font-weight: 700;
}

.modal-title .estado-pill.is-inactive {
  color: #ffffff;
  background: #6c757d;
}

.modal-title .estado-pill.is-danger {
  color: #ffffff;
  background: #dc3545;
}

.estado-pill.is-inactive {
  border-color: #6c757d;
  color: #6c757d;
}

.estado-pill.is-danger {
  border-color: #dc3545;
  color: #dc3545;
}

.detail-box {
  min-height: 100%;
  padding: 10px;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  background: #ffffff;
}

.detail-box small {
  display: block;
  margin-bottom: 6px;
  color: #64748b;
  font-size: .78rem;
  font-weight: 700;
  text-transform: none;
}

.detail-box div {
  min-height: 38px;
  margin-top: 0;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: #1e293b;
  font-weight: 400;
  word-break: break-word;
}

.chart-list {
  display: grid;
  gap: 12px;
  margin-top: 14px;
}

.chart-row {
  display: grid;
  gap: 6px;
}

.chart-row-head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  color: #334155;
  font-size: .86rem;
  font-weight: 800;
}

.chart-track {
  overflow: hidden;
  height: 10px;
  border-radius: 999px;
  background: #e2e8f0;
}

.chart-bar {
  height: 100%;
  min-width: 4px;
  border-radius: inherit;
  background: linear-gradient(90deg, #2563eb, #22c55e);
}

.modal-content {
  overflow: hidden;
  border: 1px solid rgba(15, 23, 42, .16);
  border-radius: 8px;
  box-shadow: 0 18px 48px rgba(15, 23, 42, .18);
}

.modal-dialog.modal-lg {
  max-width: 800px;
}

.modal-header {
  min-height: 62px;
  padding: 14px 16px;
  border-bottom: 1px solid var(--neo-border);
  background: #f8fafc;
}

.modal-title {
  display: flex;
  align-items: center;
  gap: 9px;
  color: #182231;
  font-size: 1.05rem;
  font-weight: 700;
}

.modal-title::before {
  content: "";
  display: inline-block;
  width: 28px;
  height: 28px;
  flex: 0 0 28px;
  border: 1px solid #d8dee7;
  border-radius: 8px;
  background: #ffffff url("../img/icono_2.png") center / 18px 18px no-repeat;
}

.modal-body {
  padding: 18px 16px;
}

.modal-body .row {
  row-gap: 18px;
}

.modal-footer {
  padding: 12px 16px;
  border-top: 1px solid var(--neo-border);
  background: #f8fafc;
}

.modal .btn-close {
  width: 1.1em;
  height: 1.1em;
  opacity: .65;
}

.neo-toast {
  overflow: hidden;
  min-width: 260px;
  max-width: min(360px, calc(100vw - 24px));
  border: 1px solid rgba(226, 232, 240, .95) !important;
  border-radius: 10px;
  background: rgba(255, 255, 255, .96) !important;
  color: #172033 !important;
  box-shadow: 0 14px 34px rgba(15, 23, 42, .14);
  backdrop-filter: blur(12px);
}

.neo-toast .toast-body {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 10px 12px;
  font-size: .88rem;
  font-weight: 500;
}

.neo-toast-icon {
  display: grid;
  place-items: center;
  width: 26px;
  height: 26px;
  flex: 0 0 26px;
  border-radius: 8px;
}

.neo-toast-success .neo-toast-icon {
  background: rgba(34, 197, 94, .12);
  color: var(--neo-success);
}

.neo-toast-danger .neo-toast-icon {
  background: rgba(239, 68, 68, .12);
  color: var(--neo-danger);
}

.neo-toast-warning .neo-toast-icon {
  background: rgba(245, 158, 11, .12);
  color: var(--neo-warning);
}

.btn-outline-danger {
  border-color: rgba(239, 68, 68, .35);
  color: #dc2626;
  background: #ffffff;
}

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

.required-dot {
  font-weight: 900;
}

@media (max-width: 900px) {
  .login-shell {
    grid-template-columns: 1fr;
  }

  .login-hero {
    min-height: auto;
  }

  .login-hero-content {
    margin-top: 45px;
  }

  .sidebar {
    position: static;
    width: 100%;
    height: auto;
  }

  .content {
    margin-left: 0;
  }

  .topbar {
    gap: 12px;
  }

  .user-profile-name {
    max-width: 110px;
  }

  .topbar-logout.btn span {
    display: none;
  }

  .topbar-logout.btn {
    width: 42px;
    justify-content: center;
    padding: 0;
  }

  .main-content {
    padding: 12px;
  }

  .segment-toolbar {
    align-items: stretch;
    flex-direction: column;
  }

  .segment-toolbar-actions {
    flex-wrap: wrap;
    white-space: normal;
  }

  .segment-toolbar-actions .btn {
    flex: 1 1 140px;
  }

  .table-pagination {
    align-items: stretch;
    flex-direction: column;
  }

  .mini-kpi-grid {
    grid-template-columns: 1fr;
  }

  .pagination-actions {
    justify-content: space-between;
  }

  .pagination-size {
    justify-content: space-between;
  }

  .modal-dialog.modal-xl,
  .modal-dialog.modal-lg {
    max-width: calc(100% - 18px);
    margin-right: auto;
    margin-left: auto;
  }

  .modal-import-csv {
    max-width: calc(100% - 18px);
  }

  .import-file-row {
    align-items: stretch;
    flex-direction: column;
  }

  .import-file-row .form-control {
    max-width: none;
  }

  .pdf-sheet {
    min-height: auto;
    padding: 24px 18px;
  }

  .pdf-sheet-header {
    flex-direction: column;
  }

  .pdf-status {
    width: 100%;
  }
}

@media (max-width: 560px) {
  body {
    font-size: 13px;
  }

  .topbar {
    align-items: flex-start;
    flex-direction: column;
  }

  .topbar-profile {
    width: 100%;
    justify-content: space-between;
  }

  .profile-menu {
    right: 52px;
  }

  .card-soft .card-body {
    padding: 12px;
  }

  .actions {
    gap: 5px;
  }

  .actions .btn,
  .estado-pill {
    width: 29px;
    min-width: 29px;
    height: 29px;
    min-height: 29px;
    padding: 0;
  }

  .estado-pill {
    overflow: hidden;
    font-size: 0;
  }

  .pdf-data-table th,
  .pdf-data-table td {
    display: block;
    width: 100%;
  }

  .pdf-data-table th {
    border-bottom: 0;
  }
}

/* Responsive system polish */
html {
  overflow-x: hidden;
}

img,
svg,
canvas,
video {
  max-width: 100%;
}

.content,
.main-content,
.card-soft,
.modal,
.table-responsive {
  min-width: 0;
}

@media (min-width: 1440px) {
  .main-content {
    padding: 20px 24px;
  }

  .card-soft .card-body {
    padding: 18px;
  }

  .modal-dialog.modal-xl {
    max-width: 1160px;
  }

  .modal-import-csv {
    max-width: 760px;
  }
}

@media (max-width: 1180px) {
  .content {
    margin-left: 220px;
  }

  .sidebar {
    width: 220px;
    padding: 16px 12px;
  }

  .segment-toolbar {
    align-items: stretch;
    flex-wrap: wrap;
  }

  .segment-toolbar .input-group {
    flex: 1 1 420px;
  }

  .segment-toolbar-actions {
    flex: 0 1 auto;
    flex-wrap: wrap;
    justify-content: flex-end;
  }

  .mini-kpi-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 992px) {
  .login-bg {
    align-items: flex-start;
    padding: 16px;
  }

  .login-shell {
    grid-template-columns: 1fr;
    border-radius: 18px;
  }

  .login-hero {
    min-height: auto;
    padding: 24px;
  }

  .login-hero-content {
    margin-top: 38px;
  }

  .login-hero-title {
    font-size: 2.2rem;
  }

  .login-form {
    padding: 30px 24px;
  }

  .sidebar {
    position: sticky;
    top: 0;
    width: 100%;
    max-height: 45vh;
    padding: 12px;
    border-bottom: 1px solid rgba(255, 255, 255, .12);
  }

  .sidebar-brand {
    margin-bottom: 10px;
  }

  .sidebar-footer {
    display: none;
  }

  .content {
    margin-left: 0;
  }

  .topbar {
    position: sticky;
    top: 0;
    min-height: 62px;
    padding: 10px 12px;
  }

  .main-content {
    padding: 12px;
  }

  .card-soft {
    border-radius: 12px;
  }

  .card-soft .card-body {
    padding: 14px;
  }

  .segment-toolbar {
    align-items: stretch;
    flex-direction: column;
  }

  .segment-toolbar-actions {
    width: 100%;
    justify-content: flex-start;
  }

  .segment-toolbar-actions .btn {
    flex: 1 1 150px;
  }

  .table-responsive {
    border-radius: 8px;
  }

  .table-responsive .table {
    min-width: 720px;
  }

  .modal-dialog,
  .modal-dialog.modal-lg,
  .modal-dialog.modal-xl,
  .modal-import-csv {
    max-width: calc(100vw - 20px);
    margin: 10px auto;
  }

  .modal-content {
    max-height: calc(100vh - 20px);
  }

  .modal-dialog-scrollable .modal-content {
    max-height: calc(100vh - 20px);
  }

  .modal-header,
  .modal-footer {
    padding: 12px 14px;
  }

  .modal-body {
    padding: 14px;
  }

  .import-csv-header {
    padding: 18px 16px 8px;
  }

  .import-csv-body {
    padding: 10px 16px 18px;
  }

  .import-file-row {
    align-items: stretch;
    flex-direction: column;
  }

  .import-file-row .form-control,
  .import-file-row .btn {
    width: 100%;
    max-width: none;
  }

  .import-summary {
    grid-template-columns: 1fr;
  }

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

  .pdf-sheet {
    min-height: auto;
    padding: 24px 18px;
  }

  .pdf-sheet-header {
    flex-direction: column;
  }

  .pdf-status {
    width: 100%;
  }
}

@media (max-width: 640px) {
  body {
    font-size: 13px;
  }

  .sidebar {
    max-height: 42vh;
  }

  .submenu-wrap {
    margin-left: 6px;
    padding-left: 8px;
  }

  .topbar {
    align-items: stretch;
    flex-direction: column;
    gap: 10px;
  }

  .page-title {
    font-size: .9rem;
  }

  .topbar-profile {
    width: 100%;
    justify-content: space-between;
  }

  .user-profile-card {
    max-width: calc(100vw - 84px);
  }

  .user-profile-name {
    max-width: 145px;
  }

  .profile-menu {
    right: 50px;
    width: 168px;
  }

  .topbar-logout.btn span {
    display: none;
  }

  .topbar-logout.btn {
    width: 40px;
    min-width: 40px;
    justify-content: center;
    padding: 0;
  }

  .main-content {
    padding: 10px;
  }

  .card-soft .card-body {
    padding: 12px;
  }

  .card-soft h4,
  .card-soft h5 {
    font-size: 1rem;
  }

  .segment-toolbar-actions .btn {
    flex: 1 1 100%;
  }

  .table-responsive .table {
    min-width: 680px;
  }

  .table th,
  .table td {
    padding: 7px 8px;
    font-size: .79rem;
  }

  .actions {
    gap: 5px;
  }

  .actions .btn {
    width: 29px;
    height: 29px;
  }

  .estado-pill {
    min-height: 29px;
    padding: 0 8px;
    font-size: .76rem;
  }

  .table-pagination {
    align-items: stretch;
    flex-direction: column;
  }

  .pagination-actions {
    justify-content: space-between;
  }

  .pagination-size {
    justify-content: space-between;
  }

  .modal-title {
    font-size: .98rem;
  }

  .modal-title::before {
    width: 24px;
    height: 24px;
    flex-basis: 24px;
    background-size: 16px 16px;
  }

  .modal-footer {
    flex-wrap: wrap;
  }

  .modal-footer .btn {
    flex: 1 1 auto;
  }

  .import-csv-header .modal-title {
    font-size: 1.08rem;
  }

  .import-csv-header p,
  .import-result.import-result-empty {
    font-size: .9rem;
  }

  .mini-kpi-grid {
    grid-template-columns: 1fr;
  }

  .dashboard-section-head {
    align-items: flex-start;
    flex-direction: column;
  }

  .dashboard-accordion-head {
    grid-template-columns: 1fr auto;
  }

  .dashboard-accordion-head small {
    grid-column: 1 / -1;
    padding-left: 40px;
  }

  .insight-grid {
    column-count: 1;
  }

  .chart-row-head {
    font-size: .8rem;
  }

  .pdf-sheet {
    padding: 18px 12px;
  }

  .pdf-data-table th,
  .pdf-data-table td {
    display: block;
    width: 100%;
  }

  .pdf-data-table th {
    border-bottom: 0;
  }

  .neo-toast {
    min-width: 0;
    width: calc(100vw - 24px);
  }
}

@media (max-width: 380px) {
  .user-profile-name {
    max-width: 105px;
  }

  .profile-menu {
    right: 0;
  }

  .login-form,
  .login-hero {
    padding: 20px 16px;
  }

  .login-hero-title {
    font-size: 1.85rem;
  }

  .table-responsive .table {
    min-width: 640px;
  }
}

@media (max-width: 767.98px) {
  .segment-filter-panel {
    top: auto;
    right: 12px;
    bottom: 12px;
    left: 12px;
    width: auto;
    height: min(560px, calc(100vh - 80px));
    max-height: none;
    border-radius: 14px;
  }

  .segment-filter-body {
    max-height: none;
  }

  .import-omitted-toolbar,
  .import-omitted-pagination {
    align-items: stretch;
    flex-direction: column;
  }

  .import-omitted-size,
  .import-omitted-pagination > div {
    justify-content: space-between;
  }

  .import-omitted-table-wrap {
    max-height: 220px;
  }

  .required-network-dialog {
    width: 100%;
    height: 100%;
    margin: 0;
  }

  .required-network-content {
    min-height: 100vh;
    border-radius: 0;
  }

  .required-network-toolbar {
    grid-template-columns: 1fr;
  }

  .required-network-table-wrap {
    max-height: calc(100vh - 340px);
  }

  .required-subdialog-backdrop {
    padding: 8px;
  }
}
body.neo-viewer #btnNuevo,
body.neo-viewer [id^="btnImportar"],
body.neo-viewer [id^="btnConfirmarImportar"],
body.neo-viewer .btn-editar,
body.neo-viewer .btn-eliminar,
body.neo-viewer [data-required-action="edit"],
body.neo-viewer [data-required-action="delete"],
body.neo-viewer [data-action="restaurar"],
body.neo-viewer [data-action="eliminar"] {
  display: none !important;
}

/* El visualizador general consulta todas las secciones sin controles de escritura. */
body.neo-full-viewer [data-write-action],
body.neo-full-viewer [data-crear],
body.neo-full-viewer [data-function-action],
body.neo-full-viewer [data-tag-delete],
body.neo-full-viewer [data-check-delete],
body.neo-full-viewer [data-comment-delete],
body.neo-full-viewer [data-file-delete],
body.neo-full-viewer [data-recinto-action="editar"],
body.neo-full-viewer [data-recinto-action="eliminar"],
body.neo-full-viewer [data-area-action="editar"],
body.neo-full-viewer [data-area-action="eliminar"],
body.neo-full-viewer [data-edit-category],
body.neo-full-viewer [data-edit-problem],
body.neo-full-viewer [data-edit-diagnostic],
body.neo-full-viewer [data-edit-diagnostic-step],
body.neo-full-viewer [data-wa-link],
body.neo-full-viewer [data-wa-unlink],
body.neo-full-viewer [data-wa-link-select],
body.neo-full-viewer [data-contact-action],
body.neo-full-viewer [data-create-state],
body.neo-full-viewer #btnNuevaTarjeta,
body.neo-full-viewer #btnQuitarColorTarjeta,
body.neo-full-viewer #btnGuardarTarjeta,
body.neo-full-viewer #btnEliminarTarjeta,
body.neo-full-viewer #btnGuardarFuncion,
body.neo-full-viewer #btnCancelarFuncion,
body.neo-full-viewer #btnCrearEtiqueta,
body.neo-full-viewer #btnCrearEtiquetaGestion,
body.neo-full-viewer #btnAgregarChecklist,
body.neo-full-viewer #btnAgregarComentario,
body.neo-full-viewer #btnConfirmarActividad,
body.neo-full-viewer #btnAbrirActividadesTarjeta,
body.neo-full-viewer #btnEtiquetasTarjeta,
body.neo-full-viewer #btnGuardarRecintoDetalle,
body.neo-full-viewer #btnGestionarAreasRecinto,
body.neo-full-viewer #btnAgregarAreaDesdeRecinto,
body.neo-full-viewer #btnNuevoTicket,
body.neo-full-viewer #btnNuevaCategoria,
body.neo-full-viewer #btnNuevoProblema,
body.neo-full-viewer #btnNuevaRutaDiagnostico,
body.neo-full-viewer #btnNuevoPasoDiagnostico,
body.neo-full-viewer #btnGuardarWhatsAppConfig,
body.neo-full-viewer #btnWaSimular,
body.neo-full-viewer #btnWaSimReset,
body.neo-full-viewer #btnGuardarTicket,
body.neo-full-viewer #btnTomarTicket,
body.neo-full-viewer #btnReasignar,
body.neo-full-viewer #btnPrioridad,
body.neo-full-viewer #btnEstado,
body.neo-full-viewer #btnIniciarDiagnosticoTicket,
body.neo-full-viewer #btnObservacion,
body.neo-full-viewer #btnNota,
body.neo-full-viewer #btnGuardarSolucion,
body.neo-full-viewer #btnResolver,
body.neo-full-viewer #btnCerrar,
body.neo-full-viewer #btnReabrir,
body.neo-full-viewer #btnDiagnosticoSi,
body.neo-full-viewer #btnDiagnosticoNo,
body.neo-full-viewer #btnCancelarDiagnosticoEjecucion,
body.neo-full-viewer #btnUsarSolucionDiagnostico,
body.neo-full-viewer #btnIniciarAutoservicio,
body.neo-full-viewer #btnNuevaSolicitud,
body.neo-full-viewer #btnRespuestaSi,
body.neo-full-viewer #btnRespuestaNo,
body.neo-full-viewer #btnConfirmarEliminarEvento {
  display: none !important;
}
body.neo-full-viewer #btnGuardarMiPerfil,
body.neo-full-viewer #modalMiPerfil .account-photo-camera,
body.neo-full-viewer #modalMiPerfil .account-photo-copy small,
body.neo-full-viewer #modalMiPerfil .account-photo-copy > span {
  display: none !important;
}
body.neo-full-viewer #btnPerfilFoto {
  pointer-events: none;
}
body.neo-full-viewer #formFuncion,
body.neo-full-viewer #formEtiquetaGestion,
body.neo-full-viewer #modalTarjeta .activity-section-head label[for="actividadArchivos"],
body.neo-full-viewer #modalTarjeta .activity-inline-add,
body.neo-full-viewer #modalTarjeta .activity-comment-add,
body.neo-full-viewer #modalDetalleTicket .action-box:not(.diagnostic-ticket-box),
body.neo-full-viewer #modalDetalleTicket #reopenWrap,
body.neo-full-viewer #formAutoservicio,
body.neo-full-viewer #btnDescartarDiagnostico,
body.neo-full-viewer #btnConfirmarDescartar,
body.neo-full-viewer .wa-simulator-panel,
body.neo-full-viewer #btnGuardarCategoria,
body.neo-full-viewer #btnGuardarProblema,
body.neo-full-viewer #btnGuardarRutaDiagnostico,
body.neo-full-viewer #btnGuardarPasoDiagnostico,
body.neo-full-viewer #btnGuardarUbicacion,
body.neo-full-viewer #btnEliminarUbicacion,
body.neo-full-viewer #btnGuardarProveedor,
body.neo-full-viewer #btnAgregarContactoProveedor,
body.neo-full-viewer #btnGuardarContactoProveedor,
body.neo-full-viewer #btnGuardarServicioGestion,
body.neo-full-viewer #btnEliminarServicioGestion,
body.neo-full-viewer #btnNuevoServicioMaestro,
body.neo-full-viewer #btnNuevaCategoriaServicio,
body.neo-full-viewer label[for="servicioArchivos"] {
  display: none !important;
}
body.neo-full-viewer #modalTarjeta input:not([type="hidden"]),
body.neo-full-viewer #modalTarjeta textarea,
body.neo-full-viewer #modalTarjeta select,
body.neo-full-viewer #modalDetalleTicket input,
body.neo-full-viewer #modalDetalleTicket textarea,
body.neo-full-viewer #modalDetalleTicket select {
  pointer-events: none;
}
body.neo-full-viewer #modalProveedor input,
body.neo-full-viewer #modalProveedor textarea,
body.neo-full-viewer #modalProveedor select,
body.neo-full-viewer #modalServicioGestion input,
body.neo-full-viewer #modalServicioGestion textarea,
body.neo-full-viewer #modalServicioGestion select,
body.neo-full-viewer #waActivo,
body.neo-full-viewer #waAutoVincular {
  pointer-events: none;
}
body.neo-full-viewer .selfservice-steps {
  display: none !important;
}
body.neo-full-viewer #modalTarjeta .equipo-label-option,
body.neo-full-viewer #modalTarjeta .activity-check-row label,
body.neo-full-viewer #modalTarjeta [data-check-toggle] {
  pointer-events: none;
}
/* Navegación y controles táctiles: se mantiene el layout de escritorio y el menú pasa a drawer en móvil. */
.mobile-menu-toggle,
.mobile-sidebar-backdrop { display: none; }

@media (max-width: 991.98px) {
  body { min-width: 0; overflow-x: hidden; }
  .sidebar {
    position: fixed;
    top: 0;
    bottom: 0;
    left: 0;
    width: min(286px, 84vw);
    max-height: none;
    padding: 16px 12px;
    transform: translateX(-105%);
    transition: transform .2s ease;
    box-shadow: 14px 0 32px rgba(15, 23, 42, .28);
  }
  body.mobile-sidebar-open .sidebar { transform: translateX(0); }
  .sidebar-footer { display: block; }
  .mobile-sidebar-backdrop {
    position: fixed;
    z-index: 1035;
    inset: 0;
    border: 0;
    background: rgba(15, 23, 42, .45);
  }
  body.mobile-sidebar-open .mobile-sidebar-backdrop { display: block; }
  .mobile-menu-toggle {
    display: inline-grid;
    place-items: center;
    width: 42px;
    height: 42px;
    flex: 0 0 42px;
    padding: 0;
    border: 1px solid #d6deea;
    border-radius: 8px;
    color: #1d4ed8;
    background: #fff;
    font-size: 1rem;
  }
  .topbar { gap: 10px; }
  .topbar > :last-child { margin-left: auto; }
  .content { min-height: 100dvh; }
  .main-content { padding-bottom: max(14px, env(safe-area-inset-bottom)); }
  .btn, .form-control, .form-select, .input-group-text { min-height: 40px; }
  .dropdown-menu { max-width: calc(100vw - 24px); }
}

@media (max-width: 575.98px) {
  .topbar { min-height: 58px; padding: 8px 10px; }
  .topbar > :last-child { width: auto; }
  .page-title { align-self: center; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .main-content { padding: 8px; }
  .card-soft .card-body { padding: 10px; }
  .segment-toolbar-actions { gap: 7px; }
  .segment-toolbar-actions > .dropdown,
  .segment-toolbar-actions > .btn { flex: 1 1 calc(50% - 7px); }
  .segment-toolbar-actions .btn { width: 100%; }
  .modal-dialog, .modal-dialog.modal-lg, .modal-dialog.modal-xl { margin: 8px auto; }
  .modal-header, .modal-body, .modal-footer { padding: 11px 12px; }
  .modal-footer .btn { min-height: 42px; }
  .table-pagination { gap: 8px; }
  .pagination-actions { overflow-x: auto; padding-bottom: 2px; white-space: nowrap; }

  /* Buscador principal de cada segmento: compacto, uniforme y apto para toque. */
  .segment-toolbar .input-group {
    flex: 1 1 100%;
    width: 100%;
    min-width: 0;
    margin-bottom: 2px !important;
  }

  .segment-toolbar .input-group > .input-group-text,
  .segment-toolbar .input-group > .form-control {
    height: 38px;
    min-height: 38px;
    font-size: .86rem;
  }

  .segment-toolbar .input-group > .input-group-text {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 38px;
    width: 38px;
    padding: 0;
  }

  .segment-toolbar .input-group > .form-control {
    min-width: 0;
    padding: .35rem .65rem;
  }
}

/* Sidebar LEVATEC v3: navegación centralizada, compacta y responsiva. */
:root {
  --neo-sidebar-width: 264px;
  --neo-sidebar-compact-width: 78px;
}

.sidebar {
  width: var(--neo-sidebar-width);
  padding: 16px 14px 14px;
  gap: 12px;
  border-right: 1px solid rgba(148, 163, 184, .12);
  background:
    radial-gradient(circle at 10% 0, rgba(37, 99, 235, .16), transparent 28%),
    var(--neo-sidebar);
  transition: width .22s ease, transform .22s ease;
}

.content {
  margin-left: var(--neo-sidebar-width);
  transition: margin-left .22s ease;
}

.sidebar-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  min-height: 44px;
}

.sidebar-brand {
  min-width: 0;
  margin: 0;
  padding: 4px;
  border-radius: 10px;
}

.sidebar-brand:focus-visible,
.sidebar-collapse-toggle:focus-visible,
.sidebar-section-toggle:focus-visible,
.sidebar-link:focus-visible,
.mobile-menu-toggle:focus-visible {
  outline: 3px solid rgba(96, 165, 250, .55);
  outline-offset: 2px;
}

.sidebar-brand img {
  width: 34px;
  height: 34px;
  flex: 0 0 34px;
}

.sidebar-brand span {
  overflow: hidden;
  font-size: 1rem;
  letter-spacing: .025em;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.sidebar-collapse-toggle {
  display: inline-grid;
  place-items: center;
  width: 36px;
  height: 36px;
  flex: 0 0 36px;
  padding: 0;
  border: 1px solid rgba(148, 163, 184, .18);
  border-radius: 10px;
  color: #cbd5e1;
  background: rgba(255, 255, 255, .045);
  transition: color .16s ease, background .16s ease, border-color .16s ease;
}

.sidebar-collapse-toggle:hover {
  border-color: rgba(147, 197, 253, .38);
  color: #ffffff;
  background: rgba(59, 130, 246, .16);
}

.sidebar-search {
  position: relative;
  display: flex;
  align-items: center;
  min-height: 42px;
  margin: 0;
  border: 1px solid rgba(148, 163, 184, .18);
  border-radius: 11px;
  color: #94a3b8;
  background: rgba(15, 23, 42, .55);
  transition: border-color .16s ease, background .16s ease;
}

.sidebar-search:focus-within {
  border-color: rgba(96, 165, 250, .62);
  background: rgba(15, 23, 42, .82);
}

.sidebar-search > i {
  width: 40px;
  flex: 0 0 40px;
  text-align: center;
}

.sidebar-search input {
  width: 100%;
  min-width: 0;
  height: 40px;
  padding: 0 34px 0 0;
  border: 0;
  outline: 0;
  color: #f8fafc;
  background: transparent;
  font: inherit;
}

.sidebar-search input:focus,
.sidebar-search input:focus-visible {
  outline: none;
  box-shadow: none;
}

.sidebar-search input::placeholder {
  color: #7f8ca0;
}

.sidebar-search input::-webkit-search-cancel-button {
  display: none;
}

.sidebar-search-clear {
  position: absolute;
  right: 5px;
  display: inline-grid;
  place-items: center;
  width: 30px;
  height: 30px;
  padding: 0;
  border: 0;
  border-radius: 8px;
  color: #94a3b8;
  background: transparent;
}

.sidebar-search-clear:hover {
  color: #ffffff;
  background: rgba(255, 255, 255, .08);
}

.sidebar-navigation {
  flex: 1 1 auto;
  min-height: 0;
  overflow-x: hidden;
  overflow-y: auto;
  padding-right: 3px;
  scrollbar-color: rgba(148, 163, 184, .35) transparent;
  scrollbar-width: thin;
}

.sidebar-navigation::-webkit-scrollbar {
  width: 5px;
}

.sidebar-navigation::-webkit-scrollbar-thumb {
  border-radius: 999px;
  background: rgba(148, 163, 184, .35);
}

.sidebar-menu,
.sidebar-section-panel {
  margin: 0;
  padding: 0;
  list-style: none;
}

.sidebar-section {
  margin: 0 0 6px;
}

.sidebar-section[hidden],
.sidebar-item[hidden],
.sidebar-section-panel[hidden] {
  display: none !important;
}

.sidebar-section-label {
  display: block;
  padding: 7px 10px 5px;
  color: #738196;
  font-size: .66rem;
  font-weight: 800;
  letter-spacing: .11em;
  text-transform: uppercase;
}

.sidebar-section-toggle,
.sidebar .sidebar-link {
  display: flex;
  align-items: center;
  gap: 11px;
  width: 100%;
  min-height: 42px;
  margin: 0;
  padding: 9px 10px;
  border: 0;
  border-radius: 10px;
  color: #d8e1ee;
  background: transparent;
  font-size: .88rem;
  font-weight: 600;
  line-height: 1.2;
  text-align: left;
  transition: color .16s ease, background .16s ease, transform .16s ease;
}

.sidebar-section-toggle:hover,
.sidebar .sidebar-link:hover {
  color: #ffffff;
  background: rgba(255, 255, 255, .075);
}

.sidebar-section-toggle > i:first-child,
.sidebar .sidebar-link > i:first-child {
  display: inline-grid;
  place-items: center;
  width: 22px;
  height: 22px;
  flex: 0 0 22px;
  color: #93c5fd;
  font-size: .92rem;
}

.sidebar-section-toggle-label,
.sidebar-link-label {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.sidebar-section-chevron {
  margin-left: auto;
  color: #64748b;
  font-size: .7rem;
  transition: transform .18s ease;
}

.sidebar-section.is-open .sidebar-section-chevron {
  transform: rotate(180deg);
}

.sidebar-section-toggle.active-parent {
  color: #ffffff !important;
  background: rgba(37, 99, 235, .13) !important;
}

.sidebar-section-panel {
  display: grid;
  gap: 2px;
  margin: 3px 0 4px 13px;
  padding: 2px 0 3px 10px;
  border-left: 1px solid rgba(148, 163, 184, .16);
}

.sidebar-section-static .sidebar-section-panel {
  margin: 0;
  padding: 0;
  border-left: 0;
}

.sidebar-section-panel .sidebar-link {
  min-height: 38px;
  padding: 8px 10px;
  color: #b8c5d6;
  font-size: .84rem;
  font-weight: 500;
}

.sidebar .sidebar-link.active,
.sidebar .sidebar-link.active:hover {
  color: #ffffff !important;
  background: linear-gradient(90deg, rgba(37, 99, 235, .86), rgba(37, 99, 235, .58)) !important;
  box-shadow: inset 3px 0 0 #bfdbfe;
  font-weight: 700;
}

.sidebar .sidebar-link.active > i:first-child {
  color: #ffffff;
}

.sidebar-empty-state,
.sidebar-loading-state {
  display: grid;
  place-items: center;
  gap: 8px;
  padding: 28px 12px;
  color: #94a3b8;
  font-size: .82rem;
  text-align: center;
}

.sidebar-footer {
  display: grid;
  gap: 7px;
  margin: 0;
  padding: 11px 0 0;
  border-top: 1px solid rgba(148, 163, 184, .14);
}

.sidebar-user-card {
  display: flex;
  align-items: center;
  width: 100%;
  min-height: 42px;
  padding: 7px 8px;
  border: 0;
  border-radius: 10px;
  color: #dbe5f2;
  background: transparent;
  text-align: left;
  transition: color .16s ease, background .16s ease;
}

.sidebar-user-avatar {
  display: inline-grid;
  place-items: center;
  width: 34px;
  height: 34px;
  flex: 0 0 34px;
  border: 1px solid rgba(147, 197, 253, .28);
  border-radius: 10px;
  color: #dbeafe;
  background: rgba(37, 99, 235, .2);
  font-size: .76rem;
  font-weight: 800;
}

.sidebar-user-copy {
  display: grid;
  min-width: 0;
  margin-left: 9px;
  line-height: 1.2;
}

.sidebar-user-name {
  overflow: hidden;
  color: #f8fafc;
  font-size: .78rem;
  font-weight: 700;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.sidebar-user-role {
  overflow: hidden;
  margin-top: 2px;
  color: #8fa0b5;
  font-size: .69rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.sidebar-municipality {
  display: block;
  overflow: hidden;
  padding: 1px 8px 0;
  color: #59677b;
  font-size: .64rem;
  text-align: center;
  text-overflow: ellipsis;
  white-space: nowrap;
}

@media (min-width: 992px) {
  body.sidebar-collapsed .sidebar {
    width: var(--neo-sidebar-compact-width);
    padding-right: 10px;
    padding-left: 10px;
  }

  body.sidebar-collapsed .content {
    margin-left: var(--neo-sidebar-compact-width);
  }

  body.sidebar-collapsed .sidebar-header {
    flex-direction: column;
    gap: 5px;
  }

  body.sidebar-collapsed .sidebar-brand {
    justify-content: center;
  }

  body.sidebar-collapsed .sidebar-brand span,
  body.sidebar-collapsed .sidebar-search,
  body.sidebar-collapsed .sidebar-section-label,
  body.sidebar-collapsed .sidebar-section-panel:not(.sidebar-section-static .sidebar-section-panel),
  body.sidebar-collapsed .sidebar-section-toggle-label,
  body.sidebar-collapsed .sidebar-link-label,
  body.sidebar-collapsed .sidebar-section-chevron,
  body.sidebar-collapsed .sidebar-user-copy,
  body.sidebar-collapsed .sidebar-municipality {
    display: none !important;
  }

  body.sidebar-collapsed .sidebar-section-panel {
    display: none !important;
  }

  body.sidebar-collapsed .sidebar-section-static .sidebar-section-panel {
    display: grid !important;
    margin: 0;
    padding: 0;
    border: 0;
  }

  body.sidebar-collapsed .sidebar-section-toggle,
  body.sidebar-collapsed .sidebar .sidebar-link,
  body.sidebar-collapsed .sidebar-user-card {
    justify-content: center;
    padding-right: 0;
    padding-left: 0;
  }

  body.sidebar-collapsed .sidebar-section-toggle > i:first-child,
  body.sidebar-collapsed .sidebar .sidebar-link > i:first-child {
    width: 24px;
    flex-basis: 24px;
  }

  body.sidebar-collapsed .sidebar-user-avatar {
    width: 36px;
    height: 36px;
    flex-basis: 36px;
  }

  body.sidebar-collapsed .sidebar-collapse-toggle {
    width: 42px;
  }
}

.user-profile-static {
  cursor: default;
  user-select: text;
}

@media (max-width: 991.98px) {
  .sidebar {
    position: fixed;
    inset: 0 auto 0 0;
    width: min(314px, 88vw);
    max-height: none;
    padding: 16px 14px max(14px, env(safe-area-inset-bottom));
    transform: translateX(-105%);
    box-shadow: 16px 0 38px rgba(2, 6, 23, .38);
  }

  .content,
  body.sidebar-collapsed .content {
    margin-left: 0;
  }

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

  .sidebar-footer {
    display: grid;
  }

  body.mobile-sidebar-open {
    overflow: hidden;
  }

  body.mobile-sidebar-open .sidebar {
    transform: translateX(0);
  }

  .mobile-sidebar-backdrop {
    background: rgba(2, 6, 23, .58);
    backdrop-filter: blur(2px);
  }
}

@media (max-width: 640px) {
  .topbar {
    align-items: center;
    flex-direction: row;
    gap: 8px;
  }

  .topbar-profile {
    width: auto;
    margin-left: auto;
  }

  .user-profile-text,
  .user-profile-chevron {
    display: none;
  }

  .user-profile-card {
    min-width: 40px;
    padding-right: 5px;
  }

  .profile-menu {
    right: 46px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .sidebar,
  .content,
  .sidebar-section-chevron {
    transition: none;
  }
}

/* LEVATEC UI System 2026 · base compacta, consistente y ligera */
:root {
  --neo-primary: #2563eb;
  --neo-primary-hover: #1d4ed8;
  --neo-primary-soft: #eff6ff;
  --neo-sidebar: #0f172a;
  --neo-bg: #f6f8fb;
  --neo-card: #ffffff;
  --neo-text: #182235;
  --neo-muted: #64748b;
  --neo-border: #e2e8f0;
  --neo-border-strong: #cbd5e1;
  --neo-success: #16a34a;
  --neo-danger: #dc2626;
  --neo-warning: #d97706;
  --neo-orange: #ea580c;
  --neo-radius-sm: 7px;
  --neo-radius: 10px;
  --neo-radius-lg: 14px;
  --neo-shadow: 0 1px 2px rgba(15, 23, 42, .025), 0 7px 24px rgba(15, 23, 42, .045);
  --neo-shadow-lg: 0 24px 70px rgba(15, 23, 42, .18);
  --neo-transition: border-color .16s ease, background-color .16s ease, color .16s ease, box-shadow .16s ease, transform .16s ease, opacity .16s ease;
}

html {
  background: var(--neo-bg);
  scroll-behavior: smooth;
}

body {
  color: var(--neo-text);
  background: var(--neo-bg);
  font-family: "Segoe UI Variable Text", "Segoe UI", Inter, system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
  font-size: 13.5px;
  line-height: 1.42;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

button,
input,
select,
textarea {
  font: inherit;
}

::selection {
  color: #0f172a;
  background: #dbeafe;
}

@keyframes neo-page-enter {
  from { opacity: 0; transform: translateY(5px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes neo-modal-in {
  from { opacity: .65; transform: translateY(7px) scale(.992); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

@keyframes neo-pulse-ring {
  0% { transform: scale(.82); opacity: .65; }
  70% { transform: scale(1.28); opacity: 0; }
  100% { transform: scale(1.28); opacity: 0; }
}

@keyframes neo-fingerprint {
  0%, 100% { transform: scale(1); opacity: .75; }
  50% { transform: scale(1.08); opacity: 1; }
}

.main-content {
  padding: 14px 18px 20px;
  animation: neo-page-enter .24s cubic-bezier(.2, .8, .2, 1) both;
}

.topbar {
  height: auto;
  min-height: 60px;
  padding: 10px 18px;
  border-bottom: 1px solid rgba(203, 213, 225, .72);
  background: rgba(248, 250, 252, .9);
  box-shadow: 0 1px 0 rgba(255, 255, 255, .72);
  backdrop-filter: blur(12px);
}

.page-title {
  color: #0f172a;
  font-size: .93rem;
  font-weight: 760;
  letter-spacing: -.01em;
}

.user-profile-card {
  min-height: 36px;
  padding: 4px 8px 4px 5px;
  border-color: #dce4ee;
  background: rgba(255, 255, 255, .92);
  box-shadow: 0 3px 10px rgba(15, 23, 42, .04);
}

.user-avatar {
  width: 27px;
  height: 27px;
  flex-basis: 27px;
  color: #1d4ed8;
  background: #eff6ff;
}

.user-profile-name {
  font-size: .73rem;
  letter-spacing: .005em;
}

.user-profile-role {
  font-size: .66rem;
}

.topbar-logout.btn {
  min-height: 36px;
  padding: 0 10px;
  border-radius: var(--neo-radius-sm);
  background: #2563eb;
  box-shadow: none;
  font-size: .78rem;
}

.card-soft {
  border: 1px solid rgba(226, 232, 240, .92);
  border-radius: var(--neo-radius-lg);
  background: var(--neo-card);
  box-shadow: var(--neo-shadow);
}

.card-soft .card-body {
  padding: 14px;
}

.card-soft h4,
.card-soft h5 {
  margin-bottom: 5px;
  color: #111827;
  font-size: 1.03rem;
  font-weight: 740;
  letter-spacing: -.012em;
}

.card-soft p.text-muted,
.card-soft .text-muted {
  color: #64748b !important;
}

.btn {
  min-height: 34px;
  padding: .38rem .7rem;
  border-radius: var(--neo-radius-sm);
  font-size: .8rem;
  font-weight: 620;
  letter-spacing: -.005em;
  box-shadow: none;
  transition: var(--neo-transition);
}

.btn:hover:not(:disabled) {
  transform: translateY(-1px);
}

.btn:active:not(:disabled) {
  transform: translateY(0) scale(.985);
}

.btn:focus-visible {
  outline: 3px solid rgba(37, 99, 235, .2);
  outline-offset: 2px;
  box-shadow: none;
}

.btn-primary {
  border-color: var(--neo-primary);
  background: var(--neo-primary);
}

.btn-primary:hover,
.btn-primary:focus-visible {
  border-color: var(--neo-primary-hover);
  background: var(--neo-primary-hover);
}

.btn-success {
  border-color: #16a34a;
  background: #16a34a;
}

.btn-success:hover,
.btn-success:focus-visible {
  border-color: #15803d;
  background: #15803d;
}

.btn-secondary {
  border-color: #d7dee8;
  color: #475569;
  background: #fff;
}

.btn-secondary:hover,
.btn-secondary:focus-visible {
  border-color: #cbd5e1;
  color: #1e293b;
  background: #f8fafc;
}

.btn-outline-primary {
  border-color: #bfdbfe;
  color: #2563eb;
  background: #fff;
}

.btn-outline-primary:hover,
.btn-outline-primary:focus-visible {
  border-color: #2563eb;
  color: #fff;
  background: #2563eb;
}

.btn-outline-secondary {
  border-color: #d6dee8;
  color: #64748b;
  background: #fff;
}

.btn-outline-secondary:hover,
.btn-outline-secondary:focus-visible {
  border-color: #94a3b8;
  color: #334155;
  background: #f8fafc;
}

.btn-outline-warning {
  border-color: #fed7aa;
  color: #c2410c;
  background: #fff;
}

.btn-outline-warning:hover,
.btn-outline-warning:focus-visible {
  border-color: #ea580c;
  color: #fff;
  background: #ea580c;
}

.form-label {
  margin-bottom: 5px;
  color: #334155;
  font-size: .78rem;
  font-weight: 650;
  line-height: 1.2;
}

.form-control,
.form-select {
  min-height: 35px;
  padding: .38rem .62rem;
  border: 1px solid #d8e0ea;
  border-radius: var(--neo-radius-sm);
  color: #1e293b;
  background-color: #fff;
  font-size: .82rem;
  transition: var(--neo-transition);
}

.form-control::placeholder {
  color: #94a3b8;
  opacity: 1;
}

.form-control:focus,
.form-select:focus {
  border-color: rgba(37, 99, 235, .62);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, .09);
}

.form-control:disabled,
.form-select:disabled,
.form-control[readonly] {
  color: #64748b;
  background-color: #f3f6f9;
}

.input-group-text {
  min-height: 35px;
  padding: .38rem .58rem;
  border-color: #d8e0ea;
  color: #64748b;
  background: #f8fafc;
  font-size: .78rem;
}

.input-group .form-control,
.input-group .form-select {
  min-height: 35px;
}

textarea.form-control {
  min-height: 70px;
  line-height: 1.45;
}

.form-text {
  color: #718096;
  font-size: .72rem;
}

.alert {
  padding: 9px 11px;
  border-radius: var(--neo-radius);
  font-size: .8rem;
}

.table-responsive {
  border: 1px solid #e1e7ef;
  border-radius: var(--neo-radius);
  background: #fff;
  scrollbar-width: thin;
  scrollbar-color: #cbd5e1 transparent;
}

.table {
  color: #1f2937;
  font-variant-numeric: tabular-nums;
}

.table th {
  padding: 7px 9px;
  border-bottom: 1px solid #dfe6ee;
  color: #64748b;
  background: #f8fafc;
  font-size: .67rem;
  font-weight: 760;
  letter-spacing: .045em;
}

.table td {
  padding: 7px 9px;
  border-bottom: 1px solid #edf1f5;
  color: #334155;
  font-size: .79rem;
}

.table tbody tr {
  transition: background-color .13s ease;
}

.table-hover > tbody > tr:hover > * {
  --bs-table-bg-state: #f8fbff;
}

.table tbody tr:last-child td {
  border-bottom-color: transparent;
}

.actions {
  gap: 5px;
}

.actions .btn {
  width: 29px;
  height: 29px;
  min-height: 29px;
  border-radius: 7px;
}

.table-pagination {
  gap: 10px;
  padding-top: 9px;
  color: #64748b;
  font-size: .75rem;
}

.pagination-actions {
  gap: 5px;
}

.pagination-actions .btn {
  width: 29px;
  height: 29px;
  min-height: 29px;
}

.pagination-size {
  gap: 6px;
  font-size: .73rem;
}

.pagination-size .form-select {
  width: 72px;
  min-width: 72px;
  min-height: 30px;
  padding-top: .18rem;
  padding-bottom: .18rem;
}

.modal-backdrop.show {
  opacity: .36;
}

.modal.fade .modal-dialog {
  transform: translateY(7px) scale(.992);
  transition: transform .18s cubic-bezier(.2, .8, .2, 1), opacity .18s ease;
}

.modal.show .modal-dialog {
  transform: translateY(0) scale(1);
}

.modal-content {
  overflow: hidden;
  border: 1px solid rgba(203, 213, 225, .82);
  border-radius: 12px;
  background: #fff;
  box-shadow: var(--neo-shadow-lg);
}

.modal-header {
  min-height: 54px;
  padding: 11px 14px;
  border-bottom: 1px solid #e8edf3;
  background: #fbfcfe;
}

.modal-title {
  gap: 7px;
  color: #182235;
  font-size: .95rem;
  font-weight: 740;
  letter-spacing: -.01em;
}

.modal-title::before {
  width: 25px;
  height: 25px;
  flex-basis: 25px;
  border-color: #e2e8f0;
  border-radius: 7px;
  background-size: 15px 15px;
}

.modal-header small {
  color: #718096 !important;
  font-size: .7rem;
}

.modal-body {
  padding: 13px 14px;
}

.modal-body .row {
  row-gap: 12px;
}

.modal-footer {
  gap: 6px;
  padding: 9px 14px;
  border-top: 1px solid #e8edf3;
  background: #fbfcfe;
}

.modal-footer .btn {
  min-height: 32px;
  padding: .32rem .66rem;
  font-size: .78rem;
}

.modal .btn-close {
  width: .9em;
  height: .9em;
  padding: .5rem;
  border-radius: 7px;
  opacity: .55;
  transition: var(--neo-transition);
}

.modal .btn-close:hover {
  background-color: #eef2f7;
  opacity: .82;
}

.dropdown-menu,
.profile-menu {
  overflow: hidden;
  border: 1px solid #e0e7ef;
  border-radius: 10px;
  box-shadow: 0 16px 36px rgba(15, 23, 42, .12);
}

.dropdown-item {
  padding: .46rem .68rem;
  color: #334155;
  font-size: .79rem;
}

.neo-toast {
  border-radius: 11px;
  box-shadow: 0 16px 38px rgba(15, 23, 42, .13);
}

.sidebar {
  background:
    radial-gradient(circle at 5% 0, rgba(37, 99, 235, .15), transparent 26%),
    #0f172a;
}

.sidebar-section-toggle,
.sidebar .sidebar-link {
  min-height: 39px;
  border-radius: 9px;
  font-size: .83rem;
}

.sidebar-section-panel .sidebar-link {
  min-height: 35px;
  font-size: .79rem;
}

.sidebar .sidebar-link.active,
.sidebar .sidebar-link.active:hover {
  background: linear-gradient(90deg, rgba(37, 99, 235, .9), rgba(37, 99, 235, .62)) !important;
  box-shadow: inset 3px 0 0 #dbeafe, 0 5px 16px rgba(37, 99, 235, .14);
}

/* Login moderno */
body.login-bg {
  min-height: 100dvh;
  padding: clamp(14px, 3vw, 34px);
  background:
    radial-gradient(circle at 14% 18%, rgba(59, 130, 246, .18), transparent 34%),
    radial-gradient(circle at 88% 82%, rgba(14, 165, 233, .1), transparent 32%),
    #eef3f9;
}

.login-wrap {
  width: min(1080px, 100%);
  margin: auto;
}

.login-shell {
  display: grid;
  grid-template-columns: 1.08fr .92fr;
  min-height: min(650px, calc(100dvh - 50px));
  overflow: hidden;
  border: 1px solid rgba(203, 213, 225, .8);
  border-radius: 22px;
  background: #fff;
  box-shadow: 0 28px 80px rgba(15, 23, 42, .16);
  backdrop-filter: none;
}

.login-hero {
  position: relative;
  display: flex;
  min-height: 0;
  padding: clamp(28px, 4vw, 46px);
  flex-direction: column;
  color: #fff;
  background:
    linear-gradient(145deg, rgba(15, 23, 42, .96), rgba(30, 64, 175, .84)),
    url("../img/web.jpg") center / cover no-repeat;
}

.login-hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 14% 12%, rgba(147, 197, 253, .2), transparent 27%),
    linear-gradient(180deg, transparent 62%, rgba(15, 23, 42, .2));
  pointer-events: none;
}

.login-hero-top,
.login-security-chip,
.login-hero-content,
.login-hero-footer {
  position: relative;
  z-index: 1;
}

.login-logo-wrap {
  display: inline-grid;
  width: 46px;
  height: 46px;
  flex: 0 0 46px;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, .16);
  border-radius: 13px;
  background: rgba(255, 255, 255, .96);
  box-shadow: 0 9px 26px rgba(0, 0, 0, .16);
}

.login-logo {
  width: 31px;
  height: 31px;
  padding: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

.login-brand-name {
  font-size: 1.15rem;
  font-weight: 820;
  letter-spacing: .045em;
}

.login-brand-sub {
  margin-top: 1px;
  font-size: .72rem;
  opacity: .72;
}

.login-security-chip {
  display: inline-flex;
  width: max-content;
  gap: 7px;
  align-items: center;
  margin-top: 28px;
  padding: 6px 9px;
  border: 1px solid rgba(191, 219, 254, .18);
  border-radius: 999px;
  color: #dbeafe;
  background: rgba(37, 99, 235, .14);
  font-size: .68rem;
  font-weight: 650;
}

.login-hero-content {
  margin-top: auto;
  margin-bottom: auto;
  padding: 36px 0 26px;
}

.login-eyebrow {
  margin: 0 0 8px;
  color: #93c5fd;
  font-size: .68rem;
  font-weight: 760;
  letter-spacing: .105em;
  text-transform: uppercase;
}

.login-hero-title {
  max-width: 540px;
  margin: 0 0 14px;
  color: #fff;
  font-size: clamp(2rem, 4vw, 3.05rem);
  font-weight: 780;
  line-height: 1.04;
  letter-spacing: -.045em;
}

.login-hero-text {
  max-width: 500px;
  margin-bottom: 22px;
  color: rgba(226, 232, 240, .88);
  font-size: .88rem;
  line-height: 1.55;
}

.login-hero-bullets {
  display: grid;
  grid-template-columns: 1fr;
  gap: 7px;
  max-width: 500px;
}

.login-bullet {
  display: flex;
  gap: 10px;
  align-items: center;
  padding: 8px 10px;
  border: 1px solid rgba(255, 255, 255, .1);
  border-radius: 10px;
  background: rgba(255, 255, 255, .055);
  backdrop-filter: blur(6px);
}

.login-bullet > i {
  display: grid;
  width: 30px;
  height: 30px;
  flex: 0 0 30px;
  place-items: center;
  border-radius: 8px;
  color: #bfdbfe;
  background: rgba(59, 130, 246, .15);
  font-size: .75rem;
}

.login-bullet strong,
.login-bullet small {
  display: block;
}

.login-bullet strong {
  color: #f8fafc;
  font-size: .75rem;
  font-weight: 680;
}

.login-bullet small {
  margin-top: 1px;
  color: #aebed2;
  font-size: .66rem;
}

.login-hero-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  color: #8fa3bb;
  font-size: .62rem;
}

.login-hero-footer span {
  display: inline-flex;
  gap: 6px;
  align-items: center;
}

.login-form {
  position: relative;
  display: flex;
  width: auto;
  max-width: none;
  margin: 0;
  padding: clamp(30px, 5vw, 54px);
  flex-direction: column;
  justify-content: center;
  background: #fff;
}

.login-form-head {
  display: flex;
  gap: 13px;
  align-items: flex-start;
  margin-bottom: 26px;
}

.login-form-icon {
  display: grid;
  width: 42px;
  height: 42px;
  flex: 0 0 42px;
  place-items: center;
  border: 1px solid #dbeafe;
  border-radius: 12px;
  color: #2563eb;
  background: #eff6ff;
  font-size: 1rem;
}

.login-form .login-eyebrow {
  color: #2563eb;
}

.login-form-title {
  margin: 0;
  color: #111827;
  font-size: 1.65rem;
  font-weight: 760;
  letter-spacing: -.035em;
}

.login-form-copy {
  margin: 5px 0 0;
  color: #718096;
  font-size: .78rem;
}

.login-field {
  margin-bottom: 15px;
}

.login-field-hint {
  margin-bottom: 5px;
  color: #94a3b8;
  font-size: .65rem;
}

.login-input .input-group-text {
  min-width: 38px;
  justify-content: center;
  border-right: 0;
  color: #64748b;
  background: #f8fafc;
}

.login-input .form-control {
  min-height: 40px;
  border-left: 0;
  font-size: .84rem;
}

.login-input .btn {
  min-height: 40px;
  border-color: #d8e0ea;
  border-left: 0;
  color: #64748b;
  background: #fff;
}

.login-submit {
  display: flex;
  min-height: 42px;
  align-items: center;
  justify-content: space-between;
  margin-top: 7px;
  padding: 0 14px;
  border-radius: 9px;
  box-shadow: 0 8px 20px rgba(37, 99, 235, .16);
}

.login-alert {
  margin-bottom: 0;
  border: 1px solid #fecaca;
  border-radius: 9px;
  color: #991b1b;
  background: #fef2f2;
  font-size: .75rem;
  font-weight: 600;
}

.login-form-footer {
  display: flex;
  gap: 6px;
  align-items: center;
  justify-content: center;
  margin-top: 28px;
  color: #94a3b8;
  font-size: .64rem;
}

.login-auth-state[hidden] {
  display: none !important;
}

.login-auth-state {
  position: absolute;
  z-index: 4;
  inset: 0;
  display: grid;
  place-items: center;
  align-content: center;
  padding: 30px;
  background: rgba(255, 255, 255, .965);
  text-align: center;
  animation: neo-page-enter .18s ease both;
}

.login-auth-state strong {
  margin-top: 15px;
  color: #182235;
  font-size: 1rem;
}

.login-auth-state > span:last-child {
  max-width: 270px;
  margin-top: 5px;
  color: #718096;
  font-size: .75rem;
  line-height: 1.45;
}

.login-auth-orb {
  position: relative;
  display: grid;
  width: 68px;
  height: 68px;
  place-items: center;
  border: 1px solid #bfdbfe;
  border-radius: 50%;
  color: #2563eb;
  background: #eff6ff;
  font-size: 1.6rem;
  transition: var(--neo-transition);
}

.login-auth-orb.is-verifying > i {
  animation: neo-fingerprint 1.1s ease-in-out infinite;
}

.login-auth-ring {
  position: absolute;
  inset: -1px;
  border: 2px solid rgba(37, 99, 235, .34);
  border-radius: inherit;
  animation: neo-pulse-ring 1.35s ease-out infinite;
}

.login-auth-orb.is-success {
  border-color: #bbf7d0;
  color: #15803d;
  background: #f0fdf4;
  box-shadow: 0 0 0 7px rgba(34, 197, 94, .07);
}

.login-auth-orb.is-success .login-auth-ring,
.login-auth-orb.is-error .login-auth-ring {
  animation: none;
  opacity: 0;
}

.login-auth-orb.is-error {
  border-color: #fecaca;
  color: #b91c1c;
  background: #fef2f2;
}

@media (max-width: 900px) {
  .login-shell {
    grid-template-columns: 1fr;
    min-height: 0;
  }

  .login-hero {
    min-height: 300px;
  }

  .login-hero-content {
    margin: 0;
    padding: 30px 0 20px;
  }

  .login-hero-bullets {
    display: none;
  }

  .login-form {
    min-height: 430px;
  }
}

@media (max-width: 575.98px) {
  .main-content {
    padding: 8px 8px 14px;
  }

  .topbar {
    min-height: 54px;
    padding: 7px 9px;
  }

  .card-soft {
    border-radius: 11px;
  }

  .card-soft .card-body {
    padding: 10px;
  }

  .btn,
  .form-control,
  .form-select,
  .input-group-text {
    min-height: 37px;
  }

  .table th,
  .table td {
    padding: 6px 7px;
  }

  body.login-bg {
    align-items: flex-start;
    padding: 8px;
  }

  .login-shell {
    border-radius: 15px;
  }

  .login-hero {
    min-height: 235px;
    padding: 22px 19px;
  }

  .login-security-chip,
  .login-hero-footer {
    display: none;
  }

  .login-hero-content {
    padding: 26px 0 0;
  }

  .login-hero-title {
    font-size: 1.8rem;
  }

  .login-hero-text {
    margin-bottom: 0;
    font-size: .77rem;
  }

  .login-form {
    min-height: 405px;
    padding: 25px 19px;
  }

  .login-form-head {
    margin-bottom: 21px;
  }

  .login-form-icon {
    width: 38px;
    height: 38px;
    flex-basis: 38px;
  }

  .login-form-title {
    font-size: 1.4rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: .001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .001ms !important;
    scroll-behavior: auto !important;
  }
}

/* LEVATEC Unified Components 2026 v2 · patrón visual de Suministros */
body:not(.login-bg) .main-content > .card,
body:not(.login-bg) .main-content > section.card,
body:not(.login-bg) .catalog-card,
body:not(.login-bg) .historial-card {
  overflow: hidden;
  border: 1px solid rgba(226, 232, 240, .94) !important;
  border-radius: 14px !important;
  background: #fff !important;
  box-shadow: 0 1px 2px rgba(15, 23, 42, .025), 0 7px 24px rgba(15, 23, 42, .045) !important;
}

body[data-page] .card-body > .d-flex.justify-content-between,
.catalog-head,
.historial-heading {
  align-items: flex-start !important;
  gap: 12px !important;
  margin-bottom: 12px !important;
}

body[data-page] .card-body > .d-flex.justify-content-between h4,
.catalog-head h2,
.historial-heading h4 {
  margin: 0 0 3px !important;
  color: #111827 !important;
  font-size: 1.03rem !important;
  font-weight: 740 !important;
  letter-spacing: -.012em;
}

body[data-page] .card-body > .d-flex.justify-content-between p,
.catalog-head p,
.historial-heading p {
  margin: 0 !important;
  color: #64748b !important;
  font-size: .78rem !important;
  line-height: 1.42;
}

body[data-page] .card-body > .d-flex.justify-content-between > :last-child,
.catalog-actions {
  align-items: center;
  gap: 7px !important;
}

body[data-page] .card-body > .input-group.mb-3 {
  margin-top: 8px;
  margin-bottom: 10px !important;
}

body:not(.login-bg) .modal form.row.g-3,
body:not(.login-bg) .modal .row.g-3 {
  --bs-gutter-y: .72rem;
  --bs-gutter-x: .8rem;
}

body:not(.login-bg) .modal .mb-3 {
  margin-bottom: .75rem !important;
}

body:not(.login-bg) .modal .modal-content,
body:not(.login-bg) .modal.catalog-modal .modal-content,
body:not(.login-bg) .modal .import-csv-card {
  overflow: hidden;
  border: 1px solid rgba(203, 213, 225, .84) !important;
  border-radius: 12px !important;
  background: #fff;
  box-shadow: 0 24px 70px rgba(15, 23, 42, .18) !important;
}

body:not(.login-bg) .modal-header,
body:not(.login-bg) .modal .import-csv-header {
  min-height: 54px;
  padding: 11px 14px;
  border-bottom: 1px solid #e8edf3;
  background: #fbfcfe;
}

body:not(.login-bg) .modal .import-csv-header {
  align-items: flex-start;
}

body:not(.login-bg) .modal-title,
body:not(.login-bg) .modal .import-csv-header .modal-title {
  margin-bottom: 0;
  color: #182235;
  font-size: .95rem;
  font-weight: 740;
  letter-spacing: -.01em;
}

body:not(.login-bg) .modal-header small,
body:not(.login-bg) .modal-header p,
body:not(.login-bg) .modal .import-csv-header p {
  margin: 3px 0 0;
  color: #718096 !important;
  font-size: .7rem;
  line-height: 1.42;
}

body:not(.login-bg) .modal-body,
body:not(.login-bg) .modal .import-csv-body {
  padding: 13px 14px;
}

body:not(.login-bg) .modal-footer {
  gap: 6px;
  padding: 9px 14px;
  border-top: 1px solid #e8edf3;
  background: #fbfcfe;
}

body:not(.login-bg) .modal-footer .btn {
  min-height: 32px;
  padding: .31rem .64rem;
  font-size: .77rem;
}

body:not(.login-bg) .modal-dialog.modal-lg:not(.required-network-dialog) {
  max-width: 820px;
}

body:not(.login-bg) .modal-import-csv {
  max-width: 720px;
}

body:not(.login-bg) .table-responsive {
  border-color: #e1e7ef;
  border-radius: 10px;
  background: #fff;
  scrollbar-width: thin;
  scrollbar-color: #cbd5e1 transparent;
}

body:not(.login-bg) .table th {
  padding: 7px 9px;
  color: #64748b;
  background: #f8fafc;
  font-size: .67rem;
  font-weight: 760;
  letter-spacing: .045em;
}

body:not(.login-bg) .table td {
  padding: 7px 9px;
  border-bottom-color: #edf1f5;
  color: #334155;
  font-size: .79rem;
}

body:not(.login-bg) .table tbody tr {
  transition: background-color .13s ease;
}

body:not(.login-bg) .table-hover > tbody > tr:hover > * {
  --bs-table-bg-state: #f8fbff;
}

body:not(.login-bg) .actions,
.catalog-options,
.association-row-actions {
  gap: 5px !important;
}

body:not(.login-bg) .actions .btn,
body:not(.login-bg) .catalog-options .btn,
body:not(.login-bg) .association-row-actions .btn,
body:not(.login-bg) .association-table td > .btn {
  display: inline-grid;
  width: 29px !important;
  height: 29px !important;
  min-height: 29px !important;
  padding: 0 !important;
  place-items: center;
  border-radius: 7px !important;
}

body:not(.login-bg) .table-pagination,
body:not(.login-bg) .catalog-pagination {
  gap: 10px;
  margin-top: 0;
  padding: 9px 2px 0;
  border-top: 0;
  color: #64748b;
  font-size: .75rem;
}

body:not(.login-bg) .catalog-page-controls,
body:not(.login-bg) .pagination-actions {
  gap: 5px;
}

body:not(.login-bg) .catalog-page-controls .btn,
body:not(.login-bg) .pagination-actions .btn {
  width: 29px;
  height: 29px;
  min-height: 29px;
  padding: 0;
}

/* Seguimiento de datos pendientes en tablas de segmentos */
body:not(.login-bg) .table td.segment-location-pending {
  --bs-table-bg: #fff8db;
  --bs-table-bg-state: #fff8db;
  background: #fff8db !important;
  box-shadow: inset 3px 0 0 #eab308;
  color: #6f5810;
}

body:not(.login-bg) .table-hover > tbody > tr:hover > td.segment-location-pending {
  --bs-table-bg-state: #fff2bf;
  background: #fff2bf !important;
}

body:not(.login-bg) .table td.segment-ip-pending {
  --bs-table-bg: #eef6ff;
  --bs-table-bg-state: #eef6ff;
  background: #eef6ff !important;
  box-shadow: inset 3px 0 0 #60a5fa;
  color: #24598d;
}

body:not(.login-bg) .table-hover > tbody > tr:hover > td.segment-ip-pending {
  --bs-table-bg-state: #e2efff;
  background: #e2efff !important;
}

body:not(.login-bg) .table td.segment-mac-pending {
  --bs-table-bg: #fff0f0;
  --bs-table-bg-state: #fff0f0;
  background: #fff0f0 !important;
  box-shadow: inset 3px 0 0 #f87171;
  color: #8a3434;
}

body:not(.login-bg) .table-hover > tbody > tr:hover > td.segment-mac-pending {
  --bs-table-bg-state: #ffe5e5;
  background: #ffe5e5 !important;
}

.segment-location-status,
.segment-network-status {
  display: grid;
  justify-items: start;
  gap: 2px;
  min-height: 20px;
  padding: 3px 2px 0;
  color: #64748b;
  font-size: .68rem;
  line-height: 1.25;
}

.segment-network-status {
  padding-top: 1px;
}

.segment-location-status-item,
.segment-location-status.is-complete,
.segment-location-status.is-unavailable,
.segment-network-status-item,
.segment-network-status.is-complete {
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.segment-status-dot {
  display: inline-block;
  width: 7px;
  height: 7px;
  flex: 0 0 7px;
  border-radius: 50%;
}

.segment-status-dot.is-location {
  background: #eab308;
  box-shadow: 0 0 0 2px rgba(234, 179, 8, .15);
}

.segment-status-dot.is-ip {
  background: #3b82f6;
  box-shadow: 0 0 0 2px rgba(59, 130, 246, .13);
}

.segment-status-dot.is-mac {
  background: #ef4444;
  box-shadow: 0 0 0 2px rgba(239, 68, 68, .12);
}

.segment-location-status {
  color: #796526;
}

.segment-location-status strong {
  color: #8a6800;
  font-weight: 800;
}

.segment-network-status-item.is-ip strong {
  color: #2563eb;
  font-weight: 800;
}

.segment-network-status-item.is-mac strong {
  color: #dc2626;
  font-weight: 800;
}

.segment-location-status.is-complete,
.segment-network-status.is-complete {
  color: #5e7466;
}

.segment-location-status.is-complete i,
.segment-network-status.is-complete i {
  color: #22a559;
  font-size: .66rem;
}

.segment-location-status.is-unavailable,
.segment-location-status.is-unavailable i {
  color: #8a6a2e;
}

body:not(.login-bg) .detail-box,
body:not(.login-bg) .catalog-detail-item,
body:not(.login-bg) .historial-detail-grid > div,
body:not(.login-bg) .association-form,
body:not(.login-bg) .association-person {
  border: 1px solid #e2e8f0;
  border-radius: 9px;
  background: #f8fafc;
  box-shadow: none;
}

@media (max-width: 575.98px) {
  body:not(.login-bg) .card-body > .d-flex.justify-content-between,
  .catalog-head,
  .historial-heading {
    align-items: stretch !important;
    flex-direction: column;
  }
}

/* Login v2: compacto, sin scroll en escritorio y con fondo web.jpg desenfocado */
body.login-bg {
  position: relative;
  isolation: isolate;
  min-height: 100dvh;
  overflow: hidden;
  padding: 14px;
  background: #0f172a !important;
}

body.login-bg::before {
  content: "";
  position: fixed;
  z-index: -2;
  inset: -28px;
  background: url("../img/web.jpg") center / cover no-repeat;
  filter: blur(12px) brightness(.58) saturate(.82);
  transform: scale(1.055);
}

body.login-bg::after {
  content: "";
  position: fixed;
  z-index: -1;
  inset: 0;
  background: radial-gradient(circle at 18% 18%, rgba(59, 130, 246, .2), transparent 38%), linear-gradient(135deg, rgba(15, 23, 42, .45), rgba(15, 23, 42, .7));
  pointer-events: none;
}

.login-wrap {
  position: relative;
  z-index: 1;
  width: min(920px, 100%) !important;
  max-height: calc(100dvh - 28px);
  margin: auto;
}

.login-shell {
  grid-template-columns: 1fr .88fr !important;
  width: 100%;
  height: min(520px, calc(100dvh - 28px));
  min-height: 0 !important;
  max-height: 520px;
  border: 1px solid rgba(255, 255, 255, .35) !important;
  border-radius: 18px !important;
  background: rgba(255, 255, 255, .93) !important;
  box-shadow: 0 24px 70px rgba(2, 6, 23, .34) !important;
  backdrop-filter: blur(18px) saturate(1.05) !important;
}

.login-hero {
  min-height: 0 !important;
  padding: 25px 27px !important;
  background: linear-gradient(145deg, rgba(15, 23, 42, .91), rgba(30, 64, 175, .7)), url("../img/web.jpg") center / cover no-repeat !important;
}

.login-logo-wrap {
  width: 42px !important;
  height: 42px !important;
  flex-basis: 42px !important;
  border-radius: 11px !important;
}

.login-logo {
  width: 28px !important;
  height: 28px !important;
}

.login-brand-name { font-size: 1.05rem !important; }
.login-brand-sub { font-size: .67rem !important; }

.login-security-chip {
  margin-top: 15px !important;
  padding: 5px 8px !important;
  font-size: .63rem !important;
}

.login-hero-content {
  margin: auto 0 !important;
  padding: 18px 0 14px !important;
}

.login-eyebrow {
  margin-bottom: 5px !important;
  font-size: .62rem !important;
}

.login-hero-title {
  max-width: 440px !important;
  margin-bottom: 9px !important;
  font-size: clamp(1.8rem, 3vw, 2.35rem) !important;
  line-height: 1.02 !important;
}

.login-hero-text {
  max-width: 430px !important;
  margin-bottom: 13px !important;
  font-size: .77rem !important;
  line-height: 1.45 !important;
}

.login-hero-bullets { gap: 5px !important; }

.login-bullet {
  gap: 8px !important;
  padding: 6px 8px !important;
  border-radius: 8px !important;
}

.login-bullet > i {
  width: 26px !important;
  height: 26px !important;
  flex-basis: 26px !important;
  border-radius: 7px !important;
  font-size: .68rem !important;
}

.login-bullet strong { font-size: .69rem !important; }
.login-bullet small { font-size: .61rem !important; }
.login-hero-footer { font-size: .57rem !important; }

.login-form {
  min-height: 0 !important;
  padding: 27px 30px !important;
  background: rgba(255, 255, 255, .96) !important;
}

.login-form-head {
  gap: 10px !important;
  margin-bottom: 17px !important;
}

.login-form-icon {
  width: 38px !important;
  height: 38px !important;
  flex-basis: 38px !important;
  border-radius: 10px !important;
}

.login-form-title { font-size: 1.42rem !important; }
.login-form-copy { margin-top: 3px !important; font-size: .71rem !important; }
.login-field { margin-bottom: 10px !important; }
.login-field .form-label { margin-bottom: 4px; font-size: .73rem; }
.login-field-hint { margin-bottom: 3px !important; font-size: .61rem !important; }

.login-input .form-control,
.login-input .input-group-text,
.login-input .btn {
  min-height: 37px !important;
}

.login-submit {
  min-height: 39px !important;
  margin-top: 4px !important;
  border-radius: 8px !important;
}

.login-form-footer { margin-top: 16px !important; font-size: .59rem !important; }
.login-auth-state { padding: 24px !important; }
.login-auth-orb { width: 62px !important; height: 62px !important; font-size: 1.45rem !important; }

@media (min-width: 901px) and (max-height: 650px) {
  .login-shell { height: calc(100dvh - 24px); }
  .login-security-chip, .login-hero-bullets, .login-hero-footer { display: none !important; }
  .login-hero-content { padding: 12px 0 !important; }
  .login-form { padding-top: 22px !important; padding-bottom: 22px !important; }
}

@media (max-width: 900px) {
  body.login-bg {
    align-items: flex-start;
    overflow-y: auto;
    padding: 10px;
  }

  .login-wrap {
    width: min(560px, 100%) !important;
    max-height: none;
  }

  .login-shell {
    grid-template-columns: 1fr !important;
    height: auto;
    max-height: none;
    border-radius: 15px !important;
  }

  .login-hero {
    min-height: 190px !important;
    padding: 20px !important;
  }

  .login-security-chip, .login-hero-bullets, .login-hero-footer { display: none !important; }
  .login-hero-content { margin-top: 20px !important; padding: 10px 0 0 !important; }
  .login-hero-title { margin-bottom: 7px !important; font-size: 1.65rem !important; }
  .login-hero-text { margin-bottom: 0 !important; }
  .login-form { min-height: 0 !important; padding: 23px 21px !important; }
}

/* Perfil de usuario v1 · menú global del sidebar y modales de cuenta */
.sidebar-footer{position:relative;overflow:visible}
.sidebar-account{position:relative;min-width:0}
.sidebar-user-card{width:100%;appearance:none;cursor:pointer;justify-content:flex-start;font:inherit;text-align:left}
.sidebar-user-card:hover,.sidebar-user-card[aria-expanded="true"]{color:#fff;background:rgba(59,130,246,.13)}
.sidebar-user-chevron{margin-left:auto;color:#64748b;font-size:.64rem;transition:transform .16s ease,color .16s ease}
.sidebar-user-card[aria-expanded="true"] .sidebar-user-chevron{color:#bfdbfe;transform:rotate(180deg)}
.sidebar-profile-menu{position:absolute;z-index:1085;bottom:calc(100% + 8px);left:0;width:220px;padding:5px;border:1px solid #e2e8f0;border-radius:11px;background:#fff;box-shadow:0 18px 42px rgba(2,6,23,.22);animation:neo-page-enter .16s ease both}
.sidebar-profile-menu[hidden]{display:none!important}
.sidebar-profile-menu-item{display:flex;align-items:center;gap:9px;width:100%;min-height:38px;padding:8px 9px;border:0;border-radius:8px;color:#334155;background:transparent;font-size:.78rem;font-weight:620;text-align:left;transition:background-color .14s ease,color .14s ease}
.sidebar-profile-menu-item:hover,.sidebar-profile-menu-item:focus-visible{color:#1d4ed8;background:#eff6ff;outline:0}
.sidebar-profile-menu-item i{display:inline-grid;width:22px;height:22px;place-items:center;color:#64748b;font-size:.76rem}
.sidebar-profile-menu-item:hover i,.sidebar-profile-menu-item:focus-visible i{color:#2563eb}
.profile-avatar-host{position:relative;overflow:hidden}
.profile-avatar-host img{position:absolute;inset:0;width:100%;height:100%;border-radius:inherit;object-fit:cover}
.sidebar-user-avatar{border-radius:50%}
.account-modal .modal-dialog{max-width:480px}
.account-photo-row{display:flex;align-items:center;gap:12px;margin-bottom:12px;padding:10px 11px;border:1px solid #e2e8f0;border-radius:10px;background:#f8fafc}
.account-photo-picker{position:relative;width:74px;height:74px;flex:0 0 74px;padding:0;border:0;border-radius:50%;background:transparent;cursor:pointer}
.account-photo-picker:focus-visible{outline:3px solid rgba(37,99,235,.2);outline-offset:3px}
.account-photo-preview{display:grid;width:100%;height:100%;place-items:center;overflow:hidden;border:1px solid #dbe3ed;border-radius:50%;color:#1d4ed8;background:#eff6ff;font-size:1.05rem;font-weight:800}
.account-photo-camera{position:absolute;right:-1px;bottom:1px;display:grid;width:27px;height:27px;place-items:center;border:2px solid #fff;border-radius:50%;color:#fff;background:#2563eb;font-size:.68rem;box-shadow:0 4px 10px rgba(15,23,42,.16)}
.account-photo-copy{display:grid;min-width:0;gap:2px}
.account-photo-copy strong{color:#1e293b;font-size:.82rem}
.account-photo-copy small,.account-photo-copy span{color:#64748b;font-size:.7rem;line-height:1.35}
.account-security-note{display:flex;align-items:flex-start;gap:9px;margin-bottom:12px;padding:9px 10px;border:1px solid #dbeafe;border-radius:9px;color:#475569;background:#eff6ff;font-size:.74rem;line-height:1.4}
.account-security-note i{margin-top:2px;color:#2563eb}
.account-success-state{display:flex;min-height:210px;flex-direction:column;align-items:center;justify-content:center;gap:7px;padding:18px;text-align:center}
.account-success-icon{display:grid;width:68px;height:68px;place-items:center;border-radius:50%;color:#15803d;background:#dcfce7;font-size:1.9rem;box-shadow:0 0 0 7px rgba(34,197,94,.07);animation:accountSuccessPop .42s cubic-bezier(.2,.9,.25,1.35)}
.account-success-state strong{color:#166534;font-size:.96rem}
.account-success-state small{max-width:330px;color:#64748b;font-size:.73rem;line-height:1.45}
@keyframes accountSuccessPop{0%{opacity:0;transform:scale(.45)}65%{opacity:1;transform:scale(1.12)}100%{transform:scale(1)}}
@media (min-width:992px){body.sidebar-collapsed .sidebar-user-chevron{display:none!important}body.sidebar-collapsed .sidebar-profile-menu{left:48px;bottom:0}body.sidebar-collapsed .sidebar-account{display:flex;justify-content:center}}
@media (max-width:575.98px){.sidebar-profile-menu{width:min(230px,calc(88vw - 28px))}.account-modal .modal-dialog{max-width:calc(100vw - 16px)}.account-photo-row{align-items:flex-start}.account-photo-picker{width:66px;height:66px;flex-basis:66px}.account-photo-camera{width:25px;height:25px}.account-success-state{min-height:190px}}
