html {
  font-size: 14px;
}

@media (min-width: 768px) {
  html {
    font-size: 16px;
  }
}

.btn:focus, .btn:active:focus, .btn-link.nav-link:focus, .form-control:focus, .form-check-input:focus {
  box-shadow: 0 0 0 0.1rem white, 0 0 0 0.25rem #258cfb;
}

html {
  position: relative;
  min-height: 100%;
}

body {
  margin-bottom: 60px;
}

/* Основной стиль кнопок прокрутки */
#scrollButtons {
  position: fixed;
  right: 20px;
  bottom: 20px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  z-index: 1050;
}
#scrollButtons button {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: none;
  background-color: #0d6efd;
  color: white;
  cursor: pointer;
  box-shadow: 0 2px 6px rgba(13, 110, 253, 0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background-color 0.3s ease;
}
#scrollButtons button:hover {
  background-color: #084298;
}

/* Карточки договоров */
.contract-card {
  border: 1px solid #b0b0b0;
  background-color: #f7f8fa;
  border-radius: 0;
  box-shadow: none;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 20px;
  height: 340px; /* фиксированная высота для одинакового размера */
  width: 100%; /* расширение на всю ширину колонки */
  min-width: 320px;
}
.contract-card:hover {
  border-color: #1b6ec2;
  background-color: #e9eefb;
  box-shadow: 0 4px 8px rgba(27, 110, 194, 0.15);
}
.card-title {
  color: #1b6ec2;
  font-weight: 700;
  font-size: 1.3rem;
  margin-bottom: 1rem;
}
.contract-info {
  color: #666666;
  font-size: 0.9rem;
  line-height: 1.4;
  margin-bottom: 15px;
}
.contract-info .label {
  font-weight: 600;
  color: #4a4a4a;
  margin-right: 5px;
}
.contract-info .value {
  color: #222;
  font-weight: 500;
}

/* Платежи в карточках */
details.payment-details summary {
  cursor: pointer;
  font-weight: 600;
  color: #1b6ec2;
  font-size: 1rem;
  margin-bottom: 10px;
  outline: none;
}
details.payment-details[open] summary {
  color: #084298;
}
details.payment-details > div {
  max-height: 280px;
  overflow-y: auto;
  border: 1px solid #c7c7c7;
  border-radius: 0;
  background: #fafafa;
}
.contract-payments-table {
  width: 100%;
  border-collapse: collapse;
  background: white;
}
.contract-payments-table thead tr {
  background-color: #1b6ec2;
}
.flex-box{
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.contract-payments-table thead th {
  color: white;
  font-weight: 600;
  padding: 8px 10px;
  border: none;
  border-radius: 0;
  text-align: center;
  user-select: none;
}
.contract-payments-table tbody tr {
  background: #f4f7ff;
  transition: background-color 0.3s ease;
}
.contract-payments-table tbody tr:hover {
  background: #d1defb;
}
.contract-payments-table td {
  padding: 8px 10px;
  border: none;
  color: #084298;
  vertical-align: middle;
}
.btn-sm.btn-danger {
  background-color: #dc3545;
  border-color: #dc3545;
  font-weight: 600;
  transition: background-color 0.3s ease;
  color: white !important;
}
.btn-sm.btn-danger:hover {
  background-color: #a71d2a;
  border-color: #a71d2a;
}

/* Основная таблица платежей */
.contract-table {
  width: 100%;
  border-collapse: collapse;
  border: 1px solid #b0b0b0;
  background: #f7f8fa;
}
.contract-table thead tr {
  background-color: #1b6ec2;
}
.contract-table thead th {
  color: white;
  font-weight: 600;
  padding: 10px 12px;
  border: none !important;
  border-radius: 0;
  text-align: center;
  user-select: none;
}
.contract-table tbody tr {
  background: white;
  transition: background-color 0.2s ease;
}
.contract-table tbody tr:nth-child(odd) {
  background: #f0f1f5;
}
.contract-table tbody tr:hover {
  background-color: #dce5fc;
}
.contract-table td {
  padding: 10px 12px;
  color: #222222;
  vertical-align: middle;
  border: none !important;
}
.btn-success {
  background-color: #1b6ec2;
  border-color: #1861ac;
  color: white;
  font-weight: 600;
  transition: background-color 0.3s ease;
}
.btn-success:hover, .btn-success:focus {
  background-color: #1861ac;
  border-color: #104a87;
  color: white;
}

/* Селект и иконка карты */
.form-select.contract-select {
  border-radius: 0;
  border: 1.5px solid #1b6ec2;
  padding: 6px 10px;
  font-size: 14px;
  color: #084298;
  transition: border-color 0.3s ease;
}
.form-select.contract-select:focus {
  border-color: #1861ac;
  box-shadow: 0 0 5px rgba(24, 97, 172, 0.5);
}
td .bi-credit-card {
  color: #1b6ec2;
  font-size: 1.2rem;
  vertical-align: middle;
  margin-left: 4px;
}
.btn-group-actions {
  display: flex;
  gap: 16px; /* расстояние между кнопками */
  align-items: center;
}

.btn-group-actions form {
  margin: 0; /* убрать внутренние отступы формы */
}

.btn-group-actions button.btn {
  min-width: 200px; /* одинаковая минимальная ширина у кнопок */
  padding: 12px 24px; /* увеличенные паддинги для удобства */
  font-size: 1rem;
  border-radius: 6px;
  box-shadow: 0 3px 6px rgba(13, 110, 253, 0.4);
  transition:
          background-color 0.3s ease,
          border-color 0.3s ease,
          box-shadow 0.3s ease;
  user-select: none;
}

.btn-group-actions button.btn-outline-primary {
  color: #1b6ec2;
  border-color: #1b6ec2;
}

.btn-group-actions button.btn-outline-primary:hover,
.btn-group-actions button.btn-outline-primary:focus {
  background-color: #1b6ec2;
  color: #fff;
  border-color: #1861ac;
  box-shadow: 0 8px 20px rgba(27, 110, 194, 0.6);
}

.btn-group-actions button.btn-primary {
  background-color: #1b6ec2;
  border-color: #1861ac;
  color: white;
}

.btn-group-actions button.btn-primary:hover,
.btn-group-actions button.btn-primary:focus {
  background-color: #1861ac;
  border-color: #104a87;
  box-shadow: 0 8px 20px rgba(24, 97, 172, 0.8);
}
button{
  background-color: #1b6ec2;!important;
}
