/* ============================================================
   Tingler Advisory — Profile EDIT Page Styling
   Companion to users_profile.css — for /profile-bearbeiten
   Drop into Template Settings → Advanced → Custom CSS
   ============================================================ */

/* ── Outer wrapper ── */
.com-users-profile__edit.profile-edit,
.com-users-profile__edit-form {
    max-width: 760px;
    margin: 0 auto;
    padding: 0;
}

/* Remove the "well" boxy default look */
.com-users-profile__edit-form.well,
form.well {
    background: transparent !important;
    border: none !important;
    box-shadow: none !important;
    padding: 0 !important;
}

/* ── Each section becomes a card ── */
.com-users-profile__edit-form fieldset,
.com-users-profile__multifactor {
    position: relative;
    /* min-width:0 + display:block normalizes legend rendering */
    display: block;
    min-width: 0;
    padding: 1.75rem 2rem 1.5rem;
    margin: 0 0 1.5rem 0;
    background: var(--ta-bg-card);
    border: 1px solid var(--ta-border);
    border-radius: 12px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.15);
    transition:
        background var(--ta-dur-slow, 400ms) ease,
        border-color var(--ta-dur-slow, 400ms) ease;
}

/* ── Fieldset legends — bypass the legend HTML quirk via CSS-generated content ── */

/* Hide the real <legend> (still accessible to screen readers) */
.com-users-profile__edit-form fieldset > legend,
.com-users-profile__multifactor > legend {
    position: absolute !important;
    width: 1px !important;
    height: 1px !important;
    padding: 0 !important;
    margin: -1px !important;
    overflow: hidden !important;
    clip: rect(0,0,0,0) !important;
    white-space: nowrap !important;
    border: 0 !important;
}

/* EYEBROW — small label rendered via fieldset::before */
.com-users-profile__edit-form fieldset::before,
.com-users-profile__multifactor::before {
    display: block !important;
    position: static !important;
    margin: 0 0 0.4rem 0 !important;
    padding: 0 !important;
    font-family: var(--ta-font-mono, 'DM Mono', monospace) !important;
    font-size: 0.65rem !important;
    font-weight: 500 !important;
    letter-spacing: 0.18em !important;
    text-transform: uppercase !important;
    color: var(--ta-accent) !important;
    background: transparent !important;
    border: none !important;
    width: auto !important;
    height: auto !important;
    clip: auto !important;
    overflow: visible !important;
    white-space: normal !important;
    line-height: 1.4 !important;
}

/* MAIN TITLE — large display heading rendered via fieldset::after,
   positioned ABOVE the form content (we use order via grid trick below) */
.com-users-profile__edit-form fieldset::after,
.com-users-profile__multifactor::after {
    display: block !important;
    position: static !important;
    margin: 0 0 1.5rem 0 !important;
    padding: 0 !important;
    font-family: var(--ta-font-display, 'Playfair Display', serif) !important;
    font-size: 1.5rem !important;
    font-weight: 600 !important;
    color: var(--ta-text-primary) !important;
    letter-spacing: -0.01em !important;
    line-height: 1.2 !important;
    background: transparent !important;
    border: none !important;
    width: auto !important;
    height: auto !important;
    order: -1 !important; /* place AFTER ::before but BEFORE form rows */
}

/* Make fieldset a flex column so order property works on ::before/::after */
.com-users-profile__edit-form fieldset,
.com-users-profile__multifactor {
    display: flex !important;
    flex-direction: column !important;
}
/* ::before keeps default order: 0 (top eyebrow), ::after has order -1?
   Actually we want: ::before (eyebrow, top), ::after (title), then rows.
   Flex order default for pseudo-elements: ::before = 0, ::after = 0.
   With ::after order: -1 it goes BEFORE all order:0 items including ::before.
   We want: eyebrow (::before, order: -2), title (::after, order: -1), rows (order: 0).
*/
.com-users-profile__edit-form fieldset::before,
.com-users-profile__multifactor::before {
    order: -2 !important;
}
.com-users-profile__edit-form fieldset::after,
.com-users-profile__multifactor::after {
    order: -1 !important;
}

