/* Menu follows the published Centro de Custos and Orcamentos mobile surface. */
.menu-icon {
  width: 22px;
  height: 22px;
  flex: 0 0 auto;
  fill: currentColor;
  stroke: none;
}
.app-brand {
  display: flex;
  flex-direction: column;
  gap: 3px;
  min-width: 0;
  color: var(--text);
  text-decoration: none;
}
.app-brand:hover { text-decoration: none; }
.app-brand-name { font-size: calc(15px * var(--fs, 1)); font-weight: 700; letter-spacing: 1.5px; }
.app-brand small { font-size: calc(11.5px * var(--fs, 1)); font-weight: 500; line-height: 1.3; }
.topbar { padding-inline: clamp(20px, 3vw, 40px); }
.topbar [data-theme-icon] { display: inline-flex; }
.menu-page {
  display: flex;
  flex-direction: column;
  gap: 20px;
  width: 100%;
  max-width: 960px;
  margin: 0 auto;
  font-size: calc(15px * var(--fs, 1));
  line-height: 1.45;
}
.menu-title h1 { font-size: calc(22px * var(--fs, 1)); font-weight: 500; line-height: 1.25; letter-spacing: 0; }
.menu-profile,
.menu-card {
  border-radius: 12px;
  background: var(--surface);
  box-shadow: 0 0 0 1px var(--line);
}
.menu-profile { display: flex; align-items: center; gap: 12px; padding: 14px; }
.menu-avatar {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  flex: 0 0 44px;
  border-radius: 50%;
  background: var(--soft);
  color: var(--primary);
  font-size: calc(16px * var(--fs, 1));
  font-weight: 600;
}
.menu-profile-copy { min-width: 0; overflow-wrap: anywhere; }
.menu-profile-copy strong { display: block; font-size: calc(15px * var(--fs, 1)); font-weight: 500; }
.menu-profile-copy small { display: block; margin-top: 3px; color: var(--muted); font-size: calc(12px * var(--fs, 1)); }
.menu-groups {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  align-items: start;
  gap: 22px;
}
.menu-group { min-width: 0; }
.menu-group-title {
  margin: 0 0 9px 2px;
  color: var(--muted);
  font-size: calc(12px * var(--fs, 1));
  font-weight: 500;
  letter-spacing: .04em;
}
.menu-card { padding: 0 14px; }
.menu-item {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  min-height: 56px;
  padding: 8px 0;
  border-top: 1px solid var(--line);
  border-radius: 0;
  color: var(--text);
  background: transparent;
  font-size: calc(15px * var(--fs, 1));
  line-height: 1.45;
  text-align: left;
  text-decoration: none;
}
.menu-item:first-child { border-top: 0; }
.menu-item[hidden] { display: none; }
.menu-item:hover { background: var(--soft); text-decoration: none; }
.menu-item:active { opacity: .78; }
.menu-item > .menu-icon,
.menu-item > [data-theme-icon] { color: var(--primary); }
.menu-item > [data-theme-icon] { display: inline-flex; flex: 0 0 22px; }
.menu-item-copy { display: flex; flex: 1; flex-direction: column; min-width: 0; }
.menu-item-title { font-size: calc(15px * var(--fs, 1)); font-weight: 400; overflow-wrap: anywhere; }
.menu-item-description { display: block; color: var(--muted); font-size: calc(12px * var(--fs, 1)); overflow-wrap: anywhere; }
.menu-caret { display: inline-flex; flex: 0 0 18px; color: var(--muted); }
.menu-caret .menu-icon { width: 18px; height: 18px; }
.menu-logout {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  width: 240px;
  max-width: 100%;
  min-height: 48px;
  padding: 10px 16px;
  border: 1px solid var(--line);
  border-radius: 10px;
  color: var(--bad);
  background: var(--surface);
  font-size: calc(14px * var(--fs, 1));
  font-weight: 500;
}
.menu-logout .menu-icon { width: 20px; height: 20px; }
.menu-logout:hover { background: var(--soft); }
@media (max-width: 800px) {
  .topbar { min-height: 64px; height: auto; gap: 10px; padding: 10px 16px; }
  .app-brand-name { font-size: calc(11.5px * var(--fs, 1)); font-weight: 600; letter-spacing: .08em; }
  .app-brand small { font-size: calc(11.5px * var(--fs, 1)); }
  .workspace[data-area="menu"] .page {
    padding: 20px 20px calc(58px + var(--mobile-tabs-base) + 26px);
  }
  .menu-page { gap: 14px; max-width: 560px; }
  .menu-groups { grid-template-columns: minmax(0, 1fr); gap: 18px; }
  .menu-logout { width: 100%; }
}
[data-pending-count][hidden] { display: none; }
