/* THRS Ultra Premium P8 — Settings / Developer Hub / governance.
 * Source-only on the production server; never activate before authenticated QA.
 * CSS only; no changes to permissions, tokens, secrets, security actions or layout.
 */
.thrs-shell .thrs-page-settings {
  --p8-text:#1a375b;
  --p8-muted:#516881;
  --p8-border:#c4d2e1;
  --p8-focus:#956e1e;
  --p8-shadow:0 3px 12px rgba(12,37,67,.055),0 16px 32px rgba(12,37,67,.055);
}
[data-theme="dark"] .thrs-shell .thrs-page-settings,
.dark .thrs-shell .thrs-page-settings {
  --p8-text:#eef6ff;
  --p8-muted:#b9cce2;
  --p8-border:#4d6784;
  --p8-focus:#edcc7b;
  --p8-shadow:0 7px 24px rgba(0,0,0,.24);
}
/* Settings' shared legacy theme can force a dark title atop the dark hero.
 * Narrow high-priority override protects WCAG contrast in the real V2 theme.
 */
.thrs-shell .thrs-page-settings .settings-redesign-hero__title {
  color:var(--p8-text)!important;
}
/* Exclude security-action buttons from decorative treatment. */
.thrs-shell .thrs-page-settings :is(
  .settings-redesign-hero__title,
  .settings-dashboard-section-title,
  .settings-location-name
) {
  color:var(--p8-text);
}
.thrs-shell .thrs-page-settings :is(
  .settings-redesign-hero__description,
  .settings-dashboard-description,
  .settings-field-help,
  .settings-coordinate
) {
  color:var(--p8-muted);
}
.thrs-shell .thrs-page-settings :is(
  .settings-dashboard-group,
  .settings-redesign-content,
  .settings-form-field
) {
  border-color:var(--p8-border);
}
/* Any input/card holding encrypted integration data remains functional. */
.thrs-shell .thrs-page-settings :is(
  .settings-dashboard-select,
  .settings-form-field input,
  .settings-form-field select,
  .settings-form-field textarea
) {
  border-color:var(--p8-border);
  caret-color:var(--p8-focus);
}
.thrs-shell .thrs-page-settings :is(
  .settings-dashboard-select,
  .settings-form-field input,
  .settings-form-field select,
  .settings-form-field textarea,
  .settings-redesign-tabs [role="tab"],
  .settings-dashboard-option input
):focus-visible {
  outline:2px solid var(--p8-focus);
  outline-offset:2px;
  box-shadow:0 0 0 3px rgba(199,158,65,.16);
}
.thrs-shell .thrs-page-settings :is(
  .settings-dashboard-group,
  .settings-redesign-content
) {
  box-shadow:var(--p8-shadow);
}
.thrs-shell .thrs-page-settings .settings-redesign-tabs [aria-selected="true"] {
  outline:1px solid var(--p8-focus);
  outline-offset:-1px;
}
.thrs-shell .thrs-page-settings .settings-redesign-loading {
  color:var(--p8-muted);
}
/* Intentionally do not style/reposition Confirm/Delete/Authorize controls.
 * Their UI, focus management and role restrictions must remain untouched.
 */
@media (prefers-reduced-motion:reduce) {
  .thrs-shell .thrs-page-settings :is(
    .settings-redesign-tabs button,
    .settings-dashboard-select,
    .settings-form-field input,
    .settings-form-field select
  ) {
    transition:none!important;
    animation:none!important;
  }
}
@media (forced-colors:active) {
 .thrs-shell .thrs-page-settings :is(button,a,input,select):focus-visible {
   outline:2px solid Highlight!important;
 }
}

/* P8 settings keyboard focus cascade correction — 2026-10-16 */
/* Focus override is constrained to Settings form fields and navigation tabs.
   It does not target authorization, deletion or confirmation buttons. */
.thrs-shell .thrs-page-settings :is(
  .settings-form-field input:not([type="hidden"]),
  .settings-form-field select,
  .settings-form-field textarea,
  .settings-dashboard-select,
  .settings-redesign-tabs [role="tab"]
):focus-visible {
  outline:2px solid var(--p8-focus)!important;
  outline-offset:2px;
  border-color:var(--p8-focus)!important;
  box-shadow:0 0 0 4px rgba(199,158,65,.19)!important;
}
