/* Eterano v1.14.5 — flyout reliability + calmer page hierarchy */

/* --------------------------------------------------------------------------
   Remove only redundant page-intro/hero copy. Keep real controls and warnings.
   -------------------------------------------------------------------------- */

/* Accounting: the page title already says Accounting. Keep only the month
   control where it is contextually useful (Overview / Transactions). */
#view-accounting .accounting-head{
  min-height:0;
  padding:0!important;
  border:0!important;
  background:transparent!important;
  box-shadow:none!important;
  justify-content:flex-end;
  margin-bottom:16px;
}
#view-accounting .accounting-head>div:first-child{display:none!important}
#view-accounting .accounting-head.accounting-context-hidden1145{display:none!important}
#view-accounting .accounting-month-control{width:min(230px,100%)}

/* Reports: keep Year / Period / Refresh, remove the repeated report hero copy. */
.reports-head-card{
  padding:0!important;
  border:0!important;
  background:transparent!important;
  box-shadow:none!important;
  min-height:0;
  justify-content:flex-end!important;
}
.reports-head-copy{display:none!important}
.reports-controls{justify-content:flex-end}

/* Books & controls already has the page title and the Accountant tabs. */
#accountingBooksPane .books-intro{display:none!important}

/* Other obvious duplicate hero cards across the app. */
#view-payments .payments-intro,
#view-invoices .invoices-intro{display:none!important}

/* Bank: keep the useful readiness chip, remove repeated title/help copy. */
#accountingBankPane .bank-intro{
  padding:0!important;
  border:0!important;
  background:transparent!important;
  box-shadow:none!important;
  justify-content:flex-end!important;
  min-height:0;
}
#accountingBankPane .bank-intro .section-heading{display:none!important}

/* The old accounting foundation note no longer adds useful information. */
#view-accounting .accounting-info-card{display:none!important}
#view-accounting .accounting-overview-grid{grid-template-columns:1fr}

/* More visible breathing room between the major Books sections. */
#accountingBooksPane{--books-gap:24px}
#accountingBooksPane>.accountant-center1140,
#accountingBooksPane>.books-two-column,
#accountingBooksPane>.opening-card{margin-bottom:24px!important}
#accountingBooksPane>.books-two-column:last-child{margin-bottom:0!important}

/* Fiscal-year selectors: concise text should never be clipped. */
.accountant-year-controls1140{
  grid-template-columns:minmax(260px,320px) auto!important;
  max-width:470px!important;
}
.accountant-year-controls1140 select{
  min-width:260px!important;
  width:100%!important;
  padding-right:38px!important;
}
.opening-card .books-card-head{
  grid-template-columns:minmax(0,1fr) 270px auto!important;
}
#openingFiscalYear{
  min-width:270px!important;
  width:270px!important;
  padding-right:38px!important;
}

/* --------------------------------------------------------------------------
   Desktop flyouts: fixed to the viewport, fully clickable, no sidebar scroll.
   Reports / Books keep their own local sub-tabs after navigation, so desktop
   does not need a second nested flyout.
   -------------------------------------------------------------------------- */
@media(min-width:761px){
  .sidebar{overflow:visible!important}
  .sidebar .nav-list{overflow:visible!important}

  .sidebar-nav-group1142>.sidebar-subnav1142,
  .sidebar-nav-group1142.expanded>.sidebar-subnav1142{
    position:fixed!important;
    top:var(--flyout-top1145,12px)!important;
    left:var(--flyout-left1145,260px)!important;
    right:auto!important;
    bottom:auto!important;
    width:282px!important;
    max-height:calc(100vh - 24px)!important;
    height:auto!important;
    overflow:visible!important;
    margin:0!important;
    padding:10px!important;
    opacity:0!important;
    visibility:hidden!important;
    pointer-events:none!important;
    transform:translateX(4px)!important;
    z-index:120!important;
  }
  .sidebar-nav-group1142:hover>.sidebar-subnav1142,
  .sidebar-nav-group1142:focus-within>.sidebar-subnav1142{
    opacity:1!important;
    visibility:visible!important;
    pointer-events:auto!important;
    transform:translateX(0)!important;
  }
  .sidebar-nav-group1142.flyout-dismissed1145>.sidebar-subnav1142{
    opacity:0!important;
    visibility:hidden!important;
    pointer-events:none!important;
  }

  /* The local Reports / Accountant tabs are easier to understand after the
     user opens those pages; don't add another flyout level in the sidebar. */
  .sidebar-subnested1142{display:none!important}

  /* Settings has enough room in one viewport-aware flyout, no scrollbar. */
  .sidebar-nav-group1142[data-nav-group="settings"]>.sidebar-subnav1142{
    overflow:visible!important;
  }

  /* Keep Reports and Books local sub-tabs visible. */
  #reportsV1130Tabs{display:flex!important}
  .accountant-tabs1140{display:flex!important}
}

@media(max-width:760px){
  /* Mobile keeps the familiar local context and tap navigation. */
  #view-accounting .accounting-head{justify-content:stretch}
  #view-accounting .accounting-month-control{width:100%}
  .reports-controls{justify-content:flex-start}
  .accountant-year-controls1140{grid-template-columns:1fr!important;max-width:none!important}
  .accountant-year-controls1140 select{min-width:0!important;width:100%!important}
  .opening-card .books-card-head{grid-template-columns:1fr!important}
  #openingFiscalYear{min-width:0!important;width:100%!important}
}
