/* Ana Terra Tattoo Sistema v1.16.2
 * Trava de identidade visual: remove rosa/magenta herdado de tema, Elementor,
 * WordPress ou estados nativos de interação dentro do sistema.
 */

body.att-system-page,
body.att-system-page .att-system {
    --att-interactive: #3A211A;
    --att-interactive-hover: #2F1A14;
    --att-interactive-soft: #F3E7D3;
    --att-interactive-accent: #D99A2B;
    --att-interactive-danger: #9E3828;
    --att-interactive-danger-hover: #842E22;
    --att-interactive-fg: #FFF9EF;

    /* Variáveis que podem ser herdadas do WordPress/Elementor. */
    --wp-admin-theme-color: #3A211A;
    --wp-admin-theme-color-darker-10: #2F1A14;
    --wp-admin-theme-color-darker-20: #24130F;
    --wp-components-color-accent: #D99A2B;
    --wp-components-color-accent-darker-10: #C58A3A;
    --e-global-color-primary: #3A211A;
    --e-global-color-secondary: #667044;
    --e-global-color-text: #3A211A;
    --e-global-color-accent: #D99A2B;
    color-scheme: light;
}

body.att-system-page ::selection {
    background: rgba(217,154,43,.30);
    color: #3A211A;
}

body.att-system-page .att-system *,
body.att-system-page .media-modal * {
    -webkit-tap-highlight-color: rgba(217,154,43,.18);
}

/* Campos e controles nativos */
body.att-system-page .att-system input[type="checkbox"],
body.att-system-page .att-system input[type="radio"],
body.att-system-page .att-system input[type="range"] {
    accent-color: #D99A2B !important;
}

body.att-system-page .att-system :is(input, select, textarea):focus,
body.att-system-page .att-system :is(input, select, textarea):focus-visible {
    border-color: #D99A2B !important;
    outline: none !important;
    box-shadow: 0 0 0 3px rgba(217,154,43,.14) !important;
}

body.att-system-page .att-system :is(button, a, [role="button"]):focus-visible {
    outline: 2px solid #D99A2B !important;
    outline-offset: 2px !important;
    box-shadow: none !important;
}

/* Botões principais */
body.att-system-page .att-system :is(
    .att-system-primary,
    .att-cre25-save,
    .att-portfolio23-save,
    .att-client-search button,
    .att-report-filter > button,
    .att-cre25-search button,
    .att-fin24-filters button
) {
    background: #3A211A !important;
    border-color: #3A211A !important;
    color: #FFF9EF !important;
}

body.att-system-page .att-system :is(
    .att-system-primary,
    .att-cre25-save,
    .att-portfolio23-save,
    .att-client-search button,
    .att-report-filter > button,
    .att-cre25-search button,
    .att-fin24-filters button
):is(:hover, :focus, :active) {
    background: #2F1A14 !important;
    border-color: #2F1A14 !important;
    color: #FFF9EF !important;
    box-shadow: 0 0 0 3px rgba(217,154,43,.12) !important;
}

/* Salvar configurações usa dourado como ação especial. */
body.att-system-page .att-settings25-savebar button,
body.att-system-page .att-settings25-savebar button:hover,
body.att-system-page .att-settings25-savebar button:focus,
body.att-system-page .att-settings25-savebar button:active {
    background: #D99A2B !important;
    border-color: #D99A2B !important;
    color: #342118 !important;
}

/* Botões secundários e ferramentas. */
body.att-system-page .att-system :is(
    .att-system-secondary,
    .att-cre25-secondary,
    .att-cre25-media-actions button,
    .att-portfolio23-media-field button,
    .att-portfolio23-pager button,
    .att-contact-stage-filter button,
    .att-agenda-quick-status a,
    .att-waitlist-card-v21 > footer a
):is(:hover, :focus, :active) {
    background: #F3E7D3 !important;
    border-color: #D99A2B !important;
    color: #3A211A !important;
    box-shadow: none !important;
}

/* Abas e filtros ativos permanecem em terra, nunca rosa. */
body.att-system-page .att-system :is(
    .att-workspace-tabs-v21 a,
    .att-calendar-switch a,
    .att-crm-segments a,
    .att-fin24-tabs a,
    .att-portfolio23-filter,
    .att-contact-stage-filter button,
    .att-cre25-summary a
).is-active,
body.att-system-page .att-system :is(
    .att-workspace-tabs-v21 a,
    .att-calendar-switch a,
    .att-crm-segments a,
    .att-fin24-tabs a,
    .att-portfolio23-filter
).is-active:is(:hover, :focus, :active) {
    background: #3A211A !important;
    border-color: #3A211A !important;
    color: #FFF9EF !important;
}

