/* accounts.css — только уникальные стили для страницы счетов */

.accounts-group-title {
  font-size: 0.875rem;
  font-weight: 600;
  color: #64748b;
  margin: 32px 0 12px 0;
  padding: 0 4px;
  background: none;
  border: none;
  border-radius: 0;
  line-height: 1.4;
  display: block;
  position: relative;
  box-shadow: none;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  border-bottom: 1px solid #e2e8f0;
  padding-bottom: 8px;
}

.accounts-group-title:first-child {
  margin-top: 16px;
}

.accounts-group-title::before {
  display: none;
}

.account-color {
  width: 2.2rem;
  height: 2.2rem;
  border-radius: 50%;
  margin-right: 1.1rem;
  flex-shrink: 0;
}

.account-actions {
  margin-left: auto;
  position: relative;
  display: flex;
  align-items: center;
}

.account-actions button {
  background: none;
  border: none;
  color: #b0b8c9;
  font-size: 1.5rem;
  cursor: pointer;
  padding: 0 8px;
}

.account-actions button:hover {
  color: #2563eb;
}

.account-badge {
  display: inline-block;
  background: #f2f2f2;
  color: #888;
  font-size: 0.85rem;
  border-radius: 8px;
  padding: 2px 8px;
  margin-top: 6px;
}
.accounts-filters-row-wrap {
  max-width: 1100px;
  margin: 0 auto 0 auto;
  padding: 0 0 18px 0;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
}

.accounts-filters-row {
  display: flex;
  gap: 14px;
  margin-bottom: 0;
}

.client-icon-btn {
  width: 44px;
  height: 44px;
  min-width: 44px;
  min-height: 44px;
  border-radius: 12px;
  background: rgba(37, 99, 235, 0.07);
  color: #2563eb;
  border: none;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.7rem;
  margin-right: 8px;
  cursor: pointer;
  transition: background 0.13s, color 0.13s;
  padding: 0;
}

.client-icon-btn:last-child {
  margin-right: 0;
}

.client-icon-btn:hover,
.client-icon-btn:focus {
  background: #2563eb;
  color: #fff;
}

.client-icon-btn svg {
  display: block;
  width: 22px;
  height: 22px;
  stroke: currentColor;
}

.client-add-btn {
  background: #2563eb;
  color: #fff;
}

.client-add-btn:hover,
.client-add-btn:focus {
  background: #1743b3;
  color: #fff;
}

.accounts-group-block {
  background: #fff;
  border-radius: 16px;
  box-shadow: 0 4px 20px 0 rgba(60,80,130,0.08);
  border: 1px solid #e8eef7;
  margin-top: 8px;
  margin-bottom: 32px;
  padding-top: 0;
  overflow: hidden;
  transition: all 0.3s ease;
}

.accounts-group-block:hover {
  box-shadow: 0 6px 28px 0 rgba(60,80,130,0.12);
  transform: translateY(-2px);
}

.clients-list {
  margin-top: 0;
  padding-top: 0;
  margin: 0;
  padding: 0;
  list-style: none;
}

.clients-list-item {
  border-radius: 12px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
  border: 1px solid #f1f5f9;
  margin-bottom: 8px;
  background: #ffffff;
  padding: 16px 20px;
  transition: all 0.2s ease;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  position: relative;
  overflow: hidden;
}

.clients-list-item:hover {
  background-color: #fafbfc;
  border-color: #e2e8f0;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  transform: translateY(-1px);
}

.clients-list-item:first-child {
  border-top-left-radius: 12px;
  border-top-right-radius: 12px;
}

.clients-list-item:last-child {
  border-bottom-left-radius: 12px;
  border-bottom-right-radius: 12px;
}

.accounts-list-no-bg {
  background: none !important;
  box-shadow: none !important;
  border-radius: 0 !important;
}

#accountsMenu.trx-menu-popup {
  position: absolute;
  top: 48px;
  right: 0;
  left: auto;
  min-width: 170px;
  z-index: 100;
}

@media (max-width: 600px) {
  #accountsMenu.trx-menu-popup {
    right: auto;
    left: 0;
  }
}

.account-type {
  font-weight: 600;
  color: #232b39;
  font-size: 1rem;
}

.account-number {
  font-weight: 600;
  color: #232b39;
  font-size: 1rem;
  margin-left: 8px;
}

.account-users {
  font-weight: 300;         /* ещё тоньше */
  color: #6b7280;           /* темнее, чем #888 */
  font-size: 0.86rem;       /* меньше размер */
  letter-spacing: 0.01em;
  opacity: 1;               /* полностью видимый */
  margin-left: 0;
  margin-top: 4px;
  display: block;
  line-height: 1.28;
  word-break: break-word;
}
.account-badge {
  display: inline-block;
  background: #f5f7fa;
  color: #64748b;
  font-size: 0.91rem;
  border-radius: 8px;
  padding: 2px 10px 2px 10px;
  font-weight: 600;
  line-height: 1.45;
  margin-right: 4px;
}

