/* ============================================================
   Wildgaense.Shared — app shell
   Sidebar + topbar chrome shared by the MV and RRKasse layouts.
   Global (not scoped) so each project's MainLayout/NavMenu reuse it.
   Served at _content/Wildgaense.Shared/css/shell.css
   ============================================================ */

.app { display: grid; grid-template-columns: 248px 1fr; min-height: 100vh; }
.nav-toggle { display: none; }

.sidebar {
  background: var(--bdp-pfadiblau); color: #fff;
  display: flex; flex-direction: column;
  position: sticky; top: 0; height: 100vh; overflow-y: auto;
}

.main { min-width: 0; display: flex; flex-direction: column; }

.topbar {
  display: flex; align-items: center; gap: 16px;
  padding: 14px 34px; position: sticky; top: 0; z-index: 30;
  background: var(--cream); border-bottom: 1px solid var(--card-line);
}
.crumbs { font-size: 14px; color: var(--fg-muted); font-weight: var(--fw-strong); display: flex; align-items: center; gap: 8px; }
.crumbs .sep { color: var(--fg-subtle); }
.crumbs .here { color: var(--bdp-pfadiblau); }
.topbar .spacer { flex: 1; }

.search {
  display: flex; align-items: center; gap: 9px; width: 320px; max-width: 38vw;
  background: #fff; border: 1.5px solid var(--card-line); border-radius: var(--radius-pill);
  padding: 9px 16px; color: var(--fg-subtle);
  transition: border-color var(--dur-fast), box-shadow var(--dur-fast);
}
.search:focus-within { border-color: var(--bdp-pfadiblau); box-shadow: 0 0 0 3px rgba(255, 210, 8, .5); }
.search .i { width: 17px; height: 17px; color: var(--fg-muted); }
.search input { border: none; background: none; outline: none; flex: 1; font-size: 14px; color: var(--bdp-ink); padding: 0; }
.search input::placeholder { color: var(--fg-subtle); }

.iconbtn { width: 42px; height: 42px; border-radius: 50%; border: 1px solid var(--card-line); background: #fff; display: grid; place-items: center; cursor: pointer; color: var(--bdp-pfadiblau); position: relative; }
.iconbtn:hover { background: var(--bdp-woelflingsgelb-hell); }
.iconbtn .dot { position: absolute; top: 9px; right: 10px; width: 8px; height: 8px; border-radius: 50%; background: var(--orange); border: 2px solid #fff; }

.burger { display: none; }
.content { padding: 26px 34px 70px; max-width: 1280px; width: 100%; margin: 0 auto; }
.content.wide { max-width: 1340px; }
.scrim-nav { display: none; }

/* ---------- brand ---------- */
.brand { display: flex; align-items: center; gap: 12px; padding: 20px 22px 16px; }
.brand-badge { width: 46px; height: 46px; border-radius: 50%; background: var(--bdp-woelflingsgelb); display: grid; place-items: center; flex: none; }
.brand-badge img { width: 30px; height: 30px; display: block; }
.brand-name { font-family: var(--font-display); font-weight: var(--fw-superfett); font-size: 21px; line-height: 1; color: #fff; letter-spacing: var(--tracking-tight); }
.brand-sub { font-size: 11px; letter-spacing: .14em; text-transform: uppercase; color: var(--bdp-woelflingsgelb); font-weight: var(--fw-strong); margin-top: 5px; display: block; }

/* ---------- nav ---------- */
.nav { flex: 1; padding: 6px 14px 14px; display: flex; flex-direction: column; gap: 2px; }
.nav-section { font-size: 11px; letter-spacing: .14em; text-transform: uppercase; color: rgba(255, 210, 8, .65); font-weight: var(--fw-strong); padding: 16px 10px 6px; }
.nav-link {
  display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 11px;
  color: var(--sb-text); font-weight: var(--fw-strong); font-size: 15px;
  text-decoration: none; cursor: pointer; transition: background var(--dur-fast), color var(--dur-fast);
}
.nav-link .i { width: 20px; height: 20px; }
.nav-link:hover { background: rgba(255, 255, 255, .08); color: #fff; }
.nav-link.active { background: var(--bdp-woelflingsgelb); color: var(--bdp-pfadiblau); }
.nav-link .count {
  margin-left: auto; min-width: 22px; height: 22px; padding: 0 7px; border-radius: 11px;
  background: rgba(255, 255, 255, .12); color: #fff; font-size: 12px; font-weight: var(--fw-strong);
  display: grid; place-items: center; font-variant-numeric: tabular-nums;
}
.nav-link.active .count { background: rgba(14, 66, 120, .16); color: var(--bdp-pfadiblau); }

/* ---------- nav foot (who card) ---------- */
.nav-foot { display: flex; align-items: center; gap: 11px; padding: 14px 18px; border-top: 1px solid var(--bdp-line-on-blue); margin-top: auto; }
.nav-foot .i { width: 22px; height: 22px; }
.nav-foot .avatar { width: 38px; height: 38px; border-radius: 50%; background: var(--bdp-woelflingsgelb); color: var(--bdp-pfadiblau); display: grid; place-items: center; flex: none; font-family: var(--font-display); font-weight: var(--fw-superfett); font-size: 14px; }
.nav-foot .who { line-height: 1.25; min-width: 0; }
.nav-foot .who b { color: #fff; font-size: 14px; display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.nav-foot .who span { color: rgba(255, 210, 8, .8); font-size: 12px; }
.nav-foot .logout { margin-left: auto; }
.nav-foot .logout button { background: none; border: none; color: var(--sb-text); cursor: pointer; padding: 6px; border-radius: 8px; display: grid; place-items: center; }
.nav-foot .logout button:hover { color: #fff; background: rgba(255, 255, 255, .08); }
.nav-foot .login { margin-left: auto; display: flex; align-items: center; gap: 8px; color: var(--sb-text); text-decoration: none; font-weight: var(--fw-strong); font-size: 13px; }
.nav-foot .login:hover { color: #fff; }

/* ---------- page header (in-content) ---------- */
.phead { display: flex; align-items: flex-end; gap: 18px; margin-bottom: 22px; flex-wrap: wrap; }
.phead .eyebrow { font-size: 12px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--bdp-rrrot); }
.phead h1 { font-size: clamp(30px, 3.4vw, 44px); line-height: 1.02; margin-top: 4px; color: var(--bdp-pfadiblau); }
.phead .actions { margin-left: auto; display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }

/* ---------- responsive ---------- */
@media (max-width: 860px) {
  .app { grid-template-columns: 1fr; }
  .sidebar { position: fixed; inset: 0 auto 0 0; width: 248px; z-index: 60; transform: translateX(-100%); transition: transform var(--dur-base) var(--ease-out); box-shadow: var(--shadow-lg); }
  .app:has(.nav-toggle:checked) .sidebar { transform: translateX(0); }
  .scrim-nav { display: block; position: fixed; inset: 0; background: rgba(11, 35, 65, .45); z-index: 55; opacity: 0; pointer-events: none; transition: opacity var(--dur-base); }
  .app:has(.nav-toggle:checked) .scrim-nav { opacity: 1; pointer-events: auto; }
  .burger { display: grid; place-items: center; width: 42px; height: 42px; border-radius: 50%; border: 1px solid var(--card-line); background: #fff; color: var(--bdp-pfadiblau); cursor: pointer; }
  .crumbs { display: none; }
  .topbar { padding: 12px 18px; }
  .search { width: auto; flex: 1; max-width: none; }
  .content { padding: 22px 18px 60px; }
}
