/* ============================================================
   Präsentationen bewerten – style.css
   ============================================================ */

:root {
    --primary: #82c91e;
    --primary-dark: #6eb015;
    --accent: #e67e22;
    --bg: #f4f6f8;
    --card-bg: #ffffff;
    --text: #1e293b;
    --text-muted: #64748b;
    --border: #e2e8f0;
    --danger: #e74c3c;
    --danger-bg: #fef2f2;
    --success: #27ae60;
    --font: 'Inter', 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    --radius: 12px;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
body { font-family: var(--font); background: var(--bg); color: var(--text); min-height: 100vh; }

/* === HEADER === */
header { padding: 20px 20px 8px; display: flex; align-items: center; justify-content: center; position: relative; }
h1 { font-size: 1.8rem; font-weight: 800; color: var(--primary); }
.nav-btn { position: absolute; top: 50%; transform: translateY(-50%); display: flex; align-items: center; gap: 8px; text-decoration: none; color: #bdc3c7; font-weight: 600; font-size: 1rem; transition: color 0.3s; }
.nav-btn:hover { color: var(--primary); }
.back-link { left: 20px; }
.home-link { right: 20px; font-size: 1.4rem; }

/* === MAIN === */
main { max-width: 900px; margin: 0 auto; padding: 12px 16px 40px; }

/* === SCREENS === */
.screen { display: none; animation: fadeIn 0.25s ease; }
.screen.active { display: block; }
@keyframes fadeIn { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: translateY(0); } }

/* === SCREEN HEADER === */
.screen-header { display: flex; align-items: center; gap: 12px; margin-bottom: 20px; flex-wrap: wrap; }
.screen-header h2 { flex: 1; font-size: 1.3rem; font-weight: 700; color: var(--text); display: flex; align-items: center; gap: 8px; }
.header-actions { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }

/* === BUTTONS === */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; padding: 10px 18px; border: none; border-radius: 10px; font-family: var(--font); font-weight: 600; font-size: 0.9rem; cursor: pointer; transition: all 0.2s; }
.btn:hover { transform: translateY(-1px); }
.btn:active { transform: translateY(0); }
.btn-primary { background: var(--primary); color: white; }
.btn-primary:hover { background: var(--primary-dark); box-shadow: 0 4px 12px rgba(130,201,30,0.3); }
.btn-secondary { background: #f1f5f9; color: var(--text); border: 1px solid var(--border); }
.btn-secondary:hover { background: #e2e8f0; }
.btn-accent { background: var(--accent); color: white; }
.btn-accent:hover { background: #d35400; }
.btn-danger { color: var(--danger); background: transparent; }
.btn-danger:hover { background: var(--danger-bg); }
.btn-icon { padding: 8px 10px; background: transparent; color: var(--text-muted); font-size: 1.1rem; }
.btn-icon:hover { color: var(--text); background: #f1f5f9; }
.btn-sm { padding: 6px 12px; font-size: 0.82rem; border-radius: 8px; }

/* === CARDS === */
.card-list { display: flex; flex-direction: column; gap: 10px; }
.projekt-card, .gruppe-card { background: var(--card-bg); border: 1px solid var(--border); border-left: 4px solid var(--primary); border-radius: var(--radius); padding: 16px 18px; cursor: pointer; transition: all 0.2s; display: flex; align-items: center; gap: 14px; }
.projekt-card:hover, .gruppe-card:hover { box-shadow: 0 4px 16px rgba(0,0,0,0.08); transform: translateY(-2px); }
.card-icon { width: 44px; height: 44px; border-radius: 10px; background: linear-gradient(135deg, var(--primary), var(--primary-dark)); color: white; display: flex; align-items: center; justify-content: center; font-size: 1.2rem; flex-shrink: 0; }
.gruppe-card .card-icon { background: linear-gradient(135deg, var(--accent), #d35400); }
.card-info { flex: 1; min-width: 0; }
.card-info strong { display: block; font-size: 1rem; margin-bottom: 2px; }
.card-info .card-meta { font-size: 0.82rem; color: var(--text-muted); }
.card-arrow { color: #cbd5e1; font-size: 1.1rem; }
.card-note { background: var(--bg); padding: 4px 10px; border-radius: 8px; font-weight: 700; font-size: 0.85rem; color: var(--primary-dark); white-space: nowrap; }

/* === EMPTY STATE === */
.empty-state { text-align: center; padding: 40px 20px; color: var(--text-muted); }
.empty-state i { font-size: 3rem; margin-bottom: 12px; display: block; }
.small-empty { padding: 20px; }
.small-empty p { font-size: 0.9rem; }

/* === SETTINGS === */
.settings-card { background: var(--card-bg); border: 1px solid var(--border); border-radius: var(--radius); padding: 24px; }
.settings-card.compact { padding: 18px; margin-bottom: 16px; }
.setting-group { margin-bottom: 24px; padding-bottom: 20px; border-bottom: 1px solid var(--border); }
.setting-group:last-child { border-bottom: none; margin-bottom: 0; padding-bottom: 0; }
.setting-group > label { display: block; font-weight: 700; font-size: 0.95rem; margin-bottom: 8px; }
.setting-hint { font-size: 0.82rem; color: var(--text-muted); margin-bottom: 12px; }

.toggle-group { display: flex; gap: 0; background: #f1f5f9; border-radius: 10px; padding: 3px; border: 1px solid var(--border); }
.toggle-btn { flex: 1; padding: 10px 14px; border: none; background: transparent; font-family: var(--font); font-weight: 600; font-size: 0.85rem; color: var(--text-muted); cursor: pointer; border-radius: 8px; transition: all 0.2s; white-space: nowrap; text-align: center; }
.toggle-btn.active { background: white; color: var(--text); box-shadow: 0 1px 4px rgba(0,0,0,0.08); }

/* Bewertungsart Toggles */
.bewertungsart-row { display: flex; align-items: center; gap: 10px; padding: 10px 12px; background: var(--bg); border-radius: 8px; margin-bottom: 6px; }
.bewertungsart-row .ba-label { flex: 1; font-size: 0.88rem; font-weight: 600; }
.bewertungsart-row .ba-badge { font-size: 0.72rem; padding: 3px 8px; border-radius: 12px; font-weight: 600; }
.ba-badge.gruppe { background: #dbeafe; color: #1d4ed8; }
.ba-badge.einzel { background: #fef3c7; color: #92400e; }
.bewertungsart-row .toggle-group { flex-shrink: 0; }
.bewertungsart-row .toggle-group .toggle-btn { padding: 6px 12px; font-size: 0.78rem; }

/* Sliders */
.gewichtung-sliders { display: flex; flex-direction: column; gap: 12px; }
.slider-row { display: flex; align-items: center; gap: 12px; }
.slider-label { width: 70px; font-weight: 600; font-size: 0.88rem; }
.slider-row input[type="range"] { flex: 1; height: 6px; -webkit-appearance: none; appearance: none; background: #e2e8f0; border-radius: 3px; outline: none; }
.slider-row input[type="range"]::-webkit-slider-thumb { -webkit-appearance: none; width: 20px; height: 20px; border-radius: 50%; background: var(--primary); cursor: pointer; box-shadow: 0 1px 4px rgba(0,0,0,0.2); }
.slider-value { width: 40px; text-align: right; font-weight: 700; font-size: 0.9rem; color: var(--primary-dark); }
.gewichtung-summe { text-align: center; font-weight: 700; font-size: 0.9rem; margin-top: 8px; padding: 8px; border-radius: 8px; }
.gewichtung-summe.ok { background: #d5f5e3; color: #27ae60; }
.gewichtung-summe.error { background: #fadbd8; color: #e74c3c; }

/* Faktoren */
.faktoren-liste { display: flex; flex-direction: column; gap: 6px; }
.faktoren-kategorie-label { font-weight: 700; font-size: 0.82rem; color: var(--text-muted); margin-top: 10px; margin-bottom: 4px; }
.faktor-row { display: flex; align-items: center; gap: 8px; padding: 8px 10px; background: var(--bg); border-radius: 8px; }
.faktor-row.disabled { opacity: 0.45; }
.faktor-checkbox { width: 18px; height: 18px; accent-color: var(--primary); cursor: pointer; flex-shrink: 0; }
.faktor-name { flex: 1; font-size: 0.88rem; }
.faktor-info-btn { background: none; border: none; color: var(--primary); cursor: pointer; font-size: 0.9rem; padding: 2px 6px; transition: color 0.2s; flex-shrink: 0; }
.faktor-info-btn:hover { color: var(--primary-dark); }
.faktor-row select { padding: 4px 8px; border: 1px solid var(--border); border-radius: 6px; font-family: var(--font); font-weight: 600; font-size: 0.85rem; background: white; }

/* Info tooltip */
.info-popup { background: #f8fafc; border: 1px solid var(--border); border-left: 3px solid var(--primary); border-radius: 8px; padding: 10px 14px; margin: 6px 0 6px 26px; font-size: 0.84rem; line-height: 1.5; color: var(--text-muted); animation: fadeIn 0.15s ease; }

/* === GRUPPE: FELDER === */
.inline-fields { display: flex; gap: 12px; flex-wrap: wrap; margin-bottom: 16px; }
.field { flex: 1; min-width: 150px; }
.field-small { flex: 0 0 140px; min-width: 120px; }
.field label { display: block; font-weight: 600; font-size: 0.82rem; margin-bottom: 4px; color: var(--text-muted); }
.field input { width: 100%; padding: 9px 12px; border: 1px solid var(--border); border-radius: 8px; font-family: var(--font); font-size: 0.9rem; }
.field input:focus { outline: none; border-color: var(--primary); box-shadow: 0 0 0 3px rgba(130,201,30,0.12); }

/* Personen */
.personen-section { margin-top: 4px; }
.personen-section > label { display: block; font-weight: 600; font-size: 0.82rem; margin-bottom: 6px; color: var(--text-muted); }
.personen-tags { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 8px; min-height: 28px; }
.person-tag { display: inline-flex; align-items: center; gap: 6px; background: #eef2ff; border: 1px solid #c7d2fe; color: #4338ca; padding: 5px 10px; border-radius: 20px; font-size: 0.82rem; font-weight: 600; }
.person-tag .remove-person { cursor: pointer; color: #818cf8; font-size: 0.75rem; transition: color 0.2s; }
.person-tag .remove-person:hover { color: var(--danger); }
.add-person { display: flex; gap: 6px; }
.add-person input { flex: 1; padding: 7px 12px; border: 1px solid var(--border); border-radius: 8px; font-family: var(--font); font-size: 0.88rem; }
.add-person input:focus { outline: none; border-color: var(--primary); }

/* === BEWERTUNGS-TABS === */
.bewertung-tabs { display: flex; gap: 0; background: #f1f5f9; border-radius: 12px; padding: 4px; margin-bottom: 16px; border: 1px solid var(--border); overflow-x: auto; -webkit-overflow-scrolling: touch; }
.bew-tab { flex: 1; padding: 10px 12px; border: none; background: transparent; font-family: var(--font); font-weight: 600; font-size: 0.8rem; color: var(--text-muted); cursor: pointer; border-radius: 8px; transition: all 0.2s; white-space: nowrap; text-align: center; }
.bew-tab.active { background: white; color: var(--text); box-shadow: 0 1px 4px rgba(0,0,0,0.08); }
.bew-tab .tab-icon { display: block; font-size: 1.1rem; margin-bottom: 2px; }

/* === BEWERTUNGS-PANEL === */
.bew-panel { display: none; animation: fadeIn 0.2s ease; }
.bew-panel.active { display: block; }

/* Bewertungsart-Hinweis */
.bewertungsart-hint { display: flex; align-items: center; gap: 8px; padding: 8px 14px; border-radius: 8px; font-size: 0.82rem; font-weight: 600; margin-bottom: 12px; }
.bewertungsart-hint.gruppe { background: #dbeafe; color: #1d4ed8; }
.bewertungsart-hint.einzel { background: #fef3c7; color: #92400e; }

.person-select { display: flex; gap: 6px; margin-bottom: 14px; flex-wrap: wrap; }
.person-btn { padding: 8px 16px; border: 2px solid var(--border); background: white; border-radius: 10px; font-family: var(--font); font-weight: 600; font-size: 0.85rem; cursor: pointer; transition: all 0.2s; }
.person-btn.active { border-color: var(--primary); background: #f0fdf4; color: var(--primary-dark); }

/* Kriterium */
.kriterium-card { background: var(--card-bg); border: 1px solid var(--border); border-radius: var(--radius); padding: 16px; margin-bottom: 12px; }
.krit-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 10px; }
.krit-name { font-weight: 700; font-size: 0.95rem; }
.krit-faktor { font-size: 0.75rem; font-weight: 700; color: var(--text-muted); background: var(--bg); padding: 3px 8px; border-radius: 6px; }

/* Stufen-Buttons */
.stufen-bar { display: flex; gap: 6px; margin-bottom: 10px; }
.stufe-btn { flex: 1; padding: 10px 0; border: 2px solid #e2e8f0; background: white; border-radius: 8px; font-family: var(--font); font-weight: 700; font-size: 0.95rem; cursor: pointer; transition: all 0.15s; text-align: center; }
.stufe-btn:hover { transform: scale(1.05); }
.stufe-btn[data-stufe="5"] { color: #27ae60; }
.stufe-btn[data-stufe="4"] { color: #2ecc71; }
.stufe-btn[data-stufe="3"] { color: #f39c12; }
.stufe-btn[data-stufe="2"] { color: #e67e22; }
.stufe-btn[data-stufe="1"] { color: #e74c3c; }
.stufe-btn.active[data-stufe="5"] { background: #d5f5e3; border-color: #27ae60; }
.stufe-btn.active[data-stufe="4"] { background: #eafaf1; border-color: #2ecc71; }
.stufe-btn.active[data-stufe="3"] { background: #fef9e7; border-color: #f39c12; }
.stufe-btn.active[data-stufe="2"] { background: #fdebd0; border-color: #e67e22; }
.stufe-btn.active[data-stufe="1"] { background: #fadbd8; border-color: #e74c3c; }

/* Textbaustein */
.text-baustein { display: none; }
.text-baustein.active { display: block; animation: fadeIn 0.2s ease; }
.text-baustein textarea { width: 100%; min-height: 80px; padding: 10px 12px; border: 1px solid var(--border); border-radius: 8px; font-family: var(--font); font-size: 0.88rem; line-height: 1.6; resize: vertical; color: var(--text); }
.text-baustein textarea:focus { outline: none; border-color: var(--primary); box-shadow: 0 0 0 3px rgba(130,201,30,0.12); }

/* === ERGEBNIS === */
.ergebnis-bereich { margin-top: 16px; }
.ergebnis-card { background: var(--card-bg); border: 1px solid var(--border); border-radius: var(--radius); padding: 20px; margin-bottom: 12px; }
.ergebnis-person { display: flex; align-items: center; gap: 12px; padding: 14px 16px; background: var(--bg); border-radius: 10px; margin-bottom: 8px; flex-wrap: wrap; }
.ergebnis-name { flex: 1; font-weight: 700; min-width: 100px; }
.ergebnis-note-berechnet { font-weight: 700; font-size: 1rem; color: var(--primary-dark); background: #d5f5e3; padding: 4px 12px; border-radius: 8px; }
.ergebnis-arrow { color: var(--text-muted); font-size: 0.9rem; }
.ergebnis-note-select { padding: 6px 10px; border: 2px solid var(--border); border-radius: 8px; font-family: var(--font); font-weight: 600; font-size: 0.85rem; background: white; color: var(--text); }

.ergebnis-breakdown { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 8px; margin-bottom: 12px; }
.breakdown-item { background: var(--bg); border-radius: 8px; padding: 10px; text-align: center; }
.breakdown-item .bd-label { font-size: 0.75rem; color: var(--text-muted); font-weight: 600; text-transform: uppercase; letter-spacing: 0.3px; }
.breakdown-item .bd-value { font-size: 1.1rem; font-weight: 800; color: var(--primary-dark); margin-top: 2px; }

/* === MODAL === */
.modal-overlay { display: none; position: fixed; inset: 0; background: rgba(0,0,0,0.4); z-index: 100; }
.modal-overlay.active { display: block; }
.modal { display: none; position: fixed; top: 50%; left: 50%; transform: translate(-50%, -50%); background: var(--card-bg); border-radius: 16px; padding: 24px; width: 90%; max-width: 440px; z-index: 101; box-shadow: 0 20px 60px rgba(0,0,0,0.2); }
.modal.active { display: block; animation: fadeIn 0.2s ease; }
.modal-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 16px; }
.modal-header h3 { font-size: 1.1rem; }
.modal-body { margin-bottom: 16px; }
.modal-body input { width: 100%; padding: 12px; border: 1px solid var(--border); border-radius: 8px; font-family: var(--font); font-size: 1rem; }
.modal-body input:focus { outline: none; border-color: var(--primary); }
.modal-footer { display: flex; gap: 8px; justify-content: flex-end; }

/* === TOAST === */
.toast { position: fixed; bottom: 24px; left: 50%; transform: translateX(-50%) translateY(80px); background: #1e293b; color: white; padding: 12px 24px; border-radius: 10px; font-size: 0.9rem; font-weight: 500; opacity: 0; transition: all 0.3s ease; z-index: 200; pointer-events: none; white-space: nowrap; }
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }

/* === ZEITVORGABE === */
.zeit-inputs { display: flex; align-items: flex-end; gap: 10px; }
.zeit-inputs input[type="number"] { width: 80px; text-align: center; }
.zeit-bis { font-weight: 600; color: var(--text-muted); padding-bottom: 10px; }

/* === STOPPUHR === */
.stoppuhr-section { margin-bottom: 16px; }
.stoppuhr-card { background: var(--card-bg); border: 2px solid var(--border); border-radius: var(--radius); padding: 16px 20px; display: flex; align-items: center; gap: 16px; flex-wrap: wrap; transition: border-color 0.3s, background 0.3s; }
.stoppuhr-card.ok { border-color: #27ae60; background: #f0fdf4; }
.stoppuhr-card.warn { border-color: #f39c12; background: #fffbeb; }
.stoppuhr-card.danger { border-color: #e74c3c; background: #fef2f2; }
.stoppuhr-display { font-family: 'Inter', monospace; font-size: 2rem; font-weight: 800; color: var(--text); min-width: 100px; text-align: center; transition: color 0.3s; }
.stoppuhr-card.ok .stoppuhr-display { color: #27ae60; }
.stoppuhr-card.warn .stoppuhr-display { color: #f39c12; }
.stoppuhr-card.danger .stoppuhr-display { color: #e74c3c; }
.stoppuhr-controls { display: flex; gap: 8px; }
.stoppuhr-btn { padding: 8px 16px; font-size: 0.85rem; }
.stoppuhr-feedback { flex: 1 1 100%; font-size: 0.84rem; font-weight: 600; min-height: 20px; }
.stoppuhr-feedback.ok { color: #27ae60; }
.stoppuhr-feedback.warn { color: #f39c12; }
.stoppuhr-feedback.danger { color: #e74c3c; }

/* === RESPONSIVE === */
@media (max-width: 600px) {
    h1 { font-size: 1.3rem; }
    .nav-btn span { display: none; }
    .back-link { left: 12px; }
    .home-link { right: 12px; }
    main { padding: 8px 10px 30px; }
    .settings-card { padding: 16px; }
    .inline-fields { flex-direction: column; }
    .field-small { flex: 1; }
    .stufe-btn { padding: 8px 0; font-size: 0.85rem; }
    .bew-tab { font-size: 0.72rem; padding: 8px 6px; }
    .ergebnis-breakdown { grid-template-columns: 1fr 1fr; }
    .header-actions { gap: 4px; }
    .header-actions .btn-sm { padding: 5px 8px; font-size: 0.75rem; }
    .stoppuhr-display { font-size: 1.5rem; }
    .stoppuhr-card { padding: 12px 14px; gap: 10px; }
}

::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: rgba(156,163,175,0.4); border-radius: 10px; }

