:root {
  --font-ui: 'Figtree', 'Segoe UI', sans-serif;
  --text-main: #1e293b;
  --text-soft: #64748b;
  --ui-bg: #eef3f8;
  --ui-surface: #ffffff;
  --ui-surface-soft: #f4f7fb;
  --ui-border: #d8e1ec;
  --ui-primary: #234848;
  --ui-primary-soft: #e9f1ef;
  --ui-success: #16a46d;
  --ui-warning: #f5a524;
  --ui-danger: #ff6b6b;
  --ui-radius: 8px;
  --ui-shadow: 0 14px 34px rgba(44, 65, 95, 0.08);
  --ui-shadow-soft: 0 8px 22px rgba(44, 65, 95, 0.05);
  --bs-body-font-family: var(--font-ui);
  --bs-body-color: var(--text-main);
  --bs-body-bg: var(--ui-bg);
  --bs-border-color: var(--ui-border);
  --bs-primary: var(--ui-primary);
  --bs-primary-rgb: 35, 72, 72;
  --bs-success: var(--ui-success);
  --bs-danger: var(--ui-danger);
  --bs-warning: var(--ui-warning);
}

body {
  font-family: var(--font-ui);
  color: var(--text-main);
  min-height: 100vh;
  font-weight: 500;
  line-height: 1.45;
  letter-spacing: 0;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

html,
body,
.wrapper,
.page-content,
.container-fluid,
.topbar,
.card,
.table,
.form-control,
.form-select,
.btn,
.badge {
  font-family: var(--font-ui) !important;
}

body :where(
  p,
  span,
  label,
  input,
  select,
  textarea,
  td,
  th,
  li,
  a,
  button,
  small,
  strong,
  em,
  div,
  h1,
  h2,
  h3,
  h4,
  h5,
  h6,
  .form-text,
  .nav-text,
  .menu-title,
  .card-title,
  .modal-title,
  .badge,
  .btn
):not(i):not(iconify-icon):not(code):not(pre):not(kbd):not(samp) {
  font-family: var(--font-ui) !important;
}

.card-title,
h1,
h2,
h3,
h4,
h5,
h6,
th,
.btn,
.badge,
strong,
b {
  font-weight: 700;
}

.topbar {
  border-bottom: 1px solid #e9edf3;
}

.topbar .navbar-header {
  min-height: 68px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.topbar-icon-btn {
  width: 36px;
  height: 36px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: #64748b;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  transition: background-color 0.2s ease, color 0.2s ease;
}

.topbar-icon-btn:hover {
  background: #eef2f7;
  color: #475569;
}

.topbar-search {
  width: 300px;
}

.topbar-search .form-control {
  background: #eef2f7;
  border-color: transparent;
  border-radius: 8px;
  padding-left: 38px;
  min-height: 38px;
  color: #64748b;
}

.topbar-search .search-widget-icon {
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  color: #94a3b8;
  font-size: 18px;
}

.topbar-actions {
  color: #64748b;
}

.topbar-notify {
  position: relative;
}

.topbar-notify-wrap {
  position: relative;
}

.topbar-badge {
  position: absolute;
  top: -4px;
  right: -2px;
  min-width: 16px;
  height: 16px;
  border-radius: 999px;
  background: #ef4444;
  color: #fff;
  font-size: 10px;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
  padding: 0 4px;
}

.topbar-avatar {
  width: 38px;
  height: 38px;
  border-radius: 999px;
  display: inline-flex;
  overflow: hidden;
  border: 2px solid #eef2f7;
}

.topbar-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.topbar-dropdown-menu {
  position: absolute;
  top: calc(100% + 10px);
  right: 0;
  min-width: 280px;
  background: #ffffff;
  border: 1px solid #e8edf3;
  border-radius: 8px;
  box-shadow: 0 10px 30px rgba(15, 23, 42, 0.12);
  z-index: 2000;
  overflow: hidden;
}

.topbar-dropdown-title {
  font-weight: 700;
  color: #475569;
  padding: 12px 14px;
  border-bottom: 1px solid #eef2f7;
}

.topbar-dropdown-item {
  width: 100%;
  text-align: left;
  border: 0;
  background: transparent;
  color: #64748b;
  padding: 10px 14px;
  font-weight: 600;
}

.topbar-dropdown-item:hover {
  background: #f8fafc;
  color: #334155;
}

.topbar-profile-menu {
  position: relative;
}

.profile-menu-toggle {
  padding: 0;
  background: transparent;
  cursor: pointer;
}

.profile-dropdown-menu {
  position: absolute;
  top: calc(100% + 10px);
  right: 0;
  width: 250px;
  background: #ffffff;
  border: 1px solid #e8edf3;
  border-radius: 0;
  box-shadow: 0 10px 30px rgba(15, 23, 42, 0.12);
  z-index: 2000;
  overflow: hidden;
}

.profile-dropdown-head {
  padding: 14px 16px 10px;
  color: #475569;
  font-weight: 700;
  border-bottom: 1px solid #eef2f7;
}

.profile-dropdown-item {
  width: 100%;
  border: 0;
  background: transparent;
  color: #64748b;
  display: flex;
  align-items: center;
  gap: 10px;
  text-align: left;
  padding: 10px 16px;
  font-weight: 600;
  transition: background-color 0.15s ease, color 0.15s ease;
}

.profile-dropdown-item i {
  font-size: 18px;
}

.profile-dropdown-item:hover {
  background: #f8fafc;
  color: #334155;
}

.profile-dropdown-divider {
  height: 1px;
  background: #eef2f7;
  margin: 4px 0;
}

.profile-dropdown-item.danger {
  color: #ef4444;
}

.profile-dropdown-item.danger:hover {
  background: #fff1f2;
  color: #dc2626;
}

.api-config-hidden {
  display: none !important;
}

.iaclub-brand {
  color: #ffffff;
  font-size: 23px;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-decoration: none;
  display: inline-block;
  white-space: nowrap;
}

.iaclub-user {
  color: #0f172a;
  font-weight: 800;
  font-size: 13px;
  letter-spacing: 0.06em;
  padding: 6px 10px;
}

.page-title-head {
  margin-bottom: 20px;
}

.theme-toolbar-card {
  border: 1px solid #e8edf3;
  border-radius: 10px;
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.04);
}

.theme-toolbar-card .card-body {
  padding: 14px 18px;
}

.theme-toolbar-wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  flex-wrap: wrap;
}

.theme-toolbar-left {
  display: flex;
  align-items: center;
  gap: 18px;
  min-width: 280px;
  flex: 1;
}

.theme-toolbar-search {
  position: relative;
  width: min(100%, 360px);
}

.theme-toolbar-search i {
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  color: #94a3b8;
  font-size: 18px;
}

.theme-toolbar-search .form-control {
  min-height: 40px;
  border-radius: 8px;
  background: #f1f5f9;
  border-color: #e5ebf2;
  padding-left: 38px;
}

.theme-toolbar-context {
  color: #475569;
  font-weight: 600;
}

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

.page-title-head h4,
.card-title,
h5,
h4 {
  font-weight: 700;
  letter-spacing: 0.01em;
}

.menu-title {
  font-weight: 700;
  letter-spacing: 0.06em;
  color: #94a3b8;
}

.navbar-nav .nav-text,
.sub-nav-link {
  font-weight: 600;
  letter-spacing: 0.01em;
}

.comando-blocks-container {
  border: 1px dashed #d5deea;
  border-radius: 10px;
  padding: 12px;
  background: #fbfdff;
  min-height: 84px;
}

.comando-builder-layout {
  display: grid;
  grid-template-columns: minmax(0, 7fr) minmax(280px, 3fr);
  gap: 16px;
  align-items: start;
}

.comando-builder-preview {
  min-width: 0;
  border: 1px solid #e5ecef;
  border-radius: 16px;
  background: linear-gradient(180deg, #ffffff 0%, #f8fbfa 100%);
  padding: 14px;
}

.comando-block-item {
  border: 1px solid #e1eae7;
  border-radius: 14px;
  background: #ffffff;
  padding: 12px;
  margin-bottom: 12px;
  cursor: grab;
  transition: border-color 0.18s ease, box-shadow 0.18s ease, opacity 0.18s ease;
}

.comando-block-item.dragging {
  opacity: 0.65;
  cursor: grabbing;
}

.comando-block-item.drag-over {
  border-color: #2c5a57;
  box-shadow: 0 0 0 3px rgba(44, 90, 87, 0.12);
}

.comando-block-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 8px;
}

.comando-block-title {
  font-weight: 700;
  color: #234848;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.comando-drag-handle {
  color: #64748b;
  font-size: 14px;
  line-height: 1;
}

.comando-preview {
  border: 1px solid #e3ece8;
  border-radius: 14px;
  background: linear-gradient(180deg, #f7fbf9 0%, #edf5f2 100%);
  padding: 14px;
  min-height: 180px;
}

.comando-preview-item {
  max-width: 92%;
  margin-bottom: 8px;
  background: #e7f6ee;
  border: 1px solid #d4ebdf;
  border-radius: 10px;
  padding: 8px 10px;
  color: #1f2937;
  font-size: 13px;
  line-height: 1.35;
}

.comando-preview-item.media {
  background: #eef5f3;
  border-color: #dceae6;
}

.comando-preview-single {
  background: #e7f6ee;
  border-color: #d4ebdf;
}

.comando-preview-line {
  padding: 6px 0;
  border-bottom: 1px dashed rgba(71, 85, 105, 0.25);
}

.comando-preview-line:last-child {
  border-bottom: 0;
}

.comando-preview-line.media-line {
  color: #1e293b;
}

.comando-preview-content {
  white-space: pre-wrap;
  word-break: break-word;
  line-height: 1.35;
}

.comando-preview-media {
  display: block;
  width: 100%;
  max-width: 260px;
  max-height: 170px;
  object-fit: cover;
  border-radius: 8px;
  border: 1px solid #dbe5f3;
  margin-bottom: 6px;
  background: #ffffff;
}

.comando-preview-media-image {
  width: auto;
  max-width: 100%;
  height: auto;
  max-height: 260px;
  object-fit: contain;
}

.comando-preview-file {
  display: inline-block;
  margin-bottom: 6px;
  color: #234848;
  font-weight: 600;
  text-decoration: none;
}

.comando-preview-file:hover {
  text-decoration: underline;
}

.comando-preview-label {
  display: block;
  font-weight: 700;
  font-size: 11px;
  text-transform: uppercase;
  color: #475569;
  margin-bottom: 3px;
}

.command-builder-toolbar {
  margin-bottom: 12px !important;
}

.command-builder-label,
.command-preview-label-title {
  color: #234848;
  font-weight: 800;
}

.comando-add-btn {
  min-height: 34px;
  padding: 0 14px !important;
  border-radius: 999px !important;
  border: 1px solid #d8e6e1 !important;
  background: #f6fbf9 !important;
  color: #2c5a57 !important;
  font-weight: 700 !important;
  box-shadow: none !important;
}

.comando-add-btn:hover {
  background: #eef5f3 !important;
  color: #234848 !important;
}

@media (max-width: 992px) {
  .comando-builder-layout {
    grid-template-columns: 1fr;
  }
}
.main-nav .menu-arrow .nav-text {
  color: #f8fafc;
}

.integration-link {
  width: 100%;
  text-align: left;
  background: transparent;
  border: 0;
}

#mainTabs .sub-nav-link {
  border: 0;
  background: transparent;
  width: 100%;
  text-align: left;
  display: flex;
  align-items: center;
  gap: 10px;
  color: #b7c3d8;
  padding: 10px 14px;
  border-radius: 8px;
  transform: translateX(0);
  transition: transform 0.28s cubic-bezier(0.22, 1, 0.36, 1), background-color 0.22s ease, color 0.22s ease;
}

#mainTabs .sub-nav-link:hover {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.06);
  transform: translateX(4px);
}

#mainTabs .sub-nav-link.active {
  font-weight: 700;
  color: #ffffff;
  background: rgba(255, 255, 255, 0.08);
  transform: translateX(2px);
}

#mainTabs .sub-nav-link:focus {
  outline: none;
  box-shadow: none;
}

.integration-link {
  display: flex;
  align-items: center;
  gap: 10px;
  color: #9fb0c8;
  padding: 10px 14px;
  border-radius: 8px;
  transform: translateX(0);
  transition: transform 0.28s cubic-bezier(0.22, 1, 0.36, 1), color 0.22s ease, background-color 0.22s ease;
}

.integration-link:hover {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.06);
  transform: translateX(4px);
}

.nav-item-icon {
  width: 18px;
  text-align: center;
  font-size: 17px;
  opacity: 0.9;
}

.logo-box {
  overflow: hidden;
}

/* Sidebar collapsed state fixes */
html[data-sidenav-size="small"] .iaclub-brand,
html[data-sidenav-size="small-hover"] .iaclub-brand,
html[data-sidenav-size="small-hover-active"] .iaclub-brand,
html[data-sidenav-size="condensed"] .iaclub-brand {
  opacity: 0 !important;
  visibility: hidden !important;
  width: 0 !important;
}

html[data-sidenav-size="small"] .main-nav .nav-item-icon,
html[data-sidenav-size="small-hover"] .main-nav .nav-item-icon,
html[data-sidenav-size="small-hover-active"] .main-nav .nav-item-icon,
html[data-sidenav-size="condensed"] .main-nav .nav-item-icon {
  width: 24px;
  font-size: 22px;
}

/* Theme-like look for Knowledge Blocks section */
#tab-bloques .card {
  border: 1px solid #e8edf3;
  border-radius: 10px;
  box-shadow: 0 2px 8px rgba(15, 23, 42, 0.04);
}

#tab-bloques .card-header {
  background: #ffffff;
  border-bottom: 1px solid #edf2f7;
  padding: 16px 20px;
}

#tab-bloques .card-body {
  padding: 18px 20px;
}

#tab-bloques .form-control,
#tab-bloques .form-select {
  min-height: 42px;
  border-color: #dbe3ec;
}

#tab-bloques textarea.form-control {
  min-height: 110px;
}

#tab-bloques .table {
  margin-bottom: 0;
}

#tab-bloques .table thead th {
  background: #ffffff;
  color: #3b4a63;
  font-weight: 600;
  border-bottom: 1px solid #e8edf3;
  padding-top: 14px;
  padding-bottom: 14px;
}

#tab-bloques .table tbody td {
  padding-top: 14px;
  padding-bottom: 14px;
  vertical-align: middle;
}

/* Match Empresa tab with Bloques visual language */
#tab-empresa .card {
  border: 1px solid #e8edf3;
  border-radius: 10px;
  box-shadow: 0 2px 8px rgba(15, 23, 42, 0.04);
}

#tab-empresa .card-header {
  background: #ffffff;
  border-bottom: 1px solid #edf2f7;
  padding: 16px 20px;
}

#tab-empresa .card-body {
  padding: 18px 20px;
}

#tab-empresa .form-label {
  font-weight: 600;
  color: #51637d;
  margin-bottom: 6px;
}

#tab-empresa .form-control,
#tab-empresa .form-select {
  min-height: 42px;
  border-color: #dbe3ec;
  background-color: #f8fafc;
}

#tab-empresa textarea.form-control {
  min-height: 105px;
  line-height: 1.45;
}

#tab-empresa .extra-section-title {
  font-weight: 700;
  color: #334155;
}

