:root {
    --rv-primary: #005286;
    --rv-primary-dark: #003d66;
    --rv-secondary: #32373c;
    --rv-light: #f4f6f8;
    --rv-white: #ffffff;
    --rv-text: #333333;
    --rv-border: #dce1e6;
}

html, body {
    font-family: 'Segoe UI', 'Helvetica Neue', Helvetica, Arial, sans-serif;
    margin: 0;
    padding: 0;
    color: var(--rv-text);
    background-color: var(--rv-light);
}

h1:focus {
    outline: none;
}

h1 {
    color: var(--rv-primary);
    font-weight: 600;
    margin-bottom: 1rem;
}

h4, h5 {
    color: var(--rv-secondary);
}

/* Page Layout */
.page {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

.top-header {
    background: linear-gradient(135deg, var(--rv-primary) 0%, var(--rv-primary-dark) 100%);
    color: var(--rv-white);
    padding: 0.8rem 1.5rem;
    display: flex;
    align-items: center;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
    z-index: 100;
}

.header-logo {
    height: 70px;
    width: auto;
    margin-right: 0.75rem;
    border-radius: 4px;
}

.header-brand {
    display: flex;
    flex-direction: column;
}

.header-title {
    font-size: 1.4rem;
    font-weight: 700;
    letter-spacing: 0.5px;
}

.header-subtitle {
    font-size: 0.8rem;
    opacity: 0.85;
    font-weight: 300;
}

.header-user {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-left: auto;
    margin-right: 1rem;
}

.header-user-name {
    font-weight: 600;
    font-size: 0.9rem;
}

.header-user-role {
    font-size: 0.75rem;
    opacity: 0.8;
    background-color: rgba(255, 255, 255, 0.15);
    padding: 0.15rem 0.5rem;
    border-radius: 3px;
}

.btn-logout {
    background: rgba(255, 255, 255, 0.15);
    border: 1px solid rgba(255, 255, 255, 0.3);
    color: var(--rv-white);
    padding: 0.3rem 0.75rem;
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.8rem;
    transition: background 0.2s ease;
}

.btn-logout:hover {
    background: rgba(255, 255, 255, 0.25);
}

.header-version {
    font-size: 0.75rem;
    opacity: 0.6;
    align-self: flex-end;
}

.page-body {
    display: flex;
    flex: 1;
}

/* Sidebar */
.sidebar {
    width: 220px;
    flex-shrink: 0;
    background-color: var(--rv-secondary);
    height: calc(100vh - 60px);
    position: sticky;
    top: 60px;
    display: flex;
    flex-direction: column;
    overflow-y: auto;
}

.nav-menu ul {
    list-style: none;
    margin: 0;
    padding: 0.5rem 0;
}

.nav-menu li {
    margin: 0;
}

.nav-menu .nav-link {
    display: block;
    padding: 0.85rem 1.2rem;
    color: #c8cdd2;
    text-decoration: none;
    font-size: 0.95rem;
    border-left: 3px solid transparent;
    transition: all 0.2s ease;
}

.nav-menu .nav-link:hover {
    background-color: rgba(255, 255, 255, 0.08);
    color: var(--rv-white);
    border-left-color: rgba(255, 255, 255, 0.3);
}

.nav-menu .nav-link.active {
    background-color: rgba(0, 82, 134, 0.4);
    color: var(--rv-white);
    border-left-color: var(--rv-white);
    font-weight: 600;
}

.nav-separator {
    color: rgba(255, 255, 255, 0.4);
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    padding: 0.75rem 1.2rem 0.3rem;
    font-weight: 600;
}

.nav-menu {
    flex: 1;
}

/* Sidebar Branding (unten links) */
.sidebar-branding {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.2rem;
    text-decoration: none;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    transition: background-color 0.2s ease;
    margin-top: auto;
}

.sidebar-branding:hover {
    background-color: rgba(255, 255, 255, 0.08);
}

.sidebar-branding-logo {
    width: 24px;
    height: 24px;
    border-radius: 3px;
    opacity: 0.7;
    filter: invert(1);
}

.sidebar-branding:hover .sidebar-branding-logo {
    opacity: 1;
}

.sidebar-branding-version {
    font-size: 0.75rem;
    color: rgba(255, 255, 255, 0.5);
}

.sidebar-branding:hover .sidebar-branding-version {
    color: rgba(255, 255, 255, 0.8);
}

/* Login Footer Branding */
.login-footer {
    padding: 1rem;
    display: flex;
    justify-content: center;
}

.login-branding {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    text-decoration: none;
    opacity: 0.5;
    transition: opacity 0.2s ease;
}

.login-branding:hover {
    opacity: 0.8;
}

.login-branding-logo {
    width: 20px;
    height: 20px;
}

.login-branding-version {
    font-size: 0.7rem;
    color: #999;
}

/* Main Footer Branding */
.main-footer {
    padding: 1.5rem 2rem 1rem;
    display: flex;
    justify-content: center;
}

.main-footer-branding {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    text-decoration: none;
    opacity: 0.4;
    transition: opacity 0.2s ease;
}

.main-footer-branding:hover {
    opacity: 0.7;
}

.main-footer-logo {
    width: 20px;
    height: 20px;
}

.main-footer-version {
    font-size: 0.7rem;
    color: #999;
}

/* Main Content */
main {
    flex: 1;
    min-width: 0;
    overflow-x: auto;
    background-color: var(--rv-light);
}

.content {
    padding: 1.5rem 2rem;
    max-width: 1400px;
    min-width: 0;
    overflow-x: auto;
}

/* Cards */
.card {
    background: var(--rv-white);
    border: 1px solid var(--rv-border);
    border-radius: 6px;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.06);
    transition: box-shadow 0.2s ease;
}

.card:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.card-body {
    padding: 1.25rem;
}

.card-title {
    color: var(--rv-primary);
    font-weight: 600;
}

/* Buttons */
.btn-primary {
    background-color: var(--rv-primary) !important;
    border-color: var(--rv-primary) !important;
    color: var(--rv-white) !important;
    border-radius: 4px;
    font-weight: 500;
}

.btn-primary:hover {
    background-color: var(--rv-primary-dark) !important;
    border-color: var(--rv-primary-dark) !important;
}

.btn-secondary {
    background-color: var(--rv-secondary) !important;
    border-color: var(--rv-secondary) !important;
    color: var(--rv-white) !important;
    border-radius: 4px;
}

/* Alerts */
.alert {
    border-radius: 4px;
    padding: 0.75rem 1rem;
    margin-bottom: 0;
    font-size: 0.9rem;
}

.alert-success {
    background-color: #e8f5e9;
    border-color: #c8e6c9;
    color: #2e7d32;
}

.alert-danger {
    background-color: #ffebee;
    border-color: #ffcdd2;
    color: #c62828;
}

.alert-info {
    background-color: #e3f2fd;
    border-color: #bbdefb;
    color: var(--rv-primary);
}

/* Form labels */
.form-label {
    font-weight: 500;
    font-size: 0.9rem;
    color: var(--rv-secondary);
    margin-bottom: 0.3rem;
}

/* Notification */
.notification-container {
    position: fixed;
    top: 1rem;
    right: 1rem;
    z-index: 10000;
}

/* ===== Login Page ===== */
.login-container {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 80vh;
    padding: 1rem;
}

.login-card {
    background: var(--rv-white);
    border: 1px solid var(--rv-border);
    border-radius: 8px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    padding: 2.5rem;
    width: 100%;
    max-width: 400px;
}

.login-title {
    color: var(--rv-primary);
    font-weight: 700;
    text-align: center;
    margin-bottom: 0.25rem;
}

.login-subtitle {
    text-align: center;
    color: #666;
    margin-bottom: 1.5rem;
}

.login-input {
    width: 100%;
}

.login-input .k-input-inner {
    font-size: 1.1rem;
    padding: 0.6rem;
    min-height: 48px;
}

.login-button {
    width: 100%;
    padding: 0.75rem;
    font-size: 1.1rem;
    min-height: 48px;
}

/* ===== Rechte Verwaltung ===== */
.rechte-kategorie {
    border: 1px solid var(--rv-border);
    border-radius: 4px;
    padding: 0.75rem;
    background-color: var(--rv-light);
}

.kategorie-titel {
    color: var(--rv-primary);
    font-weight: 600;
    margin-bottom: 0.5rem;
    padding-bottom: 0.25rem;
    border-bottom: 1px solid var(--rv-border);
}

/* ===== Ring Grid (Serie erfassen) ===== */
.ring-grid {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 0.5rem;
}

.ring-item label {
    display: block;
    font-weight: 600;
    font-size: 0.85rem;
    color: var(--rv-secondary);
    margin-bottom: 0.2rem;
    text-align: center;
}

/* Stepper +/- Buttons */
.stepper {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0;
    border: 1px solid #ccc;
    border-radius: 8px;
    overflow: hidden;
    background: #fff;
}

.stepper-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    border: none;
    background: #f0f0f0;
    font-size: 1.4rem;
    font-weight: 700;
    cursor: pointer;
    color: var(--rv-secondary);
    min-width: 40px;
    min-height: 48px;
    padding: 0;
    user-select: none;
    -webkit-user-select: none;
    touch-action: manipulation;
    transition: background-color 0.1s;
}

.stepper-btn:active {
    background: #d0d0d0;
}

.stepper-minus {
    border-right: 1px solid #ddd;
}

.stepper-plus {
    border-left: 1px solid #ddd;
}

.stepper-value {
    flex: 1;
    text-align: center;
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--rv-secondary);
    min-width: 32px;
    padding: 0 0.25rem;
}

.dark-mode .stepper {
    border-color: #555;
    background: var(--rv-card-bg);
}

.dark-mode .stepper-btn {
    background: #3a3a3a;
    color: var(--rv-text);
}

.dark-mode .stepper-btn:active {
    background: #555;
}

.dark-mode .stepper-minus {
    border-right-color: #555;
}

.dark-mode .stepper-plus {
    border-left-color: #555;
}

.dark-mode .stepper-value {
    color: var(--rv-text);
}

/* Erfassungs-Fortschritt */
.erfassung-fortschritt {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 0.75rem;
    padding: 0.5rem 0.75rem;
    background: #f8f9fa;
    border-radius: 8px;
    border: 1px solid #e0e0e0;
}

.fortschritt-text {
    font-size: 0.9rem;
    white-space: nowrap;
    color: #555;
}

.fortschritt-bar {
    flex: 1;
    height: 8px;
    background: #e0e0e0;
    border-radius: 4px;
    overflow: hidden;
}

.fortschritt-bar-fill {
    height: 100%;
    background: var(--rv-secondary);
    border-radius: 4px;
    transition: width 0.3s;
}

.dark-mode .erfassung-fortschritt {
    background: #16213e;
    border-color: #2a2a4a;
}

.dark-mode .fortschritt-text {
    color: #b0b8c0;
}

.dark-mode .fortschritt-bar {
    background: #2a2a4a;
}

/* Vorhandenes Ergebnis (Duplikat-Warnung) */
.vorhandenes-ergebnis-card {
    border-left: 4px solid #e67e22;
}

.vorhandenes-ergebnis-header {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: #e67e22;
    font-weight: 700;
    font-size: 1.1rem;
    margin-bottom: 0.75rem;
}

.vorhandenes-ergebnis-icon {
    font-size: 1.3rem;
}

.vorhandenes-ergebnis-entry {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    padding: 0.5rem 0;
    border-bottom: 1px solid #eee;
}

.vorhandenes-ergebnis-entry:last-of-type {
    border-bottom: none;
}

.vorhandenes-ergebnis-data {
    flex: 1;
    min-width: 0;
}

.vorhandenes-ergebnis-entry-actions {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
    flex-shrink: 0;
}

.vorhandenes-ergebnis-row {
    display: flex;
    gap: 1.5rem;
    flex-wrap: wrap;
    margin-bottom: 0.25rem;
    font-size: 0.95rem;
}

.vorhandenes-ergebnis-ring-row {
    font-size: 0.85rem;
    color: #777;
    margin-bottom: 0;
}

