/* Handy-Ansicht (1.10.0) – nur unter body.mobile aktiv (#/mobil…); Farben aus style.css (Tiefgrün, Bilanzgrün, Lindgrün als Akzent) */
.m-switch { display: none; }
@media (max-width: 760px) { .m-switch { display: inline-flex; } }

body.mobile { font-size: 16px; background: var(--bg); }
body.mobile #app { display: block; min-height: 100vh; min-height: 100dvh; padding-bottom: calc(72px + env(safe-area-inset-bottom)); }
body.mobile input, body.mobile select, body.mobile textarea { font-size: 16px; min-height: 44px; width: 100%; } /* 16 px: kein Zoom auf iOS */
body.mobile input[type=checkbox] { width: 22px; height: 22px; min-height: 0; }
body.mobile button, body.mobile .button { min-height: 44px; padding: 8px 14px; font-size: 1rem; justify-content: center; }
body.mobile button.icon { min-height: 0; min-width: 40px; }
body.mobile button.big, body.mobile .button.big { min-height: 54px; font-size: 1.08rem; font-weight: 600; }
body.mobile .button.block, body.mobile button.block { display: flex; width: 100%; margin-top: 10px; }
body.mobile h1 { font-size: 1.35rem; margin: 4px 0 14px; }
body.mobile h2 { font-size: 1.05rem; }
body.mobile .field { margin-bottom: 10px; }
body.mobile .field > span { font-size: .85rem; }
body.mobile .check { display: flex; align-items: center; gap: 10px; min-height: 44px; }