/* Per-fieldset content — eyebrow + title */
.com-users-profile__edit-form fieldset:nth-of-type(1)::before { content: 'Konto' !important; }
.com-users-profile__edit-form fieldset:nth-of-type(1)::after  { content: 'Profil bearbeiten' !important; }

.com-users-profile__edit-form fieldset:nth-of-type(2)::before { content: 'Einstellungen' !important; }
.com-users-profile__edit-form fieldset:nth-of-type(2)::after  { content: 'Basiseinstellungen' !important; }

.com-users-profile__edit-form fieldset:nth-of-type(3)::before { content: 'Sicherheit' !important; }
.com-users-profile__edit-form fieldset:nth-of-type(3)::after  { content: 'Passkey-Anmeldung' !important; }

.com-users-profile__multifactor::before { content: 'Authentifizierung' !important; }
.com-users-profile__multifactor::after  { content: 'Multi-Faktor-Authentifizierung' !important; }

/* Gold accent stripe via left border */
.com-users-profile__edit-form fieldset,
.com-users-profile__multifactor {
    border-left: 3px solid var(--ta-accent) !important;
    border-image: linear-gradient(to bottom, var(--ta-accent), var(--ta-accent-dark)) 1 100% !important;
}

/* ── Form field rows ── */
.com-users-profile__edit-form .control-group {
    display: grid;
    grid-template-columns: 200px 1fr;
    gap: 1rem 1.5rem;
    align-items: start;
    padding: 0.875rem 0;
    border-bottom: 1px solid var(--ta-border-subtle);
}
.com-users-profile__edit-form .control-group:last-of-type {
    border-bottom: none;
    padding-bottom: 0;
}
.com-users-profile__edit-form fieldset > .control-group:first-of-type {
    padding-top: 0;
}

/* Labels */
.com-users-profile__edit-form .control-label {
    padding-top: 0.6rem;
}
.com-users-profile__edit-form .control-label label {
    font-family: var(--ta-font-mono, 'DM Mono', monospace);
    font-size: 0.7rem;
    font-weight: 500;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--ta-text-muted);
    margin: 0;
    line-height: 1.3;
    display: inline-block;
}
.com-users-profile__edit-form .control-label .required,
.com-users-profile__edit-form .control-label label.required {
    color: var(--ta-text-secondary);
}
.com-users-profile__edit-form .star {
    color: var(--ta-accent);
    margin-left: 0.15rem;
    font-weight: 600;
}

/* Controls area */
.com-users-profile__edit-form .controls {
    min-width: 0; /* prevent grid overflow */
}

/* ── Text/Email/Password inputs ── */
.com-users-profile__edit-form input[type="text"],
.com-users-profile__edit-form input[type="email"],
.com-users-profile__edit-form input[type="password"],
.com-users-profile__edit-form input[type="number"],
.com-users-profile__edit-form input[type="tel"],
.com-users-profile__edit-form input[type="url"],
.com-users-profile__edit-form select,
.com-users-profile__edit-form .form-control,
.com-users-profile__edit-form .form-select {
    display: block !important;
    width: 100% !important;
    max-width: 100% !important;
    height: 42px !important;
    min-height: 42px !important;
    padding: 0 0.9rem !important;
    background: var(--ta-bg) !important;
    background-color: var(--ta-bg) !important;
    border: 1px solid var(--ta-border) !important;
    border-radius: 6px !important;
    color: var(--ta-text-primary) !important;
    font-family: var(--ta-font-body, sans-serif) !important;
    font-size: 0.9rem !important;
    line-height: 1.4 !important;
    box-sizing: border-box !important;
    transition: border-color 150ms ease, box-shadow 150ms ease, background 150ms ease !important;
    box-shadow: none !important;
}
/* Textarea may need flex height */
.com-users-profile__edit-form textarea {
    width: 100% !important;
    max-width: 100% !important;
    min-height: 84px !important;
    height: auto !important;
    padding: 0.65rem 0.9rem !important;
    background: var(--ta-bg) !important;
    border: 1px solid var(--ta-border) !important;
    border-radius: 6px !important;
    color: var(--ta-text-primary) !important;
    font-family: var(--ta-font-body, sans-serif) !important;
    font-size: 0.9rem !important;
    line-height: 1.5 !important;
    box-sizing: border-box !important;
}

