/* Oberflaeche 2 (30.09.2026): Handy-Huelle im Stil der App 02, Grafik-Bausteine, Reiter.
   Farben nur aus den Tokens von dashboard-1.css. Jede Bewegung aus bei html[data-motion=off]. */

.main-shell .view [hidden] { display: none !important; }
.of2-sym { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; flex: none; }

/* ------------------------------------------------ Einblenden und Anheben */
@keyframes of2-rein { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
@keyframes of2-schimmer { from { background-position: -200% 0; } to { background-position: 200% 0; } }
.of2 #main .view > * { animation: of2-rein .42s cubic-bezier(.2, .7, .2, 1) both; }
.of2 #main .view > *:nth-child(2) { animation-delay: .04s; }
.of2 #main .view > *:nth-child(3) { animation-delay: .08s; }
.of2 #main .view > *:nth-child(4) { animation-delay: .12s; }
.of2 #main .view > *:nth-child(n+5) { animation-delay: .16s; }
.of2-rein { animation: of2-rein .32s cubic-bezier(.2, .7, .2, 1) both; }
@media (hover: hover) {
  .main-shell .panel { transition: border-color .25s, box-shadow .25s, transform .25s; }
  .main-shell .panel:hover { border-color: color-mix(in srgb, var(--accent) 22%, var(--line)); }
}
.of2-laedt { border-radius: 10px; min-height: 1em; color: transparent !important;
  background: linear-gradient(90deg, var(--panel2) 0%, color-mix(in srgb, var(--panel2) 60%, var(--text) 8%) 50%, var(--panel2) 100%);
  background-size: 200% 100%; animation: of2-schimmer 1.6s linear infinite; }
.main-shell :focus-visible { outline: 2px solid color-mix(in srgb, var(--accent) 70%, transparent); outline-offset: 2px; }

/* ------------------------------------------ Aufklapper als Werkzeug-Karte */
.main-shell sistenta-werkstatt details, .main-shell .view details:not(.of2-roh) {
  border: 1px solid var(--line); border-radius: 14px; background: color-mix(in srgb, var(--panel2) 55%, transparent);
  margin: 10px 0; transition: border-color .2s, background .2s; }
.main-shell .view details:not(.of2-roh) > summary {
  list-style: none; cursor: pointer; display: flex; align-items: center; gap: 12px; padding: 13px 16px; min-height: 48px;
  font-weight: 560; border-radius: 14px; }
.main-shell .view details:not(.of2-roh) > summary::-webkit-details-marker { display: none; }
.main-shell .view details:not(.of2-roh) > summary::after {
  content: ""; margin-left: auto; width: 8px; height: 8px; flex: none; border-right: 1.6px solid var(--muted);
  border-bottom: 1.6px solid var(--muted); transform: rotate(45deg) translate(-2px, -2px); transition: transform .25s; }
.main-shell .view details:not(.of2-roh)[open] > summary::after { transform: rotate(225deg) translate(-2px, -2px); }
.main-shell .view details:not(.of2-roh)[open] { background: var(--panel); border-color: color-mix(in srgb, var(--accent) 25%, var(--line)); }
.main-shell .view details:not(.of2-roh)[open] > :not(summary) { animation: of2-rein .28s ease-out both; }
.main-shell .view details:not(.of2-roh) > :not(summary) { margin-left: 16px; margin-right: 16px; }
.main-shell .view details:not(.of2-roh) > :last-child:not(summary) { margin-bottom: 16px; }
@media (hover: hover) { .main-shell .view details:not(.of2-roh):not([open]) > summary:hover { background: var(--panel2); } }
/* Verschachtelte Aufklapper bleiben schlicht. */
.main-shell .view details details { background: transparent; }

/* ------------------------------------------------------------ Reiter */
.of2-reiter { position: relative; display: flex; gap: 4px; margin: 0 0 18px; padding: 4px; overflow-x: auto;
  scrollbar-width: none; border: 1px solid var(--line); border-radius: 14px; background: var(--panel); }
.of2-reiter::-webkit-scrollbar { display: none; }
.of2-reiter button { position: relative; z-index: 1; display: inline-flex; align-items: center; gap: 8px; flex: none;
  border: 0; background: transparent; color: var(--muted); font: inherit; font-size: 13px; font-weight: 560;
  padding: 10px 14px; min-height: 42px; border-radius: 10px; cursor: pointer; transition: color .2s; white-space: nowrap; }
.of2-reiter button:hover { color: var(--text); }
.of2-reiter button[aria-selected=true] { color: var(--text); }
.of2-reiter button[aria-selected=true] .of2-sym { color: var(--accent); }
.of2-reiter__linie { position: absolute; z-index: 0; left: 0; top: 4px; bottom: 4px; border-radius: 10px;
  background: var(--panel2); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--accent) 22%, transparent);
  transition: transform .32s cubic-bezier(.2, .7, .2, 1), width .32s cubic-bezier(.2, .7, .2, 1); }

