/* R81. Loaded after R80 and page-specific CSS; no global component overrides. */
/* The keyboard close is retained in the DOM, but hidden from desktop users. */
html.aic-layout-refactor .app-sidebar__close-item { display:none; }

@media (max-width:1024px) {
  html.aic-layout-refactor body.aic-management-mobile-nav #appSidebar .app-sidebar__close-item {
    display:block; flex:0 0 auto; position:relative; width:100%; height:0;
    min-height:0; padding:0; margin:0; border:0;
  }
  html.aic-layout-refactor body.aic-management-mobile-nav #appSidebar .app-sidebar__hidden-close {
    display:block; position:absolute; width:1px; min-width:1px; height:1px;
    min-height:1px; padding:0; margin:0; border:0; overflow:hidden;
    white-space:nowrap; clip-path:inset(50%);
  }
  html.aic-layout-refactor body.aic-management-mobile-nav #appSidebar .app-sidebar__close-item:focus-within {
    height:44px; min-height:44px;
  }
  html.aic-layout-refactor body.aic-management-mobile-nav #appSidebar .app-sidebar__hidden-close:focus-visible {
    position:relative; width:100%; min-width:0; height:44px; min-height:44px;
    overflow:visible; white-space:normal; clip-path:none;
    border:1px solid #cbd5e1; border-radius:10px; background:#fff;
    color:#111827; font-size:13px; font-weight:700; cursor:pointer;
    outline:2px solid var(--ui-color-focus,#2563eb); outline-offset:-2px;
  }
}

@media (max-width:767px) {
  /* Preserve desktop/tablet logo and its toggle; phone drawer gets extra menu space. */
  html.aic-layout-refactor body.aic-management-mobile-nav #appSidebar .app-sidebar__bottom {
    display:none !important;
  }
  html.aic-layout-refactor body.aic-management-mobile-nav #appSidebar .app-sidebar__inner {
    gap:6px;
  }
  html.aic-layout-refactor body.aic-management-mobile-nav #appSidebar .app-sidebar__menu {
    min-height:0; flex:1 1 auto; overflow-y:auto;
  }
}

@media (max-width:760px) {
  /* Staff accounts ONLY. Preserve common Hero subtitle on larger screens. */
  html.aic-layout-refactor .accounts .r81-staff-accounts-hero .ui-hero__subtitle {
    display:none;
  }
  html.aic-layout-refactor .accounts #accounts_q::placeholder { font-size:11px; }

  /* Eliminate the duplicate office-list heading, not office data headings. */
  html.aic-layout-refactor .accounts .accounts-main > .card > .group-head { display:none; }
  html.aic-layout-refactor .accounts .accounts-main > .card {
    padding:0; border:0; border-radius:0; box-shadow:none; background:transparent;
  }
  html.aic-layout-refactor .accounts .accounts-main .office-section {
    width:100%; min-width:0; max-width:100%; box-sizing:border-box;
  }
  html.aic-layout-refactor .accounts .accounts-main .office-head,
  html.aic-layout-refactor .accounts .accounts-main .tr {
    padding-left:9px; padding-right:9px;
  }
  /* Display registered kana immediately to the right of the name. */
  html.aic-layout-refactor .accounts .mobile-account-main-link {
    width:100%; min-width:0; overflow:hidden; gap:7px;
  }
  html.aic-layout-refactor .accounts .mobile-account-person {
    display:inline-flex; flex:1 1 auto; min-width:0; align-items:baseline; gap:6px;
    overflow:hidden;
  }
  html.aic-layout-refactor .accounts .mobile-account-name {
    flex:0 1 auto; min-width:0; overflow:hidden; text-overflow:ellipsis;
    white-space:nowrap;
  }
  html.aic-layout-refactor .accounts .mobile-account-kana {
    display:inline-block; flex:1 1 auto; min-width:0;
    overflow:hidden; text-overflow:ellipsis; white-space:nowrap;
    font-size:10.5px; font-weight:500; color:#66758c;
  }

}

/* Keep R80's TODAY link/action intact; match the heading's font size. */
html.aic-layout-refactor .dashboard-page .r80-today-link {
  position:relative; font-size:15px; min-height:30px; line-height:1.2;
  padding:5px 9px; margin-block:7px; gap:5px;
}
/* The visible button stays compact, while its vertical hit area reaches 44px. */
html.aic-layout-refactor .dashboard-page .r80-today-link::before {
  content:""; position:absolute; inset:-7px 0;
}
html.aic-layout-refactor .dashboard-page .r80-today-link i { font-size:1em; }
@media (max-width:640px) {
  html.aic-layout-refactor .dashboard-page .r80-today-link { font-size:13px; }
}