/* ── KILL autofill yellow background (Chrome / Edge / Safari) ── */
.com-users-profile__edit-form input:-webkit-autofill,
.com-users-profile__edit-form input:-webkit-autofill:hover,
.com-users-profile__edit-form input:-webkit-autofill:focus,
.com-users-profile__edit-form input:-webkit-autofill:active {
    -webkit-text-fill-color: var(--ta-text-primary) !important;
    -webkit-box-shadow: 0 0 0 1000px var(--ta-bg) inset !important;
    box-shadow: 0 0 0 1000px var(--ta-bg) inset !important;
    caret-color: var(--ta-text-primary) !important;
    background-clip: content-box !important;
    transition: background-color 0s 600000s, color 0s 600000s !important;
}
.com-users-profile__edit-form input:autofill {
    background: var(--ta-bg) !important;
    color: var(--ta-text-primary) !important;
    -webkit-text-fill-color: var(--ta-text-primary) !important;
}

.com-users-profile__edit-form input:focus,
.com-users-profile__edit-form textarea:focus,
.com-users-profile__edit-form select:focus,
.com-users-profile__edit-form .form-control:focus {
    outline: none !important;
    border-color: var(--ta-accent) !important;
    box-shadow: 0 0 0 3px rgba(200, 169, 110, 0.15) !important;
}
.com-users-profile__edit-form input:focus:-webkit-autofill {
    -webkit-box-shadow: 0 0 0 1000px var(--ta-bg) inset, 0 0 0 3px rgba(200, 169, 110, 0.15) !important;
}

.com-users-profile__edit-form input[readonly] {
    background: rgba(255, 255, 255, 0.02) !important;
    color: var(--ta-text-muted) !important;
    cursor: not-allowed;
}

/* Native select dropdown arrow */
.com-users-profile__edit-form select.form-select {
    appearance: none;
    -webkit-appearance: none;
    background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23C8A96E' stroke-width='2.5'><polyline points='6 9 12 15 18 9'/></svg>") !important;
    background-repeat: no-repeat !important;
    background-position: right 0.75rem center !important;
    background-size: 14px !important;
    padding-right: 2.25rem !important;
}

/* ── Helper text under inputs ── */
.com-users-profile__edit-form .form-text,
.com-users-profile__edit-form small.form-text,
.com-users-profile__edit-form .small.text-muted {
    display: block;
    margin-top: 0.4rem;
    font-family: var(--ta-font-body, sans-serif);
    font-size: 0.75rem;
    line-height: 1.5;
    color: var(--ta-text-muted) !important;
}
.com-users-profile__edit-form .form-text strong,
.com-users-profile__edit-form .small.text-muted strong {
    color: var(--ta-text-secondary);
    font-weight: 600;
}
.com-users-profile__edit-form .form-text a,
.com-users-profile__edit-form .small.text-muted a {
    color: var(--ta-accent);
    text-decoration: underline;
    text-decoration-color: rgba(200, 169, 110, 0.4);
    text-underline-offset: 2px;
}

