:root {
  --portal-bg: #f5f7fb;
  --portal-panel: #ffffff;
  --portal-panel-alt: #fbfcfe;
  --portal-border: #d8e1ed;
  --portal-text: #10213d;
  --portal-muted: #677a98;
  --portal-icon: #8fa3c4;
  --portal-accent: #ff6a00;
  --portal-accent-soft: #fff0e3;
  --portal-accent-shadow: rgba(255, 106, 0, 0.24);
  --portal-success: #10b981;
  --portal-danger: #ff4d6d;
  --portal-warning: #f59e0b;
  --portal-info: #3b82f6;
  --portal-shadow: 0 10px 30px rgba(16, 33, 61, 0.08);
  --portal-shadow-soft: 0 8px 18px rgba(16, 33, 61, 0.05);
  --portal-radius-lg: 22px;
  --portal-radius-md: 18px;
  --portal-radius-sm: 14px;
  --portal-sidebar-width: 328px;
  --portal-header-height: 102px;
}

html,
body {
  min-height: 100%;
}

body {
  font-family: "Open Sans", sans-serif;
  background:
    radial-gradient(circle at 14% 14%, rgba(255, 106, 0, 0.05), transparent 24%),
    linear-gradient(180deg, #fbfcfe 0%, #f5f7fb 100%);
  color: var(--portal-text);
}

a {
  color: inherit;
  text-decoration: none;
}

h1,
h2,
h3,
h4,
h5,
h6 {
  font-family: "Poppins", sans-serif;
  color: var(--portal-text);
}

#main {
  margin-top: calc(var(--portal-header-height) + 18px);
  margin-left: calc(var(--portal-sidebar-width) + 26px);
  margin-right: 24px;
  padding: 0 0 30px;
  transition: margin-left 0.28s ease, margin-right 0.28s ease;
}

#footer {
  margin-left: calc(var(--portal-sidebar-width) + 26px);
  margin-right: 24px;
  transition: margin-left 0.28s ease, margin-right 0.28s ease;
}

.header {
  position: fixed;
  inset: 0 0 auto var(--portal-sidebar-width);
  height: var(--portal-header-height);
  padding: 0 34px 0 38px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 22px;
  background: rgba(255, 255, 255, 0.94);
  border-bottom: 1px solid var(--portal-border);
  box-shadow: 0 2px 12px rgba(16, 33, 61, 0.03);
  z-index: 996;
}

.portal-header-left {
  display: flex;
  align-items: center;
  gap: 18px;
  min-width: 0;
}

.portal-burger {
  width: 44px;
  height: 44px;
  border: 0;
  border-radius: var(--portal-radius-sm);
  background: transparent;
  color: var(--portal-icon);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  transition: background 0.2s ease, color 0.2s ease;
}

.portal-burger:hover {
  background: var(--portal-accent-soft);
  color: var(--portal-accent);
}

.portal-header-divider {
  width: 1px;
  height: 34px;
  background: var(--portal-border);
}

.portal-header-context {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
  font-family: "Poppins", sans-serif;
  font-size: 0.98rem;
  font-weight: 600;
  color: #38527a;
}

