.app-shell { display: flex; height: 100vh; overflow: hidden; }
.header { background: var(--card); border-bottom: 1px solid var(--brd); box-shadow: 0 1px 2px rgba(15,23,42,.04); padding: 10px 24px; display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 16px; position: relative; z-index: 30; }
.hd-brand { display: flex; align-items: center; gap: 10px; cursor: pointer; min-width: 0; }
.hd-center { text-align: center; }
.hd-date { font-size: 14px; font-weight: 700; color: var(--txt); }
.hd-shift { display: flex; align-items: center; justify-content: center; gap: 8px; margin-top: 3px; font-size: 12px; color: var(--sub); }
.hd-chip { display: inline-flex; align-items: center; gap: 4px; font-weight: 600; color: #065f46; background: #ecfdf5; border: 1px solid #a7f3d0; border-radius: 6px; padding: 2px 8px; }
.hd-chip.off { color: #475569; background: #f1f5f9; border-color: var(--brd); }
.hd-time { font-family: ui-monospace, Menlo, monospace; font-weight: 600; color: #334155; }
.header-right { justify-self: end; display: flex; gap: 10px; align-items: center; }
.hd-online { display: flex; gap: 4px; align-items: center; }
.hd-bell { position: relative; border: none; background: transparent; color: #475569; padding: 7px; border-radius: 10px; cursor: pointer; display: flex; }
.hd-bell:hover { background: #f1f5f9; color: var(--txt); }
.hd-bell-cnt { position: absolute; top: -2px; right: -4px; min-width: 18px; height: 18px; padding: 0 4px; border-radius: 9px; background: var(--red); color: #fff; font-size: 10px; font-weight: 700; display: flex; align-items: center; justify-content: center; }
.hd-logout { display: inline-flex; align-items: center; gap: 5px; border-radius: 10px; padding: 6px 12px; font-weight: 600; color: #334155; }
.hd-logout:hover { color: var(--red); background: #fef2f2; border-color: #fecaca; }
@media (max-width: 1000px) { .hd-center { display: none; } .header { grid-template-columns: 1fr auto; } }
.header-user { color: var(--sub); font-size: 13px; }

.app-layout { flex: 1; display: flex; min-height: 0; overflow: hidden; }
.sidebar { width: 200px; flex-shrink: 0; background: var(--card); border-right: 1px solid var(--brd); padding: 10px 0; overflow-y: auto; display: flex; flex-direction: column; gap: 2px; }
.sidebar button { display: flex; align-items: center; gap: 11px; width: 100%; padding: 11px 18px; border: none; border-left: 3px solid transparent; background: transparent; cursor: pointer; font-size: 14.5px; font-weight: 500; color: var(--sub); text-align: left; }
.sidebar button.active { background: #eff6ff; color: var(--pri); border-left-color: var(--pri); font-weight: 600; }
.sidebar button:hover:not(.active) { background: #f3f4f6; color: var(--txt); }
.sidebar .nav-ico { font-size: 17px; width: 22px; text-align: center; }

.main-content { flex: 1; overflow-y: auto; padding: 20px 24px; }

.app-layout { flex: 1; display: flex; flex-direction: column; min-height: 0; overflow: hidden; }
.main { flex: 1; min-width: 0; padding: 22px 20px 0 20px; overflow: hidden; display: flex; flex-direction: column; }
#viewRoot { flex: 1; display: flex; flex-direction: column; min-height: 0; overflow-y: auto; overflow-x: hidden; }

/* Desktop: Datum steht im Header */
.home-date { display: none; }
.main { padding-top: 26px; }

/* V3: Bereich als grosse Karte (wie Modal der Vorlage, aber Vollbild) */
#viewRoot > .section.active { background: #fff; border: 1px solid var(--brd); border-radius: 16px; box-shadow: 0 1px 3px rgba(15,23,42,.06); overflow: hidden; margin-bottom: 16px; }
#viewRoot > .section.active > .back-header { margin: 0; padding-left: 20px; padding-right: 20px; }
#viewRoot > .section.active > .toolbar { margin: 0; padding-left: 20px; padding-right: 20px; background: #fff; border-bottom: 1px solid #f1f5f9; }
#viewRoot > .section.active > .scroll-content { padding: 16px 20px 40px; background: var(--bg); }
