html {
  scroll-behavior: smooth;
}

body {
  font-family: "Open Sans", sans-serif;
}

.sidenav .nav-link {
  color: #344767 !important;
  border-radius: 0.75rem;
  transition: background-color 0.2s ease, color 0.2s ease;
}

.sidenav .nav-link.active,
.sidenav .nav-link:hover,
.sidenav .nav-link:focus-visible {
  background: #ffffff !important;
  background-image: none !important;
  box-shadow: inset 0 0 0 1px rgba(52, 71, 103, 0.08);
  color: #344767 !important;
}

.sidenav .nav-link.active .icon,
.sidenav .nav-link:focus .icon,
.sidenav .nav-link:hover .icon {
  background-color: rgba(52, 71, 103, 0.06);
  color: inherit;
}

.sidenav .nav-link.active .nav-link-text,
.sidenav .nav-link:focus .nav-link-text,
.sidenav .nav-link:hover .nav-link-text {
  color: inherit;
}

.table-text-wrapper {
  display: flex;
  align-items: flex-start;
  gap: 0.5rem;
  max-width: 100%;
}

.table-text-wrapper .table-text {
  flex: 1 1 auto;
  min-width: 0;
  display: block;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.table-text-wrapper .table-text.table-text--expanded {
  white-space: normal;
}

.table-text-toggle {
  flex: 0 0 auto;
  font-size: 0.75rem;
  font-weight: 600;
  color: #1a73e8;
  background: transparent;
  border: none;
  padding: 0;
  cursor: pointer;
}

.table-text-toggle:hover,
.table-text-toggle:focus {
  color: #0b5ed7;
  text-decoration: underline;
}

.activity-table-message {
  width: 320px;
  max-width: 320px;
}

.main-content section {
  scroll-margin-top: 96px;
}

body.login-page {
  background: radial-gradient(circle at top, rgba(20, 184, 166, 0.15), transparent 45%), radial-gradient(circle at right, rgba(52, 71, 103, 0.12), transparent 35%), #f3f6fa;
  padding: 1.5rem;
}

.login-card {
  max-width: 960px;
  width: 100%;
  border: none;
  border-radius: 2rem;
  background: #fff;
  box-shadow: 0 30px 70px -30px rgba(15, 23, 42, 0.55);
}

.login-hero {
  padding: 3rem;
  background: linear-gradient(135deg, #2fb178, #18a2ae);
  color: #fff;
  min-height: 100%;
  position: relative;
  overflow: hidden;
}

.login-hero::after {
  content: "";
  position: absolute;
  inset: 1.5rem;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 1.5rem;
  pointer-events: none;
}

.login-hero > * {
  position: relative;
  z-index: 1;
}

.login-form .form-label {
  color: #344767;
}

.form-control-modern,
.form-select-modern,
.input-group-modern .form-control {
  border: 1px solid rgba(52, 71, 103, 0.15);
  border-radius: 12px;
  background-color: rgba(243, 248, 250, 0.8);
  padding: 0.75rem 1rem;
  transition: all 0.2s ease;
}

.form-control-modern:focus,
.form-select-modern:focus,
.input-group-modern .form-control:focus {
  box-shadow: 0 0 0 1px rgba(94, 114, 228, 0.4);
  border-color: rgba(94, 114, 228, 0.6);
  background-color: #fff;
}

.input-group-modern .btn {
  border-radius: 0 12px 12px 0;
  border-color: rgba(52, 71, 103, 0.15);
}

.input-icon-group {
  position: relative;
}

.input-icon-group .input-icon {
  position: absolute;
  left: 1rem;
  top: 50%;
  transform: translateY(-50%);
  color: rgba(52, 71, 103, 0.5);
  font-size: 0.95rem;
}

.input-icon-group input {
  padding-left: 2.65rem;
}

.input-icon-group.has-button input {
  padding-right: 3.25rem;
}

.toggle-password-btn {
  position: absolute;
  right: 0.65rem;
  top: 50%;
  transform: translateY(-50%);
  border: none;
  background: rgba(243, 248, 250, 0.9);
  width: 40px;
  height: 40px;
  border-radius: 12px;
  color: #3a416f;
  transition: background-color 0.2s ease, color 0.2s ease, box-shadow 0.2s ease;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.toggle-password-btn:hover,
.toggle-password-btn:focus {
  background: #ffffff;
  color: #18a2ae;
  box-shadow: 0 0 0 2px rgba(24, 162, 174, 0.15);
}

.forgot-link {
  color: #18a2ae;
  font-weight: 600;
}

.forgot-link:hover {
  text-decoration: underline;
  color: #118c99;
}

.btn-success {
  background: linear-gradient(135deg, #43a047, #1abc9c);
  border: none;
  font-weight: 600;
  letter-spacing: 0.3px;
}

.login-meta {
  border-top: 1px solid rgba(52, 71, 103, 0.08);
  padding-top: 1.25rem;
}

@media (max-width: 575px) {
  body.login-page {
    padding: 1rem 0.5rem;
  }
  .login-hero {
    padding: 2rem;
    border-radius: 2rem 2rem 0 0;
  }
  .toggle-password-btn {
    right: 0.5rem;
  }
}

.btn-success:hover {
  background: linear-gradient(135deg, #3b8d3d, #13a38b);
}

.alert {
  border-radius: 12px;
}

.avatar {
  display: inline-flex;
  justify-content: center;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  font-weight: 600;
}

.top-bar-actions .text-xs {
  font-size: 0.75rem;
}

.info-card {
  border: none;
  color: #fff;
  min-height: 154px;
  box-shadow: 0 15px 35px -12px rgba(0, 0, 0, 0.25);
}

.info-card .card-body {
  color: #fff;
}

.icon.icon-shape {
  width: 48px;
  height: 48px;
}

.gradient-orange {
  background: linear-gradient(135deg, #ffa726, #fb8c00);
}

.gradient-green {
  background: linear-gradient(135deg, #66bb6a, #43a047);
}

.gradient-blue {
  background: linear-gradient(135deg, #5c6bc0, #3949ab);
}

.gradient-cyan {
  background: linear-gradient(135deg, #26c6da, #00acc1);
}

.text-orange { color: #fb8c00 !important; }
.text-green { color: #43a047 !important; }

#records-table tbody tr td,
#users-table tbody tr td {
  white-space: nowrap;
}

.badge-status {
  padding: 0.35rem 0.65rem;
  border-radius: 0.5rem;
  font-size: 0.75rem;
  font-weight: 600;
}

.badge-status.active { background: rgba(76, 175, 80, 0.12); color: #2e7d32; }
.badge-status.inactive { background: rgba(244, 67, 54, 0.12); color: #c62828; }

#status-list li {
  display: flex;
  align-items: center;
  justify-content: center;
  justify-content: space-between;
  border: none;
  padding-left: 0;
}

.status-pill {
  padding: 0.25rem 0.75rem;
  border-radius: 999px;
  font-size: 0.75rem;
}

.status-pill.ok { background: rgba(76, 175, 80, 0.12); color: #2e7d32; }
.status-pill.warn { background: rgba(255, 193, 7, 0.18); color: #ef6c00; }
.status-pill.err { background: rgba(244, 67, 54, 0.15); color: #c62828; }

.table thead th {
  border-bottom: 1px solid #e9ecef;
  font-size: 0.75rem;
  letter-spacing: 0.4px;
}

.table tbody tr:hover {
  background-color: rgba(94, 114, 228, 0.08);
}

.card h6 {
  font-weight: 600;
}

#records-empty,
#users-empty {
  transition: opacity 0.2s ease;
}

.sidebar-collapsed #sidenav-main {
  transform: translateX(-110%);
}

.sidebar-collapsed .main-content {
  margin-left: 0 !important;
}

@media (max-width: 1199px) {
  #sidenav-main {
    transform: translateX(-110%);
    transition: transform 0.3s ease;
  }

  .sidenav.show {
    transform: translateX(0);
  }
}
.info-card {
  border: none;
  color: #fff;
  min-height: 154px;
  box-shadow: 0 15px 35px -12px rgba(0, 0, 0, 0.25);
  position: relative;
  overflow: hidden;
}

.info-card .card-body {
  color: #fff;
}

.icon-holder {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  justify-content: center;
  width: 46px;
  height: 46px;
  border-radius: 50%;
  background-color: rgba(255, 255, 255, 0.15);
  backdrop-filter: blur(2px);
  font-size: 1.1rem;
}

.list-slim .list-group-item {
  padding: 0.85rem 0;
  border: none;
}

.list-slim .list-group-item + .list-group-item {
  border-top: 1px solid rgba(52, 71, 103, 0.08);
}

.list-slim .list-group-item .badge {
  font-size: 0.7rem;
  border-radius: 999px;
}

.profile-summary dt {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.4px;
  color: rgba(52, 71, 103, 0.65);
}

.profile-summary dd {
  font-weight: 600;
  color: #344767;
}

#team-list .list-group-item {
  border: none;
  padding-left: 0;
  padding-right: 0;
}

#team-list .list-group-item + .list-group-item {
  border-top: 1px solid rgba(52, 71, 103, 0.08);
}

#team-list .contact-actions {
  font-size: 0.85rem;
  color: #67748e;
}

.support-actions .btn {
  font-weight: 600;
  letter-spacing: 0.2px;
}

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

#support-tickets .badge {
  font-size: 0.7rem;
  border-radius: 999px;
}

.top-bar-actions .badge {
  font-size: 0.7rem;
  font-weight: 600;
}

@media (max-width: 991px) {
  .top-bar-actions {
    align-items: flex-end;
  }
}
.table-actions button {
  padding: 0.25rem 0.35rem;
}

.table-actions button i {
  pointer-events: none;
}

.table-actions button + button {
  margin-left: 0.35rem;
}

#admin-feedback {
  font-weight: 600;
}

#admin-records-table tbody tr:hover,
#admin-users-table tbody tr:hover {
  background-color: rgba(94, 114, 228, 0.08);
}

#admin-note.is-invalid {
  border-color: #f44336;
}
.status-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  border-radius: 999px;
  padding: 0.35rem 0.75rem;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.2px;
  text-transform: uppercase;
}

.status-pill i {
  font-size: 0.85rem;
}

.status-pill--loading {
  background: rgba(94, 114, 228, 0.18);
  color: #4558c9;
}

.status-pill--live {
  background: rgba(40, 167, 69, 0.18);
  color: #2e7d32;
}

.status-pill--demo {
  background: rgba(255, 193, 7, 0.2);
  color: #ab6800;
}

.status-pill--ghost {
  background: rgba(52, 71, 103, 0.08);
  color: #344767;
}

.status-pill--warning {
  background: rgba(220, 53, 69, 0.2);
  color: #b02a37;
}

#refresh-dashboard.is-loading i {
  animation: spin 1s linear infinite;
}

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

.icon-holder i {
  color: rgba(255, 255, 255, 0.95);
  font-size: 1.25rem;
}

.metric-status {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  padding: 0.2rem 0.75rem;
  border-radius: 999px;
  font-weight: 600;
  letter-spacing: 0.3px;
  background: rgba(255, 255, 255, 0.14);
  color: rgba(255, 255, 255, 0.9);
}

.metric-status--positive {
  background: rgba(76, 175, 80, 0.2);
  color: #e8f5e9;
}

.metric-status--warning {
  background: rgba(255, 193, 7, 0.22);
  color: #fff8e1;
}

.metric-status--empty {
  background: rgba(33, 48, 77, 0.28);
  color: rgba(255, 255, 255, 0.85);
}

.empty-state {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  color: rgba(52, 71, 103, 0.6) !important;
}

.empty-state i {
  font-size: 0.95rem;
}

.top-bar-actions #refresh-dashboard {
  min-width: 130px;
  justify-content: center;
}

.top-bar-actions #refresh-dashboard i {
  transition: transform 0.2s ease;
}

