﻿/*
 * Settings cards, settings usage, API key/settings forms.
 * Extracted from public/styles.css lines 1718-1952.
 */

.settings-hint {
  margin-left: 172px;
  margin-top: -6px;
  margin-bottom: 12px;
}

.settings-page {
  display: flex;
  flex-direction: column;
  height: 100%;
  max-height: 100%;
  min-height: 0;
  overflow: hidden;
  overscroll-behavior: contain;
  padding-bottom: 0;
  box-sizing: border-box;
}

.settings-page.section.scrollable {
  overflow: hidden;
}

.settings-page-title {
  margin: 0 0 12px;
  flex: 0 0 auto;
}

.settings-shell {
  display: grid;
  grid-template-columns: 168px minmax(0, 1fr);
  gap: 18px;
  flex: 1 1 auto;
  min-height: 0;
  overflow: hidden;
}

.settings-nav {
  display: flex;
  flex-direction: column;
  gap: 6px;
  align-self: start;
  position: sticky;
  top: 0;
  padding: 10px;
  border: 1px solid rgba(231, 199, 143, 0.14);
  border-radius: 16px;
  background: rgba(31, 26, 22, 0.84);
}

.settings-nav-item {
  width: 100%;
  min-height: 38px;
  margin: 0;
  padding: 8px 12px;
  border: 1px solid transparent;
  border-radius: 12px;
  background: transparent;
  color: #d8cbb8;
  text-align: left;
  font-weight: 700;
}

.settings-nav-item:hover {
  background: rgba(67, 57, 47, 0.72);
  color: #fff7eb;
}

.settings-nav-item.active {
  border-color: rgba(231, 199, 143, 0.28);
  background: linear-gradient(180deg, rgba(231, 199, 143, 0.14), rgba(231, 199, 143, 0.07));
  color: #fff7eb;
}

.settings-scroll-content {
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  overflow-x: hidden;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
  padding-bottom: 24px;
  scrollbar-width: thin;
}

.settings-content {
  width: 100%;
  max-width: 880px;
}

.settings-section {
  display: none;
}

.settings-section.active {
  display: block;
}

/* Select inside .field rows */
.field select {
  flex: 1;
  padding: 7px 10px;
  background: #1a1d23;
  border: 1px solid #2a2f3a;
  border-radius: 6px;
  color: #eee;
  font-size: 13px;
  cursor: pointer;
}

.field select:focus {
  outline: none;
  border-color: #3b82f6;
}

/* AI Studio bot pair columns in Settings */
.settings-bot-pair {
  display: flex;
  gap: 20px;
}

.settings-studio-session-controls {
  display: none;
}

.settings-studio-control-slot {
  display: grid;
  gap: 8px;
}

.settings-bot-col {
  flex: 1;
  min-width: 0;
}

.settings-bot-col .mai-bot-header {
  margin-bottom: 8px;
}

.settings-bot-col label {
  display: block;
  font-size: 11px;
  color: #6b7280;
  margin-bottom: 4px;
}

.settings-bot-col select {
  width: 100%;
  box-sizing: border-box;
  padding: 6px 8px;
  background: #1a1d23;
  border: 1px solid #2a2f3a;
  border-radius: 6px;
  color: #eee;
  font-size: 12px;
  cursor: pointer;
}

.settings-bot-col select:focus {
  outline: none;
  border-color: #3b82f6;
}

/* Primary CHAT card accent */
.settings-card-primary {
  border-color: #1e3a5f;
}

.settings-card-primary h3 {
  color: #93c5fd;
}

/* Divider between field groups within a card */
.settings-divider {
  border: none;
  border-top: 1px solid #2a2f3a;
  margin: 16px 0;
}

.settings-usage-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 3px 0;
}

.settings-usage-label {
  font-size: 12px;
  color: #6b7280;
}

.settings-usage-value {
  font-size: 12px;
  color: #9ca3af;
  font-variant-numeric: tabular-nums;
}

