.settings-header-wrapper {
  margin-bottom: 24px;
}

.settings-header {
  display: flex;
  align-items: flex-start;
  flex-direction: column;
}

.settings-title {
  font-family: 'Inter', ui-sans-serif, system-ui;
  font-size: 30px;
  font-weight: 700;
  color: #ffffff;
  margin: 0;
}

.settings-subtitle {
  font-family: 'Inter', ui-sans-serif, system-ui;
  font-size: 11px;
  color: rgba(255, 255, 255, 0.65);
  margin: 0;
}

.settings-section {
  background: rgba(255, 255, 255, 0.03);
  border-radius: 8px;
  padding: 15px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  display: flex;
  flex-direction: row;
  align-items: flex-start;
  justify-content: space-between;
  max-height: 500px;
}

.settings-section:has(.full-width) {
  max-height: 348px;
  flex-direction: column;
}

.settings-main-container {
  display: grid;
  grid-template-columns: 50% 50%;
  gap: 10px;
  width: 100%;
}

.section-header {
  margin: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
}

.section-title {
  font-size: 20px;
  line-height: 1;
  font-weight: 600;
  color: #ffffff;
  margin: 0;
  font-family: 'Jost', sans-serif;
}

.section-description {
  font-size: 1rem;
  color: #a0a0a0;
  margin: 0;
}

.settings-actions {
  margin-top: auto;
  text-align: center;
  padding-top: 20px;
}

.main {
  display: flex;
  flex-direction: column;
  min-height: calc(100vh - 80px);
  /* overflow-y: auto;
  overflow-x: hidden; */
}

/* .main::-webkit-scrollbar {
  width: 5px;
}

.main::-webkit-scrollbar-track {
  background: rgba(255, 255, 255, 0.05);
}

.main::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.2);
  border-radius: 5px;
}

.main::-webkit-scrollbar-thumb:hover {
  background: rgba(255, 255, 255, 0.3);
} */

/* Microphone List Styles */
.microphone-list {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.microphone-item {
  display: flex;
  align-items: center;
  cursor: pointer;
  transition: all 0.3s ease;
}

.microphone-item:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.2);
}

.microphone-item.selected {
  background: rgba(255, 255, 255, 0.1);
}

.mic-icon {
  width: 60px;
  height: 60px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 8px;
}

.mic-icon i {
  font-size: 30px;
  color: #b4b4b4;
}

.mic-info {
  flex: 1;
}

.mic-name {
  font-size: 1rem;
  font-weight: 500;
  color: #a0a0a0;
}

/* Microphone Selector */
.microphone-selector-wrapper {
  position: relative;
  width: 100%;
}

.microphone-display {
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-radius: 12px;
  cursor: pointer;
  transition: all 0.3s ease;
}

.microphone-display i {
  color: #a0a0a0;
  font-size: 14px;
  transition: transform 0.3s ease;
  flex-shrink: 0;
  margin-left: 12px;
}

.microphone-display.open i {
  transform: rotate(180deg);
}

.mic-display-content {
  flex: 1;
}

.mic-display-name {
  font-size: 16px;
  font-weight: 500;
  color: #ffffff;
}

.microphone-dropdown {
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  background: #1a1a1a;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 12px;
  max-height: 300px;
  overflow-y: auto;
  overflow-x: hidden;
  z-index: 1000;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.5);
  display: none;
  min-width: 100%;
  width: max-content;
}

.microphone-dropdown.show {
  display: block;
  animation: slideDown 0.3s ease;
}