.top-bar-actions #refresh-dashboard:hover i {
  transform: rotate(-25deg);
}

.metric-status.metric-status--positive i,
.metric-status.metric-status--warning i {
  color: inherit;
}
.text-center .empty-state { justify-content: center; }

.profile-avatar-wrapper .avatar {
  width: 88px;
  height: 88px;
  font-size: 1.75rem;
}

.profile-meta p {
  font-size: 0.85rem;
  color: rgba(52, 71, 103, 0.75);
}

.profile-meta i {
  width: 18px;
  text-align: center;
}

#profile-form .form-control.is-invalid,
#password-form .form-control.is-invalid {
  border-color: #e63946;
}

#profile-form .form-control.is-invalid:focus,
#password-form .form-control.is-invalid:focus {
  box-shadow: 0 0 0 1px rgba(230, 57, 70, 0.2);
}

#password-status {
  font-size: 0.75rem;
  letter-spacing: 0.3px;
}

.avatar.avatar-xl {
  width: 72px;
  height: 72px;
  font-size: 1.5rem;
}

/* Navigation and control polish */
.sidenav .nav-link {
  border-radius: 0.85rem;
  margin: 0.25rem 0;
  color: #67748e;
  font-weight: 500;
  transition: all 0.2s ease;
  background: transparent;
}

