/**
 * css/admin.css - TC Hugsweier Turnier Admin Styles (Optimiert)
 * Pfad: /css/admin.css
 * 
 * Funktionen:
 * - Admin-spezifische Layout-Styles (Header, Navigation, Footer)
 * - Login-Seite Gestaltung
 * - Spielplan-Tabelle Styles für Tablet-Optimierung
 * - Modal-Styles für Teams, Ergebnisse und Spieleingabe
 * - Mehrstufige Modals mit Progress-Anzeige
 * - Slide-Animationen für Modal-Navigation
 * - Game-Control Buttons
 * - Responsive Design für Tablet-Nutzung
 * - Optimierte Modal-Darstellung mit Mindestabstand zum Bildschirmrand
 */

/* ========================================
   ADMIN LAYOUT BASIS
======================================== */

.admin-page {
    height: 100vh;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    background: linear-gradient(135deg, #f8f9ff, #e8f2ff);
}

.admin-header {
    background: linear-gradient(135deg, var(--tennis-blue), var(--tennis-blue-dark));
    color: white;
    padding: 1rem 0;
    flex-shrink: 0;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.admin-header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.admin-logo {
    height: 40px;
    width: auto;
}

.admin-title {
    font-size: 1.4rem;
    font-weight: 600;
    margin: 0;
    color: white;
}

.admin-clock {
    font-family: 'Courier New', monospace;
    font-size: 1.2rem;
    font-weight: bold;
    background: rgba(255,255,255,0.1);
    padding: 0.5rem 1rem;
    border-radius: 10px;
    border: 1px solid rgba(255,255,255,0.2);
}

.admin-nav {
    display: flex;
    gap: 0.5rem;
}

.admin-nav .btn {
    padding: 0.6rem 1.2rem;
    border-radius: 25px;
    font-weight: 500;
    border: 2px solid rgba(255,255,255,0.3);
    transition: all 0.3s ease;
}

.admin-nav .btn:hover {
    background: rgba(255,255,255,0.2);
    border-color: var(--gold);
    transform: translateY(-2px);
}

.admin-main {
    flex: 1;
    overflow-y: auto;
    padding: 1rem 0;
}

.admin-content {
    height: 100%;
    display: flex;
    flex-direction: column;
}

.admin-footer {
    background: var(--tennis-blue-dark);
    color: white;
    padding: 0.5rem 0;
    text-align: center;
    font-size: 0.9rem;
    flex-shrink: 0;
}

/* ========================================
   LOGIN-SEITE
======================================== */

.login-body {
    background: linear-gradient(135deg, var(--tennis-blue), var(--tennis-blue-dark));
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
}

.login-card {
    background: white;
    border-radius: 25px;
    box-shadow: 0 20px 60px rgba(0,0,0,0.3);
    padding: 3rem;
    max-width: 400px;
    width: 90%;
}

.login-card .logo {
    height: 80px;
    width: auto;
    margin-bottom: 2rem;
}

.login-card h2 {
    color: var(--tennis-blue);
    font-weight: 600;
    margin-bottom: 2rem;
}

.login-card .input-group-text {
    background: var(--gold);
    border-color: var(--gold);
    color: var(--tennis-blue-dark);
}

.login-card .form-control {
    border-color: var(--gold);
    border-radius: 0 10px 10px 0;
}

.btn-admin-login {
    background: var(--gold);
    color: var(--tennis-blue-dark);
    border: none;
    padding: 1rem;
    border-radius: 15px;
    font-weight: 600;
    transition: all 0.3s ease;
}

.btn-admin-login:hover {
    background: #ffed4e;
    color: var(--tennis-blue-dark);
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(255, 215, 0, 0.3);
}

/* ========================================
   TURNIER-ÜBERSICHT
======================================== */

.tournament-overview {
    margin-bottom: 1.5rem;
    padding: 1rem;
    background: linear-gradient(135deg, #f8f9ff, #e8f2ff);
    border-radius: 15px;
    border: 2px solid var(--tennis-blue-light);
}

.overview-card {
    background: white;
    border-radius: 10px;
    padding: 1rem;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    border-left: 4px solid var(--tennis-blue);
    display: flex;
    align-items: center;
    gap: 0.75rem;
    transition: all 0.3s ease;
    height: 100%;
}

.overview-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(59, 130, 196, 0.2);
    border-left-color: var(--gold);
}

.overview-icon {
    width: 50px;
    height: 50px;
    background: linear-gradient(135deg, var(--tennis-blue), var(--tennis-blue-dark));
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.3rem;
    flex-shrink: 0;
}

.overview-content {
    flex: 1;
}

.overview-content h6 {
    margin: 0 0 0.25rem 0;
    font-size: 0.85rem;
    color: #6c757d;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.overview-number {
    font-size: 1.4rem;
    font-weight: bold;
    color: var(--tennis-blue-dark);
    display: block;
}

.overview-status {
    font-size: 1.1rem;
    font-weight: 600;
    display: block;
}

.overview-leader {
    font-size: 1rem;
    font-weight: 600;
    color: var(--tennis-blue-dark);
    display: block;
}

/* Status-Badges */
.status-waiting {
    color: #856404;
    background: linear-gradient(135deg, #fff3cd, #ffeeba);
    padding: 0.25rem 0.5rem;
    border-radius: 15px;
    font-size: 0.85rem;
    font-weight: 600;
    border: 1px solid #ffc107;
}

.status-running {
    color: #155724;
    background: linear-gradient(135deg, #d4edda, #c3e6cb);
    padding: 0.25rem 0.5rem;
    border-radius: 15px;
    font-size: 0.85rem;
    font-weight: 600;
    border: 1px solid #28a745;
    animation: pulse-running 2s infinite;
}

.status-finished {
    color: var(--tennis-blue-dark);
    background: linear-gradient(135deg, var(--gold), #ffed4e);
    padding: 0.25rem 0.5rem;
    border-radius: 15px;
    font-size: 0.85rem;
    font-weight: 600;
    border: 1px solid var(--gold);
}

@keyframes pulse-running {
    0% { opacity: 1; }
    50% { opacity: 0.7; }
    100% { opacity: 1; }
}

/* Responsive Anpassungen für Übersicht */
@media (max-width: 1024px) {
    .tournament-overview {
        margin-bottom: 1rem;
        padding: 0.75rem;
    }
    
    .overview-card {
        padding: 0.75rem;
        gap: 0.5rem;
    }
    
    .overview-icon {
        width: 45px;
        height: 45px;
        font-size: 1.1rem;
    }
    
    .overview-content h6 {
        font-size: 0.8rem;
    }
    
    .overview-number {
        font-size: 1.2rem;
    }
    
    .overview-status,
    .overview-leader {
        font-size: 0.95rem;
    }
}

@media (max-width: 768px) {
    .tournament-overview {
        margin-bottom: 1rem;
        padding: 0.5rem;
    }
    
    .overview-card {
        padding: 0.5rem;
        gap: 0.5rem;
        flex-direction: column;
        text-align: center;
    }
    
    .overview-icon {
        width: 40px;
        height: 40px;
        font-size: 1rem;
    }
    
    .overview-content h6 {
        font-size: 0.75rem;
        margin-bottom: 0.125rem;
    }
    
    .overview-number {
        font-size: 1.1rem;
    }
    
    .overview-status,
    .overview-leader {
        font-size: 0.9rem;
    }
    
    .status-waiting,
    .status-running,
    .status-finished {
        font-size: 0.8rem;
        padding: 0.2rem 0.4rem;
    }
}

/* ========================================
   GAME CONTROLS - ENTFERNT
======================================== */

/* Game-Control-Buttons entfernt - nicht mehr benötigt */

/* ========================================
   SPIELPLAN-TABELLE (HAUPTANSICHT)
======================================== */

.schedule-overview {
    flex: 1;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.table-container {
    flex: 1;
    overflow-y: auto;
    overflow-x: hidden;
    border: 2px solid var(--tennis-blue);
    border-radius: 15px;
    background: white;
    max-height: calc(100vh - 200px);
}

/* Scrollbar Styling für WebKit Browser auch für Modals */
.table-container::-webkit-scrollbar,
.modal-step::-webkit-scrollbar,
.modal-body::-webkit-scrollbar {
    width: 8px;
}

.table-container::-webkit-scrollbar-track,
.modal-step::-webkit-scrollbar-track,
.modal-body::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 10px;
}

.table-container::-webkit-scrollbar-thumb,
.modal-step::-webkit-scrollbar-thumb,
.modal-body::-webkit-scrollbar-thumb {
    background: linear-gradient(135deg, var(--tennis-blue), var(--tennis-blue-dark));
    border-radius: 10px;
}

.table-container::-webkit-scrollbar-thumb:hover,
.modal-step::-webkit-scrollbar-thumb:hover,
.modal-body::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(135deg, var(--tennis-blue-dark), var(--tennis-blue));
}

.table-schedule {
    font-size: 0.9rem;
    margin-bottom: 0;
    width: 100%;
}

.table-schedule thead th {
    background: linear-gradient(135deg, var(--tennis-blue), var(--tennis-blue-dark));
    color: white;
    border: none;
    padding: 1rem 0.75rem;
    font-weight: 600;
    text-align: center;
    position: sticky;
    top: 0;
    z-index: 10;
}

.col-time {
    width: 15%;
}

.col-court {
    width: 35%;
}

.col-free {
    width: 15%;
}

.table-schedule tbody tr {
    height: auto;
    min-height: 100px;
}

.table-schedule td {
    vertical-align: middle;
    padding: 1rem 0.75rem;
    border-color: #dee2e6;
}

.time-cell {
    background: linear-gradient(135deg, #f8f9ff, #e8f2ff);
    font-weight: 600;
    color: var(--tennis-blue-dark);
    text-align: center;
    border-right: 2px solid var(--gold);
}

.match-cell {
    background: white;
    border: 2px solid #e9ecef;
    cursor: pointer;
    transition: all 0.3s ease;
    text-align: center;
    position: relative;
    min-height: 120px;
    padding: 0.75rem;
}

.match-cell:hover {
    border-color: var(--gold);
    background: linear-gradient(135deg, #fff, #fffbf0);
    transform: scale(1.01);
    box-shadow: 0 4px 15px rgba(255, 215, 0, 0.2);
}

.match-cell.match-finished {
    background: linear-gradient(135deg, #d4edda, #e8f5e9);
    border-color: #28a745;
}

.match-cell.match-finished:hover {
    background: linear-gradient(135deg, #c3e6cb, #d1ecf1);
}

.match-teams {
    font-weight: 600;
    color: var(--tennis-blue-dark);
    margin-bottom: 0.5rem;
    font-size: 0.95rem;
}

.match-players {
    font-size: 0.75rem;
    color: #6c757d;
    margin-bottom: 0.75rem;
    line-height: 1.2;
}

.match-players small {
    display: block;
    margin-bottom: 0.2rem;
}

.match-result {
    font-size: 1.3rem;
    font-weight: bold;
    color: #28a745;
    margin-top: 0.5rem;
}

.match-status {
    color: #6c757d;
    font-size: 0.9rem;
    margin-top: 0.5rem;
}

.match-status i {
    font-size: 1.2rem;
    margin-right: 0.5rem;
}

.empty-cell {
    background: #f8f9fa;
    text-align: center;
    color: #6c757d;
    font-style: italic;
}

.free-teams {
    background: linear-gradient(135deg, #fff3cd, #ffeeba);
    text-align: center;
    font-weight: 500;
    color: var(--tennis-blue-dark);
    border-left: 2px solid var(--gold);
    font-size: 0.8rem;
    line-height: 1.3;
}

/* ========================================
   MODAL STYLES BASIS
======================================== */

/* Basis Modal Styles */
.modal-content {
    border-radius: 20px;
    border: 3px solid var(--gold);
    overflow: hidden;
}

.modal-header {
    background: linear-gradient(135deg, var(--tennis-blue), var(--tennis-blue-dark));
    color: white;
    border-radius: 17px 17px 0 0;
    border-bottom: none;
}

.modal-title {
    font-weight: 600;
}

.btn-close-white {
    filter: invert(1) grayscale(100%) brightness(200%);
}

/* ========================================
   OPTIMIERTE SCORE MODALS
======================================== */

.score-modal .modal-dialog {
    max-width: min(95vw, 1200px);
    width: min(95vw, 1200px);
    margin: clamp(0.5rem, 1.5vh, 2rem) auto;
    height: auto;
    max-height: calc(100vh - clamp(1rem, 3vh, 4rem));
    display: flex;
    flex-direction: column;
}

.score-modal .modal-content {
    height: auto;
    max-height: calc(100vh - clamp(1rem, 3vh, 4rem));
    min-height: clamp(500px, 75vh, 800px);
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.score-modal .modal-body {
    flex: 1;
    overflow: hidden;
    padding: 0;
    display: flex;
    flex-direction: column;
    min-height: 0;
}

/* Progress-Anzeige für mehrstufige Modals */
.modal-progress {
    background: linear-gradient(135deg, #f8f9ff, #e8f2ff);
    padding: 1rem 1.5rem;
    border-bottom: 2px solid var(--gold);
    flex-shrink: 0;
}

.progress-steps {
    display: flex;
    align-items: center;
    justify-content: center;
    max-width: 400px;
    margin: 0 auto;
}

.progress-step {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    opacity: 0.5;
    transition: all 0.3s ease;
}

.progress-step.active {
    opacity: 1;
}

.progress-step.completed {
    opacity: 1;
}

.progress-step.completed .step-circle {
    background: var(--success);
    border-color: var(--success);
    color: white;
}

.progress-step.completed .step-circle::after {
    content: '✓';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 0.8rem;
}

.step-circle {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: white;
    border: 3px solid var(--tennis-blue);
    color: var(--tennis-blue);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    position: relative;
    transition: all 0.3s ease;
}

.progress-step.active .step-circle {
    background: var(--tennis-blue);
    color: white;
    transform: scale(1.1);
}

.step-label {
    text-align: center;
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--tennis-blue-dark);
}

.step-label-short {
    display: none;
}

.progress-line {
    height: 3px;
    background: #ddd;
    margin: 0 1rem;
    flex: 1;
    border-radius: 2px;
    transition: all 0.3s ease;
}

.progress-line.completed {
    background: var(--success);
}

/* Modal Carousel für mehrstufige Ansichten */
.modal-carousel {
    position: relative;
    flex: 1;
    overflow: hidden;
    min-height: 400px;
}

.modal-step {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    transform: translateX(100%);
    transition: all 0.3s ease;
    overflow-y: auto;
    overflow-x: hidden;
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    box-sizing: border-box;
}

.modal-step.active {
    opacity: 1;
    transform: translateX(0);
}

/* Slide-Animationen */
.slide-out-left {
    transform: translateX(-100%);
    opacity: 0;
}

.slide-in-right {
    transform: translateX(0);
    opacity: 1;
}

.slide-out-right {
    transform: translateX(100%);
    opacity: 0;
}

.slide-in-left {
    transform: translateX(0);
    opacity: 1;
}

/* ========================================
   SCORE INPUT SEKTION (SCHRITT 1)
======================================== */

.score-input-section {
    text-align: center;
    padding: 0;
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    min-height: 450px;
}

.teams-layout {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1.5rem;
    max-width: 1000px;
    margin: 0 auto;
    flex: 1;
    min-height: 350px;
}

.team-score-container {
    flex: 1;
    padding: 1.5rem;
    background: linear-gradient(135deg, #f8f9ff, #e8f2ff);
    border-radius: 15px;
    border: 2px solid var(--tennis-blue-light);
    min-width: 280px;
    max-width: 380px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    min-height: 200px;
}

.team-score-label {
    font-size: 1.2rem;
    font-weight: bold;
    color: var(--tennis-blue-dark);
    margin-bottom: 0.75rem;
}

.team-score-label small {
    font-size: 0.85rem;
    color: #6c757d;
    font-weight: normal;
}

.score-display {
    font-size: 2.5rem;
    font-weight: bold;
    color: var(--tennis-blue);
    margin: 0.75rem 0;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.1);
}

.score-buttons {
    display: flex;
    gap: 0.4rem;
    justify-content: center;
    flex-wrap: wrap;
    margin-bottom: 0.5rem;
}

.score-btn {
    width: 55px;
    height: 55px;
    border-radius: 50%;
    border: 2px solid var(--tennis-blue);
    background: white;
    color: var(--tennis-blue);
    font-size: 1.3rem;
    font-weight: bold;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.score-btn:hover,
.score-btn.active {
    background: var(--gold);
    border-color: var(--gold);
    color: var(--tennis-blue-dark);
    transform: scale(1.1);
    box-shadow: 0 4px 15px rgba(255, 215, 0, 0.3);
}

.vs-separator {
    font-size: 2.5rem;
    font-weight: bold;
    color: var(--gold);
    text-shadow: 2px 2px 4px rgba(0,0,0,0.1);
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100px;
    height: 100px;
    background: white;
    border-radius: 50%;
    border: 3px solid var(--gold);
}

.next-step-btn {
    background: var(--tennis-blue);
    color: white;
    border: none;
    padding: 0.75rem 1.5rem;
    border-radius: 25px;
    font-weight: 600;
    font-size: 1rem;
    transition: all 0.3s ease;
    margin-top: 1rem;
    flex-shrink: 0;
}

.next-step-btn:hover {
    background: var(--tennis-blue-dark);
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(59, 130, 196, 0.3);
}

/* ========================================
   BESTÄTIGUNGS-SEKTION (SCHRITT 2) - VEREINFACHT
======================================== */

.confirmation-section {
    padding: 0;
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    min-height: 450px;
}

.match-summary {
    background: linear-gradient(135deg, #f8f9ff, #e8f2ff);
    border-radius: 20px;
    padding: 2rem;
    margin-bottom: 2rem;
    border: 2px solid var(--tennis-blue-light);
    flex-shrink: 0;
}

.result-display {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1.5rem;
    margin: 1.5rem 0;
    flex-wrap: wrap;
    max-width: 700px;
    margin-left: auto;
    margin-right: auto;
}

.team-result {
    text-align: center;
    flex: 1;
    min-width: 180px;
    padding: 1rem;
    background: white;
    border-radius: 15px;
    border: 2px solid var(--tennis-blue-light);
}

.team-result strong {
    font-size: 1.2rem;
    color: var(--tennis-blue-dark);
}

.team-result small {
    color: #6c757d;
    font-style: italic;
}

.final-score {
    font-size: 2.2rem;
    font-weight: bold;
    color: var(--tennis-blue);
    background: white;
    border-radius: 50%;
    width: 90px;
    height: 90px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 3px solid var(--gold);
    text-shadow: 2px 2px 4px rgba(0,0,0,0.1);
    flex-shrink: 0;
}

/* Einfacher Winner Text ohne große Box */
.winner-text {
    text-align: center;
    padding: 1rem;
    margin: 1rem 0;
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--tennis-blue-dark);
    background: linear-gradient(135deg, #fff3cd, #ffeeba);
    border-radius: 15px;
    border: 2px solid var(--gold);
}

.winner-text i {
    color: var(--gold);
    margin-right: 0.5rem;
    font-size: 1.3rem;
}

/* Status Buttons für Schritt 2 */
.status-buttons {
    display: flex;
    gap: 1rem;
    justify-content: center;
    margin: 1.5rem 0;
    flex-wrap: wrap;
}

.status-btn {
    padding: 0.7rem 1.3rem;
    border-radius: 25px;
    border: 2px solid var(--tennis-blue);
    background: white;
    color: var(--tennis-blue);
    font-weight: 600;
    transition: all 0.3s ease;
    min-width: 140px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    font-size: 0.9rem;
}

.status-btn:hover:not(:disabled),
.status-btn.active {
    background: var(--tennis-blue);
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(59, 130, 196, 0.3);
}

.status-btn:disabled {
    cursor: not-allowed;
    opacity: 0.5 !important;
    background: #f8f9fa !important;
    color: #6c757d !important;
    border-color: #dee2e6 !important;
}

/* Modal Actions (Schritt 2) */
.modal-actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    margin-top: auto;
    padding-top: 1rem;
    flex-wrap: wrap;
    flex-shrink: 0;
}

.save-result-btn {
    background: var(--gold);
    color: var(--tennis-blue-dark);
    border: none;
    padding: 0.75rem 1.5rem;
    border-radius: 25px;
    font-weight: bold;
    font-size: 1rem;
    transition: all 0.3s ease;
    min-width: 180px;
}

.save-result-btn:hover {
    background: #ffed4e;
    color: var(--tennis-blue-dark);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(255, 215, 0, 0.3);
}

/* ========================================
   TEAMS MANAGEMENT MODAL
======================================== */

.team-management-modal .modal-dialog {
    max-width: 90vw;
}

.team-grid-modal {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 1.5rem;
    max-height: 60vh;
    overflow-y: auto;
    padding: 1rem 0;
}

.team-edit-card {
    background: linear-gradient(135deg, #f8f9ff, var(--tennis-blue-light));
    border: 2px solid var(--tennis-blue);
    border-radius: 15px;
    padding: 1.5rem;
    transition: all 0.3s ease;
}

.team-edit-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(44, 82, 130, 0.2);
}

.team-edit-card h5 {
    color: var(--tennis-blue-dark);
    margin-bottom: 1rem;
    text-align: center;
    font-weight: 600;
}

.team-edit-card .form-control {
    margin-bottom: 0.75rem;
    border: 2px solid #ddd;
    border-radius: 10px;
    padding: 0.75rem;
    transition: all 0.3s ease;
}

.team-edit-card .form-control:focus {
    border-color: var(--gold);
    box-shadow: 0 0 0 0.2rem rgba(255, 215, 0, 0.25);
}

.save-all-teams-btn {
    background: var(--gold);
    color: var(--tennis-blue-dark);
    border: none;
    padding: 1rem 2rem;
    border-radius: 25px;
    font-weight: bold;
    font-size: 1.1rem;
    margin-top: 1rem;
    transition: all 0.3s ease;
}

.save-all-teams-btn:hover {
    background: #ffed4e;
    color: var(--tennis-blue-dark);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(255, 215, 0, 0.3);
}

/* ========================================
   RESULTS STANDINGS MODAL
======================================== */

.results-modal .modal-dialog {
    max-width: 90vw;
}

.results-table-container {
    max-height: 70vh;
    overflow-y: auto;
}

.results-table .table {
    margin-bottom: 0;
}

.results-table .table thead th {
    background: linear-gradient(135deg, var(--tennis-blue), var(--tennis-blue-dark));
    color: white;
    border: none;
    position: sticky;
    top: 0;
    z-index: 10;
}

.results-table .position-1 {
    background: linear-gradient(135deg, #fff3cd, #ffeeba);
    font-weight: bold;
}

.results-table .position-2 {
    background: linear-gradient(135deg, #e2e3e5, #f8f9fa);
    font-weight: bold;
}

.results-table .position-3 {
    background: linear-gradient(135deg, #f8d7da, #f5c6cb);
    font-weight: bold;
}

/* ========================================
   RESPONSIVE DESIGN
======================================== */

@media (max-width: 1024px) {
    .admin-header .container {
        flex-direction: column;
        gap: 1rem;
        padding: 1rem;
    }
    
    .admin-nav {
        justify-content: center;
        flex-wrap: wrap;
    }
    
    .admin-nav .btn {
        padding: 0.5rem 1rem;
        font-size: 0.9rem;
    }
    
    .table-schedule {
        font-size: 0.85rem;
    }
    
    .table-container {
        max-height: calc(100vh - 280px);
    }
    
    .col-time {
        width: 12%;
    }
    
    .col-court {
        width: 37%;
    }
    
    .col-free {
        width: 14%;
    }
    
    .match-players {
        font-size: 0.7rem;
    }
    
    .progress-steps {
        gap: 0.5rem;
    }
    
    .step-circle {
        width: 35px;
        height: 35px;
        font-size: 0.9rem;
    }
    
    .step-label {
        font-size: 0.75rem;
    }
    
    .step-label-full {
        display: none;
    }
    
    .step-label-short {
        display: block;
    }
    
    .progress-line {
        margin: 0 0.5rem;
    }
    
    /* Tablet Score Modal */
    .score-modal .modal-dialog {
        max-width: min(96vw, 1000px);
        width: min(96vw, 1000px);
        margin: clamp(0.5rem, 1vh, 1.5rem) auto;
    }
    
    .score-modal .modal-content {
        min-height: clamp(450px, 70vh, 700px);
    }
    
    .teams-layout {
        gap: 1rem;
        min-height: 280px;
    }
    
    .team-score-container {
        min-width: 250px;
        max-width: 320px;
        padding: 1rem;
    }
    
    .vs-separator {
        width: 85px;
        height: 85px;
        font-size: 2.2rem;
    }
    
    .score-display {
        font-size: 2rem;
    }
    
    .score-btn {
        width: 45px;
        height: 45px;
        font-size: 1.1rem;
    }
    
    .final-score {
        width: 90px;
        height: 90px;
        font-size: 2.2rem;
    }
    
    .score-input-section,
    .confirmation-section {
        min-height: 380px;
    }
}

@media (max-width: 768px) {
    .team-grid-modal {
        grid-template-columns: 1fr;
    }
    
    .table-container {
        max-height: calc(100vh - 320px);
    }
    
    .table-schedule tbody tr {
        height: auto;
        min-height: 100px;
    }
    
    .match-teams {
        font-size: 0.8rem;
    }
    
    .match-players {
        font-size: 0.65rem;
    }
    
    .match-result {
        font-size: 1rem;
    }
    
    /* Mobile Score Modal - Stacked Layout */
    .score-modal .modal-dialog {
        max-width: 98vw;
        width: 98vw;
        margin: clamp(0.5rem, 1.5vh, 1.5rem) auto;
    }
    
    .score-modal .modal-content {
        min-height: clamp(350px, 50vh, 450px);
        max-height: calc(100vh - clamp(1rem, 3vh, 3rem));
    }
    
    .modal-step {
        padding: 1rem;
    }
    
    .teams-layout {
        flex-direction: column;
        gap: 0.75rem;
        min-height: 280px;
    }
    
    .vs-separator {
        font-size: 1.5rem;
        width: 60px;
        height: 60px;
        margin: 0.5rem 0;
    }
    
    .team-score-container {
        min-width: auto;
        max-width: 100%;
        margin: 0;
        padding: 0.75rem;
    }
    
    .team-score-label {
        font-size: 1.1rem;
        margin-bottom: 0.5rem;
    }
    
    .score-display {
        font-size: 2rem;
        margin: 0.5rem 0;
    }
    
    .score-buttons {
        gap: 0.3rem;
    }
    
    .score-btn {
        width: 40px;
        height: 40px;
        font-size: 1rem;
    }
    
    .next-step-btn {
        padding: 0.6rem 1.2rem;
        font-size: 0.9rem;
        margin-top: 0.5rem;
    }
    
    .status-buttons {
        flex-direction: column;
        align-items: center;
        gap: 0.75rem;
    }
    
    .status-btn {
        min-width: 200px;
    }
    
    .modal-progress {
        padding: 0.75rem 1rem;
    }
    
    .progress-steps {
        gap: 1rem;
    }
    
    .step-circle {
        width: 30px;
        height: 30px;
        font-size: 0.9rem;
    }
    
    .step-label {
        font-size: 0.7rem;
    }
    
    .progress-line {
        margin: 0 0.5rem;
    }
    
    .result-display {
        flex-direction: column;
        gap: 1rem;
        max-width: 300px;
    }
    
    .team-result {
        min-width: auto;
        flex: none;
    }
    
    .final-score {
        margin: 0;
        font-size: 1.8rem;
        width: 70px;
        height: 70px;
    }
    
    .modal-actions {
        flex-direction: column;
        align-items: center;
        margin-top: 1rem;
    }
    
    .modal-actions .btn {
        min-width: 180px;
        padding: 0.6rem 1.2rem;
        font-size: 0.9rem;
    }
    
    .confirmation-section {
        min-height: 280px;
    }
    
    .score-input-section {
        min-height: 280px;
    }
    
    .match-summary {
        padding: 1rem;
    }
    
    .winner-text {
        padding: 0.75rem;
        font-size: 0.9rem;
    }
}

/* Sehr kleine Bildschirme */
@media (max-width: 480px) {
    .score-modal .modal-dialog {
        max-width: 100vw;
        width: 100vw;
        margin: 0.25rem auto;
    }
    
    .score-modal .modal-content {
        min-height: clamp(300px, 45vh, 400px);
        max-height: calc(100vh - 0.5rem);
    }
    
    .modal-step {
        padding: 0.75rem;
    }
    
    .team-score-container {
        padding: 0.5rem;
    }
    
    .vs-separator {
        width: 50px;
        height: 50px;
        font-size: 1.2rem;
    }
    
    .score-btn {
        width: 35px;
        height: 35px;
        font-size: 0.9rem;
    }
    
    .team-score-label {
        font-size: 1rem;
    }
    
    .score-display {
        font-size: 1.8rem;
    }
    
    .score-input-section {
        min-height: 250px;
    }
    
    .confirmation-section {
        min-height: 220px;
    }
    
    .teams-layout {
        min-height: 220px;
    }
    
    .final-score {
        width: 60px;
        height: 60px;
        font-size: 1.6rem;
    }
}

/* ========================================
   TOAST NOTIFICATIONS
======================================== */

.toast-container {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 9999;
}

.admin-toast {
    background: white;
    border: 2px solid var(--gold);
    border-radius: 15px;
    box-shadow: 0 6px 20px rgba(0,0,0,0.1);
}

.admin-toast .toast-header {
    background: var(--gold);
    color: var(--tennis-blue-dark);
    border-bottom: none;
}

.admin-toast.success {
    border-color: #28a745;
}

.admin-toast.success .toast-header {
    background: #28a745;
    color: white;
}

.admin-toast.danger {
    border-color: #dc3545;
}

.admin-toast.danger .toast-header {
    background: #dc3545;
    color: white;
}

/* ========================================
   GEWINNER-ICONS
======================================== */

.winner-icon {
    color: var(--gold);
    font-size: 1.1rem;
    margin: 0 0.3rem;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.3);
    animation: pulse-gold 2s infinite;
    display: inline-block;
    vertical-align: middle;
}

.draw-icon {
    color: #ffc107;
    font-size: 1rem;
    margin: 0 0.3rem;
    opacity: 0.8;
    display: inline-block;
    vertical-align: middle;
}

@keyframes pulse-gold {
    0% { 
        transform: scale(1);
        text-shadow: 2px 2px 4px rgba(0,0,0,0.3);
    }
    50% { 
        transform: scale(1.1);
        text-shadow: 2px 2px 8px rgba(255, 215, 0, 0.6);
    }
    100% { 
        transform: scale(1);
        text-shadow: 2px 2px 4px rgba(0,0,0,0.3);
    }
}

/* Match Teams mit Icons */
.match-teams .winner-icon {
    font-size: 1rem;
    margin: 0 0.25rem;
}

.match-teams .draw-icon {
    font-size: 0.9rem;
    margin: 0 0.25rem;
}

/* Tablet und Mobile Anpassungen für Icons */
@media (max-width: 1024px) {
    .winner-icon {
        font-size: 1rem;
        margin: 0 0.2rem;
    }
    
    .draw-icon {
        font-size: 0.9rem;
        margin: 0 0.2rem;
    }
    
    .match-teams .winner-icon {
        font-size: 0.9rem;
        margin: 0 0.2rem;
    }
    
    .match-teams .draw-icon {
        font-size: 0.8rem;
        margin: 0 0.2rem;
    }
}

@media (max-width: 768px) {
    .winner-icon {
        font-size: 0.9rem;
        margin: 0 0.15rem;
    }
    
    .draw-icon {
        font-size: 0.8rem;
        margin: 0 0.15rem;
    }
    
    .match-teams .winner-icon {
        font-size: 0.8rem;
        margin: 0 0.15rem;
    }
    
    .match-teams .draw-icon {
        font-size: 0.75rem;
        margin: 0 0.15rem;
    }
}

/* ========================================
   UTILITIES & ANIMATIONS
======================================== */

@keyframes pulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.05); }
    100% { transform: scale(1); }
}

.pulse {
    animation: pulse 2s infinite;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

.fade-in {
    animation: fadeIn 0.3s ease;
}

/* Loading States */
.loading {
    opacity: 0.6;
    pointer-events: none;
    position: relative;
}

.loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 20px;
    height: 20px;
    margin: -10px 0 0 -10px;
    border: 2px solid #f3f3f3;
    border-top: 2px solid var(--tennis-blue);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* ========================================
   SCORE BUTTON FIXES - An Ende von admin.css hinzufügen
======================================== */

/* Score Button States - Verhindert springende Markierungen */
.score-btn {
    position: relative !important;
    z-index: 1 !important;
    cursor: pointer !important;
    user-select: none !important;
    transition: all 0.15s ease !important;
    transform: scale(1) !important;
    background: white !important;
    border: 2px solid var(--tennis-blue) !important;
    color: var(--tennis-blue) !important;
}

/* Hover State - Subtil */
.score-btn:hover:not(.active) {
    transform: scale(1.03) !important;
    border-color: var(--gold) !important;
    background: rgba(255, 215, 0, 0.1) !important;
    z-index: 2 !important;
}

/* Active State - Klar definiert */
.score-btn.active {
    background: var(--gold) !important;
    border-color: var(--gold) !important;
    color: var(--tennis-blue-dark) !important;
    transform: scale(1.08) !important;
    z-index: 10 !important;
    box-shadow: 0 0 0 3px rgba(255, 215, 0, 0.3) !important;
    font-weight: bold !important;
}

/* Focus State */
.score-btn:focus {
    outline: none !important;
    box-shadow: 0 0 0 3px rgba(59, 130, 196, 0.3) !important;
}

/* Active + Hover = keine zusätzliche Transformation */
.score-btn.active:hover {
    transform: scale(1.08) !important;
}

/* Status Button Fixes */
.status-btn {
    position: relative !important;
    z-index: 1 !important;
    cursor: pointer !important;
    user-select: none !important;
    transition: all 0.15s ease !important;
    background: white !important;
    border: 2px solid #ddd !important;
    color: #666 !important;
}

.status-btn:hover:not(.active) {
    border-color: var(--tennis-blue) !important;
    background: rgba(59, 130, 196, 0.1) !important;
    color: var(--tennis-blue) !important;
}

.status-btn.active {
    background: var(--gold) !important;
    border-color: var(--gold) !important;
    color: var(--tennis-blue-dark) !important;
    transform: translateY(-1px) !important;
    box-shadow: 0 3px 8px rgba(255, 215, 0, 0.3) !important;
    font-weight: 600 !important;
}

/* Container Fixes */
.score-buttons {
    display: flex !important;
    gap: 0.5rem !important;
    justify-content: center !important;
    flex-wrap: wrap !important;
    padding: 0.5rem 0 !important;
}

.status-buttons {
    display: flex !important;
    gap: 1rem !important;
    justify-content: center !important;
    margin: 1rem 0 !important;
    flex-wrap: wrap !important;
}

/* Modal Fixes */
.score-modal .modal-body {
    overflow: visible !important;
    position: relative !important;
}

.team-score-container {
    position: relative !important;
    z-index: 1 !important;
    padding: 1rem !important;
    background: rgba(248, 249, 255, 0.7) !important;
    border-radius: 15px !important;
    border: 2px solid var(--tennis-blue-light) !important;
}

/* Score Display */
.score-display {
    font-size: 2.5rem !important;
    font-weight: bold !important;
    color: var(--tennis-blue) !important;
    margin: 1rem 0 !important;
    text-align: center !important;
    min-height: 60px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
}

/* VS Separator */
.vs-separator {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    width: 100px !important;
    height: 100px !important;
    background: var(--tennis-blue) !important;
    color: white !important;
    border-radius: 50% !important;
    font-size: 1.8rem !important;
    font-weight: bold !important;
    margin: 0 1rem !important;
    flex-shrink: 0 !important;
}

/* Teams Layout */
.teams-layout {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 1rem !important;
    max-width: 100% !important;
    margin: 0 auto !important;
    padding: 1rem !important;
}

/* Responsive Fixes */
@media (max-width: 768px) {
    .score-btn {
        width: 45px !important;
        height: 45px !important;
        font-size: 1.1rem !important;
        margin: 0.1rem !important;
    }
    
    .teams-layout {
        flex-direction: column !important;
        gap: 1rem !important;
    }
    
    .vs-separator {
        width: 85px !important;
        height: 85px !important;
        font-size: 1.6rem !important;
    }
    
    .score-display {
        font-size: 2rem !important;
        min-height: 50px !important;
    }
    
    .status-btn {
        min-width: 140px !important;
        padding: 0.6rem 1rem !important;
    }
}

/* Verhindere Bootstrap Konflikte */
.modal-content .score-btn:not(:disabled):not(.disabled) {
    cursor: pointer !important;
}

.modal-content .status-btn:not(:disabled):not(.disabled) {
    cursor: pointer !important;
}

/* Debug Hilfe - entfernen in Produktion */
.score-btn.debug-active {
    border: 3px solid red !important;
    background: yellow !important;
}

/* Smooth Transitions für alle Elemente */
.score-input-section * {
    transition: all 0.15s ease !important;
}

/* Verhindere Text-Selektion in Buttons */
.score-btn,
.status-btn {
    -webkit-user-select: none !important;
    -moz-user-select: none !important;
    -ms-user-select: none !important;
    user-select: none !important;
}

/* Fix für Modal Backdrop Konflikte */
.modal.show .modal-dialog .score-btn,
.modal.show .modal-dialog .status-btn {
    pointer-events: auto !important;
    position: relative !important;
    z-index: auto !important;
}

/* ========================================
   ZURÜCK-BUTTON STYLES - An Ende von admin.css hinzufügen
======================================== */

/* Zurück-Button neben dem Titel */
.btn-outline-warning {
    background: rgba(255, 193, 7, 0.1) !important;
    border-color: rgba(255, 193, 7, 0.5) !important;
    color: #ffc107 !important;
    font-weight: 500 !important;
    transition: all 0.3s ease !important;
}

.btn-outline-warning:hover {
    background: #ffc107 !important;
    border-color: #ffc107 !important;
    color: var(--tennis-blue-dark) !important;
    transform: translateY(-1px) !important;
    box-shadow: 0 4px 12px rgba(255, 193, 7, 0.3) !important;
}

.btn-outline-warning:focus {
    box-shadow: 0 0 0 0.25rem rgba(255, 193, 7, 0.5) !important;
}

/* Kleine Button-Variante neben Titel */
.btn-sm.btn-outline-warning {
    padding: 0.375rem 0.75rem !important;
    font-size: 0.875rem !important;
    border-radius: 20px !important;
}

/* Admin Navigation Button Style */
.admin-nav .btn-outline-warning {
    padding: 0.75rem 1.5rem !important;
    border-radius: 25px !important;
    font-weight: 600 !important;
    display: inline-flex !important;
    align-items: center !important;
    gap: 0.5rem !important;
}

/* Responsive Anpassungen */
@media (max-width: 768px) {
    .btn-sm.btn-outline-warning {
        padding: 0.25rem 0.5rem !important;
        font-size: 0.75rem !important;
    }
    
    .btn-sm.btn-outline-warning .fas {
        font-size: 0.8rem !important;
    }
    
    /* Text auf kleinen Bildschirmen verkürzen */
    .btn-sm.btn-outline-warning .btn-text {
        display: none;
    }
}

@media (max-width: 480px) {
    .admin-nav .btn-outline-warning {
        padding: 0.5rem 1rem !important;
        font-size: 0.85rem !important;
    }
    
    /* Nur Icon auf sehr kleinen Bildschirmen */
    .admin-nav .btn-outline-warning .btn-text-mobile-hide {
        display: none;
    }
}

/* Hover-Effekt für bessere UX */
.btn-outline-warning {
    position: relative !important;
    overflow: hidden !important;
}

.btn-outline-warning::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.5s ease;
}

.btn-outline-warning:hover::before {
    left: 100%;
}
/* Status-Fehler Anzeige in Match-Zellen */
.match-error {
    background: linear-gradient(135deg, #fff3cd, #ffeaa7) !important;
    border: 2px solid #e74c3c !important;
    animation: pulse-error 2s infinite;
}

.match-error-status {
    border-left: 5px solid #e74c3c !important;
}

.match-error-scores {
    border-left: 5px solid #f39c12 !important;
}

.match-error-info {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 5px;
    padding: 8px;
    background: rgba(231, 76, 60, 0.1);
    border-radius: 8px;
    margin-top: 5px;
}

.match-error-info .error-message {
    font-weight: bold;
    color: #e74c3c;
    font-size: 0.9rem;
    text-align: center;
}

.match-error-info .fix-hint {
    background: rgba(52, 152, 219, 0.8);
    color: white;
    padding: 4px 8px;
    border-radius: 4px;
    animation: blink 1.5s infinite;
}

@keyframes pulse-error {
    0% { 
        box-shadow: 0 0 0 0 rgba(231, 76, 60, 0.7);
        transform: scale(1);
    }
    50% { 
        box-shadow: 0 0 0 10px rgba(231, 76, 60, 0);
        transform: scale(1.02);
    }
    100% { 
        box-shadow: 0 0 0 0 rgba(231, 76, 60, 0);
        transform: scale(1);
    }
}

@keyframes blink {
    0%, 50% { opacity: 1; }
    51%, 100% { opacity: 0.5; }
}

/* Hover-Effekt für fehlerhafte Matches */
.match-error:hover {
    background: linear-gradient(135deg, #e74c3c, #c0392b) !important;
    color: white !important;
    cursor: pointer !important;
    transform: scale(1.05) !important;
}

.match-error:hover .error-message {
    color: white !important;
}

.match-error:hover .fix-hint {
    background: rgba(255, 255, 255, 0.9) !important;
    color: #e74c3c !important;
}