/* ── Password input group + visibility toggle button ── */
.com-users-profile__edit-form .password-group {
    width: 100% !important;
    display: block !important;
}
.com-users-profile__edit-form .password-group .input-group {
    display: flex !important;
    width: 100% !important;
    align-items: stretch !important;
    height: 42px !important;
}
.com-users-profile__edit-form .password-group .input-group input {
    flex: 1 1 auto !important;
    width: auto !important;
    min-width: 0 !important;
    height: 42px !important;
    min-height: 42px !important;
    border-radius: 6px 0 0 6px !important;
    border-right: none !important;
}
.com-users-profile__edit-form .input-password-toggle,
.com-users-profile__edit-form button.input-password-toggle,
.com-users-profile__edit-form button.btn.btn-secondary.input-password-toggle {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    flex: 0 0 44px !important;
    width: 44px !important;
    height: 42px !important;
    min-height: 42px !important;
    max-height: 42px !important;
    background: var(--ta-bg) !important;
    background-color: var(--ta-bg) !important;
    border: 1px solid var(--ta-border) !important;
    border-left: none !important;
    border-radius: 0 6px 6px 0 !important;
    padding: 0 !important;
    margin: 0 !important;
    color: var(--ta-text-secondary) !important;
    cursor: pointer !important;
    transition: color 150ms ease, background 150ms ease !important;
    font-family: var(--ta-font-body, sans-serif) !important;
    text-transform: none !important;
    letter-spacing: 0 !important;
    font-size: 1rem !important;
    font-weight: 400 !important;
    line-height: 1 !important;
    box-shadow: none !important;
    text-shadow: none !important;
}
.com-users-profile__edit-form .input-password-toggle:hover {
    color: var(--ta-accent) !important;
    background: rgba(200, 169, 110, 0.06) !important;
    border-color: var(--ta-border) !important;
    border-left: none !important;
    transform: none !important;
}
.com-users-profile__edit-form .input-password-toggle:focus {
    outline: none !important;
    border-color: var(--ta-accent) !important;
    box-shadow: 0 0 0 3px rgba(200, 169, 110, 0.15) !important;
    z-index: 1 !important;
    position: relative !important;
}
.com-users-profile__edit-form .password-group .input-group:focus-within input {
    border-color: var(--ta-accent) !important;
}
.com-users-profile__edit-form .password-group .input-group:focus-within .input-password-toggle {
    border-color: var(--ta-accent) !important;
}

/* Eye icon SVG fallback */
.com-users-profile__edit-form .input-password-toggle .icon-eye {
    display: inline-block !important;
    width: 18px !important;
    height: 18px !important;
    background: currentColor !important;
    -webkit-mask: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'><path d='M1 12s4-8 11-8 11 8 11 8-4 8-11 8-11-8-11-8z'/><circle cx='12' cy='12' r='3'/></svg>") center/contain no-repeat !important;
            mask: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'><path d='M1 12s4-8 11-8 11 8 11 8-4 8-11 8-11-8-11-8z'/><circle cx='12' cy='12' r='3'/></svg>") center/contain no-repeat !important;
    font-size: 0 !important;
}
.com-users-profile__edit-form .input-password-toggle .icon-eye-slash {
    display: inline-block !important;
    width: 18px !important;
    height: 18px !important;
    background: currentColor !important;
    -webkit-mask: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'><path d='M17.94 17.94A10.07 10.07 0 0 1 12 20c-7 0-11-8-11-8a18.45 18.45 0 0 1 5.06-5.94M9.9 4.24A9.12 9.12 0 0 1 12 4c7 0 11 8 11 8a18.5 18.5 0 0 1-2.16 3.19m-6.72-1.07a3 3 0 1 1-4.24-4.24'/><line x1='1' y1='1' x2='23' y2='23'/></svg>") center/contain no-repeat !important;
            mask: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'><path d='M17.94 17.94A10.07 10.07 0 0 1 12 20c-7 0-11-8-11-8a18.45 18.45 0 0 1 5.06-5.94M9.9 4.24A9.12 9.12 0 0 1 12 4c7 0 11 8 11 8a18.5 18.5 0 0 1-2.16 3.19m-6.72-1.07a3 3 0 1 1-4.24-4.24'/><line x1='1' y1='1' x2='23' y2='23'/></svg>") center/contain no-repeat !important;
    font-size: 0 !important;
}
.com-users-profile__edit-form .input-password-toggle .visually-hidden,
.com-users-profile__edit-form .visually-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0,0,0,0);
}