.portal-header-context-copy {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.portal-header-context-copy small {
  color: var(--portal-muted);
  font-size: 0.76rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.portal-header-context i {
  color: var(--portal-info);
  font-size: 1rem;
}

.portal-header-context span {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.portal-header-alert {
  padding: 8px 12px;
  border-radius: 999px;
  border: 1px solid rgba(255, 106, 0, 0.18);
  background: var(--portal-accent-soft);
  color: var(--portal-accent);
  font-size: 0.76rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.portal-search {
  width: min(310px, 100%);
  position: relative;
}

.portal-search i {
  position: absolute;
  top: 50%;
  left: 18px;
  transform: translateY(-50%);
  color: var(--portal-icon);
  font-size: 1rem;
}

.portal-search input {
  width: 100%;
  height: 46px;
  padding: 0 18px 0 48px;
  border-radius: 16px;
  border: 1px solid var(--portal-border);
  background: #f8fbff;
  color: var(--portal-text);
  font-size: 0.96rem;
}

.portal-search input:focus {
  outline: none;
  border-color: rgba(255, 106, 0, 0.45);
  box-shadow: 0 0 0 4px rgba(255, 106, 0, 0.08);
}

.portal-header-actions {
  display: flex;
  align-items: center;
  gap: 18px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.portal-icon-trigger {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  border: 1px solid var(--portal-border);
  background: #fff;
  color: var(--portal-icon);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
}

.portal-icon-trigger:hover {
  color: var(--portal-accent);
  border-color: rgba(255, 106, 0, 0.26);
}

.header-nav .badge-number {
  top: 4px;
  right: 4px;
  min-width: 17px;
  height: 17px;
  border-radius: 999px;
  background: var(--portal-accent) !important;
  border: 2px solid #fff;
  font-size: 0.65rem;
  line-height: 0.95rem;
}

.portal-profile-trigger {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  padding: 4px 0 4px 14px;
  border-left: 1px solid var(--portal-border);
}

.portal-user-copy {
  display: flex;
  flex-direction: column;
  text-align: right;
  line-height: 1.15;
}

.portal-user-copy strong {
  font-family: "Poppins", sans-serif;
  font-size: 0.98rem;
  color: #111f38;
}

.portal-user-copy small {
  font-size: 0.82rem;
  color: var(--portal-muted);
}

.portal-avatar,
.portal-avatar img {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  object-fit: cover;
}

.portal-avatar img {
  border: 2px solid rgba(59, 130, 246, 0.12);
}

.dropdown-menu {
  padding: 10px 0;
  border: 1px solid var(--portal-border);
  border-radius: 18px;
  box-shadow: 0 18px 40px rgba(16, 33, 61, 0.12);
}

.dropdown-menu .dropdown-item {
  color: #30476d;
}

.dropdown-menu .dropdown-item:hover {
  background: #f7faff;
  color: var(--portal-accent);
}

.portal-dropdown-title {
  font-family: "Poppins", sans-serif;
  font-weight: 600;
}

.portal-dropdown-subtitle {
  margin-top: 4px;
  color: var(--portal-muted);
  font-size: 0.85rem;
}

.portal-notifications-menu {
  width: min(420px, calc(100vw - 40px));
  max-height: 420px !important;
  overflow-y: auto;
  overflow-x: hidden;
  overscroll-behavior: contain;
  scrollbar-gutter: stable;
}

.portal-notifications-menu::-webkit-scrollbar {
  width: 8px;
}

.portal-notifications-menu::-webkit-scrollbar-thumb {
  background: rgba(48, 71, 109, 0.28);
  border-radius: 999px;
}

.portal-notifications-menu::-webkit-scrollbar-track {
  background: transparent;
}

.sidebar {
  position: fixed;
  inset: 0 auto 0 0;
  width: var(--portal-sidebar-width);
  display: flex;
  flex-direction: column;
  padding: 34px 18px 18px;
  background: rgba(255, 255, 255, 0.96);
  border-right: 1px solid var(--portal-border);
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.5);
  z-index: 997;
}

.portal-sidebar-brand {
  display: flex;
  align-items: center;
  gap: 14px;
  min-height: 54px;
  padding: 0 14px 28px;
}

.portal-sidebar-brand img {
  width: 110px;
  height: auto;
}

.portal-sidebar-brand-copy {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.portal-sidebar-brand-copy strong {
  font-family: "Poppins", sans-serif;
  font-size: 1rem;
  font-weight: 700;
  color: #1d3252;
}

.portal-sidebar-brand-copy small {
  color: var(--portal-muted);
  font-size: 0.82rem;
}

.portal-sidebar-section-title {
  margin: 0 8px 14px;
  color: #8ba0bd;
  font-family: "Poppins", sans-serif;
  font-size: 0.74rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.sidebar-nav {
  padding: 0;
  margin: 14px 0 0;
}

.sidebar-nav li {
  list-style: none;
}

.sidebar-nav .nav-item {
  margin-bottom: 10px;
}

.sidebar-nav .nav-link {
  min-height: 46px;
  padding: 12px 18px;
  border-radius: 18px;
  display: flex;
  align-items: center;
  gap: 14px;
  background: transparent;
  color: #4d6488;
  font-family: "Poppins", sans-serif;
  font-size: 0.95rem;
  font-weight: 500;
  border: 0;
}

.sidebar-nav .nav-link i {
  color: var(--portal-icon);
  font-size: 1.05rem;
}

.sidebar-nav .nav-link:hover,
.sidebar-nav .nav-link:not(.collapsed) {
  background: var(--portal-accent-soft);
  color: var(--portal-accent);
}

.sidebar-nav .nav-link:hover i,
.sidebar-nav .nav-link:not(.collapsed) i {
  color: var(--portal-accent);
}

.sidebar-nav .nav-link.collapsed {
  color: #4d6488;
  background: transparent;
}

.sidebar-nav .nav-content {
  padding: 6px 0 6px 14px;
}

.sidebar-nav .nav-content a {
  min-height: 38px;
  padding: 9px 14px;
  border-radius: 14px;
  display: flex;
  align-items: center;
  gap: 10px;
  color: #6e83a5;
  font-size: 0.88rem;
  font-weight: 600;
}

.sidebar-nav .nav-content a i {
  color: #a7b5cc;
}

.sidebar-nav .nav-content a:hover,
.sidebar-nav .nav-content a.active {
  background: #f4f7fb;
  color: var(--portal-accent);
}

.sidebar-nav .nav-content a:hover i,
.sidebar-nav .nav-content a.active i {
  color: var(--portal-accent);
}

.portal-sidebar-spacer {
  flex: 1;
}

.portal-sidebar-bottom {
  margin-top: 24px;
  padding-top: 18px;
  border-top: 1px solid var(--portal-border);
}

.portal-logout-link {
  min-height: 46px;
  padding: 12px 18px;
  border-radius: 18px;
  display: flex;
  align-items: center;
  gap: 14px;
  font-family: "Poppins", sans-serif;
  font-size: 0.95rem;
  font-weight: 500;
  color: #4d6488;
}

.portal-logout-link i {
  color: var(--portal-icon);
  font-size: 1.1rem;
}

.portal-logout-link:hover {
  background: var(--portal-accent-soft);
  color: var(--portal-accent);
}

.portal-logout-link:hover i {
  color: var(--portal-accent);
}

.toggle-sidebar .sidebar {
  transform: translateX(-100%);
}

.toggle-sidebar .header {
  inset-inline-start: 0;
}

.toggle-sidebar #main,
.toggle-sidebar #footer {
  margin-left: 24px;
}

.pagetitle {
  margin-bottom: 24px;
  padding: 26px 28px;
  border-radius: 24px;
  border: 1px solid rgba(255, 255, 255, 0.72);
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.98), rgba(250, 252, 255, 0.96));
  box-shadow: var(--portal-shadow-soft);
}

.pagetitle h1 {
  margin-bottom: 6px;
  font-size: 2rem;
  font-weight: 700;
}

.pagetitle p {
  margin: 0;
  color: #5f7699;
  font-size: 1.04rem;
}

.breadcrumb {
  margin: 0;
}

.breadcrumb .breadcrumb-item,
.breadcrumb .breadcrumb-item a {
  color: var(--portal-muted);
  font-size: 0.94rem;
}

.breadcrumb-item + .breadcrumb-item::before {
  color: #b4c0d3;
}

.section.dashboard,
.section.usuarios,
.section.profile {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.card,
.modal-content,
.accordion-item,
.datatable-container,
.dataTable-container,
.table-responsive,
.list-group,
.offcanvas {
  border: 1px solid var(--portal-border);
  border-radius: var(--portal-radius-lg);
  background: var(--portal-panel);
  box-shadow: var(--portal-shadow-soft);
}

.card {
  overflow: hidden;
}

.card-header,
.card-footer {
  padding: 18px 24px;
  background: #fbfcff;
  border-color: var(--portal-border);
}

.card-body {
  padding: 24px;
}

.card-title {
  margin-bottom: 18px;
  padding: 0;
  font-size: 1.22rem;
  font-weight: 700;
}

.btn {
  border-radius: 16px;
  font-weight: 700;
  box-shadow: none !important;
}

.btn-primary {
  border: 0;
  background: linear-gradient(135deg, var(--portal-accent), #ff8f3d);
}

.btn-primary:hover {
  background: linear-gradient(135deg, #f35c00, var(--portal-accent));
}

.btn-outline-primary {
  border-color: rgba(255, 106, 0, 0.28);
  color: var(--portal-accent);
  background: #fff;
}

.btn-outline-primary:hover {
  border-color: var(--portal-accent);
  background: var(--portal-accent-soft);
  color: var(--portal-accent);
}

.btn-secondary,
.btn-secondaryy {
  border: 1px solid var(--portal-border);
  background: #fff;
  color: #506887;
}

.btn-secondary:hover,
.btn-secondaryy:hover {
  border-color: rgba(255, 106, 0, 0.24);
  background: var(--portal-accent-soft);
  color: var(--portal-accent);
}

.btn-success {
  border: 0;
  background: linear-gradient(135deg, #10b981, #38d39f);
}

.btn-danger {
  border: 0;
  background: linear-gradient(135deg, #ff5d78, #ff355c);
}

.btn-danger:hover {
  background: linear-gradient(135deg, #f24562, #ff214c);
}

.btn-rounded {
  border-radius: 999px !important;
}

.form-control,
.form-select,
.dataTable-input,
.dataTable-selector,
textarea,
select,
input:not([type="checkbox"]):not([type="radio"]) {
  min-height: 44px;
  border-radius: 14px !important;
  border: 1px solid var(--portal-border);
  background: #fbfcff;
  color: var(--portal-text);
}

.form-control:focus,
.form-select:focus,
.dataTable-input:focus,
textarea:focus,
select:focus,
input:focus {
  border-color: rgba(255, 106, 0, 0.44);
  box-shadow: 0 0 0 4px rgba(255, 106, 0, 0.08);
}

.input-group-text {
  border-radius: 14px;
  border: 1px solid var(--portal-border);
  background: #fff;
  color: var(--portal-muted);
}

.table,
.datatable-table,
.dataTable-table {
  margin-bottom: 0;
  color: #203354;
}

.table thead th,
.datatable-table thead th,
.dataTable-table thead th {
  padding: 16px;
  background: #f9fbff;
  border-bottom: 1px solid var(--portal-border);
  color: var(--portal-muted);
  font-family: "Poppins", sans-serif;
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.table tbody td,
.datatable-table tbody td,
.dataTable-table tbody td {
  padding: 16px;
  border-color: #e9eff7;
  vertical-align: middle;
}

.table tbody tr:hover,
.datatable-table tbody tr:hover,
.dataTable-table tbody tr:hover {
  background: #fff8f2;
}

.table-striped > tbody > tr:nth-of-type(odd) > * {
  background: #f8fafc;
}

.table-striped > tbody > tr:nth-of-type(even) > * {
  background: #ffffff;
}

.table-bordered,
.table-bordered td,
.table-bordered th {
  border-color: #e2eaf3;
}

.nav-tabs {
  gap: 10px;
  padding: 8px;
  display: inline-flex;
  flex-wrap: wrap;
  border: 0;
  border-radius: 18px;
  background: #f2f5fa;
}

.nav-tabs .nav-item {
  margin: 0;
}

.nav-tabs .nav-link {
  min-height: 44px;
  padding: 0 18px;
  border: 0;
  border-radius: 14px;
  display: inline-flex;
  align-items: center;
  font-family: "Poppins", sans-serif;
  font-size: 0.94rem;
  font-weight: 600;
  color: #617899;
  background: transparent;
}

.nav-tabs .nav-link:hover,
.nav-tabs .nav-link:focus {
  color: var(--portal-accent);
  border: 0;
}

.nav-tabs .nav-link.active {
  color: #10213d;
  background: #fff;
  box-shadow: var(--portal-shadow-soft);
}

.tab-content {
  padding-top: 24px !important;
}

.tab-pane > .card:first-child {
  margin-top: 0;
}

.form-check-input {
  border-color: #c9d4e2;
}

.form-check-input:checked {
  background-color: var(--portal-accent);
  border-color: var(--portal-accent);
}

.form-label,
.col-form-label {
  color: #516784;
  font-weight: 600;
}

.form-check-input[type="radio"] {
  width: 18px;
  height: 18px;
  margin-top: 0.15em;
}

.form-switch .form-check-input {
  width: 46px;
  height: 24px;
}

.badge {
  border-radius: 999px;
  font-weight: 700;
}

.alert {
  border-radius: 18px;
  border: 1px solid var(--portal-border);
  background: #fff;
  box-shadow: var(--portal-shadow-soft);
}

.alert-success {
  border-color: rgba(16, 185, 129, 0.18);
  background: #f0fdf8;
  color: #0d6b4f;
}

.alert-danger {
  border-color: rgba(255, 77, 109, 0.18);
  background: #fff1f4;
  color: #b4233d;
}

.alert-warning {
  border-color: rgba(245, 158, 11, 0.18);
  background: #fff8e8;
  color: #a16207;
}

.text-primary {
  color: #2563eb !important;
}

.footer {
  padding: 0 0 24px;
  background: transparent;
}

.portal-footer-card {
  padding: 18px 24px;
  border-radius: 22px;
  border: 1px solid var(--portal-border);
  background: rgba(255, 255, 255, 0.92);
  box-shadow: var(--portal-shadow-soft);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
}

.portal-footer-copy strong {
  display: block;
  font-family: "Poppins", sans-serif;
}

.portal-footer-copy span,
.portal-footer-links a {
  color: var(--portal-muted);
  font-size: 0.88rem;
}

.portal-footer-links {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
}

.portal-footer-links a:hover {
  color: var(--portal-accent);
}

.portal-home-intro {
  margin-bottom: 24px;
}

.portal-home-intro h2 {
  margin-bottom: 8px;
  font-size: 2rem;
  font-weight: 700;
}

.portal-home-intro p {
  margin-bottom: 0;
  font-size: 1rem;
  color: #50709e;
}

.portal-stat-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 24px;
}

.portal-stat-card {
  padding: 28px 28px 24px;
  border-radius: 22px;
  border: 1px solid var(--portal-border);
  background: var(--portal-panel);
  box-shadow: var(--portal-shadow);
  min-height: 150px;
  max-height: 300px;
}

.portal-stat-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 18px;
}

.portal-stat-icon,
.portal-mini-icon {
  width: 40px;
  height: 40px;
  border-radius: 18px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 1.6rem;
}

.portal-stat-icon.blue {
  color: #2563eb;
  background: #edf4ff;
}

.portal-stat-icon.green {
  color: #059669;
  background: #ebfbf4;
}

.portal-stat-icon.orange {
  color: var(--portal-accent);
  background: #fff5eb;
}

.portal-stat-icon.indigo {
  color: #4f46e5;
  background: #f0efff;
}

.portal-stat-icon.purple {
  color: #9333ea;
  background: #f8efff;
}

.portal-stat-icon.amber {
  color: #d97706;
  background: #fff7e8;
}

.portal-stat-menu {
  color: #98a8c2;
  font-size: 1.4rem;
}

.portal-stat-card span {
  display: block;
  margin-bottom: 10px;
  color: #5b7298;
  font-size: 0.88rem;
}

.portal-stat-card strong {
  display: block;
  margin-bottom: 8px;
  font-family: "Poppins", sans-serif;
  font-size: 1.1rem;
  line-height: 1.35;
  color: var(--portal-text);
}

.portal-stat-card .portal-stat-value {
  display: block;
  margin-bottom: 8px;
  font-family: "Poppins", sans-serif;
  font-size: 2rem;
  font-weight: 700;
  line-height: 1.1;
  color: #10213d;
}

.portal-stat-card p {
  margin-bottom: 0;
  color: #7b8eab;
}

.portal-home-chart-shell {
  padding: 26px 28px;
  border-radius: 24px;
  border: 1px solid var(--portal-border);
  background: rgba(255, 255, 255, 0.96);
  box-shadow: var(--portal-shadow-soft);
}

.portal-home-chart-shell .row > div > *:first-child {
  height: 100%;
}

.portal-section-title {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 20px;
}

.portal-section-title h2 {
  margin-bottom: 4px;
  font-size: 2rem;
}

.portal-section-title p,
.portal-section-title span {
  margin: 0;
  color: #6880a4;
}

.portal-tabbar,
.portal-filterbar {
  padding: 14px 18px;
  margin-bottom: 22px;
  border: 1px solid var(--portal-border);
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.88);
  box-shadow: var(--portal-shadow-soft);
}

.portal-tabbar {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.portal-tab {
  min-height: 46px;
  padding: 0 18px;
  border-radius: 14px;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  border: 0;
  background: transparent;
  cursor: pointer;
  font-family: "Poppins", sans-serif;
  font-size: 0.95rem;
  font-weight: 600;
  color: #5b7298;
}

.portal-tab.active {
  background: #fff;
  border: 1px solid var(--portal-border);
  color: #2456f5;
  box-shadow: var(--portal-shadow-soft);
}

.portal-filterbar-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  flex-wrap: wrap;
}

.portal-filterbar-left,
.portal-filterbar-right {
  display: flex;
  align-items: center;
  gap: 18px;
  flex-wrap: wrap;
}

.portal-filter-group {
  display: flex;
  align-items: center;
  gap: 12px;
}

.portal-filter-divider {
  width: 1px;
  height: 28px;
  background: var(--portal-border);
}

.portal-filter-label {
  color: #8b9bb4;
  font-family: "Poppins", sans-serif;
  font-size: 0.86rem;
  font-weight: 700;
  text-transform: uppercase;
}

.portal-color-dots {
  display: flex;
  align-items: center;
  gap: 8px;
}

.portal-color-dot:has(input:checked) {
  border: 2px solid #000;
  transform: scale(1.1);
  box-shadow: 0 0 4px rgba(0,0,0,0.3);
}

.portal-color-dot {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  border: 2px solid rgba(16, 33, 61, 0.06);
}

.portal-segmented {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px;
  border-radius: 14px;
  background: #f2f5fa;
}

.portal-segmented a,
.portal-segmented button,
.portal-segmented span {
  min-height: 34px;
  padding: 0 16px;
  border-radius: 10px;
  display: inline-flex;
  align-items: center;
  border: 0;
  background: transparent;
  color: #62789b;
  font-family: "Poppins", sans-serif;
  font-size: 0.92rem;
  font-weight: 600;
}

.portal-segmented .active {
  background: #fff;
  color: #233a5e;
  box-shadow: var(--portal-shadow-soft);
}

.portal-clear-filters {
  color: var(--portal-accent);
  font-family: "Poppins", sans-serif;
  font-size: 0.9rem;
  font-weight: 700;
  text-transform: uppercase;
}

.portal-toolbar-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  flex-wrap: wrap;
  margin-bottom: 24px;
}

.portal-toolbar-left,
.portal-toolbar-right {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
}

.portal-light-button,
.portal-primary-button {
  min-height: 48px;
  padding: 0 22px;
  border-radius: 16px;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: "Poppins", sans-serif;
  font-size: 0.96rem;
  font-weight: 600;
}

.portal-light-button {
  border: 1px solid var(--portal-border);
  background: #fff;
  color: #4f678d;
}

.portal-primary-button {
  border: 0;
  background: linear-gradient(135deg, var(--portal-accent), #ff8a2f);
  color: #fff;
  box-shadow: 0 10px 22px var(--portal-accent-shadow);
}

.portal-switch-row {
  display: flex;
  align-items: center;
  gap: 18px;
  flex-wrap: wrap;
}

.portal-switch-wrap {
  display: flex;
  align-items: center;
  gap: 10px;
  color: #35547f;
  font-family: "Poppins", sans-serif;
  font-size: 0.96rem;
  font-weight: 600;
}

.portal-switch-wrap .form-check.form-switch {
  margin: 0;
}

.portal-switch-wrap .form-check-input {
  width: 46px;
  height: 24px;
  margin: 0;
  border: 1px solid var(--portal-border);
  background-color: #dfe7f1;
}

.portal-switch-wrap .form-check-input:checked {
  background-color: var(--portal-accent);
  border-color: var(--portal-accent);
}

.portal-inline-filter {
  display: flex;
  align-items: center;
  gap: 12px;
}

.portal-inline-filter label {
  color: #35547f;
  font-family: "Poppins", sans-serif;
  font-size: 0.96rem;
  font-weight: 600;
}

.portal-inline-filter .form-select {
  min-width: 112px;
}

.portal-refresh-button {
  width: 46px;
  height: 46px;
  border-radius: 14px;
  border: 1px solid #c6d7f8;
  background: #f4f8ff;
  color: #2456f5;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
}

.portal-mini-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(155px, 1fr));
  gap: 18px;
  margin-bottom: 24px;
}

.portal-mini-card {
  min-height: 138px;
  padding: 22px 20px 18px;
  border-radius: 20px;
  border: 1px solid var(--portal-border);
  background: #fff;
  box-shadow: var(--portal-shadow-soft);
}

.portal-mini-icon {
  width: 42px;
  height: 42px;
  margin-bottom: 16px;
  border-radius: 14px;
  color: #4d6488;
  background: #f3f6fb;
  font-size: 1.2rem;
}

.portal-mini-card span {
  display: block;
  margin-bottom: 8px;
  color: #7a8eac;
  font-family: "Poppins", sans-serif;
  font-size: 0.82rem;
  font-weight: 600;
  text-transform: uppercase;
}

.portal-mini-card strong {
  display: block;
  font-family: "Poppins", sans-serif;
  font-size: 1.9rem;
  line-height: 1;
}

.portal-mini-card.mint .portal-mini-icon {
  color: #059669;
  background: #ebfbf4;
}

.portal-mini-card.rose .portal-mini-icon {
  color: #ff2d55;
  background: #fff0f4;
}

.portal-mini-card.sand .portal-mini-icon {
  color: #52637f;
  background: #f7f1e4;
}

.portal-mini-card.blue .portal-mini-icon {
  color: #2563eb;
  background: #edf4ff;
}

.portal-mini-card.amber .portal-mini-icon {
  color: #d97706;
  background: #fff6e7;
}

.portal-mini-card.gray .portal-mini-icon {
  color: #8b9bb4;
  background: #f2f5fa;
}

.portal-table-shell {
  padding: 24px 22px 22px;
  border-radius: 24px;
  border: 1px solid var(--portal-border);
  background: #fff;
  box-shadow: var(--portal-shadow);
}

.portal-table-tools {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  margin-bottom: 18px;
}

.portal-table-title {
  margin: 0;
  font-size: 1.32rem;
  font-weight: 700;
}

.portal-table-meta {
  color: #7a8eac;
  font-size: 0.9rem;
}

.portal-table-shell .datatable-top,
.portal-table-shell .dataTable-top {
  margin-bottom: 10px;
}

.portal-table-shell .datatable-top,
.portal-table-shell .dataTable-top,
.portal-table-shell .datatable-bottom,
.portal-table-shell .dataTable-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}

.portal-table-shell .datatable-dropdown,
.portal-table-shell .dataTable-dropdown,
.portal-table-shell .datatable-search,
.portal-table-shell .dataTable-search {
  margin: 0;
}

.portal-table-shell .datatable-input,
.portal-table-shell .dataTable-input {
  min-width: 240px;
}

.portal-workflow-table thead th.metric-header-neutral {
  background: #f3f6fb;
}

.portal-workflow-table thead th.metric-header-warning {
  background: #fff6da;
}

.portal-workflow-table thead th.metric-header-success {
  background: #e5f8ef;
}

.portal-workflow-table thead th.metric-header-danger {
  background: #ffe8ee;
}

.portal-workflow-table tbody tr:nth-child(odd) {
  background: #f8fafc;
}

.portal-workflow-table tbody tr:nth-child(even) {
  background: #ffffff;
}

.portal-workflow-table tbody tr:hover {
  background: #fff7ef;
}

.portal-workflow-table .workflow-color-cell {
  width: 72px;
}

.portal-workflow-table .workflow-color-pill {
  width: 52px;
  height: 18px;
  border-radius: 999px;
  display: inline-block;
  box-shadow: inset 0 0 0 1px rgba(16, 33, 61, 0.08);
}

.portal-workflow-table .workflow-name a {
  color: #2563eb;
  font-weight: 600;
}

.portal-workflow-table .workflow-name a:hover {
  color: var(--portal-accent);
}

.portal-table-stamp {
  margin-top: 14px;
}

.portal-table-shell .datatable-pagination a,
.portal-table-shell .dataTable-pagination a {
  border-radius: 10px;
}

.portal-health-header {
  margin-bottom: 22px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}

.portal-health-header h3 {
  margin: 0;
  font-size: 1.9rem;
  font-weight: 700;
}

.portal-health-header p {
  margin: 6px 0 0;
  color: var(--portal-muted);
}

.portal-health-live {
  padding: 10px 16px;
  border-radius: 14px;
  border: 1px solid #d6f5e7;
  background: #effcf5;
  color: #11875d;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: "Poppins", sans-serif;
  font-size: 0.9rem;
  font-weight: 600;
}

.portal-health-live-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #10b981;
  box-shadow: 0 0 0 6px rgba(16, 185, 129, 0.12);
}

.portal-health-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(340px, 1fr));
  gap: 18px;
}

.portal-health-card {
  padding: 22px;
  border-radius: 24px;
  border: 1px solid #edf2f8;
  background: #fff;
  box-shadow: var(--portal-shadow-soft);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.portal-health-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 16px 32px rgba(16, 33, 61, 0.09);
}

.portal-health-card-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 18px;
}