#tab-empresa .btn[type="submit"].btn-primary {
  min-height: 42px;
  font-weight: 700;
}

/* Match Pruebas tab with Bloques visual language */
#tab-pruebas .card {
  border: 1px solid #e5ebf3;
  border-radius: 14px;
  background: #ffffff;
  box-shadow: 0 8px 20px rgba(44, 65, 95, 0.04);
}

#tab-pruebas .card-header {
  background: #ffffff;
  border-bottom: 0;
  padding: 18px 20px 10px;
}

#tab-pruebas .card-body {
  padding: 18px 20px 18px;
}

#tab-pruebas .card-title {
  color: #4e647f;
  font-size: 16px;
  font-weight: 800;
}

#tab-pruebas .form-control,
#tab-pruebas .form-select {
  min-height: 44px;
  border-color: #d7e2e0;
  border-radius: 12px;
  background-color: #f8fbfa;
  color: #365357;
  font-weight: 600;
}

#tab-pruebas .btn.btn-primary {
  min-height: 44px;
  border-radius: 12px;
  font-weight: 700;
  background: #234848 !important;
  box-shadow: 0 10px 24px rgba(35, 72, 72, 0.16);
}

#tab-pruebas .quick-msg {
  min-height: 36px;
  padding-inline: 12px;
  border-radius: 10px;
  border-color: #dbe8e3 !important;
  color: #2f5755 !important;
  background: #f1f7f4 !important;
  font-weight: 700;
}

#tab-pruebas .quick-msg:hover {
  background: #e7f1ed !important;
  color: #234848 !important;
}

#tab-pruebas .chat-history {
  background: #f7fafb;
  border: 1px solid #d7e2ea;
  border-radius: 14px;
  min-height: 328px;
}

#tab-pruebas #clearChatTest {
  min-height: 36px;
  border-radius: 10px;
  border-color: #ffd8d8;
  color: #ef6b6b;
  background: #fff4f4;
}

#tab-pruebas #clearChatTest:hover {
  background: #ef6b6b;
  border-color: #ef6b6b;
  color: #ffffff;
}

#tab-pruebas .chat-msg.user {
  background: #e8f3ef;
  color: #234848;
}

#tab-pruebas .chat-msg.bot {
  background: #f1f4f6;
  color: #334155;
}

#tab-pruebas .chat-meta {
  color: #6e8295;
}

/* Apply Bloques-like style to all main tabs requested */
#tab-dashboard .card,
#tab-clientes .card,
#tab-planes .card,
#tab-logs .card,
#tab-integraciones .card,
#tab-configuracion .card {
  border: 1px solid #e8edf3;
  border-radius: 10px;
  box-shadow: 0 2px 8px rgba(15, 23, 42, 0.04);
}

#tab-clientes .card-header,
#tab-planes .card-header,
#tab-logs .card-header,
#tab-integraciones .card-header,
#tab-configuracion .card-header {
  background: #ffffff;
  border-bottom: 1px solid #edf2f7;
  padding: 16px 20px;
}

#tab-clientes .card-body,
#tab-planes .card-body,
#tab-logs .card-body,
#tab-integraciones .card-body,
#tab-configuracion .card-body {
  padding: 18px 20px;
}

#tab-clientes .form-control,
#tab-clientes .form-select,
#tab-planes .form-control,
#tab-planes .form-select,
#tab-logs .form-control,
#tab-logs .form-select,
#tab-integraciones .form-control,
#tab-integraciones .form-select,
#tab-configuracion .form-control,
#tab-configuracion .form-select {
  min-height: 42px;
  border-color: #dbe3ec;
  background-color: #f8fafc;
}

#tab-integraciones .dicloak-card {
  border-radius: 14px;
}

#tab-integraciones .card-title {
  color: #1e293b;
  font-weight: 800;
  letter-spacing: 0.01em;
}

#tab-integraciones .dicloak-subtitle {
  color: #64748b;
  font-size: 13px;
  font-weight: 600;
}

#tab-integraciones .dicloak-toggle {
  background: linear-gradient(135deg, #f8fbff 0%, #f1f7ff 100%);
  border: 1px solid #d7e5f8;
  border-radius: 12px;
  padding: 10px 12px;
  display: inline-flex;
  align-items: center;
  gap: 10px;
}

#tab-integraciones .dicloak-toggle .form-check-input {
  margin-top: 0;
  width: 18px;
  height: 18px;
}

#tab-integraciones .dicloak-toggle .form-check-label {
  margin: 0;
  color: #334155;
  font-weight: 700;
}

#tab-integraciones .form-label {
  margin-bottom: 6px;
  color: #475569;
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

#tab-integraciones .form-control:focus {
  border-color: #7ca6f5;
  box-shadow: 0 0 0 0.2rem rgba(59, 130, 246, 0.15);
}

#tab-integraciones .dicloak-url-field {
  min-height: 72px;
  resize: vertical;
  line-height: 1.35;
  overflow-wrap: anywhere;
  word-break: break-word;
}

#tab-integraciones .dicloak-message-field {
  min-height: 180px;
  resize: vertical;
  line-height: 1.4;
  white-space: pre-wrap;
}

#tab-integraciones .dicloak-advanced {
  border: 1px dashed #c7d7ee;
  border-radius: 12px;
  padding: 10px 12px 12px;
  background: #f8fbff;
}

#tab-integraciones .dicloak-advanced > summary {
  cursor: pointer;
  color: #334155;
  font-size: 13px;
  font-weight: 800;
  list-style: none;
}

#tab-integraciones .dicloak-advanced > summary::-webkit-details-marker {
  display: none;
}

#tab-integraciones .dicloak-advanced[open] > summary {
  margin-bottom: 8px;
}

#tab-integraciones .dicloak-status {
  border-radius: 999px;
  font-size: 12px;
  font-weight: 800;
  padding: 7px 12px;
}

#tab-integraciones .dicloak-status.text-bg-success {
  background: #16a34a !important;
}

#tab-integraciones .dicloak-status.text-bg-secondary {
  background: #64748b !important;
}

#tab-integraciones .dicloak-save-btn,
#tab-integraciones .dicloak-test-btn {
  min-height: 44px;
  font-weight: 800;
  border-radius: 10px;
}

#tab-integraciones .dicloak-command-hint {
  border: 1px dashed #b6c7de;
  background: #f8fbff;
  color: #334155;
  font-weight: 700;
}

#tab-integraciones .dicloak-command-hint:hover {
  background: #eef5ff;
  border-color: #95b1d8;
}

#tab-integraciones .dicloak-test-result {
  min-height: 84px;
  max-height: 260px;
  overflow: auto;
  padding: 12px;
  border: 1px solid #dce6f3;
  border-radius: 10px;
  background: #f8fafc;
}

@media (max-width: 767.98px) {
  #tab-integraciones .dicloak-toggle {
    width: 100%;
    justify-content: center;
  }
}

#tab-clientes .table,
#tab-planes .table,
#tab-logs .table,
#tab-configuracion .table {
  margin-bottom: 0;
}

#tab-clientes .table thead th,
#tab-planes .table thead th,
#tab-logs .table thead th,
#tab-configuracion .table thead th {
  background: #ffffff;
  color: #3b4a63;
  font-weight: 600;
  border-bottom: 1px solid #e8edf3;
  padding-top: 14px;
  padding-bottom: 14px;
}

#tab-clientes .table tbody td,
#tab-planes .table tbody td,
#tab-logs .table tbody td,
#tab-configuracion .table tbody td {
  padding-top: 14px;
  padding-bottom: 14px;
  vertical-align: middle;
}

#tab-dashboard .widget-icon-box .card-body {
  padding: 18px 20px;
}

.table thead th {
  font-weight: 700;
  font-size: 13px;
  color: #475569;
  letter-spacing: 0.02em;
}

.table tbody td {
  font-weight: 500;
}

.form-control,
.form-select,
.btn {
  font-weight: 600;
}

.text-muted {
  color: var(--text-soft) !important;
}

.login-page {
  min-height: 100vh;
  background:
    radial-gradient(circle at 50% 52%, rgba(0, 255, 115, 0.2), transparent 25%),
    radial-gradient(circle at 18% 18%, rgba(0, 255, 115, 0.15), transparent 30%),
    radial-gradient(circle at 82% 82%, rgba(255, 255, 255, 0.07), transparent 24%),
    linear-gradient(rgba(255, 255, 255, 0.055) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.055) 1px, transparent 1px),
    linear-gradient(135deg, #0f2d2d 0%, #173d3a 52%, #102828 100%) !important;
  background-size: auto, auto, auto, 42px 42px, 42px 42px, auto;
}

.login-page::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background:
    radial-gradient(circle at center, transparent 0%, transparent 48%, rgba(2, 12, 12, 0.18) 100%),
    repeating-radial-gradient(circle at 22% 24%, rgba(255, 255, 255, 0.07) 0 1px, transparent 1px 10px);
  opacity: 0.9;
}

.login-shell {
  position: relative;
  z-index: 1;
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 24px;
}

.login-card {
  width: min(1080px, 100%);
  background: #ffffff;
  border: 1px solid #e8edf3;
  border-radius: 14px;
  padding: 0;
  box-shadow: 0 26px 70px rgba(2, 12, 12, 0.32);
  overflow: hidden;
}

.login-pro-card {
  display: grid;
  grid-template-columns: minmax(360px, 0.92fr) minmax(420px, 1.08fr);
  min-height: 650px;
}

.login-form-panel {
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 48px 58px;
}

.login-logo {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  color: #102828;
  text-decoration: none;
  margin-bottom: 46px;
}

.login-logo-mark {
  width: 38px;
  height: 38px;
  border-radius: 9px;
  background:
    radial-gradient(circle at 50% 50%, transparent 0 27%, #173d3a 28% 38%, transparent 39%),
    conic-gradient(from 45deg, var(--df-lime) 0 12.5%, transparent 12.5% 25%, var(--df-lime) 25% 37.5%, transparent 37.5% 50%, var(--df-lime) 50% 62.5%, transparent 62.5% 75%, var(--df-lime) 75% 87.5%, transparent 87.5%);
  background-color: #173d3a;
}

.login-logo strong {
  display: block;
  font-size: 30px;
  line-height: 1;
  font-weight: 800;
}

.login-logo small {
  display: block;
  margin-top: 4px;
  color: #64748b;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.22em;
}

.login-card h1 {
  margin: 0 0 8px 0;
  font-size: 34px;
  line-height: 1.2;
  color: #0f172a;
  font-weight: 800;
}

.login-heading {
  margin-bottom: 24px;
}

.login-kicker {
  display: inline-flex;
  margin-bottom: 10px;
  color: #0f766e;
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.login-subtitle {
  margin: 0;
  color: #64748b;
  font-size: 15px;
  font-weight: 500;
  line-height: 1.5;
}

.auth-form {
  display: grid;
  gap: 11px;
}

.flex-column > label {
  color: #263f4d;
  font-weight: 800;
  font-size: 13px;
}

.inputForm {
  border: 1px solid #dbe4ee;
  border-radius: 9px;
  height: 52px;
  display: flex;
  align-items: center;
  padding: 0 14px;
  transition: border-color 0.18s ease, box-shadow 0.18s ease, background-color 0.18s ease;
  color: #6b7c93;
  background: #fbfdff;
}

.inputForm i {
  font-size: 19px;
}

.input {
  margin-left: 12px;
  border-radius: 10px;
  border: none;
  width: 100%;
  height: 100%;
  color: #1e293b;
  font-weight: 600;
}

.input:focus {
  outline: none;
}

.inputForm:focus-within {
  border-color: rgba(0, 255, 115, 0.48);
  background: #ffffff;
  box-shadow: 0 0 0 4px rgba(0, 255, 115, 0.08);
}

.flex-row {
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.flex-row > div {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.flex-row > div > label {
  font-size: 14px;
  color: #111827;
  font-weight: 500;
}

.span {
  font-size: 13px;
  margin-left: 5px;
  color: #0f766e;
  font-weight: 800;
}

.button-submit {
  margin: 16px 0 6px 0;
  background: #173d3a;
  border: none;
  color: #ffffff;
  font-size: 15px;
  font-weight: 700;
  border-radius: 9px;
  height: 52px;
  width: 100%;
  cursor: pointer;
  transition: background-color 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
  box-shadow: 0 14px 26px rgba(23, 61, 58, 0.18);
}

.button-submit:hover {
  background: #102f2d;
  transform: translateY(-1px);
  box-shadow: 0 18px 30px rgba(23, 61, 58, 0.22);
}

.button-submit:disabled {
  opacity: 0.75;
  cursor: not-allowed;
}

.login-error {
  margin-top: 4px;
  border: 1px solid #fecaca;
  background: #fef2f2;
  color: #b91c1c;
  border-radius: 10px;
  padding: 10px 12px;
  font-weight: 700;
}

.login-visual-panel {
  position: relative;
  min-height: 100%;
  padding: 66px 58px;
  background:
    radial-gradient(circle at 78% 28%, rgba(0, 255, 115, 0.18), transparent 26%),
    radial-gradient(circle at 12% 82%, rgba(255, 255, 255, 0.14), transparent 30%),
    linear-gradient(145deg, #f7fbf9 0%, #eef7f3 100%);
  border-left: 1px solid #e3ebe7;
  overflow: hidden;
}

.login-visual-panel::before {
  content: "";
  position: absolute;
  inset: 28px;
  border: 1px solid rgba(23, 61, 58, 0.12);
  border-radius: 22px;
  pointer-events: none;
}

.login-visual-copy {
  position: relative;
  z-index: 1;
  max-width: 360px;
}

.login-visual-pill {
  display: inline-flex;
  margin-bottom: 18px;
  padding: 8px 12px;
  border-radius: 999px;
  background: rgba(0, 255, 115, 0.14);
  color: #0f766e;
  font-size: 12px;
  font-weight: 800;
}

.login-visual-copy h2 {
  margin: 0 0 16px;
  color: #173d3a;
  font-size: 36px;
  line-height: 1.12;
  font-weight: 800;
}

.login-visual-copy p {
  margin: 0;
  color: #5f7384;
  font-size: 15px;
  line-height: 1.55;
  font-weight: 600;
}

.login-metrics-card,
.login-floating-card {
  position: absolute;
  z-index: 1;
  border: 1px solid rgba(23, 61, 58, 0.1);
  background: rgba(255, 255, 255, 0.86);
  box-shadow: 0 20px 44px rgba(15, 23, 42, 0.12);
  backdrop-filter: blur(10px);
}

.login-metrics-card {
  right: 80px;
  bottom: 108px;
  width: 250px;
  min-height: 118px;
  border-radius: 18px;
  padding: 22px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.login-metrics-card span,
.login-floating-card span {
  display: block;
  color: #64748b;
  font-size: 12px;
  font-weight: 800;
}

.login-metrics-card strong {
  display: block;
  margin-top: 8px;
  color: #173d3a;
  font-size: 34px;
  line-height: 1;
  font-weight: 800;
}

.login-metrics-card i {
  width: 52px;
  height: 52px;
  border-radius: 14px;
  background: #173d3a;
  color: var(--df-lime);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 26px;
}

.login-floating-card {
  min-width: 146px;
  border-radius: 16px;
  padding: 16px;
}

.login-floating-card strong {
  display: block;
  margin-top: 5px;
  color: #173d3a;
  font-size: 15px;
  font-weight: 800;
}

.login-floating-card-a {
  left: 72px;
  bottom: 210px;
}

.login-floating-card-b {
  right: 58px;
  top: 250px;
}

.login-orbit {
  position: absolute;
  right: 108px;
  bottom: 235px;
  width: 128px;
  height: 128px;
  border-radius: 999px;
  background: #ffffff;
  box-shadow: 0 18px 38px rgba(15, 23, 42, 0.14);
  display: grid;
  place-items: center;
}

.login-orbit::before {
  content: "IA";
  color: #173d3a;
  font-size: 34px;
  font-weight: 800;
}

.login-orbit span {
  position: absolute;
  width: 10px;
  height: 10px;
  border-radius: 999px;
  background: var(--df-lime);
}

.login-orbit span:nth-child(1) {
  top: 18px;
}

.login-orbit span:nth-child(2) {
  right: 18px;
  background: #173d3a;
}

.login-orbit span:nth-child(3) {
  bottom: 18px;
  background: #9bb4ad;
}

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

  .login-form-panel {
    padding: 36px 28px;
  }

  .login-logo {
    margin-bottom: 30px;
  }

  .login-visual-panel {
    display: none;
  }
}

.bot-trap {
  position: absolute !important;
  left: -9999px !important;
  width: 1px !important;
  height: 1px !important;
  overflow: hidden !important;
}

.tab-section {
  animation: fadeIn 220ms ease;
}

.chat-history {
  min-height: 280px;
  max-height: 420px;
  overflow: auto;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  padding: 12px;
}

.chat-msg {
  max-width: 78%;
  margin-bottom: 10px;
  padding: 10px 12px;
  border-radius: 10px;
  line-height: 1.3;
  white-space: pre-wrap;
}

.chat-msg.user {
  margin-left: auto;
  background: #dbeafe;
}

.chat-msg.bot {
  margin-right: auto;
  background: #e2e8f0;
}

.chat-meta {
  display: block;
  font-size: 11px;
  color: #64748b;
  margin-bottom: 4px;
}

.chat-block-text {
  margin-bottom: 8px;
  white-space: pre-wrap;
}

.chat-block-caption {
  margin: 6px 0 10px;
  white-space: pre-wrap;
}

.chat-media {
  display: block;
  width: 100%;
  max-width: 460px;
  border-radius: 10px;
  margin: 6px 0;
}

.chat-media-image {
  height: auto;
  object-fit: contain;
}

.chat-media-video {
  background: #0f172a;
}

.chat-media-link {
  display: inline-block;
  margin: 6px 0;
  color: #1d4ed8;
  text-decoration: underline;
  font-weight: 600;
}

.extra-blocks {
  border: 1px solid #e8edf3;
  border-radius: 10px;
  padding: 14px;
  background: #ffffff;
}

.extra-block-item {
  background: #fdfdff;
  border: 1px solid #e8edf3;
  border-radius: 10px;
  padding: 12px;
}

.extra-block-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 10px;
}

.extra-block-label {
  font-weight: 700;
  color: #334155;
}

.extra-block-text {
  min-height: 180px;
  resize: vertical;
  line-height: 1.45;
}

.categories-list .category-row .input-group-text {
  min-width: 48px;
  justify-content: center;
}

.categories-list .category-input {
  text-transform: uppercase;
}

#knowledgeBlockEditModal input.form-control,
#knowledgeBlockEditModal textarea.form-control,
#knowledgeBlockEditModal select.form-select {
  background-color: #f8fafc;
}

#knowledgeBlockEditModal .form-select,
#knowledgeBlockEditModal .form-select:focus {
  background-color: #f8fafc !important;
  --bs-form-select-bg: #f8fafc;
  font-weight: 700;
  box-shadow: none;
}

#knowledgeBlockEditModal .form-select option {
  font-weight: 700;
}

@media (max-width: 991px) {
  .topbar-search {
    width: 220px;
  }

  .theme-toolbar-left {
    min-width: 100%;
  }

  .theme-toolbar-search {
    width: 100%;
    max-width: none;
  }
}

/* Hide sections requested by user */
#tab-bloques > .card.mb-3 {
  display: none !important;
}

