/*
 * TimeSpy – navigation
 * Teil der aufgeteilten timespy.css (siehe base.css für Variablen).
 * Reihenfolge der <link>-Tags in layout.php/login.php ist wichtig
 * und entspricht exakt der ursprünglichen Reihenfolge in dieser Datei.
 */

/* =========================================================
   SIDEBAR
   ========================================================= */

.sidebar {
    position: sticky;
    top: 0;

    height: 100vh;

    display: flex;
    flex-direction: column;

    padding: 18px 14px;

    border-top: none;
    border-bottom: none;
    border-left: none;

    z-index: 50;
}

.sidebar-brand {
    display: flex;
    align-items: center;
    gap: 12px;

    min-height: 64px;
    padding: 4px 10px 18px;
}

.brand-mark {
    width: 40px;
    height: 40px;

    display: grid;
    place-items: center;

    color: white;

    background:
        linear-gradient(
            135deg,
            #2563eb,
            #7c3aed
        );

    border-radius: 12px;

    font-weight: 800;
    font-size: 1.1rem;

    box-shadow:
        0 8px 22px rgba(37,99,235,.25);
}

.brand-name {
    font-weight: 700;
    font-size: 1rem;
    letter-spacing: -0.025em;
}

.brand-subtitle {
    margin-top: 2px;

    color: var(--text-muted);

    font-size: .72rem;
}

.sidebar-nav {
    display: flex;
    flex-direction: column;
    gap: 4px;

    flex: 1;
}

.nav-item {
    position: relative;

    display: flex;
    align-items: center;
    gap: 12px;

    min-height: 44px;

    padding: 0 12px;

    color: var(--text-secondary);
    text-decoration: none;

    border-radius: 11px;

    font-size: .9rem;
    font-weight: 550;

    transition:
        background var(--transition),
        color var(--transition),
        transform var(--transition);
}

.nav-item:hover {
    color: var(--text);
    background: rgba(255,255,255,.75);
}

.nav-item.active {
    color: var(--accent);
    background: var(--accent-soft);
}

.nav-item.active::before {
    content: "";

    position: absolute;
    left: -5px;

    width: 3px;
    height: 20px;

    border-radius: 999px;

    background: var(--accent);
}

.nav-icon {
    width: 22px;

    display: inline-flex;
    justify-content: center;

    font-size: 1.05rem;
}

.nav-section-label {
    margin:
        22px
        12px
        8px;

    color: var(--text-muted);

    font-size: .68rem;
    font-weight: 700;

    letter-spacing: .08em;
    text-transform: uppercase;
}

.sidebar-bottom {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

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

    padding: 10px;

    background: rgba(255,255,255,.55);

    border: 1px solid var(--border);
    border-radius: 14px;
}

.user-avatar {
    width: 36px;
    height: 36px;

    display: grid;
    place-items: center;

    flex: 0 0 auto;

    color: white;
    background: #171717;

    border-radius: 11px;

    font-weight: 700;
}

.user-meta {
    min-width: 0;

    display: flex;
    flex-direction: column;

    flex: 1;
}

.user-meta strong {
    overflow: hidden;
    text-overflow: ellipsis;

    font-size: .82rem;
}

.user-meta span {
    color: var(--text-muted);

    font-size: .7rem;
}

.user-logout {
    border: 0;
    background: transparent;

    color: var(--text-muted);

    cursor: pointer;

    font-size: 1rem;
}

/* =========================================================
   TOPBAR
   ========================================================= */

.topbar {
    min-height: var(--topbar-height);

    display: flex;
    align-items: center;
    justify-content: space-between;

    padding: 28px 0 22px;
}

.topbar-actions {
    display: flex;
    gap: 8px;
}

.icon-button {
    width: 42px;
    height: 42px;

    display: grid;
    place-items: center;

    border: 1px solid var(--border);
    border-radius: 12px;

    background: rgba(255,255,255,.72);

    color: var(--text-secondary);

    cursor: pointer;

    box-shadow: var(--shadow-sm);

    transition:
        background var(--transition),
        transform var(--transition);
}

.icon-button:hover {
    background: white;
    transform: translateY(-1px);
}

/* =========================================================
   PAGE
   ========================================================= */

.page-content {
    animation: page-enter .34s ease both;
}

@keyframes page-enter {
    from {
        opacity: 0;
        transform: translateY(7px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}