.portal-health-card-copy {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  min-width: 0;
}

.portal-health-color {
  width: 10px;
  min-width: 10px;
  height: 46px;
  border-radius: 999px;
  margin-top: 2px;
}

.portal-health-card-copy h4 {
  margin: 0;
  font-size: 1rem;
  font-weight: 700;
}

.portal-health-card-copy h4 a {
  color: #172b49;
}

.portal-health-card-copy h4 a:hover {
  color: #2563eb;
}

.portal-health-card-copy p {
  margin: 4px 0 0;
  color: #97a8c0;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.portal-health-state {
  font-size: 2.3rem;
}

.portal-health-state.success {
  color: #10b981;
}

.portal-health-state.warning {
  color: #f59e0b;
}

.portal-health-state.danger {
  color: #b4233d;
}

.portal-health-state.secondary {
  color: #506887;
}

.portal-health-metric-line {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 10px;
  font-size: 0.82rem;
}

.portal-health-metric-line span {
  color: var(--portal-muted);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.portal-health-metric-line strong {
  font-size: 1rem;
  color: #172b49;
}

.portal-health-progress {
  height: 8px;
  margin-bottom: 16px;
  border-radius: 999px;
  background: #eef3f9;
  overflow: hidden;
  display: flex;
}

.portal-health-progress.slim {
  height: 6px;
}

.portal-health-progress span {
  display: block;
  height: 100%;
}

.portal-health-progress .success {
  background: #10b981;
}

.portal-health-progress .danger {
  background: #ff4d6d;
}

.portal-health-progress .info {
  background: #3b82f6;
}

.portal-health-progress .neutral {
  background: #94a3b8;
}

.portal-health-stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(72px, 1fr));
  gap: 10px;
}