/* Master visual system aliases */
:root {
  --df-bg: var(--ui-bg);
  --df-surface: var(--ui-surface);
  --df-surface-soft: var(--ui-surface-soft);
  --df-border: var(--ui-border);
  --df-text: var(--text-main);
  --df-muted: var(--text-soft);
  --df-ink: #0f1c33;
  --df-sidebar: #111827;
  --df-sidebar-2: #172033;
  --df-primary: var(--ui-primary);
  --df-primary-soft: var(--ui-primary-soft);
  --df-success: var(--ui-success);
  --df-warning: var(--ui-warning);
  --df-danger: var(--ui-danger);
  --df-shadow: var(--ui-shadow);
  --df-shadow-soft: var(--ui-shadow-soft);
}

html,
body {
  background: var(--df-bg) !important;
  color: var(--df-text);
  letter-spacing: 0;
}

.wrapper {
  background: transparent;
}

.main-nav {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.055), rgba(255, 255, 255, 0)),
    linear-gradient(180deg, var(--df-sidebar), var(--df-sidebar-2)) !important;
  border-right: 0 !important;
  box-shadow: 14px 0 38px rgba(15, 23, 42, 0.18);
}

.logo-box {
  min-height: 76px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.iaclub-brand {
  position: relative;
  color: #ffffff;
  font-size: 21px;
  letter-spacing: 0;
}

.iaclub-brand::before {
  content: "";
  display: inline-flex;
  width: 12px;
  height: 12px;
  margin-right: 10px;
  border-radius: 4px;
  background: linear-gradient(135deg, var(--df-success), #56d7a5);
  box-shadow: 0 0 0 5px rgba(23, 166, 115, 0.14);
  vertical-align: 1px;
}

.main-nav .scrollbar {
  padding: 8px 14px 22px;
}

.menu-title {
  margin: 18px 8px 10px;
  color: rgba(226, 232, 240, 0.58) !important;
  font-size: 11px;
  letter-spacing: 0;
  text-transform: uppercase;
}

.main-nav .menu-arrow {
  margin-bottom: 6px;
  border-radius: 8px;
  color: #ffffff;
}

#mainTabs .sub-nav-link,
.integration-link {
  min-height: 42px;
  margin-bottom: 4px;
  border-radius: 8px;
  color: rgba(226, 232, 240, 0.76);
  font-size: 14px;
}

#mainTabs .sub-nav-link:hover,
.integration-link:hover {
  background: rgba(255, 255, 255, 0.08);
  color: #ffffff;
  transform: translateX(3px);
}

#mainTabs .sub-nav-link.active {
  background: #ffffff;
  color: var(--df-ink);
  box-shadow: 0 12px 26px rgba(0, 0, 0, 0.16);
  transform: translateX(0);
}

#mainTabs .sub-nav-link.active .nav-item-icon {
  color: var(--df-primary);
}

.nav-item-icon {
  color: inherit;
}

.topbar {
  margin: 14px 18px 0;
  border: 1px solid var(--df-border);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.92) !important;
  box-shadow: var(--df-shadow-soft);
  backdrop-filter: blur(14px);
}

.topbar .navbar-header {
  min-height: 64px;
}

.button-toggle-menu,
.topbar-icon-btn {
  border-radius: 8px;
  color: #59677d;
}

.topbar-icon-btn:hover,
.button-toggle-menu:hover {
  background: var(--df-primary-soft);
  color: var(--df-primary);
}

.topbar-search .form-control,
.theme-toolbar-search .form-control {
  min-height: 42px;
  border: 1px solid transparent;
  border-radius: 8px;
  background: #eef3f9;
  box-shadow: none;
}

.topbar-search .form-control:focus,
.theme-toolbar-search .form-control:focus {
  border-color: rgba(37, 99, 235, 0.24);
  background: #ffffff;
  box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.08);
}

.topbar-badge {
  background: var(--df-danger);
}

.topbar-avatar {
  border: 3px solid #ffffff;
  box-shadow: 0 6px 16px rgba(15, 23, 42, 0.16);
}

.topbar-dropdown-menu,
.profile-dropdown-menu {
  border: 1px solid var(--df-border);
  border-radius: 8px;
  box-shadow: var(--df-shadow);
}

.page-content {
  background: transparent !important;
}

.page-content > .container-fluid {
  padding-top: 24px;
}

.page-title-head {
  margin: 4px 0 18px;
}

.page-title-head h4 {
  color: var(--df-ink);
  font-size: 24px;
  font-weight: 800;
}

.page-title-head .text-muted {
  color: var(--df-muted) !important;
}

.theme-toolbar-card {
  border: 1px solid var(--df-border);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.94);
  box-shadow: var(--df-shadow-soft);
}

.theme-toolbar-card .card-body {
  padding: 16px;
}

.card {
  border: 1px solid var(--df-border) !important;
  border-radius: 8px !important;
  background: var(--df-surface);
  box-shadow: var(--df-shadow-soft) !important;
  overflow: hidden;
}

.card-header {
  background: #ffffff !important;
  border-bottom: 1px solid var(--df-border) !important;
  padding: 16px 20px !important;
}

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

.card-title,
.page-title-head h4,
h4,
h5 {
  letter-spacing: 0;
}

.widget-icon-box {
  position: relative;
  min-height: 154px;
}

.widget-icon-box::after {
  content: "";
  position: absolute;
  top: 18px;
  right: 18px;
  width: 44px;
  height: 44px;
  border-radius: 8px;
  background: var(--df-primary-soft);
}

#tab-dashboard .row > .col-xl-4:nth-child(2) .widget-icon-box::after {
  background: rgba(23, 166, 115, 0.14);
}

#tab-dashboard .row > .col-xl-4:nth-child(3) .widget-icon-box::after {
  background: rgba(229, 72, 77, 0.12);
}

.widget-icon-box h5 {
  color: var(--df-muted) !important;
  font-size: 13px;
  font-weight: 700 !important;
  text-transform: uppercase;
}

.widget-icon-box h3 {
  color: var(--df-ink);
  font-size: 34px;
  font-weight: 800;
}

.form-control,
.form-select {
  min-height: 42px;
  border-color: #dce4ef;
  border-radius: 8px;
  background-color: #fbfdff;
  color: var(--df-text);
  font-weight: 600;
  box-shadow: none;
}

.form-control:focus,
.form-select:focus {
  border-color: rgba(35, 72, 72, 0.34);
  background-color: #ffffff;
  box-shadow: 0 0 0 4px rgba(35, 72, 72, 0.08);
}

.btn {
  min-height: 38px;
  border-radius: 8px;
  font-weight: 800;
  letter-spacing: 0;
  box-shadow: none;
}

.btn-sm {
  min-height: 34px;
}

.btn-primary,
.btn-success {
  border-color: transparent !important;
  background: var(--df-primary) !important;
  box-shadow: 0 9px 18px rgba(35, 72, 72, 0.18);
}

.btn-success {
  background: var(--df-success) !important;
  box-shadow: 0 9px 18px rgba(23, 166, 115, 0.18);
}

.btn-outline-primary {
  border-color: rgba(35, 72, 72, 0.2);
  color: var(--df-primary);
  background: #f8fbfa;
}

.btn-outline-primary:hover {
  border-color: var(--df-primary);
  background: var(--df-primary);
  color: #ffffff;
}

.btn-outline-success {
  border-color: rgba(23, 166, 115, 0.34);
  color: var(--df-success);
}

.btn-outline-success:hover {
  background: var(--df-success);
  border-color: var(--df-success);
  color: #ffffff;
}

.btn-outline-info {
  border-color: rgba(35, 72, 72, 0.22);
  color: var(--df-primary);
}

.btn-outline-info:hover {
  background: var(--df-primary);
  border-color: var(--df-primary);
  color: #ffffff;
}

.table {
  color: var(--df-text);
}

.table thead th {
  position: sticky;
  top: 0;
  z-index: 1;
  border-bottom: 1px solid var(--df-border) !important;
  background: #fbfdff;
  color: #526077;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0;
  text-transform: uppercase;
}

.table tbody td {
  border-color: #edf1f6 !important;
  color: #334155;
  font-weight: 600;
  vertical-align: middle;
}

.table-hover tbody tr {
  transition: background-color 0.16s ease, box-shadow 0.16s ease;
}

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

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

.badge {
  border-radius: 7px;
  padding: 6px 9px;
  font-weight: 800;
  letter-spacing: 0;
}

.text-bg-warning {
  background: var(--df-warning) !important;
  color: #ffffff !important;
}

.text-bg-primary {
  background: var(--df-primary) !important;
}

.text-bg-success {
  background: var(--df-success) !important;
}

.text-bg-light {
  background: #eef2f7 !important;
  color: #526077 !important;
}

.chat-history,
.comando-blocks-container,
.comando-preview,
.extra-blocks,
.extra-block-item {
  border-color: var(--df-border);
  border-radius: 8px;
  background: var(--df-surface-soft);
}

.comando-block-item {
  border-radius: 8px;
}

@media (max-width: 991px) {
  .topbar {
    margin: 10px 10px 0;
  }

  .page-content > .container-fluid {
    padding-top: 18px;
  }

  .page-title-head {
    align-items: flex-start !important;
    gap: 8px;
  }

  .theme-toolbar-actions,
  .theme-toolbar-actions .btn {
    width: 100%;
  }

  .theme-toolbar-actions .btn {
    justify-content: center;
  }

  .card-header,
  .card-body {
    padding: 14px !important;
  }
}

@media (max-width: 575px) {
  .page-title-head h4 {
    font-size: 21px;
  }

  .widget-icon-box h3 {
    font-size: 28px;
  }

  .btn {
    width: 100%;
  }
}

/* Dashfolio detail pass */
:root {
  --df-bg: #f4f6f8;
  --df-sidebar: #1f3e3e;
  --df-sidebar-2: #173434;
  --df-lime: #00ff73;
  --df-lime-soft: #cde9da;
  --df-row: #ffffff;
  --df-row-hover: #f7fbf8;
}

body {
  background: var(--df-bg) !important;
}

.main-nav {
  width: 210px !important;
  background: var(--df-sidebar) !important;
  box-shadow: none !important;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border-right: 1px solid rgba(255, 255, 255, 0.08);
}

.main-nav,
.main-nav .menu-title,
.main-nav .nav-link,
.main-nav .sub-nav-link,
.main-nav .sub-nav-link span,
.main-nav .sidebar-profile-card,
.main-nav .sidebar-profile-card *:not(i),
.main-nav .iaclub-brand-copy,
.main-nav .iaclub-brand-copy * {
  font-family: var(--font-ui) !important;
}

.main-nav i,
.main-nav [class^="ri-"],
.main-nav [class*=" ri-"] {
  font-family: remixicon !important;
}

.logo-box {
  min-height: 82px;
  padding: 0 18px !important;
  justify-content: flex-start !important;
  align-items: center !important;
  border-bottom: 0;
}

.iaclub-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  color: #ffffff !important;
  text-decoration: none;
  margin: 0 !important;
}

.iaclub-brand-copy {
  display: flex;
  flex-direction: row;
  gap: 0;
}

.iaclub-brand-copy strong {
  font-size: 27px;
  font-weight: 800;
  letter-spacing: 0.01em;
  line-height: 1.05;
}