.vorhandenes-ergebnis-actions {
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap;
    margin-top: 0.75rem;
    padding-top: 0.5rem;
}

/* Loeschen-Dialog */
.loeschen-dialog-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000;
}

.loeschen-dialog {
    background: #fff;
    border-radius: 12px;
    padding: 1.5rem;
    max-width: 420px;
    width: 90%;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
}

.loeschen-dialog-header {
    font-size: 1.2rem;
    font-weight: 700;
    color: #c0392b;
    margin-bottom: 0.75rem;
}

.loeschen-dialog-body {
    font-size: 0.95rem;
    color: #333;
    margin-bottom: 1.25rem;
    line-height: 1.5;
}

.loeschen-dialog-actions {
    display: flex;
    gap: 0.75rem;
    justify-content: flex-end;
}

.dark-mode .vorhandenes-ergebnis-card {
    border-left-color: #e67e22;
}

.dark-mode .vorhandenes-ergebnis-entry {
    border-bottom-color: #2a2a4a;
}

.dark-mode .vorhandenes-ergebnis-ring-row {
    color: #999;
}

.dark-mode .loeschen-dialog {
    background: #1a1a2e;
}

.dark-mode .loeschen-dialog-body {
    color: #ccc;
}

/* Foto-Anzeige in vorhandenen Ergebnissen */
.vorhandenes-ergebnis-fotos {
    margin-top: 0.5rem;
    padding-top: 0.5rem;
    border-top: 1px solid #eee;
}

.fotos-label {
    font-size: 0.85rem;
    color: #666;
    font-weight: 600;
    display: block;
    margin-bottom: 0.5rem;
}

.fotos-thumbnails {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(60px, 60px));
    gap: 0.5rem;
}

.foto-thumbnail-container {
    position: relative;
    width: 60px;
    height: 60px;
    border-radius: 6px;
    overflow: hidden;
    border: 2px solid #ddd;
    cursor: pointer;
    transition: transform 0.2s, border-color 0.2s;
}

.foto-thumbnail-container:hover {
    transform: scale(1.05);
    border-color: #3498db;
}

.foto-thumbnail {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.foto-loeschen-btn {
    position: absolute;
    top: 2px;
    right: 2px;
    background: rgba(192, 57, 43, 0.9);
    color: white;
    border: none;
    border-radius: 50%;
    width: 24px;
    height: 24px;
    font-size: 1.2rem;
    line-height: 1;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.2s;
}

.foto-thumbnail-container:hover .foto-loeschen-btn {
    opacity: 1;
}

.foto-loeschen-btn:hover {
    background: rgba(192, 57, 43, 1);
}

/* Foto-Vollbild-Anzeige */
.foto-vollbild-container {
    position: relative;
    max-width: 95vw;
    max-height: 95vh;
    background: #000;
    border-radius: 8px;
    padding: 0.5rem;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.5);
}

.foto-vollbild {
    max-width: 100%;
    max-height: calc(95vh - 1rem);
    display: block;
    border-radius: 4px;
}

.foto-vollbild-schliessen {
    position: absolute;
    top: 0.5rem;
    right: 0.5rem;
    background: rgba(192, 57, 43, 0.9);
    color: white;
    border: none;
    border-radius: 50%;
    width: 36px;
    height: 36px;
    font-size: 1.8rem;
    line-height: 1;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s;
    z-index: 1;
}

.foto-vollbild-schliessen:hover {
    background: rgba(192, 57, 43, 1);
}

.foto-vollbild-actions {
    display: flex;
    justify-content: center;
    padding: 0.75rem 0 0.25rem;
}

.foto-vollbild-loeschen {
    background: rgba(192, 57, 43, 0.9);
    color: white;
    border: none;
    border-radius: 6px;
    padding: 0.5rem 1.5rem;
    font-size: 0.95rem;
    cursor: pointer;
    transition: background 0.2s;
}

.foto-vollbild-loeschen:hover {
    background: rgba(192, 57, 43, 1);
}

/* Dark Mode */
.dark-mode .vorhandenes-ergebnis-fotos {
    border-top-color: #2a2a4a;
}

.dark-mode .fotos-label {
    color: #999;
}

.dark-mode .foto-thumbnail-container {
    border-color: #3a3a5a;
}

.dark-mode .foto-thumbnail-container:hover {
    border-color: #3498db;
}

.dark-mode .foto-vollbild-container {
    background: #000;
}

/* Erfolgs-Overlay (zentrierte Meldung nach Speichern) */
.erfolgs-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10001;
    animation: fadeIn 0.2s ease;
}

.erfolgs-dialog {
    background: #fff;
    border-radius: 16px;
    padding: 2.5rem 3rem;
    text-align: center;
    box-shadow: 0 8px 40px rgba(0, 0, 0, 0.3);
    max-width: 90vw;
    min-width: 320px;
    animation: scaleIn 0.25s ease;
}

.erfolgs-icon {
    font-size: 3.5rem;
    color: #28a745;
    margin-bottom: 1rem;
    line-height: 1;
}

.erfolgs-text {
    font-size: 1.4rem;
    font-weight: 600;
    color: #333;
    line-height: 1.4;
}

