/* GERADO por tools/build_styles.py. Edite styles/sources; consulte styles/README.md. */
/* fonte: shared/app-shell.css */
/*
 * Sistema visual unificado — base
 * Referência: aba Início.
 * Somente apresentação em tela; os documentos impressos permanecem isolados.
 */

:root {
  --ui-card-bg: #ffffff;
  --ui-card-border: #d9e3dc;
  --ui-card-radius: 10px;
  --ui-card-shadow: 0 1px 3px rgba(22, 48, 32, 0.08);
  --ui-panel-gap: 16px;
  --ui-panel-padding: 16px 18px;
  --ui-muted-bg: #f8fbf9;
  --ui-accent: var(--brand-mid);
  --ui-heading-size: 0.91rem;
  --ui-copy-size: 0.73rem;
  --ui-tab-font-size: 0.7rem;
  --ui-tab-min-height: 46px;
  --ui-summary-min-height: 116px;
  --ui-summary-padding: 16px 18px;
  --ui-summary-label-size: 0.67rem;
  --ui-summary-value-size: 1.38rem;
  --ui-summary-detail-size: 0.67rem;
  --ui-accent-soft: #eef8f2;
  --ui-danger-soft: #fff7f5;
  --ui-warning-soft: #fffbef;
  --ui-info-soft: #f3f8fd;
  --app-nav-rail-width: 72px;
  --app-nav-panel-width: 272px;
}

@media screen {
  .view > [class*="-shell"],
  .view > [class*="-hub"] {
    display: grid;
    gap: var(--ui-panel-gap);
    min-width: 0;
  }

  .view .panel {
    background: var(--ui-card-bg);
    border: 1px solid var(--ui-card-border);
    border-radius: var(--ui-card-radius);
    box-shadow: var(--ui-card-shadow);
    min-width: 0;
  }

  .view .panel-heading,
  .view [class*="-navigation-heading"],
  .view .module-navigation-heading {
    align-items: center;
    background: var(--ui-card-bg);
    border-bottom: 1px solid var(--ui-card-border);
    display: flex;
    gap: 16px;
    justify-content: space-between;
    padding: var(--ui-panel-padding);
  }

  .view .panel-heading h2,
  .view [class*="-navigation-heading"] h2,
  .view .module-navigation-heading h2 {
    color: var(--text);
    font-size: var(--ui-heading-size);
    font-weight: 650;
    letter-spacing: 0;
    line-height: 1.2;
    margin: 0;
    text-transform: none;
  }

  .view .panel-heading p,
  .view [class*="-navigation-heading"] p,
  .view .module-navigation-heading p {
    color: var(--muted);
    font-size: var(--ui-copy-size);
    font-weight: 400;
    line-height: 1.35;
    margin: 4px 0 0;
  }

  .view [role="tablist"] {
    background: var(--ui-card-bg);
    border-top: 1px solid var(--ui-card-border);
    min-width: 0;
    padding: 0 10px;
  }

  .view [role="tablist"] > button[role="tab"] {
    background: transparent;
    border: 0;
    border-bottom: 3px solid transparent;
    border-radius: 0;
    color: var(--muted);
    font: inherit;
    font-size: var(--ui-tab-font-size);
    font-weight: 600;
    min-height: var(--ui-tab-min-height);
    padding: 12px 10px 10px;
    text-transform: none;
  }

  .view [role="tablist"] > button[role="tab"]:hover {
    background: #f6faf7;
    color: var(--text);
  }

  .view [role="tablist"] > button[role="tab"][aria-selected="true"],
  .view [role="tablist"] > button[role="tab"].active {
    background: transparent;
    border-bottom-color: var(--ui-accent);
    color: var(--ui-accent);
  }

  .view .primary-button,
  .view .secondary-button,
  .view .ghost-button {
    border-radius: 8px;
    min-height: 40px;
  }

  .view input:not([type="checkbox"]):not([type="radio"]),
  .view select,
  .view textarea {
    border-color: #d6dfd9;
    border-radius: 8px;
  }

  .view input:not([type="checkbox"]):not([type="radio"]):focus,
  .view select:focus,
  .view textarea:focus {
    border-color: #78ad8c;
    outline: 3px solid rgba(29, 122, 69, 0.11);
  }

  .view .table-wrap {
    scrollbar-color: #b8c5bd transparent;
    scrollbar-width: thin;
  }

  .view .registry-count-pill,
  .view [class*="-status-pill"],
  .view [class*="-count-pill"] {
    background: var(--ui-accent-soft);
    border: 1px solid #cfe0d5;
    border-radius: 999px;
    color: var(--muted);
    font-size: 0.72rem;
    font-weight: 600;
  }

  .view .empty-state,
  .view [class*="-empty-state"] {
    background: var(--ui-muted-bg);
    border: 1px solid var(--ui-card-border);
    border-radius: var(--ui-card-radius);
  }
}

