/* Auth Screen */
.auth-container {
    max-width: 400px;
    margin: 0 auto;
    padding: 2rem 1.5rem;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.auth-logo {
    text-align: center;
    margin-bottom: 2rem;
}

.logo-icon {
    font-size: 3.5rem;
    margin-bottom: 0.5rem;
}

.logo-img {
    width: 100px;
    height: auto;
    margin-bottom: 0.75rem;
}

.auth-logo h1 {
    font-size: 1.75rem;
    color: var(--text);
}

.auth-form {
    background: var(--bg-card);
    border: 1px solid var(--border);
    padding: 1.75rem;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-md);
}

.auth-switch {
    text-align: center;
    margin-top: 1rem;
    font-size: 0.875rem;
    color: var(--text-secondary);
}

/* Header */
.app-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: var(--header-height);
    background: var(--primary);
    color: white;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 0.5rem;
    z-index: 100;
    box-shadow: 0 1px 0 rgba(0, 0, 0, 0.06), 0 4px 12px rgba(0, 0, 0, 0.08);
}

.header-title {
    font-size: 1.1rem;
    font-weight: 600;
}

.header-right {
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

.header-vereinsname {
    font-size: 0.75rem;
    font-weight: 500;
    opacity: 0.85;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 120px;
}

.header-btn {
    background: none;
    border: none;
    color: white;
    padding: 0.5rem;
    cursor: pointer;
    border-radius: var(--radius);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background var(--duration) var(--ease-out),
                transform var(--duration-fast) var(--ease-out);
}

.header-btn:hover {
    background: rgba(255, 255, 255, 0.15);
}

.header-btn:active {
    transform: scale(0.94);
}

/* Sidebar */
.sidebar-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.4);
    z-index: 150;
    animation: fadeIn 0.2s ease;
}

.sidebar {
    position: fixed;
    top: 0;
    left: -100%;
    width: var(--sidebar-width);
    max-width: 85vw;
    height: 100vh;
    background: var(--bg-card);
    z-index: 160;
    box-shadow: var(--shadow-lg);
    transition: left 0.3s ease;
    overflow-y: auto;
}

.sidebar.open {
    left: 0;
}

.sidebar-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem 1.25rem;
    border-bottom: 1px solid var(--border);
}

.sidebar-header .header-btn {
    color: var(--text);
}

.sidebar-title {
    font-weight: 700;
    font-size: 1.1rem;
}

.nav-list {
    list-style: none;
    padding: 0.5rem 0;
}

.nav-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.65rem 1rem;
    margin: 0 0.5rem;
    color: var(--text);
    text-decoration: none;
    font-weight: 500;
    border-radius: var(--radius);
    transition: background var(--duration) var(--ease-out),
                color var(--duration) var(--ease-out);
    position: relative;
}

.nav-item:hover {
    background: var(--bg-subtle);
    text-decoration: none;
}

.nav-item.active {
    color: var(--primary);
    background: var(--primary-light);
    font-weight: 600;
}

.nav-item.active::before {
    content: '';
    position: absolute;
    left: -0.5rem;
    top: 25%;
    bottom: 25%;
    width: 3px;
    background: var(--primary);
    border-radius: 0 2px 2px 0;
}

.nav-item .badge {
    margin-left: auto;
}

.nav-icon {
    font-size: 1.1rem;
    width: 1.5rem;
    text-align: center;
}

.nav-divider {
    padding: 0.75rem 1.25rem 0.35rem;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-muted);
}

/* Profile Dropdown */
.profile-dropdown {
    position: fixed;
    top: calc(var(--header-height) + 0.5rem);
    right: 0.75rem;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
    min-width: 240px;
    z-index: 120;
    padding: 0.5rem;
    animation: modalIn var(--duration) var(--ease-out);
}

.profile-info {
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
    padding: 0.25rem 0.5rem;
}

.profile-info strong {
    font-size: 0.95rem;
}

.dropdown-item {
    display: block;
    width: 100%;
    padding: 0.6rem 0.75rem;
    border: none;
    background: none;
    text-align: left;
    font-size: 0.9rem;
    font-family: var(--font);
    font-weight: 500;
    color: var(--text);
    cursor: pointer;
    border-radius: var(--radius);
    transition: background var(--duration) var(--ease-out);
}

.dropdown-item:hover {
    background: var(--bg-subtle);
}

.dropdown-item-danger {
    color: var(--danger);
}

/* Logo-Wasserzeichen: dezent im Hintergrund der App-Seiten,
   skaliert mit Viewport (60% der kleineren Dimension, max 600px).
   Nur sichtbar wenn #app-screen aktiv ist (eingeloggt) — auf Login
   bleibt das prominente Auth-Logo allein.
   position:fixed → bleibt beim Scrollen mittig.
   Sidebar/Header haben opake Hintergründe und überdecken das Logo. */
#app-screen::before {
    content: '';
    position: fixed;
    inset: 0;
    background-image: url('../assets/logo-watermark.png');
    background-position: center center;
    background-repeat: no-repeat;
    background-size: min(60vw, 60vh, 600px);
    opacity: 0.06;
    pointer-events: none;
    z-index: 0;
}

/* Page Content */
.page-content {
    padding: calc(var(--header-height) + 1rem) 1rem 2rem;
    max-width: 800px;
    margin: 0 auto;
    position: relative;
    z-index: 1;
}

.page-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.25rem;
}

.page-header h2 {
    font-size: 1.25rem;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

/* Responsive: kleine Bildschirme */
@media (max-width: 480px) {
    .page-content {
        padding-left: 0.75rem;
        padding-right: 0.75rem;
    }

    .card {
        padding: 1rem;
    }
}

/* Responsive: Desktop — Sidebar permanent sichtbar */
@media (min-width: 1024px) {
    .sidebar {
        left: 0;
        top: 0;
        height: 100vh;
        box-shadow: 1px 0 0 var(--border);
        transition: none;
    }

    .sidebar-header {
        background: var(--primary);
        border-bottom: none;
        height: var(--header-height);
    }

    .sidebar-header .header-btn {
        display: none;
    }

    .sidebar-title {
        color: #fff;
    }

    .sidebar-overlay {
        display: none !important;
    }

    #menu-toggle {
        display: none;
    }

    .app-header {
        left: var(--sidebar-width);
    }

    .page-content {
        padding-left: calc(var(--sidebar-width) + 1rem);
        padding-right: 1rem;
        max-width: calc(800px + var(--sidebar-width) + 2rem);
        margin: 0 auto;
    }

    .profile-dropdown {
        right: 0.75rem;
    }
}