@keyframes slideDown {
  from {
    opacity: 0;
    transform: translateY(-10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.microphone-dropdown .microphone-list {
  display: flex;
  flex-direction: column;
  gap: 0;
}

.microphone-dropdown .microphone-item {
  padding: 14px 16px;
  cursor: pointer;
  transition: all 0.2s ease;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.microphone-dropdown .microphone-item:last-child {
  border-bottom: none;
}

.microphone-dropdown .microphone-item:hover {
  background: rgba(255, 255, 255, 0.08);
}

.microphone-dropdown .microphone-item.selected {
  background: rgba(255, 255, 255, 0.12);
  color: #ffffff;
}

.microphone-dropdown .microphone-item .mic-name {
  color: #a0a0a0;
  font-size: 1rem;
  white-space: nowrap;
}

.microphone-dropdown .microphone-item:hover .mic-name {
  color: #ffffff;
}

.microphone-dropdown .microphone-item.selected .mic-name {
  color: #ffffff;
  font-weight: 600;
}

.section-content {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 10px
}

.no-microphones {
  text-align: center;
  color: #a0a0a0;
  font-style: italic;
  padding: 2rem;
}

/* Button Styles */
.cta {
  background: linear-gradient(135deg, #2dc165 0%, #1e8b4a 100%);
  color: white;
  border: none;
  padding: 14px 24px;
  border-radius: 8px;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  font-family: 'Inter', sans-serif;
}

.cta:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none;
}

.cta.dark {
  background: linear-gradient(135deg, #0572FF 0%, #034499 100%);
  /* border: 1px solid rgba(255, 255, 255, 0.2); */
}

.cta.dark:hover:not(:disabled) {
  background: linear-gradient(135deg, #0d7fff 0%, #0444aa 100%);
}

/* Full width container */
.settings-container-full {
  grid-column: 1 / -1;
}

.section-content.full-width {
  width: 100%;
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
}

/* Button Icon */
.btn-icon {
  background: transparent;
  border: 0px solid;
  border-radius: 8px;
  width: 28px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.3s ease;
  color: #ffffff;
  padding: 0;
}

.btn-icon:hover {
  background: rgba(255, 255, 255, 0.15);
  border-color: rgba(255, 255, 255, 0.3);
}

.btn-icon:active {
  transform: translateY(0);
}

.btn-icon i {
  font-size: 18px;
}

.btn-icon.btn-danger {
  color: #dc3545;
}

.checkbox-label {
  display: flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  -webkit-user-select: none;
  user-select: none;
  color: #a0a0a0;
  font-size: 0.95rem;
  transition: color 0.2s ease;
}

.checkbox-label:hover {
  color: #ffffff;
}

.checkbox-label input[type="checkbox"] {
  width: 18px;
  height: 18px;
  min-width: 18px;
  min-height: 18px;
  cursor: pointer;
  accent-color: #2baa5b;
  margin: 0;
  padding: 0;
  -webkit-appearance: none;
  -moz-appearance: none;
  appearance: none;
  background-color: rgba(255, 255, 255, 0.1);
  border: 2px solid rgba(255, 255, 255, 0.3);
  border-radius: 4px;
  position: relative;
  transition: all 0.2s ease;
  flex-shrink: 0;
}

.checkbox-label input[type="checkbox"]:checked {
  background-color: #2baa5b;
  border-color: #2baa5b;
  accent-color: #2baa5b;
}

.checkbox-label input[type="checkbox"]:checked::after {
  content: '';
    position: absolute;
    left: 4px;
    top: 1px;
    width: 4px;
    height: 8px;
    border: solid white;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
}

.checkbox-label input[type="checkbox"]:hover:not(:disabled) {
  border-color: #2baa5b;
  background-color: rgba(43, 170, 91, 0.1);
}

.checkbox-label input[type="checkbox"]:hover:not(:disabled):checked {
  background-color: #2baa5b;
  border-color: #2baa5b;
}

.checkbox-label input[type="checkbox"]:disabled {
  accent-color: transparent;
  background-color: rgba(255, 255, 255, 0.05);
  border: 2px solid rgba(255, 255, 255, 0.2);
  opacity: 0.5;
  cursor: not-allowed;
}

.checkbox-label input[type="checkbox"]:disabled:checked {
  background-color: rgba(43, 170, 91, 0.3);
  border-color: rgba(43, 170, 91, 0.5);
}

.checkbox-label span {
  line-height: 1.5;
}

/* Apps Table Container */
.apps-table-container {
  width: 100%;
  position: relative;
}

/* Loading State */
.loading-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 16px;
  padding: 60px 20px;
  color: #a0a0a0;
  min-height: 300px;
}

.loading-state i {
  font-size: 32px;
  color: #2dc165;
}

.loading-state span {
  font-size: 1rem;
}

/* Error State */
.error-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 60px 20px;
  color: #dc3545;
  min-height: 300px;
}

.error-state i {
  font-size: 32px;
}

.error-state span {
  font-size: 1rem;
  text-align: center;
}

/* Empty State */
.empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 42px 20px;
  color: #a0a0a0;
  text-align: center;
}

.empty-state i {
  font-size: 48px;
  opacity: 0.5;
}

.empty-state p {
  margin: 0;
  font-size: 1.1rem;
  font-weight: 500;
  color: #ffffff;
}

.empty-state small {
  font-size: 0.9rem;
  color: #a0a0a0;
}

/* Apps Table */
#apps-table, #websites-table {
  width: 100%;
  border-radius: 4px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: #171717;
  display: flex;
  flex-direction: column;
  max-height: 600px;
  overflow: hidden;
}

.apps-table-header {
  display: grid;
  grid-template-columns: 60px 1fr 100px;
  padding: 0px 15px 0 0;
  background: rgba(255, 255, 255, 0.05);
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  font-weight: 600;
  font-size: 0.9rem;
  color: #a0a0a0;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  line-height: 1.7;
}

.apps-table-body {
  display: flex;
  flex-direction: column;
  overflow-y: auto;
  overflow-x: hidden;
  max-height: 200px;
}

.apps-table-body::-webkit-scrollbar {
  width: 8px;
}

.apps-table-body::-webkit-scrollbar-track {
  background: rgba(255, 255, 255, 0.05);
}

.apps-table-body::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.2);
  border-radius: 4px;
}