.sidenav .nav-link .icon {
  background: transparent;
  transition: all 0.2s ease;
  color: #a0aec0;
}

.sidenav .nav-link:hover {
  background: rgba(103, 116, 142, 0.08);
}

.sidenav .nav-link:hover .icon {
  background: rgba(103, 116, 142, 0.16);
  color: #545d72;
}

.sidenav .nav-link.active .nav-link-text {
  font-weight: 700 !important;
}

.sidenav .nav-link:focus-visible {
  outline: 2px solid rgba(94, 114, 228, 0.45);
  outline-offset: 2px;
}

body.sidenav-open {
  overflow: hidden;
}

@media (max-width: 1199px) {
  body.sidenav-open::after {
    content: '';
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, 0.35);
    backdrop-filter: blur(2px);
    pointer-events: none;
    z-index: 998;
  }

  body.sidenav-open #adminProfileMenu {
    pointer-events: auto;
  }

  body.sidenav-open .sidenav {
    z-index: 999;
  }
}

.form-check-input {
  width: 1.2rem;
  height: 1.2rem;
  margin-top: 0;
  cursor: pointer;
  border: 1.5px solid rgba(52, 71, 103, 0.35);
  border-radius: 0.35rem;
  background-color: #fff;
  transition: all 0.2s ease;
}

