/* VEXCHANGE LAYOUT REFINEMENTS — spacing, surfaces, empty states */

/* Module Home: preserve hierarchy while removing unused vertical volume. */
.module-home-header{
  margin-bottom:48px;
}
.module-home-intro{
  margin-bottom:20px;
}
.module-card{
  min-height:180px;
  padding:22px;
  box-shadow:0 1px 2px rgba(16,24,40,.04);
}
.module-card:hover{
  box-shadow:0 3px 8px rgba(16,24,40,.08);
}
.module-card p{
  margin:12px 0 18px;
}
.module-secondary{
  margin-top:24px;
  padding-top:20px;
}

/* Module shells: back navigation should read as navigation, not another CTA. */
.module-shell-view .module-home-shell{
  padding-top:24px;
}
.module-back{
  margin-bottom:28px;
  border-color:transparent;
  background:transparent;
  color:var(--muted);
  padding-left:0;
  padding-right:8px;
}
.module-back:hover{
  border-color:transparent;
  background:transparent;
  color:var(--text);
}
.application-toolbar,
.plan-toolbar{
  padding-top:18px;
  padding-bottom:16px;
}

/* Normal FDE content surfaces use borders for grouping; elevation stays for true floating UI. */
#fdeApp .surface,
#fdeApp .filters,
#fdeApp .table-wrap,
#fdeApp .portfolio-company{
  box-shadow:none;
}

/* Keep portfolio information density, but reduce only the outer company container weight on desktop. */
@media(min-width:761px){
  #portfolioView .portfolio-groups{
    gap:14px;
  }
  #portfolioView .portfolio-company{
    padding:16px;
  }
  #portfolioView .portfolio-company-head{
    margin-bottom:12px;
  }
}

/* Application descriptions keep row rhythm without reserving three empty lines. */
.applications-view .application-description{
  margin-top:14px;
  margin-bottom:14px;
}
@media(min-width:761px){
  .applications-view .application-description{
    min-height:42px;
  }
}

/* Empty discovery summary: data and edit access stay intact; only placeholder repetition collapses. */
#discoveryBrief.discovery-brief-empty .surface-head{
  margin-bottom:0;
}
#discoveryBrief.discovery-brief-empty .brief-block,
#discoveryBrief.discovery-brief-empty .chip-list{
  display:none;
}
.discovery-brief-empty-message{
  margin:10px 0 1px;
  color:var(--muted);
  font-size:13px;
  line-height:1.5;
}

@media(max-width:640px){
  .module-home-header{
    margin-bottom:32px;
  }
  .module-card{
    min-height:160px;
    padding:18px;
  }
  .module-secondary{
    margin-top:22px;
    padding-top:18px;
  }
  .module-back{
    margin-bottom:24px;
  }
}