.settings-usage-divider {
  border-top: 1px solid #1e2430;
  margin: 6px 0 4px;
}

.settings-usage-provider-row .settings-usage-label {
  color: #55616f;
}

.settings-usage-provider-row .settings-usage-value {
  color: #6b7280;
}

/* ---- Access section ---- */
.access-recovery-block {
  margin-bottom: 16px;
  padding: 13px 15px;
  border: 1px solid rgba(248, 113, 113, 0.28);
  border-radius: 10px;
  background: rgba(127, 29, 29, 0.18);
  color: #fca5a5;
  font-size: 13px;
  line-height: 1.5;
}

.access-recovery-title {
  font-size: 13px;
  font-weight: 800;
  color: #fca5a5;
  margin-bottom: 5px;
}

.access-recovery-body {
  font-size: 13px;
  color: rgba(252, 165, 165, 0.88);
  line-height: 1.5;
}

.access-recovery-cta {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px 12px;
  margin-top: 11px;
  font-size: 12px;
  color: rgba(252, 165, 165, 0.7);
}

.access-recovery-action {
  background: rgba(252, 165, 165, 0.12);
  border: 1px solid rgba(252, 165, 165, 0.3);
  border-radius: 999px;
  color: #fca5a5;
  font-size: 12px;
  font-weight: 700;
  padding: 5px 13px;
  cursor: pointer;
  white-space: nowrap;
}

.access-recovery-action:hover {
  background: rgba(252, 165, 165, 0.2);
}

.access-recovery-note {
  margin-top: 8px;
  font-size: 12px;
  color: rgba(252, 165, 165, 0.65);
  line-height: 1.4;
}

.access-status-block {
  display: grid;
  gap: 4px;
  margin-bottom: 8px;
  padding: 12px 14px;
  border: 1px solid rgba(231, 199, 143, 0.1);
  border-radius: 10px;
  background: rgba(24, 21, 18, 0.42);
}

.access-status-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 3px 0;
}

.access-status-label {
  font-size: 12px;
  color: #6b7280;
}

.access-status-value {
  font-size: 13px;
  color: #d8cbb8;
  font-weight: 700;
}

.access-balance-row {
  border-top: 1px solid rgba(231, 199, 143, 0.07);
  padding-top: 6px;
  margin-top: 2px;
}

.access-balance-value {
  font-size: 15px;
  color: #86efac;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
}

.access-usage-block {
  margin-bottom: 4px;
}

.access-usage-divider {
  border: none;
  border-top: 1px solid rgba(42, 47, 58, 0.6);
  margin: 12px 0;
}

.access-keys-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 10px;
}

.access-keys-title {
  font-size: 11px;
  font-weight: 800;
  color: #6b7280;
  letter-spacing: 0.07em;
  text-transform: uppercase;
}

.access-keys-toggle {
  margin-left: auto;
  background: none;
  border: none;
  padding: 3px 0;
  color: #a99a86;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  text-decoration: underline;
  text-underline-offset: 2px;
  text-decoration-color: rgba(169, 154, 134, 0.35);
  white-space: nowrap;
}

.access-keys-toggle:hover {
  color: #d8cbb8;
  text-decoration-color: rgba(216, 203, 184, 0.4);
}

.access-keys-toggle:focus-visible {
  outline: 2px solid rgba(231, 199, 143, 0.45);
  outline-offset: 3px;
  border-radius: 3px;
}

/* Access mode switcher */
.access-mode-switcher {
  margin-bottom: 4px;
}

.access-mode-divider {
  border: none;
  border-top: 1px solid rgba(42, 47, 58, 0.6);
  margin: 12px 0;
}

.access-mode-label {
  font-size: 11px;
  font-weight: 800;
  color: #6b7280;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  margin-bottom: 10px;
}

