/* Strict Tabler overrides — minimal, no decorative themes */
.navbar-brand-image {
  object-fit: contain;
}

/* Bloomberg Terminal availability (worker heartbeat ping) */
.bb-terminal-dot {
  display: inline-block;
  width: 0.55rem;
  height: 0.55rem;
  border-radius: 50%;
  flex: 0 0 auto;
  background: #929dab;
  box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.08);
}
.bb-terminal-dot--avatar {
  position: absolute;
  right: -0.1rem;
  bottom: -0.05rem;
  width: 0.65rem;
  height: 0.65rem;
  border: 2px solid var(--tblr-bg-surface, #fff);
  box-shadow: none;
}
.bb-terminal-dot.is-online {
  background: #2fb344;
}
.bb-terminal-dot.is-offline,
.bb-terminal-dot.is-unknown {
  background: #929dab;
}
.bb-terminal-dot.is-checking {
  animation: bb-terminal-pulse 0.9s ease-in-out infinite;
}
@keyframes bb-terminal-pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.35; }
}

.qr-box {
  text-align: center;
  padding: 1rem;
  border: 1px solid var(--tblr-border-color, #e6e7e9);
  border-radius: var(--tblr-border-radius, 4px);
  background: var(--tblr-bg-surface, #fff);
}

.qr-box img {
  max-width: 200px;
  height: auto;
  image-rendering: pixelated;
}

.secret-mono {
  font-family: var(--tblr-font-monospace, ui-monospace, SFMono-Regular, Menlo, Consolas, monospace);
  font-size: 0.8125rem;
  letter-spacing: 0.04em;
  word-break: break-all;
  padding: 0.5rem 0.75rem;
  background: var(--tblr-bg-surface-secondary, #f6f8fb);
  border: 1px solid var(--tblr-border-color, #e6e7e9);
  border-radius: var(--tblr-border-radius, 4px);
}

.auth-logo {
  width: 56px;
  height: 56px;
  object-fit: contain;
  display: block;
  margin: 0 auto 0.5rem;
}

.table-actions .btn {
  margin: 0.125rem;
}

/* Main: clients toolbar on top + tabs below */
.main-layout {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  align-items: stretch;
}
.clients-panel {
  width: 100%;
  flex: 0 0 auto;
  max-width: none;
}
.clients-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.75rem 1rem;
}
.clients-toolbar-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  flex: 0 0 auto;
}
.clients-toolbar-select {
  flex: 2 1 16rem;
  min-width: 14rem;
  max-width: 28rem;
}
.clients-select {
  min-height: 0;
}
.clients-toolbar-hint {
  flex: 1 1 auto;
  white-space: nowrap;
}
.client-tabs-panel {
  flex: 1 1 auto;
  min-width: 0;
  width: 100%;
}

.fee-group .card-title {
  font-size: 1rem;
}
/* Панель комиссий — примерно в 2 раза уже полной ширины вкладки */
.fees-panel {
  width: 100%;
  max-width: 50%;
  min-width: 18rem;
}
@media (max-width: 991.98px) {
  .fees-panel {
    max-width: 100%;
  }
}
.fee-period-row.fee-period-current {
  background: rgba(47, 179, 68, 0.12);
}
.fee-period-row.fee-period-current td:first-child {
  font-weight: 600;
  color: var(--tblr-success, #2fb344);
}
.fee-period-row.is-saving {
  opacity: 0.55;
  pointer-events: none;
}
.fee-rate-input {
  max-width: 6rem;
}

/* Date field: dd.mm.yyyy text + calendar icon */
.date-field {
  max-width: 12.5rem;
  position: relative;
}
.date-field .date-text-input {
  font-variant-numeric: tabular-nums;
}
.date-field .date-picker-btn {
  min-width: 2.5rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  position: relative;
  z-index: 1;
}
.date-field .date-picker-btn .fa-calendar {
  pointer-events: none;
}
/* Hidden native input — opened via button.showPicker(), not as overlay */
.date-field .date-native-picker {
  position: absolute;
  width: 0;
  height: 0;
  opacity: 0;
  border: 0;
  padding: 0;
  margin: 0;
  overflow: hidden;
  pointer-events: none;
  bottom: 0;
  right: 0;
}

.tx-layout {
  display: grid;
  gap: 1rem;
  grid-template-columns: minmax(0, 1fr);
  align-items: start;
}
@media (min-width: 1200px) {
  .tx-layout {
    grid-template-columns: clamp(224px, 20.8vw, 288px) minmax(0, 1fr);
  }
  .tx-entry {
    position: sticky;
    top: 1rem;
    align-self: start;
    z-index: 2;
    max-height: calc(100vh - 2rem);
    overflow-y: auto;
  }
}
.tx-table-wrap {
  min-width: 0;
  overflow: auto;
  border: 1px solid var(--tblr-border-color, #e6e7e9);
  border-radius: var(--tblr-border-radius, 4px);
  background: var(--tblr-bg-surface, #fff);
  position: relative;
  min-height: 12rem;
}
.tx-table-loader {
  position: absolute;
  inset: 0;
  z-index: 5;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.72);
  backdrop-filter: blur(1px);
}
.tx-table-loader.d-none {
  display: none !important;
}
.tx-table-loader-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.75rem;
  padding: 1rem 1.25rem;
  border-radius: 0.5rem;
  background: var(--tblr-bg-surface, #fff);
  border: 1px solid var(--tblr-border-color, #e6e7e9);
  box-shadow: 0 0.25rem 0.75rem rgba(24, 36, 51, 0.08);
}
.tx-table-loader-text {
  font-size: 0.875rem;
  color: var(--tblr-secondary, #667382);
}
.tx-table-wrap.is-loading .table-responsive {
  opacity: 0.35;
  pointer-events: none;
}

.tx-filters .tx-multi-filter {
  position: relative;
  min-width: 4.5rem;
}
.tx-filters .tx-multi-filter-btn {
  padding-right: 1.75rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  font-size: 0.75rem;
  min-height: calc(1.5em + 0.5rem + 2px);
}
.tx-filters .tx-multi-filter-btn.is-active {
  border-color: var(--tblr-primary, #206bc4);
  color: var(--tblr-primary, #206bc4);
  font-weight: 600;
}
.tx-multi-filter-panel {
  position: fixed;
  top: 0;
  left: 0;
  z-index: 1080;
  min-width: 11rem;
  max-width: 16rem;
  max-height: 16rem;
  overflow: auto;
  padding: 0.35rem 0.4rem;
  background: var(--tblr-bg-surface, #fff);
  border: 1px solid var(--tblr-border-color, #dfe3e8);
  border-radius: var(--tblr-border-radius, 4px);
  box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.12);
}
.tx-multi-filter-item {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  margin: 0;
  padding: 0.2rem 0.25rem;
  font-size: 0.8rem;
  font-weight: 400;
  cursor: pointer;
  white-space: nowrap;
}
.tx-multi-filter-item:hover {
  background: var(--tblr-bg-surface-secondary, #f6f8fb);
}
.tx-multi-filter-item .form-check-input {
  margin: 0;
  flex: 0 0 auto;
}
.tx-multi-filter-list {
  border-top: 1px solid var(--tblr-border-color, #e6e7e9);
  margin-top: 0.25rem;
  padding-top: 0.25rem;
}

.tx-sort {
  border: 0;
  background: transparent;
  padding: 0;
  font: inherit;
  color: inherit;
  cursor: pointer;
  text-align: left;
  white-space: nowrap;
}
.tx-sort.is-sorted {
  font-weight: 600;
  color: var(--tblr-primary, #0054a6);
}
#secTable tbody tr[data-id] {
  cursor: pointer;
}

/* График выплат в карточке бумаги — свой вертикальный скролл */
#secModal .pay-schedule-scroll {
  max-height: min(36vh, 280px);
  overflow-y: auto;
  overflow-x: auto;
  border: 1px solid var(--tblr-border-color, #dfe3e8);
  border-radius: 0.375rem;
}
#secModal .pay-schedule-scroll thead th {
  position: sticky;
  top: 0;
  z-index: 1;
  background: var(--tblr-bg-surface, #fff);
  box-shadow: 0 1px 0 var(--tblr-border-color, #dfe3e8);
}
#secModal.modal .modal-dialog {
  max-height: calc(100vh - 2rem);
}
#secModal .modal-content {
  max-height: calc(100vh - 2rem);
}

.tx-fee-box {
  border: 1px solid var(--tblr-border-color, #dfe3e8);
  border-radius: 0.375rem;
  padding: 0.75rem 0.85rem;
  background: var(--tblr-bg-surface-secondary, #f6f8fb);
}

.tx-mf-preview {
  border: 1px dashed var(--tblr-border-color, #dfe3e8);
  border-radius: 0.375rem;
  padding: 0.75rem 0.85rem;
  background: var(--tblr-bg-surface, #fff);
}

.tx-fee-value {
  font-size: 0.875rem;
  line-height: 1.45;
}

.tx-fee-line {
  display: flex;
  gap: 0.5rem;
  align-items: baseline;
}

.tx-fee-label {
  min-width: 3.5rem;
  color: var(--tblr-secondary, #6c7a91);
}

.tx-fee-amount {
  margin-top: 0.25rem;
  font-size: 1rem;
}

.tx-row {
  cursor: pointer;
}
.tx-row:hover {
  background-color: rgba(32, 107, 196, 0.06);
}

.num-input {
  font-variant-numeric: tabular-nums;
}

.tx-fee-preview {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.5rem 0.65rem;
  border-radius: 0.375rem;
  background: #fff;
  border: 1px dashed var(--tblr-border-color, #dfe3e8);
  font-size: 1rem;
}
.tx-fee-preview.is-ready {
  border-style: solid;
  border-color: var(--tblr-primary, #0054a6);
  background: rgba(32, 107, 196, 0.06);
}
.tx-fee-preview-label {
  color: var(--tblr-secondary, #6c7a91);
  font-size: 0.8125rem;
}

.tx-row-fee-link td {
  border-top-style: dashed;
}
.tx-row-fee-link td:first-child {
  box-shadow: inset 3px 0 0 var(--tblr-primary, #0054a6);
}

.tx-auto-fee-total {
  display: inline-flex;
  align-items: center;
  justify-content: flex-end;
  gap: 0.25rem;
  white-space: nowrap;
}
.tx-auto-fee-explain {
  line-height: 1;
  color: var(--tblr-secondary, #6c7a91);
  vertical-align: middle;
  background: transparent !important;
  background-color: transparent !important;
  box-shadow: none !important;
  text-decoration: none !important;
}
.tx-auto-fee-explain:hover,
.tx-auto-fee-explain:focus,
.tx-auto-fee-explain:active,
.tx-auto-fee-explain:focus-visible {
  color: var(--tblr-primary, #0054a6);
  background: transparent !important;
  background-color: transparent !important;
  box-shadow: none !important;
  text-decoration: none !important;
}
.tx-auto-fee-explain i {
  font-size: 0.85rem;
}
.popover.tx-auto-fee-popover {
  max-width: 22rem;
}
.popover.tx-auto-fee-popover .popover-body {
  font-size: 0.8125rem;
  line-height: 1.45;
}

/* Client report (STATEMENT OF ASSETS) */
.report-timeline .form-range {
  cursor: pointer;
}
.report-statement {
  overflow-x: auto;
}
.report-statement h3 {
  font-size: 1.15rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  margin: 0 0 1rem;
}
.report-statement h4 {
  font-size: 1rem;
  font-weight: 600;
  margin: 1.25rem 0 0.5rem;
}
.report-meta {
  display: grid;
  grid-template-columns: minmax(10rem, 14rem) minmax(8rem, 1fr);
  gap: 0.25rem 1rem;
  max-width: 36rem;
  margin-bottom: 1rem;
  font-size: 0.925rem;
}
.report-meta dt {
  color: var(--tblr-secondary, #6c7a91);
  margin: 0;
}
.report-meta dd {
  margin: 0;
  font-variant-numeric: tabular-nums;
}
.report-table {
  font-size: 0.8125rem;
  margin-bottom: 0.5rem;
}
.report-table th {
  white-space: nowrap;
  font-weight: 600;
}
.report-table .num {
  text-align: right;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
.report-total-row td {
  font-weight: 600;
  border-top: 2px solid var(--tblr-border-color, #dfe3e8);
}
