/* ============================================================
   Wally App-Shell (PWA) – mobile, app-artig
   Ergänzt style.css (Brand-Variablen von dort)
   ============================================================ */

body.app {
    background: var(--bg-soft);
    padding-top: calc(56px + env(safe-area-inset-top));
    padding-bottom: calc(70px + env(safe-area-inset-bottom));
}

/* Obere App-Leiste */
.app-topbar {
    position: fixed; top: 0; left: 0; right: 0; z-index: 30;
    background: #fff; box-shadow: 0 2px 12px rgba(10,111,181,.10);
    padding-top: env(safe-area-inset-top);
}
.app-topbar-inner {
    height: 56px; display: flex; align-items: center; justify-content: space-between;
    max-width: 620px; margin: 0 auto; padding: 0 16px;
}
.app-brand { display: flex; align-items: center; gap: 10px; font-weight: 800; color: var(--primary); }
.app-brand img { height: 34px; }
.app-brand span { font-size: 1.05rem; }
.app-logout { font-size: 1.4rem; color: var(--ink-soft); text-decoration: none; padding: 6px; }

/* Inhalt: Handy-Breite, auch am Desktop */
.app-content { max-width: 620px; margin: 0 auto; padding: 16px; }

/* Untere Tab-Navigation */
.app-bottomnav {
    position: fixed; bottom: 0; left: 0; right: 0; z-index: 30;
    background: #fff; box-shadow: 0 -2px 16px rgba(10,111,181,.12);
    display: flex; padding-bottom: env(safe-area-inset-bottom);
    max-width: 620px; margin: 0 auto; border-radius: 22px 22px 0 0;
}
.app-bottomnav a {
    flex: 1; display: flex; flex-direction: column; align-items: center; gap: 3px;
    padding: 10px 4px 12px; color: var(--ink-soft); text-decoration: none; font-weight: 600;
}
.app-bottomnav a .ic { font-size: 1.35rem; line-height: 1; }
.app-bottomnav a .lb { font-size: .72rem; }
.app-bottomnav a.is-active { color: var(--primary); }
.app-bottomnav a.is-active .ic { transform: translateY(-1px); }

/* App-Karten */
.app-card {
    background: #fff; border-radius: 20px; box-shadow: var(--shadow);
    padding: 20px; margin-bottom: 16px; border: 1px solid #eaf4fb;
}
.app-card h2 { font-size: 1.2rem; margin: 0 0 4px; }
.app-section-title { font-weight: 800; color: var(--ink); margin: 22px 4px 10px; font-size: 1.05rem; }

/* Fortschrittsbalken */
.pbar { background: #eaf4fb; border-radius: 999px; height: 14px; overflow: hidden; }
.pbar > span { display: block; height: 100%; border-radius: 999px; background: linear-gradient(90deg,var(--secondary),var(--primary)); }
.prow { display: grid; grid-template-columns: 1fr; gap: 6px; margin-bottom: 14px; }
.prow .top { display: flex; justify-content: space-between; align-items: baseline; }
.prow .top .name { font-weight: 600; font-size: .95rem; }
.prow .top .val { font-size: .8rem; color: var(--ink-soft); }

/* Termin-Zeile */
.trow { display: flex; align-items: center; justify-content: space-between; gap: 10px;
    padding: 12px 0; border-bottom: 1px solid #eef6fb; }
.trow:last-child { border-bottom: none; }
.trow.done { opacity: .5; }
.trow .day { font-weight: 700; }
.trow .sub { font-size: .82rem; color: var(--ink-soft); }

/* App-Buttons kompakt */
.app-btn { display: inline-flex; align-items: center; gap: 6px; border: none; cursor: pointer;
    padding: 9px 16px; border-radius: 999px; font-weight: 700; font-size: .9rem; text-decoration: none; }
.app-btn-primary { background: var(--primary); color: #fff; }
.app-btn-soft { background: #fff; border: 2px solid var(--secondary); color: var(--primary); }
.app-btn-danger { background: #fdeaea; color: #c62828; }
.app-btn-ghost { background: var(--bg-soft); color: var(--ink); }
.app-btn-block { display: flex; width: 100%; justify-content: center; }

.chip { display: inline-block; padding: 3px 12px; border-radius: 999px; font-size: .74rem; font-weight: 800; }
.chip-akt { background: #e4f8ee; color: #0a7d47; }
.chip-gek { background: #fdeaea; color: #c62828; }
.chip-info { background: #e6f0fb; color: #1c5c9a; }

/* Install-Hinweis */
.install-hint { background: #fff; border: 1px dashed var(--secondary); border-radius: 16px;
    padding: 12px 14px; font-size: .85rem; color: var(--ink-soft); margin-bottom: 16px; display: flex; gap: 10px; align-items: center; }