.form-check-input:focus {
  box-shadow: 0 0 0 0.2rem rgba(94, 114, 228, 0.25);
}

.form-check-input:checked {
  border-color: #2dce89;
  background-color: #2dce89;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath fill='none' stroke='%23fff' stroke-width='2' stroke-linecap='round' stroke-linejoin='round' d='M4 8.5l2.5 2.5 5.5-5.5'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: center;
  background-size: 0.65rem;
}

.form-check-input:disabled {
  cursor: not-allowed;
  opacity: 0.6;
}

.table .form-check-input {
  float: none;
}

.form-switch .form-check-input {
  width: 2.6rem;
  height: 1.3rem;
  border: none;
  border-radius: 999px;
  background-color: rgba(52, 71, 103, 0.25);
  background-image: none;
  position: relative;
  transition: background-color 0.2s ease;
  appearance: none;
  -webkit-appearance: none;
}

.form-switch .form-check-input::before {
  content: '';
  position: absolute;
  top: 0.15rem;
  left: 0.15rem;
  width: 1rem;
  height: 1rem;
  border-radius: 50%;
  background-color: #fff;
  box-shadow: 0 2px 6px rgba(15, 23, 42, 0.3);
  transition: transform 0.2s ease;
}

.form-switch .form-check-input:checked {
  background-color: #2dce89;
}

.form-switch .form-check-input:checked::before {
  transform: translateX(1.25rem);
}

.superadmin-gate {
  background: linear-gradient(115deg, rgba(59, 130, 246, 0.12), rgba(255, 255, 255, 0.95));
  border-left: 4px solid #3b82f6;
}

.superadmin-gate .superadmin-icon {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: linear-gradient(135deg, #3b82f6, #2563eb);
  color: #fff;
  font-size: 1.4rem;
  box-shadow: 0 12px 24px -12px rgba(59, 130, 246, 0.8);
}

.permission-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.25rem 0.6rem;
  border-radius: 999px;
  background: rgba(94, 114, 228, 0.12);
  color: #344767;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.2px;
}

.permission-chip i {
  font-size: 0.75rem;
  color: inherit;
}

.permission-feature-card {
  border: 1px solid rgba(52, 71, 103, 0.12);
  border-radius: 0.85rem;
  padding: 0.9rem 1rem;
  background-color: rgba(248, 249, 255, 0.7);
  transition: border-color 0.2s ease, background-color 0.2s ease;
}

