/* Basis-Styles für die Vereinsverwaltung */

:root {
    --primary-color: #0d6efd;
    --secondary-color: #6c757d;
    --success-color: #198754;
    --danger-color: #dc3545;
    --warning-color: #ffc107;
    --sidebar-width: 260px;
}

.bg-primary {
    background-color: var(--primary-color) !important;
}

.btn-primary {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
}

.btn-primary:hover, 
.btn-primary:focus {
    background-color: color-mix(in srgb, var(--primary-color) 85%, black);
    border-color: color-mix(in srgb, var(--primary-color) 85%, black);
}

.text-primary {
    color: var(--primary-color) !important;
}

body {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

main {
    flex: 1;
}

.navbar-brand {
    font-weight: 600;
}

/* Profilbild in der Navigation */
.navbar-profile-img {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid rgba(255, 255, 255, 0.8);
}

.navbar .nav-link {
    transition: all 0.2s ease;
}

.navbar .nav-link:hover .navbar-profile-img {
    border-color: #fff;
    transform: scale(1.05);
}

.card {
    transition: transform 0.2s, box-shadow 0.2s;
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.table-responsive {
    margin-top: 1rem;
}

.btn-action {
    margin: 0 2px;
}

/* Button-Abstände nur für Button-Bereiche im Header (z.B. text-end) */
.text-end > .btn,
.text-end > a.btn {
    margin-left: 0.25rem;
    margin-bottom: 0.5rem;
}

/* Mobile: Buttons im Header bekommen unten Abstand wenn sie umbrechen */
@media (max-width: 768px) {
    .text-end > .btn,
    .text-end > a.btn,
    .col-md-4.text-end .btn,
    .col-md-4.text-end a.btn {
        margin-bottom: 0.5rem;
        margin-left: 0.25rem;
    }
}

footer {
    margin-top: auto;
}

/* Login-Seite */
.login-container {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Dashboard Cards */
.dashboard-card {
    border-left: 4px solid var(--primary-color);
}

.dashboard-card.success {
    border-left-color: var(--success-color);
}

.dashboard-card.warning {
    border-left-color: var(--warning-color);
}

.dashboard-card.danger {
    border-left-color: var(--danger-color);
}

/* Profilseite */
.profile-picture-preview {
    width: 200px;
    height: 200px;
    object-fit: cover;
    border: 3px solid var(--primary-color);
}

.profile-info-card {
    background: #f8f9fa;
}

.profile-info-card ul {
    margin-bottom: 0;
}

.profile-info-card li {
    padding: 8px 0;
    border-bottom: 1px solid #dee2e6;
}

.profile-info-card li:last-child {
    border-bottom: none;
}

/* Bild-Upload-Vorschau */
.image-preview {
    max-width: 100%;
    margin-top: 10px;
    border-radius: 8px;
}

/* Responsive Anpassungen */
@media (max-width: 768px) {
    .table {
        font-size: 0.875rem;
    }
    
    .btn-action {
        padding: 0.25rem 0.5rem;
        font-size: 0.875rem;
    }
    
    .profile-picture-preview {
        width: 150px;
        height: 150px;
    }
    
    #sidebar {
        transform: translateX(-100%);
    }
    
    #sidebar.show {
        transform: translateX(0);
    }
    
    .content-wrapper {
        margin-left: 0;
    }
}

/* Sidebar Layout */
#sidebar {
    position: fixed;
    top: 0;
    left: 0;
    height: 100vh;
    width: var(--sidebar-width);
    background-color: var(--primary-color);
    transition: transform 0.3s ease-in-out;
    z-index: 1000;
    overflow-y: auto;
    box-shadow: 2px 0 5px rgba(0,0,0,0.1);
}

#sidebar.collapsed {
    transform: translateX(-100%);
}

#sidebar .sidebar-header {
    padding: 20px;
    border-bottom: 1px solid rgba(255,255,255,0.1);
}

#sidebar .nav-link {
    color: rgba(255,255,255,0.85);
    padding: 12px 20px;
    display: flex;
    align-items: center;
    transition: all 0.2s;
    border-left: 3px solid transparent;
}

#sidebar .nav-link:hover,
#sidebar .nav-link.active {
    background-color: rgba(255,255,255,0.1);
    color: white;
    border-left-color: white;
}

#sidebar .nav-link i {
    width: 24px;
    margin-right: 10px;
    font-size: 1.1em;
}

.content-wrapper {
    margin-left: var(--sidebar-width);
    transition: margin-left 0.3s ease-in-out;
    min-height: 100vh;
}

.content-wrapper.expanded {
    margin-left: 0;
}

.top-bar {
    background-color: white;
    padding: 15px 20px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.top-bar-title {
    font-size: 1.3em;
    font-weight: 600;
    color: #333;
}

.sidebar-toggle {
    background: none;
    border: none;
    font-size: 1.5em;
    cursor: pointer;
    color: #333;
    padding: 5px 10px;
}

.sidebar-toggle:hover {
    background-color: #f0f0f0;
    border-radius: 4px;
}

.user-menu {
    display: flex;
    align-items: center;
    gap: 10px;
}

.sidebar-profile {
    padding: 20px;
    border-top: 1px solid rgba(255,255,255,0.1);
    color: white;
    margin-top: auto;
}

.sidebar-profile img {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid white;
}

/* Login-Seite mit Gradient */
.login-page {
    background: linear-gradient(135deg, var(--primary-color) 0%, color-mix(in srgb, var(--primary-color) 70%, black) 100%);
    min-height: 100vh;
    display: flex;
    align-items: center;
}

.login-card {
    background: white;
    border-radius: 15px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.2);
}

.club-name {
    color: white;
    text-align: center;
    margin-bottom: 30px;
    margin-top: 60px;
    font-size: 2em;
    font-weight: 600;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.3);
}