.access-mode-options {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.access-mode-option {
  display: flex;
  align-items: flex-start;
  gap: 9px;
  padding: 10px 12px;
  border: 1px solid rgba(42, 47, 58, 0.5);
  border-radius: 8px;
  cursor: pointer;
  background: rgba(24, 21, 18, 0.25);
  transition: border-color 0.15s, background 0.15s;
}

.access-mode-option:has(input:checked) {
  border-color: rgba(231, 199, 143, 0.35);
  background: rgba(231, 199, 143, 0.06);
}

.access-mode-option input[type="radio"] {
  margin-top: 2px;
  flex-shrink: 0;
  accent-color: #e7c78f;
}

.access-mode-option-body {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.access-mode-option-title {
  font-size: 13px;
  font-weight: 700;
  color: #d8cbb8;
}

.access-mode-option-desc {
  font-size: 12px;
  color: #6b7280;
  line-height: 1.4;
}

.access-mode-warning {
  margin-top: 8px;
  font-size: 12px;
  color: #a99a86;
  padding: 7px 10px;
  background: rgba(169, 154, 134, 0.07);
  border-radius: 5px;
}

.access-mode-status {
  min-height: 16px;
  margin-top: 6px;
  font-size: 12px;
  color: #86efac;
}

.access-keys-summary {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 4px;
  padding: 9px 13px;
  border: 1px solid rgba(211, 177, 128, 0.1);
  border-radius: 10px;
  background: rgba(17, 15, 13, 0.38);
  margin-bottom: 0;
}

.access-keys-summary-text {
  font-size: 12px;
  color: #6b7280;
}

.access-keys-summary-helper {
  font-size: 11.5px;
  line-height: 1.35;
  color: rgba(168, 158, 145, 0.68);
}

#access-keys-section.is-collapsed .api-provider-card,
#access-keys-section.is-collapsed .access-keys-footer-note {
  display: none;
}

.access-keys-footer-note {
  margin: 10px 0 0;
  color: #6b7280;
  font-size: 12px;
  line-height: 1.5;
}

.api-provider-card {
  display: grid;
  gap: 12px;
  margin-bottom: 14px;
  padding: 16px;
  border: 1px solid rgba(211, 177, 128, 0.15);
  border-radius: 14px;
  background: rgba(17, 15, 13, 0.5);
}

.api-provider-card.api-provider-inactive {
  opacity: 0.72;
}

.api-provider-card-head {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: start;
  gap: 12px;
}

.api-provider-icon {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 12px;
  background: rgba(231, 199, 143, 0.13);
  color: #e7c78f;
  font-weight: 900;
}

.api-provider-green .api-provider-icon { color: #8fd6a2; }
.api-provider-violet .api-provider-icon { color: #c6a7ff; }
.api-provider-blue .api-provider-icon { color: #9bc7ff; }
.api-provider-gold .api-provider-icon { color: #f3d487; }

.api-provider-card h4 {
  margin: 0;
  color: #f4e7d3;
  font-size: 16px;
}

.api-provider-card p {
  margin: 4px 0 0;
  color: #a99a86;
  font-size: 13px;
  line-height: 1.45;
}

.api-key-status-pill {
  border: 1px solid rgba(211, 177, 128, 0.18);
  border-radius: 999px;
  background: rgba(24, 21, 18, 0.6);
  color: #a99a86;
  font-size: 12px;
  font-weight: 700;
  padding: 6px 10px;
  text-align: center;
  white-space: nowrap;
}

.api-provider-links a {
  color: #e7c78f;
  font-size: 13px;
  font-weight: 700;
  text-decoration: none;
}

.api-provider-links a:hover {
  text-decoration: underline;
}

.api-provider-card > .field-hint {
  color: #8f806f;
  font-size: 12px;
  margin: 0 !important;
}

.api-key-inactive-badge {
  display: inline-flex;
  margin-left: 6px;
  padding: 2px 7px;
  border: 1px solid rgba(138, 180, 248, 0.24);
  border-radius: 999px;
  color: #a9c7ff;
  font-size: 11px;
  white-space: nowrap;
}

.api-key-input-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  gap: 8px;
  align-items: center;
}

.api-key-input-row input {
  min-width: 0;
}

.api-key-input-row div[data-lastpass-icon-root] {
  display: none !important;
}

.api-key-secondary,
.api-key-remove {
  min-height: 36px;
  border-radius: 999px;
  padding: 0 13px;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
}

.api-key-secondary {
  border: 1px solid rgba(231, 199, 143, 0.28);
  background: rgba(231, 199, 143, 0.1);
  color: #e7c78f;
}

.api-key-remove {
  border: 1px solid rgba(248, 113, 113, 0.18);
  background: transparent;
  color: #c9a09a;
}

.token-badge {
  font-size: 11px;
  color: #6b7280;
  padding: 2px 8px 6px;
  cursor: default;
  user-select: none;
}

.tooltip-wrap {
  position: relative;
  display: inline-block;
  margin-left: 4px;
  color: #4b5563;
  font-size: 11px;
  cursor: help;
  vertical-align: middle;
}

.tooltip-wrap:hover {
  color: #6b7280;
}

.tooltip-wrap .tooltip-text {
  visibility: hidden;
  opacity: 0;
  position: absolute;
  bottom: calc(100% + 6px);
  left: 50%;
  transform: translateX(-50%);
  width: 230px;
  background: #0f1115;
  border: 1px solid #374151;
  color: #9ca3af;
  font-size: 12px;
  font-weight: 400;
  line-height: 1.5;
  text-transform: none;
  letter-spacing: normal;
  padding: 7px 10px;
  border-radius: 6px;
  white-space: normal;
  pointer-events: none;
  z-index: 200;
  transition: opacity 0.15s;
}

.tooltip-wrap .tooltip-text.tooltip-floating {
  position: fixed;
  bottom: auto;
  transform: none;
  z-index: 1200;
  max-width: calc(100vw - 20px);
}

.tooltip-wrap:hover .tooltip-text {
  visibility: visible;
  opacity: 1;
}

.tooltip-wrap .tooltip-text.tooltip-visible {
  visibility: visible;
  opacity: 1;
}

.field input[type="text"],
.field input[type="number"] {
  flex: 1;
  padding: 7px 10px;
  background: #1a1d23;
  border: 1px solid #2a2f3a;
  border-radius: 6px;
  color: #eee;
  font-size: 13px;
}

.field input[type="text"]:focus,
.field input[type="number"]:focus {
  outline: none;
  border-color: #3b82f6;
}

.field input[type="checkbox"] {
  width: 16px;
  height: 16px;
  margin-top: 9px;
  cursor: pointer;
  accent-color: #3b82f6;
  flex-shrink: 0;
}

.field textarea {
  flex: 1;
  padding: 8px 10px;
  background: #1a1d23;
  border: 1px solid #2a2f3a;
  border-radius: 6px;
  color: #eee;
  font-size: 12px;
  font-family: "Courier New", monospace;
  min-height: 100px;
  max-height: 300px;
  resize: vertical;
  line-height: 1.5;
}

.field textarea:focus {
  outline: none;
  border-color: #3b82f6;
}

.settings-style-head .settings-hint {
  margin-left: 0;
  margin-top: 4px;
}

.settings-style-library {
  display: block;
  margin-top: 16px;
}

.settings-style-list-panel {
  min-width: 0;
  border: 1px solid rgba(231, 199, 143, 0.14);
  border-radius: 16px;
  background: rgba(24, 21, 18, 0.54);
  padding: 12px;
}

.settings-style-list-head,
.settings-style-editor-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.settings-style-list-head span,
.settings-style-kicker {
  color: #e7c78f;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.settings-style-list-head button,
.settings-style-delete {
  min-height: 34px;
  border: 1px solid rgba(231, 199, 143, 0.22);
  border-radius: 999px;
  background: rgba(231, 199, 143, 0.1);
  color: #e7c78f;
  font-size: 12px;
  font-weight: 800;
  padding: 0 12px;
}

.settings-style-delete {
  border-color: rgba(248, 113, 113, 0.18);
  background: transparent;
  color: #c9a09a;
}

.settings-style-delete:disabled {
  opacity: 0.42;
  cursor: not-allowed;
}

.settings-style-list {
  display: grid;
  gap: 10px;
  margin-top: 12px;
}

.settings-style-item {
  width: 100%;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto auto;
  align-items: center;
  gap: 10px;
  min-height: 62px;
  padding: 10px 12px;
  border: 1px solid rgba(231, 199, 143, 0.1);
  border-radius: 14px;
  background: rgba(43, 36, 29, 0.45);
  color: #f4e7d3;
  text-align: left;
  transition: background 160ms ease, border-color 160ms ease, box-shadow 160ms ease;
}

.settings-style-item:hover,
.settings-style-item.active {
  border-color: rgba(231, 199, 143, 0.34);
  background: rgba(67, 57, 47, 0.68);
}

.settings-style-item.active {
  box-shadow: 0 0 0 1px rgba(231, 199, 143, 0.06), 0 10px 24px rgba(0, 0, 0, 0.12);
}

.settings-style-item-icon {
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  border-radius: 999px;
  background: rgba(231, 199, 143, 0.11);
  color: #e7c78f;
}

.settings-style-item-copy {
  min-width: 0;
  display: grid;
  gap: 3px;
}

.settings-style-item-title,
.settings-style-item-preview {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.settings-style-item-title {
  font-size: 14px;
  font-weight: 800;
}

.settings-style-item-preview {
  color: #a99a86;
  font-size: 12px;
}

.settings-style-badge {
  align-self: start;
  border: 1px solid rgba(231, 199, 143, 0.16);
  border-radius: 999px;
  color: #bca98f;
  font-size: 10px;
  font-weight: 800;
  padding: 3px 7px;
}

.settings-style-chevron {
  color: #a99a86;
  font-size: 12px;
  font-weight: 900;
  line-height: 1;
  transform: rotate(0deg);
  transition: transform 160ms ease, color 160ms ease;
}

.settings-style-item.active .settings-style-chevron {
  color: #e7c78f;
  transform: rotate(180deg);
}

.settings-style-editor {
  min-width: 0;
  margin: 0 0 12px 42px;
  padding: 14px;
  border: 1px solid rgba(231, 199, 143, 0.14);
  border-radius: 16px;
  background: rgba(24, 21, 18, 0.62);
}

.settings-style-editor-head h4 {
  margin: 4px 0 0;
  color: #f4e7d3;
  font-size: 18px;
}

#set-styleGlobalHint {
  margin: 12px 0 0;
  padding: 9px 11px;
  border: 1px solid rgba(231, 199, 143, 0.14);
  border-radius: 12px;
  background: rgba(231, 199, 143, 0.07);
}

.settings-style-field {
  display: grid;
  gap: 7px;
  margin-top: 14px;
}

.settings-style-field label {
  color: #d8cbb8;
  font-size: 12px;
  font-weight: 800;
}

.settings-style-field input,
.settings-style-field textarea {
  width: 100%;
  box-sizing: border-box;
  border: 1px solid rgba(231, 199, 143, 0.16);
  border-radius: 12px;
  background: rgba(17, 19, 23, 0.76);
  color: #f4e7d3;
  font: inherit;
}

.settings-style-field input {
  min-height: 44px;
  padding: 10px 13px;
  line-height: 1.35;
}

.settings-style-field textarea {
  min-height: 190px;
  padding: 13px 14px;
  resize: vertical;
  line-height: 1.55;
  font-family: inherit;
}

.settings-style-actions {
  display: flex;
  justify-content: flex-end;
  margin-top: 14px;
}

.settings-style-hidden-select {
  display: none;
}

.settings-style-empty {
  color: #a99a86;
  padding: 14px;
  text-align: center;
}

@media (max-width: 768px) {
  .settings-page.section.scrollable {
    padding-bottom: 0;
  }

  .settings-shell {
    display: flex;
    flex-direction: column;
    flex: 1 1 auto;
    gap: 10px;
    min-height: 0;
    overflow: hidden;
  }

  .settings-nav {
    position: relative;
    top: auto;
    z-index: 6;
    flex: 0 0 auto;
    flex-direction: row;
    align-self: stretch;
    gap: 8px;
    padding: 8px 0 10px;
    border: 0;
    border-radius: 0;
    background: linear-gradient(180deg, #120f0c 0%, rgba(18, 15, 12, 0.92) 100%);
    overflow-x: auto;
    overflow-y: hidden;
    overscroll-behavior-x: contain;
    overscroll-behavior-y: none;
    touch-action: pan-x;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
  }

  .settings-nav::-webkit-scrollbar {
    display: none;
  }

  .settings-nav-item {
    flex: 0 0 auto;
    width: auto;
    min-height: 42px;
    padding: 9px 14px;
    border-radius: 999px;
    white-space: nowrap;
    font-size: 14px;
  }

  .settings-content {
    max-width: none;
    padding-bottom: calc(20px + env(safe-area-inset-bottom, 0px));
  }

  .settings-scroll-content {
    flex: 1 1 auto;
    min-height: 0;
    overflow-y: auto;
    overflow-x: hidden;
  }

  .settings-bot-pair {
    flex-direction: column;
    gap: 14px;
  }

  .settings-studio-session-controls {
    display: grid;
    gap: 10px;
    margin: 0 0 14px;
    padding: 12px 12px 13px;
    border: 1px solid rgba(245, 239, 230, 0.08);
    border-radius: 16px;
    background: rgba(245, 239, 230, 0.028);
  }

  .settings-studio-session-controls .settings-hint {
    margin: -2px 0 2px;
  }

  .settings-studio-session-controls #mai-orchestration {
    width: 100% !important;
    max-width: none !important;
    height: 46px !important;
    min-height: 46px !important;
    box-sizing: border-box !important;
    padding: 0 38px 0 16px !important;
    border-radius: 999px !important;
  }

  #settings-studio-quick-slot .mai-mobile-quick-controls.visible {
    display: grid !important;
    align-items: center !important;
    justify-content: stretch !important;
    gap: 9px !important;
    width: 100% !important;
    min-height: 0 !important;
    padding: 0 !important;
    border: 0 !important;
    background: transparent !important;
  }

  #settings-studio-quick-slot .mai-session-control {
    display: grid !important;
    grid-template-columns: minmax(0, 1fr) auto !important;
    align-items: center !important;
    column-gap: 12px !important;
    min-height: 40px !important;
    padding: 0 !important;
    border: 0 !important;
    background: transparent !important;
  }

  #settings-studio-quick-slot .mai-session-control-rounds {
    margin-left: 0 !important;
    grid-template-columns: minmax(0, 1fr) auto auto !important;
  }

  #settings-studio-quick-slot .mai-session-control-rounds .mai-mobile-control-label {
    display: inline-flex !important;
  }

  #settings-studio-quick-slot .mai-mobile-control-label {
    align-items: center !important;
    min-width: 0 !important;
    color: rgba(216, 203, 184, 0.78) !important;
    font-size: 12px !important;
    letter-spacing: 0.13em !important;
    line-height: 1.2 !important;
  }

  #settings-studio-quick-slot .tooltip-wrap {
    opacity: 0.58 !important;
  }

  #settings-studio-quick-slot .mai-switch {
    justify-self: end !important;
    width: 46px !important;
    min-width: 46px !important;
    height: 30px !important;
  }

  #settings-studio-quick-slot .mai-switch span {
    width: 22px !important;
    height: 22px !important;
  }

  #settings-studio-quick-slot .mai-switch.is-on span {
    transform: translateX(16px) !important;
  }

  #settings-studio-quick-slot .mai-round-stepper {
    justify-self: end !important;
    width: auto !important;
    min-width: 76px !important;
    height: 40px !important;
  }

  #settings-studio-quick-slot .mai-round-stepper .mai-ctrl-input,
  #settings-studio-quick-slot .mai-round-stepper select.mai-ctrl-input,
  #settings-studio-quick-slot #mai-maxRounds {
    width: 76px !important;
    min-width: 76px !important;
    max-width: 76px !important;
    height: 40px !important;
    min-height: 40px !important;
    padding: 0 30px 0 18px !important;
    font-size: 16px !important;
    text-align: left !important;
  }

  #settings-studio-quick-slot .mai-stop-ctrl-btn {
    justify-self: end !important;
    width: 36px !important;
    min-width: 36px !important;
    height: 36px !important;
    min-height: 36px !important;
    line-height: 36px !important;
  }

  .settings-style-library {
    margin-top: 12px;
  }

  .settings-style-editor {
    margin: 0 0 12px;
    padding: 14px;
  }

  .settings-style-editor-head {
    align-items: flex-start;
  }

  .settings-style-field textarea {
    min-height: 180px;
  }

  .api-provider-card-head {
    grid-template-columns: auto minmax(0, 1fr);
  }

  .api-key-status-pill {
    grid-column: 1 / -1;
    justify-self: start;
  }

  .api-key-input-row {
    grid-template-columns: 1fr 1fr;
  }

  .api-key-input-row input {
    grid-column: 1 / -1;
    min-height: 44px;
  }

  /* Access section mobile */
  .access-status-block {
    padding: 10px 12px;
  }

  .access-keys-header {
    gap: 6px;
  }

  .access-keys-toggle {
    font-size: 11px;
  }

  .access-recovery-cta {
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
  }
}

