/**
 * Sport Ferstl Cup - Hauptstylesheet
 * Modernes Admin-Panel Design
 * Farben: FC Wald Süssenbach Blau
 */

:root {
    /* FC Wald Süssenbach Blau */
    --primary: #1e73be;
    --primary-dark: #165a94;
    --primary-light: #3a8fd4;
    --secondary: #64748b;
    --success: #22c55e;
    --danger: #ef4444;
    --warning: #f59e0b;
    --info: #06b6d4;
    
    --dark: #1e293b;
    --dark-light: #334155;
    --light: #f8fafc;
    --white: #ffffff;
    
    --sidebar-width: 260px;
    --sidebar-collapsed: 70px;
    --header-height: 60px;
    
    --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
    --shadow: 0 1px 3px 0 rgb(0 0 0 / 0.1), 0 1px 2px -1px rgb(0 0 0 / 0.1);
    --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
    --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
    
    --border-radius: 0.5rem;
    --border-radius-lg: 0.75rem;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background-color: var(--light);
    color: var(--dark);
    line-height: 1.4;
    font-size: 0.875rem;
}

/* ==================== LOGIN PAGE ==================== */

.login-page {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--primary-dark) 0%, var(--primary) 50%, var(--info) 100%);
    padding: 20px;
}

.login-container {
    width: 100%;
    max-width: 420px;
}

.login-card {
    background: var(--white);
    border-radius: var(--border-radius-lg);
    box-shadow: var(--shadow-lg);
    padding: 2.5rem;
}

.login-header {
    text-align: center;
    margin-bottom: 2rem;
}

.login-logo {
    width: 90px;
    height: 90px;
    background: var(--white);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1.5rem;
    padding: 10px;
    box-shadow: var(--shadow-md);
}

.login-logo img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.login-logo i {
    font-size: 2.5rem;
    color: var(--primary);
}

.login-header h1 {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--dark);
    margin-bottom: 0.25rem;
}

.login-form .form-floating {
    position: relative;
}

.login-form .form-control {
    border: 2px solid #e2e8f0;
    border-radius: var(--border-radius);
    padding: 1rem 1rem;
    height: auto;
    font-size: 1rem;
    transition: all 0.2s;
}

.login-form .form-control:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.login-form .btn-primary {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    border: none;
    padding: 0.875rem 1.5rem;
    font-weight: 600;
    border-radius: var(--border-radius);
    transition: all 0.2s;
}

.login-form .btn-primary:hover {
    transform: translateY(-1px);
    box-shadow: var(--shadow-md);
}

.login-footer {
    text-align: center;
    margin-top: 1.5rem;
    padding-top: 1.5rem;
    border-top: 1px solid #e2e8f0;
}

/* ==================== SIDEBAR ==================== */

.sidebar {
    position: fixed;
    left: 0;
    top: 0;
    width: var(--sidebar-width);
    height: 100vh;
    background: var(--dark);
    color: var(--white);
    display: flex;
    flex-direction: column;
    z-index: 1000;
    transition: transform 0.3s ease;
}