.apps-table-body::-webkit-scrollbar-thumb:hover {
  background: rgba(255, 255, 255, 0.3);
}

.apps-table-row {
  display: grid;
  grid-template-columns: 60px 1fr 100px;
  padding: 0px 10px 0px 0px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  transition: all 0.2s ease;
  align-items: center;
  cursor: pointer;
  /* background: #232323; */
}

.apps-table-row:last-child {
  border-bottom: none;
}

.apps-table-row:hover {
  background: rgba(255, 255, 255, 0.05);
}

.apps-table-row.system-app {
  opacity: 0.7;
}

/* App Columns */
.app-icon-col {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 35px;
}

.app-icon {
  width: 40px;
  height: 25px;
  object-fit: contain;
  border-radius: 8px;
}

.app-icon-placeholder {
  font-size: 24px;
  background: linear-gradient(135deg, #0572FF 0%, #034499 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  color: transparent;
}

.app-name-col {
  display: flex;
  align-items: center;
  gap: 12px;
  flex: 1;
  min-width: 0;
  line-height: 1;
}

.app-name {
  font-size: 1rem;
  font-weight: 500;
  color: #c5c5c5;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.badge {
  display: inline-flex;
  align-items: center;
  padding: 4px 10px;
  border-radius: 12px;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.system-badge {
  background: rgb(0 2 116 / 20%);
  color: #4389ff;
  border: 1px solid rgb(155 153 236 / 30%);
}

.app-actions-col {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
}

/* Apps Stats */
.apps-stats {
  color: #a0a0a0;
  font-size: 0.95rem;
}

.apps-stats strong {
  color: #ffffff;
  font-weight: 600;
}

/* Responsive */
@media (max-width: 768px) {
  .settings-container {
    padding: 1rem;
  }
  
  .settings-section {
    padding: 1.5rem;
  }

  .apps-table-header,
  .apps-table-row {
    grid-template-columns: 50px 1fr 80px;
    gap: 12px;
    padding: 12px 16px;
  }

  .app-icon-col {
    width: 32px;
    height: 32px;
  }

  .app-icon {
    width: 32px;
    height: 32px;
  }
}

.hidden-badge {
  background: rgb(122 128 13 / 20%);
  color: #ddad13;
  border: 1px solid rgb(108 118 70 / 30%);
}

.dropdown-wrapper {
  position: relative;
}

.dropdown-menu {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  background: #1a1a1a;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 12px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.5);
  z-index: 1000;
  display: none;
  min-width: 240px;
  overflow: hidden;
}

.dropdown-menu.show {
  display: block;
  animation: slideDown 0.3s ease;
}

.dropdown-content {
  padding: 8px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.dropdown-content .checkbox-label {
  padding: 8px 12px;
  margin: 0;
  border-radius: 8px;
  transition: background 0.2s ease;
}

.dropdown-content .checkbox-label:hover {
  background: rgba(255, 255, 255, 0.08);
}

.search-wrapper {
  position: relative;
  display: flex;
  align-items: center;
  margin-right: 8px;
}

.search-icon {
  position: absolute;
  left: 12px;
  color: rgba(255, 255, 255, 0.5);
  font-size: 14px;
  pointer-events: none;
}

.search-input {
  width: 250px;
  padding: 8px 12px 8px 36px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 6px;
  color: #ffffff;
  font-size: 14px;
  transition: all 0.2s;
  font-family: 'Jost', sans-serif;
}

.search-input::placeholder {
  color: rgba(255, 255, 255, 0.4);
}

.search-input:focus {
  outline: none;
  border-color: rgba(255, 255, 255, 0.3);
  background: rgba(255, 255, 255, 0.08);
}

.header-actions {
  display: flex;
  gap: 8px;
}

/* Модальные окна */
.modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
}

.modal-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.6);
  -webkit-backdrop-filter: blur(4px);
  backdrop-filter: blur(4px);
}

.modal-content {
  position: relative;
  background: #121212;
  border-radius: 12px;
  width: 90%;
  max-width: 500px;
  max-height: 90vh;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  z-index: 1001;
}

.modal-content-small {
  max-width: 400px;
}