.iaclub-brand::before {
  width: 28px;
  height: 28px;
  margin: 0;
  border-radius: 8px;
  background:
    radial-gradient(circle at 50% 50%, transparent 0 27%, var(--df-sidebar) 28% 38%, transparent 39%),
    conic-gradient(from 45deg, var(--df-lime) 0 12.5%, transparent 12.5% 25%, var(--df-lime) 25% 37.5%, transparent 37.5% 50%, var(--df-lime) 50% 62.5%, transparent 62.5% 75%, var(--df-lime) 75% 87.5%, transparent 87.5%);
  box-shadow: none;
  flex: 0 0 auto;
}

.main-nav .scrollbar {
  flex: 1 1 auto;
  padding: 0 0 16px;
  overflow-y: auto;
  scrollbar-width: none;
}

.main-nav .scrollbar::-webkit-scrollbar {
  width: 0;
  height: 0;
}

.main-nav .simplebar-wrapper,
.main-nav .simplebar-mask,
.main-nav .simplebar-offset,
.main-nav .simplebar-content-wrapper,
.main-nav .simplebar-content {
  inset: 0 !important;
  padding: 0 !important;
}

.main-nav .simplebar-content {
  display: block !important;
}

.menu-title {
  margin: 14px 20px 14px;
  color: rgba(255, 255, 255, 0.86) !important;
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.main-nav .menu-arrow {
  display: none !important;
}

#sidebarBot {
  display: block !important;
}

#sidebarBot.collapse {
  height: auto !important;
  visibility: visible !important;
}

#navbar-nav,
#sidebarBot,
#mainTabs,
#mainTabs.sub-navbar-nav {
  margin-left: 0 !important;
  padding-left: 0 !important;
}

#navbar-nav > .nav-item,
#mainTabs > .sub-nav-item,
.main-nav .nav-item {
  margin-left: 0 !important;
  padding-left: 0 !important;
}

#mainTabs .sub-navbar-nav,
#mainTabs.nav {
  display: block;
}

#mainTabs .sub-nav-link,
.main-nav .sub-nav-link,
.integration-link {
  position: relative;
  min-height: 42px;
  margin: 0 -1px 0 0;
  padding: 0 20px;
  border-radius: 0;
  color: rgba(229, 244, 240, 0.74);
  font-size: 13px;
  font-weight: 500;
  gap: 12px;
  border: 0;
  background: transparent;
  width: calc(100% + 1px);
  text-align: left;
  display: flex;
  align-items: center;
}

#mainTabs .sub-nav-link:hover,
.main-nav .sub-nav-link:hover,
.integration-link:hover {
  background: rgba(255, 255, 255, 0.05);
  color: #ffffff;
  transform: none;
}

#mainTabs .sub-nav-link.active,
.main-nav .sub-nav-link.active {
  background: rgba(255, 255, 255, 0.13);
  color: #ffffff;
  box-shadow: none;
}

#mainTabs .sub-nav-link.active::before,
.main-nav .sub-nav-link.active::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 3px;
  background: var(--df-lime);
}

#mainTabs .sub-nav-link.active .nav-item-icon,
.main-nav .sub-nav-link.active .nav-item-icon {
  color: #ffffff;
}

.nav-item-icon {
  font-size: 17px;
  color: rgba(255, 255, 255, 0.62);
}

.sidebar-section-divider {
  height: 1px;
  margin: 16px 10px 16px;
  list-style: none;
  background: rgba(255, 255, 255, 0.08);
}

.page-content {
  margin-left: 210px;
}

.sidebar-profile-card {
  flex: 0 0 auto;
  margin: 12px 16px 14px;
  padding: 12px 14px 11px;
  border-radius: 9px;
  background: rgba(255, 255, 255, 0.09);
}

.sidebar-profile-head {
  display: grid;
  grid-template-columns: 40px minmax(0, 1fr) 18px;
  gap: 10px;
  align-items: center;
  padding-bottom: 14px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.16);
}

.sidebar-profile-avatar {
  width: 40px;
  height: 40px;
  border-radius: 999px;
  background: #d9dede;
  color: #173d3a;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
}

.sidebar-profile-meta {
  min-width: 0;
}

.sidebar-profile-head strong {
  display: block;
  color: #ffffff;
  font-size: 14px;
  line-height: 1.2;
}

.sidebar-profile-head small {
  display: block;
  color: rgba(255, 255, 255, 0.62);
  font-size: 12px;
  font-weight: 500;
}

.sidebar-profile-head i {
  color: rgba(255, 255, 255, 0.72);
  font-size: 16px;
}

.sidebar-profile-actions {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  padding-top: 12px;
}

.sidebar-profile-actions button {
  border: 0;
  background: transparent;
  color: rgba(255, 255, 255, 0.9);
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 0;
  font-size: 14px;
  font-weight: 600;
  width: auto;
}

.sidebar-profile-actions button:hover {
  color: #ffffff;
}

.sidebar-profile-actions i {
  font-size: 16px;
}

.topbar {
  margin: 6px 0 0;
  border: 0;
  border-radius: 0;
  background: #ffffff !important;
  box-shadow: none;
}

.topbar .navbar-header {
  min-height: 72px;
  display: flex;
  align-items: center;
  padding: 0 28px;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: nowrap;
}

.topbar-left {
  flex: 1 1 auto;
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: nowrap;
}

.topbar-menu-toggle {
  width: 36px;
  min-width: 36px;
  height: 36px;
  padding: 0;
  border: 1px solid #e6edf2;
  border-radius: 10px;
  background: #f4f6f8;
  color: #6b7c93;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-shadow: none;
}

.topbar-menu-toggle i {
  font-size: 17px;
  line-height: 1;
}

.topbar-search {
  display: none !important;
}

.topbar-search .form-control,
.theme-toolbar-search .form-control {
  height: 32px;
  padding-left: 34px;
  padding-right: 40px;
  border-radius: 9px;
  border: 0;
  background: #f4f6f8;
  color: #475569;
  font-size: 11px;
  font-weight: 500;
  box-shadow: none !important;
}

.topbar-search .form-control::placeholder {
  color: #9aa4b2;
}

.topbar-icon-btn {
  width: 30px;
  height: 30px;
  border: 1px solid #eef2f6;
  border-radius: 8px;
  background: #f7f8fa;
  color: #1f2937;
  box-shadow: none !important;
}

.topbar-badge {
  top: 4px;
  right: 5px;
  min-width: 7px;
  width: 7px;
  height: 7px;
  padding: 0;
  font-size: 0;
  background: #ed1c24;
  border: 0;
}

.topbar-search .position-relative {
  position: relative;
}

.topbar-search .search-widget-icon {
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  color: #111827;
  font-size: 16px;
  pointer-events: none;
}

.topbar-search-tune {
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  color: #9aa4b2;
  font-size: 13px;
  line-height: 1;
  pointer-events: none;
}

.topbar-actions {
  gap: 8px !important;
}

.topbar-actions .topbar-icon-btn i {
  font-size: 15px;
}

.page-content > .container-fluid {
  width: 100%;
  max-width: none;
  padding: 18px 20px 28px;
}

.page-title-head {
  display: flex !important;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 18px;
  padding: 6px 2px 2px;
}

.page-title-meta {
  min-width: 0;
}

.page-title-breadcrumb {
  margin-bottom: 8px;
  color: #7b8b98 !important;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.02em;
}

.page-title-head h4 {
  color: #173d3a;
  font-size: 29px;
  font-weight: 800;
  letter-spacing: -0.02em;
  margin-bottom: 4px;
}

.page-subtitle {
  color: #6f8394;
  font-size: 14px;
  font-weight: 500;
  line-height: 1.5;
}

.page-module-badge,
.page-title-status {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 28px;
  padding: 0 12px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
}

.page-module-badge {
  background: #edf5f2;
  color: #234848;
}

.page-title-status {
  margin-top: 28px;
  background: #ffffff;
  border: 1px solid #dce7e3;
  color: #234848;
}

.table-empty-cell {
  padding: 28px 18px !important;
  background: transparent !important;
  border: 0 !important;
}

.table-empty-state {
  min-height: 140px;
  border: 1px dashed #d6e4e1;
  border-radius: 18px;
  background: linear-gradient(180deg, #f9fcfb 0%, #f2f7f5 100%);
  color: #58706f;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  text-align: center;
  padding: 18px;
}

.table-empty-state i {
  font-size: 26px;
  color: #234848;
}

.table-empty-state strong {
  color: #173d3a;
  font-size: 15px;
  font-weight: 800;
}

.table-empty-state span {
  max-width: 440px;
  font-size: 14px;
  line-height: 1.5;
}

.section-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}

.section-heading .card-title {
  color: #173d3a;
}

.section-heading .text-muted {
  color: #6f8394 !important;
  font-size: 13px;
  line-height: 1.5;
}

.section-chip {
  min-height: 30px;
  padding: 0 12px;
  border-radius: 999px;
  background: #eef5f3;
  color: #234848;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 700;
}

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

#tab-bloques .knowledge-editor-card,
#tab-bloques .knowledge-list-card,
#tab-comandos .command-editor-card,
#tab-comandos .command-list-card {
  border-radius: 18px !important;
  background: #ffffff !important;
}

#tab-bloques .knowledge-editor-card .card-header,
#tab-comandos .command-editor-card .card-header {
  padding: 18px 18px 10px !important;
}

#tab-bloques .knowledge-editor-card .card-body,
#tab-bloques .knowledge-list-card .card-body,
#tab-comandos .command-editor-card .card-body,
#tab-comandos .command-list-card .card-body {
  padding: 12px 18px 18px !important;
}

#tab-bloques .knowledge-form .form-control,
#tab-bloques .knowledge-form .form-select,
#tab-comandos .command-form .form-control,
#tab-comandos .command-form .form-select {
  min-height: 40px;
  border-radius: 10px;
  background: #fbfcfd;
  border-color: #d7e1ee;
  color: #334155;
  font-size: 13px;
  font-weight: 600;
}

#tab-bloques .knowledge-form textarea.form-control {
  min-height: 140px;
}

#tab-bloques .knowledge-form .btn,
#tab-comandos .command-form .btn {
  min-height: 40px;
  border-radius: 10px;
}

#tab-bloques .knowledge-table,
#tab-comandos .command-table {
  border-spacing: 0 10px;
  margin-top: -2px;
}

#tab-bloques .knowledge-table thead th,
#tab-comandos .command-table thead th {
  padding: 0 12px 10px;
  color: #334155;
  font-size: 10px;
  font-weight: 800;
}

#tab-bloques .knowledge-table tbody tr,
#tab-comandos .command-table tbody tr {
  background: #ffffff;
}

#tab-bloques .knowledge-table tbody tr:hover td,
#tab-comandos .command-table tbody tr:hover td {
  background: #fbfdfc;
}

.knowledge-category-pill {
  min-height: 28px;
  padding: 0 10px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: #eef5f3;
  color: #234848;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.04em;
}

.knowledge-keywords-cell,
.command-trigger-cell {
  max-width: 340px;
  white-space: normal;
  line-height: 1.45;
}

.command-template-group .input-group-text {
  border-radius: 10px 0 0 10px;
  background: #f3f7f9;
  border-color: #d7e1ee;
  color: #5a6b7c;
  font-weight: 700;
}

.command-template-group .form-select {
  border-left: 0 !important;
}

#tab-portal .portal-editor-card,
#tab-portal .portal-preview-card {
  border-radius: 18px !important;
  background: #ffffff !important;
}

.portal-admin-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(320px, 0.8fr);
  gap: 16px;
  align-items: start;
}

#tab-portal .portal-editor-card .card-header,
#tab-portal .portal-preview-card .card-header {
  padding: 18px 18px 10px !important;
}

#tab-portal .portal-editor-card .card-body,
#tab-portal .portal-preview-card .card-body {
  padding: 12px 18px 18px !important;
}

.portal-template-form .form-control {
  min-height: 42px;
  border-radius: 10px;
  background: #fbfcfd;
  border-color: #d7e1ee;
  color: #334155;
  font-size: 13px;
  font-weight: 600;
}

.portal-section-toolbar {
  margin: 18px 0 12px;
  padding: 14px;
  border: 1px solid #dde8ee;
  border-radius: 14px;
  background: #f7fbfa;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.portal-section-item {
  padding: 14px;
  border: 1px solid #dde8ee;
  border-radius: 14px;
  background: #ffffff;
  box-shadow: 0 10px 24px rgba(30, 54, 70, 0.06);
}

.portal-section-item + .portal-section-item {
  margin-top: 12px;
}

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

.portal-section-number {
  min-height: 28px;
  padding: 0 10px;
  border-radius: 999px;
  background: #eef5f3;
  color: #234848;
  display: inline-flex;
  align-items: center;
  font-size: 12px;
  font-weight: 800;
}

.portal-sections-container textarea.form-control {
  min-height: 128px;
  line-height: 1.5;
}

.portal-editor-actions {
  display: flex;
  justify-content: flex-end;
  margin-top: 16px;
}

.portal-preview-surface {
  border-radius: 18px;
  overflow: hidden;
  border: 1px solid #dce7ed;
  background: #f5f8fb;
}

.portal-preview-hero {
  padding: 22px;
  background: linear-gradient(135deg, #172033 0%, #22504d 55%, #0fbf88 100%);
  color: #ffffff;
}

.portal-preview-icon {
  width: 42px;
  height: 42px;
  border-radius: 12px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.14);
  border: 1px solid rgba(255, 255, 255, 0.22);
  font-size: 22px;
  margin-bottom: 12px;
}

.portal-preview-hero h3 {
  margin: 0 0 6px;
  font-size: 23px;
  line-height: 1.2;
  color: #ffffff;
}

.portal-preview-hero p {
  margin: 0;
  color: rgba(255, 255, 255, 0.82);
  line-height: 1.5;
}

.portal-preview-sections {
  padding: 16px;
  display: grid;
  gap: 12px;
}

.portal-preview-section {
  padding: 14px;
  border-radius: 14px;
  background: #ffffff;
  border: 1px solid #e2eaf0;
}

.portal-preview-section h4 {
  margin: 0 0 10px;
  color: #173d3a;
  font-size: 15px;
  font-weight: 800;
}

.portal-preview-section ul {
  margin: 0;
  padding-left: 18px;
  color: #475569;
  font-size: 13px;
  line-height: 1.55;
}

.portal-preview-empty {
  padding: 18px;
  border-radius: 14px;
  background: #ffffff;
  color: #64748b;
  font-size: 13px;
  text-align: center;
}

@media (max-width: 991.98px) {
  .portal-admin-grid {
    grid-template-columns: 1fr;
  }
}

#tab-slider .slider-editor-card,
#tab-slider .slider-preview-card,
#tab-slider .slider-list-card {
  border-radius: 18px !important;
  background: #ffffff !important;
}

.slider-admin-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(320px, 0.85fr);
  gap: 16px;
  align-items: start;
}

#tab-slider .slider-editor-card .card-header,
#tab-slider .slider-preview-card .card-header {
  padding: 18px 18px 10px !important;
}

#tab-slider .slider-editor-card .card-body,
#tab-slider .slider-preview-card .card-body,
#tab-slider .slider-list-card .card-body {
  padding: 12px 18px 18px !important;
}

.slider-public-link {
  text-decoration: none;
}