/* Password strength meter */
.com-users-profile__edit-form meter {
    width: 100%;
    height: 5px;
    margin-top: 0.5rem;
    border-radius: 999px;
    overflow: hidden;
    appearance: none;
    -webkit-appearance: none;
    background: var(--ta-border-subtle);
    border: none;
}
.com-users-profile__edit-form meter::-webkit-meter-bar { background: var(--ta-border-subtle); border-radius: 999px; border: none; }
.com-users-profile__edit-form meter::-webkit-meter-optimum-value { background: var(--ta-accent); border-radius: 999px; }
.com-users-profile__edit-form meter::-webkit-meter-suboptimum-value { background: #D4A017; border-radius: 999px; }
.com-users-profile__edit-form meter::-webkit-meter-even-less-good-value { background: #C0392B; border-radius: 999px; }
.com-users-profile__edit-form meter::-moz-meter-bar { background: var(--ta-accent); border-radius: 999px; }
.com-users-profile__edit-form output {
    display: block;
    margin-top: 0.25rem;
    font-family: var(--ta-font-mono, monospace);
    font-size: 0.7rem;
    color: var(--ta-text-muted);
    letter-spacing: 0.05em;
}

/* ── joomla-field-fancy-select (Choices.js) ── */
.com-users-profile__edit-form .choices {
    margin: 0;
    width: 100%;
}
.com-users-profile__edit-form .choices__inner {
    background: var(--ta-bg) !important;
    border: 1px solid var(--ta-border) !important;
    border-radius: 6px !important;
    padding: 0.45rem 0.75rem !important;
    min-height: 2.65rem !important;
    color: var(--ta-text-primary) !important;
    font-size: 0.9rem !important;
}
.com-users-profile__edit-form .choices[data-type*="select-one"]::after {
    border-color: var(--ta-accent) transparent transparent !important;
}
.com-users-profile__edit-form .choices__list--single .choices__item {
    color: var(--ta-text-primary) !important;
    padding-right: 1.5rem;
}
.com-users-profile__edit-form .choices.is-focused .choices__inner,
.com-users-profile__edit-form .choices.is-open .choices__inner {
    border-color: var(--ta-accent) !important;
    box-shadow: 0 0 0 3px rgba(200, 169, 110, 0.15) !important;
}
.com-users-profile__edit-form .choices__list--dropdown {
    background: var(--ta-bg-card) !important;
    border: 1px solid var(--ta-border) !important;
    border-radius: 8px !important;
    box-shadow: 0 8px 30px rgba(0,0,0,0.3) !important;
    margin-top: 4px !important;
    overflow: hidden;
}
.com-users-profile__edit-form .choices__list--dropdown .choices__item {
    color: var(--ta-text-secondary) !important;
    padding: 0.55rem 0.9rem !important;
    font-size: 0.875rem !important;
}
.com-users-profile__edit-form .choices__list--dropdown .choices__item--selectable.is-highlighted {
    background: rgba(200, 169, 110, 0.12) !important;
    color: var(--ta-accent) !important;
}
.com-users-profile__edit-form .choices__group .choices__heading {
    color: var(--ta-accent) !important;
    font-family: var(--ta-font-mono, monospace);
    font-size: 0.7rem;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    border-bottom-color: var(--ta-border) !important;
    padding: 0.5rem 0.9rem !important;
}
.com-users-profile__edit-form .choices__input {
    background: transparent !important;
    color: var(--ta-text-primary) !important;
}

/* ── Passkey / WebAuthn table ── */
.com-users-profile__edit-form .plg_system_webauthn table,
.com-users-profile__edit-form table.table-striped {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    background: var(--ta-bg);
    border: 1px solid var(--ta-border-subtle);
    border-radius: 8px;
    overflow: hidden;
    margin-bottom: 1rem;
    font-size: 0.875rem;
}
.com-users-profile__edit-form table thead.table-dark {
    background: transparent;
}
.com-users-profile__edit-form table thead th {
    background: rgba(200, 169, 110, 0.06) !important;
    color: var(--ta-accent) !important;
    font-family: var(--ta-font-mono, monospace);
    font-size: 0.65rem;
    font-weight: 500;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    padding: 0.7rem 1rem;
    text-align: left;
    border-bottom: 1px solid var(--ta-border);
}
.com-users-profile__edit-form table tbody td {
    padding: 0.85rem 1rem;
    color: var(--ta-text-secondary);
    border-bottom: 1px solid var(--ta-border-subtle);
    background: transparent !important;
}
.com-users-profile__edit-form table tbody tr:last-child td { border-bottom: none; }

/* ── Multi-Factor Authentication reset message banner ── */
#com-users-methods-reset-container {
    background: rgba(200, 169, 110, 0.05) !important;
    border: 1px solid var(--ta-border) !important;
    border-radius: 8px !important;
    padding: 0.85rem 1rem !important;
    margin-bottom: 1rem;
}
#com-users-methods-reset-message {
    color: var(--ta-text-secondary);
    font-size: 0.875rem;
}
#com-users-methods-reset-message strong {
    color: var(--ta-accent);
    font-weight: 600;
}