.portal-health-stats div {
  text-align: center;
  min-width: 0;
}

.portal-health-stats small {
  display: block;
  width: 100%;
  max-width: 100%;
  margin-bottom: 4px;
  color: #a0aec0;
  font-size: 0.62rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  line-height: 1.25;
  white-space: normal;
  overflow-wrap: anywhere;
  word-break: break-all;
  text-wrap: balance;
}

.portal-health-stats strong {
  font-size: 1rem;
  color: #172b49;
}

.portal-health-divider {
  height: 1px;
  margin: 18px 0;
  background: #edf2f8;
}

.portal-muted-note {
  color: var(--portal-muted);
  font-size: 0.88rem;
}

.modal {
  backdrop-filter: blur(4px);
  padding-right: 0 !important;
}

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

.modal-dialog {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  margin: 0 0 0 auto;
  width: min(720px, calc(100vw - 16px));
  max-width: min(720px, calc(100vw - 16px));
  height: 100vh;
  transform: translateX(100%);
  transition: transform 0.28s ease !important;
  display: flex;
  align-items: stretch;
}

.modal-dialog.modal-xl {
  width: min(1120px, calc(100vw - 16px));
  max-width: min(1120px, calc(100vw - 16px));
}

.modal.fade .modal-dialog {
  transform: translateX(100%);
}

