/* ============================================================
   feat30 - the intranet as separate apps per business unit.
   Launcher (top right), one short sidebar per app, app home pages.
   Loaded after app.css; everything here is scoped to new classes
   so the old single menu (System Administrators, transition) is
   untouched.
   ============================================================ */

/* ---------- launcher ---------- */
.app-launcher { position: relative; }
.app-launcher > summary { list-style: none; cursor: pointer; display: inline-flex; align-items: center; justify-content: center;
  width: 38px; height: 38px; border-radius: 10px; }
.app-launcher > summary::-webkit-details-marker { display: none; }
.app-launcher > summary:hover, .app-launcher[open] > summary { background: var(--blue-soft); }
.app-launcher > summary:focus-visible { outline: 2px solid var(--navy); outline-offset: 2px; }
.grid-ico { display: grid; grid-template-columns: repeat(3, 5px); gap: 3px; }
.grid-ico i { width: 5px; height: 5px; border-radius: 1.5px; background: var(--navy); display: block; }
.launcher-panel {
  position: absolute; right: 0; top: calc(100% + 8px); z-index: 60;
  width: 320px; max-width: calc(100vw - 24px);
  background: #fff; border: 1px solid var(--line); border-radius: 16px;
  box-shadow: 0 18px 44px rgba(4, 18, 44, .18); padding: .9rem;
}
.launcher-title { font-size: .7rem; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); font-weight: 600; margin: 0 0 .6rem .2rem; }
.launcher-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: .35rem; }
.launcher-tile {
  display: flex; flex-direction: column; align-items: center; gap: .4rem;
  padding: .7rem .3rem .6rem; border-radius: 12px; color: var(--ink); text-align: center;
  font-size: .8rem; font-weight: 600; line-height: 1.2;
}
.launcher-tile:hover { background: #f3f6fa; text-decoration: none; }
.launcher-tile.current { background: color-mix(in srgb, var(--app) 9%, #fff); }
.launcher-ico {
  width: 44px; height: 44px; border-radius: 13px; display: inline-flex; align-items: center; justify-content: center;
  font-size: 1.35rem; background: var(--app); color: #fff;
  box-shadow: 0 6px 14px color-mix(in srgb, var(--app) 30%, transparent);
}

/* ---------- the app sidebar ---------- */
.sidenav.app-nav { border-top: 4px solid var(--app); }
.app-head {
  display: flex !important; align-items: center; gap: .7rem;
  padding: .55rem .6rem .85rem !important; margin: 0 0 .3rem !important;
  border-bottom: 1px solid rgba(255, 255, 255, .09); border-radius: 0 !important;
  color: #fff !important; background: none !important; box-shadow: none !important; transform: none !important;
}
.sidenav.app-nav .app-head::before { content: none; }
.app-ico {
  width: 36px; height: 36px; border-radius: 11px; flex: 0 0 auto;
  display: inline-flex; align-items: center; justify-content: center; font-size: 1.15rem;
  background: var(--app); box-shadow: 0 6px 16px rgba(0, 0, 0, .25);
}
.app-name { font-size: 1.02rem; font-weight: 600; letter-spacing: -.01em; }
.sidenav.app-nav a[data-ico]::before { content: attr(data-ico); }
.sidenav.app-nav a[data-ico=""]::before { content: "\2022"; }
.sidenav.app-nav a.active { box-shadow: inset 3px 0 0 var(--app), 0 7px 22px rgba(0, 0, 0, .22); }
.sidenav.app-nav .sidenav-group { padding-top: .9rem; }
.app-extern { margin-top: .6rem !important; }
.app-switch { margin-top: .9rem; padding: .6rem .7rem 0; border-top: 1px solid rgba(255, 255, 255, .09); display: flex; flex-direction: column; gap: .45rem; }
.sidenav.app-nav .app-switch a.app-all { padding: .4rem .5rem; margin: 0 -.5rem; font-size: .88rem; }
.sidenav.app-nav .app-switch a.app-all::before { content: none; }
.app-switch .btn-link { color: #9db4d6; text-align: left; font-size: .82rem; }
.app-switch .btn-link:hover { color: #fff; }
.sidenav.app-nav .sidenav-logout { margin-top: .4rem; }

/* the classic menu's "Back to the apps" */
.classic-back { padding: .4rem .7rem 0; }
.classic-back .btn-link { color: #ffd59e; font-size: .88rem; }

/* ---------- app home ---------- */
.app-hero { display: flex; align-items: center; gap: 1rem; margin: 0 0 1.2rem; }
.app-hero h1 { margin: 0 0 .2rem; }
.app-hero .page-sub { margin: 0; }
.app-hero-ico {
  width: 56px; height: 56px; border-radius: 16px; flex: 0 0 auto;
  display: inline-flex; align-items: center; justify-content: center; font-size: 1.7rem;
  background: var(--app); color: #fff; box-shadow: 0 10px 24px color-mix(in srgb, var(--app) 32%, transparent);
}
.app-sections { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 1rem; }
.app-sections .card + .card { margin-top: 0; }
.app-section { border-top: 3px solid var(--app); }
.app-section h2 { margin: 0 0 .5rem; }
.app-links { list-style: none; margin: 0; padding: 0; }
.app-links a { display: flex; align-items: center; gap: .6rem; padding: .5rem .45rem; margin: 0 -.45rem; border-radius: 9px; color: var(--ink); font-weight: 500; }
.app-links a:hover { background: color-mix(in srgb, var(--app) 8%, #fff); text-decoration: none; }
.app-link-ico { width: 1.4em; text-align: center; }

/* ---------- "Your apps" page ---------- */
.apps-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 1rem; }
.apps-grid .card + .card { margin-top: 0; }
.app-card { display: flex; flex-direction: column; gap: .45rem; color: var(--ink); border-top: 3px solid var(--app); transition: transform .18s ease; }
.app-card:hover { text-decoration: none; transform: translateY(-2px); }
.app-card-ico {
  width: 46px; height: 46px; border-radius: 13px; display: inline-flex; align-items: center; justify-content: center;
  font-size: 1.4rem; background: var(--app); color: #fff;
}
.app-card-name { font-weight: 600; font-size: 1.02rem; }
.app-card-blurb { font-size: .86rem; color: var(--muted); line-height: 1.45; }

/* ---------- phones (the feat14 hamburger layout) ---------- */
@media (max-width: 900px) {
  .launcher-panel { position: fixed; right: 12px; left: 12px; top: 62px; width: auto; max-width: none; }
  .launcher-grid { grid-template-columns: repeat(3, 1fr); }
  .app-hero-ico { width: 46px; height: 46px; font-size: 1.4rem; }
}
@media print { .app-launcher { display: none !important; } }
