/* Autom8CX Accounts — flat, simple UI (no gradients / busy accents) */

/*
 * Inspinia sets body { background: #2f4050 }. With position:absolute sidebar, any gap
 * beside/below the menu reveals that dark strip when scrolling. Match app chrome.
 */
body {
  background-color: #f3f3f4 !important;
}

#wrapper {
  background-color: #f3f3f4;
}

/* Sidebar logo — tight to top, aligned with menu links (same left inset as .nav-label) */
.sidebar-brand-expanded {
  margin: 0 0 10px;
  padding: 0;
  text-align: left;
}

.sidebar-brand-link {
  display: inline-block;
  line-height: 0;
  text-decoration: none;
}

.sidebar-brand-link:hover,
.sidebar-brand-link:focus {
  text-decoration: none;
}

.sidebar-brand-logo {
  display: block;
  max-height: 40px;
  width: auto;
  height: auto;
  margin: 0;
  object-fit: contain;
}

body.mini-navbar .sidebar-brand-expanded {
  display: none;
}

/* Collapsed: icon only, no frame */
.logo-element {
  padding: 6px 0 8px;
  text-align: center;
}

.sidebar-brand-link-mini {
  display: inline-block;
  line-height: 0;
}

.logo-element .sidebar-collapsed-favicon {
  width: 36px;
  height: 36px;
  object-fit: contain;
  display: block;
  margin: 0 auto;
  padding: 0;
  border: none;
  border-radius: 0;
  background: transparent;
  vertical-align: middle;
}

/* Initials avatar — flat solid only (no gradient) */
.user-avatar-initials {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background-color: #e8ecef !important;
  background-image: none !important;
  color: #333333;
  font-weight: 600;
  font-size: 17px;
  line-height: 52px;
  text-align: center;
  display: block;
  margin: 0 0 8px;
  letter-spacing: 0.02em;
  border: 1px solid #cdd4dc;
}

.profile-element.text-center {
  text-align: left !important;
}

.profile-element.text-center .dropdown-toggle {
  display: block;
}

#wrapper .nav-header .profile-element {
  background: transparent !important;
  background-image: none !important;
}

/* Top navbar — compact user menu (typical admin header height) */
.navbar-top-links li.navbar-top-user > a.dropdown-toggle {
  padding: 4px 10px !important;
  min-height: 0 !important;
  height: auto !important;
  display: inline-flex !important;
  align-items: center !important;
  flex-wrap: nowrap;
  max-width: 200px;
  color: #888c9e !important;
}

.navbar-top-links li.navbar-top-user > a.dropdown-toggle:hover,
.navbar-top-links li.navbar-top-user > a.dropdown-toggle:focus {
  color: #676a6c !important;
}

.navbar-top-user .user-avatar-initials--navbar {
  width: 28px;
  height: 28px;
  line-height: 28px;
  font-size: 11px;
  margin: 0 6px 0 0;
  flex-shrink: 0;
  border-width: 1px;
}

.navbar-top-user-name {
  font-weight: 600;
  font-size: 12px;
  line-height: 1.2;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 9rem;
}

.navbar-top-user-chevron {
  font-size: 12px;
  margin-left: 4px;
  flex-shrink: 0;
  opacity: 0.7;
}

.navbar-top-links .navbar-top-user .dropdown-menu-sm {
  min-width: 11rem;
}

.navbar-account-menu {
  min-width: 220px;
}

/* Account dropdown — same weight/size as header (role header vs menu items) */
.navbar-account-menu .navbar-account-menu-header {
  font-size: 11px;
  font-weight: 600;
  color: #676a6c !important;
  padding: 6px 16px 4px;
  display: block;
  text-transform: none;
  letter-spacing: 0.02em;
}

.navbar-account-menu .navbar-account-menu-item {
  font-size: 12px !important;
  font-weight: 500 !important;
  padding: 6px 16px !important;
  line-height: 1.35 !important;
}

.navbar-account-menu .navbar-account-menu-item i.fa-fw {
  width: 1.1em;
  margin-right: 6px;
  opacity: 0.85;
}

.navbar-account-menu .dropdown-divider {
  margin: 4px 0;
}

/* Full-page loader — flat overlay, neutral spinner */
.model-loader#loaders {
  position: fixed;
  inset: 0;
  z-index: 999999;
  background: rgba(255, 255, 255, 0.85);
  overflow: hidden;
}