@media screen and (max-width: 760px) {
  .view .panel-heading,
  .view [class*="-navigation-heading"],
  .view .module-navigation-heading {
    align-items: flex-start;
    flex-wrap: wrap;
    gap: 10px;
    padding: 14px;
  }

  .view .panel-heading.split {
    flex-direction: column;
  }

  .view [role="tablist"] {
    display: flex;
    overflow-x: auto;
    padding: 0 6px;
    scrollbar-width: thin;
  }

  .view [role="tablist"] > button[role="tab"] {
    flex: 0 0 auto;
    min-width: 132px;
  }
}

@media screen and (max-width: 1400px) {
  .topbar-actions .central-sync-status {
    display: none;
  }

  .topbar-actions .central-sync-status[data-backup-status="failed"] {
    display: inline-flex;
  }
}

/* App Shell — navegação global separada dos controles de cada tela. */
@media screen {
  .visually-hidden {
    clip: rect(0 0 0 0);
    clip-path: inset(50%);
    height: 1px;
    overflow: hidden;
    position: absolute;
    white-space: nowrap;
    width: 1px;
  }

  .nav-panel-header {
    display: none;
  }

  .app-global-bar {
    align-items: center;
    background: #fff;
    border-bottom: 1px solid var(--ui-card-border);
    display: flex;
    gap: 18px;
    justify-content: space-between;
    margin: 0 -28px;
    min-height: 64px;
    padding: 10px 28px;
    position: sticky;
    top: 0;
    z-index: 32;
  }

  .brand-copy {
    display: grid;
    flex: 1 1 auto;
    gap: 8px;
    min-width: 0;
    text-align: left;
  }

  .brand-copy > strong {
    align-content: center;
    display: grid;
    min-height: 44px;
  }

  .brand .brand-sync-status {
    background: transparent;
    border: 0;
    border-radius: 0;
    color: #4d705d;
    display: inline-flex !important;
    font-size: 0.57rem;
    gap: 5px;
    justify-content: center;
    line-height: 1.15;
    min-height: 0;
    overflow: hidden;
    padding: 0;
    text-align: center;
    text-overflow: ellipsis;
    white-space: nowrap;
    width: 100%;
  }

  .brand .brand-sync-status .central-sync-dot {
    box-shadow: none;
    flex: 0 0 5px;
    height: 5px;
    width: 5px;
  }

  .app-global-search {
    flex: 1 1 480px;
    max-width: 620px;
    min-width: 220px;
    position: relative;
  }

  .app-global-search > input {
    background: #f6f9f7;
    border: 1px solid #dbe4de;
    border-radius: 9px;
    color: var(--text);
    font: inherit;
    font-size: 0.8rem;
    height: 40px;
    padding: 0 130px 0 43px;
    transition: border-color 140ms ease, box-shadow 140ms ease, background 140ms ease;
    width: 100%;
  }

  .app-global-search > input:focus {
    background: #fff;
    border-color: #78ad8c;
    box-shadow: 0 0 0 3px rgba(29, 122, 69, 0.11);
    outline: 0;
  }

  .app-global-search-icon {
    fill: none;
    height: 19px;
    left: 14px;
    pointer-events: none;
    position: absolute;
    stroke: #536b5c;
    stroke-linecap: round;
    stroke-width: 1.9;
    top: 50%;
    transform: translateY(-50%);
    width: 19px;
    z-index: 1;
  }

  .app-global-search-hint {
    color: #8a978f;
    font-size: 0.64rem;
    font-weight: 750;
    pointer-events: none;
    position: absolute;
    right: 14px;
    top: 50%;
    transform: translateY(-50%);
  }

  .app-global-search-results {
    background: #fff;
    border: 1px solid var(--ui-card-border);
    border-radius: 10px;
    box-shadow: 0 16px 36px rgba(19, 49, 31, 0.15);
    display: grid;
    left: 0;
    max-height: min(420px, calc(100vh - 110px));
    overflow-y: auto;
    padding: 7px;
    position: absolute;
    right: 0;
    top: calc(100% + 8px);
    z-index: 50;
  }

  .app-global-search-results[hidden],
  .app-shell-dropdown[hidden],
  .app-shell-dropdown [hidden],
  .app-new-record-button[hidden] {
    display: none !important;
  }

  .app-global-search-results button {
    align-items: center;
    background: transparent;
    border: 0;
    border-radius: 7px;
    color: var(--text);
    display: flex;
    gap: 16px;
    justify-content: space-between;
    min-height: 42px;
    padding: 8px 10px;
    text-align: left;
    width: 100%;
  }

  .app-global-search-results button:hover,
  .app-global-search-results button:focus-visible {
    background: var(--ui-accent-soft);
    outline: 0;
  }

  .app-global-search-results button span {
    font-size: 0.82rem;
    font-weight: 760;
  }

  .app-global-search-results button small {
    color: var(--muted);
    font-size: 0.68rem;
    font-weight: 700;
  }

  .app-global-search-empty {
    color: var(--muted);
    font-size: 0.78rem;
    margin: 0;
    padding: 14px 12px;
  }

  .app-global-actions {
    align-items: center;
    display: flex;
    flex: 0 0 auto;
    gap: 6px;
    min-height: 40px;
  }

  .app-shell-menu {
    position: relative;
  }

  .app-new-record-button,
  .app-global-icon-button,
  .app-user-menu-button,
  .app-more-actions-button {
    align-items: center;
    border-radius: 8px;
    display: inline-flex;
    font: inherit;
    justify-content: center;
  }

  .app-new-record-button {
    background: var(--brand-mid);
    border: 1px solid var(--brand-mid);
    color: #fff;
    gap: 8px;
    font-size: 0.82rem;
    height: 40px;
    min-height: 40px;
    padding: 0 13px;
    white-space: nowrap;
  }

  .app-new-record-button:hover,
  .app-new-record-button[aria-expanded="true"] {
    background: #166638;
    border-color: #166638;
  }

  .app-new-record-plus {
    font-size: 1.25rem;
    font-weight: 450;
    line-height: 1;
  }

  .app-shell-chevron {
    fill: none;
    height: 16px;
    stroke: currentColor;
    stroke-linecap: round;
    stroke-linejoin: round;
    stroke-width: 1.8;
    width: 16px;
  }

  [aria-expanded="true"] > .app-shell-chevron {
    transform: rotate(180deg);
  }

  .app-global-icon-button {
    background: transparent;
    border: 1px solid transparent;
    color: #52635a;
    height: 40px;
    padding: 0;
    position: relative;
    width: 40px;
  }

  .app-global-icon-button:hover,
  .app-global-icon-button:focus-visible {
    background: #f2f7f4;
    border-color: #dce7e0;
    color: var(--brand-mid);
    outline: 0;
  }

  .app-global-icon-button > svg,
  .app-logout-button > svg {
    fill: none;
    height: 20px;
    stroke: currentColor;
    stroke-linecap: round;
    stroke-linejoin: round;
    stroke-width: 1.7;
    width: 20px;
  }

  .app-notification-dot {
    background: #e99a23;
    border: 2px solid #fff;
    border-radius: 999px;
    height: 9px;
    position: absolute;
    right: 7px;
    top: 7px;
    width: 9px;
  }

  .app-user-menu {
    border-left: 1px solid var(--ui-card-border);
    margin-left: 4px;
    padding-left: 12px;
    align-items: center;
    display: flex;
    height: 40px;
  }

  .app-user-menu-button {
    background: transparent;
    border: 1px solid transparent;
    color: var(--text);
    gap: 9px;
    height: 40px;
    min-height: 40px;
    padding: 2px 5px 2px 2px;
  }

  .app-user-menu-button:hover,
  .app-user-menu-button[aria-expanded="true"] {
    background: #f4f8f5;
    border-color: #dce7e0;
  }

  .app-user-avatar {
    align-items: center;
    background: #e16337;
    border-radius: 50%;
    color: #fff;
    display: inline-flex;
    flex: 0 0 32px;
    font-size: 0.76rem;
    font-weight: 850;
    height: 32px;
    justify-content: center;
    width: 32px;
  }

  .app-user-copy,
  .app-user-dropdown-summary > span:last-child {
    display: grid;
    gap: 1px;
    min-width: 0;
    text-align: left;
  }

  .app-user-copy strong,
  .app-user-dropdown-summary strong {
    font-size: 0.72rem;
    max-width: 132px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .app-user-copy small,
  .app-user-dropdown-summary small {
    color: var(--muted);
    font-size: 0.62rem;
    font-weight: 650;
  }

  .app-shell-dropdown {
    background: #fff;
    border: 1px solid var(--ui-card-border);
    border-radius: 10px;
    box-shadow: 0 16px 36px rgba(19, 49, 31, 0.15);
    display: grid;
    min-width: 260px;
    padding: 7px;
    position: absolute;
    top: calc(100% + 8px);
    z-index: 50;
  }

  .app-new-record-menu {
    left: 0;
    min-width: 286px;
  }

  .app-user-dropdown,
  .app-more-actions-menu {
    right: 0;
  }

  .app-shell-dropdown-title {
    color: #7a8980;
    font-size: 0.66rem;
    font-weight: 850;
    letter-spacing: 0.06em;
    padding: 7px 9px 6px;
    text-transform: uppercase;
  }

  .app-shell-dropdown > button,
  .app-shell-dropdown > label {
    align-items: center;
    background: transparent;
    border: 0;
    border-radius: 7px;
    color: var(--text);
    cursor: pointer;
    display: flex;
    font: inherit;
    gap: 10px;
    min-height: 42px;
    padding: 8px 10px;
    text-align: left;
    width: 100%;
  }

  .app-shell-dropdown > button:hover:not(:disabled),
  .app-shell-dropdown > label:hover,
  .app-shell-dropdown > button:focus-visible,
  .app-shell-dropdown > label:focus-within {
    background: var(--ui-accent-soft);
    color: #165f36;
    outline: 0;
  }

  .app-shell-dropdown > button:disabled {
    color: #9aa59e;
    cursor: not-allowed;
  }

  .app-new-record-menu > button > span:last-child {
    display: grid;
    gap: 2px;
  }

  .app-new-record-menu strong {
    font-size: 0.79rem;
  }

  .app-new-record-menu small {
    color: var(--muted);
    font-size: 0.67rem;
    font-weight: 650;
  }

  .app-user-dropdown {
    min-width: 238px;
  }

  .app-user-dropdown-summary {
    align-items: center;
    border-bottom: 1px solid var(--ui-card-border);
    display: flex;
    gap: 10px;
    margin-bottom: 5px;
    padding: 8px 8px 12px;
  }

  .app-logout-button {
    color: #9e382f !important;
  }

  .app-context-header {
    align-items: center;
    background: #fff;
    border-bottom: 1px solid var(--ui-card-border);
    box-shadow: 0 1px 0 rgba(22, 48, 32, 0.03);
    margin: 0 -28px 24px;
    min-height: 94px;
    padding: 18px 28px;
    position: sticky;
    top: 64px;
    z-index: 24;
    column-gap: 24px;
    display: grid;
    grid-template-columns: minmax(300px, 36%) minmax(0, 1fr);
    justify-content: initial;
  }

  .app-context-header .app-context-title {
    max-width: none;
  }

  .app-context-header .topbar-actions {
    align-items: flex-end;
    flex-wrap: nowrap;
    justify-content: flex-end;
    row-gap: 8px;
  }

  .app-context-header .topbar-period {
    flex: 0 0 142px;
    font-size: 0.72rem;
    gap: 4px;
    line-height: 1.1;
    min-width: 142px;
  }

  .app-context-header .topbar-period .month-button {
    border-radius: 8px;
    height: 40px;
    min-height: 40px;
  }

  .app-context-header #salvarAlteracoes,
  .app-context-header .app-more-actions-button {
    height: 40px;
    min-height: 40px;
  }

  .app-more-actions-button {
    gap: 6px;
  }

  .app-more-actions-menu {
    min-width: 244px;
  }

  .app-more-actions-menu .import-backup-label {
    min-height: 42px;
  }

  body.role-consulta .app-new-record,
  body.ajuda-manuais-view-active .app-context-more {
    display: none !important;
  }

  body.ajuda-manuais-view-active .app-context-header .topbar-actions {
    justify-content: flex-end;
  }
}

@media screen and (max-width: 1180px) {
  .app-global-search {
    flex-basis: 320px;
  }

  .app-global-search-hint {
    display: none;
  }

  .app-global-search > input {
    padding-right: 14px;
  }

  .app-user-copy {
    display: none;
  }

  .app-context-header {
    display: grid;
    gap: 14px;
    grid-template-columns: 1fr;
  }

  .app-context-header .app-context-title {
    max-width: none;
  }

  .app-context-header .topbar-actions {
    justify-content: flex-end;
  }
}

@media screen and (min-width: 901px) {
  .sidebar {
    padding-top: 10px;
  }

  .sidebar .brand {
    align-items: flex-start;
    margin-bottom: 8px;
    min-height: 68px;
    padding: 0 8px 10px;
  }

  .sidebar .brand strong {
    font-size: 0.86rem;
  }
}

@media screen and (min-width: 981px) {
  .app-shell {
    grid-template-columns: var(--app-nav-rail-width) minmax(0, 1fr);
  }

  .sidebar {
    background: #dff2e7;
    box-shadow: 1px 0 0 #cfe2d6;
    color: #173e29;
    gap: 7px;
    overflow: visible;
    padding: 10px 8px;
    width: var(--app-nav-rail-width);
    z-index: 42;
  }

  .sidebar .brand {
    align-items: center;
    border-bottom: 1px solid #cfe2d6;
    border-radius: 9px;
    gap: 0;
    justify-content: center;
    margin: 0 0 6px;
    min-height: 66px;
    padding: 0 0 10px;
    width: 56px;
  }

  .sidebar .brand:hover,
  .sidebar .brand:focus-visible {
    background: #cfe9da;
  }

  .sidebar .brand-mark {
    height: 46px;
    width: 46px;
  }

  .sidebar .brand-mark img {
    height: 40px;
    width: 40px;
  }

  .sidebar .brand-copy {
    display: none;
  }

  .sidebar.nav-panel-open .brand-copy {
    align-content: center;
    background: #fff;
    border-bottom: 1px solid #d9e4dc;
    border-right: 1px solid #d9e4dc;
    display: grid;
    gap: 7px;
    height: 88px;
    left: var(--app-nav-rail-width);
    padding: 13px 18px 12px;
    position: fixed;
    text-align: left;
    top: 0;
    width: var(--app-nav-panel-width);
    z-index: 44;
  }

  .sidebar.nav-panel-open .brand-copy > strong {
    color: var(--text);
    display: block;
    font-size: 0.78rem;
    font-weight: 650;
    line-height: 1.2;
    min-height: 0;
  }

  .sidebar.nav-panel-open .brand .brand-sync-status {
    font-size: 0.58rem;
    justify-content: flex-start;
    text-align: left;
  }

  .sidebar .nav {
    display: flex;
    flex: 1 1 auto;
    min-height: 0;
    width: 56px;
  }

  .sidebar .nav-section-label {
    display: none;
  }

  .sidebar .nav-primary,
  .sidebar .nav-accordion {
    align-items: center;
    display: grid;
    gap: 7px;
    margin: 0;
    width: 56px;
  }

  .sidebar .nav-accordion {
    margin-top: 2px;
  }

  .sidebar .nav-group {
    border: 0;
    width: 56px;
  }

  .sidebar .nav-group-toggle,
  .sidebar .nav-primary > .nav-item,
  .sidebar .nav-help > .nav-item {
    align-items: center;
    border: 1px solid transparent;
    border-radius: 10px;
    color: #607069;
    display: flex;
    font-size: 0;
    height: 48px;
    justify-content: center;
    margin: 0;
    min-height: 48px;
    padding: 0;
    text-align: center;
    width: 56px;
  }

  .sidebar .nav-primary > .sub-nav-item {
    opacity: 1;
  }

  .sidebar .nav-primary > .sub-nav-item::before {
    display: none;
  }

  .sidebar .nav-group-toggle .nav-group-label {
    display: grid;
    font-size: 0;
    line-height: 1;
    max-width: 100%;
    place-items: center;
  }

  .sidebar .nav-group-toggle .nav-icon,
  .sidebar .nav-primary > .nav-item .nav-icon,
  .sidebar .nav-help > .nav-item .nav-icon {
    filter: grayscale(1);
    font-size: 1.08rem;
    line-height: 1;
    margin: 0;
    opacity: 0.78;
  }

  .sidebar .nav-primary > [data-view="alertas"] .nav-icon {
    color: #d48a16;
    filter: none;
    font-size: 0.78rem;
  }

  .sidebar .nav-chevron {
    display: none;
  }

  .sidebar .nav-group-toggle:hover,
  .sidebar .nav-primary > .nav-item:hover,
  .sidebar .nav-help > .nav-item:hover {
    background: #cfe9da;
    border-color: #c5dfd0;
    color: #185f37;
  }

  .sidebar .nav-group-toggle.group-active,
  .sidebar .nav-group.is-open > .nav-group-toggle,
  .sidebar .nav-primary > .nav-item.active,
  .sidebar .nav-help > .nav-item.active {
    background: var(--brand-mid);
    border-color: var(--brand-mid);
    color: #fff;
  }

  .sidebar .nav-group-toggle.group-active .nav-icon,
  .sidebar .nav-group.is-open > .nav-group-toggle .nav-icon,
  .sidebar .nav-primary > .nav-item.active .nav-icon,
  .sidebar .nav-help > .nav-item.active .nav-icon {
    filter: none;
    opacity: 1;
  }

  .sidebar .nav-primary > [data-view="alertas"].active .nav-icon {
    color: #fff;
  }

  .sidebar .nav-primary > .nav-item.group-active:not(.active) {
    background: transparent;
    border-color: transparent;
    color: #607069;
  }

  .sidebar .nav-help {
    margin-top: auto;
    width: 56px;
  }

  .sidebar .nav-group-items {
    align-content: start;
    background: #fff;
    border-right: 1px solid #d9e4dc;
    bottom: 0;
    box-shadow: 12px 0 28px rgba(25, 59, 39, 0.12);
    color: var(--text);
    display: grid;
    gap: 4px;
    left: var(--app-nav-rail-width);
    overflow-y: auto;
    padding: 96px 10px 20px;
    position: fixed;
    top: 0;
    width: var(--app-nav-panel-width);
    z-index: 43;
  }

  .sidebar .nav-group-items[hidden] {
    display: none !important;
  }

  .sidebar .nav-panel-header {
    align-items: center;
    border-bottom: 1px solid #e1e8e3;
    display: flex;
    justify-content: space-between;
    margin: 0 4px 8px;
    min-height: 46px;
    padding: 0 4px 8px 6px;
  }

  .sidebar .nav-panel-header strong {
    color: var(--text);
    font-size: 0.84rem;
    font-weight: 650;
  }

  .sidebar .nav-panel-header button {
    align-items: center;
    background: transparent;
    border: 1px solid transparent;
    border-radius: 8px;
    color: #52665a;
    display: inline-flex;
    font: inherit;
    font-size: 1.35rem;
    height: 34px;
    justify-content: center;
    padding: 0;
    width: 34px;
  }

  .sidebar .nav-panel-header button:hover,
  .sidebar .nav-panel-header button:focus-visible {
    background: #eef7f1;
    border-color: #d3e3d8;
    color: var(--brand-mid);
    outline: 0;
  }

  .sidebar .nav-group-items > .nav-item,
  .sidebar .nav-group-items > .nav-item:not(.sub-nav-item) {
    align-items: center;
    border: 1px solid transparent;
    border-radius: 8px;
    color: #4c5c53;
    font-size: 0.73rem;
    font-weight: 600;
    gap: 8px;
    justify-content: flex-start;
    line-height: 1.25;
    margin: 0;
    min-height: 43px;
    min-width: 0;
    opacity: 1;
    overflow-wrap: anywhere;
    padding: 9px 11px;
    text-align: left;
    white-space: normal;
    width: 100%;
  }

  .sidebar .nav-group-items > .sub-nav-item::before {
    display: none;
  }

  .sidebar .nav-group-items > .nav-item .nav-icon {
    filter: grayscale(1);
    font-size: 0.92rem;
    opacity: 0.72;
    text-align: center;
    width: 22px;
  }

  .sidebar .nav-group-items > .nav-item:hover:not(.active) {
    background: #f1f8f4;
    border-color: #e0ece4;
    color: #185f37;
  }

  .sidebar .nav-group-items > .nav-item.active {
    background: #e4f3e9;
    border-color: #d1e7d9;
    color: #17663a;
    font-weight: 650;
  }

  .sidebar .nav-group-items > .nav-item.active .nav-icon {
    filter: none;
    opacity: 1;
  }

  .sidebar .nav-group-items > [data-view="alertas"] .nav-icon {
    color: #c47d13;
    filter: none;
  }

  .sidebar .sidebar-footer {
    gap: 3px;
    margin-top: 8px;
    width: 56px;
  }

  .sidebar .sidebar-clock {
    color: #526158;
    font-size: 0.51rem;
    font-weight: 800;
    line-height: 1.4;
    overflow-wrap: anywhere;
  }

  .sidebar .app-version {
    color: #8b9890;
    font-size: 0.5rem;
    line-height: 1.35;
  }
}

@media screen and (min-width: 1280px) {
  body.nav-panel-open .app-shell {
    grid-template-columns: calc(var(--app-nav-rail-width) + var(--app-nav-panel-width)) minmax(0, 1fr);
  }
}

@media screen and (max-width: 760px) {
  .app-global-bar {
    align-items: stretch;
    display: grid;
    gap: 9px;
    margin: 0 -14px;
    padding: 10px 14px;
    position: static;
  }

  .app-global-search {
    max-width: none;
    min-width: 0;
    order: 2;
  }

  .app-global-actions {
    justify-content: flex-end;
    order: 1;
  }

  .app-new-record {
    margin-right: auto;
  }

  .app-user-menu {
    padding-left: 8px;
  }

  .app-context-header {
    margin: 0 -14px 18px;
    min-height: 0;
    padding: 15px 14px;
    position: static;
  }

  .app-context-header .topbar-actions {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto auto;
    width: 100%;
  }

  .app-context-header .central-sync-status {
    grid-column: 1 / -1;
  }

  .app-context-header .topbar-period {
    min-width: 0;
  }

  .app-context-header .topbar-period .month-button {
    min-width: 0;
  }

  .app-new-record-menu {
    left: 0;
    max-width: calc(100vw - 28px);
  }
}

@media screen and (max-width: 480px) {
  .app-new-record-button {
    padding: 0 11px;
  }

  .app-new-record-button > span:nth-child(2) {
    font-size: 0;
  }

  .app-new-record-button > span:nth-child(2)::after {
    content: "Novo";
    font-size: 0.82rem;
  }

  .app-global-icon-button {
    width: 38px;
  }

  .app-user-menu-button .app-shell-chevron {
    display: none;
  }

  .app-context-header .topbar-actions {
    grid-template-columns: minmax(0, 1fr) auto;
  }

  .app-context-header #salvarAlteracoes {
    grid-column: 1 / 2;
  }

  .app-context-more {
    grid-column: 2 / 3;
  }

  .app-context-header .topbar-period {
    grid-column: 1 / -1;
  }
}