.slider-form .form-control,
.slider-form .form-select {
  min-height: 42px;
  border-radius: 10px;
  background: #fbfcfd;
  border-color: #d7e1ee;
  color: #334155;
  font-size: 13px;
  font-weight: 600;
}

.slider-form textarea.form-control {
  min-height: 92px;
  line-height: 1.5;
}

.slider-active-check {
  min-height: 42px;
  padding: 0 12px 0 36px;
  border: 1px solid #d7e1ee;
  border-radius: 10px;
  background: #fbfcfd;
  display: inline-flex;
  align-items: center;
  width: 100%;
}

.slider-preview-surface {
  position: relative;
  min-height: 360px;
  overflow: hidden;
  border-radius: 18px;
  background: #111827;
  border: 1px solid #dce7ed;
}

.slider-preview-media {
  position: absolute;
  inset: 0;
  background-position: center;
  background-size: cover;
  transition: transform 0.35s ease;
}

.slider-preview-media.is-empty {
  background:
    radial-gradient(circle at 22% 20%, rgba(255, 183, 77, 0.28), transparent 28%),
    radial-gradient(circle at 78% 12%, rgba(14, 165, 233, 0.18), transparent 30%),
    linear-gradient(135deg, #111827 0%, #173d3a 52%, #2f5d50 100%);
}

.slider-preview-surface::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(11, 18, 32, 0.92) 0%, rgba(11, 18, 32, 0.58) 48%, rgba(11, 18, 32, 0.15) 100%);
}

.slider-preview-overlay {
  position: relative;
  z-index: 1;
  min-height: 360px;
  width: min(82%, 430px);
  padding: 28px;
  color: #ffffff;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.slider-preview-overlay span {
  color: #f7c35f;
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0.12em;
}

.slider-preview-overlay h3 {
  margin: 10px 0 10px;
  color: #ffffff;
  font-size: 29px;
  line-height: 1.1;
  font-weight: 900;
}

.slider-preview-overlay p {
  color: rgba(255, 255, 255, 0.82);
  font-size: 14px;
  line-height: 1.55;
}

.slider-preview-overlay button {
  width: fit-content;
  min-height: 38px;
  margin-top: 8px;
  padding: 0 16px;
  border: 0;
  border-radius: 10px;
  background: #f7c35f;
  color: #172033;
  font-weight: 900;
}

.slider-table-thumb {
  width: 72px;
  height: 46px;
  border-radius: 10px;
  border: 1px solid #dce7ed;
  background-position: center;
  background-size: cover;
  background-color: #eef5f3;
}

.slider-table-thumb.is-empty {
  background: linear-gradient(135deg, #eef5f3, #dce7ed);
}

.slider-table td strong,
.slider-table td small {
  display: block;
  max-width: 420px;
  white-space: normal;
}

.slider-table td strong {
  color: #173d3a;
  font-size: 13px;
  font-weight: 800;
}

.slider-table td small {
  margin-top: 3px;
  color: #64748b;
  line-height: 1.35;
}

@media (max-width: 991.98px) {
  .slider-admin-grid {
    grid-template-columns: 1fr;
  }
}

#tab-planes .plans-editor-card,
#tab-planes .plans-list-card,
#tab-logs .logs-ops-card,
#tab-registros .registrations-ops-card,
#tab-cola .queue-ops-card {
  border-radius: 18px !important;
  background: #ffffff !important;
}

#tab-planes .plans-editor-card .card-header,
#tab-logs .logs-ops-card .card-header,
#tab-registros .registrations-ops-card .card-header,
#tab-cola .queue-ops-card .card-header {
  padding: 18px 18px 10px !important;
}

#tab-planes .plans-editor-card .card-body,
#tab-planes .plans-list-card .card-body,
#tab-logs .logs-ops-card .card-body,
#tab-registros .registrations-ops-card .card-body,
#tab-cola .queue-ops-card .card-body {
  padding: 12px 18px 18px !important;
}

#tab-planes .plans-form .form-control,
#tab-logs .logs-filter-form .form-control,
#tab-logs .logs-filter-form .form-select,
#tab-registros .registration-filter-form .form-control,
#tab-registros .registration-filter-form .form-select,
#tab-cola .queue-filter-form .form-control,
#tab-cola .queue-filter-form .form-select {
  min-height: 40px;
  border-radius: 10px;
  background: #fbfcfd;
  border-color: #d7e1ee;
  color: #334155;
  font-size: 13px;
  font-weight: 600;
}

#tab-planes .plans-form .btn,
#tab-logs .logs-filter-form .btn,
#tab-registros .registration-filter-form .btn,
#tab-cola .queue-filter-form .btn {
  min-height: 40px;
  border-radius: 10px;
}

#tab-planes .plan-image-upload {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 40px;
  margin: 0;
  border: 1px dashed #9db0c6;
  border-radius: 10px;
  background: #f8fbff;
  color: #254e58;
  font-size: 13px;
  font-weight: 800;
  cursor: pointer;
}

#tab-planes .plan-image-upload input {
  display: none;
}

#tab-planes .plans-table,
#tab-logs .logs-table,
#tab-registros .registrations-table,
#tab-cola .queue-table {
  border-spacing: 0 10px;
  margin-top: -2px;
}

#tab-planes .plans-table thead th,
#tab-logs .logs-table thead th,
#tab-registros .registrations-table thead th,
#tab-cola .queue-table thead th {
  padding: 0 12px 10px;
  color: #334155;
  font-size: 10px;
  font-weight: 800;
}

#tab-planes .plans-table tbody tr,
#tab-logs .logs-table tbody tr,
#tab-registros .registrations-table tbody tr,
#tab-cola .queue-table tbody tr {
  background: #ffffff;
}

#tab-registros .registrations-table tbody td {
  height: auto;
  min-height: 58px;
  padding-top: 10px;
  padding-bottom: 10px;
  background: #eef4f8 !important;
}

#tab-planes .plans-table tbody tr:hover td,
#tab-logs .logs-table tbody tr:hover td,
#tab-registros .registrations-table tbody tr:hover td,
#tab-cola .queue-table tbody tr:hover td {
  background: #fbfdfc;
}

.registration-status-badge {
  min-height: 28px;
  padding: 0 10px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  font-size: 12px;
  font-weight: 800;
}

.registration-status-review {
  background: #fff7ed !important;
  color: #c2410c !important;
}

.registration-status-approved {
  background: #ecfdf5 !important;
  color: #047857 !important;
}

.registration-status-rejected {
  background: #fff1f2 !important;
  color: #be123c !important;
}

.registration-status-warning {
  background: #fefce8 !important;
  color: #a16207 !important;
}

.registration-status-info {
  background: #eff6ff !important;
  color: #1d4ed8 !important;
}

.registration-status-default {
  background: #f1f5f9 !important;
  color: #475569 !important;
}

.registration-muted {
  display: block;
  color: #64748b;
  font-size: 12px;
  line-height: 1.45;
  margin-top: 3px;
}

.registration-detail-cell {
  max-width: 260px;
  white-space: normal;
  color: #475569;
  font-size: 12px;
  line-height: 1.55;
}

#tab-registros .registrations-table .client-actions {
  width: 220px;
  display: table-cell;
  min-width: 0;
  height: auto;
  vertical-align: middle;
  white-space: nowrap;
}

#tab-planes .plans-table .rule-actions {
  display: table-cell;
  width: 96px;
  min-width: 0;
  height: auto;
  text-align: right;
  vertical-align: middle;
  white-space: nowrap;
}

#tab-registros .registrations-table th:last-child,
#tab-registros .registrations-table td:last-child {
  width: 220px;
  max-width: 220px;
}

#tab-planes .plans-table th:last-child,
#tab-planes .plans-table td:last-child {
  width: 96px;
  max-width: 96px;
}

#tab-planes .plans-table .rule-actions .btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  min-width: 36px;
  height: 36px;
  min-height: 36px;
  margin-left: 4px;
  padding: 0;
}

#tab-configuracion .table .rule-actions {
  display: table-cell;
  width: 132px;
  min-width: 0;
  height: auto;
  text-align: right;
  vertical-align: middle;
  white-space: nowrap;
}

#tab-configuracion .table .rule-actions .btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  min-width: 36px;
  height: 36px;
  margin-left: 4px;
  padding: 0;
}

#tab-registros .registrations-table .client-actions .approve-registration,
#tab-registros .registrations-table .client-actions .reject-registration,
#tab-registros .registrations-table a.action-icon-btn-soft {
  width: auto;
  min-width: 92px;
  height: 38px;
  min-height: 38px;
  padding: 0 12px;
  border-radius: 10px;
  gap: 6px;
}

#tab-registros .registrations-table .client-actions .approve-registration {
  margin-right: 8px;
}

#tab-registros .registrations-table .client-actions .approve-registration span,
#tab-registros .registrations-table .client-actions .reject-registration span,
#tab-registros .registrations-table a.action-icon-btn-soft span {
  position: static;
  width: auto;
  height: auto;
  overflow: visible;
  clip: auto;
  white-space: nowrap;
  font-size: 12px;
  font-weight: 800;
}

#tab-registros .registrations-table .client-actions .approve-registration {
  background: #e8f8f0 !important;
  border-color: #bdebd6 !important;
  color: #047857 !important;
}

#tab-registros .registrations-table .client-actions .reject-registration {
  background: #fff1f2 !important;
  border-color: #fecdd3 !important;
  color: #be123c !important;
}

.table-inline-pill,
.table-money-pill {
  min-height: 28px;
  padding: 0 10px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 700;
}

.table-inline-pill {
  background: #f1f5f9;
  color: #475569;
}

.table-money-pill {
  background: #edf7f3;
  color: #1d8e63;
}

.log-source-badge {
  border-radius: 999px !important;
  padding: 7px 10px !important;
  font-size: 11px !important;
  font-weight: 800 !important;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.log-source-command {
  background: #eef5f3 !important;
  color: #234848 !important;
}

.log-source-rule {
  background: #fff5e8 !important;
  color: #c97814 !important;
}

.log-source-chatwoot {
  background: #eef4ff !important;
  color: #3567e0 !important;
}

.log-source-ai {
  background: #f4efff !important;
  color: #7a57d1 !important;
}

.log-source-default {
  background: #f1f5f9 !important;
  color: #475569 !important;
}

.log-message-cell,
.log-response-cell,
.queue-message-cell,
.queue-error-cell {
  max-width: 360px;
  white-space: normal;
  line-height: 1.45;
}

.queue-summary-grid {
  display: grid;
  gap: 10px;
  grid-template-columns: repeat(5, minmax(120px, 1fr));
}

.queue-summary-item {
  min-height: 74px;
  border: 1px solid #dbe6f0;
  border-radius: 12px;
  background: #fbfcfd;
  color: #334155;
  display: grid;
  align-content: center;
  justify-items: start;
  gap: 4px;
  padding: 12px;
  text-align: left;
}

.queue-summary-item strong {
  font-size: 22px;
  line-height: 1;
}

.queue-summary-label {
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
}

.queue-summary-dot {
  width: 22px;
  height: 4px;
  border-radius: 999px;
}

.queue-status-badge {
  border-radius: 999px !important;
  padding: 7px 10px !important;
  font-size: 11px !important;
  font-weight: 800 !important;
  text-transform: uppercase;
}

.queue-status-pending {
  background: #eef4ff !important;
  color: #3567e0 !important;
}

.queue-status-retrying {
  background: #fff5e8 !important;
  color: #c97814 !important;
}

.queue-status-processing {
  background: #f4efff !important;
  color: #7a57d1 !important;
}

.queue-status-sent {
  background: #edf7f3 !important;
  color: #1d8e63 !important;
}

.queue-status-failed {
  background: #fff1f2 !important;
  color: #c2414b !important;
}

.queue-status-default {
  background: #f1f5f9 !important;
  color: #475569 !important;
}

@media (max-width: 991.98px) {
  .queue-summary-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

.theme-toolbar-card {
  border: 0 !important;
  border-radius: 0 !important;
  background: transparent;
  box-shadow: none !important;
}

.theme-toolbar-card .card-body {
  padding: 0 0 18px;
}

.theme-toolbar-wrap {
  min-height: 48px;
}

.theme-toolbar-search {
  width: min(100%, 320px);
}

.theme-toolbar-actions .btn {
  min-height: 39px;
}

#toolbarNewBtn,
#importMembersBtn {
  border-radius: 999px;
  background: var(--df-sidebar) !important;
  color: #ffffff !important;
  border-color: transparent !important;
  box-shadow: none;
}

#toolbarNewBtn:hover,
#importMembersBtn:hover {
  background: #0f2b28 !important;
}

#toolbarMoreConfigBtn,
#toolbarFilterBtn {
  min-height: 40px;
  border-radius: 12px;
  border-color: rgba(35, 72, 72, 0.18) !important;
  background: #f8fbfa !important;
  color: #234848 !important;
  box-shadow: none !important;
}

#toolbarMoreConfigBtn {
  background: #234848 !important;
  border-color: #234848 !important;
  color: #ffffff !important;
}

#toolbarMoreConfigBtn:hover {
  background: #1d3d3d !important;
  border-color: #1d3d3d !important;
  color: #ffffff !important;
}

#toolbarFilterBtn:hover {
  background: #eef5f3 !important;
  border-color: rgba(35, 72, 72, 0.26) !important;
  color: #1d3d3d !important;
}

#tab-clientes .client-create-card,
#tab-clientes .client-list-card {
  border-radius: 18px !important;
  background: #ffffff !important;
}

.clients-pagination {
  display: grid;
  grid-template-columns: minmax(160px, 1fr) auto minmax(70px, 1fr);
  align-items: center;
  gap: 14px;
  padding: 20px 4px 2px;
}

.clients-pagination-info {
  color: #5f7086;
  font-size: 14px;
  font-weight: 500;
}

.clients-pagination-nav {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  flex-wrap: wrap;
}

.clients-page-btn {
  width: 32px;
  height: 32px;
  border: 1px solid transparent;
  border-radius: 999px;
  background: #f4f6f8;
  color: #173d3a;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  font-weight: 600;
  transition: background-color 0.18s ease, border-color 0.18s ease, color 0.18s ease, transform 0.18s ease;
}

.clients-page-btn:hover:not(:disabled) {
  background: #e9efee;
  transform: translateY(-1px);
}

.clients-page-btn.is-active {
  background: #ffffff;
  border-color: #173d3a;
  color: #173d3a;
}

.clients-page-arrow {
  background: #18a834;
  color: #ffffff;
}

.clients-page-arrow:hover:not(:disabled) {
  background: #14922d;
  color: #ffffff;
}

.clients-page-next {
  background: #18a834;
  color: #ffffff;
}

.clients-page-next:hover:not(:disabled) {
  background: #14922d;
  color: #ffffff;
}

.clients-page-btn:disabled {
  background: #f0f2f5;
  color: #7a8796;
  opacity: 0.45;
  cursor: not-allowed;
  transform: none;
}

.clients-page-dots {
  color: #7a8796;
  font-size: 14px;
  font-weight: 700;
}

.clients-pagination-size {
  display: flex;
  justify-content: flex-end;
}

.clients-pagination-size .form-select {
  width: 74px;
  min-height: 32px;
  border-radius: 10px;
  border-color: #d6dee7;
  background-color: #ffffff;
  color: #173d3a;
  font-size: 14px;
  font-weight: 600;
}

