/* Eterano v1.14.3 — nested navigation usability + fiscal selector polish */

/* Accountant header: keep the fiscal-year selector and refresh action fully visible. */
.accountant-head1140{grid-template-columns:minmax(0,1fr) minmax(430px,520px)}
.accountant-year-controls1140{grid-template-columns:minmax(230px,1fr) auto;max-width:none;width:100%;align-items:end}
.accountant-year-controls1140 label{min-width:0}
.accountant-year-controls1140 select{min-width:0!important;width:100%;font-weight:800}
.accountant-year-controls1140 button{white-space:nowrap;min-width:max-content}

/* Opening-balance year selector needs enough room for “2026 · Open”. */
.opening-card .books-card-head{grid-template-columns:minmax(0,1fr) minmax(230px,270px) auto}
#openingFiscalYear{min-width:230px;width:100%;font-weight:800;color:var(--text)}

/* Sidebar submenus scroll inside themselves instead of disappearing below the viewport. */
.sidebar-nav-group1142.expanded>.sidebar-subnav1142{
  max-height:var(--sidebar-subnav-max1143,320px);
  overflow-y:auto;
  overflow-x:hidden;
  scrollbar-width:thin;
  overscroll-behavior:contain;
  padding-right:4px;
}
.sidebar-subnav1142::-webkit-scrollbar{width:6px}
.sidebar-subnav1142::-webkit-scrollbar-thumb{background:rgba(126,223,255,.24);border-radius:999px}
.sidebar-subnav1142::-webkit-scrollbar-track{background:transparent}

@media(min-width:761px){
  /* The sidebar is the primary desktop navigation now. Remove duplicate local tab bars. */
  #accountingInternalTabs,
  #reportsV1130Tabs,
  .accountant-tabs1140,
  .settings-tabs-nav{display:none!important}

  /* No dead gap between the parent item and its hover flyout. */
  .sidebar-nav-group1142:not(.expanded):hover>.sidebar-subnav1142,
  .sidebar-nav-group1142:not(.expanded):focus-within>.sidebar-subnav1142{
    left:calc(100% - 2px);
    top:0;
    width:270px;
    max-height:var(--sidebar-flyout-max1143,calc(100vh - 24px));
    overflow-y:auto;
    overflow-x:hidden;
    pointer-events:auto;
  }
  .sidebar-nav-group1142:not(.expanded)::after{
    content:"";
    position:absolute;
    left:calc(100% - 3px);
    top:0;
    width:12px;
    height:100%;
    pointer-events:none;
  }
  .sidebar-nav-group1142:not(.expanded):hover::after,
  .sidebar-nav-group1142:not(.expanded):focus-within::after{pointer-events:auto}

  /* Nested report/year-end choices are discoverable directly from the hover menu. */
  .sidebar-subentry1142:hover>.sidebar-subnested1142,
  .sidebar-subentry1142:focus-within>.sidebar-subnested1142{display:grid}

  /* With the local tab bars gone, tighten the first content gap a little. */
  #view-accounting .accounting-tab-pane.active{margin-top:0}
  .accountant-content1140{margin-top:0}
}

@media(max-width:1050px) and (min-width:761px){
  .accountant-head1140{grid-template-columns:1fr}
  .accountant-year-controls1140{max-width:560px}
}

@media(max-width:760px){
  /* Mobile keeps local tab bars and tap-to-expand navigation. */
  .accountant-head1140{grid-template-columns:1fr}
  .accountant-year-controls1140{grid-template-columns:1fr;max-width:none}
  .opening-card .books-card-head{grid-template-columns:1fr}
  #openingFiscalYear{min-width:0;width:100%}
  .sidebar-nav-group1142.expanded>.sidebar-subnav1142{max-height:420px}
}