/* Escala tipográfica compacta: leitura mais leve sem reduzir áreas de toque. */
@media screen {
  .brand-copy > strong {
    font-size: 0.78rem;
    font-weight: 650;
    line-height: 1.2;
  }

  .brand-sync-status {
    font-size: 0.59rem;
    font-weight: 550;
    line-height: 1.25;
  }

  .app-global-search > input {
    font-size: 0.78rem;
    font-weight: 400;
  }

  .app-global-search-hint {
    font-size: 0.63rem;
    font-weight: 550;
  }

  .app-global-search-results button span {
    font-size: 0.75rem;
    font-weight: 600;
  }

  .app-global-search-results button small {
    font-size: 0.63rem;
    font-weight: 500;
  }

  .app-new-record-button {
    font-size: 0.75rem;
    font-weight: 600;
  }

  .app-user-copy strong,
  .app-user-dropdown-summary strong {
    font-size: 0.73rem;
    font-weight: 650;
  }

  .app-user-copy small,
  .app-user-dropdown-summary small {
    font-size: 0.63rem;
    font-weight: 500;
  }

  #viewTitle {
    font-size: 1.31rem;
    font-weight: 600;
    letter-spacing: -0.015em;
  }

  #viewSubtitle {
    font-size: 0.84rem;
    font-weight: 400;
    line-height: 1.35;
  }

  .app-context-header .topbar-period {
    font-size: 0.63rem;
    font-weight: 600;
  }

  .app-context-header .topbar-period .month-button {
    font-size: 0.8rem;
    font-weight: 600;
  }

  .app-context-header :is(.primary-button, .secondary-button) {
    font-size: 0.75rem;
    font-weight: 600;
  }

  .view {
    font-size: 0.875rem;
  }

  .view .panel h3,
  .view [class*="-block-title"] h3 {
    font-size: 0.83rem;
    font-weight: 650;
    line-height: 1.25;
  }

  .view label,
  .view .field-label {
    font-size: 0.69rem;
    font-weight: 600;
  }

  .view :is(input, select, textarea) {
    font-family: inherit;
    font-size: 0.75rem;
    font-weight: 400;
  }

  .view button {
    font-family: inherit;
  }

  .view table {
    font-size: 0.72rem;
  }

  .view table th {
    font-weight: 650;
  }

  .view table td {
    font-weight: 400;
  }
}

@media print {
  body.report-print-mode .app-global-bar {
    display: none !important;
  }
}

/* Search groups keep actions distinct from saved records on desktop and mobile. */
.app-global-search-results .app-search-group {
  color: var(--muted);
  font-size: .72rem;
  font-weight: 750;
  padding: 12px 10px 5px;
  border-top: 1px solid var(--ui-card-border);
}
.app-global-search-results .app-search-group:first-child { border-top: 0; }
.app-global-search-results button { min-width: 0; }
.app-global-search-results button :is(span, small) { min-width: 0; overflow-wrap: anywhere; }
.app-global-search-results button span { flex: 1; }
.app-global-search-results button small { max-width: 46%; }
.benefit-search { display: grid; gap: 8px; margin: 16px 0; max-width: 600px; }
@media (max-width: 760px) {
  .app-global-search-results button { align-items: flex-start; flex-direction: column; gap: 3px; }
  .app-global-search-results button small { max-width: 100%; }
}
/* Keep Safari's native clear button separate from the descriptive hint. */
.app-global-search > input:not(:placeholder-shown) ~ .app-global-search-hint { display: none; }