/* MFA method cards */
.com-users-methods-list-method.card {
    background: var(--ta-bg) !important;
    border: 1px solid var(--ta-border) !important;
    border-radius: 10px !important;
    margin-bottom: 0.875rem !important;
    overflow: hidden;
    transition: border-color 200ms ease, box-shadow 200ms ease;
}
.com-users-methods-list-method.card:hover {
    border-color: var(--ta-accent) !important;
    box-shadow: 0 4px 16px rgba(0,0,0,0.2);
}
.com-users-methods-list-method-header.card-header {
    background: transparent !important;
    border-bottom: 1px solid var(--ta-border-subtle) !important;
    padding: 0.875rem 1.1rem !important;
    color: var(--ta-text-primary);
}
.com-users-methods-list-method-image {
    background: rgba(200, 169, 110, 0.08) !important;
    border-radius: 8px !important;
    padding: 0.4rem 0.75rem !important;
}
.com-users-methods-list-method-image img {
    max-height: 32px;
    width: auto;
    filter: brightness(0) saturate(100%) invert(82%) sepia(20%) saturate(450%) hue-rotate(355deg) brightness(95%) contrast(90%);
}
.com-users-methods-list-method-title h2,
.com-users-methods-list-method-title .h4 {
    font-family: var(--ta-font-display, serif) !important;
    font-size: 1.05rem !important;
    font-weight: 600 !important;
    color: var(--ta-text-primary) !important;
    margin: 0 !important;
    letter-spacing: 0 !important;
}
.com-users-methods-list-method-records-container.card-body {
    padding: 1rem 1.1rem !important;
    background: transparent;
}
.com-users-methods-list-method-info {
    color: var(--ta-text-muted) !important;
    font-size: 0.8rem !important;
    line-height: 1.55;
    margin-bottom: 0.85rem !important;
}
.com-users-methods-list-method-addnew-container {
    border-top: 1px solid var(--ta-border-subtle) !important;
    padding-top: 0.85rem !important;
    margin-top: 0.25rem;
}

/* ── Buttons ── */
.com-users-profile__edit-form .btn,
.com-users-profile button,
.com-users-methods-list-method .btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.65rem 1.4rem;
    border-radius: 6px;
    border: 1px solid transparent;
    font-family: var(--ta-font-body, sans-serif);
    font-size: 0.8rem;
    font-weight: 600;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    cursor: pointer;
    text-decoration: none;
    transition: all 200ms ease;
    line-height: 1.3;
}

/* PRIMARY (Save) — gold gradient */
.com-users-profile__edit-form .btn-primary,
.com-users-profile__edit-form button[value="profile.save"] {
    background: linear-gradient(135deg, var(--ta-accent), var(--ta-accent-dark)) !important;
    color: #0C0E11 !important;
    border-color: transparent !important;
    box-shadow: 0 2px 12px rgba(200, 169, 110, 0.25);
}
.com-users-profile__edit-form .btn-primary:hover,
.com-users-profile__edit-form button[value="profile.save"]:hover {
    opacity: 0.92;
    transform: translateY(-1px);
    box-shadow: 0 4px 18px rgba(200, 169, 110, 0.4);
}