.m-top { position: sticky; top: 0; z-index: 30; display: flex; align-items: center; gap: 10px; padding: calc(8px + env(safe-area-inset-top)) 14px 8px; background: var(--deep); color: #fff; }
.m-top .spacer { flex: 1; }
.m-logo { width: 28px; height: 28px; flex: none; background: url("/icons/icon.svg") center / contain no-repeat; }
.m-tenant { width: auto !important; max-width: 52vw; min-height: 36px !important; background: rgba(255, 255, 255, .1); color: #fff; border: 1px solid rgba(255, 255, 255, .25); border-radius: 6px; font-weight: 600; font-size: .95rem !important; }
.m-tenant option { color: var(--ink); }
.m-tenant-name { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 52vw; }
.m-queue { min-height: 32px !important; padding: 2px 10px !important; font-size: .8rem !important; border-radius: 999px; background: var(--lime); color: var(--deep); border: 0; font-weight: 700; }
.m-queue[hidden] { display: none !important; }
.m-queue.err { background: var(--red); color: #fff; }
.m-menu { position: relative; }
.m-menu summary { list-style: none; cursor: pointer; font-size: 1.5rem; line-height: 1; padding: 4px 8px; color: #fff; }
.m-menu summary::-webkit-details-marker { display: none; }
.m-menu-list { position: absolute; right: 0; top: 100%; margin-top: 6px; background: #fff; color: var(--ink); border-radius: 10px; box-shadow: 0 10px 30px rgba(0, 0, 0, .25); padding: 12px; min-width: 220px; display: grid; gap: 8px; z-index: 40; }
.m-menu-list a, .m-menu-list button { display: flex; align-items: center; min-height: 44px; }

.m-main { padding: 14px 14px 24px; max-width: 720px; margin: 0 auto; }
.m-card { background: var(--panel); border: 1px solid var(--line); border-radius: 12px; padding: 14px; margin-bottom: 14px; box-shadow: var(--shadow); }
.m-card > summary { cursor: pointer; min-height: 32px; display: flex; align-items: center; }
details.m-card[open] > summary { margin-bottom: 10px; }
.m-form { display: grid; gap: 0; }
.m-2col { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.m-3col { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 8px; }
.m-row { display: flex; gap: 10px; flex-wrap: wrap; } .m-row > * { flex: 1; }
.m-actions { display: flex; gap: 8px; flex-wrap: wrap; margin: 8px 0; } .m-actions > * { flex: 1; }
.m-actions.sticky { position: sticky; bottom: calc(76px + env(safe-area-inset-bottom)); background: var(--bg); padding: 8px 0; z-index: 5; }
.m-empty { padding: 12px 2px; }

.m-nav { position: fixed; left: 0; right: 0; bottom: 0; z-index: 30; display: grid; grid-template-columns: repeat(4, 1fr); background: #fff; border-top: 1px solid var(--line); padding-bottom: env(safe-area-inset-bottom); box-shadow: 0 -2px 10px rgba(18, 38, 28, .06); }
.m-nav a { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; min-height: 64px; color: var(--ink-2); text-decoration: none; font-size: .74rem; font-weight: 600; }
.m-nav svg { width: 26px; height: 26px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.m-nav a.active { color: var(--accent); box-shadow: inset 0 3px 0 var(--lime); }

.m-tiles { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-bottom: 14px; }
.m-tile { display: flex; flex-direction: column; align-items: flex-start !important; gap: 2px; padding: 12px 14px !important; border-radius: 12px !important; background: #fff; border: 1px solid var(--line); text-decoration: none; color: var(--ink); white-space: normal !important; text-align: left; }
.m-tile b { font-size: 1.6rem; line-height: 1.1; } .m-tile span { color: var(--ink-2); font-size: .85rem; }
.m-tile.warn { border-color: #EED3A4; background: var(--amber-soft); }
.m-seg { display: flex; gap: 6px; overflow-x: auto; margin-bottom: 12px; padding-bottom: 2px; }
.m-seg button { flex: none; border-radius: 999px; min-height: 38px !important; padding: 4px 14px !important; font-size: .92rem !important; }
.m-seg button.on { background: var(--accent); color: #fff; border-color: var(--accent); }

.m-list { list-style: none; margin: 0; padding: 0; background: #fff; border: 1px solid var(--line); border-radius: 12px; overflow: hidden; }
.m-list li { border-bottom: 1px solid var(--line-2); } .m-list li:last-child { border-bottom: 0; }
.m-li { display: flex; align-items: center; gap: 10px; padding: 12px 14px; min-height: 56px; color: var(--ink); text-decoration: none; }
a.m-li:active { background: var(--accent-soft); }
.m-li-main { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.m-li-main small { color: var(--ink-2); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.m-li-main .m-meta { white-space: normal; margin-top: 2px; }
.m-li-right { font-weight: 700; white-space: nowrap; }
.m-list .m-actions { padding: 0 14px 12px; margin: 0; }

.m-clock { font-size: 2.6rem; font-weight: 700; text-align: center; font-variant-numeric: tabular-nums; margin: 6px 0 12px; color: var(--deep); }
.m-file { display: none; }
.m-cam svg { width: 24px; height: 24px; fill: none; stroke: currentColor; stroke-width: 1.8; }
.m-thumbs { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-top: 10px; }
.m-thumbs:empty { display: none; }
.m-thumbs figure { position: relative; margin: 0; background: #fff; border: 1px solid var(--line); border-radius: 8px; overflow: hidden; }
.m-thumbs img { width: 100%; aspect-ratio: 3 / 4; object-fit: cover; display: block; }
.m-thumbs figcaption { font-size: .7rem; padding: 2px 6px; color: var(--ink-2); }
.m-thumbs figure button { position: absolute; top: 2px; right: 2px; background: rgba(255, 255, 255, .9); border-radius: 999px; }
.m-doc { width: 100%; max-height: 60vh; object-fit: contain; border-radius: 8px; background: #EEE; display: block; }
.m-spin { width: 36px; height: 36px; border-radius: 50%; border: 4px solid var(--line); border-top-color: var(--accent); animation: m-spin 1s linear infinite; margin: 6px auto 10px; }
@keyframes m-spin { to { transform: rotate(360deg); } }
.m-line { border: 1px solid var(--line); border-radius: 10px; padding: 10px; margin-bottom: 10px; }
.m-line-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 6px; }
.m-amt { display: flex; align-items: flex-end; justify-content: flex-end; padding-bottom: 14px; }
.m-sum { display: flex; justify-content: space-between; gap: 8px; flex-wrap: wrap; background: #fff; border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px; margin-bottom: 10px; }
body.mobile .combo-list { min-width: 0; max-height: 50vh; }
body.mobile .combo-list .opt { padding: 10px 12px; }
body.mobile .modal-back { place-items: end center; padding: 0; }
body.mobile .modal { width: 100%; border-radius: 14px 14px 0 0; max-height: 90vh; }
body.mobile .modal-foot { flex-wrap: wrap; } body.mobile .modal-foot button { flex: 1; }
body.mobile #toasts { bottom: calc(84px + env(safe-area-inset-bottom)); left: 12px; right: 12px; }
body.mobile .toast { font-size: .9rem; padding: 8px 12px; }
body.mobile .print-bar { position: sticky; top: 52px; z-index: 6; background: var(--bg); padding: 6px 0; }
body.mobile .sheet { overflow: visible; }

@media print {
  body.mobile #app { padding: 0; }
  .m-top, .m-nav, .m-queue { display: none !important; }
  body.mobile .m-main { padding: 0; max-width: none; }
  body.mobile .sheet { zoom: 1 !important; }
}