.model-loader#loaders .model-wrps {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
}

.model-loader#loaders .model-wrp-loader {
  display: flex;
  align-items: center;
  justify-content: center;
}

.model-loader#loaders .accounts-loader-panel.m-blockui {
  background: transparent !important;
  box-shadow: none !important;
  border-radius: 0 !important;
  display: flex !important;
  width: auto !important;
  margin: 0 !important;
  padding: 0 !important;
}

.model-loader#loaders .accounts-loader-spinner-wrap {
  display: flex !important;
  align-items: center;
  justify-content: center;
  padding: 0 !important;
}

.model-loader#loaders .m-loader {
  position: relative;
  width: 3rem;
  height: 3rem;
  display: inline-block;
}

.model-loader#loaders .m-loader:before {
  content: "";
  box-sizing: border-box;
  position: absolute;
  top: 50%;
  left: 50%;
  width: 2.25rem;
  height: 2.25rem;
  margin-top: -1.125rem;
  margin-left: -1.125rem;
  border-radius: 50%;
  border: 3px solid #dddddd;
  border-top-color: #666666;
  animation: accounts-loader-spin 0.65s linear infinite;
}

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

/* White sidebar — gray hover/active only */
/* Fill whole column (fixes dark strip below menu / slimScroll gap) */
#wrapper nav.navbar-default.navbar-static-side,
#wrapper .navbar-static-side .sidebar-collapse,
#wrapper .navbar-static-side .sidebar-collapse .slimScrollDiv,
#wrapper .navbar-static-side #side-menu {
  background-color: #ffffff !important;
}

#wrapper nav.navbar-default.navbar-static-side {
  border-right: 1px solid #e7eaec !important;
  /* Full viewport column so body dark never shows beside menu when scrolling */
  min-height: 100vh !important;
  height: auto;
  box-sizing: border-box;
}

@media (min-width: 768px) {
  #wrapper > nav.navbar-default.navbar-static-side {
    min-height: 100vh !important;
  }
}

#wrapper .navbar-static-side .sidebar-collapse .slimScrollBar {
  background-color: rgba(0, 0, 0, 0.15) !important;
}

#wrapper .navbar-static-side .sidebar-collapse .slimScrollRail {
  background-color: rgba(0, 0, 0, 0.04) !important;
}

#wrapper .navbar-default {
  border-color: #e7eaec !important;
}

#wrapper .navbar-static-side .nav-header {
  background-color: #ffffff !important;
  background-image: none !important;
  border-bottom: 1px solid #e7eaec;
  /* Replace theme 33px/25px padding — logo hug top + align with menu rows */
  padding: 10px 18px 12px 25px !important;
}

body.mini-navbar #wrapper .navbar-static-side .nav-header {
  background-color: #ffffff !important;
  padding: 8px 4px 10px !important;
}

#wrapper .navbar-static-side .nav > li > a {
  color: #333333 !important;
}

#wrapper .navbar-default .nav > li > a:hover,
#wrapper .navbar-default .nav > li > a:focus {
  background-color: #f0f0f0 !important;
  color: #111111 !important;
}

#wrapper .navbar-static-side ul.nav-second-level {
  background-color: #f8f8f9 !important;
}

#wrapper .navbar-static-side ul.nav-second-level > li > a {
  color: #444444 !important;
}

#wrapper .navbar-static-side ul.nav-second-level > li > a:hover,
#wrapper .navbar-static-side ul.nav-second-level > li > a:focus {
  background-color: #ececec !important;
  color: #111111 !important;
}

#wrapper .navbar-static-side .nav > li.active {
  border-left: 3px solid #666666 !important;
  background: #ebebeb !important;
}

#wrapper .navbar-static-side .nav.nav-second-level > li.active {
  background: #e8e8e8 !important;
}

#wrapper .navbar-static-side .nav > li.active > a {
  color: #111111 !important;
}

/* Top-level menu rows (not header): no inherited dark fill */
#wrapper .navbar-static-side .nav.metismenu > li:not(.nav-header):not(.active) {
  background-color: transparent !important;
}

#wrapper .nav-header a {
  color: #333333 !important;
}

#wrapper .nav-header .text-muted {
  color: #777777 !important;
}

