/* --------------------
   СТРАНИЦА НАСТРОЕК
--------------------- */

#settings-page {
  padding: 24px 0 80px 0;
  max-width: 480px;
  margin: 0 auto;
  color: #e6e6e6;
}

.settings-section {
  background: #23242a;
  border-radius: 14px;
  margin-bottom: 22px;
  padding: 20px 18px 18px 18px;
  box-shadow: 0 2px 12px #0002;
  border: 1px solid #333;
}

/* --- User Info --- */
.user-info-block {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  margin-bottom: 18px;
  margin-top: 50px;
  background: #23242a;
  box-shadow: none;
  padding: 18px 18px 12px 18px;
}
.user-photo-name {
  display: flex;
  align-items: center;
}
.user-photo {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  object-fit: cover;
  background: #333;
  margin-right: 18px;
  border: 2px solid #444;
}
.user-names {
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.user-fullname {
  font-size: 1.15em;
  font-weight: 600;
  color: #fff;
}
.user-nick {
  font-size: 1em;
  color: #a6b1c2;
}

/* --- Current Wallet --- */
.current-wallet-block .wallet-name {
  font-size: 1.1em;
  font-weight: 600;
  margin-bottom: 4px;
}

/* --- Участники кошелька --- */
.wallet-members-container {
  margin-top: 16px;
}

.members-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
}

.members-header h3 {
  font-size: 1.08em;
  font-weight: 600;
  color: #fff;
  margin: 0;
}

.add-btn {
  background: #4a90e2;
  color: #fff;
  border: none;
  border-radius: 50%;
  width: 32px;
  height: 32px;
  font-size: 18px;
  cursor: pointer;
  transition: background 0.15s;
}

.add-btn:hover {
  background: #357abd;
}

.members-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.member-chip {
  display: flex;
  align-items: center;
  background: #2e323a;
  color: #e6e6e6;
  border-radius: 16px;
  padding: 6px 12px;
  font-size: 0.98em;
  cursor: pointer;
  border: 1px solid #444;
  transition: background 0.15s;
}

.member-chip.owner {
  font-weight: 700;
  background: #3a3f4a;
  border-color: #4a90e2;
}

.member-chip .crown {
  margin-right: 6px;
  font-size: 1.1em;
}

.delete-btn {
  margin-left: 8px;
  color: #f44336;
  font-size: 1.1em;
  cursor: pointer;
  background: none;
  border: none;
  padding: 2px;
  border-radius: 50%;
  transition: background 0.15s;
}

.delete-btn:hover {
  background: rgba(244, 67, 54, 0.2);
}

/* --- Скрытые счета --- */
.hidden-accounts-container {
  margin-top: 20px;
}

.hidden-accounts-header {
  margin-bottom: 8px;
}

.hidden-accounts-header h3 {
  font-size: 1.08em;
  font-weight: 600;
  color: #fff;
  margin: 0;
}

.hidden-accounts-list {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.hidden-account-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px 0;
  color: #e6e6e6;
  font-size: 0.98em;
  border-bottom: 1px solid #333;
}

.hidden-account-item:last-child {
  border-bottom: none;
}

.account-name {
  color: #e6e6e6;
  font-size: 0.98em;
}

.show-account-btn {
  background: #4a90e2;
  color: #fff;
  border: none;
  border-radius: 50%;
  width: 24px;
  height: 24px;
  font-size: 12px;
  cursor: pointer;
  transition: background 0.15s;
}

.show-account-btn:hover {
  background: #357abd;
}

/* --- Модальное окно --- */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.7);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  backdrop-filter: blur(7px);
  -webkit-backdrop-filter: blur(7px);
}

.modal-content {
  background: #23242a;
  border-radius: 12px;
  padding: 24px;
  max-width: 400px;
  width: 90%;
  max-height: 80vh;
  overflow-y: auto;
  color: #e6e6e6;
  box-sizing: border-box;
}

.modal-content h3 {
  margin: 0 0 16px 0;
  color: #fff;
}

.modal-content p {
  margin: 0 0 12px 0;
  color: #a6b1c2;
}

.modal-content input {
  width: 100%;
  padding: 10px 12px;
  border-radius: 8px;
  border: 1px solid #444;
  background: #2e323a;
  color: #e6e6e6;
  font-size: 1em;
  margin-bottom: 16px;
  box-sizing: border-box;
}

.modal-buttons {
  display: flex;
  gap: 12px;
  justify-content: flex-end;
}