.modal.fade.show .modal-dialog,
.modal.show .modal-dialog {
  transform: translateX(0);
}

.modal-content {
  height: 100%;
  overflow: hidden;
  border-radius: 28px 0 0 28px;
}

.modal-header,
.modal-body,
.modal-footer {
  background: #fff;
}

.modal-header {
  padding: 22px 28px;
  border-bottom: 1px solid var(--portal-border);
}

.modal-body {
  padding: 24px 28px;
  overflow-y: auto;
}

.modal-footer {
  padding: 18px 28px 24px;
  border-top: 1px solid var(--portal-border);
  gap: 12px;
}

.modal .card,
.modal .card-body,
.modal .table-responsive {
  border: 0;
  box-shadow: none;
  background: transparent;
}

.modal .card-body {
  padding: 0;
}

.table-editable {
  border: 1px solid var(--portal-border);
  border-radius: 20px;
  background: #fff;
  overflow: hidden;
}

.table-editable table {
  margin-bottom: 0;
}

.table-editable .btn {
  min-height: 38px;
  padding-inline: 14px;
}

.activity .activity-item {
  padding: 12px 0;
  border-bottom: 1px solid #edf2f8;
}

.activity .activity-item:last-child {
  border-bottom: 0;
}

.activity-badge {
  margin-top: 4px;
  margin-right: 12px;
}