/* ------------------------------------------------ Handy-Huelle (App 02) */
.of2-leiste { display: none; }
@media (max-width: 760px) {
  .of2-leiste { display: grid; grid-template-columns: repeat(5, 1fr); align-items: end; position: fixed; z-index: 60;
    left: 0; right: 0; bottom: 0; padding: 6px 8px calc(8px + env(safe-area-inset-bottom, 0px));
    background: color-mix(in srgb, var(--side) 88%, transparent); backdrop-filter: blur(18px); -webkit-backdrop-filter: blur(18px);
    border-top: 1px solid var(--line); }
  .of2-leiste__punkt { position: relative; display: flex; flex-direction: column; align-items: center; gap: 4px; min-height: 52px;
    justify-content: center; border: 0; background: none; color: var(--muted); font: inherit; font-size: 10.5px; font-weight: 560;
    text-decoration: none; cursor: pointer; -webkit-tap-highlight-color: transparent; }
  .of2-leiste__sym { position: relative; display: grid; place-items: center; width: 40px; height: 30px; border-radius: 12px;
    transition: background .2s, transform .2s; }
  .of2-leiste__sym .of2-sym { width: 21px; height: 21px; }
  .of2-leiste__punkt:active .of2-leiste__sym { transform: scale(.92); }
  .of2-leiste__punkt--aktiv { color: var(--text); }
  .of2-leiste__punkt--aktiv .of2-leiste__sym { color: var(--accent); }
  .of2-leiste__punkt--aktiv::after { content: ""; position: absolute; bottom: -4px; width: 4px; height: 4px; border-radius: 50%;
    background: var(--accent); animation: of2-rein .3s ease-out both; }
  .of2-leiste__punkt--festhalten .of2-leiste__sym { width: 54px; height: 54px; margin-top: -22px; border-radius: 18px;
    background: var(--accent); color: var(--on-accent);
    box-shadow: 0 10px 26px color-mix(in srgb, var(--accent) 32%, transparent), 0 0 0 5px var(--bg); }
  .of2-leiste__punkt--festhalten .of2-leiste__sym .of2-sym { width: 24px; height: 24px; stroke-width: 1.8; }
  .of2-leiste__zahl { position: absolute; top: -3px; right: 2px; min-width: 16px; height: 16px; padding: 0 4px; border-radius: 8px;
    background: var(--accent); color: var(--on-accent); font-size: 9.5px; line-height: 16px; font-weight: 700; text-align: center; }

  /* Platz fuer die Leiste, und die obere Leiste wie in 02 aufgeraeumt. */
  .main-shell main { padding-bottom: calc(96px + env(safe-area-inset-bottom, 0px)); }
  .topbar .breadcrumb > span { display: none; }
  .topbar .top-actions > .pill, .topbar .top-actions > .badge { display: none; }
  .topbar .top-actions > a.button { width: 40px; height: 40px; padding: 0; justify-content: center; font-size: 0; gap: 0; border-radius: 50%; }
  .topbar .top-actions > a.button svg { width: 18px; height: 18px; }
  .topbar .breadcrumb strong { font-size: 17px; letter-spacing: -.2px; }

  /* Seitenkoepfe in der 02-Typografie. */
  .page-head h1, .view > header h1 { font-size: 30px; line-height: 1.08; letter-spacing: -.8px; }
  .page-head p, .view > header p { font-size: 14px; }
  .main-shell .panel { border-radius: 18px; }
  .of2-reiter { margin-left: -2px; margin-right: -2px; }
  .of2-reiter button { padding: 9px 12px; font-size: 12.5px; }
  .main-shell .view details:not(.of2-roh) > :not(summary) { margin-left: 12px; margin-right: 12px; }
  /* Seitenleiste als Schublade ueber der Leiste. */
  .nav-open .sidebar { z-index: 70; }
  /* 05.10.2026: Schublade mit Schleier, eigener Scrollflaeche und Daumen-Groesse. */
  .sidebar { width: min(84vw, 320px); padding-top: calc(20px + env(safe-area-inset-top, 0px));
    padding-bottom: calc(14px + env(safe-area-inset-bottom, 0px)); overscroll-behavior: contain;
    transition: transform .26s cubic-bezier(.2,.8,.2,1); }
  .sidebar .nav-scroll { min-height: 0; overscroll-behavior: contain; -webkit-overflow-scrolling: touch; touch-action: pan-y; }
  /* html body davor: klar.css laedt spaeter und setzt die Desktop-Groesse (12px). */
  html body .sidebar .nav-link { min-height: 46px; font-size: 15px; padding-block: 10px; }
  html body .sidebar .nav-group > p, html body .sidebar .nav-group > summary { font-size: 12px; }
}
/* Schleier und Scroll-Sperre ab der Breite, ab der die Seitenleiste zur Schublade wird (dashboard-1.css, 900px). */
.of2-schleier { display: none; }
@media (max-width: 900px) {
  .sidebar { z-index: 70; }
  .of2-schleier { display: block; position: fixed; inset: 0; z-index: 65; background: rgb(0 0 0 / .45); opacity: 0;
    pointer-events: none; transition: opacity .26s; -webkit-tap-highlight-color: transparent; }
  .nav-open .of2-schleier { opacity: 1; pointer-events: auto; }
  html.of2-gesperrt, html.of2-gesperrt body { overflow: hidden; overscroll-behavior: none; }
}

html[data-motion=off] .of2 *, html[data-motion=off] .of2-leiste * { animation: none !important; transition: none !important; }
@media (prefers-reduced-motion: reduce) { .of2 #main .view > *, .of2-rein { animation: none; } }