/* Общие стили кнопок вынесены в base.css */

.section-title {
  font-size: 1.08em;
  font-weight: 600;
  margin-bottom: 8px;
  color: #fff;
}
.section-subtitle {
  font-size: 0.98em;
  color: #a6b1c2;
}

/* --- Контейнер текущего кошелька и участников: общий стиль приложения --- */
.wallet-main-container, .wallet-members-main-container {
  background: #2e323a;
  border-radius: 16px;
  box-shadow: 0 2px 12px rgba(0,0,0,0.06);
  padding: 16px 16px 12px 16px;
  margin-bottom: 20px;
  border: none !important;
}
.wallet-title-block h3 {
  font-size: 1.13em;
  font-weight: 600;
  margin: 0 0 10px 0;
  color: #fff;
}
.wallet-info-block {
  font-size: 1.08em;
  color: #f5f6fa;
  font-weight: 500;
}
.wallet-title-main {
  font-weight: 600;
  color: #fff;
}
.wallet-op-count {
  color: #8ca0c8;
  font-size: 0.98em;
  margin-left: 10px;
}
.wallet-members-main-container {
  margin-top: 10px;
}

/* --- Крупные чипы участников --- */
.member-chip, .small-chip {
  display: inline-flex;
  align-items: center;
  font-size: 1em;
  padding: 6px 16px;
  margin: 4px 6px 4px 0;
  border-radius: 16px;
  background: #353942;
  color: #fff;
  min-height: 28px;
  min-width: 0;
  box-shadow: none;
  transition: background 0.15s;
}
.member-chip.owner, .small-chip.owner {
  background: #444a56;
  font-weight: 600;
}
.member-chip .crown, .small-chip .crown {
  margin-right: 8px;
  font-size: 1.1em;
}
.member-chip .delete-btn, .small-chip .delete-btn {
  margin-left: 10px;
  font-size: 1.1em;
  cursor: pointer;
}
.members-list {
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

/* --- Invite Block --- */
.invite-block {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.invite-code-input {
  width: 100%;
  padding: 8px 12px;
  border-radius: 8px;
  border: none;
  background: #23242a;
  color: #e6e6e6;
  font-size: 1em;
  margin-bottom: 6px;
}
.invite-error-msg {
  color: #f44336;
  font-size: 0.97em;
  margin-top: 2px;
  min-height: 18px;
}

/* --- Список кошельков --- */
.wallets-list-block {
  margin-bottom: 0;
}

.wallets-header {
  margin-bottom: 16px;
}

.wallets-header h3 {
  font-size: 1.08em;
  font-weight: 600;
  color: #fff;
  margin: 0;
}

#settings-wallets-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.wallets-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.wallet-list-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  border-radius: 12px;
  background: #2e323a;
  box-shadow: 0 1px 4px rgba(30,40,60,0.13);
  cursor: pointer;
  transition: background 0.2s, box-shadow 0.2s;
  font-size: 1.08em;
  color: #f2f4fa;
  border: 1px solid #444;
}

.wallet-list-item.selected {
  background: #23242a;
  box-shadow: 0 2px 8px rgba(80,120,255,0.18);
  border: 2px solid #4a90e2;
}

.wallet-list-item:hover {
  background: #393b41;
}

.wallet-icon {
  font-size: 1.2em;
}

.wallet-title {
  font-weight: 500;
  flex: 1;
  color: #e6e6e6;
}

.wallet-operations-count {
  color: #8ca0c8;
  font-size: 0.95em;
}

.wallet-role {
  color: #888;
  font-size: 0.85em;
  margin-left: 8px;
  font-style: italic;
}

.wallet-current-note {
  color: #4a90e2;
  font-size: 0.9em;
  font-weight: 600;
  margin-left: 8px;
}

.wallet-list-item .wallet-default-star {
  margin-right: 8px;
  font-size: 1.2em;
}
.wallet-list-item .wallet-access-note {
  color: #4a90e2;
  font-size: 0.95em;
  margin-left: 10px;
}
/* --- Flex-контейнер для центрирования кнопки --- */
.settings-btn-center {
  display: flex;
  justify-content: center;
  align-items: center;
  width: 100%;
  margin: 32px 0 0 0;
}
/* --- Кнопка "Показать все скрытые счета" --- */
#showHiddenAccountsBtn {
  background: #23242a;
  color: #f2f4fa;
  border: none;
  border-radius: 8px;
  padding: 12px 32px;
  font-size: 1.08em;
  font-weight: 500;
  cursor: pointer;
  box-shadow: 0 1px 4px rgba(30,40,60,0.13);
  transition: background 0.18s, color 0.18s;
  outline: none;
  margin: 0;
}
#showHiddenAccountsBtn:hover {
  background: #4a90e2;
  color: #fff;
}
/* ----------------------------- */

