/* Kickando – Panel am Handy.
   Greift nur unter 768 px und nur, wenn frontend-admin-mobil.js <html class="fcm-m-on"> gesetzt hat.
   Am Rechner ändert sich nichts. Die Render-Funktionen des Panels bleiben unberührt:
   Kopfzeile + Menü werden aus den vorhandenen Reitern gebaut, Tabellen werden per data-label zu Karten. */
.fcm-m-bar, .fcm-m-sheet { display: none; }

@media (max-width: 767px) {
    .fcm-m-on .fcm-fadmin { padding: 10px 12px 80px; border-radius: 0; }
    .fcm-m-on .fcm-fadmin::before { display: none; }

    /* ── Kopfzeile statt Reiter-Band ── */
    .fcm-m-on .fcm-fadmin-nav-wrap { display: none; }
    .fcm-m-bar { display: flex; align-items: center; gap: 10px; background: linear-gradient(135deg, var(--fcm-primary-dark, #1a2e4a) 0%, var(--fcm-primary, #1e3a5f) 40%, var(--fcm-primary-light, #2c5282) 100%); color: #fff; border-radius: 14px; padding: 8px 8px 8px 12px; margin: 0 0 14px; box-shadow: 0 4px 20px rgba(30,58,95,.3); }
    .fcm-m-bar img { height: 30px; width: auto; max-width: 120px; object-fit: contain; }
    .fcm-m-bar .fcm-m-title { flex: 1; font-weight: 700; font-size: 16px; letter-spacing: -.01em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
    .fcm-m-bar button { display: flex; align-items: center; gap: 6px; min-height: 42px; padding: 0 14px; border: 1px solid rgba(255,255,255,.25); border-radius: 10px; background: rgba(255,255,255,.1); color: #fff; font: inherit; font-size: 14px; font-weight: 600; cursor: pointer; -webkit-tap-highlight-color: transparent; }

    /* ── Menü als Vollbild-Liste ── */
    .fcm-m-sheet { position: fixed; inset: 0; z-index: 99999; background: var(--fcm-bg, #f0f2f5); overflow-y: auto; -webkit-overflow-scrolling: touch; padding: 12px 14px 32px; font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif; }
    .fcm-m-sheet.open { display: block; }
    .fcm-m-sheet-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin: 0 0 8px; }
    .fcm-m-sheet-head strong { font-size: 18px; color: var(--fcm-primary, #1e3a5f); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
    .fcm-m-sheet-head button { flex: 0 0 auto; min-height: 42px; min-width: 42px; border: 1px solid #d7dde6; border-radius: 10px; background: #fff; font: inherit; font-size: 14px; font-weight: 600; color: var(--fcm-primary, #1e3a5f); padding: 0 12px; cursor: pointer; }
    .fcm-m-group-title { font-size: 11px; text-transform: uppercase; letter-spacing: .08em; color: #6B7280; margin: 16px 4px 6px; font-weight: 700; }
    .fcm-m-sheet .fcm-m-item { display: flex; align-items: center; width: 100%; min-height: 50px; padding: 0 16px; margin: 0 0 6px; border: 1px solid var(--fcm-border, #e2e5ea); border-radius: 12px; background: #fff; font: inherit; font-size: 15px; font-weight: 600; color: var(--fcm-text, #1a1d23); text-align: left; box-shadow: 0 1px 3px rgba(0,0,0,.04); cursor: pointer; -webkit-tap-highlight-color: transparent; }
    .fcm-m-sheet .fcm-m-item.active { border-color: var(--fcm-primary, #1e3a5f); background: var(--fcm-primary, #1e3a5f); color: #fff; }
    .fcm-m-sheet .fcm-m-item .fcm-budget-count { margin-left: auto; }
    .fcm-m-sheet-foot { display: flex; gap: 8px; margin-top: 20px; }
    .fcm-m-sheet-foot a, .fcm-m-sheet-foot button { flex: 1; min-height: 46px; display: flex; align-items: center; justify-content: center; border: 1px solid #d7dde6; border-radius: 12px; background: #fff; color: var(--fcm-primary, #1e3a5f); font: inherit; font-size: 14px; font-weight: 600; text-decoration: none; cursor: pointer; }

    /* ── Seitenkopf ── */
    .fcm-m-on .fcm-fadmin-view > h2, .fcm-m-on .fcm-fadmin-header h2 { font-size: 22px; margin-bottom: 10px; }
    .fcm-m-on .fcm-fadmin-header { margin-bottom: 10px; gap: 8px; }
    .fcm-m-on .fcm-fadmin-header > div { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
    .fcm-m-on .fcm-fadmin-header > div > label { flex: 1 1 140px; }
    .fcm-m-on .fcm-fadmin-header select { width: 100%; }
    /* Erklärtexte: zwei Zeilen, Tipp = ganz lesen */
    .fcm-m-on .fcm-fadmin-view > .fcm-fadmin-hint, .fcm-m-on .fcm-fadmin-view > div > .fcm-fadmin-hint { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; font-size: 13px; margin: 0 0 10px; }
    .fcm-m-on .fcm-fadmin-hint.fcm-m-open { -webkit-line-clamp: unset; }

    /* ── Kennzahlen ── */
    .fcm-m-on .fcm-fadmin-stats { grid-template-columns: repeat(2, 1fr); gap: 10px; }
    .fcm-m-on .fcm-fadmin-stat { padding: 14px 12px; }
    .fcm-m-on .fcm-fadmin-stat-number { font-size: 20px !important; white-space: nowrap; font-variant-numeric: tabular-nums; }
    .fcm-m-on .fcm-fadmin-stat-label { font-size: 10px; }

    /* ── Unterreiter (Budget) als eine wischbare Zeile ── */
    .fcm-m-on .fcm-budget-tabs { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; margin: 0 -12px 12px; padding: 2px 12px 6px; }
    .fcm-m-on .fcm-budget-tabs::-webkit-scrollbar { display: none; }
    .fcm-m-on .fcm-budget-tabs button { flex: 0 0 auto; min-height: 40px; padding: 0 16px; }

    /* ── Eingaben & Knöpfe: Finger statt Maus (16 px, damit iOS beim Tippen nicht zoomt) ── */
    .fcm-m-on input:not([type=checkbox]):not([type=radio]):not([type=range]):not([type=color]), .fcm-m-on select, .fcm-m-on textarea { font-size: 16px; min-height: 44px; }
    .fcm-m-on .fcm-fadmin-score-team input:not([type=checkbox]):not([type=radio]):not([type=range]):not([type=color]) { font-size: 28px; }
    .fcm-m-on .fcm-fadmin-btn { min-height: 44px; }
    .fcm-m-on .fcm-fadmin-btn-sm { min-height: 40px; padding: 0 14px; }
    .fcm-m-on .fcm-fadmin-form-actions { flex-direction: column; }
    .fcm-m-on .fcm-fadmin-form-actions .fcm-fadmin-btn { width: 100%; }
    .fcm-m-on .fcm-budget-box { padding: 12px 14px; }
    .fcm-m-on .fcm-budget-box > * { width: 100%; }
    .fcm-m-on .fcm-budget-box input[type=text] { min-width: 0; width: 100%; }
    .fcm-m-on .fcm-budget-box label { display: flex; align-items: center; gap: 8px; }
    .fcm-m-on .fcm-budget-box label input { flex: 1; }

    /* ── Tabellen als Karten ── */
    .fcm-m-on .fcm-fadmin-view table.fcm-m-cards { display: block; overflow: visible; white-space: normal; background: none; border: 0; box-shadow: none; border-radius: 0; }
    .fcm-m-on table.fcm-m-cards thead { display: none; }
    .fcm-m-on table.fcm-m-cards tbody { display: block; }
    .fcm-m-on table.fcm-m-cards tr { display: block; position: relative; background: #fff; border: 1px solid var(--fcm-border, #e2e5ea); border-radius: 12px; margin: 0 0 10px; padding: 12px 14px; box-shadow: var(--fcm-shadow); }
    .fcm-m-on table.fcm-m-cards tr.fcm-m-group { background: none; border: 0; box-shadow: none; padding: 8px 2px 4px; margin: 0; }
    .fcm-m-on table.fcm-m-cards tr.fcm-m-group td { background: none !important; padding: 0; }
    .fcm-m-on table.fcm-m-cards td { display: block; padding: 0; border: 0; font-size: 14px; white-space: normal; }
    .fcm-m-on table.fcm-m-cards td.fcm-m-title { font-size: 15px; margin: 0 0 10px; line-height: 1.35; }
    .fcm-m-on table.fcm-m-cards td.fcm-m-title small { display: block; margin-top: 2px; }
    .fcm-m-on table.fcm-m-cards td.fcm-m-check { position: absolute; top: 10px; right: 12px; }
    .fcm-m-on table.fcm-m-cards td.fcm-m-check input { width: 22px; height: 22px; }
    .fcm-m-on table.fcm-m-cards td[data-label]:not(.fcm-m-title):not(.fcm-m-actions):not(.fcm-m-check)::before { content: attr(data-label); display: block; font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; color: var(--fcm-text-muted, #9CA3AF); margin-bottom: 2px; }
    /* Kurze Felder paarweise nebeneinander, Zahlen zu dritt */
    .fcm-m-on table.fcm-m-cards td:not(.fcm-m-title):not(.fcm-m-actions):not(.fcm-m-check):not(.fcm-m-num):not(.fcm-m-fill) { display: inline-block; width: 50%; vertical-align: top; margin-bottom: 8px; padding-right: 8px; box-sizing: border-box; }
    .fcm-m-on table.fcm-m-cards td.fcm-m-num { display: inline-block; width: 33%; text-align: left !important; vertical-align: top; font-variant-numeric: tabular-nums; margin-bottom: 8px; }
    .fcm-m-on table.fcm-m-cards td.fcm-m-fill small { font-size: 11px; color: var(--fcm-text-secondary, #6B7280); }
    .fcm-m-on table.fcm-m-cards td.fcm-m-actions { display: flex !important; flex-wrap: wrap; gap: 8px; margin-top: 10px; padding-top: 10px; border-top: 1px solid var(--fcm-border-light, #f0f1f3); white-space: nowrap; }
    .fcm-m-on table.fcm-m-cards td.fcm-m-actions .fcm-fadmin-btn { margin: 0; }
    .fcm-m-on table.fcm-m-cards td.fcm-m-actions .fcm-fadmin-btn:first-child { flex: 1; }
    .fcm-m-on table.fcm-m-cards td.fcm-m-actions .fcm-fadmin-btn-danger { background: none; color: #EF4444; border: 1px solid #fecaca; box-shadow: none; }
    .fcm-m-on .fcm-fadmin-table tbody tr:hover { background: #fff; }
    .fcm-m-on #fadmin-budget-table h3 { margin: 18px 0 6px !important; font-size: 16px; }
    .fcm-m-on #fadmin-budget-table h3 span { display: block; font-size: 13px !important; }
}
