/* TOPLead: visual executivo, com navegação lateral e área de trabalho clara. */
.app-body-shell { --ui-canvas: #f2f5fa; --ui-surface: #fff; --ui-border: #e2e8f1; --ui-text: #10213c; --ui-muted: #657894; --ui-accent: #075de5; --ui-accent-soft: #eaf2ff; --ui-shadow: 0 3px 14px rgba(23, 48, 84, .04); }
html[data-theme="dark"] .app-body-shell { --ui-canvas: #0e1828; --ui-surface: #172437; --ui-border: #30435b; --ui-text: #e8effa; --ui-muted: #aebed3; --ui-accent: #8bb5ff; --ui-accent-soft: #243c60; }
.app-body-shell .app-layout-shell { display: grid; grid-template-columns: 232px minmax(0, 1fr); min-height: 100vh; }
.executive-sidebar { position: sticky; top: 0; height: 100vh; overflow-y: auto; display: flex; flex-direction: column; padding: 1.3rem .8rem; background: #091a35; color: #d0ddf1; }
.executive-brand { display: flex; align-items: center; justify-content: center; width: 180px; height: 56px; margin: 0 auto 1.5rem; padding: .45rem .65rem; border-radius: 8px; background: #fff; }
.executive-brand img { max-width: 100%; max-height: 100%; object-fit: contain; }
.executive-nav-label { padding: 0 .85rem; color: #92a7c8; font-size: .65rem; letter-spacing: .12em; font-weight: 700; }
.executive-nav { display: grid; gap: .3rem; margin-top: .7rem; }
.executive-nav a { display: flex; align-items: center; gap: .8rem; min-height: 43px; padding: .7rem .85rem; border-radius: 7px; color: #c3d1e6; text-decoration: none; font-size: .84rem; font-weight: 550; }
.executive-nav a i { width: 20px; text-align: center; font-size: .95rem; }
.executive-nav a:hover { color: white; background: #152e51; }
.executive-nav a.active { background: #075eea; color: #fff; font-weight: 700; }
.executive-sidebar-bottom { margin-top: auto; padding: 1rem .85rem 0; border-top: 1px solid #29405e; }
.executive-sidebar-bottom span, .executive-sidebar-bottom small { display: block; }
.executive-sidebar-bottom span { color: #fff; font-weight: 700; font-size: .75rem; }
.executive-sidebar-bottom small { margin-top: .2rem; color: #a8bad3; font-size: .72rem; }
.executive-sidebar-bottom form { margin: 1rem 0 0; }
.executive-sidebar-bottom button { border: 0; padding: .4rem 0; background: none; color: #d0ddf1; font: inherit; font-size: .8rem; cursor: pointer; }
.executive-sidebar-bottom button i { margin-right: .5rem; }
.executive-main { min-width: 0; display: flex; flex-direction: column; }
.app-body-shell .global-shell-header { position: sticky; top: 0; padding: 0 1.5rem; border-bottom: 1px solid var(--ui-border); background: var(--ui-surface); }
.app-body-shell .global-shell-inner { width: 100%; padding: .7rem 0; }
.app-body-shell .global-brand-row { flex-direction: row; justify-content: space-between; }
.executive-page-context { display: grid; gap: .1rem; min-width: 0; }
.executive-page-context span { color: var(--ui-muted); font-size: .61rem; font-weight: 700; letter-spacing: .1em; }
.executive-page-context strong { overflow: hidden; color: var(--ui-text); font-size: .86rem; white-space: nowrap; text-overflow: ellipsis; }
.app-body-shell .theme-switcher-shell { margin-left: auto; }
.executive-user { display: flex; align-items: center; gap: .6rem; padding-left: 1rem; border-left: 1px solid var(--ui-border); color: var(--ui-text); text-decoration: none; }
.executive-user i { color: var(--ui-accent); font-size: 1.65rem; }
.executive-user span { display: grid; gap: .1rem; }
.executive-user strong { font-size: .78rem; }
.executive-user small { color: var(--ui-muted); font-size: .7rem; }
.app-body-shell .page-shell { padding: 2rem 1.75rem 3rem; }
.app-body-shell .page-panel { width: 100%; max-width: 1500px; }
.app-body-shell .page-header-copy h1 { font-size: clamp(1.65rem, 2.4vw, 2rem); letter-spacing: -.04em; }
.app-body-shell .section-eyebrow { color: var(--ui-accent); }
.app-body-shell .list-panel, .app-body-shell .form-panel, .app-body-shell .content-section-card, .app-body-shell .helper-card { border-radius: 9px; }
.app-body-shell .primary-link { background: #075eea; }
.app-body-shell .primary-link:hover { background: #064fc2; }
.app-body-shell .dashboard-filter-form-panel { grid-template-columns: repeat(3, minmax(0, 1fr)) auto; align-items: end; }
.app-body-shell .dashboard-filter-form-panel .filter-actions { grid-column: auto; }
.app-body-shell .dashboard-filter-form-panel .auth-button-secondary { min-height: 48px; border: 0; border-radius: 8px; padding: .7rem 1.2rem; color: #fff; background: #075eea; cursor: pointer; }
.app-body-shell .dashboard-filter-form-panel .filter-reset-link { color: var(--ui-accent); }
.app-body-shell .stats-grid-analytics { grid-template-columns: repeat(auto-fit, minmax(155px, 1fr)); gap: .75rem; padding-top: 1rem; }
.app-body-shell .stat-card { display: flex; align-items: center; gap: .85rem; min-height: 105px; padding: 1rem; border-radius: 9px; }
.app-body-shell .stat-card span { margin: 0 0 .3rem; font-size: .75rem; }
.app-body-shell .stat-card strong { font-size: 1.6rem; color: var(--ui-text); }
.executive-stat-icon { display: grid; place-items: center; flex: 0 0 44px; height: 44px; border-radius: 9px; background: var(--ui-accent-soft); color: var(--ui-accent); }
.app-body-shell .pipeline-grid-analytics { gap: .75rem; padding: .75rem 0 0; }
.app-body-shell .pipeline-card { min-height: 0; text-align: left; border-radius: 9px; }
.app-body-shell .pipeline-card strong { color: var(--ui-accent); }
.app-body-shell .executive-pipeline { margin-top: .8rem; }
.executive-pipeline-list { display: grid; gap: .8rem; margin-top: 1.1rem; }
.executive-pipeline-row { display: grid; grid-template-columns: minmax(90px, 140px) minmax(0, 1fr) 3rem; align-items: center; gap: .8rem; color: var(--ui-muted); font-size: .8rem; }
.executive-pipeline-row strong { color: var(--ui-text); text-align: right; }
.executive-bar-track { height: 9px; border-radius: 6px; background: var(--ui-accent-soft); overflow: hidden; }
.executive-bar { height: 100%; border-radius: inherit; background: #075eea; }
.app-body-shell .dashboard-secondary-grid { padding: 1rem 0 0; }
.app-body-shell .home-hero-card { padding: 0; }
.app-body-shell .home-account-card, .app-body-shell .recent-card, .app-body-shell .agenda-card { border: 1px solid var(--ui-border); border-radius: 9px; background: var(--ui-surface); color: var(--ui-text); box-shadow: none; }
.app-body-shell .company-avatar { flex-basis: 38px; height: 38px; border-radius: 9px; font-size: .95rem; }
.executive-table-wrap { width: 100%; overflow-x: auto; border: 1px solid var(--ui-border); border-radius: 8px; }
.executive-table { width: 100%; border-collapse: collapse; font-size: .79rem; color: var(--ui-text); }
.executive-table th { padding: .8rem .85rem; background: var(--ui-canvas); color: var(--ui-muted); font-size: .7rem; text-align: left; white-space: nowrap; }
.executive-table td { padding: .85rem; border-top: 1px solid var(--ui-border); vertical-align: top; }
.executive-table td:first-child { min-width: 210px; }
.executive-table td small { display: block; margin-top: .25rem; color: var(--ui-muted); font-size: .72rem; }
.executive-table td strong { display: block; font-size: .81rem; }
.executive-table .status-pill { white-space: nowrap; }
.executive-row-menu summary { display: inline-flex; align-items: center; justify-content: center; width: 34px; height: 34px; border: 1px solid var(--ui-border); border-radius: 7px; color: var(--ui-muted); cursor: pointer; list-style: none; }
.executive-row-menu summary::-webkit-details-marker { display: none; }
.executive-row-menu[open] summary { color: var(--ui-accent); background: var(--ui-accent-soft); }
.executive-row-actions { display: grid; gap: .1rem; min-width: 160px; padding-top: .4rem; }
.executive-row-actions a, .executive-row-actions button { display: block; width: 100%; border: 0; padding: .38rem .45rem; background: transparent; color: var(--ui-accent); text-align: left; text-decoration: none; font: inherit; cursor: pointer; }
.executive-row-actions button { color: #c03939; }
.executive-row-actions a:hover, .executive-row-actions button:hover { background: var(--ui-accent-soft); }
.executive-message { max-width: 210px; margin-top: .5rem; color: var(--ui-accent); font-size: .7rem; }
.executive-message summary { cursor: pointer; }
.executive-message p { margin: .5rem 0; color: var(--ui-muted); }
.executive-message textarea { width: 100%; min-width: 190px; padding: .5rem; border: 1px solid var(--ui-border); border-radius: 6px; background: var(--ui-surface); color: var(--ui-text); }
.app-body-shell .global-shell-footer { margin-top: auto; }
.instagram-connection-card { margin-top: 1rem; }
.instagram-connection-heading { display: flex; align-items: center; gap: .85rem; }
.instagram-connection-heading h2 { margin: 0; }
.instagram-connection-heading p { margin: .2rem 0 0; }
.instagram-connection-card p { color: var(--ui-muted); font-size: .86rem; line-height: 1.5; }
.instagram-connection-card strong { color: var(--ui-text); }
.instagram-connection-icon { display: grid; place-items: center; width: 44px; height: 44px; border-radius: 9px; color: var(--ui-accent); background: var(--ui-accent-soft); font-size: 1.3rem; }
.instagram-connection-actions { display: flex; flex-wrap: wrap; gap: .6rem; }
.instagram-connection-actions form { margin: 0; }
.instagram-connection-card button:disabled { opacity: .55; cursor: not-allowed; }
.app-body-shell :is(.executive-nav a, .executive-sidebar button, .executive-user, .executive-row-menu summary):focus-visible { outline: 3px solid #86b5ff; outline-offset: 2px; }
/* Páginas públicas e de acesso seguem a mesma paleta da aplicação. */
.app-body:not(.app-body-shell) .page-shell, .app-body:not(.app-body-shell) .landing-shell { background: #f2f5fa; }
.app-body:not(.app-body-shell) .auth-card { border: 1px solid #e0e7f1; border-radius: 12px; background: #fff; box-shadow: 0 12px 40px rgba(20, 44, 80, .08); }
.app-body:not(.app-body-shell) .auth-submit, .app-body:not(.app-body-shell) .landing-primary-cta { background: #075eea; border-radius: 8px; }
.app-body:not(.app-body-shell) .landing-dashboard-preview, .app-body:not(.app-body-shell) .landing-preview-stat,
.app-body:not(.app-body-shell) .landing-section-card, .app-body:not(.app-body-shell) .landing-info-card,
.app-body:not(.app-body-shell) .landing-step-card, .app-body:not(.app-body-shell) .landing-doc-card,
.app-body:not(.app-body-shell) .content-section-card { border-radius: 10px; box-shadow: 0 3px 14px rgba(23, 48, 84, .05); }
.app-body:not(.app-body-shell) .field :is(input, select, textarea) { border-radius: 8px; }
html[data-theme="dark"] .app-body:not(.app-body-shell) .page-shell, html[data-theme="dark"] .app-body:not(.app-body-shell) .landing-shell { background: #0e1828; }
html[data-theme="dark"] .app-body:not(.app-body-shell) .auth-card { background: #172437; border-color: #30435b; }
@media (max-width: 1000px) {
    .app-body-shell .app-layout-shell { grid-template-columns: 1fr; }
    .executive-sidebar { display: none; }
    .app-body-shell .shell-menu-mobile { display: block; margin: .65rem 0 0; }
    .app-body-shell .shell-menu-toggle { display: flex; align-items: center; gap: .6rem; padding: .65rem .8rem; border-radius: 7px; background: #091a35; color: #fff; cursor: pointer; list-style: none; font-weight: 600; font-size: .82rem; }
    .app-body-shell .shell-menu-toggle::-webkit-details-marker { display: none; }
    .app-body-shell .shell-menu-mobile .global-top-nav { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .25rem; margin: .5rem 0 0; overflow: visible; }
    .app-body-shell .shell-menu-mobile .global-top-nav a { justify-content: flex-start; width: 100%; }
    .app-body-shell .global-logout-form-nav { margin: 0; }
    .app-body-shell .global-logout-button-nav { color: var(--ui-text); }
}
@media (max-width: 700px) {
    .app-body-shell .global-shell-header { padding: 0 1rem; }
    .app-body-shell .page-shell { padding: 1.5rem 1rem 2.5rem; }
    .app-body-shell .executive-user span, .app-body-shell .theme-switcher-label { display: none; }
    .app-body-shell .dashboard-filter-form-panel { grid-template-columns: 1fr; }
    .app-body-shell .dashboard-filter-form-panel .filter-actions { flex-direction: row; align-items: center; }
    .app-body-shell .pipeline-grid-analytics { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .executive-table, .executive-table tbody, .executive-table tr, .executive-table td { display: block; width: 100%; }
    .executive-table thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
    .executive-table tr { padding: .85rem; border-top: 1px solid var(--ui-border); }
    .executive-table tr:first-child { border-top: 0; }
    .executive-table td { display: grid; grid-template-columns: 105px minmax(0, 1fr); align-items: start; gap: .5rem; padding: .4rem 0; border: 0; }
    .executive-table td::before { content: attr(data-label); color: var(--ui-muted); font-size: .72rem; font-weight: 600; }
    .executive-table td:first-child { min-width: 0; }
    .executive-table td small { grid-column: 2; }
    .executive-table .company-identity { min-width: 0; }
    .executive-table td[data-label="Ações"] .executive-message { grid-column: 2; }
}