.portal-page-shell {
  padding: 26px 28px;
  border-radius: 24px;
  border: 1px solid var(--portal-border);
  background: rgba(255, 255, 255, 0.96);
  box-shadow: var(--portal-shadow-soft);
}

.portal-modern-ready .recent-sales,
.portal-modern-ready .top-selling,
.portal-modern-ready .sales-card,
.portal-modern-ready .revenue-card,
.portal-modern-ready .customers-card,
.portal-modern-ready .activity,
.portal-modern-ready .overview,
.portal-modern-ready .budget-card {
  border-radius: 24px;
}

.portal-modern-ready .card .row:last-child {
  margin-bottom: 0;
}

.portal-modern-ready .datatable-wrapper,
.portal-modern-ready .dataTable-wrapper {
  padding: 0;
}

.portal-modern-ready .datatable-top,
.portal-modern-ready .dataTable-top,
.portal-modern-ready .datatable-bottom,
.portal-modern-ready .dataTable-bottom {
  padding: 0 0 14px;
}

.portal-modern-ready .nav-tabs-bordered {
  gap: 10px;
  padding: 8px;
  display: inline-flex;
  flex-wrap: wrap;
  border: 0;
  border-radius: 18px;
  background: #f2f5fa;
}

.portal-modern-ready .nav-tabs-bordered .nav-link {
  min-height: 44px;
  padding: 0 18px;
  border: 0;
  border-radius: 14px;
  color: #617899;
  font-family: "Poppins", sans-serif;
  font-weight: 600;
}

