/* Web-Panel: Anpassungen gegenüber dem Desktop-Fenster (Browser, Tablet, Handy) */
html, body { background: #070b16; }
#titlebar { -webkit-app-region: no-drag; }
#titlebar .tb-btns { display: none !important; }
#titlebar .tb-sub { color: var(--muted); }
.tb-menu { display: none; width: 44px; height: 38px; border: 0; background: transparent; color: var(--text); cursor: pointer; place-items: center; }
.login-secure { display: flex; align-items: center; justify-content: center; gap: 6px; margin: 14px 0 0; font-size: 11.5px; color: var(--dim); }
.login-secure svg { width: 13px; height: 13px; flex: none; }
.about-grid { grid-template-columns: 1fr 1fr; }
.side-shade { display: none; }

/* Login scrollbar, wenn der Bildschirm niedrig ist */
#login { overflow: auto; padding-bottom: 24px; }

/* ---------- Tablet ---------- */
@media (max-width: 1180px) {
  .live { grid-template-columns: 1fr 340px; }
  .stats { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 1000px) {
  .login-wrap { grid-template-columns: 1fr; gap: 28px; max-width: 480px; padding: 24px 0; }
  .login-hero svg { max-width: 160px; height: auto; }
  .login-hero p { font-size: 13px; }
  #login { place-items: start center; }
  .dash2, .backup-grid, .about-grid, .groups { grid-template-columns: 1fr; }
  .live { grid-template-columns: 1fr; height: auto; }
  .live .tree-card { height: 60vh; }
}

/* ---------- Handy: Seitenleiste als ausklappbares Menü ---------- */
@media (max-width: 820px) {
  .tb-menu { display: grid; }
  #titlebar .tb-title { padding-left: 4px; }
  #titlebar .tb-sub { display: none; }
  #app { grid-template-columns: 1fr; }
  #sidebar { position: fixed; top: 38px; bottom: 0; left: 0; width: 260px; z-index: 40; transform: translateX(-100%); transition: transform .2s ease; overflow: auto; box-shadow: 10px 0 30px rgba(0, 0, 0, .5); }
  body.nav-open #sidebar { transform: none; }
  body.nav-open .side-shade { display: block; position: fixed; inset: 38px 0 0 0; z-index: 39; background: rgba(0, 0, 0, .45); }
  #content { padding: 18px 14px 40px; }
  .page-head h1 { font-size: 18px; }
  .page-head .hint { display: none; }
  .card.hero { flex-wrap: wrap; }
  .card.hero .h-actions { width: 100%; justify-content: flex-start; flex-wrap: wrap; }
  .card.hero > svg { width: 64px; height: 64px; }
  .actions { grid-template-columns: 1fr 1fr; }
  .kv { grid-template-columns: 110px 1fr; }
  .cs-sec { grid-template-columns: 1fr; }
  #toasts { left: 12px; right: 12px; bottom: 12px; align-items: stretch; }
  .modal { padding: 18px; max-height: calc(100vh - 40px); }
  .modal .m-foot { flex-wrap: wrap; }
  .table-wrap { -webkit-overflow-scrolling: touch; }
  .t { min-width: 640px; }
}
@media (max-width: 480px) {
  .stats { grid-template-columns: 1fr 1fr; gap: 10px; }
  .card.stat .s-val { font-size: 20px; }
  .login-card { padding: 20px; }
}