/* Navegação lateral e cards escuros. */
body.att-system-page .att-system-sidebar a:is(:hover, :focus, :active),
body.att-system-page .att-system-nav a:is(:hover, :focus, :active, .is-active),
body.att-system-page .att-overview-site-card:is(:hover, :focus, :active) {
    color: #FFF9EF !important;
}

/* Cards e links operacionais claros. */
body.att-system-page .att-system-main :is(
    .att-overview-nav-card,
    .att-overview-contact,
    .att-contact-card,
    .att-contact-row,
    .att-client-list-item,
    .att-fin24-transaction,
    .att-fin24-mini-list a,
    .att-portfolio23-card
):is(:hover, :focus, :active) {
    border-color: rgba(217,154,43,.48) !important;
    color: #3A211A !important;
}

/* Ações de texto e links que antes podiam herdar o accent do tema. */
body.att-system-page .att-system-main :is(
    .att-module-list-panel > header > a,
    .att-row-actions a,
    .att-client-profile-actions a,
    .att-crm-next-step > a,
    .att-portfolio23-crm-link,
    .att-fin24-pagination a,
    .att-portfolio23-card-actions a
):is(:hover, :focus, :active) {
    color: #9E3828 !important;
    border-color: #D99A2B !important;
}

/* Exclusão e ações destrutivas têm vermelho terroso da identidade. */
body.att-system-page .att-system :is(.att-delete-link, .att-cre25-danger) {
    color: #9E3828 !important;
    border-color: rgba(58,33,26,.28) !important;
}
body.att-system-page .att-system :is(.att-delete-link, .att-cre25-danger):is(:hover, :focus, :active) {
    background: #9E3828 !important;
    border-color: #9E3828 !important;
    color: #FFF9EF !important;
}

/* Pequenos botões de remoção de imagem. */
body.att-system-page .att-agenda-reference-grid button:is(:hover, :focus, :active) {
    background: #3A211A !important;
    color: #FFF9EF !important;
    outline-color: #D99A2B !important;
}

/* Hover/foco dos controles da área de Criações. */
body.att-system-page .att-cre25-media-actions button:is(:hover, :focus, :active),
body.att-system-page .att-cre25-secondary:is(:hover, :focus, :active) {
    background: #F3E7D3 !important;
    color: #3A211A !important;
    border-color: #D99A2B !important;
}

/* WordPress Media Library, aberta dentro do sistema. */
body.att-system-page .media-modal .button-primary,
body.att-system-page .media-modal .button-primary:is(:hover, :focus, :active) {
    background: #3A211A !important;
    border-color: #3A211A !important;
    color: #FFF9EF !important;
    box-shadow: none !important;
}
body.att-system-page .media-modal :is(.media-menu-item, .media-router a, .attachment):focus,
body.att-system-page .media-modal :is(.media-menu-item, .media-router a):hover {
    color: #3A211A !important;
    outline-color: #D99A2B !important;
    box-shadow: none !important;
}
body.att-system-page .media-modal .attachment.details {
    box-shadow: inset 0 0 0 3px #D99A2B, inset 0 0 0 7px #FFF !important;
}
body.att-system-page .media-modal .attachment.details .check,
body.att-system-page .media-modal .attachment.selected .check:focus,
body.att-system-page .media-modal .attachment.selected .check:hover {
    background: #3A211A !important;
    border-color: #FFF9EF !important;
}

/* Remove brilho/contorno de accent externo em dispositivos touch. */
@media (hover: none) {
    body.att-system-page .att-system :is(a, button):active {
        -webkit-tap-highlight-color: rgba(217,154,43,.18) !important;
    }
}


/* Controles de ícone: geometria previsível e centralização real. */
body.att-system-page .att-system-menu {
    width: 42px;
    height: 42px;
    min-width: 42px;
    min-height: 42px;
    padding: 0 !important;
    line-height: 1 !important;
    text-align: center !important;
}
@media (max-width: 820px) {
    body.att-system-page .att-system-menu {
        display: grid !important;
        place-items: center !important;
    }
}
