.settings-tabs {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  border-bottom: 1px solid #dce4f1;
  margin: 0 0 26px;
  padding-bottom: 10px;
}
.settings-tabs button {
  border: 0;
  border-radius: 9px;
  background: transparent;
  color: #62728a;
  padding: 12px 16px;
  font: inherit;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
}
.settings-tabs button[aria-selected="true"],
.settings-tabs button.selected {
  background: #0a2171;
  color: white;
}
.settings-tabs button:focus-visible,
.profile-menu summary:focus-visible {
  outline: 3px solid #72b0ed;
  outline-offset: 3px;
}
#settings-panel > .heading h1 {
  font-size: 23px;
}
#settings-panel [hidden] {
  display: none !important;
}
.profile-content .pad {
  padding: 26px;
}
.profile-content h2 {
  font-size: 20px;
  margin-bottom: 18px;
}
.profile-content p {
  line-height: 1.65;
}
.profile-content .split {
  align-items: start;
}
.profile-content form .btn {
  margin-top: 12px;
}
.profile-menu {
  width: 100%;
  position: relative;
}
.profile-menu summary {
  list-style: none;
  display: flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  border-radius: 8px;
  padding: 4px;
}
.profile-menu summary::-webkit-details-marker {
  display: none;
}
.profile-menu summary > span:nth-child(2) {
  flex: 1;
  min-width: 0;
}
.profile-menu summary strong {
  display: block;
  overflow-wrap: anywhere;
}
.profile-menu-items {
  position: absolute;
  bottom: calc(100% + 10px);
  left: -8px;
  width: 245px;
  padding: 8px;
  border: 1px solid #dce4f1;
  border-radius: 12px;
  box-shadow: 0 8px 35px #0a217122;
  background: white;
  z-index: 40;
}
.profile-menu-items button {
  display: block;
  width: 100%;
  padding: 12px;
  border: 0;
  border-radius: 8px;
  background: white;
  color: #172751;
  text-align: left;
  font: inherit;
  font-size: 13px;
  cursor: pointer;
}
.profile-menu-items button:hover {
  background: #edf2ff;
}
.mfa-qr {
  display: block;
  width: 240px;
  height: 240px;
  max-width: 100%;
  margin: 20px auto;
  border: 1px solid #dde4ef;
}
.mfa-secret {
  display: block;
  overflow-wrap: anywhere;
  padding: 16px;
  background: #f0f4fa;
  border-radius: 8px;
  margin: 12px 0;
}
.recovery-codes {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin: 20px 0;
}
.recovery-codes code {
  padding: 10px;
  background: #eef3fa;
  border-radius: 6px;
  overflow-wrap: anywhere;
}
.mobile-profile {
  display: none;
}
@media (max-width: 760px) {
  .mobile-profile {
    display: inline-flex;
  }
  .profile-content .split {
    grid-template-columns: 1fr;
  }
  .settings-tabs {
    gap: 3px;
  }
  .settings-tabs button {
    padding: 10px;
    font-size: 12px;
  }
  .recovery-codes {
    grid-template-columns: 1fr;
  }
}
.profile-menu-items {
  position: fixed;
  bottom: 82px;
  left: 16px;
  width: 245px;
  max-width: calc(100vw - 32px);
}
/* Responsive settings: nothing is clipped or pushed beyond the viewport. */
#settings-panel {
  min-width: 0;
}
#finance-settings {
  display: grid;
  gap: 22px;
}
#finance-settings[hidden] {
  display: none !important;
}
.config-section {
  margin: 0;
  min-width: 0;
}
.config-section .cardhead {
  gap: 16px;
  align-items: center;
  flex-wrap: wrap;
}
.config-section .cardhead .subtitle {
  margin: 7px 0 0;
  line-height: 1.5;
}
.config-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 250px), 1fr));
  gap: 12px;
}
.config-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-width: 0;
  width: 100%;
  padding: 16px;
  border: 1px solid #dce4f1;
  border-radius: 12px;
  background: white;
  color: #18284f;
  text-align: left;
  white-space: normal;
  cursor: pointer;
  font: inherit;
  font-size: 14px;
  line-height: 1.45;
}
.config-item:hover {
  border-color: #8aa7dd;
  background: #f6f8ff;
}
.config-item:focus-visible {
  outline: 3px solid #91b9f3;
  outline-offset: 2px;
}
.config-item strong,
.config-item small {
  display: block;
  overflow-wrap: anywhere;
}
.config-item small {
  color: #6c7c94;
  font-size: 12px;
  margin-top: 5px;
}
.config-item .icon {
  flex-shrink: 0;
  width: 17px;
  color: #7185a2;
}
.config-search {
  display: block;
  margin-bottom: 20px;
  max-width: 480px;
}
.config-search span {
  display: block;
  color: #62728a;
  font-size: 13px;
  margin-bottom: 8px;
}
.config-search input {
  width: 100%;
}
.vat-country + .vat-country {
  margin-top: 24px;
}
.vat-country h3 {
  font-size: 14px;
  color: #5d7191;
  margin: 0 0 12px;
}
.config-empty {
  padding: 12px 0;
}
.connection-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 22px;
  margin-bottom: 22px;
}
.connection-grid .card {
  display: flex;
  flex-direction: column;
  margin: 0;
  min-width: 0;
}
.connection-grid .cardhead {
  align-items: start;
  flex-wrap: wrap;
  gap: 12px;
}
.connection-grid .pad {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 18px;
}
.connection-grid p {
  line-height: 1.6;
  margin: 0;
}
.connection-grid .actions {
  flex-wrap: wrap;
  margin-top: auto;
  gap: 10px;
}
.connection-grid .btn {
  white-space: normal;
  height: auto;
  max-width: 100%;
  overflow-wrap: anywhere;
}
.connection-grid .pad > .btn {
  align-self: start;
  margin-top: auto;
}
#settings-panel .file-row {
  flex-wrap: wrap;
  gap: 16px;
}
#settings-panel .file-row .actions {
  flex-wrap: wrap;
}
#settings-panel .file-row > div {
  min-width: 0;
}
#settings-panel .file-row small {
  overflow-wrap: anywhere;
}
.menu-order-hint {
  font-size: 10px;
  line-height: 1.5;
  color: #8090a5;
  margin: 6px 10px 0;
  display: block;
}
.nav [data-nav] {
  user-select: none;
  -webkit-user-select: none;
  touch-action: pan-y;
}
.nav.menu-reordering {
  user-select: none;
}
.nav .menu-dragging {
  cursor: grabbing;
  background: #dfe9fc !important;
  box-shadow: 0 3px 12px #0a217126;
  outline: 2px dashed #769bd8;
  outline-offset: -2px;
}
.nav.menu-reordering [data-nav] {
  cursor: grabbing;
}
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}
@media (max-width: 1000px) {
  .connection-grid {
    grid-template-columns: 1fr;
  }
}
@media (max-width: 760px) {
  .menu-order-hint {
    margin: 8px 4px 0;
  }
  .nav [data-nav] {
    touch-action: pan-x;
  }
  .config-section .pad {
    padding: 18px;
  }
  .config-section .cardhead {
    padding: 18px;
  }
}