#wrapper .navbar-static-side .nav > li > a .fa {
  color: #555555;
}

#wrapper .navbar-static-side .nav > li.active > a .fa {
  color: #333333;
}

#wrapper .navbar-static-side .nav > li > a .fa.arrow:before {
  color: #888888;
}

body.mini-navbar #wrapper .nav .nav-second-level {
  background-color: #ffffff !important;
  border: 1px solid #e7eaec !important;
  box-shadow: 1px 2px 6px rgba(0, 0, 0, 0.06);
}

body.canvas-menu.mini-navbar #wrapper .nav-second-level {
  background-color: #f8f8f9 !important;
}

/* Theme defaults canvas sidebar to #2f4050 */
body.canvas-menu #wrapper nav.navbar-static-side {
  background-color: #ffffff !important;
}

/* Users — actions beside breadcrumb (page heading) */
.users-grid-page-heading .users-heading-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  align-items: center;
  gap: 8px;
  padding-top: 28px;
}

@media (max-width: 991px) {
  .users-grid-page-heading .users-heading-actions {
    justify-content: flex-start;
    padding-top: 12px;
    padding-bottom: 8px;
  }
}

/* Users server grid (Zoho-style toolbar + footer) */
.ibox.users-grid-ibox > .ibox-title.users-grid-toolbar {
  padding-right: 15px;
}

.users-grid-toolbar {
  padding-top: 14px;
  padding-bottom: 14px;
}

.users-grid-toolbar-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-start;
  gap: 12px 16px;
  width: 100%;
}

.users-grid-toolbar-left {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
}

/* Search grows into free space; Download / Delete / Add stay on the far right */
.users-grid-toolbar-cluster {
  flex: 1 1 280px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.users-grid-toolbar-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  flex: 0 0 auto;
}

/* Compact search flush right — fills remaining toolbar width so no dead space left of input */
.users-grid-toolbar-cluster-search-only {
  flex: 1 1 auto;
  min-width: 0;
  display: flex;
  justify-content: flex-end;
  align-items: center;
}

.users-grid-search-wrap {
  display: inline-flex;
  align-items: stretch;
  gap: 8px;
  flex: 0 0 auto;
  width: auto;
  max-width: min(320px, 100%);
}

.users-grid-search-wrap .users-grid-search {
  flex: 0 0 auto;
  width: 240px;
  max-width: 100%;
  min-width: 0;
}

.users-grid-search-btn {
  flex-shrink: 0;
  width: 31px;
  min-width: 31px;
  padding-left: 0;
  padding-right: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.users-grid-search-btn .fa {
  margin: 0;
  font-size: 14px;
}

.users-grid-search {
  max-width: 100%;
}

@media (max-width: 575px) {
  .users-grid-search-wrap {
    max-width: 100%;
  }

  .users-grid-search-wrap .users-grid-search {
    width: min(240px, calc(100vw - 140px));
  }
}

.users-grid-select-length {
  width: 72px !important;
  margin: 0 6px;
}

.users-grid-footer {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 12px;
  padding-top: 10px;
  border-top: 1px solid #e7eaec;
}

.users-grid-pagination-wrap .pagination {
  flex-wrap: wrap;
}

/* Zoho-style grid reload: overlay + spinner on table area */
.users-grid-table-shell {
  min-height: 140px;
}

.users-grid-body-loading {
  position: absolute;
  inset: 0;
  z-index: 6;
  pointer-events: none;
}

.users-grid-body-loading:not(.d-none) {
  pointer-events: auto;
}

.users-grid-body-loading-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(255, 255, 255, 0.82);
  backdrop-filter: blur(1px);
}

.users-grid-body-loading-center {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}

.users-grid-zoho-spinner {
  box-sizing: border-box;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  border: 3px solid #e6eaee;
  border-top-color: #1ab394;
  animation: users-grid-zoho-spin 0.7s linear infinite;
}

@keyframes users-grid-zoho-spin {
  to {
    transform: rotate(360deg);
  }
}

/* Scroll horizontally on small screens instead of squashing / wrapping cells */
.users-grid-table-wrap.table-responsive {
  display: block;
  width: 100%;
  max-width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior-x: contain;
}

/* Auto column widths from content; table at least full width of container */
.users-server-table {
  table-layout: auto;
  width: max-content;
  min-width: 100%;
  margin-bottom: 0;
}