.sidebar-header {
    padding: 1rem 1.25rem;
    border-bottom: 2px solid var(--primary);
    background: linear-gradient(135deg, var(--dark) 0%, #0f172a 100%);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.sidebar-logo {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.logo-img {
    width: 36px;
    height: 36px;
    object-fit: contain;
}

.logo-text {
    font-weight: 700;
    font-size: 1rem;
    white-space: nowrap;
}

.sidebar-toggle {
    background: none;
    border: none;
    color: var(--white);
    font-size: 1.25rem;
    cursor: pointer;
    padding: 0.5rem;
}

.sidebar-nav {
    flex: 1;
    overflow-y: auto;
    padding: 1rem 0;
}

.sidebar-nav .nav {
    flex-direction: column;
    gap: 0.125rem;
}

.sidebar-nav .nav-section {
    padding: 1.25rem 1.5rem 0.5rem;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: #94a3b8;
}

.sidebar-nav .nav-link {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 1.5rem;
    color: #cbd5e1;
    text-decoration: none;
    transition: all 0.2s;
    border-left: 3px solid transparent;
}

.sidebar-nav .nav-link:hover {
    background: var(--dark-light);
    color: var(--white);
}

.sidebar-nav .nav-link.active {
    background: var(--primary);
    color: var(--white);
    border-left-color: var(--white);
}

.sidebar-nav .nav-link i {
    width: 20px;
    text-align: center;
}

.sidebar-footer {
    padding: 1rem 1.5rem;
    border-top: 1px solid var(--dark-light);
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.user-info {
    flex: 1;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.user-avatar {
    width: 36px;
    height: 36px;
    background: var(--dark-light);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.875rem;
}

.user-details {
    display: flex;
    flex-direction: column;
}

.user-name {
    font-weight: 500;
    font-size: 0.875rem;
}

.user-role {
    font-size: 0.75rem;
    color: #94a3b8;
}

.btn-logout {
    background: none;
    border: none;
    color: #ef4444;
    padding: 0.5rem;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-logout:hover {
    color: var(--white);
    background: #ef4444;
    border-radius: var(--border-radius);
}

/* ==================== MAIN WRAPPER ==================== */

.main-wrapper {
    margin-left: var(--sidebar-width);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    transition: margin-left 0.3s ease;
}

.top-navbar {
    height: var(--header-height);
    background: var(--white);
    border-bottom: 3px solid var(--primary);
    display: flex;
    align-items: center;
    padding: 0 1.5rem;
    gap: 1rem;
    position: sticky;
    top: 0;
    z-index: 100;
}

.top-navbar .sidebar-toggle {
    display: none;
    color: var(--dark);
}

.navbar-title h1 {
    font-size: 1rem;
    font-weight: 600;
    margin: 0;
    color: var(--primary);
}

.navbar-actions {
    margin-left: auto;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.btn-icon {
    background: none;
    border: 1px solid #e2e8f0;
    padding: 0.5rem 1rem;
    border-radius: var(--border-radius);
    color: var(--secondary);
    transition: all 0.2s;
}

.btn-icon:hover {
    background: var(--light);
    border-color: #cbd5e1;
    color: var(--dark);
}

.page-content {
    flex: 1;
    padding: 1rem;
}

.page-footer {
    padding: 1rem 1.5rem;
    text-align: center;
    border-top: 1px solid #e2e8f0;
    color: var(--secondary);
    font-size: 0.875rem;
}

/* ==================== CARDS ==================== */

.card {
    background: var(--white);
    border: none;
    border-radius: var(--border-radius-lg);
    box-shadow: var(--shadow);
}

.card-header {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    color: var(--white);
    border-bottom: none;
    padding: 0.75rem 1rem;
    font-weight: 600;
}

.card-header h5 {
    margin: 0;
    font-size: 0.875rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--white);
}

.card-body {
    padding: 0.75rem;
}

.card-footer {
    background: none;
    border-top: 1px solid #e2e8f0;
    padding: 1rem 1.25rem;
}

/* ==================== STAT CARDS ==================== */

.stat-card {
    border-radius: var(--border-radius-lg);
    overflow: hidden;
}

.stat-card-body {
    padding: 1rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.stat-card-icon {
    width: 40px;
    height: 40px;
    border-radius: var(--border-radius);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
}

.stat-card-content h3 {
    font-size: 1.25rem;
    font-weight: 700;
    margin: 0;
}

.stat-card-content p {
    margin: 0;
    font-size: 0.75rem;
    opacity: 0.9;
}

.stat-card-primary {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    color: var(--white);
}

.stat-card-primary .stat-card-icon {
    background: rgba(255, 255, 255, 0.2);
}

.stat-card-success {
    background: linear-gradient(135deg, var(--success) 0%, #16a34a 100%);
    color: var(--white);
}

.stat-card-success .stat-card-icon {
    background: rgba(255, 255, 255, 0.2);
}

.stat-card-info {
    background: linear-gradient(135deg, var(--info) 0%, #0891b2 100%);
    color: var(--white);
}

.stat-card-info .stat-card-icon {
    background: rgba(255, 255, 255, 0.2);
}

.stat-card-warning {
    background: linear-gradient(135deg, var(--warning) 0%, #d97706 100%);
    color: var(--white);
}

.stat-card-warning .stat-card-icon {
    background: rgba(255, 255, 255, 0.2);
}

/* ==================== TABLES ==================== */

.table {
    margin: 0;
    font-size: 0.8rem;
}

.table th {
    font-weight: 600;
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--white);
    background: var(--primary);
    border-bottom: none;
    padding: 0.5rem 0.75rem;
}

.table td {
    padding: 0.5rem 0.75rem;
    vertical-align: middle;
    border-bottom: 1px solid #f1f5f9;
}

.table-hover tbody tr:hover {
    background: #f8fafc;
}

/* ==================== BUTTONS ==================== */

.btn {
    font-weight: 500;
    padding: 0.375rem 0.75rem;
    border-radius: var(--border-radius);
    transition: all 0.2s;
    font-size: 0.8rem;
}

.btn-primary {
    background: var(--primary);
    border-color: var(--primary);
}

.btn-primary:hover {
    background: var(--primary-dark);
    border-color: var(--primary-dark);
}

.btn-group-sm .btn {
    padding: 0.375rem 0.625rem;
    font-size: 0.875rem;
}

/* ==================== LIVE MATCH CARD ==================== */

.card-live {
    border: 2px solid var(--danger);
}

.card-live .card-header {
    background: linear-gradient(135deg, var(--danger) 0%, #dc2626 100%);
    color: var(--white);
    border-bottom: none;
}

.live-match-card {
    background: linear-gradient(135deg, #fef2f2 0%, #fff7ed 100%);
    border: 1px solid #fecaca;
    border-radius: var(--border-radius);
    padding: 1rem;
    position: relative;
}

.live-badge {
    position: absolute;
    top: 0.5rem;
    right: 0.5rem;
    background: var(--danger);
    color: var(--white);
    font-size: 0.625rem;
    font-weight: 700;
    padding: 0.25rem 0.5rem;
    border-radius: 9999px;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

.match-teams {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
}

.match-teams .team {
    flex: 1;
    text-align: center;
}

.match-teams .team-name {
    font-size: 0.875rem;
    font-weight: 500;
}

.match-score {
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

.match-score .score {
    font-size: 1.5rem;
    font-weight: 700;
}

.match-score .divider {
    font-size: 1.25rem;
    color: var(--secondary);
}

/* ==================== TEAM LOGO ==================== */

.team-logo {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    overflow: hidden;
}

.team-logo-small {
    width: 32px;
    height: 32px;
}

.team-logo-large {
    width: 80px;
    height: 80px;
}

.no-logo {
    background: #e2e8f0;
    color: var(--secondary);
}

.no-logo i {
    font-size: 1rem;
}

/* ==================== LIVE STEUERUNG ==================== */

.game-list {
    max-height: 600px;
    overflow-y: auto;
}

.live-score-display {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 2rem;
    padding: 1.5rem;
}

.live-score-display .team {
    text-align: center;
    flex: 1;
}

.live-score-display .team h4 {
    margin: 0;
    font-size: 1.125rem;
    font-weight: 600;
}

.score-box {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.score-box .score {
    font-size: 3.5rem;
    font-weight: 800;
    line-height: 1;
    min-width: 60px;
    text-align: center;
}

.score-box .divider {
    font-size: 2.5rem;
    color: var(--secondary);
}

.player-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 0.5rem;
    padding: 0.5rem;
}

.btn-player {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 0.75rem 0.5rem;
    min-height: 60px;
    font-size: 0.75rem;
    text-align: center;
    line-height: 1.2;
}

.btn-player .player-nr {
    font-weight: 700;
    font-size: 0.875rem;
}

.btn-player .player-name {
    font-weight: 500;
}

/* ==================== TOOLBAR ==================== */

.toolbar {
    background: var(--white);
    border-radius: var(--border-radius-lg);
    padding: 0.75rem 1rem;
    box-shadow: var(--shadow);
    border-left: 4px solid var(--primary);
}

/* ==================== RESPONSIVE ==================== */

@media (max-width: 991.98px) {
    .sidebar {
        transform: translateX(-100%);
    }
    
    .sidebar.show {
        transform: translateX(0);
    }
    
    .main-wrapper {
        margin-left: 0;
    }
    
    .top-navbar .sidebar-toggle {
        display: block;
    }
    
    .player-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 575.98px) {
    .live-score-display {
        flex-direction: column;
        gap: 1rem;
    }
    
    .score-box .score {
        font-size: 2.5rem;
        min-width: 40px;
    }
}