#tab-clientes .client-create-card .card-header {
  padding: 18px 20px !important;
}

#tab-clientes .client-create-card .card-title {
  font-size: 14px;
  font-weight: 800;
  color: #475569;
}

#tab-clientes .client-create-header {
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  flex-wrap: nowrap;
}

#tab-clientes .client-create-header-actions {
  justify-content: flex-end;
  gap: 10px;
  flex-wrap: nowrap;
  flex: 0 0 auto;
}

#tab-clientes .client-create-toolbar-icon {
  width: 42px;
  min-width: 42px;
  height: 42px;
  padding: 0;
  border-radius: 999px;
  border: 1px solid #d9e3e5 !important;
  background: #ffffff !important;
  color: #486160 !important;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-shadow: none !important;
}

#tab-clientes .client-create-toolbar-icon:hover {
  background: #edf5f2 !important;
  color: #234848 !important;
}

#tab-clientes .client-create-toolbar-icon i {
  font-size: 18px;
  line-height: 1;
}

#tab-clientes .client-create-toolbar-btn {
  min-height: 42px;
  padding: 0 22px !important;
  border-radius: 999px !important;
  border: 0 !important;
  background: #234848 !important;
  color: #ffffff !important;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 14px;
  font-weight: 700;
  box-shadow: none !important;
}

#tab-clientes .client-create-toolbar-btn:hover {
  background: #1a3737 !important;
}

#tab-clientes .client-create-toolbar-btn-primary {
  background: #2c5a57 !important;
}

#tab-clientes .client-create-toolbar-btn-primary:hover {
  background: #234848 !important;
}

#tab-clientes .client-create-form .form-control,
#tab-clientes .client-create-form .form-select {
  min-height: 40px;
  border-radius: 10px;
  background: #fbfcfd;
  border-color: #d7e1ee;
  color: #334155;
  font-size: 13px;
  font-weight: 600;
}

#tab-clientes .client-create-form .btn {
  min-height: 40px;
  border-radius: 10px;
}

#clientCreateModal .modal-dialog {
  max-width: 760px;
}

#clientCreateModal .modal-content {
  border: 0;
  border-radius: 22px;
  overflow: hidden;
  box-shadow: 0 24px 60px rgba(15, 23, 42, 0.18);
}

#clientCreateModal .modal-header {
  padding: 22px 24px 12px;
  align-items: flex-start;
}

#clientCreateModal .modal-title {
  font-size: 20px;
  font-weight: 800;
  color: #183b3a;
}

#clientCreateModal .modal-body {
  padding: 8px 24px 18px;
}

#clientCreateModal .modal-footer {
  padding: 16px 24px 24px;
  border-top: 0;
  gap: 10px;
}

#clientCreateModal .form-label {
  margin-bottom: 7px;
  color: #486160;
  font-size: 13px;
  font-weight: 700;
}

#clientCreateModal .client-create-form .form-control,
#clientCreateModal .client-create-form .form-select {
  min-height: 46px;
  border-radius: 12px;
  background: #fbfcfd;
  border-color: #d7e1ee;
  color: #334155;
  font-size: 14px;
  font-weight: 600;
}

#clientCreateModal .btn-light {
  border-color: #d8e1e7;
  color: #486160;
}

#clientCreateModal .client-create-submit-btn {
  min-width: 154px;
  min-height: 46px;
  border-radius: 12px;
  background: #234848 !important;
  border-color: #234848 !important;
  color: #ffffff !important;
  font-weight: 700;
}

#clientCreateModal .client-create-submit-btn:hover {
  background: #1d3d3d !important;
  border-color: #1d3d3d !important;
}

.btn-soft-secondary {
  border: 1px solid rgba(35, 72, 72, 0.12) !important;
  background: #eef5f3 !important;
  color: #234848 !important;
}

.btn-soft-secondary:hover {
  background: #e3efec !important;
  color: #1d3d3d !important;
}

.card {
  border: 0 !important;
  border-radius: 8px !important;
  box-shadow: none !important;
}

.card-header {
  border-bottom: 0 !important;
  background: transparent !important;
}

#tab-clientes > .card:first-child,
#tab-planes > .card:first-child,
#tab-logs > .card:first-child,
#tab-comandos > .card:first-child,
#tab-integraciones > .card:first-child,
#tab-configuracion > .card:first-child {
  margin-bottom: 18px !important;
}

.table-responsive {
  overflow-x: auto;
  background: transparent;
}

.table {
  border-collapse: separate;
  border-spacing: 0 7px;
  margin-top: -7px;
}

.table thead th {
  position: static;
  height: 38px;
  border: 0 !important;
  background: transparent;
  color: #6b7280;
  font-size: 10px;
  font-weight: 800;
  text-transform: uppercase;
}

.table tbody tr {
  background: var(--df-row);
  box-shadow: 0 1px 0 rgba(17, 24, 39, 0.04);
}

.table tbody tr:hover {
  background: var(--df-row-hover);
}

.table tbody td {
  height: 49px;
  border-top: 1px solid #eef1f3 !important;
  border-bottom: 1px solid #eef1f3 !important;
  border-left: 0 !important;
  border-right: 0 !important;
  color: #111827;
  font-size: 12px;
  font-weight: 700;
  vertical-align: middle;
}

.table tbody td:first-child {
  border-left: 1px solid #eef1f3 !important;
  border-radius: 8px 0 0 8px;
  color: #374151;
}

.table tbody td:last-child {
  border-right: 1px solid #eef1f3 !important;
  border-radius: 0 8px 8px 0;
}

#tab-clientes .client-list-card .card-body {
  padding: 12px 18px 18px !important;
}

#tab-clientes .clients-table {
  border-spacing: 0 10px;
  margin-top: -2px;
}

#tab-clientes .clients-table thead th {
  padding: 0 12px 10px;
  color: #334155;
  font-size: 10px;
  font-weight: 800;
}

#tab-clientes .clients-table tbody tr {
  background: #ffffff;
}

#tab-clientes .clients-table tbody tr:hover td {
  background: #fbfdfc;
}

#tab-clientes .clients-table tbody tr.client-row-active td {
  background: #f8fdfa;
}

#tab-clientes .clients-table tbody td {
  height: 54px;
  padding: 0 12px;
  border-top: 1px solid #edf2f7 !important;
  border-bottom: 1px solid #edf2f7 !important;
  color: #0f172a;
  font-size: 12px;
  font-weight: 600;
}

#tab-clientes .clients-table tbody td:first-child {
  padding-left: 14px;
}

#tab-clientes .clients-table tbody td:last-child {
  padding-right: 14px;
}

#tab-clientes .client-cell-id {
  width: 64px;
  color: #334155;
}

#tab-clientes .client-cell-name,
#tab-clientes .client-cell-symbolic,
#tab-clientes .client-cell-phone,
#tab-clientes .client-cell-member,
#tab-clientes .client-cell-date,
#tab-clientes .client-cell-expiry {
  white-space: nowrap;
}

#tab-clientes .client-cell-name {
  font-weight: 800;
}

#tab-clientes .client-cell-symbolic,
#tab-clientes .client-cell-date,
#tab-clientes .client-cell-expiry {
  color: #1e293b;
}

#tab-clientes .client-cell-status,
#tab-clientes .client-cell-plan {
  min-width: 130px;
}

.badge {
  border-radius: 999px;
  padding: 5px 10px;
  font-size: 11px;
  line-height: 1;
  font-weight: 800;
}

.text-bg-success {
  background: var(--df-lime-soft) !important;
  color: #07883f !important;
}

.text-bg-danger {
  background: #ffe0e3 !important;
  color: #f5222d !important;
}

.text-bg-warning {
  background: #fff0dc !important;
  color: #bf650b !important;
}

.text-bg-primary {
  background: #e7f0ff !important;
  color: #1d4ed8 !important;
}

.text-bg-light {
  background: #e4e5e8 !important;
  color: #565d67 !important;
}

.client-empty-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 34px;
  padding: 5px 10px;
  border-radius: 999px;
  background: #f1f5f9;
  color: #64748b;
  font-size: 11px;
  font-weight: 700;
  line-height: 1;
}

.client-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  white-space: nowrap;
  min-width: 128px;
}

.client-actions .btn,
.action-icon-btn {
  width: 44px;
  min-width: 44px;
  height: 44px;
  min-height: 44px;
  padding: 0;
  border: 1px solid transparent;
  border-radius: 12px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-shadow: none !important;
  transition: transform 0.16s ease, background-color 0.16s ease, border-color 0.16s ease, color 0.16s ease;
}

.client-actions .btn span {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

.client-actions .btn i {
  font-size: 18px;
  line-height: 1;
}

.action-icon-btn.is-loading i {
  animation: actionIconSpin 0.8s linear infinite;
}

@keyframes actionIconSpin {
  to {
    transform: rotate(360deg);
  }
}

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

.action-icon-btn-soft {
  background: #eef5f3 !important;
  border-color: #e0ece8 !important;
  color: #2c5a57 !important;
}

.action-icon-btn-soft:hover {
  background: #e2eeea !important;
  color: #234848 !important;
}

.action-icon-btn-mint {
  background: #edf7f3 !important;
  border-color: #dcefe8 !important;
  color: #1d8e63 !important;
}

.action-icon-btn-mint:hover {
  background: #e4f6ee !important;
  color: #10905f !important;
}

.action-icon-btn-danger {
  background: #fff0f0 !important;
  border-color: #ffe2e2 !important;
  color: #f16a6a !important;
}

.action-icon-btn-danger:hover {
  background: #eb6262 !important;
  border-color: #eb6262 !important;
  color: #ffffff !important;
}

.swal2-container {
  background: rgba(9, 36, 34, 0.58) !important;
  backdrop-filter: blur(4px);
}

.swal2-popup.iac-modal {
  width: min(92vw, 520px) !important;
  border: 1px solid rgba(190, 219, 211, 0.9) !important;
  border-radius: 18px !important;
  padding: 30px 30px 26px !important;
  background:
    linear-gradient(180deg, #ffffff 0%, #f6fbf9 100%) !important;
  box-shadow: 0 28px 80px rgba(7, 31, 32, 0.26) !important;
}

.swal2-popup.iac-modal::before {
  content: "";
  position: absolute;
  inset: 0 0 auto;
  height: 5px;
  border-radius: 18px 18px 0 0;
  background: linear-gradient(90deg, #163f3c, #1d8e63, #2c5a57);
}

.swal2-popup.iac-modal-danger::before {
  background: linear-gradient(90deg, #7f1d1d, #be123c, #ef4444);
}

.swal2-icon.iac-modal-icon {
  border-color: #b7d1d4 !important;
  color: #2c5a57 !important;
}

.swal2-icon.iac-modal-icon.swal2-question {
  border-color: #b7d1d4 !important;
  color: #2c5a57 !important;
}

.swal2-icon.iac-modal-icon.swal2-warning {
  border-color: #fecdd3 !important;
  color: #be123c !important;
}

.iac-modal-title {
  margin-top: 8px !important;
  color: #123b39 !important;
  font-size: 28px !important;
  font-weight: 900 !important;
}

.iac-modal-text {
  color: #486176 !important;
  font-size: 16px !important;
  line-height: 1.45 !important;
}

.iac-modal-actions {
  gap: 10px !important;
  margin-top: 24px !important;
}

.iac-modal-btn {
  min-width: 120px;
  min-height: 44px;
  border: 1px solid transparent;
  border-radius: 10px;
  padding: 0 18px;
  font-size: 14px;
  font-weight: 900;
  box-shadow: none;
  transition: transform 0.16s ease, background-color 0.16s ease, border-color 0.16s ease;
}

.iac-modal-btn:hover {
  transform: translateY(-1px);
}

.iac-modal-btn-confirm {
  background: #163f3c;
  border-color: #163f3c;
  color: #ffffff;
}

.iac-modal-btn-confirm:hover {
  background: #0f302e;
  border-color: #0f302e;
}

.iac-modal-btn-cancel {
  background: #edf4f2;
  border-color: #d7e5e1;
  color: #2c5a57;
}

.iac-modal-btn-cancel:hover {
  background: #e2eeea;
  border-color: #c5d9d4;
}

.iac-modal-btn-danger {
  background: #be123c;
  border-color: #be123c;
  color: #ffffff;
}

.iac-modal-btn-danger:hover {
  background: #9f1239;
  border-color: #9f1239;
}

.swal2-textarea.iac-modal-input {
  min-height: 110px !important;
  border: 1px solid #d7e1ee !important;
  border-radius: 12px !important;
  color: #123b39 !important;
  font-size: 14px !important;
  box-shadow: none !important;
}

.swal2-textarea.iac-modal-input:focus {
  border-color: #2c5a57 !important;
  box-shadow: 0 0 0 3px rgba(44, 90, 87, 0.14) !important;
}

.btn-soft-primary,
.btn-soft-danger,
.btn-soft-success {
  border: 1px solid transparent !important;
  border-radius: 12px !important;
  font-weight: 700 !important;
  box-shadow: none !important;
}

.btn-soft-primary {
  background: #eef5f3 !important;
  border-color: #e0ece8 !important;
  color: #2c5a57 !important;
}

.btn-soft-primary:hover {
  background: #e2eeea !important;
  color: #234848 !important;
}

.btn-soft-success {
  background: #edf7f3 !important;
  border-color: #dcefe8 !important;
  color: #1d8e63 !important;
}

.btn-soft-success:hover {
  background: #e4f4ee !important;
  color: #167651 !important;
}

.btn-soft-danger {
  background: #fff4f4 !important;
  border-color: #ffdcdc !important;
  color: #ef6b6b !important;
}

.btn-soft-danger:hover {
  background: #ef6b6b !important;
  border-color: #ef6b6b !important;
  color: #ffffff !important;
}

.form-control,
.form-select {
  border-radius: 8px;
  background: #f7f8fa;
  border-color: #e1e5ea;
}

.btn {
  border-radius: 8px;
}

@media (max-width: 991px) {
  .main-nav {
    width: var(--bs-app-sidebar-width, 260px) !important;
  }

  .clients-pagination {
    grid-template-columns: 1fr;
    justify-items: center;
  }

  .clients-pagination-info,
  .clients-pagination-size {
    justify-content: center;
    text-align: center;
  }

  .page-content {
    margin-left: 0;
  }

  .page-content > .container-fluid {
    padding: 14px;
  }

  .theme-toolbar-card .card-body {
    padding-bottom: 14px !important;
  }
}

@media (max-width: 575px) {
  .topbar {
    margin: 0;
  }

  .topbar .navbar-header {
    min-height: 60px;
  }

  .topbar-actions {
    gap: 4px !important;
  }

  .client-actions .btn {
    width: 32px;
  }

  #tab-clientes .client-create-header-actions {
    width: 100%;
    justify-content: space-between;
  }

  #tab-clientes .client-create-toolbar-btn {
    flex: 1 1 auto;
    justify-content: center;
  }
}

/* Dashboard composition */
#tab-dashboard {
  width: 100%;
  max-width: none;
  margin: 0;
}

#tab-clientes,
#tab-registros,
#tab-planes,
#tab-logs,
#tab-bloques,
#tab-portal,
#tab-comandos,
#tab-integraciones,
#tab-configuracion {
  width: 100%;
  max-width: none;
}