/* Every cell stays on one line */
.users-server-table thead th,
.users-server-table tbody td {
  white-space: nowrap;
  vertical-align: middle;
}

/* Name / email cap — avoid huge empty columns; long values still ellipsis */
.users-server-table thead th:nth-child(2),
.users-server-table tbody td:nth-child(2) {
  max-width: 220px;
}

.users-server-table thead th:nth-child(3),
.users-server-table tbody td:nth-child(3) {
  max-width: 260px;
}

.users-server-table thead th:nth-child(4),
.users-server-table tbody td:nth-child(4) {
  max-width: 96px;
}

/* Datetimes show full value on one line */
.users-server-table thead th:nth-child(5),
.users-server-table thead th:nth-child(6),
.users-server-table tbody td:nth-child(5),
.users-server-table tbody td:nth-child(6) {
  min-width: 158px;
}

.users-server-table tbody td.users-cell-single-line {
  overflow: hidden;
  text-overflow: ellipsis;
}

.users-server-table tbody td.users-cell-datetime {
  overflow: visible;
  text-overflow: clip;
}

.users-server-table td.users-table-placeholder-cell {
  white-space: normal;
  overflow: visible;
  text-overflow: clip;
}

.users-server-table .users-col-actions-th,
.users-server-table .users-col-actions-td {
  overflow: visible;
  text-overflow: clip;
  min-width: 136px;
}

.users-server-table td.users-col-check,
.users-server-table th.users-col-check {
  overflow: visible;
}

/* Sortable headers — caret pair + active column */
.users-server-table thead th.users-sort-th {
  padding-left: 10px;
  padding-right: 10px;
}

.users-server-table .users-sort {
  border: none !important;
  background: transparent !important;
  box-shadow: none !important;
  font-weight: 600;
  color: #555555;
  cursor: pointer;
  padding: 4px 2px !important;
  max-width: 100%;
  text-align: left;
  display: inline-flex;
  align-items: center;
  vertical-align: middle;
  white-space: nowrap;
}

.users-server-table .users-sort:hover,
.users-server-table .users-sort:focus {
  color: #1ab394;
  text-decoration: none;
}

.users-server-table .users-sort-inner {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  max-width: 100%;
  min-width: 0;
}

.users-server-table .users-sort-label {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.users-server-table .users-sort-icons {
  display: inline-flex;
  flex-direction: column;
  justify-content: center;
  line-height: 0.45;
  flex-shrink: 0;
}

.users-server-table .users-sort-icon {
  font-size: 13px;
  color: #b8c0c8;
  line-height: 1;
}

.users-server-table thead th.users-sort-th.users-sort-active {
  background-color: #e8f7f3;
  box-shadow: inset 0 -3px 0 #1ab394;
}

.users-server-table thead th.users-sort-th.users-sort-active .users-sort {
  color: #0d6b58;
  font-weight: 700;
}

.users-server-table thead th.users-sort-th.users-sort-asc .users-sort-up {
  color: #1ab394;
  font-weight: bold;
}

.users-server-table thead th.users-sort-th.users-sort-asc .users-sort-down {
  color: #dce2e8;
}

.users-server-table thead th.users-sort-th.users-sort-desc .users-sort-down {
  color: #1ab394;
  font-weight: bold;
}

.users-server-table thead th.users-sort-th.users-sort-desc .users-sort-up {
  color: #dce2e8;
}

/* Checkbox column — header + rows aligned */
.users-server-table th.users-col-check,
.users-server-table td.users-col-check {
  width: 48px;
  min-width: 48px;
  max-width: 48px;
  text-align: center;
  vertical-align: middle !important;
  padding: 10px 6px !important;
  box-sizing: border-box;
}

.users-server-table .users-check-cell-inner {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: 22px;
}

.users-server-table .users-check-all-input,
.users-server-table .users-row-check {
  margin: 0;
  flex-shrink: 0;
  width: 16px;
  height: 16px;
  cursor: pointer;
  vertical-align: middle;
}

.users-server-table .users-row-check:disabled {
  cursor: not-allowed;
  opacity: 0.45;
}

#wrapper .navbar-static-side .nav > li > a .fa-solid {
  color: #555555;
}

#wrapper .navbar-static-side .nav > li.active > a .fa-solid {
  color: #333333;
}
