.db-page {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.db-toolbar {
  display: flex;
  flex-wrap: nowrap;
  align-items: center;
  gap: 10px;
  --db-control-h: 44px;
  --db-control-pad-y: 5px;
  --db-control-pad-x: 8px;
  --db-control-gap: 6px;
}

.db-toolbar__period {
  flex: 0 0 auto;
  min-width: 0;
}

.db-toolbar__period-btn.ch-period-dd {
  min-width: 148px;
  max-width: 100%;
  height: var(--db-control-h);
  min-height: var(--db-control-h);
  max-height: var(--db-control-h);
  padding: var(--db-control-pad-y) var(--db-control-pad-x);
  gap: var(--db-control-gap);
  box-sizing: border-box;
}

.db-toolbar__period-btn.ch-period-dd:focus-within {
  padding: calc(var(--db-control-pad-y) - 1px) calc(var(--db-control-pad-x) - 1px);
}

.db-toolbar__search.ch-search-row__wrap {
  flex: 1 1 auto;
  min-width: 0;
  height: var(--db-control-h);
  min-height: var(--db-control-h);
  max-height: var(--db-control-h);
  padding: 0 var(--db-control-pad-x);
  gap: var(--db-control-gap);
  align-items: center;
  box-sizing: border-box;
  border: 1.5px solid rgba(214, 169, 79, 0.3);
  border-radius: var(--ch-radius-input, 14px);
  background: #ffffff;
  box-shadow: 0 4px 12px rgba(15, 23, 42, 0.04);
  transition: border-color 300ms ease, box-shadow 300ms ease;
}

.db-toolbar__search.ch-search-row__wrap:hover,
.db-toolbar__search.ch-search-row__wrap:focus-within {
  border-color: #d6a94f;
  box-shadow: 0 12px 28px rgba(214, 169, 79, 0.18);
}

.db-toolbar__search.ch-search-row__wrap:focus-within {
  border-width: 2px;
  padding: 0 calc(var(--db-control-pad-x) - 1px);
}

.db-toolbar__search .ch-search-row__icon {
  width: 20px;
  height: 20px;
}

.db-toolbar__search .ch-search-row__input {
  padding: 0 !important;
  min-height: 0 !important;
  height: auto;
  font-size: 13px;
  line-height: 1.3;
}

@media (min-width: 769px) {
  .db-toolbar {
    --db-control-h: 48px;
    --db-control-pad-y: 6px;
    --db-control-pad-x: 10px;
    --db-control-gap: 8px;
  }

  .db-toolbar__search .ch-search-row__input {
    font-size: 14px;
  }
}

.db-summary {
  padding: 4px 2px 0;
}

.db-summary__line {
  margin: 0;
  font-size: 0.92rem;
  color: var(--text-muted, #64748b);
  line-height: 1.6;
}

.db-summary__line--total {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 6px;
}

.db-summary__line--total strong {
  color: var(--text, #0f172a);
  font-size: 1rem;
  font-weight: 700;
}

.db-list {
  padding: 0;
  overflow: hidden;
}

.db-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px 16px;
  border-bottom: 1px solid rgba(15, 23, 42, 0.06);
}

.db-row:last-child {
  border-bottom: none;
}

.db-row__unit {
  flex: 1 1 auto;
  min-width: 0;
  font-weight: 600;
  color: var(--text, #0f172a);
}

.db-row__arrow {
  flex: 0 0 auto;
  color: #94a3b8;
  font-size: 0.95rem;
}

.db-row__amount {
  flex: 0 0 auto;
  font-weight: 700;
  color: #b45309;
  white-space: nowrap;
}

.db-empty .empty {
  margin: 0;
}

.db-period-all {
  display: block;
  width: 100%;
  margin-bottom: 10px;
  padding: 10px 12px;
  border: 1px solid rgba(15, 23, 42, 0.08);
  border-radius: 10px;
  background: #fff;
  color: #0f172a;
  font: inherit;
  text-align: center;
  cursor: pointer;
}

.db-period-all.is-active,
.db-period-all:hover {
  border-color: #d6a94f;
  background: rgba(214, 169, 79, 0.08);
}

.db-period-year {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 10px;
}

.db-period-year__label {
  font-weight: 700;
  color: #0f172a;
}

.db-period-year__btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  padding: 0;
  border: 1px solid rgba(15, 23, 42, 0.08);
  border-radius: 10px;
  background: #fff;
  color: #64748b;
  cursor: pointer;
}

.db-period-year__icon {
  display: block;
  flex-shrink: 0;
  pointer-events: none;
}

.db-period-year__btn:hover:not(:disabled) {
  border-color: #d6a94f;
  color: #475569;
}

.db-period-year__btn:disabled {
  opacity: 0.35;
  cursor: not-allowed;
}

#debtors-month-panel {
  min-width: 260px;
}