@keyframes scaleIn {
    from { transform: scale(0.8); opacity: 0; }
    to { transform: scale(1); opacity: 1; }
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.dark-mode .erfolgs-dialog {
    background: #1a1a2e;
}

.dark-mode .erfolgs-text {
    color: #eee;
}

/* Startnummer Stepper */
.stepper-startnr {
    min-width: 140px;
}

.stepper-startnr .stepper-value {
    font-size: 1.5rem;
    min-width: 48px;
}

.stepper-input {
    width: 64px;
    text-align: center;
    font-size: 1.3rem;
    font-weight: 700;
    border: 1px solid var(--rv-border, #dce1e6);
    border-radius: 6px;
    padding: 0.2rem 0.25rem;
    background: var(--rv-white, #fff);
    color: var(--rv-text, #333);
    -moz-appearance: textfield;
}

.stepper-input::-webkit-outer-spin-button,
.stepper-input::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

.stepper-input::placeholder {
    color: #999;
    font-weight: 400;
}

.stepper-input:focus {
    outline: 2px solid var(--rv-primary, #005286);
    border-color: var(--rv-primary, #005286);
}

/* Erfasst-Filter Badges */
.erfasst-filter-badges {
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

.erfasst-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    padding: 0.25rem 0.6rem;
    border: 1px solid #ddd;
    border-radius: 20px;
    background: #f8f9fa;
    cursor: pointer;
    font-size: 0.85rem;
    color: #555;
    transition: all 0.2s;
}

.erfasst-badge:hover {
    background: #e9ecef;
    border-color: #bbb;
}

.erfasst-badge-active {
    background: #e3f0ff;
    border-color: var(--rv-primary, #0d6efd);
    color: var(--rv-primary, #0d6efd);
    font-weight: 600;
}

.erfasst-badge-separator {
    color: #bbb;
    font-size: 0.9rem;
}

.erfasst-badge-count {
    font-weight: 700;
    font-size: 0.95rem;
}

.erfasst-badge-green {
    color: #27ae60;
}

.erfasst-badge-orange {
    color: #e67e22;
}

/* Erfasste Zeilen gruen hinterlegen */
.row-erfasst,
.k-grid .row-erfasst td {
    background-color: #e8f5e9 !important;
}

.dark-mode .erfasst-badge {
    background: #1e2a3a;
    border-color: #3a4a5a;
    color: #b0b8c0;
}

.dark-mode .erfasst-badge:hover {
    background: #2a3a4a;
}

.dark-mode .erfasst-badge-active {
    background: #1a3050;
    border-color: #4a8ad0;
    color: #90caf9;
}

.dark-mode .row-erfasst,
.dark-mode .k-grid .row-erfasst td {
    background-color: #1a3a1a !important;
}

/* Gemeldete Teilnehmer Grid — groessere Schrift + zweizeilige Header */
.tn-gemeldete-grid.k-grid td {
    font-size: 1.05rem;
    padding: 0.5rem 0.75rem;
}

.tn-gemeldete-grid.k-grid .k-header {
    font-size: 0.95rem;
    font-weight: 700;
    white-space: normal;
    line-height: 1.3;
    padding: 0.5rem 0.75rem;
}

.tn-gemeldete-grid.k-grid .k-filter-row td {
    font-size: 0.9rem;
}

/* Score Summary */
.score-summary {
    display: flex;
    gap: 0.5rem;
}

.score-item {
    flex: 1;
    text-align: center;
    padding: 0.6rem 0.5rem;
    border-radius: 6px;
    font-weight: 600;
}

.score-label {
    display: block;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    opacity: 0.8;
}

.score-value {
    display: block;
    font-size: 1.2rem;
}

.score-ok {
    background-color: #e8f5e9;
    color: #2e7d32;
    border: 2px solid #4caf50;
}

.score-error {
    background-color: #ffebee;
    color: #c62828;
    border: 2px solid #ef5350;
}

.score-info {
    background-color: #e3f2fd;
    color: var(--rv-primary);
    border: 2px solid #90caf9;
}

/* Signature */
.signature-container {
    max-width: 100%;
    overflow: hidden;
}

/* Action Buttons */
.mobile-actions {
    display: flex;
    gap: 0.5rem;
}

.btn-mobile-submit {
    flex: 2;
}

.btn-mobile-reset {
    flex: 1;
}

/* Dropdown Font Size (konfigurierbar via Admin) */
.k-dropdownlist .k-input-inner,
.k-list-item {
    font-size: var(--dropdown-fontsize, 1rem) !important;
}

/* Telerik overrides */
.k-button-solid-primary {
    background-color: var(--rv-primary) !important;
    border-color: var(--rv-primary) !important;
}

.k-button-solid-primary:hover {
    background-color: var(--rv-primary-dark) !important;
    border-color: var(--rv-primary-dark) !important;
}

.k-grid .k-header {
    background-color: var(--rv-primary) !important;
    color: var(--rv-white) !important;
    font-weight: 600;
}

.k-grid .k-filter-row {
    background-color: #e8eef3;
}

.k-pager {
    background-color: #f0f3f6;
}

/* ===== Wettkampf-Karte (Home) ===== */
.wettkampf-karte {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
}

.wettkampf-logo-container {
    flex-shrink: 0;
}

.wettkampf-logo {
    width: 60px;
    height: 60px;
    object-fit: contain;
    border-radius: 6px;
    border: 1px solid var(--rv-border);
}

.wettkampf-info {
    flex: 1;
    min-width: 0;
}

.wettkampf-buttons {
    display: flex;
    gap: 1rem;
    margin-top: 0.75rem;
}

.wettkampf-buttons .btn {
    padding: 0.6rem 1.5rem;
    font-size: 1rem;
    font-weight: 600;
    border-radius: 6px;
    letter-spacing: 0.3px;
    transition: all 0.2s ease;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.wettkampf-buttons .btn:hover {
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.18);
    transform: translateY(-1px);
}

.wettkampf-teilnehmer-count {
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 0.5rem 1rem;
    min-width: 80px;
}

.wettkampf-teilnehmer-zahl {
    font-size: 2.2rem;
    font-weight: 700;
    line-height: 1;
    color: var(--rv-primary, #005286);
}

.wettkampf-teilnehmer-label {
    font-size: 0.75rem;
    color: #666;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-top: 0.2rem;
}

.dark-mode .wettkampf-teilnehmer-zahl {
    color: #64b5f6;
}

.dark-mode .wettkampf-teilnehmer-label {
    color: #aaa;
}

/* ===== Logo Upload (WettkampfVerwaltung) ===== */
.logo-upload-bereich .card {
    border-left: 4px solid var(--rv-primary);
}

.wettkampf-logo-preview {
    width: 120px;
    height: 120px;
    object-fit: contain;
    border-radius: 6px;
    border: 1px solid var(--rv-border);
}

.logo-vorschau {
    min-height: 60px;
    display: flex;
    align-items: center;
}

/* ===== Teilnehmer-Auswahl (SerieErfassen) ===== */
.tn-auswahl-card {
    border-left: 4px solid var(--rv-primary);
}

.tn-auswahl-titel {
    color: var(--rv-primary);
    font-weight: 700;
    margin-bottom: 1rem;
}

.tn-startnr-row {
    display: flex;
    gap: 0.25rem;
}

.tn-startnr-btn {
    flex-shrink: 0;
    min-width: 42px;
    font-size: 1.1rem;
    padding: 0 0.4rem;
}

.tn-suche-input .k-input-inner,
.tn-suche-startnr .k-input-inner {
    font-size: 1.1rem;
    min-height: 48px;
}

.tn-ergebnis-info {
    font-size: 0.8rem;
    color: #888;
    margin-bottom: 0.4rem;
    padding-left: 0.25rem;
}

.tn-ergebnis-liste {
    max-height: 400px;
    overflow-y: auto;
    border: 1px solid var(--rv-border);
    border-radius: 6px;
    background: var(--rv-white);
}

.tn-ergebnis-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 1rem;
    cursor: pointer;
    border-bottom: 1px solid var(--rv-border);
    transition: background-color 0.15s ease;
}

.tn-ergebnis-item:last-child {
    border-bottom: none;
}

.tn-ergebnis-item:hover {
    background-color: #e3f2fd;
}

.tn-ergebnis-item.tn-bereits-gemeldet {
    background-color: #fff8e1;
    border-left: 3px solid #d35400;
}

.tn-ergebnis-item.tn-bereits-gemeldet:hover {
    background-color: #fff3cd;
}

.tn-ergebnis-item.tn-gesperrt {
    background-color: #f5f5f5;
    opacity: 0.7;
    cursor: not-allowed;
}

.tn-ergebnis-item.tn-gesperrt:hover {
    background-color: #f5f5f5;
}

.tn-gesperrt-hinweis {
    color: #c62828;
    font-weight: 600;
    font-size: 0.8rem;
    white-space: nowrap;
}

.tn-ergebnis-startnr {
    background-color: var(--rv-primary);
    color: var(--rv-white);
    font-weight: 700;
    font-size: 0.85rem;
    padding: 0.25rem 0.6rem;
    border-radius: 4px;
    min-width: 40px;
    text-align: center;
    flex-shrink: 0;
}

.tn-ergebnis-details {
    display: flex;
    flex-direction: column;
    flex: 1;
    min-width: 0;
}

.tn-ergebnis-name {
    font-weight: 600;
    font-size: 1rem;
}

.tn-ergebnis-verein {
    color: #666;
    font-size: 0.85rem;
    font-style: italic;
}

.tn-keine-ergebnisse,
.tn-suche-hinweis {
    text-align: center;
    padding: 2rem 1rem;
    color: #999;
    font-size: 0.95rem;
}

/* Ausgewaehlter Teilnehmer */
.tn-ausgewaehlt-card {
    border-left: 4px solid #4caf50;
    background: linear-gradient(135deg, #e8f5e9 0%, #ffffff 100%);
}

.tn-ausgewaehlt {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.tn-ausgewaehlt-startnr {
    background-color: var(--rv-primary);
    color: var(--rv-white);
    font-weight: 700;
    font-size: 1.3rem;
    padding: 0.5rem 0.85rem;
    border-radius: 6px;
    min-width: 50px;
    text-align: center;
    flex-shrink: 0;
}

.tn-ausgewaehlt-details {
    display: flex;
    flex-direction: column;
    flex: 1;
    min-width: 0;
}

.tn-ausgewaehlt-name {
    font-weight: 700;
    font-size: 1.15rem;
    color: var(--rv-text);
}

.tn-ausgewaehlt-verein {
    color: #666;
    font-size: 0.9rem;
}

.tn-aendern-btn {
    flex-shrink: 0;
}

/* ===== Info-Seite ===== */
.info-page {
    display: flex;
    justify-content: center;
    padding: 2rem 1rem;
}

.info-card {
    background: var(--rv-white);
    border: 1px solid var(--rv-border);
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    padding: 3rem 2.5rem;
    width: 100%;
    max-width: 460px;
    text-align: center;
}

.info-logo img {
    width: 100px;
    height: 100px;
    margin-bottom: 1.5rem;
}

.info-app-name {
    color: var(--rv-primary);
    font-weight: 700;
    font-size: 1.4rem;
    margin-bottom: 0.25rem;
}

.info-app-desc {
    color: #666;
    font-size: 0.95rem;
    margin-bottom: 1rem;
}

.info-version-badge {
    display: inline-block;
    background-color: var(--rv-primary);
    color: var(--rv-white);
    font-weight: 700;
    font-size: 0.9rem;
    padding: 0.3rem 1rem;
    border-radius: 20px;
}

.info-divider {
    border: none;
    border-top: 1px solid var(--rv-border);
    margin: 1.5rem 0;
}

.info-copyright p {
    margin: 0.25rem 0;
    font-size: 1rem;
    font-weight: 600;
    color: var(--rv-text);
}

.info-rights {
    font-weight: 400 !important;
    font-size: 0.85rem !important;
    color: #888 !important;
}

.info-tech {
    text-align: center;
}

.info-tech-title {
    font-weight: 600;
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: #999;
    margin-bottom: 0.5rem;
}

.info-tech p {
    margin: 0.2rem 0;
    font-size: 0.85rem;
    color: #666;
}

/* ===== Foto-Galerie ===== */
.foto-galerie {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(60px, 60px));
    gap: 0.5rem;
}

.foto-item {
    position: relative;
    border: 2px solid #ddd;
    border-radius: 6px;
    overflow: hidden;
    width: 60px;
    height: 60px;
    cursor: pointer;
    transition: transform 0.2s, border-color 0.2s;
}

.foto-item:hover {
    transform: scale(1.05);
    border-color: #3498db;
}

.foto-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.foto-delete {
    position: absolute;
    top: 2px;
    right: 2px;
    background: rgba(198, 40, 40, 0.85);
    color: #fff;
    border: none;
    border-radius: 50%;
    width: 24px;
    height: 24px;
    font-size: 16px;
    line-height: 22px;
    text-align: center;
    cursor: pointer;
    padding: 0;
}

.foto-delete:hover {
    background: #c62828;
}

.foto-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10001;
}

.foto-modal-content {
    position: relative;
    max-width: 90vw;
    max-height: 90vh;
}

.foto-modal-content img {
    max-width: 90vw;
    max-height: 90vh;
    object-fit: contain;
    border-radius: 4px;
}

.foto-modal-close {
    position: absolute;
    top: -12px;
    right: -12px;
    background: #fff;
    color: #333;
    border: none;
    border-radius: 50%;
    width: 32px;
    height: 32px;
    font-size: 20px;
    line-height: 30px;
    text-align: center;
    cursor: pointer;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

/* ===== Administration (Export/Import/Backup) ===== */
.admin-section {
    border-left: 4px solid var(--rv-primary);
}

.admin-section-title {
    color: var(--rv-primary);
    font-weight: 700;
    margin-bottom: 1rem;
}

.import-result .alert {
    font-size: 0.9rem;
}

.import-result ul {
    font-size: 0.85rem;
}

/* ===== Wettkampf-Einstellungen ===== */

.wk-section-title {
    font-weight: 600;
    color: var(--rv-secondary, #2980b9);
    margin-bottom: 1rem;
    font-size: 1.05rem;
}

.wk-section-hr {
    border-color: #dee2e6;
    margin: 1.25rem 0;
}

.wk-option-box {
    background: #f8f9fa;
    border-radius: 8px;
    padding: 0.85rem 1.25rem;
    min-width: 220px;
    font-size: 1rem;
    border: 1px solid #e9ecef;
    transition: border-color 0.2s;
}

.wk-option-box:hover {
    border-color: var(--rv-secondary, #2980b9);
}

/* ===== Teilnehmer-Verwaltung (per Wettkampf) ===== */
.teilnehmer-add-card {
    border-left: 4px solid var(--rv-primary);
    background: linear-gradient(135deg, #f0f7fb 0%, #ffffff 100%);
}

.tn-such-ergebnis-liste {
    max-height: 300px;
    overflow-y: auto;
    border: 1px solid var(--rv-border);
    border-radius: 6px;
    background: var(--rv-white);
}

.tn-neu-formular {
    border-top: 1px solid var(--rv-border);
    padding-top: 0.75rem;
}

/* ===== TABLET (max 1024px) ===== */
@media (max-width: 1024px) {
    .sidebar { width: 180px; }
    .nav-link { padding: 0.7rem 1rem; font-size: 0.85rem; }
    .content { padding: 1rem 1.25rem; }
    .top-header { padding: 0.6rem 1rem; }
    .header-logo { height: 50px; }
    .header-title { font-size: 1.2rem; }
    .wizard-step span:not(.wizard-step-number) { display: none; }
    .wizard-step-connector { width: 24px; }

    /* Ring Grid: Tablet */
    .ring-grid {
        grid-template-columns: repeat(4, 1fr);
        gap: 0.6rem;
    }

    .ring-item label {
        font-size: 0.95rem;
    }

    .stepper-btn {
        font-size: 1.6rem;
        min-width: 48px;
        min-height: 56px;
    }

    .stepper-value {
        font-size: 1.5rem;
    }
}

/* ===== SMARTPHONE (max 768px) ===== */
@media (max-width: 768px) {
    .k-grid { max-height: calc(100vh - 200px); min-height: 200px; }
    .grid-card-mobile .k-grid { display: none; }
    .grid-card-mobile .mobile-card-view { display: block; }
    /* Layout: Sidebar hidden on mobile, bottom nav shown */
    .page-body {
        flex-direction: column;
    }

    .sidebar {
        display: none;
    }

    .sidebar-toggle {
        display: none;
    }

    /* Bottom Navigation */
    .bottom-nav {
        display: flex;
        position: fixed;
        bottom: 0;
        left: 0;
        right: 0;
        background: var(--rv-secondary);
        z-index: 1000;
        box-shadow: 0 -2px 8px rgba(0,0,0,0.15);
        padding: 0;
    }
    .bottom-nav-item {
        flex: 1;
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        padding: 0.5rem 0.25rem;
        color: #c8cdd2;
        text-decoration: none;
        font-size: 0.65rem;
        gap: 0.15rem;
        border: none;
        background: none;
        cursor: pointer;
    }
    .bottom-nav-item.active,
    .bottom-nav-item:hover {
        color: white;
        background: rgba(255,255,255,0.08);
    }
    .bottom-nav-item .nav-icon {
        width: 22px;
        height: 22px;
    }
    .bottom-nav-more-overlay {
        position: fixed;
        bottom: 56px;
        left: 0;
        right: 0;
        background: var(--rv-secondary);
        z-index: 999;
        box-shadow: 0 -2px 8px rgba(0,0,0,0.2);
        padding: 0.5rem 0;
        border-radius: 12px 12px 0 0;
    }
    .bottom-nav-more-overlay a {
        display: flex;
        align-items: center;
        gap: 0.75rem;
        padding: 0.75rem 1.25rem;
        color: #c8cdd2;
        text-decoration: none;
        font-size: 0.9rem;
    }
    .bottom-nav-more-overlay a:hover,
    .bottom-nav-more-overlay a.active {
        color: white;
        background: rgba(255,255,255,0.08);
    }

    /* Content needs bottom padding for bottom nav */
    .content {
        padding-bottom: 70px !important;
    }

    /* Header kompakter */
    .top-header {
        padding: 0.5rem 1rem;
        flex-wrap: wrap;
    }

    .header-logo {
        height: 34px;
        margin-right: 0.5rem;
    }

    .header-title {
        font-size: 1.1rem;
    }

    .header-subtitle {
        font-size: 0.7rem;
    }

    .header-user {
        gap: 0.4rem;
        margin-right: 0.5rem;
    }

    .header-user-name {
        font-size: 0.8rem;
    }

    .header-user-role {
        display: none;
    }

    .btn-logout {
        font-size: 0.7rem;
        padding: 0.2rem 0.5rem;
    }

    .nav-separator {
        display: none;
    }

    .sidebar-branding {
        padding: 0.4rem 0.75rem;
        justify-content: center;
        border-top: none;
        border-left: 1px solid rgba(255, 255, 255, 0.1);
    }

    /* Content weniger Padding */
    .content {
        padding: 0.75rem;
    }

    /* Wettkampf-Titel kleiner */
    .mobile-wettkampf-title {
        font-size: 0.95rem;
        margin-bottom: 0.5rem;
    }

    /* Teilnehmer-Auswahl auf Smartphone */
    .tn-ergebnis-item {
        padding: 0.6rem 0.75rem;
        gap: 0.5rem;
    }

    .tn-ergebnis-name {
        font-size: 0.95rem;
    }

    .tn-ausgewaehlt {
        flex-wrap: wrap;
        gap: 0.5rem;
    }

    .tn-ausgewaehlt-startnr {
        font-size: 1.1rem;
        padding: 0.4rem 0.6rem;
    }

    .tn-ausgewaehlt-name {
        font-size: 1rem;
    }

    .tn-aendern-btn {
        width: 100%;
    }

    /* Ring Grid: 3 Spalten auf Smartphone */
    .ring-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 0.5rem;
    }

    .ring-item label {
        font-size: 1rem;
        font-weight: 700;
    }

    .stepper-btn {
        font-size: 1.8rem;
        min-width: 52px;
        min-height: 60px;
    }

    .stepper-value {
        font-size: 1.6rem;
    }

    /* Score Summary kompakter */
    .score-summary {
        flex-direction: row;
        gap: 0.3rem;
    }

    .score-value {
        font-size: 1rem;
    }

    .score-label {
        font-size: 0.65rem;
    }

    /* Signature skalieren */
    .signature-container {
        overflow-x: auto;
    }

    /* Cards weniger Padding */
    .card-body {
        padding: 0.75rem;
    }

    /* Buttons volle Breite */
    .mobile-actions {
        flex-direction: column;
    }

    .mobile-actions .k-button {
        width: 100%;
        padding: 0.75rem;
        font-size: 1rem;
        min-height: 48px;
    }

    /* Grid: horizontales Scrollen ermoeglichen */
    .k-grid {
        font-size: 0.85rem;
    }

    /* Wettkampf-Karten auf Home */
    .wettkampf-liste .card-body {
        padding: 0.75rem;
    }

    .wettkampf-buttons {
        flex-direction: column;
        gap: 0.5rem;
    }

    .wettkampf-buttons .btn {
        width: 100%;
        padding: 0.6rem;
        text-align: center;
    }
}

/* Grid Toolbar Button Spacing */
.k-grid-toolbar .k-button + .k-button {
    margin-left: 0.5rem;
}

/* ===== KLEINES SMARTPHONE (max 480px) ===== */
@media (max-width: 480px) {
    /* Ring Grid: kleines Smartphone */
    .ring-grid {
        grid-template-columns: repeat(3, 1fr);
    }

    .stepper-btn {
        font-size: 2rem;
        min-width: 56px;
        min-height: 64px;
    }

    .stepper-value {
        font-size: 1.8rem;
    }

    h1 {
        font-size: 1.2rem;
    }

    h4 {
        font-size: 0.9rem;
    }

    h5 {
        font-size: 0.95rem;
    }
}

/* ===== VORLAGE-EDITOREN ===== */
.vorlage-editor {
    max-width: 900px;
}

.vorlage-section {
    border: 1px solid var(--rv-border);
    border-radius: 6px;
    padding: 1rem 1.25rem;
    margin-bottom: 1rem;
    background: var(--rv-white);
}

.vorlage-section legend {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--rv-primary);
    padding: 0 0.5rem;
    width: auto;
    float: none;
}

.vorlage-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 0.75rem 1.5rem;
}

.vorlage-field {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.vorlage-field > label {
    font-size: 0.8rem;
    font-weight: 500;
    color: var(--rv-secondary);
}

.vorlage-field small.text-muted {
    font-size: 0.72rem;
}

.vorlage-section .k-numerictextbox {
    min-width: 80px;
}

.color-input-group {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.color-preview {
    display: inline-block;
    width: 24px;
    height: 24px;
    border-radius: 4px;
    border: 1px solid var(--rv-border);
    flex-shrink: 0;
}

.vorlage-readonly {
    opacity: 0.7;
}

.vorlage-readonly .vorlage-section {
    background: var(--rv-light);
}

/* === PersonPicker & Lizenznummer === */

.tn-lizenz-badge {
    display: inline-block;
    background: #e8f4fd;
    color: var(--rv-primary);
    font-size: 0.75rem;
    font-weight: 600;
    padding: 0.1rem 0.5rem;
    border-radius: 10px;
    margin-left: 0.5rem;
    border: 1px solid #b8d8f0;
}

.tn-such-ergebnis-liste {
    max-height: 300px;
    overflow-y: auto;
    border: 1px solid var(--rv-border);
    border-radius: 8px;
    margin-bottom: 1rem;
}

/* ===== TeilnehmerDetail — Banner ===== */
.tn-banner {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: var(--rv-white);
    border-radius: 8px;
    padding: 0.75rem 1rem;
    margin-bottom: 0.75rem;
    box-shadow: 0 1px 4px rgba(0,0,0,0.08);
    border-left: 4px solid var(--rv-primary);
    gap: 1rem;
    flex-wrap: wrap;
}

.dark-mode .tn-banner {
    background: #1e2024;
    box-shadow: 0 1px 4px rgba(0,0,0,0.3);
}

.tn-banner-left {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    min-width: 0;
}

.tn-back-btn {
    flex-shrink: 0;
}

.tn-banner-name {
    font-size: 1.3rem;
    font-weight: 700;
    margin: 0;
    line-height: 1.2;
    color: var(--rv-primary);
}

.tn-banner-verein {
    font-size: 0.8rem;
    color: #666;
    line-height: 1.3;
}

.dark-mode .tn-banner-verein { color: #aaa; }

/* ===== Statistik-Boxen (im Banner) ===== */
.tn-stats-row {
    display: flex;
    align-items: center;
    gap: 0;
    flex-wrap: wrap;
}

.tn-stat-box {
    text-align: center;
    padding: 0.2rem 0.75rem;
}

.tn-stat-num {
    display: block;
    font-size: 1.15rem;
    font-weight: 700;
    color: var(--rv-primary);
    line-height: 1.2;
}

.tn-stat-txt {
    display: block;
    font-size: 0.62rem;
    color: #888;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    line-height: 1.3;
}

.tn-stat-divider {
    width: 1px;
    height: 28px;
    background: var(--rv-border);
    flex-shrink: 0;
}

.tn-stat-highlight .tn-stat-num {
    color: #d4920a;
}

.dark-mode .tn-stat-box .tn-stat-num { color: #6cb4e8; }
.dark-mode .tn-stat-highlight .tn-stat-num { color: #f0b840; }
.dark-mode .tn-stat-txt { color: #999; }
.dark-mode .tn-stat-divider { background: #444; }

/* ===== Kontaktdaten — Einklappbar ===== */
.tn-contact-section {
    background: var(--rv-white);
    border-radius: 8px;
    box-shadow: 0 1px 4px rgba(0,0,0,0.08);
    overflow: hidden;
}

.dark-mode .tn-contact-section {
    background: #1e2024;
    box-shadow: 0 1px 4px rgba(0,0,0,0.3);
}

.tn-collapse-toggle {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    width: 100%;
    padding: 0.6rem 1rem;
    background: none;
    border: none;
    cursor: pointer;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--rv-primary);
    text-align: left;
    transition: background-color 0.15s;
}

.tn-collapse-toggle:hover {
    background: rgba(0,82,134,0.05);
}

.dark-mode .tn-collapse-toggle { color: #6cb4e8; }
.dark-mode .tn-collapse-toggle:hover { background: rgba(108,180,232,0.08); }

.tn-collapse-icon {
    font-size: 0.65rem;
    transition: transform 0.2s;
}

.tn-contact-panel {
    padding: 0 1rem 0.75rem 1rem;
}

.tn-form-grid {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 0.4rem 0.75rem;
}

.tn-field-street { grid-column: 1 / 2; }
.tn-field-plz { grid-column: 2 / 3; }
.tn-field-ort { grid-column: 3 / 4; }
.tn-field-full { grid-column: 1 / -1; }

.tn-label {
    display: block;
    font-size: 0.72rem;
    font-weight: 600;
    color: #666;
    margin-bottom: 0.1rem;
    text-transform: uppercase;
    letter-spacing: 0.02em;
}

.dark-mode .tn-label { color: #999; }

.tn-form-actions {
    margin-top: 0.5rem;
    padding-top: 0.5rem;
    border-top: 1px solid var(--rv-border);
}

/* ===== Historie-Section ===== */
.tn-historie-section {
    margin-top: 0.5rem;
}

.tn-section-title {
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: var(--rv-secondary);
}

.dark-mode .tn-section-title { color: #ccc; }

.tn-media-btns {
    display: flex;
    gap: 0.15rem;
}

/* ===== Medien-Cards (Fotos/Signatur) ===== */
.tn-media-card {
    border-left: 3px solid var(--rv-primary);
    margin-top: 0.75rem;
}

.tn-signatur-preview {
    background: #fff;
    padding: 0.5rem;
    border-radius: 4px;
    display: inline-block;
    border: 1px solid var(--rv-border);
}

.tn-signatur-preview img {
    max-width: 350px;
    max-height: 150px;
}

.dark-mode .tn-signatur-preview {
    background: #f5f5f5;
}

/* ===== Responsive: Tablet ===== */
@media (max-width: 992px) {
    .tn-banner {
        flex-direction: column;
        align-items: flex-start;
    }
    .tn-stats-row {
        width: 100%;
        justify-content: flex-start;
    }
    .tn-form-grid {
        grid-template-columns: 1fr 1fr;
    }
    .tn-field-street { grid-column: 1 / -1; }
    .tn-field-plz { grid-column: 1 / 2; }
    .tn-field-ort { grid-column: 2 / 3; }
}

/* ===== Responsive: Smartphone ===== */
@media (max-width: 576px) {
    .tn-banner {
        padding: 0.5rem 0.75rem;
    }
    .tn-banner-name {
        font-size: 1.1rem;
    }
    .tn-stats-row {
        flex-wrap: wrap;
        gap: 0.25rem;
    }
    .tn-stat-box {
        padding: 0.15rem 0.4rem;
    }
    .tn-stat-divider {
        display: none;
    }
    .tn-form-grid {
        grid-template-columns: 1fr;
    }
    .tn-field-street,
    .tn-field-plz,
    .tn-field-ort {
        grid-column: auto;
    }
    .tn-signatur-preview img {
        max-width: 100%;
    }
}

/* ===== Dokument-Upload (Wettkampf) ===== */
.dokument-dropzone {
    border: 2px dashed var(--rv-border);
    border-radius: 8px;
    padding: 1.5rem;
    text-align: center;
    color: #999;
    background: var(--rv-light);
    transition: border-color 0.2s, background-color 0.2s;
    cursor: pointer;
}

.dokument-dropzone:hover {
    border-color: var(--rv-primary);
    color: var(--rv-primary);
}

.dokument-dropzone.drag-over {
    border-color: var(--rv-primary);
    background-color: #e3f2fd;
    color: var(--rv-primary);
}

.dokument-dropzone-icon {
    font-size: 2rem;
    margin-bottom: 0.5rem;
    display: block;
}

.dokument-liste {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.dokument-karte {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.6rem 0.75rem;
    border: 1px solid var(--rv-border);
    border-radius: 6px;
    background: var(--rv-white);
    transition: box-shadow 0.15s;
}

.dokument-karte:hover {
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.dokument-icon {
    font-size: 1.5rem;
    flex-shrink: 0;
    width: 32px;
    text-align: center;
}

.dokument-info {
    flex: 1;
    min-width: 0;
}

.dokument-name {
    font-weight: 600;
    font-size: 0.9rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.dokument-datum {
    font-size: 0.75rem;
    color: #888;
}

.dokument-aktionen {
    display: flex;
    gap: 0.25rem;
    flex-shrink: 0;
}

/* ===== DESIGN-SYSTEM UTILITIES (v3) ===== */

/* Form Container Breiten (ersetzt inline max-width) */
.form-container-sm  { max-width: 400px; }
.form-container-md  { max-width: 600px; }
.form-container-lg  { max-width: 900px; }

/* Section-Titel (einheitliches Heading-Pattern) */
.section-title {
    color: var(--rv-primary);
    font-weight: 700;
    font-size: 1.05rem;
    margin-bottom: 1rem;
}
.subsection-title {
    font-weight: 600;
    color: var(--rv-secondary);
    font-size: 0.95rem;
    margin-bottom: 0.75rem;
}

/* Page-Section Card (einheitliches Section-Pattern) */
.page-section {
    background: white;
    border: 1px solid var(--rv-border);
    border-left: 4px solid var(--rv-primary);
    border-radius: 6px;
    box-shadow: 0 1px 4px rgba(0,0,0,0.06);
    padding: 1.25rem;
    margin-bottom: 1.5rem;
}

/* Loading Skeleton Animation */
.skeleton {
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: skeleton-loading 1.5s infinite;
    border-radius: 4px;
}
@keyframes skeleton-loading {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}
.skeleton-text { height: 1rem; margin-bottom: 0.5rem; }
.skeleton-card { height: 120px; margin-bottom: 1rem; }
.skeleton-grid { height: 400px; }

/* Standblatt PDF Modal responsive */
.standblatt-modal {
    width: fit-content;
    max-width: 95vw;
    max-height: 95vh;
    background: #fff;
    border-radius: 8px;
    display: flex;
    flex-direction: column;
    box-shadow: 0 8px 32px rgba(0,0,0,0.3);
}
.standblatt-modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.75rem 1.25rem;
    border-bottom: 1px solid #ddd;
}
.standblatt-modal-header span {
    font-weight: 600;
    font-size: 1.05rem;
}
.standblatt-modal iframe {
    width: min(900px, 90vw);
    height: min(680px, 75vh);
    border: none;
    border-radius: 0 0 8px 8px;
}

/* Stepper/Wizard (SerieErfassen) */
.wizard-stepper {
    display: flex;
    justify-content: center;
    gap: 0;
    margin-bottom: 1.5rem;
    padding: 0.75rem 0;
}
.wizard-step {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.85rem;
    color: #999;
    font-weight: 500;
}
.wizard-step.active {
    color: var(--rv-primary);
    font-weight: 700;
}
.wizard-step.completed {
    color: #4caf50;
    font-weight: 600;
}
.wizard-step-number {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.8rem;
    font-weight: 700;
    background: #e0e0e0;
    color: #999;
    flex-shrink: 0;
}
.wizard-step.active .wizard-step-number {
    background: var(--rv-primary);
    color: white;
}
.wizard-step.completed .wizard-step-number {
    background: #4caf50;
    color: white;
}
.wizard-step-connector {
    width: 40px;
    height: 2px;
    background: #e0e0e0;
    margin: 0 0.25rem;
    flex-shrink: 0;
}
.wizard-step-connector.completed {
    background: #4caf50;
}

/* Dashboard Stats */
.dashboard-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 1rem;
    margin-bottom: 1.5rem;
}
.stat-card {
    background: white;
    border: 1px solid var(--rv-border);
    border-radius: 8px;
    padding: 1rem 1.25rem;
    text-align: center;
    box-shadow: 0 1px 4px rgba(0,0,0,0.06);
}
.stat-card-value {
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--rv-primary);
    line-height: 1.2;
}
.stat-card-label {
    font-size: 0.8rem;
    color: #666;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-top: 0.25rem;
}

/* Wettkampf Card Status Badge */
.wk-status-badge {
    display: inline-block;
    font-size: 0.72rem;
    font-weight: 600;
    padding: 0.15rem 0.5rem;
    border-radius: 10px;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}
.wk-status-badge.aktiv {
    background: #e8f5e9;
    color: #2e7d32;
}
.wk-status-badge.inaktiv {
    background: #fbe9e7;
    color: #bf360c;
}
.wk-progress {
    height: 4px;
    background: #e0e0e0;
    border-radius: 2px;
    margin-top: 0.5rem;
    overflow: hidden;
}
.wk-progress-bar {
    height: 100%;
    background: var(--rv-primary);
    border-radius: 2px;
    transition: width 0.3s ease;
}

/* Breadcrumb Navigation */
.breadcrumb-nav {
    font-size: 0.85rem;
    color: #666;
    margin-bottom: 1rem;
    padding: 0.5rem 0;
}
.breadcrumb-nav a {
    color: var(--rv-primary);
    text-decoration: none;
}
.breadcrumb-nav a:hover {
    text-decoration: underline;
}
.breadcrumb-nav .separator {
    margin: 0 0.4rem;
    color: #999;
}
.breadcrumb-nav .current {
    color: var(--rv-text);
    font-weight: 500;
}

/* Sidebar Collapse */
.sidebar-toggle {
    background: rgba(255,255,255,0.1);
    border: 1px solid rgba(255,255,255,0.2);
    color: rgba(255,255,255,0.7);
    width: 32px;
    height: 32px;
    border-radius: 4px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    padding: 0;
    flex-shrink: 0;
}
.sidebar-toggle:hover {
    background: rgba(255,255,255,0.2);
    color: white;
}
.sidebar-collapsed .sidebar {
    width: 56px;
    overflow: hidden;
}
.sidebar-collapsed .sidebar .nav-link span,
.sidebar-collapsed .sidebar .nav-separator {
    display: none;
}
.sidebar-collapsed .sidebar .nav-link {
    padding: 0.85rem;
    text-align: center;
    border-left: none;
}
.sidebar-collapsed .sidebar .sidebar-branding span,
.sidebar-collapsed .sidebar .sidebar-branding-version {
    display: none;
}
.sidebar .nav-link .nav-icon {
    flex-shrink: 0;
    width: 20px;
    height: 20px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}
.nav-link {
    display: flex !important;
    align-items: center;
    gap: 0.6rem;
}

/* Mobile Bottom Navigation */
.bottom-nav {
    display: none;
}

/* Grid responsive heights */
.k-grid {
    max-height: calc(100vh - 250px);
    min-height: 300px;
}

/* Mobile Card View toggle */
.mobile-card-view {
    display: none;
}
.mobile-card-item {
    background: white;
    border: 1px solid var(--rv-border);
    border-radius: 8px;
    padding: 0.75rem 1rem;
    margin-bottom: 0.5rem;
    box-shadow: 0 1px 3px rgba(0,0,0,0.04);
}
.mobile-card-item-header {
    font-weight: 600;
    margin-bottom: 0.25rem;
}
.mobile-card-item-details {
    font-size: 0.85rem;
    color: #666;
}
.mobile-card-item-actions {
    display: flex;
    gap: 0.5rem;
    margin-top: 0.5rem;
    justify-content: flex-end;
}

/* ===== DARK MODE ===== */

/* System preference detection */
@media (prefers-color-scheme: dark) {
    html:not(.light-mode) {
        --rv-light: #1a1a2e;
        --rv-white: #16213e;
        --rv-text: #e0e0e0;
        --rv-border: #2a2a4a;
        --rv-secondary: #1a1a2e;
    }
    html:not(.light-mode) body { background-color: #1a1a2e; color: #e0e0e0; }
    html:not(.light-mode) .card,
    html:not(.light-mode) .page-section { background: #16213e; border-color: #2a2a4a; }
    html:not(.light-mode) .top-header { background: linear-gradient(135deg, #003050, #001830); }
    html:not(.light-mode) .sidebar { background-color: #0d1117; }
    html:not(.light-mode) .content { background-color: #1a1a2e; }
    html:not(.light-mode) .login-card { background: #16213e; border-color: #2a2a4a; }
    html:not(.light-mode) .rechte-kategorie { background-color: #0d1525; border-color: #2a2a4a; }
    html:not(.light-mode) .stat-card { background: #16213e; border-color: #2a2a4a; }
    html:not(.light-mode) .mobile-card-item { background: #16213e; border-color: #2a2a4a; }
    html:not(.light-mode) .standblatt-modal { background: #16213e; }
    html:not(.light-mode) .skeleton { background: linear-gradient(90deg, #1a1a2e 25%, #2a2a4a 50%, #1a1a2e 75%); background-size: 200% 100%; }
    html:not(.light-mode) .bottom-nav { background: #0d1117; }
    html:not(.light-mode) .form-label { color: #b0b8c0; }
    html:not(.light-mode) h4, html:not(.light-mode) h5 { color: #b0b8c0; }
    html:not(.light-mode) .alert-info { background-color: #0d253e; border-color: #1a3a5c; color: #90caf9; }
    html:not(.light-mode) .alert-success { background-color: #0d2e0d; border-color: #1a4a1a; color: #81c784; }
    html:not(.light-mode) .alert-danger { background-color: #2e0d0d; border-color: #4a1a1a; color: #ef9a9a; }
}

/* Manual dark mode toggle class */
html.dark-mode {
    --rv-light: #1a1a2e;
    --rv-white: #16213e;
    --rv-text: #e0e0e0;
    --rv-border: #2a2a4a;
    --rv-secondary: #1a1a2e;
}
html.dark-mode body { background-color: #1a1a2e; color: #e0e0e0; }
html.dark-mode .card,
html.dark-mode .page-section { background: #16213e; border-color: #2a2a4a; }
html.dark-mode .top-header { background: linear-gradient(135deg, #003050, #001830); }
html.dark-mode .sidebar { background-color: #0d1117; }
html.dark-mode .content { background-color: #1a1a2e; }
html.dark-mode .login-card { background: #16213e; border-color: #2a2a4a; }
html.dark-mode .rechte-kategorie { background-color: #0d1525; border-color: #2a2a4a; }
html.dark-mode .stat-card { background: #16213e; border-color: #2a2a4a; }
html.dark-mode .mobile-card-item { background: #16213e; border-color: #2a2a4a; }
html.dark-mode .standblatt-modal { background: #16213e; }
html.dark-mode .skeleton { background: linear-gradient(90deg, #1a1a2e 25%, #2a2a4a 50%, #1a1a2e 75%); background-size: 200% 100%; }
html.dark-mode .bottom-nav { background: #0d1117; }
html.dark-mode .form-label { color: #b0b8c0; }
html.dark-mode h4, html.dark-mode h5 { color: #b0b8c0; }
html.dark-mode .alert-info { background-color: #0d253e; border-color: #1a3a5c; color: #90caf9; }
html.dark-mode .alert-success { background-color: #0d2e0d; border-color: #1a4a1a; color: #81c784; }
html.dark-mode .alert-danger { background-color: #2e0d0d; border-color: #4a1a1a; color: #ef9a9a; }

/* Dark mode toggle button in header */
.dark-mode-toggle {
    background: rgba(255,255,255,0.1);
    border: 1px solid rgba(255,255,255,0.2);
    color: rgba(255,255,255,0.7);
    width: 32px;
    height: 32px;
    border-radius: 4px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    padding: 0;
    font-size: 1rem;
}
.dark-mode-toggle:hover {
    background: rgba(255,255,255,0.2);
    color: white;
}

/* ======================================
   Erfasser-Modus: Tablet/Smartphone-optimiert
   ====================================== */
.erfasser-modus .mobile-wettkampf-title {
    font-size: 1rem;
    margin-bottom: 0.5rem;
}

.erfasser-modus .erfassung-fortschritt {
    padding: 0.4rem 0.6rem;
    margin-bottom: 0.5rem;
}

.erfasser-modus .card {
    margin-bottom: 0.5rem !important;
}

.erfasser-modus .card-body {
    padding: 0.6rem;
}

.erfasser-modus .ring-grid {
    grid-template-columns: repeat(4, 1fr);
    gap: 0.4rem;
}

.erfasser-modus .ring-item label {
    font-size: 0.9rem;
    font-weight: 700;
}

.erfasser-modus .stepper-btn {
    width: 52px;
    height: 52px;
    font-size: 1.5rem;
    border-radius: 10px;
    -webkit-tap-highlight-color: transparent;
    touch-action: manipulation;
    user-select: none;
}

.erfasser-modus .stepper-value {
    font-size: 1.4rem;
    min-width: 40px;
    font-weight: 700;
}

.erfasser-modus .score-summary {
    gap: 0.5rem;
}

.erfasser-modus .score-item {
    padding: 0.5rem;
}

.erfasser-modus .score-label {
    font-size: 0.8rem;
}

.erfasser-modus .score-value {
    font-size: 1.3rem;
}

.erfasser-modus .btn-mobile-submit {
    font-size: 1.2rem;
    padding: 0.75rem 1.5rem;
    min-height: 52px;
    touch-action: manipulation;
}

.erfasser-modus .btn-mobile-reset {
    min-height: 44px;
    touch-action: manipulation;
}

.erfasser-modus .tn-ausgewaehlt-startnr {
    font-size: 1.6rem;
    width: 52px;
    height: 52px;
}

.erfasser-modus .tn-aendern-btn {
    min-height: 44px;
    touch-action: manipulation;
}

.erfasser-modus .tn-suche-input input {
    font-size: 1.1rem;
    min-height: 44px;
}

.erfasser-modus .tn-ergebnis-item {
    padding: 0.6rem 0.75rem;
    min-height: 48px;
}

.erfasser-modus .stepper-startnr .stepper-btn {
    width: 44px;
    height: 44px;
}

.erfasser-modus .stepper-input {
    width: 72px;
    font-size: 1.5rem;
    min-height: 44px;
}

.erfasser-modus .signature-container {
    max-width: 100%;
    overflow: hidden;
}

.erfasser-modus .foto-galerie {
    gap: 0.5rem;
}

/* ======================================
   Modus Tablet 11" (Samsung Galaxy Tab A9)
   ====================================== */
.modus-tablet .ring-grid {
    grid-template-columns: repeat(4, 1fr);
    gap: 0.5rem;
}

.modus-tablet .stepper-btn {
    width: 52px;
    height: 52px;
}

.modus-tablet .stepper-value {
    font-size: 1.4rem;
}

.modus-tablet .signature-container,
.modus-tablet .foto-galerie-wrapper {
    display: inline-block;
    vertical-align: top;
    width: 48%;
}

.modus-tablet .row > .col-12.col-md-6 {
    flex: 0 0 50%;
    max-width: 50%;
}

/* ======================================
   Modus Smartphone
   ====================================== */
.modus-smartphone .ring-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 0.4rem;
}

.modus-smartphone .stepper-btn {
    width: 48px;
    height: 48px;
    font-size: 1.4rem;
    border-radius: 10px;
}

.modus-smartphone .stepper-value {
    font-size: 1.5rem;
    min-width: 32px;
}

.modus-smartphone .card-body {
    padding: 0.4rem;
}

.modus-smartphone .score-summary {
    gap: 0.3rem;
}

.modus-smartphone .score-item {
    padding: 0.4rem;
}

.modus-smartphone .score-label {
    font-size: 0.75rem;
}

.modus-smartphone .score-value {
    font-size: 1.2rem;
}

.modus-smartphone .row > .col-12.col-md-6 {
    flex: 0 0 100%;
    max-width: 100%;
}

.modus-smartphone .signature-container {
    max-width: 100%;
    overflow: hidden;
}

.modus-smartphone .signature-container .k-signature {
    max-width: 100%;
}

.modus-smartphone .signature-container canvas {
    max-width: 100%;
    height: auto;
}

.modus-smartphone .vorhandenes-ergebnis-ring-row {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0.2rem;
    font-size: 0.8rem;
}

.modus-smartphone .erfassung-fortschritt {
    flex-direction: column;
    gap: 0.3rem;
    align-items: stretch;
}

.modus-smartphone .fortschritt-text {
    text-align: center;
}

.modus-smartphone .row > .col-6 {
    flex: 0 0 100%;
    max-width: 100%;
}

.modus-smartphone .btn-mobile-submit {
    font-size: 1.3rem;
    padding: 0.8rem 1.5rem;
    min-height: 56px;
}

/* ===== PUBLIC PAGES (Live Board, Results, Feedback) ===== */

.public-page {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

.public-header {
    background: linear-gradient(135deg, var(--rv-primary) 0%, var(--rv-primary-dark) 100%);
    color: var(--rv-white);
    padding: 0.6rem 1.5rem;
    display: flex;
    align-items: center;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
    z-index: 100;
}

.public-header-actions {
    margin-left: auto;
}

.public-main {
    flex: 1;
    padding: 1.5rem 2rem;
    max-width: 1200px;
    width: 100%;
    margin: 0 auto;
    box-sizing: border-box;
}

/* Live Board Tiles */
.live-tile-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 1.25rem;
    margin-bottom: 1.5rem;
}

.live-tile {
    background: var(--rv-white);
    border: 1px solid var(--rv-border);
    border-radius: 10px;
    padding: 1.5rem;
    text-align: center;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
    transition: box-shadow 0.2s ease, transform 0.2s ease;
}

.live-tile:hover {
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.12);
    transform: translateY(-2px);
}

.live-tile-icon {
    font-size: 2rem;
    margin-bottom: 0.5rem;
    display: block;
}

.live-tile-value {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--rv-primary);
    line-height: 1.2;
}

.live-tile-label {
    font-size: 0.85rem;
    color: #666;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-top: 0.3rem;
}

.live-tile-detail {
    font-size: 0.85rem;
    color: #888;
    margin-top: 0.25rem;
}

.live-tile-name {
    font-size: 1rem;
    font-weight: 600;
    color: var(--rv-text);
    margin-top: 0.25rem;
}

.live-wettkampf-header {
    text-align: center;
    margin-bottom: 1.5rem;
}

.live-wettkampf-header h1 {
    margin-bottom: 0.25rem;
}

.live-wettkampf-meta {
    color: #666;
    font-size: 0.95rem;
}

.live-refresh-info {
    text-align: center;
    font-size: 0.8rem;
    color: #999;
    margin-top: 1rem;
}

/* Recent Series Table */
.live-recent-section {
    margin-top: 1.5rem;
}

.live-recent-section h4 {
    margin-bottom: 0.75rem;
}

/* Feedback Form */
.feedback-form {
    max-width: 500px;
    margin: 0 auto;
    text-align: center;
}

.feedback-form h1 {
    margin-bottom: 0.5rem;
}

.feedback-subtitle {
    color: #666;
    margin-bottom: 2rem;
    font-size: 1rem;
}

.feedback-thumbs {
    display: flex;
    gap: 1.5rem;
    justify-content: center;
    margin-bottom: 2rem;
}

.feedback-btn-positive,
.feedback-btn-negative {
    width: 120px;
    height: 120px;
    border-radius: 16px;
    border: 3px solid transparent;
    font-size: 3rem;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.feedback-btn-positive {
    background: #e8f5e9;
    color: #2e7d32;
}

.feedback-btn-positive:hover,
.feedback-btn-positive.selected {
    background: #c8e6c9;
    border-color: #4caf50;
    transform: scale(1.05);
}

.feedback-btn-negative {
    background: #ffebee;
    color: #c62828;
}

.feedback-btn-negative:hover,
.feedback-btn-negative.selected {
    background: #ffcdd2;
    border-color: #ef5350;
    transform: scale(1.05);
}

.feedback-optional {
    text-align: left;
    margin-bottom: 1.5rem;
}

.feedback-optional label {
    display: block;
    font-weight: 500;
    font-size: 0.9rem;
    color: var(--rv-secondary);
    margin-bottom: 0.3rem;
}

.feedback-optional input,
.feedback-optional textarea {
    width: 100%;
    padding: 0.6rem 0.75rem;
    border: 1px solid var(--rv-border);
    border-radius: 6px;
    font-size: 0.95rem;
    font-family: inherit;
    box-sizing: border-box;
}

.feedback-optional textarea {
    min-height: 80px;
    resize: vertical;
}

.feedback-submit-btn {
    width: 100%;
    padding: 0.75rem;
    font-size: 1.1rem;
    font-weight: 600;
    border-radius: 8px;
    border: none;
    background: var(--rv-primary);
    color: white;
    cursor: pointer;
    transition: background 0.2s;
}

.feedback-submit-btn:hover {
    background: var(--rv-primary-dark);
}

.feedback-submit-btn:disabled {
    background: #ccc;
    cursor: not-allowed;
}

.feedback-success {
    text-align: center;
    padding: 3rem 1rem;
}

.feedback-success-icon {
    font-size: 4rem;
    color: #4caf50;
    margin-bottom: 1rem;
    display: block;
}

.feedback-success h2 {
    color: var(--rv-primary);
    margin-bottom: 0.5rem;
}

/* Feedback Summary Cards (Admin) */
.feedback-summary {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.feedback-summary-card {
    background: var(--rv-white);
    border: 1px solid var(--rv-border);
    border-radius: 8px;
    padding: 1rem;
    text-align: center;
}

.feedback-summary-value {
    font-size: 2rem;
    font-weight: 700;
    line-height: 1.2;
}

.feedback-summary-value.positive { color: #2e7d32; }
.feedback-summary-value.negative { color: #c62828; }
.feedback-summary-value.total { color: var(--rv-primary); }

.feedback-summary-label {
    font-size: 0.8rem;
    color: #666;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-top: 0.25rem;
}

/* Public Not Found */
.public-not-found {
    text-align: center;
    padding: 4rem 1rem;
}

.public-not-found-icon {
    font-size: 4rem;
    margin-bottom: 1rem;
    display: block;
}

/* Dark Mode for Public Pages — manual toggle */
html.dark-mode .live-tile { background: #16213e; border-color: #2a2a4a; }
html.dark-mode .live-tile-label { color: #b0b8c0; }
html.dark-mode .live-tile-detail { color: #888; }
html.dark-mode .live-tile-name { color: #e0e0e0; }
html.dark-mode .live-wettkampf-meta { color: #b0b8c0; }
html.dark-mode .feedback-btn-positive { background: #0d2e0d; color: #81c784; }
html.dark-mode .feedback-btn-positive:hover,
html.dark-mode .feedback-btn-positive.selected { background: #1a4a1a; border-color: #4caf50; }
html.dark-mode .feedback-btn-negative { background: #2e0d0d; color: #ef9a9a; }
html.dark-mode .feedback-btn-negative:hover,
html.dark-mode .feedback-btn-negative.selected { background: #4a1a1a; border-color: #ef5350; }
html.dark-mode .feedback-optional input,
html.dark-mode .feedback-optional textarea { background: #1a1a2e; border-color: #2a2a4a; color: #e0e0e0; }
html.dark-mode .feedback-subtitle { color: #b0b8c0; }
html.dark-mode .feedback-summary-card { background: #16213e; border-color: #2a2a4a; }
html.dark-mode .feedback-summary-label { color: #b0b8c0; }

/* Dark Mode for Public Pages — system preference */
@media (prefers-color-scheme: dark) {
    html:not(.light-mode) .live-tile { background: #16213e; border-color: #2a2a4a; }
    html:not(.light-mode) .live-tile-label { color: #b0b8c0; }
    html:not(.light-mode) .live-tile-detail { color: #888; }
    html:not(.light-mode) .live-tile-name { color: #e0e0e0; }
    html:not(.light-mode) .live-wettkampf-meta { color: #b0b8c0; }
    html:not(.light-mode) .feedback-btn-positive { background: #0d2e0d; color: #81c784; }
    html:not(.light-mode) .feedback-btn-positive:hover,
    html:not(.light-mode) .feedback-btn-positive.selected { background: #1a4a1a; border-color: #4caf50; }
    html:not(.light-mode) .feedback-btn-negative { background: #2e0d0d; color: #ef9a9a; }
    html:not(.light-mode) .feedback-btn-negative:hover,
    html:not(.light-mode) .feedback-btn-negative.selected { background: #4a1a1a; border-color: #ef5350; }
    html:not(.light-mode) .feedback-optional input,
    html:not(.light-mode) .feedback-optional textarea { background: #1a1a2e; border-color: #2a2a4a; color: #e0e0e0; }
    html:not(.light-mode) .feedback-subtitle { color: #b0b8c0; }
    html:not(.light-mode) .feedback-summary-card { background: #16213e; border-color: #2a2a4a; }
    html:not(.light-mode) .feedback-summary-label { color: #b0b8c0; }
}

@media (max-width: 768px) {
    .public-main { padding: 0.75rem; }
    .live-tile-grid { grid-template-columns: repeat(2, 1fr); gap: 0.75rem; }
    .live-tile { padding: 1rem; }
    .live-tile-value { font-size: 1.8rem; }
    .feedback-thumbs { gap: 1rem; }
    .feedback-btn-positive,
    .feedback-btn-negative { width: 100px; height: 100px; font-size: 2.5rem; }
    .feedback-summary { grid-template-columns: 1fr; }
}

@media (max-width: 480px) {
    .live-tile-grid { grid-template-columns: 1fr 1fr; gap: 0.5rem; }
    .live-tile-value { font-size: 1.5rem; }
    .live-tile-label { font-size: 0.75rem; }
}

/* ===== Ampel System ===== */

/* AmpelSchalten Page — 3 grosse Buttons */
.ampel-schalten-buttons {
    display: flex;
    gap: 1.5rem;
    justify-content: center;
    padding: 1rem 0;
}

.ampel-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.75rem;
    padding: 1.5rem 2rem;
    border: 3px solid transparent;
    border-radius: 16px;
    background: var(--rv-white, #fff);
    cursor: pointer;
    transition: all 0.2s ease;
    min-width: 120px;
}

.ampel-btn-dot {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    display: block;
    box-shadow: 0 0 12px rgba(0,0,0,0.15);
}

.ampel-btn-label {
    font-size: 1.1rem;
    font-weight: 600;
    color: #333;
}

.ampel-btn-active {
    opacity: 1;
    transform: scale(1.08);
    border-color: #333;
    box-shadow: 0 4px 20px rgba(0,0,0,0.15);
}

.ampel-btn-dimmed {
    opacity: 0.35;
}

.ampel-btn-dimmed:hover {
    opacity: 0.7;
}

/* Header Ampel Dots */
.header-ampel-container {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-right: 0.75rem;
}

.header-ampel-item {
    display: flex;
    align-items: center;
    gap: 0.35rem;
    text-decoration: none;
    color: inherit;
}

a.header-ampel-item:hover {
    opacity: 0.8;
}

.header-ampel-dot {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    display: inline-block;
    box-shadow: 0 0 6px rgba(0,0,0,0.2);
    flex-shrink: 0;
}

.header-ampel-name {
    font-size: 0.9rem;
    font-weight: 600;
    color: rgba(255,255,255,0.9);
    white-space: nowrap;
}

/* LiveBoard Ampel Tile */
.ampel-tile {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.ampel-tile-dot {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    display: block;
    box-shadow: 0 0 16px rgba(0,0,0,0.2);
}

.ampel-tile-label {
    font-size: 1.2rem;
    font-weight: 700;
    color: #333;
}

/* SerieErfassen — Kompakte Ampel Buttons */
.ampel-kompakt {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 0.75rem;
    justify-content: center;
}

.ampel-kompakt-btn {
    padding: 0.4rem 1rem;
    border: 2px solid var(--ampel-color);
    border-radius: 20px;
    background: transparent;
    color: var(--ampel-color);
    font-weight: 600;
    font-size: 0.85rem;
    cursor: pointer;
    transition: all 0.15s ease;
}

.ampel-kompakt-active {
    background: var(--ampel-color);
    color: #fff;
    box-shadow: 0 2px 8px rgba(0,0,0,0.15);
}

.ampel-kompakt-dimmed {
    opacity: 0.4;
}

.ampel-kompakt-dimmed:hover {
    opacity: 0.7;
}

/* Dark Mode — Ampel */
html.dark-mode .ampel-btn { background: #16213e; }
html.dark-mode .ampel-btn-label { color: #e0e0e0; }
html.dark-mode .ampel-btn-active { border-color: #e0e0e0; }
html.dark-mode .ampel-tile-label { color: #e0e0e0; }
html.dark-mode .ampel-kompakt-btn { color: var(--ampel-color); }
html.dark-mode .ampel-kompakt-active { color: #fff; }

@media (prefers-color-scheme: dark) {
    html:not(.light-mode) .ampel-btn { background: #16213e; }
    html:not(.light-mode) .ampel-btn-label { color: #e0e0e0; }
    html:not(.light-mode) .ampel-btn-active { border-color: #e0e0e0; }
    html:not(.light-mode) .ampel-tile-label { color: #e0e0e0; }
    html:not(.light-mode) .ampel-kompakt-btn { color: var(--ampel-color); }
    html:not(.light-mode) .ampel-kompakt-active { color: #fff; }
}

@media (max-width: 600px) {
    .ampel-schalten-buttons { gap: 0.75rem; }
    .ampel-btn { padding: 1rem 1.25rem; min-width: 90px; }
    .ampel-btn-dot { width: 45px; height: 45px; }
    .ampel-btn-label { font-size: 0.9rem; }
    .header-ampel-name { font-size: 0.75rem; }
}

/* ===== Veranstaltungs-Logbuch (v8.1.0) ===== */

.logbuch-dialog {
    padding: 0.5rem 0.25rem;
}

.logbuch-dialog .form-control-lg {
    font-size: 1.1rem;
    padding: 0.6rem 0.85rem;
}

.logbuch-dialog .form-label {
    font-size: 0.9rem;
    margin-bottom: 0.35rem;
    color: var(--rv-primary);
}

.logbuch-dialog textarea.form-control {
    font-size: 0.95rem;
    line-height: 1.5;
}

html.dark-mode .logbuch-dialog .form-label { color: #60a5fa; }

.logbuch-kassen-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.logbuch-kasse-card {
    background: var(--rv-white);
    border: 1px solid var(--rv-border);
    border-radius: 8px;
    padding: 1rem;
    box-shadow: 0 1px 3px rgba(0,0,0,0.06);
}

.logbuch-kasse-titel {
    font-weight: 700;
    font-size: 0.95rem;
    margin-bottom: 0.5rem;
    color: var(--rv-primary);
}

.logbuch-kasse-zeile {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.15rem 0;
    font-size: 0.9rem;
}

.logbuch-kasse-saldo {
    border-top: 1px solid var(--rv-border);
    margin-top: 0.3rem;
    padding-top: 0.3rem;
}

.logbuch-gesamt-card {
    background: linear-gradient(135deg, var(--rv-primary) 0%, var(--rv-primary-dark) 100%);
    color: #fff;
    border: none;
}

.logbuch-gesamt-card .logbuch-kasse-titel {
    color: #fff;
}

.logbuch-gesamt-card .logbuch-kasse-saldo {
    border-top-color: rgba(255,255,255,0.3);
}

.logbuch-betrag-einnahme { color: #2e7d32; font-weight: 600; }
.logbuch-betrag-ausgabe { color: #c62828; font-weight: 600; }

.logbuch-gesamt-card .logbuch-betrag-einnahme { color: #a5d6a7; }
.logbuch-gesamt-card .logbuch-betrag-ausgabe { color: #ef9a9a; }

.logbuch-badge {
    display: inline-block;
    padding: 0.15rem 0.5rem;
    border-radius: 4px;
    font-size: 0.8rem;
    font-weight: 600;
    white-space: nowrap;
}

/* Status-Badges */
.logbuch-status-offen { background: #e3f2fd; color: #1565c0; }
.logbuch-status-inbearbeitung { background: #fff8e1; color: #f57f17; }
.logbuch-status-erledigt { background: #e8f5e9; color: #2e7d32; }
.logbuch-status-umgesetzt { background: #e8f5e9; color: #2e7d32; }
.logbuch-status-abgelehnt { background: #fbe9e7; color: #c62828; }

/* Kategorie-Badges */
.logbuch-kat-planung { background: #ede7f6; color: #4527a0; }
.logbuch-kat-aufgabe { background: #fff3e0; color: #e65100; }
.logbuch-kat-allgemein { background: #eceff1; color: #37474f; }

/* Prioritaet-Badges */
.logbuch-prio-niedrig { background: #e8f5e9; color: #2e7d32; }
.logbuch-prio-normal { background: #e3f2fd; color: #1565c0; }
.logbuch-prio-hoch { background: #fbe9e7; color: #c62828; }

/* Art-Badges */
.logbuch-art-einnahme { background: #e8f5e9; color: #2e7d32; }
.logbuch-art-ausgabe { background: #fbe9e7; color: #c62828; }

/* Dark-Mode Overrides */
html.dark-mode .logbuch-kasse-card { background: #1e293b; border-color: #334155; }
html.dark-mode .logbuch-kasse-titel { color: #60a5fa; }
html.dark-mode .logbuch-kasse-saldo { border-top-color: #334155; }
html.dark-mode .logbuch-betrag-einnahme { color: #4caf50; }
html.dark-mode .logbuch-betrag-ausgabe { color: #ef5350; }
html.dark-mode .logbuch-status-offen { background: #1e3a5f; color: #64b5f6; }
html.dark-mode .logbuch-status-inbearbeitung { background: #3e2723; color: #ffb74d; }
html.dark-mode .logbuch-status-erledigt { background: #1b5e20; color: #81c784; }
html.dark-mode .logbuch-status-umgesetzt { background: #1b5e20; color: #81c784; }
html.dark-mode .logbuch-status-abgelehnt { background: #4a1111; color: #ef9a9a; }
html.dark-mode .logbuch-kat-planung { background: #311b92; color: #b39ddb; }
html.dark-mode .logbuch-kat-aufgabe { background: #3e2723; color: #ffcc80; }
html.dark-mode .logbuch-kat-allgemein { background: #263238; color: #b0bec5; }
html.dark-mode .logbuch-prio-niedrig { background: #1b5e20; color: #81c784; }
html.dark-mode .logbuch-prio-normal { background: #1e3a5f; color: #64b5f6; }
html.dark-mode .logbuch-prio-hoch { background: #4a1111; color: #ef9a9a; }
html.dark-mode .logbuch-art-einnahme { background: #1b5e20; color: #81c784; }
html.dark-mode .logbuch-art-ausgabe { background: #4a1111; color: #ef9a9a; }
html.dark-mode .logbuch-gesamt-card .logbuch-betrag-einnahme { color: #a5d6a7; }
html.dark-mode .logbuch-gesamt-card .logbuch-betrag-ausgabe { color: #ef9a9a; }

/* Inline-Formulare (Notizen, Verbesserungen, Finanzen) */
.logbuch-inline-form {
    background: var(--rv-white);
    border: 1px solid var(--rv-border);
    border-radius: 8px;
    padding: 1rem 1.25rem;
    box-shadow: 0 1px 4px rgba(0,0,0,0.06);
    max-width: 750px;
    width: 100%;
}

.logbuch-inline-form-header {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: 700;
    font-size: 1.05rem;
    color: var(--rv-primary);
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid var(--rv-border);
}

.logbuch-inline-form .form-label {
    font-size: 0.85rem;
    margin-bottom: 0.25rem;
    color: var(--rv-primary);
}

.logbuch-inline-form .form-control,
.logbuch-inline-form .form-select {
    width: 100%;
    box-sizing: border-box;
}

.logbuch-inline-form textarea.form-control {
    font-size: 0.95rem;
    line-height: 1.5;
    width: 100% !important;
    min-width: 100%;
    max-width: 100%;
    resize: vertical;
}

.logbuch-inline-form-actions {
    display: flex;
    justify-content: flex-end;
    gap: 0.5rem;
    padding-top: 0.75rem;
    border-top: 1px solid var(--rv-border);
}

html.dark-mode .logbuch-inline-form { background: #1e293b; border-color: #334155; }
html.dark-mode .logbuch-inline-form-header { color: #60a5fa; border-bottom-color: #334155; }
html.dark-mode .logbuch-inline-form .form-label { color: #60a5fa; }
html.dark-mode .logbuch-inline-form-actions { border-top-color: #334155; }

/* Beleg Upload */
.logbuch-beleg-upload-card {
    background: var(--rv-white);
    border: 1px solid var(--rv-border);
    border-radius: 10px;
    padding: 1.25rem;
    margin-bottom: 1.5rem;
    box-shadow: 0 1px 4px rgba(0,0,0,0.06);
}

.logbuch-beleg-upload-header {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: 700;
    font-size: 1.05rem;
    color: var(--rv-primary);
    margin-bottom: 1rem;
}

.logbuch-dropzone {
    border: 2px dashed var(--rv-border);
    border-radius: 8px;
    padding: 2rem 1rem;
    text-align: center;
    transition: border-color 0.2s, background 0.2s;
    cursor: pointer;
    margin-bottom: 0.75rem;
    min-height: 100px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.logbuch-dropzone:hover {
    border-color: var(--rv-primary);
    background: rgba(0,82,134,0.03);
}

.logbuch-dropzone.drag-over {
    border-color: var(--rv-primary);
    background: rgba(0,82,134,0.08);
    border-style: solid;
}

.logbuch-dropzone.logbuch-dropzone-has-file {
    border-color: #2e7d32;
    background: #f1f8e9;
    border-style: solid;
}

.logbuch-dropzone-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.35rem;
    color: #999;
}

.logbuch-dropzone-text {
    font-size: 0.95rem;
    font-weight: 600;
    color: #666;
}

.logbuch-dropzone-hint {
    font-size: 0.8rem;
    color: #aaa;
}

.logbuch-dropzone-preview {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.logbuch-dropzone-file-info {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.logbuch-dropzone-filename {
    font-weight: 600;
    font-size: 0.95rem;
    color: #2e7d32;
    max-width: 300px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.logbuch-dropzone-remove {
    background: none;
    border: none;
    font-size: 1.3rem;
    color: #c62828;
    cursor: pointer;
    padding: 0 0.25rem;
    line-height: 1;
}

.logbuch-dropzone-remove:hover {
    color: #b71c1c;
}

.logbuch-beleg-actions {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

/* Dark-Mode: Beleg Upload */
html.dark-mode .logbuch-beleg-upload-card { background: #1e293b; border-color: #334155; }
html.dark-mode .logbuch-beleg-upload-header { color: #60a5fa; }
html.dark-mode .logbuch-dropzone { border-color: #334155; }
html.dark-mode .logbuch-dropzone:hover { border-color: #60a5fa; background: rgba(96,165,250,0.06); }
html.dark-mode .logbuch-dropzone.drag-over { border-color: #60a5fa; background: rgba(96,165,250,0.12); }
html.dark-mode .logbuch-dropzone.logbuch-dropzone-has-file { border-color: #4caf50; background: rgba(76,175,80,0.1); }
html.dark-mode .logbuch-dropzone-text { color: #94a3b8; }
html.dark-mode .logbuch-dropzone-hint { color: #64748b; }
html.dark-mode .logbuch-dropzone-filename { color: #81c784; }
html.dark-mode .logbuch-dropzone-remove { color: #ef5350; }

@media (prefers-color-scheme: dark) {
    html:not(.light-mode) .logbuch-kasse-card { background: #1e293b; border-color: #334155; }
    html:not(.light-mode) .logbuch-kasse-titel { color: #60a5fa; }
    html:not(.light-mode) .logbuch-kasse-saldo { border-top-color: #334155; }
    html:not(.light-mode) .logbuch-betrag-einnahme { color: #4caf50; }
    html:not(.light-mode) .logbuch-betrag-ausgabe { color: #ef5350; }
    html:not(.light-mode) .logbuch-status-offen { background: #1e3a5f; color: #64b5f6; }
    html:not(.light-mode) .logbuch-status-inbearbeitung { background: #3e2723; color: #ffb74d; }
    html:not(.light-mode) .logbuch-status-erledigt { background: #1b5e20; color: #81c784; }
    html:not(.light-mode) .logbuch-status-umgesetzt { background: #1b5e20; color: #81c784; }
    html:not(.light-mode) .logbuch-status-abgelehnt { background: #4a1111; color: #ef9a9a; }
    html:not(.light-mode) .logbuch-kat-planung { background: #311b92; color: #b39ddb; }
    html:not(.light-mode) .logbuch-kat-aufgabe { background: #3e2723; color: #ffcc80; }
    html:not(.light-mode) .logbuch-kat-allgemein { background: #263238; color: #b0bec5; }
    html:not(.light-mode) .logbuch-prio-niedrig { background: #1b5e20; color: #81c784; }
    html:not(.light-mode) .logbuch-prio-normal { background: #1e3a5f; color: #64b5f6; }
    html:not(.light-mode) .logbuch-prio-hoch { background: #4a1111; color: #ef9a9a; }
    html:not(.light-mode) .logbuch-art-einnahme { background: #1b5e20; color: #81c784; }
    html:not(.light-mode) .logbuch-art-ausgabe { background: #4a1111; color: #ef9a9a; }
    html:not(.light-mode) .logbuch-gesamt-card .logbuch-betrag-einnahme { color: #a5d6a7; }
    html:not(.light-mode) .logbuch-gesamt-card .logbuch-betrag-ausgabe { color: #ef9a9a; }
    html:not(.light-mode) .logbuch-inline-form { background: #1e293b; border-color: #334155; }
    html:not(.light-mode) .logbuch-inline-form-header { color: #60a5fa; border-bottom-color: #334155; }
    html:not(.light-mode) .logbuch-inline-form .form-label { color: #60a5fa; }
    html:not(.light-mode) .logbuch-inline-form-actions { border-top-color: #334155; }
    html:not(.light-mode) .logbuch-beleg-upload-card { background: #1e293b; border-color: #334155; }
    html:not(.light-mode) .logbuch-beleg-upload-header { color: #60a5fa; }
    html:not(.light-mode) .logbuch-dropzone { border-color: #334155; }
    html:not(.light-mode) .logbuch-dropzone:hover { border-color: #60a5fa; background: rgba(96,165,250,0.06); }
    html:not(.light-mode) .logbuch-dropzone.drag-over { border-color: #60a5fa; background: rgba(96,165,250,0.12); }
    html:not(.light-mode) .logbuch-dropzone.logbuch-dropzone-has-file { border-color: #4caf50; background: rgba(76,175,80,0.1); }
    html:not(.light-mode) .logbuch-dropzone-text { color: #94a3b8; }
    html:not(.light-mode) .logbuch-dropzone-hint { color: #64748b; }
    html:not(.light-mode) .logbuch-dropzone-filename { color: #81c784; }
    html:not(.light-mode) .logbuch-dropzone-remove { color: #ef5350; }
    html:not(.light-mode) .logbuch-wechselgeld-section { background: #1a2332; border-color: #334155; }
    html:not(.light-mode) .logbuch-wechselgeld-col h6 { color: #94a3b8; }
    html:not(.light-mode) .logbuch-wechselgeld-row { border-bottom-color: #1e293b; }
    html:not(.light-mode) .logbuch-wechselgeld-sub { color: #94a3b8; }
    html:not(.light-mode) .logbuch-wechselgeld-total { border-top-color: #334155; color: #60a5fa; }
}

/* Wechselgeld Stuekelungs-Bereich */
.logbuch-wechselgeld-section {
    background: #f8fafc;
    border: 1px solid var(--rv-border);
    border-radius: 6px;
    padding: 0.75rem 1rem;
    margin-bottom: 1rem;
}
.logbuch-wechselgeld-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}
.logbuch-wechselgeld-col h6 {
    font-size: 0.85rem;
    font-weight: 700;
    color: #475569;
    margin-bottom: 0.5rem;
    text-transform: uppercase;
    letter-spacing: 0.03em;
}
.logbuch-wechselgeld-row {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.2rem 0;
    border-bottom: 1px solid #f1f5f9;
}
.logbuch-wechselgeld-row label {
    width: 70px;
    font-size: 0.85rem;
    font-weight: 500;
    flex-shrink: 0;
}
.logbuch-wechselgeld-row input[type="number"] {
    width: 70px;
    padding: 0.2rem 0.4rem;
    font-size: 0.85rem;
    border: 1px solid var(--rv-border);
    border-radius: 4px;
    text-align: center;
}
.logbuch-wechselgeld-sub {
    font-size: 0.8rem;
    color: #64748b;
    min-width: 65px;
    text-align: right;
}
.logbuch-wechselgeld-total {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-weight: 700;
    font-size: 1rem;
    padding-top: 0.5rem;
    margin-top: 0.5rem;
    border-top: 2px solid var(--rv-border);
}
@media (max-width: 576px) {
    .logbuch-wechselgeld-grid {
        grid-template-columns: 1fr;
    }
}
html.dark-mode .logbuch-wechselgeld-section { background: #1a2332; border-color: #334155; }
html.dark-mode .logbuch-wechselgeld-col h6 { color: #94a3b8; }
html.dark-mode .logbuch-wechselgeld-row { border-bottom-color: #1e293b; }
html.dark-mode .logbuch-wechselgeld-sub { color: #94a3b8; }
html.dark-mode .logbuch-wechselgeld-total { border-top-color: #334155; color: #60a5fa; }

/* === Beleg-Analyse Card === */
.beleg-analyse-card {
    border: 1px solid var(--rv-border);
    border-radius: 8px;
    padding: 1rem;
    margin-top: 0.75rem;
    background: var(--rv-white);
}
.beleg-analyse-header {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: 600;
    font-size: 1rem;
    margin-bottom: 0.75rem;
}
.beleg-analyse-badge {
    display: inline-block;
    padding: 0.15rem 0.5rem;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.03em;
}
.beleg-analyse-badge-regex { background: #e3f2fd; color: #1565c0; }
.beleg-analyse-badge-ki { background: #f3e5f5; color: #7b1fa2; }
.beleg-analyse-hinweis {
    padding: 0.4rem 0.6rem;
    margin-bottom: 0.75rem;
    border-radius: 4px;
    background: #fff8e1;
    color: #f57f17;
    font-size: 0.85rem;
}
.beleg-analyse-grid {
    display: grid;
    grid-template-columns: 140px 1fr;
    gap: 0.3rem 0.75rem;
    margin-bottom: 0.75rem;
    font-size: 0.9rem;
}
.beleg-analyse-label {
    color: #78909c;
    font-size: 0.85rem;
}
.beleg-analyse-value-betrag {
    font-variant-numeric: tabular-nums;
}
.beleg-analyse-positionen {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.85rem;
    margin-bottom: 0.75rem;
}
.beleg-analyse-positionen th {
    text-align: left;
    padding: 0.3rem 0.5rem;
    border-bottom: 2px solid var(--rv-border);
    color: #78909c;
    font-weight: 600;
    font-size: 0.8rem;
}
.beleg-analyse-positionen td {
    padding: 0.25rem 0.5rem;
    border-bottom: 1px solid #f0f0f0;
}
.beleg-analyse-positionen th:nth-child(n+2),
.beleg-analyse-positionen td:nth-child(n+2) { text-align: right; }
.beleg-analyse-actions {
    margin-top: 0.5rem;
    display: flex;
    gap: 0.5rem;
}
/* Dark-Mode Overrides */
html.dark-mode .beleg-analyse-card { background: #1e293b; border-color: #334155; }
html.dark-mode .beleg-analyse-badge-regex { background: #1e3a5f; color: #90caf9; }
html.dark-mode .beleg-analyse-badge-ki { background: #4a148c; color: #ce93d8; }
html.dark-mode .beleg-analyse-hinweis { background: #3e2723; color: #ffcc80; }
html.dark-mode .beleg-analyse-label { color: #94a3b8; }
html.dark-mode .beleg-analyse-positionen th { border-bottom-color: #334155; color: #94a3b8; }
html.dark-mode .beleg-analyse-positionen td { border-bottom-color: #1e293b; }
