.account-settings-tabs {
    width: 100%;
}

.account-settings-form {
    align-items: start;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 13px;
}

.account-settings-form,
.account-fiscal-form {
    padding: 18px 24px 24px;
}

.account-fiscal-row {
    align-items: start;
    gap: 13px;
    padding: 16px;
    background: var(--surface);
}

.account-settings-shell :is(.account-settings-form, .account-fiscal-row) label {
    gap: 6px;
    color: var(--ink);
    font-size: 12px;
    font-weight: 600;
    line-height: 1.2;
    text-transform: uppercase;
}

.account-settings-shell :is(.account-settings-form, .account-fiscal-row) :is(input, select, .country-picker-button) {
    height: 42px;
    min-height: 42px;
    border-radius: 8px;
    font-size: 12px;
    font-weight: 600;
    line-height: 1.2;
    text-transform: none;
}

.account-settings-shell .account-settings-actions {
    grid-column: 1 / -1;
}

.account-settings-shell .account-settings-actions :is(.button, .mini-button) {
    min-height: 42px;
    padding: 10px 16px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 700;
}

[data-fiscal-connection] [hidden] { display: none !important; }
.account-fiscal-row { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.account-fiscal-row-actions {
    grid-column: 1 / -1;
    display: flex;
    align-items: center;
    align-self: end;
    gap: 8px;
    flex-wrap: wrap;
    justify-content: flex-end;
    border-top: 1px solid var(--line);
    padding-top: 18px;
}
.account-fiscal-row-actions :is(.button, .mini-button) { min-height: 42px; font-size: 12px; }
.account-fiscal-status, .account-fiscal-emitter {
    margin: 0;
    color: var(--ink);
    font-size: 12px;
    line-height: 1.5;
}
.account-fiscal-status:empty { display: none; }
.account-fiscal-emitter { grid-column: 1 / -1; }
.account-settings-shell #account-tax-title {
    color: #000000;
}
html[data-theme="dark"] .account-settings-shell #account-tax-title {
    color: #ffffff;
}
.account-fiscal-group {
    grid-column: 1 / -1;
    min-width: 0;
    margin: 0;
    padding: 0 0 8px;
    border: 0;
}
.account-fiscal-group legend {
    padding: 0 0 14px;
    color: #000000;
    font-size: 15px;
    font-weight: 700;
}
.account-fiscal-fields {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 13px;
    align-items: end;
}
.account-fiscal-fields > label,
.account-fiscal-fields :is(input, select) {
    width: 100%;
    min-width: 0;
    box-sizing: border-box;
}
.account-fiscal-help,
.account-fiscal-status {
    grid-column: 1 / -1;
    margin: 0;
    color: #000000;
    font-size: 13px;
    line-height: 1.5;
}
html[data-theme="dark"] .account-fiscal-group legend,
html[data-theme="dark"] .account-fiscal-help,
html[data-theme="dark"] .account-fiscal-status {
    color: #ffffff;
}
@media (max-width: 1100px) {
    .account-fiscal-row-actions { grid-column: 1 / -1; }
    .account-fiscal-fields { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 720px) {
    .account-fiscal-fields { grid-template-columns: minmax(0, 1fr); }
    .account-fiscal-row-actions > .button { flex: 1 1 auto; }
}

.sidebar-theme-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: flex-start;
    gap: 12px;
    width: 100%;
    min-height: 52px;
    padding: 0 12px;
    border: 1px solid transparent;
    border-radius: 8px;
    background: transparent;
    color: #000000;
    font: inherit;
    font-weight: 600;
    line-height: 1;
    cursor: pointer;
    transition: border-color 0.16s ease, background 0.16s ease, box-shadow 0.16s ease;
}

.sidebar-theme-toggle-label {
    min-width: 0;
    overflow: hidden;
    opacity: 1;
    white-space: nowrap;
    transition: opacity 0.14s ease, width 0.18s ease;
}

.sidebar-theme-toggle-icon {
    border: 0;
    background: transparent;
    color: currentColor;
}

.sidebar-theme-toggle-icon .theme-icon {
    display: block;
    stroke-width: 1.5;
}

.sidebar-theme-toggle-icon .theme-icon-sun {
    display: none;
}

html[data-theme="dark"] .sidebar-theme-toggle-icon .theme-icon-moon {
    display: none;
}

html[data-theme="dark"] .sidebar-theme-toggle-icon .theme-icon-sun {
    display: block;
}