.permission-feature-card.active {
  border-color: #5e72e4;
  background-color: rgba(94, 114, 228, 0.12);
}

.permission-feature-card .form-check-label {
  font-weight: 600;
  color: #344767;
}

.permission-feature-card small {
  display: block;
  margin-top: 0.3rem;
  color: rgba(52, 71, 103, 0.65);
}
.profile-layout {
  max-width: 1200px;
}

.profile-summary-card {
  border: none;
  padding: 0.5rem 0.25rem 1.5rem;
}

.profile-form-card {
  border: none;
}

.profile-navbar .btn {
  min-width: 0;
}

.profile-container .card {
  border-radius: 1rem;
}

.profile-stat-card .card-body {
  padding: 1.25rem 1.5rem;
}

.profile-stat-icon {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 0.5rem;
  font-size: 1.15rem;
}

.profile-activity-list {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  margin: 0;
  padding: 0;
}

.profile-activity-entry {
  display: flex;
  gap: 1rem;
  align-items: flex-start;
}

.profile-activity-icon {
  width: 48px;
  height: 48px;
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
}

.profile-permission-item p {
  margin-bottom: 0.2rem;
}

.profile-permission-icon {
  width: 40px;
  height: 40px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.9rem;
}

.profile-permission-chip {
  display: inline-flex;
  align-items: center;
  padding: 0.25rem 0.85rem;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 600;
  background-color: rgba(94, 114, 228, 0.08);
  color: #25396f;
}

.bg-success-soft {
  background-color: rgba(76, 175, 80, 0.15);
  color: #2e7d32;
}

.profile-security-card .form-label {
  font-weight: 600;
}

@media (max-width: 991px) {
  .profile-navbar {
    margin-left: 1rem;
    margin-right: 1rem;
  }
  .profile-stat-card .card-body {
    text-align: center;
  }
  .profile-stat-icon {
    margin: 0 auto 0.5rem;
  }
}

.action-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
  gap: 0.75rem;
}

.action-toolbar__search {
  min-width: 240px;
  flex: 1 1 260px;
}

.action-toolbar .btn {
  min-width: 140px;
}

@media (max-width: 767px) {
  .action-toolbar__search {
    flex-basis: 100%;
  }
  .action-toolbar .btn {
    flex: 1 1 auto;
  }
}

.card-section-body {
  padding: 0 1.5rem 1.75rem;
}

.card-table-wrapper {
  margin-top: 1.25rem;
  background-color: #fff;
  border: 1px solid rgba(52, 71, 103, 0.08);
  border-radius: 1rem;
  padding: 1rem 1.25rem;
}

.card-table-wrapper .table {
  margin-bottom: 0;
}

.activity-center-body {
  padding-top: 1.5rem;
}

.activity-filter-grid .form-label {
  font-weight: 600;
  color: #344767;
}

.activity-filter-grid .form-check-label {
  font-weight: 500;
}

.activity-saved-searches {
  background: rgba(94, 114, 228, 0.06);
  border: 1px dashed rgba(94, 114, 228, 0.3);
  border-radius: 0.75rem;
  padding: 0.75rem 1rem;
}

.saved-search-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.25rem 0.75rem;
  border-radius: 999px;
  background: rgba(94, 114, 228, 0.16);
  color: #344767;
  font-size: 0.75rem;
  font-weight: 600;
}

.saved-search-chip button {
  border: none;
  background: transparent;
  padding: 0;
  font-size: 0.75rem;
  color: inherit;
}

.activity-level-badge {
  padding: 0.25rem 0.6rem;
  border-radius: 999px;
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.4px;
}

.activity-level-badge[data-severity="alta"] {
  background: rgba(220, 53, 69, 0.18);
  color: #b02a37;
}

.activity-level-badge[data-severity="media"] {
  background: rgba(255, 193, 7, 0.18);
  color: #b28704;
}

.activity-level-badge[data-severity="baja"] {
  background: rgba(40, 167, 69, 0.15);
  color: #2f855a;
}

.activity-table-message {
  max-width: 320px;
  white-space: normal;
}

.activity-actions button {
  padding: 0.25rem 0.35rem;
}


#adminProfileMenu {
  touch-action: manipulation;
  -webkit-user-select: none;
  user-select: none;
}

.sidenav .nav-link.active .nav-link-text {
  font-weight: 700;
}