@media (max-width: 600px) {
  #settings-page {
    padding: 12px 0 80px 0;
  }
  .settings-section {
    padding: 14px 8px 12px 8px;
  }
  .user-photo {
    width: 44px;
    height: 44px;
  }
} 

/* --- Компактный стиль для списка кошельков в настройках --- */
.wallets-list-block, #settings-wallets-list {
  padding: 0 0 0 0 !important;
  margin: 0 !important;
}
#settings-wallets-list .wallet-list-item {
  padding: 4px 8px !important;
  margin: 2px 0 !important;
  border-radius: 4px !important;
  background: none !important;
  box-shadow: none !important;
  border: none !important;
  font-size: 0.98em !important;
  color: #b0b0b0 !important;
}
#settings-wallets-list .wallet-list-item.selected {
  background: #232323 !important;
  color: #fff !important;
  font-weight: 500 !important;
}
#settings-wallets-list .wallet-list-item:hover {
  background: #23232322 !important;
}
/* Отключить выбор кошельков в настройках */
#settings-wallets-list .wallet-list-item {
  pointer-events: none !important;
  cursor: default !important;
}

/* Компактные чипы участников */
.small-chip {
  display: inline-flex;
  align-items: center;
  font-size: 0.75em;
  padding: 1px 6px;
  margin: 1px 2px 1px 0;
  border-radius: 10px;
  background: #232323;
  color: #fff;
  min-height: 16px;
  min-width: 0;
  box-shadow: none;
}
.small-chip.owner {
  background: #3a3a3a;
  font-weight: 500;
}
.small-chip .crown {
  margin-right: 4px;
}
.small-chip .delete-btn {
  margin-left: 6px;
  font-size: 1em;
  cursor: pointer;
}
.members-list {
  margin: 0;
  padding: 0;
} 

.delete-wallet-btn-container {
  display: flex;
  justify-content: center;
  align-items: center;
  margin: 32px 0 0 0;
}

.wide-delete-btn {
  width: 90%;
  max-width: 420px;
  min-width: 140px;
  padding: 0px 0;
  border-radius: 18px;
  background: #ff2d2d;
  color: #fff;
  font-size: 1em;
  font-weight: 600;
  border: none;
  box-shadow: 0 2px 8px #ff2d2d22;
  cursor: pointer;
  transition: background 0.18s, box-shadow 0.18s;
  margin: 18px auto 0 auto;
  letter-spacing: 0.5px;
  height: 36px;
}
.wide-delete-btn:hover, .wide-delete-btn:focus {
  background: #e60000;
  box-shadow: 0 4px 16px #ff2d2d44;
  outline: none;
} 

@media screen and (max-width: 500px) {
  .wide-delete-btn {
    width: 80%;
    font-size: 1em;
    height: 25px;
    margin: 18px auto 0 auto;
    
  }
}

/* ========================================
   КНОПКИ УПРАВЛЕНИЯ КЭШЕМ
   ======================================== */

.cache-control-block {
  margin-top: 20px;
}

.cache-control-buttons {
  display: flex;
  gap: 12px;
  justify-content: center;
}

.cache-btn {
  padding: 10px 16px;
  border: none;
  border-radius: 8px;
  font-size: 0.9em;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
  flex: 1;
  max-width: 140px;
}

.clear-cache-btn {
  background: #dc3545;
  color: white;
}

.clear-cache-btn:hover {
  background: #c82333;
}

.refresh-data-btn {
  background: #007bff;
  color: white;
}

.refresh-data-btn:hover {
  background: #0056b3;
}

.cache-btn:active {
  transform: translateY(1px);
}

/* Адаптивность для мобильных устройств */
@media (max-width: 480px) {
  .cache-control-buttons {
    flex-direction: column;
    gap: 8px;
  }
  
  .cache-btn {
    max-width: none;
  }
}

/* --- Версия приложения --- */
.version-block {
  margin-bottom: 0;
  padding: 10px 18px;
  background: transparent;
  box-shadow: none;
  border: none;
  text-align: center;
}

.version-text {
  font-size: 0.75em;
  color: #666;
  margin-bottom: 500px;
}