/* App menu (appmenu-kit, shared by the Service, Wein and Zeiterfassung apps – keep the three copies identical) and the
   status bar of the iPhone home-screen app.
   Status bar: the apps asked iOS for a see-through status bar (black-translucent) and painted their own strip under the clock.
   iOS 26 blurs the top edge under such a bar and the blur reached the app bar's text. Like the admin console, the apps now use
   the normal opaque status bar (meta apple-mobile-web-app-status-bar-style "default"; its colour follows the theme-color meta,
   which theme.js keeps equal to the app bar), so the strip is gone. */
.appbar::before { content: none; display: none; }

.appbar__menu {
  flex: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.75rem;
  height: 2.75rem;
  margin-left: -0.625rem;
  border: 0;
  border-radius: 0.75rem;
  background: transparent;
  color: var(--text);
  cursor: pointer;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
}
.appbar__menu .icon { width: 1.5rem; height: 1.5rem; }
.appbar__menu:active, .appbar__menu[aria-expanded="true"] { background: var(--accent-soft); }
.appbar__menu:focus-visible { outline: 3px solid var(--focus, #1a5fb4); outline-offset: 2px; }

.appmenu-scrim { position: fixed; inset: 0; z-index: 60; background: rgba(20, 10, 12, 0.45); }
.appmenu-scrim[hidden], .appmenu[hidden] { display: none; }
.appmenu {
  position: fixed;
  z-index: 61;
  top: 0;
  bottom: 0;
  left: 0;
  width: min(20rem, 86vw);
  display: flex;
  flex-direction: column;
  gap: 1rem;
  padding: calc(1rem + env(safe-area-inset-top, 0px)) 1rem calc(1rem + env(safe-area-inset-bottom, 0px)) max(1rem, env(safe-area-inset-left, 0px));
  background: var(--surface);
  color: var(--text);
  border-right: 1px solid var(--border);
  box-shadow: 0 0 32px rgba(0, 0, 0, 0.3);
  overflow-y: auto;
  overscroll-behavior: contain;
  animation: appmenu-in 0.18s ease-out;
}
@keyframes appmenu-in { from { transform: translateX(-1.5rem); opacity: 0; } to { transform: none; opacity: 1; } }
@media (prefers-reduced-motion: reduce) { .appmenu { animation: none; } }
html.appmenu-open { overflow: hidden; }

.appmenu__head { display: flex; align-items: center; gap: 0.625rem; }
.appmenu__logo { flex: none; border-radius: 0.5rem; }
.appmenu__brand { display: flex; flex-direction: column; flex: 1 1 auto; min-width: 0; line-height: 1.2; }
.appmenu__brand span { color: var(--muted); font-size: 0.8125rem; }
.appmenu__close {
  flex: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.75rem;
  height: 2.75rem;
  margin-right: -0.5rem;
  border: 0;
  border-radius: 0.75rem;
  background: transparent;
  color: var(--text);
  cursor: pointer;
}
.appmenu__close:active { background: var(--accent-soft); }
.appmenu__close .icon { width: 1.5rem; height: 1.5rem; }

.appmenu__apps { list-style: none; margin: 0; padding: 0; display: grid; gap: 0.25rem; }
.appmenu__app {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  min-height: 3rem;
  padding: 0 0.75rem;
  border-radius: 0.75rem;
  color: var(--text);
  text-decoration: none;
  font-weight: 600;
  touch-action: manipulation;
}
.appmenu__app .icon { flex: none; width: 1.5rem; height: 1.5rem; color: var(--brand-strong, currentColor); }
.appmenu__app:active { background: var(--accent-soft); }
.appmenu__app[aria-current="page"] { background: var(--accent-soft); }
.appmenu__app:focus-visible { outline: 3px solid var(--focus, #1a5fb4); outline-offset: 2px; }
[data-admin-only] { display: none; }
html[data-role="admin"] [data-admin-only] { display: list-item; }

.appmenu__design { display: flex; align-items: center; justify-content: space-between; gap: 0.75rem; margin-top: auto; padding-top: 0.75rem; border-top: 1px solid var(--border); }
.appmenu__label { color: var(--muted); font-size: 0.875rem; font-weight: 600; }
@media print { .appbar__menu, .appmenu, .appmenu-scrim { display: none !important; } }

/* Refresh button, top right of the app bar (like the admin console): reloads the screen that is shown. */
.appbar__refresh {
  flex: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.75rem;
  height: 2.75rem;
  margin-left: auto;
  margin-right: -0.5rem;
  border: 0;
  border-radius: 0.75rem;
  background: transparent;
  color: var(--text);
  cursor: pointer;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
}
.appbar__refresh .icon { width: 1.5rem; height: 1.5rem; }
.appbar__refresh:active { background: var(--accent-soft); }
.appbar__refresh:focus-visible { outline: 3px solid var(--focus, #1a5fb4); outline-offset: 2px; }
.appbar__refresh.is-spinning .icon { animation: appbar-spin 0.7s linear; }
@keyframes appbar-spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .appbar__refresh.is-spinning .icon { animation: none; } }
@media print { .appbar__refresh { display: none !important; } }

/* iPhone home-screen app: a taller app bar (owner, 24 Oct 2026), its content centered in it (owner, 24 Oct 15:38: "the header
   is fine now, but the text is too much down - keep it centered"). The browser view keeps the compact bar.
   html.is-standalone is set by app-menu.js (navigator.standalone on iOS, the display-mode media query elsewhere). */
html.is-standalone .appbar__inner { min-height: 4.75rem; align-items: center; }
@media (display-mode: standalone) { .appbar__inner { min-height: 4.75rem; align-items: center; } }