/* DANGER (Cancel) — outline red */
.com-users-profile__edit-form .btn-danger,
.com-users-profile__edit-form button[value="profile.cancel"] {
    background: transparent !important;
    color: #E5837B !important;
    border-color: rgba(192, 57, 43, 0.4) !important;
    box-shadow: none !important;
}
.com-users-profile__edit-form .btn-danger:hover,
.com-users-profile__edit-form button[value="profile.cancel"]:hover {
    background: rgba(192, 57, 43, 0.08) !important;
    border-color: rgba(192, 57, 43, 0.7) !important;
    color: #FF9B92 !important;
}

/* SUCCESS (Add Passkey full-width) */
.com-users-profile__edit-form .btn-success {
    background: rgba(46, 166, 111, 0.12) !important;
    color: #5FD8A0 !important;
    border-color: rgba(46, 166, 111, 0.35) !important;
    box-shadow: none !important;
}
.com-users-profile__edit-form .btn-success:hover {
    background: rgba(46, 166, 111, 0.2) !important;
    border-color: rgba(46, 166, 111, 0.6) !important;
    color: #80E5B5 !important;
}

/* SECONDARY (password toggle) */
.com-users-profile__edit-form .btn-secondary {
    background: var(--ta-bg) !important;
    color: var(--ta-text-secondary) !important;
    border-color: var(--ta-border) !important;
    box-shadow: none !important;
}

/* OUTLINE-PRIMARY (MFA "Add" buttons) */
.com-users-methods-list-method .btn-outline-primary {
    background: transparent !important;
    color: var(--ta-accent) !important;
    border: 1px solid var(--ta-accent) !important;
    padding: 0.5rem 1rem !important;
    font-size: 0.75rem !important;
}
.com-users-methods-list-method .btn-outline-primary:hover {
    background: rgba(200, 169, 110, 0.1) !important;
    color: var(--ta-accent) !important;
    box-shadow: 0 2px 12px rgba(200, 169, 110, 0.2);
}

/* Width helper */
.com-users-profile__edit-form .btn.w-100,
.com-users-profile__edit-form .w-100 {
    width: 100% !important;
}

/* ── Submit / Cancel row ── */
.com-users-profile__edit-submit.control-group {
    display: flex !important;
    justify-content: flex-end;
    gap: 0.75rem;
    padding: 1.5rem 0 0 !important;
    border-top: 1px solid var(--ta-border-subtle);
    border-bottom: none !important;
    grid-template-columns: 1fr !important;
    margin-top: 1.5rem;
}
.com-users-profile__edit-submit .controls {
    display: flex;
    gap: 0.75rem;
}

/* ── Icons (Joomla icon-* spans) ── */
.com-users-profile__edit-form [class^="icon-"],
.com-users-profile__edit-form [class*=" icon-"],
.com-users-methods-list-method [class^="icon-"] {
    display: inline-block;
    width: 14px;
    height: 14px;
    line-height: 1;
    flex-shrink: 0;
}

/* ── Mobile responsive ── */
@media (max-width: 640px) {
    .com-users-profile__edit-form fieldset,
    .com-users-profile__multifactor {
        padding: 1.5rem 1.25rem 1rem;
    }
    .com-users-profile__edit-form .control-group {
        grid-template-columns: 1fr;
        gap: 0.4rem;
        padding: 0.75rem 0;
    }
    .com-users-profile__edit-form .control-label {
        padding-top: 0;
    }
    .com-users-profile__edit-form fieldset > legend {
        font-size: 1.25rem;
    }
    .com-users-profile__edit-submit.control-group,
    .com-users-profile__edit-submit .controls {
        flex-direction: column-reverse;
    }
    .com-users-profile__edit-submit .btn {
        width: 100%;
    }
    .com-users-methods-list-method-header.card-header {
        gap: 0.5rem !important;
    }
}

/* ── Print ── */
@media print {
    .com-users-profile__edit-submit,
    .input-password-toggle,
    .btn { display: none !important; }
    .com-users-profile__edit-form fieldset {
        background: none !important;
        border: 1px solid #ccc !important;
        box-shadow: none !important;
        page-break-inside: avoid;
    }
}