:root {
  --sphera-compact-space: 0.875rem;
}

.sphera-sidebar-logo {
  display: block;
  height: 2.9rem;
  max-width: 11.75rem;
  width: auto;
}

.sphera-sidebar {
  --tblr-navbar-bg: #f3f6fb;
  --tblr-navbar-border-color: #e3e8f1;
  --tblr-navbar-color: #586176;
  --tblr-navbar-active-color: #206bc4;
  --tblr-navbar-hover-color: #1d273b;
  background: linear-gradient(180deg, #f7f9fd 0%, #eef3fa 100%);
  border-right: 1px solid #e3e8f1;
  box-shadow: 10px 0 30px rgba(29, 39, 59, 0.04);
}

.sphera-sidebar .navbar-brand {
  margin: 0.7rem 0 1rem;
  padding-left: 0.35rem;
}

.sphera-sidebar .navbar-nav {
  gap: 0.125rem;
}

.sphera-sidebar .nav-link {
  border-radius: 0.45rem;
  color: #586176;
  font-weight: 600;
  margin: 0 0.45rem;
  padding: 0.6rem 0.75rem;
}

.sphera-sidebar .nav-link:hover {
  background-color: rgba(32, 107, 196, 0.07);
  color: #1d273b;
}

.sphera-sidebar .nav-item.active .nav-link {
  background-color: rgba(32, 107, 196, 0.12);
  color: #206bc4;
}

.sphera-sidebar .nav-link-icon {
  color: inherit;
  opacity: 0.85;
}

.sphera-sidebar .nav-link.dropdown-toggle::after {
  margin-left: auto;
}

.sphera-sidebar .dropdown-menu {
  background: transparent;
  border: 0;
  box-shadow: none;
  margin: 0.1rem 0.45rem 0.3rem;
  min-width: 0;
  padding: 0 0 0 2.45rem;
  position: static;
}

.sphera-sidebar .dropdown-item {
  border-radius: 0.35rem;
  color: #687187;
  font-size: 0.8125rem;
  line-height: 1.25;
  padding: 0.38rem 0.5rem;
  white-space: normal;
}

.sphera-sidebar .dropdown-item:hover {
  background-color: rgba(32, 107, 196, 0.07);
  color: #1d273b;
}

.sphera-sidebar .dropdown-item.active {
  background-color: transparent;
  color: #206bc4;
  font-weight: 700;
}

.sphera-sidebar .navbar-toggler {
  color: #586176;
}

.sphera-topbar-mark {
  height: 1.4rem;
  width: 1.4rem;
}

.sphera-avatar {
  background: transparent;
  overflow: hidden;
}

.sphera-avatar img {
  height: 100%;
  width: 100%;
}

.page-header {
  margin-bottom: 0.75rem;
}

.page-header .page-pretitle {
  margin-bottom: 0.125rem;
}

.page-header .page-title {
  line-height: 1.2;
}

.page-body {
  margin-top: 0.75rem;
  margin-bottom: 1rem;
}

.row-cards {
  --tblr-gutter-y: 0.875rem;
}

.card {
  --tblr-card-spacer-x: var(--sphera-compact-space);
  --tblr-card-spacer-y: var(--sphera-compact-space);
}

.card-header {
  min-height: 2.75rem;
  padding: 0.75rem var(--sphera-compact-space);
}

.card-title {
  line-height: 1.25;
}

.form-label {
  margin-bottom: 0.35rem;
}

.form-control,
.form-select {
  min-height: 2.25rem;
}

.btn {
  --tblr-btn-padding-y: 0.375rem;
}

.btn-list {
  gap: 0.375rem;
}

.table > :not(caption) > * > * {
  padding: 0.5rem 0.625rem;
}

.card-table > :not(caption) > * > :first-child {
  padding-left: var(--sphera-compact-space);
}

.card-table > :not(caption) > * > :last-child {
  padding-right: var(--sphera-compact-space);
}

.empty {
  padding: 1.5rem 1rem;
}

.form-check {
  min-height: 1.25rem;
}

.badge {
  line-height: 1.15;
}

.sphera-multiselect {
  width: 100%;
}

.sphera-multiselect-toggle {
  align-items: center;
  background-color: var(--tblr-bg-forms);
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  text-align: left;
  white-space: nowrap;
}

.sphera-multiselect-menu {
  max-height: 18rem;
  min-width: 100%;
  overflow-y: auto;
  padding: 0.5rem;
  width: max(100%, 19rem);
}

.sphera-multiselect-option {
  align-items: flex-start;
  border-radius: 0.25rem;
  display: flex;
  gap: 0.5rem;
  margin: 0;
  padding: 0.35rem 0.4rem;
}

.sphera-multiselect-option:hover {
  background-color: rgba(var(--tblr-primary-rgb), 0.06);
}

.sphera-multiselect-option .form-check-input {
  margin-left: 0;
  margin-top: 0.15rem;
}

.sphera-multiselect-option .form-check-label {
  align-items: center;
  display: flex;
  gap: 0.4rem;
  justify-content: space-between;
  min-width: 0;
  width: 100%;
}

.sphera-multiselect-label {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.sphera-multiselect-hint {
  color: var(--tblr-secondary);
  font-size: 0.75rem;
  padding: 0.25rem 0.4rem;
}

.sphera-sql-preview {
  background: #111827;
  border-radius: 0.45rem;
  color: #e5e7eb;
  font-size: 0.78rem;
  line-height: 1.55;
  margin: 0;
  max-height: 28rem;
  overflow: auto;
  padding: 0.875rem 1rem;
}

.sphera-sql-preview code {
  color: inherit;
  white-space: pre;
}

.sphera-report-table {
  font-size: 0.78rem;
}

.sphera-report-table > :not(caption) > * > * {
  padding-bottom: 0.38rem;
  padding-top: 0.38rem;
}

.sphera-report-table thead th {
  background: #1d273b;
  color: #fff;
  position: sticky;
  top: 0;
  z-index: 1;
}

.sphera-treasury-table {
  min-width: 58rem;
}

.sphera-treasury-group-row > th {
  background: #eef1f5;
  border-bottom-color: #d0d5dd;
  color: #1d273b;
  padding-bottom: 0.45rem;
  padding-top: 0.45rem;
}

.sphera-treasury-subtotal-row > td {
  background: #f8f9fb;
  border-bottom: 2px solid #d0d5dd;
}

.sphera-treasury-table tfoot > tr > td {
  background: #1d273b;
  color: #fff;
}

.sphera-exchange-rate-summary {
  align-items: baseline;
  background: #f8f9fb;
  border-bottom: 1px solid #d0d5dd;
  color: #667085;
  display: flex;
  flex-wrap: wrap;
  font-size: 0.72rem;
  gap: 0.35rem 0.75rem;
  padding: 0.5rem 1rem;
}

.sphera-cell-client-name {
  max-width: 18rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.sphera-chart {
  height: 320px;
  min-height: 240px;
}

[data-sphera-report-form][aria-busy="true"] {
  cursor: wait;
}

[data-sphera-report-form] .spinner-border + span {
  margin-left: 0.45rem;
}

.table-responsive > .table thead th {
  position: sticky;
  top: 0;
  z-index: 2;
}

.sphera-dashboard-toolbar {
  align-items: center;
  border-bottom: 1px solid var(--tblr-border-color);
  display: flex;
  gap: 1rem;
  justify-content: space-between;
  padding: 0 0 0.75rem;
}

.sphera-dashboard-toolbar .btn-group {
  flex-wrap: wrap;
}

.sphera-dashboard-chart-main {
  height: 300px;
}

.sphera-dashboard-chart-ranking {
  height: 300px;
}

.sphera-dashboard-chart-finance {
  height: 230px;
}

.sphera-insight-list {
  display: grid;
  gap: 0.8rem;
}

.sphera-insight-item {
  align-items: flex-start;
  display: grid;
  gap: 0.65rem;
  grid-template-columns: 1.6rem minmax(0, 1fr);
}

.sphera-insight-item p {
  margin: 0;
}

.sphera-insight-index {
  align-items: center;
  background: rgba(32, 107, 196, 0.1);
  border-radius: 50%;
  color: #206bc4;
  display: inline-flex;
  font-size: 0.75rem;
  font-weight: 700;
  height: 1.6rem;
  justify-content: center;
  width: 1.6rem;
}

.sphera-source-status {
  border-top: 1px solid var(--tblr-border-color);
  color: var(--tblr-secondary);
  padding-top: 0.75rem;
}

.sphera-source-status summary {
  cursor: pointer;
  font-size: 0.8125rem;
  font-weight: 600;
}

.sphera-login-logo {
  height: 4rem;
  width: auto;
}

.sphera-permission-matrix {
  display: grid;
  gap: 1rem;
}

.sphera-permission-section {
  border-bottom: 1px solid var(--tblr-border-color);
  padding-bottom: 1rem;
}

.sphera-permission-section:last-child {
  border-bottom: 0;
  padding-bottom: 0;
}

.sphera-permission-heading {
  align-items: center;
  display: flex;
  justify-content: space-between;
  margin-bottom: 0.5rem;
}

.sphera-permission-heading h3 {
  font-size: 0.875rem;
  margin: 0;
}

.sphera-permission-option {
  align-items: flex-start;
  border: 1px solid var(--tblr-border-color);
  border-radius: 0.35rem;
  cursor: pointer;
  display: flex;
  gap: 0.5rem;
  margin: 0;
  min-height: 2.5rem;
  padding: 0.55rem 0.65rem;
}

.sphera-permission-option:has(.form-check-input:checked) {
  background-color: rgba(32, 107, 196, 0.06);
  border-color: rgba(32, 107, 196, 0.35);
}

.sphera-permission-option .form-check-input {
  margin-left: 0;
  margin-top: 0.1rem;
}

@media (max-width: 767.98px) {
  .page-header .row > .col,
  .page-header .row > .col-auto {
    flex: 0 0 100%;
    width: 100%;
  }

  .page-header .row > .col-auto {
    margin-left: 0 !important;
  }

  .page-header .row > .col-auto > .d-flex {
    flex-wrap: wrap;
  }

  .sphera-chart {
    height: 280px;
  }

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

  .sphera-dashboard-toolbar .btn-group {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .sphera-dashboard-toolbar .btn {
    width: 100%;
  }
}
