/* ==========================================================================
   JuHi-DB – Tests & Rückmeldungen (1.28.0.0)
   Ziel: auf einen Blick sehen, was zu tun ist. Große Knöpfe, klare Farben:
   rot = Fehler, gelb = noch testen, grün = erledigt.
   ========================================================================== */

#oberadmin-tests { max-width: 900px; }
#oberadmin-tests .tst-intro { font-size: 17px; line-height: 1.5; margin: 0 0 18px; color: var(--juhi-text, #4e4e4e); }

/* Kacheln oben */
#oberadmin-tests .tst-kacheln { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin: 0 0 14px; }
#juhidb-container #oberadmin-tests button.tst-kachel {
    display: flex !important; flex-direction: column; align-items: flex-start; justify-content: center;
    min-width: 0 !important; width: 100% !important; margin: 0 !important; padding: 12px 16px !important;
    border: 2px solid transparent !important; border-radius: var(--juhi-radius-gross, 10px) !important;
    background: var(--juhi-flaeche-ruhig, #eee) !important; color: var(--juhi-text-kraeftig, #2c2c2a) !important;
    text-align: left; line-height: 1.2 !important; cursor: pointer; opacity: 0.55;
}
#juhidb-container #oberadmin-tests button.tst-kachel.tst-aktiv { opacity: 1; }
#juhidb-container #oberadmin-tests button.tst-kachel:hover { opacity: 1; }
#oberadmin-tests .tst-zahl { font-size: 34px; font-weight: 700; }
#oberadmin-tests .tst-kachel-text { font-size: 15px; font-weight: 600; margin-top: 2px; }
#juhidb-container #oberadmin-tests button.tst-kachel.tst-k-fehler { background: #fdecea !important; border-color: #f3b4ab !important; }
#juhidb-container #oberadmin-tests .tst-k-fehler .tst-zahl { color: var(--juhi-rot, #d11f00); }
#juhidb-container #oberadmin-tests button.tst-kachel.tst-k-offen { background: #fdf5e4 !important; border-color: #f0d59a !important; }
#juhidb-container #oberadmin-tests .tst-k-offen .tst-zahl { color: #a06a00; }
#juhidb-container #oberadmin-tests button.tst-kachel.tst-k-ok { background: #e7f5ed !important; border-color: #a8d9bc !important; }
#juhidb-container #oberadmin-tests .tst-k-ok .tst-zahl { color: var(--juhi-akzent-dunkel, #0f6e56); }

/* Leiste */
#oberadmin-tests .tst-leiste { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 18px; margin: 0 0 18px; padding: 8px 0; border-bottom: 1px solid var(--juhi-rand-leise, #e4e3de); font-size: 15px; }
#oberadmin-tests .tst-leiste-feld { display: inline-flex; align-items: center; gap: 6px; margin: 0; }
#juhidb-container #oberadmin-tests label.tst-leiste-feld { display: inline-flex !important; width: auto !important; font-size: 15px; }
#juhidb-container #oberadmin-tests .tst-leiste select { width: auto !important; margin: 0 !important; font-size: 15px; padding: 4px 6px; }
#oberadmin-tests .tst-leiste a.tst-aktiv { font-weight: 700; text-decoration: none; color: var(--juhi-text-kraeftig, #2c2c2a); }
#oberadmin-tests .tst-leiste [data-tst-aktion="kopieren"] { margin-left: auto !important; }

/* Kleine Knöpfe */
#juhidb-container #oberadmin-tests button.tst-klein-knopf {
    display: inline-block !important; min-width: 0 !important; width: auto !important; margin: 0 !important;
    font-size: 14px !important; line-height: 1.4 !important; padding: 4px 10px !important; border-width: 1px !important; border-radius: 6px !important;
}
#juhidb-container #oberadmin-tests button.tst-rot { color: var(--juhi-rot, #d11f00) !important; border-color: var(--juhi-rot, #d11f00) !important; background: #fff !important; }

/* Versionen */
#oberadmin-tests .tst-version { margin: 0 0 30px; }
#oberadmin-tests .tst-version-kopf { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 6px; }
#oberadmin-tests .tst-version-kopf h3 { margin: 0; font-size: 22px; }
#oberadmin-tests .tst-version-kopf small { font-weight: normal; color: var(--juhi-text-leise, #63625d); font-size: 15px; }
#oberadmin-tests .tst-version-stand { font-size: 15px; color: var(--juhi-text-leise, #63625d); }
#oberadmin-tests .tst-balken { height: 8px; border-radius: 4px; background: var(--juhi-spur, #ecebe5); margin: 6px 0 14px; overflow: hidden; }
#oberadmin-tests .tst-balken span { display: block; height: 100%; background: var(--juhi-akzent, #1c9954); border-radius: 4px; transition: width .4s; }