/* ---- Change Password subsection ---- */
.change-pw-form h4 {
  margin: 0 0 12px;
}
.change-pw-form .field {
  margin-bottom: 10px;
}
.change-pw-form input[type="password"] {
  min-height: 34px;
  padding: 5px 11px;
  box-sizing: border-box;
  width: 100%;
}
.change-pw-stack {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 5px;
  min-width: 0;
}
.change-pw-stack .auth-pw-hint:empty {
  display: none;
}
.change-pw-form > .primary {
  margin-top: 14px;
}

/* ---- Email verification section (Account) ---- */
.settings-email-row {
  flex: 1;
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}

.settings-email-row input {
  flex: 1;
  min-width: 0;
}

.settings-verif-badge {
  flex-shrink: 0;
  font-size: 11px;
  font-weight: 500;
  white-space: nowrap;
}

.settings-verif-badge--ok {
  color: #5a9272;
}

.settings-verification {
  margin-bottom: 4px;
}

.settings-verif-body {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 8px;
  padding: 6px 0 10px 172px;
}

.settings-verif-status {
  margin: 0;
  font-size: 13px;
  color: #9ca3af;
}

.settings-verif-resend {
  height: 30px;
  padding: 0 13px;
  background: transparent;
  border: 1px solid #2a2f3a;
  border-radius: 6px;
  color: #9ca3af;
  font: inherit;
  font-size: 12px;
  cursor: pointer;
  transition: color 0.15s ease, border-color 0.15s ease;
}

.settings-verif-resend:hover:not(:disabled) {
  color: #d1d5db;
  border-color: #3f4756;
}

.settings-verif-resend:disabled {
  opacity: 0.5;
  cursor: default;
}

.settings-verif-note {
  margin: 0;
  font-size: 12px;
  color: #55616f;
  line-height: 1.5;
}