.account-badge-small {
  background: #f1f5f9;
  color: #64748b;
  font-size: 0.75rem;
  border-radius: 6px;
  padding: 3px 8px;
  font-weight: 500;
  line-height: 1.2;
  margin-right: 6px;
  white-space: nowrap;
  border: none;
  text-transform: none;
  letter-spacing: normal;
}
.client-fio {
  position: relative;
  display: block;
  color: #1e293b;
  font-weight: 600;
  font-size: 1.125rem;
  line-height: 1.5;
  padding-left: 12px;
  background: none;
  border: none;
  border-radius: 0;
  box-shadow: none;
  transition: color 0.2s ease;
  margin-bottom: 4px;
}

.client-fio:hover {
  color: #0f172a;
  box-shadow: none;
  transform: none;
}

.client-fio::before {
  content: '';
  position: absolute;
  left: 0;
  top: 2px;
  bottom: 2px;
  width: 3px;
  background: var(--account-color, #64748b);
  border-radius: 2px;
}

.client-fio-underline {
  display: none;
}

/* Адаптация для мобильных */
@media (max-width: 600px) {
  .account-users {
    font-size: 0.78rem;
    margin-top: 4px;
  }
  .account-type,
  .account-number {
    font-size: 0.98rem;
  }
  
  .account-badge-small {
    font-size: 10px !important;
    padding: 1px 4px !important;
  }
  
  .client-fio {
    font-size: 16px !important;
    font-weight: 600 !important;
  }
  
  .divcat-list-item__desc {
    margin-top: 3px !important;
  }
}

@media (max-width: 400px) {
  .account-badge-small {
    font-size: 9px !important;
    padding: 1px 3px !important;
  }
}
@media (max-width: 600px) {
  #accountsMenu.trx-menu-popup {
    min-width: 170px;
    max-width: 90vw;
    border-radius: 14px;
    z-index: 9999;
  }
}

/* Стили для модального окна с деталями счета */
#accountDetailsModal {
  max-width: 420px;
  border-radius: 18px;
  background: #fff;
  box-shadow: 0 8px 32px rgba(60,80,130,0.15);
  border: none;
}

#accountDetailsModal .modal-header {
  padding: 20px 24px 12px 24px;
  border-bottom: 1px solid #f0f3fa;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

#accountDetailsName {
  color: #1e293b !important;
  font-size: 1.15rem !important;
  font-weight: 600 !important;
  line-height: 1.3;
  position: relative;
  padding-left: 12px;
}

#accountDetailsName::before {
  content: '';
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 3px;
  height: 16px;
  background: var(--modal-account-color, #64748b);
  border-radius: 2px;
}

#accountDetailsModal .modal-body {
  padding: 16px 24px 24px 24px;
}

#accountDetailsModal .modal-body > div:first-child {
  margin-bottom: 16px;
  margin-left: 12px;
}

#accountDetailsType,
#accountDetailsDigits {
  background: #f1f5f9 !important;
  color: #64748b !important;
  font-size: 11px !important;
  padding: 2px 6px !important;
  border-radius: 4px !important;
  font-weight: 500 !important;
  margin-right: 6px !important;
  display: inline-block;
}

#accountDetailsUsers {
  color: #6b7280;
  font-size: 0.9rem;
  line-height: 1.4;
  margin-left: 12px;
  font-weight: 400;
}

/* Стили для архивированных счетов */
.account-badge-small[style*="fef3c7"] {
  background: #fef3c7 !important;
  color: #d97706 !important;
  border: 1px solid #fcd34d !important;
  font-weight: 700 !important;
  animation: pulse-archive 2s infinite;
}

@keyframes pulse-archive {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.8; }
}

/* Улучшенное разделение между элементами */
.divcat-list-item__desc {
  padding-top: 8px;
  border-top: 1px solid #f1f5f9;
  margin-top: 12px !important;
}

/* Стили для модального окна деталей счета */
#accountDetailsName {
  position: relative;
  padding-left: 20px;
}

#accountDetailsName::before {
  content: '';
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 4px;
  height: 24px;
  background: var(--modal-account-color, #64748b);
  border-radius: 2px;
}

.modal-close-btn {
  background: none !important;
  border: none !important;
  font-size: 1.5rem !important;
  color: #94a3b8 !important;
  cursor: pointer;
  padding: 4px !important;
  line-height: 1;
  transition: color 0.15s ease;
}

.modal-close-btn:hover {
  color: #64748b !important;
}

@media (max-width: 600px) {
  #accountDetailsModal {
    max-width: 90vw;
    margin: 20px;
  }
  
  #accountDetailsModal .modal-header {
    padding: 16px 20px 10px 20px;
  }
  
  #accountDetailsModal .modal-body {
    padding: 12px 20px 20px 20px;
  }
  
  #accountDetailsName {
    font-size: 1.1rem !important;
  }
  
  #accountDetailsType,
  #accountDetailsDigits {
    font-size: 10px !important;
    padding: 1px 4px !important;
  }
  
  #accountDetailsUsers {
    font-size: 0.85rem;
  }
}

/* Отступы между группами */
.accounts-group-block {
  margin-bottom: 32px;
}

.accounts-group-block:last-child {
  margin-bottom: 16px;
}