.sidebar-theme-toggle:hover,
.sidebar-theme-toggle:focus-visible {
    border-color: transparent;
    background: #F2E2FA;
    color: #AD3FE3;
    outline: none;
}

.sidebar-theme-toggle:focus-visible {
    box-shadow: 0 0 0 3px #AD3FE3;
}

.sidebar-theme-toggle[aria-pressed="true"] {
    border-color: transparent;
    background: #F2E2FA;
    color: #AD3FE3;
}

.app-shell.is-sidebar-collapsed .sidebar-theme-toggle {
    justify-content: center;
    gap: 0;
    width: 52px;
    height: 52px;
    min-height: 52px;
    margin: 0 auto;
    padding: 0;
}

.app-shell.is-sidebar-collapsed .sidebar-theme-toggle-label {
    width: 0;
    opacity: 0;
    pointer-events: none;
}

.account-logout-form {
    margin: 0 0 0 auto;
}

.account-logout-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 42px;
    padding: 0 14px;
    border: 1px solid rgba(194, 61, 66, 0.35);
    border-radius: 8px;
    background: #fff6f6;
    color: #9f252a;
    font: inherit;
    font-weight: 800;
    white-space: nowrap;
    cursor: pointer;
}

.account-logout-button:hover,
.account-logout-button:focus-visible {
    border-color: rgba(194, 61, 66, 0.6);
    background: #ffe8e8;
    outline: none;
}

.account-logout-button:focus-visible {
    box-shadow: 0 0 0 3px rgba(194, 61, 66, 0.16);
}

.account-settings-form .account-profile-field {
    align-content: start;
    grid-template-rows: 16px 42px max-content;
    row-gap: 6px;
}

.account-settings-form .account-phone-label {
    grid-template-rows: 16px 42px max-content;
}

.account-settings-form .account-profile-field > .field-label-line {
    display: flex;
    align-items: center;
    min-height: 16px;
}

.account-email-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    min-height: 18px;
    text-transform: none;
    line-height: 1.4;
}

.account-email-actions,
.account-email-verified {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    min-width: 0;
}

.account-email-verified {
    color: var(--positive);
    font-size: 13px;
    font-weight: 800;
    white-space: nowrap;
}

.account-email-status {
    min-height: 16px;
    margin-left: auto;
    color: var(--ink);
    font-size: 12px;
    font-weight: 700;
    text-align: right;
}

.account-email-status.is-error {
    color: var(--danger);
}

.account-email-status.is-ok {
    color: var(--positive);
}

.account-phone-field {
    max-width: none;
}

.account-settings-shell .account-phone-field {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    gap: 8px;
    width: 100%;
    min-width: 0;
}

.account-settings-shell .account-phone-field .country-select-wrap {
    width: auto;
    min-width: 0;
}

.account-settings-form .account-email-field input[readonly] {
    color: var(--ink);
}

.account-phone-field .country-picker-button,
.account-phone-field input {
    height: 42px;
}

.account-settings-form .country-picker-menu {
    z-index: 1200;
}

.account-service-summary {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    margin: 0;
    padding: 0 20px;
    border-bottom: 1px solid var(--line);
    background: color-mix(in srgb, var(--surface-soft) 74%, transparent);
}

.account-service-summary > div {
    display: grid;
    align-content: center;
    gap: 7px;
    min-width: 0;
    min-height: 96px;
    padding: 18px 20px;
    border-left: 1px solid var(--line);
}

.account-service-summary > div:first-child {
    border-left: 0;
}