.dashboard-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(190px, 1fr));
  gap: 14px;
  margin-bottom: 14px;
}

.dashboard-main-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.8fr) minmax(320px, 0.8fr);
  grid-template-areas:
    "chart plans"
    "donut expiring"
    "bot bot";
  gap: 14px;
}

.dashboard-chart-card {
  grid-area: chart;
}

.dashboard-payments-card {
  grid-area: plans;
}

.dashboard-products-card {
  grid-area: donut;
}

.dashboard-geo-card {
  grid-area: expiring;
}

.dashboard-bot-analytics-card {
  grid-area: bot;
}

.dashboard-stat-card {
  min-height: 104px;
}

.dashboard-stat-card::after {
  display: none;
}

.dashboard-stat-card .card-body {
  position: relative;
  min-height: 104px;
  padding: 18px 18px 16px;
}

.dashboard-stat-icon {
  position: absolute;
  top: 18px;
  left: 18px;
  width: 26px;
  height: 26px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--df-lime);
  font-size: 22px;
}

.dashboard-stat-card h3 {
  margin: 0 0 12px 46px !important;
  color: #080c14;
  font-size: 25px;
  font-weight: 800;
}

.dashboard-stat-card h5 {
  margin: 0 0 4px;
  color: #0f172a !important;
  font-size: 14px;
  text-transform: none;
}

.dashboard-stat-card p {
  margin: 0;
  color: #8a95a3;
  font-size: 14px;
  font-weight: 600;
}

.dashboard-stat-card p span {
  color: #159653;
}

.stat-total .dashboard-stat-icon {
  color: #159653;
}

.stat-active .dashboard-stat-icon {
  color: #159653;
}

.stat-expired .dashboard-stat-icon,
.stat-expired p span {
  color: #f5222d;
}

.stat-vip .dashboard-stat-icon {
  color: #7c3aed;
}

.dashboard-panel .card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 18px 8px !important;
}

.dashboard-panel .card-title {
  color: #0f172a;
  font-size: 15px;
  font-weight: 800;
}

.dashboard-pill {
  border: 1px solid #dde3ea;
  border-radius: 999px;
  padding: 5px 10px;
  color: #111827;
  font-size: 14px;
  font-weight: 700;
}

.dashboard-bars {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 18px;
  min-height: 190px;
  padding: 12px 12px 2px;
  background:
    repeating-linear-gradient(to top, transparent 0 31px, #eef1f4 32px),
    #ffffff;
}

.dashboard-bar-group {
  flex: 1;
  min-width: 42px;
  text-align: center;
}

.dashboard-bar-pair {
  height: 145px;
  display: flex;
  align-items: end;
  justify-content: center;
  gap: 8px;
}

.dashboard-bar {
  width: 12px;
  border-radius: 5px 5px 2px 2px;
}

.dashboard-bar.previous {
  background: #d8dadd;
}

.dashboard-bar.current {
  background: #079346;
}

.dashboard-bar-label {
  display: block;
  margin-top: 8px;
  color: #8a95a3;
  font-size: 14px;
  font-weight: 600;
}

.dashboard-summary-row {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  padding: 8px 0;
}

.dashboard-summary-icon {
  width: 28px;
  height: 28px;
  border-radius: 999px;
  background: #eef8f2;
  color: var(--row-color);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
}

.dashboard-summary-name {
  color: #111827;
  font-size: 14px;
  font-weight: 700;
}

.dashboard-summary-row strong {
  color: #111827;
  font-size: 14px;
}

.dashboard-summary-row small {
  grid-column: 2 / 4;
  justify-self: end;
  color: #159653;
  font-size: 14px;
  font-weight: 700;
}

.dashboard-donut-wrap {
  display: grid;
  grid-template-columns: minmax(190px, 250px) minmax(0, 1fr);
  gap: 22px;
  align-items: center;
}

.dashboard-donut {
  width: 190px;
  aspect-ratio: 1;
  border-radius: 999px;
  display: grid;
  place-items: center;
  background:
    radial-gradient(circle, #ffffff 0 50%, transparent 51%),
    conic-gradient(#06c75a 0 calc(var(--vip) * 1%), #f28c28 calc(var(--vip) * 1%) calc((var(--vip) + var(--basic)) * 1%), #94a3b8 calc((var(--vip) + var(--basic)) * 1%) 100%);
}

.dashboard-donut span {
  color: #0a0e15;
  font-size: 34px;
  font-weight: 800;
}

.dashboard-legend {
  display: grid;
  gap: 12px;
}

.dashboard-legend div {
  display: flex;
  align-items: center;
  gap: 8px;
  color: #111827;
  font-size: 14px;
  font-weight: 600;
}

.dashboard-legend span {
  width: 10px;
  height: 10px;
  border-radius: 3px;
  flex: 0 0 auto;
}

.dashboard-expiring-row {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  padding: 9px 0;
}

.dashboard-expiring-avatar {
  width: 30px;
  height: 30px;
  border-radius: 999px;
  background: #dffbea;
  color: #07883f;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
}

.dashboard-expiring-row strong {
  display: block;
  color: #111827;
  font-size: 14px;
  font-weight: 700;
}

.dashboard-expiring-row small {
  display: block;
  color: #8a95a3;
  font-size: 14px;
  font-weight: 600;
}

.dashboard-expiring-row em {
  color: #159653;
  font-style: normal;
  font-size: 14px;
  font-weight: 700;
}

.dashboard-empty-state {
  min-height: 150px;
  display: grid;
  place-items: center;
  gap: 8px;
  color: #8a95a3;
  text-align: center;
  font-weight: 800;
}

.dashboard-empty-state i {
  color: #159653;
  font-size: 34px;
}

.bot-analytics-summary {
  display: grid;
  grid-template-columns: repeat(4, minmax(140px, 1fr));
  gap: 10px;
  margin-bottom: 16px;
}

.bot-analytics-metric {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
  border: 1px solid #e5eaf0;
  border-radius: 8px;
  padding: 12px;
  background: #ffffff;
}

.bot-analytics-metric span {
  width: 34px;
  height: 34px;
  border-radius: 8px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #07883f;
  background: #e9f9ef;
  font-size: 18px;
  flex: 0 0 auto;
}

.bot-analytics-metric.warning span {
  color: #b7791f;
  background: #fff7df;
}

.bot-analytics-metric.danger span {
  color: #c62828;
  background: #ffe8e8;
}

.bot-analytics-metric strong {
  display: block;
  color: #0f172a;
  font-size: 21px;
  line-height: 1;
}

.bot-analytics-metric small {
  display: block;
  margin-top: 4px;
  color: #64748b;
  font-size: 13px;
  font-weight: 700;
}

.bot-analytics-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
}

.bot-analytics-grid h6 {
  margin: 0 0 10px;
  color: #0f172a;
  font-size: 13px;
  font-weight: 800;
}

.bot-analytics-list {
  display: grid;
  gap: 10px;
}

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

.bot-analytics-row div {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  min-width: 0;
}

.bot-analytics-row span {
  color: #334155;
  font-size: 13px;
  font-weight: 700;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.bot-analytics-row strong {
  color: #0f172a;
  font-size: 13px;
}

.bot-analytics-row em {
  display: block;
  height: 6px;
  min-width: 6px;
  border-radius: 999px;
  background: #159653;
}

.bot-analytics-empty {
  min-height: 54px;
  display: grid;
  place-items: center;
  border: 1px dashed #d6dde6;
  border-radius: 8px;
  color: #64748b;
  font-size: 13px;
  font-weight: 700;
}

.bot-analytics-queue {
  margin-top: 18px;
  border-top: 1px solid #edf1f5;
  padding-top: 14px;
}

.bot-analytics-queue-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 10px;
  color: #0f172a;
  font-size: 13px;
  font-weight: 800;
}

.bot-analytics-queue-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(92px, 1fr));
  gap: 8px;
}

.bot-analytics-queue-item {
  border: 1px solid #e5eaf0;
  border-radius: 8px;
  padding: 10px;
  background: #fbfcfd;
}

.bot-analytics-queue-item small {
  display: block;
  color: #64748b;
  font-size: 12px;
  font-weight: 700;
}

.bot-analytics-queue-item strong {
  display: block;
  margin-top: 4px;
  color: #0f172a;
  font-size: 18px;
}

.bot-analytics-queue-item.failed strong {
  color: #c62828;
}