/* Karten */
#oberadmin-tests .tst-karte {
    background: var(--juhi-flaeche, #fff); border: 1px solid var(--juhi-rand-leise, #e4e3de); border-left: 6px solid #e0b347;
    border-radius: var(--juhi-radius, 8px); padding: 14px 18px 10px; margin: 0 0 14px; box-shadow: 0 1px 3px rgba(0,0,0,0.05);
    scroll-margin-top: 90px; transition: box-shadow .3s;
}
#oberadmin-tests .tst-karte.tst-s-fehler { border-left-color: var(--juhi-rot, #d11f00); background: #fffafa; }
#oberadmin-tests .tst-karte.tst-s-ok { border-left-color: var(--juhi-akzent, #1c9954); }
#oberadmin-tests .tst-karte.tst-s-entfaellt { border-left-color: #bbb; opacity: .75; }
#oberadmin-tests .tst-karte.tst-hervor { box-shadow: 0 0 0 4px var(--juhi-akzent-spur, rgba(28,153,84,.25)); }
#oberadmin-tests .tst-karte-kopf { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; font-size: 14px; }
#oberadmin-tests .tst-plakette { font-weight: 700; padding: 2px 10px; border-radius: 999px; background: #fdf5e4; color: #8a5a00; }
#oberadmin-tests .tst-p-fehler { background: #fdecea; color: var(--juhi-rot-dunkel, #851602); }
#oberadmin-tests .tst-p-ok { background: #e7f5ed; color: var(--juhi-akzent-dunkel, #0f6e56); }
#oberadmin-tests .tst-p-entfaellt { background: #eee; color: #666; }
#oberadmin-tests .tst-wer { color: var(--juhi-text-leise, #63625d); }
#oberadmin-tests .tst-gruppe { margin-left: auto; color: var(--juhi-text-leise, #63625d); background: var(--juhi-flaeche-ruhig, #eee); padding: 2px 8px; border-radius: 6px; }
#oberadmin-tests .tst-titel { font-size: 20px; margin: 10px 0 8px; line-height: 1.3; }
#oberadmin-tests .tst-als, #oberadmin-tests .tst-erwartet, #oberadmin-tests .tst-zwischen { margin: 0 0 6px; font-size: 16px; }
#oberadmin-tests .tst-erwartet { background: #f2f8f4; border-radius: 6px; padding: 8px 10px; margin-top: 8px; }
#oberadmin-tests ol.tst-schritte { margin: 0 0 6px 22px; padding: 0; font-size: 16px; }
#oberadmin-tests ol.tst-schritte li { margin: 0 0 4px; }
#oberadmin-tests .tst-details summary { cursor: pointer; color: var(--juhi-text-leise, #63625d); font-size: 14px; margin-bottom: 6px; }

/* Verlauf */
#oberadmin-tests .tst-meldungen { margin: 10px 0 0; padding: 8px 10px; background: var(--juhi-flaeche-hover, #faf9f6); border-radius: 6px; font-size: 14px; }
#oberadmin-tests .tst-meldungen ul { list-style: none; margin: 0; padding: 0; }
#oberadmin-tests .tst-meldungen li { margin: 0 0 6px; }
#oberadmin-tests .tst-meldungen li.tst-m-leise { color: var(--juhi-text-still, #8f8e88); margin-bottom: 2px; }
#oberadmin-tests .tst-m-kopf { display: block; font-size: 12px; color: var(--juhi-text-still, #8f8e88); }
#oberadmin-tests .tst-m-status { font-weight: 600; }
#oberadmin-tests .tst-m-text { white-space: normal; }