.account-service-summary dt {
    color: var(--ink);
    font-size: 11px;
    font-weight: 850;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

.account-service-summary dd {
    margin: 0;
    overflow-wrap: anywhere;
    color: var(--ink);
    font-size: 17px;
    font-weight: 850;
}

.account-service-summary .account-service-paid-through dd {
    color: var(--brand-primary);
}

.account-service-module-link {
    color: inherit;
    text-decoration: none;
    text-decoration-color: color-mix(in srgb, currentColor 36%, transparent);

}

.account-service-module-link:hover,
.account-service-module-link:focus-visible {
    color: var(--brand-primary);
    text-decoration-color: currentColor;
    outline: none;
}

.account-service-status {
    display: inline-flex;
    align-items: center;
    width: fit-content;
    min-height: 29px;
    padding: 4px 10px;
    border: 1px solid rgba(20, 145, 95, 0.34);
    border-radius: 999px;
    background: rgba(20, 145, 95, 0.1);
    color: var(--positive);
    font-size: 13px;
    line-height: 1;
}

.account-service-status:is(.tone-vencida, .tone-pendiente) {
    border-color: rgba(194, 61, 66, 0.34);
    background: rgba(194, 61, 66, 0.1);
    color: var(--danger);
}

.account-information-block + .account-information-block {
    border-top: 1px solid var(--line);
}

.account-information-block-header {
    display: block;
    padding: 24px 24px 0;
}

.account-information-block-header h3 {
    margin: 0;
    color: var(--ink);
    font-size: 20px;
    font-weight: 800;
    line-height: 1.2;
}

.account-information-block-header p {
    margin: 8px 0 0;
    color: var(--ink);
    font-size: 13px;
    line-height: 1.5;
}

html[data-theme="dark"] .app-shell .sidebar-theme-toggle {
    border-color: transparent;
    background: transparent;
    color: #FFFFFF;
}

html[data-theme="dark"] .app-shell .sidebar-theme-toggle:hover,
html[data-theme="dark"] .app-shell .sidebar-theme-toggle:focus-visible {
    border-color: transparent;
    background: #1c1c1c;
    color: #ffffff;
}

html[data-theme="dark"] .app-shell .sidebar-theme-toggle[aria-pressed="true"] {
    border-color: transparent;
    background: #1c1c1c;
    color: #ffffff;
}

html[data-theme="dark"] .app-shell .sidebar-theme-toggle-icon {
    border: 0;
    background: transparent;
    color: currentColor;
}

html[data-theme="dark"] .app-shell .account-logout-button {
    border-color: rgba(240, 100, 106, 0.52);
    background: rgba(240, 100, 106, 0.12);
    color: #ffd6d8;
}

html[data-theme="dark"] .app-shell .account-logout-button:hover,
html[data-theme="dark"] .app-shell .account-logout-button:focus-visible {
    border-color: rgba(240, 100, 106, 0.75);
    background: rgba(240, 100, 106, 0.2);
}

html[data-theme="dark"] .app-shell .account-service-summary {
    border-color: #383838;
    background: #141414;
}

html[data-theme="dark"] .app-shell .account-settings-tabs {
    border-color: #383838;
    background: #111111;
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.2);
}

html[data-theme="dark"] .app-shell .account-settings-tabs a {
    color: #ffffff;
}

html[data-theme="dark"] .app-shell .account-settings-tabs a:hover {
    border-color: #4a4a4a;
    background: #1d1d1d;
    color: #ffffff;
}

html[data-theme="dark"] .app-shell .account-settings-tabs a.is-active {
    border-color: #8B5CF6;
    background: #6D28D9;
    color: #ffffff;
}

html[data-theme="dark"] .app-shell .account-settings-panel {
    border-color: #383838;
    background: #0e0e0e;
    box-shadow: 0 16px 38px rgba(0, 0, 0, 0.24);
}