.portal-modern-ready .nav-tabs-bordered .nav-link.active {
  color: #10213d;
  background: #fff;
  box-shadow: var(--portal-shadow-soft);
}

.portal-modern-ready .profile .profile-card img,
.portal-modern-ready .portal-avatar img {
  background: #fff;
  box-shadow: 0 8px 24px rgba(16, 33, 61, 0.12);
}

.portal-modern-ready .modal-dialog-scrollable .modal-content {
  max-height: 100vh;
}

.portal-modern-ready .btn-link {
  color: #2563eb;
}

.portal-modern-ready .table > :not(caption) > * > * {
  background: transparent;
}

.portal-modern-ready .table-responsive {
  padding: 0;
}

.portal-modern-ready .breadcrumb {
  gap: 2px;
}

.portal-modern-ready .accordion-button:not(.collapsed) {
  color: var(--portal-accent);
  background: var(--portal-accent-soft);
}

.portal-modern-ready .list-group-item {
  border-color: #edf2f8;
}

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

.portal-form-section-title {
  margin-bottom: 18px;
  font-size: 1.18rem;
  font-weight: 700;
}

.portal-form-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 12px;
  flex-wrap: wrap;
}

.portal-radio-group {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.portal-radio-option {
  display: flex;
  align-items: center;
  gap: 8px;
}

.portal-checklist {
  display: grid;
  gap: 12px;
}

.portal-check-item {
  padding: 14px 16px;
  border-radius: 16px;
  border: 1px solid var(--portal-border);
  background: #fbfcff;
}

.portal-check-item .form-check {
  margin: 0;
}

.portal-check-item .form-check-label {
  display: flex;
  align-items: center;
  gap: 10px;
}

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

@media (max-width: 1199px) {
  .header {
    inset-inline-start: 0;
    padding-inline: 18px;
  }

  .sidebar {
    transform: translateX(-100%);
  }

  .toggle-sidebar .sidebar {
    transform: translateX(0);
  }

  #main,
  #footer {
    margin-left: 24px;
  }
}

@media (max-width: 991px) {
  .header {
    height: auto;
    min-height: 86px;
    padding-block: 14px;
    flex-wrap: wrap;
  }

  #main {
    margin-top: 118px;
    margin-right: 14px;
    margin-left: 14px;
  }

  #footer {
    margin-left: 14px;
    margin-right: 14px;
  }

  .portal-search {
    width: 100%;
    order: 3;
  }

  .portal-user-copy {
    display: none;
  }

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

  .portal-grid-2 {
    grid-template-columns: 1fr;
  }

  .portal-health-stats {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 767px) {
  .portal-stat-grid,
  .portal-mini-grid {
    grid-template-columns: 1fr;
  }

  .portal-footer-card,
  .portal-filterbar-row,
  .portal-toolbar-row {
    flex-direction: column;
    align-items: flex-start;
  }

  .portal-profile-trigger {
    padding-left: 0;
    border-left: 0;
  }

  .portal-health-header,
  .portal-tabbar {
    width: 100%;
  }

  .portal-tabbar {
    flex-wrap: wrap;
  }
}