/* Aktionen */
#oberadmin-tests .tst-aktionen, #oberadmin-tests .tst-form-knoepfe { display: flex; flex-wrap: wrap; gap: 10px; margin: 12px 0 4px; }
#juhidb-container #oberadmin-tests .tst-aktionen button, #juhidb-container #oberadmin-tests .tst-form-knoepfe button.tst-schlecht,
#juhidb-container #oberadmin-tests .tst-tg button.tst-gut {
    display: inline-block !important; margin: 0 !important; min-width: 160px !important; font-size: 18px !important;
}
#juhidb-container #oberadmin-tests button.tst-gut { background: var(--juhi-akzent, #1c9954) !important; border-color: var(--juhi-akzent-dunkel, #0f6e56) !important; color: #fff !important; }
#juhidb-container #oberadmin-tests button.tst-schlecht { background: #fff !important; border-color: var(--juhi-rot, #d11f00) !important; color: var(--juhi-rot, #d11f00) !important; }
#juhidb-container #oberadmin-tests .tst-form-knoepfe button.tst-schlecht { background: var(--juhi-rot, #d11f00) !important; color: #fff !important; }
#juhidb-container #oberadmin-tests button.tst-neutral { background: #fff !important; border-color: var(--juhi-rand-stark, #bbb) !important; color: var(--juhi-text, #4e4e4e) !important; }
#juhidb-container #oberadmin-tests .tst-aktionen button.tst-klein-knopf { min-width: 0 !important; font-size: 14px !important; }
#oberadmin-tests .tst-form { margin: 12px 0 4px; }
#juhidb-container #oberadmin-tests label.tst-form-label { display: block !important; width: auto !important; max-width: none !important; margin: 0 0 6px; font-size: 16px; }
#juhidb-container #oberadmin-tests .tst-form textarea { width: 100% !important; box-sizing: border-box; font-size: 16px; font-family: inherit; }
#oberadmin-tests .tst-form-knoepfe { align-items: center; }
#oberadmin-tests .tst-fuss { margin: 6px 0 2px; font-size: 13px; color: var(--juhi-text-still, #8f8e88); }
#oberadmin-tests .tst-fuss a { color: inherit; }
#oberadmin-tests .tst-klein { font-size: 13px; color: var(--juhi-text-leise, #63625d); }
#oberadmin-tests .tst-leer { text-align: center; font-size: 20px; padding: 40px 10px; background: #e7f5ed; border-radius: var(--juhi-radius-gross, 10px); margin: 0 0 24px; }

/* Telegram */
#oberadmin-tests .tst-tg { margin: 30px 0 10px; border: 1px solid var(--juhi-rand-leise, #e4e3de); border-radius: var(--juhi-radius, 8px); background: #f6f9fc; }
#oberadmin-tests .tst-tg > summary { cursor: pointer; padding: 12px 16px; font-weight: 600; font-size: 16px; }
#oberadmin-tests .tst-tg-inhalt { padding: 0 16px 14px; font-size: 15px; }
#oberadmin-tests .tst-tg h4 { margin: 16px 0 6px; font-size: 17px; }
#oberadmin-tests .tst-tg-zeile { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
#juhidb-container #oberadmin-tests .tst-tg-zeile input { flex: 1 1 320px; width: auto !important; margin: 0 !important; font-family: monospace; }
#oberadmin-tests .tst-tg-ok { color: var(--juhi-akzent-dunkel, #0f6e56); margin: 10px 0 0; }
#oberadmin-tests .tst-tg-warn { color: #8a5a00; background: #fdf5e4; padding: 6px 10px; border-radius: 6px; }
#oberadmin-tests table.tst-tg-tabelle { width: 100%; border-collapse: collapse; margin: 6px 0; }
#oberadmin-tests table.tst-tg-tabelle td { padding: 6px 4px; border-bottom: 1px solid var(--juhi-rand-leise, #e4e3de); vertical-align: middle; }
#oberadmin-tests td.tst-tg-name { width: 34%; font-weight: 600; }
#oberadmin-tests code.tst-befehl { background: #fff; border: 1px solid var(--juhi-rand, #ccc); border-radius: 4px; padding: 2px 6px; font-size: 13px; word-break: break-all; }
#oberadmin-tests .tst-tg-verbunden { color: var(--juhi-akzent-dunkel, #0f6e56); }
#oberadmin-tests .tst-tg-fuss { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 16px; }

/* Bestätigung unten (außerhalb des Containers) */
#tst-toast {
    position: fixed; left: 50%; bottom: 24px; transform: translate(-50%, 20px); z-index: 100000;
    background: #2c2c2a; color: #fff; padding: 12px 20px; border-radius: 10px; font-size: 16px;
    box-shadow: 0 4px 16px rgba(0,0,0,0.25); opacity: 0; pointer-events: none; transition: opacity .25s, transform .25s; max-width: 90vw;
}
#tst-toast.tst-toast-zeigen { opacity: 1; transform: translate(-50%, 0); }

@media (max-width: 640px) {
    #oberadmin-tests .tst-kacheln { grid-template-columns: 1fr; }
    #juhidb-container #oberadmin-tests button.tst-kachel { flex-direction: row; align-items: center; gap: 12px; }
    #oberadmin-tests .tst-zahl { font-size: 26px; }
    #oberadmin-tests .tst-gruppe { margin-left: 0; }
    #juhidb-container #oberadmin-tests .tst-aktionen button { flex: 1 1 100%; }
    #oberadmin-tests td.tst-tg-name { display: block; width: auto; border-bottom: 0; padding-bottom: 0; }
    #oberadmin-tests table.tst-tg-tabelle td { display: block; }
}