.bot-analytics-queue-item.retrying strong {
  color: #b7791f;
}

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

  .dashboard-main-grid {
    grid-template-columns: 1fr;
    grid-template-areas:
      "chart"
      "plans"
      "donut"
      "expiring"
      "bot";
  }

  .bot-analytics-summary {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .bot-analytics-grid,
  .bot-analytics-queue-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 767px) {
  .dashboard-grid {
    grid-template-columns: 1fr;
  }

  .dashboard-donut-wrap {
    grid-template-columns: 1fr;
    justify-items: center;
  }

  .dashboard-bars {
    gap: 8px;
    overflow-x: auto;
  }

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

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

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

/* Sidebar typography system: authoritative override */
.main-nav,
.main-nav .menu-title,
.main-nav .nav-link,
.main-nav .nav-link span,
.main-nav .sub-nav-link,
.main-nav .sub-nav-link span,
.main-nav .nav-text,
.main-nav .sidebar-profile-card,
.main-nav .sidebar-profile-card *:not(i),
.main-nav .iaclub-brand-copy,
.main-nav .iaclub-brand-copy * {
  font-family: var(--font-ui) !important;
  font-style: normal !important;
  text-rendering: geometricPrecision;
}

.main-nav .menu-title {
  font-size: 11px !important;
  font-weight: 700 !important;
  line-height: 1.2 !important;
  letter-spacing: 0.12em !important;
}

#mainTabs .sub-nav-link,
.main-nav .sub-nav-link,
.main-nav .nav-link,
.main-nav .nav-text,
.integration-link {
  font-size: 14px !important;
  font-weight: 500 !important;
  line-height: 1.35 !important;
  letter-spacing: 0 !important;
}

#mainTabs .sub-nav-link span,
.main-nav .sub-nav-link span,
.main-nav .nav-link span,
.main-nav .nav-text {
  font-size: inherit !important;
  font-weight: inherit !important;
  line-height: inherit !important;
  letter-spacing: inherit !important;
}

#mainTabs .sub-nav-link.active,
.main-nav .sub-nav-link.active,
.main-nav .sub-nav-link[aria-current="page"] {
  font-weight: 700 !important;
}

.sidebar-profile-name {
  font-size: 14px !important;
  font-weight: 700 !important;
  line-height: 1.2 !important;
}

.sidebar-profile-role {
  font-size: 12px !important;
  font-weight: 500 !important;
  line-height: 1.3 !important;
}

.sidebar-profile-link {
  font-size: 14px !important;
  font-weight: 600 !important;
  line-height: 1.2 !important;
}

/* UI Component System v2
   This final layer is the source of truth for shared panel primitives.
   Prefer these ui-* classes for new markup; existing Bootstrap/template
   classes are mapped here so older screens keep the same visual language. */
:root {
  --ui-page-gap: 18px;
  --ui-control-height: 42px;
  --ui-control-height-sm: 34px;
  --ui-card-padding: 18px 20px;
  --ui-card-header-padding: 16px 20px;
  --ui-table-row-bg: #ffffff;
  --ui-table-row-hover: #f7fbfa;
  --ui-focus-ring: 0 0 0 4px rgba(35, 72, 72, 0.08);
  --bs-primary: var(--ui-primary);
  --bs-primary-rgb: 35, 72, 72;
}

.page-content {
  background: var(--ui-bg);
}

.tab-section {
  animation: panelSectionIn 0.18s ease both;
}

.ui-surface,
.ui-card,
.page-content .card {
  border: 1px solid var(--ui-border) !important;
  border-radius: var(--ui-radius) !important;
  background: var(--ui-surface) !important;
  box-shadow: var(--ui-shadow-soft) !important;
  overflow: hidden;
}

.ui-card-flat,
.page-content .card.card-plain {
  border-color: transparent !important;
  box-shadow: none !important;
}

.ui-card-header,
.page-content .card-header {
  min-height: 58px;
  border-bottom: 1px solid var(--ui-border) !important;
  background: var(--ui-surface) !important;
  padding: var(--ui-card-header-padding) !important;
}

.ui-card-body,
.page-content .card-body {
  padding: var(--ui-card-padding) !important;
}

.ui-title,
.page-content .card-title {
  color: var(--text-main) !important;
  font-size: 15px;
  font-weight: 800 !important;
  line-height: 1.25;
  letter-spacing: 0 !important;
}

.ui-muted,
.page-content .text-muted {
  color: var(--text-soft) !important;
}

.ui-form-label,
.page-content .form-label {
  margin-bottom: 6px;
  color: #475569;
  font-size: 12px;
  font-weight: 800;
  line-height: 1.25;
}

.ui-control,
.page-content .form-control,
.page-content .form-select {
  min-height: var(--ui-control-height);
  border: 1px solid #dbe3ec;
  border-radius: var(--ui-radius);
  background-color: #fbfdff;
  color: var(--text-main);
  font-weight: 600;
  box-shadow: none;
}

.ui-control:focus,
.page-content .form-control:focus,
.page-content .form-select:focus {
  border-color: rgba(35, 72, 72, 0.34);
  background-color: #ffffff;
  box-shadow: var(--ui-focus-ring);
}

.ui-control::placeholder,
.page-content .form-control::placeholder {
  color: #94a3b8;
  font-weight: 500;
}

textarea.ui-control,
.page-content textarea.form-control {
  min-height: 110px;
  line-height: 1.45;
  resize: vertical;
}

.ui-btn,
.btn {
  min-height: 38px;
  border-radius: var(--ui-radius) !important;
  font-weight: 800 !important;
  letter-spacing: 0 !important;
  box-shadow: none;
}

.ui-btn-sm,
.btn-sm {
  min-height: var(--ui-control-height-sm);
}

.ui-btn-primary,
.btn-primary {
  border-color: transparent !important;
  background: var(--ui-primary) !important;
  color: #ffffff !important;
  box-shadow: 0 9px 18px rgba(35, 72, 72, 0.16) !important;
}

.ui-btn-success,
.btn-success {
  border-color: transparent !important;
  background: var(--ui-success) !important;
  color: #ffffff !important;
  box-shadow: 0 9px 18px rgba(22, 164, 109, 0.16) !important;
}

.ui-btn-outline,
.btn-outline-primary {
  border-color: rgba(35, 72, 72, 0.22) !important;
  color: var(--ui-primary) !important;
  background: #ffffff !important;
}

.ui-btn-outline:hover,
.btn-outline-primary:hover {
  border-color: var(--ui-primary) !important;
  background: var(--ui-primary) !important;
  color: #ffffff !important;
}

.ui-btn-soft,
.btn-soft-primary,
.btn-soft-secondary {
  border: 1px solid rgba(35, 72, 72, 0.12) !important;
  background: var(--ui-primary-soft) !important;
  color: var(--ui-primary) !important;
}

.ui-table-wrap,
.page-content .table-responsive {
  border-radius: var(--ui-radius);
  background: transparent;
  overflow-x: auto;
}

.ui-table,
.page-content .table {
  width: 100%;
  margin: 0;
  border-collapse: separate;
  border-spacing: 0 7px;
  color: var(--text-main);
}

.ui-table thead th,
.page-content .table thead th {
  position: static;
  height: 38px;
  border: 0 !important;
  background: transparent !important;
  color: #64748b !important;
  font-size: 10px;
  font-weight: 800 !important;
  line-height: 1.2;
  text-transform: uppercase;
  letter-spacing: 0.04em !important;
}

.ui-table tbody tr,
.page-content .table tbody tr {
  background: var(--ui-table-row-bg);
  box-shadow: 0 1px 0 rgba(17, 24, 39, 0.04);
}

.ui-table tbody tr:hover,
.page-content .table tbody tr:hover {
  background: var(--ui-table-row-hover);
}

.ui-table tbody td,
.page-content .table tbody td {
  height: 49px;
  border-top: 1px solid #eef1f3 !important;
  border-bottom: 1px solid #eef1f3 !important;
  border-left: 0 !important;
  border-right: 0 !important;
  color: #111827;
  font-size: 12px;
  font-weight: 700;
  vertical-align: middle;
}

.ui-table tbody td:first-child,
.page-content .table tbody td:first-child {
  border-left: 1px solid #eef1f3 !important;
  border-radius: var(--ui-radius) 0 0 var(--ui-radius);
}

.ui-table tbody td:last-child,
.page-content .table tbody td:last-child {
  border-right: 1px solid #eef1f3 !important;
  border-radius: 0 var(--ui-radius) var(--ui-radius) 0;
}

.ui-badge,
.badge {
  border-radius: 7px !important;
  padding: 6px 9px;
  font-weight: 800 !important;
  letter-spacing: 0 !important;
}

.ui-toolbar,
.theme-toolbar-card {
  border: 1px solid var(--ui-border) !important;
  border-radius: var(--ui-radius) !important;
  background: rgba(255, 255, 255, 0.94) !important;
  box-shadow: var(--ui-shadow-soft) !important;
}

.ui-grid-gap {
  gap: var(--ui-page-gap);
}

.client-row-placeholder {
  opacity: 0.88;
}

.client-row-placeholder td {
  background: #f1f5f9 !important;
}

.client-placeholder-chip {
  display: inline-flex;
  margin-left: 8px;
  padding: 4px 7px;
  border-radius: 7px;
  background: #e2e8f0;
  color: #475569;
  font-size: 10px;
  font-weight: 800;
  vertical-align: middle;
}

/* Shell layout repair after replacing the template app stylesheet.
   Keep the chrome independent from the page scroll. */
:root {
  --shell-sidebar-width: 232px;
  --shell-sidebar-collapsed-width: 76px;
  --shell-topbar-height: 72px;
  --shell-content-gap: 0px;
  --shell-surface-radius: 14px;
  --shell-topbar-offset: 6px;
}

html,
body {
  min-height: 100%;
  overflow-x: hidden;
  background: var(--df-sidebar) !important;
}

.wrapper {
  min-height: 100vh;
  background: var(--df-sidebar);
}

.wrapper::before {
  content: "";
  position: fixed;
  top: var(--shell-topbar-offset);
  right: 10px;
  bottom: 0;
  left: calc(var(--shell-sidebar-width) + var(--shell-content-gap));
  z-index: 0;
  border-radius: var(--shell-surface-radius) 0 0 0;
  background: var(--ui-bg);
  pointer-events: none;
  transition: left 0.24s ease, border-radius 0.24s ease;
}

.wrapper::after {
  content: "";
  position: fixed;
  top: 0;
  right: 0;
  left: var(--shell-sidebar-width);
  z-index: 1028;
  height: var(--shell-topbar-offset);
  background: var(--df-sidebar);
  pointer-events: none;
  transition: left 0.24s ease;
}

.topbar {
  position: fixed !important;
  top: var(--shell-topbar-offset);
  right: 10px;
  left: calc(var(--shell-sidebar-width) + var(--shell-content-gap));
  z-index: 1030;
  height: var(--shell-topbar-height);
  margin: 0 !important;
  border: 0 !important;
  border-radius: var(--shell-surface-radius) var(--shell-surface-radius) 0 0 !important;
  background: #ffffff !important;
  box-shadow: 0 8px 18px rgba(15, 23, 42, 0.04);
  transition: left 0.24s ease, right 0.24s ease, border-radius 0.24s ease;
}

.topbar .container-fluid,
.topbar .navbar-header {
  min-height: var(--shell-topbar-height);
}

.main-nav {
  position: fixed !important;
  top: 0;
  bottom: 0;
  left: 0;
  z-index: 1020;
  width: var(--shell-sidebar-width) !important;
  height: 100vh;
  display: flex !important;
  flex-direction: column;
  overflow: hidden !important;
  border-top-right-radius: 0;
  transition: width 0.24s ease, border-radius 0.24s ease, transform 0.24s ease;
}

.main-nav .logo-box,
.main-nav .button-sm-hover,
.main-nav .sidebar-profile-card {
  flex: 0 0 auto;
}

.main-nav .scrollbar {
  flex: 1 1 auto;
  min-height: 0;
  overflow-x: hidden !important;
  overflow-y: hidden !important;
  overscroll-behavior: contain;
  padding-bottom: 18px !important;
  transition: padding 0.24s ease;
}

.main-nav .simplebar-content-wrapper {
  height: 100% !important;
  max-height: 100% !important;
  overflow-x: hidden !important;
  overflow-y: auto !important;
}

.main-nav .sidebar-profile-card {
  position: static !important;
  margin: 12px 16px 14px !important;
}

.main-nav .button-sm-hover {
  display: none !important;
}

.page-content {
  position: relative;
  z-index: 1;
  min-height: calc(100vh - var(--shell-topbar-height));
  margin-left: calc(var(--shell-sidebar-width) + var(--shell-content-gap)) !important;
  padding-top: calc(var(--shell-topbar-height) + var(--shell-topbar-offset) + 10px);
  box-sizing: border-box;
  background: transparent !important;
  transition: margin-left 0.24s ease;
}

.page-content > .container-fluid {
  padding-top: 18px;
}

body.sidebar-collapsed .main-nav,
html.sidebar-collapsed .main-nav {
  width: var(--shell-sidebar-collapsed-width) !important;
  transform: none;
  border-top-right-radius: 0;
}

body.sidebar-collapsed .topbar,
html.sidebar-collapsed .topbar {
  left: calc(var(--shell-sidebar-collapsed-width) + var(--shell-content-gap));
  border-radius: var(--shell-surface-radius) var(--shell-surface-radius) 0 0 !important;
}

body.sidebar-collapsed .page-content,
html.sidebar-collapsed .page-content {
  margin-left: calc(var(--shell-sidebar-collapsed-width) + var(--shell-content-gap)) !important;
}

body.sidebar-collapsed .wrapper::before,
html.sidebar-collapsed .wrapper::before {
  left: calc(var(--shell-sidebar-collapsed-width) + var(--shell-content-gap));
}

body.sidebar-collapsed .wrapper::after,
html.sidebar-collapsed .wrapper::after {
  left: var(--shell-sidebar-collapsed-width);
}

body.sidebar-collapsed .logo-box,
html.sidebar-collapsed .logo-box {
  padding: 0 !important;
  justify-content: center !important;
}

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

body.sidebar-collapsed .iaclub-brand-copy,
html.sidebar-collapsed .iaclub-brand-copy,
body.sidebar-collapsed .menu-title,
html.sidebar-collapsed .menu-title,
body.sidebar-collapsed .main-nav .nav-text,
html.sidebar-collapsed .main-nav .nav-text,
body.sidebar-collapsed .main-nav .sub-nav-link span,
html.sidebar-collapsed .main-nav .sub-nav-link span,
body.sidebar-collapsed .sidebar-profile-meta,
html.sidebar-collapsed .sidebar-profile-meta,
body.sidebar-collapsed .sidebar-profile-head > i,
html.sidebar-collapsed .sidebar-profile-head > i,
body.sidebar-collapsed .sidebar-profile-actions span,
html.sidebar-collapsed .sidebar-profile-actions span {
  display: none !important;
}

.iaclub-brand-copy,
.menu-title,
.main-nav .nav-text,
.main-nav .sub-nav-link span,
.sidebar-profile-meta,
.sidebar-profile-head > i,
.sidebar-profile-actions span {
  transition: opacity 0.18s ease, transform 0.18s ease;
}

body.sidebar-collapsing .iaclub-brand-copy,
html.sidebar-collapsing .iaclub-brand-copy,
body.sidebar-collapsing .menu-title,
html.sidebar-collapsing .menu-title,
body.sidebar-collapsing .main-nav .nav-text,
html.sidebar-collapsing .main-nav .nav-text,
body.sidebar-collapsing .main-nav .sub-nav-link span,
html.sidebar-collapsing .main-nav .sub-nav-link span,
body.sidebar-collapsing .sidebar-profile-meta,
html.sidebar-collapsing .sidebar-profile-meta,
body.sidebar-collapsing .sidebar-profile-head > i,
html.sidebar-collapsing .sidebar-profile-head > i,
body.sidebar-collapsing .sidebar-profile-actions span,
html.sidebar-collapsing .sidebar-profile-actions span {
  opacity: 0;
  transform: translateX(-6px);
}

body.sidebar-collapsed .main-nav .sub-nav-link,
html.sidebar-collapsed .main-nav .sub-nav-link,
body.sidebar-collapsed .main-nav .nav-link,
html.sidebar-collapsed .main-nav .nav-link,
body.sidebar-collapsed .main-nav .integration-link,
html.sidebar-collapsed .main-nav .integration-link {
  width: 42px;
  min-width: 42px;
  height: 42px;
  margin: 6px auto;
  padding: 0 !important;
  border-radius: 8px;
  justify-content: center;
}

body.sidebar-collapsed .main-nav .nav-link[data-tab]::after,
html.sidebar-collapsed .main-nav .nav-link[data-tab]::after {
  content: attr(aria-label);
  position: absolute;
  left: calc(100% + 12px);
  top: 50%;
  z-index: 1100;
  min-width: max-content;
  padding: 10px 12px;
  border-radius: 2px;
  background: #17222c;
  color: #dbe7ef;
  font-size: 13px;
  font-weight: 700;
  line-height: 1;
  opacity: 0;
  pointer-events: none;
  transform: translate(-6px, -50%);
  transition: opacity 0.16s ease, transform 0.16s ease;
  box-shadow: 0 10px 22px rgba(15, 23, 42, 0.22);
}

body.sidebar-collapsed .main-nav .nav-link[data-tab]:hover::after,
html.sidebar-collapsed .main-nav .nav-link[data-tab]:hover::after {
  opacity: 1;
  transform: translate(0, -50%);
}

body.sidebar-collapsed .main-nav .sub-nav-link.active::before,
html.sidebar-collapsed .main-nav .sub-nav-link.active::before {
  display: block;
  left: -17px;
  width: 3px;
  border-radius: 0 4px 4px 0;
}

body.sidebar-collapsed .nav-item-icon,
html.sidebar-collapsed .nav-item-icon {
  margin: 0 !important;
  font-size: 18px;
}

body.sidebar-collapsed .sidebar-section-divider,
html.sidebar-collapsed .sidebar-section-divider {
  margin: 12px 18px;
}

body.sidebar-collapsed .sidebar-profile-card,
html.sidebar-collapsed .sidebar-profile-card {
  margin: 10px 8px 12px !important;
  padding: 8px !important;
}

body.sidebar-collapsed .sidebar-profile-head,
html.sidebar-collapsed .sidebar-profile-head {
  display: flex;
  justify-content: center;
  padding-bottom: 8px;
}

body.sidebar-collapsed .sidebar-profile-actions,
html.sidebar-collapsed .sidebar-profile-actions {
  display: grid;
  grid-template-columns: 1fr;
  gap: 6px;
}

body.sidebar-collapsed .sidebar-profile-actions button,
html.sidebar-collapsed .sidebar-profile-actions button {
  justify-content: center;
  padding: 6px 0;
}

@media (max-width: 991.98px) {
  :root {
    --shell-topbar-height: 72px;
  }

  .main-nav {
    transform: translateX(-100%);
    transition: transform 0.2s ease;
  }

  .topbar {
    left: 0;
    right: 0;
    top: 0;
    border-radius: 0 !important;
  }

  .wrapper::before {
    top: 0;
    right: 0;
    left: 0;
    border-radius: 0;
  }

  .wrapper::after {
    display: none;
  }

  html.sidebar-enable .main-nav,
  body.sidebar-enable .main-nav,
  .wrapper.sidebar-enable .main-nav {
    transform: translateX(0);
  }

  .page-content {
    margin-left: 0 !important;
    padding-top: calc(var(--shell-topbar-height) + 8px);
  }

  body.sidebar-collapsed .main-nav,
  html.sidebar-collapsed .main-nav {
    width: var(--shell-sidebar-width) !important;
    transform: translateX(-100%);
  }

  body.sidebar-collapsed .topbar,
  html.sidebar-collapsed .topbar,
  body.sidebar-collapsed .page-content,
  html.sidebar-collapsed .page-content {
    left: 0;
    margin-left: 0 !important;
  }

  body.sidebar-collapsed .wrapper::before,
  html.sidebar-collapsed .wrapper::before {
    left: 0;
  }

  body.sidebar-collapsed .wrapper::after,
  html.sidebar-collapsed .wrapper::after {
    display: none;
  }
}

@media (max-height: 760px) {
  .main-nav .scrollbar {
    overflow-y: auto !important;
  }
}

@media (prefers-reduced-motion: reduce) {
  .wrapper::before,
  .topbar,
  .main-nav,
  .main-nav .scrollbar,
  .page-content,
  .iaclub-brand-copy,
  .menu-title,
  .main-nav .nav-text,
  .main-nav .sub-nav-link span,
  .sidebar-profile-meta,
  .sidebar-profile-head > i,
  .sidebar-profile-actions span {
    transition: none !important;
  }
}

.store-plan-cell {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 220px;
}

.store-plan-cell img,
.store-plan-thumb {
  display: grid;
  flex: 0 0 auto;
  width: 58px;
  height: 42px;
  place-items: center;
  border-radius: 8px;
  object-fit: cover;
  color: #ffffff;
  background: linear-gradient(135deg, #0b1f4d, #2563eb);
  font-size: 12px;
  font-weight: 900;
}

.store-description-cell {
  max-width: 360px;
  color: #64748b;
  white-space: normal;
}

.slider-plugin-card {
  border: 1px solid rgba(20, 184, 166, 0.18);
}

.slider-plugin-mount {
  display: grid;
  gap: 12px;
  max-width: 760px;
}

.slider-plugin-rules {
  display: grid;
  gap: 12px;
}

.slider-plugin-rule {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  padding: 14px;
  border: 1px solid #d8e2f0;
  border-radius: 8px;
  background: #ffffff;
}

.slider-plugin-field label {
  display: block;
  margin-bottom: 6px;
  color: #60708a;
  font-size: 12px;
  font-weight: 800;
}

.slider-plugin-image-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
}

.slider-plugin-remove {
  grid-column: 1 / 2;
}

.slider-plugin-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.slider-plugin-actions .btn:last-child {
  grid-column: 1 / -1;
}

.slider-plugin-panel-embedded {
  position: static !important;
  inset: auto !important;
  width: 100% !important;
  max-width: 100% !important;
  margin: 0 !important;
  transform: none !important;
  z-index: 1 !important;
  box-shadow: none !important;
}