.modal-header {
  padding: 15px 20px;
  border-bottom: 1px solid var(--border-color, rgba(255, 255, 255, 0.1));
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.modal-header h3 {
  margin: 0;
  font-size: 20px;
  font-weight: 600;
  color: var(--text-primary);
}

.modal-close {
  background: none;
  border: none;
  color: var(--text-secondary);
  font-size: 20px;
  cursor: pointer;
  padding: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: 6px;
  transition: all 0.2s;
}

.modal-close:hover {
  background: var(--bg-tertiary);
  color: var(--text-primary);
}

.modal-body {
  padding: 5px 24px;
  overflow-y: auto;
  flex: 1;
}

.modal-footer {
  padding: 16px 24px;
  border-top: 1px solid var(--border-color);
  display: flex;
  gap: 8px;
  justify-content: flex-end;
}

.modal-footer > div {
  display: flex;
  gap: 8px;
  width: 100%;
}

/* .modal-footer .btn {
  flex: 1;
} */

.modal-footer .btn:not(:first-child) {
  flex: 2 0 auto;
}

/* Формы */
.form-group {
  margin-bottom: 10px;
}

.form-group label {
  display: block;
  font-weight: 500;
  color: #a0a0a0;
  font-size: 14px;
  margin: 2px 5px;
}

.form-group input[type="text"],
.form-group input[type="url"] {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid var(--border-color);
  border-radius: 8px;
  background: #1f1f1f;
  color: var(--text-primary);
  font-size: 14px;
  transition: all 0.2s;
  box-sizing: border-box;
}

.form-group input[type="text"]:focus,
.form-group input[type="url"]:focus {
  outline: none;
  border-color: var(--accent-color);
  box-shadow: 0 0 0 3px rgba(var(--accent-rgb), 0.1);
}

.form-hint {
  display: block;
  margin-top: 6px;
  font-size: 12px;
  color: #a0a0a0;
  margin-left: 5px;
}

.form-error {
  padding: 12px;
  background: rgba(220, 53, 69, 0.1);
  border: 1px solid rgba(220, 53, 69, 0.3);
  border-radius: 8px;
  color: #dc3545;
  font-size: 14px;
  margin-top: 12px;
}

/* Кнопки */
.btn {
  padding: 10px 20px;
  border: none;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 500;
  /* letter-spacing: 0.5px; */
  line-height: 1;
  cursor: pointer;
  transition: all 0.2s;
  align-items: center;
  gap: 8px;
  background: linear-gradient(135deg, #0572FF 0%, #034499 100%);
  font-family: "Jost", ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, Ubuntu, Cantarell, Noto Sans, Helvetica, Arial, "Apple Color Emoji", "Segoe UI Emoji";
}

.btn-primary {
  background: var(--accent-color);
  color: white;
}

.btn-primary:hover {
  opacity: 0.9;
  transform: translateY(-1px);
}

.btn-secondary {
  background: linear-gradient(135deg, #28a745 0%, #1e7e34 100%);
  color: #ffffff;
}

.btn-danger {
  color: white;
}

.btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none;
}

/* Уведомления */
.notification-container {
  position: fixed;
  top: 30px;
  right: 20px;
  z-index: 2000;
  display: flex;
  flex-direction: column;
  gap: 12px;
  max-width: 400px;
}

.notification {
  padding: 16px 20px;
  border-radius: 8px;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.2);
  display: flex;
  align-items: center;
  gap: 12px;
  animation: slideIn 0.3s ease-out;
  min-width: 300px;
}

@keyframes slideIn {
  from {
    transform: translateX(100%);
    opacity: 0;
  }
  to {
    transform: translateX(0);
    opacity: 1;
  }
}

.notification-success {
  background: #28a745;
  color: white;
}

.notification-error {
  background: #dc3545;
  color: white;
}

.notification-info {
  background: #17a2b8;
  color: white;
}

.notification-icon {
  font-size: 20px;
}

.notification-message {
  flex: 1;
  font-size: 14px;
}

.notification-close {
  background: none;
  border: none;
  color: rgba(255, 255, 255, 0.8);
  cursor: pointer;
  font-size: 18px;
  padding: 0;
  width: 24px;
  height: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 4px;
  transition: all 0.2s;
}

.notification-close:hover {
  background: rgba(255, 255, 255, 0.2);
  color: white;
}

p {
  margin: 0 0 0 0;
  font-size: 18px;
  font-weight: 400;
  letter-spacing: 0.3px;
  color: var(--text);
}

small.website-url {
  color: #656565;
}

#profile-save-btn {
  display: none;
}


@media (max-width: 930px) {

  #profile-save-btn {
    display: block;
  }

  .apps-table-body{
    max-height: 177px;
  }

  .search-input {
    width: 195px;
  }

  .section-title {
    font-size: 16px;
  }
  
  .mic-display-name {
    font-size: 11px;
  }

  .section-content {
    gap: 5px;
  }

  .mic-icon {
    width: 45px;
    height: 45px;
  }

  .mic-icon i {
    font-size: 20px;
  }
}