html[data-theme="dark"] .app-shell .account-settings-panel-header {
    border-color: #383838;
    background: linear-gradient(180deg, #181818 0%, #121212 100%);
}

html[data-theme="dark"] .app-shell .account-settings-panel-header h2,
html[data-theme="dark"] .app-shell .account-information-block-header h3 {
    color: #ffffff;
}

html[data-theme="dark"] .app-shell .account-information-block + .account-information-block {
    border-color: #383838;
    background: #0c0c0c;
}

html[data-theme="dark"] .app-shell .account-service-summary > div {
    border-color: rgba(180, 214, 220, 0.16);
}

html[data-theme="dark"] .app-shell .account-service-summary dt {
    color: #ffffff;
}

html[data-theme="dark"] .app-shell .account-service-summary dd {
    color: #ffffff;
}

html[data-theme="dark"] .app-shell .account-service-summary .account-service-paid-through dd {
    color: #69d5dd;
}

html[data-theme="dark"] .app-shell .account-service-module-link:hover,
html[data-theme="dark"] .app-shell .account-service-module-link:focus-visible {
    color: #69d5dd;
}

html[data-theme="dark"] .app-shell .account-settings-form label,
html[data-theme="dark"] .app-shell .account-fiscal-row label,
html[data-theme="dark"] .app-shell .account-settings-form .field-label-line,
html[data-theme="dark"] .app-shell .account-fiscal-row .field-label-line {
    color: #ffffff;
}

html[data-theme="dark"] .app-shell .account-settings-panel :is(input, select, textarea),
html[data-theme="dark"] .app-shell .account-settings-panel .country-picker-button {
    border-color: #424242;
    background: #0b0b0b;
    color: #ffffff;
    box-shadow: none;
}

html[data-theme="dark"] .app-shell .account-settings-panel :is(input, select, textarea):hover,
html[data-theme="dark"] .app-shell .account-settings-panel .country-picker-button:hover {
    border-color: #565656;
}

html[data-theme="dark"] .app-shell .account-settings-panel :is(input, select, textarea):focus,
html[data-theme="dark"] .app-shell .account-settings-panel :is(input, select, textarea):focus-visible,
html[data-theme="dark"] .app-shell .account-settings-panel .country-picker-button:focus-visible {
    border-color: #6ea8fe;
    outline: none;
    box-shadow: 0 0 0 3px rgba(110, 168, 254, 0.18);
}

html[data-theme="dark"] .app-shell .account-settings-panel input::placeholder {
    color: var(--placeholder);
    opacity: 1;
}

html[data-theme="dark"] .app-shell .account-settings-form input[readonly] {
    border-color: #383838;
    background: #181818;
    color: #ffffff;
}

html[data-theme="dark"] .app-shell .account-fiscal-row {
    border-color: var(--line);
    border-radius: 8px;
    background: var(--surface);
    box-shadow: none;
}

html[data-theme="dark"] .app-shell .account-settings-actions .button {
    border: 1px solid #8B5CF6;
    background: #6D28D9;
    color: #ffffff;
    box-shadow: none;
}

html[data-theme="dark"] .app-shell .account-settings-actions .button:hover,
html[data-theme="dark"] .app-shell .account-settings-actions .button:focus-visible {
    border-color: #A78BFA;
    background: #5B21B6;
    filter: none;
    outline: none;
}

html[data-theme="dark"] .app-shell .account-settings-actions .button:focus-visible {
    box-shadow: 0 0 0 3px rgba(110, 168, 254, 0.2);
}

@media (max-width: 980px) {
    .account-service-summary {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .account-service-summary > div:nth-child(odd) {
        border-left: 0;
    }

    .account-service-summary > div:nth-child(n + 3) {
        border-top: 1px solid var(--line);
    }
}

@media (max-width: 1100px) {
    .account-settings-shell .account-settings-form,
    .account-settings-shell .account-fiscal-row {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .account-settings-shell .account-settings-actions {
        flex-direction: row;
        flex-wrap: wrap;
    }
}

@media (max-width: 1280px) {
    .sidebar-session {
        margin-top: 12px;
    }

    .sidebar-theme-toggle,
    .app-shell.is-sidebar-collapsed .sidebar-theme-toggle {
        justify-content: center;
        gap: 10px;
        width: 100%;
        height: auto;
        min-height: 52px;
        margin: 0;
        padding: 0 14px;
    }

    .app-shell.is-sidebar-collapsed .sidebar-theme-toggle-label {
        width: auto;
        opacity: 1;
        pointer-events: auto;
    }
}

@media (max-width: 720px) {
    .account-settings-shell .account-settings-form,
    .account-settings-shell .account-fiscal-row {
        grid-template-columns: minmax(0, 1fr);
    }

    .account-settings-shell .account-settings-actions :is(.button, .mini-button) {
        flex: 1 1 auto;
    }

    .account-logout-form,
    .account-logout-button {
        width: 100%;
    }

    .account-logout-form {
        margin-left: 0;
    }

    .account-service-summary {
        grid-template-columns: 1fr;
        padding: 0 16px;
    }

    .account-settings-form,
    .account-fiscal-form {
        padding: 16px;
    }

    .account-fiscal-row {
        padding: 16px;
    }

    .account-service-summary > div {
        min-height: 78px;
        padding: 14px 4px;
        border-top: 1px solid var(--line);
        border-left: 0;
    }

    .account-service-summary > div:first-child {
        border-top: 0;
    }



}

/* Configuración utiliza los mismos paneles desplegables y campos que Estacionamiento. */
.account-settings-panel.account-settings-stack,
html[data-theme="dark"] .app-shell .account-settings-panel.account-settings-stack {
    display: grid;
    gap: 14px;
    padding: 0;
    border: 0;
    background: transparent;
    box-shadow: none;
    overflow: visible;
}
.account-settings-stack > .panel { margin: 0; }
.account-settings-stack .account-information-block { border: 1px solid var(--line); }
.account-settings-stack .account-fiscal-row,
html[data-theme="dark"] .app-shell .account-settings-stack .account-fiscal-row {
    padding: 0;
    border: 0;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
}
.account-settings-stack .account-service-summary { background: transparent; }
.account-settings-stack > .panel > :is(.account-settings-form, .account-fiscal-form) { padding: 0; }
